efficient-shell 10.6.0 → 10.13.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 (238) hide show
  1. package/README.md +27 -2
  2. package/dist/{Browser-4ONXYI26.js → Browser-36HIDVL6.js} +13 -13
  3. package/dist/{Calculator-T35PX2QS.js → Calculator-ZFMTTDQ6.js} +23 -23
  4. package/dist/{CurrencyConverter-IQCGNNYA.js → CurrencyConverter-577XB7A3.js} +6 -6
  5. package/dist/{Documents-6H3UDVIU.js → Documents-ZS4M5I3S.js} +3 -3
  6. package/dist/Files-7XO7A4YT.js +88 -0
  7. package/dist/Notepad-6CFMSQCK.js +24 -0
  8. package/dist/PomodoroTimer-CXJVY7U3.js +91 -0
  9. package/dist/{Preview-D6MAGBWE.js → Preview-HV2KB3IU.js} +22 -22
  10. package/dist/Sidebar-7RR5WNIF.js +44 -0
  11. package/dist/{Spreadsheet-RXZR3OSI.js → Spreadsheet-J5AGNSGN.js} +13 -13
  12. package/dist/{Stock-XAZUTWT6.js → Stock-M4TDRNCI.js} +3 -3
  13. package/dist/{Weather-MLRF4QNB.js → Weather-K634BVDX.js} +41 -41
  14. package/dist/{WorldClock-IWRZVM4L.js → WorldClock-56CYOGR2.js} +6 -6
  15. package/dist/ai/index.d.ts +5 -2
  16. package/dist/ai/index.js +40 -39
  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/SpecChart.js +1 -1
  23. package/dist/chunk-2HMNOLKX.js +1 -0
  24. package/dist/{chunk-OTGQYHVC.js → chunk-3BYLHJLC.js} +7 -7
  25. package/dist/chunk-3GL4OVBB.js +1 -0
  26. package/dist/chunk-3RVLLU2A.js +5 -0
  27. package/dist/chunk-44QWF5X2.js +2 -0
  28. package/dist/chunk-45VOQS5V.js +4 -0
  29. package/dist/{chunk-5S3YYN7M.js → chunk-47EYPWCB.js} +2 -2
  30. package/dist/chunk-5RE6R3XC.js +2 -0
  31. package/dist/chunk-5X4DBMS6.js +2 -0
  32. package/dist/{chunk-YCOYCPAH.js → chunk-7PUVPDUZ.js} +3 -3
  33. package/dist/chunk-7QSDPSXP.js +1 -0
  34. package/dist/{chunk-YDEIXM2A.js → chunk-7TC3LJQM.js} +1 -1
  35. package/dist/chunk-A4TFCYWN.js +2 -0
  36. package/dist/chunk-A5SPSAWW.js +2 -0
  37. package/dist/{chunk-ZUS7FXKE.js → chunk-AGG4RFXR.js} +11 -11
  38. package/dist/chunk-APLKFBJH.js +2 -0
  39. package/dist/{chunk-GNHLVGG5.js → chunk-AZ3AR7U7.js} +2 -2
  40. package/dist/chunk-BJXDOM2N.js +2 -0
  41. package/dist/{chunk-UNOQ46YW.js → chunk-BS7IPLRR.js} +1 -1
  42. package/dist/{chunk-3CPB3WP2.js → chunk-CKKUFDZ3.js} +39 -39
  43. package/dist/chunk-COJYPNKF.js +2 -0
  44. package/dist/chunk-EDKRGYZX.js +9 -0
  45. package/dist/{chunk-IOIDZC2M.js → chunk-F2MWLDN2.js} +1 -1
  46. package/dist/{chunk-7X3XNVES.js → chunk-F6JDUMM7.js} +1 -1
  47. package/dist/chunk-FIZKXNCZ.js +2 -0
  48. package/dist/{chunk-QWWJUYZI.js → chunk-GBCH3UHD.js} +16 -16
  49. package/dist/{chunk-X2S2XDZI.js → chunk-GEYM4WN3.js} +1 -1
  50. package/dist/chunk-H64JJSXC.js +4 -0
  51. package/dist/chunk-I5VYOWIX.js +2 -0
  52. package/dist/chunk-IABSP2GJ.js +2 -0
  53. package/dist/chunk-IKMWKOT5.js +1 -0
  54. package/dist/{chunk-IPFWXM2Y.js → chunk-ISJPW2FZ.js} +11 -11
  55. package/dist/chunk-IXZGA4MS.js +2 -0
  56. package/dist/{chunk-DLNIRZNR.js → chunk-JBOMPD3V.js} +1 -1
  57. package/dist/chunk-JGFY54A4.js +3 -0
  58. package/dist/chunk-KLHUKAD3.js +2 -0
  59. package/dist/chunk-KOBYM5JV.js +14 -0
  60. package/dist/chunk-KZMJE24J.js +5 -0
  61. package/dist/{chunk-XKDBYJHF.js → chunk-KZX25YEW.js} +1 -1
  62. package/dist/{chunk-QQPIQCT7.js → chunk-L3QNKCXH.js} +8 -8
  63. package/dist/chunk-LF27WIN2.js +1 -0
  64. package/dist/chunk-LYJBMVUE.js +4 -0
  65. package/dist/{chunk-O45WQK57.js → chunk-M3OYHYIS.js} +1 -1
  66. package/dist/chunk-MIOL4CDN.js +2 -0
  67. package/dist/{chunk-A224Q5ZC.js → chunk-NPK2TLIU.js} +1 -1
  68. package/dist/{chunk-WN5HHHLO.js → chunk-OOLPDASG.js} +1 -1
  69. package/dist/chunk-PGKNWSSC.js +2 -0
  70. package/dist/chunk-PJW3BL27.js +2 -0
  71. package/dist/{chunk-35DG7Y4M.js → chunk-QDQ347RL.js} +1 -1
  72. package/dist/chunk-QHUGCISZ.js +2 -0
  73. package/dist/chunk-QKWYCOMM.js +23 -0
  74. package/dist/{chunk-SF654IHN.js → chunk-QNK2I4IH.js} +12 -12
  75. package/dist/{chunk-GTNJAKFO.js → chunk-R7APUBZB.js} +13 -13
  76. package/dist/chunk-RRVBOD2U.js +2 -0
  77. package/dist/{chunk-6PFZK6ED.js → chunk-SCPCZCYQ.js} +1 -1
  78. package/dist/{chunk-LHYVPDCP.js → chunk-SMUH7NAN.js} +1 -1
  79. package/dist/chunk-STAVWXWV.js +1 -0
  80. package/dist/chunk-SVUOPZCB.js +2 -0
  81. package/dist/chunk-TNPGO42S.js +4 -0
  82. package/dist/chunk-UCWJA6LT.js +2 -0
  83. package/dist/{chunk-RZGYD2PM.js → chunk-UNRPRMQO.js} +41 -41
  84. package/dist/chunk-UWK5Q3R4.js +19 -0
  85. package/dist/{chunk-PXDDCD5X.js → chunk-VZ4PBHFN.js} +1 -1
  86. package/dist/chunk-WH6NPZ6B.js +2 -0
  87. package/dist/{chunk-G5NQOV7L.js → chunk-XBB6LSSB.js} +5 -5
  88. package/dist/chunk-XGAXRNZS.js +2 -0
  89. package/dist/chunk-XMTGZI2O.js +2 -0
  90. package/dist/chunk-Y3JW2GW5.js +1 -0
  91. package/dist/chunk-Z6KYMY3R.js +5 -0
  92. package/dist/chunk-Z7TJ5Y7T.js +2 -0
  93. package/dist/chunk-ZE5FN26Z.js +5 -0
  94. package/dist/chunk-ZTPMMNAZ.js +1 -0
  95. package/dist/format/index.d.ts +1 -0
  96. package/dist/format/index.js +1 -1
  97. package/dist/forms/BorderInput.js +1 -1
  98. package/dist/forms/Calendar.d.ts +1 -5
  99. package/dist/forms/Calendar.js +1 -1
  100. package/dist/forms/ColorPicker.js +1 -1
  101. package/dist/forms/CornersInput.js +1 -1
  102. package/dist/forms/DatePicker.js +1 -1
  103. package/dist/forms/DateRangePicker.d.ts +9 -7
  104. package/dist/forms/DateRangePicker.js +1 -1
  105. package/dist/forms/DateTimePicker.js +1 -1
  106. package/dist/forms/InputNumber.js +1 -1
  107. package/dist/forms/LinkPicker.js +1 -1
  108. package/dist/forms/MediaLibrary.js +1 -1
  109. package/dist/forms/PositionInput.js +1 -1
  110. package/dist/forms/Select.d.ts +1 -1
  111. package/dist/forms/Select.js +1 -1
  112. package/dist/forms/SidesInput.js +1 -1
  113. package/dist/forms/Slider.js +1 -1
  114. package/dist/forms/TextToolbar.d.ts +1 -1
  115. package/dist/forms/TimePicker.js +1 -1
  116. package/dist/forms/WidthsBar.js +1 -1
  117. package/dist/forms/textAlign.d.ts +1 -1
  118. package/dist/icons/efficient-glyphs.d.ts +11 -0
  119. package/dist/icons/efficient-glyphs.js +1 -1
  120. package/dist/icons/efficient-looks.d.ts +16 -0
  121. package/dist/icons/efficient-looks.js +1 -1
  122. package/dist/icons/efficient-meanings.d.ts +11 -0
  123. package/dist/icons/efficient-meanings.js +1 -1
  124. package/dist/icons/efficient.d.ts +11 -0
  125. package/dist/icons/efficient.js +1 -1
  126. package/dist/icons/glyphs/BrandAlipayIcon.d.ts +11 -0
  127. package/dist/icons/glyphs/BrandAlipayIcon.js +1 -0
  128. package/dist/icons/glyphs/BrandDinersclubIcon.d.ts +11 -0
  129. package/dist/icons/glyphs/BrandDinersclubIcon.js +1 -0
  130. package/dist/icons/glyphs/BrandJcbIcon.d.ts +11 -0
  131. package/dist/icons/glyphs/BrandJcbIcon.js +1 -0
  132. package/dist/icons/glyphs/CountUpIcon.d.ts +8 -0
  133. package/dist/icons/glyphs/CountUpIcon.js +1 -0
  134. package/dist/icons/glyphs/DurationIcon.d.ts +8 -0
  135. package/dist/icons/glyphs/DurationIcon.js +1 -0
  136. package/dist/icons/glyphs/HoverLiftIcon.d.ts +8 -0
  137. package/dist/icons/glyphs/HoverLiftIcon.js +1 -0
  138. package/dist/icons/glyphs/HoverNextImageIcon.d.ts +8 -0
  139. package/dist/icons/glyphs/HoverNextImageIcon.js +1 -0
  140. package/dist/icons/glyphs/HoverNoneIcon.d.ts +8 -0
  141. package/dist/icons/glyphs/HoverNoneIcon.js +1 -0
  142. package/dist/icons/glyphs/HoverRotateIcon.d.ts +8 -0
  143. package/dist/icons/glyphs/HoverRotateIcon.js +1 -0
  144. package/dist/icons/glyphs/HoverZoomIcon.d.ts +8 -0
  145. package/dist/icons/glyphs/HoverZoomIcon.js +1 -0
  146. package/dist/icons/glyphs/LoopIcon.d.ts +8 -0
  147. package/dist/icons/glyphs/LoopIcon.js +1 -0
  148. package/dist/icons/index.d.ts +2 -2
  149. package/dist/icons/index.js +1 -1
  150. package/dist/icons/looks/CountUpMiniIcon.d.ts +8 -0
  151. package/dist/icons/looks/CountUpMiniIcon.js +1 -0
  152. package/dist/icons/looks/CountUpSolidIcon.d.ts +8 -0
  153. package/dist/icons/looks/CountUpSolidIcon.js +1 -0
  154. package/dist/icons/looks/DurationMiniIcon.d.ts +8 -0
  155. package/dist/icons/looks/DurationMiniIcon.js +1 -0
  156. package/dist/icons/looks/DurationSolidIcon.d.ts +8 -0
  157. package/dist/icons/looks/DurationSolidIcon.js +1 -0
  158. package/dist/icons/looks/HoverLiftMiniIcon.d.ts +8 -0
  159. package/dist/icons/looks/HoverLiftMiniIcon.js +1 -0
  160. package/dist/icons/looks/HoverLiftSolidIcon.d.ts +8 -0
  161. package/dist/icons/looks/HoverLiftSolidIcon.js +1 -0
  162. package/dist/icons/looks/HoverNextImageMiniIcon.d.ts +8 -0
  163. package/dist/icons/looks/HoverNextImageMiniIcon.js +1 -0
  164. package/dist/icons/looks/HoverNextImageSolidIcon.d.ts +8 -0
  165. package/dist/icons/looks/HoverNextImageSolidIcon.js +1 -0
  166. package/dist/icons/looks/HoverNoneMiniIcon.d.ts +8 -0
  167. package/dist/icons/looks/HoverNoneMiniIcon.js +1 -0
  168. package/dist/icons/looks/HoverNoneSolidIcon.d.ts +8 -0
  169. package/dist/icons/looks/HoverNoneSolidIcon.js +1 -0
  170. package/dist/icons/looks/HoverRotateMiniIcon.d.ts +8 -0
  171. package/dist/icons/looks/HoverRotateMiniIcon.js +1 -0
  172. package/dist/icons/looks/HoverRotateSolidIcon.d.ts +8 -0
  173. package/dist/icons/looks/HoverRotateSolidIcon.js +1 -0
  174. package/dist/icons/looks/HoverZoomMiniIcon.d.ts +8 -0
  175. package/dist/icons/looks/HoverZoomMiniIcon.js +1 -0
  176. package/dist/icons/looks/HoverZoomSolidIcon.d.ts +8 -0
  177. package/dist/icons/looks/HoverZoomSolidIcon.js +1 -0
  178. package/dist/icons/looks/LoopMiniIcon.d.ts +8 -0
  179. package/dist/icons/looks/LoopMiniIcon.js +1 -0
  180. package/dist/icons/looks/LoopSolidIcon.d.ts +8 -0
  181. package/dist/icons/looks/LoopSolidIcon.js +1 -0
  182. package/dist/icons/looks/map.js +1 -1
  183. package/dist/icons/payment.d.ts +46 -0
  184. package/dist/icons/payment.js +4 -0
  185. package/dist/icons/sets.js +1 -1
  186. package/dist/index.d.ts +43 -4
  187. package/dist/index.js +694 -694
  188. package/dist/names-CwzeaUf6.d.ts +23 -0
  189. package/dist/page-tabs/index.js +5 -5
  190. package/dist/shell/ConfirmDialog.js +1 -1
  191. package/dist/shell/Dialog.js +1 -1
  192. package/dist/shell/Drawer.js +1 -1
  193. package/dist/shell/GlobalSearch.js +1 -1
  194. package/dist/shell/ImageLightbox.js +1 -1
  195. package/dist/shell/LanguageSelect.js +1 -1
  196. package/dist/shell/Markdown.d.ts +1 -1
  197. package/dist/shell/MilestoneTimeline.js +1 -1
  198. package/dist/shell/ProductionTimeline.js +1 -1
  199. package/dist/shell/TimeAgo.js +1 -1
  200. package/dist/shell/TimelineTrack.js +1 -1
  201. package/dist/shell/discardGuard.js +1 -1
  202. package/dist/shell/timelineDates.js +1 -1
  203. package/dist/telemetry/index.js +1 -1
  204. package/dist/templates/CheckoutTemplate.js +1 -1
  205. package/dist/templates/DataTablePage.js +1 -1
  206. package/dist/templates/FormLayoutPage.js +1 -1
  207. package/dist/ui/index.d.ts +3 -2
  208. package/dist/ui/index.js +1 -1
  209. package/dist/utils/date.js +1 -1
  210. package/dist/utils/dateKey.d.ts +25 -0
  211. package/dist/utils/dateKey.js +1 -0
  212. package/dist/utils/format.js +1 -1
  213. package/dist/version.js +1 -1
  214. package/package.json +6 -1
  215. package/dist/Files-3OOVEIKW.js +0 -88
  216. package/dist/Notepad-IPTDLXZZ.js +0 -24
  217. package/dist/PomodoroTimer-YF5AN5RX.js +0 -91
  218. package/dist/Sidebar-QCUDD4OU.js +0 -44
  219. package/dist/chunk-4BYJQU37.js +0 -2
  220. package/dist/chunk-5OTS2G3M.js +0 -1
  221. package/dist/chunk-632N62BY.js +0 -9
  222. package/dist/chunk-7Z4PTLDL.js +0 -4
  223. package/dist/chunk-AM2F5ZXH.js +0 -2
  224. package/dist/chunk-E5MVH3SH.js +0 -14
  225. package/dist/chunk-LNWQBSYD.js +0 -5
  226. package/dist/chunk-LPSFFJFK.js +0 -1
  227. package/dist/chunk-MNXRAZJV.js +0 -23
  228. package/dist/chunk-N4DI5F74.js +0 -19
  229. package/dist/chunk-O2GPQ2MX.js +0 -1
  230. package/dist/chunk-PKXQDCNR.js +0 -1
  231. package/dist/chunk-QEKOEIOQ.js +0 -3
  232. package/dist/chunk-TFUIOEBX.js +0 -1
  233. package/dist/chunk-XO7URRTM.js +0 -2
  234. package/dist/chunk-YJFB6CCJ.js +0 -1
  235. package/dist/names-CyfXNkce.d.ts +0 -23
  236. /package/dist/{chunk-DSIDJYH7.js → chunk-744BFBBV.js} +0 -0
  237. /package/dist/{chunk-EHPZIBOL.js → chunk-NOKZ54GD.js} +0 -0
  238. /package/dist/{chunk-OW7MLJ3Y.js → chunk-S2P74CBN.js} +0 -0
@@ -1,24 +0,0 @@
1
- import{getNumberingConfigs as e}from"./chunk-LHYVPDCP.js";import{SidebarLayout as t}from"./chunk-A4HJDSRA.js";import"./chunk-QWK6DRSN.js";import"./chunk-DRDYZ633.js";import{timeAgo as r}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{AboutApp as n}from"./chunk-A224Q5ZC.js";import{useWindowManager as o,client_default as i}from"./chunk-RZGYD2PM.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-URERZUX5.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-RBQWIHYD.js";import"./chunk-QWWJUYZI.js";import"./chunk-LNWQBSYD.js";import{useShellPrefs as c}from"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-OW7MLJ3Y.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as s}from"./chunk-AKM6JBMD.js";import"./chunk-UGTRSRIW.js";import"./chunk-PXQG5EIH.js";import"./chunk-CDAJKLGL.js";import"./chunk-YJFB6CCJ.js";import"./chunk-37U326EL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as l}from"./chunk-KKSVRIMP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useRef as a,useEffect as p,useState as d,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as g,jsx as x}from"react/jsx-runtime";var y=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var k={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:j,save:v}=c(),{data:N}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=a({});p(()=>{if(!N)return;const e={};for(const t of N){const r=k[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[N]);const T=j.notepad_notes||[],[_,D]=d(null),[W,C]=d(""),[X,R]=d(""),[S,$]=d("yellow"),[J,M]=d(!1),[U,Q]=d(!1),Z=a(null),K=a();p(()=>{if(!_&&T.length>0){const e=T[0];D(e.id),C(e.title),R(e.content),$(e.color)}},[T.length]);const P=m(e=>{v({notepad_notes:e})},[v]),H=m(()=>{if(!_||!J)return;const e=T.map(e=>e.id===_?{...e,title:W,content:X,color:S,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);P(e),M(!1)},[_,J,W,X,S,T,P]);p(()=>{if(J)return K.current&&clearTimeout(K.current),K.current=setTimeout(H,800),()=>{K.current&&clearTimeout(K.current)}},[J,H]),p(()=>()=>{J&&H()},[]);const I=e=>{J&&H(),D(e.id),C(e.title),R(e.content),$(e.color),M(!1),Q(!1)},Y=e=>{const t=X.slice(0,e),r=X.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=X.slice(e+r[0].length);R(t+n+o),M(!0)},A=async(e,t)=>{const r=w.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,n):s.error(`${n} not found`)}catch{s.error(`Failed to look up ${n}`)}},E="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",G=/* @__PURE__ */h(g,{children:[
2
- /* @__PURE__ */x("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{J&&H();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...T];P(t),D(e.id),C(""),R(""),$("yellow"),M(!1),Q(!0),setTimeout(()=>Z.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-accent-fill text-on-accent px-3 min-h-8 py-1 text-sm font-medium hover:bg-accent-fill-hover transition-colors",children:[
3
- /* @__PURE__ */x(l,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
4
- /* @__PURE__ */x("div",{className:"flex-1 overflow-y-auto",children:0===T.length?/* @__PURE__ */x("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):T.map(e=>{const t=(n=e.color,y.find(e=>e.key===n)||y[0]);var n;/* @__PURE__ */
5
- return h("button",{onClick:()=>I(e),className:"w-full text-left px-3 py-3 border-b border-line-subtle transition-colors "+(_===e.id?"bg-accent-tint":"hover:bg-row-hover"),children:[
6
- /* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */x("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
8
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"})]}),
9
- /* @__PURE__ */x("p",{className:"text-xs text-ink-faintest mt-0.5 truncate ml-5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
10
- /* @__PURE__ */x("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:r(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
11
- return h("div",{className:"h-full",children:[
12
- /* @__PURE__ */x(n,{app:"notepad"}),
13
- /* @__PURE__ */x(t,{sidebar:G,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
14
- /* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
15
- /* @__PURE__ */x("input",{value:W,onChange:e=>{C(e.target.value),M(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
16
- /* @__PURE__ */x("div",{className:"flex gap-1",children:y.map(e=>/* @__PURE__ */x("button",{onClick:()=>{$(e.key),M(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${S===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
17
- /* @__PURE__ */x("button",{onClick:()=>(e=>{const t=T.filter(t=>t.id!==e);if(P(t),_===e){const e=t[0];e?I(e):(D(null),C(""),R(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */x(l,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),U?/* @__PURE__ */x("textarea",{ref:Z,value:X,onChange:e=>{R(e.target.value),M(!0)},onBlur:()=>{Q(!1),J&&H()},placeholder:E,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */x("div",{onClick:()=>{Q(!0),setTimeout(()=>Z.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:X?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],c=/([A-Z]{2,4})#(\d{4,6})/g;let s;for(;null!==(s=c.exec(e));){const e=s[1],t=s[2];if(w.current[e]){const n=s.index,o=s[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */x("button",{onClick:()=>A(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let a=0;for(let e=0;e<r;e++)a+=t[e].length+1;for(;null!==(s=b.exec(e));){const e="x"===s[1]||"X"===s[1],t=s.index,n=a+t;i.push({idx:t,len:s[0].length,render:()=>/* @__PURE__ */x("button",{onClick:()=>Y(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */x(l,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */x("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */x("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */x("span",{children:"​"},`empty-${r}`));const p=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
18
- return x("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(X):/* @__PURE__ */x("p",{className:"text-gray-300 whitespace-pre-line",children:E})}),
19
- /* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-line-subtle flex items-center gap-4 text-2xs text-ink-faintest",children:[
20
- /* @__PURE__ */x("span",{children:"[] checkbox"}),
21
- /* @__PURE__ */x("span",{children:"SO#35001 entity link"}),
22
- /* @__PURE__ */x("span",{className:"ml-auto",children:U?"Editing":"Click to edit"})]})]}):/* @__PURE__ */x("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
23
- /* @__PURE__ */x(l,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
24
- /* @__PURE__ */x("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
@@ -1,91 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-UNOQ46YW.js";import{subscribePomo as o,getPomoSnapshot as a,setPomoDurations as n,setPomoAlarm as r,setPomoAlarmConfig as s,setPomoBehaviour as l,setPomoFocusSound as i,useTodoTasks as c,migratePomodoroTasksOnce as d,pomoSwitchMode as u,pomoPause as m,pomoStart as h,ALARM_OPTIONS as p,playAlarm as g,FOCUS_SOUND_OPTIONS as f,previewFocusSound as k}from"./chunk-TVH7IZQ4.js";import{PLACEHOLDER_INK as b}from"./chunk-AYZY3YNC.js";import{useWidgetSettings as x}from"./chunk-RZGYD2PM.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-URERZUX5.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-RBQWIHYD.js";import"./chunk-QWWJUYZI.js";import"./chunk-LNWQBSYD.js";import{useShellPrefs as v}from"./chunk-KC3EX26K.js";import"./chunk-QHOBK35Y.js";import"./chunk-3DVNXNTF.js";import"./chunk-OW7MLJ3Y.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-AKM6JBMD.js";import"./chunk-UGTRSRIW.js";import"./chunk-PXQG5EIH.js";import"./chunk-CDAJKLGL.js";import"./chunk-37U326EL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-TXDA7TTP.js";import"./chunk-I4VIEGCX.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as y}from"./chunk-KKSVRIMP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MVZRZTQP.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useSyncExternalStore as N,useEffect as C,useMemo as w,useState as S,useRef as j,useCallback as B}from"react";import{jsxs as M,Fragment as T,jsx as P}from"react/jsx-runtime";var I="pomodoro_appearance",D="pomodoro_active_task_id",A={focus:"Pomodoro",short:"Short Break",long:"Long Break"},V={focus:"#0f172a",short:"#508a52",long:"#5b7898"};var W=25,L=5,R=15,$=!1,U=!1,E=4,Q=!0,J=!0,Y="bell",H=100,K=1,Z="none",X=50,_=(e,t,o,a)=>"number"==typeof e&&isFinite(e)?Math.max(t,Math.min(o,Math.round(e))):a;function F(){const t=N(o,a,a),{prefs:g,save:k}=v(),b=function(e){const t=e&&"object"==typeof e?e:{};return{focusMinutes:_(t.focusMinutes,1,120,W),shortBreakMinutes:_(t.shortBreakMinutes,1,120,L),longBreakMinutes:_(t.longBreakMinutes,1,120,R),autoStartBreaks:"boolean"==typeof t.autoStartBreaks?t.autoStartBreaks:$,autoStartPomodoros:"boolean"==typeof t.autoStartPomodoros?t.autoStartPomodoros:U,longBreakInterval:_(t.longBreakInterval,1,20,E),autoCheckTasks:"boolean"==typeof t.autoCheckTasks?t.autoCheckTasks:Q,checkToBottom:"boolean"==typeof t.checkToBottom?t.checkToBottom:J,alarmSound:p.some(e=>e.id===t.alarmSound)?t.alarmSound:Y,alarmVolume:_(t.alarmVolume,0,100,H),alarmRepeat:_(t.alarmRepeat,1,5,K),focusSound:f.some(e=>e.id===t.focusSound)?t.focusSound:Z,focusVolume:_(t.focusVolume,0,100,X)}}(g.pomodoro_settings);C(()=>{n({focus:60*b.focusMinutes,short:60*b.shortBreakMinutes,long:60*b.longBreakMinutes})},[b.focusMinutes,b.shortBreakMinutes,b.longBreakMinutes]),C(()=>{r(b.alarmSound),s(b.alarmVolume,b.alarmRepeat)},[b.alarmSound,b.alarmVolume,b.alarmRepeat]),C(()=>{l({autoStartBreaks:b.autoStartBreaks,autoStartPomodoros:b.autoStartPomodoros,longBreakInterval:b.longBreakInterval})},[b.autoStartBreaks,b.autoStartPomodoros,b.longBreakInterval]),C(()=>{i(b.focusSound,b.focusVolume)},[b.focusSound,b.focusVolume]),C(()=>{if("undefined"!=typeof Notification&&"default"===Notification.permission)try{Notification.requestPermission()}catch{}},[]);const F=c(),O=F.tasks,z=w(()=>/* @__PURE__ */(new Date).toISOString().slice(0,10),[]),q=function(e,t){return w(()=>t?(e=>{const t=[],o=[];for(const a of e)(a.done?o:t).push(a);return[...t,...o]})(e):e,[e,t])}(w(()=>O.filter(e=>!!e.dueDate&&(e.dueDate===z||e.dueDate<z&&!e.done)),[O,z]),b.checkToBottom),[ee,te]=S(()=>localStorage.getItem(D)),[oe,ae]=S(!1),[ne,re]=S(null),se=j(!1);C(()=>{se.current||(se.current=!0,d(O,F.setAllTasks))},[]),C(()=>{try{ee?localStorage.setItem(D,ee):localStorage.removeItem(D)}catch{}},[ee]),C(()=>{if(!ne)return;const e=()=>re(null),t=setTimeout(()=>document.addEventListener("click",e),0);return()=>{clearTimeout(t),document.removeEventListener("click",e)}},[ne]);const le=j(t.streak);C(()=>{if(t.streak>le.current&&ee){const e=O.find(e=>e.id===ee);if(e){const t=(e.completed??0)+1,o=e.estimated??0,a=b.autoCheckTasks&&o>0&&t>=o;F.updateTask(ee,{completed:t,done:e.done||a})}}le.current=t.streak},[t.streak,ee,b.autoCheckTasks,O,F]);const ce=q.reduce((e,t)=>e+(t.completed??0),0),de=q.reduce((e,t)=>e+Math.max(t.estimated??0,t.completed??0),0),ue=q.reduce((e,t)=>t.done?e:e+Math.max(0,(t.estimated??0)-(t.completed??0)),0),me=t.running&&"focus"===t.mode?t.remaining:0,he=ue*b.focusMinutes*60+me,pe=new Date(Date.now()+1e3*he).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1}),ge=(he/3600).toFixed(1),fe=ee?O.find(e=>e.id===ee)??null:null,ke=String(Math.floor(t.remaining/60)).padStart(2,"0"),be=String(t.remaining%60).padStart(2,"0"),[xe,ve]=S(()=>e(I)),[ye,Ne]=S(!1),[Ce,we]=S(xe),[Se,je]=S(b);x(B(()=>{we({...xe}),je({...b}),Ne(!0)},[xe,b]));const Be="focus"!==t.mode,Me=V[t.mode],Te=Be?(Pe=Me,Ie=xe.activeOpacity/100,`rgba(${parseInt(Pe.slice(1,3),16)}, ${parseInt(Pe.slice(3,5),16)}, ${parseInt(Pe.slice(5,7),16)}, ${Ie})`):`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${xe.activeOpacity/100})`;var Pe,Ie;const De={primary:Be?"text-white":"text-gray-900",secondary:Be?"text-white/85":"text-gray-700",muted:Be?"text-white/65":"text-gray-500",tabActive:Be?"bg-white/15 text-white":"bg-gray-200 text-gray-900",tabInactive:Be?"text-white/75 hover:bg-white/10":"text-gray-500 hover:bg-gray-200",divider:Be?"border-white/30":"border-gray-200",softDivider:Be?"border-white/20":"border-gray-200",iconBtn:Be?"bg-black/15 hover:bg-black/25 text-white/85":"bg-gray-200 hover:bg-gray-300 text-gray-600",addTaskBtn:Be?"border-white/45 text-white/90 hover:bg-white/[0.06]":"border-gray-300 text-gray-500 hover:bg-gray-200/50"},Ae=Be?Me:"#0f172a";/* @__PURE__ */
2
- return M(T,{children:[
3
- /* @__PURE__ */M("div",{className:`flex flex-col h-full select-none transition-colors duration-300 ${De.primary}`,style:{backgroundColor:Te,backdropFilter:xe.activeBlur>0?`blur(${xe.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */P("div",{className:"px-3 pt-3 flex justify-center gap-2",children:["focus","short","long"].map(e=>/* @__PURE__ */P("button",{onClick:()=>u(e),className:`px-3 py-1 text-sm font-bold rounded transition-colors ${t.mode===e?De.tabActive:De.tabInactive}`,children:A[e]},e))}),
5
- /* @__PURE__ */M("div",{className:"text-center font-bold tabular-nums leading-none tracking-tight mt-3",style:{fontSize:"4.5rem"},children:[ke,":",be]}),
6
- /* @__PURE__ */P("div",{className:"flex justify-center mt-3 mb-2",children:/* @__PURE__ */P("button",{onClick:()=>t.running?m():h(),className:"bg-surface px-12 py-3 rounded-md font-bold text-base shadow-[0_4px_0_rgba(0,0,0,0.12)] hover:shadow-[0_3px_0_rgba(0,0,0,0.12)] active:translate-y-1 active:shadow-none transition-all",style:{color:Ae,letterSpacing:"0.08em"},children:t.running?"PAUSE":"START"})}),
7
- /* @__PURE__ */P("div",{className:"px-3 py-3 text-center",children:fe?/* @__PURE__ */M(T,{children:[
8
- /* @__PURE__ */M("div",{className:`text-xs leading-tight ${De.muted}`,children:["#",(fe.completed??0)+1]}),
9
- /* @__PURE__ */P("div",{className:`text-base font-medium leading-tight truncate mt-0.5 ${De.primary}`,children:fe.name})]}):/* @__PURE__ */P("div",{className:`text-xs italic ${De.muted}`,children:"No task selected"})}),
10
- /* @__PURE__ */M("div",{className:"px-3 mt-1 flex items-center justify-between",children:[
11
- /* @__PURE__ */P("h3",{className:`text-base font-bold tracking-tight ${De.primary}`,children:"Tasks"}),
12
- /* @__PURE__ */P("button",{className:`rounded p-1 transition-colors ${De.iconBtn}`,"aria-label":"Tasks menu",tabIndex:-1,children:/* @__PURE__ */P(y,{name:"more-vertical",look:"solid",className:"h-4 w-4"})})]}),
13
- /* @__PURE__ */P("div",{className:`border-t mx-3 mt-2 ${De.divider}`}),
14
- /* @__PURE__ */M("div",{className:"flex-1 px-3 py-3 space-y-2 overflow-y-auto",children:[q.map(e=>{const t=e.id===ee;/* @__PURE__ */
15
- return M("div",{onClick:()=>te(e.id),className:"bg-surface text-ink-strong rounded-md flex items-center pr-2 py-3 shadow-sm cursor-pointer transition-shadow hover:shadow-(--elevation-panel) "+(t?"border-l-4 border-gray-700 pl-2":"pl-3 border-l-4 border-transparent"),children:[
16
- /* @__PURE__ */P("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,F.toggleDone(o)},className:"shrink-0",children:e.done?/* @__PURE__ */P("svg",{className:"h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",style:{color:Ae},children:/* @__PURE__ */P("path",{d:"M10 0a10 10 0 100 20 10 10 0 000-20zm-1 14.5l-4.5-4.5 1.4-1.4 3.1 3.1 6.1-6.1 1.4 1.4z"})}):/* @__PURE__ */P("svg",{className:"h-5 w-5 text-gray-300",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:/* @__PURE__ */P("circle",{cx:"12",cy:"12",r:"10"})})}),
17
- /* @__PURE__ */P("span",{className:"ml-3 flex-1 font-semibold truncate "+(e.done?"line-through text-gray-400":"text-gray-800"),children:e.name}),
18
- /* @__PURE__ */M("span",{className:"text-sm tabular-nums mr-2 shrink-0",children:[
19
- /* @__PURE__ */P("span",{className:"font-bold text-gray-500",children:e.completed??0}),
20
- /* @__PURE__ */P("span",{className:"text-gray-400",children:" / "}),
21
- /* @__PURE__ */P("span",{className:"text-gray-400",children:e.estimated??"–"})]}),
22
- /* @__PURE__ */M("div",{className:"relative",children:[
23
- /* @__PURE__ */P("button",{onClick:t=>{t.stopPropagation(),re(ne===e.id?null:e.id)},className:"rounded p-1 bg-gray-100 hover:bg-gray-200",children:/* @__PURE__ */P(y,{name:"more-vertical",look:"solid",className:"h-4 w-4 text-ink-faint"})}),ne===e.id&&/* @__PURE__ */P("div",{className:"absolute right-0 top-full mt-1 bg-white text-gray-800 rounded shadow-lg border border-gray-200 z-10 min-w-[110px] overflow-hidden",onClick:e=>e.stopPropagation(),children:/* @__PURE__ */P("button",{onClick:t=>{var o;t.stopPropagation(),o=e.id,F.removeTask(o),ee===o&&te(null),re(null)},className:"block w-full px-3 h-8 text-sm text-left hover:bg-red-50 text-red-600",children:"Delete"})})]})]},e.id)}),oe?/* @__PURE__ */P(ie,{onSubmit:(e,t)=>{const o=e.trim();if(!o)return;const a=F.addTask({name:o,estimated:t,completed:0,dueDate:z});ee||te(a),ae(!1)},onCancel:()=>ae(!1),accentColor:Ae}):/* @__PURE__ */M("button",{onClick:()=>ae(!0),className:`w-full border-2 border-dashed rounded-md py-3 font-semibold flex items-center justify-center gap-2 transition-colors ${De.addTaskBtn}`,children:[
24
- /* @__PURE__ */P(y,{name:"add-circle",className:"h-5 w-5",strokeWidth:2}),"Add Task"]})]}),
25
- /* @__PURE__ */M("div",{className:`border-t px-3 py-3 flex items-center justify-center gap-5 text-sm ${De.softDivider}`,children:[
26
- /* @__PURE__ */M("span",{className:De.secondary,children:["Pomos: ",
27
- /* @__PURE__ */P("span",{className:`font-bold ${De.primary}`,children:ce}),
28
- /* @__PURE__ */P("span",{className:De.muted,children:" / "}),
29
- /* @__PURE__ */P("span",{className:`font-bold ${De.primary}`,children:de})]}),he>0&&/* @__PURE__ */M("span",{className:De.secondary,children:["Finish At: ",
30
- /* @__PURE__ */P("span",{className:`font-bold ${De.primary}`,children:pe}),
31
- /* @__PURE__ */M("span",{className:De.muted,children:[" (",ge,"h)"]})]})]})]}),
32
- /* @__PURE__ */P(G,{open:ye,onClose:()=>Ne(!1),onSave:()=>{ve(Ce),localStorage.setItem(I,JSON.stringify(Ce)),k({pomodoro_settings:Se}),Ne(!1)},configAppearance:Ce,setConfigAppearance:we,configPrefs:Se,setConfigPrefs:je})]})}function G({open:e,onClose:o,onSave:a,configAppearance:n,setConfigAppearance:r,configPrefs:s,setConfigPrefs:l}){const i=(e,t)=>l(o=>({...o,[e]:t}));/* @__PURE__ */
33
- return M(t,{open:e,onClose:o,title:"Pomodoro Settings",appearance:n,onAppearanceChange:r,onSave:a,children:[
34
- /* @__PURE__ */M(O,{icon:/* @__PURE__ */P(re,{}),label:"TIMER",children:[
35
- /* @__PURE__ */M("div",{children:[
36
- /* @__PURE__ */P("p",{className:"text-sm font-bold text-gray-800 mb-2",children:"Time (minutes)"}),
37
- /* @__PURE__ */M("div",{className:"grid grid-cols-3 gap-3",children:[
38
- /* @__PURE__ */P(ee,{label:"Pomodoro",value:s.focusMinutes,onChange:e=>i("focusMinutes",e),max:120}),
39
- /* @__PURE__ */P(ee,{label:"Short Break",value:s.shortBreakMinutes,onChange:e=>i("shortBreakMinutes",e),max:120}),
40
- /* @__PURE__ */P(ee,{label:"Long Break",value:s.longBreakMinutes,onChange:e=>i("longBreakMinutes",e),max:120})]})]}),
41
- /* @__PURE__ */P(z,{label:"Auto Start Breaks",children:/* @__PURE__ */P(ae,{checked:s.autoStartBreaks,onChange:e=>i("autoStartBreaks",e)})}),
42
- /* @__PURE__ */P(z,{label:"Auto Start Pomodoros",children:/* @__PURE__ */P(ae,{checked:s.autoStartPomodoros,onChange:e=>i("autoStartPomodoros",e)})}),
43
- /* @__PURE__ */P(z,{label:"Long Break interval",children:/* @__PURE__ */P(te,{value:s.longBreakInterval,onChange:e=>i("longBreakInterval",e),min:1,max:20,className:"w-14 text-center"})})]}),
44
- /* @__PURE__ */M(O,{icon:/* @__PURE__ */P(se,{}),label:"TASK",children:[
45
- /* @__PURE__ */P(z,{label:"Auto Check Tasks",info:'If you enable "Auto Check Tasks", the active task will be automatically checked when the actual pomodoro count reaches the estimated count.',children:/* @__PURE__ */P(ae,{checked:s.autoCheckTasks,onChange:e=>i("autoCheckTasks",e)})}),
46
- /* @__PURE__ */P(z,{label:"Check to Bottom",info:'If you enable "Check to Bottom", the checked task will be automatically moved to the bottom of the task list.',children:/* @__PURE__ */P(ae,{checked:s.checkToBottom,onChange:e=>i("checkToBottom",e)})})]}),
47
- /* @__PURE__ */M(O,{icon:/* @__PURE__ */P(le,{}),label:"SOUND",children:[
48
- /* @__PURE__ */P(z,{label:"Alarm Sound",children:/* @__PURE__ */M("div",{className:"flex items-center gap-2",children:[
49
- /* @__PURE__ */P(oe,{value:s.alarmSound,onChange:e=>i("alarmSound",e),options:p.map(e=>({id:e.id,label:e.label}))}),"off"!==s.alarmSound&&/* @__PURE__ */P("button",{type:"button",onClick:()=>g(s.alarmSound,{volume:s.alarmVolume,repeat:1}),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
50
- /* @__PURE__ */P(q,{value:s.alarmVolume,onChange:e=>i("alarmVolume",e)}),
51
- /* @__PURE__ */P(z,{label:"repeat",children:/* @__PURE__ */P(te,{value:s.alarmRepeat,onChange:e=>i("alarmRepeat",e),min:1,max:5,className:"w-14 text-center"})}),
52
- /* @__PURE__ */P(z,{label:"Focus Sound",children:/* @__PURE__ */M("div",{className:"flex items-center gap-2",children:[
53
- /* @__PURE__ */P(oe,{value:s.focusSound,onChange:e=>i("focusSound",e),options:f}),"none"!==s.focusSound&&/* @__PURE__ */P("button",{type:"button",onClick:()=>k(s.focusSound,s.focusVolume),className:"px-2 py-1 text-2xs rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:"Play"})]})}),
54
- /* @__PURE__ */P(q,{value:s.focusVolume,onChange:e=>i("focusVolume",e)})]})]})}function O({icon:e,label:t,children:o}){/* @__PURE__ */
55
- return M("div",{className:"border-t border-gray-200 pt-3 first:border-0 first:pt-0",children:[
56
- /* @__PURE__ */M("div",{className:"flex items-center gap-2 mb-3 text-ink-faintest",children:[e,
57
- /* @__PURE__ */P("span",{className:"text-xs font-bold tracking-[0.15em]",children:t})]}),
58
- /* @__PURE__ */P("div",{className:"space-y-3",children:o})]})}function z({label:e,info:t,children:o}){/* @__PURE__ */
59
- return M("div",{className:"flex items-center justify-between gap-3",children:[
60
- /* @__PURE__ */M("div",{className:"flex items-center gap-2 min-w-0",children:[
61
- /* @__PURE__ */P("span",{className:"text-sm font-semibold text-gray-800",children:e}),t&&/* @__PURE__ */P(ne,{title:t})]}),
62
- /* @__PURE__ */P("div",{className:"shrink-0",children:o})]})}function q({value:e,onChange:t}){/* @__PURE__ */
63
- return M("div",{className:"flex items-center justify-end gap-3",children:[
64
- /* @__PURE__ */P("span",{className:"text-xs text-gray-400 w-7 text-right tabular-nums",children:e}),
65
- /* @__PURE__ */P("input",{type:"range",min:0,max:100,value:e,onChange:e=>t(parseInt(e.target.value,10)),className:"w-40 accent-blue-500"})]})}function ee({label:e,value:t,onChange:o,min:a=1,max:n=99}){/* @__PURE__ */
66
- return M("label",{className:"flex flex-col",children:[
67
- /* @__PURE__ */P("span",{className:"text-xs font-semibold text-gray-500 mb-1",children:e}),
68
- /* @__PURE__ */P(te,{value:t,onChange:o,min:a,max:n})]})}function te({value:e,onChange:t,min:o=1,max:a=99,className:n=""}){/* @__PURE__ */
69
- return P("input",{type:"number",min:o,max:a,value:e,onChange:e=>t(Math.max(o,Math.min(a,parseInt(e.target.value,10)||o))),className:`bg-gray-100 border-0 rounded-md px-2 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 w-full ${n}`})}function oe({value:e,onChange:t,options:o}){/* @__PURE__ */
70
- return M("div",{className:"relative",children:[
71
- /* @__PURE__ */P("select",{value:e,onChange:e=>t(e.target.value),className:"appearance-none bg-gray-100 border-0 rounded-md pl-3 pr-8 h-8 text-sm font-medium text-ink-strong focus:outline-none focus:ring-2 focus:ring-blue-500 cursor-pointer",children:o.map(e=>/* @__PURE__ */P("option",{value:e.id,children:e.label},e.id))}),
72
- /* @__PURE__ */P(y,{name:"chevron-down",className:`absolute right-2 top-1/2 -translate-y-1/2 h-3.5 w-3.5 pointer-events-none ${b}`,strokeWidth:2.5})]})}function ae({checked:e,onChange:t}){/* @__PURE__ */
73
- return P("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>t(!e),className:"relative inline-flex h-6 w-11 items-center rounded-full transition-colors "+(e?"bg-emerald-500":"bg-gray-300"),children:/* @__PURE__ */P("span",{className:"absolute h-5 w-5 rounded-full bg-white shadow transition-transform "+(e?"translate-x-[22px]":"translate-x-0.5")})})}function ne({title:e}){/* @__PURE__ */
74
- return P("span",{title:e,className:"inline-flex items-center justify-center w-4 h-4 rounded-full bg-gray-300 text-on-accent text-3xs font-bold cursor-help",children:"i"})}function re(){/* @__PURE__ */
75
- return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
76
- /* @__PURE__ */P("circle",{cx:"12",cy:"12",r:"9"}),
77
- /* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7v5l3 2"})]})}function se(){/* @__PURE__ */
78
- return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
79
- /* @__PURE__ */P("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),
80
- /* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12l2 2 4-4"})]})}function le(){/* @__PURE__ */
81
- return M("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,children:[
82
- /* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5L6 9H2v6h4l5 4V5z"}),
83
- /* @__PURE__ */P("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 8.5a5 5 0 010 7M19 5a9 9 0 010 14"})]})}function ie({onSubmit:e,onCancel:t,accentColor:o}){const[a,n]=S(""),[r,s]=S(1),l=()=>e(a,r);/* @__PURE__ */
84
- return M("div",{className:"bg-surface text-ink-strong rounded-md p-3 shadow-(--elevation-panel)",children:[
85
- /* @__PURE__ */P("input",{autoFocus:!0,value:a,onChange:e=>n(e.target.value),placeholder:"What are you working on?",onKeyDown:e=>{"Enter"===e.key&&l(),"Escape"===e.key&&t()},className:"w-full text-base font-medium bg-transparent border-0 outline-none placeholder-gray-400"}),
86
- /* @__PURE__ */M("div",{className:"flex items-center justify-between mt-2",children:[
87
- /* @__PURE__ */P("span",{className:"text-xs font-semibold text-gray-500",children:"Est Pomodoros"}),
88
- /* @__PURE__ */P("input",{type:"number",min:1,max:20,value:r,onChange:e=>s(Math.max(1,Math.min(20,parseInt(e.target.value,10)||1))),className:"w-16 bg-gray-100 rounded px-2 py-1 text-sm text-right border-0 focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),
89
- /* @__PURE__ */M("div",{className:"flex gap-2 mt-3 justify-end",children:[
90
- /* @__PURE__ */P("button",{onClick:t,className:"px-3 py-1 text-sm text-gray-500 hover:bg-gray-100 rounded",children:"Cancel"}),
91
- /* @__PURE__ */P("button",{onClick:l,className:"px-4 py-1 text-sm font-semibold text-white rounded shadow-sm",style:{backgroundColor:o},children:"Save"})]})]})}export{F as default};
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-ZTV2BA3P.js";import{ResizeHandle as o}from"./chunk-DRDYZ633.js";import{openGlobalSearch as s}from"./chunk-IPFWXM2Y.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-PUF75SMJ.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as y,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as j,navIcons as w,sectionIcons as C}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as W,PopupMenuLabel as z}from"./chunk-37U326EL.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UQYNPYF4.js";import"./chunk-34URULVW.js";import{Icon as $}from"./chunk-KKSVRIMP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-6XBWM453.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-F27JJHNJ.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as A}from"./chunk-4PAWQEXM.js";import"./chunk-C3QOHMR6.js";import{useMemo as M,useState as R,useRef as I,useEffect as H,isValidElement as T,cloneElement as K}from"react";import{jsx as P,jsxs as J,Fragment as U}from"react/jsx-runtime";var D="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function B(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var Q=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),X="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function F({open:e,children:t}){const r=I(null);return H(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */P("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */P("div",{className:"min-h-0 overflow-hidden",children:t})})}function V({open:e}){/* @__PURE__ */
2
- return P($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function Y({dir:e}){/* @__PURE__ */
3
- return P($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function _({className:e}){/* @__PURE__ */
4
- return P($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var O=e=>.75+1.75*e+"rem";function Z({width:Z,collapsed:E,onToggleCollapsed:G,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=w,sectionIcons:me=C,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ye=A().layout,{hasAnyPerm:ke}=e(),ve=M(()=>c(ce,he,ke),[ce,he,ke]),[Ne,je]=R(()=>t(r(n))),we=M(()=>[...ve.topItems.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ke]),Ce=(e,t=we)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=R(null),[We,ze]=R(!1),$e=I(null);H(()=>{E||Le(null)},[E]);const Ae=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Me=(e,t)=>{const r=t[e];/* @__PURE__ */
5
- return P("span",{className:X,"aria-hidden":"true",children:r&&T(r)?K(r,{className:"size-[18px]"}):r})},Re=e=>e.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),Ie=(e,t,r=we)=>{const n=d(e,ke),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ke);/* @__PURE__ */
6
- return J("div",{children:[
7
- /* @__PURE__ */J("button",{type:"button",onClick:()=>Ce(i,r),"aria-expanded":l,className:Q(o,!1),style:t>0?{paddingLeft:O(t)}:void 0,children:[0===t&&Me(e.to,de),
8
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:a}),
9
- /* @__PURE__ */P(V,{open:l})]}),
10
- /* @__PURE__ */P(F,{open:l,children:/* @__PURE__ */P("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Ie(e,t+1,Re(n)))})}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:O(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
11
- return J("div",{children:[
12
- /* @__PURE__ */J("button",{type:"button",onClick:t=>Ae(e,t),onAuxClick:t=>{1===t.button&&Ae(e,t)},"aria-current":i?"page":void 0,className:Q(i,!1),style:t>0?{paddingLeft:O(t)}:void 0,children:[0===t&&Me(e.to,de),
13
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:O(t)},"aria-hidden":"true"})]},e.to)},He=(e,t)=>{const r=t?e.items:h(e,ke);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */P("span",{className:X,"aria-hidden":"true",children:e.icon}):Me(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ke),l="dividerAfter"in e&&e.dividerAfter;if(E)/* @__PURE__ */
14
- return J("div",{children:[
15
- /* @__PURE__ */P("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();Le(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:Q(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
16
- return J("div",{children:[
17
- /* @__PURE__ */J("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:Q(!o&&i,!1),children:[n,
18
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:a}),
19
- /* @__PURE__ */P(V,{open:o})]}),
20
- /* @__PURE__ */P(F,{open:o,children:/* @__PURE__ */P("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>Ie(e,1,Re(r)))})}),l&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Te=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",Ke=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),Pe=ne?.avatar_url?/* @__PURE__ */P("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */P("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ke}),Je=We?$e.current?.getBoundingClientRect():void 0,Ue=E?"":"px-3",De=E?{paddingInline:k}:void 0,Be=`${E?ye.expandSidebar:ye.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,Qe=ee?{run:ee,label:ye.goHome,title:ye.goHome}:se?null:{run:G,label:E?ye.expandSidebar:ye.collapseSidebar,title:Be},Xe=/* @__PURE__ */J(U,{children:[pe&&/* @__PURE__ */P(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!E&&/* @__PURE__ */J("span",{className:"min-w-0 text-left leading-tight",children:[
21
- /* @__PURE__ */P("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */P("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Fe=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
22
- return J("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:Z},children:[
23
- /* @__PURE__ */J("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(E?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:y},children:[Qe?/* @__PURE__ */P("button",{type:"button",onClick:Qe.run,"aria-label":Qe.label,title:Qe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(E?"justify-center p-0.5":"-ml-1 p-1"),children:Xe}):/* @__PURE__ */P("span",{className:"flex min-w-0 items-center gap-2",children:Xe}),se?/* @__PURE__ */P(b,{onClick:se,"aria-label":ye.closeMenu,children:/* @__PURE__ */P($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!E&&/* @__PURE__ */P("button",{type:"button",onClick:G,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */P(Y,{dir:"left"})})]}),
24
- /* @__PURE__ */P("div",{className:`shrink-0 pt-3 ${Ue}`,style:De,children:E?/* @__PURE__ */P("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${D?"⌘K":"Ctrl K"})`,className:Q(!1,!0),children:/* @__PURE__ */P(_,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */J("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */P(_,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ye.search}),
27
- /* @__PURE__ */P("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:D?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */J("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Ue} ${E?"space-y-1":"space-y-0.5"}`,style:De,children:[E&&/* @__PURE__ */P("button",{type:"button",onClick:G,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${D?"⌘":"Ctrl"} .)`,className:`${Q(!1,!0)} mb-3`,children:/* @__PURE__ */P(Y,{dir:"right"})}),ve.topItems.map(e=>{if(!E)return Ie(e,0);const t=d(e,ke),r=e.to===re||u(t,re,ke),n=e.menuLabel??e.label;/* @__PURE__ */
29
- return J("div",{children:[
30
- /* @__PURE__ */P("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Ae(e,r);const n=r.currentTarget.getBoundingClientRect();Le(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:Q(r,!0),children:Me(e.to,de)}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Fe&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>He(e,!1)),ve.systemSections.map(e=>He(e,!1)),ve.virtualSections.map(e=>He(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>He(e,!1))]}),
31
- /* @__PURE__ */P("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Ue}`,style:De,children:/* @__PURE__ */J("button",{ref:$e,type:"button",onClick:()=>ze(e=>!e),"aria-haspopup":"menu","aria-expanded":We,"aria-label":E?ye.accountMenu(Te):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(E?"justify-center py-2":"px-2 py-2"),children:[Pe,!E&&/* @__PURE__ */J("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */P("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Te}),ae?.email&&Te!==ae.email&&/* @__PURE__ */P("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!E&&!se&&/* @__PURE__ */P(o,{side:"left",width:Z,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ye.resizeSidebar}),We&&Je&&/* @__PURE__ */J(S,{portal:!0,minWidth:224,onClose:()=>ze(!1),style:B(Z,Je,window.innerHeight),children:[E&&/* @__PURE__ */J("div",{className:"border-b border-line px-3 py-3",children:[
33
- /* @__PURE__ */P("p",{className:"truncate text-sm font-semibold text-gray-800",children:Te}),ae?.email&&/* @__PURE__ */P("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
34
- /* @__PURE__ */J(L,{onClick:()=>{ze(!1),te("/profile",!1)},children:[
35
- /* @__PURE__ */P($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ve.footerItems.map(e=>/* @__PURE__ */J(L,{onClick:()=>{ze(!1),Ae(e)},children:[
36
- /* @__PURE__ */P("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */J(L,{onClick:()=>{ze(!1),oe()},children:[
37
- /* @__PURE__ */P($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
38
- /* @__PURE__ */P(W,{}),le&&/* @__PURE__ */J(U,{children:[
39
- /* @__PURE__ */J(L,{onClick:()=>{ze(!1),le()},children:[
40
- /* @__PURE__ */P($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
41
- /* @__PURE__ */P(W,{})]}),
42
- /* @__PURE__ */J(L,{danger:!0,onClick:()=>{ze(!1),ie()},children:[
43
- /* @__PURE__ */P($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),Se&&E&&/* @__PURE__ */P(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:Z+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ke).map((e,t)=>/* @__PURE__ */J("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */P(W,{}),e.heading&&/* @__PURE__ */P(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */J(L,{onClick:()=>Ae(e),children:[Me(e.to,de),
44
- /* @__PURE__ */P("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{B as accountMenuPosition,Z as default};
@@ -1,2 +0,0 @@
1
- import{inputClasses as e}from"./chunk-AYZY3YNC.js";import{useShellLocale as t}from"./chunk-4PAWQEXM.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/,i=e=>String(e).padStart(2,"0");function s(e,t){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const n=`${i(e.getHours())}:${i(e.getMinutes())}`;return t?`${n}:${i(e.getSeconds())}`:n}return a.test(e)?e:""}var u=n(function({value:n,onChange:i,min:u,max:o,invalid:m,size:l,className:c="",step:v,...d},f){const g=null!=v&&Number(v)<60,p=t();/* @__PURE__ */
2
- return r("input",{ref:f,type:"time",lang:p,step:v,"aria-invalid":m||void 0,value:s(n,g),min:s(u,g)||void 0,max:s(o,g)||void 0,onChange:e=>i?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...d})});export{u as TimePicker_default};
@@ -1 +0,0 @@
1
- import{EMPTY_VALUE as e}from"./chunk-36BRD5J3.js";var t=[{key:"DD/MM/YYYY",example:"24/04/2026"},{key:"MM/DD/YYYY",example:"04/24/2026"},{key:"YYYY-MM-DD",example:"2026-04-24"},{key:"DD-MM-YYYY",example:"24-04-2026"},{key:"MM-DD-YYYY",example:"04-24-2026"},{key:"DD.MM.YYYY",example:"24.04.2026"},{key:"YYYY.MM.DD",example:"2026.04.24"},{key:"YYYY/MM/DD",example:"2026/04/24"},{key:"DD/MM/YY",example:"24/04/26"},{key:"MM/DD/YY",example:"04/24/26"},{key:"DD/MMM/YYYY",example:"24/Apr/2026"},{key:"DD/MMM/YY",example:"24/Apr/26"},{key:"DD MMM YYYY",example:"24 Apr 2026"},{key:"MMM DD, YYYY",example:"Apr 24, 2026"},{key:"DD MMMM YYYY",example:"24 April 2026"},{key:"MMMM DD, YYYY",example:"April 24, 2026"}],r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=["January","February","March","April","May","June","July","August","September","October","November","December"];function a(e){return r[parseInt(e,10)-1]??e}function o(e){return n[parseInt(e,10)-1]??e}function Y(){if("undefined"==typeof window)return"DD/MM/YYYY";try{return localStorage.getItem("user_date_format")||"DD/MM/YYYY"}catch{return"DD/MM/YYYY"}}function u(e){localStorage.setItem("user_date_format",e)}var m="user_timezone",c="auto";function M(){if("undefined"!=typeof window)try{const e=localStorage.getItem(m);return e&&e!==c?e:void 0}catch{return}}function i(e){e&&e!==c?localStorage.setItem(m,e):localStorage.removeItem(m)}function D(e){e&&localStorage.setItem(m,e)}var l={dateStyle:"medium"},s=/* @__PURE__ */new Map;function y(e,t){const r=`${e}|${JSON.stringify(t)}`;let n=s.get(r);return n||(n=new Intl.DateTimeFormat(e,{...t,timeZone:"UTC",calendar:"gregory"}),s.set(r,n)),n}var $=/* @__PURE__ */new Map;function f(e,t){const r=function(e){const t=e??"";let r=$.get(t);if(!r){const n={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23",calendar:"gregory"};try{r=new Intl.DateTimeFormat("en-GB",{...n,timeZone:e})}catch{r=new Intl.DateTimeFormat("en-GB",n)}$.set(t,r)}return r}(t).formatToParts(e),n=e=>r.find(t=>t.type===e)?.value??"";return{y:n("year"),m:n("month"),d:n("day"),hh:n("hour"),mm:n("minute")}}var d=/^(\d{4})-(\d{1,2})-(\d{1,2})$/;function p(t,r){const n=function(e,t){if(!e)return null;const r=d.exec(e);if(r){const[e,t,n]=r.slice(1).map(Number);return t<1||t>12||n<1||n>31?null:{y:String(e),m:String(t).padStart(2,"0"),d:String(n).padStart(2,"0")}}const n=new Date(e);return Number.isNaN(n.getTime())?null:f(n,t)}(t,r?.timeZone||M());return n?r?.locale?y(r.locale,r.style??l).format(new Date(Date.UTC(Number(n.y),Number(n.m)-1,Number(n.d)))):function(e,t,r){switch(Y()){case"MM/DD/YYYY":return`${t}/${r}/${e}`;case"YYYY-MM-DD":return`${e}-${t}-${r}`;case"DD-MM-YYYY":return`${r}-${t}-${e}`;case"MM-DD-YYYY":return`${t}-${r}-${e}`;case"DD.MM.YYYY":return`${r}.${t}.${e}`;case"YYYY.MM.DD":return`${e}.${t}.${r}`;case"YYYY/MM/DD":return`${e}/${t}/${r}`;case"DD/MM/YY":return`${r}/${t}/${e.slice(-2)}`;case"MM/DD/YY":return`${t}/${r}/${e.slice(-2)}`;case"DD/MMM/YYYY":return`${r}/${a(t)}/${e}`;case"DD/MMM/YY":return`${r}/${a(t)}/${e.slice(-2)}`;case"DD MMM YYYY":return`${r} ${a(t)} ${e}`;case"MMM DD, YYYY":return`${a(t)} ${r}, ${e}`;case"DD MMMM YYYY":return`${r} ${o(t)} ${e}`;case"MMMM DD, YYYY":return`${o(t)} ${r}, ${e}`;default:return`${r}/${t}/${e}`}}(n.y,n.m,n.d):e}function h(t,r){if(!t||d.test(t))return e;const n=new Date(t);if(Number.isNaN(n.getTime()))return e;const a=r?.timeZone||M();if(r?.locale)return function(e,t,r){const n={hour:"numeric",minute:"2-digit"};try{return e.toLocaleTimeString(t,{...n,timeZone:r})}catch{return e.toLocaleTimeString(t,n)}}(n,r.locale,a);const{hh:o,mm:Y}=f(n,a);return function(e,t){const r=Number(e);return`${r%12||12}:${t} ${r<12?"am":"pm"}`}(o,Y)}function g(t,r){const n=h(t,r);return n===e?e:`${p(t,r)}, ${n}`}var k={months:n,monthsShort:r,weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Su","Mo","Tu","We","Th","Fr","Sa"],monthYear:(e,t)=>`${n[t]} ${e}`,shortMonthYear:(e,t)=>`${r[t]} ${e}`,longDate:(e,t,r)=>`${r} ${n[t]} ${e}`},S=/* @__PURE__ */new Map;function w(e){if(!e)return k;const t=S.get(e);if(t)return t;const r=t=>y(e,t),n=(e,t,r=1)=>new Date(Date.UTC(e,t,r)),a=r({month:"long"}),o=r({month:"short"}),Y=r({weekday:"long"}),u=r({weekday:"short"}),m=r({month:"long",year:"numeric"}),c=r({month:"short",year:"numeric"}),M=r({day:"numeric",month:"long",year:"numeric"}),i=Array.from({length:12},(e,t)=>t),D=Array.from({length:7},(e,t)=>t),l={months:i.map(e=>a.format(n(2e3,e))),monthsShort:i.map(e=>o.format(n(2e3,e))),weekdays:D.map(e=>Y.format(n(2e3,0,2+e))),weekdaysShort:D.map(e=>u.format(n(2e3,0,2+e))),monthYear:(e,t)=>m.format(n(e,t)),shortMonthYear:(e,t)=>c.format(n(e,t)),longDate:(e,t,r)=>M.format(n(e,t,r))};return S.set(e,l),l}var x=/* @__PURE__ */new Map;function I(e){if(!e)return 0;let t=x.get(e);if(void 0===t){t=0;try{const r=new Intl.Locale(e),n="function"==typeof r.getWeekInfo?r.getWeekInfo():r.weekInfo;1===n?.firstDay&&(t=1)}catch{}x.set(e,t)}return t}export{t as DATE_FORMAT_OPTIONS,c as TZ_AUTO,w as calendarNames,I as firstDayOfWeek,p as formatDate,g as formatDateTime,h as formatTime,Y as getUserDateFormat,M as getUserTimezone,u as setUserDateFormat,i as setUserTimezone,D as syncTimezoneFromProfile};
@@ -1,9 +0,0 @@
1
- import{toISODate as e}from"./chunk-MNXRAZJV.js";import{Calendar as t}from"./chunk-E5MVH3SH.js";import{inputClasses as r,PLACEHOLDER_INK as a}from"./chunk-AYZY3YNC.js";import{calendarNames as n}from"./chunk-5OTS2G3M.js";import{Icon as i}from"./chunk-KKSVRIMP.js";import{onOverlayOpen as o}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as l}from"./chunk-62LW225J.js";import{useDropdownPosition as s}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-4PAWQEXM.js";import{forwardRef as f,useState as b,useRef as p,useId as h,useEffect as v}from"react";import{createPortal as g}from"react-dom";import{jsx as y,jsxs as x}from"react/jsx-runtime";var N=/^\d{4}-\d{2}-\d{2}$/,k=/^(aria|data)-/,j=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function w(t){if(null==t||""===t)return"";if(t instanceof Date)return Number.isNaN(t.getTime())?"":e(t);if(N.test(t))return t;const r=new Date(t);return Number.isNaN(r.getTime())?"":e(r)}function D(e){if(!N.test(e))return null;const[t,r,a]=e.split("-").map(Number),n=new Date(t,r-1,a);return n.getMonth()===r-1&&n.getDate()===a?n:null}function M(e,t){const r=D(e);return r?t.longDate(r.getFullYear(),r.getMonth(),r.getDate()):""}var S=f(function({value:f,onChange:N,min:S,max:E,invalid:F,size:B,native:C,weekStartsOn:W,className:$="","aria-label":q,"aria-describedby":I,"aria-labelledby":O,id:T,name:z,disabled:J,placeholder:L,required:P,clearable:U,form:V,title:Y,tabIndex:A,autoFocus:G,onFocus:H,onBlur:R,...K},Q){const X=U??!P,Z=w(f),_=w(S),ee=w(E),te=c().datePicker,re=m(),ae=n(re),[ne,ie]=b(!1),oe=p(null),le=p(null),se=p(null),de=h(),ue=h(),ce=h(),me=s(le,ne,{popupRef:se}),[fe,be]=b(!1);d(()=>{const e=!!T&&(le.current?.labels?.length??0)>0;e!==fe&&be(e)});const pe=!q&&(!!O||fe);if(v(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=o(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),v(()=>{if(ne)return u(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),C)/* @__PURE__ */
2
- return y("input",{ref:Q,type:"date",lang:re,id:T,name:z,disabled:J,"aria-label":q,"aria-describedby":I,"aria-invalid":F||void 0,value:Z,min:_||void 0,max:ee||void 0,onChange:e=>N?.(D(e.target.value)),className:r({invalid:F,size:B,className:$}),"aria-labelledby":O,required:P,form:V,title:Y,tabIndex:A,autoFocus:G,onFocus:H,onBlur:R,...K});const he=Object.fromEntries(Object.entries(K).filter(([e])=>k.test(e)&&!j.has(e))),ve=K["aria-required"],ge=!!P||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,I].filter(Boolean).join(" ")||void 0,xe=e(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=L??te.placeholder;/* @__PURE__ */
3
- return x("div",{ref:oe,className:"relative",children:[
4
- /* @__PURE__ */y("input",{ref:Q,type:"hidden",name:z,form:V,value:Z}),
5
- /* @__PURE__ */x("button",{ref:le,type:"button",...he,id:T,disabled:J,title:Y,tabIndex:A,autoFocus:G,onFocus:H,onBlur:R,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":O,"aria-describedby":ye,"aria-label":q?`${q}${Z?`, ${M(Z,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${r({invalid:F,size:B,className:$})} flex items-center justify-between text-left`,children:[
6
- /* @__PURE__ */y("span",{className:Z?"text-ink-strongest":a,children:Z?M(Z,ae):ke}),
7
- /* @__PURE__ */y(i,{name:"date",className:`h-4 w-4 shrink-0 ${a}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */y("span",{id:ue,className:"sr-only",children:Z?M(Z,ae):ke}),ge&&/* @__PURE__ */y("span",{id:ce,className:"sr-only",children:te.required}),ne&&g(
8
- /* @__PURE__ */x("div",{ref:se,id:de,role:"dialog","aria-label":q??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:l.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
9
- /* @__PURE__ */y(t,{value:Z||null,min:_||null,max:ee||null,weekStartsOn:W,onSelect:e=>{ie(!1),le.current?.focus(),N?.(D(e))}}),(X||Ne)&&/* @__PURE__ */x("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[X&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */y("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),N?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{S as DatePicker_default};
@@ -1,4 +0,0 @@
1
- import{InputNumber_default as e}from"./chunk-QEKOEIOQ.js";import{useSettingAuto as t}from"./chunk-2NMW66P5.js";import{useShellStrings as i}from"./chunk-4PAWQEXM.js";import{createContext as n,useState as r,useMemo as l,useId as a,useRef as o,useContext as d,useEffect as u,useLayoutEffect as s}from"react";import{jsx as c,jsxs as m}from"react/jsx-runtime";var f=(e,t,i)=>Math.min(i,Math.max(t,e));function p(e){const t=String(e),i=/e-(\d+)$/.exec(t);return i?Number(i[1]):t.split(".")[1]?.length??0}var h=8,v=40;function x(e){return Math.max(1,...e.map(e=>(e??"").length))}var b="undefined"==typeof window?u:s;function w(e,t,i,n){return Number(f(e,t,i).toFixed(n))}var y=n(null);function g({children:e}){const[t,i]=r({}),n=l(()=>(e,t)=>i(i=>{if(null===t){if(!(e in i))return i;const t={...i};return delete t[e],t}return i[e]===t?i:{...i,[e]:t}}),[]),a=l(()=>{const e=Object.values(t);return{set:n,width:e.length?`max(${e.join(", ")})`:null}},[t,n]);/* @__PURE__ */
2
- return c(y.Provider,{value:a,children:e})}function S({value:n,onChange:l,min:s,max:g,step:S=1,shiftStep:z,precision:F,inputMin:k,inputMax:N,suffix:M,showInput:$=!0,emptyLabel:j,placeholderValue:E,stepFrom:K,label:L,"aria-labelledby":A,valueText:C,id:W,disabled:D,size:O="md",boxSize:P="sm",className:Q="",auto:R}){const I=i(),V=a(),q=t(),B=R??q,T=a(),U=W??V,X=F??p(S),G=k??s,H=N??g,J=void 0!==j||void 0!==E,Y=K??E,Z=f(n??E??s,s,g),_=o(null),[ee,te]=r(null),ie=Boolean(M);b(()=>{const e=()=>{const e=_.current?.querySelector("input");if(!e)return;const t=getComputedStyle(e),i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,i)=>e+(parseFloat(t[i])||0),0);i<=0||te(e=>e&&e.frame===i&&e.fontSize===t.fontSize?e:{frame:i,fontSize:t.fontSize})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[ie,$]);const ne=e=>C?C(e):"string"==typeof M?`${e.toFixed(X)} ${M}`:void 0,re=null==n?j??(null!=E?ne(E)??String(E):void 0):ne(n),le=`calc(${x([s.toFixed(X),g.toFixed(X),n?.toFixed(X),j,E?.toFixed(X)])}ch + ${(ee?.frame??10+(ie?v:h))+2}px)`,ae=d(y),oe=a(),de=ae?.set;return b(()=>{de&&de(oe,$?le:null)},[de,oe,le,$]),u(()=>()=>de?.(oe,null),[de,oe]),/* @__PURE__ */m("div",{"data-slider":"",className:`flex w-full min-w-0 items-center gap-3 ${Q}`.trim(),children:[
3
- /* @__PURE__ */c("input",{id:U,type:"range",min:s,max:g,step:S,value:Z,disabled:D,"aria-label":A?void 0:L,"aria-labelledby":A,"aria-valuetext":re,"aria-describedby":B?T:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const i=e.shiftKey&&null!=z;if(!i&&!(null==n&&null!=Y))return;e.preventDefault();l(w((n??Y??Z)+t*(i?z??S:S),s,g,X))},onChange:e=>l(w(Number(e.target.value),s,g,X)),className:"min-w-24 flex-1 cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 "+("sm"===O?"h-1":"h-1.5")}),$&&
4
- /* @__PURE__ */c("div",{ref:_,"data-slider-box":"",className:"shrink-0 text-xs",style:{width:ae?.width??le,...ee?{fontSize:ee.fontSize}:{}},children:/* @__PURE__ */c(e,{value:n,onChange:e=>{null!=e?e<G||e>H||l(e):J&&l(null)},min:G,max:H,step:S,shiftStep:z,stepFrom:Y,precision:X,snap:!0,allowEmpty:J,suffix:M,disabled:D,placeholder:j??(null!=E?E.toFixed(X):void 0),size:P,auto:B,"aria-label":L?I.slider.value(L):void 0,"aria-labelledby":L?void 0:A})}),B&&/* @__PURE__ */c("span",{id:T,hidden:!0,children:I.settingView.auto})]})}export{S as Slider,g as SliderGroup,w as settleSliderValue,x as sliderBoxChars,p as stepDecimals};
@@ -1,2 +0,0 @@
1
- import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-3CPB3WP2.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-4PAWQEXM.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const w=i(g??null);let H,L,N=!0;0===j.length?(L=w??M??0,H=L-30*a,N=null!==w||null!==M):(H=j[0].ms,L=w??j[j.length-1].ms,L-H<a&&(L=H+a));const O=j.length>0?Math.max(0,Math.round((L-H)/a)):0,P=u??(O>0?x.duration(O):void 0),A=[j.length>0?x.started(t(j[0].ms,D)):void 0,P,C.length>0?x.reached(j.length,p.length):void 0],E=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),K={};for(const e of j)e.phase&&(K[e.phase]=K[e.phase]||[]).push(e.ms);const W=Object.entries(K).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),X="rail"===v,B=N&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:X?"spread":"compressed",labels:X?"none":"lanes",items:E,pending:C,phases:W,startMs:H,endMs:L,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
2
- return h("div",X?{className:"shrink-0","data-timeline-variant":"rail",children:B}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:A,children:B})})}export{m as MilestoneTimeline};
@@ -1,14 +0,0 @@
1
- import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-KKSVRIMP.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-4PAWQEXM.js";import{useMemo as l,useState as i,useRef as s,useEffect as c}from"react";import{jsxs as u,jsx as g,Fragment as d}from"react/jsx-runtime";var h=e=>String(e).padStart(2,"0"),m="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";function b(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function f(e){if(!e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}var v=e=>`${e.getFullYear()}-${h(e.getMonth()+1)}`;var y=()=>b(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:h,endValue:w,mode:N="single",onSelect:M,min:D,max:Y,month:k,defaultMonth:F,onMonthChange:j,weekStartsOn:A,quickJump:S=!0,markedDates:$,readOnly:C=!1,"aria-label":P,className:K=""}){const q=l(()=>new Set($??[]),[$]),E=f(h),O=a(y,null),T=f(O),W=n().calendar,H=o(),I=e(H),J=a(()=>t(H),0),R=A??J,U=()=>{if(!T)return null;const e=v(T);return D&&e<D.slice(0,7)?D.slice(0,7):Y&&e>Y.slice(0,7)?Y.slice(0,7):e},[V,B]=i(()=>F||(E?v(E):U())),G=k??V??U(),L=null===G?null:function(e,t){const r=/^(\d{4})-(\d{2})$/.exec(e);return r?new Date(Number(r[1]),Number(r[2])-1,1):t}(G,T),[Q,X]=i(()=>h??O),z=s(null),Z=s(!1),[_,ee]=i("days"),te=l(()=>L?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(L,R):[],[G,R]),re=e=>!!D&&e<D||!!Y&&e>Y,ae=Q??O,ne=te.some(e=>b(e)===ae),oe=L?te.find(e=>e.getMonth()===L.getMonth())??te[0]:null,le=ne&&ae?ae:oe?b(oe):"";if(c(()=>{Z.current&&(Z.current=!1,z.current?.querySelector('[data-active="true"]')?.focus())},[le,G]),!L)/* @__PURE__ */
2
- return u("div",{className:K,"aria-hidden":"true","data-calendar-pending":"",children:[
3
- /* @__PURE__ */g("div",{className:"mb-2 h-6"}),
4
- /* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(L.getFullYear()+12*e,L.getMonth(),1):"months"===_?new Date(L.getFullYear()+e,L.getMonth(),1):x(L,e),se=e=>{const t=v(e);void 0===k&&B(t),j?.(t)},ce=P??I.monthYear(L.getFullYear(),L.getMonth());/* @__PURE__ */
5
- return u("div",{className:K,children:[
6
- /* @__PURE__ */u("div",{className:"mb-2 flex items-center justify-between px-1",children:[
7
- /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?W.previousYears:"months"===_?W.previousYear:W.previousMonth,onClick:()=>se(ie(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
8
- /* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:S?/* @__PURE__ */u(d,{children:["years"!==_&&/* @__PURE__ */g("button",{type:"button","aria-label":W.chooseMonth(I.months[L.getMonth()]),onClick:()=>ee(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:I.months[L.getMonth()]}),
9
- /* @__PURE__ */g("button",{type:"button","aria-label":W.chooseYear(L.getFullYear()),onClick:()=>ee(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:L.getFullYear()})]}):/* @__PURE__ */g("span",{children:I.monthYear(L.getFullYear(),L.getMonth())})}),
10
- /* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?W.nextYears:"months"===_?W.nextYear:W.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":W.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:I.monthsShort.map((e,t)=>/* @__PURE__ */g("button",{type:"button","aria-pressed":t===L.getMonth(),onClick:()=>{se(new Date(L.getFullYear(),t,1)),ee("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===L.getMonth()?"bg-blue-600 font-semibold text-white":T&&t===T.getMonth()&&L.getFullYear()===T.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":W.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=L.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */g("button",{type:"button","aria-pressed":e===L.getFullYear(),onClick:()=>{se(new Date(e,L.getMonth(),1)),ee("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===L.getFullYear()?"bg-blue-600 font-semibold text-white":e===T?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
11
- /* @__PURE__ */u("div",{ref:z,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??T??L,r={ArrowLeft:()=>p(t,-1),ArrowRight:()=>p(t,1),ArrowUp:()=>p(t,-7),ArrowDown:()=>p(t,7),Home:()=>p(t,-(t.getDay()-R+7)%7),End:()=>p(t,6-(t.getDay()-R+7)%7),PageUp:()=>x(t,e.shiftKey?-12:-1),PageDown:()=>x(t,e.shiftKey?12:1)};if(r[e.key])return e.preventDefault(),a=r[e.key](),Z.current=!0,X(b(a)),void(v(a)!==G&&se(a));var a;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C||re(le)||M(le))},hidden:"days"!==_,children:[
12
- /* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-xs font-medium text-ink-faint`,children:Array.from({length:7},(e,t)=>(t+R)%7).map(e=>
13
- /* @__PURE__ */g("div",{role:"columnheader","aria-label":I.weekdays[e],className:"py-1",children:/* @__PURE__ */g("abbr",{title:I.weekdays[e],className:"no-underline",children:I.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-sm`,children:te.slice(7*t,7*t+7).map(e=>{const t=b(e),r=e.getMonth()!==L.getMonth(),a=t===h||"range"===N&&t===w,n=(e=>!("range"!==N||!h||!w)&&e>h&&e<w)(t),o=re(t),l=I.longDate(e.getFullYear(),e.getMonth(),e.getDate()),i=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"cursor-not-allowed text-gray-300":a?"bg-accent-fill font-semibold text-on-accent":n?"bg-accent-tint-strong text-blue-800":r?"text-ink-faint"+(e?" hover:bg-gray-100":""):"text-ink"+(e?" hover:bg-gray-100":""),t!==O||a?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),s=q.has(t)&&/* @__PURE__ */g("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(a?"bg-surface":r?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
14
- return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===O?"date":void 0,onClick:()=>{X(t),M(t)},className:i(!0),children:[e.getDate(),s]})},t)})},t))]})]})}export{w as Calendar,f as fromKey,b as toKey};
@@ -1,5 +0,0 @@
1
- import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-OW7MLJ3Y.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-PKXQDCNR.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-KKSVRIMP.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-4PAWQEXM.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:W,description:C,role:D="dialog",children:L,footer:J,blocking:K=!1,size:T="md",aside:V=!1,dirty:A=!1,initialFocus:I,"aria-label":M,"aria-labelledby":P,"aria-describedby":Q,className:U=""}){const X=f(null),$=h(),z=h(),F=!K,G=h(),R=p().dialog,Y=e(m()),[B,E]=x(null),H=l({open:j,dirty:A,onClose:w,title:W,layer:B}),O=f(null),S=r(j&&null!==Y,O),Z=i(S,X);if(o(j),n(X,j&&null!==Y,I),s(j),v(()=>{if(j)return u(()=>(K||H(),!0),()=>X.current)},[j,K,H]),!j||!Y)return null;/* @__PURE__ */
2
- return y(g,{children:[/* @__PURE__ */k("span",{ref:O,hidden:!0,"data-popup-anchor":""}),b(
3
- /* @__PURE__ */k(t,{value:B,children:/* @__PURE__ */y("div",{ref:E,className:"fixed inset-0"+(V?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":V?"":void 0,children:[
4
- /* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
5
- /* @__PURE__ */k("div",{className:S?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:K?void 0:e=>{e.target===e.currentTarget&&H()},children:/* @__PURE__ */y("div",{ref:X,"data-popup-panel":"",style:S?{left:Z?.left??0,top:Z?.top??0,visibility:Z?void 0:"hidden"}:void 0,...a({role:D,modal:!0,titleId:W?G:void 0,labelledBy:P,label:M}),"aria-describedby":Q??(C?z:L?$:void 0),className:`${S?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[T]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${U}`.trim(),children:[W&&/* @__PURE__ */k("h2",{id:G,className:(F?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:W}),C&&/* @__PURE__ */k("p",{id:z,className:((W?"mt-1":F?"pr-8":"")+" text-sm text-gray-500").trim(),children:C}),L&&/* @__PURE__ */k("div",{id:$,className:"mt-2 text-sm text-gray-600",children:L}),J&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:J}),F&&/* @__PURE__ */k("button",{type:"button",onClick:H,"aria-label":R.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),Y)]})}export{j as Dialog};