@fde-desktop/fde-core 0.4.8 → 0.4.9

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 (250) hide show
  1. package/dist/{AccordionChevron-CJXAq5o5.js → AccordionChevron-DxpOyInK.js} +1 -1
  2. package/dist/AccordionChevron-kn5kSrEc.cjs +1 -0
  3. package/dist/{ActionIcon-CtVbYlGY.js → ActionIcon-Drh4p6Fv.js} +32 -32
  4. package/dist/ActionIcon-alk2zZD6.cjs +1 -0
  5. package/dist/AppEmptyState-BWCUbf-B.cjs +1 -0
  6. package/dist/AppEmptyState-Bxpit0JV.js +49 -0
  7. package/dist/AppIcon-BU7a3ZNH.cjs +1 -0
  8. package/dist/{AppIcon-DCDuaU-t.js → AppIcon-XumS3bIG.js} +4 -4
  9. package/dist/AppMenuBar-B9U0n1Vv.cjs +1 -0
  10. package/dist/AppMenuBar-CnIEVjr8.js +2049 -0
  11. package/dist/{Box-DRm8EabO.js → Box-DSKR_qaa.js} +257 -271
  12. package/dist/Box-zW6Twge8.cjs +1 -0
  13. package/dist/Button-DMlnrqyx.cjs +1 -0
  14. package/dist/{Button-k7SxX1Xl.js → Button-wTOTQKxF.js} +38 -38
  15. package/dist/CalendarApp-B_e1B1Yn.cjs +1 -0
  16. package/dist/CalendarApp-C-l9D6nd.cjs +1 -0
  17. package/dist/CalendarApp-D0ftTCTG.js +1399 -0
  18. package/dist/{Center-CyryG5zn.js → Center-CmxXB9ql.js} +1 -1
  19. package/dist/Center-DKUE2pER.cjs +1 -0
  20. package/dist/CheckIcon-CZhtJD1O.cjs +1 -0
  21. package/dist/{CheckIcon-C3WjIR2i.js → CheckIcon-N5qBqXQJ.js} +1 -1
  22. package/dist/CodeServerApp-BOoGwZ7r.cjs +1 -0
  23. package/dist/CodeServerApp-Be3I5EGg.cjs +1 -0
  24. package/dist/{CodeServerApp-DY94cy1a.js → CodeServerApp-DW18EZxa.js} +48 -47
  25. package/dist/{ColorPicker-DvRR-wlQ.js → ColorPicker-BCNqi02x.js} +364 -364
  26. package/dist/ColorPicker-BrDE7tMO.cjs +1 -0
  27. package/dist/CreateItemApp-B12M1E_1.cjs +1 -0
  28. package/dist/{CreateItemApp-CtdH1K1g.js → CreateItemApp-TAAprby3.js} +13 -13
  29. package/dist/CreateItemApp-ePB6ujNl.cjs +1 -0
  30. package/dist/DeviceInfoApp-BMF18BGo.cjs +1 -0
  31. package/dist/DeviceInfoApp-DRy0H3aT.cjs +1 -0
  32. package/dist/{DeviceInfoApp-C306YvtZ.js → DeviceInfoApp-lgpwkeRR.js} +7 -7
  33. package/dist/{DownloadProgress-hdupSUBT.js → DownloadProgress-EoyCaD5O.js} +15 -15
  34. package/dist/DownloadProgress-VNdj22U8.cjs +1 -0
  35. package/dist/{FileIcon-BCpGMI5U.js → FileIcon-7JaSR3Gn.js} +26 -25
  36. package/dist/FileIcon-CIXopWLv.cjs +1 -0
  37. package/dist/{FilePickerApp-DMGuvahM.js → FilePickerApp-DaMgEqKh.js} +115 -115
  38. package/dist/FilePickerApp-DjmuSFqa.cjs +1 -0
  39. package/dist/FilesApp-Bp7wfrBZ.cjs +1 -0
  40. package/dist/FilesApp-BpJJRKhi.cjs +1 -0
  41. package/dist/{FilesApp-VXrmtt63.js → FilesApp-Cj94QG5o.js} +21 -21
  42. package/dist/{Group-BzwlMeob.js → Group-CtBJSfCo.js} +1 -1
  43. package/dist/Group-Dsrf6lEK.cjs +1 -0
  44. package/dist/{ImageViewerApp-CWiP6zx-.js → ImageViewerApp-BaLP3gkO.js} +18 -17
  45. package/dist/ImageViewerApp-DlHGeB3S.cjs +1 -0
  46. package/dist/ImageViewerApp-DoXd_Swu.cjs +1 -0
  47. package/dist/{ImageViewerMenuBar-BULkh_Ku.js → ImageViewerMenuBar-CabGSi9r.js} +15 -14
  48. package/dist/ImageViewerMenuBar-SAI7UNz7.cjs +1 -0
  49. package/dist/ImageViewerMenuBar-_Jr29gii.cjs +1 -0
  50. package/dist/MenuEditApp-BJjlPTOa.cjs +1 -0
  51. package/dist/MenuEditApp-BTRppYnD.js +497 -0
  52. package/dist/MenuEditApp-JPsGT-S3.cjs +1 -0
  53. package/dist/MenuEditMenuBar-BydGkqMw.cjs +1 -0
  54. package/dist/MenuEditMenuBar-DptlwVPQ.cjs +1 -0
  55. package/dist/{MenuEditMenuBar-B94z4Umw.js → MenuEditMenuBar-x1IQrHP2.js} +13 -12
  56. package/dist/NotesApp-BOcRGO7w.cjs +1 -0
  57. package/dist/NotesApp-CQe7UfBC.js +364 -0
  58. package/dist/NotesApp-OL07JXRE.cjs +1 -0
  59. package/dist/NotesMenuBar-BSI_2Y7p.cjs +1 -0
  60. package/dist/NotesMenuBar-Df6aW85J.cjs +1 -0
  61. package/dist/{NotesMenuBar-BB4NkKGf.js → NotesMenuBar-VhpIe68v.js} +10 -9
  62. package/dist/{Paper-DtUYKmYn.js → Paper-BX_9odR6.js} +3 -3
  63. package/dist/Paper-D8-BaBx2.cjs +1 -0
  64. package/dist/PdfApp-CNEbty5v.cjs +1 -0
  65. package/dist/PdfApp-CVv3ZCaM.cjs +1 -0
  66. package/dist/PdfApp-DL_R9-Nc.js +39 -0
  67. package/dist/PdfMenuBar--E6kDyrT.cjs +1 -0
  68. package/dist/PdfMenuBar-DZCLSOpR.js +39 -0
  69. package/dist/PdfMenuBar-Dj5cJUkg.cjs +1 -0
  70. package/dist/SettingsApp-BlmHuAjT.js +1831 -0
  71. package/dist/SettingsApp-CNvIgf5B.cjs +1 -0
  72. package/dist/SettingsApp-DWxanNE4.cjs +1 -0
  73. package/dist/SettingsMenuBar-CBoOBCfx.cjs +1 -0
  74. package/dist/SettingsMenuBar-DQooFkZN.cjs +1 -0
  75. package/dist/SettingsMenuBar-YWiJHaxq.js +42 -0
  76. package/dist/Slider-BUiHxjKO.cjs +1 -0
  77. package/dist/{Slider-BNO-vDFn.js → Slider-t-NcD60t.js} +148 -147
  78. package/dist/{Stack-CuDEaP7e.js → Stack-Bp1Ek2Gp.js} +1 -1
  79. package/dist/Stack-D4jAiRfc.cjs +1 -0
  80. package/dist/StorybookApp-CDLV_kja.cjs +1 -0
  81. package/dist/{StorybookApp-WYninkJo.js → StorybookApp-DKwlPCmo.js} +1 -1
  82. package/dist/TerminalApp-BCB7i1lR.cjs +1 -0
  83. package/dist/TerminalApp-BYc_gHLe.js +326 -0
  84. package/dist/TerminalApp-Dviz6aP2.cjs +1 -0
  85. package/dist/{TerminalMenuBar-iKLydNda.js → TerminalMenuBar-D5tPmgR_.js} +15 -14
  86. package/dist/TerminalMenuBar-DNshPmCa.cjs +1 -0
  87. package/dist/TerminalMenuBar-HzMSR7XP.cjs +1 -0
  88. package/dist/{TextInput-C3qfxxWI.js → TextInput-C-JtGWn1.js} +264 -263
  89. package/dist/TextInput-CrsmcOip.cjs +1 -0
  90. package/dist/Tooltip-D5Cd9wtz.cjs +1 -0
  91. package/dist/Tooltip-DOeIvhrO.js +1142 -0
  92. package/dist/{UnstyledButton-CI3kyRck.js → UnstyledButton-DGaG-e_G.js} +1 -1
  93. package/dist/UnstyledButton-DX2pTahr.cjs +1 -0
  94. package/dist/UploaderApp-C6xA5Rrf2.cjs +1 -0
  95. package/dist/UploaderApp-DnHIRxB_.cjs +1 -0
  96. package/dist/{UploaderApp-C9W_yCT-.js → UploaderApp-qBfpukR_.js} +118 -117
  97. package/dist/VscIcon-CcMdrFoJ.cjs +1 -0
  98. package/dist/{VscIcon-DueRJVTe.js → VscIcon-DBfVnArE.js} +1 -1
  99. package/dist/create-safe-context-Bboj0GWC.cjs +1 -0
  100. package/dist/desktopStore-CZoA9VHO.cjs +1 -0
  101. package/dist/{desktopStore-B0R1-BeA.js → desktopStore-F8bgLqFl.js} +256 -393
  102. package/dist/getRuntime-BFK0-8R1.cjs +1 -0
  103. package/dist/{getRuntime-CCRXVzJH.js → getRuntime-DAPqFH2W.js} +5 -5
  104. package/dist/imageViewerStore-BB_tssZR.cjs +1 -0
  105. package/dist/{imageViewerStore-CJMRXaQh.js → imageViewerStore-C5kWz0o7.js} +1 -1
  106. package/dist/index.cjs +1 -53
  107. package/dist/index.css +1 -1
  108. package/dist/index.js +1293 -5468
  109. package/dist/is-element-CdV0xajp.cjs +1 -0
  110. package/dist/menuEditStore-CTeM_dns.cjs +1 -0
  111. package/dist/{menuEditStore-C8S_EedM.js → menuEditStore-Cj1zAwxQ.js} +1 -1
  112. package/dist/notesStore-BCEl1D_v.cjs +1 -0
  113. package/dist/{notesStore-DKRgTTFn.js → notesStore-BPyRTHEc.js} +1 -1
  114. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  115. package/dist/{settingsAppStore-KOeWRO6h.js → settingsAppStore-BDQ3ts1y.js} +1 -1
  116. package/dist/settingsAppStore-CMBc13VU.cjs +1 -0
  117. package/dist/{terminalStore-LWWjCvCe.js → terminalStore-IWdf4Mm6.js} +1 -1
  118. package/dist/terminalStore-iIuyodfK.cjs +1 -0
  119. package/dist/use-merged-ref-n9Gw9LNn.cjs +1 -0
  120. package/dist/{use-resolved-styles-api-AVDygMKo.cjs → use-resolved-styles-api-8OXE2oRq.cjs} +1 -1
  121. package/dist/{use-resolved-styles-api-pEOi2wiK.js → use-resolved-styles-api-DNUlJJZf.js} +1 -1
  122. package/dist/use-uncontrolled-DDJVQiM_.cjs +1 -0
  123. package/dist/{useAdaptiveDimensions-CunsU0mn.js → useAdaptiveDimensions-AVDc_qPa.js} +1 -1
  124. package/dist/useAdaptiveDimensions-CfITBJ_m.cjs +1 -0
  125. package/dist/{useCloseInterceptor-CuKAAFnj.js → useCloseInterceptor-BZd3VILp.js} +12 -12
  126. package/dist/useCloseInterceptor-yntBEzNc.cjs +1 -0
  127. package/dist/{useDynamicIcon-GJg3vWsJ.js → useDynamicIcon-Bf0t2foA.js} +1 -1
  128. package/dist/useDynamicIcon-DJ_il30E.cjs +1 -0
  129. package/dist/{useOpenApp-JHCPTBWa.js → useOpenApp-CBIm7Gzl.js} +3 -3
  130. package/dist/useOpenApp-DW4x79Zg.cjs +1 -0
  131. package/dist/useResolvedUrl-BkMPM1fM.cjs +1 -0
  132. package/dist/{useResolvedUrl-DFKXq598.js → useResolvedUrl-DQpLqOoL.js} +2 -2
  133. package/package.json +1 -1
  134. package/dist/AccordionChevron-DBXp38Lm.cjs +0 -1
  135. package/dist/ActionIcon-C_SfdBfx.cjs +0 -1
  136. package/dist/AppEmptyState-BTujnL_b.js +0 -4962
  137. package/dist/AppEmptyState-Dc4GaDfu.cjs +0 -1
  138. package/dist/AppIcon--qzR4sgf.cjs +0 -1
  139. package/dist/AppMenuBar-BiHbNg9V.cjs +0 -9
  140. package/dist/AppMenuBar-CHJy8OF0.js +0 -2639
  141. package/dist/Box-D_64wv6n.cjs +0 -1
  142. package/dist/Button-D0FXpkur.cjs +0 -1
  143. package/dist/CalendarApp-C1HvuJoa.cjs +0 -1
  144. package/dist/CalendarApp-DBEQqsS_.js +0 -1721
  145. package/dist/Center-T4No_FAa.cjs +0 -1
  146. package/dist/CheckIcon-CBMLR6Gc.cjs +0 -1
  147. package/dist/CodeServerApp-B3l5QPuG.cjs +0 -1
  148. package/dist/CodeServerApp-BpeALSaX.js +0 -2
  149. package/dist/CodeServerApp-CRjCngFv.cjs +0 -1
  150. package/dist/ColorPicker-BL4UbKCV.cjs +0 -1
  151. package/dist/CreateItemApp-BU9wmjKM.cjs +0 -1
  152. package/dist/CreateItemApp-t9F-a6wD.cjs +0 -1
  153. package/dist/DeviceInfoApp-Cdju_LIB.cjs +0 -1
  154. package/dist/DeviceInfoApp-CyB01v4D.cjs +0 -1
  155. package/dist/DownloadProgress-IRw1dzLX.cjs +0 -1
  156. package/dist/FileIcon-BCrsxmtt.cjs +0 -1
  157. package/dist/FilePickerApp-Eu0cr2Cm.cjs +0 -1
  158. package/dist/FilesApp-30OjnOuP.cjs +0 -1
  159. package/dist/FilesApp-BvlzPNuO.cjs +0 -1
  160. package/dist/Group-DhwePB84.cjs +0 -1
  161. package/dist/ImageViewerApp-BOz59TGc.cjs +0 -1
  162. package/dist/ImageViewerApp-BeqY6voE.cjs +0 -1
  163. package/dist/ImageViewerApp-DBAfJPSo.js +0 -2
  164. package/dist/ImageViewerMenuBar-Cb0Nr5-M.js +0 -2
  165. package/dist/ImageViewerMenuBar-CoEp0RxK.cjs +0 -1
  166. package/dist/ImageViewerMenuBar-zOkJtqKo.cjs +0 -1
  167. package/dist/MenuEditApp-BoKtj2GH.js +0 -2
  168. package/dist/MenuEditApp-D21sEp86.js +0 -2615
  169. package/dist/MenuEditApp-k3cPfTG9.cjs +0 -1
  170. package/dist/MenuEditApp-sz9GlLVH.cjs +0 -5
  171. package/dist/MenuEditMenuBar-6QxlIDpl.cjs +0 -1
  172. package/dist/MenuEditMenuBar-Bv6R42lf.js +0 -2
  173. package/dist/MenuEditMenuBar-CBsmH_-T.cjs +0 -1
  174. package/dist/NotesApp-BtR55Hva.cjs +0 -207
  175. package/dist/NotesApp-C59exz_9.js +0 -16154
  176. package/dist/NotesApp-D47I5LS_.js +0 -2
  177. package/dist/NotesApp-lOwsi2sg.cjs +0 -1
  178. package/dist/NotesMenuBar-BZITC74y.cjs +0 -1
  179. package/dist/NotesMenuBar-Bp0sPqyR.cjs +0 -1
  180. package/dist/NotesMenuBar-xlfODmMA.js +0 -2
  181. package/dist/Paper-DwCpwWwH.cjs +0 -1
  182. package/dist/PdfApp-1XbFGfoY.cjs +0 -1
  183. package/dist/PdfApp-BhIoJWeK.cjs +0 -1
  184. package/dist/PdfApp-C5Rt1Zaw.js +0 -2
  185. package/dist/PdfApp-C8Hwxxqh.js +0 -38
  186. package/dist/PdfMenuBar-BA9rKuMP.cjs +0 -1
  187. package/dist/PdfMenuBar-JXHqwxhZ.cjs +0 -1
  188. package/dist/PdfMenuBar-R0fu7oYF.js +0 -2
  189. package/dist/PdfMenuBar-sd-9Vk3h.js +0 -38
  190. package/dist/SettingsApp-BA-5B4RA.cjs +0 -1
  191. package/dist/SettingsApp-B_rev1xh.cjs +0 -1
  192. package/dist/SettingsApp-Ck4aUXs5.js +0 -2
  193. package/dist/SettingsApp-DUMKSA3K.js +0 -2425
  194. package/dist/SettingsMenuBar-BPwv8JQK.js +0 -41
  195. package/dist/SettingsMenuBar-D8R7hOik.js +0 -2
  196. package/dist/SettingsMenuBar-DDrjZLmg.cjs +0 -1
  197. package/dist/SettingsMenuBar-DQjUa8g1.cjs +0 -1
  198. package/dist/Slider-Bg_EIBg6.cjs +0 -1
  199. package/dist/Stack-BOaJgV3N.cjs +0 -1
  200. package/dist/StorybookApp-Bkr-7mXp.cjs +0 -1
  201. package/dist/TerminalApp-8XbsKAWa.js +0 -10041
  202. package/dist/TerminalApp-Bq2e7QQu.cjs +0 -1
  203. package/dist/TerminalApp-CVu3Axc9.js +0 -2
  204. package/dist/TerminalApp-b7_d0jRO.cjs +0 -36
  205. package/dist/TerminalMenuBar-Cb8x9laS.js +0 -2
  206. package/dist/TerminalMenuBar-De-FH5AE.cjs +0 -1
  207. package/dist/TerminalMenuBar-yOaWd-hn.cjs +0 -1
  208. package/dist/TextInput-DcYns3hz.cjs +0 -1
  209. package/dist/Tooltip-CAOO-qdx.js +0 -3185
  210. package/dist/Tooltip-DDh_x-CB.cjs +0 -1
  211. package/dist/UnstyledButton-Cl5RuIid.cjs +0 -1
  212. package/dist/UploaderApp-BZXW75A0.cjs +0 -1
  213. package/dist/UploaderApp-CPpStgP5.cjs +0 -1
  214. package/dist/UploaderApp-DHsMQN-f.js +0 -2
  215. package/dist/VscIcon-CxEmqD80.cjs +0 -1
  216. package/dist/chunk-BQCxAhux.js +0 -23
  217. package/dist/chunk-CiTBaPhY.cjs +0 -1
  218. package/dist/create-safe-context-95P-Bfg3.cjs +0 -1
  219. package/dist/desktopStore-Cox-Og1z.cjs +0 -1
  220. package/dist/fc-DejOsQyD.cjs +0 -1
  221. package/dist/fc-kd8WzIER.js +0 -20536
  222. package/dist/fc-xJ_v2ayq.cjs +0 -184
  223. package/dist/fi-BahYsbim.js +0 -9993
  224. package/dist/fi-BkhyTcZo.cjs +0 -1
  225. package/dist/getRuntime-BLXyQZBB.cjs +0 -1
  226. package/dist/iconBase-B4UCuSvv.cjs +0 -1
  227. package/dist/iconBase-D7iPes7B.js +0 -108
  228. package/dist/imageViewerStore-CH1qW6md.cjs +0 -1
  229. package/dist/is-element-BocgicRg.cjs +0 -1
  230. package/dist/menuEditStore-CU7IAg3L.cjs +0 -1
  231. package/dist/notesStore-zKmChTfF.cjs +0 -1
  232. package/dist/react-DYmzHD0X.js +0 -27
  233. package/dist/react-Dldg32sN.cjs +0 -1
  234. package/dist/settingsAppStore-BrlImdAH.cjs +0 -1
  235. package/dist/terminalStore-fZe5t7Ty.cjs +0 -1
  236. package/dist/use-merged-ref-BI9n1hUK.cjs +0 -1
  237. package/dist/use-uncontrolled-BPrfGv0W.cjs +0 -1
  238. package/dist/useAdaptiveDimensions-Btp0m5Pm.cjs +0 -1
  239. package/dist/useCloseInterceptor-a_6Lcuqj.cjs +0 -1
  240. package/dist/useDynamicIcon-SytdL1Tu.cjs +0 -1
  241. package/dist/useOpenApp-BdarhIgl.cjs +0 -1
  242. package/dist/useResolvedUrl-Be5ZlCX7.cjs +0 -1
  243. package/dist/useTranslation-DMRGdqZi.js +0 -279
  244. package/dist/useTranslation-D_O7S4RJ.cjs +0 -1
  245. package/dist/vsc-Ciibqbxo.cjs +0 -1
  246. package/dist/vsc-DGKSpOAR.js +0 -9574
  247. /package/dist/{Colors-hca6raEG.js → Colors-ClnDxnyA.js} +0 -0
  248. /package/dist/{Colors-BxX4G8kX.cjs → Colors-zP2AFgU3.cjs} +0 -0
  249. /package/dist/{useMenuBarUtils-Bp5PiztD.cjs → useMenuBarUtils-nJIPJGIQ.cjs} +0 -0
  250. /package/dist/{useMenuBarUtils-ChmpZjwu.js → useMenuBarUtils-nmu9yehT.js} +0 -0
package/dist/index.cjs CHANGED
@@ -1,53 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunk-CiTBaPhY.cjs`),t=require(`./CalendarApp-C1HvuJoa.cjs`),n=require(`./Box-D_64wv6n.cjs`),r=require(`./ColorPicker-BL4UbKCV.cjs`),i=require(`./create-safe-context-95P-Bfg3.cjs`),a=require(`./AppMenuBar-BiHbNg9V.cjs`),o=require(`./Tooltip-DDh_x-CB.cjs`),s=require(`./TextInput-DcYns3hz.cjs`),c=require(`./SettingsApp-B_rev1xh.cjs`),l=require(`./Slider-Bg_EIBg6.cjs`),u=require(`./CreateItemApp-BU9wmjKM.cjs`),d=require(`./DownloadProgress-IRw1dzLX.cjs`),f=require(`./UnstyledButton-Cl5RuIid.cjs`),p=require(`./Paper-DwCpwWwH.cjs`),m=require(`./ActionIcon-C_SfdBfx.cjs`),h=require(`./Group-DhwePB84.cjs`),g=require(`./getRuntime-BLXyQZBB.cjs`),_=require(`./FileIcon-BCrsxmtt.cjs`),v=require(`./Button-D0FXpkur.cjs`),y=require(`./AppIcon--qzR4sgf.cjs`),b=require(`./Center-T4No_FAa.cjs`),x=require(`./DeviceInfoApp-Cdju_LIB.cjs`),S=require(`./UploaderApp-CPpStgP5.cjs`),C=require(`./Stack-BOaJgV3N.cjs`),w=require(`./desktopStore-Cox-Og1z.cjs`),T=require(`./AppEmptyState-Dc4GaDfu.cjs`),E=require(`./useOpenApp-BdarhIgl.cjs`),D=require(`./useTranslation-D_O7S4RJ.cjs`),O=require(`./useDynamicIcon-SytdL1Tu.cjs`),k=require(`./useAdaptiveDimensions-Btp0m5Pm.cjs`),A=require(`./MenuEditApp-sz9GlLVH.cjs`),j=require(`./useCloseInterceptor-a_6Lcuqj.cjs`),M=require(`./VscIcon-CxEmqD80.cjs`),N=require(`./fc-xJ_v2ayq.cjs`),P=require(`./FilesApp-30OjnOuP.cjs`),F=require(`./useResolvedUrl-Be5ZlCX7.cjs`),I=require(`./NotesApp-BtR55Hva.cjs`),L=require(`./FilePickerApp-Eu0cr2Cm.cjs`),ee=require(`./Colors-BxX4G8kX.cjs`),R=require(`./ImageViewerApp-BeqY6voE.cjs`),te=require(`./PdfApp-BhIoJWeK.cjs`),ne=require(`./StorybookApp-Bkr-7mXp.cjs`);require(`./TerminalApp-b7_d0jRO.cjs`),require(`./CodeServerApp-CRjCngFv.cjs`);const z=require(`./useMenuBarUtils-Bp5PiztD.cjs`),re=require(`./NotesMenuBar-Bp0sPqyR.cjs`);require(`./TerminalMenuBar-yOaWd-hn.cjs`);const ie=require(`./MenuEditMenuBar-6QxlIDpl.cjs`),ae=require(`./SettingsMenuBar-DQjUa8g1.cjs`),oe=require(`./PdfMenuBar-JXHqwxhZ.cjs`),se=require(`./ImageViewerMenuBar-zOkJtqKo.cjs`);let B=require(`react`);B=e.a(B);let V=require(`react/jsx-runtime`),ce=require(`react-dom`);var le=(0,B.createContext)(void 0),ue={borderRadius:`8px`,headerHeight:40,minWidth:400,minHeight:300,defaultWidth:800,defaultHeight:600,shadow:`0 8px 32px rgba(0, 0, 0, 0.2)`},de={height:48,position:`bottom`,background:`rgba(0, 0, 0, 0.8)`,blur:!0},fe={light:{mode:`light`,colors:{desktop:`#f0f4f8`,taskbar:`rgba(255, 255, 255, 0.9)`,window:`#ffffff`,accent:`#339af0`},window:ue,taskbar:de,desktop:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,iconSize:64,iconSpacing:16}},dark:{mode:`dark`,colors:{desktop:`#1a1b1e`,taskbar:`rgba(26, 27, 30, 0.9)`,window:`#25262b`,accent:`#4dabf7`},window:ue,taskbar:de,desktop:{background:`linear-gradient(135deg, #1a1b1e 0%, #2d1f3d 100%)`,iconSize:64,iconSpacing:16}}};function pe({children:e,initialMode:t=`light`,mode:n,theme:r}){let[i,a]=(0,B.useState)(n??t),o=(0,B.useRef)(null);(0,B.useEffect)(()=>{n!==void 0&&n!==i&&a(n)},[n,i]);let s=(0,B.useCallback)(()=>{a(e=>e===`light`?`dark`:`light`)},[]),c=(0,B.useCallback)(e=>{o.current=e},[]),l=(0,B.useCallback)(()=>{let e=fe[i],t=o.current;return t?{...e,colors:{desktop:r?.colors?.desktop??e.colors.desktop,taskbar:t.taskbar,window:t.window,accent:t.accent},window:{...e.window,...r?.window},taskbar:{...e.taskbar,...r?.taskbar},desktop:{...e.desktop,...r?.desktop}}:r?{mode:r.mode??e.mode,colors:{desktop:r.colors?.desktop??e.colors.desktop,taskbar:r.colors?.taskbar??e.colors.taskbar,window:r.colors?.window??e.colors.window,accent:r.colors?.accent??e.colors.accent},window:{...e.window,...r.window},taskbar:{...e.taskbar,...r.taskbar},desktop:{...e.desktop,...r.desktop}}:e},[i,r]);(0,B.useEffect)(()=>{document.documentElement.style.setProperty(`color-scheme`,i),document.documentElement.setAttribute(`data-mantine-color-scheme`,i)},[i]);let u=(0,B.useMemo)(()=>({getTheme:l,setMode:a,toggle:s,setCustomColors:c}),[l,a,s,c]);return(0,V.jsx)(le.Provider,{value:u,children:e})}function me(){let e=(0,B.useContext)(le);if(!e)throw Error(`useTheme must be used within a ThemeProvider`);return e.getTheme()}function he(){let e=(0,B.useContext)(le);if(!e)throw Error(`useThemeContext must be used within a ThemeProvider`);return e}function ge(e,t,n){let r=(0,B.useEffectEvent)(t);(0,B.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function _e(e){return e===`auto`||e===`dark`||e===`light`}function ve({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return _e(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&_e(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function ye(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function be({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,B.useRef)(null),[a,o]=(0,B.useState)(()=>e.get(t)),c=r||a,l=(0,B.useCallback)(t=>{r||(ye(t,n),o(t),e.set(t))},[e.set,c,r]),u=(0,B.useCallback)(()=>{o(t),ye(t,n),e.clear()},[e.clear,t]);return(0,B.useEffect)(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),s.f(()=>{ye(e.get(t),n)},[]),(0,B.useEffect)(()=>{if(r)return ye(r,n),()=>{};r===void 0&&ye(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&ye(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:c,setColorScheme:l,clearColorScheme:u}}function xe(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function Se(e,t){let n=t?[t]:[`:root`,`:host`],r=xe(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=xe(e.dark),o=xe(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function Ce({theme:e,color:t,colorScheme:r,name:i=t,withColorValues:a=!0}){if(!e.colors[t])return{};if(r===`light`){let r=n.w(e,`light`),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${r})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${r===9?8:r+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${r})`,[`--mantine-color-${i}-outline-hover`]:n._(e.colors[t][r],.05)};return a?{[`--mantine-color-${i}-0`]:e.colors[t][0],[`--mantine-color-${i}-1`]:e.colors[t][1],[`--mantine-color-${i}-2`]:e.colors[t][2],[`--mantine-color-${i}-3`]:e.colors[t][3],[`--mantine-color-${i}-4`]:e.colors[t][4],[`--mantine-color-${i}-5`]:e.colors[t][5],[`--mantine-color-${i}-6`]:e.colors[t][6],[`--mantine-color-${i}-7`]:e.colors[t][7],[`--mantine-color-${i}-8`]:e.colors[t][8],[`--mantine-color-${i}-9`]:e.colors[t][9],...o}:o}let o=n.w(e,`dark`),s={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${o})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${o===9?8:o+1})`,[`--mantine-color-${i}-light`]:n.b(e.colors[t][9],.5),[`--mantine-color-${i}-light-hover`]:n.b(e.colors[t][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(o-4,0)})`,[`--mantine-color-${i}-outline-hover`]:n._(e.colors[t][Math.max(o-4,0)],.05)};return a?{[`--mantine-color-${i}-0`]:e.colors[t][0],[`--mantine-color-${i}-1`]:e.colors[t][1],[`--mantine-color-${i}-2`]:e.colors[t][2],[`--mantine-color-${i}-3`]:e.colors[t][3],[`--mantine-color-${i}-4`]:e.colors[t][4],[`--mantine-color-${i}-5`]:e.colors[t][5],[`--mantine-color-${i}-6`]:e.colors[t][6],[`--mantine-color-${i}-7`]:e.colors[t][7],[`--mantine-color-${i}-8`]:e.colors[t][8],[`--mantine-color-${i}-9`]:e.colors[t][9],...s}:s}function we(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Te(e,t,r){n.z(t).forEach(n=>Object.assign(e,{[`--mantine-${r}-${n}`]:t[n]}))}var Ee=e=>{let t=n.w(e,`light`),r=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:n.L(e.defaultRadius),i={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":d.a(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":d.a(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};Te(i.variables,e.breakpoints,`breakpoint`),Te(i.variables,e.spacing,`spacing`),Te(i.variables,e.fontSizes,`font-size`),Te(i.variables,e.lineHeights,`line-height`),Te(i.variables,e.shadows,`shadow`),Te(i.variables,e.radius,`radius`),Te(i.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{i.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),n.z(e.colors).forEach(t=>{let n=e.colors[t];if(we(n)){Object.assign(i.light,Ce({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(i.dark,Ce({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0}));return}n.forEach((e,n)=>{i.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(i.light,Ce({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(i.dark,Ce({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let a=e.headings.sizes;return n.z(a).forEach(t=>{i.variables[`--mantine-${t}-font-size`]=a[t].fontSize,i.variables[`--mantine-${t}-line-height`]=a[t].lineHeight,i.variables[`--mantine-${t}-font-weight`]=a[t].fontWeight||e.headings.fontWeight}),i};function De(){let e=n.d(),t=n.g(),i=n.z(e.breakpoints).reduce((t,i)=>{let a=e.breakpoints[i].includes(`px`),o=r.r(e.breakpoints[i]);return`${t}@media (max-width: ${a?`${o-.1}px`:n.I(o-.1)}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${a?`${o}px`:n.I(o)}) {.mantine-hidden-from-${i} {display: none !important;}}`},``);return(0,V.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:i}})}function Oe({theme:e,generator:t}){let r=Ee(e),i=t?.(e);return i?n.R(r,i):r}var ke=Ee(n.f);function Ae(e){let t={variables:{},light:{},dark:{}};return n.z(e.variables).forEach(n=>{ke.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),n.z(e.light).forEach(n=>{ke.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),n.z(e.dark).forEach(n=>{ke.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function je(e){return Se({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Me({cssVariablesSelector:e,deduplicateCssVariables:t}){let r=n.d(),i=n.g(),a=Oe({theme:r,generator:n.m()}),o=(e===void 0||e===`:root`||e===`:host`)&&t,s=Se(o?Ae(a):a,e);return s?(0,V.jsx)(`style`,{"data-mantine-styles":!0,nonce:i?.(),dangerouslySetInnerHTML:{__html:`${s}${o?``:je(e)}`}}):null}Me.displayName=`@mantine/CssVariables`;function Ne({respectReducedMotion:e,getRootElement:t}){s.f(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function Pe({theme:e,children:t,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:a=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:c,classNamesPrefix:l=`mantine`,colorSchemeManager:u=ve(),defaultColorScheme:d=`light`,getRootElement:f=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:m,stylesTransform:h,env:g}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=be({defaultColorScheme:d,forceColorScheme:m,manager:u,getRootElement:f});return Ne({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:f}),(0,V.jsx)(n.p,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:f,classNamesPrefix:l,getStyleNonce:r,cssVariablesResolver:p,cssVariablesSelector:c??`:root`,withStaticClasses:i,stylesTransform:h,env:g},children:(0,V.jsxs)(n.u,{theme:e,children:[s&&(0,V.jsx)(Me,{cssVariablesSelector:c,deduplicateCssVariables:o}),a&&(0,V.jsx)(De,{}),t]})})}Pe.displayName=`@mantine/core/MantineProvider`;function Fe({children:e,theme:t,env:r}){return(0,V.jsx)(n.p,{value:{colorScheme:`auto`,setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:`mantine`,cssVariablesSelector:`:root`,withStaticClasses:!1,headless:!0,env:r},children:(0,V.jsx)(n.u,{theme:t,children:e})})}Fe.displayName=`@mantine/core/HeadlessMantineProvider`;function Ie(e){return e}var[Le,H]=i.t(`ModalBase component was not found in tree`);function Re({opened:e,transitionDuration:t}){let[n,r]=(0,B.useState)(e),i=(0,B.useRef)(-1),a=s.l()?0:t;return(0,B.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function ze({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:c}){let l=s.u(e),[u,d]=(0,B.useState)(!1),[f,p]=(0,B.useState)(!1),m=Re({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return ge(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&a()},{capture:!0}),o.p({opened:n,shouldReturnFocus:r&&c}),{_id:l,titleMounted:u,bodyMounted:f,shouldLockScroll:m,setTitleMounted:d,setBodyMounted:p}}var U=function(){return U=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},U.apply(this,arguments)};function Be(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ve(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var He=`right-scroll-bar-position`,Ue=`width-before-scroll-bar`,We=`with-scroll-bars-hidden`,Ge=`--removed-body-scroll-bar-size`;function Ke(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function qe(e,t){var n=(0,B.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Je=typeof window<`u`?B.useLayoutEffect:B.useEffect,Ye=new WeakMap;function Xe(e,t){var n=qe(t||null,function(t){return e.forEach(function(e){return Ke(e,t)})});return Je(function(){var t=Ye.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ke(e,null)}),i.forEach(function(e){r.has(e)||Ke(e,a)})}Ye.set(n,e)},[e]),n}function Ze(e){return e}function Qe(e,t){t===void 0&&(t=Ze);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function $e(e){e===void 0&&(e={});var t=Qe(null);return t.options=U({async:!0,ssr:!1},e),t}var et=function(e){var t=e.sideCar,n=Be(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return B.createElement(r,U({},n))};et.isSideCarExport=!0;function tt(e,t){return e.useMedium(t),et}var nt=$e(),rt=function(){},it=B.forwardRef(function(e,t){var n=B.useRef(null),r=B.useState({onScrollCapture:rt,onWheelCapture:rt,onTouchMoveCapture:rt}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Be(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Xe([n,t]),C=U(U({},b),i);return B.createElement(B.Fragment,null,u&&B.createElement(x,{sideCar:nt,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?B.cloneElement(B.Children.only(s),U(U({},C),{ref:S})):B.createElement(v,U({},C,{className:c,ref:S}),s))});it.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},it.classNames={fullWidth:Ue,zeroRight:He};var at,ot=function(){if(at)return at;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function st(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=ot();return t&&e.setAttribute(`nonce`,t),e}function ct(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lt(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ut=function(){var e=0,t=null;return{add:function(n){e==0&&(t=st())&&(ct(t,n),lt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dt=function(){var e=ut();return function(t,n){B.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ft=function(){var e=dt();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},pt={left:0,top:0,right:0,gap:0},mt=function(e){return parseInt(e||``,10)||0},ht=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[mt(n),mt(r),mt(i)]},gt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return pt;var t=ht(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_t=ft(),vt=`data-scroll-locked`,yt=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
2
- .${We} {
3
- overflow: hidden ${r};
4
- padding-right: ${s}px ${r};
5
- }
6
- body[${vt}] {
7
- overflow: hidden ${r};
8
- overscroll-behavior: contain;
9
- ${[t&&`position: relative ${r};`,n===`margin`&&`
10
- padding-left: ${i}px;
11
- padding-top: ${a}px;
12
- padding-right: ${o}px;
13
- margin-left:0;
14
- margin-top:0;
15
- margin-right: ${s}px ${r};
16
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
17
- }
18
-
19
- .${He} {
20
- right: ${s}px ${r};
21
- }
22
-
23
- .${Ue} {
24
- margin-right: ${s}px ${r};
25
- }
26
-
27
- .${He} .${He} {
28
- right: 0 ${r};
29
- }
30
-
31
- .${Ue} .${Ue} {
32
- margin-right: 0 ${r};
33
- }
34
-
35
- body[${vt}] {
36
- ${Ge}: ${s}px;
37
- }
38
- `},bt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},xt=function(){B.useEffect(function(){return document.body.setAttribute(vt,(bt()+1).toString()),function(){var e=bt()-1;e<=0?document.body.removeAttribute(vt):document.body.setAttribute(vt,e.toString())}},[])},St=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;xt();var a=B.useMemo(function(){return gt(i)},[i]);return B.createElement(_t,{styles:yt(a,!t,i,n?``:`!important`)})},Ct=!1;if(typeof window<`u`)try{var wt=Object.defineProperty({},`passive`,{get:function(){return Ct=!0,!0}});window.addEventListener(`test`,wt,wt),window.removeEventListener(`test`,wt,wt)}catch{Ct=!1}var Tt=Ct?{passive:!1}:!1,Et=function(e){return e.tagName===`TEXTAREA`},Dt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Et(e)&&n[t]===`visible`)},Ot=function(e){return Dt(e,`overflowY`)},kt=function(e){return Dt(e,`overflowX`)},At=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Nt(e,r)){var i=Pt(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},jt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Mt=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Nt=function(e,t){return e===`v`?Ot(t):kt(t)},Pt=function(e,t){return e===`v`?jt(t):Mt(t)},Ft=function(e,t){return e===`h`&&t===`rtl`?-1:1},It=function(e,t,n,r,i){var a=Ft(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Pt(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Nt(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Lt=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rt=function(e){return[e.deltaX,e.deltaY]},zt=function(e){return e&&`current`in e?e.current:e},Bt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vt=function(e){return`
39
- .block-interactivity-${e} {pointer-events: none;}
40
- .allow-interactivity-${e} {pointer-events: all;}
41
- `},Ht=0,Ut=[];function Wt(e){var t=B.useRef([]),n=B.useRef([0,0]),r=B.useRef(),i=B.useState(Ht++)[0],a=B.useState(ft)[0],o=B.useRef(e);B.useEffect(function(){o.current=e},[e]),B.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ve([e.lockRef.current],(e.shards||[]).map(zt),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=B.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Lt(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=At(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=At(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return It(h,t,e,h===`h`?s:c,!0)},[]),c=B.useCallback(function(e){var n=e;if(!(!Ut.length||Ut[Ut.length-1]!==a)){var r=`deltaY`in n?Rt(n):Lt(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Bt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(zt).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=B.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Gt(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=B.useCallback(function(e){n.current=Lt(e),r.current=void 0},[]),d=B.useCallback(function(t){l(t.type,Rt(t),t.target,s(t,e.lockRef.current))},[]),f=B.useCallback(function(t){l(t.type,Lt(t),t.target,s(t,e.lockRef.current))},[]);B.useEffect(function(){return Ut.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Tt),document.addEventListener(`touchmove`,c,Tt),document.addEventListener(`touchstart`,u,Tt),function(){Ut=Ut.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Tt),document.removeEventListener(`touchmove`,c,Tt),document.removeEventListener(`touchstart`,u,Tt)}},[]);var p=e.removeScrollBar,m=e.inert;return B.createElement(B.Fragment,null,m?B.createElement(a,{styles:Vt(i)}):null,p?B.createElement(St,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Kt=tt(nt,Wt),qt=B.forwardRef(function(e,t){return B.createElement(it,U({},e,{ref:t,sideCar:Kt}))});qt.classNames=it.classNames;function Jt({keepMounted:e,opened:t,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:s,onEnterTransitionEnd:c,trapFocus:l,closeOnEscape:u,returnFocus:d,closeOnClickOutside:f,withinPortal:p,portalProps:m,lockScroll:h,children:g,zIndex:_,shadow:v,padding:y,__vars:b,unstyled:x,removeScrollProps:S,...C}){let{_id:w,titleMounted:T,bodyMounted:E,shouldLockScroll:D,setTitleMounted:O,setBodyMounted:k}=ze({id:i,transitionProps:a,opened:t,trapFocus:l,closeOnEscape:u,onClose:r,returnFocus:d}),{key:A,...j}=S||{};return(0,V.jsx)(o.i,{...m,withinPortal:p,children:(0,V.jsx)(Le,{value:{opened:t,onClose:r,closeOnClickOutside:f,onExitTransitionEnd:s,onEnterTransitionEnd:c,transitionProps:{...a,keepMounted:e},getTitleId:()=>`${w}-title`,getBodyId:()=>`${w}-body`,titleMounted:T,bodyMounted:E,setTitleMounted:O,setBodyMounted:k,trapFocus:l,closeOnEscape:u,zIndex:_,unstyled:x},children:(0,V.jsx)(qt,{enabled:D&&h,...j,children:(0,V.jsx)(n.t,{...C,id:w,__vars:{...b,"--mb-z-index":(_||o.h(`modal`)).toString(),"--mb-shadow":n.M(v),"--mb-padding":n.P(y)},children:g})},A)})})}Jt.displayName=`@mantine/core/ModalBase`;function Yt(){let e=H();return(0,B.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Xt={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Zt({className:e,...t}){let r=Yt(),i=H();return(0,V.jsx)(n.t,{id:r,className:n.D({[Xt.body]:!i.unstyled},e),...t})}Zt.displayName=`@mantine/core/ModalBaseBody`;function Qt({className:e,onClick:t,...r}){let i=H();return(0,V.jsx)(s.o,{...r,onClick:e=>{i.onClose(),t?.(e)},className:n.D({[Xt.close]:!i.unstyled},e),unstyled:i.unstyled})}Qt.displayName=`@mantine/core/ModalBaseCloseButton`;function $t({transitionProps:e,className:t,innerProps:r,onKeyDown:i,style:a,ref:c,...l}){let u=H();return(0,V.jsx)(s.c,{mounted:u.opened,transition:`pop`,...u.transitionProps,onExited:()=>{u.onExitTransitionEnd?.(),u.transitionProps?.onExited?.()},onEntered:()=>{u.onEnterTransitionEnd?.(),u.transitionProps?.onEntered?.()},...e,children:e=>(0,V.jsx)(`div`,{...r,className:n.D({[Xt.inner]:!u.unstyled},r.className),children:(0,V.jsx)(o.r,{active:u.opened&&u.trapFocus,innerRef:c,children:(0,V.jsx)(p.t,{...l,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":u.bodyMounted?u.getBodyId():void 0,"aria-labelledby":u.titleMounted?u.getTitleId():void 0,style:[a,e],className:n.D({[Xt.content]:!u.unstyled},t),unstyled:u.unstyled,children:l.children})})})})}$t.displayName=`@mantine/core/ModalBaseContent`;function en({className:e,...t}){let r=H();return(0,V.jsx)(n.t,{component:`header`,className:n.D({[Xt.header]:!r.unstyled},e),...t})}en.displayName=`@mantine/core/ModalBaseHeader`;var tn={duration:200,timingFunction:`ease`,transition:`fade`};function nn(e){let t=H();return{...tn,...t.transitionProps,...e}}function rn({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=H(),c=nn(t);return(0,V.jsx)(s.c,{mounted:r===void 0?a.opened:r,...c,transition:`fade`,children:t=>(0,V.jsx)(o.a,{fixed:!0,style:[n,t],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}rn.displayName=`@mantine/core/ModalBaseOverlay`;function an(){let e=H();return(0,B.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function on({className:e,...t}){let r=an(),i=H();return(0,V.jsx)(n.t,{component:`h2`,className:n.D({[Xt.title]:!i.unstyled},e),id:r,...t})}on.displayName=`@mantine/core/ModalBaseTitle`;function sn({children:e}){return(0,V.jsx)(V.Fragment,{children:e})}var[cn,ln]=i.t(`Modal component was not found in tree`),W={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},un=n.r(e=>{let{classNames:t,className:r,style:i,styles:a,vars:o,...s}=n.l(`ModalBody`,null,e);return(0,V.jsx)(Zt,{...ln().getStyles(`body`,{classNames:t,style:i,styles:a,className:r}),...s})});un.classes=W,un.displayName=`@mantine/core/ModalBody`;var dn=n.r(e=>{let{classNames:t,className:r,style:i,styles:a,vars:o,...s}=n.l(`ModalCloseButton`,null,e);return(0,V.jsx)(Qt,{...ln().getStyles(`close`,{classNames:t,style:i,styles:a,className:r}),...s})});dn.classes=W,dn.displayName=`@mantine/core/ModalCloseButton`;var fn=n.r(e=>{let{classNames:t,className:r,style:i,styles:a,vars:o,children:s,__hidden:c,...l}=n.l(`ModalContent`,null,e),u=ln(),d=u.scrollAreaComponent||sn;return(0,V.jsx)($t,{...u.getStyles(`content`,{className:r,style:i,styles:a,classNames:t}),innerProps:u.getStyles(`inner`,{className:r,style:i,styles:a,classNames:t}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,...l,children:(0,V.jsx)(d,{style:{maxHeight:u.fullScreen?`100dvh`:`calc(100dvh - (${n.L(u.yOffset)} * 2))`},children:s})})});fn.classes=W,fn.displayName=`@mantine/core/ModalContent`;var pn=n.r(e=>{let{classNames:t,className:r,style:i,styles:a,vars:o,...s}=n.l(`ModalHeader`,null,e);return(0,V.jsx)(en,{...ln().getStyles(`header`,{classNames:t,style:i,styles:a,className:r}),...s})});pn.classes=W,pn.displayName=`@mantine/core/ModalHeader`;var mn=n.r(e=>{let{classNames:t,className:r,style:i,styles:a,vars:o,...s}=n.l(`ModalOverlay`,null,e);return(0,V.jsx)(rn,{...ln().getStyles(`overlay`,{classNames:t,style:i,styles:a,className:r}),...s})});mn.classes=W,mn.displayName=`@mantine/core/ModalOverlay`;var hn={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:o.h(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},gn=n.O((e,{radius:t,size:r,yOffset:i,xOffset:a})=>({root:{"--modal-radius":t===void 0?void 0:n.j(t),"--modal-size":n.N(r,`modal-size`),"--modal-y-offset":n.L(i),"--modal-x-offset":n.L(a)}})),_n=n.r(e=>{let t=n.l(`ModalRoot`,hn,e),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:c,yOffset:u,scrollAreaComponent:d,radius:f,fullScreen:p,centered:m,xOffset:h,__staticSelector:g,attributes:_,...v}=t,y=n.c({name:g,classes:W,props:t,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:_,vars:c,varsResolver:gn});return(0,V.jsx)(cn,{value:{yOffset:u,scrollAreaComponent:d,getStyles:y,fullScreen:p},children:(0,V.jsx)(Jt,{...y(`root`),"data-full-screen":p||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===l.a.Autosize||void 0,unstyled:s,...v})})});_n.classes=W,_n.varsResolver=gn,_n.displayName=`@mantine/core/ModalRoot`;var vn=(0,B.createContext)(null);function yn({children:e}){let[t,n]=(0,B.useState)([]),[r,i]=(0,B.useState)(o.h(`modal`));return(0,V.jsx)(vn,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}yn.displayName=`@mantine/core/ModalStack`;var bn=n.r(e=>{let{classNames:t,className:r,style:i,styles:a,vars:o,...s}=n.l(`ModalTitle`,null,e);return(0,V.jsx)(on,{...ln().getStyles(`title`,{classNames:t,style:i,styles:a,className:r}),...s})});bn.classes=W,bn.displayName=`@mantine/core/ModalTitle`;var xn={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:o.h(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},G=n.r(e=>{let{title:t,withOverlay:r,overlayProps:i,withCloseButton:a,closeButtonProps:s,children:c,radius:l,opened:u,stackId:d,zIndex:f,...p}=n.l(`Modal`,xn,e),m=(0,B.use)(vn),h=!!t||a,g=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},_=r===!1?!1:d&&m?m.currentId===d:u;return(0,B.useEffect)(()=>{m&&d&&(u?m.addModal(d,f||o.h(`modal`)):m.removeModal(d))},[u,d,f]),(0,V.jsxs)(_n,{radius:l,opened:u,zIndex:m&&d?m.getZIndex(d):f,...p,...g,children:[r&&(0,V.jsx)(mn,{visible:_,transitionProps:m&&d?{duration:0}:void 0,...i}),(0,V.jsxs)(fn,{radius:l,__hidden:m&&d&&u?d!==m.currentId:!1,children:[h&&(0,V.jsxs)(pn,{children:[t&&(0,V.jsx)(bn,{children:t}),a&&(0,V.jsx)(dn,{...s})]}),(0,V.jsx)(un,{children:c})]})]})});G.classes=W,G.displayName=`@mantine/core/Modal`,G.Root=_n,G.Overlay=mn,G.Content=fn,G.Body=un,G.Header=pn,G.Title=bn,G.CloseButton=dn,G.Stack=yn;var Sn={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},Cn={withCloseButton:!0},wn=n.O((e,{radius:t,color:r})=>({root:{"--notification-radius":t===void 0?void 0:n.j(t),"--notification-color":r?n.x(r,e):void 0}})),Tn=n.r(e=>{let t=n.l(`Notification`,Cn,e),{className:r,color:i,radius:a,loading:o,withCloseButton:c,withBorder:l,title:u,icon:d,children:f,onClose:p,closeButtonProps:m,classNames:h,style:g,styles:_,unstyled:v,vars:y,mod:b,loaderProps:x,role:S,attributes:C,...w}=t,T=n.c({name:`Notification`,classes:Sn,props:t,className:r,style:g,classNames:h,styles:_,unstyled:v,attributes:C,vars:y,varsResolver:wn});return(0,V.jsxs)(n.t,{...T(`root`),mod:[{"data-with-icon":!!d||o,"data-with-border":l},b],role:S||`alert`,...w,children:[d&&!o&&(0,V.jsx)(`div`,{...T(`icon`),children:d}),o&&(0,V.jsx)(s.s,{size:28,color:i,...T(`loader`),...x}),(0,V.jsxs)(`div`,{...T(`body`),children:[u&&(0,V.jsx)(`div`,{...T(`title`),children:u}),(0,V.jsx)(n.t,{...T(`description`),mod:{"data-with-title":!!u},children:f})]}),c&&(0,V.jsx)(s.o,{iconSize:16,color:`gray`,...m,unstyled:v,onClick:e=>{m?.onClick?.(e),p?.()},...T(`closeButton`)})]})});Tn.classes=Sn,Tn.varsResolver=wn,Tn.displayName=`@mantine/core/Notification`;var En={primaryColor:`blue`,other:{desktop:{backgroundColor:`#1a1a2e`},taskbar:{backgroundColor:`#16213e`,textColor:`#ffffff`},window:{backgroundColor:`#0f0f23`,textColor:`#ffffff`,borderRadius:`8px`},accent:`#339af0`}},Dn=(0,B.createContext)(void 0);function On({children:e,fileSystem:t,isReady:n,error:r}){let i=me(),a=c.h(e=>e.setThemeMode),o=c.h(e=>e.toggleTheme),s=(0,B.useMemo)(()=>({fs:n?t:null,isReady:n,error:r,theme:i,setThemeMode:a,toggleTheme:o}),[t,n,r,i,a,o]);return(0,V.jsx)(Dn.Provider,{value:s,children:e})}function kn({children:e,fileSystem:t,initialMode:n,theme:r,mantineTheme:i,fallback:a=null,onError:o}){let[s,l]=(0,B.useState)(!1),[u,d]=(0,B.useState)(null),f=c.h(e=>e.theme.mode),p=c.h(e=>e.setThemeMode);(0,B.useEffect)(()=>{n&&p(n)},[]),(0,B.useEffect)(()=>{let e=!0;return(async()=>{try{await t.initialize(),e&&l(!0)}catch(t){let n=t instanceof Error?t:Error(String(t));e&&(d(n),o?.(n))}})(),()=>{e=!1}},[t,o]);let m=(0,B.useMemo)(()=>Ie({...En,...i}),[i]);return u||!s?(0,V.jsx)(V.Fragment,{children:a}):(0,V.jsx)(Pe,{theme:m,forceColorScheme:f,children:(0,V.jsx)(pe,{mode:f,theme:r,children:(0,V.jsx)(On,{fileSystem:t,isReady:s,error:u,children:e})})})}function An(){let e=(0,B.useContext)(Dn);if(!e)throw Error(`useFdeContext must be used within an FdeProvider`);return e}function jn(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Mn(...e){return t=>{let n=!1,r=e.map(e=>{let r=jn(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():jn(e[t],null)}}}}function Nn(...e){return B.useCallback(Mn(...e),e)}var Pn=class extends B.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(T.o(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=T.o(e)&&e.offsetWidth||0,r=T.o(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}};function Fn({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,B.useId)(),s=(0,B.useRef)(null),c=(0,B.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=(0,B.useContext)(T.a),u=Nn(s,e.props?.ref??e?.ref);return(0,B.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m}=c.current;if(t||a===!1||!s.current||!e||!u)return;let h=n===`left`?`left: ${f}`:`right: ${p}`,g=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let _=document.createElement(`style`);l&&(_.nonce=l);let v=i??document.head;return v.appendChild(_),_.sheet&&_.sheet.insertRule(`
42
- [data-motion-pop-id="${o}"] {
43
- position: absolute !important;
44
- width: ${e}px !important;
45
- height: ${u}px !important;
46
- ${h}px !important;
47
- ${g}px !important;
48
- }
49
- `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,V.jsx)(Pn,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:B.cloneElement(e,{ref:u})})}var In=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=T.f(Ln),d=(0,B.useId)(),f=!0,p=(0,B.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,B.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),B.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,V.jsx)(Fn,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,V.jsx)(T.u.Provider,{value:p,children:e})};function Ln(){return new Map}var Rn=e=>e.key||``;function zn(e){let t=[];return B.Children.forEach(e,e=>{(0,B.isValidElement)(e)&&t.push(e)}),t}var Bn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=T.i(o),f=(0,B.useMemo)(()=>zn(e),[e]),p=o&&!u?[]:f.map(Rn),m=(0,B.useRef)(!0),h=(0,B.useRef)(f),g=T.f(()=>new Map),_=(0,B.useRef)(new Set),[v,y]=(0,B.useState)(f),[b,x]=(0,B.useState)(f);T.d(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Rn(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=Rn(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(zn(e)),y(f),null}process.env.NODE_ENV!==`production`&&a===`wait`&&b.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);let{forceRender:C}=(0,B.useContext)(T.p);return(0,V.jsx)(V.Fragment,{children:b.map(e=>{let v=Rn(e),y=o&&!u?!1:f===b||p.includes(v);return(0,V.jsx)(In,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})};function Vn(e){e.values.forEach(e=>e.stop())}function Hn(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&T.c(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Hn(e,t)})})}function Un(e,t){if(Array.isArray(t))return Hn(e,t);if(typeof t==`string`)return Hn(e,[t]);T.c(e,t)}function Wn(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){T.l(e,`controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.`);let i=[];return t.forEach(e=>{i.push(T.s(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return T.l(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{Un(e,n)})},stop(){t.forEach(e=>{Vn(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function Gn(){let e=T.f(Wn);return T.d(e.mount,[]),e}var Kn=(0,B.createContext)(null),qn=({children:e})=>{let t=(0,B.useRef)(new Map);return(0,V.jsx)(Kn.Provider,{value:{register:(e,n)=>{t.current.set(e,n)},unregister:e=>{t.current.delete(e)},getRect:e=>t.current.get(e)},children:e})},Jn=()=>{let e=(0,B.useContext)(Kn);if(!e)throw Error(`useWindowButtonRegistry must be used within WindowButtonRegistryProvider`);return e},Yn={root:`_root_1z0nr_1`},Xn=`linear-gradient(90deg, rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgba(237, 221, 83, 1) 100%)`,Zn=({children:e,onContextMenu:t,wallpaper:n,backgroundColor:r})=>{let i=w.o(e=>e.setViewportSize),a=(0,B.useRef)(null);(0,B.useEffect)(()=>{let e=a.current;if(!e)return;let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0]?.contentRect??{};t&&t>0&&n&&n>0&&i(t,n)});return t.observe(e),()=>t.disconnect()},[i]);let o=n?`url(${n})`:Xn;return(0,V.jsx)(`div`,{ref:a,className:Yn.root,"data-testid":`desktop-area`,style:{"--taskbar-height":`48px`,backgroundColor:r??`transparent`,backgroundImage:o,backgroundSize:`cover`,backgroundPosition:`center`},onContextMenu:t,children:e})},K=e=>typeof e==`string`,Qn=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},$n=e=>e==null?``:``+e,er=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},tr=/###/g,nr=e=>e&&e.indexOf(`###`)>-1?e.replace(tr,`.`):e,rr=e=>!e||K(e),ir=(e,t,n)=>{let r=K(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(rr(e))return{};let t=nr(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return rr(e)?{}:{obj:e,k:nr(r[i])}},ar=(e,t,n)=>{let{obj:r,k:i}=ir(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=ir(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=ir(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},or=(e,t,n,r)=>{let{obj:i,k:a}=ir(e,t,Object);i[a]=i[a]||[],i[a].push(n)},sr=(e,t)=>{let{obj:n,k:r}=ir(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},cr=(e,t,n)=>{let r=sr(e,n);return r===void 0?sr(t,n):r},lr=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?K(e[r])||e[r]instanceof String||K(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):lr(e[r],t[r],n):e[r]=t[r]);return e},ur=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),dr={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},fr=e=>K(e)?e.replace(/[&<>"'\/]/g,e=>dr[e]):e,pr=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},mr=[` `,`,`,`?`,`!`,`;`],hr=new pr(20),gr=(e,t,n)=>{t||=``,n||=``;let r=mr.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=hr.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},_r=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},vr=e=>e?.replace(/_/g,`-`),yr={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},q=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||yr,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(K(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},br=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},xr=class extends br{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):K(n)&&i?o.push(...n.split(i)):o.push(n)));let s=sr(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!K(n)?s:_r(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),ar(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(K(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=sr(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?lr(s,n,i):s={...s,...n},ar(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Sr={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Cr=Symbol(`i18next/PATH_KEY`);function wr(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Cr?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Tr(e,t){let{[Cr]:n}=e(wr()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Er={},Dr=e=>!K(e)&&typeof e!=`boolean`&&typeof e!=`number`,Or=class e extends br{constructor(e,t={}){super(),er([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=q.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Dr(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!gr(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:K(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:K(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Tr(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Tr(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!K(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Dr(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(K(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:Dr(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&K(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=K(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!K(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=K(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Sr.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return K(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Tr(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!K(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(K(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!Er[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(Er[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!K(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},kr=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=q.create(`languageUtils`)}getScriptPartFromCode(e){if(e=vr(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=vr(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(K(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),K(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return K(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):K(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},Ar={zero:0,one:1,two:2,few:3,many:4,other:5},jr={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Mr=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=q.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=vr(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),jr;if(!e.match(/-|_/))return jr;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Ar[e]-Ar[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Nr=(e,t,n,r=`.`,i=!0)=>{let a=cr(e,t,n);return!a&&i&&K(n)&&(a=_r(e,n,r),a===void 0&&(a=_r(t,n,r))),a},Pr=e=>e.replace(/\$/g,`$$$$`),Fr=class{constructor(e={}){this.logger=q.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?fr:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?ur(i):a||`{{`,this.suffix=o?ur(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?ur(d):f||ur(`$t(`),this.nestingSuffix=p?ur(p):m||ur(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=Nr(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Nr(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>Pr(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Pr(this.escape(e)):Pr(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=K(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !K(a)&&!this.useRawValueToEscape&&(a=$n(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${ur(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!K(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!K(i))return i;K(i)||(i=$n(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Ir=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Lr=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(vr(r),i),t[o]=s),s(n)}},Rr=e=>(t,n,r)=>e(vr(n),r)(t),zr=class{constructor(e={}){this.logger=q.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Lr:Rr;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Lr(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Ir(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},Br=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Vr=class extends br{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=q.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{or(n.loaded,[i],a),Br(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();K(e)&&(e=this.languageUtils.toResolveHierarchy(e)),K(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Hr=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),K(e[1])&&(t.defaultValue=e[1]),K(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Ur=e=>(K(e.ns)&&(e.ns=[e.ns]),K(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),K(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),Wr=()=>{},Gr=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Kr=`__i18next_supportNoticeShown`,qr=()=>!!(typeof globalThis<`u`&&globalThis[Kr]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env&&process.env.NODE_ENV===`production`),Jr=()=>{typeof globalThis<`u`&&(globalThis[Kr]=!0)},Yr=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),J=class e extends br{constructor(e={},t){if(super(),this.options=Ur(e),this.services={},this.logger=q,this.modules={external:[]},Gr(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(K(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=Hr();this.options={...n,...this.options,...Ur(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!Yr(this)&&!qr()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),Jr());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?q.init(r(this.modules.logger),this.options):q.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:zr;let t=new kr(this.options);this.store=new xr(this.options.resources,this.options);let i=this.services;i.logger=q,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new Mr(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Fr(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Vr(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Or(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Wr,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Qn(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Wr){let n=t,r=K(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Qn();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Wr,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Sr.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Qn();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=K(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(K(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=Tr(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=Tr(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=Tr(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return K(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Qn();return this.options.ns?(K(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Qn();K(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new kr(Hr());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Wr){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new xr(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Hr().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Fr(n)}return a.translator=new Or(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();J.createInstance,J.dir,J.init,J.loadResources,J.reloadResources,J.use,J.changeLanguage,J.getFixedT,J.t,J.exists,J.setDefaultNamespace,J.hasLoadedNamespace,J.loadNamespaces,J.loadLanguages;var Xr=e=>e.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),Zr=()=>{let[e,t]=(0,B.useState)(()=>Xr(new Date));return(0,B.useEffect)(()=>{let e=setInterval(()=>t(Xr(new Date)),1e3);return()=>clearInterval(e)},[]),e},Qr=-8,$r=0,ei=()=>{let[e,t]=(0,B.useState)({activeMenu:null,position:{x:0,y:0},targetWindowId:null}),n=(0,B.useCallback)((e,n)=>{e.preventDefault(),e.stopPropagation(),t({activeMenu:`window`,position:{x:e.clientX,y:e.clientY+Qr},targetWindowId:n})},[]),r=(0,B.useCallback)(e=>{e.preventDefault(),t({activeMenu:`panel`,position:{x:e.clientX,y:e.clientY+Qr},targetWindowId:null})},[]),i=(0,B.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),t({activeMenu:`launcher`,position:{x:e.clientX,y:e.clientY+$r},targetWindowId:null})},[]),a=(0,B.useCallback)(()=>{t(e=>({...e,activeMenu:null}))},[]);return{activeMenu:e.activeMenu,position:e.position,targetWindowId:e.targetWindowId,windowMenuOpened:e.activeMenu===`window`,panelMenuOpened:e.activeMenu===`panel`,launcherMenuOpened:e.activeMenu===`launcher`,openWindowMenu:n,openPanelMenu:r,openLauncherMenu:i,closeMenu:a}},ti=()=>{let e=c.h(e=>e.animationDuration);return{duration:e,windowVariants:E.f(e),panelVariants:E.u(e),minimizeVariant:E.l(.3),restoreVariant:E.d(.3),maximizeTransition:E.c(.25),easeIn:E.o(e),easeOut:E.s(e)}},Y={WELCOME:`welcome`,NOTEPAD:`notepad`,UPLOADER:`uploader`,FILES:`files`,SETTINGS:`settings`,PDF:`pdf`,CALENDAR:`calendar`,STORYBOOK:`storybook`,LINKEDIN:`linkedin`,GITHUB:`github`,IMAGE_VIEWER:`image-viewer`,DOS_EMULATOR:`dos-emulator`,DOOM:`doom`,TERMINAL:`terminal`,CODE_SERVER:`code-server`,DEVICE_INFO:`device-info`,MENUEDIT:`menuedit`},ni={[Y.FILES]:`filesApp`,[Y.PDF]:`pdfViewer`,[Y.IMAGE_VIEWER]:`imageViewer`,[Y.DOS_EMULATOR]:`dosEmulator`,[Y.CODE_SERVER]:`codeServer`,[Y.DEVICE_INFO]:`deviceInfo`},ri=[Y.WELCOME,Y.UPLOADER,Y.TERMINAL,Y.CODE_SERVER,Y.STORYBOOK,Y.SETTINGS,Y.NOTEPAD,Y.LINKEDIN,Y.GITHUB,Y.FILES,Y.DOOM];function ii(e){let{t}=D.t(`apps`);return e?t(`names.${ni[e]??e}`,e):``}function ai(e,t,n){return(0,B.useMemo)(()=>{if(!t.trim())return e;let r=t.toLowerCase().trim();return e.filter(e=>{let t=n(e);return Array.isArray(t)?t.some(e=>e.toLowerCase().includes(r)):t.toLowerCase().includes(r)})},[e,t,n])}function oi(e){let[t,n]=(0,B.useState)(e??new Set);return{expanded:t,toggle:(0,B.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),expand:(0,B.useCallback)(e=>{n(t=>{let n=new Set(t);return n.add(e),n})},[]),collapse:(0,B.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[]),expandAll:(0,B.useCallback)(e=>{n(new Set(e))},[]),collapseAll:(0,B.useCallback)(()=>{n(new Set)},[]),reset:(0,B.useCallback)(()=>{n(new Set)},[]),isExpanded:(0,B.useCallback)(e=>t.has(e),[t])}}var si={header:`_header_2d0oy_1`,iconContainer:`_iconContainer_2d0oy_20`,expandIcon:`_expandIcon_2d0oy_28`,icon:`_icon_2d0oy_20`,title:`_title_2d0oy_42`,content:`_content_2d0oy_48`},ci=({title:e,fcIcon:t=`FcFolder`,expanded:n,onToggle:r,children:i,className:a,"aria-label":o})=>{let s=O.c(n?`VscRemove`:`VscAdd`,{size:14,className:si.expandIcon});return(0,V.jsxs)(`div`,{className:a,children:[(0,V.jsxs)(f.t,{className:si.header,onClick:r,"aria-expanded":n,"aria-label":o??e,children:[(0,V.jsx)(`span`,{className:si.iconContainer,children:s}),(0,V.jsx)(`span`,{className:si.icon,children:(0,V.jsx)(y.t,{fcIcon:t,size:16})}),(0,V.jsx)(g.o,{size:`sm`,fw:500,className:si.title,children:e})]}),n&&(0,V.jsx)(`div`,{className:si.content,children:i})]})},li={trigger:`_trigger_4gumo_1`,panel:`_panel_4gumo_23`,searchContainer:`_searchContainer_4gumo_39`,searchInput:`_searchInput_4gumo_43`,scrollContainer:`_scrollContainer_4gumo_47`,appsSection:`_appsSection_4gumo_56`,appButton:`_appButton_4gumo_62`,appIcon:`_appIcon_4gumo_82`};function ui(e){let t=e.icon,n=`fcIcon`in e?e.fcIcon:void 0,r=t?.startsWith(`Fc`)||t?.startsWith(`Fi`)||t?.startsWith(`Vsc`);return{id:e.id,name:e.name,fcIcon:n??(r?t:void 0),icon:r?void 0:t,iconUrl:`iconUrl`in e?e.iconUrl:void 0,iconColor:`iconColor`in e?e.iconColor:void 0}}var di=({app:e,onOpen:t})=>{let n=ii(e.id);return(0,V.jsxs)(`button`,{className:li.appButton,onClick:()=>t(e.id),role:`menuitem`,"aria-label":n,children:[(0,V.jsx)(`span`,{className:li.appIcon,children:(0,V.jsx)(y.t,{fcIcon:e.fcIcon,iconUrl:e.iconUrl,fallback:e.icon,color:e.iconColor})}),(0,V.jsx)(g.o,{size:`sm`,children:n})]},e.id)},fi=({folder:e,isExpanded:t,apps:n,onToggle:r,onOpen:i})=>(0,V.jsx)(ci,{title:A.o(e),fcIcon:e.fcIcon,expanded:t,onToggle:r,children:n.map(e=>(0,V.jsx)(di,{app:e,onOpen:i},e.id))},e.id),pi=({fcIcon:e=`FcDebian`,onContextMenu:t})=>{let n=O.i(e,{size:22,style:{display:`block`}}),[r,i]=(0,B.useState)(!1),[a,o]=(0,B.useState)(``),l=E.t(),u=c.h(e=>e.theme.taskbar),d=w.o(e=>e.launcherFolders),f=w.o(e=>e.customApps),{panelVariants:p}=ti(),m=(0,B.useRef)(null),h=(0,B.useRef)(null),{expanded:_,toggle:v,reset:y}=oi(new Set),b=(0,B.useMemo)(()=>[...w.C].sort((e,t)=>e.name.localeCompare(t.name)),[]),x=(0,B.useMemo)(()=>new Set(d.flatMap(e=>e.appIds)),[d]),S=ai((0,B.useMemo)(()=>b.filter(e=>!x.has(e.id)),[b,x]),a,e=>[e.id,e.name]),C=(0,B.useMemo)(()=>{if(!a.trim())return[...d].sort((e,t)=>e.isPredefined===t.isPredefined?e.name.localeCompare(t.name):e.isPredefined?-1:1);let e=a.toLowerCase();return d.map(t=>({...t,appIds:t.appIds.filter(t=>{let n=b.find(e=>e.id===t);return n?n.id.toLowerCase().includes(e)||n.name.toLowerCase().includes(e):!1})})).filter(e=>e.appIds.length>0).sort((e,t)=>e.isPredefined===t.isPredefined?e.name.localeCompare(t.name):e.isPredefined?-1:1)},[d,a,b]),D=(0,B.useMemo)(()=>{if(!a.trim())return f;let e=a.toLowerCase();return f.filter(t=>t.id.toLowerCase().includes(e)||t.name.toLowerCase().includes(e))},[f,a]);(0,B.useEffect)(()=>{a.trim()&&r&&(C.map(e=>e.id).forEach(e=>{_.has(e)||v(e)}),D.length>0&&!_.has(`launcher-folder-custom-apps`)&&v(w.J))},[a,C,D,r,_,v]),(0,B.useEffect)(()=>{r||y()},[r,y]),(0,B.useEffect)(()=>{if(!r)return;let e=e=>{m.current&&!m.current.contains(e.target)&&(i(!1),o(``))},t=e=>{e.key===`Escape`&&(i(!1),o(``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let k=e=>{if(e.preventDefault(),e.stopPropagation(),r){i(!1),o(``);return}t?.(e)};(0,B.useEffect)(()=>{r&&h.current&&h.current.focus()},[r]);let A=(0,B.useCallback)(e=>{l(e),i(!1),o(``)},[l]),j=(0,B.useCallback)(e=>{v(e)},[v]),M=O.i(`FcSearch`,{size:16}),N=(0,B.useCallback)(()=>{r?(i(!1),o(``)):i(!0)},[r]);return(0,V.jsxs)(`div`,{ref:m,children:[(0,V.jsx)(`button`,{className:li.trigger,onClick:N,onContextMenu:k,"aria-label":`Launcher`,"aria-expanded":r,children:n}),(0,V.jsx)(Bn,{children:r&&(0,V.jsxs)(T.r.div,{className:li.panel,style:{background:u.background},role:`menu`,"aria-label":`App launcher`,initial:p.initial,animate:p.animate,exit:p.exit,children:[(0,V.jsx)(`div`,{className:li.searchContainer,children:(0,V.jsx)(s.t,{ref:h,placeholder:`Search apps...`,value:a,onChange:e=>o(e.target.value),leftSection:M,size:`xs`,classNames:{input:li.searchInput},"aria-label":`Search apps`})}),(0,V.jsxs)(`div`,{className:li.scrollContainer,children:[C.map(e=>{let t=_.has(e.id);return e.id===`launcher-folder-custom-apps`?D.length===0?null:(0,V.jsx)(fi,{folder:e,isExpanded:t,apps:D.map(ui),onToggle:()=>j(e.id),onOpen:A},e.id):(0,V.jsx)(fi,{folder:e,isExpanded:t,apps:e.appIds.map(e=>b.find(t=>t.id===e)).filter(e=>e!==void 0).sort((e,t)=>e.name.localeCompare(t.name)).map(ui),onToggle:()=>j(e.id),onOpen:A},e.id)}),S.length>0&&(0,V.jsx)(`div`,{className:li.appsSection,children:S.map(e=>(0,V.jsx)(di,{app:ui(e),onOpen:A},e.id))}),a&&S.length===0&&C.length===0&&D.length===0&&(0,V.jsx)(g.o,{size:`sm`,c:`dimmed`,ta:`center`,mt:`md`,children:`No apps found`})]})]})})]})},mi=({x:e,y:t})=>(0,V.jsx)(a.r.Target,{children:(0,V.jsx)(`div`,{"aria-hidden":`true`,style:{position:`fixed`,left:e,top:t,width:0,height:0,pointerEvents:`none`}})}),hi=e=>{let t=(0,B.useRef)(null),[n,r]=(0,B.useState)(0);return(0,B.useLayoutEffect)(()=>{if(t.current&&e){let e=t.current.offsetHeight;r(e)}},[e]),{menuRef:t,menuHeight:n}},gi={menuItem:`_menuItem_18vno_1`},_i=8,vi=({windowMenuOpened:e,panelMenuOpened:t,launcherMenuOpened:n,menuPosition:r,targetWindowId:i,targetWindowState:o,onCloseWindow:s,onMinimizeWindow:c,onMaximizeWindow:l,onRestoreWindow:u,onClose:d})=>{let{t:f}=D.t(`contextMenu`),p={size:14,style:{display:`block`}},m=()=>O.i(`FcCancel`,p),h=()=>O.i(`FcMinus`,p),g=()=>O.i(`FcTemplate`,p),_=()=>O.i(`FcUndo`,p),v=()=>O.i(`FcSettings`,p),y=()=>O.i(`FcFolder`,p),b=E.t(),x=ii(`menuedit`),S=w.o(e=>e.openWindow),C=o===`minimized`,T=o===`maximized`,{menuRef:k,menuHeight:A}=hi(e),{menuRef:j,menuHeight:M}=hi(t),{menuRef:N,menuHeight:P}=hi(n),[F,I]=(0,B.useState)(!1),[L,ee]=(0,B.useState)(!1),[R,te]=(0,B.useState)(!1);(0,B.useLayoutEffect)(()=>{e||I(!1),e&&A>0&&I(!0)},[e,A]),(0,B.useLayoutEffect)(()=>{t||ee(!1),t&&M>0&&ee(!0)},[t,M]),(0,B.useLayoutEffect)(()=>{n||te(!1),n&&P>0&&te(!0)},[n,P]);let ne=(0,B.useMemo)(()=>e?{height:A,ready:F}:t?{height:M,ready:L}:n?{height:P,ready:R}:{height:0,ready:!1},[e,t,n,A,M,P,F,L,R]),z=(0,B.useMemo)(()=>{let{x:e,y:t}=r,{height:n,ready:i}=ne,a=t-_i;return i&&n>0&&t>window.innerHeight-48-n-_i&&(a=t-n+_i),{x:e,y:a}},[r,ne]),re=()=>{d(),S({title:x,content:`menuedit`,fcIcon:`FcFolder`,x:Math.min(r.x+10,window.innerWidth-800),y:Math.min(r.y+10,window.innerHeight-600),width:700,height:500,minWidth:500,minHeight:400})},ie=()=>{d(),b(`settings`)},ae=e=>({opacity:e?1:0,transition:`opacity 0.05s ease`,zIndex:99999});return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(a.r,{opened:e,onClose:d,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,V.jsx)(mi,{x:z.x,y:z.y}),(0,V.jsxs)(a.r.Dropdown,{ref:k,style:ae(F),children:[!C&&(0,V.jsx)(a.r.Item,{onClick:()=>{i&&c(i)},children:(0,V.jsxs)(`div`,{className:gi.menuItem,children:[(0,V.jsx)(h,{}),` `,f(`window.minimize`)]})}),C||T?(0,V.jsx)(a.r.Item,{onClick:()=>{i&&u(i)},children:(0,V.jsxs)(`div`,{className:gi.menuItem,children:[(0,V.jsx)(_,{}),` `,f(`window.restore`)]})}):(0,V.jsx)(a.r.Item,{onClick:()=>{i&&l(i)},children:(0,V.jsxs)(`div`,{className:gi.menuItem,children:[(0,V.jsx)(g,{}),` `,f(`window.maximize`)]})}),(0,V.jsx)(a.r.Divider,{}),(0,V.jsx)(a.r.Item,{onClick:()=>{i&&s(i)},children:(0,V.jsxs)(`div`,{className:gi.menuItem,children:[(0,V.jsx)(m,{}),` `,f(`window.close`)]})})]})]}),(0,V.jsxs)(a.r,{opened:t,onClose:d,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,V.jsx)(mi,{x:z.x,y:z.y}),(0,V.jsx)(a.r.Dropdown,{ref:j,style:ae(L),children:(0,V.jsx)(a.r.Item,{onClick:()=>{b(`settings`)},children:(0,V.jsxs)(`div`,{className:gi.menuItem,children:[(0,V.jsx)(v,{}),` `,f(`apps:names.settings`)]})})})]}),(0,V.jsxs)(a.r,{opened:n,onClose:d,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,V.jsx)(mi,{x:z.x,y:z.y}),(0,V.jsxs)(a.r.Dropdown,{ref:N,style:ae(R),children:[(0,V.jsx)(a.r.Label,{children:f(`launcher.title`)}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(y,{}),onClick:re,children:f(`launcher.editLauncher`)}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(v,{}),onClick:ie,children:f(`apps:names.settings`)})]})]})]})},{slice:yi,forEach:bi}=[];function xi(e){return bi.call(yi.call(arguments,1),t=>{if(t)for(let n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Si(e){return typeof e==`string`?[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(e)):!1}var Ci=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,wi=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:`/`},r=`${e}=${encodeURIComponent(t)}`;if(n.maxAge>0){let e=n.maxAge-0;if(Number.isNaN(e))throw Error(`maxAge should be a Number`);r+=`; Max-Age=${Math.floor(e)}`}if(n.domain){if(!Ci.test(n.domain))throw TypeError(`option domain is invalid`);r+=`; Domain=${n.domain}`}if(n.path){if(!Ci.test(n.path))throw TypeError(`option path is invalid`);r+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!=`function`)throw TypeError(`option expires is invalid`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite)switch(typeof n.sameSite==`string`?n.sameSite.toLowerCase():n.sameSite){case!0:r+=`; SameSite=Strict`;break;case`lax`:r+=`; SameSite=Lax`;break;case`strict`:r+=`; SameSite=Strict`;break;case`none`:r+=`; SameSite=None`;break;default:throw TypeError(`option sameSite is invalid`)}return n.partitioned&&(r+=`; Partitioned`),r},Ti={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:`/`,sameSite:`strict`};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=wi(e,t,i)},read(e){let t=`${e}=`,n=document.cookie.split(`;`);for(let e=0;e<n.length;e++){let r=n[e];for(;r.charAt(0)===` `;)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove(e,t){this.create(e,``,-1,t)}},Ei={name:`cookie`,lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<`u`)return Ti.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<`u`&&Ti.create(n,e,r,i,a)}},Di={name:`querystring`,lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<`u`){let{search:e}=window.location;!window.location.search&&window.location.hash?.indexOf(`?`)>-1&&(e=window.location.hash.substring(window.location.hash.indexOf(`?`)));let r=e.substring(1).split(`&`);for(let e=0;e<r.length;e++){let i=r[e].indexOf(`=`);i>0&&r[e].substring(0,i)===t&&(n=r[e].substring(i+1))}}return n}},Oi={name:`hash`,lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<`u`){let{hash:e}=window.location;if(e&&e.length>2){let i=e.substring(1);if(t){let e=i.split(`&`);for(let n=0;n<e.length;n++){let i=e[n].indexOf(`=`);i>0&&e[n].substring(0,i)===t&&(r=e[n].substring(i+1))}}if(r)return r;if(!r&&n>-1){let t=e.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?t[typeof n==`number`?n:0]?.replace(`/`,``):void 0}}}return r}},ki=null,Ai=()=>{if(ki!==null)return ki;try{if(ki=typeof window<`u`&&window.localStorage!==null,!ki)return!1;let e=`i18next.translate.boo`;window.localStorage.setItem(e,`foo`),window.localStorage.removeItem(e)}catch{ki=!1}return ki},ji={name:`localStorage`,lookup(e){let{lookupLocalStorage:t}=e;if(t&&Ai())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Ai()&&window.localStorage.setItem(n,e)}},Mi=null,Ni=()=>{if(Mi!==null)return Mi;try{if(Mi=typeof window<`u`&&window.sessionStorage!==null,!Mi)return!1;let e=`i18next.translate.boo`;window.sessionStorage.setItem(e,`foo`),window.sessionStorage.removeItem(e)}catch{Mi=!1}return Mi},Pi={name:`sessionStorage`,lookup(e){let{lookupSessionStorage:t}=e;if(t&&Ni())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Ni()&&window.sessionStorage.setItem(n,e)}},Fi={name:`navigator`,lookup(e){let t=[];if(typeof navigator<`u`){let{languages:e,userLanguage:n,language:r}=navigator;if(e)for(let n=0;n<e.length;n++)t.push(e[n]);n&&t.push(n),r&&t.push(r)}return t.length>0?t:void 0}},Ii={name:`htmlTag`,lookup(e){let{htmlTag:t}=e,n,r=t||(typeof document<`u`?document.documentElement:null);return r&&typeof r.getAttribute==`function`&&(n=r.getAttribute(`lang`)),n}},Li={name:`path`,lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>`u`)return;let n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(Array.isArray(n))return n[typeof t==`number`?t:0]?.replace(`/`,``)}},Ri={name:`subdomain`,lookup(e){let{lookupFromSubdomainIndex:t}=e,n=typeof t==`number`?t+1:1,r=typeof window<`u`&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}},zi=!1;try{document.cookie,zi=!0}catch{}var Bi=[`querystring`,`cookie`,`localStorage`,`sessionStorage`,`navigator`,`htmlTag`];zi||Bi.splice(1,1);var Vi=()=>({order:Bi,lookupQuerystring:`lng`,lookupCookie:`i18next`,lookupLocalStorage:`i18nextLng`,lookupSessionStorage:`i18nextLng`,caches:[`localStorage`],excludeCacheFor:[`cimode`],convertDetectedLanguage:e=>e}),Hi=class{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type=`languageDetector`,this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=xi(t,this.options||{},Vi()),typeof this.options.convertDetectedLanguage==`string`&&this.options.convertDetectedLanguage.indexOf(`15897`)>-1&&(this.options.convertDetectedLanguage=e=>e.replace(`-`,`_`)),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ei),this.addDetector(Di),this.addDetector(ji),this.addDetector(Pi),this.addDetector(Fi),this.addDetector(Ii),this.addDetector(Li),this.addDetector(Ri),this.addDetector(Oi)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(e=>{if(this.detectors[e]){let n=this.detectors[e].lookup(this.options);n&&typeof n==`string`&&(n=[n]),n&&(t=t.concat(n))}}),t=t.filter(e=>e!=null&&!Si(e)).map(e=>this.options.convertDetectedLanguage(e)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(t=>{this.detectors[t]&&this.detectors[t].cacheUserLanguage(e,this.options)}))}};Hi.type=`languageDetector`;var Ui={actions:{save:`Save`,saveAs:`Save As`,cancel:`Cancel`,ok:`OK`,open:`Open`,close:`Close`,delete:`Delete`,create:`Create`,new:`New`,exit:`Exit`,apply:`Apply`,discard:`Discard`,reset:`Reset`,download:`Download`,upload:`Upload`,copy:`Copy`,cut:`Cut`,paste:`Paste`,undo:`Undo`,redo:`Redo`,createFolder:`Create folder`,createFile:`Create new file`,select:`Select`},buttons:{minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`,yes:`Yes`,no:`No`,confirm:`Confirm`,continue:`Continue`},labels:{name:`Name`,title:`Title`,filename:`Filename`,url:`URL`,file:`File`,folder:`Folder`,home:`Home`,type:`Type`,loading:`Loading...`,search:`Search`,searchIcons:`Search icons...`,unsavedChanges:`Unsaved Changes`,unsaved:`Unsaved changes`,workInProgress:`Work In Progress`},messages:{areYouSure:`Are you sure?`,cannotBeUndone:`This action cannot be undone.`,noFileSelected:`No file selected`,folderEmpty:`This folder is empty`,noMatchingFiles:`No matching files`,noSubfolders:`No subfolders`,replaceFile:`Replace file?`,replaceFileMessage:`A file named "{{name}}" already exists. Do you want to replace it?`,yesReplace:`Yes, replace`,forBetterExperience:`For a better experience use this app desktop OR horizontal mode`,turnYourDevice:`Turn your device`,continueVertically:`Continue vertically?`},theme:{light:`Light`,dark:`Dark`,system:`System`,custom:`Custom`,switchToLight:`Switch to light mode`,switchToDark:`Switch to dark mode`},status:{error:`error`,success:`success`},menu:{file:`File`,edit:`Edit`,view:`View`},filePicker:{folderTreeAria:`Folder tree`,filesAria:`Files`,foldersAria:`Folders`,cancelAria:`Cancel`,openSelectedAria:`Open selected file`,fileNameAria:`File name`},externalLink:{securityMessage:`blocks embedding in iframes for security reasons.`,goToProfile:`Click below to go to my {{name}} profile.`},taskbar:{ariaLabel:`Taskbar`},launcher:{label:`Launcher`,ariaLabel:`App launcher`,selectedIcon:`Selected: {{icon}}`}},Wi={names:{notepad:`Notepad`,terminal:`Terminal`,filesApp:`Files`,files:`Files`,uploader:`Uploader`,settings:`Settings`,pdfViewer:`PDF Viewer`,calendar:`Calendar`,storybook:`Storybook`,linkedin:`LinkedIn`,github:`GitHub`,imageViewer:`Image Viewer`,dosEmulator:`DOS Emulator`,doom:`DOOM`,deviceInfo:`Device Info`,welcome:`Welcome`,menuedit:`Edit Launcher`,codeServer:`VS Code`},folders:{socialLinks:`Social Links`,office:`Office and media`,programming:`Programming`,games:`Games`,customApps:`Custom Apps`},descriptions:{notepad:`Markdown editor with rich text toolbar`,terminal:`Terminal emulator`,filesApp:`File explorer`,settings:`System settings`,pdfViewer:`PDF document viewer`,calendar:`Calendar view`,storybook:`Storybook playground`,linkedin:`LinkedIn profile link`,github:`GitHub profile link`,imageViewer:`Image viewer with file picker`,dosEmulator:`DOS game and program emulator`,doom:`Play the classic DOOM game`},launcher:{label:`Launcher`,ariaLabel:`App launcher`},imageViewer:{noImage:`No image to display. Please open one.`,fitToWindow:`Fit to window`,zoom:`Zoom`},pdf:{viewer:`PDF viewer`},dosEmulator:{noBundle:`No DOS program loaded. Open a .jsdos bundle to start.`,loading:`Loading DOS emulator...`,controls:{pause:`Pause`,resume:`Resume`,restart:`Restart`,mute:`Mute`,unmute:`Unmute`,fullscreen:`Fullscreen`},menu:{file:`File`,open:`Open Bundle`,restart:`Restart`,exit:`Exit`,emulation:`Emulation`,pause:`Pause`,resume:`Resume`,audio:`Audio`,mute:`Mute`,unmute:`Unmute`,volume:`Volume`},errors:{failedToLoad:`Failed to load DOS bundle`,notSupported:`DOS emulation is not supported in this browser`}},uploader:{clickToUpload:`Click here to upload`,selectDestination:`Select destination folder`,fileInfo:`File: {{name}} ({{size}})`,uploading:`Uploading...`,uploadProgress:`Upload progress`,uploadComplete:`Upload complete!`,uploadFailed:`Upload wasn't successful for the following reason`,readyToUpload:`Ready to upload`,showFile:`Show in Files`,openFile:`Open file`,upload:`Upload`,stepSelect:`Select`,stepDestination:`Destination`,stepUpload:`Upload`,stepDone:`Done`,folderSelected:`Folder selected`,uploadTo:`Destination`,uploadToRoot:`Uploading to root folder`},terminal:{notAvailable:`Terminal Not Available`,notAvailableMessage:`The terminal cannot be used because this environment does not currently allow terminal access.`,dockerRequired:`Please run in Docker mode to use the terminal.`,offlineTitle:`Terminal Unavailable`,offlineMessage:`The terminal requires a Docker environment to function. It connects directly to the container's shell.`,offlineInstructions:`To use the terminal, run the application in Docker mode:`,dockerCommand:`docker compose up dev`,openWelcome:`Open Welcome App`,connecting:`Connecting...`,connected:`Connected`,disconnected:`Disconnected`,connectionError:`Connection error`,menu:{edit:`Edit`,copy:`Copy`,paste:`Paste`,clear:`Clear`,reset:`Reset`,reconnect:`Reconnect`,exit:`Exit`},scrollback:`Lines`,shell:`Shell`},codeServer:{notAvailable:`VS Code Not Available`,notAvailableMessage:`VS Code (code-server) cannot be used in browser mode.`,dockerRequired:`Please run in Docker to use VS Code.`}},Gi={sections:{wallpaper:{label:`Wallpaper`,description:`Change the desktop background image.`},appearance:{label:`Appearance`,description:`Switch between light and dark mode.`},launcher:{label:`Launcher`,description:`Choose the launcher button icon.`},font:{label:`Font`,description:`Select the system font family.`},reset:{label:`Reset to Default`,description:`Reset all settings and data to defaults.`},language:{label:`Language`,description:`Choose your preferred language.`}},wallpaper:{title:`Wallpaper`,wallpaperType:`Wallpaper Type`,staticImage:`Static Image`,chooseFromImages:`Choose from Images`,uploadFromDisk:`Upload from disk`,resetToDefault:`Reset to default`,orEnterUrl:`Or enter a URL`,wallpaperPreview:`Wallpaper preview`},appearance:{title:`Appearance`,description:`Choose whether the desktop uses a light or dark theme, or follows the system preference.`,taskbar:`Taskbar`,window:`Window`,accent:`Accent`,animationDuration:`Animation Duration`,animationDescription:`Controls the speed of window open/close animations (0.1s - 1.0s) must save to see changes.`},font:{title:`Font`,description:`Changes the font across the entire desktop interface. Fonts must be downloaded before use.`,download:`Download`,fontSize:`Font Size`,downloadByName:`Download a font by name`,fromGoogleFonts:`(From Google Fonts)`,downloadError:`Font didn't download successfully. Try again with the correct name`,downloadSuccess:`Downloaded successfully.`,systemDefault:`System Default`},reset:{title:`Reset to Default`,description:`Reset all settings and data to their default values. This action cannot be undone.`,resetButton:`⚠️ Reset app to defaults?`,modalTitle:`Are you sure?`,modalDescription:`This will erase all your data and settings.`,goBack:`Please go back! 🙏`,burnEverything:`Yes, burn everything! 🔥`,keepFiles:`Yes, but keep my files`},language:{title:`Language`,description:`Select your preferred language for the desktop interface.`,selectPlaceholder:`Select language`,english:`English`,spanish:`Español`},all:`All Settings`},Ki={window:{title:`Window`,minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`,ariaLabels:{minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`}},unsavedModal:{title:`Unsaved Changes`,message:`You have unsaved changes. What would you like to do?`,dontSave:`Don't Save`,save:`Save`},fileDialog:{openFile:`Open file`,saveFile:`Save file`,selectFile:`Select file {{name}}`,openFolder:`Open folder {{name}}`,selectFolder:`Select folder`,filename:`filename.md`}},qi={window:{minimize:`Minimize`,restore:`Restore`,maximize:`Maximize`,close:`Close window`},actions:{cut:`Cut`,copy:`Copy`,paste:`Paste`,pasteItems:`Paste ({{count}} items)`,delete:`Delete`,createFolder:`Create folder`,createFile:`Create new file`},createItem:{folderTitle:`Create Folder`,fileTitle:`Create File`,newFolder:`New Folder`,newFile:`New File`,nameError:`There is already a {{mode}} with that name`,clearNameAria:`Clear name`,customIcon:`Choose custom icon or color`,colorError:`Enter a valid hex color (e.g. #ff0000)`,changeLater:`You can change the icon later in folder properties.`},deleteConfirm:{title:`Delete "{{name}}"?`,message:`Are you sure you want to delete "{{name}}"? This action cannot be undone.`},app:{open:`Open {{name}}`,toggleTheme:`Toggle Theme`},sort:{title:`Sort Icons`,default:`Default`,nameAsc:`Name (A-Z)`,nameDesc:`Name (Z-A)`,byType:`By Type`},launcher:{title:`Launcher`,editLauncher:`Edit Launcher`}},Ji={empty:{title:`There are no new notifications`,message:`For now`},taskbar:{showNotifications:`Show notifications`,hideNotifications:`Hide notifications`,clock:`clock`}},Yi={toolbar:{formatting:`Text formatting`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,inlineCode:`Inline code`,heading1:`Heading 1`,heading2:`Heading 2`,bulletList:`Bullet list`,orderedList:`Ordered list`,blockquote:`Blockquote`,codeBlock:`Code block`,horizontalRule:`Horizontal rule`},untitled:`untitled.md`},Xi={hero:{title:`Fullstack Developer & DevOps`,downloadCV:`Download CV`,contactMe:`Contact Me`},skills:{technical:`Technical Skills`,soft:`Soft Skills`},experience:`Professional Experience`,techStack:`Tech Stack`,languages:`Languages`},Zi={title:`Edit Launcher`,newFolder:`New Folder`,predefined:`Predefined`,rename:`Rename`,delete:`Delete`,predefinedFolders:`Predefined Folders`,customFolders:`Custom Folders`,availableApps:`Available Apps (drag and drop to add to folder)`,clickToAdd:`Click to add to first custom folder`,addFolder:`Add folder`,instructions:`Right-click an app in a folder to remove it. Click an available app to add it to the first custom folder.`,canCreateNewFolder:`You can create new folders if needed.`},Qi={actions:{save:`Guardar`,saveAs:`Guardar como`,cancel:`Cancelar`,ok:`Aceptar`,open:`Abrir`,close:`Cerrar`,delete:`Eliminar`,create:`Crear`,new:`Nuevo`,exit:`Salir`,apply:`Aplicar`,discard:`Descartar`,reset:`Restablecer`,download:`Descargar`,upload:`Subir`,copy:`Copiar`,cut:`Cortar`,paste:`Pegar`,undo:`Deshacer`,redo:`Rehacer`,createFolder:`Crear carpeta`,createFile:`Crear nuevo archivo`,select:`Seleccionar`},buttons:{minimize:`Minimizar`,maximize:`Maximizar`,restore:`Restaurar`,close:`Cerrar`,yes:`Sí`,no:`No`,confirm:`Confirmar`,continue:`Continuar`},labels:{name:`Nombre`,title:`Título`,filename:`Nombre de archivo`,url:`URL`,file:`Archivo`,folder:`Carpeta`,home:`Inicio`,type:`Tipo`,loading:`Cargando...`,search:`Buscar`,searchIcons:`Buscar iconos...`,unsavedChanges:`Cambios sin guardar`,unsaved:`Cambios sin guardar`,workInProgress:`Trabajo en progreso`},messages:{areYouSure:`¿Estás seguro?`,cannotBeUndone:`Esta acción no se puede deshacer.`,noFileSelected:`Ningún archivo seleccionado`,folderEmpty:`Esta carpeta está vacía`,noMatchingFiles:`No hay archivos coincidentes`,noSubfolders:`Sin subcarpetas`,replaceFile:`¿Reemplazar archivo?`,replaceFileMessage:`Ya existe un archivo llamado "{{name}}". ¿Deseas reemplazarlo?`,yesReplace:`Sí, reemplazar`,forBetterExperience:`Para una mejor experiencia usa esta aplicación en modo escritorio u horizontal`,turnYourDevice:`Gira tu dispositivo`,continueVertically:`¿Continuar verticalmente?`},theme:{light:`Claro`,dark:`Oscuro`,system:`Sistema`,custom:`Personalizado`,switchToLight:`Cambiar a modo claro`,switchToDark:`Cambiar a modo oscuro`},status:{error:`error`,success:`éxito`},menu:{file:`Archivo`,edit:`Editar`,view:`Ver`},filePicker:{folderTreeAria:`Árbol de carpetas`,filesAria:`Archivos`,foldersAria:`Carpetas`,cancelAria:`Cancelar`,openSelectedAria:`Abrir archivo seleccionado`,fileNameAria:`Nombre de archivo`},externalLink:{securityMessage:`bloquea la incrustación en iframes por razones de seguridad.`,goToProfile:`Haz clic abajo para ir a mi perfil de {{name}}.`},taskbar:{ariaLabel:`Barra de tareas`},launcher:{label:`Lanzador`,ariaLabel:`Lanzador de aplicaciones`,selectedIcon:`Seleccionado: {{icon}}`}},$i={names:{notepad:`Bloc de notas`,terminal:`Terminal`,filesApp:`Archivos`,files:`Archivos`,uploader:`Subida de archivos`,settings:`Ajustes`,pdfViewer:`Visor PDF`,calendar:`Calendario`,storybook:`Storybook`,linkedin:`LinkedIn`,github:`GitHub`,imageViewer:`Visor de imágenes`,dosEmulator:`Emulador DOS`,doom:`DOOM`,deviceInfo:`Info del dispositivo`,welcome:`Bienvenido`,menuedit:`Editar lanzador`,codeServer:`VS Code`},folders:{socialLinks:`Enlaces sociales`,office:`Oficina y medios`,programming:`Programación`,games:`Juegos`,customApps:`Aplicaciones personalizadas`},descriptions:{notepad:`Editor Markdown con barra de herramientas`,terminal:`Emulador de terminal`,filesApp:`Explorador de archivos`,settings:`Ajustes del sistema`,pdfViewer:`Visor de documentos PDF`,calendar:`Vista de calendario`,storybook:`Zona de pruebas Storybook`,linkedin:`Enlace al perfil de LinkedIn`,github:`Enlace al perfil de GitHub`,imageViewer:`Visor de imágenes con selector de archivos`,dosEmulator:`Emulador de juegos y programas DOS`,doom:`Juega al clásico DOOM`},launcher:{label:`Lanzador`,ariaLabel:`Lanzador de aplicaciones`},imageViewer:{noImage:`Sin imagen para mostrar. Por favor, abre una.`,fitToWindow:`Ajustar a ventana`,zoom:`Zoom`},pdf:{viewer:`Visor PDF`},dosEmulator:{noBundle:`Ningún programa DOS cargado. Abre un bundle .jsdos para comenzar.`,loading:`Cargando emulador DOS...`,controls:{pause:`Pausar`,resume:`Reanudar`,restart:`Reiniciar`,mute:`Silenciar`,unmute:`Activar sonido`,fullscreen:`Pantalla completa`},menu:{file:`Archivo`,open:`Abrir Bundle`,restart:`Reiniciar`,exit:`Salir`,emulation:`Emulación`,pause:`Pausar`,resume:`Reanudar`,audio:`Audio`,mute:`Silenciar`,unmute:`Activar sonido`,volume:`Volumen`},errors:{failedToLoad:`Error al cargar el bundle DOS`,notSupported:`La emulación DOS no está soportada en este navegador`}},uploader:{clickToUpload:`Haz clic aquí para subir`,selectDestination:`Seleccionar carpeta destino`,fileInfo:`Archivo: {{name}} ({{size}})`,uploading:`Subiendo...`,uploadProgress:`Progreso de subida`,uploadComplete:`¡Subida completada!`,uploadFailed:`La subida no fue exitosa por la siguiente razón`,readyToUpload:`Listo para subir`,showFile:`Mostrar en Archivos`,openFile:`Abrir archivo`,upload:`Subir`,stepSelect:`Seleccionar`,stepDestination:`Destino`,stepUpload:`Subir`,stepDone:`Listo`,folderSelected:`Carpeta seleccionada`,uploadTo:`Destino`,uploadToRoot:`Subiendo a la carpeta raíz`},terminal:{notAvailable:`Terminal no disponible`,notAvailableMessage:`La terminal no puede usarse porque este entorno no permite actualmente el acceso a terminal.`,dockerRequired:`Por favor, ejecuta en modo Docker para usar la terminal.`,offlineTitle:`Terminal no disponible`,offlineMessage:`La terminal requiere un entorno Docker para funcionar. Se conecta directamente al shell del contenedor.`,offlineInstructions:`Para usar la terminal, ejecuta la aplicación en modo Docker:`,dockerCommand:`docker compose up dev`,openWelcome:`Abrir Bienvenida`,connecting:`Conectando...`,connected:`Conectado`,disconnected:`Desconectado`,connectionError:`Error de conexión`,menu:{edit:`Editar`,copy:`Copiar`,paste:`Pegar`,clear:`Limpiar`,reset:`Reiniciar`,reconnect:`Reconectar`,exit:`Salir`},scrollback:`Líneas`,shell:`Shell`},codeServer:{notAvailable:`VS Code no disponible`,notAvailableMessage:`VS Code (code-server) no puede usarse en modo navegador.`,dockerRequired:`Por favor, ejecuta la aplicación en Docker para usar VS Code.`}},ea={sections:{wallpaper:{label:`Fondo de pantalla`,description:`Cambia la imagen de fondo del escritorio.`},appearance:{label:`Apariencia`,description:`Cambia entre modo claro y oscuro.`},launcher:{label:`Lanzador`,description:`Elige el icono del botón del lanzador.`},font:{label:`Fuente`,description:`Selecciona la familia de fuentes del sistema.`},reset:{label:`Restablecer`,description:`Restaura todos los ajustes y datos a sus valores por defecto.`},language:{label:`Idioma`,description:`Elige tu idioma preferido.`}},wallpaper:{title:`Fondo de pantalla`,wallpaperType:`Tipo de fondo`,staticImage:`Imagen estática`,chooseFromImages:`Elegir de imágenes`,uploadFromDisk:`Subir desde disco`,resetToDefault:`Restablecer por defecto`,orEnterUrl:`O introduce una URL`,wallpaperPreview:`Vista previa del fondo`},appearance:{title:`Apariencia`,description:`Elige si el escritorio usa un tema claro u oscuro, o sigue la preferencia del sistema.`,taskbar:`Barra de tareas`,window:`Ventana`,accent:`Acento`,animationDuration:`Duración de animación`,animationDescription:`Controla la velocidad de las animaciones de abrir/cerrar ventanas (0.1s - 1.0s), debes guardar para ver los cambios.`},font:{title:`Fuente`,description:`Cambia la fuente en toda la interfaz del escritorio. Las fuentes deben descargarse antes de usar.`,download:`Descargar`,fontSize:`Tamaño de fuente`,downloadByName:`Descargar una fuente por nombre`,fromGoogleFonts:`(Desde Google Fonts)`,downloadError:`La fuente no se descargó correctamente. Intenta de nuevo con el nombre correcto`,downloadSuccess:`Descargada correctamente.`,systemDefault:`Sistema por defecto`},reset:{title:`Restablecer`,description:`Restaura todos los ajustes y datos a sus valores por defecto. Esta acción no se puede deshacer.`,resetButton:`⚠️ ¿Restablecer la app?`,modalTitle:`¿Estás seguro?`,modalDescription:`Esto borrará todos tus datos y ajustes.`,goBack:`¡Por favor vuelve atrás! 🙏`,burnEverything:`¡Sí, quémalo todo! 🔥`,keepFiles:`Sí, pero mantener mis archivos`},language:{title:`Idioma`,description:`Selecciona tu idioma preferido para la interfaz del escritorio.`,selectPlaceholder:`Selecciona idioma`,english:`English`,spanish:`Español`},all:`Todos los ajustes`},ta={window:{title:`Ventana`,minimize:`Minimizar`,maximize:`Maximizar`,restore:`Restaurar`,close:`Cerrar`,ariaLabels:{minimize:`Minimizar`,maximize:`Maximizar`,restore:`Restaurar`,close:`Cerrar`}},unsavedModal:{title:`Cambios sin guardar`,message:`Tienes cambios sin guardar. ¿Qué deseas hacer?`,dontSave:`No guardar`,save:`Guardar`},fileDialog:{openFile:`Abrir archivo`,saveFile:`Guardar archivo`,selectFile:`Seleccionar archivo {{name}}`,openFolder:`Abrir carpeta {{name}}`,selectFolder:`Seleccionar carpeta`,filename:`nombre.md`}},na={window:{minimize:`Minimizar`,restore:`Restaurar`,maximize:`Maximizar`,close:`Cerrar ventana`},actions:{cut:`Cortar`,copy:`Copiar`,paste:`Pegar`,pasteItems:`Pegar ({{count}} elementos)`,delete:`Eliminar`,createFolder:`Crear carpeta`,createFile:`Crear nuevo archivo`},createItem:{folderTitle:`Crear Carpeta`,fileTitle:`Crear Archivo`,newFolder:`Nueva Carpeta`,newFile:`Nuevo Archivo`,nameError:`Ya existe un {{mode}} con ese nombre`,clearNameAria:`Limpiar nombre`,customIcon:`Elige icono o color personalizado`,colorError:`Introduce un color hexadecimal válido (ej. #ff0000)`,changeLater:`Puedes cambiar el icono más tarde en las propiedades de la carpeta.`},deleteConfirm:{title:`¿Eliminar "{{name}}"?`,message:`¿Estás seguro de que quieres eliminar "{{name}}"? Esta acción no se puede deshacer.`},app:{open:`Abrir {{name}}`,toggleTheme:`Cambiar Tema`},sort:{title:`Ordenar Iconos`,default:`Por defecto`,nameAsc:`Nombre (A-Z)`,nameDesc:`Nombre (Z-A)`,byType:`Por Tipo`},launcher:{title:`Launcher`,editLauncher:`Editar Launcher`}},ra={empty:{title:`No hay notificaciones nuevas`,message:`Por ahora`},taskbar:{showNotifications:`Mostrar notificaciones`,hideNotifications:`Ocultar notificaciones`,clock:`reloj`}},ia={toolbar:{formatting:`Formato de texto`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,inlineCode:`Código en línea`,heading1:`Título 1`,heading2:`Título 2`,bulletList:`Lista con viñetas`,orderedList:`Lista ordenada`,blockquote:`Cita`,codeBlock:`Bloque de código`,horizontalRule:`Línea horizontal`},untitled:`sin-titulo.md`},aa={hero:{title:`Fullstack Developer & DevOps`,downloadCV:`Descargar CV`,contactMe:`Contactar`},skills:{technical:`Habilidades Técnicas`,soft:`Habilidades Blandas`},experience:`Experiencia Profesional`,techStack:`Stack Tecnológico`,languages:`Idiomas`},oa={newFolder:`Nueva Carpeta`,predefined:`Predefinida`,rename:`Renombrar`,delete:`Eliminar`,predefinedFolders:`Carpetas Predefinidas`,customFolders:`Carpetas Personalizadas`,availableApps:`Apps Disponibles (arrastrar y soltar para añadir a carpetas)`,clickToAdd:`Clic para añadir a la primera carpeta personalizada`,addFolder:`Añadir carpeta`,instructions:`Clic derecho en una app dentro de una carpeta para eliminarla. Clic en una app disponible para añadirla a la primera carpeta personalizada.`,canCreateNewFolder:`Puedes crear una nueva carpeta si lo necesitas.`},sa=[`en`,`es`];J.use(Hi).use(D.r).init({resources:{en:{common:Ui,apps:Wi,settings:Gi,window:Ki,contextMenu:qi,notifications:Ji,notes:Yi,welcome:Xi,menuedit:Zi},es:{common:Qi,apps:$i,settings:ea,window:ta,contextMenu:na,notifications:ra,notes:ia,welcome:aa,menuedit:oa}},fallbackLng:`en`,supportedLngs:sa,ns:[`common`,`apps`,`settings`,`window`,`contextMenu`,`notifications`,`notes`,`welcome`,`menuedit`],defaultNS:`common`,interpolation:{escapeValue:!1},detection:{order:[`localStorage`,`navigator`],lookupLocalStorage:`fde-desktop:language`,caches:[`localStorage`]}});var ca=J,la={root:`_root_17um1_1`,windowButton:`_windowButton_17um1_15`,systemTray:`_systemTray_17um1_44`,themeToggle:`_themeToggle_17um1_51`,clock:`_clock_17um1_70`,notifButton:`_notifButton_17um1_88`,langButton:`_langButton_17um1_109`},ua={en:`English`,es:`Español`},da=()=>{let{t:e,i18n:t}=D.t(`settings`),n=c.h(e=>e.language),r=c.h(e=>e.setLanguage),[i,a]=(0,B.useState)(!1),s=(0,B.useCallback)(e=>{r(e),t.changeLanguage(e),localStorage.setItem(`fde-desktop:language`,e),a(!1)},[r,t]);return(0,V.jsxs)(o.n,{opened:i,onChange:a,position:`top-end`,shadow:`md`,withArrow:!0,children:[(0,V.jsx)(o.n.Target,{children:(0,V.jsx)(f.t,{className:la.langButton,onClick:()=>a(e=>!e),"aria-label":e(`language.selectPlaceholder`),"aria-expanded":i,children:(0,V.jsx)(c.p,{lang:n,size:16})})}),(0,V.jsx)(o.n.Dropdown,{children:(0,V.jsx)(C.t,{gap:`xs`,children:sa.map(e=>(0,V.jsx)(f.t,{onClick:()=>s(e),"aria-label":ua[e],"aria-pressed":e===n,style:{padding:`8px 12px`,borderRadius:6,width:`100%`,background:e===n?`var(--mantine-primary-color-light)`:`transparent`,cursor:`pointer`},children:(0,V.jsxs)(h.t,{gap:`sm`,children:[(0,V.jsx)(c.p,{lang:e,size:20}),(0,V.jsx)(g.o,{size:`sm`,fw:e===n?600:400,children:ua[e]})]})},e))})})]})},fa=({win:e,onClick:t,onContextMenu:n})=>{let r=(0,B.useRef)(null),{register:i,unregister:a}=Jn();return(0,B.useEffect)(()=>(r.current&&i(e.id,r.current.getBoundingClientRect()),()=>a(e.id)),[e.id,i,a]),(0,V.jsxs)(`button`,{ref:r,className:la.windowButton,"data-active":e.state===`minimized`?`false`:`true`,onClick:t,onContextMenu:n,"aria-label":e.title,children:[(0,V.jsx)(y.t,{fcIcon:e.fcIcon,iconUrl:e.iconUrl,fallback:e.icon,size:14,color:e.iconColor}),(0,V.jsx)(g.o,{size:`xs`,truncate:!0,children:e.title})]})},pa=({calendarSlot:e})=>{let{t}=D.t(`notifications`),n=c.h(e=>e.theme.colors.taskbar),r=c.h(e=>e.theme.mode),i=c.h(e=>e.toggleTheme),a=c.h(e=>e.launcherIcon),s=w.o(e=>e.notifications),l=w.o(e=>e.removeNotification),u=w.o(e=>e.windows),d=w.o(e=>e.restoreWindow),f=w.o(e=>e.minimizeWindow),p=w.o(e=>e.focusWindow),m=w.o(e=>e.closeWindow),h=w.o(e=>e.maximizeWindow),_=Zr(),[v,b]=(0,B.useState)(!1),[x,S]=(0,B.useState)(!1),{position:C,targetWindowId:T,windowMenuOpened:E,panelMenuOpened:O,launcherMenuOpened:k,openWindowMenu:A,openPanelMenu:j,openLauncherMenu:M,closeMenu:N}=ei(),P=T?u.find(e=>e.id===T)?.state??null:null,F=(0,B.useRef)(0);(0,B.useEffect)(()=>{s.length>F.current&&setTimeout(()=>S(!0),0),F.current=s.length},[s.length]);let I=u.filter(e=>e.isOpen),L=(e,t)=>{t===`minimized`?(d(e),p(e)):f(e)};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:la.root,style:{background:n},role:`toolbar`,"aria-label":`Taskbar`,onContextMenu:j,children:[(0,V.jsx)(pi,{fcIcon:a,onContextMenu:M}),I.map(e=>(0,V.jsx)(fa,{win:e,onClick:()=>L(e.id,e.state),onContextMenu:t=>A(t,e.id)},e.id)),(0,V.jsxs)(`div`,{className:la.systemTray,"data-testid":`system-tray`,children:[(0,V.jsxs)(o.n,{opened:x,onChange:S,position:`top-end`,shadow:`md`,withArrow:!0,keepMounted:!0,children:[(0,V.jsx)(o.n.Target,{children:(0,V.jsx)(`button`,{className:la.notifButton,onClick:()=>S(e=>!e),"aria-label":t(x?`taskbar.hideNotifications`:`taskbar.showNotifications`),children:(0,V.jsx)(y.t,{fcIcon:x?`FcCollapse`:`FcExpand`,size:18})})}),(0,V.jsx)(o.n.Dropdown,{style:{background:`transparent`,border:`none`,padding:0},children:(0,V.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,minWidth:300},children:s.length===0?(0,V.jsx)(Tn,{title:t(`empty.title`),onClose:()=>S(!1),children:t(`empty.message`)}):s.map(e=>(0,V.jsx)(Tn,{withBorder:!0,icon:e.fcIcon?(0,V.jsx)(y.t,{fcIcon:e.fcIcon,size:18}):void 0,title:e.title,onClose:()=>{l(e.id),e.onClose?.()},children:e.message},e.id))})})]}),(0,V.jsx)(da,{}),(0,V.jsx)(`button`,{className:la.themeToggle,onClick:i,"aria-label":t(r===`dark`?`theme.switchToLight`:`theme.switchToDark`,{ns:`common`}),title:t(r===`dark`?`theme.switchToLight`:`theme.switchToDark`,{ns:`common`}),children:r===`dark`?`☀️`:`🌙`}),(0,V.jsxs)(o.n,{opened:v,onChange:b,position:`top-end`,shadow:`md`,withArrow:!0,children:[(0,V.jsx)(o.n.Target,{children:(0,V.jsx)(`button`,{className:la.clock,onClick:()=>b(e=>!e),"aria-label":t(`taskbar.clock`),"aria-expanded":v,children:(0,V.jsx)(g.o,{size:`xs`,children:_})})}),(0,V.jsx)(o.n.Dropdown,{children:e})]})]})]}),(0,V.jsx)(vi,{windowMenuOpened:E,panelMenuOpened:O,launcherMenuOpened:k,menuPosition:C,targetWindowId:T,targetWindowState:P,onCloseWindow:m,onMinimizeWindow:f,onMaximizeWindow:h,onRestoreWindow:d,onClose:N})]})},ma=e.t((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),ha=e.t((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,M=o,N=a,P=f,F=!1;function I(e){return F||(F=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),L(e)||x(e)===l}function L(e){return x(e)===u}function ee(e){return x(e)===c}function R(e){return x(e)===s}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function ne(e){return x(e)===d}function z(e){return x(e)===i}function re(e){return x(e)===h}function ie(e){return x(e)===m}function ae(e){return x(e)===r}function oe(e){return x(e)===o}function se(e){return x(e)===a}function B(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=D,e.Fragment=O,e.Lazy=k,e.Memo=A,e.Portal=j,e.Profiler=M,e.StrictMode=N,e.Suspense=P,e.isAsyncMode=I,e.isConcurrentMode=L,e.isContextConsumer=ee,e.isContextProvider=R,e.isElement=te,e.isForwardRef=ne,e.isFragment=z,e.isLazy=re,e.isMemo=ie,e.isPortal=ae,e.isProfiler=oe,e.isStrictMode=se,e.isSuspense=B,e.isValidElementType=b,e.typeOf=x})()})),ga=e.t(((e,t)=>{process.env.NODE_ENV===`production`?t.exports=ma():t.exports=ha()})),_a=e.t(((e,t)=>{var n=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String(`abc`);if(e[5]=`de`,Object.getOwnPropertyNames(e)[0]===`5`)return!1;for(var t={},n=0;n<10;n++)t[`_`+String.fromCharCode(n)]=n;if(Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(``)!==`0123456789`)return!1;var r={};return`abcdefghijklmnopqrst`.split(``).forEach(function(e){r[e]=e}),Object.keys(Object.assign({},r)).join(``)===`abcdefghijklmnopqrst`}catch{return!1}}t.exports=o()?Object.assign:function(e,t){for(var o,s=a(e),c,l=1;l<arguments.length;l++){for(var u in o=Object(arguments[l]),o)r.call(o,u)&&(s[u]=o[u]);if(n){c=n(o);for(var d=0;d<c.length;d++)i.call(o,c[d])&&(s[c[d]]=o[c[d]])}}return s}})),va=e.t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),ya=e.t(((e,t)=>{t.exports=Function.call.bind(Object.prototype.hasOwnProperty)})),ba=e.t(((e,t)=>{var n=function(){};if(process.env.NODE_ENV!==`production`){var r=va(),i={},a=ya();n=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}}}function o(e,t,o,s,c){if(process.env.NODE_ENV!==`production`){for(var l in e)if(a(e,l)){var u;try{if(typeof e[l]!=`function`){var d=Error((s||`React class`)+`: `+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name=`Invariant Violation`,d}u=e[l](t,l,s,o,null,r)}catch(e){u=e}if(u&&!(u instanceof Error)&&n((s||`React class`)+`: type specification of `+o+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+`. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).`),u instanceof Error&&!(u.message in i)){i[u.message]=!0;var f=c?c():``;n(`Failed `+o+` type: `+u.message+(f??``))}}}}o.resetWarningCache=function(){process.env.NODE_ENV!==`production`&&(i={})},t.exports=o})),xa=e.t(((e,t)=>{var n=ga(),r=_a(),i=va(),a=ya(),o=ba(),s=function(){};process.env.NODE_ENV!==`production`&&(s=function(e){var t=`Warning: `+e;typeof console<`u`&&console.error(t);try{throw Error(t)}catch{}});function c(){return null}t.exports=function(e,t){var l=typeof Symbol==`function`&&Symbol.iterator,u=`@@iterator`;function d(e){var t=e&&(l&&e[l]||e[u]);if(typeof t==`function`)return t}var f=`<<anonymous>>`,p={array:_(`array`),bigint:_(`bigint`),bool:_(`boolean`),func:_(`function`),number:_(`number`),object:_(`object`),string:_(`string`),symbol:_(`symbol`),any:v(),arrayOf:y,element:b(),elementType:x(),instanceOf:S,node:E(),objectOf:w,oneOf:C,oneOfType:T,shape:O,exact:k};function m(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}function h(e,t){this.message=e,this.data=t&&typeof t==`object`?t:{},this.stack=``}h.prototype=Error.prototype;function g(e){if(process.env.NODE_ENV!==`production`)var n={},r=0;function a(a,o,c,l,u,d,p){if(l||=f,d||=c,p!==i){if(t){var m=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name=`Invariant Violation`,m}else if(process.env.NODE_ENV!==`production`&&typeof console<`u`){var g=l+`:`+c;!n[g]&&r<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[g]=!0,r++)}}return o[c]==null?a?o[c]===null?new h(`The `+u+" `"+d+"` is marked as required "+("in `"+l+"`, but its value is `null`.")):new h(`The `+u+" `"+d+"` is marked as required in "+("`"+l+"`, but its value is `undefined`.")):null:e(o,c,l,u,d)}var o=a.bind(null,!1);return o.isRequired=a.bind(null,!0),o}function _(e){function t(t,n,r,i,a,o){var s=t[n];if(M(s)!==e){var c=N(s);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."),{expectedType:e})}return null}return g(t)}function v(){return g(c)}function y(e){function t(t,n,r,a,o){if(typeof e!=`function`)return new h("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s)){var c=M(s);return new h(`Invalid `+a+" `"+o+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<s.length;l++){var u=e(s,l,r,a,o+`[`+l+`]`,i);if(u instanceof Error)return u}return null}return g(t)}function b(){function t(t,n,r,i,a){var o=t[n];if(!e(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return g(t)}function x(){function e(e,t,r,i,a){var o=e[t];if(!n.isValidElementType(o)){var s=M(o);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected a single ReactElement type."))}return null}return g(e)}function S(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var o=e.name||f,s=F(t[n]);return new h(`Invalid `+i+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+o+"`."))}return null}return g(t)}function C(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&(arguments.length>1?s(`Invalid arguments supplied to oneOf, expected an array, got `+arguments.length+` arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).`):s(`Invalid argument supplied to oneOf, expected an array.`)),c;function t(t,n,r,i,a){for(var o=t[n],s=0;s<e.length;s++)if(m(o,e[s]))return null;var c=JSON.stringify(e,function(e,t){return N(t)===`symbol`?String(t):t});return new h(`Invalid `+i+" `"+a+"` of value `"+String(o)+"` "+("supplied to `"+r+"`, expected one of "+c+`.`))}return g(t)}function w(e){function t(t,n,r,o,s){if(typeof e!=`function`)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],l=M(c);if(l!==`object`)return new h(`Invalid `+o+" `"+s+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var u in c)if(a(c,u)){var d=e(c,u,r,o,s+`.`+u,i);if(d instanceof Error)return d}return null}return g(t)}function T(e){if(!Array.isArray(e))return process.env.NODE_ENV!==`production`&&s(`Invalid argument supplied to oneOfType, expected an instance of array.`),c;for(var t=0;t<e.length;t++){var n=e[t];if(typeof n!=`function`)return s(`Invalid argument supplied to oneOfType. Expected an array of check functions, but received `+P(n)+` at index `+t+`.`),c}function r(t,n,r,o,s){for(var c=[],l=0;l<e.length;l++){var u=e[l],d=u(t,n,r,o,s,i);if(d==null)return null;d.data&&a(d.data,`expectedType`)&&c.push(d.data.expectedType)}var f=c.length>0?`, expected one of type [`+c.join(`, `)+`]`:``;return new h(`Invalid `+o+" `"+s+"` supplied to "+("`"+r+"`"+f+`.`))}return g(r)}function E(){function e(e,t,n,r,i){return A(e[t])?null:new h(`Invalid `+r+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return g(e)}function D(e,t,n,r,i){return new h((e||`React class`)+`: `+t+" type `"+n+`.`+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function O(e){function t(t,n,r,a,o){var s=t[n],c=M(s);if(c!==`object`)return new h(`Invalid `+a+" `"+o+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));for(var l in e){var u=e[l];if(typeof u!=`function`)return D(r,a,o,l,N(u));var d=u(s,l,r,a,o+`.`+l,i);if(d)return d}return null}return g(t)}function k(e){function t(t,n,o,s,c){var l=t[n],u=M(l);if(u!==`object`)return new h(`Invalid `+s+" `"+c+"` of type `"+u+"` "+("supplied to `"+o+"`, expected `object`."));for(var d in r({},t[n],e)){var f=e[d];if(a(e,d)&&typeof f!=`function`)return D(o,s,c,d,N(f));if(!f)return new h(`Invalid `+s+" `"+c+"` key `"+d+"` supplied to `"+o+`\`.
50
- Bad object: `+JSON.stringify(t[n],null,` `)+`
51
- Valid keys: `+JSON.stringify(Object.keys(e),null,` `));var p=f(l,d,o,s,c+`.`+d,i);if(p)return p}return null}return g(t)}function A(t){switch(typeof t){case`number`:case`string`:case`undefined`:return!0;case`boolean`:return!t;case`object`:if(Array.isArray(t))return t.every(A);if(t===null||e(t))return!0;var n=d(t);if(n){var r=n.call(t),i;if(n!==t.entries){for(;!(i=r.next()).done;)if(!A(i.value))return!1}else for(;!(i=r.next()).done;){var a=i.value;if(a&&!A(a[1]))return!1}}else return!1;return!0;default:return!1}}function j(e,t){return e===`symbol`?!0:t?t[`@@toStringTag`]===`Symbol`||typeof Symbol==`function`&&t instanceof Symbol:!1}function M(e){var t=typeof e;return Array.isArray(e)?`array`:e instanceof RegExp?`object`:j(t,e)?`symbol`:t}function N(e){if(e==null)return``+e;var t=M(e);if(t===`object`){if(e instanceof Date)return`date`;if(e instanceof RegExp)return`regexp`}return t}function P(e){var t=N(e);switch(t){case`array`:case`object`:return`an `+t;case`boolean`:case`date`:case`regexp`:return`a `+t;default:return t}}function F(e){return!e.constructor||!e.constructor.name?f:e.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p}})),Sa=e.t(((e,t)=>{var n=va();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Ca=e.t(((e,t)=>{if(process.env.NODE_ENV!==`production`){var n=ga();t.exports=xa()(n.isElement,!0)}else t.exports=Sa()()})),wa=e.t(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=n(e[t]))&&(i&&(i+=` `),i+=r)}else for(r in e)e[r]&&(i&&(i+=` `),i+=r);return i}function r(){for(var e,t,r=0,i=``,a=arguments.length;r<a;r++)(e=arguments[r])&&(t=n(e))&&(i&&(i+=` `),i+=t);return i}t.exports=r,t.exports.clsx=r})),Ta=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.dontSetMe=a,e.findInArray=t,e.int=i,e.isFunction=n,e.isNum=r;function t(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]}function n(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Function]`}function r(e){return typeof e==`number`&&!isNaN(e)}function i(e){return parseInt(e,10)}function a(e,t,n){if(e[t])return Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)}})),Ea=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.browserPrefixToKey=r,e.browserPrefixToStyle=i,e.default=void 0,e.getPrefix=n;var t=[`Moz`,`Webkit`,`O`,`ms`];function n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:`transform`;if(typeof window>`u`)return``;let n=window.document?.documentElement?.style;if(!n||e in n)return``;for(let i=0;i<t.length;i++)if(r(e,t[i])in n)return t[i];return``}function r(e,t){return t?`${t}${a(e)}`:e}function i(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function a(e){let t=``,n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):e[r]===`-`?n=!0:t+=e[r];return t}e.default=n()})),Da=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.addClassName=S,e.addEvent=s,e.addUserSelectStyles=y,e.createCSSTransform=m,e.createSVGTransform=h,e.getTouch=_,e.getTouchIdentifier=v,e.getTranslation=g,e.innerHeight=d,e.innerWidth=f,e.matchesSelector=a,e.matchesSelectorAndParentsTo=o,e.offsetXYFromParent=p,e.outerHeight=l,e.outerWidth=u,e.removeClassName=C,e.removeEvent=c,e.scheduleRemoveUserSelectStyles=b;var t=Ta(),n=r(Ea());function r(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,i=new WeakMap;return(r=function(e,t){if(!t&&e&&e.__esModule)return e;var r,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?r(o,t,a):o[t]=e[t]);return o})(e,t)}var i=``;function a(e,n){return i||=(0,t.findInArray)([`matches`,`webkitMatchesSelector`,`mozMatchesSelector`,`msMatchesSelector`,`oMatchesSelector`],function(n){return(0,t.isFunction)(e[n])}),(0,t.isFunction)(e[i])?e[i](n):!1}function o(e,t,n){let r=e;do{if(a(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1}function s(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent(`on`+t,n):e[`on`+t]=n}function c(e,t,n,r){if(!e)return;let i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent(`on`+t,n):e[`on`+t]=null}function l(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderTopWidth),n+=(0,t.int)(r.borderBottomWidth),n}function u(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n+=(0,t.int)(r.borderLeftWidth),n+=(0,t.int)(r.borderRightWidth),n}function d(e){let n=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingTop),n-=(0,t.int)(r.paddingBottom),n}function f(e){let n=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return n-=(0,t.int)(r.paddingLeft),n-=(0,t.int)(r.paddingRight),n}function p(e,t,n){let r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect();return{x:(e.clientX+t.scrollLeft-r.left)/n,y:(e.clientY+t.scrollTop-r.top)/n}}function m(e,t){let r=g(e,t,`px`);return{[(0,n.browserPrefixToKey)(`transform`,n.default)]:r}}function h(e,t){return g(e,t,``)}function g(e,t,n){let{x:r,y:i}=e,a=`translate(${r}${n},${i}${n})`;return t&&(a=`translate(${`${typeof t.x==`string`?t.x:t.x+n}`}, ${`${typeof t.y==`string`?t.y:t.y+n}`})`+a),a}function _(e,n){return e.targetTouches&&(0,t.findInArray)(e.targetTouches,e=>n===e.identifier)||e.changedTouches&&(0,t.findInArray)(e.changedTouches,e=>n===e.identifier)}function v(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function y(e){if(!e)return;let t=e.getElementById(`react-draggable-style-el`);t||(t=e.createElement(`style`),t.type=`text/css`,t.id=`react-draggable-style-el`,t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
52
- `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
53
- `,e.getElementsByTagName(`head`)[0].appendChild(t)),e.body&&S(e.body,`react-draggable-transparent-selection`)}function b(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{x(e)}):x(e)}function x(e){if(e)try{if(e.body&&C(e.body,`react-draggable-transparent-selection`),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function S(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function C(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}})),Oa=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.canDragX=a,e.canDragY=o,e.createCoreData=c,e.createDraggableData=l,e.getBoundPosition=r,e.getControlPosition=s,e.snapToGrid=i;var t=Ta(),n=Da();function r(e,r,i){if(!e.props.bounds)return[r,i];let{bounds:a}=e.props;a=typeof a==`string`?a:u(a);let o=d(e);if(typeof a==`string`){let{ownerDocument:e}=o,r=e.defaultView,i;if(i=a===`parent`?o.parentNode:o.getRootNode().querySelector(a),!(i instanceof r.HTMLElement))throw Error(`Bounds selector "`+a+`" could not find an element.`);let s=i,c=r.getComputedStyle(o),l=r.getComputedStyle(s);a={left:-o.offsetLeft+(0,t.int)(l.paddingLeft)+(0,t.int)(c.marginLeft),top:-o.offsetTop+(0,t.int)(l.paddingTop)+(0,t.int)(c.marginTop),right:(0,n.innerWidth)(s)-(0,n.outerWidth)(o)-o.offsetLeft+(0,t.int)(l.paddingRight)-(0,t.int)(c.marginRight),bottom:(0,n.innerHeight)(s)-(0,n.outerHeight)(o)-o.offsetTop+(0,t.int)(l.paddingBottom)-(0,t.int)(c.marginBottom)}}return(0,t.isNum)(a.right)&&(r=Math.min(r,a.right)),(0,t.isNum)(a.bottom)&&(i=Math.min(i,a.bottom)),(0,t.isNum)(a.left)&&(r=Math.max(r,a.left)),(0,t.isNum)(a.top)&&(i=Math.max(i,a.top)),[r,i]}function i(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function a(e){return e.props.axis===`both`||e.props.axis===`x`}function o(e){return e.props.axis===`both`||e.props.axis===`y`}function s(e,t,r){let i=typeof t==`number`?(0,n.getTouch)(e,t):null;if(typeof t==`number`&&!i)return null;let a=d(r),o=r.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,n.offsetXYFromParent)(i||e,o,r.props.scale)}function c(e,n,r){let i=!(0,t.isNum)(e.lastX),a=d(e);return i?{node:a,deltaX:0,deltaY:0,lastX:n,lastY:r,x:n,y:r}:{node:a,deltaX:n-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:n,y:r}}function l(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function u(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function d(e){let t=e.findDOMNode();if(!t)throw Error(`<DraggableCore>: Unmounted during event!`);return t}})),ka=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=t;function t(){}})),Aa=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var t=l(require(`react`)),n=c(Ca()),r=c(require(`react-dom`)),i=Da(),a=Oa(),o=Ta(),s=c(ka());function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(l=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function u(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=f(e,`string`);return typeof t==`symbol`?t:t+``}function f(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var p={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},m=p.mouse,h=class extends t.Component{constructor(){super(...arguments),u(this,`dragging`,!1),u(this,`lastX`,NaN),u(this,`lastY`,NaN),u(this,`touchIdentifier`,null),u(this,`mounted`,!1),u(this,`handleDragStart`,e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&typeof e.button==`number`&&e.button!==0)return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(`<DraggableCore> not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,i.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,i.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=(0,i.getTouchIdentifier)(e);this.touchIdentifier=r;let o=(0,a.getControlPosition)(e,r,this);if(o==null)return;let{x:c,y:l}=o,u=(0,a.createCoreData)(this,c,l);(0,s.default)(`DraggableCore: handleDragStart: %j`,u),(0,s.default)(`calling`,this.props.onStart),!(this.props.onStart(e,u)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,i.addUserSelectStyles)(n),this.dragging=!0,this.lastX=c,this.lastY=l,(0,i.addEvent)(n,m.move,this.handleDrag),(0,i.addEvent)(n,m.stop,this.handleDragStop))}),u(this,`handleDrag`,e=>{let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,a.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=(0,a.createCoreData)(this,n,r);if((0,s.default)(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r}),u(this,`handleDragStop`,e=>{if(!this.dragging)return;let t=(0,a.getControlPosition)(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,a.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let o=(0,a.createCoreData)(this,n,r);if(this.props.onStop(e,o)===!1||this.mounted===!1)return!1;let c=this.findDOMNode();c&&this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(c.ownerDocument),(0,s.default)(`DraggableCore: handleDragStop: %j`,o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,c&&((0,s.default)(`DraggableCore: Removing handlers`),(0,i.removeEvent)(c.ownerDocument,m.move,this.handleDrag),(0,i.removeEvent)(c.ownerDocument,m.stop,this.handleDragStop))}),u(this,`onMouseDown`,e=>(m=p.mouse,this.handleDragStart(e))),u(this,`onMouseUp`,e=>(m=p.mouse,this.handleDragStop(e))),u(this,`onTouchStart`,e=>(m=p.touch,this.handleDragStart(e))),u(this,`onTouchEnd`,e=>(m=p.touch,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&(0,i.addEvent)(e,p.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;(0,i.removeEvent)(t,p.mouse.move,this.handleDrag),(0,i.removeEvent)(t,p.touch.move,this.handleDrag),(0,i.removeEvent)(t,p.mouse.stop,this.handleDragStop),(0,i.removeEvent)(t,p.touch.stop,this.handleDragStop),(0,i.removeEvent)(e,p.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,i.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:r.default.findDOMNode(this)}render(){return t.cloneElement(t.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};e.default=h,u(h,`displayName`,`DraggableCore`),u(h,`propTypes`,{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),u(h,`defaultProps`,{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})})),ja=e.t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),Object.defineProperty(e,`DraggableCore`,{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var t=d(require(`react`)),n=u(Ca()),r=u(require(`react-dom`)),i=wa(),a=Da(),o=Oa(),s=Ta(),c=u(Aa()),l=u(ka());function u(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(d=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!==`default`&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(null,arguments)}function p(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=h(e,`string`);return typeof t==`symbol`?t:t+``}function h(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var g=class extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return n&&(!r||n.x!==r.x||n.y!==r.y)?((0,l.default)(`Draggable: getDerivedStateFromProps %j`,{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(e){super(e),p(this,`onDragStart`,(e,t)=>{if((0,l.default)(`Draggable: onDragStart: %j`,t),this.props.onStart(e,(0,o.createDraggableData)(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),p(this,`onDrag`,(e,t)=>{if(!this.state.dragging)return!1;(0,l.default)(`Draggable: onDrag: %j`,t);let n=(0,o.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=(0,o.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)}),p(this,`onDragStop`,(e,t)=>{if(!this.state.dragging||this.props.onStop(e,(0,o.createDraggableData)(this,t))===!1)return!1;(0,l.default)(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){let{axis:e,bounds:n,children:r,defaultPosition:s,defaultClassName:l,defaultClassNameDragging:u,defaultClassNameDragged:d,position:p,positionOffset:m,scale:h,...g}=this.props,_={},v=null,y=!p||this.state.dragging,b=p||s,x={x:(0,o.canDragX)(this)&&y?this.state.x:b.x,y:(0,o.canDragY)(this)&&y?this.state.y:b.y};this.state.isElementSVG?v=(0,a.createSVGTransform)(x,m):_=(0,a.createCSSTransform)(x,m);let S=(0,i.clsx)(r.props.className||``,l,{[u]:this.state.dragging,[d]:this.state.dragged});return t.createElement(c.default,f({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:S,style:{...r.props.style,..._},transform:v}))}};e.default=g,p(g,`displayName`,`Draggable`),p(g,`propTypes`,{...c.default.propTypes,axis:n.default.oneOf([`both`,`x`,`y`,`none`]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),p(g,`defaultProps`,{...c.default.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1})})),Ma=e.t(((e,t)=>{var{default:n,DraggableCore:r}=ja();t.exports=n,t.exports.default=n,t.exports.DraggableCore=r})),Na=e.a(Ma()),X=function(){return X=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},X.apply(this,arguments)},Pa={width:`100%`,height:`10px`,top:`0px`,left:`0px`,cursor:`row-resize`},Fa={width:`10px`,height:`100%`,top:`0px`,left:`0px`,cursor:`col-resize`},Ia={width:`20px`,height:`20px`,position:`absolute`,zIndex:1},La={top:X(X({},Pa),{top:`-5px`}),right:X(X({},Fa),{left:void 0,right:`-5px`}),bottom:X(X({},Pa),{top:void 0,bottom:`-5px`}),left:X(X({},Fa),{left:`-5px`}),topRight:X(X({},Ia),{right:`-10px`,top:`-10px`,cursor:`ne-resize`}),bottomRight:X(X({},Ia),{right:`-10px`,bottom:`-10px`,cursor:`se-resize`}),bottomLeft:X(X({},Ia),{left:`-10px`,bottom:`-10px`,cursor:`sw-resize`}),topLeft:X(X({},Ia),{left:`-10px`,top:`-10px`,cursor:`nw-resize`})},Ra=(0,B.memo)(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,i=e.replaceStyles,a=e.className,o=(0,B.useCallback)(function(e){t(e,n)},[t,n]),s=(0,B.useCallback)(function(e){t(e,n)},[t,n]),c=(0,B.useMemo)(function(){return X(X({position:`absolute`,userSelect:`none`},La[n]),i??{})},[i,n]);return(0,V.jsx)(`div`,{className:a||void 0,style:c,onMouseDown:o,onTouchStart:s,children:r})}),za=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Z=function(){return Z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Z.apply(this,arguments)},Ba={width:`auto`,height:`auto`},Va=function(e,t,n){return Math.max(Math.min(e,n),t)},Ha=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},Ua=function(e,t){return new RegExp(e,`i`).test(t)},Wa=function(e){return!!(e.touches&&e.touches.length)},Ga=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Ka=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(n,r,i){return Math.abs(r-e)<Math.abs(t[n]-e)?i:n},0),i=Math.abs(t[r]-e);return n===0||i<n?t[r]:e},qa=function(e){return e=e.toString(),e===`auto`||e.endsWith(`px`)||e.endsWith(`%`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`vmax`)||e.endsWith(`vmin`)?e:`${e}px`},Ja=function(e,t,n,r){if(e&&typeof e==`string`){if(e.endsWith(`px`))return Number(e.replace(`px`,``));if(e.endsWith(`%`)){var i=Number(e.replace(`%`,``))/100;return t*i}if(e.endsWith(`vw`)){var i=Number(e.replace(`vw`,``))/100;return n*i}if(e.endsWith(`vh`)){var i=Number(e.replace(`vh`,``))/100;return r*i}}return e},Ya=function(e,t,n,r,i,a,o){return r=Ja(r,e.width,t,n),i=Ja(i,e.height,t,n),a=Ja(a,e.width,t,n),o=Ja(o,e.height,t,n),{maxWidth:r===void 0?void 0:Number(r),maxHeight:i===void 0?void 0:Number(i),minWidth:a===void 0?void 0:Number(a),minHeight:o===void 0?void 0:Number(o)}},Xa=function(e){return Array.isArray(e)?e:[e,e]},Za=`as.ref.style.className.grid.gridGap.snap.bounds.boundsByDirection.size.defaultSize.minWidth.minHeight.maxWidth.maxHeight.lockAspectRatio.lockAspectRatioExtraWidth.lockAspectRatioExtraHeight.enable.handleStyles.handleClasses.handleWrapperStyle.handleWrapperClass.children.onResizeStart.onResize.onResizeStop.handleComponent.scale.resizeRatio.snapGap`.split(`.`),Qa=`__resizable_base__`,$a=function(e){za(t,e);function t(t){var n=e.call(this,t)||this;return n.ratio=1,n.resizable=null,n.parentLeft=0,n.parentTop=0,n.resizableLeft=0,n.resizableRight=0,n.resizableTop=0,n.resizableBottom=0,n.targetLeft=0,n.targetTop=0,n.delta={width:0,height:0},n.appendBase=function(){if(!n.resizable||!n.window)return null;var e=n.parentNode;if(!e)return null;var t=n.window.document.createElement(`div`);return t.style.width=`100%`,t.style.height=`100%`,t.style.position=`absolute`,t.style.transform=`scale(0, 0)`,t.style.left=`0`,t.style.flex=`0 0 100%`,t.classList?t.classList.add(Qa):t.className+=Qa,e.appendChild(t),t},n.removeBase=function(e){var t=n.parentNode;t&&t.removeChild(e)},n.state={isResizing:!1,width:n.propsSize?.width??`auto`,height:n.propsSize?.height??`auto`,direction:`right`,original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:`100%`,width:`100%`,backgroundColor:`rgba(0,0,0,0)`,cursor:`auto`,opacity:0,position:`fixed`,zIndex:9999,top:`0`,left:`0`,bottom:`0`,right:`0`},flexBasis:void 0},n.onResizeStart=n.onResizeStart.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.onMouseUp=n.onMouseUp.bind(n),n}return Object.defineProperty(t.prototype,`parentNode`,{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`window`,{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`propsSize`,{get:function(){return this.props.size||this.props.defaultSize||Ba},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`size`,{get:function(){var e=0,t=0;if(this.resizable&&this.window){var n=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;i!==`relative`&&(this.resizable.style.position=`relative`),e=this.resizable.style.width===`auto`?n:this.resizable.offsetWidth,t=this.resizable.style.height===`auto`?r:this.resizable.offsetHeight,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,`sizeStyle`,{get:function(){var e=this,t=this.props.size,n=function(t){if(e.state[t]===void 0||e.state[t]===`auto`)return`auto`;if(e.propsSize&&e.propsSize[t]&&e.propsSize[t]?.toString().endsWith(`%`)){if(e.state[t].toString().endsWith(`%`))return e.state[t].toString();var n=e.getParentSize();return`${Number(e.state[t].toString().replace(`px`,``))/n[t]*100}%`}return qa(e.state[t])};return{width:t&&t.width!==void 0&&!this.state.isResizing?qa(t.width):n(`width`),height:t&&t.height!==void 0&&!this.state.isResizing?qa(t.height):n(`height`)}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,n=this.parentNode.style.flexWrap;n!==`wrap`&&(t=!0,this.parentNode.style.flexWrap=`wrap`),e.style.position=`relative`,e.style.minWidth=`100%`,e.style.minHeight=`100%`;var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=n),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener(`mouseup`,this.onMouseUp),this.window.addEventListener(`mousemove`,this.onMouseMove),this.window.addEventListener(`mouseleave`,this.onMouseUp),this.window.addEventListener(`touchmove`,this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener(`touchend`,this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener(`mouseup`,this.onMouseUp),this.window.removeEventListener(`mousemove`,this.onMouseMove),this.window.removeEventListener(`mouseleave`,this.onMouseUp),this.window.removeEventListener(`touchmove`,this.onMouseMove,!0),this.window.removeEventListener(`touchend`,this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:e.flexBasis===`auto`?void 0:e.flexBasis})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var n=this.propsSize&&this.propsSize[t];return this.state[t]===`auto`&&this.state.original[t]===e&&(n===void 0||n===`auto`)?`auto`:e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var n=this.props.boundsByDirection,r=this.state.direction,i=n&&Ua(`left`,r),a=n&&Ua(`top`,r),o,s;if(this.props.bounds===`parent`){var c=this.parentNode;c&&(o=i?this.resizableRight-this.parentLeft:c.offsetWidth+(this.parentLeft-this.resizableLeft),s=a?this.resizableBottom-this.parentTop:c.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds===`window`?this.window&&(o=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,s=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),s=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),s&&Number.isFinite(s)&&(t=t&&t<s?t:s),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var n=this.props.scale||1,r=Xa(this.props.resizeRatio||1),i=r[0],a=r[1],o=this.state,s=o.direction,c=o.original,l=this.props,u=l.lockAspectRatio,d=l.lockAspectRatioExtraHeight,f=l.lockAspectRatioExtraWidth,p=c.width,m=c.height,h=d||0,g=f||0;return Ua(`right`,s)&&(p=c.width+(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),Ua(`left`,s)&&(p=c.width-(e-c.x)*i/n,u&&(m=(p-g)/this.ratio+h)),Ua(`bottom`,s)&&(m=c.height+(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),Ua(`top`,s)&&(m=c.height-(t-c.y)*a/n,u&&(p=(m-h)*this.ratio+g)),{newWidth:p,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,n,r){var i=this.props,a=i.lockAspectRatio,o=i.lockAspectRatioExtraHeight,s=i.lockAspectRatioExtraWidth,c=r.width===void 0?10:r.width,l=n.width===void 0||n.width<0?e:n.width,u=r.height===void 0?10:r.height,d=n.height===void 0||n.height<0?t:n.height,f=o||0,p=s||0;if(a){var m=(u-f)*this.ratio+p,h=(d-f)*this.ratio+p,g=(c-p)/this.ratio+f,_=(l-p)/this.ratio+f,v=Math.max(c,m),y=Math.min(l,h),b=Math.max(u,g),x=Math.min(d,_);e=Va(e,v,y),t=Va(t,b,x)}else e=Va(e,c,l),t=Va(t,u,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if(this.props.bounds===`parent`){var t=this.parentNode;if(t){var n=t.getBoundingClientRect();this.parentLeft=n.left*e,this.parentTop=n.top*e}}if(this.props.bounds&&typeof this.props.bounds!=`string`){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),a=i.left,o=i.top,s=i.right,c=i.bottom;this.resizableLeft=a*e,this.resizableRight=s*e,this.resizableTop=o*e,this.resizableBottom=c*e}},t.prototype.onResizeStart=function(e,t){if(!(!this.resizable||!this.window)){var n=0,r=0;if(e.nativeEvent&&Ga(e.nativeEvent)?(n=e.nativeEvent.clientX,r=e.nativeEvent.clientY):e.nativeEvent&&Wa(e.nativeEvent)&&(n=e.nativeEvent.touches[0].clientX,r=e.nativeEvent.touches[0].clientY),!(this.props.onResizeStart&&this.resizable&&this.props.onResizeStart(e,t,this.resizable)===!1)){this.props.size&&(this.props.size.height!==void 0&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),this.props.size.width!==void 0&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio==`number`?this.props.lockAspectRatio:this.size.width/this.size.height;var i,a=this.window.getComputedStyle(this.resizable);if(a.flexBasis!==`auto`){var o=this.parentNode;o&&(this.flexDir=this.window.getComputedStyle(o).flexDirection.startsWith(`row`)?`row`:`column`,i=a.flexBasis)}this.setBoundingClientRect(),this.bindEvents();var s={original:{x:n,y:r,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Z(Z({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||`auto`}),direction:t,flexBasis:i};this.setState(s)}}},t.prototype.onMouseMove=function(e){var t=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Wa(e))try{e.preventDefault(),e.stopPropagation()}catch{}var n=this.props,r=n.maxWidth,i=n.maxHeight,a=n.minWidth,o=n.minHeight,s=Wa(e)?e.touches[0].clientX:e.clientX,c=Wa(e)?e.touches[0].clientY:e.clientY,l=this.state,u=l.direction,d=l.original,f=l.width,p=l.height,m=this.getParentSize(),h=Ya(m,this.window.innerWidth,this.window.innerHeight,r,i,a,o);r=h.maxWidth,i=h.maxHeight,a=h.minWidth,o=h.minHeight;var g=this.calculateNewSizeFromDirection(s,c),_=g.newHeight,v=g.newWidth,y=this.calculateNewMaxFromBoundary(r,i);this.props.snap&&this.props.snap.x&&(v=Ka(v,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(_=Ka(_,this.props.snap.y,this.props.snapGap));var b=this.calculateNewSizeFromAspectRatio(v,_,{width:y.maxWidth,height:y.maxHeight},{width:a,height:o});if(v=b.newWidth,_=b.newHeight,this.props.grid){var x=Ha(v,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),S=Ha(_,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),C=this.props.snapGap||0,w=C===0||Math.abs(x-v)<=C?x:v,T=C===0||Math.abs(S-_)<=C?S:_;v=w,_=T}var E={width:v-d.width,height:_-d.height};if(this.delta=E,f&&typeof f==`string`){if(f.endsWith(`%`)){var D=v/m.width*100;v=`${D}%`}else if(f.endsWith(`vw`)){var O=v/this.window.innerWidth*100;v=`${O}vw`}else if(f.endsWith(`vh`)){var k=v/this.window.innerHeight*100;v=`${k}vh`}}if(p&&typeof p==`string`){if(p.endsWith(`%`)){var D=_/m.height*100;_=`${D}%`}else if(p.endsWith(`vw`)){var O=_/this.window.innerWidth*100;_=`${O}vw`}else if(p.endsWith(`vh`)){var k=_/this.window.innerHeight*100;_=`${k}vh`}}var A={width:this.createSizeForCssProperty(v,`width`),height:this.createSizeForCssProperty(_,`height`)};this.flexDir===`row`?A.flexBasis=A.width:this.flexDir===`column`&&(A.flexBasis=A.height);var j=this.state.width!==A.width,M=this.state.height!==A.height,N=this.state.flexBasis!==A.flexBasis,P=j||M||N;P&&(0,ce.flushSync)(function(){t.setState(A)}),this.props.onResize&&P&&this.props.onResize(e,u,this.resizable,E)}},t.prototype.onMouseUp=function(e){var t=this.state,n=t.isResizing,r=t.direction;t.original,!(!n||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(e,r,this.resizable,this.delta),this.props.size&&this.setState({width:this.props.size.width??`auto`,height:this.props.size.height??`auto`}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Z(Z({},this.state.backgroundStyle),{cursor:`auto`})}))},t.prototype.updateSize=function(e){this.setState({width:e.width??`auto`,height:e.height??`auto`})},t.prototype.renderResizer=function(){var e=this,t=this.props,n=t.enable,r=t.handleStyles,i=t.handleClasses,a=t.handleWrapperStyle,o=t.handleWrapperClass,s=t.handleComponent;return n?(0,V.jsx)(`div`,{className:o,style:a,children:Object.keys(n).map(function(t){return n[t]===!1?null:(0,V.jsx)(Ra,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:s&&s[t]?s[t]:null},t)})}):null},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,n){return Za.indexOf(n)===-1&&(t[n]=e.props[n]),t},{}),n=Z(Z(Z({position:`relative`,userSelect:this.state.isResizing?`none`:`auto`},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:`border-box`,flexShrink:0});return this.state.flexBasis&&(n.flexBasis=this.state.flexBasis),(0,V.jsxs)(this.props.as||`div`,Z({style:n,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,V.jsx)(`div`,{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:`div`,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(B.PureComponent),eo=function(e,t){return eo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},eo(e,t)};function to(e,t){eo(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Q=function(){return Q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Q.apply(this,arguments)};function no(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var ro={width:`auto`,height:`auto`,display:`inline-block`,position:`absolute`,top:0,left:0},io=function(e){return{bottom:e,bottomLeft:e,bottomRight:e,left:e,right:e,top:e,topLeft:e,topRight:e}},ao=function(e){to(t,e);function t(t){var n=e.call(this,t)||this;return n.resizingPosition={x:0,y:0},n.offsetFromParent={left:0,top:0},n.resizableElement={current:null},n.originalPosition={x:0,y:0},n.state={resizing:!1,bounds:{top:0,right:0,bottom:0,left:0},maxWidth:t.maxWidth,maxHeight:t.maxHeight},n.onResizeStart=n.onResizeStart.bind(n),n.onResize=n.onResize.bind(n),n.onResizeStop=n.onResizeStop.bind(n),n.onDragStart=n.onDragStart.bind(n),n.onDrag=n.onDrag.bind(n),n.onDragStop=n.onDragStop.bind(n),n.getMaxSizesFromProps=n.getMaxSizesFromProps.bind(n),n}return t.prototype.componentDidMount=function(){this.updateOffsetFromParent();var e=this.offsetFromParent,t=e.left,n=e.top,r=this.getDraggablePosition(),i=r.x,a=r.y;this.draggable.setState({x:i-t,y:a-n}),this.forceUpdate()},t.prototype.getDraggablePosition=function(){var e=this.draggable.state;return{x:e.x,y:e.y}},t.prototype.getParent=function(){return this.resizable&&this.resizable.parentNode},t.prototype.getParentSize=function(){return this.resizable.getParentSize()},t.prototype.getMaxSizesFromProps=function(){return{maxWidth:this.props.maxWidth===void 0?2**53-1:this.props.maxWidth,maxHeight:this.props.maxHeight===void 0?2**53-1:this.props.maxHeight}},t.prototype.getSelfElement=function(){return this.resizable&&this.resizable.resizable},t.prototype.getOffsetHeight=function(e){var t=this.props.scale;switch(this.props.bounds){case`window`:return window.innerHeight/t;case`body`:return document.body.offsetHeight/t;default:return e.offsetHeight}},t.prototype.getOffsetWidth=function(e){var t=this.props.scale;switch(this.props.bounds){case`window`:return window.innerWidth/t;case`body`:return document.body.offsetWidth/t;default:return e.offsetWidth}},t.prototype.onDragStart=function(e,t){if(this.props.onDragStart&&this.props.onDragStart(e,t)===!1)return!1;if(this.originalPosition=this.getDraggablePosition(),this.props.bounds){var n=this.getParent(),r=this.props.scale,i;if(this.props.bounds===`parent`)i=n;else if(this.props.bounds===`body`){var a=n.getBoundingClientRect(),o=a.left,s=a.top,c=document.body.getBoundingClientRect(),l=-(o-n.offsetLeft*r-c.left)/r,u=-(s-n.offsetTop*r-c.top)/r,d=(document.body.offsetWidth-this.resizable.size.width*r)/r+l,f=(document.body.offsetHeight-this.resizable.size.height*r)/r+u;return this.setState({bounds:{top:u,right:d,bottom:f,left:l}})}else if(this.props.bounds===`window`){if(!this.resizable)return;var p=n.getBoundingClientRect(),m=p.left,h=p.top,g=-(m-n.offsetLeft*r)/r,_=-(h-n.offsetTop*r)/r,d=(window.innerWidth-this.resizable.size.width*r)/r+g,f=(window.innerHeight-this.resizable.size.height*r)/r+_;return this.setState({bounds:{top:_,right:d,bottom:f,left:g}})}else typeof this.props.bounds==`string`?i=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(i=this.props.bounds);if(!(!(i instanceof HTMLElement)||!(n instanceof HTMLElement))){var v=i.getBoundingClientRect(),y=v.left,b=v.top,x=n.getBoundingClientRect(),S=x.left,C=x.top,w=(y-S)/r,T=b-C;if(this.resizable){this.updateOffsetFromParent();var E=this.offsetFromParent;this.setState({bounds:{top:T-E.top,right:w+(i.offsetWidth-this.resizable.size.width)-E.left/r,bottom:T+(i.offsetHeight-this.resizable.size.height)-E.top,left:w-E.left/r}})}}}},t.prototype.onDrag=function(e,t){if(this.props.onDrag){var n=this.offsetFromParent,r=n.left,i=n.top;if(!this.props.dragAxis||this.props.dragAxis===`both`)return this.props.onDrag(e,Q(Q({},t),{x:t.x+r,y:t.y+i}));if(this.props.dragAxis===`x`)return this.props.onDrag(e,Q(Q({},t),{x:t.x+r,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis===`y`)return this.props.onDrag(e,Q(Q({},t),{x:this.originalPosition.x+r,y:t.y+i,deltaX:0}))}},t.prototype.onDragStop=function(e,t){if(this.props.onDragStop){var n=this.offsetFromParent,r=n.left,i=n.top;if(!this.props.dragAxis||this.props.dragAxis===`both`)return this.props.onDragStop(e,Q(Q({},t),{x:t.x+r,y:t.y+i}));if(this.props.dragAxis===`x`)return this.props.onDragStop(e,Q(Q({},t),{x:t.x+r,y:this.originalPosition.y+i,deltaY:0}));if(this.props.dragAxis===`y`)return this.props.onDragStop(e,Q(Q({},t),{x:this.originalPosition.x+r,y:t.y+i,deltaX:0}))}},t.prototype.onResizeStart=function(e,t,n){if(this.props.onResizeStart&&this.props.onResizeStart(e,t,n)===!1)return!1;e.stopPropagation(),this.setState({resizing:!0});var r=this.props.scale,i=this.offsetFromParent,a=this.getDraggablePosition();if(this.resizingPosition={x:a.x+i.left,y:a.y+i.top},this.originalPosition=a,this.props.bounds){var o=this.getParent(),s=void 0;this.props.bounds===`parent`?s=o:this.props.bounds===`body`?s=document.body:this.props.bounds===`window`?s=window:typeof this.props.bounds==`string`?s=document.querySelector(this.props.bounds):this.props.bounds instanceof HTMLElement&&(s=this.props.bounds);var c=this.getSelfElement();if(c instanceof Element&&(s instanceof HTMLElement||s===window)&&o instanceof HTMLElement){var l=this.getMaxSizesFromProps(),u=l.maxWidth,d=l.maxHeight,f=this.getParentSize();if(u&&typeof u==`string`)if(u.endsWith(`%`)){var p=Number(u.replace(`%`,``))/100;u=f.width*p}else u.endsWith(`px`)&&(u=Number(u.replace(`px`,``)));if(d&&typeof d==`string`)if(d.endsWith(`%`)){var p=Number(d.replace(`%`,``))/100;d=f.height*p}else d.endsWith(`px`)&&(d=Number(d.replace(`px`,``)));var m=c.getBoundingClientRect(),h=m.left,g=m.top,_=this.props.bounds===`window`?{left:0,top:0}:s.getBoundingClientRect(),v=_.left,y=_.top,b=this.getOffsetWidth(s),x=this.getOffsetHeight(s),S=t.toLowerCase().endsWith(`left`),C=t.toLowerCase().endsWith(`right`),w=t.startsWith(`top`),T=t.startsWith(`bottom`);if((S||w)&&this.resizable){var E=(h-v)/r+this.resizable.size.width;this.setState({maxWidth:E>Number(u)?u:E})}if(C||this.props.lockAspectRatio&&!S&&!w){var E=b+(v-h)/r;this.setState({maxWidth:E>Number(u)?u:E})}if((w||S)&&this.resizable){var E=(g-y)/r+this.resizable.size.height;this.setState({maxHeight:E>Number(d)?d:E})}if(T||this.props.lockAspectRatio&&!w&&!S){var E=x+(y-g)/r;this.setState({maxHeight:E>Number(d)?d:E})}}}else this.setState({maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight})},t.prototype.onResize=function(e,t,n,r){var i=this,a={x:this.originalPosition.x,y:this.originalPosition.y},o=-r.width,s=-r.height;[`top`,`left`,`topLeft`,`bottomLeft`,`topRight`].includes(t)&&(t===`bottomLeft`?a.x+=o:(t===`topRight`||(a.x+=o),a.y+=s));var c=this.draggable.state;(a.x!==c.x||a.y!==c.y)&&(0,ce.flushSync)(function(){i.draggable.setState(a)}),this.updateOffsetFromParent();var l=this.offsetFromParent,u=this.getDraggablePosition().x+l.left,d=this.getDraggablePosition().y+l.top;this.resizingPosition={x:u,y:d},this.props.onResize&&this.props.onResize(e,t,n,r,{x:u,y:d})},t.prototype.onResizeStop=function(e,t,n,r){this.setState({resizing:!1});var i=this.getMaxSizesFromProps(),a=i.maxWidth,o=i.maxHeight;this.setState({maxWidth:a,maxHeight:o}),this.props.onResizeStop&&this.props.onResizeStop(e,t,n,r,this.resizingPosition)},t.prototype.updateSize=function(e){this.resizable&&this.resizable.updateSize({width:e.width,height:e.height})},t.prototype.updatePosition=function(e){this.draggable.setState(e)},t.prototype.updateOffsetFromParent=function(){var e=this.props.scale,t=this.getParent(),n=this.getSelfElement();if(!t||n===null)return{top:0,left:0};var r=t.getBoundingClientRect(),i=r.left,a=r.top,o=n.getBoundingClientRect(),s=this.getDraggablePosition(),c=t.scrollLeft,l=t.scrollTop;this.offsetFromParent={left:o.left-i+c-s.x*e,top:o.top-a+l-s.y*e}},t.prototype.render=function(){var e=this,t=this.props,n=t.disableDragging,r=t.style,i=t.dragHandleClassName,a=t.position,o=t.onMouseDown,s=t.onMouseUp,c=t.dragAxis,l=t.dragGrid,u=t.bounds,d=t.enableUserSelectHack,f=t.cancel,p=t.children;t.onResizeStart,t.onResize,t.onResizeStop,t.onDragStart,t.onDrag,t.onDragStop;var m=t.resizeHandleStyles,h=t.resizeHandleClasses,g=t.resizeHandleComponent,_=t.enableResizing,v=t.resizeGrid,y=t.resizeHandleWrapperClass,b=t.resizeHandleWrapperStyle,x=t.scale,S=t.allowAnyClick,C=t.dragPositionOffset,w=no(t,`disableDragging.style.dragHandleClassName.position.onMouseDown.onMouseUp.dragAxis.dragGrid.bounds.enableUserSelectHack.cancel.children.onResizeStart.onResize.onResizeStop.onDragStart.onDrag.onDragStop.resizeHandleStyles.resizeHandleClasses.resizeHandleComponent.enableResizing.resizeGrid.resizeHandleWrapperClass.resizeHandleWrapperStyle.scale.allowAnyClick.dragPositionOffset`.split(`.`)),T=this.props.default?Q({},this.props.default):void 0;delete w.default;var E=n||i?{cursor:`auto`}:{cursor:`move`},D=Q(Q(Q({},ro),E),r),O=this.offsetFromParent,k=O.left,A=O.top,j;a&&(j={x:a.x-k,y:a.y-A});var M=this.state.resizing?void 0:j,N=this.state.resizing?`both`:c;return(0,B.createElement)(Na.default,{ref:function(t){t&&(e.draggable=t)},handle:i?`.${i}`:void 0,defaultPosition:T,onMouseDown:o,onMouseUp:s,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,axis:N,disabled:n,grid:l,bounds:u?this.state.bounds:void 0,position:M,enableUserSelectHack:d,cancel:f,scale:x,allowAnyClick:S,nodeRef:this.resizableElement,positionOffset:C},(0,B.createElement)($a,Q({},w,{ref:function(t){t&&(e.resizable=t,e.resizableElement.current=t.resizable)},defaultSize:T,size:this.props.size,enable:typeof _==`boolean`?io(_):_,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,style:D,minWidth:this.props.minWidth,minHeight:this.props.minHeight,maxWidth:this.state.resizing?this.state.maxWidth:this.props.maxWidth,maxHeight:this.state.resizing?this.state.maxHeight:this.props.maxHeight,grid:v,handleWrapperClass:y,handleWrapperStyle:b,lockAspectRatio:this.props.lockAspectRatio,lockAspectRatioExtraWidth:this.props.lockAspectRatioExtraWidth,lockAspectRatioExtraHeight:this.props.lockAspectRatioExtraHeight,handleStyles:m,handleClasses:h,handleComponent:g,scale:this.props.scale}),p))},t.defaultProps={maxWidth:2**53-1,maxHeight:2**53-1,scale:1,onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},onDragStart:function(){},onDrag:function(){},onDragStop:function(){}},t}(B.PureComponent),oo=e=>Symbol.iterator in e,so=e=>`entries`in e,co=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},lo=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function uo(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:oo(e)&&oo(t)?so(e)&&so(t)?co(e,t):lo(e,t):co({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}function fo(e){let t=B.default.useRef(void 0);return n=>{let r=e(n);return uo(t.current,r)?t.current:t.current=r}}var po=({message:e=`Loading...`,size:t=`lg`})=>(0,V.jsx)(b.t,{style:{width:`100%`,height:`100%`},children:(0,V.jsxs)(C.t,{align:`center`,gap:`md`,children:[(0,V.jsx)(s.s,{size:t}),(0,V.jsx)(g.o,{c:`dimmed`,children:e})]})}),mo=({progress:e,windowIcon:t})=>{let r=n.d(),i=()=>{switch(e.state){case`fetching`:return`Fetching app info...`;case`compiling`:return`Compiling app...`;case`loading`:return`Loading app...`;case`ready`:return`Ready!`;case`error`:return`Error loading app`;default:return`Loading...`}},a=()=>e.state===`error`?`red`:e.state===`ready`?`green`:r.primaryColor;return(0,V.jsx)(b.t,{style:{width:`100%`,height:`100%`},"data-testid":`custom-app-loading`,children:(0,V.jsxs)(C.t,{align:`center`,gap:`lg`,p:`xl`,children:[t&&(0,V.jsx)(g.o,{size:`3rem`,children:t}),(0,V.jsx)(g.o,{size:`lg`,fw:700,children:e.appName||`App`}),(0,V.jsx)(d.n,{value:e.progress,size:`lg`,radius:`xl`,animated:e.state===`loading`||e.state===`compiling`,style:{minWidth:200},color:a()}),(0,V.jsx)(g.o,{size:`sm`,c:`dimmed`,children:i()}),e.state===`error`&&(0,V.jsx)(g.o,{size:`xs`,c:`red`,ta:`center`,children:e.error}),(0,V.jsxs)(g.o,{size:`xs`,c:`gray`,children:[e.progress,`%`]})]})})},ho=({appId:e})=>(0,V.jsx)(b.t,{style:{width:`100%`,height:`100%`},children:(0,V.jsxs)(C.t,{align:`center`,gap:`lg`,p:`xl`,maw:400,children:[(0,V.jsx)(g.o,{size:`3rem`,children:(0,V.jsx)(N.Kt,{})}),(0,V.jsx)(g.o,{size:`lg`,fw:700,ta:`center`,children:`Development Server Offline`}),(0,V.jsxs)(g.o,{size:`sm`,c:`dimmed`,ta:`center`,children:[`The app "`,e,`" cannot be loaded because the development server is offline.`]}),(0,V.jsx)(v.t,{variant:`light`,onClick:()=>{window.__FDE_API__?.openApp(`welcome`)},children:`Open Welcome App`}),(0,V.jsx)(_.i,{href:`https://github.com/frannunpal/frannunpal.github.io/issues`,target:`_blank`,rel:`noopener noreferrer`,size:`sm`,children:`File an issue on GitHub`})]})}),go=({appId:e})=>(0,V.jsx)(b.t,{style:{width:`100%`,height:`100%`},children:(0,V.jsxs)(C.t,{align:`center`,gap:`lg`,p:`xl`,maw:400,children:[(0,V.jsx)(g.o,{size:`3rem`,children:(0,V.jsx)(N.rr,{})}),(0,V.jsx)(g.o,{size:`lg`,fw:700,ta:`center`,children:`Custom Apps Not Available`}),(0,V.jsxs)(g.o,{size:`sm`,c:`dimmed`,ta:`center`,children:[`The app "`,e,`" cannot be loaded because this environment does not currently allow creating your own apps.`]}),(0,V.jsx)(g.o,{size:`sm`,c:`dimmed`,ta:`center`,children:`Please refer to the "Documentation" folder to learn more about it.`})]})}),_o=new Set,$=null,vo=null,yo=null,bo=!1,xo=0,So=null,Co=!1,wo=!1;function To(){_o.clear(),$=null,vo=null,yo=null,bo=!1,xo=0,So=null,Co=!1,wo=!1}var Eo=1e4,Do=2e3,Oo=5,ko=0;function Ao(){return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/api/hmr`}async function jo(){try{let e=await fetch(`/api/hmr`,{method:`HEAD`});return e.status===426||e.status===400}catch{return!1}}function Mo(){vo&&=(clearTimeout(vo),null),yo&&=(clearTimeout(yo),null),bo=!1}function No(e){typeof BroadcastChannel>`u`||(So=new BroadcastChannel(`fde-custom-apps`),So.onmessage=t=>{let n=t.data;n._fromBroadcast=!0,e(n)})}function Po(e){So?.postMessage(e)}async function Fo(){w.o.getState().isFsReady||await new Promise(e=>{let t=w.o.subscribe(n=>{n.isFsReady&&(t(),e())})});try{let e=w.v.getState().registeredApps,{added:t,removed:n}=await w.K(e);for(let e of t)w.v.getState().registerApp(e),w.o.getState().handleCustomAppRegistered?.(e);for(let e of n)w.v.getState().unregisterApp(e),w.o.getState().handleCustomAppUnregistered?.(e)}catch(e){console.warn(`[HMR] Failed to sync apps on connect:`,e)}}function Io(e,t,n){if(bo||$&&$.readyState===WebSocket.OPEN)return $;let r=Ao(),i=++xo;return bo=!0,$=new WebSocket(r),yo=setTimeout(()=>{$&&$.readyState!==WebSocket.OPEN&&i===xo&&(console.warn(`[HMR] Initial connection timeout`),ko++,ko>=Oo?(console.warn(`[HMR] Max initial retries reached, marking server as offline`),t()):($?.close(),vo=setTimeout(()=>{Io(e,t,n)},Do)))},Eo),$.onopen=()=>{if(i!==xo){$?.close();return}console.log(`[HMR] Connected to server`),ko=0,bo=!1,w.v.getState().resetHmrRetry(),w.v.getState().setHmrConnected(!0),w.v.getState().setHmrError(null),w.v.getState().devServerOffline&&n(),w.v.getState().setDevServerOffline(!1),Mo(),Fo().catch(e=>{console.warn(`[HMR] Failed to sync apps:`,e)})},$.onmessage=t=>{try{let n=JSON.parse(t.data);console.log(`[HMR] Received ${n.type} for ${n.appId}`),e(n)}catch(e){console.error(`[HMR] Failed to parse message:`,e)}},$.onclose=r=>{i===xo&&(console.log(`[HMR] Disconnected from server (code: ${r.code})`),$=null,bo=!1,w.v.getState().setHmrConnected(!1),Mo(),vo=setTimeout(()=>{Io(e,t,n)},Do))},$.onerror=e=>{i===xo&&(console.error(`[HMR] WebSocket error:`,e),w.v.getState().setHmrError(`Connection failed`))},$}function Lo(){Mo(),$&&=($.close(),null),So&&=(So.close(),null)}function Ro(e){let t=(0,B.useRef)(e),{notify:n}=P.n();(0,B.useEffect)(()=>{t.current=e},[e]);let r=(0,B.useCallback)(e=>{switch(e.type){case`reload`:{let t=e.appId,n=w.v.getState().mountedApps[t];if(n?.instance&&typeof n.instance.unmount==`function`)try{n.instance.unmount()}catch(e){console.warn(`[HMR] Error unmounting ${t}:`,e)}let r=document.getElementById(`app-container-${t}`);r&&(r.innerHTML=``),w.v.getState().setAppLoading(t),_o.forEach(e=>{try{e.onReload(t)}catch(e){console.error(`[HMR] Callback error:`,e)}});break}case`app-registered`:if(e.manifest){console.log(`[HMR] App registered: ${e.manifest.id}`);let t=!!w.v.getState().registeredApps[e.manifest.id];w.L(),w.q(e.manifest),w.v.getState().registerApp(e.manifest),w.o.getState().handleCustomAppRegistered?.(e.manifest),t||n(`New App Available`,`${e.manifest.name} is now available`,{fcIcon:`FcApproval`}),e._fromBroadcast||Po(e)}break;case`app-unregistered`:{let t=e.appId;console.log(`[HMR] App unregistered: ${t}`),w.L(),w.G(t),w.v.getState().unregisterApp(t),w.o.getState().handleCustomAppUnregistered?.(t),e._fromBroadcast||Po(e);break}case`app-error`:console.error(`[HMR] App error: ${e.appId} - ${e.error}`),n(`App Error`,e.error||`Unknown error`,{fcIcon:`FcCancel`});break}},[n]),i=(0,B.useCallback)(()=>{w.v.getState().setDevServerOffline(!0),n(`Development Server Offline`,`HMR is disabled. Changes will not be applied until the server reconnects.`,{fcIcon:`FcDoNotInsert`})},[n]),a=(0,B.useCallback)(()=>{n(`HMR Reconnected`,`Hot module replacement is now active`,{fcIcon:`FcApproval`})},[n]);(0,B.useEffect)(()=>{if(g.t()===`browser`){console.log(`[HMR] Skipping: not running in Docker`);return}if(!g.i()||!g.r())return;let e=!1;return _o.add(t.current),!wo&&!Co&&(Co=!0,jo().then(t=>{if(Co=!1,e||!t){t||console.warn(`[HMR] HMR endpoint not available, skipping WebSocket connection`);return}wo=!0,No(r),Io(r,i,a)}).catch(()=>{Co=!1})),()=>{e=!0,_o.delete(t.current),_o.size===0&&(wo=!1,Lo())}},[r,i,a])}function zo(){let{notify:e}=P.n();Ro({onReload:()=>{},onRegistered:(0,B.useCallback)(t=>{w.o.getState().handleCustomAppRegistered?.(t),e(`New App Available`,`${t.name} is now available`,{fcIcon:`FcApproval`})},[e]),onUnregistered:(0,B.useCallback)(e=>{w.o.getState().handleCustomAppUnregistered?.(e)},[])})}function Bo(e,t=5e3){return new Promise((n,r)=>{let i=Date.now(),a=null,o=null,s=()=>{o&&=(clearInterval(o),null),a&&=(clearTimeout(a),null)},c=()=>{let a=document.getElementById(e);if(a){s(),n(a);return}if(Date.now()-i>=t){s(),r(Error(`Container #${e} not found after ${t}ms`));return}};c(),o=setInterval(c,1e3),a=setTimeout(()=>{s(),r(Error(`Container #${e} not found after ${t}ms`))},t)})}var Vo={state:`idle`,progress:0,appName:``},Ho=1e4,Uo=({appId:e,windowIcon:t,notifyReady:n})=>{let[r,i]=(0,B.useState)({...Vo,appName:e}),[a,o]=(0,B.useState)(!1),[s,c]=(0,B.useState)(null),[l,u]=(0,B.useState)(!1),[d,f]=(0,B.useState)(0),p=(0,B.useRef)(null),m=(0,B.useRef)(!0),h=(0,B.useRef)(!1),_=(0,B.useRef)(null),v=(0,B.useRef)(null),y=w.v(e=>e.devServerOffline),b=w.v(t=>t.mountedApps[e]),x=w.v(e=>e.setAppLoading),S=w.v(e=>e.setAppLoaded),C=w.v(e=>e.setAppError),T=w.v(e=>e.clearApp),{notify:E}=P.n(),D=g.i(),O=(0,B.useCallback)(()=>{v.current&&=(clearTimeout(v.current),null)},[]),k=(0,B.useCallback)(()=>{_.current&&=(clearInterval(_.current),null)},[]),A=(0,B.useCallback)(()=>{let e=b?.instance;if(e&&typeof e.unmount==`function`)try{e.unmount()}catch{}},[b?.instance]),j=(0,B.useCallback)(async()=>{if(m.current&&!h.current){h.current=!0;try{i(e=>({...e,state:`fetching`,progress:10})),x(e),c(null),w.L();let t=await w.z(!0);if(!t)throw Error(`Apps manifest not found. Make sure apps are built.`);let r=t.apps.find(t=>t.id===e);if(!r)throw Error(`App '${e}' not found in manifest. Available apps: ${t.apps.map(e=>e.id).join(`, `)}`);i(e=>({...e,state:`loading`,progress:30,appName:r.name})),_.current=setInterval(()=>{if(!m.current){k();return}i(e=>({...e,progress:Math.min(e.progress+5,90)}))},100);try{await Bo(`app-container-${e}`,5e3)}catch{throw Error(`Container #app-container-${e} not found`)}if(await import(`/dist-apps/${r.entry}?t=${Date.now()}`),k(),S(e),await new Promise(t=>{O();let n=()=>{if(w.v.getState().mountedApps[e]?.isReady){t();return}v.current=setTimeout(n,500)};if(w.v.getState().mountedApps[e]?.isReady){t();return}v.current=setTimeout(()=>{console.warn(`[${e}] App did not call appReady() within ${Ho}ms`),E(`Warning`,`App ${e} took too long to initialize`,{fcIcon:`FcInfo`}),u(!0),w.v.getState().setAppReady(e),t()},Ho),n()}),i(e=>({...e,state:`ready`,progress:100})),o(!0),!m.current)return;setTimeout(()=>{n?.()},50)}catch(t){k(),O(),h.current=!1;let n=t instanceof Error?t.message:`Unknown error`;i(e=>({...e,state:`error`,error:n,progress:0})),C(e,n),c(n),console.error(`[CustomAppLoader] Error loading app ${e}:`,t)}}},[e,n,x,S,C,O,k,E]);if(Ro({onReload:(0,B.useCallback)(t=>{t===e&&(h.current=!1,A(),T(e),o(!1),i({...Vo,appName:e}),c(null),f(e=>e+1))},[e,T,A])}),(0,B.useEffect)(()=>{if(!h.current)return m.current=!0,j(),()=>{m.current=!1,k(),O()}},[j,d,k,O]),!D)return(0,V.jsx)(go,{appId:e});if(y&&!b?.isLoaded&&!s)return(0,V.jsx)(ho,{appId:e});let M=r.state===`error`,N=a&&b?.isReady&&!l,F=r.state===`ready`&&a&&l,I=F&&!b?.instance,L=M||I||!(N||F);return I?(0,V.jsx)(mo,{progress:{...r,state:`error`,error:`App '${e}' loaded but did not mount. Check the browser console for errors.`},windowIcon:t}):(0,V.jsxs)(V.Fragment,{children:[L&&(0,V.jsx)(mo,{progress:r,windowIcon:t}),(0,V.jsx)(`div`,{ref:p,id:`app-container-${e}`,"data-testid":`custom-app-container-${e}`,style:{all:`initial`,display:M?`none`:`block`,width:`100%`,height:`100%`,overflow:`auto`,visibility:N||F?`visible`:`hidden`,boxSizing:`border-box`,fontFamily:`sans-serif`}})]})},Wo=(0,B.createContext)({notifyReady:()=>{},getContentData:()=>void 0}),Go=()=>(0,B.useContext)(Wo),Ko=({children:e})=>{let t=(0,B.useRef)(void 0),n=(0,B.useCallback)(e=>{e!==void 0&&(t.current=e)},[]),r=(0,B.useCallback)(()=>t.current,[]);return(0,V.jsx)(Wo.Provider,{value:{notifyReady:n,getContentData:r},children:e})},qo={root:`_root_1vtes_1`,titleBar:`_titleBar_1vtes_12`,windowButtons:`_windowButtons_1vtes_31`,title:`_title_1vtes_12`,content:`_content_1vtes_41`,focusOverlay:`_focusOverlay_1vtes_48`},Jo=({win:e,isFocused:t,focusWindow:n})=>{let{notifyReady:r,getContentData:i}=Go(),o=w.v(t=>e.content in t.registeredApps),s=(0,B.useMemo)(()=>E.x(e.content),[e.content]),c=(0,B.useMemo)(()=>E.C(e.content),[e.content]),l=(0,B.useMemo)(()=>E.w(e.content),[e.content]),u=(0,B.useMemo)(()=>E.D(e.content),[e.content]),d=(0,B.useMemo)(()=>E.S(e.content),[e.content]),f=w.o(e=>e.closeWindow),p=i()??e.contentData,m={...e,contentData:p},h=c?c(m):void 0;if(o)return(0,V.jsx)(Uo,{appId:e.content,windowIcon:e.icon,notifyReady:r});let g=u?(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(po,{message:d?`Loading ${d}...`:void 0}),children:(0,B.createElement)(s,{window:e,notifyReady:r})}):(0,B.createElement)(s,{window:e,notifyReady:r});return(0,V.jsxs)(V.Fragment,{children:[l?(0,V.jsx)(B.Suspense,{fallback:null,children:(0,B.createElement)(l,{windowId:e.id,contentData:p,onExit:()=>f(e.id)})}):h&&h.length>0?(0,V.jsx)(a.t,{elements:h}):null,(0,V.jsxs)(`div`,{className:qo.content,children:[!t&&(0,V.jsx)(`div`,{"data-testid":`focus-overlay`,className:qo.focusOverlay,onMouseDown:t=>{t.stopPropagation(),n(e.id)}}),g]})]})},Yo=({window:e})=>{let{t}=D.t(`window`),n=w.o(t=>t.windows.find(t=>t.id===e.id))??e,r=ii(n.content),{focusWindow:i,closeWindow:a,minimizeWindow:o,maximizeWindow:s,restoreWindow:l,moveWindow:u,resizeWindow:d}=w.o(fo(e=>({focusWindow:e.focusWindow,closeWindow:e.closeWindow,minimizeWindow:e.minimizeWindow,maximizeWindow:e.maximizeWindow,restoreWindow:e.restoreWindow,moveWindow:e.moveWindow,resizeWindow:e.resizeWindow}))),f=c.h(e=>e.theme.colors.window),p=j.a(e=>e.isOpen),_=j.a(e=>e.windowId),b=j.a(e=>e.onSave),x=j.a(e=>e.onDiscard),S=j.a(e=>e.closeModal),{windowVariants:C,easeIn:O}=ti(),k=w.o(e=>{let t=e.windows.find(e=>e.id===n.id);if(!t)return!0;let r=t.alwaysOnTop??!1,i=e.windows.filter(e=>e.isOpen&&e.state!==`minimized`&&(e.alwaysOnTop??!1)===r);return i.length===0?!0:Math.max(...i.map(e=>e.zIndex))===t.zIndex}),{getRect:A}=Jn(),N=Gn(),P=(0,B.useRef)(n.state);(0,B.useEffect)(()=>{N.start(`visible`)},[N]),(0,B.useEffect)(()=>{if(P.current===`minimized`&&n.state!==`minimized`){let e=A(n.id);if(e){let t=n.x+n.width/2,r=n.y+n.height/2,i=e.left+e.width/2,a=e.top+e.height/2;N.start(E.v(i-t,a-r))}else N.set({x:0,y:0,scale:1,opacity:1}),N.start(`visible`)}P.current=n.state},[n.state,N,A,n.id,n.x,n.y,n.width,n.height]);let F=(0,B.useCallback)(e=>{e.preventDefault(),w.C.find(e=>e.id===n.content)?.hasContextMenu||e.stopPropagation()},[n.content]);if(!n.isOpen)return null;let I=n.state===`minimized`,L=n.state===`maximized`,ee=n.canMaximize!==!1,R=p&&_===n.id,te=async()=>{let e=A(n.id);if(e){let t=n.x+n.width/2,r=n.y+n.height/2,i=e.left+e.width/2,a=e.top+e.height/2;await N.start(E.m(i-t,a-r))}else await N.start({...C.exit,transition:O});o(n.id)},ne=async()=>{let e=j.t(n.id);e&&!e()||(await N.start({...C.exit,transition:O}),a(n.id))},z=()=>{b?.(),S()},re=()=>{x?.(),S();let e=n.id;e&&a(e)},ie=()=>{S()};return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(ao,{position:L?{x:0,y:0}:{x:n.x,y:n.y},size:L?{width:`100vw`,height:`100vh`}:{width:n.width,height:n.height},minWidth:n.minWidth??0,minHeight:n.minHeight??0,style:{zIndex:n.zIndex,visibility:I?`hidden`:`visible`,pointerEvents:I?`none`:`auto`},dragHandleClassName:qo.titleBar,disableDragging:L||I,enableResizing:!L&&!I,onMouseDown:()=>i(n.id),onDragStop:(e,t)=>u(n.id,t.x,t.y),onResizeStop:(e,t,r,i,a)=>{d(n.id,r.offsetWidth,r.offsetHeight),u(n.id,a.x,a.y)},children:(0,V.jsxs)(T.r.div,{className:qo.root,"data-testid":`window-${n.content}`,style:{background:f},variants:C,initial:`hidden`,animate:N,exit:`exit`,layout:!0,transition:E.p,onContextMenu:F,children:[(0,V.jsxs)(`div`,{className:qo.titleBar,children:[(0,V.jsx)(y.t,{fcIcon:n.fcIcon,iconUrl:n.iconUrl,fallback:n.icon,size:14,color:n.iconColor}),(0,V.jsx)(g.o,{size:`sm`,fw:500,truncate:!0,className:qo.title,children:r}),(0,V.jsxs)(h.t,{gap:2,wrap:`nowrap`,className:qo.windowButtons,children:[(0,V.jsx)(m.t,{size:`lg`,variant:`subtle`,"aria-label":t(`window.ariaLabels.minimize`),onClick:te,children:(0,V.jsx)(M.t,{name:`VscChromeMinimize`})}),ee&&(0,V.jsx)(m.t,{size:`lg`,variant:`subtle`,"aria-label":t(L?`window.ariaLabels.restore`:`window.ariaLabels.maximize`),onClick:()=>L?l(n.id):s(n.id),children:L?(0,V.jsx)(M.t,{name:`VscChromeRestore`}):(0,V.jsx)(M.t,{name:`VscChromeMaximize`})}),(0,V.jsx)(m.t,{size:`lg`,variant:`subtle`,color:`red`,"aria-label":t(`window.ariaLabels.close`),onClick:ne,children:(0,V.jsx)(M.t,{name:`VscChromeClose`})})]})]}),(0,V.jsx)(Ko,{children:(0,V.jsx)(Jo,{win:n,isFocused:k,focusWindow:i})})]})}),(0,V.jsxs)(G,{opened:R,onClose:ie,title:t(`unsavedModal.title`),centered:!0,withinPortal:!0,children:[(0,V.jsx)(g.o,{size:`sm`,mb:`lg`,children:t(`unsavedModal.message`)}),(0,V.jsx)(v.t,{variant:`default`,onClick:re,children:t(`unsavedModal.dontSave`)}),(0,V.jsx)(v.t,{onClick:z,ml:`sm`,children:t(`unsavedModal.save`)})]})]})},Xo={root:`_root_1f7p3_1`,iconImage:`_iconImage_1f7p3_21`,label:`_label_1f7p3_26`},Zo=({icon:e,onDoubleClick:t,onContextMenu:n})=>{let r=w.C.find(t=>t.id===e.appId),i=e.iconName!==void 0,a=e.nodeId!==void 0,o=e.icon===`📁`,s=e.appId===`pdf`,c=(0,B.useRef)(0),l=ii(e.appId),u=e.appId&&!a&&r?l:e.name,d=(0,B.useCallback)(t=>{if(t.preventDefault(),e.nodeId){t.stopPropagation(),n?.(t,e.nodeId);return}e.appId&&!r?.hasContextMenu&&t.stopPropagation()},[e.nodeId,e.appId,r?.hasContextMenu,n]),f=()=>i?(0,V.jsx)(_.t,{type:`folder`,name:e.name,folderNode:{id:e.id,name:e.name,type:`folder`,parentId:null,children:[],iconName:e.iconName,iconColor:e.iconColor,createdAt:new Date,updatedAt:new Date},size:32}):o&&a?(0,V.jsx)(_.t,{type:`folder`,name:e.name,size:32}):a||s?(0,V.jsx)(_.t,{type:`file`,name:e.name,size:32}):(0,V.jsx)(y.t,{fcIcon:r?.fcIcon,iconUrl:r?.iconUrl,fallback:e.icon,size:32,color:r?.iconColor});return(0,V.jsxs)(`div`,{className:Xo.root,style:{left:e.x,top:e.y},onDoubleClick:()=>t(e.appId??``,e.nodeId),onTouchEnd:n=>{n.preventDefault();let r=Date.now();r-c.current<300&&t(e.appId??``,e.nodeId),c.current=r},onContextMenu:d,role:`button`,"aria-label":u,tabIndex:0,onKeyDown:n=>n.key===`Enter`&&t(e.appId??``,e.nodeId),children:[(0,V.jsx)(`span`,{className:Xo.iconImage,"aria-hidden":`true`,children:f()}),(0,V.jsx)(g.o,{size:`xs`,className:Xo.label,truncate:!0,children:u})]})},Qo=({x:e,y:t})=>(0,V.jsx)(a.r.Target,{children:(0,V.jsx)(`div`,{"aria-hidden":`true`,style:{position:`fixed`,left:e,top:t,width:0,height:0,pointerEvents:`none`}})}),$o=({owner:e,parentId:t,currentPath:n})=>{let{t:r}=D.t(`contextMenu`),i=w.o(e=>e.contextMenu),o=w.o(e=>e.closeContextMenu),s=w.o(e=>e.copyToClipboard),c=w.o(e=>e.cutToClipboard),l=w.o(e=>e.clipboard),u=w.o(e=>e.clearClipboard),d=w.o(e=>e.fsNodes),f=w.o(e=>e.addNotification),p=w.o(e=>e.openWindow),m=w.o(e=>e.desktopSortMode),_=w.o(e=>e.filesSortMode),b=w.o(e=>e.setDesktopSortMode),x=w.o(e=>e.setFilesSortMode),S=w.o(e=>e.setFsNodes),C=w.o(e=>e.syncIcons),T=e===`files`?_:m,O=e===`files`?x:b,[k,A]=(0,B.useState)({opened:!1,pending:null}),[j,N]=(0,B.useState)({opened:!1,nodeId:null,nodeName:``}),P=i.owner===e,F=i.targetNodeId,I=F?d.find(e=>e.id===F):void 0,L=e=>{o();let{x:i,y:a}=E._();p({title:r(e===`folder`?`createItem.folderTitle`:`createItem.fileTitle`),content:`createItem`,icon:e===`folder`?`📁`:`📄`,fcIcon:e===`folder`?`FcNewFolder`:`FcFile`,x:i,y:a,width:400,height:300,minWidth:350,minHeight:250,canMaximize:!1,alwaysOnTop:!0,contentData:{mode:e,parentId:t,currentPath:n}})},ee=()=>{F&&I&&N({opened:!0,nodeId:F,nodeName:I.name}),o()},R=async e=>{if(e&&j.nodeId)try{await w.n.delete(j.nodeId),S(w.n.getAllNodes()),C()}catch(e){f({id:`delete-error-${Date.now()}`,title:r(`common:errors.deleteFailed`),message:e instanceof Error?e.message:`Unknown error`,fcIcon:`FcHighPriority`})}N({opened:!1,nodeId:null,nodeName:``})},te=()=>{I&&c([I]),o()},ne=()=>{I&&s([I]),o()},z=(e,t)=>d.find(n=>n.name===e&&n.parentId===t),re=async(e,t)=>{let n=await w.n.createFolder(e.name,t,e.iconName,e.iconColor),r=w.n.getChildren(e.id);for(let e of r)e.type===`folder`?await re(e,n.id):await w.n.createFile(e.name,e.content||``,n.id)},ie=async(e,n)=>{if(t){if(l.action===`cut`)try{await w.n.move(e.id,t),S(w.n.getAllNodes()),C()}catch(e){f({id:`move-error-${Date.now()}`,title:`Move Failed`,message:e instanceof Error?e.message:`Unknown error`,fcIcon:`FcHighPriority`});return}else if(l.action===`copy`){if(e.type===`folder`){let r=z(e.name,t);r&&n&&await w.n.delete(r.id),(!r||n)&&(await re(e,t),S(w.n.getAllNodes()),C())}else if(e.type===`file`){let r=z(e.name,t);if(r&&n&&await w.n.delete(r.id),!r||n)try{await w.n.createFile(e.name,e.content||``,t),S(w.n.getAllNodes()),C()}catch(e){f({id:`create-error-${Date.now()}`,title:`Create File Failed`,message:e instanceof Error?e.message:`Unknown error`,fcIcon:`FcHighPriority`})}}}l.action===`cut`&&u()}},ae=async()=>{if(l.content.length===0||!t)return;let e=l.content[0];z(e.name,t)?A({opened:!0,pending:{node:e,originalName:e.name}}):(await ie(e,!1),o())},oe=e=>{k.pending&&ie(k.pending.node,e),A({opened:!1,pending:null}),o()},se=l.content.length>0&&t!==null,ce=l.content.length>1?r(`actions.pasteItems`,{count:l.content.length}):r(`actions.paste`),le=e=>{O(e),o()},ue=[{mode:`default`,icon:`FcDatabase`,label:r(`sort.default`)},{mode:`name-asc`,icon:`FcAlphabeticalSortingAz`,label:r(`sort.nameAsc`)},{mode:`name-desc`,icon:`FcAlphabeticalSortingZa`,label:r(`sort.nameDesc`)},{mode:`type`,icon:`FcFile`,label:r(`sort.byType`)}];return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(a.r,{opened:P,onClose:o,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,position:`bottom-start`,children:[(0,V.jsx)(Qo,{x:i.x,y:i.y}),(0,V.jsx)(a.r.Dropdown,{children:I?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(a.r.Label,{children:I.name}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscFiles`,size:14}),onClick:te,children:r(`actions.cut`)}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscClippy`,size:14}),onClick:ne,children:r(`actions.copy`)}),se&&(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscCopy`,size:14}),onClick:ae,children:ce}),(0,V.jsx)(a.r.Divider,{}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscTrash`,size:14}),color:`red`,onClick:ee,children:r(`actions.delete`)})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscNewFolder`,size:14}),onClick:()=>L(`folder`),children:r(`actions.createFolder`)}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscNewFile`,size:14}),onClick:()=>L(`file`),children:r(`actions.createFile`)}),se&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(a.r.Divider,{}),(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(M.t,{name:`VscCopy`,size:14}),onClick:ae,children:ce})]}),e===`desktop`||e===`files`?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(a.r.Divider,{}),(0,V.jsx)(a.r.Label,{children:r(`sort.title`)}),ue.map(e=>(0,V.jsx)(a.r.Item,{leftSection:(0,V.jsx)(y.t,{fcIcon:e.icon,size:14}),onClick:()=>le(e.mode),style:T===e.mode?{fontWeight:600}:void 0,"data-testid":T===e.mode?`sort-option-selected`:void 0,children:e.label},e.mode))]}):null]})})]}),(0,V.jsxs)(G,{opened:k.opened,onClose:()=>oe(!1),title:(0,V.jsx)(g.o,{fw:600,children:r(`common:messages.replaceFile`)}),centered:!0,size:`sm`,children:[(0,V.jsx)(g.o,{size:`sm`,mb:`md`,children:r(`common:messages.replaceFileMessage`,{name:k.pending?.originalName})}),(0,V.jsxs)(h.t,{justify:`flex-end`,children:[(0,V.jsx)(v.t,{variant:`default`,size:`sm`,onClick:()=>oe(!1),leftSection:(0,V.jsx)(M.t,{name:`VscClose`,size:14}),children:r(`common:buttons.no`)}),(0,V.jsx)(v.t,{size:`sm`,onClick:()=>oe(!0),leftSection:(0,V.jsx)(M.t,{name:`VscCheck`,size:14}),children:r(`common:messages.yesReplace`)})]})]}),(0,V.jsxs)(G,{opened:j.opened,onClose:()=>R(!1),title:(0,V.jsx)(g.o,{fw:600,children:r(`deleteConfirm.title`,{name:j.nodeName})}),centered:!0,size:`sm`,children:[(0,V.jsx)(g.o,{size:`sm`,mb:`md`,children:r(`deleteConfirm.message`,{name:j.nodeName})}),(0,V.jsxs)(h.t,{justify:`flex-end`,children:[(0,V.jsx)(v.t,{variant:`default`,size:`sm`,onClick:()=>R(!1),leftSection:(0,V.jsx)(M.t,{name:`VscClose`,size:14}),children:r(`common:actions.cancel`)}),(0,V.jsx)(v.t,{color:`red`,size:`sm`,onClick:()=>R(!0),leftSection:(0,V.jsx)(M.t,{name:`VscTrash`,size:14}),children:r(`common:actions.delete`)})]})]})]})},es={overlay:`_overlay_34o9z_1`,content:`_content_34o9z_12`,phoneIcon:`_phoneIcon_34o9z_22`,rotatePhone:`_rotatePhone_34o9z_1`,title:`_title_34o9z_50`,message:`_message_34o9z_54`,button:`_button_34o9z_58`},ts=({onDismiss:e})=>{let{isPortrait:t,shouldShowWarning:n}=x.n();return!n||!t?null:(0,V.jsx)(`div`,{className:es.overlay,children:(0,V.jsxs)(`div`,{className:es.content,children:[(0,V.jsx)(`div`,{className:es.phoneIcon,children:(0,V.jsxs)(`svg`,{width:`64`,height:`64`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,V.jsx)(`rect`,{x:`5`,y:`2`,width:`14`,height:`20`,rx:`2`}),(0,V.jsx)(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`18.01`,strokeWidth:`2`,strokeLinecap:`round`})]})}),(0,V.jsx)(g.o,{size:`lg`,fw:500,className:es.title,children:`Turn your device`}),(0,V.jsx)(g.o,{size:`sm`,c:`dimmed`,className:es.message,children:`For a better experience use this app desktop OR horizontal mode`}),(0,V.jsx)(v.t,{variant:`subtle`,onClick:e,className:es.button,children:`Continue vertically?`})]})})},ns=()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,rs=()=>{let e=c.h(e=>e.applySystemTheme),t=c.h(e=>e.themeSetManually);(0,B.useEffect)(()=>{if(typeof window>`u`)return;t||e(ns());let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=t=>{c.h.getState().themeSetManually||e(t.matches?`dark`:`light`)};return n.addEventListener(`change`,r),()=>n.removeEventListener(`change`,r)},[e,t])},is=(e,t)=>{let n=e=>e.replace(/^v/,``).split(`.`).map(Number),r=n(e),i=n(t),a=Math.max(r.length,i.length);for(let e=0;e<a;e++){let t=r[e]??0,n=i[e]??0;if(t>n)return!0;if(t<n)return!1}return!1},as=`frannunpal/frannunpal.github.io`,os=`https://api.github.com/repos/${as}/releases/latest`,ss=async()=>{let e=await fetch(os);if(!e.ok)throw Error(`GitHub API error: ${e.status}`);return e.json()},cs=`fde-desktop:version`,ls=!1,us=()=>{let e=w.o(e=>e.mergeSeed),t=w.o(e=>e.mergeDesktopApps),n=w.o(e=>e.reorderDesktopApps),{notify:r}=P.n();(0,B.useEffect)(()=>{typeof window>`u`||ls||(ls=!0,g.a()?ds(r):fs(e,t,n,r))},[e,t,n,r])},ds=async e=>{try{let t=await ss(),n=t.tag_name;if(!is(n,__APP_VERSION__))return;e(`Update ${n} available!`,`Click close to open the download page.`,{fcIcon:`FcEngineering`,onClose:()=>window.open(t.html_url,`_blank`)})}catch{ls=!1}},fs=async(e,t,n,r)=>{try{let i=localStorage.getItem(cs),a=i?JSON.parse(i):null,o=await fetch(w.g(`version.json`)).then(e=>e.json());if(a?.sha===o.sha)return;let s=await w.t();if(!s)return;e(s),t(w.w),n(w.w),localStorage.setItem(cs,JSON.stringify(o)),r(`New version available!`,`Close this notification to install it.`,{fcIcon:`FcEngineering`,onClose:()=>window.location.reload()})}catch{ls=!1}},ps=e=>`https://fonts.googleapis.com/css2?family=${e.replace(/\s+/g,`+`)}&display=swap`,ms=e=>{let t=c.f[e];if(!t||document.head.querySelector(`link[data-font="${e}"]`))return;let n=document.createElement(`link`);n.rel=`stylesheet`,n.href=t,n.setAttribute(`data-font`,e),document.head.appendChild(n)},hs=()=>{let e=c.h(e=>e.font),t=c.h(e=>e.fontSize),n=c.h(e=>e.downloadedFonts);(0,B.useEffect)(()=>{n.forEach(e=>{c.f[e]||(c.f[e]=ps(e)),ms(e)})},[n]),(0,B.useEffect)(()=>{let r=c.u.map(e=>e.value).includes(e);!r&&n.includes(e)&&(c.f[e]||(c.f[e]=ps(e)),ms(e));let i;i=r?c.d[e]??c.d[`system-ui`]:n.includes(e)?`"${e}", sans-serif`:c.d[`system-ui`],document.documentElement.style.setProperty(`font-family`,i),document.documentElement.style.setProperty(`--mantine-font-family`,i),document.documentElement.style.setProperty(`font-size`,`${t}px`)},[e,t,n])};function gs(){let{i18n:e}=D.t(),t=c.h(e=>e.language);(0,B.useEffect)(()=>{t&&e.language!==t&&(e.changeLanguage(t),localStorage.setItem(`fde-desktop:language`,t))},[t,e]),(0,B.useEffect)(()=>{let e=localStorage.getItem(`fde-desktop:language`);t&&!e&&localStorage.setItem(`fde-desktop:language`,t)},[t])}var _s=`fran-desktop`,vs=`fde-desktop`,ys=1,bs=`fde-desktop:migration-version`,xs=!1,Ss=null;async function Cs(e,t){return new Promise(n=>{let r=indexedDB.open(e);r.onerror=()=>{n(!1)},r.onsuccess=async()=>{let i=r.result,a=Array.from(i.objectStoreNames);if(a.length===0){i.close(),n(!1);return}let o=indexedDB.open(t,i.version);o.onerror=()=>{i.close(),n(!1)},o.onupgradeneeded=e=>{let t=e.target.result;for(let e of a)t.objectStoreNames.contains(e)||t.createObjectStore(e)},o.onsuccess=async()=>{let t=o.result;try{for(let e of a){let n=i.transaction(e,`readonly`).objectStore(e).getAll();await new Promise((r,i)=>{n.onsuccess=()=>{let a=n.result;if(a&&a.length>0){let n=t.transaction(e,`readwrite`),o=n.objectStore(e);for(let e of a)o.put(e);n.oncomplete=()=>r(),n.onerror=()=>i(n.error)}else r()},n.onerror=()=>i(n.error)})}i.close(),t.close(),await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>t(),n.onerror=()=>t()}),n(!0)}catch{i.close(),t.close(),n(!1)}}}})}function ws(){let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n&&(n===_s||n.startsWith(`${_s}:`))&&e.push(n)}for(let t of e){let e=t.replace(_s,vs),n=localStorage.getItem(t);n!==null&&(localStorage.getItem(e)===null&&localStorage.setItem(e,n),localStorage.removeItem(t))}return{keysMigrated:e.length}}async function Ts(){return xs?{indexedDB:{fs:!1,blobs:!1},localStorage:{keysMigrated:0},version:ys}:Ss||(Ss=(async()=>{if(console.log(`[Migration] Starting storage migration...`),localStorage.getItem(bs)===String(ys))return console.log(`[Migration] Already migrated, skipping.`),xs=!0,{indexedDB:{fs:!1,blobs:!1},localStorage:{keysMigrated:0},version:ys};let e=!1,t=!1;try{e=await Cs(`fran-desktop-fs`,`fde-desktop-fs`),e&&console.log(`[Migration] Migrated IndexedDB: fran-desktop-fs → fde-desktop-fs`)}catch(e){console.warn(`[Migration] Failed to migrate fran-desktop-fs:`,e)}try{t=await Cs(`fran-desktop-blobs`,`fde-desktop-blobs`),t&&console.log(`[Migration] Migrated IndexedDB: fran-desktop-blobs → fde-desktop-blobs`)}catch(e){console.warn(`[Migration] Failed to migrate fran-desktop-blobs:`,e)}let{keysMigrated:n}=ws();return n>0&&console.log(`[Migration] Migrated ${n} localStorage keys`),localStorage.setItem(bs,String(ys)),console.log(`[Migration] Storage migration complete.`),xs=!0,{indexedDB:{fs:e,blobs:t},localStorage:{keysMigrated:n},version:ys}})(),Ss)}var Es=[],Ds=!1;function Os(){if(Es.length===0){Ds=!1;return}Ds=!0;let e=Es.shift();e&&e.loader().catch(()=>{}).finally(()=>{`requestIdleCallback`in window?requestIdleCallback(Os,{timeout:2e3}):setTimeout(Os,100)})}function ks(e,t){Es.some(t=>t.id===e)||(Es.push({id:e,loader:t}),As())}function As(){Ds||(`requestIdleCallback`in window?requestIdleCallback(Os,{timeout:2e3}):setTimeout(Os,100))}function js(e){e.forEach(e=>{ks(e.id,e.loader)})}var Ms=null,Ns=new Map;function Ps(){let{windows:e}=w.o.getState(),t=e.filter(e=>e.isOpen&&e.state!==`minimized`);return t.length===0?null:t.reduce((e,t)=>t.zIndex>(e?.zIndex??-1)?t:e,null)?.id??null}function Fs(e,t){let n=Ns.get(e);n&&n.forEach(n=>{try{n(t)}catch(t){console.error(`[FdeApi] Error in subscriber for ${e}:`,t)}})}var Is={width:800,height:600},Ls={x:100,y:100};function Rs(){if(Ms){console.warn(`[FdeApi] Already initialized`);return}Ms={openApp:(e,t)=>{let n=w.o.getState().openWindow,r=w.C.find(t=>t.id===e);n({content:e,title:t?.title??r?.name??e,icon:t?.icon??r?.icon??`📦`,fcIcon:r?.fcIcon,iconUrl:r?.iconUrl,iconColor:r?.iconColor,width:t?.size?.width??r?.defaultWidth??Is.width,height:t?.size?.height??r?.defaultHeight??Is.height,x:t?.position?.x??Ls.x,y:t?.position?.y??Ls.y,minWidth:r?.minWidth===!1?void 0:r?.minWidth,minHeight:r?.minHeight===!1?void 0:r?.minHeight,canMaximize:r?.canMaximize??!0,alwaysOnTop:r?.alwaysOnTop??!1,contentData:t?.contentData}),Fs(`window-opened`,{windowId:w.o.getState().windows[w.o.getState().windows.length-1]?.id??``,content:e})},closeWindow:e=>{let t=e??Ps();t&&(w.o.getState().closeWindow(t),Fs(`window-closed`,{windowId:t}))},minimizeWindow:e=>{let t=e??Ps();t&&(w.o.getState().minimizeWindow(t),Fs(`window-minimized`,{windowId:t}))},maximizeWindow:e=>{let t=e??Ps();t&&(w.o.getState().maximizeWindow(t),Fs(`window-maximized`,{windowId:t}))},restoreWindow:e=>{let t=e??Ps();t&&w.o.getState().restoreWindow(t)},focusWindow:e=>{let t=e??Ps();t&&(w.o.getState().focusWindow(t),Fs(`window-focused`,{windowId:t}))},openFile:(e,t)=>{w.o.getState().openWindow({content:`files`,contentData:{initialPath:e},title:`Files`,icon:`📁`,fcIcon:`FcOpenedFolder`,width:Is.width,height:Is.height,x:Ls.x,y:Ls.y}),Fs(`file-opened`,{path:e,appId:t})},openFileDialog:async()=>(console.warn(`[FdeApi] openFileDialog not yet implemented`),null),saveFile:async()=>(console.warn(`[FdeApi] saveFile not yet implemented`),!1),saveFileDialog:async()=>(console.warn(`[FdeApi] saveFileDialog not yet implemented`),null),getTheme:()=>c.h.getState().theme,setTheme:e=>{let t=e;t.taskbar&&t.window&&t.accent&&(c.h.getState().setCustomThemeColors(t),Fs(`theme-changed`,{theme:JSON.stringify(e)}))},showNotification:e=>{let t=w.ut();return w.o.getState().addNotification({id:t,title:e.title,message:e.message,fcIcon:e.type===`error`?`FcCancel`:e.type===`success`?`FcCheckmark`:`FcInfo`}),Fs(`notification-shown`,{notificationId:t}),t},hideNotification:e=>{w.o.getState().removeNotification(e)},getWindows:()=>w.o.getState().windows,getActiveWindow:()=>{let e=w.o.getState().windows,t=Ps();return t?e.find(e=>e.id===t)??null:null},getWindowById:e=>w.o.getState().windows.find(t=>t.id===e)??null,on:(e,t)=>(Ns.has(e)||Ns.set(e,new Set),Ns.get(e).add(t),()=>{Ns.get(e)?.delete(t)}),off:(e,t)=>{Ns.get(e)?.delete(t)},fs:w.n,appReady:e=>{w.v.getState().setAppReady(e)},registerAppInstance:(e,t)=>{w.v.getState().setAppReady(e,t)}},window.__FDE_API__=Ms,console.log(`[FdeApi] Initialized`)}function zs(){if(!Ms)throw Error(`[FdeApi] API not initialized. Call initializeFdeApi() first.`);return Ms}function Bs(){return Ms!==null}var Vs=!1;function Hs({defaultWallpaper:e,initialApp:t,prefetchLoaders:n}){let r=F.t(c.h(e=>e.wallpaper)??void 0),i=w.o(e=>e.windows),a=w.o(e=>e.icons),o=w.o(e=>e.initFs),s=w.o(e=>e.isFsReady),l=w.o(e=>e.fsNodes),u=w.o(e=>e.openContextMenu),d=w.o(e=>e.filesCurrentFolderId),f=w.o(e=>e.desktopFolderId),p=E.t(),{shouldShowWarning:m}=x.n(),{notify:h}=P.n(),[g,_]=(0,B.useState)(!1);rs(),us(),hs(),gs(),zo(),(0,B.useEffect)(()=>{Bs()||Rs()},[]),(0,B.useEffect)(()=>{if(!s)return;let e=document.getElementById(`initial-loader`);e&&(e.classList.add(`hidden`),setTimeout(()=>e.remove(),200))},[s]),(0,B.useEffect)(()=>{if(!n?.length)return;let e=setTimeout(()=>{js(n)},3e3);return()=>clearTimeout(e)},[n]),(0,B.useEffect)(()=>{Vs||(Vs=!0,Ts().finally(()=>{o(),t&&p(t)}))},[o,p,t]);let v=(0,B.useCallback)(e=>{e.preventDefault(),u(e.clientX,e.clientY,`desktop`)},[u]),y=(0,B.useCallback)((e,t)=>{e.preventDefault(),e.stopPropagation(),u(e.clientX,e.clientY,`desktop`,t)},[u]),b=(0,B.useCallback)((e,t)=>{let n;if(t){let r=l.find(e=>e.id===t);if(r?.type===`folder`)n={initialFolderId:t};else if(r?.type===`file`){let t=w.x(r);if(!t){h(`Unsupported file type`,`The type of file you are trying to open is not supported currently`,{fcIcon:`FcDeleteRow`});return}t.appId!==e&&h(`File type mismatch`,`Opening "${r.name}" as ${t.appId} instead of ${e}`,{fcIcon:`FcDeleteRow`}),p(t.appId,{contentData:t.contentData});return}}p(e,{contentData:n})},[p,l,h]);return s?(0,V.jsxs)(V.Fragment,{children:[m&&!g&&(0,V.jsx)(ts,{onDismiss:()=>_(!0)}),(0,V.jsxs)(Zn,{wallpaper:r??e,onContextMenu:v,children:[a.map(e=>(0,V.jsx)(Zo,{icon:e,onDoubleClick:b,onContextMenu:y},e.id)),(0,V.jsx)(Bn,{children:i.map(e=>(0,V.jsx)(Yo,{window:e},e.id))})]}),(0,V.jsx)(pa,{}),(0,V.jsx)($o,{owner:`desktop`,parentId:f,currentPath:`/home`}),(0,V.jsx)($o,{owner:`files`,parentId:d,currentPath:(()=>{let e=[`/home`],t=d,n=[];for(;t!==null;){let e=l.find(e=>e.id===t);if(!e)break;n.unshift(e.name),t=e.parentId}return[...e,...n].join(`/`)})()})]}):null}function Us({children:e,isReady:t,error:n,defaultWallpaper:r,initialApp:i,prefetchLoaders:a}){let o=me(),s=c.h(e=>e.setThemeMode),l=c.h(e=>e.toggleTheme),u=(0,B.useMemo)(()=>({fs:null,isReady:t,error:n,theme:o,setThemeMode:s,toggleTheme:l}),[t,n,o,s,l]);return e?(0,V.jsx)(qn,{children:(0,V.jsx)(Dn.Provider,{value:u,children:e})}):(0,V.jsx)(qn,{children:(0,V.jsx)(Dn.Provider,{value:u,children:(0,V.jsx)(Hs,{defaultWallpaper:r,initialApp:i,prefetchLoaders:a})})})}function Ws({children:e,fallback:t=null,theme:n,mantineTheme:r,fileSystem:i,initialMode:a,customApps:o,onError:s,defaultWallpaper:l,initialApp:u,prefetchLoaders:d}){let[f,p]=(0,B.useState)(!1),[m,h]=(0,B.useState)(null),g=c.h(e=>e.theme.mode),[_]=(0,B.useState)(a),v=_??g;(0,B.useEffect)(()=>{let e=!0;return(async()=>{try{E.T(),o&&E.O(o)}catch(e){console.error(`[FdeDesktop] Failed to initialize core registry:`,e)}if(!i){e&&p(!0);return}try{await i.initialize(),e&&p(!0)}catch(t){let n=t instanceof Error?t:Error(String(t));e&&(h(n),s?.(n))}})(),()=>{e=!1}},[i,o,s]);let y=(0,B.useMemo)(()=>Ie({...En,...r}),[r]);return m||!f?(0,V.jsx)(V.Fragment,{children:t}):(0,V.jsx)(Pe,{theme:y,forceColorScheme:v,children:(0,V.jsx)(pe,{mode:v,theme:n,children:(0,V.jsx)(Us,{isReady:f,error:m,defaultWallpaper:l,initialApp:u,prefetchLoaders:d,children:e})})})}var Gs=({component:e,windowId:t,contentData:n,onExit:r})=>e?(0,V.jsx)(e,{windowId:t,contentData:n,onExit:r}):null,Ks=w.C.filter(e=>e.id!==`settings`),qs=({opened:e,position:t,onClose:n,onOpenApp:r,onToggleTheme:i})=>(0,V.jsxs)(a.r,{opened:e,onClose:n,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,V.jsx)(Qo,{x:t.x,y:t.y}),(0,V.jsxs)(a.r.Dropdown,{children:[Ks.map(e=>(0,V.jsxs)(a.r.Item,{onClick:()=>r(e.id),children:[`Open `,e.name]},e.id)),(0,V.jsx)(a.r.Divider,{}),(0,V.jsx)(a.r.Item,{onClick:i,children:`Toggle Theme`})]})]}),Js={container:`_container_1br66_1`},Ys=({notifyReady:e,window:t,config:n})=>{let r=(0,B.useRef)(!1),i=`${n.title} blocks embedding in iframes for security reasons.`;(0,B.useEffect)(()=>{r.current||(r.current=!0,e?.({...t?.contentData??{},openInBrowser:()=>{globalThis.window.open(n.url,`_blank`,`noopener,noreferrer`)}}))},[e,t,n.url]);let a=()=>{globalThis.window.open(n.url,`_blank`,`noopener,noreferrer`)},o=O.o(n.icon,{size:48,color:n.iconColor}),s=O.o(n.icon,{size:16,color:n.iconColor});return(0,V.jsx)(b.t,{className:Js.container,children:(0,V.jsxs)(C.t,{align:`center`,gap:`md`,children:[o,(0,V.jsx)(g.o,{size:`lg`,fw:500,children:n.title}),(0,V.jsxs)(g.o,{size:`sm`,c:`dimmed`,ta:`center`,children:[n.description??i,(0,V.jsx)(`br`,{}),`Click below to go to my `,n.title,` profile.`]}),(0,V.jsx)(v.t,{leftSection:s,onClick:a,children:n.buttonLabel})]})})},Xs=(e=0,t)=>{let[n,r]=(0,B.useState)(!1),[i,a]=(0,B.useState)({x:0,y:0});return{opened:n,position:i,open:(0,B.useCallback)((n,i)=>{if(n.preventDefault(),t&&!w.C.find(e=>e.id===t)?.hasContextMenu){n.stopPropagation();return}a({x:n.clientX,y:n.clientY+(i??e)}),r(!0)},[e,t]),close:(0,B.useCallback)(()=>r(!1),[])}};function Zs({snapshotRef:e,getCurrentState:t,initialSnapshot:n,onChange:r,appId:i}){let[a,o]=(0,B.useState)(!1),s=(0,B.useRef)(r);return(0,B.useEffect)(()=>{s.current=r},[r]),(0,B.useEffect)(()=>{if(e.current===null){if(i){let t=I.n.getState().getSnapshot(i);if(t!==null){e.current=t;return}}n!==void 0&&(e.current=n)}},[e,n,i]),(0,B.useEffect)(()=>{let n=t();if(e.current===null)return;let r=JSON.stringify(n)!==JSON.stringify(e.current);o(r),s.current&&s.current(r)},[t,e]),{isDirty:a,takeSnapshot:(0,B.useCallback)(()=>{let n=t();e.current=n,o(!1),i&&I.n.getState().setSnapshot(i,n),s.current&&s.current(!1)},[e,t,i]),reset:(0,B.useCallback)(()=>{o(!1),s.current&&s.current(!1)},[])}}function Qs(){return(0,B.useMemo)(()=>Bs()?zs():(console.warn(`[useFdeApi] API not initialized. Make sure initializeFdeApi() is called.`),null),[])}var $s={status:`idle`,loaded:0,total:null,percent:null,error:null},ec=()=>{let[e,t]=(0,B.useState)($s),n=(0,B.useCallback)(()=>t($s),[]),r=(0,B.useCallback)(async e=>{t({status:`downloading`,loaded:0,total:null,percent:null,error:null});try{let n=await fetch(e);if(!n.ok)return t(e=>({...e,status:`error`,error:`HTTP ${n.status}: ${n.statusText}`})),null;let r=n.headers.get(`Content-Length`),i=r?parseInt(r,10):null;if(!n.body){let e=await n.text();return t({status:`done`,loaded:e.length,total:e.length,percent:100,error:null}),e}let a=n.body.getReader(),o=[],s=0;for(;;){let{done:e,value:n}=await a.read();if(e)break;o.push(n),s+=n.byteLength;let r=i?Math.round(s/i*100):null;t({status:`downloading`,loaded:s,total:i,percent:r,error:null})}let c=new Uint8Array(s),l=0;for(let e of o)c.set(e,l),l+=e.byteLength;let u=new TextDecoder().decode(c);return t({status:`done`,loaded:s,total:i??s,percent:100,error:null}),u}catch(e){let n=e instanceof Error?e.message:`Unknown error`;return t(e=>({...e,status:`error`,error:n})),null}},[]);return{...e,download:r,reset:n}},tc={light:{mode:`light`,desktop:`#f0f4f8`,taskbar:`rgba(255, 255, 255, 0.9)`,window:`#ffffff`,accent:`#339af0`},dark:{mode:`dark`,desktop:`#1a1b1e`,taskbar:`rgba(26, 27, 30, 0.9)`,window:`#25262b`,accent:`#4dabf7`}},nc=typeof __APP_VERSION__==`string`?__APP_VERSION__:`0.4.0`,rc=()=>`${nc}-${typeof __PROD__==`boolean`&&__PROD__?`prod`:`dev`}-${typeof window<`u`&&window.__FDE_IN_DOCKER__?`docker`:`web`}`,ic=()=>typeof __PROD__==`boolean`&&__PROD__?`prod`:`dev`,ac=()=>typeof window>`u`?`web`:window.__FDE_IN_DOCKER__?`docker`:/Electron/i.test(navigator.userAgent)?`electron`:`web`,oc=e=>({primaryColor:`blue`,other:{desktop:e.desktop,taskbar:e.taskbar,window:e.window,accent:e.accent}});exports.ANIMATION_DURATION=E.n,exports.APPS=w.C,exports.APP_IDS=Y,exports.APP_ID_TO_TRANSLATION_KEY=ni,exports.APP_VERSION=nc,exports.AVAILABLE_FONTS=c.u,exports.AppEmptyState=T.t,exports.AppIcon=y.t,exports.AppLoading=po,exports.AppMenuBar=a.t,exports.AppReadyProvider=Ko,exports.BREAKPOINTS=w.p,exports.CORE_APPS=w.k,exports.CORE_APP_IDS=w.A,exports.CORE_REGISTRY=E.b,exports.CUSTOM_APPS_FOLDER_ID=w.J,exports.CalendarApp=t.t,exports.CalendarAppLazy=E.k,exports.CollapsibleSection=ci,exports.ColorPicker=r.t,exports.ContextMenu=qs,exports.ContextMenuAnchor=mi,exports.CreateItemApp=u.t,exports.CreateItemAppLazy=E.A,exports.CreateItemContextMenu=$o,exports.CustomAppLoader=Uo,exports.CustomAppLoadingScreen=mo,exports.CustomAppNotSupported=go,exports.CustomAppOffline=ho,exports.DEFAULT_FDE_THEME=fe,exports.DEFAULT_LANGUAGE=c.i,exports.DEFAULT_LAUNCHER_FOLDERS=w.Y,exports.DEFAULT_THEME_COLORS=tc,exports.DEFAULT_VIEWPORT_HEIGHT=w.s,exports.DEFAULT_VIEWPORT_WIDTH=w.c,exports.DEFAULT_WINDOW_DIMENSIONS=w.j,exports.DESKTOP_APPS=ri,exports.DESKTOP_APPS_ORDER=w.w,exports.DefaultThemeProvider=c.g,exports.Desktop=Zn,exports.DesktopIcon=Zo,exports.DeviceInfoApp=x.t,exports.DeviceInfoAppLazy=E.j,exports.DirtyIndicator=a.n,exports.DockerFileSystemAdapter=w.Z,exports.DownloadProgress=d.t,exports.DragDropProvider=A.a,exports.DynamicMenuBarRenderer=Gs,exports.EASE_IN=E.r,exports.EASE_OUT=E.i,exports.EXTRA_APPS=w.D,exports.EXTRA_APP_IDS=w.O,exports.ExternalLinkApp=Ys,exports.FONT_STACKS=c.d,exports.FdeDesktop=Ws,exports.FdeProvider=kn,exports.FileIcon=_.t,exports.FilePickerApp=L.t,exports.FilePickerModal=L.n,exports.FilesApp=P.t,exports.FilesAppLazy=E.M,exports.FolderPicker=L.a,exports.GITHUB_LATEST_RELEASE_URL=os,exports.GITHUB_RELEASES_REPO=as,exports.GOOGLE_FONTS_HREF=c.f,exports.ICON_COLUMN_WIDTH=w.l,exports.ICON_MARGIN=w.u,exports.ICON_ROW_HEIGHT=w.d,exports.IMAGE_MIME_TYPES=w.y,exports.IconColorPicker=u.n,exports.ImageViewerApp=R.t,exports.ImageViewerAppLazy=E.N,exports.ImageViewerMenuBar=se.t,exports.ImageViewerMenuBarLazy=E.P,exports.IndexedDBFileSystem=w.$,exports.LanguageFlag=c.p,exports.LanguageSelector=da,exports.Launcher=pi,exports.MenuEditApp=A.t,exports.MenuEditAppLazy=E.F,exports.MenuEditMenuBar=ie.t,exports.MenuEditMenuBarLazy=E.I,exports.NotesApp=I.t,exports.NotesAppLazy=E.L,exports.NotesMenuBar=re.t,exports.NotesMenuBarLazy=E.R,exports.PREDEFINED_LAUNCHER_FOLDERS=w.X,exports.PRESET_COLORS=ee.t,exports.PRESET_ICONS=u.r,exports.PROFILE=c.n,exports.PdfApp=te.t,exports.PdfAppLazy=E.z,exports.PdfMenuBar=oe.t,exports.PdfMenuBarLazy=E.B,exports.SETTINGS_SECTIONS=c.l,exports.SUPPORTED_LANGUAGES=c.a,exports.SettingsApp=c.t,exports.SettingsAppLazy=E.V,exports.SettingsMenuBar=ae.t,exports.SettingsMenuBarLazy=E.H,exports.SettingsSectionComponent=c.c,exports.SortOptions=w.M,exports.StorybookApp=ne.t,exports.TASKBAR_HEIGHT=w.f,exports.TEXT_MIME_TYPES=w.b,exports.Taskbar=pa,exports.TaskbarContextMenu=vi,exports.ThemeProvider=pe,exports.UploaderApp=S.t,exports.UploaderAppLazy=E.U,exports.VscIcon=M.t,exports.Window=Yo,exports.WindowButtonRegistryProvider=qn,exports.WindowManagerAdapter=w.nt,exports.appendDirtyIndicator=z.t,exports.buildBreadcrumbs=L.o,exports.centerWindowPosition=E.a,exports.checkHMREndpointExists=jo,exports.clearBrowserData=c.r,exports.clearManifestCache=w.L,exports.convertToAppEntry=w.R,exports.createDesktopIcon=w.ct,exports.createEaseIn=E.o,exports.createEaseOut=E.s,exports.createFile=w.rt,exports.createFolder=w.it,exports.createLauncherFolder=w.at,exports.createMaximizeTransition=E.c,exports.createMinimizeVariant=E.l,exports.createPanelVariants=E.u,exports.createPredefinedLauncherFolder=w.ot,exports.createRestoreVariant=E.d,exports.createWindow=w.lt,exports.createWindowVariants=E.f,exports.fetchAppManifest=w.z,exports.fileSystem=w.n,exports.formatBytes=S.n,exports.generateUUID=w.ut,exports.getAppComponent=E.x,exports.getAppIdForMime=w.x,exports.getAppName=E.S,exports.getBaseUrl=w.m,exports.getCachedManifest=w.B,exports.getCloseInterceptor=j.t,exports.getCustomAppById=w.V,exports.getCustomApps=w.H,exports.getEnvironment=ic,exports.getFdeApi=zs,exports.getFileExtension=_.n,exports.getFourRandomColors=T.n,exports.getMenuBarBuilder=E.C,exports.getMenuBarComponent=E.w,exports.getMimeTypeFromExtension=w.tt,exports.getPersistedThemeMode=c.m,exports.getReleaseType=ac,exports.getRuntime=g.t,exports.getVersionString=rc,exports.hashBlob=w.et,exports.i18n=ca,exports.initRegistry=E.E,exports.initializeFdeApi=Rs,exports.injectFontLink=c.s,exports.isBrowser=g.n,exports.isCustomApp=w.U,exports.isDev=g.r,exports.isDocker=g.i,exports.isElectron=g.a,exports.isFdeApiInitialized=Bs,exports.isLazyApp=E.D,exports.isNewerVersion=is,exports.maximizeTransition=E.p,exports.mergeAppsWithCustomApps=w.W,exports.migrateStorage=Ts,exports.minimizeVariant=E.m,exports.openVariants=E.h,exports.panelVariants=E.g,exports.prefetchApps=js,exports.randomWindowPosition=E._,exports.registerAppFileHandler=w.S,exports.registerCloseInterceptor=j.n,exports.registerComponents=E.O,exports.registerCustomApps=w.T,exports.registerDesktopApps=w.E,exports.removeFromManifestCache=w.G,exports.resetBaseUrlCache=w.h,exports.resetFileSystem=w.r,exports.resetHMRState=To,exports.resetWindowManager=w.i,exports.resolveFileUrl=w.a,exports.resolveUrl=w.g,exports.restoreVariant=E.v,exports.setApiBaseUrl=w.Q,exports.setTestBaseUrl=w._,exports.sortDesktopIcons=w.N,exports.sortDesktopIconsByMode=w.P,exports.sortNodes=w.F,exports.sortNodesByMode=w.I,exports.syncWithServer=w.K,exports.toMantineTheme=oc,exports.unregisterCloseInterceptor=j.r,exports.updateLauncherFolder=w.st,exports.updateManifestCache=w.q,exports.useAdaptiveDimensions=k.t,exports.useAnimationDuration=ti,exports.useAppName=ii,exports.useAppReady=Go,exports.useAppTempMemoryStore=I.n,exports.useAppUpdate=us,exports.useApplyFont=hs,exports.useClock=Zr,exports.useCloseInterceptor=j.i,exports.useCloseModalStore=j.a,exports.useCollapsible=oi,exports.useContextMenu=Xs,exports.useCustomAppHMR=Ro,exports.useCustomAppLifecycle=zo,exports.useCustomAppStore=w.v,exports.useDesktopStore=w.o,exports.useDeviceDetection=x.n,exports.useDownload=ec,exports.useDragDropState=A.n,exports.useDraggableItem=A.i,exports.useDroppableArea=A.r,exports.useDynamicIcon=O.t,exports.useDynamicIconElement=O.n,exports.useFcIcon=O.r,exports.useFcIconElement=O.i,exports.useFdeApi=Qs,exports.useFdeContext=An,exports.useFiIcon=O.a,exports.useFiIconElement=O.o,exports.useFolderName=A.o,exports.useFontDownload=c.o,exports.useIsDirty=Zs,exports.useLanguageSync=gs,exports.useNotifications=P.n,exports.useOpenApp=E.t,exports.useResolvedUrl=F.t,exports.useSearchFilter=ai,exports.useSettingsStore=c.h,exports.useSystemTheme=rs,exports.useTaskbarContextMenu=ei,exports.useTaskbarHeight=hi,exports.useTheme=me,exports.useThemeContext=he,exports.useVscIcon=O.s,exports.useVscIconElement=O.c,exports.useWindowButtonRegistry=Jn,exports.uuidv4=w.dt,exports.waitForContainer=Bo,exports.windowVariants=E.y;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./Box-zW6Twge8.cjs`),t=require(`./CalendarApp-B_e1B1Yn.cjs`),n=require(`./ColorPicker-BrDE7tMO.cjs`),r=require(`./create-safe-context-Bboj0GWC.cjs`),i=require(`./AppMenuBar-B9U0n1Vv.cjs`),a=require(`./Tooltip-D5Cd9wtz.cjs`),o=require(`./TextInput-CrsmcOip.cjs`),s=require(`./SettingsApp-DWxanNE4.cjs`),c=require(`./Slider-BUiHxjKO.cjs`),l=require(`./CreateItemApp-B12M1E_1.cjs`),u=require(`./DownloadProgress-VNdj22U8.cjs`),d=require(`./UnstyledButton-DX2pTahr.cjs`),f=require(`./Paper-D8-BaBx2.cjs`),p=require(`./ActionIcon-alk2zZD6.cjs`),m=require(`./Group-Dsrf6lEK.cjs`),h=require(`./getRuntime-BFK0-8R1.cjs`),g=require(`./FileIcon-CIXopWLv.cjs`),_=require(`./Button-DMlnrqyx.cjs`),v=require(`./AppIcon-BU7a3ZNH.cjs`),y=require(`./Center-DKUE2pER.cjs`),b=require(`./DeviceInfoApp-DRy0H3aT.cjs`),x=require(`./UploaderApp-DnHIRxB_.cjs`),S=require(`./Stack-D4jAiRfc.cjs`),C=require(`./useOpenApp-DW4x79Zg.cjs`),w=require(`./desktopStore-CZoA9VHO.cjs`),T=require(`./useDynamicIcon-DJ_il30E.cjs`),E=require(`./useAdaptiveDimensions-CfITBJ_m.cjs`),D=require(`./MenuEditApp-JPsGT-S3.cjs`),O=require(`./useCloseInterceptor-yntBEzNc.cjs`),k=require(`./VscIcon-CcMdrFoJ.cjs`),A=require(`./FilesApp-BpJJRKhi.cjs`),j=require(`./useResolvedUrl-BkMPM1fM.cjs`),M=require(`./FilePickerApp-DjmuSFqa.cjs`),N=require(`./NotesApp-BOcRGO7w.cjs`),P=require(`./AppEmptyState-BWCUbf-B.cjs`),F=require(`./Colors-zP2AFgU3.cjs`),I=require(`./ImageViewerApp-DlHGeB3S.cjs`),ee=require(`./PdfApp-CNEbty5v.cjs`),L=require(`./StorybookApp-CDLV_kja.cjs`);require(`./TerminalApp-Dviz6aP2.cjs`),require(`./CodeServerApp-BOoGwZ7r.cjs`);const te=require(`./useMenuBarUtils-nJIPJGIQ.cjs`),ne=require(`./NotesMenuBar-Df6aW85J.cjs`);require(`./TerminalMenuBar-DNshPmCa.cjs`);const R=require(`./MenuEditMenuBar-DptlwVPQ.cjs`),re=require(`./SettingsMenuBar-CBoOBCfx.cjs`),ie=require(`./PdfMenuBar-Dj5cJUkg.cjs`),ae=require(`./ImageViewerMenuBar-_Jr29gii.cjs`);let z=require(`react`);z=e.B(z);let B=require(`react/jsx-runtime`),V=require(`clsx`);V=e.B(V);let oe=require(`react-remove-scroll`),H=require(`framer-motion`),U=require(`react-i18next`),se=require(`i18next`);se=e.B(se);let ce=require(`i18next-browser-languagedetector`);ce=e.B(ce);let le=require(`react-rnd`),ue=require(`zustand/react/shallow`),de=require(`react-icons/fc`),fe=require(`uuid`);var pe=(0,z.createContext)(void 0),me={borderRadius:`8px`,headerHeight:40,minWidth:400,minHeight:300,defaultWidth:800,defaultHeight:600,shadow:`0 8px 32px rgba(0, 0, 0, 0.2)`},he={height:48,position:`bottom`,background:`rgba(0, 0, 0, 0.8)`,blur:!0},ge={light:{mode:`light`,colors:{desktop:`#f0f4f8`,taskbar:`rgba(255, 255, 255, 0.9)`,window:`#ffffff`,accent:`#339af0`},window:me,taskbar:he,desktop:{background:`linear-gradient(135deg, #667eea 0%, #764ba2 100%)`,iconSize:64,iconSpacing:16}},dark:{mode:`dark`,colors:{desktop:`#1a1b1e`,taskbar:`rgba(26, 27, 30, 0.9)`,window:`#25262b`,accent:`#4dabf7`},window:me,taskbar:he,desktop:{background:`linear-gradient(135deg, #1a1b1e 0%, #2d1f3d 100%)`,iconSize:64,iconSpacing:16}}};function _e({children:e,initialMode:t=`light`,mode:n,theme:r}){let[i,a]=(0,z.useState)(n??t),o=(0,z.useRef)(null);(0,z.useEffect)(()=>{n!==void 0&&n!==i&&a(n)},[n,i]);let s=(0,z.useCallback)(()=>{a(e=>e===`light`?`dark`:`light`)},[]),c=(0,z.useCallback)(e=>{o.current=e},[]),l=(0,z.useCallback)(()=>{let e=ge[i],t=o.current;return t?{...e,colors:{desktop:r?.colors?.desktop??e.colors.desktop,taskbar:t.taskbar,window:t.window,accent:t.accent},window:{...e.window,...r?.window},taskbar:{...e.taskbar,...r?.taskbar},desktop:{...e.desktop,...r?.desktop}}:r?{mode:r.mode??e.mode,colors:{desktop:r.colors?.desktop??e.colors.desktop,taskbar:r.colors?.taskbar??e.colors.taskbar,window:r.colors?.window??e.colors.window,accent:r.colors?.accent??e.colors.accent},window:{...e.window,...r.window},taskbar:{...e.taskbar,...r.taskbar},desktop:{...e.desktop,...r.desktop}}:e},[i,r]);(0,z.useEffect)(()=>{document.documentElement.style.setProperty(`color-scheme`,i),document.documentElement.setAttribute(`data-mantine-color-scheme`,i)},[i]);let u=(0,z.useMemo)(()=>({getTheme:l,setMode:a,toggle:s,setCustomColors:c}),[l,a,s,c]);return(0,B.jsx)(pe.Provider,{value:u,children:e})}function ve(){let e=(0,z.useContext)(pe);if(!e)throw Error(`useTheme must be used within a ThemeProvider`);return e.getTheme()}function ye(){let e=(0,z.useContext)(pe);if(!e)throw Error(`useThemeContext must be used within a ThemeProvider`);return e}function be(e,t,n){let r=(0,z.useEffectEvent)(t);(0,z.useEffect)(()=>(window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)),[e])}function xe(e){return e===`auto`||e===`dark`||e===`light`}function Se({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return xe(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&xe(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function Ce(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function we({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,z.useRef)(null),[a,s]=(0,z.useState)(()=>e.get(t)),c=r||a,l=(0,z.useCallback)(t=>{r||(Ce(t,n),s(t),e.set(t))},[e.set,c,r]),u=(0,z.useCallback)(()=>{s(t),Ce(t,n),e.clear()},[e.clear,t]);return(0,z.useEffect)(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),o.f(()=>{Ce(e.get(t),n)},[]),(0,z.useEffect)(()=>{if(r)return Ce(r,n),()=>{};r===void 0&&Ce(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&Ce(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:c,setColorScheme:l,clearColorScheme:u}}function Te(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function Ee(e,t){let n=t?[t]:[`:root`,`:host`],r=Te(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=Te(e.dark),o=Te(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function De({theme:t,color:n,colorScheme:r,name:i=n,withColorValues:a=!0}){if(!t.colors[n])return{};if(r===`light`){let r=e.w(t,`light`),o={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-filled)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${r})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${r===9?8:r+1})`,[`--mantine-color-${i}-light`]:`var(--mantine-color-${i}-1)`,[`--mantine-color-${i}-light-hover`]:`var(--mantine-color-${i}-2)`,[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-9)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${r})`,[`--mantine-color-${i}-outline-hover`]:e._(t.colors[n][r],.05)};return a?{[`--mantine-color-${i}-0`]:t.colors[n][0],[`--mantine-color-${i}-1`]:t.colors[n][1],[`--mantine-color-${i}-2`]:t.colors[n][2],[`--mantine-color-${i}-3`]:t.colors[n][3],[`--mantine-color-${i}-4`]:t.colors[n][4],[`--mantine-color-${i}-5`]:t.colors[n][5],[`--mantine-color-${i}-6`]:t.colors[n][6],[`--mantine-color-${i}-7`]:t.colors[n][7],[`--mantine-color-${i}-8`]:t.colors[n][8],[`--mantine-color-${i}-9`]:t.colors[n][9],...o}:o}let o=e.w(t,`dark`),s={[`--mantine-color-${i}-text`]:`var(--mantine-color-${i}-4)`,[`--mantine-color-${i}-filled`]:`var(--mantine-color-${i}-${o})`,[`--mantine-color-${i}-filled-hover`]:`var(--mantine-color-${i}-${o===9?8:o+1})`,[`--mantine-color-${i}-light`]:e.b(t.colors[n][9],.5),[`--mantine-color-${i}-light-hover`]:e.b(t.colors[n][9],.3),[`--mantine-color-${i}-light-color`]:`var(--mantine-color-${i}-0)`,[`--mantine-color-${i}-outline`]:`var(--mantine-color-${i}-${Math.max(o-4,0)})`,[`--mantine-color-${i}-outline-hover`]:e._(t.colors[n][Math.max(o-4,0)],.05)};return a?{[`--mantine-color-${i}-0`]:t.colors[n][0],[`--mantine-color-${i}-1`]:t.colors[n][1],[`--mantine-color-${i}-2`]:t.colors[n][2],[`--mantine-color-${i}-3`]:t.colors[n][3],[`--mantine-color-${i}-4`]:t.colors[n][4],[`--mantine-color-${i}-5`]:t.colors[n][5],[`--mantine-color-${i}-6`]:t.colors[n][6],[`--mantine-color-${i}-7`]:t.colors[n][7],[`--mantine-color-${i}-8`]:t.colors[n][8],[`--mantine-color-${i}-9`]:t.colors[n][9],...s}:s}function Oe(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function W(t,n,r){e.R(n).forEach(e=>Object.assign(t,{[`--mantine-${r}-${e}`]:n[e]}))}var ke=t=>{let n=e.w(t,`light`),r=t.defaultRadius in t.radius?t.radius[t.defaultRadius]:e.I(t.defaultRadius),i={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":t.scale.toString(),"--mantine-cursor-type":t.cursorType,"--mantine-webkit-font-smoothing":t.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":t.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":t.white,"--mantine-color-black":t.black,"--mantine-line-height":t.lineHeights.md,"--mantine-font-family":t.fontFamily,"--mantine-font-family-monospace":t.fontFamilyMonospace,"--mantine-font-family-headings":t.headings.fontFamily,"--mantine-heading-font-weight":t.headings.fontWeight,"--mantine-heading-text-wrap":t.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${t.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${t.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${t.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${t.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${t.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":u.a(t,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":t.black,"--mantine-color-body":t.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-${n})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":u.a(t,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${t.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};W(i.variables,t.breakpoints,`breakpoint`),W(i.variables,t.spacing,`spacing`),W(i.variables,t.fontSizes,`font-size`),W(i.variables,t.lineHeights,`line-height`),W(i.variables,t.shadows,`shadow`),W(i.variables,t.radius,`radius`),W(i.variables,t.fontWeights,`font-weight`),t.colors[t.primaryColor].forEach((e,n)=>{i.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${t.primaryColor}-${n})`}),e.R(t.colors).forEach(e=>{let n=t.colors[e];if(Oe(n)){Object.assign(i.light,De({theme:t,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(i.dark,De({theme:t,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0}));return}n.forEach((t,n)=>{i.variables[`--mantine-color-${e}-${n}`]=t}),Object.assign(i.light,De({theme:t,color:e,colorScheme:`light`,withColorValues:!1})),Object.assign(i.dark,De({theme:t,color:e,colorScheme:`dark`,withColorValues:!1}))});let a=t.headings.sizes;return e.R(a).forEach(e=>{i.variables[`--mantine-${e}-font-size`]=a[e].fontSize,i.variables[`--mantine-${e}-line-height`]=a[e].lineHeight,i.variables[`--mantine-${e}-font-weight`]=a[e].fontWeight||t.headings.fontWeight}),i};function Ae(){let t=e.d(),r=e.g(),i=e.R(t.breakpoints).reduce((r,i)=>{let a=t.breakpoints[i].includes(`px`),o=n.r(t.breakpoints[i]);return`${r}@media (max-width: ${a?`${o-.1}px`:e.F(o-.1)}) {.mantine-visible-from-${i} {display: none !important;}}@media (min-width: ${a?`${o}px`:e.F(o)}) {.mantine-hidden-from-${i} {display: none !important;}}`},``);return(0,B.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:r?.(),dangerouslySetInnerHTML:{__html:i}})}function je({theme:t,generator:n}){let r=ke(t),i=n?.(t);return i?e.L(r,i):r}var Me=ke(e.f);function Ne(t){let n={variables:{},light:{},dark:{}};return e.R(t.variables).forEach(e=>{Me.variables[e]!==t.variables[e]&&(n.variables[e]=t.variables[e])}),e.R(t.light).forEach(e=>{Me.light[e]!==t.light[e]&&(n.light[e]=t.light[e])}),e.R(t.dark).forEach(e=>{Me.dark[e]!==t.dark[e]&&(n.dark[e]=t.dark[e])}),n}function Pe(e){return Ee({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Fe({cssVariablesSelector:t,deduplicateCssVariables:n}){let r=e.d(),i=e.g(),a=je({theme:r,generator:e.m()}),o=(t===void 0||t===`:root`||t===`:host`)&&n,s=Ee(o?Ne(a):a,t);return s?(0,B.jsx)(`style`,{"data-mantine-styles":!0,nonce:i?.(),dangerouslySetInnerHTML:{__html:`${s}${o?``:Pe(t)}`}}):null}Fe.displayName=`@mantine/CssVariables`;function Ie({respectReducedMotion:e,getRootElement:t}){o.f(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function Le({theme:t,children:n,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:a=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:c,classNamesPrefix:l=`mantine`,colorSchemeManager:u=Se(),defaultColorScheme:d=`light`,getRootElement:f=()=>document.documentElement,cssVariablesResolver:p,forceColorScheme:m,stylesTransform:h,env:g}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=we({defaultColorScheme:d,forceColorScheme:m,manager:u,getRootElement:f});return Ie({respectReducedMotion:t?.respectReducedMotion||!1,getRootElement:f}),(0,B.jsx)(e.p,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:f,classNamesPrefix:l,getStyleNonce:r,cssVariablesResolver:p,cssVariablesSelector:c??`:root`,withStaticClasses:i,stylesTransform:h,env:g},children:(0,B.jsxs)(e.u,{theme:t,children:[s&&(0,B.jsx)(Fe,{cssVariablesSelector:c,deduplicateCssVariables:o}),a&&(0,B.jsx)(Ae,{}),n]})})}Le.displayName=`@mantine/core/MantineProvider`;function Re({children:t,theme:n,env:r}){return(0,B.jsx)(e.p,{value:{colorScheme:`auto`,setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:`mantine`,cssVariablesSelector:`:root`,withStaticClasses:!1,headless:!0,env:r},children:(0,B.jsx)(e.u,{theme:n,children:t})})}Re.displayName=`@mantine/core/HeadlessMantineProvider`;function ze(e){return e}var[Be,G]=r.t(`ModalBase component was not found in tree`);function Ve({opened:e,transitionDuration:t}){let[n,r]=(0,z.useState)(e),i=(0,z.useRef)(-1),a=o.l()?0:t;return(0,z.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function He({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:s,returnFocus:c}){let l=o.u(e),[u,d]=(0,z.useState)(!1),[f,p]=(0,z.useState)(!1),m=Ve({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return be(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&s()},{capture:!0}),a.f({opened:n,shouldReturnFocus:r&&c}),{_id:l,titleMounted:u,bodyMounted:f,shouldLockScroll:m,setTitleMounted:d,setBodyMounted:p}}function Ue({keepMounted:t,opened:n,onClose:r,id:i,transitionProps:o,onExitTransitionEnd:s,onEnterTransitionEnd:c,trapFocus:l,closeOnEscape:u,returnFocus:d,closeOnClickOutside:f,withinPortal:p,portalProps:m,lockScroll:h,children:g,zIndex:_,shadow:v,padding:y,__vars:b,unstyled:x,removeScrollProps:S,...C}){let{_id:w,titleMounted:T,bodyMounted:E,shouldLockScroll:D,setTitleMounted:O,setBodyMounted:k}=He({id:i,transitionProps:o,opened:n,trapFocus:l,closeOnEscape:u,onClose:r,returnFocus:d}),{key:A,...j}=S||{};return(0,B.jsx)(a.i,{...m,withinPortal:p,children:(0,B.jsx)(Be,{value:{opened:n,onClose:r,closeOnClickOutside:f,onExitTransitionEnd:s,onEnterTransitionEnd:c,transitionProps:{...o,keepMounted:t},getTitleId:()=>`${w}-title`,getBodyId:()=>`${w}-body`,titleMounted:T,bodyMounted:E,setTitleMounted:O,setBodyMounted:k,trapFocus:l,closeOnEscape:u,zIndex:_,unstyled:x},children:(0,B.jsx)(oe.RemoveScroll,{enabled:D&&h,...j,children:(0,B.jsx)(e.t,{...C,id:w,__vars:{...b,"--mb-z-index":(_||a.m(`modal`)).toString(),"--mb-shadow":e.j(v),"--mb-padding":e.N(y)},children:g})},A)})})}Ue.displayName=`@mantine/core/ModalBase`;function We(){let e=G();return(0,z.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var Ge={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Ke({className:t,...n}){let r=We(),i=G();return(0,B.jsx)(e.t,{id:r,className:(0,V.default)({[Ge.body]:!i.unstyled},t),...n})}Ke.displayName=`@mantine/core/ModalBaseBody`;function qe({className:e,onClick:t,...n}){let r=G();return(0,B.jsx)(o.o,{...n,onClick:e=>{r.onClose(),t?.(e)},className:(0,V.default)({[Ge.close]:!r.unstyled},e),unstyled:r.unstyled})}qe.displayName=`@mantine/core/ModalBaseCloseButton`;function Je({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:s,...c}){let l=G();return(0,B.jsx)(o.c,{mounted:l.opened,transition:`pop`,...l.transitionProps,onExited:()=>{l.onExitTransitionEnd?.(),l.transitionProps?.onExited?.()},onEntered:()=>{l.onEnterTransitionEnd?.(),l.transitionProps?.onEntered?.()},...e,children:e=>(0,B.jsx)(`div`,{...n,className:(0,V.default)({[Ge.inner]:!l.unstyled},n.className),children:(0,B.jsx)(a.r,{active:l.opened&&l.trapFocus,innerRef:s,children:(0,B.jsx)(f.t,{...c,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":l.bodyMounted?l.getBodyId():void 0,"aria-labelledby":l.titleMounted?l.getTitleId():void 0,style:[i,e],className:(0,V.default)({[Ge.content]:!l.unstyled},t),unstyled:l.unstyled,children:c.children})})})})}Je.displayName=`@mantine/core/ModalBaseContent`;function Ye({className:t,...n}){let r=G();return(0,B.jsx)(e.t,{component:`header`,className:(0,V.default)({[Ge.header]:!r.unstyled},t),...n})}Ye.displayName=`@mantine/core/ModalBaseHeader`;var Xe={duration:200,timingFunction:`ease`,transition:`fade`};function Ze(e){let t=G();return{...Xe,...t.transitionProps,...e}}function Qe({onClick:e,transitionProps:t,style:n,visible:r,...i}){let s=G(),c=Ze(t);return(0,B.jsx)(o.c,{mounted:r===void 0?s.opened:r,...c,transition:`fade`,children:t=>(0,B.jsx)(a.a,{fixed:!0,style:[n,t],zIndex:s.zIndex,unstyled:s.unstyled,onClick:t=>{e?.(t),s.closeOnClickOutside&&s.onClose()},...i})})}Qe.displayName=`@mantine/core/ModalBaseOverlay`;function $e(){let e=G();return(0,z.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function et({className:t,...n}){let r=$e(),i=G();return(0,B.jsx)(e.t,{component:`h2`,className:(0,V.default)({[Ge.title]:!i.unstyled},t),id:r,...n})}et.displayName=`@mantine/core/ModalBaseTitle`;function tt({children:e}){return(0,B.jsx)(B.Fragment,{children:e})}var[nt,rt]=r.t(`Modal component was not found in tree`),K={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},it=e.r(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=e.l(`ModalBody`,null,t);return(0,B.jsx)(Ke,{...rt().getStyles(`body`,{classNames:n,style:i,styles:a,className:r}),...s})});it.classes=K,it.displayName=`@mantine/core/ModalBody`;var at=e.r(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=e.l(`ModalCloseButton`,null,t);return(0,B.jsx)(qe,{...rt().getStyles(`close`,{classNames:n,style:i,styles:a,className:r}),...s})});at.classes=K,at.displayName=`@mantine/core/ModalCloseButton`;var ot=e.r(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,children:s,__hidden:c,...l}=e.l(`ModalContent`,null,t),u=rt(),d=u.scrollAreaComponent||tt;return(0,B.jsx)(Je,{...u.getStyles(`content`,{className:r,style:i,styles:a,classNames:n}),innerProps:u.getStyles(`inner`,{className:r,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,...l,children:(0,B.jsx)(d,{style:{maxHeight:u.fullScreen?`100dvh`:`calc(100dvh - (${e.I(u.yOffset)} * 2))`},children:s})})});ot.classes=K,ot.displayName=`@mantine/core/ModalContent`;var st=e.r(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=e.l(`ModalHeader`,null,t);return(0,B.jsx)(Ye,{...rt().getStyles(`header`,{classNames:n,style:i,styles:a,className:r}),...s})});st.classes=K,st.displayName=`@mantine/core/ModalHeader`;var ct=e.r(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=e.l(`ModalOverlay`,null,t);return(0,B.jsx)(Qe,{...rt().getStyles(`overlay`,{classNames:n,style:i,styles:a,className:r}),...s})});ct.classes=K,ct.displayName=`@mantine/core/ModalOverlay`;var lt={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:a.m(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},ut=e.D((t,{radius:n,size:r,yOffset:i,xOffset:a})=>({root:{"--modal-radius":n===void 0?void 0:e.A(n),"--modal-size":e.M(r,`modal-size`),"--modal-y-offset":e.I(i),"--modal-x-offset":e.I(a)}})),dt=e.r(t=>{let n=e.l(`ModalRoot`,lt,t),{classNames:r,className:i,style:a,styles:o,unstyled:s,vars:l,yOffset:u,scrollAreaComponent:d,radius:f,fullScreen:p,centered:m,xOffset:h,__staticSelector:g,attributes:_,...v}=n,y=e.c({name:g,classes:K,props:n,className:i,style:a,classNames:r,styles:o,unstyled:s,attributes:_,vars:l,varsResolver:ut});return(0,B.jsx)(nt,{value:{yOffset:u,scrollAreaComponent:d,getStyles:y,fullScreen:p},children:(0,B.jsx)(Ue,{...y(`root`),"data-full-screen":p||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===c.a.Autosize||void 0,unstyled:s,...v})})});dt.classes=K,dt.varsResolver=ut,dt.displayName=`@mantine/core/ModalRoot`;var ft=(0,z.createContext)(null);function pt({children:e}){let[t,n]=(0,z.useState)([]),[r,i]=(0,z.useState)(a.m(`modal`));return(0,B.jsx)(ft,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}pt.displayName=`@mantine/core/ModalStack`;var mt=e.r(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,...s}=e.l(`ModalTitle`,null,t);return(0,B.jsx)(et,{...rt().getStyles(`title`,{classNames:n,style:i,styles:a,className:r}),...s})});mt.classes=K,mt.displayName=`@mantine/core/ModalTitle`;var ht={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:a.m(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},q=e.r(t=>{let{title:n,withOverlay:r,overlayProps:i,withCloseButton:o,closeButtonProps:s,children:c,radius:l,opened:u,stackId:d,zIndex:f,...p}=e.l(`Modal`,ht,t),m=(0,z.use)(ft),h=!!n||o,g=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},_=r===!1?!1:d&&m?m.currentId===d:u;return(0,z.useEffect)(()=>{m&&d&&(u?m.addModal(d,f||a.m(`modal`)):m.removeModal(d))},[u,d,f]),(0,B.jsxs)(dt,{radius:l,opened:u,zIndex:m&&d?m.getZIndex(d):f,...p,...g,children:[r&&(0,B.jsx)(ct,{visible:_,transitionProps:m&&d?{duration:0}:void 0,...i}),(0,B.jsxs)(ot,{radius:l,__hidden:m&&d&&u?d!==m.currentId:!1,children:[h&&(0,B.jsxs)(st,{children:[n&&(0,B.jsx)(mt,{children:n}),o&&(0,B.jsx)(at,{...s})]}),(0,B.jsx)(it,{children:c})]})]})});q.classes=K,q.displayName=`@mantine/core/Modal`,q.Root=dt,q.Overlay=ct,q.Content=ot,q.Body=it,q.Header=st,q.Title=mt,q.CloseButton=at,q.Stack=pt;var gt={root:`m_a513464`,icon:`m_a4ceffb`,loader:`m_b0920b15`,body:`m_a49ed24`,title:`m_3feedf16`,description:`m_3d733a3a`,closeButton:`m_919a4d88`},_t={withCloseButton:!0},vt=e.D((t,{radius:n,color:r})=>({root:{"--notification-radius":n===void 0?void 0:e.A(n),"--notification-color":r?e.x(r,t):void 0}})),yt=e.r(t=>{let n=e.l(`Notification`,_t,t),{className:r,color:i,radius:a,loading:s,withCloseButton:c,withBorder:l,title:u,icon:d,children:f,onClose:p,closeButtonProps:m,classNames:h,style:g,styles:_,unstyled:v,vars:y,mod:b,loaderProps:x,role:S,attributes:C,...w}=n,T=e.c({name:`Notification`,classes:gt,props:n,className:r,style:g,classNames:h,styles:_,unstyled:v,attributes:C,vars:y,varsResolver:vt});return(0,B.jsxs)(e.t,{...T(`root`),mod:[{"data-with-icon":!!d||s,"data-with-border":l},b],role:S||`alert`,...w,children:[d&&!s&&(0,B.jsx)(`div`,{...T(`icon`),children:d}),s&&(0,B.jsx)(o.s,{size:28,color:i,...T(`loader`),...x}),(0,B.jsxs)(`div`,{...T(`body`),children:[u&&(0,B.jsx)(`div`,{...T(`title`),children:u}),(0,B.jsx)(e.t,{...T(`description`),mod:{"data-with-title":!!u},children:f})]}),c&&(0,B.jsx)(o.o,{iconSize:16,color:`gray`,...m,unstyled:v,onClick:e=>{m?.onClick?.(e),p?.()},...T(`closeButton`)})]})});yt.classes=gt,yt.varsResolver=vt,yt.displayName=`@mantine/core/Notification`;var bt={primaryColor:`blue`,other:{desktop:{backgroundColor:`#1a1a2e`},taskbar:{backgroundColor:`#16213e`,textColor:`#ffffff`},window:{backgroundColor:`#0f0f23`,textColor:`#ffffff`,borderRadius:`8px`},accent:`#339af0`}},xt=(0,z.createContext)(void 0);function St({children:e,fileSystem:t,isReady:n,error:r}){let i=ve(),a=s.h(e=>e.setThemeMode),o=s.h(e=>e.toggleTheme),c=(0,z.useMemo)(()=>({fs:n?t:null,isReady:n,error:r,theme:i,setThemeMode:a,toggleTheme:o}),[t,n,r,i,a,o]);return(0,B.jsx)(xt.Provider,{value:c,children:e})}function Ct({children:e,fileSystem:t,initialMode:n,theme:r,mantineTheme:i,fallback:a=null,onError:o}){let[c,l]=(0,z.useState)(!1),[u,d]=(0,z.useState)(null),f=s.h(e=>e.theme.mode),p=s.h(e=>e.setThemeMode);(0,z.useEffect)(()=>{n&&p(n)},[]),(0,z.useEffect)(()=>{let e=!0;return(async()=>{try{await t.initialize(),e&&l(!0)}catch(t){let n=t instanceof Error?t:Error(String(t));e&&(d(n),o?.(n))}})(),()=>{e=!1}},[t,o]);let m=(0,z.useMemo)(()=>ze({...bt,...i}),[i]);return u||!c?(0,B.jsx)(B.Fragment,{children:a}):(0,B.jsx)(Le,{theme:m,forceColorScheme:f,children:(0,B.jsx)(_e,{mode:f,theme:r,children:(0,B.jsx)(St,{fileSystem:t,isReady:c,error:u,children:e})})})}function wt(){let e=(0,z.useContext)(xt);if(!e)throw Error(`useFdeContext must be used within an FdeProvider`);return e}var Tt=(0,z.createContext)(null),Et=({children:e})=>{let t=(0,z.useRef)(new Map);return(0,B.jsx)(Tt.Provider,{value:{register:(e,n)=>{t.current.set(e,n)},unregister:e=>{t.current.delete(e)},getRect:e=>t.current.get(e)},children:e})},Dt=()=>{let e=(0,z.useContext)(Tt);if(!e)throw Error(`useWindowButtonRegistry must be used within WindowButtonRegistryProvider`);return e},Ot={root:`_root_1z0nr_1`},kt=`linear-gradient(90deg, rgba(42, 123, 155, 1) 0%, rgba(87, 199, 133, 1) 50%, rgba(237, 221, 83, 1) 100%)`,At=({children:e,onContextMenu:t,wallpaper:n,backgroundColor:r})=>{let i=w.o(e=>e.setViewportSize),a=(0,z.useRef)(null);(0,z.useEffect)(()=>{let e=a.current;if(!e)return;let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0]?.contentRect??{};t&&t>0&&n&&n>0&&i(t,n)});return t.observe(e),()=>t.disconnect()},[i]);let o=n?`url(${n})`:kt;return(0,B.jsx)(`div`,{ref:a,className:Ot.root,"data-testid":`desktop-area`,style:{"--taskbar-height":`48px`,backgroundColor:r??`transparent`,backgroundImage:o,backgroundSize:`cover`,backgroundPosition:`center`},onContextMenu:t,children:e})},jt=e=>e.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}),Mt=()=>{let[e,t]=(0,z.useState)(()=>jt(new Date));return(0,z.useEffect)(()=>{let e=setInterval(()=>t(jt(new Date)),1e3);return()=>clearInterval(e)},[]),e},Nt=-8,Pt=0,Ft=()=>{let[e,t]=(0,z.useState)({activeMenu:null,position:{x:0,y:0},targetWindowId:null}),n=(0,z.useCallback)((e,n)=>{e.preventDefault(),e.stopPropagation(),t({activeMenu:`window`,position:{x:e.clientX,y:e.clientY+Nt},targetWindowId:n})},[]),r=(0,z.useCallback)(e=>{e.preventDefault(),t({activeMenu:`panel`,position:{x:e.clientX,y:e.clientY+Nt},targetWindowId:null})},[]),i=(0,z.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),t({activeMenu:`launcher`,position:{x:e.clientX,y:e.clientY+Pt},targetWindowId:null})},[]),a=(0,z.useCallback)(()=>{t(e=>({...e,activeMenu:null}))},[]);return{activeMenu:e.activeMenu,position:e.position,targetWindowId:e.targetWindowId,windowMenuOpened:e.activeMenu===`window`,panelMenuOpened:e.activeMenu===`panel`,launcherMenuOpened:e.activeMenu===`launcher`,openWindowMenu:n,openPanelMenu:r,openLauncherMenu:i,closeMenu:a}},It=()=>{let e=s.h(e=>e.animationDuration);return{duration:e,windowVariants:C.f(e),panelVariants:C.u(e),minimizeVariant:C.l(.3),restoreVariant:C.d(.3),maximizeTransition:C.c(.25),easeIn:C.o(e),easeOut:C.s(e)}},J={WELCOME:`welcome`,NOTEPAD:`notepad`,UPLOADER:`uploader`,FILES:`files`,SETTINGS:`settings`,PDF:`pdf`,CALENDAR:`calendar`,STORYBOOK:`storybook`,LINKEDIN:`linkedin`,GITHUB:`github`,IMAGE_VIEWER:`image-viewer`,DOS_EMULATOR:`dos-emulator`,DOOM:`doom`,TERMINAL:`terminal`,CODE_SERVER:`code-server`,DEVICE_INFO:`device-info`,MENUEDIT:`menuedit`},Lt={[J.FILES]:`filesApp`,[J.PDF]:`pdfViewer`,[J.IMAGE_VIEWER]:`imageViewer`,[J.DOS_EMULATOR]:`dosEmulator`,[J.CODE_SERVER]:`codeServer`,[J.DEVICE_INFO]:`deviceInfo`},Rt=[J.WELCOME,J.UPLOADER,J.TERMINAL,J.CODE_SERVER,J.STORYBOOK,J.SETTINGS,J.NOTEPAD,J.LINKEDIN,J.GITHUB,J.FILES,J.DOOM];function zt(e){let{t}=(0,U.useTranslation)(`apps`);return e?t(`names.${Lt[e]??e}`,e):``}function Bt(e,t,n){return(0,z.useMemo)(()=>{if(!t.trim())return e;let r=t.toLowerCase().trim();return e.filter(e=>{let t=n(e);return Array.isArray(t)?t.some(e=>e.toLowerCase().includes(r)):t.toLowerCase().includes(r)})},[e,t,n])}function Vt(e){let[t,n]=(0,z.useState)(e??new Set);return{expanded:t,toggle:(0,z.useCallback)(e=>{n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),expand:(0,z.useCallback)(e=>{n(t=>{let n=new Set(t);return n.add(e),n})},[]),collapse:(0,z.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[]),expandAll:(0,z.useCallback)(e=>{n(new Set(e))},[]),collapseAll:(0,z.useCallback)(()=>{n(new Set)},[]),reset:(0,z.useCallback)(()=>{n(new Set)},[]),isExpanded:(0,z.useCallback)(e=>t.has(e),[t])}}var Ht={header:`_header_2d0oy_1`,iconContainer:`_iconContainer_2d0oy_20`,expandIcon:`_expandIcon_2d0oy_28`,icon:`_icon_2d0oy_20`,title:`_title_2d0oy_42`,content:`_content_2d0oy_48`},Ut=({title:e,fcIcon:t=`FcFolder`,expanded:n,onToggle:r,children:i,className:a,"aria-label":o})=>{let s=T.c(n?`VscRemove`:`VscAdd`,{size:14,className:Ht.expandIcon});return(0,B.jsxs)(`div`,{className:a,children:[(0,B.jsxs)(d.t,{className:Ht.header,onClick:r,"aria-expanded":n,"aria-label":o??e,children:[(0,B.jsx)(`span`,{className:Ht.iconContainer,children:s}),(0,B.jsx)(`span`,{className:Ht.icon,children:(0,B.jsx)(v.t,{fcIcon:t,size:16})}),(0,B.jsx)(h.o,{size:`sm`,fw:500,className:Ht.title,children:e})]}),n&&(0,B.jsx)(`div`,{className:Ht.content,children:i})]})},Y={trigger:`_trigger_4gumo_1`,panel:`_panel_4gumo_23`,searchContainer:`_searchContainer_4gumo_39`,searchInput:`_searchInput_4gumo_43`,scrollContainer:`_scrollContainer_4gumo_47`,appsSection:`_appsSection_4gumo_56`,appButton:`_appButton_4gumo_62`,appIcon:`_appIcon_4gumo_82`};function Wt(e){let t=e.icon,n=`fcIcon`in e?e.fcIcon:void 0,r=t?.startsWith(`Fc`)||t?.startsWith(`Fi`)||t?.startsWith(`Vsc`);return{id:e.id,name:e.name,fcIcon:n??(r?t:void 0),icon:r?void 0:t,iconUrl:`iconUrl`in e?e.iconUrl:void 0,iconColor:`iconColor`in e?e.iconColor:void 0}}var Gt=({app:e,onOpen:t})=>{let n=zt(e.id);return(0,B.jsxs)(`button`,{className:Y.appButton,onClick:()=>t(e.id),role:`menuitem`,"aria-label":n,children:[(0,B.jsx)(`span`,{className:Y.appIcon,children:(0,B.jsx)(v.t,{fcIcon:e.fcIcon,iconUrl:e.iconUrl,fallback:e.icon,color:e.iconColor})}),(0,B.jsx)(h.o,{size:`sm`,children:n})]},e.id)},Kt=({folder:e,isExpanded:t,apps:n,onToggle:r,onOpen:i})=>(0,B.jsx)(Ut,{title:D.o(e),fcIcon:e.fcIcon,expanded:t,onToggle:r,children:n.map(e=>(0,B.jsx)(Gt,{app:e,onOpen:i},e.id))},e.id),qt=({fcIcon:e=`FcDebian`,onContextMenu:t})=>{let n=T.i(e,{size:22,style:{display:`block`}}),[r,i]=(0,z.useState)(!1),[a,c]=(0,z.useState)(``),l=C.t(),u=s.h(e=>e.theme.taskbar),d=w.o(e=>e.launcherFolders),f=w.o(e=>e.customApps),{panelVariants:p}=It(),m=(0,z.useRef)(null),g=(0,z.useRef)(null),{expanded:_,toggle:v,reset:y}=Vt(new Set),b=(0,z.useMemo)(()=>[...w.C].sort((e,t)=>e.name.localeCompare(t.name)),[]),x=(0,z.useMemo)(()=>new Set(d.flatMap(e=>e.appIds)),[d]),S=Bt((0,z.useMemo)(()=>b.filter(e=>!x.has(e.id)),[b,x]),a,e=>[e.id,e.name]),E=(0,z.useMemo)(()=>{if(!a.trim())return[...d].sort((e,t)=>e.isPredefined===t.isPredefined?e.name.localeCompare(t.name):e.isPredefined?-1:1);let e=a.toLowerCase();return d.map(t=>({...t,appIds:t.appIds.filter(t=>{let n=b.find(e=>e.id===t);return n?n.id.toLowerCase().includes(e)||n.name.toLowerCase().includes(e):!1})})).filter(e=>e.appIds.length>0).sort((e,t)=>e.isPredefined===t.isPredefined?e.name.localeCompare(t.name):e.isPredefined?-1:1)},[d,a,b]),D=(0,z.useMemo)(()=>{if(!a.trim())return f;let e=a.toLowerCase();return f.filter(t=>t.id.toLowerCase().includes(e)||t.name.toLowerCase().includes(e))},[f,a]);(0,z.useEffect)(()=>{a.trim()&&r&&(E.map(e=>e.id).forEach(e=>{_.has(e)||v(e)}),D.length>0&&!_.has(`launcher-folder-custom-apps`)&&v(w.J))},[a,E,D,r,_,v]),(0,z.useEffect)(()=>{r||y()},[r,y]),(0,z.useEffect)(()=>{if(!r)return;let e=e=>{m.current&&!m.current.contains(e.target)&&(i(!1),c(``))},t=e=>{e.key===`Escape`&&(i(!1),c(``))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let O=e=>{if(e.preventDefault(),e.stopPropagation(),r){i(!1),c(``);return}t?.(e)};(0,z.useEffect)(()=>{r&&g.current&&g.current.focus()},[r]);let k=(0,z.useCallback)(e=>{l(e),i(!1),c(``)},[l]),A=(0,z.useCallback)(e=>{v(e)},[v]),j=T.i(`FcSearch`,{size:16}),M=(0,z.useCallback)(()=>{r?(i(!1),c(``)):i(!0)},[r]);return(0,B.jsxs)(`div`,{ref:m,children:[(0,B.jsx)(`button`,{className:Y.trigger,onClick:M,onContextMenu:O,"aria-label":`Launcher`,"aria-expanded":r,children:n}),(0,B.jsx)(H.AnimatePresence,{children:r&&(0,B.jsxs)(H.motion.div,{className:Y.panel,style:{background:u.background},role:`menu`,"aria-label":`App launcher`,initial:p.initial,animate:p.animate,exit:p.exit,children:[(0,B.jsx)(`div`,{className:Y.searchContainer,children:(0,B.jsx)(o.t,{ref:g,placeholder:`Search apps...`,value:a,onChange:e=>c(e.target.value),leftSection:j,size:`xs`,classNames:{input:Y.searchInput},"aria-label":`Search apps`})}),(0,B.jsxs)(`div`,{className:Y.scrollContainer,children:[E.map(e=>{let t=_.has(e.id);return e.id===`launcher-folder-custom-apps`?D.length===0?null:(0,B.jsx)(Kt,{folder:e,isExpanded:t,apps:D.map(Wt),onToggle:()=>A(e.id),onOpen:k},e.id):(0,B.jsx)(Kt,{folder:e,isExpanded:t,apps:e.appIds.map(e=>b.find(t=>t.id===e)).filter(e=>e!==void 0).sort((e,t)=>e.name.localeCompare(t.name)).map(Wt),onToggle:()=>A(e.id),onOpen:k},e.id)}),S.length>0&&(0,B.jsx)(`div`,{className:Y.appsSection,children:S.map(e=>(0,B.jsx)(Gt,{app:Wt(e),onOpen:k},e.id))}),a&&S.length===0&&E.length===0&&D.length===0&&(0,B.jsx)(h.o,{size:`sm`,c:`dimmed`,ta:`center`,mt:`md`,children:`No apps found`})]})]})})]})},Jt=({x:e,y:t})=>(0,B.jsx)(i.r.Target,{children:(0,B.jsx)(`div`,{"aria-hidden":`true`,style:{position:`fixed`,left:e,top:t,width:0,height:0,pointerEvents:`none`}})}),Yt=e=>{let t=(0,z.useRef)(null),[n,r]=(0,z.useState)(0);return(0,z.useLayoutEffect)(()=>{if(t.current&&e){let e=t.current.offsetHeight;r(e)}},[e]),{menuRef:t,menuHeight:n}},Xt={menuItem:`_menuItem_18vno_1`},Zt=8,Qt=({windowMenuOpened:e,panelMenuOpened:t,launcherMenuOpened:n,menuPosition:r,targetWindowId:a,targetWindowState:o,onCloseWindow:s,onMinimizeWindow:c,onMaximizeWindow:l,onRestoreWindow:u,onClose:d})=>{let{t:f}=(0,U.useTranslation)(`contextMenu`),p={size:14,style:{display:`block`}},m=()=>T.i(`FcCancel`,p),h=()=>T.i(`FcMinus`,p),g=()=>T.i(`FcTemplate`,p),_=()=>T.i(`FcUndo`,p),v=()=>T.i(`FcSettings`,p),y=()=>T.i(`FcFolder`,p),b=C.t(),x=zt(`menuedit`),S=w.o(e=>e.openWindow),E=o===`minimized`,D=o===`maximized`,{menuRef:O,menuHeight:k}=Yt(e),{menuRef:A,menuHeight:j}=Yt(t),{menuRef:M,menuHeight:N}=Yt(n),[P,F]=(0,z.useState)(!1),[I,ee]=(0,z.useState)(!1),[L,te]=(0,z.useState)(!1);(0,z.useLayoutEffect)(()=>{e||F(!1),e&&k>0&&F(!0)},[e,k]),(0,z.useLayoutEffect)(()=>{t||ee(!1),t&&j>0&&ee(!0)},[t,j]),(0,z.useLayoutEffect)(()=>{n||te(!1),n&&N>0&&te(!0)},[n,N]);let ne=(0,z.useMemo)(()=>e?{height:k,ready:P}:t?{height:j,ready:I}:n?{height:N,ready:L}:{height:0,ready:!1},[e,t,n,k,j,N,P,I,L]),R=(0,z.useMemo)(()=>{let{x:e,y:t}=r,{height:n,ready:i}=ne,a=t-Zt;return i&&n>0&&t>window.innerHeight-48-n-Zt&&(a=t-n+Zt),{x:e,y:a}},[r,ne]),re=()=>{d(),S({title:x,content:`menuedit`,fcIcon:`FcFolder`,x:Math.min(r.x+10,window.innerWidth-800),y:Math.min(r.y+10,window.innerHeight-600),width:700,height:500,minWidth:500,minHeight:400})},ie=()=>{d(),b(`settings`)},ae=e=>({opacity:e?1:0,transition:`opacity 0.05s ease`,zIndex:99999});return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(i.r,{opened:e,onClose:d,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,B.jsx)(Jt,{x:R.x,y:R.y}),(0,B.jsxs)(i.r.Dropdown,{ref:O,style:ae(P),children:[!E&&(0,B.jsx)(i.r.Item,{onClick:()=>{a&&c(a)},children:(0,B.jsxs)(`div`,{className:Xt.menuItem,children:[(0,B.jsx)(h,{}),` `,f(`window.minimize`)]})}),E||D?(0,B.jsx)(i.r.Item,{onClick:()=>{a&&u(a)},children:(0,B.jsxs)(`div`,{className:Xt.menuItem,children:[(0,B.jsx)(_,{}),` `,f(`window.restore`)]})}):(0,B.jsx)(i.r.Item,{onClick:()=>{a&&l(a)},children:(0,B.jsxs)(`div`,{className:Xt.menuItem,children:[(0,B.jsx)(g,{}),` `,f(`window.maximize`)]})}),(0,B.jsx)(i.r.Divider,{}),(0,B.jsx)(i.r.Item,{onClick:()=>{a&&s(a)},children:(0,B.jsxs)(`div`,{className:Xt.menuItem,children:[(0,B.jsx)(m,{}),` `,f(`window.close`)]})})]})]}),(0,B.jsxs)(i.r,{opened:t,onClose:d,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,B.jsx)(Jt,{x:R.x,y:R.y}),(0,B.jsx)(i.r.Dropdown,{ref:A,style:ae(I),children:(0,B.jsx)(i.r.Item,{onClick:()=>{b(`settings`)},children:(0,B.jsxs)(`div`,{className:Xt.menuItem,children:[(0,B.jsx)(v,{}),` `,f(`apps:names.settings`)]})})})]}),(0,B.jsxs)(i.r,{opened:n,onClose:d,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,B.jsx)(Jt,{x:R.x,y:R.y}),(0,B.jsxs)(i.r.Dropdown,{ref:M,style:ae(L),children:[(0,B.jsx)(i.r.Label,{children:f(`launcher.title`)}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(y,{}),onClick:re,children:f(`launcher.editLauncher`)}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(v,{}),onClick:ie,children:f(`apps:names.settings`)})]})]})]})},$t={actions:{save:`Save`,saveAs:`Save As`,cancel:`Cancel`,ok:`OK`,open:`Open`,close:`Close`,delete:`Delete`,create:`Create`,new:`New`,exit:`Exit`,apply:`Apply`,discard:`Discard`,reset:`Reset`,download:`Download`,upload:`Upload`,copy:`Copy`,cut:`Cut`,paste:`Paste`,undo:`Undo`,redo:`Redo`,createFolder:`Create folder`,createFile:`Create new file`,select:`Select`},buttons:{minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`,yes:`Yes`,no:`No`,confirm:`Confirm`,continue:`Continue`},labels:{name:`Name`,title:`Title`,filename:`Filename`,url:`URL`,file:`File`,folder:`Folder`,home:`Home`,type:`Type`,loading:`Loading...`,search:`Search`,searchIcons:`Search icons...`,unsavedChanges:`Unsaved Changes`,unsaved:`Unsaved changes`,workInProgress:`Work In Progress`},messages:{areYouSure:`Are you sure?`,cannotBeUndone:`This action cannot be undone.`,noFileSelected:`No file selected`,folderEmpty:`This folder is empty`,noMatchingFiles:`No matching files`,noSubfolders:`No subfolders`,replaceFile:`Replace file?`,replaceFileMessage:`A file named "{{name}}" already exists. Do you want to replace it?`,yesReplace:`Yes, replace`,forBetterExperience:`For a better experience use this app desktop OR horizontal mode`,turnYourDevice:`Turn your device`,continueVertically:`Continue vertically?`},theme:{light:`Light`,dark:`Dark`,system:`System`,custom:`Custom`,switchToLight:`Switch to light mode`,switchToDark:`Switch to dark mode`},status:{error:`error`,success:`success`},menu:{file:`File`,edit:`Edit`,view:`View`},filePicker:{folderTreeAria:`Folder tree`,filesAria:`Files`,foldersAria:`Folders`,cancelAria:`Cancel`,openSelectedAria:`Open selected file`,fileNameAria:`File name`},externalLink:{securityMessage:`blocks embedding in iframes for security reasons.`,goToProfile:`Click below to go to my {{name}} profile.`},taskbar:{ariaLabel:`Taskbar`},launcher:{label:`Launcher`,ariaLabel:`App launcher`,selectedIcon:`Selected: {{icon}}`}},en={names:{notepad:`Notepad`,terminal:`Terminal`,filesApp:`Files`,files:`Files`,uploader:`Uploader`,settings:`Settings`,pdfViewer:`PDF Viewer`,calendar:`Calendar`,storybook:`Storybook`,linkedin:`LinkedIn`,github:`GitHub`,imageViewer:`Image Viewer`,dosEmulator:`DOS Emulator`,doom:`DOOM`,deviceInfo:`Device Info`,welcome:`Welcome`,menuedit:`Edit Launcher`,codeServer:`VS Code`},folders:{socialLinks:`Social Links`,office:`Office and media`,programming:`Programming`,games:`Games`,customApps:`Custom Apps`},descriptions:{notepad:`Markdown editor with rich text toolbar`,terminal:`Terminal emulator`,filesApp:`File explorer`,settings:`System settings`,pdfViewer:`PDF document viewer`,calendar:`Calendar view`,storybook:`Storybook playground`,linkedin:`LinkedIn profile link`,github:`GitHub profile link`,imageViewer:`Image viewer with file picker`,dosEmulator:`DOS game and program emulator`,doom:`Play the classic DOOM game`},launcher:{label:`Launcher`,ariaLabel:`App launcher`},imageViewer:{noImage:`No image to display. Please open one.`,fitToWindow:`Fit to window`,zoom:`Zoom`},pdf:{viewer:`PDF viewer`},dosEmulator:{noBundle:`No DOS program loaded. Open a .jsdos bundle to start.`,loading:`Loading DOS emulator...`,controls:{pause:`Pause`,resume:`Resume`,restart:`Restart`,mute:`Mute`,unmute:`Unmute`,fullscreen:`Fullscreen`},menu:{file:`File`,open:`Open Bundle`,restart:`Restart`,exit:`Exit`,emulation:`Emulation`,pause:`Pause`,resume:`Resume`,audio:`Audio`,mute:`Mute`,unmute:`Unmute`,volume:`Volume`},errors:{failedToLoad:`Failed to load DOS bundle`,notSupported:`DOS emulation is not supported in this browser`}},uploader:{clickToUpload:`Click here to upload`,selectDestination:`Select destination folder`,fileInfo:`File: {{name}} ({{size}})`,uploading:`Uploading...`,uploadProgress:`Upload progress`,uploadComplete:`Upload complete!`,uploadFailed:`Upload wasn't successful for the following reason`,readyToUpload:`Ready to upload`,showFile:`Show in Files`,openFile:`Open file`,upload:`Upload`,stepSelect:`Select`,stepDestination:`Destination`,stepUpload:`Upload`,stepDone:`Done`,folderSelected:`Folder selected`,uploadTo:`Destination`,uploadToRoot:`Uploading to root folder`},terminal:{notAvailable:`Terminal Not Available`,notAvailableMessage:`The terminal cannot be used because this environment does not currently allow terminal access.`,dockerRequired:`Please run in Docker mode to use the terminal.`,offlineTitle:`Terminal Unavailable`,offlineMessage:`The terminal requires a Docker environment to function. It connects directly to the container's shell.`,offlineInstructions:`To use the terminal, run the application in Docker mode:`,dockerCommand:`docker compose up dev`,openWelcome:`Open Welcome App`,connecting:`Connecting...`,connected:`Connected`,disconnected:`Disconnected`,connectionError:`Connection error`,menu:{edit:`Edit`,copy:`Copy`,paste:`Paste`,clear:`Clear`,reset:`Reset`,reconnect:`Reconnect`,exit:`Exit`},scrollback:`Lines`,shell:`Shell`},codeServer:{notAvailable:`VS Code Not Available`,notAvailableMessage:`VS Code (code-server) cannot be used in browser mode.`,dockerRequired:`Please run in Docker to use VS Code.`}},tn={sections:{wallpaper:{label:`Wallpaper`,description:`Change the desktop background image.`},appearance:{label:`Appearance`,description:`Switch between light and dark mode.`},launcher:{label:`Launcher`,description:`Choose the launcher button icon.`},font:{label:`Font`,description:`Select the system font family.`},reset:{label:`Reset to Default`,description:`Reset all settings and data to defaults.`},language:{label:`Language`,description:`Choose your preferred language.`}},wallpaper:{title:`Wallpaper`,wallpaperType:`Wallpaper Type`,staticImage:`Static Image`,chooseFromImages:`Choose from Images`,uploadFromDisk:`Upload from disk`,resetToDefault:`Reset to default`,orEnterUrl:`Or enter a URL`,wallpaperPreview:`Wallpaper preview`},appearance:{title:`Appearance`,description:`Choose whether the desktop uses a light or dark theme, or follows the system preference.`,taskbar:`Taskbar`,window:`Window`,accent:`Accent`,animationDuration:`Animation Duration`,animationDescription:`Controls the speed of window open/close animations (0.1s - 1.0s) must save to see changes.`},font:{title:`Font`,description:`Changes the font across the entire desktop interface. Fonts must be downloaded before use.`,download:`Download`,fontSize:`Font Size`,downloadByName:`Download a font by name`,fromGoogleFonts:`(From Google Fonts)`,downloadError:`Font didn't download successfully. Try again with the correct name`,downloadSuccess:`Downloaded successfully.`,systemDefault:`System Default`},reset:{title:`Reset to Default`,description:`Reset all settings and data to their default values. This action cannot be undone.`,resetButton:`⚠️ Reset app to defaults?`,modalTitle:`Are you sure?`,modalDescription:`This will erase all your data and settings.`,goBack:`Please go back! 🙏`,burnEverything:`Yes, burn everything! 🔥`,keepFiles:`Yes, but keep my files`},language:{title:`Language`,description:`Select your preferred language for the desktop interface.`,selectPlaceholder:`Select language`,english:`English`,spanish:`Español`},all:`All Settings`},nn={window:{title:`Window`,minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`,ariaLabels:{minimize:`Minimize`,maximize:`Maximize`,restore:`Restore`,close:`Close`}},unsavedModal:{title:`Unsaved Changes`,message:`You have unsaved changes. What would you like to do?`,dontSave:`Don't Save`,save:`Save`},fileDialog:{openFile:`Open file`,saveFile:`Save file`,selectFile:`Select file {{name}}`,openFolder:`Open folder {{name}}`,selectFolder:`Select folder`,filename:`filename.md`}},rn={window:{minimize:`Minimize`,restore:`Restore`,maximize:`Maximize`,close:`Close window`},actions:{cut:`Cut`,copy:`Copy`,paste:`Paste`,pasteItems:`Paste ({{count}} items)`,delete:`Delete`,createFolder:`Create folder`,createFile:`Create new file`},createItem:{folderTitle:`Create Folder`,fileTitle:`Create File`,newFolder:`New Folder`,newFile:`New File`,nameError:`There is already a {{mode}} with that name`,clearNameAria:`Clear name`,customIcon:`Choose custom icon or color`,colorError:`Enter a valid hex color (e.g. #ff0000)`,changeLater:`You can change the icon later in folder properties.`},deleteConfirm:{title:`Delete "{{name}}"?`,message:`Are you sure you want to delete "{{name}}"? This action cannot be undone.`},app:{open:`Open {{name}}`,toggleTheme:`Toggle Theme`},sort:{title:`Sort Icons`,default:`Default`,nameAsc:`Name (A-Z)`,nameDesc:`Name (Z-A)`,byType:`By Type`},launcher:{title:`Launcher`,editLauncher:`Edit Launcher`}},an={empty:{title:`There are no new notifications`,message:`For now`},taskbar:{showNotifications:`Show notifications`,hideNotifications:`Hide notifications`,clock:`clock`}},on={toolbar:{formatting:`Text formatting`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,inlineCode:`Inline code`,heading1:`Heading 1`,heading2:`Heading 2`,bulletList:`Bullet list`,orderedList:`Ordered list`,blockquote:`Blockquote`,codeBlock:`Code block`,horizontalRule:`Horizontal rule`},untitled:`untitled.md`},sn={hero:{title:`Fullstack Developer & DevOps`,downloadCV:`Download CV`,contactMe:`Contact Me`},skills:{technical:`Technical Skills`,soft:`Soft Skills`},experience:`Professional Experience`,techStack:`Tech Stack`,languages:`Languages`},cn={title:`Edit Launcher`,newFolder:`New Folder`,predefined:`Predefined`,rename:`Rename`,delete:`Delete`,predefinedFolders:`Predefined Folders`,customFolders:`Custom Folders`,availableApps:`Available Apps (drag and drop to add to folder)`,clickToAdd:`Click to add to first custom folder`,addFolder:`Add folder`,instructions:`Right-click an app in a folder to remove it. Click an available app to add it to the first custom folder.`,canCreateNewFolder:`You can create new folders if needed.`},ln={actions:{save:`Guardar`,saveAs:`Guardar como`,cancel:`Cancelar`,ok:`Aceptar`,open:`Abrir`,close:`Cerrar`,delete:`Eliminar`,create:`Crear`,new:`Nuevo`,exit:`Salir`,apply:`Aplicar`,discard:`Descartar`,reset:`Restablecer`,download:`Descargar`,upload:`Subir`,copy:`Copiar`,cut:`Cortar`,paste:`Pegar`,undo:`Deshacer`,redo:`Rehacer`,createFolder:`Crear carpeta`,createFile:`Crear nuevo archivo`,select:`Seleccionar`},buttons:{minimize:`Minimizar`,maximize:`Maximizar`,restore:`Restaurar`,close:`Cerrar`,yes:`Sí`,no:`No`,confirm:`Confirmar`,continue:`Continuar`},labels:{name:`Nombre`,title:`Título`,filename:`Nombre de archivo`,url:`URL`,file:`Archivo`,folder:`Carpeta`,home:`Inicio`,type:`Tipo`,loading:`Cargando...`,search:`Buscar`,searchIcons:`Buscar iconos...`,unsavedChanges:`Cambios sin guardar`,unsaved:`Cambios sin guardar`,workInProgress:`Trabajo en progreso`},messages:{areYouSure:`¿Estás seguro?`,cannotBeUndone:`Esta acción no se puede deshacer.`,noFileSelected:`Ningún archivo seleccionado`,folderEmpty:`Esta carpeta está vacía`,noMatchingFiles:`No hay archivos coincidentes`,noSubfolders:`Sin subcarpetas`,replaceFile:`¿Reemplazar archivo?`,replaceFileMessage:`Ya existe un archivo llamado "{{name}}". ¿Deseas reemplazarlo?`,yesReplace:`Sí, reemplazar`,forBetterExperience:`Para una mejor experiencia usa esta aplicación en modo escritorio u horizontal`,turnYourDevice:`Gira tu dispositivo`,continueVertically:`¿Continuar verticalmente?`},theme:{light:`Claro`,dark:`Oscuro`,system:`Sistema`,custom:`Personalizado`,switchToLight:`Cambiar a modo claro`,switchToDark:`Cambiar a modo oscuro`},status:{error:`error`,success:`éxito`},menu:{file:`Archivo`,edit:`Editar`,view:`Ver`},filePicker:{folderTreeAria:`Árbol de carpetas`,filesAria:`Archivos`,foldersAria:`Carpetas`,cancelAria:`Cancelar`,openSelectedAria:`Abrir archivo seleccionado`,fileNameAria:`Nombre de archivo`},externalLink:{securityMessage:`bloquea la incrustación en iframes por razones de seguridad.`,goToProfile:`Haz clic abajo para ir a mi perfil de {{name}}.`},taskbar:{ariaLabel:`Barra de tareas`},launcher:{label:`Lanzador`,ariaLabel:`Lanzador de aplicaciones`,selectedIcon:`Seleccionado: {{icon}}`}},un={names:{notepad:`Bloc de notas`,terminal:`Terminal`,filesApp:`Archivos`,files:`Archivos`,uploader:`Subida de archivos`,settings:`Ajustes`,pdfViewer:`Visor PDF`,calendar:`Calendario`,storybook:`Storybook`,linkedin:`LinkedIn`,github:`GitHub`,imageViewer:`Visor de imágenes`,dosEmulator:`Emulador DOS`,doom:`DOOM`,deviceInfo:`Info del dispositivo`,welcome:`Bienvenido`,menuedit:`Editar lanzador`,codeServer:`VS Code`},folders:{socialLinks:`Enlaces sociales`,office:`Oficina y medios`,programming:`Programación`,games:`Juegos`,customApps:`Aplicaciones personalizadas`},descriptions:{notepad:`Editor Markdown con barra de herramientas`,terminal:`Emulador de terminal`,filesApp:`Explorador de archivos`,settings:`Ajustes del sistema`,pdfViewer:`Visor de documentos PDF`,calendar:`Vista de calendario`,storybook:`Zona de pruebas Storybook`,linkedin:`Enlace al perfil de LinkedIn`,github:`Enlace al perfil de GitHub`,imageViewer:`Visor de imágenes con selector de archivos`,dosEmulator:`Emulador de juegos y programas DOS`,doom:`Juega al clásico DOOM`},launcher:{label:`Lanzador`,ariaLabel:`Lanzador de aplicaciones`},imageViewer:{noImage:`Sin imagen para mostrar. Por favor, abre una.`,fitToWindow:`Ajustar a ventana`,zoom:`Zoom`},pdf:{viewer:`Visor PDF`},dosEmulator:{noBundle:`Ningún programa DOS cargado. Abre un bundle .jsdos para comenzar.`,loading:`Cargando emulador DOS...`,controls:{pause:`Pausar`,resume:`Reanudar`,restart:`Reiniciar`,mute:`Silenciar`,unmute:`Activar sonido`,fullscreen:`Pantalla completa`},menu:{file:`Archivo`,open:`Abrir Bundle`,restart:`Reiniciar`,exit:`Salir`,emulation:`Emulación`,pause:`Pausar`,resume:`Reanudar`,audio:`Audio`,mute:`Silenciar`,unmute:`Activar sonido`,volume:`Volumen`},errors:{failedToLoad:`Error al cargar el bundle DOS`,notSupported:`La emulación DOS no está soportada en este navegador`}},uploader:{clickToUpload:`Haz clic aquí para subir`,selectDestination:`Seleccionar carpeta destino`,fileInfo:`Archivo: {{name}} ({{size}})`,uploading:`Subiendo...`,uploadProgress:`Progreso de subida`,uploadComplete:`¡Subida completada!`,uploadFailed:`La subida no fue exitosa por la siguiente razón`,readyToUpload:`Listo para subir`,showFile:`Mostrar en Archivos`,openFile:`Abrir archivo`,upload:`Subir`,stepSelect:`Seleccionar`,stepDestination:`Destino`,stepUpload:`Subir`,stepDone:`Listo`,folderSelected:`Carpeta seleccionada`,uploadTo:`Destino`,uploadToRoot:`Subiendo a la carpeta raíz`},terminal:{notAvailable:`Terminal no disponible`,notAvailableMessage:`La terminal no puede usarse porque este entorno no permite actualmente el acceso a terminal.`,dockerRequired:`Por favor, ejecuta en modo Docker para usar la terminal.`,offlineTitle:`Terminal no disponible`,offlineMessage:`La terminal requiere un entorno Docker para funcionar. Se conecta directamente al shell del contenedor.`,offlineInstructions:`Para usar la terminal, ejecuta la aplicación en modo Docker:`,dockerCommand:`docker compose up dev`,openWelcome:`Abrir Bienvenida`,connecting:`Conectando...`,connected:`Conectado`,disconnected:`Desconectado`,connectionError:`Error de conexión`,menu:{edit:`Editar`,copy:`Copiar`,paste:`Pegar`,clear:`Limpiar`,reset:`Reiniciar`,reconnect:`Reconectar`,exit:`Salir`},scrollback:`Líneas`,shell:`Shell`},codeServer:{notAvailable:`VS Code no disponible`,notAvailableMessage:`VS Code (code-server) no puede usarse en modo navegador.`,dockerRequired:`Por favor, ejecuta la aplicación en Docker para usar VS Code.`}},dn={sections:{wallpaper:{label:`Fondo de pantalla`,description:`Cambia la imagen de fondo del escritorio.`},appearance:{label:`Apariencia`,description:`Cambia entre modo claro y oscuro.`},launcher:{label:`Lanzador`,description:`Elige el icono del botón del lanzador.`},font:{label:`Fuente`,description:`Selecciona la familia de fuentes del sistema.`},reset:{label:`Restablecer`,description:`Restaura todos los ajustes y datos a sus valores por defecto.`},language:{label:`Idioma`,description:`Elige tu idioma preferido.`}},wallpaper:{title:`Fondo de pantalla`,wallpaperType:`Tipo de fondo`,staticImage:`Imagen estática`,chooseFromImages:`Elegir de imágenes`,uploadFromDisk:`Subir desde disco`,resetToDefault:`Restablecer por defecto`,orEnterUrl:`O introduce una URL`,wallpaperPreview:`Vista previa del fondo`},appearance:{title:`Apariencia`,description:`Elige si el escritorio usa un tema claro u oscuro, o sigue la preferencia del sistema.`,taskbar:`Barra de tareas`,window:`Ventana`,accent:`Acento`,animationDuration:`Duración de animación`,animationDescription:`Controla la velocidad de las animaciones de abrir/cerrar ventanas (0.1s - 1.0s), debes guardar para ver los cambios.`},font:{title:`Fuente`,description:`Cambia la fuente en toda la interfaz del escritorio. Las fuentes deben descargarse antes de usar.`,download:`Descargar`,fontSize:`Tamaño de fuente`,downloadByName:`Descargar una fuente por nombre`,fromGoogleFonts:`(Desde Google Fonts)`,downloadError:`La fuente no se descargó correctamente. Intenta de nuevo con el nombre correcto`,downloadSuccess:`Descargada correctamente.`,systemDefault:`Sistema por defecto`},reset:{title:`Restablecer`,description:`Restaura todos los ajustes y datos a sus valores por defecto. Esta acción no se puede deshacer.`,resetButton:`⚠️ ¿Restablecer la app?`,modalTitle:`¿Estás seguro?`,modalDescription:`Esto borrará todos tus datos y ajustes.`,goBack:`¡Por favor vuelve atrás! 🙏`,burnEverything:`¡Sí, quémalo todo! 🔥`,keepFiles:`Sí, pero mantener mis archivos`},language:{title:`Idioma`,description:`Selecciona tu idioma preferido para la interfaz del escritorio.`,selectPlaceholder:`Selecciona idioma`,english:`English`,spanish:`Español`},all:`Todos los ajustes`},fn={window:{title:`Ventana`,minimize:`Minimizar`,maximize:`Maximizar`,restore:`Restaurar`,close:`Cerrar`,ariaLabels:{minimize:`Minimizar`,maximize:`Maximizar`,restore:`Restaurar`,close:`Cerrar`}},unsavedModal:{title:`Cambios sin guardar`,message:`Tienes cambios sin guardar. ¿Qué deseas hacer?`,dontSave:`No guardar`,save:`Guardar`},fileDialog:{openFile:`Abrir archivo`,saveFile:`Guardar archivo`,selectFile:`Seleccionar archivo {{name}}`,openFolder:`Abrir carpeta {{name}}`,selectFolder:`Seleccionar carpeta`,filename:`nombre.md`}},pn={window:{minimize:`Minimizar`,restore:`Restaurar`,maximize:`Maximizar`,close:`Cerrar ventana`},actions:{cut:`Cortar`,copy:`Copiar`,paste:`Pegar`,pasteItems:`Pegar ({{count}} elementos)`,delete:`Eliminar`,createFolder:`Crear carpeta`,createFile:`Crear nuevo archivo`},createItem:{folderTitle:`Crear Carpeta`,fileTitle:`Crear Archivo`,newFolder:`Nueva Carpeta`,newFile:`Nuevo Archivo`,nameError:`Ya existe un {{mode}} con ese nombre`,clearNameAria:`Limpiar nombre`,customIcon:`Elige icono o color personalizado`,colorError:`Introduce un color hexadecimal válido (ej. #ff0000)`,changeLater:`Puedes cambiar el icono más tarde en las propiedades de la carpeta.`},deleteConfirm:{title:`¿Eliminar "{{name}}"?`,message:`¿Estás seguro de que quieres eliminar "{{name}}"? Esta acción no se puede deshacer.`},app:{open:`Abrir {{name}}`,toggleTheme:`Cambiar Tema`},sort:{title:`Ordenar Iconos`,default:`Por defecto`,nameAsc:`Nombre (A-Z)`,nameDesc:`Nombre (Z-A)`,byType:`Por Tipo`},launcher:{title:`Launcher`,editLauncher:`Editar Launcher`}},mn={empty:{title:`No hay notificaciones nuevas`,message:`Por ahora`},taskbar:{showNotifications:`Mostrar notificaciones`,hideNotifications:`Ocultar notificaciones`,clock:`reloj`}},hn={toolbar:{formatting:`Formato de texto`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,inlineCode:`Código en línea`,heading1:`Título 1`,heading2:`Título 2`,bulletList:`Lista con viñetas`,orderedList:`Lista ordenada`,blockquote:`Cita`,codeBlock:`Bloque de código`,horizontalRule:`Línea horizontal`},untitled:`sin-titulo.md`},gn={hero:{title:`Fullstack Developer & DevOps`,downloadCV:`Descargar CV`,contactMe:`Contactar`},skills:{technical:`Habilidades Técnicas`,soft:`Habilidades Blandas`},experience:`Experiencia Profesional`,techStack:`Stack Tecnológico`,languages:`Idiomas`},_n={newFolder:`Nueva Carpeta`,predefined:`Predefinida`,rename:`Renombrar`,delete:`Eliminar`,predefinedFolders:`Carpetas Predefinidas`,customFolders:`Carpetas Personalizadas`,availableApps:`Apps Disponibles (arrastrar y soltar para añadir a carpetas)`,clickToAdd:`Clic para añadir a la primera carpeta personalizada`,addFolder:`Añadir carpeta`,instructions:`Clic derecho en una app dentro de una carpeta para eliminarla. Clic en una app disponible para añadirla a la primera carpeta personalizada.`,canCreateNewFolder:`Puedes crear una nueva carpeta si lo necesitas.`},vn=[`en`,`es`];se.default.use(ce.default).use(U.initReactI18next).init({resources:{en:{common:$t,apps:en,settings:tn,window:nn,contextMenu:rn,notifications:an,notes:on,welcome:sn,menuedit:cn},es:{common:ln,apps:un,settings:dn,window:fn,contextMenu:pn,notifications:mn,notes:hn,welcome:gn,menuedit:_n}},fallbackLng:`en`,supportedLngs:vn,ns:[`common`,`apps`,`settings`,`window`,`contextMenu`,`notifications`,`notes`,`welcome`,`menuedit`],defaultNS:`common`,interpolation:{escapeValue:!1},detection:{order:[`localStorage`,`navigator`],lookupLocalStorage:`fde-desktop:language`,caches:[`localStorage`]}});var yn=se.default,X={root:`_root_17um1_1`,windowButton:`_windowButton_17um1_15`,systemTray:`_systemTray_17um1_44`,themeToggle:`_themeToggle_17um1_51`,clock:`_clock_17um1_70`,notifButton:`_notifButton_17um1_88`,langButton:`_langButton_17um1_109`},bn={en:`English`,es:`Español`},xn=()=>{let{t:e,i18n:t}=(0,U.useTranslation)(`settings`),n=s.h(e=>e.language),r=s.h(e=>e.setLanguage),[i,o]=(0,z.useState)(!1),c=(0,z.useCallback)(e=>{r(e),t.changeLanguage(e),localStorage.setItem(`fde-desktop:language`,e),o(!1)},[r,t]);return(0,B.jsxs)(a.n,{opened:i,onChange:o,position:`top-end`,shadow:`md`,withArrow:!0,children:[(0,B.jsx)(a.n.Target,{children:(0,B.jsx)(d.t,{className:X.langButton,onClick:()=>o(e=>!e),"aria-label":e(`language.selectPlaceholder`),"aria-expanded":i,children:(0,B.jsx)(s.p,{lang:n,size:16})})}),(0,B.jsx)(a.n.Dropdown,{children:(0,B.jsx)(S.t,{gap:`xs`,children:vn.map(e=>(0,B.jsx)(d.t,{onClick:()=>c(e),"aria-label":bn[e],"aria-pressed":e===n,style:{padding:`8px 12px`,borderRadius:6,width:`100%`,background:e===n?`var(--mantine-primary-color-light)`:`transparent`,cursor:`pointer`},children:(0,B.jsxs)(m.t,{gap:`sm`,children:[(0,B.jsx)(s.p,{lang:e,size:20}),(0,B.jsx)(h.o,{size:`sm`,fw:e===n?600:400,children:bn[e]})]})},e))})})]})},Sn=({win:e,onClick:t,onContextMenu:n})=>{let r=(0,z.useRef)(null),{register:i,unregister:a}=Dt();return(0,z.useEffect)(()=>(r.current&&i(e.id,r.current.getBoundingClientRect()),()=>a(e.id)),[e.id,i,a]),(0,B.jsxs)(`button`,{ref:r,className:X.windowButton,"data-active":e.state===`minimized`?`false`:`true`,onClick:t,onContextMenu:n,"aria-label":e.title,children:[(0,B.jsx)(v.t,{fcIcon:e.fcIcon,iconUrl:e.iconUrl,fallback:e.icon,size:14,color:e.iconColor}),(0,B.jsx)(h.o,{size:`xs`,truncate:!0,children:e.title})]})},Cn=({calendarSlot:e})=>{let{t}=(0,U.useTranslation)(`notifications`),n=s.h(e=>e.theme.colors.taskbar),r=s.h(e=>e.theme.mode),i=s.h(e=>e.toggleTheme),o=s.h(e=>e.launcherIcon),c=w.o(e=>e.notifications),l=w.o(e=>e.removeNotification),u=w.o(e=>e.windows),d=w.o(e=>e.restoreWindow),f=w.o(e=>e.minimizeWindow),p=w.o(e=>e.focusWindow),m=w.o(e=>e.closeWindow),g=w.o(e=>e.maximizeWindow),_=Mt(),[y,b]=(0,z.useState)(!1),[x,S]=(0,z.useState)(!1),{position:C,targetWindowId:T,windowMenuOpened:E,panelMenuOpened:D,launcherMenuOpened:O,openWindowMenu:k,openPanelMenu:A,openLauncherMenu:j,closeMenu:M}=Ft(),N=T?u.find(e=>e.id===T)?.state??null:null,P=(0,z.useRef)(0);(0,z.useEffect)(()=>{c.length>P.current&&setTimeout(()=>S(!0),0),P.current=c.length},[c.length]);let F=u.filter(e=>e.isOpen),I=(e,t)=>{t===`minimized`?(d(e),p(e)):f(e)};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:X.root,style:{background:n},role:`toolbar`,"aria-label":`Taskbar`,onContextMenu:A,children:[(0,B.jsx)(qt,{fcIcon:o,onContextMenu:j}),F.map(e=>(0,B.jsx)(Sn,{win:e,onClick:()=>I(e.id,e.state),onContextMenu:t=>k(t,e.id)},e.id)),(0,B.jsxs)(`div`,{className:X.systemTray,"data-testid":`system-tray`,children:[(0,B.jsxs)(a.n,{opened:x,onChange:S,position:`top-end`,shadow:`md`,withArrow:!0,keepMounted:!0,children:[(0,B.jsx)(a.n.Target,{children:(0,B.jsx)(`button`,{className:X.notifButton,onClick:()=>S(e=>!e),"aria-label":t(x?`taskbar.hideNotifications`:`taskbar.showNotifications`),children:(0,B.jsx)(v.t,{fcIcon:x?`FcCollapse`:`FcExpand`,size:18})})}),(0,B.jsx)(a.n.Dropdown,{style:{background:`transparent`,border:`none`,padding:0},children:(0,B.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8,minWidth:300},children:c.length===0?(0,B.jsx)(yt,{title:t(`empty.title`),onClose:()=>S(!1),children:t(`empty.message`)}):c.map(e=>(0,B.jsx)(yt,{withBorder:!0,icon:e.fcIcon?(0,B.jsx)(v.t,{fcIcon:e.fcIcon,size:18}):void 0,title:e.title,onClose:()=>{l(e.id),e.onClose?.()},children:e.message},e.id))})})]}),(0,B.jsx)(xn,{}),(0,B.jsx)(`button`,{className:X.themeToggle,onClick:i,"aria-label":t(r===`dark`?`theme.switchToLight`:`theme.switchToDark`,{ns:`common`}),title:t(r===`dark`?`theme.switchToLight`:`theme.switchToDark`,{ns:`common`}),children:r===`dark`?`☀️`:`🌙`}),(0,B.jsxs)(a.n,{opened:y,onChange:b,position:`top-end`,shadow:`md`,withArrow:!0,children:[(0,B.jsx)(a.n.Target,{children:(0,B.jsx)(`button`,{className:X.clock,onClick:()=>b(e=>!e),"aria-label":t(`taskbar.clock`),"aria-expanded":y,children:(0,B.jsx)(h.o,{size:`xs`,children:_})})}),(0,B.jsx)(a.n.Dropdown,{children:e})]})]})]}),(0,B.jsx)(Qt,{windowMenuOpened:E,panelMenuOpened:D,launcherMenuOpened:O,menuPosition:C,targetWindowId:T,targetWindowState:N,onCloseWindow:m,onMinimizeWindow:f,onMaximizeWindow:g,onRestoreWindow:d,onClose:M})]})},wn=({message:e=`Loading...`,size:t=`lg`})=>(0,B.jsx)(y.t,{style:{width:`100%`,height:`100%`},children:(0,B.jsxs)(S.t,{align:`center`,gap:`md`,children:[(0,B.jsx)(o.s,{size:t}),(0,B.jsx)(h.o,{c:`dimmed`,children:e})]})}),Tn=({progress:t,windowIcon:n})=>{let r=e.d(),i=()=>{switch(t.state){case`fetching`:return`Fetching app info...`;case`compiling`:return`Compiling app...`;case`loading`:return`Loading app...`;case`ready`:return`Ready!`;case`error`:return`Error loading app`;default:return`Loading...`}},a=()=>t.state===`error`?`red`:t.state===`ready`?`green`:r.primaryColor;return(0,B.jsx)(y.t,{style:{width:`100%`,height:`100%`},"data-testid":`custom-app-loading`,children:(0,B.jsxs)(S.t,{align:`center`,gap:`lg`,p:`xl`,children:[n&&(0,B.jsx)(h.o,{size:`3rem`,children:n}),(0,B.jsx)(h.o,{size:`lg`,fw:700,children:t.appName||`App`}),(0,B.jsx)(u.n,{value:t.progress,size:`lg`,radius:`xl`,animated:t.state===`loading`||t.state===`compiling`,style:{minWidth:200},color:a()}),(0,B.jsx)(h.o,{size:`sm`,c:`dimmed`,children:i()}),t.state===`error`&&(0,B.jsx)(h.o,{size:`xs`,c:`red`,ta:`center`,children:t.error}),(0,B.jsxs)(h.o,{size:`xs`,c:`gray`,children:[t.progress,`%`]})]})})},En=({appId:e})=>(0,B.jsx)(y.t,{style:{width:`100%`,height:`100%`},children:(0,B.jsxs)(S.t,{align:`center`,gap:`lg`,p:`xl`,maw:400,children:[(0,B.jsx)(h.o,{size:`3rem`,children:(0,B.jsx)(de.FcDoNotInsert,{})}),(0,B.jsx)(h.o,{size:`lg`,fw:700,ta:`center`,children:`Development Server Offline`}),(0,B.jsxs)(h.o,{size:`sm`,c:`dimmed`,ta:`center`,children:[`The app "`,e,`" cannot be loaded because the development server is offline.`]}),(0,B.jsx)(_.t,{variant:`light`,onClick:()=>{window.__FDE_API__?.openApp(`welcome`)},children:`Open Welcome App`}),(0,B.jsx)(g.i,{href:`https://github.com/frannunpal/frannunpal.github.io/issues`,target:`_blank`,rel:`noopener noreferrer`,size:`sm`,children:`File an issue on GitHub`})]})}),Dn=({appId:e})=>(0,B.jsx)(y.t,{style:{width:`100%`,height:`100%`},children:(0,B.jsxs)(S.t,{align:`center`,gap:`lg`,p:`xl`,maw:400,children:[(0,B.jsx)(h.o,{size:`3rem`,children:(0,B.jsx)(de.FcInfo,{})}),(0,B.jsx)(h.o,{size:`lg`,fw:700,ta:`center`,children:`Custom Apps Not Available`}),(0,B.jsxs)(h.o,{size:`sm`,c:`dimmed`,ta:`center`,children:[`The app "`,e,`" cannot be loaded because this environment does not currently allow creating your own apps.`]}),(0,B.jsx)(h.o,{size:`sm`,c:`dimmed`,ta:`center`,children:`Please refer to the "Documentation" folder to learn more about it.`})]})}),On=new Set,Z=null,kn=null,An=null,jn=!1,Mn=0,Nn=null,Pn=!1,Fn=!1;function In(){On.clear(),Z=null,kn=null,An=null,jn=!1,Mn=0,Nn=null,Pn=!1,Fn=!1}var Ln=1e4,Rn=2e3,zn=5,Bn=0;function Vn(){return`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}/api/hmr`}async function Hn(){try{let e=await fetch(`/api/hmr`,{method:`HEAD`});return e.status===426||e.status===400}catch{return!1}}function Un(){kn&&=(clearTimeout(kn),null),An&&=(clearTimeout(An),null),jn=!1}function Wn(e){typeof BroadcastChannel>`u`||(Nn=new BroadcastChannel(`fde-custom-apps`),Nn.onmessage=t=>{let n=t.data;n._fromBroadcast=!0,e(n)})}function Gn(e){Nn?.postMessage(e)}async function Kn(){w.o.getState().isFsReady||await new Promise(e=>{let t=w.o.subscribe(n=>{n.isFsReady&&(t(),e())})});try{let e=w.v.getState().registeredApps,{added:t,removed:n}=await w.K(e);for(let e of t)w.v.getState().registerApp(e),w.o.getState().handleCustomAppRegistered?.(e);for(let e of n)w.v.getState().unregisterApp(e),w.o.getState().handleCustomAppUnregistered?.(e)}catch(e){console.warn(`[HMR] Failed to sync apps on connect:`,e)}}function qn(e,t,n){if(jn||Z&&Z.readyState===WebSocket.OPEN)return Z;let r=Vn(),i=++Mn;return jn=!0,Z=new WebSocket(r),An=setTimeout(()=>{Z&&Z.readyState!==WebSocket.OPEN&&i===Mn&&(console.warn(`[HMR] Initial connection timeout`),Bn++,Bn>=zn?(console.warn(`[HMR] Max initial retries reached, marking server as offline`),t()):(Z?.close(),kn=setTimeout(()=>{qn(e,t,n)},Rn)))},Ln),Z.onopen=()=>{if(i!==Mn){Z?.close();return}console.log(`[HMR] Connected to server`),Bn=0,jn=!1,w.v.getState().resetHmrRetry(),w.v.getState().setHmrConnected(!0),w.v.getState().setHmrError(null),w.v.getState().devServerOffline&&n(),w.v.getState().setDevServerOffline(!1),Un(),Kn().catch(e=>{console.warn(`[HMR] Failed to sync apps:`,e)})},Z.onmessage=t=>{try{let n=JSON.parse(t.data);console.log(`[HMR] Received ${n.type} for ${n.appId}`),e(n)}catch(e){console.error(`[HMR] Failed to parse message:`,e)}},Z.onclose=r=>{i===Mn&&(console.log(`[HMR] Disconnected from server (code: ${r.code})`),Z=null,jn=!1,w.v.getState().setHmrConnected(!1),Un(),kn=setTimeout(()=>{qn(e,t,n)},Rn))},Z.onerror=e=>{i===Mn&&(console.error(`[HMR] WebSocket error:`,e),w.v.getState().setHmrError(`Connection failed`))},Z}function Jn(){Un(),Z&&=(Z.close(),null),Nn&&=(Nn.close(),null)}function Yn(e){let t=(0,z.useRef)(e),{notify:n}=A.n();(0,z.useEffect)(()=>{t.current=e},[e]);let r=(0,z.useCallback)(e=>{switch(e.type){case`reload`:{let t=e.appId,n=w.v.getState().mountedApps[t];if(n?.instance&&typeof n.instance.unmount==`function`)try{n.instance.unmount()}catch(e){console.warn(`[HMR] Error unmounting ${t}:`,e)}let r=document.getElementById(`app-container-${t}`);r&&(r.innerHTML=``),w.v.getState().setAppLoading(t),On.forEach(e=>{try{e.onReload(t)}catch(e){console.error(`[HMR] Callback error:`,e)}});break}case`app-registered`:if(e.manifest){console.log(`[HMR] App registered: ${e.manifest.id}`);let t=!!w.v.getState().registeredApps[e.manifest.id];w.L(),w.q(e.manifest),w.v.getState().registerApp(e.manifest),w.o.getState().handleCustomAppRegistered?.(e.manifest),t||n(`New App Available`,`${e.manifest.name} is now available`,{fcIcon:`FcApproval`}),e._fromBroadcast||Gn(e)}break;case`app-unregistered`:{let t=e.appId;console.log(`[HMR] App unregistered: ${t}`),w.L(),w.G(t),w.v.getState().unregisterApp(t),w.o.getState().handleCustomAppUnregistered?.(t),e._fromBroadcast||Gn(e);break}case`app-error`:console.error(`[HMR] App error: ${e.appId} - ${e.error}`),n(`App Error`,e.error||`Unknown error`,{fcIcon:`FcCancel`});break}},[n]),i=(0,z.useCallback)(()=>{w.v.getState().setDevServerOffline(!0),n(`Development Server Offline`,`HMR is disabled. Changes will not be applied until the server reconnects.`,{fcIcon:`FcDoNotInsert`})},[n]),a=(0,z.useCallback)(()=>{n(`HMR Reconnected`,`Hot module replacement is now active`,{fcIcon:`FcApproval`})},[n]);(0,z.useEffect)(()=>{if(h.t()===`browser`){console.log(`[HMR] Skipping: not running in Docker`);return}if(!h.i()||!h.r())return;let e=!1;return On.add(t.current),!Fn&&!Pn&&(Pn=!0,Hn().then(t=>{if(Pn=!1,e||!t){t||console.warn(`[HMR] HMR endpoint not available, skipping WebSocket connection`);return}Fn=!0,Wn(r),qn(r,i,a)}).catch(()=>{Pn=!1})),()=>{e=!0,On.delete(t.current),On.size===0&&(Fn=!1,Jn())}},[r,i,a])}function Xn(){let{notify:e}=A.n();Yn({onReload:()=>{},onRegistered:(0,z.useCallback)(t=>{w.o.getState().handleCustomAppRegistered?.(t),e(`New App Available`,`${t.name} is now available`,{fcIcon:`FcApproval`})},[e]),onUnregistered:(0,z.useCallback)(e=>{w.o.getState().handleCustomAppUnregistered?.(e)},[])})}function Zn(e,t=5e3){return new Promise((n,r)=>{let i=Date.now(),a=null,o=null,s=()=>{o&&=(clearInterval(o),null),a&&=(clearTimeout(a),null)},c=()=>{let a=document.getElementById(e);if(a){s(),n(a);return}if(Date.now()-i>=t){s(),r(Error(`Container #${e} not found after ${t}ms`));return}};c(),o=setInterval(c,1e3),a=setTimeout(()=>{s(),r(Error(`Container #${e} not found after ${t}ms`))},t)})}var Qn={state:`idle`,progress:0,appName:``},$n=1e4,er=({appId:e,windowIcon:t,notifyReady:n})=>{let[r,i]=(0,z.useState)({...Qn,appName:e}),[a,o]=(0,z.useState)(!1),[s,c]=(0,z.useState)(null),[l,u]=(0,z.useState)(!1),[d,f]=(0,z.useState)(0),p=(0,z.useRef)(null),m=(0,z.useRef)(!0),g=(0,z.useRef)(!1),_=(0,z.useRef)(null),v=(0,z.useRef)(null),y=w.v(e=>e.devServerOffline),b=w.v(t=>t.mountedApps[e]),x=w.v(e=>e.setAppLoading),S=w.v(e=>e.setAppLoaded),C=w.v(e=>e.setAppError),T=w.v(e=>e.clearApp),{notify:E}=A.n(),D=h.i(),O=(0,z.useCallback)(()=>{v.current&&=(clearTimeout(v.current),null)},[]),k=(0,z.useCallback)(()=>{_.current&&=(clearInterval(_.current),null)},[]),j=(0,z.useCallback)(()=>{let e=b?.instance;if(e&&typeof e.unmount==`function`)try{e.unmount()}catch{}},[b?.instance]),M=(0,z.useCallback)(async()=>{if(m.current&&!g.current){g.current=!0;try{i(e=>({...e,state:`fetching`,progress:10})),x(e),c(null),w.L();let t=await w.z(!0);if(!t)throw Error(`Apps manifest not found. Make sure apps are built.`);let r=t.apps.find(t=>t.id===e);if(!r)throw Error(`App '${e}' not found in manifest. Available apps: ${t.apps.map(e=>e.id).join(`, `)}`);i(e=>({...e,state:`loading`,progress:30,appName:r.name})),_.current=setInterval(()=>{if(!m.current){k();return}i(e=>({...e,progress:Math.min(e.progress+5,90)}))},100);try{await Zn(`app-container-${e}`,5e3)}catch{throw Error(`Container #app-container-${e} not found`)}if(await import(`/dist-apps/${r.entry}?t=${Date.now()}`),k(),S(e),await new Promise(t=>{O();let n=()=>{if(w.v.getState().mountedApps[e]?.isReady){t();return}v.current=setTimeout(n,500)};if(w.v.getState().mountedApps[e]?.isReady){t();return}v.current=setTimeout(()=>{console.warn(`[${e}] App did not call appReady() within ${$n}ms`),E(`Warning`,`App ${e} took too long to initialize`,{fcIcon:`FcInfo`}),u(!0),w.v.getState().setAppReady(e),t()},$n),n()}),i(e=>({...e,state:`ready`,progress:100})),o(!0),!m.current)return;setTimeout(()=>{n?.()},50)}catch(t){k(),O(),g.current=!1;let n=t instanceof Error?t.message:`Unknown error`;i(e=>({...e,state:`error`,error:n,progress:0})),C(e,n),c(n),console.error(`[CustomAppLoader] Error loading app ${e}:`,t)}}},[e,n,x,S,C,O,k,E]);if(Yn({onReload:(0,z.useCallback)(t=>{t===e&&(g.current=!1,j(),T(e),o(!1),i({...Qn,appName:e}),c(null),f(e=>e+1))},[e,T,j])}),(0,z.useEffect)(()=>{if(!g.current)return m.current=!0,M(),()=>{m.current=!1,k(),O()}},[M,d,k,O]),!D)return(0,B.jsx)(Dn,{appId:e});if(y&&!b?.isLoaded&&!s)return(0,B.jsx)(En,{appId:e});let N=r.state===`error`,P=a&&b?.isReady&&!l,F=r.state===`ready`&&a&&l,I=F&&!b?.instance,ee=N||I||!(P||F);return I?(0,B.jsx)(Tn,{progress:{...r,state:`error`,error:`App '${e}' loaded but did not mount. Check the browser console for errors.`},windowIcon:t}):(0,B.jsxs)(B.Fragment,{children:[ee&&(0,B.jsx)(Tn,{progress:r,windowIcon:t}),(0,B.jsx)(`div`,{ref:p,id:`app-container-${e}`,"data-testid":`custom-app-container-${e}`,style:{all:`initial`,display:N?`none`:`block`,width:`100%`,height:`100%`,overflow:`auto`,visibility:P||F?`visible`:`hidden`,boxSizing:`border-box`,fontFamily:`sans-serif`}})]})},tr=(0,z.createContext)({notifyReady:()=>{},getContentData:()=>void 0}),nr=()=>(0,z.useContext)(tr),rr=({children:e})=>{let t=(0,z.useRef)(void 0),n=(0,z.useCallback)(e=>{e!==void 0&&(t.current=e)},[]),r=(0,z.useCallback)(()=>t.current,[]);return(0,B.jsx)(tr.Provider,{value:{notifyReady:n,getContentData:r},children:e})},Q={root:`_root_1vtes_1`,titleBar:`_titleBar_1vtes_12`,windowButtons:`_windowButtons_1vtes_31`,title:`_title_1vtes_12`,content:`_content_1vtes_41`,focusOverlay:`_focusOverlay_1vtes_48`},ir=({win:e,isFocused:t,focusWindow:n})=>{let{notifyReady:r,getContentData:a}=nr(),o=w.v(t=>e.content in t.registeredApps),s=(0,z.useMemo)(()=>C.x(e.content),[e.content]),c=(0,z.useMemo)(()=>C.C(e.content),[e.content]),l=(0,z.useMemo)(()=>C.w(e.content),[e.content]),u=(0,z.useMemo)(()=>C.D(e.content),[e.content]),d=(0,z.useMemo)(()=>C.S(e.content),[e.content]),f=w.o(e=>e.closeWindow),p=a()??e.contentData,m={...e,contentData:p},h=c?c(m):void 0;if(o)return(0,B.jsx)(er,{appId:e.content,windowIcon:e.icon,notifyReady:r});let g=u?(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(wn,{message:d?`Loading ${d}...`:void 0}),children:(0,z.createElement)(s,{window:e,notifyReady:r})}):(0,z.createElement)(s,{window:e,notifyReady:r});return(0,B.jsxs)(B.Fragment,{children:[l?(0,B.jsx)(z.Suspense,{fallback:null,children:(0,z.createElement)(l,{windowId:e.id,contentData:p,onExit:()=>f(e.id)})}):h&&h.length>0?(0,B.jsx)(i.t,{elements:h}):null,(0,B.jsxs)(`div`,{className:Q.content,children:[!t&&(0,B.jsx)(`div`,{"data-testid":`focus-overlay`,className:Q.focusOverlay,onMouseDown:t=>{t.stopPropagation(),n(e.id)}}),g]})]})},ar=({window:e})=>{let{t}=(0,U.useTranslation)(`window`),n=w.o(t=>t.windows.find(t=>t.id===e.id))??e,r=zt(n.content),{focusWindow:i,closeWindow:a,minimizeWindow:o,maximizeWindow:c,restoreWindow:l,moveWindow:u,resizeWindow:d}=w.o((0,ue.useShallow)(e=>({focusWindow:e.focusWindow,closeWindow:e.closeWindow,minimizeWindow:e.minimizeWindow,maximizeWindow:e.maximizeWindow,restoreWindow:e.restoreWindow,moveWindow:e.moveWindow,resizeWindow:e.resizeWindow}))),f=s.h(e=>e.theme.colors.window),g=O.a(e=>e.isOpen),y=O.a(e=>e.windowId),b=O.a(e=>e.onSave),x=O.a(e=>e.onDiscard),S=O.a(e=>e.closeModal),{windowVariants:T,easeIn:E}=It(),D=w.o(e=>{let t=e.windows.find(e=>e.id===n.id);if(!t)return!0;let r=t.alwaysOnTop??!1,i=e.windows.filter(e=>e.isOpen&&e.state!==`minimized`&&(e.alwaysOnTop??!1)===r);return i.length===0?!0:Math.max(...i.map(e=>e.zIndex))===t.zIndex}),{getRect:A}=Dt(),j=(0,H.useAnimationControls)(),M=(0,z.useRef)(n.state);(0,z.useEffect)(()=>{j.start(`visible`)},[j]),(0,z.useEffect)(()=>{if(M.current===`minimized`&&n.state!==`minimized`){let e=A(n.id);if(e){let t=n.x+n.width/2,r=n.y+n.height/2,i=e.left+e.width/2,a=e.top+e.height/2;j.start(C.v(i-t,a-r))}else j.set({x:0,y:0,scale:1,opacity:1}),j.start(`visible`)}M.current=n.state},[n.state,j,A,n.id,n.x,n.y,n.width,n.height]);let N=(0,z.useCallback)(e=>{e.preventDefault(),w.C.find(e=>e.id===n.content)?.hasContextMenu||e.stopPropagation()},[n.content]);if(!n.isOpen)return null;let P=n.state===`minimized`,F=n.state===`maximized`,I=n.canMaximize!==!1,ee=g&&y===n.id,L=async()=>{let e=A(n.id);if(e){let t=n.x+n.width/2,r=n.y+n.height/2,i=e.left+e.width/2,a=e.top+e.height/2;await j.start(C.m(i-t,a-r))}else await j.start({...T.exit,transition:E});o(n.id)},te=async()=>{let e=O.t(n.id);e&&!e()||(await j.start({...T.exit,transition:E}),a(n.id))},ne=()=>{b?.(),S()},R=()=>{x?.(),S();let e=n.id;e&&a(e)},re=()=>{S()};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(le.Rnd,{position:F?{x:0,y:0}:{x:n.x,y:n.y},size:F?{width:`100vw`,height:`100vh`}:{width:n.width,height:n.height},minWidth:n.minWidth??0,minHeight:n.minHeight??0,style:{zIndex:n.zIndex,visibility:P?`hidden`:`visible`,pointerEvents:P?`none`:`auto`},dragHandleClassName:Q.titleBar,disableDragging:F||P,enableResizing:!F&&!P,onMouseDown:()=>i(n.id),onDragStop:(e,t)=>u(n.id,t.x,t.y),onResizeStop:(e,t,r,i,a)=>{d(n.id,r.offsetWidth,r.offsetHeight),u(n.id,a.x,a.y)},children:(0,B.jsxs)(H.motion.div,{className:Q.root,"data-testid":`window-${n.content}`,style:{background:f},variants:T,initial:`hidden`,animate:j,exit:`exit`,layout:!0,transition:C.p,onContextMenu:N,children:[(0,B.jsxs)(`div`,{className:Q.titleBar,children:[(0,B.jsx)(v.t,{fcIcon:n.fcIcon,iconUrl:n.iconUrl,fallback:n.icon,size:14,color:n.iconColor}),(0,B.jsx)(h.o,{size:`sm`,fw:500,truncate:!0,className:Q.title,children:r}),(0,B.jsxs)(m.t,{gap:2,wrap:`nowrap`,className:Q.windowButtons,children:[(0,B.jsx)(p.t,{size:`lg`,variant:`subtle`,"aria-label":t(`window.ariaLabels.minimize`),onClick:L,children:(0,B.jsx)(k.t,{name:`VscChromeMinimize`})}),I&&(0,B.jsx)(p.t,{size:`lg`,variant:`subtle`,"aria-label":t(F?`window.ariaLabels.restore`:`window.ariaLabels.maximize`),onClick:()=>F?l(n.id):c(n.id),children:F?(0,B.jsx)(k.t,{name:`VscChromeRestore`}):(0,B.jsx)(k.t,{name:`VscChromeMaximize`})}),(0,B.jsx)(p.t,{size:`lg`,variant:`subtle`,color:`red`,"aria-label":t(`window.ariaLabels.close`),onClick:te,children:(0,B.jsx)(k.t,{name:`VscChromeClose`})})]})]}),(0,B.jsx)(rr,{children:(0,B.jsx)(ir,{win:n,isFocused:D,focusWindow:i})})]})}),(0,B.jsxs)(q,{opened:ee,onClose:re,title:t(`unsavedModal.title`),centered:!0,withinPortal:!0,children:[(0,B.jsx)(h.o,{size:`sm`,mb:`lg`,children:t(`unsavedModal.message`)}),(0,B.jsx)(_.t,{variant:`default`,onClick:R,children:t(`unsavedModal.dontSave`)}),(0,B.jsx)(_.t,{onClick:ne,ml:`sm`,children:t(`unsavedModal.save`)})]})]})},or={root:`_root_1f7p3_1`,iconImage:`_iconImage_1f7p3_21`,label:`_label_1f7p3_26`},sr=({icon:e,onDoubleClick:t,onContextMenu:n})=>{let r=w.C.find(t=>t.id===e.appId),i=e.iconName!==void 0,a=e.nodeId!==void 0,o=e.icon===`📁`,s=e.appId===`pdf`,c=(0,z.useRef)(0),l=zt(e.appId),u=e.appId&&!a&&r?l:e.name,d=(0,z.useCallback)(t=>{if(t.preventDefault(),e.nodeId){t.stopPropagation(),n?.(t,e.nodeId);return}e.appId&&!r?.hasContextMenu&&t.stopPropagation()},[e.nodeId,e.appId,r?.hasContextMenu,n]),f=()=>i?(0,B.jsx)(g.t,{type:`folder`,name:e.name,folderNode:{id:e.id,name:e.name,type:`folder`,parentId:null,children:[],iconName:e.iconName,iconColor:e.iconColor,createdAt:new Date,updatedAt:new Date},size:32}):o&&a?(0,B.jsx)(g.t,{type:`folder`,name:e.name,size:32}):a||s?(0,B.jsx)(g.t,{type:`file`,name:e.name,size:32}):(0,B.jsx)(v.t,{fcIcon:r?.fcIcon,iconUrl:r?.iconUrl,fallback:e.icon,size:32,color:r?.iconColor});return(0,B.jsxs)(`div`,{className:or.root,style:{left:e.x,top:e.y},onDoubleClick:()=>t(e.appId??``,e.nodeId),onTouchEnd:n=>{n.preventDefault();let r=Date.now();r-c.current<300&&t(e.appId??``,e.nodeId),c.current=r},onContextMenu:d,role:`button`,"aria-label":u,tabIndex:0,onKeyDown:n=>n.key===`Enter`&&t(e.appId??``,e.nodeId),children:[(0,B.jsx)(`span`,{className:or.iconImage,"aria-hidden":`true`,children:f()}),(0,B.jsx)(h.o,{size:`xs`,className:or.label,truncate:!0,children:u})]})},cr=({x:e,y:t})=>(0,B.jsx)(i.r.Target,{children:(0,B.jsx)(`div`,{"aria-hidden":`true`,style:{position:`fixed`,left:e,top:t,width:0,height:0,pointerEvents:`none`}})}),lr=({owner:e,parentId:t,currentPath:n})=>{let{t:r}=(0,U.useTranslation)(`contextMenu`),a=w.o(e=>e.contextMenu),o=w.o(e=>e.closeContextMenu),s=w.o(e=>e.copyToClipboard),c=w.o(e=>e.cutToClipboard),l=w.o(e=>e.clipboard),u=w.o(e=>e.clearClipboard),d=w.o(e=>e.fsNodes),f=w.o(e=>e.addNotification),p=w.o(e=>e.openWindow),g=w.o(e=>e.desktopSortMode),y=w.o(e=>e.filesSortMode),b=w.o(e=>e.setDesktopSortMode),x=w.o(e=>e.setFilesSortMode),S=w.o(e=>e.setFsNodes),T=w.o(e=>e.syncIcons),E=e===`files`?y:g,D=e===`files`?x:b,[O,A]=(0,z.useState)({opened:!1,pending:null}),[j,M]=(0,z.useState)({opened:!1,nodeId:null,nodeName:``}),N=a.owner===e,P=a.targetNodeId,F=P?d.find(e=>e.id===P):void 0,I=e=>{o();let{x:i,y:a}=C._();p({title:r(e===`folder`?`createItem.folderTitle`:`createItem.fileTitle`),content:`createItem`,icon:e===`folder`?`📁`:`📄`,fcIcon:e===`folder`?`FcNewFolder`:`FcFile`,x:i,y:a,width:400,height:300,minWidth:350,minHeight:250,canMaximize:!1,alwaysOnTop:!0,contentData:{mode:e,parentId:t,currentPath:n}})},ee=()=>{P&&F&&M({opened:!0,nodeId:P,nodeName:F.name}),o()},L=async e=>{if(e&&j.nodeId)try{await w.n.delete(j.nodeId),S(w.n.getAllNodes()),T()}catch(e){f({id:`delete-error-${Date.now()}`,title:r(`common:errors.deleteFailed`),message:e instanceof Error?e.message:`Unknown error`,fcIcon:`FcHighPriority`})}M({opened:!1,nodeId:null,nodeName:``})},te=()=>{F&&c([F]),o()},ne=()=>{F&&s([F]),o()},R=(e,t)=>d.find(n=>n.name===e&&n.parentId===t),re=async(e,t)=>{let n=await w.n.createFolder(e.name,t,e.iconName,e.iconColor),r=w.n.getChildren(e.id);for(let e of r)e.type===`folder`?await re(e,n.id):await w.n.createFile(e.name,e.content||``,n.id)},ie=async(e,n)=>{if(t){if(l.action===`cut`)try{await w.n.move(e.id,t),S(w.n.getAllNodes()),T()}catch(e){f({id:`move-error-${Date.now()}`,title:`Move Failed`,message:e instanceof Error?e.message:`Unknown error`,fcIcon:`FcHighPriority`});return}else if(l.action===`copy`){if(e.type===`folder`){let r=R(e.name,t);r&&n&&await w.n.delete(r.id),(!r||n)&&(await re(e,t),S(w.n.getAllNodes()),T())}else if(e.type===`file`){let r=R(e.name,t);if(r&&n&&await w.n.delete(r.id),!r||n)try{await w.n.createFile(e.name,e.content||``,t),S(w.n.getAllNodes()),T()}catch(e){f({id:`create-error-${Date.now()}`,title:`Create File Failed`,message:e instanceof Error?e.message:`Unknown error`,fcIcon:`FcHighPriority`})}}}l.action===`cut`&&u()}},ae=async()=>{if(l.content.length===0||!t)return;let e=l.content[0];R(e.name,t)?A({opened:!0,pending:{node:e,originalName:e.name}}):(await ie(e,!1),o())},V=e=>{O.pending&&ie(O.pending.node,e),A({opened:!1,pending:null}),o()},oe=l.content.length>0&&t!==null,H=l.content.length>1?r(`actions.pasteItems`,{count:l.content.length}):r(`actions.paste`),se=e=>{D(e),o()},ce=[{mode:`default`,icon:`FcDatabase`,label:r(`sort.default`)},{mode:`name-asc`,icon:`FcAlphabeticalSortingAz`,label:r(`sort.nameAsc`)},{mode:`name-desc`,icon:`FcAlphabeticalSortingZa`,label:r(`sort.nameDesc`)},{mode:`type`,icon:`FcFile`,label:r(`sort.byType`)}];return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(i.r,{opened:N,onClose:o,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,position:`bottom-start`,children:[(0,B.jsx)(cr,{x:a.x,y:a.y}),(0,B.jsx)(i.r.Dropdown,{children:F?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(i.r.Label,{children:F.name}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscFiles`,size:14}),onClick:te,children:r(`actions.cut`)}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscClippy`,size:14}),onClick:ne,children:r(`actions.copy`)}),oe&&(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscCopy`,size:14}),onClick:ae,children:H}),(0,B.jsx)(i.r.Divider,{}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscTrash`,size:14}),color:`red`,onClick:ee,children:r(`actions.delete`)})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscNewFolder`,size:14}),onClick:()=>I(`folder`),children:r(`actions.createFolder`)}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscNewFile`,size:14}),onClick:()=>I(`file`),children:r(`actions.createFile`)}),oe&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(i.r.Divider,{}),(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(k.t,{name:`VscCopy`,size:14}),onClick:ae,children:H})]}),e===`desktop`||e===`files`?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(i.r.Divider,{}),(0,B.jsx)(i.r.Label,{children:r(`sort.title`)}),ce.map(e=>(0,B.jsx)(i.r.Item,{leftSection:(0,B.jsx)(v.t,{fcIcon:e.icon,size:14}),onClick:()=>se(e.mode),style:E===e.mode?{fontWeight:600}:void 0,"data-testid":E===e.mode?`sort-option-selected`:void 0,children:e.label},e.mode))]}):null]})})]}),(0,B.jsxs)(q,{opened:O.opened,onClose:()=>V(!1),title:(0,B.jsx)(h.o,{fw:600,children:r(`common:messages.replaceFile`)}),centered:!0,size:`sm`,children:[(0,B.jsx)(h.o,{size:`sm`,mb:`md`,children:r(`common:messages.replaceFileMessage`,{name:O.pending?.originalName})}),(0,B.jsxs)(m.t,{justify:`flex-end`,children:[(0,B.jsx)(_.t,{variant:`default`,size:`sm`,onClick:()=>V(!1),leftSection:(0,B.jsx)(k.t,{name:`VscClose`,size:14}),children:r(`common:buttons.no`)}),(0,B.jsx)(_.t,{size:`sm`,onClick:()=>V(!0),leftSection:(0,B.jsx)(k.t,{name:`VscCheck`,size:14}),children:r(`common:messages.yesReplace`)})]})]}),(0,B.jsxs)(q,{opened:j.opened,onClose:()=>L(!1),title:(0,B.jsx)(h.o,{fw:600,children:r(`deleteConfirm.title`,{name:j.nodeName})}),centered:!0,size:`sm`,children:[(0,B.jsx)(h.o,{size:`sm`,mb:`md`,children:r(`deleteConfirm.message`,{name:j.nodeName})}),(0,B.jsxs)(m.t,{justify:`flex-end`,children:[(0,B.jsx)(_.t,{variant:`default`,size:`sm`,onClick:()=>L(!1),leftSection:(0,B.jsx)(k.t,{name:`VscClose`,size:14}),children:r(`common:actions.cancel`)}),(0,B.jsx)(_.t,{color:`red`,size:`sm`,onClick:()=>L(!0),leftSection:(0,B.jsx)(k.t,{name:`VscTrash`,size:14}),children:r(`common:actions.delete`)})]})]})]})},ur={overlay:`_overlay_34o9z_1`,content:`_content_34o9z_12`,phoneIcon:`_phoneIcon_34o9z_22`,rotatePhone:`_rotatePhone_34o9z_1`,title:`_title_34o9z_50`,message:`_message_34o9z_54`,button:`_button_34o9z_58`},dr=({onDismiss:e})=>{let{isPortrait:t,shouldShowWarning:n}=b.n();return!n||!t?null:(0,B.jsx)(`div`,{className:ur.overlay,children:(0,B.jsxs)(`div`,{className:ur.content,children:[(0,B.jsx)(`div`,{className:ur.phoneIcon,children:(0,B.jsxs)(`svg`,{width:`64`,height:`64`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,B.jsx)(`rect`,{x:`5`,y:`2`,width:`14`,height:`20`,rx:`2`}),(0,B.jsx)(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`18.01`,strokeWidth:`2`,strokeLinecap:`round`})]})}),(0,B.jsx)(h.o,{size:`lg`,fw:500,className:ur.title,children:`Turn your device`}),(0,B.jsx)(h.o,{size:`sm`,c:`dimmed`,className:ur.message,children:`For a better experience use this app desktop OR horizontal mode`}),(0,B.jsx)(_.t,{variant:`subtle`,onClick:e,className:ur.button,children:`Continue vertically?`})]})})},fr=()=>typeof window<`u`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,pr=()=>{let e=s.h(e=>e.applySystemTheme),t=s.h(e=>e.themeSetManually);(0,z.useEffect)(()=>{if(typeof window>`u`)return;t||e(fr());let n=window.matchMedia(`(prefers-color-scheme: dark)`),r=t=>{s.h.getState().themeSetManually||e(t.matches?`dark`:`light`)};return n.addEventListener(`change`,r),()=>n.removeEventListener(`change`,r)},[e,t])},mr=(e,t)=>{let n=e=>e.replace(/^v/,``).split(`.`).map(Number),r=n(e),i=n(t),a=Math.max(r.length,i.length);for(let e=0;e<a;e++){let t=r[e]??0,n=i[e]??0;if(t>n)return!0;if(t<n)return!1}return!1},hr=`frannunpal/frannunpal.github.io`,gr=`https://api.github.com/repos/${hr}/releases/latest`,_r=async()=>{let e=await fetch(gr);if(!e.ok)throw Error(`GitHub API error: ${e.status}`);return e.json()},vr=`fde-desktop:version`,yr=!1,br=()=>{let e=w.o(e=>e.mergeSeed),t=w.o(e=>e.mergeDesktopApps),n=w.o(e=>e.reorderDesktopApps),{notify:r}=A.n();(0,z.useEffect)(()=>{typeof window>`u`||yr||(yr=!0,h.a()?xr(r):Sr(e,t,n,r))},[e,t,n,r])},xr=async e=>{try{let t=await _r(),n=t.tag_name;if(!mr(n,__APP_VERSION__))return;e(`Update ${n} available!`,`Click close to open the download page.`,{fcIcon:`FcEngineering`,onClose:()=>window.open(t.html_url,`_blank`)})}catch{yr=!1}},Sr=async(e,t,n,r)=>{try{let i=localStorage.getItem(vr),a=i?JSON.parse(i):null,o=await fetch(w.g(`version.json`)).then(e=>e.json());if(a?.sha===o.sha)return;let s=await w.t();if(!s)return;e(s),t(w.w),n(w.w),localStorage.setItem(vr,JSON.stringify(o)),r(`New version available!`,`Close this notification to install it.`,{fcIcon:`FcEngineering`,onClose:()=>window.location.reload()})}catch{yr=!1}},Cr=e=>`https://fonts.googleapis.com/css2?family=${e.replace(/\s+/g,`+`)}&display=swap`,wr=e=>{let t=s.f[e];if(!t||document.head.querySelector(`link[data-font="${e}"]`))return;let n=document.createElement(`link`);n.rel=`stylesheet`,n.href=t,n.setAttribute(`data-font`,e),document.head.appendChild(n)},Tr=()=>{let e=s.h(e=>e.font),t=s.h(e=>e.fontSize),n=s.h(e=>e.downloadedFonts);(0,z.useEffect)(()=>{n.forEach(e=>{s.f[e]||(s.f[e]=Cr(e)),wr(e)})},[n]),(0,z.useEffect)(()=>{let r=s.u.map(e=>e.value).includes(e);!r&&n.includes(e)&&(s.f[e]||(s.f[e]=Cr(e)),wr(e));let i;i=r?s.d[e]??s.d[`system-ui`]:n.includes(e)?`"${e}", sans-serif`:s.d[`system-ui`],document.documentElement.style.setProperty(`font-family`,i),document.documentElement.style.setProperty(`--mantine-font-family`,i),document.documentElement.style.setProperty(`font-size`,`${t}px`)},[e,t,n])};function Er(){let{i18n:e}=(0,U.useTranslation)(),t=s.h(e=>e.language);(0,z.useEffect)(()=>{t&&e.language!==t&&(e.changeLanguage(t),localStorage.setItem(`fde-desktop:language`,t))},[t,e]),(0,z.useEffect)(()=>{let e=localStorage.getItem(`fde-desktop:language`);t&&!e&&localStorage.setItem(`fde-desktop:language`,t)},[t])}var Dr=`fran-desktop`,Or=`fde-desktop`,kr=1,Ar=`fde-desktop:migration-version`,jr=!1,Mr=null;async function Nr(e,t){return new Promise(n=>{let r=indexedDB.open(e);r.onerror=()=>{n(!1)},r.onsuccess=async()=>{let i=r.result,a=Array.from(i.objectStoreNames);if(a.length===0){i.close(),n(!1);return}let o=indexedDB.open(t,i.version);o.onerror=()=>{i.close(),n(!1)},o.onupgradeneeded=e=>{let t=e.target.result;for(let e of a)t.objectStoreNames.contains(e)||t.createObjectStore(e)},o.onsuccess=async()=>{let t=o.result;try{for(let e of a){let n=i.transaction(e,`readonly`).objectStore(e).getAll();await new Promise((r,i)=>{n.onsuccess=()=>{let a=n.result;if(a&&a.length>0){let n=t.transaction(e,`readwrite`),o=n.objectStore(e);for(let e of a)o.put(e);n.oncomplete=()=>r(),n.onerror=()=>i(n.error)}else r()},n.onerror=()=>i(n.error)})}i.close(),t.close(),await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>t(),n.onerror=()=>t()}),n(!0)}catch{i.close(),t.close(),n(!1)}}}})}function Pr(){let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n&&(n===Dr||n.startsWith(`${Dr}:`))&&e.push(n)}for(let t of e){let e=t.replace(Dr,Or),n=localStorage.getItem(t);n!==null&&(localStorage.getItem(e)===null&&localStorage.setItem(e,n),localStorage.removeItem(t))}return{keysMigrated:e.length}}async function Fr(){return jr?{indexedDB:{fs:!1,blobs:!1},localStorage:{keysMigrated:0},version:kr}:Mr||(Mr=(async()=>{if(console.log(`[Migration] Starting storage migration...`),localStorage.getItem(Ar)===String(kr))return console.log(`[Migration] Already migrated, skipping.`),jr=!0,{indexedDB:{fs:!1,blobs:!1},localStorage:{keysMigrated:0},version:kr};let e=!1,t=!1;try{e=await Nr(`fran-desktop-fs`,`fde-desktop-fs`),e&&console.log(`[Migration] Migrated IndexedDB: fran-desktop-fs → fde-desktop-fs`)}catch(e){console.warn(`[Migration] Failed to migrate fran-desktop-fs:`,e)}try{t=await Nr(`fran-desktop-blobs`,`fde-desktop-blobs`),t&&console.log(`[Migration] Migrated IndexedDB: fran-desktop-blobs → fde-desktop-blobs`)}catch(e){console.warn(`[Migration] Failed to migrate fran-desktop-blobs:`,e)}let{keysMigrated:n}=Pr();return n>0&&console.log(`[Migration] Migrated ${n} localStorage keys`),localStorage.setItem(Ar,String(kr)),console.log(`[Migration] Storage migration complete.`),jr=!0,{indexedDB:{fs:e,blobs:t},localStorage:{keysMigrated:n},version:kr}})(),Mr)}var Ir=[],Lr=!1;function Rr(){if(Ir.length===0){Lr=!1;return}Lr=!0;let e=Ir.shift();e&&e.loader().catch(()=>{}).finally(()=>{`requestIdleCallback`in window?requestIdleCallback(Rr,{timeout:2e3}):setTimeout(Rr,100)})}function zr(e,t){Ir.some(t=>t.id===e)||(Ir.push({id:e,loader:t}),Br())}function Br(){Lr||(`requestIdleCallback`in window?requestIdleCallback(Rr,{timeout:2e3}):setTimeout(Rr,100))}function Vr(e){e.forEach(e=>{zr(e.id,e.loader)})}var Hr=null,Ur=new Map;function Wr(){let{windows:e}=w.o.getState(),t=e.filter(e=>e.isOpen&&e.state!==`minimized`);return t.length===0?null:t.reduce((e,t)=>t.zIndex>(e?.zIndex??-1)?t:e,null)?.id??null}function $(e,t){let n=Ur.get(e);n&&n.forEach(n=>{try{n(t)}catch(t){console.error(`[FdeApi] Error in subscriber for ${e}:`,t)}})}var Gr={width:800,height:600},Kr={x:100,y:100};function qr(){if(Hr){console.warn(`[FdeApi] Already initialized`);return}Hr={openApp:(e,t)=>{let n=w.o.getState().openWindow,r=w.C.find(t=>t.id===e);n({content:e,title:t?.title??r?.name??e,icon:t?.icon??r?.icon??`📦`,fcIcon:r?.fcIcon,iconUrl:r?.iconUrl,iconColor:r?.iconColor,width:t?.size?.width??r?.defaultWidth??Gr.width,height:t?.size?.height??r?.defaultHeight??Gr.height,x:t?.position?.x??Kr.x,y:t?.position?.y??Kr.y,minWidth:r?.minWidth===!1?void 0:r?.minWidth,minHeight:r?.minHeight===!1?void 0:r?.minHeight,canMaximize:r?.canMaximize??!0,alwaysOnTop:r?.alwaysOnTop??!1,contentData:t?.contentData}),$(`window-opened`,{windowId:w.o.getState().windows[w.o.getState().windows.length-1]?.id??``,content:e})},closeWindow:e=>{let t=e??Wr();t&&(w.o.getState().closeWindow(t),$(`window-closed`,{windowId:t}))},minimizeWindow:e=>{let t=e??Wr();t&&(w.o.getState().minimizeWindow(t),$(`window-minimized`,{windowId:t}))},maximizeWindow:e=>{let t=e??Wr();t&&(w.o.getState().maximizeWindow(t),$(`window-maximized`,{windowId:t}))},restoreWindow:e=>{let t=e??Wr();t&&w.o.getState().restoreWindow(t)},focusWindow:e=>{let t=e??Wr();t&&(w.o.getState().focusWindow(t),$(`window-focused`,{windowId:t}))},openFile:(e,t)=>{w.o.getState().openWindow({content:`files`,contentData:{initialPath:e},title:`Files`,icon:`📁`,fcIcon:`FcOpenedFolder`,width:Gr.width,height:Gr.height,x:Kr.x,y:Kr.y}),$(`file-opened`,{path:e,appId:t})},openFileDialog:async()=>(console.warn(`[FdeApi] openFileDialog not yet implemented`),null),saveFile:async()=>(console.warn(`[FdeApi] saveFile not yet implemented`),!1),saveFileDialog:async()=>(console.warn(`[FdeApi] saveFileDialog not yet implemented`),null),getTheme:()=>s.h.getState().theme,setTheme:e=>{let t=e;t.taskbar&&t.window&&t.accent&&(s.h.getState().setCustomThemeColors(t),$(`theme-changed`,{theme:JSON.stringify(e)}))},showNotification:e=>{let t=w.ut();return w.o.getState().addNotification({id:t,title:e.title,message:e.message,fcIcon:e.type===`error`?`FcCancel`:e.type===`success`?`FcCheckmark`:`FcInfo`}),$(`notification-shown`,{notificationId:t}),t},hideNotification:e=>{w.o.getState().removeNotification(e)},getWindows:()=>w.o.getState().windows,getActiveWindow:()=>{let e=w.o.getState().windows,t=Wr();return t?e.find(e=>e.id===t)??null:null},getWindowById:e=>w.o.getState().windows.find(t=>t.id===e)??null,on:(e,t)=>(Ur.has(e)||Ur.set(e,new Set),Ur.get(e).add(t),()=>{Ur.get(e)?.delete(t)}),off:(e,t)=>{Ur.get(e)?.delete(t)},fs:w.n,appReady:e=>{w.v.getState().setAppReady(e)},registerAppInstance:(e,t)=>{w.v.getState().setAppReady(e,t)}},window.__FDE_API__=Hr,console.log(`[FdeApi] Initialized`)}function Jr(){if(!Hr)throw Error(`[FdeApi] API not initialized. Call initializeFdeApi() first.`);return Hr}function Yr(){return Hr!==null}var Xr=!1;function Zr({defaultWallpaper:e,initialApp:t,prefetchLoaders:n}){let r=j.t(s.h(e=>e.wallpaper)??void 0),i=w.o(e=>e.windows),a=w.o(e=>e.icons),o=w.o(e=>e.initFs),c=w.o(e=>e.isFsReady),l=w.o(e=>e.fsNodes),u=w.o(e=>e.openContextMenu),d=w.o(e=>e.filesCurrentFolderId),f=w.o(e=>e.desktopFolderId),p=C.t(),{shouldShowWarning:m}=b.n(),{notify:h}=A.n(),[g,_]=(0,z.useState)(!1);pr(),br(),Tr(),Er(),Xn(),(0,z.useEffect)(()=>{Yr()||qr()},[]),(0,z.useEffect)(()=>{if(!c)return;let e=document.getElementById(`initial-loader`);e&&(e.classList.add(`hidden`),setTimeout(()=>e.remove(),200))},[c]),(0,z.useEffect)(()=>{if(!n?.length)return;let e=setTimeout(()=>{Vr(n)},3e3);return()=>clearTimeout(e)},[n]),(0,z.useEffect)(()=>{Xr||(Xr=!0,Fr().finally(()=>{o(),t&&p(t)}))},[o,p,t]);let v=(0,z.useCallback)(e=>{e.preventDefault(),u(e.clientX,e.clientY,`desktop`)},[u]),y=(0,z.useCallback)((e,t)=>{e.preventDefault(),e.stopPropagation(),u(e.clientX,e.clientY,`desktop`,t)},[u]),x=(0,z.useCallback)((e,t)=>{let n;if(t){let r=l.find(e=>e.id===t);if(r?.type===`folder`)n={initialFolderId:t};else if(r?.type===`file`){let t=w.x(r);if(!t){h(`Unsupported file type`,`The type of file you are trying to open is not supported currently`,{fcIcon:`FcDeleteRow`});return}t.appId!==e&&h(`File type mismatch`,`Opening "${r.name}" as ${t.appId} instead of ${e}`,{fcIcon:`FcDeleteRow`}),p(t.appId,{contentData:t.contentData});return}}p(e,{contentData:n})},[p,l,h]);return c?(0,B.jsxs)(B.Fragment,{children:[m&&!g&&(0,B.jsx)(dr,{onDismiss:()=>_(!0)}),(0,B.jsxs)(At,{wallpaper:r??e,onContextMenu:v,children:[a.map(e=>(0,B.jsx)(sr,{icon:e,onDoubleClick:x,onContextMenu:y},e.id)),(0,B.jsx)(H.AnimatePresence,{children:i.map(e=>(0,B.jsx)(ar,{window:e},e.id))})]}),(0,B.jsx)(Cn,{}),(0,B.jsx)(lr,{owner:`desktop`,parentId:f,currentPath:`/home`}),(0,B.jsx)(lr,{owner:`files`,parentId:d,currentPath:(()=>{let e=[`/home`],t=d,n=[];for(;t!==null;){let e=l.find(e=>e.id===t);if(!e)break;n.unshift(e.name),t=e.parentId}return[...e,...n].join(`/`)})()})]}):null}function Qr({children:e,isReady:t,error:n,defaultWallpaper:r,initialApp:i,prefetchLoaders:a}){let o=ve(),c=s.h(e=>e.setThemeMode),l=s.h(e=>e.toggleTheme),u=(0,z.useMemo)(()=>({fs:null,isReady:t,error:n,theme:o,setThemeMode:c,toggleTheme:l}),[t,n,o,c,l]);return e?(0,B.jsx)(Et,{children:(0,B.jsx)(xt.Provider,{value:u,children:e})}):(0,B.jsx)(Et,{children:(0,B.jsx)(xt.Provider,{value:u,children:(0,B.jsx)(Zr,{defaultWallpaper:r,initialApp:i,prefetchLoaders:a})})})}function $r({children:e,fallback:t=null,theme:n,mantineTheme:r,fileSystem:i,initialMode:a,customApps:o,onError:c,defaultWallpaper:l,initialApp:u,prefetchLoaders:d}){let[f,p]=(0,z.useState)(!1),[m,h]=(0,z.useState)(null),g=s.h(e=>e.theme.mode),[_]=(0,z.useState)(a),v=_??g;(0,z.useEffect)(()=>{let e=!0;return(async()=>{try{C.T(),o&&C.O(o)}catch(e){console.error(`[FdeDesktop] Failed to initialize core registry:`,e)}if(!i){e&&p(!0);return}try{await i.initialize(),e&&p(!0)}catch(t){let n=t instanceof Error?t:Error(String(t));e&&(h(n),c?.(n))}})(),()=>{e=!1}},[i,o,c]);let y=(0,z.useMemo)(()=>ze({...bt,...r}),[r]);return m||!f?(0,B.jsx)(B.Fragment,{children:t}):(0,B.jsx)(Le,{theme:y,forceColorScheme:v,children:(0,B.jsx)(_e,{mode:v,theme:n,children:(0,B.jsx)(Qr,{isReady:f,error:m,defaultWallpaper:l,initialApp:u,prefetchLoaders:d,children:e})})})}var ei=({component:e,windowId:t,contentData:n,onExit:r})=>e?(0,B.jsx)(e,{windowId:t,contentData:n,onExit:r}):null,ti=w.C.filter(e=>e.id!==`settings`),ni=({opened:e,position:t,onClose:n,onOpenApp:r,onToggleTheme:a})=>(0,B.jsxs)(i.r,{opened:e,onClose:n,closeOnClickOutside:!0,closeOnEscape:!0,closeOnItemClick:!0,withinPortal:!0,children:[(0,B.jsx)(cr,{x:t.x,y:t.y}),(0,B.jsxs)(i.r.Dropdown,{children:[ti.map(e=>(0,B.jsxs)(i.r.Item,{onClick:()=>r(e.id),children:[`Open `,e.name]},e.id)),(0,B.jsx)(i.r.Divider,{}),(0,B.jsx)(i.r.Item,{onClick:a,children:`Toggle Theme`})]})]}),ri={container:`_container_1br66_1`},ii=({notifyReady:e,window:t,config:n})=>{let r=(0,z.useRef)(!1),i=`${n.title} blocks embedding in iframes for security reasons.`;(0,z.useEffect)(()=>{r.current||(r.current=!0,e?.({...t?.contentData??{},openInBrowser:()=>{globalThis.window.open(n.url,`_blank`,`noopener,noreferrer`)}}))},[e,t,n.url]);let a=()=>{globalThis.window.open(n.url,`_blank`,`noopener,noreferrer`)},o=T.o(n.icon,{size:48,color:n.iconColor}),s=T.o(n.icon,{size:16,color:n.iconColor});return(0,B.jsx)(y.t,{className:ri.container,children:(0,B.jsxs)(S.t,{align:`center`,gap:`md`,children:[o,(0,B.jsx)(h.o,{size:`lg`,fw:500,children:n.title}),(0,B.jsxs)(h.o,{size:`sm`,c:`dimmed`,ta:`center`,children:[n.description??i,(0,B.jsx)(`br`,{}),`Click below to go to my `,n.title,` profile.`]}),(0,B.jsx)(_.t,{leftSection:s,onClick:a,children:n.buttonLabel})]})})},ai=(e=0,t)=>{let[n,r]=(0,z.useState)(!1),[i,a]=(0,z.useState)({x:0,y:0});return{opened:n,position:i,open:(0,z.useCallback)((n,i)=>{if(n.preventDefault(),t&&!w.C.find(e=>e.id===t)?.hasContextMenu){n.stopPropagation();return}a({x:n.clientX,y:n.clientY+(i??e)}),r(!0)},[e,t]),close:(0,z.useCallback)(()=>r(!1),[])}};function oi({snapshotRef:e,getCurrentState:t,initialSnapshot:n,onChange:r,appId:i}){let[a,o]=(0,z.useState)(!1),s=(0,z.useRef)(r);return(0,z.useEffect)(()=>{s.current=r},[r]),(0,z.useEffect)(()=>{if(e.current===null){if(i){let t=N.n.getState().getSnapshot(i);if(t!==null){e.current=t;return}}n!==void 0&&(e.current=n)}},[e,n,i]),(0,z.useEffect)(()=>{let n=t();if(e.current===null)return;let r=JSON.stringify(n)!==JSON.stringify(e.current);o(r),s.current&&s.current(r)},[t,e]),{isDirty:a,takeSnapshot:(0,z.useCallback)(()=>{let n=t();e.current=n,o(!1),i&&N.n.getState().setSnapshot(i,n),s.current&&s.current(!1)},[e,t,i]),reset:(0,z.useCallback)(()=>{o(!1),s.current&&s.current(!1)},[])}}function si(){return(0,z.useMemo)(()=>Yr()?Jr():(console.warn(`[useFdeApi] API not initialized. Make sure initializeFdeApi() is called.`),null),[])}var ci={status:`idle`,loaded:0,total:null,percent:null,error:null},li=()=>{let[e,t]=(0,z.useState)(ci),n=(0,z.useCallback)(()=>t(ci),[]),r=(0,z.useCallback)(async e=>{t({status:`downloading`,loaded:0,total:null,percent:null,error:null});try{let n=await fetch(e);if(!n.ok)return t(e=>({...e,status:`error`,error:`HTTP ${n.status}: ${n.statusText}`})),null;let r=n.headers.get(`Content-Length`),i=r?parseInt(r,10):null;if(!n.body){let e=await n.text();return t({status:`done`,loaded:e.length,total:e.length,percent:100,error:null}),e}let a=n.body.getReader(),o=[],s=0;for(;;){let{done:e,value:n}=await a.read();if(e)break;o.push(n),s+=n.byteLength;let r=i?Math.round(s/i*100):null;t({status:`downloading`,loaded:s,total:i,percent:r,error:null})}let c=new Uint8Array(s),l=0;for(let e of o)c.set(e,l),l+=e.byteLength;let u=new TextDecoder().decode(c);return t({status:`done`,loaded:s,total:i??s,percent:100,error:null}),u}catch(e){let n=e instanceof Error?e.message:`Unknown error`;return t(e=>({...e,status:`error`,error:n})),null}},[]);return{...e,download:r,reset:n}},ui={light:{mode:`light`,desktop:`#f0f4f8`,taskbar:`rgba(255, 255, 255, 0.9)`,window:`#ffffff`,accent:`#339af0`},dark:{mode:`dark`,desktop:`#1a1b1e`,taskbar:`rgba(26, 27, 30, 0.9)`,window:`#25262b`,accent:`#4dabf7`}},di=typeof __APP_VERSION__==`string`?__APP_VERSION__:`0.4.0`,fi=()=>`${di}-${typeof __PROD__==`boolean`&&__PROD__?`prod`:`dev`}-${typeof window<`u`&&window.__FDE_IN_DOCKER__?`docker`:`web`}`,pi=()=>typeof __PROD__==`boolean`&&__PROD__?`prod`:`dev`,mi=()=>typeof window>`u`?`web`:window.__FDE_IN_DOCKER__?`docker`:/Electron/i.test(navigator.userAgent)?`electron`:`web`,hi=e=>({primaryColor:`blue`,other:{desktop:e.desktop,taskbar:e.taskbar,window:e.window,accent:e.accent}});exports.ANIMATION_DURATION=C.n,exports.APPS=w.C,exports.APP_IDS=J,exports.APP_ID_TO_TRANSLATION_KEY=Lt,exports.APP_VERSION=di,exports.AVAILABLE_FONTS=s.u,exports.AppEmptyState=P.t,exports.AppIcon=v.t,exports.AppLoading=wn,exports.AppMenuBar=i.t,exports.AppReadyProvider=rr,exports.BREAKPOINTS=w.p,exports.CORE_APPS=w.k,exports.CORE_APP_IDS=w.A,exports.CORE_REGISTRY=C.b,exports.CUSTOM_APPS_FOLDER_ID=w.J,exports.CalendarApp=t.t,exports.CalendarAppLazy=C.k,exports.CollapsibleSection=Ut,exports.ColorPicker=n.t,exports.ContextMenu=ni,exports.ContextMenuAnchor=Jt,exports.CreateItemApp=l.t,exports.CreateItemAppLazy=C.A,exports.CreateItemContextMenu=lr,exports.CustomAppLoader=er,exports.CustomAppLoadingScreen=Tn,exports.CustomAppNotSupported=Dn,exports.CustomAppOffline=En,exports.DEFAULT_FDE_THEME=ge,exports.DEFAULT_LANGUAGE=s.i,exports.DEFAULT_LAUNCHER_FOLDERS=w.Y,exports.DEFAULT_THEME_COLORS=ui,exports.DEFAULT_VIEWPORT_HEIGHT=w.s,exports.DEFAULT_VIEWPORT_WIDTH=w.c,exports.DEFAULT_WINDOW_DIMENSIONS=w.j,exports.DESKTOP_APPS=Rt,exports.DESKTOP_APPS_ORDER=w.w,exports.DefaultThemeProvider=s.g,exports.Desktop=At,exports.DesktopIcon=sr,exports.DeviceInfoApp=b.t,exports.DeviceInfoAppLazy=C.j,exports.DirtyIndicator=i.n,exports.DockerFileSystemAdapter=w.Z,exports.DownloadProgress=u.t,exports.DragDropProvider=D.a,exports.DynamicMenuBarRenderer=ei,exports.EASE_IN=C.r,exports.EASE_OUT=C.i,exports.EXTRA_APPS=w.D,exports.EXTRA_APP_IDS=w.O,exports.ExternalLinkApp=ii,exports.FONT_STACKS=s.d,exports.FdeDesktop=$r,exports.FdeProvider=Ct,exports.FileIcon=g.t,exports.FilePickerApp=M.t,exports.FilePickerModal=M.n,exports.FilesApp=A.t,exports.FilesAppLazy=C.M,exports.FolderPicker=M.a,exports.GITHUB_LATEST_RELEASE_URL=gr,exports.GITHUB_RELEASES_REPO=hr,exports.GOOGLE_FONTS_HREF=s.f,exports.ICON_COLUMN_WIDTH=w.l,exports.ICON_MARGIN=w.u,exports.ICON_ROW_HEIGHT=w.d,exports.IMAGE_MIME_TYPES=w.y,exports.IconColorPicker=l.n,exports.ImageViewerApp=I.t,exports.ImageViewerAppLazy=C.N,exports.ImageViewerMenuBar=ae.t,exports.ImageViewerMenuBarLazy=C.P,exports.IndexedDBFileSystem=w.$,exports.LanguageFlag=s.p,exports.LanguageSelector=xn,exports.Launcher=qt,exports.MenuEditApp=D.t,exports.MenuEditAppLazy=C.F,exports.MenuEditMenuBar=R.t,exports.MenuEditMenuBarLazy=C.I,exports.NotesApp=N.t,exports.NotesAppLazy=C.L,exports.NotesMenuBar=ne.t,exports.NotesMenuBarLazy=C.R,exports.PREDEFINED_LAUNCHER_FOLDERS=w.X,exports.PRESET_COLORS=F.t,exports.PRESET_ICONS=l.r,exports.PROFILE=s.n,exports.PdfApp=ee.t,exports.PdfAppLazy=C.z,exports.PdfMenuBar=ie.t,exports.PdfMenuBarLazy=C.B,exports.SETTINGS_SECTIONS=s.l,exports.SUPPORTED_LANGUAGES=s.a,exports.SettingsApp=s.t,exports.SettingsAppLazy=C.V,exports.SettingsMenuBar=re.t,exports.SettingsMenuBarLazy=C.H,exports.SettingsSectionComponent=s.c,exports.SortOptions=w.M,exports.StorybookApp=L.t,exports.TASKBAR_HEIGHT=w.f,exports.TEXT_MIME_TYPES=w.b,exports.Taskbar=Cn,exports.TaskbarContextMenu=Qt,exports.ThemeProvider=_e,exports.UploaderApp=x.t,exports.UploaderAppLazy=C.U,exports.VscIcon=k.t,exports.Window=ar,exports.WindowButtonRegistryProvider=Et,exports.WindowManagerAdapter=w.nt,exports.appendDirtyIndicator=te.t,exports.buildBreadcrumbs=M.o,exports.centerWindowPosition=C.a,exports.checkHMREndpointExists=Hn,exports.clearBrowserData=s.r,exports.clearManifestCache=w.L,exports.convertToAppEntry=w.R,exports.createDesktopIcon=w.ct,exports.createEaseIn=C.o,exports.createEaseOut=C.s,exports.createFile=w.rt,exports.createFolder=w.it,exports.createLauncherFolder=w.at,exports.createMaximizeTransition=C.c,exports.createMinimizeVariant=C.l,exports.createPanelVariants=C.u,exports.createPredefinedLauncherFolder=w.ot,exports.createRestoreVariant=C.d,exports.createWindow=w.lt,exports.createWindowVariants=C.f,exports.fetchAppManifest=w.z,exports.fileSystem=w.n,exports.formatBytes=x.n,exports.generateUUID=w.ut,exports.getAppComponent=C.x,exports.getAppIdForMime=w.x,exports.getAppName=C.S,exports.getBaseUrl=w.m,exports.getCachedManifest=w.B,exports.getCloseInterceptor=O.t,exports.getCustomAppById=w.V,exports.getCustomApps=w.H,exports.getEnvironment=pi,exports.getFdeApi=Jr,exports.getFileExtension=g.n,exports.getFourRandomColors=P.n,exports.getMenuBarBuilder=C.C,exports.getMenuBarComponent=C.w,exports.getMimeTypeFromExtension=w.tt,exports.getPersistedThemeMode=s.m,exports.getReleaseType=mi,exports.getRuntime=h.t,exports.getVersionString=fi,exports.hashBlob=w.et,exports.i18n=yn,exports.initRegistry=C.E,exports.initializeFdeApi=qr,exports.injectFontLink=s.s,exports.isBrowser=h.n,exports.isCustomApp=w.U,exports.isDev=h.r,exports.isDocker=h.i,exports.isElectron=h.a,exports.isFdeApiInitialized=Yr,exports.isLazyApp=C.D,exports.isNewerVersion=mr,exports.maximizeTransition=C.p,exports.mergeAppsWithCustomApps=w.W,exports.migrateStorage=Fr,exports.minimizeVariant=C.m,exports.openVariants=C.h,exports.panelVariants=C.g,exports.prefetchApps=Vr,exports.randomWindowPosition=C._,exports.registerAppFileHandler=w.S,exports.registerCloseInterceptor=O.n,exports.registerComponents=C.O,exports.registerCustomApps=w.T,exports.registerDesktopApps=w.E,exports.removeFromManifestCache=w.G,exports.resetBaseUrlCache=w.h,exports.resetFileSystem=w.r,exports.resetHMRState=In,exports.resetWindowManager=w.i,exports.resolveFileUrl=w.a,exports.resolveUrl=w.g,exports.restoreVariant=C.v,exports.setApiBaseUrl=w.Q,exports.setTestBaseUrl=w._,exports.sortDesktopIcons=w.N,exports.sortDesktopIconsByMode=w.P,exports.sortNodes=w.F,exports.sortNodesByMode=w.I,exports.syncWithServer=w.K,exports.toMantineTheme=hi,exports.unregisterCloseInterceptor=O.r,exports.updateLauncherFolder=w.st,exports.updateManifestCache=w.q,exports.useAdaptiveDimensions=E.t,exports.useAnimationDuration=It,exports.useAppName=zt,exports.useAppReady=nr,exports.useAppTempMemoryStore=N.n,exports.useAppUpdate=br,exports.useApplyFont=Tr,exports.useClock=Mt,exports.useCloseInterceptor=O.i,exports.useCloseModalStore=O.a,exports.useCollapsible=Vt,exports.useContextMenu=ai,exports.useCustomAppHMR=Yn,exports.useCustomAppLifecycle=Xn,exports.useCustomAppStore=w.v,exports.useDesktopStore=w.o,exports.useDeviceDetection=b.n,exports.useDownload=li,exports.useDragDropState=D.n,exports.useDraggableItem=D.i,exports.useDroppableArea=D.r,exports.useDynamicIcon=T.t,exports.useDynamicIconElement=T.n,exports.useFcIcon=T.r,exports.useFcIconElement=T.i,exports.useFdeApi=si,exports.useFdeContext=wt,exports.useFiIcon=T.a,exports.useFiIconElement=T.o,exports.useFolderName=D.o,exports.useFontDownload=s.o,exports.useIsDirty=oi,exports.useLanguageSync=Er,exports.useNotifications=A.n,exports.useOpenApp=C.t,exports.useResolvedUrl=j.t,exports.useSearchFilter=Bt,exports.useSettingsStore=s.h,exports.useSystemTheme=pr,exports.useTaskbarContextMenu=Ft,exports.useTaskbarHeight=Yt,exports.useTheme=ve,exports.useThemeContext=ye,exports.useVscIcon=T.s,exports.useVscIconElement=T.c,exports.useWindowButtonRegistry=Dt,Object.defineProperty(exports,`uuidv4`,{enumerable:!0,get:function(){return fe.v4}}),exports.waitForContainer=Zn,exports.windowVariants=C.y;