efficient-shell 10.0.0 → 10.1.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 (218) hide show
  1. package/README.md +2 -2
  2. package/dist/{Browser-RFLTFP7Y.js → Browser-Q34VNUTL.js} +13 -13
  3. package/dist/{Calculator-DV2R65OS.js → Calculator-63XNC3BA.js} +12 -12
  4. package/dist/{CurrencyConverter-ELSCNMUT.js → CurrencyConverter-Q4HYAY4N.js} +9 -9
  5. package/dist/{Documents-HKTTXLSR.js → Documents-KLVVF4KK.js} +24 -24
  6. package/dist/{Files-ZSYGKZOV.js → Files-AOIBTQTE.js} +40 -40
  7. package/dist/Notepad-SOUIZDKN.js +24 -0
  8. package/dist/PdfViewer-WNKGFJD6.js +1 -0
  9. package/dist/{PomodoroTimer-XHNZGBDR.js → PomodoroTimer-X5Y3LA3V.js} +25 -25
  10. package/dist/{Preview-PLCASIZA.js → Preview-3FZTC25R.js} +25 -25
  11. package/dist/Sidebar-4OI4LP6G.js +44 -0
  12. package/dist/{Spreadsheet-Y7TJIBI5.js → Spreadsheet-RBEVCQIV.js} +13 -13
  13. package/dist/{Stock-KLYWTMMD.js → Stock-KESFJPYD.js} +4 -4
  14. package/dist/{Weather-CT2IZHEW.js → Weather-BYGZVNNK.js} +19 -19
  15. package/dist/{WorldClock-EJCUVIUW.js → WorldClock-P4JVDPGE.js} +6 -6
  16. package/dist/ai/index.js +38 -38
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.js +1 -1
  24. package/dist/charts/ChordChart.js +1 -1
  25. package/dist/charts/ColumnChart.js +1 -1
  26. package/dist/charts/HeatmapChart.js +1 -1
  27. package/dist/charts/HistogramChart.js +1 -1
  28. package/dist/charts/RadarChart.js +1 -1
  29. package/dist/charts/RangeChart.js +1 -1
  30. package/dist/charts/SankeyChart.js +1 -1
  31. package/dist/charts/ScatterChart.js +1 -1
  32. package/dist/charts/SpecChart.js +1 -1
  33. package/dist/charts/SunburstChart.js +1 -1
  34. package/dist/charts/TimeSeriesChart.js +1 -1
  35. package/dist/charts/TreemapChart.js +1 -1
  36. package/dist/charts/WaterfallChart.js +1 -1
  37. package/dist/{chunk-PUIQFTCO.js → chunk-2OJ3HGFY.js} +5 -5
  38. package/dist/{chunk-PKIDVVAE.js → chunk-2SLQD57V.js} +5 -5
  39. package/dist/{chunk-NDEIZUMG.js → chunk-3V6ZERBS.js} +1 -1
  40. package/dist/{chunk-BXEKX4TB.js → chunk-3V74SUZO.js} +16 -16
  41. package/dist/{chunk-DL6QIWVR.js → chunk-42XMT5JN.js} +1 -1
  42. package/dist/{chunk-IQWIYZB5.js → chunk-45XXERGA.js} +2 -2
  43. package/dist/{chunk-B7KD3DGY.js → chunk-4UEXVRBC.js} +1 -1
  44. package/dist/{chunk-FRINAJU7.js → chunk-4UX6ET7G.js} +1 -1
  45. package/dist/{chunk-BFVL2VTS.js → chunk-4VDGVF5T.js} +1 -1
  46. package/dist/chunk-4X6GIVTI.js +29 -0
  47. package/dist/{chunk-D2WGDTWN.js → chunk-5EX6XXUX.js} +1 -1
  48. package/dist/{chunk-PA37I5ZX.js → chunk-5VDT4762.js} +2 -2
  49. package/dist/{chunk-EGAV5LSX.js → chunk-5VSP3TYU.js} +1 -1
  50. package/dist/{chunk-66JYKX4T.js → chunk-6FPDOEOX.js} +1 -1
  51. package/dist/{chunk-3AZBI76O.js → chunk-7ILNRFEV.js} +1 -1
  52. package/dist/{chunk-GQK3U2IO.js → chunk-7TONF2PM.js} +1 -1
  53. package/dist/{chunk-LKW3YAZN.js → chunk-A3VJ4PRU.js} +6 -6
  54. package/dist/chunk-ACVKU6YW.js +7 -0
  55. package/dist/{chunk-ELUTQZGP.js → chunk-AEQFFD5I.js} +1 -1
  56. package/dist/{chunk-QRJRGP2K.js → chunk-AGLBDT7X.js} +8 -8
  57. package/dist/chunk-AXL7VTNM.js +11 -0
  58. package/dist/{chunk-7BDZZANS.js → chunk-B7HW6XZD.js} +1 -1
  59. package/dist/{chunk-XILZGSMX.js → chunk-BDFZNLFQ.js} +1 -1
  60. package/dist/{chunk-C6MV6IAX.js → chunk-BMXMSAQE.js} +8 -8
  61. package/dist/{chunk-PUCPFBYO.js → chunk-BNQRPLBW.js} +1 -1
  62. package/dist/{chunk-XS4HFUTW.js → chunk-BZPPDYEE.js} +1 -1
  63. package/dist/{chunk-DPDRFLBY.js → chunk-CLQFP42I.js} +3 -3
  64. package/dist/{chunk-HKAQXFUR.js → chunk-CMHLXELO.js} +3 -3
  65. package/dist/{chunk-UZ43AT4O.js → chunk-CUA6CREW.js} +8 -8
  66. package/dist/{chunk-RYS3URDC.js → chunk-DY2M6BIG.js} +10 -10
  67. package/dist/{chunk-EGEWU776.js → chunk-E3RHEEA6.js} +1 -1
  68. package/dist/{chunk-WFANOFHG.js → chunk-F7A6K3D5.js} +5 -5
  69. package/dist/{chunk-QTQQKQGQ.js → chunk-FFASZGNZ.js} +3 -3
  70. package/dist/{chunk-MPALY3CL.js → chunk-FMC2XNSP.js} +6 -6
  71. package/dist/{chunk-D7X2HMMA.js → chunk-FS2KWQJW.js} +10 -10
  72. package/dist/{chunk-AJ3R5QPD.js → chunk-GGIFS34Z.js} +5 -5
  73. package/dist/{chunk-4E4GWE4L.js → chunk-GVY2X4CC.js} +16 -16
  74. package/dist/{chunk-HJPCHES5.js → chunk-GZYTCHPX.js} +4 -4
  75. package/dist/chunk-IFANUMK3.js +4 -0
  76. package/dist/{chunk-ZREDCRTL.js → chunk-J7CIBRDS.js} +1 -1
  77. package/dist/{chunk-ZOBLEXIU.js → chunk-JJYAYMY7.js} +1 -1
  78. package/dist/{chunk-ZPCADTM5.js → chunk-JRBQLRAZ.js} +1 -1
  79. package/dist/{chunk-YFUMK2E7.js → chunk-JZK3UDOT.js} +1 -1
  80. package/dist/{chunk-O33CUGOI.js → chunk-K64JRGNE.js} +5 -5
  81. package/dist/{chunk-IU5KBQEQ.js → chunk-K7PCBUDC.js} +6 -6
  82. package/dist/{chunk-VG5NGCMQ.js → chunk-KFRU53WD.js} +6 -6
  83. package/dist/{chunk-FSPFV4MI.js → chunk-KKSVRIMP.js} +2 -4
  84. package/dist/{chunk-T5V2GJ4D.js → chunk-KZQAGXME.js} +4 -4
  85. package/dist/{chunk-FTWWJHFX.js → chunk-LOYCPZUB.js} +1 -1
  86. package/dist/{chunk-GBLMVFDW.js → chunk-LPDI5NL6.js} +1 -1
  87. package/dist/{chunk-FPGRKHUW.js → chunk-MH6DI6YY.js} +11 -11
  88. package/dist/{chunk-GQMS5657.js → chunk-MLKY5ESV.js} +1 -1
  89. package/dist/{chunk-TGLHJS3M.js → chunk-MUMQ6PW7.js} +1 -1
  90. package/dist/chunk-N6TK43YN.js +100 -0
  91. package/dist/chunk-N6VP75F5.js +3 -0
  92. package/dist/{chunk-KAVFW5CU.js → chunk-NNOA7AVG.js} +5 -5
  93. package/dist/{chunk-6YQPLI5M.js → chunk-NQJKANUP.js} +11 -11
  94. package/dist/{chunk-UTQG344L.js → chunk-NW7Z3G7P.js} +11 -11
  95. package/dist/{chunk-LR77AS3N.js → chunk-O6ABVKHU.js} +4 -4
  96. package/dist/{chunk-25STFYV3.js → chunk-OPB3I4JH.js} +4 -4
  97. package/dist/{chunk-RBD7SB6M.js → chunk-P5YFQ4IQ.js} +1 -1
  98. package/dist/{chunk-JHZV4TN6.js → chunk-PF5CKD4C.js} +2 -2
  99. package/dist/{chunk-NDKQDIWN.js → chunk-Q4LBBFLO.js} +5 -5
  100. package/dist/{chunk-X6TJR6M2.js → chunk-Q5YM65DZ.js} +8 -8
  101. package/dist/{chunk-XOKANFQD.js → chunk-QASKQDUR.js} +16 -16
  102. package/dist/{chunk-5F7HMNCX.js → chunk-QODTON7V.js} +1 -1
  103. package/dist/{chunk-7KDGW6BR.js → chunk-QXRRAADR.js} +1 -1
  104. package/dist/chunk-QZ3MO3HB.js +1 -0
  105. package/dist/{chunk-VSAI5TH7.js → chunk-R4Q5653D.js} +20 -20
  106. package/dist/{chunk-DXHLUB36.js → chunk-RKFEJ5CX.js} +1 -1
  107. package/dist/{chunk-GKZUAT3K.js → chunk-RSIGTZMU.js} +1 -1
  108. package/dist/{chunk-GNU3U2TP.js → chunk-RZR3OAKV.js} +1 -1
  109. package/dist/chunk-SDI2UGAG.js +1 -0
  110. package/dist/chunk-SKY2NBTQ.js +6 -0
  111. package/dist/{chunk-MKEYXKZA.js → chunk-TDLU6GF5.js} +4 -4
  112. package/dist/chunk-UP442DPT.js +9 -0
  113. package/dist/{chunk-OUKDGO4N.js → chunk-V4RYE6KA.js} +8 -8
  114. package/dist/{chunk-E7WY4GZ3.js → chunk-VMDBVXDJ.js} +1 -1
  115. package/dist/{chunk-F24QTMTY.js → chunk-VP63OOO4.js} +3 -3
  116. package/dist/{chunk-GRBBQ3VF.js → chunk-WKSNTMEJ.js} +1 -1
  117. package/dist/{chunk-DVOQCAC2.js → chunk-WMQ2URP4.js} +1 -1
  118. package/dist/{chunk-ED3QFXBC.js → chunk-WP4CIYJ7.js} +1 -1
  119. package/dist/{chunk-UFXE363L.js → chunk-X6YT3I5F.js} +1 -1
  120. package/dist/{chunk-SGTZJMZ6.js → chunk-XABYSSXW.js} +1 -1
  121. package/dist/{chunk-GSBIJLTD.js → chunk-XAROKI7X.js} +1 -1
  122. package/dist/{chunk-ZMVCN4OA.js → chunk-XHMIJ7S3.js} +7 -7
  123. package/dist/{chunk-Q7HN6T3H.js → chunk-XNKIDGZW.js} +1 -1
  124. package/dist/{chunk-6I6VSUKY.js → chunk-Y23TGQFN.js} +4 -4
  125. package/dist/chunk-ZLHPCPXS.js +19 -0
  126. package/dist/{chunk-LPUGK2MC.js → chunk-ZN2BFSQR.js} +2 -2
  127. package/dist/{chunk-TXMAWCR7.js → chunk-ZRZ5LOW3.js} +1 -1
  128. package/dist/data/ListLoadError.js +1 -1
  129. package/dist/format/index.js +1 -1
  130. package/dist/forms/BorderInput.js +1 -1
  131. package/dist/forms/BrandAssetEditor.js +1 -1
  132. package/dist/forms/Calendar.js +1 -1
  133. package/dist/forms/ColorPicker.js +1 -1
  134. package/dist/forms/ComposerAttachments.js +1 -1
  135. package/dist/forms/CornersInput.js +1 -1
  136. package/dist/forms/DatePicker.js +1 -1
  137. package/dist/forms/DateRangePicker.js +1 -1
  138. package/dist/forms/DisplayChips.js +1 -1
  139. package/dist/forms/FilePicker.js +1 -1
  140. package/dist/forms/IconPicker.js +1 -1
  141. package/dist/forms/InputNumber.js +1 -1
  142. package/dist/forms/LinkPicker.js +1 -1
  143. package/dist/forms/MediaLibrary.js +1 -1
  144. package/dist/forms/MediaUploadField.js +1 -1
  145. package/dist/forms/MediaUploadGrid.js +1 -1
  146. package/dist/forms/MediaUsedInList.js +1 -1
  147. package/dist/forms/PositionInput.js +1 -1
  148. package/dist/forms/Select.js +1 -1
  149. package/dist/forms/SidesInput.js +1 -1
  150. package/dist/forms/Slider.js +1 -1
  151. package/dist/forms/Snippet.js +1 -1
  152. package/dist/forms/SplitButton.js +1 -1
  153. package/dist/forms/TagInput.js +1 -1
  154. package/dist/forms/TextToolbar.js +1 -1
  155. package/dist/forms/WidthsBar.js +1 -1
  156. package/dist/forms/mediaLibraryMenu.js +1 -1
  157. package/dist/forms/textAlign.js +1 -1
  158. package/dist/hooks/useTheme.d.ts +1 -1
  159. package/dist/icons/index.js +1 -1
  160. package/dist/index.d.ts +9 -2
  161. package/dist/index.js +129 -130
  162. package/dist/map/index.js +3 -3
  163. package/dist/markdown/index.js +1 -1
  164. package/dist/page-tabs/index.js +5 -5
  165. package/dist/pdf/index.js +1 -1
  166. package/dist/shell/AppUpdateBanner.js +1 -1
  167. package/dist/shell/Banner.js +1 -1
  168. package/dist/shell/Breadcrumbs.js +1 -1
  169. package/dist/shell/ColoredBadge.js +1 -1
  170. package/dist/shell/ConfirmDialog.js +1 -1
  171. package/dist/shell/ContextMenu.js +1 -1
  172. package/dist/shell/Dialog.js +1 -1
  173. package/dist/shell/Drawer.js +1 -1
  174. package/dist/shell/DropdownMenu.js +1 -1
  175. package/dist/shell/EmptyState.js +1 -1
  176. package/dist/shell/HelpCenter.js +1 -1
  177. package/dist/shell/ImageLightbox.js +1 -1
  178. package/dist/shell/LanguageSelect.js +1 -1
  179. package/dist/shell/Markdown.js +1 -1
  180. package/dist/shell/PageHeader.js +1 -1
  181. package/dist/shell/PopupMenu.js +1 -1
  182. package/dist/shell/ProductionTimeline.js +1 -1
  183. package/dist/shell/Result.js +1 -1
  184. package/dist/shell/SearchableSelect.js +1 -1
  185. package/dist/shell/SettingReset.js +1 -1
  186. package/dist/shell/SettingRow.js +1 -1
  187. package/dist/shell/SidebarLayout.js +1 -1
  188. package/dist/shell/SidebarNav.js +1 -1
  189. package/dist/shell/SortableList.js +1 -1
  190. package/dist/shell/StepChain.js +1 -1
  191. package/dist/shell/Stepper.js +1 -1
  192. package/dist/shell/TopNav.js +1 -1
  193. package/dist/shell/Tree.js +1 -1
  194. package/dist/telemetry/index.js +1 -1
  195. package/dist/templates/ChatTemplate.js +1 -1
  196. package/dist/templates/CheckoutTemplate.js +1 -1
  197. package/dist/templates/DashboardTemplate.js +1 -1
  198. package/dist/templates/DataTablePage.js +1 -1
  199. package/dist/templates/EmailTemplate.js +1 -1
  200. package/dist/templates/ErrorBoundary.d.ts +1 -1
  201. package/dist/templates/FormLayoutPage.js +1 -1
  202. package/dist/ui/index.js +1 -1
  203. package/dist/version.js +1 -1
  204. package/package.json +1 -1
  205. package/dist/Notepad-63Q3JSCV.js +0 -25
  206. package/dist/PdfViewer-DFBPEUY5.js +0 -1
  207. package/dist/Sidebar-QFT5WPK4.js +0 -44
  208. package/dist/chunk-4AJRHTTB.js +0 -1
  209. package/dist/chunk-5CH2RGL6.js +0 -29
  210. package/dist/chunk-7YU27U3Y.js +0 -19
  211. package/dist/chunk-AEJNFA2K.js +0 -6
  212. package/dist/chunk-IEAFSVXC.js +0 -1
  213. package/dist/chunk-POCQ7ZL4.js +0 -3
  214. package/dist/chunk-PVR4KU7H.js +0 -7
  215. package/dist/chunk-R2QDO7NY.js +0 -4
  216. package/dist/chunk-RBXSU25O.js +0 -9
  217. package/dist/chunk-XSJJPACH.js +0 -11
  218. package/dist/chunk-ZBTDMQUI.js +0 -100
@@ -1,4 +1,4 @@
1
- import{DropdownMenu as e}from"./chunk-PVR4KU7H.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
1
+ import{DropdownMenu as e}from"./chunk-ACVKU6YW.js";import{Fragment as t}from"react";import{jsxs as a,jsx as r,Fragment as n}from"react/jsx-runtime";var i="relative inline-flex items-center gap-2 px-4 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40",s="bg-blue-50 text-blue-600",l="text-gray-600 hover:bg-gray-50 hover:text-gray-900";function c(){/* @__PURE__ */
2
2
  return r("span",{className:"my-3 w-px shrink-0 bg-gray-200","aria-hidden":!0})}function m({item:e,active:t,caret:i}){/* @__PURE__ */
3
3
  return a(n,{children:[e.icon&&/* @__PURE__ */r("span",{className:"h-4 w-4 shrink-0",children:e.icon}),
4
4
  /* @__PURE__ */r("span",{className:"whitespace-nowrap",children:e.label}),null!=e.badge&&/* @__PURE__ */r("span",{className:"ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-2 text-2xs font-semibold leading-5 text-gray-600",children:e.badge}),i&&/* @__PURE__ */r("span",{className:"-ml-1 text-xs","aria-hidden":!0,children:"▾"}),t&&/* @__PURE__ */r("span",{className:"absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600","aria-hidden":!0})]})}function d({items:n,activeKey:d,onSelect:o,brand:u,actions:b,linkAs:h,className:g}){/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KKSVRIMP.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
3
3
  return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
4
4
  return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{SidebarLayout as e}from"./chunk-PUIQFTCO.js";import{Avatar as t}from"./chunk-5VTRKWKO.js";import{ItemCount as r}from"./chunk-GMRZX2ET.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
1
+ import{SidebarLayout as e}from"./chunk-2OJ3HGFY.js";import{Avatar as t}from"./chunk-5VTRKWKO.js";import{ItemCount as r}from"./chunk-GMRZX2ET.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var s=[{id:"inbox",label:"Inbox",count:12},{id:"starred",label:"Starred",count:3},{id:"sent",label:"Sent"},{id:"drafts",label:"Drafts",count:1},{id:"archive",label:"Archive"},{id:"trash",label:"Trash"}],d=[{id:1,from:"Marco Reyes",subject:"Q3 roadmap review",preview:"Sharing the deck ahead of Thursday — let me know what you think before the review.",time:"9:14",unread:!0},{id:2,from:"Priya Patel",subject:"Design handoff",preview:"The Figma file is ready for engineering. I exported every icon at 1x and 2x.",time:"8:02",unread:!0},{id:3,from:"GitHub",subject:"[acme/web] PR #482 merged",preview:"Your pull request was merged into main by the release bot after all checks passed.",time:"Yest"},{id:4,from:"Sara Lind",subject:"Lunch Friday?",preview:"A few of us are heading to the new place on 5th at noon if you want to join.",time:"Yest"}];function c(){const[c,o]=i(1),m=d.find(e=>e.id===c)??d[0];/* @__PURE__ */
2
2
  return l("div",{className:"h-full",children:/* @__PURE__ */l(e,{side:"left",defaultWidth:200,sidebar:/* @__PURE__ */n("div",{className:"flex h-full flex-col p-2",children:[
3
3
  /* @__PURE__ */l(a,{block:!0,className:"mb-2",children:"Compose"}),s.map((e,t)=>/* @__PURE__ */n("button",{className:"flex items-center justify-between rounded-md px-3 py-2 text-left text-sm "+(0===t?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
4
4
  /* @__PURE__ */l("span",{children:e.label}),null!=e.count&&/* @__PURE__ */l(r,{count:e.count,active:0===t})]},e.id))]}),children:/* @__PURE__ */n("div",{className:"flex h-full",children:[
@@ -1,4 +1,4 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-7BDZZANS.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-P6LB3I3D.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.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 P=m(),$=l().files,z=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?`${P}-error`:N?`${P}-hint`:void 0;/* @__PURE__ */
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-B7HW6XZD.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-P6LB3I3D.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.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 P=m(),$=l().files,z=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?`${P}-error`:N?`${P}-hint`:void 0;/* @__PURE__ */
2
2
  return o(e,{label:g,htmlFor:P,hint:N,error:j,required:k,className:v,children:[
3
3
  /* @__PURE__ */o("button",{ref:B,type:"button",id:P,disabled:y,onClick:z.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":C,...z.zoneProps,className:t(z.dragOver,y,a(y),"px-4 py-6"),children:[
4
4
  /* @__PURE__ */o("span",{children:[
@@ -1,11 +1,11 @@
1
- import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{resolveSeriesColor as r,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,U=a(),C=$??(e=>o(e,U)),z=b??j.intensity,D=w??j.noActivity,F=h(null),R=t(F),L=g??R,S=c(),[T,P]=s(null);if(m(()=>{if(null!==T)return l(e=>"Escape"===e.key&&(P(null),!0))},[T]),0===x.length||0===d.length)/* @__PURE__ */
2
- return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const V=y??r(0),X=v??Math.max(1,...p.flat().filter(Number.isFinite)),Z=96,B=26*x.length,E=M??B+26+26,G=Math.max(2,(Math.max(97,L)-Z)/d.length),Q=e=>{const t=X>0?Math.max(0,Math.min(1,e/X)):0;return`color-mix(in oklab, ${V} ${(8+92*t).toFixed(1)}%, ${n.surface})`};/* @__PURE__ */
1
+ import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,U=a(),C=$??(e=>o(e,U)),z=b??j.intensity,D=w??j.noActivity,F=h(null),R=t(F),L=g??R,S=c(),[T,P]=s(null);if(m(()=>{if(null!==T)return n(e=>"Escape"===e.key&&(P(null),!0))},[T]),0===x.length||0===d.length)/* @__PURE__ */
2
+ return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const V=y??l(0),X=v??Math.max(1,...p.flat().filter(Number.isFinite)),Z=96,B=26*x.length,E=M??B+26+26,G=Math.max(2,(Math.max(97,L)-Z)/d.length),Q=e=>{const t=X>0?Math.max(0,Math.min(1,e/X)):0;return`color-mix(in oklab, ${V} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
3
3
  return u("div",{className:`relative ${k??""}`,ref:F,children:[
4
4
  /* @__PURE__ */u("svg",{width:"100%",height:E,viewBox:`0 0 ${L} ${E}`,role:"img","aria-label":j.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>P(null),onBlur:()=>P(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),P(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
5
5
  /* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:S,x1:"0",x2:"1",children:[
6
6
  /* @__PURE__ */f("stop",{offset:"0",stopColor:Q(0)}),
7
- /* @__PURE__ */f("stop",{offset:"1",stopColor:Q(X)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:n.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=T&&(T.r!==t||T.c!==r);/* @__PURE__ */
8
- return f("rect",{x:Z+r*G+A/2,y:26*t+A/2,width:Math.max(1,G-A),height:26-A,rx:N,fill:Q(n),opacity:i?.55:1,onMouseEnter:()=>P({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((L-Z)/56))))===0?/* @__PURE__ */f("text",{x:Z+t*G+G/2,y:B+15,textAnchor:"middle",fontSize:11,fill:n.label,children:e},`c${t}`):null),
7
+ /* @__PURE__ */f("stop",{offset:"1",stopColor:Q(X)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=T&&(T.r!==t||T.c!==r);/* @__PURE__ */
8
+ return f("rect",{x:Z+r*G+A/2,y:26*t+A/2,width:Math.max(1,G-A),height:26-A,rx:N,fill:Q(n),opacity:i?.55:1,onMouseEnter:()=>P({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((L-Z)/56))))===0?/* @__PURE__ */f("text",{x:Z+t*G+G/2,y:B+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
9
9
  /* @__PURE__ */f("rect",{x:Z,y:B+26,width:Math.min(180,Math.max(40,L-Z)),height:8,rx:4,fill:`url(#${S})`}),
10
- /* @__PURE__ */f("text",{x:Z,y:B+48,fontSize:11,fill:n.label,children:"0"}),
11
- /* @__PURE__ */f("text",{x:Z+Math.min(180,Math.max(40,L-Z)),y:B+48,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:C(X)})]}),T&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[T.r]} · ${d[T.c]}`,rows:[{key:"v",label:z,color:V,value:null==p[T.r]?.[T.c]?void 0:C(p[T.r][T.c])}]})})]})}export{x as HeatmapChart};
10
+ /* @__PURE__ */f("text",{x:Z,y:B+48,fontSize:11,fill:r.label,children:"0"}),
11
+ /* @__PURE__ */f("text",{x:Z+Math.min(180,Math.max(40,L-Z)),y:B+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:C(X)})]}),T&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[T.r]} · ${d[T.c]}`,rows:[{key:"v",label:z,color:V,value:null==p[T.r]?.[T.c]?void 0:C(p[T.r][T.c])}]})})]})}export{x as HeatmapChart};
@@ -0,0 +1,7 @@
1
+ import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-BZPPDYEE.js";import{useTabLayer as n,focusableIn as o}from"./chunk-CDAJKLGL.js";import{PopupMenu as i,PopupMenuDivider as a}from"./chunk-MH6DI6YY.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:E,align:L="end",side:j="bottom","aria-label":A,className:C="",triggerClassName:K,menuClassName:S="",minWidth:W=180,linkAs:H,disabled:$,id:N,"aria-describedby":T,"aria-disabled":U=!1,onOpenChange:B,footer:I,footerLabel:J}){const[M,P]=m(!1),[Y,q]=m(-1),G=h(null),z=h(null),R=h(null),O=h(null),Q=h(null),V=null!=I&&!1!==I,Z=h({text:"",at:0}),F=g(),X=g(),_=N??X,ee=h(B);ee.current=B;const te=h(M);te.current=M;const re=v(e=>{P(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&z.current?.focus()},[]),ne=(t,r)=>{const n=E.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(E[i]))return i}return-1},oe=()=>R.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!M)return;const e=e=>{const t=e.target;if(G.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[M,re]);const ie=v(()=>{const e=oe(),t=z.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:L,side:j});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=L},[L,j]);p(()=>{M&&ie()}),b(()=>{if(M)return u(()=>z.current,ie)},[M,ie]),b(()=>{if(!M)return;const t=R.current,r=e(E[Y])?t?.querySelector(`[data-dropdown-index="${Y}"]`):null;(r??t)?.focus({preventScroll:!0})},[M,Y]),b(()=>{if(M)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>O.current)},[M,re]),n(O,M&&V);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(E.length-1,-1),se=e=>{q(le(e)),P(!0),te.current||(te.current=!0,ae.current=e,B?.(!0))};p(()=>{const e=ae.current;if(!M||!e)return;ae.current=null;const t=le(e);t!==Y&&q(t)});const de=t(E,F),ce="function"==typeof I?I({close:()=>re(!0)}):I,ue={...k.test(S)?{}:{zIndex:s.popup},minWidth:W};/* @__PURE__ */
2
+ return y("div",{ref:G,className:`relative inline-flex ${C}`.trim(),children:[
3
+ /* @__PURE__ */x("button",{ref:z,id:_,type:"button","aria-haspopup":"menu","aria-expanded":M,"aria-controls":M?F:void 0,"aria-label":A,"aria-describedby":T,"aria-disabled":U||void 0,disabled:$,onClick:()=>{U||(M?re(!1):se("first"))},onKeyDown:e=>{U||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:K??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(A?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),M&&
4
+ /* @__PURE__ */x(i,{portal:!0,className:S,style:ue,children:/* @__PURE__ */y("div",{ref:O,children:[
5
+ /* @__PURE__ */x("div",{ref:R,id:F,role:"menu","aria-orientation":"vertical","aria-label":A,"aria-labelledby":A?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),q(ne(Y+1,1));else if("ArrowUp"===t.key)t.preventDefault(),q(ne(Y-1,-1));else if("Home"===t.key)t.preventDefault(),q(ne(0,1));else if("End"===t.key)t.preventDefault(),q(ne(E.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&Q.current?o(Q.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-Z.current.at<500?Z.current.text+n:n;Z.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?Y+1:Math.max(Y,0),s=R.current,d=E.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(E[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void q(n)}})(t)},children:r(E,{menuId:F,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===Y?0:-1,onMouseEnter:()=>{t.disabled||Q.current?.contains(document.activeElement)||q(e)}}),linkAs:H})}),V&&/* @__PURE__ */y("div",{ref:Q,role:"group","aria-label":J,"data-dropdown-footer":"",onKeyDown:e=>{const t=Q.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=o(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=R.current?.querySelector(`[data-dropdown-index="${Y}"]`);return void(t??R.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
6
+ /* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(a,{})}),
7
+ /* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KKSVRIMP.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
2
2
  return r(e,{name:"align-left"});case"center":/* @__PURE__ */
3
3
  return r(e,{name:"align-center"});case"right":/* @__PURE__ */
4
4
  return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{Markdown as e}from"./chunk-DPDRFLBY.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-X2PZMXDP.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),P=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),_=n(()=>L.map(e=>({...e,docs:e.docs.filter(P)})).filter(e=>e.docs.length>0),[L,M]),Y=n(()=>_.flatMap(e=>e.docs),[_]),A=(w?Y.find(e=>e.slug===w):void 0)??Y[0]??null,B=e=>!!M||(C[e]??e===A?.category);/* @__PURE__ */
1
+ import{Markdown as e}from"./chunk-CLQFP42I.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-KKSVRIMP.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-X2PZMXDP.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[v,N]=a(""),[w,k]=a(null),[C,j]=a({}),M=v.trim().toLowerCase(),L=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),P=e=>!M||e.title.toLowerCase().includes(M)||e.body.toLowerCase().includes(M)||e.category_label.toLowerCase().includes(M),_=n(()=>L.map(e=>({...e,docs:e.docs.filter(P)})).filter(e=>e.docs.length>0),[L,M]),A=n(()=>_.flatMap(e=>e.docs),[_]),E=(w?A.find(e=>e.slug===w):void 0)??A[0]??null,K=e=>!!M||(C[e]??e===E?.category);/* @__PURE__ */
2
2
  return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
3
3
  /* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
4
4
  /* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
6
6
  /* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
7
7
  /* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
8
8
  /* @__PURE__ */o("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
9
- /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=B(e.key);/* @__PURE__ */
9
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===_.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:M?y.help.noResults:b??y.help.empty}):_.map(e=>{const t=K(e.key);/* @__PURE__ */
10
10
  return i("div",{className:"py-0.5",children:[
11
- /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!B(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
11
+ /* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!K(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
12
12
  /* @__PURE__ */o(d,{open:t}),
13
- /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=A?.slug===e.slug;/* @__PURE__ */
13
+ /* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=E?.slug===e.slug;/* @__PURE__ */
14
14
  return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
15
15
  /* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
16
- /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:A?/* @__PURE__ */i(c,{children:[
16
+ /* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:E?/* @__PURE__ */i(c,{children:[
17
17
  /* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
18
18
  /* @__PURE__ */i("div",{className:"min-w-0",children:[
19
- /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:A.title}),
20
- /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[A.category_label,!1===A.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(A),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
- /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(A):A.body?/* @__PURE__ */o(e,{children:A.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
19
+ /* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:E.title}),
20
+ /* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[E.category_label,!1===E.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(E),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
21
+ /* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(E):E.body?/* @__PURE__ */o(e,{children:E.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
@@ -0,0 +1,11 @@
1
+ import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-B7HW6XZD.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-PKXQDCNR.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-NHH2MXFU.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-KKSVRIMP.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-X2PZMXDP.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",D=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:L,onOpenFile:P}){const $=h().lightbox,z=d(),A=p(null),F=p(null),[I,M]=x(y),W=r.length,X=z&&W>0,H=b(e=>{if(W<2)return;const t=((I+e)%W+W)%W;M(t),L?.(t)},[I,W,L]);if(a(X),l(A,X,F),i(X),k(()=>{if(X)return f(()=>(U(),!0),()=>A.current)},[X,U]),k(()=>{if(!X)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),H("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[X,H]),!X)return null;const J=r[Math.min(I,W-1)],K=j(J),R=J.caption||n(J.url);let Z;return Z="video"===K?/* @__PURE__ */v("video",{src:J.url,controls:!0,playsInline:!0,"aria-label":R,onClick:D,className:`${e} rounded-lg bg-black`}):"file"===K?/* @__PURE__ */w("div",{onClick:D,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
2
+ /* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
3
+ /* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:R}),P?/* @__PURE__ */v(c,{size:"sm",onClick:()=>P(J),children:$.openFile}):/* @__PURE__ */v("a",{href:J.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:$.openFile})]}):/* @__PURE__ */v(t,{src:J.url,alt:R,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
4
+ /* @__PURE__ */w("div",{ref:A,...o({role:"dialog",modal:!0,label:$.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:U,children:[Z,
5
+ /* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:D,children:[
6
+ /* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:$.counter(I+1,W)}),
7
+ /* @__PURE__ */v("button",{ref:F,type:"button",onClick:U,"aria-label":$.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),W>1&&/* @__PURE__ */w(N,{children:[
8
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),H(-1)},"aria-label":$.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
9
+ /* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),H(1)},"aria-label":$.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
10
+ /* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:D,children:[
11
+ /* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:R}),"file"!==K&&/* @__PURE__ */v("a",{href:J.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:$.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
@@ -1,4 +1,4 @@
1
- import{TransferProgress as e}from"./chunk-EQN65XOO.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
1
+ import{TransferProgress as e}from"./chunk-EQN65XOO.js";import{Icon as r}from"./chunk-KKSVRIMP.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function c(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function u(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
2
2
  return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
3
3
  return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
4
4
  return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{Popover as e}from"./chunk-7JGR7WPD.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{Tooltip as a}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{useRef as t}from"react";import{jsx as i,jsxs as o}from"react/jsx-runtime";var s={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function c({value:c,onChange:m,options:u,label:d,emptyValue:h,columns:p=5,disabled:f=!1,className:v=""}){const g=l(),b=g.iconPicker,x=g.iconNames,N=e=>e.label??x[e.value]??e.value,w=t([]),k=Math.max(0,u.findIndex(e=>e.value===c)),j=u[k],D=j?.value===h,A=t(null);/* @__PURE__ */
1
+ import{Popover as e}from"./chunk-7JGR7WPD.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{Tooltip as a}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{useRef as t}from"react";import{jsx as i,jsxs as o}from"react/jsx-runtime";var s={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function c({value:c,onChange:m,options:u,label:d,emptyValue:h,columns:p=5,disabled:f=!1,className:v=""}){const g=l(),b=g.iconPicker,x=g.iconNames,N=e=>e.label??x[e.value]??e.value,w=t([]),k=Math.max(0,u.findIndex(e=>e.value===c)),j=u[k],D=j?.value===h,A=t(null);/* @__PURE__ */
2
2
  return i(e,{className:v,disabled:f,triggerLabel:j?b.button(d,N(j)):d,"aria-label":d,initialFocus:A,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */i("span",D||!j?{className:"text-sm",children:j?N(j):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:j.icon}),
3
3
  /* @__PURE__ */i(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */i("div",{role:"listbox","aria-label":d,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${p}, 2rem)`},children:u.map((n,l)=>{const t=n.value===c;/* @__PURE__ */
4
4
  return i(a,{content:N(n),children:/* @__PURE__ */i(r,{ref:e=>{w.current[l]=e,l===k&&(A.current=e)},role:"option","aria-selected":t,"aria-label":N(n),pressed:t,tabIndex:l===k?0:-1,onKeyDown:e=>((e,r)=>{const n=s[r.key];if(!n)return;r.preventDefault();const a=Math.floor(e/p)+n[0],l=e%p+n[1];if(a<0||l<0||l>=p)return;const t=a*p+l;if(!(t>=u.length)){for(const[e,r]of w.current.entries())r?.setAttribute("tabindex",e===t?"0":"-1");w.current[t]?.focus()}})(l,e),onClick:()=>{m(n.value),e()},children:/* @__PURE__ */i("span",{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})})},n.value)})})})}export{c as IconPicker};
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-7BDZZANS.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-P6LB3I3D.js";import{ColoredBadge as u}from"./chunk-DXHLUB36.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-X2PZMXDP.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:P,hint:F,error:I,required:L,className:S,accept:O="image/*",maxSizeBytes:z,maxFiles:B,fit:M="cover",thumbSize:$=96,placeholder:E,cta:H,acceptHint:R,showCover:W=!1,coverLabel:X,busy:Z=!1,busyLabel:q,progress:Q,disabled:U=!1,readOnly:G=!1,selected:V,onItemClick:Y,onItemDoubleClick:J,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=X??te.cover,ne=q??te.uploading,le=g(),[ie,oe]=b(null),se=U||Z,de=!(!k&&!N||se||G),ce=!!w&&!se&&!G,ue=!!j&&!se&&!G,me=!!K&&!U&&!ue,pe=!(!T||!A||se||G),fe=t(se),he=E??r(O,te),ge=d({accept:O,maxSizeBytes:z,maxFiles:B,acceptHint:R,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==V?null:new Set(V),Ce=!!Y,Te=$<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,O),a=e.name??o(e.url),n=W&&(e.cover??0===t);/* @__PURE__ */
2
- return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:J?()=>J(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-B7HW6XZD.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-P6LB3I3D.js";import{ColoredBadge as u}from"./chunk-RKFEJ5CX.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-KKSVRIMP.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-X2PZMXDP.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:P,label:A,hint:I,error:F,required:L,className:O,accept:S="image/*",maxSizeBytes:z,maxFiles:E,fit:M="cover",thumbSize:$=96,placeholder:B,cta:R,acceptHint:H,showCover:W=!1,coverLabel:X,busy:q=!1,busyLabel:Q,progress:Z,disabled:G=!1,readOnly:J=!1,selected:U,onItemClick:V,onItemDoubleClick:Y,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=R??te.cta,ae=X??te.cover,ne=Q??te.uploading,le=g(),[ie,oe]=b(null),se=G||q,de=!(!k&&!N||se||J),ce=!!w&&!se&&!J,ue=!!j&&!se&&!J,me=!!K&&!G&&!ue,pe=!(!T||!P||se||J),fe=t(se),he=B??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:E,acceptHint:H,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&P(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==U?null:new Set(U),Ce=!!V,Te=$<112,Pe=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=W&&(e.cover??0===t);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Y?()=>Y(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
3
  /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
4
4
  /* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
- /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Pe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
5
+ /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Ae=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
- /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Fe=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),R&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:R})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:Z?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
- return v(e,{label:P,labelId:P?`${le}-label`:void 0,htmlFor:le,hint:F,error:I,required:L,className:S,children:[
12
- /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":P?`${le}-label`:void 0,"aria-describedby":I?`${le}-error`:F?`${le}-hint`:void 0,"aria-busy":Z||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Fe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof P?P:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Pe]}),Z&&/* @__PURE__ */x(l,{label:ne,progress:Q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),H&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:H})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:q?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
+ return v(e,{label:A,labelId:A?`${le}-label`:void 0,htmlFor:le,hint:I,error:F,required:L,className:O,children:[
12
+ /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":A?`${le}-label`:void 0,"aria-describedby":F?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":q||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof A?A:te.files,className:"contents",children:p.map(Pe)}):p.map(Pe),Ae]}),q&&/* @__PURE__ */x(l,{label:ne,progress:Z})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
@@ -1,4 +1,4 @@
1
- import{Button_default as e}from"./chunk-NHH2MXFU.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.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-NHH2MXFU.js";import{Icon as r}from"./chunk-KKSVRIMP.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.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,4 +1,4 @@
1
- import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-FPGRKHUW.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
1
+ import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-MH6DI6YY.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
2
2
  return n("div",{role:"separator",children:/* @__PURE__ */n(e,{})},d.key);if("label"===d.type)/* @__PURE__ */
3
3
  return n("div",{id:`${y}-label-${k}`,children:/* @__PURE__ */n(l,{children:d.label})},d.key);if("status"===d.type)/* @__PURE__ */
4
4
  return n("div",{id:c(y,k),className:"text-xs",style:t(),children:d.label},d.key);if("submenu"===d.type)/* @__PURE__ */
@@ -1,4 +1,4 @@
1
- import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
1
+ import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
2
2
  return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
3
3
  /* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
4
4
  /* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
@@ -11,7 +11,7 @@ return i("div",{className:"my-1 flex items-start gap-2 rounded-lg border border-
11
11
  /* @__PURE__ */a("thead",{children:/* @__PURE__ */a("tr",{className:"bg-gray-50",children:s.map((e,t)=>/* @__PURE__ */a("th",{className:"border-b border-line px-3 py-2 text-left font-semibold text-ink",children:u(e)},t))})}),
12
12
  /* @__PURE__ */a("tbody",{children:c.map((e,t)=>/* @__PURE__ */a("tr",{className:"even:bg-gray-50/50",children:e.map((e,t)=>/* @__PURE__ */a("td",{className:"border-t border-line-subtle px-3 h-8 align-top text-ink",children:u(e)},t))},t))})]})},r);return l?.length?/* @__PURE__ */i("div",{children:[o,
13
13
  /* @__PURE__ */a("div",{className:"flex flex-wrap justify-end gap-1",children:l.map(e=>/* @__PURE__ */a(t,{size:"sm",variant:"secondary",leftIcon:e.icon?/* @__PURE__ */a(n,{name:e.icon,look:"mini",className:"h-4 w-4","aria-hidden":"true"}):void 0,onClick:()=>e.onSelect({header:s.map(g),rows:c.map(e=>e.map(g))}),children:e.label},e.label))})]},r):o}var y=/^( {0,3})(`{3,}|~{3,})[ \t]*(.*?)[ \t]*$/,v=/^[-*]\s+/,N=/^\d+\.\s+/,k=/^#{2,4}\s+/;function $(e){const t=e.split("\n"),n=[];let r=null;for(let e=0;e<t.length;e+=1){const l=t[e];let s=null;k.test(l)?s="heading":"table"!==r&&f(t.slice(e,e+2))?s="table":"bullet"!==r&&v.test(l)?s="bullet":"ordered"!==r&&N.test(l)&&("text"!==r||/^1\./.test(l))?s="ordered":"table"!==r||l.includes("|")?"heading"===r&&(s="text"):s="text",null!==s||null===r?(n.push([l]),r=s??"text"):n[n.length-1].push(l)}return n.map(e=>e.join("\n"))}function j(e){const t=e.replace(/\r\n/g,"\n").split("\n"),n=[];let r=[];const l=()=>{for(const e of r.join("\n").split(/\n{2,}/))for(const t of $(e.replace(/\s+$/,"")))""!==t.trim()&&n.push({text:t});r=[]};for(let e=0;e<t.length;e+=1){const s=y.exec(t[e]);if(!(null!==s&&!("`"===s[2][0]&&s[3].includes("`")))){r.push(t[e]);continue}l();const[,a,i,c]=s,o=[];let d=!1;for(e+=1;e<t.length;e+=1){const n=y.exec(t[e]);if(null!==n&&n[2][0]===i[0]&&n[2].length>=i.length&&""===n[3]){d=!0;break}o.push(a?t[e].replace(new RegExp(`^ {0,${a.length}}`),""):t[e])}n.push({fence:{lang:c.split(/[ \t]/)[0],code:o.join("\n"),closed:d}})}return l(),n}function w(e,t,n){if(n){let r=null;try{r=n(e)}catch{r=null}if(null!=r)/* @__PURE__ */return a("div",{children:r},t)}return function({lang:e,code:t},n){/* @__PURE__ */
14
- return a("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */a("code",{children:t})},n)}(e,t)}function P({children:e,className:t,renderFence:n,tableActions:r,onLinkClick:l}){/* @__PURE__ */
14
+ return a("pre",{"data-language":e||void 0,className:"my-1 overflow-x-auto rounded-lg border border-gray-200 bg-gray-50 p-3 font-mono text-xs text-gray-800",children:/* @__PURE__ */a("code",{children:t})},n)}(e,t)}function K({children:e,className:t,renderFence:n,tableActions:r,onLinkClick:l}){/* @__PURE__ */
15
15
  return a(o.Provider,{value:l,children:/* @__PURE__ */a("div",{className:`space-y-3 text-sm leading-relaxed text-gray-700 ${t??""}`.trim(),children:j(e??"").map((e,t)=>"fence"in e?w(e.fence,t,n):function(e,t,n){const r=e.split("\n"),l=r[0],s=/^(#{2,4})\s+(.*)$/.exec(l);if(s&&1===r.length){const e=s[1].length;/* @__PURE__ */
16
16
  return a(`h${e}`,{className:2===e?"mt-2 text-sm font-semibold uppercase tracking-wide text-ink-faint":3===e?"mt-1 text-base font-semibold text-gray-900":"mt-1 text-sm font-semibold text-gray-900",children:u(s[2])},t)}if(1===r.length&&/^---+$/.test(l))/* @__PURE__ */
17
17
  return a("hr",{className:"border-gray-200"},t);if(f(r))return b(r,t,n);if(/^>\s?/.test(l)){const e=r.map(e=>e.replace(/^>\s?/,"")).join(" ");/* @__PURE__ */
@@ -19,4 +19,4 @@ return a("div",{className:"my-1 rounded-r-lg border-l-4 border-blue-300 bg-blue-
19
19
  return a(m,{alt:i[1]},t);if(/^[-*]\s+/.test(l)){const e=h(r,/^[-*]\s+(.*)$/);/* @__PURE__ */
20
20
  return a("ul",{className:"list-disc space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */a("li",{children:u(e)},t))},t)}const c=/^(\d+)\.\s+/.exec(l);if(c){const e=h(r,/^\d+\.\s+(.*)$/);/* @__PURE__ */
21
21
  return a("ol",{start:Number(c[1]),className:"list-decimal space-y-1 pl-5 marker:text-gray-400",children:e.map((e,t)=>/* @__PURE__ */a("li",{className:"pl-1",children:u(e)},t))},t)}/* @__PURE__ */
22
- return a("p",{children:u(r.join(" "))},t)}(e.text,t,r))})})}export{P as Markdown,g as plainCell,x as tableToCsv};
22
+ return a("p",{children:u(r.join(" "))},t)}(e.text,t,r))})})}export{K as Markdown,g as plainCell,x as tableToCsv};
@@ -1,9 +1,9 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-ZBTDMQUI.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-IEAFSVXC.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-X2PZMXDP.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:n}){const o=u[n],[f,w]=m(!1),N=c(()=>w(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,N,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,A]=a(b.partOf);/* @__PURE__ */
2
- return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-N6TK43YN.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-QZ3MO3HB.js";import{Icon as n}from"./chunk-KKSVRIMP.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-X2PZMXDP.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function N({app:n}){const o=u[n],[f,N]=m(!1),w=c(()=>N(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,w,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,P]=a(b.partOf);/* @__PURE__ */
2
+ return p(t,{open:!0,onClose:()=>N(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
5
5
  /* @__PURE__ */p("p",{className:"text-2xs font-mono text-ink-faintest",children:b.version(o.version)}),
6
6
  /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[n]}),
7
7
  /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */h("p",{className:"text-2xs text-ink-faint",children:[j,
9
- /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{w as AboutApp,u as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),P]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{N as AboutApp,u as BUILTIN_APP_INFO};
@@ -1,14 +1,14 @@
1
- import{SearchableSelect as e}from"./chunk-RYS3URDC.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-7YU27U3Y.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-X2PZMXDP.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j=""}=t,O=void 0!==t.onApply,P=u().link,U=y.isSafe??k,$=d(),M=c(null),Y=c(null),[z,A]=p({url:r}),D=O?z.url:r,[E,X]=p(!1),[R,S]=p(null),[W,H]=p(null),K=c(()=>{});K.current=O?t.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=M.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(K.current(),!0)},()=>M.current)},[O]),m(()=>{if(!O)return;const e=Y.current;e?(e.focus(),e.select()):M.current?.querySelector("button, input")?.focus()},[]);const Q=o??[{value:b,label:P.address,target:{type:"text"}}],T=R&&R.against===D?R.kind:y.kindOf(D),J=Q.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===T),L=J.find(e=>"text"===e.target.type),V=J.find(e=>e.value===T)??L??J[0];if(!V)return null;const Z="text"!==V.target.type,q=Z?y.targetOf(D):D,I=h(V.target),B=I.find(e=>e.value===q),G=e=>({value:e,label:P.unavailable(e)}),_="select"===V.target.type&&q&&w?w(q):null,ee=_?y.readFilter(D):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=W&&W.against===D?W.text:D,te=!Z&&""!==le.trim()&&!U(le),ne=te&&(!O||E),re=(e,a)=>{O?A({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{S(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=I.find(a=>a.value===e);ie(e,a?.label)},se=Z?D:le.trim(),ue=()=>{if(!O||!se)return;if(!Z&&te)return void X(!0);const e=Z&&z.url===se?z.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[G(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=n.some(e=>""===e.value);/* @__PURE__ */
1
+ import{SearchableSelect as e}from"./chunk-DY2M6BIG.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-ZLHPCPXS.js";import{isSafeLinkHref as t}from"./chunk-PJPK2ADX.js";import{Input_default as n}from"./chunk-MAMWQCJ6.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-NHH2MXFU.js";import{Icon as o}from"./chunk-KKSVRIMP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-X2PZMXDP.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:j,className:F=""}=t,O=void 0!==t.onApply,P=u().link,M=y.isSafe??k,$=d(),z=c(null),A=c(null),[D,X]=p({url:r}),E=O?D.url:r,[K,U]=p(!1),[Y,H]=p(null),[S,W]=p(null),L=c(()=>{});L.current=O?t.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(L.current(),!0)},()=>z.current)},[O]),m(()=>{if(!O)return;const e=A.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const Q=o??[{value:b,label:P.address,target:{type:"text"}}],R=Y&&Y.against===E?Y.kind:y.kindOf(E),T=Q.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===R),Z=T.find(e=>"text"===e.target.type),I=T.find(e=>e.value===R)??Z??T[0];if(!I)return null;const J="text"!==I.target.type,V=J?y.targetOf(E):E,q=h(I.target),B=q.find(e=>e.value===V),G=e=>({value:e,label:P.unavailable(e)}),_="select"===I.target.type&&V&&w?w(V):null,ee=_?y.readFilter(E):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=S&&S.against===E?S.text:E,te=!J&&""!==le.trim()&&!M(le),ne=te&&(!O||K),re=(e,a)=>{O?X({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{H(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=q.find(a=>a.value===e);ie(e,a?.label)},se=J?E:le.trim(),ue=()=>{if(!O||!se)return;if(!J&&te)return void U(!0);const e=J&&D.url===se?D.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[G(a),...e]:[...e],ce=(a,t,n,r,i)=>{const o=[];for(const e of n){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=n.some(e=>""===e.value);/* @__PURE__ */
2
2
  return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:n.find(e=>""===e.value)?.label,onChange:r})}/* @__PURE__ */
3
- return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===V.target.type)pe=/* @__PURE__ */f(n,{ref:Y,id:`${$}-address`,size:"sm",type:"text",invalid:ne,"aria-label":P.address,"aria-describedby":ne?`${$}-why`:void 0,placeholder:F??P.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{X(!1);const a=e.trim();a?U(e)?(H({text:e,against:a}),ie(a)):H({text:e,against:D}):(H({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===V.target.type?V.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):V.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:V.target.placeholder},...de(e,q)];pe=ce(V.label,q,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(P.linkType,V.value,J.map(e=>({value:e.value,label:e.label})),e=>{H(null),X(!1);const a=J.find(a=>a.value===e);if(!a||"text"===a.target.type)return void S({kind:e,against:D});const l=h(a.target)[0];S({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(P.filter,ee?.param??"",[{value:"",label:P.noFilter},...ee&&!ae?[G(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(q,B?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(q,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(P.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(q,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:P.unsafe}),V.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:V.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:P.filterHint})]});if(!O)/* @__PURE__ */
4
- return f("div",{ref:M,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
5
- return v("div",{ref:M,role:"dialog","aria-label":N??P.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[Z?/* @__PURE__ */f("span",{className:a({inline:!0}),children:P.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:a({inline:!0}),children:P.title}),me,
3
+ return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===I.target.type)pe=/* @__PURE__ */f(n,{ref:A,id:`${$}-address`,size:"sm",type:"text",invalid:ne,"aria-label":P.address,"aria-describedby":ne?`${$}-why`:void 0,placeholder:j??P.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{U(!1);const a=e.trim();a?M(e)?(W({text:e,against:a}),ie(a)):W({text:e,against:E}):(W({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===I.target.type?I.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):I.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:I.target.placeholder},...de(e,V)];pe=ce(I.label,V,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(P.linkType,I.value,T.map(e=>({value:e.value,label:e.label})),e=>{W(null),U(!1);const a=T.find(a=>a.value===e);if(!a||"text"===a.target.type)return void H({kind:e,against:E});const l=h(a.target)[0];H({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(P.filter,ee?.param??"",[{value:"",label:P.noFilter},...ee&&!ae?[G(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(V,B?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(V,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(P.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(V,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${$}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:P.unsafe}),I.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:I.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:P.filterHint})]});if(!O)/* @__PURE__ */
4
+ return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${F}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
5
+ return v("div",{ref:z,role:"dialog","aria-label":N??P.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${F}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[J?/* @__PURE__ */f("span",{className:a({inline:!0}),children:P.title}):/* @__PURE__ */f("label",{htmlFor:`${$}-address`,className:a({inline:!0}),children:P.title}),me,
6
6
  /* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:P.remove}):null,
7
7
  /* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
8
- /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>K.current(),children:P.cancel}),
9
- /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:P.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
8
+ /* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>L.current(),children:P.cancel}),
9
+ /* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:P.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),j=d(),F=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
10
10
  return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
11
11
  /* @__PURE__ */f(n,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
12
- /* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${r.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
12
+ /* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?j:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${r.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
13
13
  /* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
14
- /* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
14
+ /* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:j,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),F()},onRemove:t?()=>{i(""),F()}:void 0,onCancel:F})})]})}export{y as LinkPicker,w as TextLinkField};
@@ -1,12 +1,12 @@
1
- import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-X2PZMXDP.js";import{useState as x,useId as k,useRef as $,useMemo as N,useEffect as j}from"react";import{createPortal as D}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function M({onClear:e,ariaLabel:t}){/* @__PURE__ */
2
- return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:L,emptyOptionLabel:E,className:T="",disabled:z,id:H,filter:A=!1,allowFreeText:O=!1,freeTextOption:U,onSearchChange:B,loading:I=!1,error:X,onRetry:J,rightAdornment:P,renderOption:G,clearable:Y=!0,"aria-label":Z,"aria-labelledby":K,"aria-describedby":V}=R,Q=!0===R.multiple,q=R.multiple?R.value:R.value?[R.value]:[],_=R.multiple?"":R.value,ee=e=>{R.multiple?R.onChange(e):R.onChange(e[0]??"")},te=q.length>0,ne=A&&te&&!z,re=Q||A,le=null!=U,oe=O||le,[ie,ae]=x(!1),[se,ue]=x(-1),ce=k(),de=H??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),be=w(),ge=E??be.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ie);$e.current=ie;const Ne=$(!1),je=e=>{$e.current&&($e.current=!1,e&&O&&!le&&Ye&&(Q?q.includes(Ye)||ee([...q,Ye]):Ye!==_&&ee([Ye])),ae(!1),ve(""))},De=(e,t)=>{if(!e.disabled){if(Q)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ze?ve(""):ue(t));ee([e.value]),je(!1)}},[Ce,Se]=x(null);b(()=>{if(!P||ie)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ie,re?{popupRef:xe}:{matchTriggerWidth:!0}),Me=N(()=>t(F),[F]),Re=q.join("\0"),Fe=N(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Me)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Me,Re,oe]),Le=Fe.join(", "),Ee=Y&&te&&!z,[Te,ze]=x(null),He=$(null),Ae=$(""),Oe=$(()=>{});Oe.current=()=>{const e=we.current,t=He.current;if(!Q||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Fe.join("\0")}`;if(o===Ae.current)return;Ae.current=o;let i=null;r>0&&Fe.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=W(Fe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},b(()=>{Oe.current()}),j(()=>{const e=we.current;if(!Q||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Oe.current());return t.observe(e),()=>t.disconnect()},[Q]);const Ue=Fe.length,Be=!Q||!Te||Te.shown>=Ue?Le:0===Te.shown?be.select.selectedCount(Ue):`${Fe.slice(0,Te.shown).join(", ")} +${Ue-Te.shown}`,Ie=Q&&null!==Te&&(Te.shown<Ue||Te.cut),Xe=ie&&te&&re;j(()=>{if(!ie)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||je(!0)};document.addEventListener("mousedown",e);const t=h(()=>je(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ie,O,me,Re,R.onChange]),j(()=>{if(ie)return y(e=>!("Escape"!==e.key||!$e.current)&&(je(!1),we.current?.blur(),!0),()=>xe.current)},[ie]);const Je=N(()=>{const e=/* @__PURE__ */new Set;return n(F,t=>!e.has(t.value)&&(e.add(t.value),!0))},[F]),Pe=N(()=>{if(B)return Je;const e=me.trim().toLowerCase();return e?n(Je,t=>r(t,e)):Je},[Je,me,B]),Ge=N(()=>t(Pe),[Pe]),Ye=me.trim(),Ze=N(()=>le&&Ye?Me.some(e=>e.label===Ye)||q.includes(Ye)?null:{value:Ye,label:Ye}:null,[le,Ye,Me,Re]),Ke=N(()=>Ze?[...Ge,Ze]:Ge,[Ge,Ze]);/* @__PURE__ */
3
- return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||Ne.current||document.activeElement!==we.current&&je(!0)},children:[(Ve=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<Ke.length?pe(se):void 0,"aria-label":K?void 0:Z,"aria-labelledby":K,"aria-describedby":V,value:ie?me:Be,onChange:e=>{ve(e.target.value),ae(!0)},onFocus:()=>{z||(ve(""),ae(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ie)return void ae(!0);if(0===Ke.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ke,t,n))}"Enter"===t.key?(t.preventDefault(),ie&&se>=0&&se<Ke.length?De(Ke[se],se):1!==Ge.length||Ge[0].disabled?O&&!le&&Ye&&(Q?(q.includes(Ye)||ee([...q,Ye]),ve("")):(ee([Ye]),je(!1),we.current?.blur())):De(Ge[0],0)):"Escape"===t.key?(je(!1),we.current?.blur()):"Tab"===t.key&&je(!0)},placeholder:Xe?Be:L||ge,className:`${ne?a:s} ${T} ${Ee?"pr-8":""} ${z?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Xe?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Q?/* @__PURE__ */S(d,{content:!ie&&Ie?Le:null,className:"block",children:Ve}):Ve),Q&&
4
- /* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(M,{ariaLabel:be.select.clear,onClear:()=>{ee([]),je(!1)}}),P&&!ie&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:P}),ie&&D(
5
- /* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{Ne.current=!0,setTimeout(()=>{Ne.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Q&&te&&Y&&!z&&
1
+ import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-QODTON7V.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-X2PZMXDP.js";import{useState as x,useId as k,useRef as $,useMemo as N,useEffect as j}from"react";import{createPortal as D}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function R({onClear:e,ariaLabel:t}){/* @__PURE__ */
2
+ return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function L(L){const{options:M,placeholder:F,emptyOptionLabel:T,className:E="",disabled:z,id:O,filter:A=!1,allowFreeText:H=!1,freeTextOption:U,onSearchChange:B,loading:I=!1,error:J,onRetry:P,rightAdornment:X,renderOption:G,clearable:V=!0,"aria-label":Y,"aria-labelledby":Z,"aria-describedby":K}=L,Q=!0===L.multiple,q=L.multiple?L.value:L.value?[L.value]:[],_=L.multiple?"":L.value,ee=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},te=q.length>0,ne=A&&te&&!z,re=Q||A,le=null!=U,oe=H||le,[ie,ae]=x(!1),[se,ue]=x(-1),ce=k(),de=O??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),be=w(),ge=T??be.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ie);$e.current=ie;const Ne=$(!1),je=e=>{$e.current&&($e.current=!1,e&&H&&!le&&Ve&&(Q?q.includes(Ve)||ee([...q,Ve]):Ve!==_&&ee([Ve])),ae(!1),ve(""))},De=(e,t)=>{if(!e.disabled){if(Q)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ye?ve(""):ue(t));ee([e.value]),je(!1)}},[Ce,Se]=x(null);b(()=>{if(!X||ie)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Te?32:8)+6:null)});const We=m(we,ie,re?{popupRef:xe}:{matchTriggerWidth:!0}),Re=N(()=>t(M),[M]),Le=q.join("\0"),Me=N(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Re)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Re,Le,oe]),Fe=Me.join(", "),Te=V&&te&&!z,[Ee,ze]=x(null),Oe=$(null),Ae=$(""),He=$(()=>{});He.current=()=>{const e=we.current,t=Oe.current;if(!Q||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Me.join("\0")}`;if(o===Ae.current)return;Ae.current=o;let i=null;r>0&&Me.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=W(Me,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},b(()=>{He.current()}),j(()=>{const e=we.current;if(!Q||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>He.current());return t.observe(e),()=>t.disconnect()},[Q]);const Ue=Me.length,Be=!Q||!Ee||Ee.shown>=Ue?Fe:0===Ee.shown?be.select.selectedCount(Ue):`${Me.slice(0,Ee.shown).join(", ")} +${Ue-Ee.shown}`,Ie=Q&&null!==Ee&&(Ee.shown<Ue||Ee.cut),Je=ie&&te&&re;j(()=>{if(!ie)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||je(!0)};document.addEventListener("mousedown",e);const t=h(()=>je(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ie,H,me,Le,L.onChange]),j(()=>{if(ie)return y(e=>!("Escape"!==e.key||!$e.current)&&(je(!1),we.current?.blur(),!0),()=>xe.current)},[ie]);const Pe=N(()=>{const e=/* @__PURE__ */new Set;return n(M,t=>!e.has(t.value)&&(e.add(t.value),!0))},[M]),Xe=N(()=>{if(B)return Pe;const e=me.trim().toLowerCase();return e?n(Pe,t=>r(t,e)):Pe},[Pe,me,B]),Ge=N(()=>t(Xe),[Xe]),Ve=me.trim(),Ye=N(()=>le&&Ve?Re.some(e=>e.label===Ve)||q.includes(Ve)?null:{value:Ve,label:Ve}:null,[le,Ve,Re,Le]),Ze=N(()=>Ye?[...Ge,Ye]:Ge,[Ge,Ye]);/* @__PURE__ */
3
+ return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||Ne.current||document.activeElement!==we.current&&je(!0)},children:[(Ke=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<Ze.length?pe(se):void 0,"aria-label":Z?void 0:Y,"aria-labelledby":Z,"aria-describedby":K,value:ie?me:Be,onChange:e=>{ve(e.target.value),ae(!0)},onFocus:()=>{z||(ve(""),ae(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ie)return void ae(!0);if(0===Ze.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Ze,t,n))}"Enter"===t.key?(t.preventDefault(),ie&&se>=0&&se<Ze.length?De(Ze[se],se):1!==Ge.length||Ge[0].disabled?H&&!le&&Ve&&(Q?(q.includes(Ve)||ee([...q,Ve]),ve("")):(ee([Ve]),je(!1),we.current?.blur())):De(Ge[0],0)):"Escape"===t.key?(je(!1),we.current?.blur()):"Tab"===t.key&&je(!0)},placeholder:Je?Be:F||ge,className:`${ne?a:s} ${E} ${Te?"pr-8":""} ${z?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Je?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Q?/* @__PURE__ */S(d,{content:!ie&&Ie?Fe:null,className:"block",children:Ke}):Ke),Q&&
4
+ /* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:Oe,className:"whitespace-pre"})}),Te&&/* @__PURE__ */S(R,{ariaLabel:be.select.clear,onClear:()=>{ee([]),je(!1)}}),X&&!ie&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Te?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:X}),ie&&D(
5
+ /* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{Ne.current=!0,setTimeout(()=>{Ne.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Q&&te&&V&&!z&&
6
6
  /* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${g}`,children:be.select.clearAll}),I?
7
- /* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):X?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
8
- /* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:X}),J&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:J,className:"shrink-0",children:be.list.retry})]}):null,
9
- /* @__PURE__ */C("div",{id:he,role:Ke.length?"listbox":void 0,"aria-labelledby":Ke.length?K??(Z?void 0:de):void 0,"aria-label":Ke.length&&!K?Z:void 0,"aria-multiselectable":!(!Ke.length||!Q)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ke.length?I||X?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:be.select.noMatches}):0===Ge.length?null:l(Pe,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
7
+ /* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):J?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
8
+ /* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:J}),P&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:P,className:"shrink-0",children:be.list.retry})]}):null,
9
+ /* @__PURE__ */C("div",{id:he,role:Ze.length?"listbox":void 0,"aria-labelledby":Ze.length?Z??(Y?void 0:de):void 0,"aria-label":Ze.length&&!Z?Y:void 0,"aria-multiselectable":!(!Ze.length||!Q)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Ze.length?I||J?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:be.select.noMatches}):0===Ge.length?null:l(Xe,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
10
10
  return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Q)&&n.preventDefault(),De(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Q&&/* @__PURE__ */S(o,{selected:n}),
11
- /* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:G?G(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(i,{grows:re,children:e.sublabel})]},e.value)},ce),Ze&&U&&
12
- /* @__PURE__ */S("button",{id:pe(Ge.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Q&&e.preventDefault(),De(Ze,Ge.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${Ge.length?`border-t ${g}`:""} ${se===Ge.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:U(Ze.value)})},`${ce}-typed`)]})]}),document.body)]});var Ve}export{R as SearchableSelect,W as fitChoice};
11
+ /* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:G?G(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(i,{grows:re,children:e.sublabel})]},e.value)},ce),Ye&&U&&
12
+ /* @__PURE__ */S("button",{id:pe(Ge.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Q&&e.preventDefault(),De(Ye,Ge.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${Ge.length?`border-t ${g}`:""} ${se===Ge.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:U(Ye.value)})},`${ce}-typed`)]})]}),document.body)]});var Ke}export{L as SearchableSelect,W as fitChoice};
@@ -1,4 +1,4 @@
1
- import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
1
+ import{Icon as e}from"./chunk-KKSVRIMP.js";import{useShellStrings as r}from"./chunk-X2PZMXDP.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
2
2
  return n(e,{name:"check",...t});case"error":/* @__PURE__ */
3
3
  return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
4
4
  return n(e,{name:"error",...t});default:/* @__PURE__ */
@@ -1,9 +1,9 @@
1
- import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-BMQCUHSD.js";import{useHighlight as o,autoHighlightIndex as l,highlightOpacity as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as s}from"./chunk-TLRCTNUF.js";import{CartesianPlot as m}from"./chunk-25STFYV3.js";import{useDragZoom as u,ChartZoomSummary as c}from"./chunk-7VCAMNCH.js";import{CHART_INK as d,resolveSeriesColor as h,STATUS_VARS as f}from"./chunk-TZFACUMR.js";import{useShellStrings as p,useShellLocale as b}from"./chunk-X2PZMXDP.js";import{formatPercent as x,formatPlain as y}from"./chunk-C3QOHMR6.js";import{useId as v}from"react";import{jsx as M,jsxs as g,Fragment as k}from"react/jsx-runtime";function N({stacked:N=!1,stackMode:w="value",height:C=220,width:$,max:F,formatValue:j,yAxisLabel:L,className:T,emptyLabel:A,radius:S=3,loading:V=!1,animate:z=!0,glow:R=!1,emphasise:H=!1,activeKey:Y,highlight:B="none",valueLabels:E=!1,onSelect:O,min:U,formatTooltipValue:D,tooltipLabels:P,barGap:Q=4,seriesLabels:W=!1,zoomable:X=!0,series:Z,labels:G}){const K=v(),q=u(G.length,X),I=q.view?.[0]??0,J=q.slice(G),_=P?q.slice(P):void 0,tt=Z.map(t=>({...t,data:q.slice(t.data),pointTones:t.pointTones?q.slice(t.pointTones):void 0,pointColors:t.pointColors?q.slice(t.pointColors):void 0})),{highlighted:et}=o(),at=p().charts,it=b(),nt=j??(t=>y(t,it)),ot=D??nt;if(V)/* @__PURE__ */return M(n,{height:C,width:$,variant:"bars",className:T});const lt=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const i=t.pointTones?.[e];return i?f[i]:h(t.slot,t.color,t.tone)},rt=tt.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),st=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},mt=J.map((t,e)=>rt.reduce((t,a)=>t+st(a,e),0)),ut=J.map((t,e)=>rt.reduce((t,a)=>t+Math.max(0,st(a,e)),0)),ct=J.map((t,e)=>rt.reduce((t,a)=>t+Math.min(0,st(a,e)),0)),dt=N&&"percent"===w,ht=(t,e)=>mt[e]>0?t/mt[e]:null,ft=dt?[1]:N?[...ut,...ct]:rt.flatMap(t=>t.data.filter(Number.isFinite)),pt=(t,e)=>{const a=t.bandwidth/Math.max(1,rt.length),i=rt.length>1?Math.min(Q,.25*a):0;return{offset:e*a+i/2,width:Math.max(1,a-i)}},bt=W&&!N?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return J.map((i,n)=>rt.map((i,o)=>{const l=i.data[n];if(!Number.isFinite(l))return null;const r=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:s,width:m}=pt(t,o),u=t(n)+s+m/2,c=Math.min(e(r),e(a)),h=Math.max(e(r),e(a));if(m<13)return null;const f=Math.floor((h-c-12)/6.6),p=f>=Math.min(4,i.label.length),b=p&&i.label.length>f?`${i.label.slice(0,f-1).trimEnd()}…`:i.label,x=p?h-6:c-4;/* @__PURE__ */
1
+ import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-BMQCUHSD.js";import{useHighlight as o,autoHighlightIndex as l,highlightOpacity as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as s}from"./chunk-TLRCTNUF.js";import{CartesianPlot as m}from"./chunk-OPB3I4JH.js";import{useDragZoom as u,ChartZoomSummary as c}from"./chunk-7VCAMNCH.js";import{CHART_INK as d,resolveSeriesColor as h,STATUS_VARS as f}from"./chunk-TZFACUMR.js";import{useShellStrings as p,useShellLocale as b}from"./chunk-X2PZMXDP.js";import{formatPercent as x,formatPlain as y}from"./chunk-C3QOHMR6.js";import{useId as v}from"react";import{jsx as M,jsxs as g,Fragment as k}from"react/jsx-runtime";function N({stacked:N=!1,stackMode:w="value",height:C=220,width:$,max:j,formatValue:F,yAxisLabel:L,className:A,emptyLabel:T,radius:z=3,loading:S=!1,animate:V=!0,glow:H=!1,emphasise:R=!1,activeKey:B,highlight:O="none",valueLabels:E=!1,onSelect:P,min:U,formatTooltipValue:Y,tooltipLabels:D,barGap:Q=4,seriesLabels:W=!1,zoomable:X=!0,series:Z,labels:G}){const I=v(),J=u(G.length,X),K=J.view?.[0]??0,q=J.slice(G),_=D?J.slice(D):void 0,tt=Z.map(t=>({...t,data:J.slice(t.data),pointTones:t.pointTones?J.slice(t.pointTones):void 0,pointColors:t.pointColors?J.slice(t.pointColors):void 0})),{highlighted:et}=o(),at=p().charts,it=b(),nt=F??(t=>y(t,it)),ot=Y??nt;if(S)/* @__PURE__ */return M(n,{height:C,width:$,variant:"bars",className:A});const lt=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const i=t.pointTones?.[e];return i?f[i]:h(t.slot,t.color,t.tone)},rt=tt.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),st=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},mt=q.map((t,e)=>rt.reduce((t,a)=>t+st(a,e),0)),ut=q.map((t,e)=>rt.reduce((t,a)=>t+Math.max(0,st(a,e)),0)),ct=q.map((t,e)=>rt.reduce((t,a)=>t+Math.min(0,st(a,e)),0)),dt=N&&"percent"===w,ht=(t,e)=>mt[e]>0?t/mt[e]:null,ft=dt?[1]:N?[...ut,...ct]:rt.flatMap(t=>t.data.filter(Number.isFinite)),pt=(t,e)=>{const a=t.bandwidth/Math.max(1,rt.length),i=rt.length>1?Math.min(Q,.25*a):0;return{offset:e*a+i/2,width:Math.max(1,a-i)}},bt=W&&!N?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return q.map((i,n)=>rt.map((i,o)=>{const l=i.data[n];if(!Number.isFinite(l))return null;const r=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:s,width:m}=pt(t,o),u=t(n)+s+m/2,c=Math.min(e(r),e(a)),h=Math.max(e(r),e(a));if(m<13)return null;const f=Math.floor((h-c-12)/6.6),p=f>=Math.min(4,i.label.length),b=p&&i.label.length>f?`${i.label.slice(0,f-1).trimEnd()}…`:i.label,x=p?h-6:c-4;/* @__PURE__ */
2
2
  return M("text",{"data-series-label":"true",x:u,y:x,transform:`rotate(-90 ${u} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:p?d.surface:d.label,children:b},`n${i.key}-${n}`)}))}:null;/* @__PURE__ */
3
3
  return g(k,{children:[
4
- /* @__PURE__ */M(m,{labels:J,values:ft,height:C,width:$,max:dt?1:F,min:dt?void 0:U,formatValue:dt?t=>x(Math.round(100*t),0,it):nt,yAxisLabel:L,className:T,emptyLabel:A,onSelect:O?t=>O(I+t):void 0,zoom:X?q:void 0,ariaLabel:at.acrossCategories(rt.map(t=>t.label),J.length),tooltip:t=>/* @__PURE__ */M(s,{title:_?.[t]??J[t],rows:rt.map(e=>({key:e.key,label:e.label,color:lt(e,t),value:Number.isFinite(e.data[t])?dt?`${x(100*(ht(e.data[t],t)??0),1,it)} · ${ot(e.data[t])}`:ot(e.data[t]):void 0})),footnote:dt?at.inCategory(ot(mt[t])):void 0}),overlay:E&&!dt||bt?({x:t,y:e})=>/* @__PURE__ */g("g",{pointerEvents:"none",children:[bt?.({x:t,y:e}),E&&!dt&&J.map((a,i)=>{if(N){if(!rt.some(t=>Number.isFinite(t.data[i])))return null;const a=rt.reduce((t,e)=>t+st(e,i),0),n=a>=0?ut[i]:ct[i];/* @__PURE__ */
4
+ /* @__PURE__ */M(m,{labels:q,values:ft,height:C,width:$,max:dt?1:j,min:dt?void 0:U,formatValue:dt?t=>x(Math.round(100*t),0,it):nt,yAxisLabel:L,className:A,emptyLabel:T,onSelect:P?t=>P(K+t):void 0,zoom:X?J:void 0,ariaLabel:at.acrossCategories(rt.map(t=>t.label),q.length),tooltip:t=>/* @__PURE__ */M(s,{title:_?.[t]??q[t],rows:rt.map(e=>({key:e.key,label:e.label,color:lt(e,t),value:Number.isFinite(e.data[t])?dt?`${x(100*(ht(e.data[t],t)??0),1,it)} · ${ot(e.data[t])}`:ot(e.data[t]):void 0})),footnote:dt?at.inCategory(ot(mt[t])):void 0}),overlay:E&&!dt||bt?({x:t,y:e})=>/* @__PURE__ */g("g",{pointerEvents:"none",children:[bt?.({x:t,y:e}),E&&!dt&&q.map((a,i)=>{if(N){if(!rt.some(t=>Number.isFinite(t.data[i])))return null;const a=rt.reduce((t,e)=>t+st(e,i),0),n=a>=0?ut[i]:ct[i];/* @__PURE__ */
5
5
  return M("text",{"data-value-label":"true",x:t.center(i),y:a>=0?e(n)-4:e(n)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(a)},`v${i}`)}return rt.map((a,n)=>{const o=a.data[i];if(!Number.isFinite(o))return null;const l=o,{offset:r,width:s}=pt(t,n);/* @__PURE__ */
6
- return M("text",{"data-value-label":"true",x:t(i)+r+s/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(l)},`v${a.key}-${i}`)})})]}):void 0,children:({x:n,y:o,bottom:s,active:m})=>{const u=Y?J.indexOf(Y):-1,c=l(N?mt:rt[0]?.data??[],B),h=m??(u>=0?u:c);/* @__PURE__ */
6
+ return M("text",{"data-value-label":"true",x:t(i)+r+s/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(l)},`v${a.key}-${i}`)})})]}):void 0,children:({x:n,y:o,bottom:s,active:m})=>{const u=B?q.indexOf(B):-1,c=l(N?mt:rt[0]?.data??[],O),h=m??(u>=0?u:c);/* @__PURE__ */
7
7
  return g("g",{children:[
8
- /* @__PURE__ */M(t,{id:K,glow:R}),J.map((t,l)=>{let s=0,m=0;const u=o(Math.min(o.domain[1],Math.max(o.domain[0],0)));return rt.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const p=dt?ht(f,l):f;if(null===p)return null;const b=lt(t,l),x=pt(n,c),y=N?n(l):n(l)+x.offset,v=N?Math.max(1,n.bandwidth):x.width;let g,k,w=!0;if(N){const t=p>=0?s:m,e=t+p;p>=0?s=e:m=e,g=o(Math.max(t,e)),k=o(Math.min(t,e)),w=0===t}else g=Math.min(o(p),u),k=Math.max(o(p),u);const C=Math.max(0,k-g-(N&&!w?2:0)),$=null===h||h===l,F=$?b:H?d.muted:b,j=r(t.key,et);/* @__PURE__ */
9
- return M("rect",{x:y,y:g,width:v,height:C,rx:S,fill:F,fillOpacity:j??($?1:H?.32:.45),filter:R&&h===l?`url(#${i(K)})`:void 0,className:"rosh-viz-mark"+(z?` ${e.rise}`:""),style:z?a(l*(N?1:rt.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==m&&!H&&/* @__PURE__ */M("line",{x1:n.center(m),y1:o(o.domain[1]),x2:n.center(m),y2:s,stroke:d.axis,strokeWidth:1})]})}}),q.view&&/* @__PURE__ */M(c,{from:_?.[0]??J[0],to:_?.at(-1)??J[J.length-1],count:J.length,total:N?ot(mt.reduce((t,e)=>t+e,0)):void 0,rows:rt.map(t=>({s:t,sum:t.data.reduce((e,a,i)=>e+st(t,i),0)})).sort((t,e)=>e.sum-t.sum).map(({s:t,sum:e})=>({key:t.key,label:t.label,color:h(t.slot,t.color,t.tone),value:ot(e)})),onClear:q.clear})]})}export{N as ColumnChart};
8
+ /* @__PURE__ */M(t,{id:I,glow:H}),q.map((t,l)=>{let s=0,m=0;const u=o(Math.min(o.domain[1],Math.max(o.domain[0],0)));return rt.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const p=dt?ht(f,l):f;if(null===p)return null;const b=lt(t,l),x=pt(n,c),y=N?n(l):n(l)+x.offset,v=N?Math.max(1,n.bandwidth):x.width;let g,k,w=!0;if(N){const t=p>=0?s:m,e=t+p;p>=0?s=e:m=e,g=o(Math.max(t,e)),k=o(Math.min(t,e)),w=0===t}else g=Math.min(o(p),u),k=Math.max(o(p),u);const C=Math.max(0,k-g-(N&&!w?2:0)),$=null===h||h===l,j=$?b:R?d.muted:b,F=r(t.key,et);/* @__PURE__ */
9
+ return M("rect",{x:y,y:g,width:v,height:C,rx:z,fill:j,fillOpacity:F??($?1:R?.32:.45),filter:H&&h===l?`url(#${i(I)})`:void 0,className:"rosh-viz-mark"+(V?` ${e.rise}`:""),style:V?a(l*(N?1:rt.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==m&&!R&&/* @__PURE__ */M("line",{x1:n.center(m),y1:o(o.domain[1]),x2:n.center(m),y2:s,stroke:d.axis,strokeWidth:1})]})}}),J.view&&/* @__PURE__ */M(c,{from:_?.[0]??q[0],to:_?.at(-1)??q[q.length-1],count:q.length,total:N?ot(mt.reduce((t,e)=>t+e,0)):void 0,rows:rt.map(t=>({s:t,sum:t.data.reduce((e,a,i)=>e+st(t,i),0)})).sort((t,e)=>e.sum-t.sum).map(({s:t,sum:e})=>({key:t.key,label:t.label,color:h(t.slot,t.color,t.tone),value:ot(e)})),onClear:J.clear})]})}export{N as ColumnChart};