efficient-shell 10.15.0 → 10.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +14 -0
  2. package/dist/{Browser-WR4GMYE7.js → Browser-RI5X7GMK.js} +14 -14
  3. package/dist/Calculator-Y566OMJZ.js +29 -0
  4. package/dist/{CurrencyConverter-HEAAQX23.js → CurrencyConverter-2GUEE7ZR.js} +6 -6
  5. package/dist/{Documents-NSPKXCTF.js → Documents-GI346UL5.js} +12 -12
  6. package/dist/{Files-5HAUE2PR.js → Files-UA23KXN7.js} +54 -54
  7. package/dist/{Notepad-5LSFAYXO.js → Notepad-HRZKLHO3.js} +9 -9
  8. package/dist/{PomodoroTimer-5V32QOCZ.js → PomodoroTimer-QYCTTTPZ.js} +68 -68
  9. package/dist/{Preview-PDVZZRSK.js → Preview-LSGN5GN7.js} +29 -29
  10. package/dist/Sidebar-2P26444H.js +44 -0
  11. package/dist/{Spreadsheet-K4IAI3A2.js → Spreadsheet-7JBZY6KJ.js} +9 -9
  12. package/dist/{Stock-AOCHAKUF.js → Stock-ZVQT25IE.js} +3 -3
  13. package/dist/{Weather-F2QHTG32.js → Weather-RAUDLLVU.js} +17 -17
  14. package/dist/{WorldClock-G72577HU.js → WorldClock-2XBWZ6SZ.js} +6 -6
  15. package/dist/ai/index.d.ts +76 -1
  16. package/dist/ai/index.js +70 -52
  17. package/dist/ai.css +1 -1
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +1 -1
  21. package/dist/brand.css +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/ChartTooltip.js +1 -1
  25. package/dist/charts/ChordChart.js +1 -1
  26. package/dist/charts/ColumnChart.js +1 -1
  27. package/dist/charts/FunnelChart.js +1 -1
  28. package/dist/charts/HeatmapChart.js +1 -1
  29. package/dist/charts/HistogramChart.js +1 -1
  30. package/dist/charts/PieChart.js +1 -1
  31. package/dist/charts/RadarChart.js +1 -1
  32. package/dist/charts/RadialBarChart.js +1 -1
  33. package/dist/charts/RangeChart.js +1 -1
  34. package/dist/charts/SankeyChart.js +1 -1
  35. package/dist/charts/ScatterChart.js +1 -1
  36. package/dist/charts/SpecChart.js +1 -1
  37. package/dist/charts/SunburstChart.js +1 -1
  38. package/dist/charts/TimeSeriesChart.js +1 -1
  39. package/dist/charts/TreemapChart.js +1 -1
  40. package/dist/charts/WaterfallChart.js +1 -1
  41. package/dist/{chunk-4U57ANZF.js → chunk-2SY76NFO.js} +1 -1
  42. package/dist/{chunk-N2RHM432.js → chunk-2VGQS6CW.js} +1 -1
  43. package/dist/{chunk-SQCUN2DX.js → chunk-34URULVW.js} +1 -1
  44. package/dist/{chunk-5LCDCO46.js → chunk-3ELLBQPS.js} +1 -1
  45. package/dist/{chunk-NZCSLS4O.js → chunk-3LDXURVU.js} +3 -3
  46. package/dist/{chunk-NZQCDFDG.js → chunk-3NW5LD7D.js} +3 -3
  47. package/dist/{chunk-N3YBOXOF.js → chunk-4G2C6J4I.js} +1 -1
  48. package/dist/{chunk-FQIA5BTN.js → chunk-4QJOEHM6.js} +7 -7
  49. package/dist/{chunk-V2MIQ4GJ.js → chunk-4UKGVLFP.js} +2 -2
  50. package/dist/{chunk-FRVNDEV2.js → chunk-4WEFGKJL.js} +8 -8
  51. package/dist/{chunk-LVBO2OMQ.js → chunk-57HN6MPC.js} +2 -2
  52. package/dist/{chunk-2RAOWHHM.js → chunk-5UYZ75F3.js} +12 -12
  53. package/dist/{chunk-ZL5OSF26.js → chunk-6AS5PHHK.js} +18 -18
  54. package/dist/{chunk-Q3IR5SKD.js → chunk-6XBWM453.js} +1 -1
  55. package/dist/{chunk-CDA2VXBN.js → chunk-74OUAR6L.js} +6 -6
  56. package/dist/{chunk-ARCQYF7G.js → chunk-7HLC352T.js} +2 -2
  57. package/dist/{chunk-B25RVAVS.js → chunk-7HTRLRVO.js} +64 -64
  58. package/dist/{chunk-G4JTO5PB.js → chunk-7JGR7WPD.js} +1 -1
  59. package/dist/{chunk-RFEET2LS.js → chunk-7NBSBGLX.js} +1 -1
  60. package/dist/{chunk-S52GQQVB.js → chunk-7TNAOZZ2.js} +1 -1
  61. package/dist/{chunk-AJFR35CO.js → chunk-7UTPXU6K.js} +4 -4
  62. package/dist/{chunk-NBB2RKDH.js → chunk-7X5FABQS.js} +5 -5
  63. package/dist/chunk-7XYTJPWW.js +29 -0
  64. package/dist/{chunk-IC7BEFE3.js → chunk-7ZP64SC7.js} +1 -1
  65. package/dist/{chunk-YLGQ6ACR.js → chunk-AJO72CPB.js} +1 -1
  66. package/dist/{chunk-4XS32UWF.js → chunk-AOK3BHRT.js} +4 -4
  67. package/dist/{chunk-SSM3EN7G.js → chunk-B7UCXROE.js} +1 -1
  68. package/dist/chunk-BNJWZAQE.js +12 -0
  69. package/dist/{chunk-HL3DJTIC.js → chunk-CBEKJTXU.js} +7 -7
  70. package/dist/{chunk-NWURIQI3.js → chunk-CKKUFDZ3.js} +3 -3
  71. package/dist/chunk-COJYPNKF.js +2 -0
  72. package/dist/{chunk-ZLSUQAD3.js → chunk-CPZ42W2B.js} +1 -1
  73. package/dist/{chunk-ZL7O4KGQ.js → chunk-CQV3VSI2.js} +1 -1
  74. package/dist/{chunk-5LXT3IUL.js → chunk-D4I3U7UE.js} +1 -1
  75. package/dist/{chunk-7PSIPTOE.js → chunk-D7F442OZ.js} +1 -1
  76. package/dist/chunk-DESWIPOZ.js +3 -0
  77. package/dist/{chunk-KJCTXWF7.js → chunk-DRDYZ633.js} +2 -2
  78. package/dist/{chunk-FJYTYW6M.js → chunk-DWR7MYQU.js} +5 -5
  79. package/dist/{chunk-EYEB3J77.js → chunk-E3753CWP.js} +5 -5
  80. package/dist/chunk-EU3JZGV2.js +14 -0
  81. package/dist/{chunk-55W5TTKS.js → chunk-FEQDZTZ7.js} +6 -6
  82. package/dist/{chunk-LWEWURFT.js → chunk-FWVC4A2O.js} +13 -13
  83. package/dist/{chunk-WZ5QSSUM.js → chunk-G4GVLK44.js} +6 -6
  84. package/dist/{chunk-5N5AAYQV.js → chunk-GISDIVFK.js} +1 -1
  85. package/dist/{chunk-N4REWGMM.js → chunk-GPJO34QP.js} +8 -8
  86. package/dist/{chunk-FFZREKEF.js → chunk-H32EQG5Z.js} +9 -9
  87. package/dist/{chunk-PUBJ5YHQ.js → chunk-I2XGPTCN.js} +1 -1
  88. package/dist/chunk-I4VIEGCX.js +2 -0
  89. package/dist/{chunk-ZZTCYEQ4.js → chunk-IKNG7EFQ.js} +7 -7
  90. package/dist/{chunk-OSVY6SUO.js → chunk-ISJPW2FZ.js} +5 -5
  91. package/dist/{chunk-POQ4ETLL.js → chunk-JGTGQGHY.js} +1 -1
  92. package/dist/{chunk-RSS2ALHH.js → chunk-JJW43QPS.js} +5 -5
  93. package/dist/chunk-JSGQWVYH.js +7 -0
  94. package/dist/{chunk-HRPXJ4EI.js → chunk-K4ANB6AF.js} +1 -1
  95. package/dist/{chunk-CHAWFMV4.js → chunk-KTA77U3P.js} +4 -4
  96. package/dist/{chunk-OAT7OEWP.js → chunk-KTVXPGGB.js} +8 -8
  97. package/dist/{chunk-CFAELIKH.js → chunk-L4IW77TD.js} +6 -6
  98. package/dist/{chunk-ZHPHNQKM.js → chunk-LCJRTJXT.js} +7 -7
  99. package/dist/{chunk-FUVVO6YP.js → chunk-LDE5IV2M.js} +1 -1
  100. package/dist/{chunk-TXNCDDB4.js → chunk-LO5T2K4B.js} +3 -3
  101. package/dist/chunk-LU6NA4RU.js +5 -0
  102. package/dist/{chunk-ZI6SMZJ4.js → chunk-MHB52H2Y.js} +11 -11
  103. package/dist/{chunk-FGJOGBGZ.js → chunk-MNSKGMVZ.js} +8 -8
  104. package/dist/{chunk-AJFWBEIG.js → chunk-MTEFYFUO.js} +9 -9
  105. package/dist/{chunk-S5SRXI4V.js → chunk-MVZRZTQP.js} +1 -1
  106. package/dist/{chunk-MMQ6ETRD.js → chunk-N67QX3WW.js} +2 -2
  107. package/dist/{chunk-M5LR7ZZX.js → chunk-O6JJIR4H.js} +1 -1
  108. package/dist/{chunk-G7QK7WAK.js → chunk-PCFBDXLN.js} +1 -1
  109. package/dist/chunk-PJQGYKN6.js +11 -0
  110. package/dist/chunk-PN5FQVMB.js +7 -0
  111. package/dist/chunk-PN65IIYN.js +8 -0
  112. package/dist/chunk-PUF75SMJ.js +1 -0
  113. package/dist/{chunk-AJVUND5A.js → chunk-PVZGSCCB.js} +6 -6
  114. package/dist/{chunk-B37JVKW5.js → chunk-PYAJCN2Q.js} +1 -1
  115. package/dist/chunk-Q6YNMNUH.js +6 -0
  116. package/dist/{chunk-YFMZKTJC.js → chunk-QDQ347RL.js} +1 -1
  117. package/dist/{chunk-4VTJEKHX.js → chunk-QHOBK35Y.js} +1 -1
  118. package/dist/{chunk-66XPG5G3.js → chunk-QYSEYYV7.js} +1 -1
  119. package/dist/chunk-RCPFUDPS.js +4 -0
  120. package/dist/{chunk-25M7CYCR.js → chunk-RLJHRDDW.js} +8 -8
  121. package/dist/{chunk-6BB6A5OB.js → chunk-RPYFOQM2.js} +5 -5
  122. package/dist/chunk-RRUHQLUY.js +14 -0
  123. package/dist/{chunk-ESYYKGN4.js → chunk-S6FBMSFU.js} +2 -2
  124. package/dist/{chunk-5FRFSPQ2.js → chunk-SDQIXE5M.js} +8 -8
  125. package/dist/{chunk-PB3OC4BO.js → chunk-SG4LO2AN.js} +8 -8
  126. package/dist/{chunk-U2WCV56F.js → chunk-SHKBDFSE.js} +1 -1
  127. package/dist/{chunk-ZMRGHVKS.js → chunk-TKJBZIHT.js} +1 -1
  128. package/dist/{chunk-EHGGSUXA.js → chunk-TM33D3CE.js} +1 -1
  129. package/dist/chunk-TMNAHOJ7.js +9 -0
  130. package/dist/{chunk-GKIU55T5.js → chunk-TVH7IZQ4.js} +2 -2
  131. package/dist/{chunk-EQZZ4V5X.js → chunk-TXDA7TTP.js} +1 -1
  132. package/dist/{chunk-SOGQZVPJ.js → chunk-UBMY23AG.js} +5 -5
  133. package/dist/{chunk-KKOADH55.js → chunk-UDRMZ22J.js} +1 -1
  134. package/dist/{chunk-36R3R3IB.js → chunk-ULXCDM7Y.js} +4 -4
  135. package/dist/{chunk-MCYFUIXH.js → chunk-UWIZX3RK.js} +1 -1
  136. package/dist/{chunk-SP2AUVIU.js → chunk-UYRITNQW.js} +3 -3
  137. package/dist/{chunk-OET2Q7P6.js → chunk-VNACNNCJ.js} +3 -3
  138. package/dist/{chunk-UWIFXNH6.js → chunk-VTFZ6W2D.js} +3 -3
  139. package/dist/chunk-W35N7SL3.js +8 -0
  140. package/dist/{chunk-UPCLAEKC.js → chunk-W3OWPBQL.js} +2 -2
  141. package/dist/chunk-W4OBVKN4.js +1 -0
  142. package/dist/chunk-W6URVLQF.js +20 -0
  143. package/dist/{chunk-EK5WJQTR.js → chunk-WB4P4QE2.js} +1 -1
  144. package/dist/{chunk-XPPLCLYK.js → chunk-WINNA7LS.js} +1 -1
  145. package/dist/chunk-WMEYNKXZ.js +22 -0
  146. package/dist/{chunk-A267MPGS.js → chunk-X6BFVDB4.js} +2 -2
  147. package/dist/{chunk-5JU53T3U.js → chunk-XZGGJHJC.js} +8 -8
  148. package/dist/chunk-Y3R267FV.js +15 -0
  149. package/dist/{chunk-XJUREXYW.js → chunk-YOSUCCHG.js} +3 -3
  150. package/dist/chunk-ZZVE64OI.js +2 -0
  151. package/dist/data/DataTable.js +1 -1
  152. package/dist/data/Kanban.js +1 -1
  153. package/dist/data/ListLoadError.js +1 -1
  154. package/dist/format/index.js +1 -1
  155. package/dist/forms/AlignmentGrid.js +1 -1
  156. package/dist/forms/BorderInput.js +1 -1
  157. package/dist/forms/BrandAssetEditor.js +1 -1
  158. package/dist/forms/Button.js +1 -1
  159. package/dist/forms/ColorPicker.js +1 -1
  160. package/dist/forms/ComposerAttachments.js +1 -1
  161. package/dist/forms/CornersInput.js +1 -1
  162. package/dist/forms/DatePicker.js +1 -1
  163. package/dist/forms/DateRangePicker.js +1 -1
  164. package/dist/forms/DisplayChips.js +1 -1
  165. package/dist/forms/FilePicker.js +1 -1
  166. package/dist/forms/IconButton.js +1 -1
  167. package/dist/forms/IconPicker.js +1 -1
  168. package/dist/forms/InputNumber.js +1 -1
  169. package/dist/forms/LinkPicker.js +1 -1
  170. package/dist/forms/MediaLibrary.js +1 -1
  171. package/dist/forms/MediaUploadField.js +1 -1
  172. package/dist/forms/MediaUploadGrid.js +1 -1
  173. package/dist/forms/MediaUsedInList.js +1 -1
  174. package/dist/forms/NumericKeypad.js +1 -1
  175. package/dist/forms/PictureTiles.js +1 -1
  176. package/dist/forms/PositionInput.js +1 -1
  177. package/dist/forms/Segmented.js +1 -1
  178. package/dist/forms/Select.js +1 -1
  179. package/dist/forms/SidesInput.js +1 -1
  180. package/dist/forms/Slider.js +1 -1
  181. package/dist/forms/Snippet.js +1 -1
  182. package/dist/forms/SplitButton.js +1 -1
  183. package/dist/forms/TagInput.js +1 -1
  184. package/dist/forms/TextToolbar.js +1 -1
  185. package/dist/forms/WidthsBar.js +1 -1
  186. package/dist/hooks/useTheme.d.ts +1 -1
  187. package/dist/icons/index.js +1 -1
  188. package/dist/index.d.ts +3 -3
  189. package/dist/index.js +247 -247
  190. package/dist/map/index.js +7 -7
  191. package/dist/page-tabs/index.js +5 -5
  192. package/dist/shell/AppUpdateBanner.js +1 -1
  193. package/dist/shell/ColoredBadge.js +1 -1
  194. package/dist/shell/ConfirmDialog.js +1 -1
  195. package/dist/shell/ContextMenu.js +1 -1
  196. package/dist/shell/Dialog.js +1 -1
  197. package/dist/shell/Drawer.js +1 -1
  198. package/dist/shell/DropdownMenu.js +1 -1
  199. package/dist/shell/EditableGrid.js +1 -1
  200. package/dist/shell/FloatingBar.js +1 -1
  201. package/dist/shell/GlobalSearch.js +1 -1
  202. package/dist/shell/HelpCenter.js +1 -1
  203. package/dist/shell/IconRail.js +1 -1
  204. package/dist/shell/ImageLightbox.js +1 -1
  205. package/dist/shell/ItemCount.js +1 -1
  206. package/dist/shell/LanguageSelect.js +1 -1
  207. package/dist/shell/Markdown.js +1 -1
  208. package/dist/shell/MilestoneTimeline.js +1 -1
  209. package/dist/shell/Popover.js +1 -1
  210. package/dist/shell/PopupMenu.js +1 -1
  211. package/dist/shell/ProductionTimeline.js +1 -1
  212. package/dist/shell/ResizeHandle.js +1 -1
  213. package/dist/shell/SearchableSelect.js +1 -1
  214. package/dist/shell/SettingReset.js +1 -1
  215. package/dist/shell/SettingRow.js +1 -1
  216. package/dist/shell/SidebarLayout.js +1 -1
  217. package/dist/shell/SidebarNav.js +1 -1
  218. package/dist/shell/SortableList.js +1 -1
  219. package/dist/shell/StatusBadge.js +1 -1
  220. package/dist/shell/Tabs.js +1 -1
  221. package/dist/shell/TimelineTrack.js +1 -1
  222. package/dist/shell/Tooltip.js +1 -1
  223. package/dist/shell/TopNav.js +1 -1
  224. package/dist/shell/TransferProgress.js +1 -1
  225. package/dist/shell/Tree.js +1 -1
  226. package/dist/shell/discardGuard.js +1 -1
  227. package/dist/telemetry/index.js +1 -1
  228. package/dist/templates/AuthScreen.js +1 -1
  229. package/dist/templates/ChatTemplate.js +1 -1
  230. package/dist/templates/CheckoutTemplate.js +1 -1
  231. package/dist/templates/DashboardTemplate.js +1 -1
  232. package/dist/templates/DataTablePage.js +1 -1
  233. package/dist/templates/EmailTemplate.js +1 -1
  234. package/dist/templates/ErrorBoundary.d.ts +1 -1
  235. package/dist/templates/ErrorBoundary.js +1 -1
  236. package/dist/templates/FormLayoutPage.js +1 -1
  237. package/dist/templates/GalleryTemplate.js +1 -1
  238. package/dist/ui/index.js +1 -1
  239. package/dist/version.js +1 -1
  240. package/package.json +1 -1
  241. package/dist/Calculator-MV5JVQBS.js +0 -29
  242. package/dist/Sidebar-E3VDFBF6.js +0 -44
  243. package/dist/chunk-3GHTOSJP.js +0 -14
  244. package/dist/chunk-4AQ67NP2.js +0 -15
  245. package/dist/chunk-6WSH6D5N.js +0 -29
  246. package/dist/chunk-7LQGPMRP.js +0 -3
  247. package/dist/chunk-CNLYFW47.js +0 -9
  248. package/dist/chunk-EFU4Z66K.js +0 -8
  249. package/dist/chunk-FX6DBXXD.js +0 -1
  250. package/dist/chunk-HXNMRJQ4.js +0 -2
  251. package/dist/chunk-IFA2EOAF.js +0 -4
  252. package/dist/chunk-KMEERBZV.js +0 -2
  253. package/dist/chunk-KORKSPHQ.js +0 -6
  254. package/dist/chunk-LWWMRL2Y.js +0 -5
  255. package/dist/chunk-NLGMJGD6.js +0 -14
  256. package/dist/chunk-SCYL5V5X.js +0 -20
  257. package/dist/chunk-SM7IDX7Y.js +0 -1
  258. package/dist/chunk-TIPU74XW.js +0 -22
  259. package/dist/chunk-UUKTYAWY.js +0 -7
  260. package/dist/chunk-V6F42DX3.js +0 -11
  261. package/dist/chunk-VWEG2WM4.js +0 -12
  262. package/dist/chunk-XIB72X74.js +0 -2
  263. package/dist/chunk-ZE5TNYWX.js +0 -7
  264. package/dist/chunk-ZO244TWH.js +0 -8
  265. /package/dist/{chunk-ID6WFAXW.js → chunk-N3TOHWFF.js} +0 -0
@@ -1,28 +1,28 @@
1
- import{useCopyText as e,CopyGlyph as t}from"./chunk-F2R3UFNQ.js";import{ItemCount as n}from"./chunk-4VTJEKHX.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-FRVNDEV2.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{useShellStrings as a}from"./chunk-4PAWQEXM.js";import{useState as s,useMemo as d,useRef as c,useEffect as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as h}from"react/jsx-runtime";function g(e){const t=[];let n=0;for(;n<e.length;){const r=e[n].group;let i=n;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;t.push(i>n?{group:r,start:n,end:i}:{start:n,end:n}),n=i+1}return t}function b(e,t){return e.find(e=>t>=e.start&&t<=e.end)}function k(e,t,n,r){const i=e.findIndex(e=>e.key===t.key);let l=e.findIndex(e=>e.key===n);if(i<0||l<0)return null;const o=g(e),a=b(o,i),s="group"===t.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[t.key];if(s.includes(n))return null;const d=b(o,l);if("tab"===t.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,t,n,r){const i=k(e,t,n,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((t,n)=>t===e[n].key)?null:a}var v="flex-[0_1_15rem]",N=v,w="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function C(){/* @__PURE__ */
1
+ import{useCopyText as e,CopyGlyph as t}from"./chunk-F2R3UFNQ.js";import{ItemCount as n}from"./chunk-QHOBK35Y.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-4WEFGKJL.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{useShellStrings as a}from"./chunk-4PAWQEXM.js";import{useState as s,useMemo as d,useRef as c,useEffect as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as h}from"react/jsx-runtime";function g(e){const t=[];let n=0;for(;n<e.length;){const r=e[n].group;let i=n;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;t.push(i>n?{group:r,start:n,end:i}:{start:n,end:n}),n=i+1}return t}function b(e,t){return e.find(e=>t>=e.start&&t<=e.end)}function k(e,t,n,r){const i=e.findIndex(e=>e.key===t.key);let l=e.findIndex(e=>e.key===n);if(i<0||l<0)return null;const o=g(e),a=b(o,i),s="group"===t.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[t.key];if(s.includes(n))return null;const d=b(o,l);if("tab"===t.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,t,n,r){const i=k(e,t,n,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((t,n)=>t===e[n].key)?null:a}var v="flex-[0_1_15rem]",w=v,N="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function C(){/* @__PURE__ */
2
2
  return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function $({text:n,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(n);/* @__PURE__ */
3
- return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function z({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function I({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:I,onClose:j,onCloseMany:D,label:E,className:T,activeClassName:A,end:M,afterPinned:R,onIconMenu:_,menuItems:B,sizing:K="even",tall:O=!1,onReorder:F,groupInfo:S}){const X=a().pageTabs,L=a().count,[V,W]=s(null),H=O?"h-[34px]":"h-8",P=d(()=>e.map(e=>({key:e.key,group:S?e.group:void 0})),[e,S]),Q=d(()=>g(P),[P]),[U,J]=s(()=>/* @__PURE__ */new Set),Y=e=>J(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),q=d(()=>{const n=[];for(const r of Q)for(let i=r.start;i<=r.end;i++)void 0!==r.group&&U.has(r.group)&&e[i].key!==t||n.push(e[i]);return n},[Q,U,e,t]),G=c(null),[Z,ee]=s(null),te=(t,n)=>F?{draggable:!0,onDragStart:n=>{G.current=t,n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",e.find(e=>e.key===t.key)?.title??"")},onDragOver:e=>{const r=G.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=n!==t.key||"tab"===t.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(P,r,n,l)?k(P,r,n,l):null;o?(e.preventDefault(),e.dataTransfer.dropEffect="move",Z?.key===o.key&&Z.side===o.side||ee({key:o.key,side:o.side})):Z&&ee(null)},onDrop:e=>{const t=G.current;if(!t||!Z)return;e.preventDefault();const n=x(P,t,Z.key,Z.side);G.current=null,ee(null),n&&F(n)},onDragEnd:()=>{G.current=null,ee(null)}}:{},ne=d(()=>new Set(Q.filter(e=>void 0!==e.group&&S).map(t=>e[t.start].key)),[Q,e,S]),re=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),ie=e=>Z?.key===e&&!("before"===Z.side&&ne.has(e))&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re(Z.side)}),le=e.length;u(()=>{if(!t)return;const e=document.getElementById(f(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,t,le]);const oe=R?q.findIndex(e=>!e.pinned):-1,ae=q.some(e=>e.key===t)?t:q[0]?.key,se=e=>{const t=q[(e+q.length)%q.length];t&&document.getElementById(f(t.key,"tab"))?.focus()},de=(e,t)=>{const n=q[e+t];if(!F||!n)return;const r=x(P,{kind:"tab",key:q[e].key},n.key,t<0?"before":"after");r&&(F(r),setTimeout(()=>document.getElementById(f(q[e].key,"tab"))?.focus(),0))},ce=V?e.find(e=>e.key===V.key):void 0,ue=ce&&B?B(ce.key):[],me=ce?e.indexOf(ce):-1,fe=e=>e.some(e=>!e.pinned),pe=e=>()=>{W(null),e()},ye=(e,n)=>{const r=e.key===t,i=!!e.dirty,l=e.icon,a=r?A??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=!!n&&!r&&n.key!==t,d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":b?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===ae?0:-1,title:e.title,onClick:()=>I(e.key)},c={onContextMenu:t=>((e,t)=>{e.preventDefault(),W({x:e.clientX,y:e.clientY,key:t.key})})(t,e),onAuxClick:t=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),j(t.key))})(t,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
3
+ return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function z({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function I({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:I,onClose:j,onCloseMany:D,label:A,className:E,activeClassName:T,end:B,afterPinned:M,onIconMenu:_,menuItems:K,sizing:O="even",tall:R=!1,onReorder:F,groupInfo:L}){const S=a().pageTabs,W=a().count,[X,Q]=s(null),H=R?"h-[34px]":"h-8",P=d(()=>e.map(e=>({key:e.key,group:L?e.group:void 0})),[e,L]),U=d(()=>g(P),[P]),[Y,G]=s(()=>/* @__PURE__ */new Set),J=e=>G(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),V=d(()=>{const n=[];for(const r of U)for(let i=r.start;i<=r.end;i++)void 0!==r.group&&Y.has(r.group)&&e[i].key!==t||n.push(e[i]);return n},[U,Y,e,t]),q=c(null),[Z,ee]=s(null),te=(t,n)=>F?{draggable:!0,onDragStart:n=>{q.current=t,n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",e.find(e=>e.key===t.key)?.title??"")},onDragOver:e=>{const r=q.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=n!==t.key||"tab"===t.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(P,r,n,l)?k(P,r,n,l):null;o?(e.preventDefault(),e.dataTransfer.dropEffect="move",Z?.key===o.key&&Z.side===o.side||ee({key:o.key,side:o.side})):Z&&ee(null)},onDrop:e=>{const t=q.current;if(!t||!Z)return;e.preventDefault();const n=x(P,t,Z.key,Z.side);q.current=null,ee(null),n&&F(n)},onDragEnd:()=>{q.current=null,ee(null)}}:{},ne=d(()=>new Set(U.filter(e=>void 0!==e.group&&L).map(t=>e[t.start].key)),[U,e,L]),re=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),ie=e=>Z?.key===e&&!("before"===Z.side&&ne.has(e))&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re(Z.side)}),le=e.length;u(()=>{if(!t)return;const e=document.getElementById(f(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,t,le]);const oe=M?V.findIndex(e=>!e.pinned):-1,ae=V.some(e=>e.key===t)?t:V[0]?.key,se=e=>{const t=V[(e+V.length)%V.length];t&&document.getElementById(f(t.key,"tab"))?.focus()},de=(e,t)=>{const n=V[e+t];if(!F||!n)return;const r=x(P,{kind:"tab",key:V[e].key},n.key,t<0?"before":"after");r&&(F(r),setTimeout(()=>document.getElementById(f(V[e].key,"tab"))?.focus(),0))},ce=X?e.find(e=>e.key===X.key):void 0,ue=ce&&K?K(ce.key):[],me=ce?e.indexOf(ce):-1,fe=e=>e.some(e=>!e.pinned),pe=e=>()=>{Q(null),e()},ye=(e,n)=>{const r=e.key===t,i=!!e.dirty,l=e.icon,a=r?T??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=!!n&&!r&&n.key!==t,d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":b?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===ae?0:-1,title:e.title,onClick:()=>I(e.key)},c={onContextMenu:t=>((e,t)=>{e.preventDefault(),Q({x:e.clientX,y:e.clientY,key:t.key})})(t,e),onAuxClick:t=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),j(t.key))})(t,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
4
4
  /* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
5
5
  /* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!_&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${H} ${l?"w-10":""} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),
6
- /* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-md ${l?"w-full":"px-3"} ${w}`,children:[u,
6
+ /* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-md ${l?"w-full":"px-3"} ${N}`,children:[u,
7
7
  /* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
8
- /* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${H} ${"active-full"===K&&r?"":"@container"} ${"active-full"===K?r?"flex-[0_0_15rem] min-w-0":N:r&&(e.copy||h)?"flex-[0_1_20rem]":v} ${r?"active-full"===K?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),h&&
9
- /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":X.tabMenu,title:X.tabMenu,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();_?.(e.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${w}`,children:u}),
10
- /* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${h?"pl-2":"pl-3"} ${w} ${r?h?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!h&&u,
11
- /* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===K&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
12
- /* @__PURE__ */y("span",{role:"img","aria-label":X.favorite,title:X.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(z,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y($,{text:e.copy,label:X.copy(e.copy),copiedLabel:X.copied}),
13
- /* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":X.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
14
- /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":X.closeTab?.(e.title)??`${X.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(C,{})})]})]})]},e.key)},he=[];let ge,be=0,ke=!R;for(const t of Q){const r=q.filter(n=>{const r=e.indexOf(n);return r>=t.start&&r<=t.end});if(ke||be!==oe||(ke=!0,he.push(/* @__PURE__ */y(m,{children:R},"rosh-after-pinned")),ge=void 0),be+=r.length,void 0===t.group||!S){for(const e of r)he.push(ye(e,ge)),ge=e;continue}ge=void 0;const i=t.group,l=S(i),a=t.end-t.start+1,s=!U.has(i),d=e[t.start].key;he.push(
8
+ /* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${H} ${"active-full"===O&&r?"":"@container"} ${"active-full"===O?r?"flex-[0_0_15rem] min-w-0":w:r&&(e.copy||h)?"flex-[0_1_20rem]":v} ${r?"active-full"===O?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),h&&
9
+ /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":S.tabMenu,title:S.tabMenu,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();_?.(e.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${N}`,children:u}),
10
+ /* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${h?"pl-2":"pl-3"} ${N} ${r?h?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!h&&u,
11
+ /* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===O&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
12
+ /* @__PURE__ */y("span",{role:"img","aria-label":S.favorite,title:S.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(z,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y($,{text:e.copy,label:S.copy(e.copy),copiedLabel:S.copied}),
13
+ /* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":S.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
14
+ /* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":S.closeTab?.(e.title)??`${S.close} ${e.title}`,onClick:()=>j(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(C,{})})]})]})]},e.key)},he=[];let ge,be=0,ke=!M;for(const t of U){const r=V.filter(n=>{const r=e.indexOf(n);return r>=t.start&&r<=t.end});if(ke||be!==oe||(ke=!0,he.push(/* @__PURE__ */y(m,{children:M},"rosh-after-pinned")),ge=void 0),be+=r.length,void 0===t.group||!L){for(const e of r)he.push(ye(e,ge)),ge=e;continue}ge=void 0;const i=t.group,l=L(i),a=t.end-t.start+1,s=!Y.has(i),d=e[t.start].key;he.push(
15
15
  /* @__PURE__ */p("div",{role:"group","aria-label":l.label,"data-tab-group":i,className:"relative mx-1 flex shrink-0 items-end first:ml-0 min-w-0",children:[
16
- /* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:X.groupToggle(l.label,a),onClick:()=>Y(i),...te({kind:"group",key:d},d),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${w}`,children:[
16
+ /* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:S.groupToggle(l.label,a),onClick:()=>J(i),...te({kind:"group",key:d},d),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${N}`,children:[
17
17
  /* @__PURE__ */y(o,{name:s?"chevron-down":"chevron-right","aria-hidden":"true",className:"size-3",strokeWidth:2}),l.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:l.icon}),
18
18
  /* @__PURE__ */y("span",{className:"max-w-[8rem] truncate",children:l.label}),
19
- /* @__PURE__ */y(n,{count:a,label:L.tabs(a),active:!0})]}),Z?.key===d&&"before"===Z.side&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re("before")}),r.map((e,t)=>ye(e,t>0?r[t-1]:void 0)),
20
- /* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:R},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:T??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
19
+ /* @__PURE__ */y(n,{count:a,label:W.tabs(a),active:!0})]}),Z?.key===d&&"before"===Z.side&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re("before")}),r.map((e,t)=>ye(e,t>0?r[t-1]:void 0)),
20
+ /* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:M},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:E??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
21
21
  /* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
22
- /* @__PURE__ */y("div",{role:"tablist","aria-label":E,onKeyDown:e=>{const t=q.findIndex(t=>document.getElementById(f(t.key,"tab"))===e.target);if(t<0)return;const n=e.shiftKey&&(e.ctrlKey||e.metaKey);if(n&&"ArrowRight"===e.key)de(t,1);else if(n&&"ArrowLeft"===e.key)de(t,-1);else if("ArrowRight"===e.key)se(t+1);else if("ArrowLeft"===e.key)se(t-1);else if("Home"===e.key)se(0);else if("End"===e.key)se(q.length-1);else{if("Delete"!==e.key||q[t].pinned)return;j(q[t].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:he}),M&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:M}),V&&ce&&/* @__PURE__ */p(r,{portal:!0,style:{left:V.x,top:V.y},onClose:()=>W(null),children:[ue.length>0&&/* @__PURE__ */p(h,{children:[ue.map((e,t)=>/* @__PURE__ */p(i,{onClick:pe(e.onSelect),children:[e.icon,e.label]},t)),
22
+ /* @__PURE__ */y("div",{role:"tablist","aria-label":A,onKeyDown:e=>{const t=V.findIndex(t=>document.getElementById(f(t.key,"tab"))===e.target);if(t<0)return;const n=e.shiftKey&&(e.ctrlKey||e.metaKey);if(n&&"ArrowRight"===e.key)de(t,1);else if(n&&"ArrowLeft"===e.key)de(t,-1);else if("ArrowRight"===e.key)se(t+1);else if("ArrowLeft"===e.key)se(t-1);else if("Home"===e.key)se(0);else if("End"===e.key)se(V.length-1);else{if("Delete"!==e.key||V[t].pinned)return;j(V[t].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:he}),B&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:B}),X&&ce&&/* @__PURE__ */p(r,{portal:!0,style:{left:X.x,top:X.y},onClose:()=>Q(null),children:[ue.length>0&&/* @__PURE__ */p(h,{children:[ue.map((e,t)=>/* @__PURE__ */p(i,{onClick:pe(e.onSelect),children:[e.icon,e.label]},t)),
23
23
  /* @__PURE__ */y(l,{})]}),
24
- /* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>j(ce.key)),children:X.close}),
24
+ /* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>j(ce.key)),children:S.close}),
25
25
  /* @__PURE__ */y(l,{}),
26
- /* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>D("others",ce.key)),children:X.closeOthers}),
27
- /* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>D("right",ce.key)),children:X.closeRight}),
28
- /* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>D("all",null)),children:X.closeAll})]})]})}export{I as TabStrip};
26
+ /* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>D("others",ce.key)),children:S.closeOthers}),
27
+ /* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>D("right",ce.key)),children:S.closeRight}),
28
+ /* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>D("all",null)),children:S.closeAll})]})]})}export{I as TabStrip};
@@ -1,4 +1,4 @@
1
- import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as e}from"./chunk-62LW225J.js";import{followAnchor as r,popupBounds as o,VIEWPORT_MARGIN as n,showingBox as i,placeBeside as a,placeArrow as l}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as c}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as s,escapeSurfaceAbove as d}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as h}from"./chunk-D65T4H6J.js";import{createContext as m,useContext as u,useState as p,useRef as f,useId as x,useEffect as w,isValidElement as g,cloneElement as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,jsx as k}from"react/jsx-runtime";var j=m(!1),H=()=>u(j),W={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function N({content:m,side:u="top",delay:H=200,children:N,className:B="relative inline-flex",describe:J=!0,open:T}){const[M,U]=p(!1),z=(T??M)&&!(null==m||!1===m||""===m),[C,D]=p(null),E=f(void 0),L=f(null),P=f(null),$=x(),F=f(!1),G=()=>{window.clearTimeout(E.current),F.current||(E.current=window.setTimeout(()=>U(!0),H))},R=()=>{window.clearTimeout(E.current),U(!1)},I=()=>{F.current=!0,R()},Q=()=>{F.current=!1,R()};w(()=>()=>window.clearTimeout(E.current),[]),h(()=>{if(!z)return void D(null);const t=()=>{const t=L.current,e=P.current;if(!t||!e)return;const r=o(t),c=Math.max(0,r.right-r.left-2*n),s=Math.max(0,r.bottom-r.top-2*n);e.style.maxWidth=`${c}px`,e.style.maxHeight=`${s}px`;const d=e.getBoundingClientRect();if(d.width<=0||d.height<=0)return;const h=t.getBoundingClientRect();if(!i(t))return void R();const m=a(h,d,u,r,12),p=l(h,m,d,16,6),f={anchor:{left:h.left,top:h.top,width:h.width,height:h.height},left:m.left-h.left,top:m.top-h.top,maxWidth:c,maxHeight:s,side:m.side,arrow:p&&{left:p.x-h.left,top:p.y-h.top}};D(t=>{return t&&(r=f,(e=t).anchor.left===r.anchor.left&&e.anchor.top===r.anchor.top&&e.anchor.width===r.anchor.width&&e.anchor.height===r.anchor.height&&e.left===r.left&&e.top===r.top&&e.maxWidth===r.maxWidth&&e.maxHeight===r.maxHeight&&e.side===r.side&&e.arrow?.left===r.arrow?.left&&e.arrow?.top===r.arrow?.top)?t:f;var e,r})};return t(),r(()=>L.current,t)},[z,u,m]),w(()=>{if(!z)return;const e=s(t=>"Escape"===t.key&&(R(),!d(L.current))),r=t(R);return()=>{e(),r()}},[z]);const S=z&&J?$:void 0,V=g(N)?b(N,{"aria-describedby":[N.props["aria-describedby"],S].filter(Boolean).join(" ")||void 0}):N,q=z?c():void 0;/* @__PURE__ */
1
+ import{onOverlayOpen as t}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as e}from"./chunk-62LW225J.js";import{followAnchor as r,popupBounds as o,VIEWPORT_MARGIN as n,showingBox as i,placeBeside as a,placeArrow as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{solidSurfaceStyle as s}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as d,escapeSurfaceAbove as h}from"./chunk-TWVUQUUD.js";import{createContext as m,useContext as u,useState as p,useRef as f,useId as x,useEffect as w,isValidElement as g,cloneElement as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,jsx as k}from"react/jsx-runtime";var j=m(!1),H=()=>u(j),W={top:"bottom-full left-1/2 -translate-x-1/2 mb-3",bottom:"top-full left-1/2 -translate-x-1/2 mt-3",left:"right-full top-1/2 -translate-y-1/2 mr-3",right:"left-full top-1/2 -translate-y-1/2 ml-3"};function N({content:m,side:u="top",delay:H=200,children:N,className:B="relative inline-flex",describe:J=!0,open:T}){const[M,U]=p(!1),z=(T??M)&&!(null==m||!1===m||""===m),[C,D]=p(null),E=f(void 0),L=f(null),P=f(null),$=x(),F=f(!1),G=()=>{window.clearTimeout(E.current),F.current||(E.current=window.setTimeout(()=>U(!0),H))},R=()=>{window.clearTimeout(E.current),U(!1)},I=()=>{F.current=!0,R()},Q=()=>{F.current=!1,R()};w(()=>()=>window.clearTimeout(E.current),[]),c(()=>{if(!z)return void D(null);const t=()=>{const t=L.current,e=P.current;if(!t||!e)return;const r=o(t),c=Math.max(0,r.right-r.left-2*n),s=Math.max(0,r.bottom-r.top-2*n);e.style.maxWidth=`${c}px`,e.style.maxHeight=`${s}px`;const d=e.getBoundingClientRect();if(d.width<=0||d.height<=0)return;const h=t.getBoundingClientRect();if(!i(t))return void R();const m=a(h,d,u,r,12),p=l(h,m,d,16,6),f={anchor:{left:h.left,top:h.top,width:h.width,height:h.height},left:m.left-h.left,top:m.top-h.top,maxWidth:c,maxHeight:s,side:m.side,arrow:p&&{left:p.x-h.left,top:p.y-h.top}};D(t=>{return t&&(r=f,(e=t).anchor.left===r.anchor.left&&e.anchor.top===r.anchor.top&&e.anchor.width===r.anchor.width&&e.anchor.height===r.anchor.height&&e.left===r.left&&e.top===r.top&&e.maxWidth===r.maxWidth&&e.maxHeight===r.maxHeight&&e.side===r.side&&e.arrow?.left===r.arrow?.left&&e.arrow?.top===r.arrow?.top)?t:f;var e,r})};return t(),r(()=>L.current,t)},[z,u,m]),w(()=>{if(!z)return;const e=d(t=>"Escape"===t.key&&(R(),!h(L.current))),r=t(R);return()=>{e(),r()}},[z]);const S=z&&J?$:void 0,V=g(N)?b(N,{"aria-describedby":[N.props["aria-describedby"],S].filter(Boolean).join(" ")||void 0}):N,q=z?s():void 0;/* @__PURE__ */
2
2
  return y("span",{ref:L,className:B,"aria-describedby":g(N)?void 0:S,onMouseEnter:G,onMouseLeave:Q,onFocus:t=>{let e=!0;try{e=t.target.matches(":focus-visible")}catch{}e&&G()},onBlur:Q,onPointerDown:I,onClick:I,children:[
3
3
  /* @__PURE__ */k(j.Provider,{value:!0,children:V}),z&&v(
4
4
  /* @__PURE__ */y("span",{className:"pointer-events-none fixed left-0 top-0",style:{zIndex:e.hint,...C?.anchor},children:[
@@ -1,8 +1,8 @@
1
- import{optionMatches as e,OptionSublabel as t}from"./chunk-LJN77RG6.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-EQZZ4V5X.js";import{Tooltip as r}from"./chunk-Q3IR5SKD.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-F27JJHNJ.js";import{useShellStrings as d}from"./chunk-4PAWQEXM.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:L,id:D,className:E="",tone:J,tooltip:W,split:M}){const[$,S]=m(!1),[B,F]=m(""),G=d(),H=h(null),I=h(null),Q=h(null),Y=s(H,$),Z=e=>k.find(t=>t.value===e)?.label??e,A=p(()=>{const t=new Set(o),n=[],r=B.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,B]),K=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},P=e=>{e&&!o.includes(e)?(y([...o,e]),F("")):F("")},R=e=>y(o.filter(t=>t!==e)),T=()=>{const e=B.trim();if(M&&e)return K(e.split(M)),void F("");j&&e?P(e):F("")},X=h(()=>{});X.current=()=>{T(),S(!1)},f(()=>{if(!$)return;const e=e=>{const t=e.target;H.current?.contains(t)||Q.current?.contains(t)||(T(),S(!1))};document.addEventListener("mousedown",e);const t=l(()=>X.current());return()=>{document.removeEventListener("mousedown",e),t()}});const z=k.length>0;/* @__PURE__ */
2
- return g("div",{ref:H,className:"relative",children:[
3
- /* @__PURE__ */g("div",{onMouseDown:e=>{L||e.target.closest("button")||(e.preventDefault(),I.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${L?"bg-gray-50 cursor-not-allowed":""} ${E}`}),children:[o.map(e=>{const t=J?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
- /* @__PURE__ */x("span",{className:"truncate",children:Z(e)}),!L&&/* @__PURE__ */x("button",{type:"button","aria-label":G.select.removeItem?.(Z(e))??`${G.select.remove} ${Z(e)}`,onClick:()=>R(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
- /* @__PURE__ */x("input",{id:D,ref:I,type:"text",autoComplete:"off",role:"combobox","aria-expanded":$&&z,"aria-invalid":C||void 0,disabled:L,value:B,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(M){const t=e.split(M);if(t.length>1)return K(t.slice(0,-1)),void F(t[t.length-1])}F(e)})(e.target.value),S(!0)},onFocus:()=>{!L&&z&&S(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=B.trim(),o=n?A.filter(t=>e(t,n.toLowerCase())):[];1===o.length?P(o[0].value):T()}else"Backspace"===t.key&&""===B&&o.length>0?R(o[o.length-1]):"Escape"===t.key?(S(!1),F(""),I.current?.blur()):"Tab"===t.key&&(T(),S(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),$&&z&&v(
6
- /* @__PURE__ */x("div",{ref:Q,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:Y?.left,right:Y?.right,top:Y?.top,bottom:Y?.bottom,minWidth:Y?.minWidth,maxWidth:Y?.maxWidth??a,width:"max-content",visibility:Y?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:Y?.maxHeight??c},children:0===A.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?G.select.allSelected:G.select.noMatches}):A.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),P(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
1
+ import{optionMatches as e,OptionSublabel as t}from"./chunk-LJN77RG6.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-TXDA7TTP.js";import{Tooltip as r}from"./chunk-6XBWM453.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-F27JJHNJ.js";import{useShellStrings as d}from"./chunk-4PAWQEXM.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:L,id:D,className:W="",tone:E,tooltip:J,split:M}){const[T,$]=m(!1),[B,A]=m(""),F=d(),G=h(null),H=h(null),P=h(null),S=s(G,T),X=e=>k.find(t=>t.value===e)?.label??e,Y=p(()=>{const t=new Set(o),n=[],r=B.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,B]),I=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},z=e=>{e&&!o.includes(e)?(y([...o,e]),A("")):A("")},K=e=>y(o.filter(t=>t!==e)),Q=()=>{const e=B.trim();if(M&&e)return I(e.split(M)),void A("");j&&e?z(e):A("")},R=h(()=>{});R.current=()=>{Q(),$(!1)},f(()=>{if(!T)return;const e=e=>{const t=e.target;G.current?.contains(t)||P.current?.contains(t)||(Q(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>R.current());return()=>{document.removeEventListener("mousedown",e),t()}});const U=k.length>0;/* @__PURE__ */
2
+ return g("div",{ref:G,className:"relative",children:[
3
+ /* @__PURE__ */g("div",{onMouseDown:e=>{L||e.target.closest("button")||(e.preventDefault(),H.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${L?"bg-gray-50 cursor-not-allowed":""} ${W}`}),children:[o.map(e=>{const t=E?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
4
+ /* @__PURE__ */x("span",{className:"truncate",children:X(e)}),!L&&/* @__PURE__ */x("button",{type:"button","aria-label":F.select.removeItem?.(X(e))??`${F.select.remove} ${X(e)}`,onClick:()=>K(e),className:n.remove,children:"×"})]},e),l=J?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
5
+ /* @__PURE__ */x("input",{id:D,ref:H,type:"text",autoComplete:"off",role:"combobox","aria-expanded":T&&U,"aria-invalid":C||void 0,disabled:L,value:B,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(M){const t=e.split(M);if(t.length>1)return I(t.slice(0,-1)),void A(t[t.length-1])}A(e)})(e.target.value),$(!0)},onFocus:()=>{!L&&U&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=B.trim(),o=n?Y.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):Q()}else"Backspace"===t.key&&""===B&&o.length>0?K(o[o.length-1]):"Escape"===t.key?($(!1),A(""),H.current?.blur()):"Tab"===t.key&&(Q(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),T&&U&&v(
6
+ /* @__PURE__ */x("div",{ref:P,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:S?.left,right:S?.right,top:S?.top,bottom:S?.bottom,minWidth:S?.minWidth,maxWidth:S?.maxWidth??a,width:"max-content",visibility:S?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:S?.maxHeight??c},children:0===Y.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?F.select.allSelected:F.select.noMatches}):Y.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
7
7
  /* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
8
8
  /* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
@@ -1,4 +1,4 @@
1
- import{Calendar as e}from"./chunk-7MSC3Z5H.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{FILTER_ON as a,FILTER_ON_INK as o,FILTER_OFF as i}from"./chunk-AYZY3YNC.js";import{calendarNames as l}from"./chunk-Y3JW2GW5.js";import{pad2 as s}from"./chunk-LF27WIN2.js";import{buttonClasses as c}from"./chunk-UQYNPYF4.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{onOverlayOpen as m}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useDropdownPosition as h}from"./chunk-GLUJS42B.js";import{glassStyle as p}from"./chunk-F27JJHNJ.js";import{useBrowserLayoutEffect as f}from"./chunk-D65T4H6J.js";import{useShellStrings as g,useShellLocale as b}from"./chunk-4PAWQEXM.js";import{useState as x,useRef as v,useId as y,useEffect as w}from"react";import{createPortal as N}from"react-dom";import{jsxs as k,Fragment as C,jsx as M}from"react/jsx-runtime";var W=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],j=t;function D(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),i=new Date(n,a,0),l=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(l(1)),to:t(i)};case"last3Months":return{from:t(l(3)),to:t(i)};case"last6Months":return{from:t(l(6)),to:t(i)};case"last12Months":return{from:t(l(12)),to:t(i)}}}function $(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function F(e){const t=r(e);return t?`${s(t.getDate())}/${s(t.getMonth()+1)}/${t.getFullYear()}`:e}var Y=/* @__PURE__ */new Map;function S({from:t,to:n,onChange:s,formatDisplay:j,clearable:S,required:O=!1,name:H,id:J,"aria-labelledby":L,"aria-label":B,weekStartsOn:E,placeholder:T,fullWidth:U=!1,min:A,max:G,disabled:R=!1,allowOpenEnd:q=!1}){const I=g().dateRange,P=b(),X=j??(P?function(e){let t=Y.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),Y.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(P):F),Z=T??I.placeholder,Q=S??!O,[z,K]=x(!1),[V,_]=x(t),[ee,te]=x(n),[re,ne]=x(null),[ae,oe]=x("from"),ie=v(null),le=v(null),se=v(null),ce=y(),de=y(),me=y(),[ue,he]=x(!1),pe=h(ie,z,{preferredMaxWidth:520,preferredMaxHeight:ue?720:560,popupRef:se}),fe=v(null),ge=v(null),[be,xe]=x(!0);f(()=>{const e=ge.current;if(!z||!ue||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==be&&xe(a)});const ve=v(null);f(()=>{const e=se.current;if(!z||!pe||!e)return;const t=getComputedStyle(e),r=pe.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(ue)null!==ve.current&&ve.current<=r&&he(!1);else{const e=fe.current?.offsetWidth??0;if(0===e)return;ve.current=e,e>r+.5&&he(!0)}});const[ye,we]=x(!1);f(()=>{const e=!!J&&(le.current?.labels?.length??0)>0;e!==ye&&we(e)});const Ne=!!B||!!L||ye,ke=/* @__PURE__ */new Date,[Ce,Me]=x(()=>t?t.slice(0,7):$(ke,A,G)),We=W.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,ke),A,G)),je=e=>e?X(e):"";w(()=>{if(!z)return;const e=e=>{const t=e.target;ie.current?.contains(t)||se.current?.contains(t)||K(!1)};document.addEventListener("mousedown",e);const t=m(()=>K(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[z]),w(()=>{R&&K(!1)},[R]);const De=()=>{s("",""),K(!1)},$e=t&&n?`${je(t)} — ${je(n)}`:t?I.fromOnly(je(t)):n?I.toOnly(je(n)):"",Fe=l(P),Ye=e=>{const t=r(e);return t?Fe.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Se=t&&n?I.range(Ye(t),Ye(n)):t?I.fromOnly(Ye(t)):n?I.toOnly(Ye(n)):Z,Oe=e=>ue?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(re===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(re===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),He=/* @__PURE__ */k(C,{children:[We.map(e=>/* @__PURE__ */M("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,ke);_(t.from),te(t.to),ne(e),Me(t.from.slice(0,7))})(e),className:Oe(e),"aria-label":ue?I[e]:void 0,children:ue?be?I[e]:I[`${e}Short`]:I[e]},e)),
1
+ import{Calendar as e}from"./chunk-7MSC3Z5H.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{FILTER_ON as a,FILTER_ON_INK as o,FILTER_OFF as i}from"./chunk-AYZY3YNC.js";import{calendarNames as l}from"./chunk-Y3JW2GW5.js";import{pad2 as s}from"./chunk-LF27WIN2.js";import{buttonClasses as c}from"./chunk-UQYNPYF4.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{onOverlayOpen as m}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useDropdownPosition as h}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{glassStyle as f}from"./chunk-F27JJHNJ.js";import{useShellStrings as g,useShellLocale as b}from"./chunk-4PAWQEXM.js";import{useState as x,useRef as v,useId as y,useEffect as w}from"react";import{createPortal as N}from"react-dom";import{jsxs as k,Fragment as C,jsx as M}from"react/jsx-runtime";var W=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],j=t;function D(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),i=new Date(n,a,0),l=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(l(1)),to:t(i)};case"last3Months":return{from:t(l(3)),to:t(i)};case"last6Months":return{from:t(l(6)),to:t(i)};case"last12Months":return{from:t(l(12)),to:t(i)}}}function $(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function F(e){const t=r(e);return t?`${s(t.getDate())}/${s(t.getMonth()+1)}/${t.getFullYear()}`:e}var Y=/* @__PURE__ */new Map;function S({from:t,to:n,onChange:s,formatDisplay:j,clearable:S,required:O=!1,name:H,id:J,"aria-labelledby":L,"aria-label":B,weekStartsOn:E,placeholder:T,fullWidth:U=!1,min:A,max:G,disabled:R=!1,allowOpenEnd:q=!1}){const I=g().dateRange,P=b(),X=j??(P?function(e){let t=Y.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),Y.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(P):F),Z=T??I.placeholder,Q=S??!O,[z,K]=x(!1),[V,_]=x(t),[ee,te]=x(n),[re,ne]=x(null),[ae,oe]=x("from"),ie=v(null),le=v(null),se=v(null),ce=y(),de=y(),me=y(),[ue,he]=x(!1),pe=h(ie,z,{preferredMaxWidth:520,preferredMaxHeight:ue?720:560,popupRef:se}),fe=v(null),ge=v(null),[be,xe]=x(!0);p(()=>{const e=ge.current;if(!z||!ue||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==be&&xe(a)});const ve=v(null);p(()=>{const e=se.current;if(!z||!pe||!e)return;const t=getComputedStyle(e),r=pe.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(ue)null!==ve.current&&ve.current<=r&&he(!1);else{const e=fe.current?.offsetWidth??0;if(0===e)return;ve.current=e,e>r+.5&&he(!0)}});const[ye,we]=x(!1);p(()=>{const e=!!J&&(le.current?.labels?.length??0)>0;e!==ye&&we(e)});const Ne=!!B||!!L||ye,ke=/* @__PURE__ */new Date,[Ce,Me]=x(()=>t?t.slice(0,7):$(ke,A,G)),We=W.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,ke),A,G)),je=e=>e?X(e):"";w(()=>{if(!z)return;const e=e=>{const t=e.target;ie.current?.contains(t)||se.current?.contains(t)||K(!1)};document.addEventListener("mousedown",e);const t=m(()=>K(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[z]),w(()=>{R&&K(!1)},[R]);const De=()=>{s("",""),K(!1)},$e=t&&n?`${je(t)} — ${je(n)}`:t?I.fromOnly(je(t)):n?I.toOnly(je(n)):"",Fe=l(P),Ye=e=>{const t=r(e);return t?Fe.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Se=t&&n?I.range(Ye(t),Ye(n)):t?I.fromOnly(Ye(t)):n?I.toOnly(Ye(n)):Z,Oe=e=>ue?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(re===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(re===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),He=/* @__PURE__ */k(C,{children:[We.map(e=>/* @__PURE__ */M("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,ke);_(t.from),te(t.to),ne(e),Me(t.from.slice(0,7))})(e),className:Oe(e),"aria-label":ue?I[e]:void 0,children:ue?be?I[e]:I[`${e}Short`]:I[e]},e)),
2
2
  /* @__PURE__ */M("button",{type:"button",onClick:()=>ne("Custom"),className:Oe("Custom"),children:I.custom})]}),Je=(e,t)=>q?/* @__PURE__ */M("button",{type:"button","data-range-end":e,"aria-pressed":ae===e,onClick:()=>oe(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */M("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Le=e=>q&&ae===e?" ring-1 ring-blue-400":"",Be=
3
3
  /* @__PURE__ */M(e,{mode:"range",min:A,max:G,value:V||null,endValue:ee||null,month:Ce,onMonthChange:Me,onSelect:e=>{ne("Custom"),q?"from"===ae?(ee&&e>ee?(_(ee),te(e)):_(e),oe("to")):V&&e<V?(te(V),_(e)):te(e):!V||V&&ee?(_(e),te("")):e<V?(te(V),_(e)):te(e)},weekStartsOn:E,"aria-label":I.dialog});/* @__PURE__ */
4
4
  return k("div",{className:"relative"+(U?" w-full":""),ref:ie,children:[
@@ -8,7 +8,7 @@ return k("div",{className:"relative"+(U?" w-full":""),ref:ie,children:[
8
8
  /* @__PURE__ */M("span",{className:"truncate",children:$e||Z})]}),Q&&!R&&(t||n)&&/* @__PURE__ */M("button",{type:"button",onClick:De,"aria-label":I.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ne&&/* @__PURE__ */M("span",{id:de,className:"sr-only",children:Se}),O&&/* @__PURE__ */M("span",{id:me,className:"sr-only",children:I.required}),H&&/* @__PURE__ */k(C,{children:[
9
9
  /* @__PURE__ */M("input",{type:"hidden",name:H.from,value:t,disabled:R||void 0}),
10
10
  /* @__PURE__ */M("input",{type:"hidden",name:H.to,value:n,disabled:R||void 0})]}),z&&N(
11
- /* @__PURE__ */k("div",{ref:se,id:ce,role:"dialog","aria-label":I.dialog,"data-layout":ue?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:u.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,width:ue&&pe?pe.maxWidth:"max-content",maxWidth:pe?.maxWidth,maxHeight:pe?.maxHeight,overflowY:"auto",visibility:pe?void 0:"hidden",...p()},children:[
11
+ /* @__PURE__ */k("div",{ref:se,id:ce,role:"dialog","aria-label":I.dialog,"data-layout":ue?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:u.popup,left:pe?.left,right:pe?.right,top:pe?.top,bottom:pe?.bottom,width:ue&&pe?pe.maxWidth:"max-content",maxWidth:pe?.maxWidth,maxHeight:pe?.maxHeight,overflowY:"auto",visibility:pe?void 0:"hidden",...f()},children:[
12
12
  /* @__PURE__ */k("div",{className:ue?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Je("from",/* @__PURE__ */k(C,{children:[
13
13
  /* @__PURE__ */M("span",{className:"text-xs font-medium text-gray-500",children:I.from}),
14
14
  /* @__PURE__ */M("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${V?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Le("from")}`,children:V?je(V):I.start})]})),!ue&&/* @__PURE__ */M("span",{className:"text-gray-300",children:"—"}),Je("to",/* @__PURE__ */k(C,{children:[