efficient-shell 10.16.0 → 10.17.1

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 (394) hide show
  1. package/dist/{Browser-RI5X7GMK.js → Browser-4B76MFTG.js} +13 -13
  2. package/dist/Calculator-AXFKAC7G.js +29 -0
  3. package/dist/{CurrencyConverter-2GUEE7ZR.js → CurrencyConverter-36BFSFRS.js} +8 -8
  4. package/dist/{Documents-GI346UL5.js → Documents-VKAMBKSP.js} +15 -15
  5. package/dist/Files-NRYZG4KY.js +88 -0
  6. package/dist/{Notepad-HRZKLHO3.js → Notepad-AQXGH6VP.js} +10 -10
  7. package/dist/{PdfViewer-LU5JKHSG.js → PdfViewer-Y3SAVADX.js} +1 -1
  8. package/dist/{PomodoroTimer-QYCTTTPZ.js → PomodoroTimer-RHDLKJBY.js} +63 -63
  9. package/dist/{Preview-LSGN5GN7.js → Preview-DEBTZQP5.js} +47 -47
  10. package/dist/Sidebar-CB6KRPW2.js +44 -0
  11. package/dist/{Spreadsheet-7JBZY6KJ.js → Spreadsheet-FSHLWXYP.js} +13 -13
  12. package/dist/{Stock-ZVQT25IE.js → Stock-CV53A432.js} +3 -3
  13. package/dist/{Weather-RAUDLLVU.js → Weather-R4MCLH7F.js} +19 -19
  14. package/dist/{WorldClock-2XBWZ6SZ.js → WorldClock-CSFPCZHU.js} +6 -6
  15. package/dist/ai/index.d.ts +1 -1
  16. package/dist/ai/index.js +81 -80
  17. package/dist/ai.css +1 -1
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +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/ChartTooltip.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.js +1 -1
  30. package/dist/charts/FunnelChart.js +1 -1
  31. package/dist/charts/HeatmapChart.js +1 -1
  32. package/dist/charts/HistogramChart.js +1 -1
  33. package/dist/charts/Meter.js +1 -1
  34. package/dist/charts/PieChart.js +1 -1
  35. package/dist/charts/RadarChart.js +1 -1
  36. package/dist/charts/RadialBarChart.js +1 -1
  37. package/dist/charts/RangeChart.js +1 -1
  38. package/dist/charts/RankedBars.js +1 -1
  39. package/dist/charts/SankeyChart.js +1 -1
  40. package/dist/charts/ScatterChart.js +1 -1
  41. package/dist/charts/SpecChart.js +1 -1
  42. package/dist/charts/StatTile.js +1 -1
  43. package/dist/charts/SunburstChart.js +1 -1
  44. package/dist/charts/TimeSeriesChart.js +1 -1
  45. package/dist/charts/TreemapChart.js +1 -1
  46. package/dist/charts/WaterfallChart.js +1 -1
  47. package/dist/chunk-26RTJKHD.js +2 -0
  48. package/dist/{chunk-F2R3UFNQ.js → chunk-2E2SUEEE.js} +1 -1
  49. package/dist/chunk-2EVTN26H.js +2 -0
  50. package/dist/{chunk-M22B3Y5Y.js → chunk-3IUPYCW3.js} +1 -1
  51. package/dist/{chunk-N3TOHWFF.js → chunk-3J2PO3KW.js} +1 -1
  52. package/dist/{chunk-X6BFVDB4.js → chunk-3PR7FLTZ.js} +2 -2
  53. package/dist/{chunk-PCFBDXLN.js → chunk-3TKMH5VR.js} +1 -1
  54. package/dist/{chunk-4WEFGKJL.js → chunk-3VLG6LR3.js} +4 -4
  55. package/dist/{chunk-CBEKJTXU.js → chunk-4D66DUU5.js} +5 -5
  56. package/dist/{chunk-XDBG4HPV.js → chunk-4EZIWLJJ.js} +1 -1
  57. package/dist/{chunk-FWVC4A2O.js → chunk-4MJA2SPJ.js} +13 -13
  58. package/dist/chunk-4Q25UHWB.js +22 -0
  59. package/dist/{chunk-EZEYKCI6.js → chunk-4ULRP4Y4.js} +1 -1
  60. package/dist/chunk-4V73LGZG.js +11 -0
  61. package/dist/{chunk-S6FBMSFU.js → chunk-5IPFQV34.js} +2 -2
  62. package/dist/{chunk-3ELLBQPS.js → chunk-5LCDCO46.js} +1 -1
  63. package/dist/{chunk-GISDIVFK.js → chunk-5N5AAYQV.js} +1 -1
  64. package/dist/{chunk-7HTRLRVO.js → chunk-5VAIVRK6.js} +62 -62
  65. package/dist/{chunk-RLJHRDDW.js → chunk-5W2OEDUD.js} +8 -8
  66. package/dist/chunk-6ACS4S4P.js +15 -0
  67. package/dist/{chunk-ULXCDM7Y.js → chunk-6V4INP7J.js} +10 -10
  68. package/dist/{chunk-LCJRTJXT.js → chunk-7AZAMDGG.js} +9 -9
  69. package/dist/{chunk-AKM6JBMD.js → chunk-7ELJQL7J.js} +1 -1
  70. package/dist/chunk-7RPYVQEV.js +2 -0
  71. package/dist/{chunk-UPQW4GCT.js → chunk-7TZV6G2F.js} +1 -1
  72. package/dist/{chunk-VTFZ6W2D.js → chunk-7X4QNWA7.js} +2 -2
  73. package/dist/{chunk-D7F442OZ.js → chunk-AEJYSUVQ.js} +1 -1
  74. package/dist/{chunk-QYSEYYV7.js → chunk-AFINCNY3.js} +1 -1
  75. package/dist/{chunk-DKGZPVLL.js → chunk-AFYLVV74.js} +1 -1
  76. package/dist/{chunk-H4HB5OET.js → chunk-AWKJZSTO.js} +1 -1
  77. package/dist/chunk-B3CN55UI.js +2 -0
  78. package/dist/{chunk-CQV3VSI2.js → chunk-B4HSNEBK.js} +1 -1
  79. package/dist/{chunk-57HN6MPC.js → chunk-BE777IO7.js} +2 -2
  80. package/dist/{chunk-K4ANB6AF.js → chunk-BVIOCAEU.js} +1 -1
  81. package/dist/{chunk-4UKGVLFP.js → chunk-BZUA5F33.js} +1 -1
  82. package/dist/{chunk-QP4UPCXQ.js → chunk-C764JODK.js} +1 -1
  83. package/dist/chunk-CCIGAU5Y.js +6 -0
  84. package/dist/{chunk-CKKUFDZ3.js → chunk-CF7BMDU3.js} +18 -18
  85. package/dist/{chunk-LEDUD23S.js → chunk-CLTRQ7AQ.js} +1 -1
  86. package/dist/{chunk-7TNAOZZ2.js → chunk-CNUHLJYD.js} +1 -1
  87. package/dist/chunk-CUKDQPEN.js +19 -0
  88. package/dist/{chunk-ISJPW2FZ.js → chunk-D6OYQM4V.js} +11 -11
  89. package/dist/{chunk-W6URVLQF.js → chunk-DOC52JBV.js} +17 -17
  90. package/dist/{chunk-IOJNSX4N.js → chunk-DQQKG46I.js} +7 -7
  91. package/dist/{chunk-INNIWRVU.js → chunk-E6GDAV5R.js} +2 -2
  92. package/dist/{chunk-TM33D3CE.js → chunk-EC527NE3.js} +1 -1
  93. package/dist/{chunk-RCPFUDPS.js → chunk-EDMDKQNO.js} +3 -3
  94. package/dist/{chunk-3EJ64VKE.js → chunk-EN5NXWT6.js} +1 -1
  95. package/dist/{chunk-MTEFYFUO.js → chunk-ENDCV7B3.js} +9 -9
  96. package/dist/{chunk-MCDM2G4W.js → chunk-EOWUUOVE.js} +1 -1
  97. package/dist/{chunk-4G2C6J4I.js → chunk-EQCFPRKJ.js} +1 -1
  98. package/dist/{chunk-TXDA7TTP.js → chunk-EQZZ4V5X.js} +1 -1
  99. package/dist/{chunk-WINNA7LS.js → chunk-EZUQ5NXE.js} +1 -1
  100. package/dist/chunk-F7Z47OIF.js +12 -0
  101. package/dist/{chunk-2SY76NFO.js → chunk-FEATDGFD.js} +4 -4
  102. package/dist/chunk-FX6DBXXD.js +1 -0
  103. package/dist/{chunk-7JGR7WPD.js → chunk-G4JTO5PB.js} +1 -1
  104. package/dist/{chunk-SG4LO2AN.js → chunk-G4PGEQOX.js} +10 -10
  105. package/dist/{chunk-W3OWPBQL.js → chunk-GD7ILVPF.js} +2 -2
  106. package/dist/chunk-GDQJBQ5B.js +1 -0
  107. package/dist/chunk-GLBLKHYA.js +5 -0
  108. package/dist/{chunk-WB4P4QE2.js → chunk-H7BKSATJ.js} +1 -1
  109. package/dist/{chunk-L4IW77TD.js → chunk-HJ2BDUO6.js} +4 -4
  110. package/dist/chunk-HJCUDXLV.js +1 -0
  111. package/dist/{chunk-SDQIXE5M.js → chunk-HLQVB7FG.js} +8 -8
  112. package/dist/chunk-HLVOHOBC.js +6 -0
  113. package/dist/{chunk-QHOBK35Y.js → chunk-HS2E7DVI.js} +1 -1
  114. package/dist/chunk-HXNMRJQ4.js +2 -0
  115. package/dist/chunk-HXZ5XPBS.js +3 -0
  116. package/dist/{chunk-3LDXURVU.js → chunk-HYDVHGVT.js} +2 -2
  117. package/dist/chunk-IDV32UV7.js +29 -0
  118. package/dist/chunk-IHFZ7OXO.js +14 -0
  119. package/dist/{chunk-MNSKGMVZ.js → chunk-ILP7QVW5.js} +8 -8
  120. package/dist/{chunk-KJ4CBZEQ.js → chunk-IMDGMUE3.js} +1 -1
  121. package/dist/{chunk-JGTGQGHY.js → chunk-IX7QXMNJ.js} +1 -1
  122. package/dist/chunk-JFH5HW2G.js +12 -0
  123. package/dist/{chunk-HNBGLF4B.js → chunk-JFV5CQN4.js} +1 -1
  124. package/dist/{chunk-7MSC3Z5H.js → chunk-JH4ZCPHW.js} +8 -8
  125. package/dist/{chunk-OOLPDASG.js → chunk-JSG2AKCG.js} +1 -1
  126. package/dist/{chunk-6RX4PVBU.js → chunk-JTMEFXRL.js} +1 -1
  127. package/dist/{chunk-YOSUCCHG.js → chunk-K7L3ZCPB.js} +3 -3
  128. package/dist/chunk-KLBJ646Z.js +8 -0
  129. package/dist/{chunk-7NBSBGLX.js → chunk-L2RS2UQM.js} +8 -8
  130. package/dist/{chunk-PYAJCN2Q.js → chunk-LAMRQE2P.js} +1 -1
  131. package/dist/{chunk-ULAGXDOL.js → chunk-LXL2UCUR.js} +1 -1
  132. package/dist/{chunk-O6JJIR4H.js → chunk-M5LR7ZZX.js} +1 -1
  133. package/dist/{chunk-UWIZX3RK.js → chunk-MAFSELZK.js} +1 -1
  134. package/dist/{chunk-N67QX3WW.js → chunk-MMQ6ETRD.js} +2 -2
  135. package/dist/{chunk-XTCXX5LJ.js → chunk-MS5APD3V.js} +1 -1
  136. package/dist/chunk-MUXGWDEH.js +2 -0
  137. package/dist/{chunk-GPJO34QP.js → chunk-N4ZEB4UD.js} +9 -9
  138. package/dist/{chunk-E3753CWP.js → chunk-NRI26RYC.js} +2 -2
  139. package/dist/{chunk-7HLC352T.js → chunk-NVFYLTJ6.js} +17 -17
  140. package/dist/chunk-NXVFY22L.js +9 -0
  141. package/dist/{chunk-QDQ347RL.js → chunk-NYEMGKAE.js} +1 -1
  142. package/dist/{chunk-5UYZ75F3.js → chunk-NZGNOMWX.js} +12 -12
  143. package/dist/{chunk-3NW5LD7D.js → chunk-NZQCDFDG.js} +3 -3
  144. package/dist/{chunk-BJXDOM2N.js → chunk-OBJGUJIE.js} +1 -1
  145. package/dist/{chunk-AUWTGM65.js → chunk-OH5L6HYW.js} +3 -3
  146. package/dist/{chunk-ZURB2DCM.js → chunk-OPN4I565.js} +1 -1
  147. package/dist/{chunk-7SMV6G4Z.js → chunk-ORIXCEKO.js} +1 -1
  148. package/dist/{chunk-FEQDZTZ7.js → chunk-OUIE2N2Z.js} +6 -6
  149. package/dist/{chunk-TOVKWNI2.js → chunk-P3RXXWXN.js} +6 -6
  150. package/dist/{chunk-ON67HF5K.js → chunk-PCTOL2FX.js} +8 -8
  151. package/dist/{chunk-6XBWM453.js → chunk-Q3IR5SKD.js} +1 -1
  152. package/dist/{chunk-7ZP64SC7.js → chunk-Q5QS5MFX.js} +1 -1
  153. package/dist/{chunk-4QJOEHM6.js → chunk-QEB2UTHO.js} +7 -7
  154. package/dist/{chunk-I2XGPTCN.js → chunk-QJLBBDX2.js} +1 -1
  155. package/dist/{chunk-AJO72CPB.js → chunk-QLVJ5W4G.js} +2 -2
  156. package/dist/chunk-QO5E33DH.js +8 -0
  157. package/dist/{chunk-LPXMHYTM.js → chunk-QVZKRROQ.js} +1 -1
  158. package/dist/{chunk-EXJXOKUU.js → chunk-QYL26AB4.js} +1 -1
  159. package/dist/chunk-RAAH4TQU.js +1 -0
  160. package/dist/{chunk-JJW43QPS.js → chunk-RBEI4CKX.js} +5 -5
  161. package/dist/{chunk-TVH7IZQ4.js → chunk-REWKL7MX.js} +2 -2
  162. package/dist/{chunk-MVZRZTQP.js → chunk-S5SRXI4V.js} +1 -1
  163. package/dist/{chunk-QYRMFGES.js → chunk-SAP4YI2Y.js} +1 -1
  164. package/dist/{chunk-KTA77U3P.js → chunk-SDATPJM2.js} +4 -4
  165. package/dist/{chunk-KEPJWZJZ.js → chunk-SL77N7VT.js} +3 -3
  166. package/dist/{chunk-UDRMZ22J.js → chunk-SOBGCIPF.js} +1 -1
  167. package/dist/{chunk-H32EQG5Z.js → chunk-SOJEQHZ2.js} +9 -9
  168. package/dist/{chunk-34URULVW.js → chunk-SQCUN2DX.js} +1 -1
  169. package/dist/chunk-SRWZE3WA.js +6 -0
  170. package/dist/{chunk-5RE6R3XC.js → chunk-SXNQHIBY.js} +1 -1
  171. package/dist/{chunk-GGK27H67.js → chunk-TGGUYAWA.js} +1 -1
  172. package/dist/chunk-TGXO3CDO.js +2 -0
  173. package/dist/{chunk-74OUAR6L.js → chunk-TIGTIT3L.js} +6 -6
  174. package/dist/{chunk-UYRITNQW.js → chunk-TLWGOQI3.js} +3 -3
  175. package/dist/{chunk-MQU3PZUS.js → chunk-TMMNCXQT.js} +1 -1
  176. package/dist/chunk-TNDRHHKN.js +14 -0
  177. package/dist/{chunk-SHKBDFSE.js → chunk-TXDBOSSB.js} +1 -1
  178. package/dist/{chunk-DRDYZ633.js → chunk-U32J7D4Q.js} +2 -2
  179. package/dist/{chunk-LDE5IV2M.js → chunk-UABVKJK7.js} +4 -4
  180. package/dist/{chunk-UTWJKSET.js → chunk-UEISJFZH.js} +5 -5
  181. package/dist/{chunk-B7UCXROE.js → chunk-UG6RI525.js} +1 -1
  182. package/dist/chunk-UXPBVRSE.js +7 -0
  183. package/dist/{chunk-W5CJD54C.js → chunk-VAK5FQXH.js} +1 -1
  184. package/dist/{chunk-O7DW2BKY.js → chunk-VHF3CJVO.js} +28 -28
  185. package/dist/{chunk-7X5FABQS.js → chunk-VHPT7ZS5.js} +5 -5
  186. package/dist/{chunk-MHB52H2Y.js → chunk-WON5GBJY.js} +12 -12
  187. package/dist/{chunk-D4I3U7UE.js → chunk-WS7XIJS6.js} +1 -1
  188. package/dist/{chunk-AOK3BHRT.js → chunk-WWLKVGV7.js} +4 -4
  189. package/dist/{chunk-G4GVLK44.js → chunk-WZ5QSSUM.js} +6 -6
  190. package/dist/{chunk-LO5T2K4B.js → chunk-X2KMUHBB.js} +3 -3
  191. package/dist/{chunk-CPZ42W2B.js → chunk-XCAO2F3H.js} +1 -1
  192. package/dist/chunk-XGJQVIEG.js +2 -0
  193. package/dist/{chunk-PVZGSCCB.js → chunk-XKJ7GEVA.js} +5 -5
  194. package/dist/chunk-XPTOKPUM.js +11 -0
  195. package/dist/{chunk-XZGGJHJC.js → chunk-XQMPLXGG.js} +15 -15
  196. package/dist/{chunk-VKKK4WLS.js → chunk-XQZL6JDD.js} +6 -6
  197. package/dist/{chunk-JEH5EVIG.js → chunk-XSJHN2GD.js} +1 -1
  198. package/dist/{chunk-2VGQS6CW.js → chunk-XTV3CAV7.js} +1 -1
  199. package/dist/{chunk-3AH524CN.js → chunk-XYECIBVX.js} +1 -1
  200. package/dist/{chunk-6C6TRDNI.js → chunk-YG2TWBDH.js} +1 -1
  201. package/dist/chunk-YG6Y5X7S.js +7 -0
  202. package/dist/chunk-YJ5IHIAI.js +2 -0
  203. package/dist/{chunk-NBVHJZVS.js → chunk-YQFGRYEF.js} +12 -12
  204. package/dist/chunk-YUECA3XB.js +8 -0
  205. package/dist/chunk-YYZ73H64.js +7 -0
  206. package/dist/{chunk-7UTPXU6K.js → chunk-ZF2MNQXY.js} +1 -1
  207. package/dist/{chunk-ZW3IDCP2.js → chunk-ZGOHRLXG.js} +1 -1
  208. package/dist/{chunk-6AS5PHHK.js → chunk-ZI3DGOW6.js} +17 -17
  209. package/dist/{chunk-TKJBZIHT.js → chunk-ZMRGHVKS.js} +1 -1
  210. package/dist/data/DataTable.js +1 -1
  211. package/dist/data/Kanban.js +1 -1
  212. package/dist/data/ListFooter.js +1 -1
  213. package/dist/data/ListLoadError.js +1 -1
  214. package/dist/data/Pagination.js +1 -1
  215. package/dist/file-intake/index.js +1 -1
  216. package/dist/forms/AlignmentGrid.js +1 -1
  217. package/dist/forms/BorderInput.js +1 -1
  218. package/dist/forms/BrandAssetEditor.js +1 -1
  219. package/dist/forms/Button.js +1 -1
  220. package/dist/forms/Calendar.js +1 -1
  221. package/dist/forms/ColorPicker.js +1 -1
  222. package/dist/forms/ComposerAttachments.js +1 -1
  223. package/dist/forms/CornersInput.js +1 -1
  224. package/dist/forms/DatePicker.js +1 -1
  225. package/dist/forms/DateRangePicker.js +1 -1
  226. package/dist/forms/DateTimePicker.js +1 -1
  227. package/dist/forms/DisplayChips.js +1 -1
  228. package/dist/forms/FilePicker.js +1 -1
  229. package/dist/forms/FormErrorSummary.js +1 -1
  230. package/dist/forms/IconButton.js +1 -1
  231. package/dist/forms/IconPicker.js +1 -1
  232. package/dist/forms/ImageFocusPoint.js +1 -1
  233. package/dist/forms/InputNumber.js +1 -1
  234. package/dist/forms/LinkPicker.js +1 -1
  235. package/dist/forms/MediaLibrary.js +1 -1
  236. package/dist/forms/MediaUploadField.js +1 -1
  237. package/dist/forms/MediaUploadGrid.js +1 -1
  238. package/dist/forms/MediaUsedInList.js +1 -1
  239. package/dist/forms/NumericKeypad.js +1 -1
  240. package/dist/forms/PictureTiles.js +1 -1
  241. package/dist/forms/PositionInput.js +1 -1
  242. package/dist/forms/Segmented.js +1 -1
  243. package/dist/forms/Select.d.ts +1 -1
  244. package/dist/forms/Select.js +1 -1
  245. package/dist/forms/SidesInput.js +1 -1
  246. package/dist/forms/Slider.js +1 -1
  247. package/dist/forms/Snippet.js +1 -1
  248. package/dist/forms/SplitButton.js +1 -1
  249. package/dist/forms/TagInput.js +1 -1
  250. package/dist/forms/TextToolbar.d.ts +1 -1
  251. package/dist/forms/TextToolbar.js +1 -1
  252. package/dist/forms/TimePicker.js +1 -1
  253. package/dist/forms/WidthsBar.js +1 -1
  254. package/dist/forms/mediaLibraryMenu.js +1 -1
  255. package/dist/forms/mediaMoveItems.js +1 -1
  256. package/dist/forms/textAlign.d.ts +1 -1
  257. package/dist/forms/textAlign.js +1 -1
  258. package/dist/forms/useFileIntake.js +1 -1
  259. package/dist/hooks/useTheme.d.ts +1 -1
  260. package/dist/icons/efficient-glyphs.d.ts +2 -0
  261. package/dist/icons/efficient-glyphs.js +1 -1
  262. package/dist/icons/efficient-looks.d.ts +4 -0
  263. package/dist/icons/efficient-looks.js +1 -1
  264. package/dist/icons/efficient-meanings.d.ts +2 -0
  265. package/dist/icons/efficient-meanings.js +1 -1
  266. package/dist/icons/efficient.d.ts +2 -0
  267. package/dist/icons/efficient.js +1 -1
  268. package/dist/icons/glyphs/SeparatorSlashIcon.d.ts +8 -0
  269. package/dist/icons/glyphs/SeparatorSlashIcon.js +1 -0
  270. package/dist/icons/glyphs/SeparatorTriangleIcon.d.ts +8 -0
  271. package/dist/icons/glyphs/SeparatorTriangleIcon.js +1 -0
  272. package/dist/icons/index.d.ts +2 -2
  273. package/dist/icons/index.js +1 -1
  274. package/dist/icons/looks/SeparatorSlashMiniIcon.d.ts +8 -0
  275. package/dist/icons/looks/SeparatorSlashMiniIcon.js +1 -0
  276. package/dist/icons/looks/SeparatorSlashSolidIcon.d.ts +8 -0
  277. package/dist/icons/looks/SeparatorSlashSolidIcon.js +1 -0
  278. package/dist/icons/looks/SeparatorTriangleMiniIcon.d.ts +8 -0
  279. package/dist/icons/looks/SeparatorTriangleMiniIcon.js +1 -0
  280. package/dist/icons/looks/SeparatorTriangleSolidIcon.d.ts +8 -0
  281. package/dist/icons/looks/SeparatorTriangleSolidIcon.js +1 -0
  282. package/dist/icons/looks/map.js +1 -1
  283. package/dist/icons/sets.js +1 -1
  284. package/dist/index.d.ts +4 -4
  285. package/dist/index.js +256 -256
  286. package/dist/locales/zh-Hans.js +1 -1
  287. package/dist/map/index.js +8 -8
  288. package/dist/{names-Bmx_9y41.d.ts → names-CkQuQ47O.d.ts} +1 -1
  289. package/dist/page-tabs/index.js +5 -5
  290. package/dist/pdf/index.js +1 -1
  291. package/dist/shell/Accordion.js +1 -1
  292. package/dist/shell/AppUpdateBanner.js +1 -1
  293. package/dist/shell/Avatar.js +1 -1
  294. package/dist/shell/Banner.js +1 -1
  295. package/dist/shell/Breadcrumbs.js +1 -1
  296. package/dist/shell/BudgetBar.js +1 -1
  297. package/dist/shell/Card.js +1 -1
  298. package/dist/shell/ColoredBadge.js +1 -1
  299. package/dist/shell/ConfirmDialog.js +1 -1
  300. package/dist/shell/ContainerFillChart.js +1 -1
  301. package/dist/shell/ContextMenu.js +1 -1
  302. package/dist/shell/CountBadge.js +1 -1
  303. package/dist/shell/Dialog.js +1 -1
  304. package/dist/shell/Drawer.js +1 -1
  305. package/dist/shell/DropdownMenu.js +1 -1
  306. package/dist/shell/EditableGrid.js +1 -1
  307. package/dist/shell/EmptyState.js +1 -1
  308. package/dist/shell/FloatingBar.js +1 -1
  309. package/dist/shell/GlobalSearch.js +1 -1
  310. package/dist/shell/HelpCenter.js +1 -1
  311. package/dist/shell/IconRail.js +1 -1
  312. package/dist/shell/ImageLightbox.js +1 -1
  313. package/dist/shell/ItemCount.js +1 -1
  314. package/dist/shell/LanguageSelect.js +1 -1
  315. package/dist/shell/Markdown.d.ts +1 -1
  316. package/dist/shell/Markdown.js +1 -1
  317. package/dist/shell/MetricBar.js +1 -1
  318. package/dist/shell/MetricBarLegend.js +1 -1
  319. package/dist/shell/MilestoneTimeline.js +1 -1
  320. package/dist/shell/PageHeader.js +1 -1
  321. package/dist/shell/Popover.js +1 -1
  322. package/dist/shell/PopupMenu.js +1 -1
  323. package/dist/shell/ProductionTimeline.js +1 -1
  324. package/dist/shell/ResizeHandle.js +1 -1
  325. package/dist/shell/Result.js +1 -1
  326. package/dist/shell/SearchableSelect.js +1 -1
  327. package/dist/shell/SettingReset.js +1 -1
  328. package/dist/shell/SettingRow.js +1 -1
  329. package/dist/shell/SidebarLayout.js +1 -1
  330. package/dist/shell/SidebarNav.js +1 -1
  331. package/dist/shell/SortableList.js +1 -1
  332. package/dist/shell/Statistic.js +1 -1
  333. package/dist/shell/StatusBadge.js +1 -1
  334. package/dist/shell/Tabs.js +1 -1
  335. package/dist/shell/TimeAgo.js +1 -1
  336. package/dist/shell/TimelineTrack.js +1 -1
  337. package/dist/shell/Tooltip.js +1 -1
  338. package/dist/shell/TopNav.js +1 -1
  339. package/dist/shell/TransferProgress.js +1 -1
  340. package/dist/shell/Tree.js +1 -1
  341. package/dist/shell/discardGuard.js +1 -1
  342. package/dist/shell/language.js +1 -1
  343. package/dist/shell/strings.d.ts +6 -0
  344. package/dist/shell/strings.js +1 -1
  345. package/dist/shell/toast.js +1 -1
  346. package/dist/telemetry/index.js +1 -1
  347. package/dist/templates/AuthScreen.js +1 -1
  348. package/dist/templates/ChatTemplate.js +1 -1
  349. package/dist/templates/CheckoutTemplate.js +1 -1
  350. package/dist/templates/DashboardTemplate.js +1 -1
  351. package/dist/templates/DataTablePage.js +1 -1
  352. package/dist/templates/EmailTemplate.js +1 -1
  353. package/dist/templates/ErrorBoundary.d.ts +1 -1
  354. package/dist/templates/ErrorBoundary.js +1 -1
  355. package/dist/templates/ErrorPage.js +1 -1
  356. package/dist/templates/FormLayoutPage.js +1 -1
  357. package/dist/templates/GalleryTemplate.js +1 -1
  358. package/dist/ui/index.d.ts +1 -1
  359. package/dist/ui/index.js +1 -1
  360. package/dist/version.js +1 -1
  361. package/package.json +1 -1
  362. package/dist/Calculator-Y566OMJZ.js +0 -29
  363. package/dist/Files-UA23KXN7.js +0 -88
  364. package/dist/Sidebar-2P26444H.js +0 -44
  365. package/dist/chunk-2JG5JU4M.js +0 -8
  366. package/dist/chunk-4PAWQEXM.js +0 -1
  367. package/dist/chunk-7XYTJPWW.js +0 -29
  368. package/dist/chunk-BNJWZAQE.js +0 -12
  369. package/dist/chunk-COJYPNKF.js +0 -2
  370. package/dist/chunk-DESWIPOZ.js +0 -3
  371. package/dist/chunk-DWR7MYQU.js +0 -7
  372. package/dist/chunk-EU3JZGV2.js +0 -14
  373. package/dist/chunk-I4VIEGCX.js +0 -2
  374. package/dist/chunk-IKNG7EFQ.js +0 -12
  375. package/dist/chunk-JSGQWVYH.js +0 -7
  376. package/dist/chunk-KTVXPGGB.js +0 -11
  377. package/dist/chunk-LU6NA4RU.js +0 -5
  378. package/dist/chunk-M4K6FLIY.js +0 -1
  379. package/dist/chunk-PJQGYKN6.js +0 -11
  380. package/dist/chunk-PN5FQVMB.js +0 -7
  381. package/dist/chunk-PN65IIYN.js +0 -8
  382. package/dist/chunk-PUF75SMJ.js +0 -1
  383. package/dist/chunk-Q6YNMNUH.js +0 -6
  384. package/dist/chunk-RPYFOQM2.js +0 -6
  385. package/dist/chunk-RRUHQLUY.js +0 -14
  386. package/dist/chunk-TMNAHOJ7.js +0 -9
  387. package/dist/chunk-UBMY23AG.js +0 -6
  388. package/dist/chunk-VNACNNCJ.js +0 -19
  389. package/dist/chunk-W35N7SL3.js +0 -8
  390. package/dist/chunk-W4OBVKN4.js +0 -1
  391. package/dist/chunk-WMEYNKXZ.js +0 -22
  392. package/dist/chunk-Y3R267FV.js +0 -15
  393. package/dist/chunk-ZZVE64OI.js +0 -2
  394. /package/dist/{chunk-6V6ANLHW.js → chunk-Y2AGVGOP.js} +0 -0
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export{APP_VERSION,VERSION}from"./chunk-W4OBVKN4.js";
1
+ export{APP_VERSION,VERSION}from"./chunk-RAAH4TQU.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "10.16.0",
3
+ "version": "10.17.1",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-TM33D3CE.js";import{useWidgetSettings as n}from"./chunk-7HTRLRVO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import"./chunk-XZGGJHJC.js";import"./chunk-LU6NA4RU.js";import"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-N3TOHWFF.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-UGTRSRIW.js";import"./chunk-7TNAOZZ2.js";import"./chunk-CDAJKLGL.js";import"./chunk-4WEFGKJL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as r}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[N,j]=c(!1),[y,x]=c(""),[f,C]=c([]),[v,$]=c(!1),[T,E]=c(()=>e(h)),[W,U]=c(!1),[J,F]=c(T),X=i(null);n(l(()=>{F({...T}),U(!0)},[T]));const w=l(e=>{x(""),k(t=>N||"0"===t?(j(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),D=l(()=>{k("0"),d(null),g(null),j(!1)},[]),R=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),A=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!N){const e=R(p,t,b);k(String(e)),d(e),C(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),j(!0)},[m,p,b,N,R]),M=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=R(p,e,b),n=`${p} ${b} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),j(!0)},[m,p,b,R]),G=l(()=>{k(e=>String(parseFloat(e)/100))},[]),H=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?w(e.key):"."===e.key?w("."):"+"===e.key?A("+"):"-"===e.key?A("-"):"*"===e.key?A("×"):"/"===e.key?(e.preventDefault(),A("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&X.current?.contains(e.target)&&e.preventDefault(),M()):"Escape"===e.key?D():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&G())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[w,A,M,D,G]);const S="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",L=`${S} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,O=`${S} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,Q=`${S} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Z=`${S} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return s(a,{children:[
3
- /* @__PURE__ */s("div",{ref:X,className:"flex flex-col h-full",style:{opacity:T.activeOpacity/100,backdropFilter:T.activeBlur>0?`blur(${T.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */s("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:f.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${N?"":m}`}),
6
- /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
- /* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:D,className:Q,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:H,className:Q,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:G,className:Q,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>A("÷"),className:`${O} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>w("7"),className:L,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>w("8"),className:L,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>w("9"),className:L,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>A("×"),className:`${O} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>w("4"),className:L,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>w("5"),className:L,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>w("6"),className:L,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>A("-"),className:`${O} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>w("1"),className:L,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>w("2"),className:L,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>w("3"),className:L,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>A("+"),className:`${O} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>w("0"),className:`${L} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>w("."),className:L,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:M,className:Z,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:W,onClose:()=>U(!1),title:"Calculator Settings",appearance:J,onAppearanceChange:F,onSave:()=>{E(J),localStorage.setItem(h,JSON.stringify(J)),U(!1)}})]})}export{m as default};
@@ -1,88 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-MCDM2G4W.js";import{SidebarLayout as t}from"./chunk-FEQDZTZ7.js";import"./chunk-QWK6DRSN.js";import"./chunk-DRDYZ633.js";import{Breadcrumbs as a}from"./chunk-3AH524CN.js";import{formatBytes as n}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as r}from"./chunk-U2RFKQVA.js";import{AboutApp as i}from"./chunk-S6FBMSFU.js";import{peekFilesViewRequest as s,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as c,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-E5QPXEKN.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-7HTRLRVO.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-EXJXOKUU.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-F2R3UFNQ.js";import{confirm as g,prompt as k}from"./chunk-XZGGJHJC.js";import"./chunk-LU6NA4RU.js";import"./chunk-KC3EX26K.js";import{ItemCount as b}from"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-N3TOHWFF.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import{toast_default as N}from"./chunk-AKM6JBMD.js";import"./chunk-UGTRSRIW.js";import"./chunk-7TNAOZZ2.js";import"./chunk-CDAJKLGL.js";import"./chunk-W4OBVKN4.js";import"./chunk-4WEFGKJL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as y}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as w}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import{TH_ONE_LINE as v}from"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useState as j,useEffect as $,useSyncExternalStore as C,useRef as D,useCallback as T}from"react";import{jsxs as E,jsx as L,Fragment as R}from"react/jsx-runtime";var W="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",F={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function U(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function M(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function P(){const P=W.replace(/\/$/,""),S=null!==r(),[A,O]=j("/"),[I,J]=j([]),[V,H]=j([]),[K,B]=j(null),[Q,X]=j(!0),[G,Z]=j(!1),[z,Y]=j(null),[_,q]=j(!1),[ee,te]=j(()=>{const e=s();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});$(()=>{o()},[]);const[ae,ne]=j([]);$(()=>{const e=()=>{o(),te("trash")},t=e=>{o();const t=e.detail?.folderId;t&&te({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(c,t),()=>{window.removeEventListener(l,e),window.removeEventListener(c,t)}},[]);const re=C(d,m,m),ie="object"==typeof ee?ee.desktopFolderId:null,se=ie?re?.folders.find(e=>e.id===ie)??null:null,oe=ie&&re?.itemsByFolder[ie]||[];$(()=>{ie&&re&&!re.folders.some(e=>e.id===ie)&&te("files")},[ie,re]);const le=D(0),ce=D(null),{openPage:de,openEntity:me}=f(),he=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>de(e)}):"page"===t.entityType?de(t.entityId):me(t.entityType,t.entityId,null,t.label)},pe=T((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),ue=T(async()=>{try{const e=await pe(`${P}/api/quota`);if(e.ok){const t=await e.json();Y({used:t.used,limit:t.limit})}}catch{}},[pe,P]),fe=T(async e=>{if(B(null),S){const t=function(e){const t=r();if(!t)return[];let a=t;for(const t of e.split("/").filter(Boolean)){const e=a.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];a=e.children}return a.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return J(t),O(e),Z(!1),X(!1),void("/"===e&&H(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}X(!0);try{const t=await pe(`${P}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void N.error(e.error||`Failed to list (${t.status})`)}const a=await t.json(),n=a.entries||[];J(n),O(a.path||e),Z(!1),"/"===(a.path||e)&&H(n.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){Z(!0)}finally{X(!1)}ue()},[pe,P,ue,S]),xe=T(async()=>{if(S)return ne([]),void X(!1);X(!0),B(null);try{const e=await pe(`${P}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void N.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();ne(t.entries||[]),Z(!1)}catch{Z(!0)}finally{X(!1)}ue()},[pe,P,ue,S]);$(()=>{"files"===ee?fe(A):"trash"===ee&&xe()},[A,ee]);const ge=async e=>{const t=U(A,e.name);try{const a=await pe(`${P}/api/file?path=${encodeURIComponent(t)}`);if(!a.ok)return void N.error(`Download failed (${a.status})`);const n=await a.blob(),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=e.name,i.click(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}catch(e){N.error(e?.message||"Download failed")}},ke=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const a=await pe(`${P}/api/upload?path=${encodeURIComponent(A)}`,{method:"POST",body:t});if(!a.ok){const t=await a.json().catch(()=>({}));if(413===a.status){const a=Math.max(0,(t.limit||0)-(t.used||0));N.error(`Quota exceeded — ${n(a)} free, ${e.name} is ${n(t.attempted||e.size)}`)}else N.error(`Upload ${e.name}: ${t.error||a.status}`)}}catch(t){N.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}fe(A)},be=()=>{le.current=0,q(!1)};if($(()=>{const e=()=>be();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),G)/* @__PURE__ */
2
- return E("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */L(x,{title:"Files - offline"}),
4
- /* @__PURE__ */L("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */E("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */L(y,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
6
- /* @__PURE__ */L("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
7
- /* @__PURE__ */E("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
8
- /* @__PURE__ */L("span",{className:"font-mono",children:P}),". Make sure the server is running — see ",
9
- /* @__PURE__ */L("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
10
- /* @__PURE__ */L("button",{onClick:()=>fe(A),className:"px-3 h-8 text-sm bg-blue-500 text-on-accent rounded hover:bg-blue-600",children:"Retry"})]})})]});const Ne="/"===A?[]:A.split("/").filter(Boolean),ye=z&&z.limit>0?Math.min(100,Math.round(z.used/z.limit*100)):0,we=ye>90?"bg-red-500":ye>75?"bg-amber-500":"bg-blue-500",ve=[{label:"My files",onClick:()=>O("/")},...Ne.map((e,t)=>({label:e,onClick:()=>O("/"+Ne.slice(0,t+1).join("/"))}))],je=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),$e=e=>/* @__PURE__ */L("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */L("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),Ce=/* @__PURE__ */E("nav",{className:"p-2",children:[
11
- /* @__PURE__ */L("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Locations"}),
12
- /* @__PURE__ */E("button",{onClick:()=>{te("files"),O("/")},className:je("files"===ee&&"/"===A),children:[$e("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),V.map(e=>/* @__PURE__ */E("button",{onClick:()=>{te("files"),O("/"+e)},className:je("files"===ee&&A==="/"+e),children:[$e("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
13
- /* @__PURE__ */L("span",{className:"truncate",children:e})]},e)),!S&&/* @__PURE__ */E("button",{onClick:()=>te("trash"),className:je("trash"===ee),children:[$e("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),re&&re.folders.length>0&&/* @__PURE__ */E(R,{children:[
14
- /* @__PURE__ */L("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),re.folders.map(e=>/* @__PURE__ */E("button",{onClick:()=>te({desktopFolderId:e.id}),className:je(ie===e.id),children:[
15
- /* @__PURE__ */L(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
16
- /* @__PURE__ */L("span",{className:"truncate",children:e.name}),
17
- /* @__PURE__ */L(b,{count:e.itemCount,active:ie===e.id,className:"ml-auto"})]},e.id))]})]});/* @__PURE__ */
18
- return E("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{S||"object"==typeof ee||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),le.current++,_||q(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{le.current>0&&le.current--,0===le.current&&q(!1)},onDrop:e=>{e.preventDefault(),be(),S||"object"==typeof ee||e.dataTransfer.files?.length&&ke(e.dataTransfer.files)},children:[
19
- /* @__PURE__ */L(x,{title:se?`Files - ${se.name}`:"Files"+("/"===A?"":" - "+A)}),
20
- /* @__PURE__ */L(i,{app:"files"}),
21
- /* @__PURE__ */L("input",{ref:ce,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ke(e.target.files),ce.current&&(ce.current.value="")}}),
22
- /* @__PURE__ */L("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */L(t,{sidebar:Ce,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */E("div",{className:"flex h-full min-w-0 flex-col",children:[
23
- /* @__PURE__ */E("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0 text-xs",children:[/* @__PURE__ */E(R,"files"===ee?{children:[
24
- /* @__PURE__ */L("button",{onClick:()=>O(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),a=t.lastIndexOf("/");return a<=0?"/":t.slice(0,a)}(A)),disabled:"/"===A,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */L(y,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
25
- /* @__PURE__ */L("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */L(a,{items:ve,maxItems:5})}),
26
- /* @__PURE__ */L("button",{onClick:()=>fe(A),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */L(y,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!S&&/* @__PURE__ */E(R,{children:[
27
- /* @__PURE__ */E("button",{onClick:()=>te("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
28
- /* @__PURE__ */L(y,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
29
- /* @__PURE__ */E("button",{onClick:async()=>{const e=await k({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void N.error("Folder names cannot contain slashes");const t=U(A,e),a=await pe(`${P}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!a.ok){const e=await a.json().catch(()=>({}));return void N.error(e.error||`Create folder failed (${a.status})`)}fe(A)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
30
- /* @__PURE__ */L(y,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
31
- /* @__PURE__ */E("button",{onClick:()=>ce.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
32
- /* @__PURE__ */L(y,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===ee?{children:[
33
- /* @__PURE__ */L("button",{onClick:()=>te("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */L(y,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
34
- /* @__PURE__ */L("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
35
- /* @__PURE__ */L("button",{onClick:xe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */L(y,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
36
- /* @__PURE__ */L("button",{onClick:async()=>{if(0===ae.length)return;if(!await g({title:"Empty trash",message:`${ae.length} item${1===ae.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await pe(`${P}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void N.error(t.error||`Empty trash failed (${e.status})`)}xe()},disabled:0===ae.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
37
- /* @__PURE__ */L("button",{onClick:()=>te("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */L(y,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
38
- /* @__PURE__ */L(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
39
- /* @__PURE__ */L("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
40
- /* @__PURE__ */L("span",{className:"text-2xs text-ink-faintest px-2",children:"Desktop shortcuts"})]}),z&&/* @__PURE__ */E(R,{children:[
41
- /* @__PURE__ */L("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
42
- /* @__PURE__ */E("div",{className:"flex items-center gap-2",title:`${n(z.used)} of ${n(z.limit)} used`,children:[
43
- /* @__PURE__ */L("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */L("div",{className:`h-full ${we} transition-all`,style:{width:`${ye}%`}})}),
44
- /* @__PURE__ */E("span",{className:"text-2xs text-ink-faint tabular-nums whitespace-nowrap",children:[n(z.used)," / ",n(z.limit)]})]})]})]}),
45
- /* @__PURE__ */L("div",{className:"flex-1 overflow-auto",children:"object"==typeof ee?0===oe.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */E("table",{className:"w-full text-sm",children:[
46
- /* @__PURE__ */L("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */E("tr",{children:[
47
- /* @__PURE__ */L("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
48
- /* @__PURE__ */L("th",{className:`${v} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
49
- /* @__PURE__ */L("th",{className:`${v} w-56`})]})}),
50
- /* @__PURE__ */L("tbody",{children:oe.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
51
- return E("tr",{onClick:()=>B(t),onDoubleClick:()=>he(e),className:"cursor-default border-b border-gray-100 "+(K===t?"bg-blue-50":"hover:bg-gray-50"),children:[
52
- /* @__PURE__ */E("td",{className:"px-3 h-8 flex items-center gap-2",children:[
53
- /* @__PURE__ */L(p,{item:e}),
54
- /* @__PURE__ */L("span",{className:"truncate",title:e.label,children:e.label})]}),
55
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-xs text-ink-faint",children:u(e)}),
56
- /* @__PURE__ */E("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
57
- /* @__PURE__ */L("button",{onClick:t=>{t.stopPropagation(),he(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
58
- /* @__PURE__ */L("button",{onClick:t=>{t.stopPropagation(),re?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs ml-1",children:"Move to desktop"}),
59
- /* @__PURE__ */L("button",{onClick:t=>{t.stopPropagation(),re?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===ee?Q&&0===ae.length?/* @__PURE__ */L(w,{size:"sm",padding:"p-6",label:"Loading"}):0===ae.length?/* @__PURE__ */L("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */E("table",{className:"w-full text-sm",children:[
60
- /* @__PURE__ */L("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */E("tr",{children:[
61
- /* @__PURE__ */L("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
62
- /* @__PURE__ */L("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Original location"}),
63
- /* @__PURE__ */L("th",{className:`${v} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
64
- /* @__PURE__ */L("th",{className:`${v} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
65
- /* @__PURE__ */L("th",{className:`${v} w-44`})]})}),
66
- /* @__PURE__ */L("tbody",{children:ae.map(e=>/* @__PURE__ */E("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
67
- /* @__PURE__ */E("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */L(y,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */L(y,{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),
68
- /* @__PURE__ */L("span",{className:"truncate",title:e.name,children:e.name})]}),
69
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-ink-faint text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
70
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:n(e.size)}),
71
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:e.deletedAt?M(e.deletedAt):"—"}),
72
- /* @__PURE__ */E("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
73
- /* @__PURE__ */L("button",{onClick:()=>(async e=>{const t=await pe(`${P}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void N.error(e.error||`Restore failed (${t.status})`)}N.success(`Restored "${e.name}"`),xe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
74
- /* @__PURE__ */L("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await pe(`${P}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void N.error(e.error||`Delete failed (${t.status})`)}xe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):Q&&0===I.length?/* @__PURE__ */L(w,{size:"sm",padding:"p-6",label:"Loading"}):0===I.length?/* @__PURE__ */E("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!S&&/* @__PURE__ */E(R,{children:[" Drop files here or click ",
75
- /* @__PURE__ */L("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */E("table",{className:"w-full text-sm",children:[
76
- /* @__PURE__ */L("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */E("tr",{children:[
77
- /* @__PURE__ */L("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
78
- /* @__PURE__ */L("th",{className:`${v} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
79
- /* @__PURE__ */L("th",{className:`${v} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
80
- /* @__PURE__ */L("th",{className:`${v} w-32`})]})}),
81
- /* @__PURE__ */L("tbody",{children:I.map(t=>/* @__PURE__ */E("tr",{onClick:()=>B(t.name),onDoubleClick:()=>{"folder"===t.kind?O(U(A,t.name)):(async t=>{if(S)return;const a=U(A,t.name),n=(t.name.split(".").pop()||"").toLowerCase(),r=F[n];r?await e({filePath:a,filename:t.name,kind:r,onStaged:e=>de(e)}):ge(t)})(t)},className:"cursor-default border-b border-gray-100 "+(K===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
82
- /* @__PURE__ */E("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */L(y,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */L(y,{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),
83
- /* @__PURE__ */L("span",{className:"truncate",title:t.name,children:t.name})]}),
84
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:"folder"===t.kind?"—":n(t.size)}),
85
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:M(t.modifiedAt)}),
86
- /* @__PURE__ */L("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!S&&/* @__PURE__ */E(R,{children:["file"===t.kind&&/* @__PURE__ */L("button",{onClick:e=>{e.stopPropagation(),ge(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs",children:"Download"}),
87
- /* @__PURE__ */L("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await k({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void N.error("Names cannot contain slashes");const a=U(A,e.name),n=U(A,t),r=await pe(`${P}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:a,to:n})});if(!r.ok){const e=await r.json().catch(()=>({}));return void N.error(e.error||`Rename failed (${r.status})`)}fe(A)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs ml-1",children:"Rename"}),
88
- /* @__PURE__ */L("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=U(A,e.name),a=await pe(`${P}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!a.ok){const e=await a.json().catch(()=>({}));return void N.error(e.error||`Delete failed (${a.status})`)}fe(A)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),_&&/* @__PURE__ */L("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */L("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{P as default};
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-ZTV2BA3P.js";import{ResizeHandle as o}from"./chunk-DRDYZ633.js";import{openGlobalSearch as s}from"./chunk-ISJPW2FZ.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-PUF75SMJ.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as y,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as j,navIcons as w,sectionIcons as C}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-7QSDPSXP.js";import{PopupMenu as S,PopupMenuItem as W,PopupMenuDivider as L,PopupMenuLabel as z}from"./chunk-4WEFGKJL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as $}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as A}from"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useMemo as I,useState as M,useRef as R,useEffect as H,isValidElement as J,cloneElement as T}from"react";import{jsx as P,jsxs as U,Fragment as B}from"react/jsx-runtime";var D="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function K(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var Q=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),F="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function X({open:e,children:t}){const r=R(null);return H(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */P("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */P("div",{className:"min-h-0 overflow-hidden",children:t})})}function O({open:e}){/* @__PURE__ */
2
- return P($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function Z({dir:e}){/* @__PURE__ */
3
- return P($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function _({className:e}){/* @__PURE__ */
4
- return P($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var G=e=>.75+1.75*e+"rem";function V({width:V,collapsed:Y,onToggleCollapsed:E,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=w,sectionIcons:me=C,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ye=A().layout,{hasAnyPerm:ke}=e(),ve=I(()=>c(ce,he,ke),[ce,he,ke]),[Ne,je]=M(()=>t(r(n))),we=I(()=>[...ve.topItems.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ke]),Ce=(e,t=we)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,We]=M(null),[Le,ze]=M(!1),$e=R(null);H(()=>{Y||We(null)},[Y]);const Ae=(e,t)=>{We(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ie=(e,t)=>{const r=t[e];/* @__PURE__ */
5
- return P("span",{className:F,"aria-hidden":"true",children:r&&J(r)?T(r,{className:"size-[18px]"}):r})},Me=e=>e.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),Re=(e,t,r=we)=>{const n=d(e,ke),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ke);/* @__PURE__ */
6
- return U("div",{children:[
7
- /* @__PURE__ */U("button",{type:"button",onClick:()=>Ce(i,r),"aria-expanded":l,className:Q(o,!1),style:t>0?{paddingLeft:G(t)}:void 0,children:[0===t&&Ie(e.to,de),
8
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:a}),
9
- /* @__PURE__ */P(O,{open:l})]}),
10
- /* @__PURE__ */P(X,{open:l,children:/* @__PURE__ */P("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Re(e,t+1,Me(n)))})}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:G(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
11
- return U("div",{children:[
12
- /* @__PURE__ */U("button",{type:"button",onClick:t=>Ae(e,t),onAuxClick:t=>{1===t.button&&Ae(e,t)},"aria-current":i?"page":void 0,className:Q(i,!1),style:t>0?{paddingLeft:G(t)}:void 0,children:[0===t&&Ie(e.to,de),
13
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:G(t)},"aria-hidden":"true"})]},e.to)},He=(e,t)=>{const r=t?e.items:h(e,ke);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */P("span",{className:F,"aria-hidden":"true",children:e.icon}):Ie(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ke),l="dividerAfter"in e&&e.dividerAfter;if(Y)/* @__PURE__ */
14
- return U("div",{children:[
15
- /* @__PURE__ */P("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();We(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:Q(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
16
- return U("div",{children:[
17
- /* @__PURE__ */U("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:Q(!o&&i,!1),children:[n,
18
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:a}),
19
- /* @__PURE__ */P(O,{open:o})]}),
20
- /* @__PURE__ */P(X,{open:o,children:/* @__PURE__ */P("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>Re(e,1,Me(r)))})}),l&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Je=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",Te=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),Pe=ne?.avatar_url?/* @__PURE__ */P("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */P("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Te}),Ue=Le?$e.current?.getBoundingClientRect():void 0,Be=Y?"":"px-3",De=Y?{paddingInline:k}:void 0,Ke=`${Y?ye.expandSidebar:ye.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,Qe=ee?{run:ee,label:ye.goHome,title:ye.goHome}:se?null:{run:E,label:Y?ye.expandSidebar:ye.collapseSidebar,title:Ke},Fe=/* @__PURE__ */U(B,{children:[pe&&/* @__PURE__ */P(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!Y&&/* @__PURE__ */U("span",{className:"min-w-0 text-left leading-tight",children:[
21
- /* @__PURE__ */P("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */P("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Xe=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
22
- return U("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:V},children:[
23
- /* @__PURE__ */U("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Y?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:y},children:[Qe?/* @__PURE__ */P("button",{type:"button",onClick:Qe.run,"aria-label":Qe.label,title:Qe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Y?"justify-center p-0.5":"-ml-1 p-1"),children:Fe}):/* @__PURE__ */P("span",{className:"flex min-w-0 items-center gap-2",children:Fe}),se?/* @__PURE__ */P(b,{onClick:se,"aria-label":ye.closeMenu,children:/* @__PURE__ */P($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Y&&/* @__PURE__ */P("button",{type:"button",onClick:E,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */P(Z,{dir:"left"})})]}),
24
- /* @__PURE__ */P("div",{className:`shrink-0 pt-3 ${Be}`,style:De,children:Y?/* @__PURE__ */P("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${D?"⌘K":"Ctrl K"})`,className:Q(!1,!0),children:/* @__PURE__ */P(_,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */U("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */P(_,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ye.search}),
27
- /* @__PURE__ */P("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:D?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */U("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Be} ${Y?"space-y-1":"space-y-0.5"}`,style:De,children:[Y&&/* @__PURE__ */P("button",{type:"button",onClick:E,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${D?"⌘":"Ctrl"} .)`,className:`${Q(!1,!0)} mb-3`,children:/* @__PURE__ */P(Z,{dir:"right"})}),ve.topItems.map(e=>{if(!Y)return Re(e,0);const t=d(e,ke),r=e.to===re||u(t,re,ke),n=e.menuLabel??e.label;/* @__PURE__ */
29
- return U("div",{children:[
30
- /* @__PURE__ */P("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Ae(e,r);const n=r.currentTarget.getBoundingClientRect();We(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:Q(r,!0),children:Ie(e.to,de)}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Xe&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>He(e,!1)),ve.systemSections.map(e=>He(e,!1)),ve.virtualSections.map(e=>He(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>He(e,!1))]}),
31
- /* @__PURE__ */P("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Be}`,style:De,children:/* @__PURE__ */U("button",{ref:$e,type:"button",onClick:()=>ze(e=>!e),"aria-haspopup":"menu","aria-expanded":Le,"aria-label":Y?ye.accountMenu(Je):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Y?"justify-center py-2":"px-2 py-2"),children:[Pe,!Y&&/* @__PURE__ */U("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */P("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Je}),ae?.email&&Je!==ae.email&&/* @__PURE__ */P("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!Y&&!se&&/* @__PURE__ */P(o,{side:"left",width:V,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ye.resizeSidebar}),Le&&Ue&&/* @__PURE__ */U(S,{portal:!0,minWidth:224,onClose:()=>ze(!1),style:K(V,Ue,window.innerHeight),children:[Y&&/* @__PURE__ */U("div",{className:"border-b border-line px-3 py-3",children:[
33
- /* @__PURE__ */P("p",{className:"truncate text-sm font-semibold text-gray-800",children:Je}),ae?.email&&/* @__PURE__ */P("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
34
- /* @__PURE__ */U(W,{onClick:()=>{ze(!1),te("/profile",!1)},children:[
35
- /* @__PURE__ */P($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ve.footerItems.map(e=>/* @__PURE__ */U(W,{onClick:()=>{ze(!1),Ae(e)},children:[
36
- /* @__PURE__ */P("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */U(W,{onClick:()=>{ze(!1),oe()},children:[
37
- /* @__PURE__ */P($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
38
- /* @__PURE__ */P(L,{}),le&&/* @__PURE__ */U(B,{children:[
39
- /* @__PURE__ */U(W,{onClick:()=>{ze(!1),le()},children:[
40
- /* @__PURE__ */P($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
41
- /* @__PURE__ */P(L,{})]}),
42
- /* @__PURE__ */U(W,{danger:!0,onClick:()=>{ze(!1),ie()},children:[
43
- /* @__PURE__ */P($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),Se&&Y&&/* @__PURE__ */P(S,{portal:!0,minWidth:220,onClose:()=>We(null),style:{left:V+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ke).map((e,t)=>/* @__PURE__ */U("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */P(L,{}),e.heading&&/* @__PURE__ */P(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */U(W,{onClick:()=>Ae(e),children:[Ie(e.to,de),
44
- /* @__PURE__ */P("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{K as accountMenuPosition,V as default};
@@ -1,8 +0,0 @@
1
- import{DragBand as e,tooltipBesideBand as t}from"./chunk-QP4UPCXQ.js";import{niceAxis as r,niceMax as i,linearScale as n,axisGutter as o,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-4PAWQEXM.js";import{formatPlain as d}from"./chunk-C3QOHMR6.js";import{useRef as u,useState as f,useId as g,useEffect as p}from"react";import{jsx as x,jsxs as y}from"react/jsx-runtime";function v({labels:v,values:b,height:k=220,width:M,bandPadding:w=.24,min:A,max:N,yTickCount:P=4,formatValue:$,yAxisLabel:j,xTickAnchor:E="center",children:U,overlay:R,tooltip:z,onSelect:C,zoom:D,ariaLabel:L,className:Q,emptyLabel:S}){const W=c().charts,F=m(),I=$??(e=>d(e,F)),T=S??W.noData,V=u(null),X=a(V),B=M??X,[Z,H]=f(null),J=g();if(p(()=>{if(null!==Z)return s(e=>"Escape"===e.key&&(H(null),!0))},[Z]),0===v.length||!b.some(Number.isFinite))/* @__PURE__ */
2
- return x("div",{className:Q,ref:V,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:T})});const K=b.filter(Number.isFinite),O=K.every(Number.isInteger),q=void 0===A&&void 0===N?r(Math.min(0,...K),Math.max(0,...K),{intervals:P+1,integer:O}):null,G=void 0!==A&&void 0===N?r(A,Math.max(A,...K),{intervals:P+1,integer:O,zero:!1}):null,Y=q?q.lo:A??Math.min(0,...K),_=q?q.hi:G?G.hi:N??i(Math.max(...K,0)),ee=q?q.ticks:G?[Y,...G.ticks.filter(e=>e>Y)]:n([Y,_],{from:0,to:1}).ticks(P+1),te={top:12,right:16,bottom:26,left:o(ee.map(I),48)+(j?10:0)},re=te.left,ie=Math.max(re+1,B-te.right),ne=te.top,oe=k-te.bottom,le=n([Y,_],{from:oe,to:ne}),ae=l(v.length,{from:re,to:ie},w),he=(ie-re)/Math.max(1,v.length),se=he>=48,ce=se?1:Math.max(1,Math.ceil(v.length/Math.max(1,Math.floor(B/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 ${Q??""}`,ref:V,children:[
4
- /* @__PURE__ */y("svg",{width:"100%",height:k,viewBox:`0 0 ${B} ${k}`,role:"img","aria-label":L,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>H(null),onBlur:()=>H(null),onKeyDown:e=>{if(C&&null!==Z&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void C(Z);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;H(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:D?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
5
- /* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:J,children:/* @__PURE__ */x("rect",{x:re,y:ne,width:ie-re,height:oe-ne})})}),ee.map(e=>/* @__PURE__ */x("line",{x1:re,y1:le(e),x2:ie,y2:le(e),stroke:h.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
6
- /* @__PURE__ */x("line",{x1:re,y1:le(Math.max(Y,0)),x2:ie,y2:le(Math.max(Y,0)),stroke:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:I(e)},`t${e}`)),j&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:j}),
7
- /* @__PURE__ */x("g",{clipPath:`url(#${J})`,children:U({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:B,height:k,clipId:J,active:Z})}),R?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:B,height:k,clipId:J,active:Z}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===E?ae(t):ae.center(t),y:k-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),D?.drag&&/* @__PURE__ */x(e,{x0:ae.center(D.drag[0])-(ie-re)/v.length/2,x1:ae.center(D.drag[1])+(ie-re)/v.length/2,top:ne,bottom:oe}),v.map((e,t)=>/* @__PURE__ */x("rect",{x:ae.center(t)-(ie-re)/v.length/2,y:ne,width:(ie-re)/v.length,height:oe-ne,fill:"transparent",onMouseEnter:()=>H(t),onPointerDown:D?()=>D.press(t):void 0,onPointerEnter:D?()=>D.over(t):void 0,onPointerUp:D?.release,onClick:C?()=>C(t):void 0,style:C?{cursor:"pointer"}:void 0},`h${t}`))]}),z&&null!==Z&&
8
- /* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(Z),ae.bandwidth,B),children:z(Z)})]})}export{v as CartesianPlot};
@@ -1 +0,0 @@
1
- import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",edit:"Edit",discard:"Discard",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",clearAll:"Clear all",changed:"Changed",selectedCount:e=>`${n(e)} selected`,remove:"Remove"},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",byActor:e=>`by ${e}`,cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",favorite:"Favorite",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",groupToggle:(e,o)=>`${e}: ${n(o)} ${1===o?"tab":"tabs"}`,discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value",discardTitle:"Discard changes?",discardMessage:e=>e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",discardConfirm:"Discard",keepEditing:"Keep Editing"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",lastHeading:"Last",last2WeeksShort:"2 weeks",lastMonthShort:"Month",last3MonthsShort:"3 months",last6MonthsShort:"6 months",last12MonthsShort:"12 months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading",choosing:"Choosing",pickFailed:"The library could not be opened. Try again.",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`,image:"Image",video:"Video",changeImage:"Change image",changeVideo:"Change video",focus:"Image focus",usedIn:e=>`Used in ${n(e)} ${1===e?"place":"places"}`,notUsed:"Not used anywhere",moveTo:(e,o)=>{const t="image"===o?"image":"video"===o?"video":"file";return`Move ${n(e)} ${t}${1===e?"":"s"} to`},moveNowhere:"There is no folder to move to",moveToMenu:"Move to",files:"Files"},mediaLibrary:{products:"Products",allFiles:"All files",trash:"Trash",readOnlyBadge:"Read-only",folders:"Folders",readOnly:"Read-only. Edit these pictures in Products > Design > Media.",editedAtHq:e=>`Edited at HQ (${e}).`,readOnlyMenu:"Read-only · edited in Products > Design > Media",noProductFolder:"Products folders come from brand > design > finish. You cannot make a folder here.",noDropProducts:"Read-only. You cannot move or upload files into Products.",newFolder:"New folder",newSubfolder:"New subfolder",folderName:"Folder name",fileName:"File name",folderActions:"Folder actions",upload:"Upload",rename:"Rename",moveTo:"Move to",moveToTrash:"Move to Trash",deleteFolder:"Delete folder",folderNotEmpty:"Only an empty folder can be deleted. Move or delete what is in it first.",moveFilesToTrash:e=>`Move ${n(e)} files to Trash`,filesSelected:e=>`${n(e)} files selected`,fileCount:e=>`${n(e)} ${1===e?"file":"files"}`,selected:e=>`${n(e)} selected`,clearSelection:"Clear selection",selectAll:"Select all",replace:"Replace",cropEdit:"Crop & edit",copyUrl:"Copy URL",fileUrl:"File URL",urlLabel:"URL",openOriginal:"Open original",openInDesign:"Open in Design",restore:"Restore",deleteForever:"Delete forever",emptyTrash:"Empty trash",search:"Search file name",searchProducts:"Search design, finish, part number",mediaType:"Media type",allTypes:"All types",images:"Images",videos:"Videos",use:"Use",anyUse:"Any use",emailOnly:"Email only",websiteOnly:"Website only",notUsed:"Not used",sort:"Sort",newest:"Newest",byName:"Name",bySize:"Size",view:"View",grid:"Grid",list:"List",used:e=>`Used ${n(e)}`,email:"Email",private:"Private",daysAgo:e=>1===e?"1 day ago":`${n(e)} days ago`,details:"Details",name:"Name",type:"Type",size:"Size",resolution:"Resolution",addedBy:"Added by",folder:"Folder",usedIn:"Used in",places:e=>`${n(e)} ${1===e?"place":"places"}`,design:"Design",finish:"Finish",angleLug:"Angle · Lug",owner:"Owner",emptyProducts:"No pictures here yet",trashEmpty:"Trash is empty.",noMatches:"No matches.",emptyFolder:"No files in this folder yet.",oneChosen:e=>`1 selected · ${e}`,noneChosen:"Nothing selected",cancel:"Cancel",chooseImage:"Choose image",privateNoPick:"A private file cannot be used here.",alreadyHere:"The files are already here",folderAlreadyHere:"The folder is already here",notIntoItself:"A folder cannot go inside itself"},lightbox:{label:"Preview",close:"Close preview",previous:"Previous",next:"Next",counter:(e,o)=>`${n(e)} / ${n(o)}`,openOriginal:"Open original",openFile:"Open file"},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},transfer:{uploading:"Uploading",error:"Error",retry:"Retry",dismiss:"Dismiss",cancel:"Cancel",cancelVerb:e=>`Cancel ${e}`},count:{items:e=>`${n(e)} ${1===e?"item":"items"}`,tabs:e=>`${n(e)} ${1===e?"tab":"tabs"}`,windows:e=>`${n(e)} ${1===e?"window":"windows"}`},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset",sections:"Sections",closeSections:"Close sections"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},accordion:{changed:e=>`${e} changed`},settingView:{auto:"auto",edited:"Changed in this view",resetName:e=>`Reset ${e}`,inheritName:e=>`Inherit parent layout for ${e}`,inheritParentLayout:"Inherit parent layout",backToDefault:"back to the site default",backToAuto:"back to auto",backTo:e=>`back to ${e}`,tip:(e,o)=>`${e} (${o})`,viewDesktop:"Desktop",viewTablet:"Tablet",viewPhone:"Phone"},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},corners:{radius:"Corner radius",unit:"px",radiusMark:"R"},iconPicker:{button:(e,o)=>`${e}: ${o}`},iconNames:{none:"None","arrow-right":"Arrow","arrow-long-right":"Long arrow","arrow-up-right":"Arrow up right","chevron-right":"Chevron",external:"External",cart:"Cart",bag:"Bag",tag:"Tag",email:"Email",location:"Location",play:"Play",download:"Download",search:"Search",car:"Car"},widths:{column:e=>`Column ${e}`,divider:(e,o)=>`Divider between column ${e} and column ${o}`,dividerValue:(e,o,t,a)=>`Column ${e} ${l(o,0)}, column ${t} ${l(a,0)}`,dragHint:"Drag to change the widths",hint:(e,o)=>`Type a width or drag a line. No column goes below ${l(o,0)}.`,equal:"equal widths"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",opacity:e=>`${e} opacity`,hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},link:{linkType:"Link type",address:"Link address",addressPlaceholder:"Link (e.g. /wheels or https://…)",unsafe:"Use a web address (https://…), a page on this site (/…), mailto: or tel:.",unavailable:e=>`${e} (unavailable)`,filter:"Filter",noFilter:"No filter (all products)",value:"Value",filterHint:"Filters come from Product Types. Only values in this site's catalogue are listed.",title:"Link",apply:"Apply",cancel:"Cancel",remove:"Remove",addLink:"Add a link",text:e=>`${e} text`,linkOf:(e,o)=>`${e} link: ${o||"none"}`},textToolbar:{formatting:"Formatting",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",color:"Color",link:"Link",sup:"Superscript",sub:"Subscript",code:"Code",alignment:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",alignJustify:"Justify",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",letterCase:"Letter case",caseNone:"As typed",caseUpper:"Uppercase",caseLower:"Lowercase",clear:"Clear formatting"},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",goHome:"Go to Home",resizeSidebar:"Resize sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",favoriteApps:"Favorite apps",openFavorite:e=>`Open ${e}`,removeFavorite:"Remove from Favorites",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in.",openMenu:"Open menu",closeMenu:"Close menu",openTabs:"Open tabs",getTheApp:e=>`Get the ${e} app`,openApp:"Open",dismiss:"Dismiss",deviceUsesSidebar:"This device always uses the Sidebar layout. Your choice still applies when you sign in on a computer.",largerScreensOnly:"Larger screens only",usedOnThisDevice:"Used on this device",back:"Back"},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,legendWarning:"warning",legendCritical:"critical",noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",pace:"expected by now",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,zoomRange:(e,o,t)=>`${e} – ${o} · ${n(t)} ${1===t?"interval":"intervals"}`,zoomClear:"Clear",zoomLevel:(e,o)=>`${e} avg · ${o} peak`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,chordFolded:e=>`+${n(e)} more in Other`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification",undo:"Undo"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading"},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,spreadsheet:"Multi-sheet spreadsheet editor with CSV / TSV import and export.",notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",documents:"Letter-page editor for Word documents and plain-text files — images, lists, alignment.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(m.has(e)||(m.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,$=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};
@@ -1,29 +0,0 @@
1
- import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-SG4LO2AN.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-LPXMHYTM.js";import{ImageLightbox as r}from"./chunk-KTVXPGGB.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-RLJHRDDW.js";import{Breadcrumbs as d}from"./chunk-3AH524CN.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-XTCXX5LJ.js";import{useMediaMoveItems as p}from"./chunk-ZURB2DCM.js";import{copyToClipboard as h}from"./chunk-MQU3PZUS.js";import{DropdownMenu as f}from"./chunk-PN5FQVMB.js";import{NativeSelect as g}from"./chunk-VNACNNCJ.js";import{MediaUploadGrid as v}from"./chunk-MNSKGMVZ.js";import{MediaUsedInList as k}from"./chunk-CQV3VSI2.js";import{Segmented as y}from"./chunk-3ELLBQPS.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-W3OWPBQL.js";import{Banner as x}from"./chunk-ZW3IDCP2.js";import{Input_default as N}from"./chunk-MAMWQCJ6.js";import{IconButton_default as I}from"./chunk-PUF75SMJ.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-6RX4PVBU.js";import{ColoredBadge as j}from"./chunk-7TNAOZZ2.js";import{Button_default as z}from"./chunk-I4VIEGCX.js";import{buttonClasses as T}from"./chunk-UQYNPYF4.js";import{Icon as F}from"./chunk-2UO47XB4.js";import{Tooltip as O}from"./chunk-6XBWM453.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as L}from"./chunk-4PAWQEXM.js";import{useRef as M,useMemo as A,useCallback as E,useState as U,useEffect as B}from"react";import{jsxs as R,Fragment as V,jsx as K}from"react/jsx-runtime";var W="application/x-efficient-media-files",X="application/x-efficient-media-folder",G="application/x-efficient-media-file";function J(e){if(!e||!Array.from(e.types).includes(G))return null;try{const n=JSON.parse(e.getData(G));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var Q={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */K(F,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */K(F,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */K(F,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */K(F,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */K(F,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */K(F,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */K(F,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */K(F,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */K(F,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */K(F,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */K(F,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */K(F,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */K(F,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */K(F,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */K(F,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */K(F,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},H={link:/* @__PURE__ */K(F,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */K(F,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */K(F,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */K(F,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function $({value:e,label:n,onDone:l}){const[a,i]=U(e),r=M(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
2
- return K(N,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function q(F){const{mode:J="manage",layout:q="auto",location:Y,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=Q,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:Ce,onMove:xe,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Te,onOpenInDesign:Fe,onChoose:Oe,onCancel:Pe,pickNote:Le,onDragOut:Me,className:Ae=""}=F,Ee=L().mediaLibrary,Ue=L().media,Be="pick"===J,Re=!Be,Ve=M(null),Ke=P(Ve,"phone"===q?343:1200),We="phone"===q||"auto"===q&&Ke<640,Xe=A(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Ge=A(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Je=A(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Ge.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Ge]),Qe=E(e=>{const n=[];for(let l=e?Ge.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Ge.get(l.parentId):void 0);return n},[Ge,ee.length]),Ze=E((e,n)=>Qe(e).some(e=>e.id===n),[Qe]),[He,$e]=U(()=>/* @__PURE__ */new Set(["@files"])),qe=e=>$e(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),Ye=E(e=>{$e(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=Y).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;B(()=>{if("files"===Y.place)Ye(["@files",...Qe(Y.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===Y.place){const e=Y.nodeId?Xe.get(Y.nodeId)?.path??[]:[];Ye(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===Y.place,ln="trash"===Y.place,an="files"===Y.place,rn=an?Y.folderId:null,tn=nn&&Y.nodeId?Xe.get(Y.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=A(()=>ie.map(e=>e.id),[ie]),sn=A(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=s(dn),un=A(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=M(!0);B(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");B(()=>{me&&cn.setSelection(me)},[hn]);const fn=M(hn??""),gn=un.join("\0");B(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Be?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Ge.get(n.id)?.name:sn.get(n.id)?.name)&&Ce?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);Ye(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},Cn=E(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=Ge.get(e.id);return n===e.id||n&&Ze(n,e.id)?Ee.notIntoItself:(l?.parentId??null)===n?Ee.folderAlreadyHere:void 0};n.push({key:u,label:Ee.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Je.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Je,Ge,an,Ze,rn,Ee]),xn=E(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=U(null),Dn={words:Ee,media:Ue,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Re?e=>{wn(e)}:void 0,rename:Ce&&Re?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Re?xe:void 0,trash:Ne&&Re?Ne:void 0,deleteFolder:Ie&&Re?Ie:void 0,folderNotEmpty:e=>!!Ge.get(e)?.notEmpty,replace:ze&&Re?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&h(Ee.urlLabel,n)},openInDesign:Fe,restore:De,deleteForever:Se},Sn=e=>m(e,Dn),jn=w(),zn=(e,n)=>{Be||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Tn,Fn]=U(null),[On,Pn]=U(null),[Ln,Mn]=U(null);B(()=>{if(!On&&!Tn)return;const e=()=>{Pn(null),Fn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Tn]);const An=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!xe||fe.move||Be)&&(!!An(e,W)||!(!An(e,X)||!Ln)&&(n!==Ln&&!(n&&Ze(n,Ln)))),Un=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),Fn(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Tn!==e&&Fn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Fn(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),Fn(null),An(e,W)){let l;try{l=JSON.parse(e.dataTransfer.getData(W))}catch{l=null}Array.isArray(l)&&l.length&&xe({kind:"files",ids:l.map(String)},n)}else Ln&&(xe({kind:"folder",id:Ln},n),Mn(null))}}),Bn=e=>{const n=e=>An(e,W)||An(e,X)||An(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Rn=(e,n,l)=>/* @__PURE__ */K(O,{side:"right",content:On===e?Ee.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */K("span",{children:n})}),Vn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Kn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=He.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
3
- return R("div",{role:"none",className:"contents",children:[
4
- /* @__PURE__ */K(n,{label:Rn(r,e.name,t),level:a,icon:d&&o?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:nn&&Y.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>qe(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Bn(r),...Re?Vn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */K(l,{children:Kn(d,a+1,t)})]},e.id)}),Wn=(e,a)=>(Je.get(e)??[]).map(e=>{const i=Je.get(e.id),r=He.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
5
- return R("div",{role:"none",className:"contents",children:[
6
- /* @__PURE__ */K(n,{label:e.name,level:a,icon:i&&r?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:t||an&&Y.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>qe(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Tn===e.id?"into":void 0,dragging:Ln===e.id,draggable:Re&&!!xe&&!fe.move,rename:t?/* @__PURE__ */K($,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Re&&o.length?/* @__PURE__ */K(f,{align:"end","aria-label":Ee.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Re?Vn({kind:"folder",id:e.id}):{},...Re&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(X,e.id),Mn(e.id)},onDragEnd:()=>{Mn(null),Fn(null)}}:{}}}),i&&r&&/* @__PURE__ */K(l,{children:Wn(e.id,a+1)})]},e.id)}),Xn=He.has("@files"),Gn=He.has("@products"),Jn=/* @__PURE__ */R(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */R(V,{children:[
7
- /* @__PURE__ */K(n,{label:Rn("@products",Ee.products),level:1,icon:Z.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Gn:void 0,onToggle:()=>qe("@products"),selected:nn&&null==Y.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Bn("@products")}}),Gn&&ne.length>0&&/* @__PURE__ */K(l,{children:Kn(ne,2)})]}),
8
- /* @__PURE__ */K(n,{label:Ee.allFiles,level:1,icon:Xn?Z.folderOpen:Z.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Je.get(null)?.length?Xn:void 0,onToggle:()=>qe("@files"),selected:an&&null==Y.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Tn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Xn&&(Je.get(null)?.length??0)>0&&/* @__PURE__ */K(l,{children:Wn(null,2)}),Re&&/* @__PURE__ */K(n,{label:Ee.trash,level:1,icon:Z.trash,count:ae,countLabel:null!=ae?Ee.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Qn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=Y.nodeId?Xe.get(Y.nodeId)?.path??[]:[];return[{label:Ee.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=Qe(rn);return[{label:Ee.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Zn=nn?Ee.readOnly:fe.upload,Hn=!!be&&!ln&&!Zn,$n=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!Hn,onAccept:e=>be?.(e,rn)}),qn=nn?Ee.noProductFolder:fe.newFolder,Yn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */R("div",{className:"flex flex-wrap items-center gap-2",children:[Re&&we&&!ln&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{wn(rn)},...Yn(qn),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */K(z,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>$n.open(),...Yn(Zn),children:Ee.upload}),Re&&ln&&je&&ie.length>0&&/* @__PURE__ */K(z,{variant:"danger",size:"sm",onClick:je,...Yn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */K("div",{style:{width:We?void 0:i,flex:We?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */K(g,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */R("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */K("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */K(N,{size:"sm",type:"search",leftIcon:Z.search,placeholder:nn?Ee.searchProducts:Ee.search,"aria-label":nn?Ee.searchProducts:Ee.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ee.mediaType,oe.type,[{value:"all",label:Ee.allTypes},{value:"image",label:Ee.images},{value:"video",label:Ee.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ee.use,oe.use,[{value:"any",label:Ee.anyUse},{value:"email",label:Ee.emailOnly},{value:"website",label:Ee.websiteOnly},{value:"unused",label:Ee.notUsed}],nl("use"),130),de&&Re&&el(Ee.sort,oe.sort,[{value:"newest",label:Ee.newest},{value:"name",label:Ee.byName},{value:"size",label:Ee.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */K(y,{size:"sm",label:Ee.view,value:ce,onChange:ue,options:[{value:"grid",label:Ee.grid,icon:Z.grid},{value:"list",label:Ee.list,icon:Z.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ee.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:H.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:H.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:H.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:H.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */K(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Re&&an&&!!xe&&!fe.move,tl=!!Me&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[G]:ol(e)}}:{}})),sl=We?Math.max(72,Math.floor((Ke-24-16-1)/3)):112,cl=M(null),ul=c({containerRef:cl,enabled:Re&&!We&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Be){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */K(i,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */K(i,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */K(i,{variant:"dashed",title:Ee.trashEmpty}):!Hn||Be?/* @__PURE__ */K(i,{variant:"dashed",title:Ee.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */K("ul",{role:"listbox","aria-multiselectable":Re||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */R("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(G,ol(e)),Me("start")}:void 0,onDragEnd:ol(e)?e=>Me("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
9
- /* @__PURE__ */K("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
10
- /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
11
- /* @__PURE__ */K("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */K("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */K(v,{items:dl,readOnly:!Hn||Be,onFiles:Hn&&!Be?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?W:tl?G:void 0,onDragOutChange:tl?e=>Me(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Re?zn:void 0,menuOnMedia:Re})),gl=p({count:un.length,kind:xn(un),targets:Cn({kind:"files",ids:un}),onPick:e=>xe?.({kind:"files",ids:un},e.key===u?null:e.key)}),vl=T({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */K(f,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */R(V,{children:[Z.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Re&&un.length>1&&!nn?/* @__PURE__ */R("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
12
- /* @__PURE__ */K(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */R(V,ln?{children:[De&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.undo,onClick:()=>De(un),...Yn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */K(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...Yn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,disabled:!0,children:Ee.rename}),Ne&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.trash,onClick:()=>Ne({kind:"files",ids:un}),...Yn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
13
- /* @__PURE__ */K(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ee.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ee.name,a?/* @__PURE__ */K($,{value:e.name,label:Ee.fileName,onDone:bn}):e.name),l("type",Ee.type,e.typeLabel),l("size",Ee.size,e.sizeLabel),l("resolution",Ee.resolution,e.resolution),nn?(l("design",Ee.design,e.design),l("finish",Ee.finish,e.finish),l("angle",Ee.angleLug,e.angleLug),l("owner",Ee.owner,e.owner)):(l("added",Ee.addedBy,e.addedBy),l("folder",Ee.folder,e.folderPath)),l("used",Ee.usedIn,null!=e.usedCount?Ee.places(e.usedCount):void 0);const i=m({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
14
- return R("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
15
- /* @__PURE__ */K("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */K(x,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
16
- /* @__PURE__ */K(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */R("div",{className:"flex gap-2",children:[
17
- /* @__PURE__ */K("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */K(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
18
- /* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Re&&/* @__PURE__ */R("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>ze(e.id),...Yn(fe.replace),children:Ee.replace}),Te&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>Te(e.id),children:Ee.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */K(f,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */R(V,{children:[Z.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>yn({kind:"file",id:e.id}),...Yn(fe.rename),children:Ee.rename}),Ne&&/* @__PURE__ */K(I,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:Z.trash})]}),ln&&Re&&/* @__PURE__ */R("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */K(z,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>De([e.id]),...Yn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */K(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...Yn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Fe&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Fe({kind:"render",id:e.id}),children:Ee.openInDesign}),he&&/* @__PURE__ */K(k,{items:he})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,Cl=Be?/* @__PURE__ */R("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
19
- /* @__PURE__ */K("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
20
- /* @__PURE__ */R("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */K(z,{variant:"secondary",size:"sm",onClick:Pe,children:Ee.cancel}),
21
- /* @__PURE__ */K(z,{variant:"primary",size:"sm",disabled:!mn,...Yn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ee.chooseImage})]})]}):null,xl=Re&&!!mn,Nl=/* @__PURE__ */R("div",{className:"flex min-w-0 flex-col gap-3",children:[Le&&/* @__PURE__ */K(x,{tone:"neutral",children:Le}),
22
- /* @__PURE__ */R("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
23
- /* @__PURE__ */K(d,{items:Qn}),_n]}),ll,yl,
24
- /* @__PURE__ */R("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Re&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
25
- /* @__PURE__ */K(a,{rect:ul.rect})]}),Hn&&/* @__PURE__ */K("input",{...$n.inputProps}),
26
- /* @__PURE__ */K(S,{rejections:$n.rejections})]});/* @__PURE__ */
27
- return R("div",{ref:Ve,"data-media-library":"","data-layout":We?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Ae}`.trim(),children:[/* @__PURE__ */R("div",We?{className:"flex flex-col gap-3 p-3",children:[Jn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
28
- /* @__PURE__ */K("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Jn}),
29
- /* @__PURE__ */K("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),xl&&/* @__PURE__ */K("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),Cl,We&&/* @__PURE__ */K(o,{open:xl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */K(C,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */K(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{W as MEDIA_FILES_DRAG_TYPE,G as MEDIA_FILE_DRAG_TYPE,X as MEDIA_FOLDER_DRAG_TYPE,q as MediaLibrary,J as readMediaFileDrag};
@@ -1,12 +0,0 @@
1
- import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-LJN77RG6.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-I4VIEGCX.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-6XBWM453.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-4PAWQEXM.js";import{useState as x,useId as k,useRef as $,useMemo as j,useEffect as N}from"react";import{createPortal as C}from"react-dom";import{jsxs as D,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function E({onClear:e,ariaLabel:t}){/* @__PURE__ */
2
- return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function L(L){const{options:M,placeholder:R,emptyOptionLabel:F,className:z="",disabled:T,id:A,filter:J=!1,allowFreeText:I=!1,freeTextOption:O,onSearchChange:B,loading:H=!1,error:U,onRetry:G,rightAdornment:X,renderOption:P,clearable:V=!0,"aria-label":Y,"aria-labelledby":K,"aria-describedby":Q}=L,Z=!0===L.multiple,q=L.multiple?L.value:L.value?[L.value]:[],_=L.multiple?"":L.value,ee=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},te=q.length>0,ne=J&&te&&!T,re=Z||J,le=null!=O,oe=I||le,[ie,ae]=x(!1),[se,ue]=x(-1),ce=k(),de=A??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),be=w(),ge=F??be.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ie);$e.current=ie;const je=$(!1),Ne=e=>{$e.current&&($e.current=!1,e&&I&&!le&&Ve&&(Z?q.includes(Ve)||ee([...q,Ve]):Ve!==_&&ee([Ve])),ae(!1),ve(""))},Ce=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ye?ve(""):ue(t));ee([e.value]),Ne(!1)}},[De,Se]=x(null);b(()=>{if(!X||ie)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Fe?32:8)+6:null)});const We=m(we,ie,re?{popupRef:xe}:{matchTriggerWidth:!0}),Ee=j(()=>t(M),[M]),Le=q.join("\0"),Me=j(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Ee)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Ee,Le,oe]),Re=Me.join(", "),Fe=V&&te&&!T,[ze,Te]=x(null),Ae=$(null),Je=$(""),Ie=$(()=>{});Ie.current=()=>{const e=we.current,t=Ae.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Me.join("\0")}`;if(o===Je.current)return;Je.current=o;let i=null;r>0&&Me.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=W(Me,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Te(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},b(()=>{Ie.current()}),N(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ie.current());return t.observe(e),()=>t.disconnect()},[Z]);const Oe=Me.length,Be=!Z||!ze||ze.shown>=Oe?Re:0===ze.shown?be.select.selectedCount(Oe):`${Me.slice(0,ze.shown).join(", ")} +${Oe-ze.shown}`,He=Z&&null!==ze&&(ze.shown<Oe||ze.cut),Ue=ie&&te&&re;N(()=>{if(!ie)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||Ne(!0)};document.addEventListener("mousedown",e);const t=h(()=>Ne(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ie,I,me,Le,L.onChange]),N(()=>{if(ie)return y(e=>!("Escape"!==e.key||!$e.current)&&(Ne(!1),we.current?.blur(),!0),()=>xe.current)},[ie]);const Ge=j(()=>{const e=/* @__PURE__ */new Set;return n(M,t=>!e.has(t.value)&&(e.add(t.value),!0))},[M]),Xe=j(()=>{if(B)return Ge;const e=me.trim().toLowerCase();return e?n(Ge,t=>r(t,e)):Ge},[Ge,me,B]),Pe=j(()=>t(Xe),[Xe]),Ve=me.trim(),Ye=j(()=>le&&Ve?Ee.some(e=>e.label===Ve)||q.includes(Ve)?null:{value:Ve,label:Ve}:null,[le,Ve,Ee,Le]),Ke=j(()=>Ye?[...Pe,Ye]:Pe,[Pe,Ye]);/* @__PURE__ */
3
- return D("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||je.current||document.activeElement!==we.current&&Ne(!0)},children:[(Qe=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<Ke.length?pe(se):void 0,"aria-label":K?void 0:Y,"aria-labelledby":K,"aria-describedby":Q,value:ie?me:Be,onChange:e=>{ve(e.target.value),ae(!0)},onFocus:()=>{T||(ve(""),ae(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(T)return;if(t.preventDefault(),!ie)return void ae(!0);if(0===Ke.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ke,t,n))}"Enter"===t.key?(t.preventDefault(),ie&&se>=0&&se<Ke.length?Ce(Ke[se],se):1!==Pe.length||Pe[0].disabled?I&&!le&&Ve&&(Z?(q.includes(Ve)||ee([...q,Ve]),ve("")):(ee([Ve]),Ne(!1),we.current?.blur())):Ce(Pe[0],0)):"Escape"===t.key?(Ne(!1),we.current?.blur()):"Tab"===t.key&&Ne(!0)},placeholder:Ue?Be:R||ge,className:`${ne?a:s} ${z} ${Fe?"pr-8":""} ${T?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ue?" rosh-field-shows-choice":""}`,style:De?{paddingRight:De}:void 0,disabled:T}),Z?/* @__PURE__ */S(d,{content:!ie&&He?Re:null,className:"block",children:Qe}):Qe),Z&&
4
- /* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Ae,className:"whitespace-pre"})}),Fe&&/* @__PURE__ */S(E,{ariaLabel:be.select.clear,onClear:()=>{ee([]),Ne(!1)}}),X&&!ie&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Fe?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:X}),ie&&C(
5
- /* @__PURE__ */D("div",{ref:xe,onMouseDownCapture:()=>{je.current=!0,setTimeout(()=>{je.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&V&&!T&&
6
- /* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${g}`,children:be.select.clearAll}),H?
7
- /* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):U?/* @__PURE__ */D("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
8
- /* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:U}),G&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:G,className:"shrink-0",children:be.list.retry})]}):null,
9
- /* @__PURE__ */D("div",{id:he,role:Ke.length?"listbox":void 0,"aria-labelledby":Ke.length?K??(Y?void 0:de):void 0,"aria-label":Ke.length&&!K?Y:void 0,"aria-multiselectable":!(!Ke.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ke.length?H||U?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:be.select.noMatches}):0===Pe.length?null:l(Xe,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
10
- return D("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),Ce(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */S(o,{selected:n}),
11
- /* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:P?P(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(i,{grows:re,children:e.sublabel})]},e.value)},ce),Ye&&O&&
12
- /* @__PURE__ */S("button",{id:pe(Pe.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),Ce(Ye,Pe.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${Pe.length?`border-t ${g}`:""} ${se===Pe.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:O(Ye.value)})},`${ce}-typed`)]})]}),document.body)]});var Qe}export{L as SearchableSelect,W as fitChoice};
@@ -1,2 +0,0 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-CKKUFDZ3.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-4PAWQEXM.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const K=i(g??null);let L,w,H=!0;0===j.length?(w=K??M??0,L=w-30*a,H=null!==K||null!==M):(L=j[0].ms,w=K??j[j.length-1].ms,w-L<a&&(w=L+a));const N=j.length>0?Math.max(0,Math.round((w-L)/a)):0,O=u??(N>0?x.duration(N):void 0),J=[j.length>0?x.started(t(j[0].ms,D)):void 0,O,C.length>0?x.reached(j.length,p.length):void 0],Q=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),T={};for(const e of j)e.phase&&(T[e.phase]=T[e.phase]||[]).push(e.ms);const Z=Object.entries(T).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),A="rail"===v,E=H&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:A?"spread":"compressed",labels:A?"none":"lanes",items:Q,pending:C,phases:Z,startMs:L,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
2
- return h("div",A?{className:"shrink-0","data-timeline-variant":"rail",children:E}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:J,children:E})})}export{m as MilestoneTimeline};
@@ -1,3 +0,0 @@
1
- import{DropdownMenu as e}from"./chunk-PN5FQVMB.js";import{Button_default as i}from"./chunk-I4VIEGCX.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{Tooltip as a}from"./chunk-6XBWM453.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:W,align:z="end",side:B="bottom",menuMinWidth:F,linkAs:I,block:M=!1,className:L=""},O){const R=g&&(null!=N&&""!==N&&!1!==N)&&!v,X=x&&null!=j&&""!==j&&!1!==j,$=o(),A=/* @__PURE__ */t(i,{ref:O,type:b,variant:f,size:p,loading:v,leftIcon:k,block:M,disabled:g&&!R,"aria-disabled":!!R||void 0,disabledReason:R?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),D=M?"relative flex min-w-0 flex-1":"relative inline-flex",P=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
2
- return s("div",{className:[M?"flex w-full":"inline-flex","items-stretch",L].filter(Boolean).join(" "),children:[null==w||""===w||R?A:/* @__PURE__ */t(a,{content:w,className:D,children:A}),
3
- /* @__PURE__ */t(a,{content:X?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":X?$:void 0,items:h,align:z,side:B,minWidth:F,linkAs:I,disabled:x&&!X,"aria-disabled":X,onOpenChange:y,footer:C,footerLabel:W,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:P,strokeWidth:2,"aria-hidden":"true"})})}),X&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
@@ -1,7 +0,0 @@
1
- import{writeClipboard as e}from"./chunk-MQU3PZUS.js";import{IconButton_default as r}from"./chunk-PUF75SMJ.js";import{toast_default as t}from"./chunk-AKM6JBMD.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as a}from"./chunk-4PAWQEXM.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
2
- return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
3
- return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:v=!1,onCopy:w,multiline:N=!1,id:j,"aria-describedby":M,className:B=""}){const[U,C]=i(!1),P=o(null),T=a().copy;c(()=>()=>{P.current&&clearTimeout(P.current)},[]);const A=l(async()=>{await e(n)?(C(!0),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{C(!1),P.current=null},2e3),w?.(n)):t.error(T.failed)},[n,w,T]),{box:J,button:Q}=p[g],S=!v;/* @__PURE__ */
4
- return m("div",{id:S?void 0:j,"aria-describedby":S?void 0:M,className:["inline-flex max-w-full items-center rounded-md",u[k],J,B].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
5
- /* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:n,children:y??n}),!v&&/* @__PURE__ */m(d,{children:[
6
- /* @__PURE__ */s(r,{id:j,"aria-label":x?T.copyLabel(x):T.copy,"aria-describedby":M,onClick:A,className:`${Q} text-gray-400`,children:/* @__PURE__ */s(U?h:b,{})}),
7
- /* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:U?T.copied:""})]})]})}export{y as Snippet};
@@ -1,14 +0,0 @@
1
- import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{ChartTooltip as t}from"./chunk-G4GVLK44.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.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-4PAWQEXM.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 L=o().charts,N=i(),S=y??(e=>h(e,N)),j=A??L.noStages,z=c(),[V,W]=m(null),{highlighted:w}=e(),C=s(null),E=l(C,560),F=$??E;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Z=b??a(0),H=p??54*x.length,B=Math.max(...x.map(e=>e.value),1),G="bars"===v,P=G?Math.round(Math.min(132,Math.max(80,.24*F))):Math.round(Math.min(168,Math.max(104,.38*F))),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:S(x[e].value),drop:null!=t?`−${u(t,1,N)}`:""}},U=G?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,X=F-P-U,Y=Math.max(G?2:0,Math.min(M,X)),K=e=>Math.max(Y,X*Math.max(0,e/B)),O=e=>K(e)/2,T=P+X/2,q=e=>46+e/Math.max(1,x.length-1)*54,D=e=>`color-mix(in oklab, ${Z} ${q(e).toFixed(0)}%, ${n.surface})`,I=e=>q(e)>=55?n.surface:n.label,J=(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:C,children:[
3
- /* @__PURE__ */f("svg",{width:"100%",height:H,viewBox:`0 0 ${F} ${H}`,role:"img","aria-labelledby":z,onMouseLeave:()=>W(null),children:[
4
- /* @__PURE__ */d("title",{id:z,children:L.funnel(x.length,S(x[0].value),S(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,N),i=.62*o.length*12+12;if(G){const u=P,h=u+K(e.value),{count:c,drop:m}=R(t);/* @__PURE__ */
5
- return f("g",{opacity:J(t,e.key)?.45:1,onMouseEnter:()=>W(t),children:[
6
- /* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:D(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:I(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
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=O(e.value),c="cone"===v?O(x[t+1]?.value??e.value):h,m=Q(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
10
- return f("g",{opacity:J(t,e.key)?.45:1,onMouseEnter:()=>W(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:D(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:[S(e.value),null!=m?` · −${u(m,1,N)}`:""]}),
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?I(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(t,{title:_.label,rows:[{key:"value",label:L.count,color:D(V),value:S(_.value)},{key:"share",label:L.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,N)},...V>0&&x[V-1].value>0?[{key:"drop",label:L.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,N)}`}]:[]]})})]})}export{x as FunnelChart};