efficient-shell 11.11.0 → 11.12.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 (240) hide show
  1. package/dist/{Browser-NRGJ53ST.js → Browser-LPGSKKLU.js} +14 -14
  2. package/dist/Calculator-XUV5JV3O.js +29 -0
  3. package/dist/{CurrencyConverter-CJQMDBQW.js → CurrencyConverter-N2HQT7IR.js} +9 -9
  4. package/dist/{Documents-FIGKS36O.js → Documents-IRPS3N5T.js} +23 -23
  5. package/dist/Files-VN2IOPHX.js +88 -0
  6. package/dist/{Notepad-2XW63REV.js → Notepad-JCWNOQET.js} +9 -9
  7. package/dist/{PomodoroTimer-Y5GQX37J.js → PomodoroTimer-356JUEM3.js} +21 -21
  8. package/dist/{Preview-K7KDM4XK.js → Preview-X7XNDI6X.js} +23 -23
  9. package/dist/Sidebar-OZMJNAXN.js +44 -0
  10. package/dist/{Spreadsheet-RQE4OCEK.js → Spreadsheet-YQOVGIU7.js} +33 -33
  11. package/dist/{Stock-IHAG62QV.js → Stock-2XOOZNRR.js} +3 -3
  12. package/dist/{Weather-EQDFEBIH.js → Weather-ZDU2722T.js} +16 -16
  13. package/dist/{WorldClock-VQG7G2Z2.js → WorldClock-PQGERFCH.js} +5 -5
  14. package/dist/ai/index.js +91 -91
  15. package/dist/apps/index.d.ts +21 -2
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/charts/BoxPlotChart.js +1 -1
  20. package/dist/charts/CandlestickChart.js +1 -1
  21. package/dist/charts/CartesianPlot.js +1 -1
  22. package/dist/charts/ChartTooltip.js +1 -1
  23. package/dist/charts/ChordChart.js +1 -1
  24. package/dist/charts/ColumnChart.js +1 -1
  25. package/dist/charts/FunnelChart.js +1 -1
  26. package/dist/charts/HeatmapChart.js +1 -1
  27. package/dist/charts/HistogramChart.js +1 -1
  28. package/dist/charts/PieChart.js +1 -1
  29. package/dist/charts/RadarChart.js +1 -1
  30. package/dist/charts/RadialBarChart.js +1 -1
  31. package/dist/charts/RangeChart.js +1 -1
  32. package/dist/charts/SankeyChart.js +1 -1
  33. package/dist/charts/ScatterChart.js +1 -1
  34. package/dist/charts/SpecChart.js +1 -1
  35. package/dist/charts/SunburstChart.js +1 -1
  36. package/dist/charts/TimeSeriesChart.js +1 -1
  37. package/dist/charts/TreemapChart.js +1 -1
  38. package/dist/charts/WaterfallChart.js +1 -1
  39. package/dist/{chunk-QOJ2UNS5.js → chunk-34AHNPW7.js} +1 -1
  40. package/dist/{chunk-WDQI3FV6.js → chunk-36VIGB6J.js} +6 -6
  41. package/dist/{chunk-PDXOGPWH.js → chunk-3N2MNOV5.js} +1 -1
  42. package/dist/{chunk-3JCOD5L2.js → chunk-4APQHXLI.js} +2 -2
  43. package/dist/{chunk-IEOCUEJK.js → chunk-4EVYK6DR.js} +7 -7
  44. package/dist/{chunk-7IVTGOGM.js → chunk-4JJ5WT4D.js} +1 -1
  45. package/dist/{chunk-3ZRYKZGI.js → chunk-4TB4CSLB.js} +4 -4
  46. package/dist/{chunk-KZEIQO3V.js → chunk-5IESW4PM.js} +5 -5
  47. package/dist/{chunk-EYPKBJYG.js → chunk-5PP435FL.js} +1 -1
  48. package/dist/chunk-5W3U3EVG.js +7 -0
  49. package/dist/chunk-64KZ74CS.js +8 -0
  50. package/dist/{chunk-QAIMZN7M.js → chunk-6ETRVCMH.js} +13 -13
  51. package/dist/{chunk-SGBR443F.js → chunk-6S6FJJKP.js} +6 -6
  52. package/dist/{chunk-M57KX3OM.js → chunk-6UJYRGWY.js} +1 -1
  53. package/dist/{chunk-K6D7OSKZ.js → chunk-6WPKLF6G.js} +14 -14
  54. package/dist/{chunk-UWJNQH2X.js → chunk-7A2Y3W55.js} +1 -1
  55. package/dist/{chunk-ZOQXFS3R.js → chunk-7FCIFHO7.js} +1 -1
  56. package/dist/chunk-7TVGP2SX.js +8 -0
  57. package/dist/{chunk-2HAJ33HM.js → chunk-AD27M3ZH.js} +2 -2
  58. package/dist/{chunk-AQGIK2CV.js → chunk-AO7XAAGG.js} +1 -1
  59. package/dist/chunk-AQ7CNPEE.js +15 -0
  60. package/dist/chunk-BOJEZKYS.js +14 -0
  61. package/dist/{chunk-3X2W7R5B.js → chunk-BPJ3CQH7.js} +9 -9
  62. package/dist/chunk-CGA6RTVI.js +9 -0
  63. package/dist/{chunk-CT7AU2TA.js → chunk-CR3YDABU.js} +1 -1
  64. package/dist/{chunk-TXKTITMF.js → chunk-CR42APAY.js} +5 -5
  65. package/dist/{chunk-MQE2FBJU.js → chunk-CXZ7PHHF.js} +5 -5
  66. package/dist/{chunk-V64CJHMY.js → chunk-D5MN3LXC.js} +19 -19
  67. package/dist/{chunk-6LK2BBCC.js → chunk-DMBA6KYQ.js} +5 -5
  68. package/dist/{chunk-ALJS3SYS.js → chunk-DXKXETTT.js} +1 -1
  69. package/dist/chunk-EBGOENC3.js +3 -0
  70. package/dist/{chunk-6DQANKTL.js → chunk-ELIWGIR7.js} +7 -7
  71. package/dist/chunk-EOVXFXVV.js +2 -0
  72. package/dist/{chunk-CSLMWGFS.js → chunk-EQ72AP5E.js} +1 -1
  73. package/dist/chunk-ES2LUEPN.js +22 -0
  74. package/dist/{chunk-62BDGAML.js → chunk-F33L4J3P.js} +6 -6
  75. package/dist/{chunk-QEDVXD3L.js → chunk-FD6XZRWA.js} +1 -1
  76. package/dist/{chunk-X2DUOIJP.js → chunk-FEUTN4GK.js} +1 -1
  77. package/dist/{chunk-JPNAEN53.js → chunk-FZM3ZPW3.js} +1 -1
  78. package/dist/chunk-FZWSP7KJ.js +28 -0
  79. package/dist/chunk-G3FHFWC2.js +4 -0
  80. package/dist/{chunk-42TLGG33.js → chunk-GJFTO7D4.js} +1 -1
  81. package/dist/{chunk-VEGZVUHE.js → chunk-GJVGGYQ2.js} +1 -1
  82. package/dist/{chunk-LGTYPLJM.js → chunk-GS74BABV.js} +3 -3
  83. package/dist/{chunk-LXOX5FGH.js → chunk-HGMQOHMK.js} +2 -2
  84. package/dist/{chunk-CG5X5ZLV.js → chunk-HJM4LSMM.js} +1 -1
  85. package/dist/{chunk-E3EHHR73.js → chunk-HOEEFFE3.js} +9 -9
  86. package/dist/{chunk-32EKHIAZ.js → chunk-HT7SOOMD.js} +12 -12
  87. package/dist/{chunk-R72ZKZDP.js → chunk-I5GDAQYL.js} +2 -2
  88. package/dist/{chunk-TA4JGC5C.js → chunk-IFWXC323.js} +1 -1
  89. package/dist/{chunk-5B4GRLAA.js → chunk-IJ6HZXZY.js} +1 -1
  90. package/dist/{chunk-UG42KUCT.js → chunk-IKKR2TYY.js} +4 -4
  91. package/dist/{chunk-OXCFRH33.js → chunk-JFCCI5L2.js} +1 -1
  92. package/dist/{chunk-CLAKVFOB.js → chunk-JGWUSJDD.js} +31 -31
  93. package/dist/{chunk-I5XNADZ3.js → chunk-JJLAI6GL.js} +8 -8
  94. package/dist/{chunk-F636NDAU.js → chunk-K3IUUZO5.js} +7 -7
  95. package/dist/{chunk-ZOQVYSTB.js → chunk-KV4QPU6U.js} +18 -18
  96. package/dist/{chunk-RNBC6V2D.js → chunk-L2IPWMLI.js} +3 -3
  97. package/dist/chunk-L74WV4RJ.js +6 -0
  98. package/dist/{chunk-VCMHBUKI.js → chunk-LE5LWALR.js} +1 -1
  99. package/dist/chunk-LJJ7FDAQ.js +6 -0
  100. package/dist/{chunk-3OHADZYV.js → chunk-LLSLY6BT.js} +1 -1
  101. package/dist/{chunk-CDQUOCXO.js → chunk-LP45EML2.js} +1 -1
  102. package/dist/{chunk-HRG4FYVU.js → chunk-LWFH5QTJ.js} +1 -1
  103. package/dist/{chunk-Q7DVGUML.js → chunk-LXBBJNBQ.js} +1 -1
  104. package/dist/{chunk-SWJXWDKX.js → chunk-M4AOQYSP.js} +1 -1
  105. package/dist/{chunk-RQBQETXQ.js → chunk-MD6EPKOR.js} +8 -8
  106. package/dist/{chunk-S43DAIIB.js → chunk-MFP5KOQW.js} +5 -5
  107. package/dist/{chunk-RQDVAUXD.js → chunk-N5KO2IHG.js} +4 -4
  108. package/dist/{chunk-IUMFOSFJ.js → chunk-N75MPMLD.js} +3 -3
  109. package/dist/{chunk-QQ2LDC6C.js → chunk-NJN5IKWO.js} +1 -1
  110. package/dist/{chunk-C3UY34DC.js → chunk-NPT6EXHK.js} +4 -4
  111. package/dist/{chunk-57WQVUBX.js → chunk-OCWWEHNR.js} +2 -2
  112. package/dist/{chunk-PVOTOUJG.js → chunk-OMROEVOP.js} +1 -1
  113. package/dist/{chunk-VPEH3THH.js → chunk-P75N466Z.js} +3 -3
  114. package/dist/{chunk-AHITTM6W.js → chunk-PTVTNCD6.js} +1 -1
  115. package/dist/chunk-Q7UTGO73.js +11 -0
  116. package/dist/{chunk-3VR5BOD4.js → chunk-QDL2FNP7.js} +2 -2
  117. package/dist/{chunk-ATKFIHDP.js → chunk-RBAC26J7.js} +4 -4
  118. package/dist/{chunk-SYZLS2JA.js → chunk-RDKIYORS.js} +1 -1
  119. package/dist/{chunk-63545Z3N.js → chunk-RXVFAFEB.js} +1 -1
  120. package/dist/{chunk-JQBVSPF5.js → chunk-S4FPYCUU.js} +3 -3
  121. package/dist/chunk-SI33IE7G.js +2 -0
  122. package/dist/{chunk-ESWR7YNY.js → chunk-SPMD7UZO.js} +3 -3
  123. package/dist/{chunk-A4YTWDKD.js → chunk-SSM6P43S.js} +1 -1
  124. package/dist/{chunk-XWFLIGDQ.js → chunk-TE6R53YD.js} +1 -1
  125. package/dist/{chunk-EV7VAXMO.js → chunk-TTQJQKCE.js} +9 -9
  126. package/dist/chunk-UBQUXUD2.js +7 -0
  127. package/dist/{chunk-YUAF3FDE.js → chunk-UCAMOW53.js} +4 -4
  128. package/dist/{chunk-JG26ICX6.js → chunk-UEWB6IOD.js} +2 -2
  129. package/dist/{chunk-KKJ55GUZ.js → chunk-UHGAT5MH.js} +1 -1
  130. package/dist/{chunk-PZHO4FEN.js → chunk-UOGF37Z4.js} +1 -1
  131. package/dist/chunk-UZTKBA7Z.js +13 -0
  132. package/dist/{chunk-6LITLCVV.js → chunk-VEATEVMV.js} +3 -3
  133. package/dist/{chunk-K6LW2QLI.js → chunk-VIDT4JLR.js} +1 -1
  134. package/dist/{chunk-CJH2BGXY.js → chunk-WGLHB6WE.js} +1 -1
  135. package/dist/chunk-WZJPASST.js +6 -0
  136. package/dist/{chunk-B2SLXCMY.js → chunk-XOH6QERF.js} +8 -8
  137. package/dist/chunk-YXSGMPNW.js +1 -0
  138. package/dist/{chunk-7R23EKON.js → chunk-ZA2RBNRA.js} +1 -1
  139. package/dist/{chunk-BDUXF7BT.js → chunk-ZHS2VQU7.js} +3 -3
  140. package/dist/{chunk-7HLBVMMQ.js → chunk-ZMC25LRC.js} +1 -1
  141. package/dist/{chunk-DANLBFBD.js → chunk-ZRLWE3JM.js} +1 -1
  142. package/dist/data/DataTable.js +1 -1
  143. package/dist/data/EntityList.js +1 -1
  144. package/dist/data/ListLoadError.js +1 -1
  145. package/dist/data/ResizableTable.js +1 -1
  146. package/dist/forms/AlignmentGrid.js +1 -1
  147. package/dist/forms/BorderInput.js +1 -1
  148. package/dist/forms/BrandAssetEditor.js +1 -1
  149. package/dist/forms/Button.js +1 -1
  150. package/dist/forms/ColorPicker.js +1 -1
  151. package/dist/forms/ComposerAttachments.js +1 -1
  152. package/dist/forms/CornersInput.js +1 -1
  153. package/dist/forms/DateRangePicker.js +1 -1
  154. package/dist/forms/DisplayChips.js +1 -1
  155. package/dist/forms/FilePicker.js +1 -1
  156. package/dist/forms/IconButton.js +1 -1
  157. package/dist/forms/IconPicker.js +1 -1
  158. package/dist/forms/Input.js +1 -1
  159. package/dist/forms/InputNumber.js +1 -1
  160. package/dist/forms/LinkPicker.js +1 -1
  161. package/dist/forms/MediaLibrary.js +1 -1
  162. package/dist/forms/MediaUploadField.js +1 -1
  163. package/dist/forms/MediaUploadGrid.js +1 -1
  164. package/dist/forms/MediaUsedInList.js +1 -1
  165. package/dist/forms/NumericKeypad.js +1 -1
  166. package/dist/forms/PictureTiles.js +1 -1
  167. package/dist/forms/PositionInput.js +1 -1
  168. package/dist/forms/RenameField.js +1 -1
  169. package/dist/forms/Segmented.js +1 -1
  170. package/dist/forms/Select.js +1 -1
  171. package/dist/forms/SidesInput.js +1 -1
  172. package/dist/forms/Slider.js +1 -1
  173. package/dist/forms/Snippet.js +1 -1
  174. package/dist/forms/SplitButton.js +1 -1
  175. package/dist/forms/TagInput.js +1 -1
  176. package/dist/forms/TextToolbar.js +1 -1
  177. package/dist/forms/WidthsBar.js +1 -1
  178. package/dist/index.js +378 -378
  179. package/dist/map/index.js +3 -3
  180. package/dist/page-tabs/index.js +5 -5
  181. package/dist/shell/AppUpdateBanner.js +1 -1
  182. package/dist/shell/ColoredBadge.js +1 -1
  183. package/dist/shell/ContextMenu.js +1 -1
  184. package/dist/shell/DropdownMenu.js +1 -1
  185. package/dist/shell/EditableGrid.js +1 -1
  186. package/dist/shell/GlobalSearch.js +1 -1
  187. package/dist/shell/HelpCenter.js +1 -1
  188. package/dist/shell/IconRail.js +1 -1
  189. package/dist/shell/ImageLightbox.js +1 -1
  190. package/dist/shell/ItemCount.js +1 -1
  191. package/dist/shell/LanguageSelect.js +1 -1
  192. package/dist/shell/Markdown.js +1 -1
  193. package/dist/shell/PopupMenu.js +1 -1
  194. package/dist/shell/ResizeHandle.js +1 -1
  195. package/dist/shell/SearchableSelect.js +1 -1
  196. package/dist/shell/SettingReset.js +1 -1
  197. package/dist/shell/SidebarLayout.js +1 -1
  198. package/dist/shell/SidebarNav.js +1 -1
  199. package/dist/shell/SortableList.js +1 -1
  200. package/dist/shell/StatusBadge.js +1 -1
  201. package/dist/shell/Tabs.js +1 -1
  202. package/dist/shell/Tooltip.js +1 -1
  203. package/dist/shell/TopNav.js +1 -1
  204. package/dist/shell/TransferProgress.js +1 -1
  205. package/dist/shell/Tree.js +1 -1
  206. package/dist/telemetry/index.js +1 -1
  207. package/dist/templates/AuthScreen.js +1 -1
  208. package/dist/templates/ChatTemplate.js +1 -1
  209. package/dist/templates/CheckoutTemplate.js +1 -1
  210. package/dist/templates/DashboardTemplate.js +1 -1
  211. package/dist/templates/DataTablePage.js +1 -1
  212. package/dist/templates/EmailTemplate.js +1 -1
  213. package/dist/templates/ErrorBoundary.js +1 -1
  214. package/dist/templates/FormLayoutPage.js +1 -1
  215. package/dist/templates/GalleryTemplate.js +1 -1
  216. package/dist/ui/index.js +1 -1
  217. package/dist/version.js +1 -1
  218. package/package.json +1 -1
  219. package/dist/Calculator-YZEGVEQ7.js +0 -29
  220. package/dist/Files-FPNJ46XY.js +0 -88
  221. package/dist/Sidebar-QP5Y7RBV.js +0 -44
  222. package/dist/chunk-2EPAXWZZ.js +0 -14
  223. package/dist/chunk-6FIYG7IH.js +0 -28
  224. package/dist/chunk-6R32KKIS.js +0 -22
  225. package/dist/chunk-7DI3VQCF.js +0 -2
  226. package/dist/chunk-B2MD232O.js +0 -6
  227. package/dist/chunk-EC22ACQZ.js +0 -11
  228. package/dist/chunk-FJBJUFD7.js +0 -4
  229. package/dist/chunk-GO6HU2O3.js +0 -7
  230. package/dist/chunk-H56TNUV4.js +0 -1
  231. package/dist/chunk-IGQZANYE.js +0 -15
  232. package/dist/chunk-MQ445O4X.js +0 -6
  233. package/dist/chunk-NMTS2L2B.js +0 -8
  234. package/dist/chunk-ODQYWMDF.js +0 -3
  235. package/dist/chunk-OPZXVXX5.js +0 -7
  236. package/dist/chunk-OZM6DE7A.js +0 -8
  237. package/dist/chunk-PMA6DZ4Q.js +0 -6
  238. package/dist/chunk-SCZUDGRZ.js +0 -2
  239. package/dist/chunk-SUYQ7QYB.js +0 -13
  240. package/dist/chunk-VEZHFONL.js +0 -9
@@ -1,30 +1,30 @@
1
- import{InputEndActionButton as e}from"./chunk-LGTYPLJM.js";import"./chunk-GO6HU2O3.js";import"./chunk-QOJ2UNS5.js";import"./chunk-AYZY3YNC.js";import"./chunk-VCMHBUKI.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-2HAJ33HM.js";import{WindowTitle as n}from"./chunk-CLAKVFOB.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import{confirm as s}from"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import"./chunk-PDXOGPWH.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CT7AU2TA.js";import"./chunk-3PZI2C4R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-H56TNUV4.js";import"./chunk-JPNAEN53.js";import"./chunk-CDAJKLGL.js";import"./chunk-3ZRYKZGI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-7DI3VQCF.js";import"./chunk-UQYNPYF4.js";import"./chunk-XWFLIGDQ.js";import{Icon as a}from"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useRef as i,useEffect as l,useState as c}from"react";import{jsxs as m,jsx as u,Fragment as h}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",p="react-os-shell:browser-homepage",k="https://en.wikipedia.org/wiki/Main_Page",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],g=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function f(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&g.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var w=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function y(){return"undefined"==typeof window?k:localStorage.getItem(p)||k}function v(){const h=i(void 0);void 0===h.current&&(h.current=t()),l(()=>{null!=h.current&&o(h.current)},[]);const k=h.current?f(h.current.url):"",[b,g]=c(y),[w,v]=c(k||b),[C,W]=c(w),[R,L]=c([w]),[z,D]=c(0),[H,O]=c(0),[U,P]=c(x),[S,T]=c(!1),[J,K]=c(null),M=i(null),G=i(null);l(()=>{try{localStorage.setItem(d,JSON.stringify(U))}catch{}},[U]);const F=e=>{const t=f(e);t&&(v(t),W(t),L(e=>{const o=e.slice(0,z+1);return o.push(t),o}),D(e=>e+1),T(!1))},X=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},Y=()=>{const e=J?.trim();e?(P(t=>[...t,{label:e,url:w}]),K(null)):K(null)};l(()=>{if(null===J)return;M.current?.focus(),M.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||K(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==J]);const A=e=>{P(t=>t.filter((t,o)=>o!==e))},E=z>0,Q=z<R.length-1,B=U.some(e=>e.url===w),V="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
1
+ import{InputEndActionButton as e}from"./chunk-GS74BABV.js";import"./chunk-UBQUXUD2.js";import"./chunk-34AHNPW7.js";import"./chunk-AYZY3YNC.js";import"./chunk-LE5LWALR.js";import{peekBrowserStartUrl as t,claimBrowserStartUrl as o}from"./chunk-LWLCNQY7.js";import{AboutApp as r}from"./chunk-AD27M3ZH.js";import{WindowTitle as n}from"./chunk-JGWUSJDD.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import{confirm as s}from"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import"./chunk-3N2MNOV5.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CR3YDABU.js";import"./chunk-3PZI2C4R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-YXSGMPNW.js";import"./chunk-FZM3ZPW3.js";import"./chunk-CDAJKLGL.js";import"./chunk-4TB4CSLB.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EOVXFXVV.js";import"./chunk-UQYNPYF4.js";import"./chunk-TE6R53YD.js";import{Icon as a}from"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-WGLHB6WE.js";import"./chunk-NJN5IKWO.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import{useRef as i,useEffect as l,useState as c}from"react";import{jsxs as m,jsx as u,Fragment as h}from"react/jsx-runtime";var d="react-os-shell:browser-bookmarks",p="react-os-shell:browser-homepage",k="https://en.wikipedia.org/wiki/Main_Page",b=[{label:"Wikipedia",url:"https://en.wikipedia.org/wiki/Main_Page"},{label:"DevDocs",url:"https://devdocs.io"},{label:"Example",url:"https://example.com"}],g=new Set(["ac ad ae af ag ai al am ao aq ar as at au aw ax az ba bb bd be bf bg bh bi","bj bm bn bo br bs bt bw by bz ca cc cd cf cg ch ci ck cl cm cn co cr cu cv","cw cx cy cz de dj dk dm do dz ec ee eg er es et eu fi fj fk fm fo fr ga gd","ge gf gg gh gi gl gm gn gp gq gr gs gt gu gw gy hk hm hn hr ht hu id ie il","im in io iq ir is it je jm jo jp ke kg kh ki km kn kp kr kw ky kz la lb lc","li lk lr ls lt lu lv ly ma mc md me mg mh mk ml mm mn mo mp mq mr ms mt mu","mv mw mx my mz na nc ne nf ng ni nl no np nr nu nz om pa pe pf pg ph pk pl","pm pn pr ps pt pw py qa re ro rs ru rw sa sb sc sd se sg sh si sk sl sm sn","so sr ss st su sv sx sy sz tc td tf tg th tj tk tl tm tn to tr tt tv tw tz","ua ug uk us uy uz va vc ve vg vi vn vu wf ws ye yt za zm zw","com net org edu gov mil int info biz name pro app dev xyz online site tech","store shop cloud design digital agency studio media news blog live life","world today email systems solutions services software page link space host","press wiki team group works careers finance capital energy academy"].join(" ").split(" "));function f(e){let t=e.trim();return t?/^[a-z][a-z0-9+.-]*:\/\//i.test(t)?t:function(e){const t=/^([\w-]+\.)+([a-z]{2,})(\/.*)?$/i.exec(e);return null!==t&&g.has(t[2].toLowerCase())}(t)?"https://"+t:"https://duckduckgo.com/?q="+encodeURIComponent(t):""}var w=["duckduckgo.com","developer.mozilla.org","google.com","gmail.com","youtube.com","facebook.com","instagram.com","whatsapp.com","twitter.com","x.com","github.com","gitlab.com","linkedin.com","reddit.com","pinterest.com","amazon.com","amazon.ca","amazon.co.uk","apple.com","icloud.com","microsoft.com","outlook.com","live.com","office.com","netflix.com","spotify.com","paypal.com","stripe.com","chat.openai.com","chatgpt.com","claude.ai"];function x(){if("undefined"==typeof window)return b;try{const e=localStorage.getItem(d);if(!e)return b;const t=JSON.parse(e);if(Array.isArray(t)&&t.every(e=>"string"==typeof e?.url))return t}catch{}return b}function y(){return"undefined"==typeof window?k:localStorage.getItem(p)||k}function v(){const h=i(void 0);void 0===h.current&&(h.current=t()),l(()=>{null!=h.current&&o(h.current)},[]);const k=h.current?f(h.current.url):"",[b,g]=c(y),[w,v]=c(k||b),[C,W]=c(w),[R,D]=c([w]),[L,z]=c(0),[S,U]=c(0),[H,M]=c(x),[O,P]=c(!1),[B,E]=c(null),T=i(null),J=i(null);l(()=>{try{localStorage.setItem(d,JSON.stringify(H))}catch{}},[H]);const K=e=>{const t=f(e);t&&(v(t),W(t),D(e=>{const o=e.slice(0,L+1);return o.push(t),o}),z(e=>e+1),P(!1))},X=()=>{"undefined"!=typeof window&&window.open(w,"_blank","noopener,noreferrer")},Y=()=>{const e=B?.trim();e?(M(t=>[...t,{label:e,url:w}]),E(null)):E(null)};l(()=>{if(null===B)return;T.current?.focus(),T.current?.select();const e=e=>{const t=e.target;t?.closest("[data-bookmark-popover]")||E(null)},t=setTimeout(()=>document.addEventListener("mousedown",e),0);return()=>{clearTimeout(t),document.removeEventListener("mousedown",e)}},[null!==B]);const A=e=>{M(t=>t.filter((t,o)=>o!==e))},F=L>0,G=L<R.length-1,V=H.some(e=>e.url===w),Z="p-2 rounded hover:bg-gray-200 transition-colors text-gray-600 disabled:opacity-30";/* @__PURE__ */
2
2
  return m("div",{className:"relative flex flex-col h-full bg-white",children:[
3
3
  /* @__PURE__ */u(n,{title:`Browser - ${N(w)}`}),
4
4
  /* @__PURE__ */u(r,{app:"browser"}),
5
5
  /* @__PURE__ */m("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0",children:[
6
- /* @__PURE__ */u("button",{onClick:()=>{if(z>0){const e=z-1;D(e),v(R[e]),W(R[e]),T(!1)}},disabled:!E,className:V,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
- /* @__PURE__ */u("button",{onClick:()=>{if(z<R.length-1){const e=z+1;D(e),v(R[e]),W(R[e]),T(!1)}},disabled:!Q,className:V,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
- /* @__PURE__ */u("button",{onClick:()=>O(e=>e+1),className:V,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
- /* @__PURE__ */u("button",{onClick:()=>F(b),className:V,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
- /* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),F(C)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */m("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
6
+ /* @__PURE__ */u("button",{onClick:()=>{if(L>0){const e=L-1;z(e),v(R[e]),W(R[e]),P(!1)}},disabled:!F,className:Z,title:"Back",children:/* @__PURE__ */u(a,{name:"chevron-left",className:"h-4 w-4",strokeWidth:2})}),
7
+ /* @__PURE__ */u("button",{onClick:()=>{if(L<R.length-1){const e=L+1;z(e),v(R[e]),W(R[e]),P(!1)}},disabled:!G,className:Z,title:"Forward",children:/* @__PURE__ */u(a,{name:"chevron-right",className:"h-4 w-4",strokeWidth:2})}),
8
+ /* @__PURE__ */u("button",{onClick:()=>U(e=>e+1),className:Z,title:"Refresh",children:/* @__PURE__ */u(a,{name:"refresh",className:"h-4 w-4",strokeWidth:1.8})}),
9
+ /* @__PURE__ */u("button",{onClick:()=>K(b),className:Z,title:"Home",children:/* @__PURE__ */u(a,{name:"home",className:"h-4 w-4",strokeWidth:1.8})}),
10
+ /* @__PURE__ */u("form",{onSubmit:e=>{e.preventDefault(),K(C)},className:"flex-1 flex items-center mx-1",children:/* @__PURE__ */m("div",{className:"flex items-center w-full bg-white border border-gray-300 rounded focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-200",children:[
11
11
  /* @__PURE__ */u("span",{className:"px-2 text-gray-400 text-xs",children:w.startsWith("https://")?"🔒":"⚠️"}),
12
12
  /* @__PURE__ */u("input",{type:"text",value:C,onChange:e=>W(e.target.value),onFocus:e=>e.target.select(),className:"flex-1 px-1 py-1 text-sm bg-transparent outline-none font-mono",spellCheck:!1,placeholder:"Enter URL or search…"}),w!==C&&
13
13
  /* @__PURE__ */u("span",{className:"flex pr-1",children:/* @__PURE__ */u(e,{action:{label:"Reset to current URL",icon:/* @__PURE__ */u(a,{name:"close"}),onClick:()=>W(w)}})})]})}),
14
- /* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>B?A(U.findIndex(e=>e.url===w)):void K(N(w)),className:V+" "+(B?"text-yellow-500":""),title:B?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:B?"currentColor":"none",strokeWidth:1.5})}),
15
- /* @__PURE__ */u("button",{onClick:X,className:V,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
16
- /* @__PURE__ */u("button",{onClick:()=>T(e=>!e),className:V,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==J&&/* @__PURE__ */m("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
14
+ /* @__PURE__ */u("button",{"data-bookmark-popover":!0,onClick:()=>V?A(H.findIndex(e=>e.url===w)):void E(N(w)),className:Z+" "+(V?"text-yellow-500":""),title:V?"Remove bookmark":"Add bookmark",children:/* @__PURE__ */u(a,{name:"star",className:"h-4 w-4",fill:V?"currentColor":"none",strokeWidth:1.5})}),
15
+ /* @__PURE__ */u("button",{onClick:X,className:Z,title:"Open in new tab",children:/* @__PURE__ */u(a,{name:"external",className:"h-4 w-4",strokeWidth:1.5})}),
16
+ /* @__PURE__ */u("button",{onClick:()=>P(e=>!e),className:Z,title:"Embedding help",children:/* @__PURE__ */u(a,{name:"help",className:"h-4 w-4",strokeWidth:1.5})})]}),null!==B&&/* @__PURE__ */m("div",{"data-bookmark-popover":!0,className:"absolute right-3 top-12 z-30 w-72 bg-white border border-gray-200 rounded-md shadow-lg p-3",children:[
17
17
  /* @__PURE__ */u("div",{className:"text-2xs font-semibold uppercase tracking-wide text-ink-faint mb-1",children:"Bookmark this page"}),
18
18
  /* @__PURE__ */u("div",{className:"text-2xs text-ink-faintest truncate mb-2 font-mono",title:w,children:w}),
19
- /* @__PURE__ */u("input",{ref:M,type:"text",value:J,onChange:e=>K(e.target.value),onKeyDown:e=>{"Enter"===e.key?Y():"Escape"===e.key&&K(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
19
+ /* @__PURE__ */u("input",{ref:T,type:"text",value:B,onChange:e=>E(e.target.value),onKeyDown:e=>{"Enter"===e.key?Y():"Escape"===e.key&&E(null)},placeholder:"Name",className:"w-full text-sm px-2 h-8 border border-line-strong rounded focus:outline-none focus:border-blue-400 focus:ring-1 focus:ring-blue-200"}),
20
20
  /* @__PURE__ */m("div",{className:"flex justify-end gap-1 mt-2",children:[
21
- /* @__PURE__ */u("button",{onClick:()=>K(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
22
- /* @__PURE__ */u("button",{onClick:Y,disabled:!J.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
23
- /* @__PURE__ */m("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===U.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),U.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>F(e.url),onContextMenu:async o=>{o.preventDefault();await s({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&A(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
21
+ /* @__PURE__ */u("button",{onClick:()=>E(null),className:"px-2 py-1 text-xs text-gray-600 hover:bg-gray-100 rounded",children:"Cancel"}),
22
+ /* @__PURE__ */u("button",{onClick:Y,disabled:!B.trim(),className:"px-2 py-1 text-xs bg-blue-500 text-white rounded hover:bg-blue-600 disabled:opacity-40",children:"Save"})]})]}),
23
+ /* @__PURE__ */m("div",{className:"flex items-center gap-0.5 px-2 py-1 border-b border-gray-200 bg-white shrink-0 overflow-x-auto",children:[0===H.length&&/* @__PURE__ */u("span",{className:"text-2xs text-ink-faintest italic px-2",children:"No bookmarks yet — star the address bar to add one."}),H.map((e,t)=>/* @__PURE__ */m("button",{onClick:()=>K(e.url),onContextMenu:async o=>{o.preventDefault();await s({title:"Remove bookmark",message:`"${e.label}" will be removed from your bookmarks.`,confirmLabel:"Remove",variant:"danger"})&&A(t)},className:"flex items-center gap-2 px-2 py-0.5 rounded text-xs text-ink hover:bg-gray-100 whitespace-nowrap",title:`${e.url}\n(right-click to remove)`,children:[
24
24
  /* @__PURE__ */u("img",{src:`https://icons.duckduckgo.com/ip3/${new URL(e.url).hostname}.ico`,alt:"",className:"h-3.5 w-3.5",onError:e=>{e.target.style.visibility="hidden"}}),e.label]},t)),
25
25
  /* @__PURE__ */u("div",{className:"flex-1"}),
26
26
  /* @__PURE__ */u("button",{onClick:()=>{g(w);try{localStorage.setItem(p,w)}catch{}},className:"px-2 py-0.5 text-2xs text-ink-faint hover:text-ink-strong",title:"Set current page as homepage",children:"Set as home"})]}),
27
- /* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(j,{url:w,iframeKey:H,iframeRef:G,openExternal:X,showHelp:S,dismissHelp:()=>T(!1)})})]})}function N(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function j({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:s}){const[i,d]=c(!1);l(()=>{d(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return w.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!i?/* @__PURE__ */u("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */m("div",{className:"max-w-md text-center",children:[
27
+ /* @__PURE__ */u("div",{className:"flex-1 relative min-h-0 bg-gray-50",children:/* @__PURE__ */u(j,{url:w,iframeKey:S,iframeRef:J,openExternal:X,showHelp:O,dismissHelp:()=>P(!1)})})]})}function N(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function j({url:e,iframeKey:t,iframeRef:o,openExternal:r,showHelp:n,dismissHelp:s}){const[i,d]=c(!1);l(()=>{d(!1)},[e]);return function(e){try{const t=new URL(e).hostname.toLowerCase();return w.some(e=>t===e||t.endsWith("."+e))}catch{return!1}}(e)&&!i?/* @__PURE__ */u("div",{className:"absolute inset-0 flex items-center justify-center bg-white p-8",children:/* @__PURE__ */m("div",{className:"max-w-md text-center",children:[
28
28
  /* @__PURE__ */u(a,{name:"no-symbol",className:"h-14 w-14 mx-auto text-gray-300 mb-3",strokeWidth:1.2}),
29
29
  /* @__PURE__ */m("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:[N(e)," can't be embedded"]}),
30
30
  /* @__PURE__ */m("p",{className:"text-sm text-gray-500 mb-4",children:["This site sends an ",
@@ -0,0 +1,29 @@
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-FD6XZRWA.js";import{useWidgetSettings as n}from"./chunk-JGWUSJDD.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import"./chunk-3N2MNOV5.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CR3YDABU.js";import"./chunk-3PZI2C4R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-FZM3ZPW3.js";import"./chunk-CDAJKLGL.js";import"./chunk-4TB4CSLB.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EOVXFXVV.js";import"./chunk-UQYNPYF4.js";import"./chunk-TE6R53YD.js";import{Icon as r}from"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-WGLHB6WE.js";import"./chunk-NJN5IKWO.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as l,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[j,N]=c(!1),[y,x]=c(""),[f,C]=c([]),[v,$]=c(!1),[W,D]=c(()=>e(h)),[T,E]=c(!1),[F,J]=c(W),R=i(null);n(o(()=>{J({...W}),E(!0)},[W]));const B=o(e=>{x(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),O=o(()=>{k("0"),d(null),g(null),N(!1)},[]),S=o((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),X=o(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=S(p,t,b);k(String(e)),d(e),C(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,S]),w=o(()=>{if(null===p||!b)return;const e=parseFloat(m),t=S(p,e,b),n=`${p} ${b} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,S]),K=o(()=>{k(e=>String(parseFloat(e)/100))},[]),M=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?B(e.key):"."===e.key?B("."):"+"===e.key?X("+"):"-"===e.key?X("-"):"*"===e.key?X("×"):"/"===e.key?(e.preventDefault(),X("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&R.current?.contains(e.target)&&e.preventDefault(),w()):"Escape"===e.key?O():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&K())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[B,X,w,O,K]);const L="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",P=`${L} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,U=`${L} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,V=`${L} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Z=`${L} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
+ return l(a,{children:[
3
+ /* @__PURE__ */l("div",{ref:R,className:"flex flex-col h-full",style:{opacity:W.activeOpacity/100,backdropFilter:W.activeBlur>0?`blur(${W.activeBlur}px)`:void 0},children:[
4
+ /* @__PURE__ */l("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
+ /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:f.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${j?"":m}`}),
6
+ /* @__PURE__ */l("div",{className:"flex items-center gap-2",children:[
7
+ /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
+ /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
+ /* @__PURE__ */l("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
+ /* @__PURE__ */u("button",{onClick:O,className:V,children:"AC"}),
11
+ /* @__PURE__ */u("button",{onClick:M,className:V,children:"+/−"}),
12
+ /* @__PURE__ */u("button",{onClick:K,className:V,children:"%"}),
13
+ /* @__PURE__ */u("button",{onClick:()=>X("÷"),className:`${U} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
+ /* @__PURE__ */u("button",{onClick:()=>B("7"),className:P,children:"7"}),
15
+ /* @__PURE__ */u("button",{onClick:()=>B("8"),className:P,children:"8"}),
16
+ /* @__PURE__ */u("button",{onClick:()=>B("9"),className:P,children:"9"}),
17
+ /* @__PURE__ */u("button",{onClick:()=>X("×"),className:`${U} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
+ /* @__PURE__ */u("button",{onClick:()=>B("4"),className:P,children:"4"}),
19
+ /* @__PURE__ */u("button",{onClick:()=>B("5"),className:P,children:"5"}),
20
+ /* @__PURE__ */u("button",{onClick:()=>B("6"),className:P,children:"6"}),
21
+ /* @__PURE__ */u("button",{onClick:()=>X("-"),className:`${U} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
+ /* @__PURE__ */u("button",{onClick:()=>B("1"),className:P,children:"1"}),
23
+ /* @__PURE__ */u("button",{onClick:()=>B("2"),className:P,children:"2"}),
24
+ /* @__PURE__ */u("button",{onClick:()=>B("3"),className:P,children:"3"}),
25
+ /* @__PURE__ */u("button",{onClick:()=>X("+"),className:`${U} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
+ /* @__PURE__ */u("button",{onClick:()=>B("0"),className:`${P} col-span-2`,children:"0"}),
27
+ /* @__PURE__ */u("button",{onClick:()=>B("."),className:P,children:"."}),
28
+ /* @__PURE__ */u("button",{onClick:w,className:Z,children:"="})]})]}),
29
+ /* @__PURE__ */u(t,{open:T,onClose:()=>E(!1),title:"Calculator Settings",appearance:F,onAppearanceChange:J,onSave:()=>{D(F),localStorage.setItem(h,JSON.stringify(F)),E(!1)}})]})}export{m as default};
@@ -1,21 +1,21 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-QEDVXD3L.js";import{useWidgetSettings as r}from"./chunk-CLAKVFOB.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import"./chunk-PDXOGPWH.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CT7AU2TA.js";import"./chunk-3PZI2C4R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-JPNAEN53.js";import"./chunk-CDAJKLGL.js";import"./chunk-3ZRYKZGI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-7DI3VQCF.js";import"./chunk-UQYNPYF4.js";import"./chunk-XWFLIGDQ.js";import"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as i,Fragment as a,jsx as m}from"react/jsx-runtime";var l=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function k(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function g(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function j(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var N={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(j),[f,x]=s(()=>t(h)),[D,y]=s({}),[b,C]=s(!1),[S,v]=s(!1),[J,U]=s([]),[P,R]=s(f),[B,O]=s("USD"),[A,K]=s("CNY");r(o(()=>{U([...u]),R({...f}),v(!0)},[u,f])),c(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){C(!0);const r={};for(const e of t){const t=k(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,g(e,n.rates))}catch{}}e&&(y(r),C(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
1
+ import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-FD6XZRWA.js";import{useWidgetSettings as r}from"./chunk-JGWUSJDD.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-PMKBWDXO.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-OLJUPBY4.js";import"./chunk-2XOH3NJZ.js";import"./chunk-R7KRBKFH.js";import"./chunk-3N2MNOV5.js";import"./chunk-3DVNXNTF.js";import"./chunk-YOXR3VKO.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-CR3YDABU.js";import"./chunk-3PZI2C4R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-FZM3ZPW3.js";import"./chunk-CDAJKLGL.js";import"./chunk-4TB4CSLB.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EOVXFXVV.js";import"./chunk-UQYNPYF4.js";import"./chunk-TE6R53YD.js";import"./chunk-7V32O5NF.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-WGLHB6WE.js";import"./chunk-NJN5IKWO.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TWVUQUUD.js";import"./chunk-5YP7MFPK.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as o,useEffect as c}from"react";import{jsxs as i,Fragment as a,jsx as m}from"react/jsx-runtime";var l=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function k(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function g(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function N(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var j={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function f(){const[u,d]=s(N),[f,x]=s(()=>t(h)),[y,D]=s({}),[b,S]=s(!1),[v,C]=s(!1),[J,U]=s([]),[R,B]=s(f),[O,P]=s("USD"),[W,K]=s("CNY");r(o(()=>{U([...u]),B({...f}),C(!0)},[u,f])),c(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){S(!0);const r={};for(const e of t){const t=k(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,g(e,n.rates))}catch{}}e&&(D(r),S(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
2
2
  return i(a,{children:[
3
- /* @__PURE__ */m("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${f.activeOpacity/100})`,backdropFilter:f.activeBlur>0?`blur(${f.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3 space-y-1",children:[b&&/* @__PURE__ */m(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=D[t]?.[e];/* @__PURE__ */
3
+ /* @__PURE__ */m("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${f.activeOpacity/100})`,backdropFilter:f.activeBlur>0?`blur(${f.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3 space-y-1",children:[b&&/* @__PURE__ */m(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=y[t]?.[e];/* @__PURE__ */
4
4
  return i("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),localStorage.setItem(p,JSON.stringify(t))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
5
5
  /* @__PURE__ */i("div",{className:"flex items-center gap-2",children:[
6
- /* @__PURE__ */m("span",{className:"text-base",children:N[t]||""}),
6
+ /* @__PURE__ */m("span",{className:"text-base",children:j[t]||""}),
7
7
  /* @__PURE__ */m("span",{className:"text-sm font-semibold text-gray-700",children:t}),
8
8
  /* @__PURE__ */m("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */m("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
9
- /* @__PURE__ */m("span",{className:"text-base",children:N[e]||""}),
9
+ /* @__PURE__ */m("span",{className:"text-base",children:j[e]||""}),
10
10
  /* @__PURE__ */m("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
11
11
  /* @__PURE__ */m("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${t}-${e}-${r}`)})]})}),
12
- /* @__PURE__ */m(e,{open:S,onClose:()=>v(!1),title:"Currency Settings",appearance:P,onAppearanceChange:R,onSave:()=>{if(0===J.length)return;const t=J.slice(0,4);d(t),x(P),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(P)),v(!1)},children:/* @__PURE__ */i("div",{children:[
12
+ /* @__PURE__ */m(e,{open:v,onClose:()=>C(!1),title:"Currency Settings",appearance:R,onAppearanceChange:B,onSave:()=>{if(0===J.length)return;const t=J.slice(0,4);d(t),x(R),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(R)),C(!1)},children:/* @__PURE__ */i("div",{children:[
13
13
  /* @__PURE__ */i("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Currency Pairs ",
14
14
  /* @__PURE__ */i("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",J.length,"/",4,")"]})]}),
15
15
  /* @__PURE__ */m("div",{className:"space-y-1 mb-2",children:J.map(([t,e],r)=>/* @__PURE__ */i("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
16
- /* @__PURE__ */i("span",{className:"text-sm",children:[N[t]||""," ",t," → ",N[e]||""," ",e]}),
16
+ /* @__PURE__ */i("span",{className:"text-sm",children:[j[t]||""," ",t," → ",j[e]||""," ",e]}),
17
17
  /* @__PURE__ */m("button",{onClick:()=>U(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),J.length<4?/* @__PURE__ */i("div",{className:"flex items-center gap-2",children:[
18
- /* @__PURE__ */m("select",{value:B,onChange:t=>O(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
18
+ /* @__PURE__ */m("select",{value:O,onChange:t=>P(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
19
19
  /* @__PURE__ */m("span",{className:"text-gray-400",children:"→"}),
20
- /* @__PURE__ */m("select",{value:A,onChange:t=>K(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
21
- /* @__PURE__ */m("button",{onClick:()=>{B!==A&&J.length<4&&U(t=>[...t,[B,A]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};
20
+ /* @__PURE__ */m("select",{value:W,onChange:t=>K(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:l.map(t=>/* @__PURE__ */m("option",{children:t},t))}),
21
+ /* @__PURE__ */m("button",{onClick:()=>{O!==W&&J.length<4&&U(t=>[...t,[O,W]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{f as default};