efficient-shell 12.12.0 → 12.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/README.md +5 -1
  2. package/dist/{Browser-KPVR5Z6J.js → Browser-V35ERC75.js} +14 -14
  3. package/dist/{Calculator-RP4UPGG7.js → Calculator-FY7CWH3U.js} +22 -22
  4. package/dist/{CurrencyConverter-HZWRB62S.js → CurrencyConverter-X2ZMKSB6.js} +9 -9
  5. package/dist/{Files-4DVFS74H.js → Files-5QCSSGZO.js} +81 -81
  6. package/dist/{Notepad-ZQF2NRZZ.js → Notepad-2AXGNMRM.js} +10 -10
  7. package/dist/PdfViewer-F2TCC5UD.js +1 -0
  8. package/dist/PomodoroTimer-LQM4OSNO.js +91 -0
  9. package/dist/{Preview-DBXNCPGO.js → Preview-NI7HTAAW.js} +36 -36
  10. package/dist/Sidebar-ADAIERCI.js +44 -0
  11. package/dist/{Stock-WK45DFIC.js → Stock-ENUIGK4M.js} +3 -3
  12. package/dist/{Weather-BVKZQI4R.js → Weather-QRQVA3LE.js} +21 -21
  13. package/dist/{WorldClock-L3BQXXQX.js → WorldClock-QJOV3TND.js} +6 -6
  14. package/dist/ai/index.d.ts +1 -1
  15. package/dist/ai/index.js +79 -79
  16. package/dist/apps/ImageAnnotator.js +1 -1
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChartBrush.js +1 -1
  25. package/dist/charts/ChartFrame.js +1 -1
  26. package/dist/charts/ChartSkeleton.js +1 -1
  27. package/dist/charts/ChordChart.js +1 -1
  28. package/dist/charts/ColumnChart.js +1 -1
  29. package/dist/charts/FunnelChart.js +1 -1
  30. package/dist/charts/HeatmapChart.js +1 -1
  31. package/dist/charts/HistogramChart.js +1 -1
  32. package/dist/charts/Meter.js +1 -1
  33. package/dist/charts/PieChart.js +1 -1
  34. package/dist/charts/RadarChart.js +1 -1
  35. package/dist/charts/RadialBarChart.js +1 -1
  36. package/dist/charts/RangeChart.js +1 -1
  37. package/dist/charts/RankedBars.js +1 -1
  38. package/dist/charts/SankeyChart.js +1 -1
  39. package/dist/charts/ScatterChart.js +1 -1
  40. package/dist/charts/SpecChart.js +1 -1
  41. package/dist/charts/StatTile.js +1 -1
  42. package/dist/charts/SunburstChart.js +1 -1
  43. package/dist/charts/TimeSeriesChart.js +1 -1
  44. package/dist/charts/TreemapChart.js +1 -1
  45. package/dist/charts/WaterfallChart.js +1 -1
  46. package/dist/{chunk-YX4MRM7A.js → chunk-232YPI2L.js} +6 -6
  47. package/dist/{chunk-6ET6JVNL.js → chunk-24JKQX2N.js} +4 -4
  48. package/dist/{chunk-5EKNXSQG.js → chunk-24LO6OH4.js} +1 -1
  49. package/dist/{chunk-EDANELWX.js → chunk-2DYVVHZA.js} +1 -1
  50. package/dist/{chunk-M4MN2GOE.js → chunk-2NZ7CVMW.js} +1 -1
  51. package/dist/{chunk-GCVIUXKL.js → chunk-2ZPNA7L7.js} +1 -1
  52. package/dist/{chunk-45HQXTA6.js → chunk-3A6FYWFQ.js} +1 -1
  53. package/dist/{chunk-ITGFHWYG.js → chunk-3HZS3BAZ.js} +12 -12
  54. package/dist/{chunk-27ZJQUDS.js → chunk-3N5OI6VM.js} +1 -1
  55. package/dist/{chunk-JTZVUO3I.js → chunk-3YBXA72C.js} +1 -1
  56. package/dist/chunk-42XSMAIK.js +2 -0
  57. package/dist/{chunk-2GS2VOQT.js → chunk-4BKJ6A5H.js} +9 -9
  58. package/dist/{chunk-Y23BITKG.js → chunk-4I4WZHMV.js} +1 -1
  59. package/dist/{chunk-JGJWPONL.js → chunk-4IHYWLWE.js} +5 -5
  60. package/dist/{chunk-KIRLSUQT.js → chunk-4LOHQ4QB.js} +5 -5
  61. package/dist/{chunk-YVAJ42M2.js → chunk-4Y33Y4OX.js} +6 -6
  62. package/dist/{chunk-654DGV5Q.js → chunk-56XKHWNL.js} +1 -1
  63. package/dist/chunk-574SLTKO.js +8 -0
  64. package/dist/{chunk-MFZPTS7W.js → chunk-5MH5N76F.js} +4 -4
  65. package/dist/{chunk-OTXJ6VWX.js → chunk-5VGIIMON.js} +1 -1
  66. package/dist/{chunk-5ZQY42QX.js → chunk-5WZ53AS5.js} +1 -1
  67. package/dist/{chunk-YFDS6KF3.js → chunk-6A26HUVK.js} +1 -1
  68. package/dist/chunk-6KITIRNZ.js +3 -0
  69. package/dist/{chunk-GB2XLSR5.js → chunk-74JMBOQH.js} +10 -10
  70. package/dist/{chunk-6YIVKPWQ.js → chunk-75H4BWNC.js} +1 -1
  71. package/dist/{chunk-AUCNJFTP.js → chunk-7K3FYCRZ.js} +9 -9
  72. package/dist/{chunk-4NLCXHWN.js → chunk-7X2P6IH3.js} +4 -4
  73. package/dist/{chunk-SEHKTBVM.js → chunk-7ZJRBFHA.js} +1 -1
  74. package/dist/chunk-A4PFVMQ2.js +7 -0
  75. package/dist/chunk-AADOAA5N.js +2 -0
  76. package/dist/{chunk-BFCIOWYI.js → chunk-AELSVMXH.js} +1 -1
  77. package/dist/{chunk-JZKACEXW.js → chunk-AQZUTW7N.js} +8 -8
  78. package/dist/chunk-ASM2VLQ2.js +2 -0
  79. package/dist/{chunk-ZV6WLVD3.js → chunk-B2KQ3T7Q.js} +6 -6
  80. package/dist/chunk-BHHFVIAD.js +2 -0
  81. package/dist/{chunk-EQ2KTDOU.js → chunk-BWYOTLJL.js} +3 -3
  82. package/dist/{chunk-GMJ5WOB2.js → chunk-CBVKGAZH.js} +1 -1
  83. package/dist/{chunk-BYDSBDVS.js → chunk-CEIIQRK5.js} +6 -6
  84. package/dist/{chunk-GMLDGXNQ.js → chunk-CJ3MI2NH.js} +1 -1
  85. package/dist/{chunk-FZWAOYAM.js → chunk-CMJD5URC.js} +9 -9
  86. package/dist/{chunk-EO6MOQOZ.js → chunk-DCNSQGHJ.js} +12 -12
  87. package/dist/chunk-DG2TGWXI.js +15 -0
  88. package/dist/{chunk-D4K72BHN.js → chunk-DGHSCKOE.js} +4 -4
  89. package/dist/{chunk-GBEDLYND.js → chunk-DJXXY23A.js} +2 -2
  90. package/dist/{chunk-UDYVA5DV.js → chunk-DJYZ2EF4.js} +10 -10
  91. package/dist/{chunk-Q64F2EXW.js → chunk-EDX55XGV.js} +6 -6
  92. package/dist/{chunk-QULE4LAC.js → chunk-EEAY7FJW.js} +17 -17
  93. package/dist/{chunk-CINGDJPM.js → chunk-EEB5XPWP.js} +1 -1
  94. package/dist/{chunk-ZLFZJX6M.js → chunk-EGCHJHRR.js} +8 -8
  95. package/dist/chunk-ENFXDIIZ.js +8 -0
  96. package/dist/{chunk-U35TIWEP.js → chunk-EZ6O5TQ3.js} +16 -16
  97. package/dist/{chunk-CB5FQMFB.js → chunk-FI6IJTAJ.js} +12 -12
  98. package/dist/{chunk-JVNJCRHM.js → chunk-FJVZ2W55.js} +1 -1
  99. package/dist/{chunk-EAXPSAHZ.js → chunk-FQHPGREQ.js} +9 -9
  100. package/dist/{chunk-NBUL37WB.js → chunk-FUTLZ6BC.js} +1 -1
  101. package/dist/chunk-FVKXDF2Q.js +12 -0
  102. package/dist/chunk-FYNPQAFI.js +1 -0
  103. package/dist/{chunk-QGFAQVUO.js → chunk-G3E4CD77.js} +6 -6
  104. package/dist/{chunk-AG6Y62TP.js → chunk-G6LSBF3P.js} +69 -69
  105. package/dist/{chunk-SFFELHLP.js → chunk-GC4N4UQM.js} +5 -5
  106. package/dist/{chunk-4UQNNA4K.js → chunk-GEVNBBM7.js} +1 -1
  107. package/dist/chunk-GOEHP2XM.js +4 -0
  108. package/dist/{chunk-G3VRO4CK.js → chunk-GUHCKMC7.js} +2 -2
  109. package/dist/{chunk-B7HTKDT3.js → chunk-H32UNWVU.js} +5 -5
  110. package/dist/chunk-HGOWQO63.js +1 -0
  111. package/dist/{chunk-NHIP2S4E.js → chunk-HJF4UZOA.js} +13 -13
  112. package/dist/chunk-I2DIQQOR.js +2 -0
  113. package/dist/{chunk-5T4WTFBC.js → chunk-I3TVRNUT.js} +1 -1
  114. package/dist/{chunk-5NCR64CE.js → chunk-IIC76MWQ.js} +1 -1
  115. package/dist/{chunk-6BNLDGST.js → chunk-ILIPEY3D.js} +1 -1
  116. package/dist/{chunk-FSZ3TNAR.js → chunk-JAVTQART.js} +1 -1
  117. package/dist/{chunk-HEX3EP5F.js → chunk-JFGJJNT2.js} +4 -4
  118. package/dist/chunk-JSHMIMAJ.js +1 -0
  119. package/dist/{chunk-SWB32OKH.js → chunk-JTGRLXZN.js} +1 -1
  120. package/dist/{chunk-NV7QRWQJ.js → chunk-JZBLOIL7.js} +1 -1
  121. package/dist/{chunk-O3YCIWHF.js → chunk-KAKJ7ENS.js} +2 -2
  122. package/dist/{chunk-YPZXE67U.js → chunk-KSMEWOCE.js} +1 -1
  123. package/dist/{chunk-LTN4AQYG.js → chunk-KX53AB74.js} +1 -1
  124. package/dist/chunk-L7MWAC2P.js +6 -0
  125. package/dist/{chunk-WJBP5SND.js → chunk-LIWBCIRZ.js} +4 -4
  126. package/dist/chunk-LIX6KTZJ.js +4 -0
  127. package/dist/{chunk-P3GBQBDC.js → chunk-LQVQX5B2.js} +1 -1
  128. package/dist/chunk-MLPXTFDS.js +1 -0
  129. package/dist/{chunk-WQV7VQ5Z.js → chunk-MRLXGLNZ.js} +1 -1
  130. package/dist/{chunk-KWTK6TGH.js → chunk-MWTCGJAI.js} +1 -1
  131. package/dist/{chunk-6JLXXX4H.js → chunk-N2445WHJ.js} +12 -12
  132. package/dist/{chunk-5POLDDQW.js → chunk-NBNYKV3D.js} +7 -7
  133. package/dist/{chunk-LY55C5UI.js → chunk-NKP5WCEA.js} +5 -5
  134. package/dist/{chunk-MEAJGM6F.js → chunk-NOGSS432.js} +1 -1
  135. package/dist/{chunk-V6FHZGCL.js → chunk-OM6VWUAZ.js} +1 -1
  136. package/dist/{chunk-EIXMUGVZ.js → chunk-OOWPLQD5.js} +2 -2
  137. package/dist/chunk-OP4VQWSH.js +2 -0
  138. package/dist/{chunk-NOEAEXIZ.js → chunk-OVD3ECM7.js} +1 -1
  139. package/dist/chunk-P6FGTDDX.js +2 -0
  140. package/dist/chunk-PCZSE6CC.js +5 -0
  141. package/dist/{chunk-UG5GKEU5.js → chunk-QADNVFV5.js} +1 -1
  142. package/dist/{chunk-BET6KEY2.js → chunk-QPYVCG74.js} +12 -12
  143. package/dist/chunk-QU23OGAX.js +27 -0
  144. package/dist/{chunk-L6LWO5NQ.js → chunk-R7QEGRKE.js} +1 -1
  145. package/dist/{chunk-ZR2UWJIR.js → chunk-RBS3AWE7.js} +1 -1
  146. package/dist/{chunk-WM2BBRT6.js → chunk-RF3ZFTAU.js} +1 -1
  147. package/dist/chunk-RMDVKQJE.js +3 -0
  148. package/dist/{chunk-42BVXJZN.js → chunk-RZ2DWX4N.js} +5 -5
  149. package/dist/{chunk-PDCCNHTP.js → chunk-SDL4VWFU.js} +1 -1
  150. package/dist/{chunk-VPZOSVDF.js → chunk-SE6IQZYW.js} +9 -9
  151. package/dist/chunk-SNLGA2PZ.js +1 -0
  152. package/dist/{chunk-ISU4FCEX.js → chunk-SR4W2SYQ.js} +4 -4
  153. package/dist/chunk-SXUSAHDF.js +2 -0
  154. package/dist/{chunk-TJCJLKJB.js → chunk-T3JSUBIF.js} +1 -1
  155. package/dist/{chunk-SY65V6K7.js → chunk-T7D73HT7.js} +9 -9
  156. package/dist/chunk-TU2L7NW3.js +7 -0
  157. package/dist/{chunk-VLCHHTX6.js → chunk-TYQ2JL4J.js} +1 -1
  158. package/dist/{chunk-QQ5XCRZM.js → chunk-UEEELXEN.js} +8 -8
  159. package/dist/{chunk-LMUB2EAD.js → chunk-UULBPDAH.js} +8 -8
  160. package/dist/chunk-UWLGKMH5.js +9 -0
  161. package/dist/{chunk-Z7RXWXR5.js → chunk-V4XR4MOS.js} +1 -1
  162. package/dist/{chunk-4MUE4CYB.js → chunk-VBLCYL4L.js} +1 -1
  163. package/dist/chunk-VDYF3WPJ.js +2 -0
  164. package/dist/{chunk-MAI2DN7N.js → chunk-VEQ45GAH.js} +1 -1
  165. package/dist/{chunk-HE24VQMU.js → chunk-VFHKD7TQ.js} +1 -1
  166. package/dist/{chunk-TCMAWDBL.js → chunk-VJXPT53M.js} +18 -18
  167. package/dist/{chunk-5S4YF5XA.js → chunk-VP2GI3UP.js} +7 -7
  168. package/dist/{chunk-44VAZ2EL.js → chunk-VYRVSTI6.js} +9 -9
  169. package/dist/{chunk-QQM36CYU.js → chunk-W2663E4S.js} +3 -3
  170. package/dist/{chunk-QMNDKNK2.js → chunk-WESNFWM4.js} +1 -1
  171. package/dist/{chunk-NGQZI7HP.js → chunk-WLUJQLXG.js} +1 -1
  172. package/dist/chunk-WNOXHJVT.js +9 -0
  173. package/dist/{chunk-EVEGK57J.js → chunk-WPG3ZHYT.js} +1 -1
  174. package/dist/{chunk-QCOXJXGZ.js → chunk-WQ4YKWN2.js} +1 -1
  175. package/dist/{chunk-YVIV7SKG.js → chunk-WXZZGHET.js} +1 -1
  176. package/dist/{chunk-BGBSEPPH.js → chunk-WYGUHCJ2.js} +8 -8
  177. package/dist/{chunk-BM5QI2L6.js → chunk-XG5ER6GJ.js} +6 -6
  178. package/dist/{chunk-ASOVTAIT.js → chunk-XHSMDUEW.js} +3 -3
  179. package/dist/{chunk-YMJOFWW6.js → chunk-XKJGJNY2.js} +3 -3
  180. package/dist/{chunk-6P7SIIG4.js → chunk-XKNKRKHH.js} +14 -14
  181. package/dist/chunk-XQWHKXLS.js +22 -0
  182. package/dist/{chunk-GOKJZKLV.js → chunk-XU3YOWEG.js} +1 -1
  183. package/dist/{chunk-SXHNZFUY.js → chunk-Y6E7IRK2.js} +1 -1
  184. package/dist/{chunk-5HOXR3L4.js → chunk-Y7KDCC6E.js} +1 -1
  185. package/dist/chunk-YHB6MJYD.js +28 -0
  186. package/dist/{chunk-AKTEMZOT.js → chunk-YO26RV3H.js} +1 -1
  187. package/dist/{chunk-SEMV4NCH.js → chunk-YU52WMSH.js} +1 -1
  188. package/dist/chunk-YX2OOGV7.js +4 -0
  189. package/dist/chunk-YYW4VNWL.js +1 -0
  190. package/dist/{chunk-RQKD5AAL.js → chunk-Z66QBDNU.js} +1 -1
  191. package/dist/{chunk-IARCNQD3.js → chunk-ZGWXSHVM.js} +1 -1
  192. package/dist/{chunk-AXFNOY2L.js → chunk-ZTRKM3B5.js} +7 -7
  193. package/dist/data/DataTable.js +1 -1
  194. package/dist/data/EntityList.js +1 -1
  195. package/dist/data/Kanban.js +1 -1
  196. package/dist/data/ListFooter.js +1 -1
  197. package/dist/data/ListLoadError.js +1 -1
  198. package/dist/data/Pagination.js +1 -1
  199. package/dist/data/ResizableTable.js +1 -1
  200. package/dist/file-intake/index.js +1 -1
  201. package/dist/forms/BorderInput.js +1 -1
  202. package/dist/forms/BrandAssetEditor.js +1 -1
  203. package/dist/forms/Calendar.js +1 -1
  204. package/dist/forms/ColorPicker.js +1 -1
  205. package/dist/forms/ComposerAttachments.js +1 -1
  206. package/dist/forms/CornersInput.js +1 -1
  207. package/dist/forms/DatePicker.js +1 -1
  208. package/dist/forms/DateRangePicker.js +1 -1
  209. package/dist/forms/DateTimePicker.js +1 -1
  210. package/dist/forms/DisplayChips.js +1 -1
  211. package/dist/forms/FilePicker.js +1 -1
  212. package/dist/forms/FormErrorSummary.js +1 -1
  213. package/dist/forms/IconPicker.js +1 -1
  214. package/dist/forms/ImageFocusPoint.js +1 -1
  215. package/dist/forms/InputNumber.d.ts +13 -1
  216. package/dist/forms/InputNumber.js +1 -1
  217. package/dist/forms/LinkPicker.js +1 -1
  218. package/dist/forms/MediaLibrary.js +1 -1
  219. package/dist/forms/MediaUploadField.js +1 -1
  220. package/dist/forms/MediaUploadGrid.js +1 -1
  221. package/dist/forms/MediaUsedInList.js +1 -1
  222. package/dist/forms/NumericKeypad.js +1 -1
  223. package/dist/forms/PositionInput.js +1 -1
  224. package/dist/forms/Select.d.ts +1 -1
  225. package/dist/forms/Select.js +1 -1
  226. package/dist/forms/SidesInput.js +1 -1
  227. package/dist/forms/Slider.js +1 -1
  228. package/dist/forms/Snippet.js +1 -1
  229. package/dist/forms/TagInput.js +1 -1
  230. package/dist/forms/TextToolbar.d.ts +1 -1
  231. package/dist/forms/TextToolbar.js +1 -1
  232. package/dist/forms/TimePicker.js +1 -1
  233. package/dist/forms/WidthsBar.js +1 -1
  234. package/dist/forms/mediaLibraryMenu.js +1 -1
  235. package/dist/forms/mediaMoveItems.js +1 -1
  236. package/dist/forms/textAlign.d.ts +1 -1
  237. package/dist/forms/textAlign.js +1 -1
  238. package/dist/forms/useFileIntake.js +1 -1
  239. package/dist/icons/efficient-glyphs.d.ts +1 -0
  240. package/dist/icons/efficient-glyphs.js +1 -1
  241. package/dist/icons/efficient-looks.d.ts +2 -0
  242. package/dist/icons/efficient-looks.js +1 -1
  243. package/dist/icons/efficient-meanings.d.ts +2 -1
  244. package/dist/icons/efficient-meanings.js +1 -1
  245. package/dist/icons/efficient.d.ts +1 -0
  246. package/dist/icons/efficient.js +1 -1
  247. package/dist/icons/glyphs/AccordionIcon.d.ts +8 -0
  248. package/dist/icons/glyphs/AccordionIcon.js +1 -0
  249. package/dist/icons/glyphs/TabsIcon.js +1 -1
  250. package/dist/icons/index.d.ts +2 -2
  251. package/dist/icons/index.js +1 -1
  252. package/dist/icons/looks/AccordionMiniIcon.d.ts +8 -0
  253. package/dist/icons/looks/AccordionMiniIcon.js +1 -0
  254. package/dist/icons/looks/AccordionSolidIcon.d.ts +8 -0
  255. package/dist/icons/looks/AccordionSolidIcon.js +1 -0
  256. package/dist/icons/looks/TabsMiniIcon.js +1 -1
  257. package/dist/icons/looks/TabsSolidIcon.js +1 -1
  258. package/dist/icons/looks/map.js +1 -1
  259. package/dist/icons/payment.js +1 -1
  260. package/dist/icons/sets.js +1 -1
  261. package/dist/index.d.ts +1 -1
  262. package/dist/index.js +665 -665
  263. package/dist/locales/zh-Hans.js +1 -1
  264. package/dist/map/index.js +2 -2
  265. package/dist/names-Cj_F68_V.d.ts +23 -0
  266. package/dist/page-tabs/index.js +5 -5
  267. package/dist/pdf/index.js +1 -1
  268. package/dist/shell/Accordion.js +1 -1
  269. package/dist/shell/AppUpdateBanner.js +1 -1
  270. package/dist/shell/Avatar.js +1 -1
  271. package/dist/shell/Banner.js +1 -1
  272. package/dist/shell/Breadcrumbs.js +1 -1
  273. package/dist/shell/BudgetBar.js +1 -1
  274. package/dist/shell/Card.js +1 -1
  275. package/dist/shell/ColoredBadge.js +1 -1
  276. package/dist/shell/ConfirmDialog.js +1 -1
  277. package/dist/shell/ContainerFillChart.js +1 -1
  278. package/dist/shell/CountBadge.js +1 -1
  279. package/dist/shell/Dialog.js +1 -1
  280. package/dist/shell/Drawer.js +1 -1
  281. package/dist/shell/EditableGrid.js +1 -1
  282. package/dist/shell/EmptyState.js +1 -1
  283. package/dist/shell/GlobalSearch.js +1 -1
  284. package/dist/shell/HelpCenter.js +1 -1
  285. package/dist/shell/IconRail.js +1 -1
  286. package/dist/shell/ImageLightbox.js +1 -1
  287. package/dist/shell/ItemCount.js +1 -1
  288. package/dist/shell/LanguageSelect.js +1 -1
  289. package/dist/shell/Markdown.d.ts +1 -1
  290. package/dist/shell/Markdown.js +1 -1
  291. package/dist/shell/MetricBar.js +1 -1
  292. package/dist/shell/MetricBarLegend.js +1 -1
  293. package/dist/shell/MilestoneTimeline.js +1 -1
  294. package/dist/shell/PageHeader.js +1 -1
  295. package/dist/shell/ProductionTimeline.js +1 -1
  296. package/dist/shell/ResizeHandle.js +1 -1
  297. package/dist/shell/Result.js +1 -1
  298. package/dist/shell/SearchableSelect.js +1 -1
  299. package/dist/shell/SettingReset.js +1 -1
  300. package/dist/shell/SettingRow.js +1 -1
  301. package/dist/shell/SidebarLayout.js +1 -1
  302. package/dist/shell/SidebarNav.js +1 -1
  303. package/dist/shell/SortableList.js +1 -1
  304. package/dist/shell/Statistic.js +1 -1
  305. package/dist/shell/TimeAgo.js +1 -1
  306. package/dist/shell/TimelineTrack.js +1 -1
  307. package/dist/shell/TransferProgress.js +1 -1
  308. package/dist/shell/Tree.js +1 -1
  309. package/dist/shell/discardGuard.js +1 -1
  310. package/dist/shell/globalSearchModel.js +1 -1
  311. package/dist/shell/language.js +1 -1
  312. package/dist/shell/strings.d.ts +2 -0
  313. package/dist/shell/strings.js +1 -1
  314. package/dist/shell/toast.js +1 -1
  315. package/dist/telemetry/index.js +1 -1
  316. package/dist/templates/AuthScreen.js +1 -1
  317. package/dist/templates/ChatTemplate.js +1 -1
  318. package/dist/templates/CheckoutTemplate.js +1 -1
  319. package/dist/templates/DashboardTemplate.js +1 -1
  320. package/dist/templates/DataTablePage.js +1 -1
  321. package/dist/templates/EmailTemplate.js +1 -1
  322. package/dist/templates/ErrorBoundary.js +1 -1
  323. package/dist/templates/ErrorPage.js +1 -1
  324. package/dist/templates/FormLayoutPage.js +1 -1
  325. package/dist/templates/GalleryTemplate.js +1 -1
  326. package/dist/ui/index.d.ts +1 -1
  327. package/dist/ui/index.js +1 -1
  328. package/dist/version.js +1 -1
  329. package/package.json +1 -1
  330. package/dist/PdfViewer-BFP2WCMQ.js +0 -1
  331. package/dist/PomodoroTimer-ME3BMHKR.js +0 -91
  332. package/dist/Sidebar-FU7TD5FQ.js +0 -44
  333. package/dist/chunk-3C5NKOVF.js +0 -1
  334. package/dist/chunk-3MMMN3U4.js +0 -3
  335. package/dist/chunk-4CKPY72R.js +0 -2
  336. package/dist/chunk-5UZYIM2W.js +0 -2
  337. package/dist/chunk-675RYIWR.js +0 -7
  338. package/dist/chunk-6VB4TBU6.js +0 -9
  339. package/dist/chunk-73XILSFF.js +0 -4
  340. package/dist/chunk-7ADTFFEM.js +0 -5
  341. package/dist/chunk-B6RQI2PT.js +0 -2
  342. package/dist/chunk-BUZ5AJLR.js +0 -12
  343. package/dist/chunk-C5SK5OYU.js +0 -4
  344. package/dist/chunk-CA3OC4YY.js +0 -9
  345. package/dist/chunk-EAIHBASJ.js +0 -28
  346. package/dist/chunk-FQHY6DTF.js +0 -4
  347. package/dist/chunk-HL3V67JZ.js +0 -2
  348. package/dist/chunk-HULQSIX5.js +0 -8
  349. package/dist/chunk-ISZOD5S6.js +0 -2
  350. package/dist/chunk-J7CHHY7O.js +0 -6
  351. package/dist/chunk-KFS7WSCC.js +0 -15
  352. package/dist/chunk-KOPTKTHN.js +0 -7
  353. package/dist/chunk-LO6TYB5E.js +0 -3
  354. package/dist/chunk-MTP3MBZA.js +0 -22
  355. package/dist/chunk-MXITMJCT.js +0 -27
  356. package/dist/chunk-QV4M7EOV.js +0 -1
  357. package/dist/chunk-RQ4KY6UZ.js +0 -2
  358. package/dist/chunk-T23TIJ4P.js +0 -1
  359. package/dist/chunk-TJSJVC6P.js +0 -1
  360. package/dist/chunk-WGRS6QBT.js +0 -1
  361. package/dist/chunk-YMD2F3NL.js +0 -1
  362. package/dist/chunk-YRG6XJ6M.js +0 -8
  363. package/dist/names-bEzx4RQ8.d.ts +0 -23
  364. /package/dist/{chunk-BDUWYLPI.js → chunk-NQJXHV4K.js} +0 -0
@@ -1,31 +1,31 @@
1
- import{useCopyText as e,CopyGlyph as n}from"./chunk-NGQZI7HP.js";import{ItemCount as t}from"./chunk-KWTK6TGH.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-ZICGXJUB.js";import{Icon as o}from"./chunk-JOAKKXTL.js";import{useShellStrings as a}from"./chunk-TJSJVC6P.js";import{useState as s,useMemo as d,useEffect as c,useRef as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as g}from"react/jsx-runtime";function h(e){const n=[];let t=0;for(;t<e.length;){const r=e[t].group;let i=t;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;n.push(i>t?{group:r,start:t,end:i}:{start:t,end:t}),t=i+1}return n}function k(e,n){return e.find(e=>n>=e.start&&n<=e.end)}function b(e,n,t,r){const i=e.findIndex(e=>e.key===n.key);let l=e.findIndex(e=>e.key===t);if(i<0||l<0)return null;const o=h(e),a=k(o,i),s="group"===n.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[n.key];if(s.includes(t))return null;const d=k(o,l);if("tab"===n.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,n,t,r){const i=b(e,n,t,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((n,t)=>n===e[t].key)?null:a}var v="flex-[0_100_15rem] [contain-intrinsic-inline-size:15rem]",N=v,w="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500",C="pointer-events-none absolute bottom-0 size-2 [background:inherit]";function $(){/* @__PURE__ */
1
+ import{useCopyText as e,CopyGlyph as n}from"./chunk-WLUJQLXG.js";import{ItemCount as t}from"./chunk-MWTCGJAI.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-ZICGXJUB.js";import{Icon as o}from"./chunk-JOAKKXTL.js";import{useShellStrings as a}from"./chunk-JSHMIMAJ.js";import{useState as s,useMemo as d,useEffect as c,useRef as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as g}from"react/jsx-runtime";function h(e){const n=[];let t=0;for(;t<e.length;){const r=e[t].group;let i=t;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;n.push(i>t?{group:r,start:t,end:i}:{start:t,end:t}),t=i+1}return n}function k(e,n){return e.find(e=>n>=e.start&&n<=e.end)}function b(e,n,t,r){const i=e.findIndex(e=>e.key===n.key);let l=e.findIndex(e=>e.key===t);if(i<0||l<0)return null;const o=h(e),a=k(o,i),s="group"===n.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[n.key];if(s.includes(t))return null;const d=k(o,l);if("tab"===n.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,n,t,r){const i=b(e,n,t,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((n,t)=>n===e[t].key)?null:a}var v="flex-[0_100_15rem] [contain-intrinsic-inline-size:15rem]",N=v,w="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500",C="pointer-events-none absolute bottom-0 size-2 [background:inherit]";function $(){/* @__PURE__ */
2
2
  return p(g,{children:[
3
3
  /* @__PURE__ */y("span",{"aria-hidden":"true",className:`${C} -left-2 [mask-image:radial-gradient(circle_at_0_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`}),
4
4
  /* @__PURE__ */y("span",{"aria-hidden":"true",className:`${C} -right-2 [mask-image:radial-gradient(circle_at_100%_0,transparent_0.5rem,#000_calc(0.5rem+0.5px))]`})]})}function I(){/* @__PURE__ */
5
5
  return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function z({text:t,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(t);/* @__PURE__ */
6
- return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(n,{copied:l,className:"size-3.5"})})}function _({node:e}){const n=u(null);return f(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function j({tabs:e,activeKey:n,idFor:f,panelMounted:k,onActivate:C,onClose:j,onCloseMany:D,label:T,className:A,activeClassName:K,end:M,afterPinned:B,onIconMenu:E,menuItems:G,sizing:O="even",tall:R=!1,onReorder:L,groupInfo:J}){const S=a().pageTabs,X=a().count,[H,P]=s(null),W=R?"h-[34px]":"h-8",F=d(()=>e.map(e=>({key:e.key,group:J?e.group:void 0})),[e,J]),V=d(()=>h(F),[F]),Z=d(()=>{const t=e.findIndex(e=>e.key===n);return V.find(e=>void 0!==e.group&&t>=e.start&&t<=e.end)?.group},[V,e,n]),[Q,U]=s(()=>Z??null),Y=t=>{const r=V.find(e=>e.group===t);if(!r)return;const i=e.findIndex(e=>e.key===n),l=i>=r.start&&i<=r.end;if(Q!==t)l||C(e[r.start].key),U(t);else{if(l){const n=e[r.end+1]??e[r.start-1];n&&C(n.key)}U(null)}};c(()=>{void 0!==Z&&U(Z)},[n]);const q=d(()=>{const n=[];for(const t of V)for(let r=t.start;r<=t.end;r++)void 0!==t.group&&t.group!==Q||n.push(e[r]);return n},[V,Q,e]),ee=u(null),[ne,te]=s(null),re=(n,t)=>L?{draggable:!0,onDragStart:t=>{ee.current=n,t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.find(e=>e.key===n.key)?.title??"")},onDragOver:e=>{const r=ee.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=t!==n.key||"tab"===n.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(F,r,t,l)?b(F,r,t,l):null;if(!o)return void(ne&&te(null));e.preventDefault(),e.dataTransfer.dropEffect="move";const a=e=>F.find(n=>n.key===e)?.group,s="tab"===r.kind&&void 0!==a(r.key)&&a(r.key)===a(o.key);ne?.key===o.key&&ne.side===o.side&&ne.inGroup===s||te({key:o.key,side:o.side,inGroup:s})},onDrop:e=>{const n=ee.current;if(!n||!ne)return;e.preventDefault();const t=x(F,n,ne.key,ne.side);ee.current=null,te(null),t&&L(t)},onDragEnd:()=>{ee.current=null,te(null)}}:{},ie=d(()=>new Set(V.filter(e=>void 0!==e.group&&J).map(n=>e[n.start].key)),[V,e,J]),le=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),oe=e=>ne?.key===e&&!("before"===ne.side&&ie.has(e)&&!ne.inGroup)&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le(ne.side)}),ae=e.length;c(()=>{if(!n)return;const e=document.getElementById(f(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,n,ae]);const se=B?q.findIndex(e=>!e.pinned):-1,de=q.some(e=>e.key===n)?n:q[0]?.key,ce=e=>{const n=q[(e+q.length)%q.length];n&&document.getElementById(f(n.key,"tab"))?.focus()},ue=(e,n)=>{const t=q[e+n];if(!L||!t)return;const r=x(F,{kind:"tab",key:q[e].key},t.key,n<0?"before":"after");r&&(L(r),setTimeout(()=>document.getElementById(f(q[e].key,"tab"))?.focus(),0))},me=H?e.find(e=>e.key===H.key):void 0,fe=me&&G?G(me.key):[],pe=me?e.indexOf(me):-1,ye=e=>e.some(e=>!e.pinned),ge=e=>()=>{P(null),e()},he=(e,t)=>!!t&&e.key!==n&&t.key!==n,ke=(e,t)=>{const r=e.key===n,i=e.pinned?"auto":r?"active-full"===O?"15rem":e.copy||E&&e.icon?"minmax(4.25rem,20rem)":"minmax(4.25rem,15rem)":"minmax(4rem,15rem)";return he(e,t)?["auto",i]:[i]},be=(e,t)=>{const r=e.key===n,i=!!e.dirty,l=e.icon,a=r?K??"z-[1] border-transparent bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=he(e,t),d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":k?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===de?0:-1,title:e.title,onClick:()=>C(e.key)},c={onContextMenu:n=>((e,n)=>{e.preventDefault(),P({x:e.clientX,y:e.clientY,key:n.key})})(n,e),onAuxClick:n=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),j(n.key))})(n,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
6
+ return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(n,{copied:l,className:"size-3.5"})})}function _({node:e}){const n=u(null);return f(()=>{const t=n.current;if(t)return t.appendChild(e),()=>{e.parentNode===t&&t.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:n,className:"ml-1 flex shrink-0 items-center"})}function j({tabs:e,activeKey:n,idFor:f,panelMounted:k,onActivate:C,onClose:j,onCloseMany:D,label:T,className:A,activeClassName:M,end:B,afterPinned:E,onIconMenu:G,menuItems:K,sizing:L="even",tall:J=!1,onReorder:O,groupInfo:R}){const X=a().pageTabs,S=a().count,[W,F]=s(null),H=J?"h-[34px]":"h-8",U=d(()=>e.map(e=>({key:e.key,group:R?e.group:void 0})),[e,R]),P=d(()=>h(U),[U]),Q=d(()=>{const t=e.findIndex(e=>e.key===n);return P.find(e=>void 0!==e.group&&t>=e.start&&t<=e.end)?.group},[P,e,n]),[V,Y]=s(()=>Q??null),Z=t=>{const r=P.find(e=>e.group===t);if(!r)return;const i=e.findIndex(e=>e.key===n),l=i>=r.start&&i<=r.end;if(V!==t)l||C(e[r.start].key),Y(t);else{if(l){const n=e[r.end+1]??e[r.start-1];n&&C(n.key)}Y(null)}};c(()=>{void 0!==Q&&Y(Q)},[n]);const q=d(()=>{const n=[];for(const t of P)for(let r=t.start;r<=t.end;r++)void 0!==t.group&&t.group!==V||n.push(e[r]);return n},[P,V,e]),ee=u(null),[ne,te]=s(null),re=(n,t)=>O?{draggable:!0,onDragStart:t=>{ee.current=n,t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.find(e=>e.key===n.key)?.title??"")},onDragOver:e=>{const r=ee.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=t!==n.key||"tab"===n.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(U,r,t,l)?b(U,r,t,l):null;if(!o)return void(ne&&te(null));e.preventDefault(),e.dataTransfer.dropEffect="move";const a=e=>U.find(n=>n.key===e)?.group,s="tab"===r.kind&&void 0!==a(r.key)&&a(r.key)===a(o.key);ne?.key===o.key&&ne.side===o.side&&ne.inGroup===s||te({key:o.key,side:o.side,inGroup:s})},onDrop:e=>{const n=ee.current;if(!n||!ne)return;e.preventDefault();const t=x(U,n,ne.key,ne.side);ee.current=null,te(null),t&&O(t)},onDragEnd:()=>{ee.current=null,te(null)}}:{},ie=d(()=>new Set(P.filter(e=>void 0!==e.group&&R).map(n=>e[n.start].key)),[P,e,R]),le=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),oe=e=>ne?.key===e&&!("before"===ne.side&&ie.has(e)&&!ne.inGroup)&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le(ne.side)}),ae=e.length;c(()=>{if(!n)return;const e=document.getElementById(f(n,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,n,ae]);const se=E?q.findIndex(e=>!e.pinned):-1,de=q.some(e=>e.key===n)?n:q[0]?.key,ce=e=>{const n=q[(e+q.length)%q.length];n&&document.getElementById(f(n.key,"tab"))?.focus()},ue=(e,n)=>{const t=q[e+n];if(!O||!t)return;const r=x(U,{kind:"tab",key:q[e].key},t.key,n<0?"before":"after");r&&(O(r),setTimeout(()=>document.getElementById(f(q[e].key,"tab"))?.focus(),0))},me=W?e.find(e=>e.key===W.key):void 0,fe=me&&K?K(me.key):[],pe=me?e.indexOf(me):-1,ye=e=>e.some(e=>!e.pinned),ge=e=>()=>{F(null),e()},he=(e,t)=>!!t&&e.key!==n&&t.key!==n,ke=(e,t)=>{const r=e.key===n,i=e.pinned?"auto":r?"active-full"===L?"15rem":e.copy||G&&e.icon?"minmax(4.25rem,20rem)":"minmax(4.25rem,15rem)":"minmax(4rem,15rem)";return he(e,t)?["auto",i]:[i]},be=(e,t)=>{const r=e.key===n,i=!!e.dirty,l=e.icon,a=r?M??"z-[1] border-transparent bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=he(e,t),d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":k?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===de?0:-1,title:e.title,onClick:()=>C(e.key)},c={onContextMenu:n=>((e,n)=>{e.preventDefault(),F({x:e.clientX,y:e.clientY,key:n.key})})(n,e),onAuxClick:n=>((e,n)=>{1!==e.button||n.pinned||(e.preventDefault(),j(n.key))})(n,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
7
7
  /* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
8
- /* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),g=r&&!!E&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-lg border border-b-0 transition-colors ${W} ${l?"w-10":""} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y($,{}),
8
+ /* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),g=r&&!!G&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-lg border border-b-0 transition-colors ${H} ${l?"w-10":""} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y($,{}),
9
9
  /* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-lg ${l?"w-full":"px-3"} ${w}`,children:[u,
10
10
  /* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
11
- /* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-lg border border-b-0 text-sm transition-colors ${W} ${"active-full"===O&&r?"":"@container"} ${"active-full"===O?r?"flex-[0_0_15rem] min-w-0":N:r&&(e.copy||g)?"flex-[0_100_20rem]":v} ${r?"active-full"===O?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y($,{}),g&&
12
- /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":S.tabMenu,title:S.tabMenu,onClick:n=>{const t=n.currentTarget.getBoundingClientRect();E?.(e.key,t.left,t.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${w}`,children:u}),
11
+ /* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-lg border border-b-0 text-sm transition-colors ${H} ${"active-full"===L&&r?"":"@container"} ${"active-full"===L?r?"flex-[0_0_15rem] min-w-0":N:r&&(e.copy||g)?"flex-[0_100_20rem]":v} ${r?"active-full"===L?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...re({kind:"tab",key:e.key},e.key),children:[oe(e.key),r&&/* @__PURE__ */y($,{}),g&&
12
+ /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":X.tabMenu,title:X.tabMenu,onClick:n=>{const t=n.currentTarget.getBoundingClientRect();G?.(e.key,t.left,t.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${w}`,children:u}),
13
13
  /* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-lg pr-1 text-left ${g?"pl-2":"pl-3"} ${w} ${r?g?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!g&&u,
14
- /* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===O&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
15
- /* @__PURE__ */y("span",{role:"img","aria-label":S.favorite,title:S.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(_,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y(z,{text:e.copy,label:S.copy(e.copy),copiedLabel:S.copied}),
16
- /* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":S.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
17
- /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":S.closeTab?.(e.title)??`${S.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(I,{})})]})]})]},e.key)},xe=[];let ve,Ne=0,we=!B;for(const r of V){const i=q.filter(n=>{const t=e.indexOf(n);return t>=r.start&&t<=r.end});if(we||Ne!==se||(we=!0,xe.push(/* @__PURE__ */y(m,{children:B},"rosh-after-pinned")),ve=void 0),Ne+=i.length,void 0===r.group||!J){for(const e of i)xe.push(be(e,ve)),ve=e;continue}ve=void 0;const l=r.group,a=J(l),s=r.end-r.start+1,d=Q===l,c=e[r.start].key,u=i.some(e=>e.key===n)?"shrink":"shrink-[100]",f=["auto",...i.flatMap((e,n)=>ke(e,n>0?i[n-1]:void 0))];xe.push(
14
+ /* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===L&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
15
+ /* @__PURE__ */y("span",{role:"img","aria-label":X.favorite,title:X.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(_,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y(z,{text:e.copy,label:X.copy(e.copy),copiedLabel:X.copied}),
16
+ /* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":X.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
17
+ /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":X.closeTab?.(e.title)??`${X.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(I,{})})]})]})]},e.key)},xe=[];let ve,Ne=0,we=!E;for(const r of P){const i=q.filter(n=>{const t=e.indexOf(n);return t>=r.start&&t<=r.end});if(we||Ne!==se||(we=!0,xe.push(/* @__PURE__ */y(m,{children:E},"rosh-after-pinned")),ve=void 0),Ne+=i.length,void 0===r.group||!R){for(const e of i)xe.push(be(e,ve)),ve=e;continue}ve=void 0;const l=r.group,a=R(l),s=r.end-r.start+1,d=V===l,c=e[r.start].key,u=i.some(e=>e.key===n)?"shrink":"shrink-[100]",f=["auto",...i.flatMap((e,n)=>ke(e,n>0?i[n-1]:void 0))];xe.push(
18
18
  /* @__PURE__ */p("div",{role:"group","aria-label":a.label,"data-tab-group":l,className:`relative mx-1 grid grid-flow-col items-end first:ml-0 ${u}`,style:{gridTemplateColumns:f.join(" ")},children:[
19
- /* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":d,title:S.groupToggle(a.label,s),onClick:()=>Y(l),...re({kind:"group",key:c},c),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${w}`,children:[
19
+ /* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":d,title:X.groupToggle(a.label,s),onClick:()=>Z(l),...re({kind:"group",key:c},c),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${w}`,children:[
20
20
  /* @__PURE__ */y(o,{name:d?"chevron-right":"chevron-down","aria-hidden":"true",className:"size-3",strokeWidth:2}),a.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:a.icon}),
21
21
  /* @__PURE__ */y("span",{className:d?"sr-only":"max-w-[12rem] truncate",children:a.label}),
22
- /* @__PURE__ */y(t,{count:s,label:X.tabs(s),active:!0})]}),ne?.key===c&&"before"===ne.side&&!ne.inGroup&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le("before")}),i.map((e,n)=>be(e,n>0?i[n-1]:void 0)),
23
- /* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-0 h-0.5 bg-blue-500"})]},`rosh-group-${c}`))}return we||xe.push(/* @__PURE__ */y(m,{children:B},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:A??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
22
+ /* @__PURE__ */y(t,{count:s,label:S.tabs(s),active:!0})]}),ne?.key===c&&"before"===ne.side&&!ne.inGroup&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:le("before")}),i.map((e,n)=>be(e,n>0?i[n-1]:void 0)),
23
+ /* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-0 h-0.5 bg-blue-500"})]},`rosh-group-${c}`))}return we||xe.push(/* @__PURE__ */y(m,{children:E},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:A??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
24
24
  /* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
25
- /* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const n=q.findIndex(n=>document.getElementById(f(n.key,"tab"))===e.target);if(n<0)return;const t=e.shiftKey&&(e.ctrlKey||e.metaKey);if(t&&"ArrowRight"===e.key)ue(n,1);else if(t&&"ArrowLeft"===e.key)ue(n,-1);else if("ArrowRight"===e.key)ce(n+1);else if("ArrowLeft"===e.key)ce(n-1);else if("Home"===e.key)ce(0);else if("End"===e.key)ce(q.length-1);else{if("Delete"!==e.key||q[n].pinned)return;j(q[n].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end -mx-2 px-2 scroll-px-2 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:xe}),M&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:M}),H&&me&&/* @__PURE__ */p(r,{portal:!0,style:{left:H.x,top:H.y},onClose:()=>P(null),children:[fe.length>0&&/* @__PURE__ */p(g,{children:[fe.map((e,n)=>/* @__PURE__ */p(i,{onClick:ge(e.onSelect),children:[e.icon,e.label]},n)),
25
+ /* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const n=q.findIndex(n=>document.getElementById(f(n.key,"tab"))===e.target);if(n<0)return;const t=e.shiftKey&&(e.ctrlKey||e.metaKey);if(t&&"ArrowRight"===e.key)ue(n,1);else if(t&&"ArrowLeft"===e.key)ue(n,-1);else if("ArrowRight"===e.key)ce(n+1);else if("ArrowLeft"===e.key)ce(n-1);else if("Home"===e.key)ce(0);else if("End"===e.key)ce(q.length-1);else{if("Delete"!==e.key||q[n].pinned)return;j(q[n].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end -mx-2 px-2 scroll-px-2 overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:xe}),B&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:B}),W&&me&&/* @__PURE__ */p(r,{portal:!0,style:{left:W.x,top:W.y},onClose:()=>F(null),children:[fe.length>0&&/* @__PURE__ */p(g,{children:[fe.map((e,n)=>/* @__PURE__ */p(i,{onClick:ge(e.onSelect),children:[e.icon,e.label]},n)),
26
26
  /* @__PURE__ */y(l,{})]}),
27
- /* @__PURE__ */y(i,{disabled:me.pinned,onClick:ge(()=>j(me.key)),children:S.close}),
27
+ /* @__PURE__ */y(i,{disabled:me.pinned,onClick:ge(()=>j(me.key)),children:X.close}),
28
28
  /* @__PURE__ */y(l,{}),
29
- /* @__PURE__ */y(i,{disabled:!ye(e.filter(e=>e.key!==me.key)),onClick:ge(()=>D("others",me.key)),children:S.closeOthers}),
30
- /* @__PURE__ */y(i,{disabled:!ye(e.slice(pe+1)),onClick:ge(()=>D("right",me.key)),children:S.closeRight}),
31
- /* @__PURE__ */y(i,{disabled:!ye(e),onClick:ge(()=>D("all",null)),children:S.closeAll})]})]})}export{j as TabStrip};
29
+ /* @__PURE__ */y(i,{disabled:!ye(e.filter(e=>e.key!==me.key)),onClick:ge(()=>D("others",me.key)),children:X.closeOthers}),
30
+ /* @__PURE__ */y(i,{disabled:!ye(e.slice(pe+1)),onClick:ge(()=>D("right",me.key)),children:X.closeRight}),
31
+ /* @__PURE__ */y(i,{disabled:!ye(e),onClick:ge(()=>D("all",null)),children:X.closeAll})]})]})}export{j as TabStrip};
@@ -1,4 +1,4 @@
1
- import{formatMoney as e}from"./chunk-GEYM4WN3.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-MTP3MBZA.js";import{ChartFrame as a}from"./chunk-ZR2UWJIR.js";import{ColumnChart as l}from"./chunk-SFFELHLP.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-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:[
2
2
  /* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
3
3
  /* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
4
4
  /* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-GOKJZKLV.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-JOAKKXTL.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),L=v.trim().toLowerCase(),K=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),M=e=>!L||e.title.toLowerCase().includes(L)||e.body.toLowerCase().includes(L)||e.category_label.toLowerCase().includes(L),_=n(()=>K.map(e=>({...e,docs:e.docs.filter(M)})).filter(e=>e.docs.length>0),[K,L]),A=n(()=>_.flatMap(e=>e.docs),[_]),J=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,E=e=>!!L||(C[e]??e===J?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-XU3YOWEG.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-JOAKKXTL.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-JSHMIMAJ.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),A=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),L=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),_=n(()=>A.map(e=>({...e,docs:e.docs.filter(L)})).filter(e=>e.docs.length>0),[A,M]),E=n(()=>_.flatMap(e=>e.docs),[_]),Y=(w?E.find(e=>e.slug===w):void 0)??E[0]??null,J=e=>!!M||(C[e]??e===Y?.category);/* @__PURE__ */
2
2
  return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
7
7
  /* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:L?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=E(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=J(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!E(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
11
+ /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!J(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
12
12
  /* @__PURE__ */o(d,{open:t}),
13
- /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=J?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=Y?.slug===e.slug;/* @__PURE__ */
14
14
  return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:J?/* @__PURE__ */i(c,{children:[
16
+ /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:Y?/* @__PURE__ */i(c,{children:[
17
17
  /* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */i("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:J.title}),
20
- /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[J.category_label,!1===J.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(J),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
- /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(J):J.body?/* @__PURE__ */o(e,{children:J.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:Y.title}),
20
+ /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[Y.category_label,!1===Y.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(Y),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(Y):Y.body?/* @__PURE__ */o(e,{children:Y.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -0,0 +1,8 @@
1
+ import{DragBand as e,tooltipBesideBand as t}from"./chunk-2DYVVHZA.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{niceAxis as i,niceMax as n,linearScale as o,axisGutter as l,bandScale as a}from"./chunk-2JWPNR2U.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-JSHMIMAJ.js";import{formatPlain as d}from"./chunk-C3QOHMR6.js";import{useRef as u,useState as f,useId as g,useEffect as p}from"react";import{jsx as x,jsxs as y}from"react/jsx-runtime";function v({labels:v,values:b,height:M=220,width:k,bandPadding:w=.24,min:A,max:N,yTickCount:$=4,formatValue:j,yAxisLabel:P,xTickAnchor:D="center",children:E,overlay:R,tooltip:U,onSelect:z,zoom:S,ariaLabel:V,className:C,emptyLabel:I}){const L=c().charts,F=m(),T=j??(e=>d(e,F)),W=I??L.noData,H=u(null),J=r(H),Z=k??J,[B,Q]=f(null),K=g();if(p(()=>{if(null!==B)return s(e=>"Escape"===e.key&&(Q(null),!0))},[B]),0===v.length||!b.some(Number.isFinite))/* @__PURE__ */
2
+ return x("div",{className:C,ref:H,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:M},children:W})});const O=b.filter(Number.isFinite),X=O.every(Number.isInteger),Y=void 0===A&&void 0===N?i(Math.min(0,...O),Math.max(0,...O),{intervals:$+1,integer:X}):null,q=void 0!==A&&void 0===N?i(A,Math.max(A,...O),{intervals:$+1,integer:X,zero:!1}):null,G=Y?Y.lo:A??Math.min(0,...O),_=Y?Y.hi:q?q.hi:N??n(Math.max(...O,0)),ee=Y?Y.ticks:q?[G,...q.ticks.filter(e=>e>G)]:o([G,_],{from:0,to:1}).ticks($+1),te={top:12,right:16,bottom:26,left:l(ee.map(T),48)+(P?10:0)},re=te.left,ie=Math.max(re+1,Z-te.right),ne=te.top,oe=M-te.bottom,le=o([G,_],{from:oe,to:ne}),ae=a(v.length,{from:re,to:ie},w),he=(ie-re)/Math.max(1,v.length),se=he>=48,ce=se?1:Math.max(1,Math.ceil(v.length/Math.max(1,Math.floor(Z/84)))),me=Math.max(2,Math.floor((he-6)/6.6)),de=e=>se&&e.length>me?`${e.slice(0,me-1).trimEnd()}…`:e;/* @__PURE__ */
3
+ return y("div",{className:`relative ${C??""}`,ref:H,children:[
4
+ /* @__PURE__ */y("svg",{width:"100%",height:M,viewBox:`0 0 ${Z} ${M}`,role:"img","aria-label":V,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Q(null),onBlur:()=>Q(null),onKeyDown:e=>{if(z&&null!==B&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void z(B);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;Q(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:S?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
5
+ /* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:K,children:/* @__PURE__ */x("rect",{x:re,y:ne,width:ie-re,height:oe-ne})})}),ee.map(e=>/* @__PURE__ */x("line",{x1:re,y1:le(e),x2:ie,y2:le(e),stroke:h.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
6
+ /* @__PURE__ */x("line",{x1:re,y1:le(Math.max(G,0)),x2:ie,y2:le(Math.max(G,0)),stroke:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:T(e)},`t${e}`)),P&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:P}),
7
+ /* @__PURE__ */x("g",{clipPath:`url(#${K})`,children:E({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:Z,height:M,clipId:K,active:B})}),R?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:Z,height:M,clipId:K,active:B}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===D?ae(t):ae.center(t),y:M-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),S?.drag&&/* @__PURE__ */x(e,{x0:ae.center(S.drag[0])-(ie-re)/v.length/2,x1:ae.center(S.drag[1])+(ie-re)/v.length/2,top:ne,bottom:oe}),v.map((e,t)=>/* @__PURE__ */x("rect",{x:ae.center(t)-(ie-re)/v.length/2,y:ne,width:(ie-re)/v.length,height:oe-ne,fill:"transparent",onMouseEnter:()=>Q(t),onPointerDown:S?()=>S.press(t):void 0,onPointerEnter:S?()=>S.over(t):void 0,onPointerUp:S?.release,onClick:z?()=>z(t):void 0,style:z?{cursor:"pointer"}:void 0},`h${t}`))]}),U&&null!==B&&
8
+ /* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(B),ae.bandwidth,Z),children:U(B)})]})}export{v as CartesianPlot};
@@ -1,23 +1,23 @@
1
- import{Calendar as e}from"./chunk-BET6KEY2.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as o,InputEndActionButton as l}from"./chunk-CU3ZE25J.js";import{FILTER_ON as i,FILTER_ON_INK as s,FILTER_OFF as c}from"./chunk-AYZY3YNC.js";import{calendarNames as d}from"./chunk-Y3JW2GW5.js";import{pad2 as m}from"./chunk-LF27WIN2.js";import{Icon as u}from"./chunk-JOAKKXTL.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{buttonClasses as b}from"./chunk-UQYNPYF4.js";import{glassStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as v,useShellLocale as y}from"./chunk-TJSJVC6P.js";import{useState as w,useRef as k,useId as N,useEffect as C}from"react";import{createPortal as M}from"react-dom";import{jsxs as j,Fragment as W,jsx as D}from"react/jsx-runtime";var $=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],Y=t;function F(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),l=new Date(n,a,0),i=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(i(1)),to:t(l)};case"last3Months":return{from:t(i(3)),to:t(l)};case"last6Months":return{from:t(i(6)),to:t(l)};case"last12Months":return{from:t(i(12)),to:t(l)}}}function S(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function O(e){const t=r(e);return t?`${m(t.getDate())}/${m(t.getMonth()+1)}/${t.getFullYear()}`:e}var J=/* @__PURE__ */new Map;function L({from:t,to:n,onChange:m,formatDisplay:Y,clearable:L,required:T=!1,name:E,id:H,"aria-labelledby":B,"aria-label":U,weekStartsOn:A,placeholder:G,fullWidth:K=!1,min:R,max:q,disabled:I=!1,allowOpenEnd:P=!1}){const Z=v().dateRange,V=y(),X=Y??(V?function(e){let t=J.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),J.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(V):O),z=G??Z.placeholder,Q=L??!T,[_,ee]=w(!1),[te,re]=w(t),[ne,ae]=w(n),[oe,le]=w(null),[ie,se]=w("from"),ce=k(null),de=k(null),me=k(null),ue=N(),he=N(),pe=N(),[fe,ge]=w(!1),be=f(ce,_,{preferredMaxWidth:520,preferredMaxHeight:fe?720:560,popupRef:me}),xe=k(null),ve=k(null),[ye,we]=w(!0);g(()=>{const e=ve.current;if(!_||!fe||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&we(a)});const ke=k(null);g(()=>{const e=me.current;if(!_||!be||!e)return;const t=getComputedStyle(e),r=be.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(fe)null!==ke.current&&ke.current<=r&&ge(!1);else{const e=xe.current?.offsetWidth??0;if(0===e)return;ke.current=e,e>r+.5&&ge(!0)}});const[Ne,Ce]=w(!1);g(()=>{const e=!!H&&(de.current?.labels?.length??0)>0;e!==Ne&&Ce(e)});const Me=!!U||!!B||Ne,je=/* @__PURE__ */new Date,[We,De]=w(()=>t?t.slice(0,7):S(je,R,q)),$e=$.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(F(e,je),R,q)),Ye=e=>e?X(e):"";C(()=>{if(!_)return;const e=e=>{const t=e.target;ce.current?.contains(t)||me.current?.contains(t)||ee(!1)};document.addEventListener("mousedown",e);const t=h(()=>ee(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[_]),C(()=>{I&&ee(!1)},[I]);const Fe=()=>{m("",""),ee(!1)},Se=Q&&!I&&Boolean(t||n),Oe=t&&n?`${Ye(t)} — ${Ye(n)}`:t?Z.fromOnly(Ye(t)):n?Z.toOnly(Ye(n)):"",Je=d(V),Le=e=>{const t=r(e);return t?Je.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Te=t&&n?Z.range(Le(t),Le(n)):t?Z.fromOnly(Le(t)):n?Z.toOnly(Le(n)):z,Ee=e=>fe?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(oe===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(oe===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),He=/* @__PURE__ */j(W,{children:[$e.map(e=>/* @__PURE__ */D("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=F(e,je);re(t.from),ae(t.to),le(e),De(t.from.slice(0,7))})(e),className:Ee(e),"aria-label":fe?Z[e]:void 0,children:fe?ye?Z[e]:Z[`${e}Short`]:Z[e]},e)),
2
- /* @__PURE__ */D("button",{type:"button",onClick:()=>le("Custom"),className:Ee("Custom"),children:Z.custom})]}),Be=(e,t)=>P?/* @__PURE__ */D("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>se(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */D("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Ue=e=>P&&ie===e?" ring-1 ring-blue-400":"",Ae=
3
- /* @__PURE__ */D(e,{mode:"range",min:R,max:q,value:te||null,endValue:ne||null,month:We,onMonthChange:De,onSelect:e=>{le("Custom"),P?"from"===ie?(ne&&e>ne?(re(ne),ae(e)):re(e),se("to")):te&&e<te?(ae(te),re(e)):ae(e):!te||te&&ne?(re(e),ae("")):e<te?(ae(te),re(e)):ae(e)},weekStartsOn:A,"aria-label":Z.dialog});/* @__PURE__ */
4
- return j("div",{className:"relative"+(K?" w-full":""),ref:ce,children:[
5
- /* @__PURE__ */j("div",{className:`relative ${K?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 ${Se?a[1]:""} text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${i} ${s}`:c}${I?" cursor-not-allowed opacity-60":""}`,children:[
6
- /* @__PURE__ */j("button",{ref:de,type:"button",onClick:()=>{I||(re(t),ae(n),le(null),se(t&&!n?"to":"from"),De(t?t.slice(0,7):S(je,R,q)),ee(!0))},"aria-haspopup":"dialog","aria-expanded":_,id:H,disabled:I||void 0,"aria-label":U,"aria-labelledby":B,"aria-describedby":[Me?he:void 0,T?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":_?ue:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(K?" min-w-0 flex-1 justify-start":""),children:[
1
+ import{Calendar as e}from"./chunk-QPYVCG74.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as o,InputEndActionButton as l}from"./chunk-CU3ZE25J.js";import{FILTER_ON as i,FILTER_ON_INK as s,FILTER_OFF as c}from"./chunk-AYZY3YNC.js";import{calendarNames as d}from"./chunk-Y3JW2GW5.js";import{pad2 as m}from"./chunk-LF27WIN2.js";import{Icon as u}from"./chunk-JOAKKXTL.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as g}from"./chunk-D65T4H6J.js";import{buttonClasses as b}from"./chunk-UQYNPYF4.js";import{glassStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as v,useShellLocale as y}from"./chunk-JSHMIMAJ.js";import{useState as w,useRef as k,useId as N,useEffect as C}from"react";import{createPortal as M}from"react-dom";import{jsxs as j,Fragment as W,jsx as D}from"react/jsx-runtime";var $=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],Y=t;function F(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),l=new Date(n,a,0),i=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(i(1)),to:t(l)};case"last3Months":return{from:t(i(3)),to:t(l)};case"last6Months":return{from:t(i(6)),to:t(l)};case"last12Months":return{from:t(i(12)),to:t(l)}}}function S(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function O(e){const t=r(e);return t?`${m(t.getDate())}/${m(t.getMonth()+1)}/${t.getFullYear()}`:e}var H=/* @__PURE__ */new Map;function J({from:t,to:n,onChange:m,formatDisplay:Y,clearable:J,required:L=!1,name:T,id:A,"aria-labelledby":B,"aria-label":E,weekStartsOn:G,placeholder:U,fullWidth:I=!1,min:R,max:q,disabled:K=!1,allowOpenEnd:P=!1}){const Z=v().dateRange,Q=y(),V=Y??(Q?function(e){let t=H.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),H.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(Q):O),X=U??Z.placeholder,z=J??!L,[_,ee]=w(!1),[te,re]=w(t),[ne,ae]=w(n),[oe,le]=w(null),[ie,se]=w("from"),ce=k(null),de=k(null),me=k(null),ue=N(),he=N(),pe=N(),[fe,ge]=w(!1),be=f(ce,_,{preferredMaxWidth:520,preferredMaxHeight:fe?720:560,popupRef:me}),xe=k(null),ve=k(null),[ye,we]=w(!0);g(()=>{const e=ve.current;if(!_||!fe||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&we(a)});const ke=k(null);g(()=>{const e=me.current;if(!_||!be||!e)return;const t=getComputedStyle(e),r=be.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(fe)null!==ke.current&&ke.current<=r&&ge(!1);else{const e=xe.current?.offsetWidth??0;if(0===e)return;ke.current=e,e>r+.5&&ge(!0)}});const[Ne,Ce]=w(!1);g(()=>{const e=!!A&&(de.current?.labels?.length??0)>0;e!==Ne&&Ce(e)});const Me=!!E||!!B||Ne,je=/* @__PURE__ */new Date,[We,De]=w(()=>t?t.slice(0,7):S(je,R,q)),$e=$.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(F(e,je),R,q)),Ye=e=>e?V(e):"";C(()=>{if(!_)return;const e=e=>{const t=e.target;ce.current?.contains(t)||me.current?.contains(t)||ee(!1)};document.addEventListener("mousedown",e);const t=h(()=>ee(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[_]),C(()=>{K&&ee(!1)},[K]);const Fe=()=>{m("",""),ee(!1)},Se=z&&!K&&Boolean(t||n),Oe=t&&n?`${Ye(t)} — ${Ye(n)}`:t?Z.fromOnly(Ye(t)):n?Z.toOnly(Ye(n)):"",He=d(Q),Je=e=>{const t=r(e);return t?He.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Le=t&&n?Z.range(Je(t),Je(n)):t?Z.fromOnly(Je(t)):n?Z.toOnly(Je(n)):X,Te=e=>fe?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(oe===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(oe===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Ae=/* @__PURE__ */j(W,{children:[$e.map(e=>/* @__PURE__ */D("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=F(e,je);re(t.from),ae(t.to),le(e),De(t.from.slice(0,7))})(e),className:Te(e),"aria-label":fe?Z[e]:void 0,children:fe?ye?Z[e]:Z[`${e}Short`]:Z[e]},e)),
2
+ /* @__PURE__ */D("button",{type:"button",onClick:()=>le("Custom"),className:Te("Custom"),children:Z.custom})]}),Be=(e,t)=>P?/* @__PURE__ */D("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>se(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */D("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Ee=e=>P&&ie===e?" ring-1 ring-blue-400":"",Ge=
3
+ /* @__PURE__ */D(e,{mode:"range",min:R,max:q,value:te||null,endValue:ne||null,month:We,onMonthChange:De,onSelect:e=>{le("Custom"),P?"from"===ie?(ne&&e>ne?(re(ne),ae(e)):re(e),se("to")):te&&e<te?(ae(te),re(e)):ae(e):!te||te&&ne?(re(e),ae("")):e<te?(ae(te),re(e)):ae(e)},weekStartsOn:G,"aria-label":Z.dialog});/* @__PURE__ */
4
+ return j("div",{className:"relative"+(I?" w-full":""),ref:ce,children:[
5
+ /* @__PURE__ */j("div",{className:`relative ${I?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 ${Se?a[1]:""} text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${i} ${s}`:c}${K?" cursor-not-allowed opacity-60":""}`,children:[
6
+ /* @__PURE__ */j("button",{ref:de,type:"button",onClick:()=>{K||(re(t),ae(n),le(null),se(t&&!n?"to":"from"),De(t?t.slice(0,7):S(je,R,q)),ee(!0))},"aria-haspopup":"dialog","aria-expanded":_,id:A,disabled:K||void 0,"aria-label":E,"aria-labelledby":B,"aria-describedby":[Me?he:void 0,L?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":_?ue:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(I?" min-w-0 flex-1 justify-start":""),children:[
7
7
  /* @__PURE__ */D(u,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
8
- /* @__PURE__ */D("span",{className:"truncate",children:Oe||z})]}),Se&&/* @__PURE__ */D(o,{children:/* @__PURE__ */D(l,{action:{label:Z.clearRange,icon:/* @__PURE__ */D(u,{name:"close"}),onClick:Fe}})})]}),Me&&/* @__PURE__ */D("span",{id:he,className:"sr-only",children:Te}),T&&/* @__PURE__ */D("span",{id:pe,className:"sr-only",children:Z.required}),E&&/* @__PURE__ */j(W,{children:[
9
- /* @__PURE__ */D("input",{type:"hidden",name:E.from,value:t,disabled:I||void 0}),
10
- /* @__PURE__ */D("input",{type:"hidden",name:E.to,value:n,disabled:I||void 0})]}),_&&M(
8
+ /* @__PURE__ */D("span",{className:"truncate",children:Oe||X})]}),Se&&/* @__PURE__ */D(o,{children:/* @__PURE__ */D(l,{action:{label:Z.clearRange,icon:/* @__PURE__ */D(u,{name:"close"}),onClick:Fe}})})]}),Me&&/* @__PURE__ */D("span",{id:he,className:"sr-only",children:Le}),L&&/* @__PURE__ */D("span",{id:pe,className:"sr-only",children:Z.required}),T&&/* @__PURE__ */j(W,{children:[
9
+ /* @__PURE__ */D("input",{type:"hidden",name:T.from,value:t,disabled:K||void 0}),
10
+ /* @__PURE__ */D("input",{type:"hidden",name:T.to,value:n,disabled:K||void 0})]}),_&&M(
11
11
  /* @__PURE__ */j("div",{ref:me,id:ue,role:"dialog","aria-label":Z.dialog,"data-layout":fe?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:p.popup,left:be?.left,right:be?.right,top:be?.top,bottom:be?.bottom,width:fe&&be?be.maxWidth:"max-content",maxWidth:be?.maxWidth,maxHeight:be?.maxHeight,overflowY:"auto",visibility:be?void 0:"hidden",...x()},children:[
12
12
  /* @__PURE__ */j("div",{className:fe?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Be("from",/* @__PURE__ */j(W,{children:[
13
13
  /* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:Z.from}),
14
- /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${te?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Ue("from")}`,children:te?Ye(te):Z.start})]})),!fe&&/* @__PURE__ */D("span",{className:"text-gray-300",children:"—"}),Be("to",/* @__PURE__ */j(W,{children:[
14
+ /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${te?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Ee("from")}`,children:te?Ye(te):Z.start})]})),!fe&&/* @__PURE__ */D("span",{className:"text-gray-300",children:"—"}),Be("to",/* @__PURE__ */j(W,{children:[
15
15
  /* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:Z.to}),
16
- /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ne?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Ue("to")}`,children:ne?Ye(ne):Z.end})]}))]}),fe?/* @__PURE__ */j(W,{children:[$e.length>0&&/* @__PURE__ */j("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */D("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:Z.lastHeading}),
17
- /* @__PURE__ */j("div",{ref:ve,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[He,$e.map(e=>/* @__PURE__ */D("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:Z[e]},e))]})]}),
18
- /* @__PURE__ */D("div",{className:"w-full",children:Ae})]}):
16
+ /* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ne?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Ee("to")}`,children:ne?Ye(ne):Z.end})]}))]}),fe?/* @__PURE__ */j(W,{children:[$e.length>0&&/* @__PURE__ */j("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */D("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:Z.lastHeading}),
17
+ /* @__PURE__ */j("div",{ref:ve,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Ae,$e.map(e=>/* @__PURE__ */D("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:Z[e]},e))]})]}),
18
+ /* @__PURE__ */D("div",{className:"w-full",children:Ge})]}):
19
19
  /* @__PURE__ */j("div",{ref:xe,className:"flex w-max gap-4",children:[
20
- /* @__PURE__ */D("div",{className:"w-64",children:Ae}),$e.length>0&&/* @__PURE__ */D("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:He})]}),
21
- /* @__PURE__ */j("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[Q&&/* @__PURE__ */D("button",{type:"button",onClick:Fe,className:b({variant:"ghost"}),children:Z.clear}),
20
+ /* @__PURE__ */D("div",{className:"w-64",children:Ge}),$e.length>0&&/* @__PURE__ */D("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Ae})]}),
21
+ /* @__PURE__ */j("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[z&&/* @__PURE__ */D("button",{type:"button",onClick:Fe,className:b({variant:"ghost"}),children:Z.clear}),
22
22
  /* @__PURE__ */D("button",{type:"button",onClick:()=>ee(!1),className:b({variant:"secondary"}),children:Z.cancel}),
23
- /* @__PURE__ */D("button",{type:"button",onClick:()=>{m(te,ne),ee(!1)},disabled:P?!te&&!ne:!te||!ne,className:b({variant:"primary"}),children:Z.apply})]})]}),document.body)]})}export{L as DateRangePicker,F as presetRange,Y as toISODate};
23
+ /* @__PURE__ */D("button",{type:"button",onClick:()=>{m(te,ne),ee(!1)},disabled:P?!te&&!ne:!te||!ne,className:b({variant:"primary"}),children:Z.apply})]})]}),document.body)]})}export{J as DateRangePicker,F as presetRange,Y as toISODate};
@@ -1,14 +1,14 @@
1
- import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-TJSJVC6P.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,S=i(),L=y??(e=>h(e,S)),j=A??N.noStages,z=c(),[V,C]=m(null),{highlighted:F}=e(),W=s(null),w=t(W,560),Z=$??w;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const E=b??a(0),H=p??54*x.length,B=Math.max(...x.map(e=>e.value),1),J="bars"===v,P=J?Math.round(Math.min(132,Math.max(80,.24*Z))):Math.round(Math.min(168,Math.max(104,.38*Z))),Q=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},R=e=>{const t=Q(e);return{count:L(x[e].value),drop:null!=t?`−${u(t,1,S)}`:""}},T=J?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=R(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,U=Z-P-T,Y=Math.max(J?2:0,Math.min(M,U)),D=e=>Math.max(Y,U*Math.max(0,e/B)),I=e=>D(e)/2,O=P+U/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${E} ${X(e).toFixed(0)}%, ${n.surface})`,G=e=>X(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==F&&F!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
2
- return f("div",{className:`relative ${k??""}`,ref:W,children:[
3
- /* @__PURE__ */f("svg",{width:"100%",height:H,viewBox:`0 0 ${Z} ${H}`,role:"img","aria-labelledby":z,onMouseLeave:()=>C(null),children:[
4
- /* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,L(x[0].value),L(x[x.length-1].value))}),x.map((e,t)=>{const l=t*H/x.length+g/2,a=(t+1)*H/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,S),i=.62*o.length*12+12;if(J){const u=P,h=u+D(e.value),{count:c,drop:m}=R(t);/* @__PURE__ */
5
- return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>C(t),children:[
1
+ import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-JSHMIMAJ.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,S=i(),L=y??(e=>h(e,S)),j=A??N.noStages,z=c(),[V,F]=m(null),{highlighted:W}=e(),w=s(null),C=t(w,560),H=$??C;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Z=b??a(0),E=p??54*x.length,B=Math.max(...x.map(e=>e.value),1),I="bars"===v,J=I?Math.round(Math.min(132,Math.max(80,.24*H))):Math.round(Math.min(168,Math.max(104,.38*H))),Q=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},R=e=>{const t=Q(e);return{count:L(x[e].value),drop:null!=t?`−${u(t,1,S)}`:""}},U=I?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=R(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,Y=H-J-U,D=Math.max(I?2:0,Math.min(M,Y)),O=e=>Math.max(D,Y*Math.max(0,e/B)),P=e=>O(e)/2,T=J+Y/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${Z} ${X(e).toFixed(0)}%, ${n.surface})`,G=e=>X(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==W&&W!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
2
+ return f("div",{className:`relative ${k??""}`,ref:w,children:[
3
+ /* @__PURE__ */f("svg",{width:"100%",height:E,viewBox:`0 0 ${H} ${E}`,role:"img","aria-labelledby":z,onMouseLeave:()=>F(null),children:[
4
+ /* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,L(x[0].value),L(x[x.length-1].value))}),x.map((e,t)=>{const l=t*E/x.length+g/2,a=(t+1)*E/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,S),i=.62*o.length*12+12;if(I){const u=J,h=u+O(e.value),{count:c,drop:m}=R(t);/* @__PURE__ */
5
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
6
6
  /* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
7
- /* @__PURE__ */d("text",{x:P-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:G(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
7
+ /* @__PURE__ */d("text",{x:J-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:G(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
8
8
  /* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
9
- /* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=I(e.value),c="cone"===v?I(x[t+1]?.value??e.value):h,m=Q(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
10
- return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>C(t),children:[
11
- /* @__PURE__ */d("path",{d:`M${O-h},${l} L${O+h},${l} L${O+c},${a} L${O-c},${a} Z`,fill:q(t)}),
12
- /* @__PURE__ */d("text",{x:P-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
13
- /* @__PURE__ */f("text",{x:P-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[L(e.value),null!=m?` · −${u(m,1,S)}`:""]}),
14
- /* @__PURE__ */d("text",{x:s?O:O+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?G(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:q(V),value:L(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,S)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,S)}`}]:[]]})})]})}export{x as FunnelChart};
9
+ /* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=P(e.value),c="cone"===v?P(x[t+1]?.value??e.value):h,m=Q(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
10
+ return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
11
+ /* @__PURE__ */d("path",{d:`M${T-h},${l} L${T+h},${l} L${T+c},${a} L${T-c},${a} Z`,fill:q(t)}),
12
+ /* @__PURE__ */d("text",{x:J-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
13
+ /* @__PURE__ */f("text",{x:J-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[L(e.value),null!=m?` · −${u(m,1,S)}`:""]}),
14
+ /* @__PURE__ */d("text",{x:s?T:T+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?G(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:q(V),value:L(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,S)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,S)}`}]:[]]})})]})}export{x as FunnelChart};
@@ -1,4 +1,4 @@
1
- import{GROUP_COLORS as e}from"./chunk-JMGDGNM7.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-TJSJVC6P.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
1
+ import{GROUP_COLORS as e}from"./chunk-JMGDGNM7.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-JSHMIMAJ.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
2
2
  return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
3
3
  return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
4
4
  /* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
@@ -1,16 +1,16 @@
1
- import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-JOAKKXTL.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-TJSJVC6P.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),C=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:S,allColumns:_,onResizeStart:z,onDragStart:J,onDragOver:T,onDrop:$,onDragEnd:A,toggleColumn:K,resetColumns:L,draggedIdx:P,dropGap:I}=t(f,C),{hasAnyPerm:R}=r(),B=i().columns,[E,G]=c(!1),[O,Q]=c(!1),[U,W]=c(!1),X=m(null),Y=k.length>0&&R(k);e(X,h(()=>{E&&G(!1)},[E]));const F=S.reduce((e,t)=>e+t.width,0),V=S.map(e=>`${e.width}px`),H={tableLayout:"fixed",width:F,minWidth:"100%"},M=m(null),Z=h(e=>{const t=M.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
1
+ import{useClickOutside as e}from"./chunk-SI26KESU.js";import{useColumnConfig as t}from"./chunk-UKBXQXDZ.js";import{useShellAuth as r}from"./chunk-2QY5BJLA.js";import{useIsMobile as o}from"./chunk-UGTRSRIW.js";import{Icon as l}from"./chunk-JOAKKXTL.js";import{TH_ONE_LINE as n}from"./chunk-G67CJAQ2.js";import{shellHttp as a}from"./chunk-STKJA4PV.js";import{glassStyle as s}from"./chunk-5FYDNH4Y.js";import{useShellStrings as i}from"./chunk-JSHMIMAJ.js";import{useState as c,useMemo as d,useRef as m,useCallback as h}from"react";import{jsxs as u,jsx as p}from"react/jsx-runtime";function f({tableId:f,columns:g,sort:x,onSort:y,footer:b,afterBody:v,saveDefaultPerms:k=["change_numberingconfig"],children:N}){const w=o(),[D,j]=c(!1),S=d(()=>w&&!D?g.filter(e=>"_select"!==e.key):g,[g,w,D]),{orderedColumns:C,allColumns:_,onResizeStart:z,onDragStart:A,onDragOver:J,onDrop:$,onDragEnd:I,toggleColumn:K,resetColumns:L,draggedIdx:T,dropGap:P}=t(f,S),{hasAnyPerm:R}=r(),B=i().columns,[E,G]=c(!1),[M,O]=c(!1),[Q,U]=c(!1),W=m(null),X=k.length>0&&R(k);e(W,h(()=>{E&&G(!1)},[E]));const Y=C.reduce((e,t)=>e+t.width,0),F=C.map(e=>`${e.width}px`),H={tableLayout:"fixed",width:Y,minWidth:"100%"},V=m(null),Z=h(e=>{const t=V.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),q=d(()=>g.some(e=>"_select"===e.key),[g]);/* @__PURE__ */
2
2
  return u("div",{className:"flex flex-col flex-1 min-h-0 "+(w?"-mx-4":""),children:[
3
- /* @__PURE__ */p("div",{ref:M,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:H,children:[
4
- /* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:V[t]}},e.key))}),
5
- /* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:S.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
6
- return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${P===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>J(t),onDragOver:a?void 0:e=>T(t,e),onDrop:a?void 0:e=>$(t,e),onDragEnd:a?void 0:A,style:a?void 0:{cursor:"grab"},children:[
7
- /* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),I===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===S.length-1&&I===S.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
3
+ /* @__PURE__ */p("div",{ref:V,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:H,children:[
4
+ /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:F[t]}},e.key))}),
5
+ /* @__PURE__ */p("thead",{className:"bg-gray-50",children:/* @__PURE__ */p("tr",{children:C.map((e,t)=>{const r=g.find(t=>t.key===e.key),o=r?.sortField??("_select"!==e.key?e.key:void 0),l=x&&o&&x.field===o,a="_select"===e.key;/* @__PURE__ */
6
+ return u("th",{className:`${n} px-4 py-3 text-left text-xs font-medium text-ink-faint uppercase select-none relative ${T===t?"bg-accent-tint":""}`,draggable:!a,onDragStart:a?void 0:()=>A(t),onDragOver:a?void 0:e=>J(t,e),onDrop:a?void 0:e=>$(t,e),onDragEnd:a?void 0:I,style:a?void 0:{cursor:"grab"},children:[
7
+ /* @__PURE__ */u("span",{className:`${a?"":"truncate pr-3"} block ${o&&y?"cursor-pointer hover:text-gray-700":""}`,onClick:o&&y?e=>{e.stopPropagation(),y(o)}:void 0,children:[e.headerNode??e.label,l&&/* @__PURE__ */p("span",{className:"ml-1",children:"asc"===x.direction?"▲":"▼"})]}),!a&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-4 cursor-col-resize flex items-center justify-center z-10",onMouseDown:e=>z(t,e),style:{marginRight:-8},children:/* @__PURE__ */p("div",{className:"w-0.5 h-full bg-gray-200 hover:bg-blue-500 transition-colors"})}),P===t&&/* @__PURE__ */p("div",{className:"absolute left-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"}),t===C.length-1&&P===C.length&&/* @__PURE__ */p("div",{className:"absolute right-0 top-0 bottom-0 w-0.5 bg-blue-500 z-20 pointer-events-none"})]},e.key)})})})]})}),
8
8
  /* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto overflow-x-auto min-h-0",onScroll:Z,children:[
9
9
  /* @__PURE__ */u("table",{className:"divide-y divide-gray-200",style:H,children:[
10
- /* @__PURE__ */p("colgroup",{children:S.map((e,t)=>/* @__PURE__ */p("col",{style:{width:V[t]}},e.key))}),N(S)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
10
+ /* @__PURE__ */p("colgroup",{children:C.map((e,t)=>/* @__PURE__ */p("col",{style:{width:F[t]}},e.key))}),N(C)]}),v]}),void 0!==b&&/* @__PURE__ */u("div",{className:"border-t border-gray-200 px-4 py-2 text-sm text-gray-500 shrink-0 flex items-center justify-between",children:[
11
11
  /* @__PURE__ */p("span",{children:b}),
12
- /* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:X,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?B.hideSelection:B.showSelection,children:D?B.selectDone:B.select}),
12
+ /* @__PURE__ */u("div",{className:"flex items-center gap-3 relative",ref:W,children:[w&&q&&/* @__PURE__ */p("button",{onClick:()=>j(e=>!e),className:"text-2xs px-2 py-0.5 rounded "+(D?"bg-accent-fill text-on-accent":"text-ink-faint hover:text-ink border border-line-strong"),title:D?B.hideSelection:B.showSelection,children:D?B.selectDone:B.select}),
13
13
  /* @__PURE__ */p("button",{onClick:L,className:"text-2xs text-ink-faintest hover:text-gray-600",children:B.reset}),
14
14
  /* @__PURE__ */p("button",{onClick:()=>G(!E),className:"text-gray-400 hover:text-gray-600",title:B.choose,children:/* @__PURE__ */p(l,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),E&&/* @__PURE__ */u("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:s(),children:[
15
15
  /* @__PURE__ */p("p",{className:"px-3 py-2 text-3xs font-semibold text-ink-faintest uppercase",children:B.heading}),_.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */u("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
16
- /* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>K(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),Y&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{Q(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),W(!0),setTimeout(()=>W(!1),2e3)}catch{}Q(!1)},disabled:O,className:"text-2xs w-full text-center py-1 rounded "+(U?"text-green-600":"text-ink-faint hover:text-blue-600"),children:O?"...":U?B.savedDefault:B.saveDefault})})]})]})]})]})}export{f as ResizableTable};
16
+ /* @__PURE__ */p("input",{type:"checkbox",checked:!e.hidden,onChange:()=>K(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),X&&/* @__PURE__ */p("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */p("button",{onClick:async()=>{O(!0);const e=_.filter(e=>!e.hidden).map(e=>e.key),t=w?"mobile":"desktop",r={visible_columns:e};x&&(r.sort=x);try{await a.patch(`/auth/default-columns/${f}/`,r,{params:{viewport:t}}).catch(()=>a.post("/auth/default-columns/",{table_id:f,viewport:t,...r})),U(!0),setTimeout(()=>U(!1),2e3)}catch{}O(!1)},disabled:M,className:"text-2xs w-full text-center py-1 rounded "+(Q?"text-green-600":"text-ink-faint hover:text-blue-600"),children:M?"...":Q?B.savedDefault:B.saveDefault})})]})]})]})]})}export{f as ResizableTable};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-BYDSBDVS.js";import{Select_default as l}from"./chunk-TCMAWDBL.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-SEMV4NCH.js";import{Input_default as c}from"./chunk-CU3ZE25J.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
1
+ import{Card as e}from"./chunk-CEIIQRK5.js";import{Select_default as l}from"./chunk-VJXPT53M.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-YU52WMSH.js";import{Input_default as c}from"./chunk-CU3ZE25J.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
2
2
  return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
3
3
  /* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
4
4
  /* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
@@ -0,0 +1,12 @@
1
+ import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-JSHMIMAJ.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:M,animate:y=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),R=M??(e=>m(e,w)),E=b??C.nothingToPlot,I=h(),[P,T]=u(null),{highlighted:$}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:E});const A=v/2,F=v/2,H=v/2-10,J=x??Math.max(...g.map(e=>e.value),1),Q="track"===k?Math.max(6,(H-.16*v)/g.length):0,U=Math.max(1,Math.floor((H-.16*v)/Q||1)),V="track"===k?g.slice(0,U):g,W=Math.min(j,Math.max(1,Q-2)),Y=r(V.length,.03),z=null!==P?V[P]:void 0;/* @__PURE__ */
2
+ return d("div",{className:`relative ${N??""}`,children:[
3
+ /* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":I,onMouseLeave:()=>T(null),children:[
4
+ /* @__PURE__ */p("title",{id:I,children:"track"===k?C.radialTrack(V.length):C.radialCycle(V.length)}),V.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/J)),c=((e,t)=>null!==P?P!==e:null!==$&&$!==t)(r,l.key);if("track"===k){const o=H-r*Q,m=o-Q+W,h=-Math.PI/2;/* @__PURE__ */
5
+ return d("g",{opacity:c?.4:1,onMouseEnter:()=>T(r),className:y?t.sweep:void 0,style:y?a(r,70):void 0,children:[
6
+ /* @__PURE__ */p("path",{d:e(A,F,m,o,h,h+f),fill:i.grid}),
7
+ /* @__PURE__ */p("path",{d:e(A,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
8
+ return p("g",{opacity:c?.4:1,onMouseEnter:()=>T(r),children:/* @__PURE__ */p("path",{d:e(A,F,m,m+(H-m)*s,Y(r),Y(r)+Y.step),fill:n})},l.key)})]}),z&&null!==P&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(n,{title:z.label,rows:[{key:"value",label:C.value,color:o(P,z.color,z.tone),value:R(z.value)}]})}),
9
+ /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
10
+ /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
11
+ /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
12
+ /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:R(e.value)})]},e.key))})]})}export{g as RadialBarChart};