efficient-shell 8.20.0 → 8.21.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 (359) hide show
  1. package/README.md +37 -12
  2. package/dist/{Browser-KK4DSPFA.js → Browser-33BAOVZA.js} +14 -14
  3. package/dist/Calculator-FHN36ZE3.js +29 -0
  4. package/dist/{CurrencyConverter-PD2CEL6V.js → CurrencyConverter-ONCRQNI4.js} +9 -9
  5. package/dist/{Documents-QRU3INP2.js → Documents-LE46Z6RO.js} +5 -5
  6. package/dist/{Files-NQBM46JA.js → Files-PD7KZM2Y.js} +25 -25
  7. package/dist/{Notepad-KU2VK5QB.js → Notepad-NYFR5HWW.js} +10 -10
  8. package/dist/PdfViewer-ZFZ4PEAV.js +1 -0
  9. package/dist/{PomodoroTimer-JEQTTMGA.js → PomodoroTimer-JVQ5K7B4.js} +68 -68
  10. package/dist/{Preview-C6VU5P3N.js → Preview-CPT6HLMR.js} +40 -40
  11. package/dist/Sidebar-OFRMBB5V.js +43 -0
  12. package/dist/{Spreadsheet-HLH3EHCX.js → Spreadsheet-BEIPEEOO.js} +13 -13
  13. package/dist/{Stock-VCMJMUCW.js → Stock-TWJNCTNT.js} +3 -3
  14. package/dist/{Weather-HF3E3N3M.js → Weather-RM7GPLAH.js} +16 -16
  15. package/dist/{WorldClock-PM5CJQSL.js → WorldClock-ITJ2MO75.js} +6 -6
  16. package/dist/ai/index.js +17 -17
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/charts/BoxPlotChart.js +1 -1
  21. package/dist/charts/CandlestickChart.js +1 -1
  22. package/dist/charts/CartesianPlot.js +1 -1
  23. package/dist/charts/ChartBrush.js +1 -1
  24. package/dist/charts/ChartFrame.js +1 -1
  25. package/dist/charts/ChartSkeleton.js +1 -1
  26. package/dist/charts/ChordChart.js +1 -1
  27. package/dist/charts/ColumnChart.js +1 -1
  28. package/dist/charts/FunnelChart.js +1 -1
  29. package/dist/charts/HeatmapChart.js +1 -1
  30. package/dist/charts/HistogramChart.js +1 -1
  31. package/dist/charts/Meter.js +1 -1
  32. package/dist/charts/PieChart.js +1 -1
  33. package/dist/charts/RadarChart.js +1 -1
  34. package/dist/charts/RadialBarChart.js +1 -1
  35. package/dist/charts/RangeChart.js +1 -1
  36. package/dist/charts/RankedBars.js +1 -1
  37. package/dist/charts/SankeyChart.js +1 -1
  38. package/dist/charts/ScatterChart.js +1 -1
  39. package/dist/charts/StatTile.js +1 -1
  40. package/dist/charts/SunburstChart.js +1 -1
  41. package/dist/charts/TimeSeriesChart.js +1 -1
  42. package/dist/charts/TreemapChart.js +1 -1
  43. package/dist/charts/WaterfallChart.js +1 -1
  44. package/dist/chunk-22S6LG6D.js +6 -0
  45. package/dist/{chunk-CQXKO5PB.js → chunk-24L7NLA3.js} +1 -1
  46. package/dist/{chunk-O3HXASSH.js → chunk-2BS74SYW.js} +1 -1
  47. package/dist/chunk-36MUTG34.js +1 -0
  48. package/dist/{chunk-VWVFKMU7.js → chunk-3HNK7IRJ.js} +3 -3
  49. package/dist/{chunk-5TVF4BCM.js → chunk-3Z7LIHMB.js} +1 -1
  50. package/dist/chunk-4CANQ3B3.js +1 -0
  51. package/dist/{chunk-UEUCGC6G.js → chunk-4CWKK5HV.js} +4 -4
  52. package/dist/chunk-4IU5BSVE.js +2 -0
  53. package/dist/chunk-4PZN25MV.js +20 -0
  54. package/dist/{chunk-RC5SGXXR.js → chunk-4VK3GJZI.js} +1 -1
  55. package/dist/{chunk-PXCARPLZ.js → chunk-55WFJELE.js} +1 -1
  56. package/dist/chunk-5U3WEVZL.js +19 -0
  57. package/dist/{chunk-MRBC7GLE.js → chunk-5Z2WLSFM.js} +15 -15
  58. package/dist/{chunk-KB6BGPQK.js → chunk-6GVJ6IKD.js} +1 -1
  59. package/dist/{chunk-7T3COEQK.js → chunk-6KO5VTL7.js} +1 -1
  60. package/dist/{chunk-AZWEWGYG.js → chunk-6V753BUI.js} +3 -3
  61. package/dist/chunk-6WNQ5ENK.js +8 -0
  62. package/dist/chunk-73DAZUJP.js +14 -0
  63. package/dist/{chunk-C6LV3HJW.js → chunk-7DKPJUGU.js} +1 -1
  64. package/dist/{chunk-IGH6DECG.js → chunk-7M7ESM5V.js} +12 -12
  65. package/dist/{chunk-UEMGH6EO.js → chunk-7S2I6ACG.js} +1 -1
  66. package/dist/{chunk-RZT7QES5.js → chunk-A4U4BTN3.js} +4 -4
  67. package/dist/{chunk-5GMWOYTF.js → chunk-AH2AUQYM.js} +1 -1
  68. package/dist/{chunk-AILWMDWP.js → chunk-AJ42UE53.js} +1 -1
  69. package/dist/{chunk-DAV7SMCJ.js → chunk-AJD24TNB.js} +1 -1
  70. package/dist/{chunk-4FOTTLL7.js → chunk-AVOVYKVL.js} +2 -2
  71. package/dist/{chunk-XDG2RWUO.js → chunk-AX7KPMDV.js} +2 -2
  72. package/dist/{chunk-B36HEVMT.js → chunk-AXZEINMF.js} +19 -19
  73. package/dist/{chunk-OAYHU7YN.js → chunk-B4XPFCCQ.js} +2 -2
  74. package/dist/{chunk-JSOO4O5K.js → chunk-B55IXYDR.js} +2 -2
  75. package/dist/chunk-B5VOHZCD.js +1 -0
  76. package/dist/{chunk-MVCNSGM4.js → chunk-BIS5PHHV.js} +2 -2
  77. package/dist/{chunk-3V6UFR7M.js → chunk-BXM72C73.js} +1 -1
  78. package/dist/{chunk-X3II54HU.js → chunk-CDRXZBVR.js} +1 -1
  79. package/dist/{chunk-6SBPGUSR.js → chunk-CFLVEKSH.js} +1 -1
  80. package/dist/{chunk-FBSQABH2.js → chunk-CMYLTCPA.js} +1 -1
  81. package/dist/{chunk-YZCRHDOB.js → chunk-CU2B7G5A.js} +1 -1
  82. package/dist/{chunk-P5QRK7WD.js → chunk-CUT7PAXL.js} +1 -1
  83. package/dist/{chunk-5SULG7D5.js → chunk-D323R2FT.js} +1 -1
  84. package/dist/{chunk-AK632G3F.js → chunk-D5HHU5AO.js} +7 -7
  85. package/dist/{chunk-UELYZT4T.js → chunk-DIKOEJ2Y.js} +1 -1
  86. package/dist/{chunk-CVNM25BM.js → chunk-DLCIGDKC.js} +6 -6
  87. package/dist/chunk-DLS2VCBK.js +3 -0
  88. package/dist/{chunk-QSPW43OC.js → chunk-DMLJOBQS.js} +8 -8
  89. package/dist/chunk-DNCII5C4.js +8 -0
  90. package/dist/chunk-DNKACLRF.js +11 -0
  91. package/dist/{chunk-D6FSZBJ5.js → chunk-DO6XTJ77.js} +1 -1
  92. package/dist/{chunk-KZ6P7WC6.js → chunk-EAEUSMYL.js} +1 -1
  93. package/dist/{chunk-XSFQR374.js → chunk-ECZT7SIE.js} +1 -1
  94. package/dist/{chunk-VYKITRFG.js → chunk-EDQBTPDF.js} +7 -7
  95. package/dist/{chunk-XBXEK6XP.js → chunk-EKWSGPJ4.js} +7 -7
  96. package/dist/{chunk-JJ6IUIYX.js → chunk-EL3O7ZFQ.js} +1 -1
  97. package/dist/chunk-ERFM5U3M.js +12 -0
  98. package/dist/{chunk-J324R2BM.js → chunk-ES3WKDZC.js} +13 -13
  99. package/dist/{chunk-TLJCUUZU.js → chunk-ET32NQHX.js} +1 -1
  100. package/dist/chunk-ETSKG62F.js +1 -0
  101. package/dist/{chunk-XDAR2DSX.js → chunk-EXMFUK3A.js} +8 -8
  102. package/dist/chunk-F2Z6IXMM.js +2 -0
  103. package/dist/{chunk-TF3E5J3Y.js → chunk-GI7FOLDX.js} +1 -1
  104. package/dist/{chunk-KSSIZW3C.js → chunk-GNXTOUPJ.js} +5 -5
  105. package/dist/{chunk-DCNXCFAD.js → chunk-H7ZXUGXX.js} +26 -26
  106. package/dist/{chunk-ZLHF5XRR.js → chunk-HJIBTA6V.js} +9 -9
  107. package/dist/{chunk-Z6V3EY6F.js → chunk-HVVPBAP5.js} +3 -3
  108. package/dist/chunk-HYFHCPNJ.js +15 -0
  109. package/dist/{chunk-DBLJIK5J.js → chunk-IAQC775L.js} +1 -1
  110. package/dist/{chunk-J67YIQEN.js → chunk-IGCXJHAK.js} +1 -1
  111. package/dist/{chunk-DBDJQVQM.js → chunk-IJA5ZAGL.js} +1 -1
  112. package/dist/{chunk-YUIWG2QT.js → chunk-IKNNHEVY.js} +1 -1
  113. package/dist/{chunk-EXVR3BWW.js → chunk-IMF537IJ.js} +9 -9
  114. package/dist/{chunk-TKBP5HRY.js → chunk-IPOSLLLU.js} +12 -12
  115. package/dist/{chunk-VXWCX65A.js → chunk-IURSUMDO.js} +8 -8
  116. package/dist/{chunk-7SPX7DLO.js → chunk-IY3CRZRH.js} +16 -16
  117. package/dist/chunk-JGE7S7RQ.js +29 -0
  118. package/dist/{chunk-H5GQWWPA.js → chunk-JYOI66DT.js} +1 -1
  119. package/dist/chunk-K4DZWCUP.js +8 -0
  120. package/dist/chunk-K7Y6VDCC.js +11 -0
  121. package/dist/{chunk-42BBJJDP.js → chunk-KIBL6M3T.js} +10 -5
  122. package/dist/chunk-KPFOXLN4.js +5 -0
  123. package/dist/chunk-KZEQJVBO.js +3 -0
  124. package/dist/chunk-L2HZ7YXS.js +14 -0
  125. package/dist/chunk-L2YW3END.js +4 -0
  126. package/dist/{chunk-KATRRQD5.js → chunk-L6FLPBU2.js} +5 -5
  127. package/dist/{chunk-3WM23XSR.js → chunk-LDFRVV5R.js} +8 -8
  128. package/dist/{chunk-3KDY6V6I.js → chunk-LMLM4KHQ.js} +8 -8
  129. package/dist/{chunk-LMOPRRQY.js → chunk-LQQMELJM.js} +12 -12
  130. package/dist/{chunk-CQAXN3HN.js → chunk-LVSPLCGG.js} +1 -1
  131. package/dist/{chunk-WGSIYW63.js → chunk-M5BFTFBK.js} +15 -15
  132. package/dist/{chunk-ZDJNTOUS.js → chunk-MEOICYR5.js} +1 -1
  133. package/dist/{chunk-CDBS47XI.js → chunk-MFEJ6TYE.js} +1 -1
  134. package/dist/{chunk-U62AWCZR.js → chunk-MHYOQMBV.js} +1 -1
  135. package/dist/{chunk-RHYMHVFS.js → chunk-MKITHLDU.js} +9 -9
  136. package/dist/chunk-MOOBUMON.js +9 -0
  137. package/dist/{chunk-R6L6PKQP.js → chunk-MTSZ66O4.js} +1 -1
  138. package/dist/{chunk-Q6YPDR7U.js → chunk-MWAYM46R.js} +12 -12
  139. package/dist/{chunk-E4O2ZMXF.js → chunk-N65HZ3TK.js} +1 -1
  140. package/dist/{chunk-CHNYSP6K.js → chunk-N6DTTOB6.js} +1 -1
  141. package/dist/{chunk-XXBGWT7L.js → chunk-N7VNKAXZ.js} +1 -1
  142. package/dist/{chunk-F5VXS5JO.js → chunk-NBVF2CXM.js} +1 -1
  143. package/dist/{chunk-VO3HT6IK.js → chunk-NDTMQRR2.js} +1 -1
  144. package/dist/{chunk-MQADQ4YF.js → chunk-NKJDOQVW.js} +1 -1
  145. package/dist/{chunk-FOSCSAJZ.js → chunk-NL6VHSUN.js} +1 -1
  146. package/dist/{chunk-QKHTL3FQ.js → chunk-NNKMEF3D.js} +1 -1
  147. package/dist/{chunk-3AVHOYQZ.js → chunk-NRDO5IHL.js} +1 -1
  148. package/dist/{chunk-Q2S76TZH.js → chunk-NSCLFAKK.js} +1 -1
  149. package/dist/{chunk-EVPOZQOI.js → chunk-OCCHDMEV.js} +1 -1
  150. package/dist/chunk-OF6TUQAL.js +7 -0
  151. package/dist/{chunk-F22KWATP.js → chunk-OSVN2UF7.js} +1 -1
  152. package/dist/{chunk-3RM3D2P3.js → chunk-OTU633XJ.js} +6 -6
  153. package/dist/{chunk-KE6NYTGF.js → chunk-OZF4QAJT.js} +3 -3
  154. package/dist/{chunk-HME2P5VX.js → chunk-OZPYTSPD.js} +23 -23
  155. package/dist/{chunk-MBXTOYMX.js → chunk-P7WUDHIP.js} +6 -6
  156. package/dist/{chunk-ZNZDV6SN.js → chunk-PG6AVBSR.js} +1 -1
  157. package/dist/{chunk-UPHXYWL6.js → chunk-PJCVNFWM.js} +11 -11
  158. package/dist/{chunk-N7KL336H.js → chunk-PVSGQN5M.js} +6 -6
  159. package/dist/{chunk-47MFBFIX.js → chunk-PWOFYFMO.js} +6 -6
  160. package/dist/{chunk-RQ5RVKRO.js → chunk-QEVIQZIE.js} +2 -2
  161. package/dist/{chunk-EQZAHIUG.js → chunk-QJPLM2KQ.js} +2 -2
  162. package/dist/{chunk-4MTC6HA5.js → chunk-RAAUW5OZ.js} +2 -2
  163. package/dist/{chunk-E2YGQAFU.js → chunk-RAI3GTS6.js} +1 -1
  164. package/dist/chunk-RAQESAQZ.js +3 -0
  165. package/dist/{chunk-5JQCPUEO.js → chunk-RCRI6QZV.js} +1 -1
  166. package/dist/{chunk-G3IG4X4Z.js → chunk-RDPUVCXR.js} +1 -1
  167. package/dist/{chunk-4TER5BHR.js → chunk-RZBHO74V.js} +1 -1
  168. package/dist/{chunk-MKTO2FHK.js → chunk-SAKHGHF5.js} +1 -1
  169. package/dist/{chunk-4G5M752L.js → chunk-SXSMIMFY.js} +3 -3
  170. package/dist/{chunk-JSB5G2XQ.js → chunk-THDSOVEH.js} +2 -2
  171. package/dist/{chunk-CHOMUTLT.js → chunk-TT3S2XVQ.js} +1 -1
  172. package/dist/chunk-TW6WEYGO.js +8 -0
  173. package/dist/{chunk-XUK35DKG.js → chunk-U5I7IF72.js} +1 -1
  174. package/dist/{chunk-RYC3ZHXM.js → chunk-UBVFIIXS.js} +5 -5
  175. package/dist/{chunk-IM7QHAXT.js → chunk-UFVQ7ZBP.js} +5 -5
  176. package/dist/{chunk-QSW26NAH.js → chunk-UQBPKZUR.js} +1 -1
  177. package/dist/{chunk-F4PESM6A.js → chunk-UY47AKZU.js} +6 -6
  178. package/dist/{chunk-4TL3MRRE.js → chunk-VH6GB73Q.js} +1 -1
  179. package/dist/{chunk-2GPXC6JX.js → chunk-VHAM5TD2.js} +1 -1
  180. package/dist/{chunk-5VUVKP55.js → chunk-VOHZQVFK.js} +6 -6
  181. package/dist/{chunk-IH4SVMXJ.js → chunk-VX4BNYH3.js} +2 -2
  182. package/dist/{chunk-O43QLNPL.js → chunk-VY7EPQEG.js} +1 -1
  183. package/dist/chunk-WBEMN4JG.js +9 -0
  184. package/dist/{chunk-TQP3L4OC.js → chunk-WDXJWC3Y.js} +5 -5
  185. package/dist/{chunk-7HTURXIA.js → chunk-WRJDHFLD.js} +3 -3
  186. package/dist/{chunk-NGVODCMV.js → chunk-XWH6KVVB.js} +3 -3
  187. package/dist/chunk-Y5ZWPU4L.js +14 -0
  188. package/dist/chunk-Y7V7CMKP.js +2 -0
  189. package/dist/{chunk-7RD623PT.js → chunk-YGEK2Z6P.js} +1 -1
  190. package/dist/{chunk-55DONELU.js → chunk-YSHS6QIY.js} +6 -6
  191. package/dist/{chunk-ABD5X73I.js → chunk-YTGWIMXB.js} +1 -1
  192. package/dist/chunk-YUIY7QOR.js +1 -0
  193. package/dist/{chunk-2SHDXTB6.js → chunk-YVBFFE4Z.js} +5 -5
  194. package/dist/{chunk-B5MOPSMW.js → chunk-ZBLNVAZ4.js} +3 -3
  195. package/dist/{chunk-BIEKHPZ5.js → chunk-ZDK2JYH5.js} +52 -52
  196. package/dist/{chunk-FFZ7KPIV.js → chunk-ZKOIGLRF.js} +7 -7
  197. package/dist/data/DataTable.js +1 -1
  198. package/dist/data/Kanban.js +1 -1
  199. package/dist/data/ListFooter.js +1 -1
  200. package/dist/data/ListLoadError.js +1 -1
  201. package/dist/data/Pagination.js +1 -1
  202. package/dist/file-intake/index.js +1 -1
  203. package/dist/format/index.js +1 -1
  204. package/dist/forms/AlignmentGrid.js +1 -1
  205. package/dist/forms/BorderInput.js +1 -1
  206. package/dist/forms/BrandAssetEditor.js +1 -1
  207. package/dist/forms/Button.js +1 -1
  208. package/dist/forms/Calendar.js +1 -1
  209. package/dist/forms/ColorPicker.js +1 -1
  210. package/dist/forms/ComposerAttachments.js +1 -1
  211. package/dist/forms/CornersInput.js +1 -1
  212. package/dist/forms/DatePicker.js +1 -1
  213. package/dist/forms/DateRangePicker.js +1 -1
  214. package/dist/forms/DateTimePicker.js +1 -1
  215. package/dist/forms/DisplayChips.js +1 -1
  216. package/dist/forms/FilePicker.js +1 -1
  217. package/dist/forms/FormErrorSummary.js +1 -1
  218. package/dist/forms/IconButton.js +1 -1
  219. package/dist/forms/IconPicker.js +1 -1
  220. package/dist/forms/ImageFocusPoint.js +1 -1
  221. package/dist/forms/InputNumber.js +1 -1
  222. package/dist/forms/LinkPicker.js +1 -1
  223. package/dist/forms/MediaLibrary.d.ts +157 -0
  224. package/dist/forms/MediaLibrary.js +2 -0
  225. package/dist/forms/MediaUploadField.js +1 -1
  226. package/dist/forms/MediaUploadGrid.d.ts +54 -3
  227. package/dist/forms/MediaUploadGrid.js +1 -1
  228. package/dist/forms/MediaUsedInList.js +1 -1
  229. package/dist/forms/NumericKeypad.js +1 -1
  230. package/dist/forms/PictureTiles.js +1 -1
  231. package/dist/forms/PositionInput.js +1 -1
  232. package/dist/forms/Segmented.js +1 -1
  233. package/dist/forms/Select.js +1 -1
  234. package/dist/forms/SidesInput.js +1 -1
  235. package/dist/forms/Slider.js +1 -1
  236. package/dist/forms/Snippet.js +1 -1
  237. package/dist/forms/SplitButton.js +1 -1
  238. package/dist/forms/TagInput.js +1 -1
  239. package/dist/forms/TextToolbar.js +1 -1
  240. package/dist/forms/TimePicker.js +1 -1
  241. package/dist/forms/WidthsBar.js +1 -1
  242. package/dist/forms/mediaLibraryMenu.d.ts +64 -0
  243. package/dist/forms/mediaLibraryMenu.js +2 -0
  244. package/dist/forms/mediaMoveItems.d.ts +42 -3
  245. package/dist/forms/mediaMoveItems.js +1 -1
  246. package/dist/forms/useFileIntake.js +1 -1
  247. package/dist/icons/efficient-glyphs.js +1 -1
  248. package/dist/icons/efficient-looks.js +1 -1
  249. package/dist/icons/efficient.js +1 -1
  250. package/dist/icons/index.js +1 -1
  251. package/dist/icons/looks/map.js +1 -1
  252. package/dist/icons/sets.js +1 -1
  253. package/dist/index.d.ts +4 -2
  254. package/dist/index.js +425 -425
  255. package/dist/locales/zh-Hans.js +1 -1
  256. package/dist/map/index.js +6 -6
  257. package/dist/markdown/index.js +1 -1
  258. package/dist/page-tabs/index.js +5 -5
  259. package/dist/pdf/index.js +1 -1
  260. package/dist/shell/Accordion.js +1 -1
  261. package/dist/shell/AppUpdateBanner.js +1 -1
  262. package/dist/shell/Avatar.js +1 -1
  263. package/dist/shell/Banner.js +1 -1
  264. package/dist/shell/Breadcrumbs.js +1 -1
  265. package/dist/shell/BudgetBar.js +1 -1
  266. package/dist/shell/Card.js +1 -1
  267. package/dist/shell/ColoredBadge.js +1 -1
  268. package/dist/shell/ConfirmDialog.js +1 -1
  269. package/dist/shell/ContainerFillChart.js +1 -1
  270. package/dist/shell/ContextMenu.js +1 -1
  271. package/dist/shell/CountBadge.js +1 -1
  272. package/dist/shell/Dialog.js +1 -1
  273. package/dist/shell/Drawer.js +1 -1
  274. package/dist/shell/DropdownMenu.js +1 -1
  275. package/dist/shell/EditableGrid.js +1 -1
  276. package/dist/shell/EmptyState.js +1 -1
  277. package/dist/shell/GlobalSearch.js +1 -1
  278. package/dist/shell/HelpCenter.js +1 -1
  279. package/dist/shell/IconRail.js +1 -1
  280. package/dist/shell/ImageLightbox.js +1 -1
  281. package/dist/shell/LanguageSelect.js +1 -1
  282. package/dist/shell/Markdown.js +1 -1
  283. package/dist/shell/MetricBar.js +1 -1
  284. package/dist/shell/MetricBarLegend.js +1 -1
  285. package/dist/shell/MilestoneTimeline.js +1 -1
  286. package/dist/shell/PageHeader.js +1 -1
  287. package/dist/shell/PopupMenu.js +1 -1
  288. package/dist/shell/ProductionTimeline.js +1 -1
  289. package/dist/shell/ResizeHandle.js +1 -1
  290. package/dist/shell/Result.js +1 -1
  291. package/dist/shell/SearchableSelect.js +1 -1
  292. package/dist/shell/SettingReset.js +1 -1
  293. package/dist/shell/SettingRow.js +1 -1
  294. package/dist/shell/SidebarLayout.js +1 -1
  295. package/dist/shell/SidebarNav.js +1 -1
  296. package/dist/shell/SortableList.js +1 -1
  297. package/dist/shell/Statistic.js +1 -1
  298. package/dist/shell/StatusBadge.js +1 -1
  299. package/dist/shell/StepChain.js +1 -1
  300. package/dist/shell/Stepper.js +1 -1
  301. package/dist/shell/Tabs.js +1 -1
  302. package/dist/shell/TimeAgo.js +1 -1
  303. package/dist/shell/TimelineTrack.js +1 -1
  304. package/dist/shell/Tooltip.d.ts +9 -1
  305. package/dist/shell/Tooltip.js +1 -1
  306. package/dist/shell/TopNav.js +1 -1
  307. package/dist/shell/TransferProgress.js +1 -1
  308. package/dist/shell/Tree.js +1 -1
  309. package/dist/shell/language.js +1 -1
  310. package/dist/shell/strings.d.ts +88 -0
  311. package/dist/shell/strings.js +1 -1
  312. package/dist/shell/toast.js +1 -1
  313. package/dist/telemetry/index.js +1 -1
  314. package/dist/templates/AuthScreen.js +1 -1
  315. package/dist/templates/ChatTemplate.js +1 -1
  316. package/dist/templates/CheckoutTemplate.js +1 -1
  317. package/dist/templates/DashboardTemplate.js +1 -1
  318. package/dist/templates/DataTablePage.js +1 -1
  319. package/dist/templates/EmailTemplate.js +1 -1
  320. package/dist/templates/ErrorBoundary.js +1 -1
  321. package/dist/templates/ErrorPage.js +1 -1
  322. package/dist/templates/FormLayoutPage.js +1 -1
  323. package/dist/templates/GalleryTemplate.js +1 -1
  324. package/dist/ui/index.d.ts +4 -2
  325. package/dist/ui/index.js +1 -1
  326. package/dist/version.js +1 -1
  327. package/package.json +5 -1
  328. package/dist/Calculator-PH6NVEEZ.js +0 -29
  329. package/dist/PdfViewer-GODDA4GG.js +0 -1
  330. package/dist/Sidebar-SJMMY2Y2.js +0 -43
  331. package/dist/chunk-2LXTJXWC.js +0 -6
  332. package/dist/chunk-36DYXGQI.js +0 -7
  333. package/dist/chunk-3NWCVZRK.js +0 -10
  334. package/dist/chunk-3P7SBAKK.js +0 -3
  335. package/dist/chunk-6UOMJ7E4.js +0 -2
  336. package/dist/chunk-ABDT4M5L.js +0 -19
  337. package/dist/chunk-BZWTFLQD.js +0 -15
  338. package/dist/chunk-CIGHIX6Z.js +0 -14
  339. package/dist/chunk-DAJTVAWO.js +0 -11
  340. package/dist/chunk-ENVCMR3M.js +0 -5
  341. package/dist/chunk-H5VGRHNT.js +0 -9
  342. package/dist/chunk-HLGE6TVE.js +0 -4
  343. package/dist/chunk-HMZLRXLA.js +0 -1
  344. package/dist/chunk-JH4W3R4Q.js +0 -11
  345. package/dist/chunk-KKZZAK76.js +0 -1
  346. package/dist/chunk-KS3AQKHD.js +0 -8
  347. package/dist/chunk-LYLEH25Y.js +0 -1
  348. package/dist/chunk-NI76QOA2.js +0 -2
  349. package/dist/chunk-NZ67C5OK.js +0 -12
  350. package/dist/chunk-OHSJWKNV.js +0 -14
  351. package/dist/chunk-Q75PSCZ5.js +0 -20
  352. package/dist/chunk-SIQSD3QT.js +0 -8
  353. package/dist/chunk-TCB2J3PS.js +0 -9
  354. package/dist/chunk-THPTJGV5.js +0 -8
  355. package/dist/chunk-UDD7GB4F.js +0 -2
  356. package/dist/chunk-WMO2JQNL.js +0 -8
  357. package/dist/chunk-WOHOIJRZ.js +0 -3
  358. package/dist/chunk-X7ZBGXUU.js +0 -1
  359. /package/dist/{chunk-PCGZS6S4.js → chunk-276AUQNN.js} +0 -0
@@ -1,54 +1,54 @@
1
- import{toast_default as e}from"./chunk-F22KWATP.js";import{useShellStrings as t}from"./chunk-KKZZAK76.js";import{forwardRef as r,useRef as n,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var h=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],u=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),y=r(function({src:r,filename:y,onApply:m,onCancel:g},N){const L=n(null),z=n(null),D=n(null),P=n(null),$=t().annotator,E=n($);E.current=$;const[I,W]=o("select"),[S,B]=o(h[0]),[R,j]=o(4),[F,H]=o(24),[T,A]=o(u[0].id),[U,K]=o(!0),[O,Z]=o(!1),[V,X]=o(!1),[q,G]=o(null),[Y,_]=o(null),[J,Q]=o(6),[ee,te]=o(12),[re,ne]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,he]=o(1),[ue,pe]=o(null),[ye,xe]=o(null),[me,ge]=o(null),we=n(null),[fe,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>re.find(e=>e.id===oe)??null,[re,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(H(Me.size),A(Me.font),K(Me.bold),Z(Me.italic),X(Me.underline),G(Me.borderColor),_(Me.background),Q(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{P.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),ne([]),ie(null)},t.onerror=()=>e.error(E.current.loadFailed),t.src=r},[r]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(0,t.width-32),n=Math.max(0,t.height-32);if(0===r||0===n)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>r&&(i=r,a=i/o),a>n&&(a=n,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>re.filter(e=>"mosaic"===e.type),[re]);a(()=>{const e=P.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const r=t.getContext("2d");r.drawImage(e,0,0);for(const e of Ne)C(r,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const r=t.createSVGPoint();r.x=e.clientX,r.y=e.clientY;const n=t.getScreenCTM();if(!n)return{x:0,y:0};const o=r.matrixTransform(n.inverse());return{x:o.x,y:o.y}},Le=e=>{we.current=e,be(!0)};a(()=>{if(!fe)return;const e=e=>{const t=we.current;if(!t)return;const r=Ce(e);if("draw"===t.kind)pe(b(I,t.start,r,S,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(r.x-e.x)>1||Math.abs(r.y-e.y)>1)&&(t.points.push(r),pe({id:"",type:"draw",points:t.points.slice(),color:S,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,r));else if("move"===t.kind){const e=r.x-t.start.x,n=r.y-t.start.y;ne(r=>r.map(r=>r.id===t.id?v(t.original,e,n):r))}else"resize"===t.kind&&ne(e=>e.map(e=>e.id===t.id?function(e,t,r){if("arrow"===e.type)return"start"===t?{...e,x1:r.x,y1:r.y}:"end"===t?{...e,x2:r.x,y2:r.y}:e;if("text"===e.type||"draw"===e.type)return e;const n=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=n,c=i,s=o,d=a;"nw"===t&&(l=r.x,c=r.y);"ne"===t&&(s=r.x,c=r.y);"se"===t&&(s=r.x,d=r.y);"sw"===t&&(l=r.x,d=r.y);const h=M({x:l,y:c},{x:s,y:d});return{...e,x:h.x,y:h.y,w:h.w,h:h.h}}(t.original,t.corner,r):e))},t=()=>{const e=we.current;if(we.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const r={...e,id:p()};return ne(e=>[...e,r]),ie(r.id),W("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:S,stroke:R};ne(e=>[...e,t]),ie(t.id),W("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[fe,I,S,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),ne(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),ne(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:U,italic:O,underline:V}[e];"bold"===e&&K(t),"italic"===e&&Z(t),"underline"===e&&X(t),oe&&ne(r=>r.map(r=>r.id===oe&&"text"===r.type?{...r,[e]:t}:r))},De=e=>{G(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Pe=e=>{_(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},$e=e=>{if(!ye)return;const t=e??ye.value;if(!t.trim())return ye.editingId&&ne(e=>e.filter(e=>e.id!==ye.editingId)),void xe(null);if(ye.editingId)ne(e=>e.map(e=>e.id===ye.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:ye.x,y:ye.y,text:t,color:S,size:F,font:T,bold:U,italic:O,underline:V,borderColor:q,background:Y,padding:J};ne(t=>[...t,e]),ie(e.id),W("select")}xe(null)},Ee=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const n=r.getContext("2d");n.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),n.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),r};l(N,()=>({save:async()=>{const t=await Ee();t&&t.toBlob(t=>{if(!t)return void e.error(E.current.exportFailed);const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r;const o=y.replace(/\.[^.]+$/,"");n.download=`${o}-annotated.png`,n.click(),URL.revokeObjectURL(r)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error(E.current.clipboardUnsupported);const t=await Ee();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success(E.current.copied)}catch{e.error(E.current.copyRefused)}else e.error(E.current.copyFailed)},"image/png")}}),[ae,y]);const Ie=i(()=>[{id:"select",label:$.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:$.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:$.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:$.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:$.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:$.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:$.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:$.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[$]),We=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-white":"text-gray-700 hover:bg-gray-200"),Se=Me?.type??("select"===I?null:I),Be="rect"===Se||"circle"===Se||"arrow"===Se||"draw"===Se,Re="rect"===Se,je="text"===Se;/* @__PURE__ */
1
+ import{toast_default as e}from"./chunk-OSVN2UF7.js";import{useShellStrings as t}from"./chunk-ETSKG62F.js";import{forwardRef as r,useRef as n,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var h=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],u=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),y=r(function({src:r,filename:y,onApply:m,onCancel:g},N){const L=n(null),z=n(null),D=n(null),E=n(null),P=t().annotator,$=n(P);$.current=P;const[S,I]=o("select"),[W,B]=o(h[0]),[R,j]=o(4),[F,H]=o(24),[T,U]=o(u[0].id),[A,O]=o(!0),[K,V]=o(!1),[Z,G]=o(!1),[X,q]=o(null),[Y,_]=o(null),[J,Q]=o(6),[ee,te]=o(12),[re,ne]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,he]=o(1),[ue,pe]=o(null),[ye,xe]=o(null),[me,ge]=o(null),we=n(null),[fe,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>re.find(e=>e.id===oe)??null,[re,oe]);a(()=>{"select"===S&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(H(Me.size),U(Me.font),O(Me.bold),V(Me.italic),G(Me.underline),q(Me.borderColor),_(Me.background),Q(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{E.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),ne([]),ie(null)},t.onerror=()=>e.error($.current.loadFailed),t.src=r},[r]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(0,t.width-32),n=Math.max(0,t.height-32);if(0===r||0===n)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>r&&(i=r,a=i/o),a>n&&(a=n,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>re.filter(e=>"mosaic"===e.type),[re]);a(()=>{const e=E.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const r=t.getContext("2d");r.drawImage(e,0,0);for(const e of Ne)C(r,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const r=t.createSVGPoint();r.x=e.clientX,r.y=e.clientY;const n=t.getScreenCTM();if(!n)return{x:0,y:0};const o=r.matrixTransform(n.inverse());return{x:o.x,y:o.y}},Le=e=>{we.current=e,be(!0)};a(()=>{if(!fe)return;const e=e=>{const t=we.current;if(!t)return;const r=Ce(e);if("draw"===t.kind)pe(b(S,t.start,r,W,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(r.x-e.x)>1||Math.abs(r.y-e.y)>1)&&(t.points.push(r),pe({id:"",type:"draw",points:t.points.slice(),color:W,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,r));else if("move"===t.kind){const e=r.x-t.start.x,n=r.y-t.start.y;ne(r=>r.map(r=>r.id===t.id?v(t.original,e,n):r))}else"resize"===t.kind&&ne(e=>e.map(e=>e.id===t.id?function(e,t,r){if("arrow"===e.type)return"start"===t?{...e,x1:r.x,y1:r.y}:"end"===t?{...e,x2:r.x,y2:r.y}:e;if("text"===e.type||"draw"===e.type)return e;const n=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=n,c=i,s=o,d=a;"nw"===t&&(l=r.x,c=r.y);"ne"===t&&(s=r.x,c=r.y);"se"===t&&(s=r.x,d=r.y);"sw"===t&&(l=r.x,d=r.y);const h=M({x:l,y:c},{x:s,y:d});return{...e,x:h.x,y:h.y,w:h.w,h:h.h}}(t.original,t.corner,r):e))},t=()=>{const e=we.current;if(we.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const r={...e,id:p()};return ne(e=>[...e,r]),ie(r.id),I("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:W,stroke:R};ne(e=>[...e,t]),ie(t.id),I("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[fe,S,W,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),ne(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),ne(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:K,underline:Z}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&G(t),oe&&ne(r=>r.map(r=>r.id===oe&&"text"===r.type?{...r,[e]:t}:r))},De=e=>{q(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Ee=e=>{_(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},Pe=e=>{if(!ye)return;const t=e??ye.value;if(!t.trim())return ye.editingId&&ne(e=>e.filter(e=>e.id!==ye.editingId)),void xe(null);if(ye.editingId)ne(e=>e.map(e=>e.id===ye.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:ye.x,y:ye.y,text:t,color:W,size:F,font:T,bold:A,italic:K,underline:Z,borderColor:X,background:Y,padding:J};ne(t=>[...t,e]),ie(e.id),I("select")}xe(null)},$e=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const n=r.getContext("2d");n.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),n.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),r};l(N,()=>({save:async()=>{const t=await $e();t&&t.toBlob(t=>{if(!t)return void e.error($.current.exportFailed);const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r;const o=y.replace(/\.[^.]+$/,"");n.download=`${o}-annotated.png`,n.click(),URL.revokeObjectURL(r)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error($.current.clipboardUnsupported);const t=await $e();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success($.current.copied)}catch{e.error($.current.copyRefused)}else e.error($.current.copyFailed)},"image/png")}}),[ae,y]);const Se=i(()=>[{id:"select",label:P.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:P.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:P.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:P.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:P.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:P.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:P.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:P.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[P]),Ie=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-white":"text-gray-700 hover:bg-gray-200"),We=Me?.type??("select"===S?null:S),Be="rect"===We||"circle"===We||"arrow"===We||"draw"===We,Re="rect"===We,je="text"===We;/* @__PURE__ */
2
2
  return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
3
- /* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-white shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{W(e.id),ie(null)},title:e.label,className:We(I===e.id),children:e.icon},e.id)),
3
+ /* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-white shrink-0 flex-wrap text-xs",children:[Se.map(e=>/* @__PURE__ */c("button",{onClick:()=>{I(e.id),ie(null)},title:e.label,className:Ie(S===e.id),children:e.icon},e.id)),
4
4
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
5
- /* @__PURE__ */c("div",{className:"flex items-center gap-1",children:h.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&ne(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(S===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
5
+ /* @__PURE__ */c("div",{className:"flex items-center gap-1",children:h.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&ne(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(W===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
6
6
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
7
7
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
8
- /* @__PURE__ */c("span",{children:$.weight}),
8
+ /* @__PURE__ */c("span",{children:P.weight}),
9
9
  /* @__PURE__ */c("input",{type:"range",min:1,max:20,step:1,value:R,onChange:e=>{return t=Number(e.target.value),j(t),void(oe&&ne(e=>e.map(e=>e.id!==oe?e:"rect"===e.type||"circle"===e.type||"arrow"===e.type||"draw"===e.type?{...e,stroke:t}:e)));var t},className:"w-16 accent-blue-500"}),
10
10
  /* @__PURE__ */c("span",{className:"tabular-nums w-5 text-right",children:R})]})]}),Re&&/* @__PURE__ */s(d,{children:[
11
11
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
12
12
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
13
- /* @__PURE__ */c("span",{children:$.radius}),
13
+ /* @__PURE__ */c("span",{children:P.radius}),
14
14
  /* @__PURE__ */c("input",{type:"range",min:0,max:48,step:1,value:ee,onChange:e=>{return t=Number(e.target.value),te(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"rect"===e.type?{...e,radius:t}:e)));var t},className:"w-16 accent-blue-500"}),
15
15
  /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:ee})]})]}),je&&/* @__PURE__ */s(d,{children:[
16
16
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
17
- /* @__PURE__ */c("select",{value:T,onChange:e=>{return t=e.target.value,A(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:u.map(e=>/* @__PURE__ */c("option",{value:e.id,children:$[e.name]},e.id))}),
18
- /* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:We(U),title:$.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:$.boldLetter})}),
19
- /* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:We(O),title:$.italic,children:/* @__PURE__ */c("span",{className:"italic",children:$.italicLetter})}),
20
- /* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:We(V),title:$.underline,children:/* @__PURE__ */c("span",{className:"underline",children:$.underlineLetter})}),
17
+ /* @__PURE__ */c("select",{value:T,onChange:e=>{return t=e.target.value,U(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:u.map(e=>/* @__PURE__ */c("option",{value:e.id,children:P[e.name]},e.id))}),
18
+ /* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:Ie(A),title:P.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:P.boldLetter})}),
19
+ /* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:Ie(K),title:P.italic,children:/* @__PURE__ */c("span",{className:"italic",children:P.italicLetter})}),
20
+ /* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:Ie(Z),title:P.underline,children:/* @__PURE__ */c("span",{className:"underline",children:P.underlineLetter})}),
21
21
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
22
- /* @__PURE__ */c("span",{children:$.size}),
22
+ /* @__PURE__ */c("span",{children:P.size}),
23
23
  /* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:F,onChange:e=>{return t=Number(e.target.value),H(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
24
24
  /* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:F})]}),
25
25
  /* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
26
- /* @__PURE__ */c("span",{children:$.border}),q?/* @__PURE__ */s(d,{children:[
27
- /* @__PURE__ */c("input",{type:"color",value:q,onChange:e=>De(e.target.value),title:$.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
28
- /* @__PURE__ */c("button",{onClick:()=>De(null),title:$.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(S),title:$.addBorder,className:"px-2 py-0.5 rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:$.add})]}),
26
+ /* @__PURE__ */c("span",{children:P.border}),X?/* @__PURE__ */s(d,{children:[
27
+ /* @__PURE__ */c("input",{type:"color",value:X,onChange:e=>De(e.target.value),title:P.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
28
+ /* @__PURE__ */c("button",{onClick:()=>De(null),title:P.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(W),title:P.addBorder,className:"px-2 py-0.5 rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:P.add})]}),
29
29
  /* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
30
- /* @__PURE__ */c("span",{children:$.fill}),Y?/* @__PURE__ */s(d,{children:[
31
- /* @__PURE__ */c("input",{type:"color",value:Y,onChange:e=>Pe(e.target.value),title:$.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
32
- /* @__PURE__ */c("button",{onClick:()=>Pe(null),title:$.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Pe("#ffffff"),title:$.addFill,className:"px-2 py-0.5 rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:$.add})]}),
30
+ /* @__PURE__ */c("span",{children:P.fill}),Y?/* @__PURE__ */s(d,{children:[
31
+ /* @__PURE__ */c("input",{type:"color",value:Y,onChange:e=>Ee(e.target.value),title:P.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
32
+ /* @__PURE__ */c("button",{onClick:()=>Ee(null),title:P.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Ee("#ffffff"),title:P.addFill,className:"px-2 py-0.5 rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:P.add})]}),
33
33
  /* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
34
- /* @__PURE__ */c("span",{children:$.padding}),
34
+ /* @__PURE__ */c("span",{children:P.padding}),
35
35
  /* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:J,onChange:e=>{return t=Number(e.target.value),Q(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
36
36
  /* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:J})]})]}),
37
37
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
38
- /* @__PURE__ */c("button",{onClick:()=>he(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.zoomOut,children:"−"}),
38
+ /* @__PURE__ */c("button",{onClick:()=>he(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomOut,children:"−"}),
39
39
  /* @__PURE__ */s("span",{className:"text-gray-600 tabular-nums w-10 text-center",children:[Math.round(100*de),"%"]}),
40
- /* @__PURE__ */c("button",{onClick:()=>he(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.zoomIn,children:"+"}),
41
- /* @__PURE__ */c("button",{onClick:()=>he(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:$.fitHint,children:$.fit}),
40
+ /* @__PURE__ */c("button",{onClick:()=>he(e=>Math.min(4,Math.round(100*(e+.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomIn,children:"+"}),
41
+ /* @__PURE__ */c("button",{onClick:()=>he(1),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.fitHint,children:P.fit}),
42
42
  /* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
43
- /* @__PURE__ */c("button",{onClick:()=>{ne(e=>e.slice(0,-1)),ie(null)},disabled:0===re.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:$.undo}),
43
+ /* @__PURE__ */c("button",{onClick:()=>{ne(e=>e.slice(0,-1)),ie(null)},disabled:0===re.length,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-700",children:P.undo}),
44
44
  /* @__PURE__ */s("div",{className:"ml-auto flex items-center gap-2",children:[me&&/* @__PURE__ */s(d,{children:[
45
- /* @__PURE__ */c("button",{onClick:()=>{if(!me||!P.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const r=t.getContext("2d"),n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const o=n.getContext("2d");o.drawImage(P.current,0,0);for(const e of Ne)C(o,e);r.drawImage(n,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{P.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),ne(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,r){const n=k(e);return n.x+n.w>0&&n.y+n.h>0&&n.x<t&&n.y<r}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:$.applyCrop}),
46
- /* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:$.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:$.cancel}),
47
- /* @__PURE__ */c("button",{onClick:async()=>{const t=await Ee();t?t.toBlob(t=>{t?m(t):e.error(E.current.exportFailed)},"image/png"):e.error(E.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:$.apply})]})]})]}),
45
+ /* @__PURE__ */c("button",{onClick:()=>{if(!me||!E.current||!ae)return;const e=me,t=document.createElement("canvas");t.width=Math.round(e.w),t.height=Math.round(e.h);const r=t.getContext("2d"),n=document.createElement("canvas");n.width=ae.w,n.height=ae.h;const o=n.getContext("2d");o.drawImage(E.current,0,0);for(const e of Ne)C(o,e);r.drawImage(n,e.x,e.y,e.w,e.h,0,0,e.w,e.h);const i=new Image;i.onload=()=>{E.current=i,le({w:i.naturalWidth,h:i.naturalHeight}),ne(t=>t.filter(e=>"mosaic"!==e.type).map(t=>v(t,-e.x,-e.y)).filter(e=>function(e,t,r){const n=k(e);return n.x+n.w>0&&n.y+n.h>0&&n.x<t&&n.y<r}(e,i.naturalWidth,i.naturalHeight))),ge(null)},i.src=t.toDataURL("image/png")},className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600",children:P.applyCrop}),
46
+ /* @__PURE__ */c("button",{onClick:()=>ge(null),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",children:P.cancel})]}),m&&!me&&/* @__PURE__ */s(d,{children:[g&&/* @__PURE__ */c("button",{onClick:g,className:"px-3 py-1 rounded hover:bg-gray-200 text-gray-700 text-xs font-medium",children:P.cancel}),
47
+ /* @__PURE__ */c("button",{onClick:async()=>{const t=await $e();t?t.toBlob(t=>{t?m(t):e.error($.current.exportFailed)},"image/png"):e.error($.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:P.apply})]})]})]}),
48
48
  /* @__PURE__ */c("div",{ref:L,className:"flex-1 overflow-auto bg-gray-200 flex items-center justify-center p-4 relative",children:ve&&ae&&/* @__PURE__ */s("div",{className:"relative shadow-lg rounded overflow-hidden bg-white shrink-0",style:{width:ve.w,height:ve.h},children:[
49
49
  /* @__PURE__ */c("canvas",{ref:z,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"}}),
50
- /* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(ye)return void $e();const t=Ce(e);return void xe({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:S,stroke:R});pe(b(I,t,t,S,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[re.map(e=>/* @__PURE__ */c(x,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&xe({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,r)=>((e,t,r)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:r,start:Ce(e),original:t})})(t,e,r)},e.id)),ue&&/* @__PURE__ */c(x,{anno:{...ue,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(w,{rect:me,imageSize:ae})]}),ye&&/* @__PURE__ */c(f,{pendingText:ye,color:S,size:F,font:u.find(e=>e.id===T)?.css??u[0].css,bold:U,italic:O,underline:V,borderColor:q,background:Y,padding:J,scale:ke,onChange:e=>xe({...ye,value:e}),onCommit:$e,onCancel:()=>xe(null)})]})}),
51
- /* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-gray-200 bg-white text-2xs text-gray-500 shrink-0",children:"select"===I?oe?$.hintSelected:$.hintSelect:"text"===I?$.hintText:"crop"===I?$.hintCrop:"draw"===I?$.hintDraw:$.hintShape})]})});function x({anno:e,selected:t,preview:r,zoom:n=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),h=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let y;if("rect"===e.type)y=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("circle"===e.type)y=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...h});else if("arrow"===e.type)y=/* @__PURE__ */c(g,{anno:e,interactive:h});else if("draw"===e.type)y=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("mosaic"===e.type)y=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...h});else{const t=u.find(t=>t.id===e.font)?.css??u[0].css,r=e.padding??0,n=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;y=/* @__PURE__ */s("g",{...h,...p,children:[n&&/* @__PURE__ */c("rect",{x:o.x-r,y:o.y-r,width:Math.max(0,o.w)+2*r,height:Math.max(0,o.h)+2*r,rx:Math.min(8,r),ry:Math.min(8,r),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
50
+ /* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===S?"default":"text"===S?"text":"crosshair"},onPointerDown:e=>{if("select"===S)return void ie(null);if("text"===S){if(ye)return void Pe();const t=Ce(e);return void xe({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==S){if("draw"===S)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(b(S,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[re.map(e=>/* @__PURE__ */c(x,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===S&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&xe({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,r)=>((e,t,r)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:r,start:Ce(e),original:t})})(t,e,r)},e.id)),ue&&/* @__PURE__ */c(x,{anno:{...ue,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(w,{rect:me,imageSize:ae})]}),ye&&/* @__PURE__ */c(f,{pendingText:ye,color:W,size:F,font:u.find(e=>e.id===T)?.css??u[0].css,bold:A,italic:K,underline:Z,borderColor:X,background:Y,padding:J,scale:ke,onChange:e=>xe({...ye,value:e}),onCommit:Pe,onCancel:()=>xe(null)})]})}),
51
+ /* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-gray-200 bg-white text-2xs text-gray-500 shrink-0",children:"select"===S?oe?P.hintSelected:P.hintSelect:"text"===S?P.hintText:"crop"===S?P.hintCrop:"draw"===S?P.hintDraw:P.hintShape})]})});function x({anno:e,selected:t,preview:r,zoom:n=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),h=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let y;if("rect"===e.type)y=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("circle"===e.type)y=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...h});else if("arrow"===e.type)y=/* @__PURE__ */c(g,{anno:e,interactive:h});else if("draw"===e.type)y=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("mosaic"===e.type)y=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...h});else{const t=u.find(t=>t.id===e.font)?.css??u[0].css,r=e.padding??0,n=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;y=/* @__PURE__ */s("g",{...h,...p,children:[n&&/* @__PURE__ */c("rect",{x:o.x-r,y:o.y-r,width:Math.max(0,o.w)+2*r,height:Math.max(0,o.h)+2*r,rx:Math.min(8,r),ry:Math.min(8,r),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
52
52
  /* @__PURE__ */c("text",{x:e.x,y:e.y+e.size,fill:e.color,fontSize:e.size,fontWeight:e.bold?700:400,fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":void 0,fontFamily:t,style:{userSelect:"none"},children:e.text.split("\n").map((t,r)=>/* @__PURE__ */c("tspan",{x:e.x,dy:0===r?0:1.2*e.size,children:t},r))})]})}/* @__PURE__ */
53
53
  return s("g",{children:[y,t&&!r&&/* @__PURE__ */s(d,{children:[
54
54
  /* @__PURE__ */c("rect",{"data-chrome":"selection",x:l.x-4,y:l.y-4,width:l.w+8,height:l.h+8,fill:"none",stroke:"#3b82f6",strokeWidth:2/n,strokeDasharray:`${6/n},${4/n}`,pointerEvents:"none"}),a&&/* @__PURE__ */c(m,{anno:e,zoom:n,onHandlePointerDown:a})]})]})}function m({anno:e,zoom:t,onHandlePointerDown:r}){const n=6/t,o=1.5/t,i=e=>({fill:"#fff",stroke:"#3b82f6",strokeWidth:o,pointerEvents:"all",style:{cursor:e},"data-chrome":"handle"});if("arrow"===e.type)/* @__PURE__ */
@@ -1,11 +1,11 @@
1
- import{FormField as e}from"./chunk-MVQBVPWP.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-KB6BGPQK.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-ZNZDV6SN.js";import{useShellStrings as l}from"./chunk-KKZZAK76.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const K=m(),P=l().files,$=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),z=j?`${K}-error`:N?`${K}-hint`:void 0;/* @__PURE__ */
2
- return o(e,{label:g,htmlFor:K,hint:N,error:j,required:k,className:v,children:[
3
- /* @__PURE__ */o("button",{ref:B,type:"button",id:K,disabled:y,onClick:$.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":z,...$.zoneProps,className:t($.dragOver,y,a(y),"px-4 py-6"),children:[
1
+ import{FormField as e}from"./chunk-MVQBVPWP.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-6GVJ6IKD.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-PG6AVBSR.js";import{useShellStrings as l}from"./chunk-ETSKG62F.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},P){const $=m(),z=l().files,B=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),C=j?`${$}-error`:N?`${$}-hint`:void 0;/* @__PURE__ */
2
+ return o(e,{label:g,htmlFor:$,hint:N,error:j,required:k,className:v,children:[
3
+ /* @__PURE__ */o("button",{ref:P,type:"button",id:$,disabled:y,onClick:B.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":C,...B.zoneProps,className:t(B.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
5
- /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?P.chooseMany:P.chooseOne}),
6
- /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?P.dragMany:P.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
- /* @__PURE__ */d("input",{...$.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
5
+ /* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?z.chooseMany:z.chooseOne}),
6
+ /* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?z.dragMany:z.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
7
+ /* @__PURE__ */d("input",{...B.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
8
8
  /* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
9
- /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,P)}),
10
- /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{$.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":P.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
- /* @__PURE__ */d(s,{rejections:$.rejections})]})});export{p as FilePicker_default};
9
+ /* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,z)}),
10
+ /* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{B.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":z.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
11
+ /* @__PURE__ */d(s,{rejections:B.rejections})]})});export{p as FilePicker_default};
@@ -1,7 +1,7 @@
1
- import{CountBadge as e}from"./chunk-7RD623PT.js";import{Icon as n}from"./chunk-42BBJJDP.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-KKZZAK76.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as s}from"react";import{jsx as o,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-gray-50",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),A=s(),C=`h${x}`,K=p??w;/* @__PURE__ */
2
- return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=K.includes(i.id),a=`${A}-${m(i.id)}-head`,s=`${A}-${m(i.id)}-panel`;/* @__PURE__ */
1
+ import{CountBadge as e}from"./chunk-YGEK2Z6P.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-ETSKG62F.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as s}from"react";import{jsx as o,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-gray-50",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),C=s(),I=`h${x}`,K=p??w;/* @__PURE__ */
2
+ return o("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=K.includes(i.id),a=`${C}-${m(i.id)}-head`,s=`${C}-${m(i.id)}-panel`;/* @__PURE__ */
3
3
  return c("div",{children:[
4
- /* @__PURE__ */o(C,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=K.includes(e)?K.filter(n=>n!==e):v?[...K,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */o("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
4
+ /* @__PURE__ */o(I,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?s:void 0,onClick:()=>(e=>{const n=K.includes(e)?K.filter(n=>n!==e):v?[...K,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */o("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
5
5
  /* @__PURE__ */o("span",{className:`min-w-0 flex-1 ${N.title}`,children:i.title}),"number"==typeof i.count&&i.count>0&&
6
6
  /* @__PURE__ */c(l,{children:[
7
7
  /* @__PURE__ */o("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */o(e,{count:i.count,tone:"accent"})}),
@@ -0,0 +1,15 @@
1
+ import{AccessibleTable as e}from"./chunk-CDRXZBVR.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-ETSKG62F.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:$,emptyLabel:C}){const F=m().charts,R=c(),W=N??(e=>h(e,R)),w=C??F.nothingToCompare,T=p(),[A,B]=u(null),{highlighted:E}=a(),L=x;if(k.length<3||0===L.length)/* @__PURE__ */
2
+ return d("p",{className:`text-sm text-gray-500 ${$??""}`,children:w});const U=y/2,z=y/2,O=y/2-46,S=n(k.length),V=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...L.map(e=>e.values[t]??0).filter(Number.isFinite))),Y=(e,t)=>{const r=Math.max(0,Math.min(1,t/V[e])),l=S.center(e)-S.step/2;return[U+O*r*Math.cos(l),z+O*r*Math.sin(l)]},Z=(e,t)=>null!==A?A!==e:null!==E&&E!==t,H=null!==A?L[A]:void 0;/* @__PURE__ */
3
+ return f("div",{className:`relative ${$??""}`,children:[
4
+ /* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":T,onMouseLeave:()=>B(null),children:[
5
+ /* @__PURE__ */d("title",{id:T,children:F.acrossMeasures(L.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=O*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:U,cy:z,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(U,z,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Y(t,V[t]);/* @__PURE__ */
6
+ return f("g",{children:[
7
+ /* @__PURE__ */d("line",{x1:U,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
8
+ /* @__PURE__ */d("text",{x:U+(O+18)*Math.cos(S.center(t)-S.step/2),y:z+(O+18)*Math.sin(S.center(t)-S.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
9
+ /* @__PURE__ */d(r,{id:T,reveal:!!j&&"center-out"}),L.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Y(r,e.values[r]??0));/* @__PURE__ */
10
+ return f("g",{opacity:Z(t,e.key)?.3:1,onMouseEnter:()=>B(t),mask:j?`url(#${l(T)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
11
+ /* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),H&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:H.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(A,3,H.color,H.tone),value:W(H.values[t]??0)}))})}),
12
+ /* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:L.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
13
+ /* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
14
+ /* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
15
+ /* @__PURE__ */d(e,{caption:F.acrossMeasures(L.map(e=>e.label),k.length),head:[F.tableSeries,...k.map(e=>e.label)],rows:L.map(e=>[e.label,...k.map((t,r)=>W(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
@@ -1 +1 @@
1
- import{requestFilesTrashView as n}from"./chunk-4MTC6HA5.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};
1
+ import{requestFilesTrashView as n}from"./chunk-RAAUW5OZ.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};
@@ -1,4 +1,4 @@
1
- import{ErrorPage as r}from"./chunk-YZCRHDOB.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-UDD7GB4F.js";import{useShellStrings as s}from"./chunk-KKZZAK76.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
1
+ import{ErrorPage as r}from"./chunk-CU2B7G5A.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-4IU5BSVE.js";import{useShellStrings as s}from"./chunk-ETSKG62F.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
2
2
  return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
3
3
  /* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
4
4
  /* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
@@ -1,2 +1,2 @@
1
- import{InputNumber_default as a}from"./chunk-IH4SVMXJ.js";import{Icon as e}from"./chunk-42BBJJDP.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
1
+ import{InputNumber_default as a}from"./chunk-VX4BNYH3.js";import{Icon as e}from"./chunk-KIBL6M3T.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
2
2
  return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
@@ -1,4 +1,4 @@
1
- import{Button_default as e}from"./chunk-UDD7GB4F.js";import{Icon as r}from"./chunk-42BBJJDP.js";import{useShellStrings as t}from"./chunk-KKZZAK76.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
1
+ import{Button_default as e}from"./chunk-4IU5BSVE.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as t}from"./chunk-ETSKG62F.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
2
2
  return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
3
3
  /* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
4
4
  /* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
@@ -1,14 +1,14 @@
1
- import{CountBadge as e}from"./chunk-7RD623PT.js";import{SettingAutoContext as t,InSettingRowContext as a}from"./chunk-E4Z5OXBI.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{useShellStrings as n}from"./chunk-KKZZAK76.js";import{jsx as s,jsxs as r}from"react/jsx-runtime";var l={default:{pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},compact:{pad:"py-2",gap:"gap-2",text:"text-sm",bodyTop:"mt-2",bodyPad:"pt-2"}};function d({label:d,icon:c,action:m,value:o,readout:p,description:h,children:x,controlId:u,unknownText:g="—",quiet:f=!1,size:v="default",viewState:y,divider:N=!0,showWhen:w,values:b,context:$,className:j=""}){const k=n();if(!i(w,b,$))return null;const P=l[v],T=void 0!==o||void 0===x&&null==m,K=null==o||""===o,Z=f?"text-gray-500":"text-gray-800",A=K?"text-gray-400":f?"text-gray-500":"text-gray-900",B=null!=p&&!1!==p,I=`${P.text} font-medium ${Z}${"compact"===v?" whitespace-nowrap":""}`,O=u?/* @__PURE__ */s("label",{htmlFor:u,className:I,children:d}):/* @__PURE__ */s("span",{className:I,children:d}),V="auto"===y?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-gray-200 px-1 text-2xs font-normal leading-4 text-gray-500",children:k.settingView.auto}):"edited"===y?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
1
+ import{CountBadge as e}from"./chunk-YGEK2Z6P.js";import{SettingAutoContext as t,InSettingRowContext as a}from"./chunk-E4Z5OXBI.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{useShellStrings as n}from"./chunk-ETSKG62F.js";import{jsx as s,jsxs as r}from"react/jsx-runtime";var l={default:{pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},compact:{pad:"py-2",gap:"gap-2",text:"text-sm",bodyTop:"mt-2",bodyPad:"pt-2"}};function d({label:d,icon:c,action:m,value:o,readout:p,description:h,children:x,controlId:u,unknownText:g="—",quiet:f=!1,size:v="default",viewState:y,divider:N=!0,showWhen:w,values:b,context:$,className:j=""}){const k=n();if(!i(w,b,$))return null;const P=l[v],T=void 0!==o||void 0===x&&null==m,E=null==o||""===o,B=f?"text-gray-500":"text-gray-800",F=E?"text-gray-400":f?"text-gray-500":"text-gray-900",G=null!=p&&!1!==p,I=`${P.text} font-medium ${B}${"compact"===v?" whitespace-nowrap":""}`,K=u?/* @__PURE__ */s("label",{htmlFor:u,className:I,children:d}):/* @__PURE__ */s("span",{className:I,children:d}),O="auto"===y?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-gray-200 px-1 text-2xs font-normal leading-4 text-gray-500",children:k.settingView.auto}):"edited"===y?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
2
2
  /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
3
- /* @__PURE__ */s("span",{className:"sr-only",children:k.settingView.edited})]}):null,W=/* @__PURE__ */s(t.Provider,{value:"auto"===y,children:K?g:o}),q=[N?"border-t border-gray-100 first:border-t-0":"",P.pad,j].filter(Boolean).join(" "),z=null!=x&&!1!==x&&/* @__PURE__ */s("div",{className:`${P.bodyTop} border-t border-gray-100 ${P.bodyPad}`,children:x});/* @__PURE__ */
4
- return r("div",B?{className:q,"data-setting-row":"compact"===v?v:void 0,children:[
3
+ /* @__PURE__ */s("span",{className:"sr-only",children:k.settingView.edited})]}):null,S=/* @__PURE__ */s(t.Provider,{value:"auto"===y,children:E?g:o}),V=[N?"border-t border-gray-100 first:border-t-0":"",P.pad,j].filter(Boolean).join(" "),W=null!=x&&!1!==x&&/* @__PURE__ */s("div",{className:`${P.bodyTop} border-t border-gray-100 ${P.bodyPad}`,children:x});/* @__PURE__ */
4
+ return r("div",G?{className:V,"data-setting-row":"compact"===v?v:void 0,children:[
5
5
  /* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
6
- /* @__PURE__ */s("div",{"data-setting-name":"compact"===v?"":void 0,className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${Z}`,children:[null!=c&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:c}),O,V]})}),
6
+ /* @__PURE__ */s("div",{"data-setting-name":"compact"===v?"":void 0,className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${B}`,children:[null!=c&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:c}),K,O]})}),
7
7
  /* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
8
- /* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${P.text} ${f?"text-gray-500":"text-gray-900"}`,children:p}),("compact"===v||null!=m)&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:m})]})]}),h&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-gray-500",children:h}),void 0!==o&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${P.text} ${A}`,children:/* @__PURE__ */s(a.Provider,{value:"compact"===v,children:W})}),z]}:{className:q,"data-setting-row":"compact"===v?v:void 0,children:[
8
+ /* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${P.text} ${f?"text-gray-500":"text-gray-900"}`,children:p}),("compact"===v||null!=m)&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:m})]})]}),h&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-gray-500",children:h}),void 0!==o&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${P.text} ${F}`,children:/* @__PURE__ */s(a.Provider,{value:"compact"===v,children:S})}),W]}:{className:V,"data-setting-row":"compact"===v?v:void 0,children:[
9
9
  /* @__PURE__ */r("div",{className:"compact"===v?"flex flex-wrap items-center justify-between gap-x-2 gap-y-2":`flex items-center justify-between ${P.gap}`,children:[
10
10
  /* @__PURE__ */r("div",{"data-setting-name":"compact"===v?"":void 0,className:"compact"===v?"flex-1 basis-0":"min-w-0 flex-1",children:[null!=c?
11
- /* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${Z}`,children:[
12
- /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:c}),O,V]}):V?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[O,V]}):O,h&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-gray-500",children:h})]}),"compact"===v?
13
- /* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`flex items-center justify-end ${P.text} ${A}`,children:/* @__PURE__ */s(a.Provider,{value:!0,children:W})}),
14
- /* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:m})]}):null!=m?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&/* @__PURE__ */s("div",{className:`${P.text} ${A}`,children:W}),m]}):T&&/* @__PURE__ */s("div",{className:`shrink-0 ${P.text} ${A}`,children:W})]}),z]})}export{d as SettingRow};
11
+ /* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${B}`,children:[
12
+ /* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:c}),K,O]}):O?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[K,O]}):K,h&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-gray-500",children:h})]}),"compact"===v?
13
+ /* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`flex items-center justify-end ${P.text} ${F}`,children:/* @__PURE__ */s(a.Provider,{value:!0,children:S})}),
14
+ /* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:m})]}):null!=m?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&/* @__PURE__ */s("div",{className:`${P.text} ${F}`,children:S}),m]}):T&&/* @__PURE__ */s("div",{className:`shrink-0 ${P.text} ${F}`,children:S})]}),W]})}export{d as SettingRow};
@@ -1,14 +1,14 @@
1
- import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-42BBJJDP.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-KKZZAK76.js";import{useMemo as l,useState as i,useRef as s,useEffect as c}from"react";import{jsxs as u,jsx as g,Fragment as d}from"react/jsx-runtime";var h=e=>String(e).padStart(2,"0"),m="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";function b(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function f(e){if(!e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}var y=e=>`${e.getFullYear()}-${h(e.getMonth()+1)}`;var v=()=>b(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:h,endValue:w,mode:N="single",onSelect:D,min:M,max:Y,month:k,defaultMonth:F,onMonthChange:j,weekStartsOn:A,quickJump:$=!0,markedDates:S,readOnly:C=!1,"aria-label":K,className:P=""}){const q=l(()=>new Set(S??[]),[S]),J=f(h),B=a(v,null),O=f(B),T=n().calendar,E=o(),H=e(E),U=a(()=>t(E),0),W=A??U,Z=()=>{if(!O)return null;const e=y(O);return M&&e<M.slice(0,7)?M.slice(0,7):Y&&e>Y.slice(0,7)?Y.slice(0,7):e},[G,I]=i(()=>F||(J?y(J):Z())),L=k??G??Z(),R=null===L?null:function(e,t){const r=/^(\d{4})-(\d{2})$/.exec(e);return r?new Date(Number(r[1]),Number(r[2])-1,1):t}(L,O),[V,z]=i(()=>h??B),Q=s(null),X=s(!1),[_,ee]=i("days"),te=l(()=>R?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(R,W):[],[L,W]),re=e=>!!M&&e<M||!!Y&&e>Y,ae=V??B,ne=te.some(e=>b(e)===ae),oe=R?te.find(e=>e.getMonth()===R.getMonth())??te[0]:null,le=ne&&ae?ae:oe?b(oe):"";if(c(()=>{X.current&&(X.current=!1,Q.current?.querySelector('[data-active="true"]')?.focus())},[le,L]),!R)/* @__PURE__ */
2
- return u("div",{className:P,"aria-hidden":"true","data-calendar-pending":"",children:[
1
+ import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-ETSKG62F.js";import{useMemo as l,useState as i,useRef as s,useEffect as c}from"react";import{jsxs as u,jsx as g,Fragment as d}from"react/jsx-runtime";var h=e=>String(e).padStart(2,"0"),m="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";function b(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function f(e){if(!e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}var y=e=>`${e.getFullYear()}-${h(e.getMonth()+1)}`;var v=()=>b(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:h,endValue:w,mode:N="single",onSelect:D,min:M,max:Y,month:k,defaultMonth:F,onMonthChange:j,weekStartsOn:S,quickJump:$=!0,markedDates:A,readOnly:C=!1,"aria-label":K,className:T=""}){const q=l(()=>new Set(A??[]),[A]),P=f(h),E=a(v,null),O=f(E),B=n().calendar,G=o(),H=e(G),I=a(()=>t(G),0),J=S??I,L=()=>{if(!O)return null;const e=y(O);return M&&e<M.slice(0,7)?M.slice(0,7):Y&&e>Y.slice(0,7)?Y.slice(0,7):e},[U,W]=i(()=>F||(P?y(P):L())),R=k??U??L(),V=null===R?null:function(e,t){const r=/^(\d{4})-(\d{2})$/.exec(e);return r?new Date(Number(r[1]),Number(r[2])-1,1):t}(R,O),[z,Q]=i(()=>h??E),X=s(null),Z=s(!1),[_,ee]=i("days"),te=l(()=>V?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(V,J):[],[R,J]),re=e=>!!M&&e<M||!!Y&&e>Y,ae=z??E,ne=te.some(e=>b(e)===ae),oe=V?te.find(e=>e.getMonth()===V.getMonth())??te[0]:null,le=ne&&ae?ae:oe?b(oe):"";if(c(()=>{Z.current&&(Z.current=!1,X.current?.querySelector('[data-active="true"]')?.focus())},[le,R]),!V)/* @__PURE__ */
2
+ return u("div",{className:T,"aria-hidden":"true","data-calendar-pending":"",children:[
3
3
  /* @__PURE__ */g("div",{className:"mb-2 h-6"}),
4
- /* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(R.getFullYear()+12*e,R.getMonth(),1):"months"===_?new Date(R.getFullYear()+e,R.getMonth(),1):x(R,e),se=e=>{const t=y(e);void 0===k&&I(t),j?.(t)},ce=K??H.monthYear(R.getFullYear(),R.getMonth());/* @__PURE__ */
5
- return u("div",{className:P,children:[
4
+ /* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(V.getFullYear()+12*e,V.getMonth(),1):"months"===_?new Date(V.getFullYear()+e,V.getMonth(),1):x(V,e),se=e=>{const t=y(e);void 0===k&&W(t),j?.(t)},ce=K??H.monthYear(V.getFullYear(),V.getMonth());/* @__PURE__ */
5
+ return u("div",{className:T,children:[
6
6
  /* @__PURE__ */u("div",{className:"mb-2 flex items-center justify-between px-1",children:[
7
- /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?T.previousYears:"months"===_?T.previousYear:T.previousMonth,onClick:()=>se(ie(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
8
- /* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:$?/* @__PURE__ */u(d,{children:["years"!==_&&/* @__PURE__ */g("button",{type:"button","aria-label":T.chooseMonth(H.months[R.getMonth()]),onClick:()=>ee(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:H.months[R.getMonth()]}),
9
- /* @__PURE__ */g("button",{type:"button","aria-label":T.chooseYear(R.getFullYear()),onClick:()=>ee(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:R.getFullYear()})]}):/* @__PURE__ */g("span",{children:H.monthYear(R.getFullYear(),R.getMonth())})}),
10
- /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?T.nextYears:"months"===_?T.nextYear:T.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":T.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:H.monthsShort.map((e,t)=>/* @__PURE__ */g("button",{type:"button","aria-pressed":t===R.getMonth(),onClick:()=>{se(new Date(R.getFullYear(),t,1)),ee("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===R.getMonth()?"bg-blue-600 font-semibold text-white":O&&t===O.getMonth()&&R.getFullYear()===O.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":T.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=R.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */g("button",{type:"button","aria-pressed":e===R.getFullYear(),onClick:()=>{se(new Date(e,R.getMonth(),1)),ee("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===R.getFullYear()?"bg-blue-600 font-semibold text-white":e===O?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
11
- /* @__PURE__ */u("div",{ref:Q,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??O??R,r={ArrowLeft:()=>p(t,-1),ArrowRight:()=>p(t,1),ArrowUp:()=>p(t,-7),ArrowDown:()=>p(t,7),Home:()=>p(t,-(t.getDay()-W+7)%7),End:()=>p(t,6-(t.getDay()-W+7)%7),PageUp:()=>x(t,e.shiftKey?-12:-1),PageDown:()=>x(t,e.shiftKey?12:1)};if(r[e.key])return e.preventDefault(),a=r[e.key](),X.current=!0,z(b(a)),void(y(a)!==L&&se(a));var a;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C||re(le)||D(le))},hidden:"days"!==_,children:[
12
- /* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-xs font-medium text-gray-500`,children:Array.from({length:7},(e,t)=>(t+W)%7).map(e=>
13
- /* @__PURE__ */g("div",{role:"columnheader","aria-label":H.weekdays[e],className:"py-1",children:/* @__PURE__ */g("abbr",{title:H.weekdays[e],className:"no-underline",children:H.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-sm`,children:te.slice(7*t,7*t+7).map(e=>{const t=b(e),r=e.getMonth()!==R.getMonth(),a=t===h||"range"===N&&t===w,n=(e=>!("range"!==N||!h||!w)&&e>h&&e<w)(t),o=re(t),l=H.longDate(e.getFullYear(),e.getMonth(),e.getDate()),i=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"cursor-not-allowed text-gray-300":a?"bg-blue-600 font-semibold text-white":n?"bg-blue-100 text-blue-800":r?"text-gray-500"+(e?" hover:bg-gray-100":""):"text-gray-700"+(e?" hover:bg-gray-100":""),t!==B||a?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),s=q.has(t)&&/* @__PURE__ */g("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(a?"bg-white":r?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
14
- return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===B?"date":void 0,onClick:()=>{z(t),D(t)},className:i(!0),children:[e.getDate(),s]})},t)})},t))]})]})}export{w as Calendar,f as fromKey,b as toKey};
7
+ /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?B.previousYears:"months"===_?B.previousYear:B.previousMonth,onClick:()=>se(ie(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
8
+ /* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:$?/* @__PURE__ */u(d,{children:["years"!==_&&/* @__PURE__ */g("button",{type:"button","aria-label":B.chooseMonth(H.months[V.getMonth()]),onClick:()=>ee(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:H.months[V.getMonth()]}),
9
+ /* @__PURE__ */g("button",{type:"button","aria-label":B.chooseYear(V.getFullYear()),onClick:()=>ee(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:V.getFullYear()})]}):/* @__PURE__ */g("span",{children:H.monthYear(V.getFullYear(),V.getMonth())})}),
10
+ /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?B.nextYears:"months"===_?B.nextYear:B.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":B.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:H.monthsShort.map((e,t)=>/* @__PURE__ */g("button",{type:"button","aria-pressed":t===V.getMonth(),onClick:()=>{se(new Date(V.getFullYear(),t,1)),ee("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===V.getMonth()?"bg-blue-600 font-semibold text-white":O&&t===O.getMonth()&&V.getFullYear()===O.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":B.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=V.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */g("button",{type:"button","aria-pressed":e===V.getFullYear(),onClick:()=>{se(new Date(e,V.getMonth(),1)),ee("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===V.getFullYear()?"bg-blue-600 font-semibold text-white":e===O?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
11
+ /* @__PURE__ */u("div",{ref:X,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??O??V,r={ArrowLeft:()=>p(t,-1),ArrowRight:()=>p(t,1),ArrowUp:()=>p(t,-7),ArrowDown:()=>p(t,7),Home:()=>p(t,-(t.getDay()-J+7)%7),End:()=>p(t,6-(t.getDay()-J+7)%7),PageUp:()=>x(t,e.shiftKey?-12:-1),PageDown:()=>x(t,e.shiftKey?12:1)};if(r[e.key])return e.preventDefault(),a=r[e.key](),Z.current=!0,Q(b(a)),void(y(a)!==R&&se(a));var a;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C||re(le)||D(le))},hidden:"days"!==_,children:[
12
+ /* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-xs font-medium text-gray-500`,children:Array.from({length:7},(e,t)=>(t+J)%7).map(e=>
13
+ /* @__PURE__ */g("div",{role:"columnheader","aria-label":H.weekdays[e],className:"py-1",children:/* @__PURE__ */g("abbr",{title:H.weekdays[e],className:"no-underline",children:H.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-sm`,children:te.slice(7*t,7*t+7).map(e=>{const t=b(e),r=e.getMonth()!==V.getMonth(),a=t===h||"range"===N&&t===w,n=(e=>!("range"!==N||!h||!w)&&e>h&&e<w)(t),o=re(t),l=H.longDate(e.getFullYear(),e.getMonth(),e.getDate()),i=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"cursor-not-allowed text-gray-300":a?"bg-blue-600 font-semibold text-white":n?"bg-blue-100 text-blue-800":r?"text-gray-500"+(e?" hover:bg-gray-100":""):"text-gray-700"+(e?" hover:bg-gray-100":""),t!==E||a?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),s=q.has(t)&&/* @__PURE__ */g("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(a?"bg-white":r?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
14
+ return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===E?"date":void 0,onClick:()=>{Q(t),D(t)},className:i(!0),children:[e.getDate(),s]})},t)})},t))]})]})}export{w as Calendar,f as fromKey,b as toKey};
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-5GMWOYTF.js";import{PLACEHOLDER_INK as t}from"./chunk-JFSYWEHD.js";import{Icon as r}from"./chunk-42BBJJDP.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-KKZZAK76.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,w]=s(""),[N,k]=s(null),[j,C]=s({}),M=v.trim().toLowerCase(),_=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),B=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),L=n(()=>_.map(e=>({...e,docs:e.docs.filter(B)})).filter(e=>e.docs.length>0),[_,M]),A=n(()=>L.flatMap(e=>e.docs),[L]),D=(N?A.find(e=>e.slug===N):void 0)??A[0]??null,E=e=>!!M||(j[e]??e===D?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-AH2AUQYM.js";import{PLACEHOLDER_INK as t}from"./chunk-JFSYWEHD.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-ETSKG62F.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,w]=s(""),[N,k]=s(null),[j,C]=s({}),M=v.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),_=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),A=n(()=>L.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[L,M]),E=n(()=>A.flatMap(e=>e.docs),[A]),B=(N?E.find(e=>e.slug===N):void 0)??E[0]??null,Y=e=>!!M||(j[e]??e===B?.category);/* @__PURE__ */
2
2
  return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */o("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */o("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */i("div",{className:"px-3 py-2 border-b border-gray-100 shrink-0",children:/* @__PURE__ */o("div",{className:"relative",children:[
7
7
  /* @__PURE__ */i(r,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */i("input",{type:"text",value:v,onChange:e=>w(e.target.value),placeholder:b.help.searchPlaceholder,className:"w-full rounded-md border border-gray-300 bg-white h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===L.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?b.help.noResults:f??b.help.empty}):L.map(e=>{const t=E(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===A.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?b.help.noResults:f??b.help.empty}):A.map(e=>{const t=Y(e.key);/* @__PURE__ */
10
10
  return o("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,C(e=>({...e,[t]:!E(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
11
+ /* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,C(e=>({...e,[t]:!Y(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
12
12
  /* @__PURE__ */i(d,{open:t}),
13
- /* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=D?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=B?.slug===e.slug;/* @__PURE__ */
14
14
  return o("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */i("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */i("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:b.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:D?/* @__PURE__ */o(c,{children:[
16
+ /* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:B?/* @__PURE__ */o(c,{children:[
17
17
  /* @__PURE__ */o("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */o("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:D.title}),
20
- /* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[D.category_label,!1===D.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(D),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
21
- /* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(D):D.body?/* @__PURE__ */i(e,{children:D.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:B.title}),
20
+ /* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[B.category_label,!1===B.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(B),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
21
+ /* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(B):B.body?/* @__PURE__ */i(e,{children:B.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -1,23 +1,23 @@
1
- import{Calendar as e,fromKey as t}from"./chunk-TKBP5HRY.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{FILTER_ON as n,FILTER_ON_INK as a,FILTER_OFF as o}from"./chunk-JFSYWEHD.js";import{buttonClasses as l}from"./chunk-K7U4RWXJ.js";import{Icon as i}from"./chunk-42BBJJDP.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-KKZZAK76.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as y}from"react-dom";import{jsxs as v,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],C=e=>`${e.getFullYear()}-${$(e.getMonth()+1)}`,$=e=>String(e).padStart(2,"0");function D(e){return`${e.getFullYear()}-${$(e.getMonth()+1)}-${$(e.getDate())}`}function M(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),l=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:D(new Date(r,n,t.getDate()-14)),to:D(a)};case"lastMonth":return{from:D(l(1)),to:D(o)};case"last3Months":return{from:D(l(3)),to:D(o)};case"last6Months":return{from:D(l(6)),to:D(o)};case"last12Months":return{from:D(l(12)),to:D(o)}}}function W(e,t,r){const n=C(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function J({from:$,to:D,onChange:J,formatDisplay:O,clearable:R,required:T=!1,name:B,id:H,"aria-labelledby":Y,"aria-label":E,weekStartsOn:K,placeholder:L,fullWidth:G=!1,min:U,max:q,disabled:A=!1,allowOpenEnd:I=!1}){const P=p().dateRange,Z=h(),z=O??(Z?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(Z):S),V=L??P.placeholder,X=R??!T,[Q,_]=f(!1),[ee,te]=f($),[re,ne]=f(D),[ae,oe]=f(null),[le,ie]=f("from"),se=g(null),de=g(null),ce=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=c(se,Q,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:ce}),be=g(null),xe=g(null),[ye,ve]=f(!0);m(()=>{const e=xe.current;if(!Q||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&ve(a)});const we=g(null);m(()=>{const e=ce.current;if(!Q||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!H&&(de.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Ce=!!E||!!Y||Ne,$e=/* @__PURE__ */new Date,[De,Me]=f(()=>$?C(j($)):W($e,U,q)),We=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(M(e,$e),U,q)),je=e=>e?z(e):"";x(()=>{if(!Q)return;const e=e=>{const t=e.target;se.current?.contains(t)||ce.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[Q]),x(()=>{A&&_(!1)},[A]);const Se=()=>{J("",""),_(!1)},Fe=$&&D?`${je($)} — ${je(D)}`:$?P.fromOnly(je($)):D?P.toOnly(je(D)):"",Je=r(Z),Oe=e=>{const r=t(e);return r?Je.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},Re=$&&D?P.range(Oe($),Oe(D)):$?P.fromOnly(Oe($)):D?P.toOnly(Oe(D)):V,Te=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-blue-50 text-blue-700 font-medium":"border-gray-200 text-gray-700 hover:bg-gray-50"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),Be=/* @__PURE__ */v(w,{children:[We.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=M(e,$e);te(t.from),ne(t.to),oe(e),Me(t.from.slice(0,7))})(e),className:Te(e),"aria-label":he?P[e]:void 0,children:he?ye?P[e]:P[`${e}Short`]:P[e]},e)),
2
- /* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Te("Custom"),children:P.custom})]}),He=(e,t)=>I?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":le===e,onClick:()=>ie(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Ye=e=>I&&le===e?" ring-1 ring-blue-400":"",Ee=
3
- /* @__PURE__ */N(e,{mode:"range",min:U,max:q,value:ee||null,endValue:re||null,month:De,onMonthChange:Me,onSelect:e=>{oe("Custom"),I?"from"===le?(re&&e>re?(te(re),ne(e)):te(e),ie("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:K,"aria-label":P.dialog});/* @__PURE__ */
4
- return v("div",{className:"relative"+(G?" w-full":""),ref:se,children:[
5
- /* @__PURE__ */v("div",{className:`${G?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${$||D?`${n} ${a}`:o}${A?" cursor-not-allowed opacity-60":""}`,children:[
6
- /* @__PURE__ */v("button",{ref:de,type:"button",onClick:()=>{A||(te($),ne(D),oe(null),ie($&&!D?"to":"from"),Me($?C(j($)):W($e,U,q)),_(!0))},"aria-haspopup":"dialog","aria-expanded":Q,id:H,disabled:A||void 0,"aria-label":E,"aria-labelledby":Y,"aria-describedby":[Ce?ue:void 0,T?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":Q?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(G?" min-w-0 flex-1 justify-start":""),children:[
1
+ import{Calendar as e,fromKey as t}from"./chunk-IPOSLLLU.js";import{calendarNames as r}from"./chunk-5OTS2G3M.js";import{FILTER_ON as n,FILTER_ON_INK as a,FILTER_OFF as o}from"./chunk-JFSYWEHD.js";import{buttonClasses as l}from"./chunk-K7U4RWXJ.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useDropdownPosition as c}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-ETSKG62F.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as y}from"react-dom";import{jsxs as v,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],C=e=>`${e.getFullYear()}-${M(e.getMonth()+1)}`,M=e=>String(e).padStart(2,"0");function $(e){return`${e.getFullYear()}-${M(e.getMonth()+1)}-${M(e.getDate())}`}function D(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),l=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:$(new Date(r,n,t.getDate()-14)),to:$(a)};case"lastMonth":return{from:$(l(1)),to:$(o)};case"last3Months":return{from:$(l(3)),to:$(o)};case"last6Months":return{from:$(l(6)),to:$(o)};case"last12Months":return{from:$(l(12)),to:$(o)}}}function W(e,t,r){const n=C(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function L({from:M,to:$,onChange:L,formatDisplay:O,clearable:T,required:R=!1,name:E,id:H,"aria-labelledby":J,"aria-label":Y,weekStartsOn:B,placeholder:G,fullWidth:I=!1,min:U,max:q,disabled:K=!1,allowOpenEnd:A=!1}){const P=p().dateRange,z=h(),V=O??(z?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(z):S),X=G??P.placeholder,Z=T??!R,[Q,_]=f(!1),[ee,te]=f(M),[re,ne]=f($),[ae,oe]=f(null),[le,ie]=f("from"),se=g(null),de=g(null),ce=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=c(se,Q,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:ce}),be=g(null),xe=g(null),[ye,ve]=f(!0);m(()=>{const e=xe.current;if(!Q||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&ve(a)});const we=g(null);m(()=>{const e=ce.current;if(!Q||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!H&&(de.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Ce=!!Y||!!J||Ne,Me=/* @__PURE__ */new Date,[$e,De]=f(()=>M?C(j(M)):W(Me,U,q)),We=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,Me),U,q)),je=e=>e?V(e):"";x(()=>{if(!Q)return;const e=e=>{const t=e.target;se.current?.contains(t)||ce.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[Q]),x(()=>{K&&_(!1)},[K]);const Se=()=>{L("",""),_(!1)},Fe=M&&$?`${je(M)} — ${je($)}`:M?P.fromOnly(je(M)):$?P.toOnly(je($)):"",Le=r(z),Oe=e=>{const r=t(e);return r?Le.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},Te=M&&$?P.range(Oe(M),Oe($)):M?P.fromOnly(Oe(M)):$?P.toOnly(Oe($)):X,Re=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-blue-50 text-blue-700 font-medium":"border-gray-200 text-gray-700 hover:bg-gray-50"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),Ee=/* @__PURE__ */v(w,{children:[We.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,Me);te(t.from),ne(t.to),oe(e),De(t.from.slice(0,7))})(e),className:Re(e),"aria-label":he?P[e]:void 0,children:he?ye?P[e]:P[`${e}Short`]:P[e]},e)),
2
+ /* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Re("Custom"),children:P.custom})]}),He=(e,t)=>A?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":le===e,onClick:()=>ie(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Je=e=>A&&le===e?" ring-1 ring-blue-400":"",Ye=
3
+ /* @__PURE__ */N(e,{mode:"range",min:U,max:q,value:ee||null,endValue:re||null,month:$e,onMonthChange:De,onSelect:e=>{oe("Custom"),A?"from"===le?(re&&e>re?(te(re),ne(e)):te(e),ie("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:B,"aria-label":P.dialog});/* @__PURE__ */
4
+ return v("div",{className:"relative"+(I?" w-full":""),ref:se,children:[
5
+ /* @__PURE__ */v("div",{className:`${I?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${M||$?`${n} ${a}`:o}${K?" cursor-not-allowed opacity-60":""}`,children:[
6
+ /* @__PURE__ */v("button",{ref:de,type:"button",onClick:()=>{K||(te(M),ne($),oe(null),ie(M&&!$?"to":"from"),De(M?C(j(M)):W(Me,U,q)),_(!0))},"aria-haspopup":"dialog","aria-expanded":Q,id:H,disabled:K||void 0,"aria-label":Y,"aria-labelledby":J,"aria-describedby":[Ce?ue:void 0,R?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":Q?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(I?" min-w-0 flex-1 justify-start":""),children:[
7
7
  /* @__PURE__ */N(i,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
8
- /* @__PURE__ */N("span",{className:"truncate",children:Fe||V})]}),X&&!A&&($||D)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":P.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ce&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:Re}),T&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:P.required}),B&&/* @__PURE__ */v(w,{children:[
9
- /* @__PURE__ */N("input",{type:"hidden",name:B.from,value:$,disabled:A||void 0}),
10
- /* @__PURE__ */N("input",{type:"hidden",name:B.to,value:D,disabled:A||void 0})]}),Q&&y(
8
+ /* @__PURE__ */N("span",{className:"truncate",children:Fe||X})]}),Z&&!K&&(M||$)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":P.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ce&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:Te}),R&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:P.required}),E&&/* @__PURE__ */v(w,{children:[
9
+ /* @__PURE__ */N("input",{type:"hidden",name:E.from,value:M,disabled:K||void 0}),
10
+ /* @__PURE__ */N("input",{type:"hidden",name:E.to,value:$,disabled:K||void 0})]}),Q&&y(
11
11
  /* @__PURE__ */v("div",{ref:ce,id:me,role:"dialog","aria-label":P.dialog,"data-layout":he?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:d.popup,left:ge?.left,right:ge?.right,top:ge?.top,bottom:ge?.bottom,width:he&&ge?ge.maxWidth:"max-content",maxWidth:ge?.maxWidth,maxHeight:ge?.maxHeight,overflowY:"auto",visibility:ge?void 0:"hidden",...u()},children:[
12
12
  /* @__PURE__ */v("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[He("from",/* @__PURE__ */v(w,{children:[
13
13
  /* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:P.from}),
14
- /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ye("from")}`,children:ee?je(ee):P.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),He("to",/* @__PURE__ */v(w,{children:[
14
+ /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Je("from")}`,children:ee?je(ee):P.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),He("to",/* @__PURE__ */v(w,{children:[
15
15
  /* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:P.to}),
16
- /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Ye("to")}`,children:re?je(re):P.end})]}))]}),he?/* @__PURE__ */v(w,{children:[We.length>0&&/* @__PURE__ */v("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-gray-500",children:P.lastHeading}),
17
- /* @__PURE__ */v("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Be,We.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:P[e]},e))]})]}),
18
- /* @__PURE__ */N("div",{className:"w-full",children:Ee})]}):
16
+ /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-blue-50 text-blue-700":"border-gray-200 bg-gray-50 text-gray-400"}${Je("to")}`,children:re?je(re):P.end})]}))]}),he?/* @__PURE__ */v(w,{children:[We.length>0&&/* @__PURE__ */v("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-gray-500",children:P.lastHeading}),
17
+ /* @__PURE__ */v("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Ee,We.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:P[e]},e))]})]}),
18
+ /* @__PURE__ */N("div",{className:"w-full",children:Ye})]}):
19
19
  /* @__PURE__ */v("div",{ref:be,className:"flex w-max gap-4",children:[
20
- /* @__PURE__ */N("div",{className:"w-64",children:Ee}),We.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Be})]}),
21
- /* @__PURE__ */v("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */N("button",{type:"button",onClick:Se,className:l({variant:"ghost"}),children:P.clear}),
20
+ /* @__PURE__ */N("div",{className:"w-64",children:Ye}),We.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Ee})]}),
21
+ /* @__PURE__ */v("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[Z&&/* @__PURE__ */N("button",{type:"button",onClick:Se,className:l({variant:"ghost"}),children:P.clear}),
22
22
  /* @__PURE__ */N("button",{type:"button",onClick:()=>_(!1),className:l({variant:"secondary"}),children:P.cancel}),
23
- /* @__PURE__ */N("button",{type:"button",onClick:()=>{J(ee,re),_(!1)},disabled:I?!ee&&!re:!ee||!re,className:l({variant:"primary"}),children:P.apply})]})]}),document.body)]})}export{J as DateRangePicker,M as presetRange,D as toISODate};
23
+ /* @__PURE__ */N("button",{type:"button",onClick:()=>{L(ee,re),_(!1)},disabled:A?!ee&&!re:!ee||!re,className:l({variant:"primary"}),children:P.apply})]})]}),document.body)]})}export{L as DateRangePicker,D as presetRange,$ as toISODate};