efficient-shell 8.34.0 → 8.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +9 -0
  2. package/dist/{Browser-QBAMRKYI.js → Browser-F67PEY2U.js} +14 -14
  3. package/dist/Calculator-6ZU5MKTQ.js +29 -0
  4. package/dist/CurrencyConverter-Z6L7QAZU.js +21 -0
  5. package/dist/{Documents-E3GMXALJ.js → Documents-MQDSI27F.js} +25 -25
  6. package/dist/{Files-2DWPYRM5.js → Files-DEC4KVQM.js} +43 -43
  7. package/dist/Notepad-2IRVJ7MB.js +25 -0
  8. package/dist/PdfViewer-KSLOYXMD.js +1 -0
  9. package/dist/{PomodoroTimer-2HPCAEI5.js → PomodoroTimer-TRGMI4YT.js} +44 -44
  10. package/dist/{Preview-VZYFOH2U.js → Preview-PXOEKXSR.js} +17 -17
  11. package/dist/Sidebar-QQFJJWE2.js +43 -0
  12. package/dist/Spreadsheet-WROI4P6D.js +37 -0
  13. package/dist/Stock-SUDCDSUL.js +16 -0
  14. package/dist/{Weather-DS4YZ6SH.js → Weather-WQE4ZQAL.js} +18 -18
  15. package/dist/{WorldClock-7S4TITSF.js → WorldClock-2AGEYLZP.js} +6 -6
  16. package/dist/ai/index.d.ts +47 -9
  17. package/dist/ai/index.js +38 -33
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/charts/BoxPlotChart.js +1 -1
  23. package/dist/charts/CandlestickChart.js +1 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChordChart.js +1 -1
  26. package/dist/charts/ColumnChart.js +1 -1
  27. package/dist/charts/HeatmapChart.js +1 -1
  28. package/dist/charts/HistogramChart.js +1 -1
  29. package/dist/charts/RadarChart.js +1 -1
  30. package/dist/charts/RangeChart.js +1 -1
  31. package/dist/charts/SankeyChart.js +1 -1
  32. package/dist/charts/ScatterChart.js +1 -1
  33. package/dist/charts/SpecChart.js +1 -1
  34. package/dist/charts/SunburstChart.js +1 -1
  35. package/dist/charts/TimeSeriesChart.js +1 -1
  36. package/dist/charts/TreemapChart.js +1 -1
  37. package/dist/charts/WaterfallChart.js +1 -1
  38. package/dist/{chunk-Z2YGQBLZ.js → chunk-2C6IG7LG.js} +1 -1
  39. package/dist/chunk-2EOQDYGM.js +29 -0
  40. package/dist/{chunk-7CFH6Y4T.js → chunk-2F7ZOMKK.js} +1 -1
  41. package/dist/chunk-2PWZNFFP.js +19 -0
  42. package/dist/{chunk-KIBL6M3T.js → chunk-2SHYR3RA.js} +4 -3
  43. package/dist/{chunk-G433MKIN.js → chunk-2U2GJCSP.js} +5 -5
  44. package/dist/{chunk-EYX6KLCZ.js → chunk-37CCKGHU.js} +1 -1
  45. package/dist/{chunk-BQ2IPQNR.js → chunk-3RPIPYLU.js} +1 -1
  46. package/dist/chunk-4AJRHTTB.js +1 -0
  47. package/dist/{chunk-XWLWG4HS.js → chunk-4GVH4ZUH.js} +1 -1
  48. package/dist/{chunk-GIM2422N.js → chunk-4HCRZHIX.js} +1 -1
  49. package/dist/{chunk-MXHEREC6.js → chunk-4MO375G3.js} +3 -3
  50. package/dist/chunk-5FCEBKT2.js +7 -0
  51. package/dist/{chunk-DGLCMYSQ.js → chunk-5N5DBTTF.js} +11 -11
  52. package/dist/{chunk-PNQ4EYYM.js → chunk-5YELPBUT.js} +3 -3
  53. package/dist/{chunk-QDOTMA3W.js → chunk-64ZHCEZN.js} +1 -1
  54. package/dist/{chunk-Y2D2YMFY.js → chunk-6ANFVX4M.js} +12 -12
  55. package/dist/{chunk-T5SEGUCJ.js → chunk-7ACSSYEZ.js} +13 -13
  56. package/dist/{chunk-GI7FOLDX.js → chunk-ACW3J77L.js} +1 -1
  57. package/dist/{chunk-ERMZ75FO.js → chunk-AF7R2MV4.js} +1 -1
  58. package/dist/{chunk-QQK3XS6H.js → chunk-AZU7YOES.js} +8 -8
  59. package/dist/{chunk-NFR4QZL2.js → chunk-BHMUOWAE.js} +4 -4
  60. package/dist/{chunk-TFMC2WAS.js → chunk-BKZGI76S.js} +1 -1
  61. package/dist/{chunk-UB4BTRSB.js → chunk-BYCOB6WT.js} +1 -1
  62. package/dist/{chunk-LCM5U6BY.js → chunk-CCPNMYCK.js} +1 -1
  63. package/dist/{chunk-RAAUW5OZ.js → chunk-DG2WU3BU.js} +2 -2
  64. package/dist/chunk-DIN3EFOM.js +14 -0
  65. package/dist/{chunk-WJ3XSJ6B.js → chunk-EBC4XFL2.js} +1 -1
  66. package/dist/{chunk-37JDUDCO.js → chunk-ECCUEG3J.js} +1 -1
  67. package/dist/{chunk-4C4SQ4YW.js → chunk-EM6BEHAD.js} +8 -8
  68. package/dist/{chunk-W5M6P4DZ.js → chunk-ETF7LAYZ.js} +5 -5
  69. package/dist/{chunk-LEC4SZIV.js → chunk-EVB35JP5.js} +1 -1
  70. package/dist/{chunk-FL2PUQX7.js → chunk-EW6FRPFJ.js} +1 -1
  71. package/dist/{chunk-JCMP5KMS.js → chunk-EZY4CO4A.js} +6 -6
  72. package/dist/chunk-F2AEP37B.js +4 -0
  73. package/dist/{chunk-PJCVNFWM.js → chunk-FKZEGBLK.js} +10 -10
  74. package/dist/{chunk-DTSCO7VM.js → chunk-FMKTVZAO.js} +1 -1
  75. package/dist/{chunk-IZCODCSC.js → chunk-FTKKGGOQ.js} +1 -1
  76. package/dist/{chunk-FFJVCLGH.js → chunk-G2MJTE6X.js} +11 -11
  77. package/dist/{chunk-3BPF6PP3.js → chunk-G2V2ADJQ.js} +2 -2
  78. package/dist/{chunk-EZGY6CFN.js → chunk-GK3QH63P.js} +1 -1
  79. package/dist/{chunk-3WC6ITJ3.js → chunk-H33Z4ZIY.js} +6 -6
  80. package/dist/{chunk-CPXHU3Y2.js → chunk-HAIMJAI4.js} +2 -2
  81. package/dist/chunk-HMHL27AU.js +6 -0
  82. package/dist/{chunk-RSO67DWS.js → chunk-I4VD5D43.js} +4 -4
  83. package/dist/{chunk-BIYL7CEI.js → chunk-IFDW5QW6.js} +2 -2
  84. package/dist/{chunk-4AAGZQX7.js → chunk-IHEEJO5S.js} +1 -1
  85. package/dist/{chunk-WQNIXV4T.js → chunk-IUCIYWTT.js} +8 -8
  86. package/dist/chunk-JBQWR4SX.js +8 -0
  87. package/dist/{chunk-AX7KPMDV.js → chunk-JDKRQG7X.js} +2 -2
  88. package/dist/chunk-JE6TBZGY.js +8 -0
  89. package/dist/{chunk-LBLV64XG.js → chunk-JUGPTBMS.js} +1 -1
  90. package/dist/{chunk-BUGAWNOC.js → chunk-JVIOAZHW.js} +4 -4
  91. package/dist/{chunk-B2XDNBR3.js → chunk-L3G3YHVN.js} +1 -1
  92. package/dist/{chunk-ZEKM6HAA.js → chunk-M2AIC7IK.js} +2 -2
  93. package/dist/{chunk-KDZUWQEG.js → chunk-M2KV4WKR.js} +1 -1
  94. package/dist/{chunk-H3BC4KDE.js → chunk-M2LLVSBR.js} +1 -1
  95. package/dist/{chunk-SAKHGHF5.js → chunk-MC43PRTL.js} +1 -1
  96. package/dist/{chunk-USYNZGY4.js → chunk-MICWRC72.js} +7 -7
  97. package/dist/{chunk-ZN3O2KJ7.js → chunk-MOD4PGVF.js} +10 -10
  98. package/dist/{chunk-WTY3SXO7.js → chunk-MY755PTJ.js} +1 -1
  99. package/dist/chunk-NKZNPYDB.js +3 -0
  100. package/dist/{chunk-YSFLXPUS.js → chunk-NUSSZJF2.js} +5 -5
  101. package/dist/{chunk-RGBX3EVC.js → chunk-O2YAB6WK.js} +8 -8
  102. package/dist/{chunk-3J5QUHPO.js → chunk-OFKWTOXK.js} +3 -3
  103. package/dist/{chunk-ZT5Y5JZB.js → chunk-P42YNSKI.js} +4 -4
  104. package/dist/{chunk-L3NYH4QV.js → chunk-PAB2ZU4F.js} +37 -37
  105. package/dist/{chunk-KKSW5IZ7.js → chunk-PCKYNZ5Y.js} +5 -5
  106. package/dist/{chunk-RUQEB2ZC.js → chunk-R4C3GGCS.js} +3 -3
  107. package/dist/{chunk-3V5Z2BJY.js → chunk-RB2F65YJ.js} +12 -12
  108. package/dist/{chunk-KNVE7CMS.js → chunk-RJZYORCR.js} +1 -1
  109. package/dist/{chunk-BZV4K6GR.js → chunk-RPJ2GC3K.js} +20 -20
  110. package/dist/{chunk-PBMZJXSZ.js → chunk-S4J4B7LY.js} +5 -5
  111. package/dist/{chunk-HVX37PKU.js → chunk-SEXLHFMR.js} +1 -1
  112. package/dist/{chunk-NWP6IJYK.js → chunk-TANR67XF.js} +2 -2
  113. package/dist/{chunk-4F3IKYUO.js → chunk-TOVHLONK.js} +6 -6
  114. package/dist/{chunk-JOIWDQRJ.js → chunk-TRD22FC7.js} +6 -6
  115. package/dist/{chunk-YGZMD6TZ.js → chunk-TTY62G5D.js} +16 -16
  116. package/dist/{chunk-B55IXYDR.js → chunk-TZHWF3P5.js} +2 -2
  117. package/dist/{chunk-IAQC775L.js → chunk-UZ3CZQA4.js} +1 -1
  118. package/dist/chunk-WAZTGEMG.js +1 -0
  119. package/dist/{chunk-V4KQUOUP.js → chunk-WKRFD4E4.js} +8 -8
  120. package/dist/{chunk-PDXD6DT7.js → chunk-WME5DFB6.js} +1 -1
  121. package/dist/{chunk-OSA24YH6.js → chunk-WSPO4N72.js} +14 -14
  122. package/dist/{chunk-3C67XRVJ.js → chunk-XB2YPUKR.js} +8 -8
  123. package/dist/{chunk-VB7Z3HXO.js → chunk-XDDTFV32.js} +1 -1
  124. package/dist/{chunk-XC55NMXR.js → chunk-XNJMLHGK.js} +1 -1
  125. package/dist/{chunk-UQBPKZUR.js → chunk-XZL3HCWH.js} +1 -1
  126. package/dist/{chunk-CRYEG7OT.js → chunk-YBB56N6X.js} +1 -1
  127. package/dist/{chunk-FRPNTDP4.js → chunk-ZNCU3UIW.js} +4 -4
  128. package/dist/{chunk-ZOSIPTXM.js → chunk-ZNXBKFV7.js} +5 -5
  129. package/dist/{chunk-RCMP37VO.js → chunk-ZRHQGFO5.js} +3 -3
  130. package/dist/{chunk-MEFXMUWI.js → chunk-ZXSMSVLU.js} +3 -3
  131. package/dist/data/ListLoadError.js +1 -1
  132. package/dist/format/index.js +1 -1
  133. package/dist/forms/BorderInput.js +1 -1
  134. package/dist/forms/BrandAssetEditor.js +1 -1
  135. package/dist/forms/Calendar.js +1 -1
  136. package/dist/forms/ColorPicker.js +1 -1
  137. package/dist/forms/ComposerAttachments.js +1 -1
  138. package/dist/forms/CornersInput.js +1 -1
  139. package/dist/forms/DatePicker.js +1 -1
  140. package/dist/forms/DateRangePicker.js +1 -1
  141. package/dist/forms/DisplayChips.js +1 -1
  142. package/dist/forms/FilePicker.js +1 -1
  143. package/dist/forms/IconPicker.js +1 -1
  144. package/dist/forms/InputNumber.js +1 -1
  145. package/dist/forms/LinkPicker.js +1 -1
  146. package/dist/forms/MediaLibrary.js +1 -1
  147. package/dist/forms/MediaUploadField.js +1 -1
  148. package/dist/forms/MediaUploadGrid.js +1 -1
  149. package/dist/forms/MediaUsedInList.js +1 -1
  150. package/dist/forms/PositionInput.js +1 -1
  151. package/dist/forms/Select.js +1 -1
  152. package/dist/forms/SidesInput.js +1 -1
  153. package/dist/forms/Slider.js +1 -1
  154. package/dist/forms/Snippet.js +1 -1
  155. package/dist/forms/SplitButton.js +1 -1
  156. package/dist/forms/TagInput.js +1 -1
  157. package/dist/forms/TextToolbar.js +1 -1
  158. package/dist/forms/WidthsBar.js +1 -1
  159. package/dist/forms/mediaLibraryMenu.js +1 -1
  160. package/dist/forms/textAlign.js +1 -1
  161. package/dist/icons/index.js +1 -1
  162. package/dist/index.js +136 -136
  163. package/dist/map/index.js +6 -6
  164. package/dist/markdown/index.js +1 -1
  165. package/dist/page-tabs/index.js +5 -5
  166. package/dist/pdf/index.js +1 -1
  167. package/dist/shell/Accordion.js +1 -1
  168. package/dist/shell/AppUpdateBanner.js +1 -1
  169. package/dist/shell/Banner.js +1 -1
  170. package/dist/shell/Breadcrumbs.js +1 -1
  171. package/dist/shell/ColoredBadge.js +1 -1
  172. package/dist/shell/ConfirmDialog.js +1 -1
  173. package/dist/shell/ContextMenu.js +1 -1
  174. package/dist/shell/Dialog.d.ts +2 -2
  175. package/dist/shell/Dialog.js +1 -1
  176. package/dist/shell/Drawer.d.ts +2 -2
  177. package/dist/shell/Drawer.js +1 -1
  178. package/dist/shell/DropdownMenu.js +1 -1
  179. package/dist/shell/EmptyState.js +1 -1
  180. package/dist/shell/HelpCenter.js +1 -1
  181. package/dist/shell/ImageLightbox.js +1 -1
  182. package/dist/shell/LanguageSelect.js +1 -1
  183. package/dist/shell/Markdown.js +1 -1
  184. package/dist/shell/PageHeader.js +1 -1
  185. package/dist/shell/PopupMenu.js +1 -1
  186. package/dist/shell/ProductionTimeline.js +1 -1
  187. package/dist/shell/Result.js +1 -1
  188. package/dist/shell/SearchableSelect.js +1 -1
  189. package/dist/shell/SettingReset.js +1 -1
  190. package/dist/shell/SettingRow.js +1 -1
  191. package/dist/shell/SidebarLayout.js +1 -1
  192. package/dist/shell/SidebarNav.js +1 -1
  193. package/dist/shell/SortableList.js +1 -1
  194. package/dist/shell/StepChain.js +1 -1
  195. package/dist/shell/Stepper.js +1 -1
  196. package/dist/shell/TopNav.js +1 -1
  197. package/dist/shell/Tree.js +1 -1
  198. package/dist/telemetry/index.js +1 -1
  199. package/dist/templates/AuthScreen.js +1 -1
  200. package/dist/templates/ChatTemplate.js +1 -1
  201. package/dist/templates/CheckoutTemplate.js +1 -1
  202. package/dist/templates/DashboardTemplate.js +1 -1
  203. package/dist/templates/DataTablePage.js +1 -1
  204. package/dist/templates/EmailTemplate.js +1 -1
  205. package/dist/templates/FormLayoutPage.js +1 -1
  206. package/dist/ui/index.js +1 -1
  207. package/dist/version.js +1 -1
  208. package/package.json +1 -1
  209. package/dist/Calculator-4JDJKSA7.js +0 -29
  210. package/dist/CurrencyConverter-S7LG5PMX.js +0 -21
  211. package/dist/Notepad-VQ66RWLT.js +0 -25
  212. package/dist/PdfViewer-67VBUIRD.js +0 -1
  213. package/dist/Sidebar-YB4OVUG5.js +0 -43
  214. package/dist/Spreadsheet-4KXRJSHT.js +0 -37
  215. package/dist/Stock-VNFYS73L.js +0 -16
  216. package/dist/chunk-3JJFBUK6.js +0 -3
  217. package/dist/chunk-57SJKYA4.js +0 -29
  218. package/dist/chunk-AS4CTEZD.js +0 -8
  219. package/dist/chunk-HSOREHQB.js +0 -1
  220. package/dist/chunk-JJXFPGX4.js +0 -6
  221. package/dist/chunk-LYYR5DSP.js +0 -14
  222. package/dist/chunk-RERNKFEW.js +0 -19
  223. package/dist/chunk-W7S56JZ7.js +0 -7
  224. package/dist/chunk-YCQVEJOT.js +0 -3
  225. package/dist/chunk-YW2DH6YQ.js +0 -8
@@ -1 +1 @@
1
- export{DashboardTemplate as default}from"../chunk-B2XDNBR3.js";import"../chunk-MMFJBWJC.js";import"../chunk-VU6VPKM3.js";import"../chunk-CKCDGSTC.js";import"../chunk-NID6MGGC.js";import"../chunk-VFC6QUEN.js";import"../chunk-W5M6P4DZ.js";import"../chunk-465RRWBY.js";import"../chunk-Y4MI6NRI.js";import"../chunk-CNYAHYE6.js";import"../chunk-D323R2FT.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-RSO67DWS.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
1
+ export{DashboardTemplate as default}from"../chunk-L3G3YHVN.js";import"../chunk-MMFJBWJC.js";import"../chunk-VU6VPKM3.js";import"../chunk-CKCDGSTC.js";import"../chunk-NID6MGGC.js";import"../chunk-VFC6QUEN.js";import"../chunk-ETF7LAYZ.js";import"../chunk-465RRWBY.js";import"../chunk-Y4MI6NRI.js";import"../chunk-CNYAHYE6.js";import"../chunk-D323R2FT.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-I4VD5D43.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{DataTablePage as default}from"../chunk-MEFXMUWI.js";import"../chunk-VU6VPKM3.js";import"../chunk-RERNKFEW.js";import"../chunk-EO5RLFRX.js";import"../chunk-UQBPKZUR.js";import"../chunk-GX2GSDJP.js";import"../chunk-L65BESIE.js";import"../chunk-M5P6A7KS.js";import"../chunk-PF3ANJFI.js";import"../chunk-UGTRSRIW.js";import"../chunk-D323R2FT.js";import"../chunk-QR4RM7PO.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";import"../chunk-KIBL6M3T.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
2
+ export{DataTablePage as default}from"../chunk-ZXSMSVLU.js";import"../chunk-VU6VPKM3.js";import"../chunk-2PWZNFFP.js";import"../chunk-EO5RLFRX.js";import"../chunk-XZL3HCWH.js";import"../chunk-L65BESIE.js";import"../chunk-M5P6A7KS.js";import"../chunk-GX2GSDJP.js";import"../chunk-PF3ANJFI.js";import"../chunk-UGTRSRIW.js";import"../chunk-D323R2FT.js";import"../chunk-QR4RM7PO.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-2SHYR3RA.js";import"../chunk-J75ZT2JQ.js";import"../chunk-VH6GB73Q.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{EmailTemplate as default}from"../chunk-GIM2422N.js";import"../chunk-KKSW5IZ7.js";import"../chunk-QWK6DRSN.js";import"../chunk-KZHPX4FM.js";import"../chunk-MMFJBWJC.js";import"../chunk-UGTRSRIW.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";import"../chunk-KIBL6M3T.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
2
+ export{EmailTemplate as default}from"../chunk-4HCRZHIX.js";import"../chunk-PCKYNZ5Y.js";import"../chunk-QWK6DRSN.js";import"../chunk-KZHPX4FM.js";import"../chunk-MMFJBWJC.js";import"../chunk-UGTRSRIW.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-2SHYR3RA.js";import"../chunk-J75ZT2JQ.js";import"../chunk-VH6GB73Q.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{FormLayoutPage as default}from"../chunk-4C4SQ4YW.js";import"../chunk-VU6VPKM3.js";import"../chunk-NI5FXWK5.js";import"../chunk-RERNKFEW.js";import"../chunk-EO5RLFRX.js";import"../chunk-UQBPKZUR.js";import"../chunk-GX2GSDJP.js";import"../chunk-L65BESIE.js";import"../chunk-MVQBVPWP.js";import"../chunk-CGZBDI6C.js";import"../chunk-7PCI6AUU.js";import"../chunk-PF3ANJFI.js";import"../chunk-UGTRSRIW.js";import"../chunk-QR4RM7PO.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";import"../chunk-KIBL6M3T.js";import"../chunk-J75ZT2JQ.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
2
+ export{FormLayoutPage as default}from"../chunk-EM6BEHAD.js";import"../chunk-VU6VPKM3.js";import"../chunk-NI5FXWK5.js";import"../chunk-2PWZNFFP.js";import"../chunk-EO5RLFRX.js";import"../chunk-XZL3HCWH.js";import"../chunk-MVQBVPWP.js";import"../chunk-L65BESIE.js";import"../chunk-CGZBDI6C.js";import"../chunk-7PCI6AUU.js";import"../chunk-GX2GSDJP.js";import"../chunk-PF3ANJFI.js";import"../chunk-UGTRSRIW.js";import"../chunk-QR4RM7PO.js";import"../chunk-4IU5BSVE.js";import"../chunk-K7U4RWXJ.js";import"../chunk-2SHYR3RA.js";import"../chunk-J75ZT2JQ.js";import"../chunk-VH6GB73Q.js";import"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import"../chunk-KJRYEKQP.js";export{EmailTemplate}from"../chunk-GIM2422N.js";export{ErrorBoundary}from"../chunk-BSNWVZHW.js";export{ErrorPage}from"../chunk-IHQX4GYD.js";export{FormLayoutPage}from"../chunk-4C4SQ4YW.js";export{GalleryTemplate}from"../chunk-TW7TA2AB.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-MVP6Q6KV.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-ZT5Y5JZB.js";export{ChatTemplate}from"../chunk-LCM5U6BY.js";export{CheckoutTemplate}from"../chunk-T5SEGUCJ.js";export{DashboardTemplate}from"../chunk-B2XDNBR3.js";export{DataTablePage}from"../chunk-MEFXMUWI.js";export{TopNav}from"../chunk-4AAGZQX7.js";export{Stepper}from"../chunk-GI7FOLDX.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-SXSMIMFY.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-CZ25A5RS.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-KKSW5IZ7.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-PNQ4EYYM.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-4F3IKYUO.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-D2AUUIKG.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-Y2D2YMFY.js";export{ResizeHandle}from"../chunk-KZHPX4FM.js";export{SettingReset}from"../chunk-PDXD6DT7.js";export{SettingRow}from"../chunk-BUGAWNOC.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-LEC4SZIV.js";export{MetricBar}from"../chunk-BI6ZLD4X.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-RYBJ6MMM.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-BOBUSE33.js";import"../chunk-SURSVJA2.js";export{TimelineTrack}from"../chunk-DZNG34DC.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{PageHeader}from"../chunk-ERMZ75FO.js";export{EmptyValue}from"../chunk-64WSMLXG.js";export{FloatingBar}from"../chunk-EIUCHQI2.js";export{GlobalSearch,openGlobalSearch}from"../chunk-K7KQDPLW.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-WQNIXV4T.js";export{IconRail,IconRailButton}from"../chunk-UVUBZL7K.js";import"../chunk-FQEALPZJ.js";export{Divider}from"../chunk-DFOFEBYX.js";export{EditableGrid}from"../chunk-2RBWQVDC.js";export{Avatar,AvatarGroup}from"../chunk-MMFJBWJC.js";export{BudgetBar,budgetState}from"../chunk-MEYYQC43.js";export{Card,StatCard}from"../chunk-VU6VPKM3.js";export{ContainerFillChart}from"../chunk-EZ3BQ6PK.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-QQCHLRKG.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-MXHEREC6.js";export{CountBadge}from"../chunk-MAOJENIB.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-IZCODCSC.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-5DFKPSJQ.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{WidthsBar}from"../chunk-USYNZGY4.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{Snippet}from"../chunk-YSFLXPUS.js";export{SplitButton_default as SplitButton}from"../chunk-3JJFBUK6.js";export{Switch_default as Switch}from"../chunk-BWIX3YIH.js";export{TagInput}from"../chunk-AS4CTEZD.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-JJXFPGX4.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-QDOTMA3W.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-2UXAI77F.js";export{PositionInput}from"../chunk-CRYEG7OT.js";export{RadioGroup}from"../chunk-TZSPJIP4.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-VB7Z3HXO.js";export{Slider,SliderGroup}from"../chunk-PBMZJXSZ.js";export{LinkPicker,TextLinkField}from"../chunk-LYYR5DSP.js";export{SearchableSelect}from"../chunk-DGLCMYSQ.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary}from"../chunk-57SJKYA4.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-G433MKIN.js";import"../chunk-3PGK3VFS.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-KDZUWQEG.js";export{ImageLightbox,lightboxKind}from"../chunk-RGBX3EVC.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-YW2DH6YQ.js";export{Breadcrumbs}from"../chunk-WJ3XSJ6B.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{mediaLibraryMenu}from"../chunk-7CFH6Y4T.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-DFDDRKIJ.js";import"../chunk-5PY4H4ZJ.js";export{DropdownMenu}from"../chunk-W7S56JZ7.js";export{NativeSelect,Select_default as Select}from"../chunk-RERNKFEW.js";import"../chunk-EO5RLFRX.js";import"../chunk-UQBPKZUR.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-V4KQUOUP.js";export{MediaUsedInList}from"../chunk-EZGY6CFN.js";export{NumericKeypad}from"../chunk-SBHFEWR6.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-ET32NQHX.js";export{FilePicker_default as FilePicker}from"../chunk-NWP6IJYK.js";export{FormErrorSummary}from"../chunk-4VLKDANH.js";export{IconPicker}from"../chunk-RUQEB2ZC.js";export{Input_default as Input}from"../chunk-GX2GSDJP.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-UB4BTRSB.js";export{CornersInput}from"../chunk-RCMP37VO.js";export{DatePicker_default as DatePicker}from"../chunk-3C67XRVJ.js";export{DateRangePicker,toISODate}from"../chunk-BZV4K6GR.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-OFHCDTJM.js";export{DisplayChips}from"../chunk-NFR4QZL2.js";export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{AlignmentGrid}from"../chunk-7DKPJUGU.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-3J5QUHPO.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-FFJVCLGH.js";export{Popover}from"../chunk-RNBM5JZI.js";export{InputNumber_default as InputNumber}from"../chunk-CPXHU3Y2.js";export{useInSettingRow,useSettingAuto,useSettingRowName}from"../chunk-L65BESIE.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{BrandAssetEditor}from"../chunk-JOIWDQRJ.js";export{MediaUploadField}from"../chunk-JCMP5KMS.js";export{FormField}from"../chunk-MVQBVPWP.js";export{ImageFocusPoint}from"../chunk-GATKJSGL.js";export{mediaFileName}from"../chunk-DTSCO7VM.js";export{TransferProgress}from"../chunk-S7VSXUKS.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-YDYDR72S.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{Segmented}from"../chunk-N6DTTOB6.js";import"../chunk-4G5VLI7E.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-3V5Z2BJY.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{DataTable}from"../chunk-2NMT3Y5H.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-D7FT2PXG.js";export{ListFooter}from"../chunk-Q3OCGLW7.js";export{ListLoadError}from"../chunk-H3BC4KDE.js";export{Pagination}from"../chunk-M5P6A7KS.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-FRPNTDP4.js";export{StatTile}from"../chunk-Y5T257HX.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-JPP7UWQA.js";export{TreemapChart}from"../chunk-6NMDKOQA.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-Z2YGQBLZ.js";export{HistogramChart}from"../chunk-BIYL7CEI.js";export{Meter}from"../chunk-E5ALJIXV.js";export{PieChart}from"../chunk-NID6MGGC.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DITCVBR7.js";export{RadialBarChart}from"../chunk-4CFOKYVR.js";export{RangeChart}from"../chunk-ZOSIPTXM.js";export{RankedBars}from"../chunk-WYN5KVU4.js";export{SankeyChart}from"../chunk-CRLSG5AY.js";export{ChordChart}from"../chunk-DODH46ZQ.js";import"../chunk-CDRXZBVR.js";export{FunnelChart}from"../chunk-X6PPP6NX.js";export{HeatmapChart}from"../chunk-3WC6ITJ3.js";export{StepChain,StepChainItem}from"../chunk-SAKHGHF5.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-37JDUDCO.js";export{Textarea_default as Textarea}from"../chunk-7PCI6AUU.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ContextMenu,useContextMenu}from"../chunk-AX7KPMDV.js";export{Banner}from"../chunk-WTY3SXO7.js";import"../chunk-B55IXYDR.js";export{IconButton_default as IconButton}from"../chunk-4CANQ3B3.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-PF3ANJFI.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-TFMC2WAS.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{TimeSeriesChart}from"../chunk-OSA24YH6.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-BRHIRE4D.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-W5M6P4DZ.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-Y4MI6NRI.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-HVX37PKU.js";import"../chunk-5A7MWTXX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-Y53KNQKL.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-ZN3O2KJ7.js";export{Dialog}from"../chunk-YCQVEJOT.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-4NXMMWL6.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{ColoredBadge}from"../chunk-XWLWG4HS.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-D323R2FT.js";export{VERSION}from"../chunk-HSOREHQB.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-PJCVNFWM.js";import"../chunk-QR4RM7PO.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";export{Button_default as Button}from"../chunk-4IU5BSVE.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7U4RWXJ.js";import"../chunk-VH6GB73Q.js";export{Icon}from"../chunk-KIBL6M3T.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";export{Tooltip}from"../chunk-22S6LG6D.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{BoxPlotChart}from"../chunk-EYX6KLCZ.js";export{CandlestickChart}from"../chunk-LBLV64XG.js";export{ChartTooltip}from"../chunk-P5BOTIJU.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-RSO67DWS.js";import"../chunk-MG7A3R75.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{ChartBrush}from"../chunk-EYKUKN32.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
2
+ import"../chunk-KJRYEKQP.js";export{EmailTemplate}from"../chunk-4HCRZHIX.js";export{ErrorBoundary}from"../chunk-BSNWVZHW.js";export{ErrorPage}from"../chunk-IHQX4GYD.js";export{FormLayoutPage}from"../chunk-EM6BEHAD.js";export{GalleryTemplate}from"../chunk-TW7TA2AB.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-MVP6Q6KV.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-P42YNSKI.js";export{ChatTemplate}from"../chunk-CCPNMYCK.js";export{CheckoutTemplate}from"../chunk-7ACSSYEZ.js";export{DashboardTemplate}from"../chunk-L3G3YHVN.js";export{DataTablePage}from"../chunk-ZXSMSVLU.js";export{TopNav}from"../chunk-IHEEJO5S.js";export{Stepper}from"../chunk-ACW3J77L.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-SXSMIMFY.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-CZ25A5RS.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-PCKYNZ5Y.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-5YELPBUT.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-TOVHLONK.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-D2AUUIKG.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-6ANFVX4M.js";export{ResizeHandle}from"../chunk-KZHPX4FM.js";export{SettingReset}from"../chunk-WME5DFB6.js";export{SettingRow}from"../chunk-JVIOAZHW.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-EVB35JP5.js";export{MetricBar}from"../chunk-BI6ZLD4X.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-RYBJ6MMM.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-BOBUSE33.js";import"../chunk-SURSVJA2.js";export{TimelineTrack}from"../chunk-DZNG34DC.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{PageHeader}from"../chunk-AF7R2MV4.js";export{EmptyValue}from"../chunk-64WSMLXG.js";export{FloatingBar}from"../chunk-EIUCHQI2.js";export{GlobalSearch,openGlobalSearch}from"../chunk-K7KQDPLW.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-IUCIYWTT.js";export{IconRail,IconRailButton}from"../chunk-UVUBZL7K.js";import"../chunk-FQEALPZJ.js";export{Divider}from"../chunk-DFOFEBYX.js";export{EditableGrid}from"../chunk-2RBWQVDC.js";export{Avatar,AvatarGroup}from"../chunk-MMFJBWJC.js";export{BudgetBar,budgetState}from"../chunk-MEYYQC43.js";export{Card,StatCard}from"../chunk-VU6VPKM3.js";export{ContainerFillChart}from"../chunk-EZ3BQ6PK.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-QQCHLRKG.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-4MO375G3.js";export{CountBadge}from"../chunk-MAOJENIB.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-FTKKGGOQ.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-5DFKPSJQ.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TagInput}from"../chunk-JBQWR4SX.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-HMHL27AU.js";export{TEXT_ALIGNS,TEXT_ALIGN_FIT,TEXT_ALIGN_ICONS,textAlignFit,textAlignOptions,textAlignWords}from"../chunk-64ZHCEZN.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-2UXAI77F.js";export{WidthsBar}from"../chunk-MICWRC72.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-XDDTFV32.js";export{Slider,SliderGroup}from"../chunk-S4J4B7LY.js";export{Snippet}from"../chunk-NUSSZJF2.js";export{SplitButton_default as SplitButton}from"../chunk-NKZNPYDB.js";export{Switch_default as Switch}from"../chunk-BWIX3YIH.js";export{NumericKeypad}from"../chunk-SBHFEWR6.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-ET32NQHX.js";export{PositionInput}from"../chunk-YBB56N6X.js";export{RadioGroup}from"../chunk-TZSPJIP4.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{IconPicker}from"../chunk-R4C3GGCS.js";export{LinkPicker,TextLinkField}from"../chunk-DIN3EFOM.js";export{SearchableSelect}from"../chunk-5N5DBTTF.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{MEDIA_FILES_DRAG_TYPE,MEDIA_FOLDER_DRAG_TYPE,MediaLibrary}from"../chunk-2EOQDYGM.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-2U2GJCSP.js";import"../chunk-3PGK3VFS.js";export{MarqueeBox}from"../chunk-IC72MGON.js";export{EmptyState}from"../chunk-M2KV4WKR.js";export{ImageLightbox,lightboxKind}from"../chunk-O2YAB6WK.js";export{LIGHTBOX_PICTURE_FIT,ZoomableImage}from"../chunk-CGUMJZUB.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Drawer}from"../chunk-JE6TBZGY.js";export{Breadcrumbs}from"../chunk-EBC4XFL2.js";export{mediaLibraryMenu}from"../chunk-2F7ZOMKK.js";export{mediaMoveItems,mediaMoveSubmenu,useMediaMoveItems}from"../chunk-DFDDRKIJ.js";import"../chunk-5PY4H4ZJ.js";export{DropdownMenu}from"../chunk-5FCEBKT2.js";export{FULL_BADGE_TILE_PX,MediaUploadGrid}from"../chunk-WKRFD4E4.js";export{MediaUsedInList}from"../chunk-GK3QH63P.js";export{NativeSelect,Select_default as Select}from"../chunk-2PWZNFFP.js";import"../chunk-EO5RLFRX.js";import"../chunk-XZL3HCWH.js";export{CornersInput}from"../chunk-ZRHQGFO5.js";export{DatePicker_default as DatePicker}from"../chunk-XB2YPUKR.js";export{DateRangePicker,toISODate}from"../chunk-RPJ2GC3K.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-OFHCDTJM.js";export{DisplayChips}from"../chunk-BHMUOWAE.js";export{FilePicker_default as FilePicker}from"../chunk-TANR67XF.js";export{FormErrorSummary}from"../chunk-4VLKDANH.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-OFKWTOXK.js";export{BrandAssetEditor}from"../chunk-TRD22FC7.js";export{MediaUploadField}from"../chunk-EZY4CO4A.js";export{ImageFocusPoint}from"../chunk-GATKJSGL.js";export{FormField}from"../chunk-MVQBVPWP.js";export{Segmented}from"../chunk-N6DTTOB6.js";import"../chunk-4G5VLI7E.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-RB2F65YJ.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-G2MJTE6X.js";export{Popover}from"../chunk-RNBM5JZI.js";export{InputNumber_default as InputNumber}from"../chunk-HAIMJAI4.js";export{useInSettingRow,useSettingAuto,useSettingRowName}from"../chunk-L65BESIE.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-BYCOB6WT.js";export{mediaFileName}from"../chunk-FMKTVZAO.js";export{TransferProgress}from"../chunk-S7VSXUKS.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-YDYDR72S.js";export{slugify}from"../chunk-24AL3CDS.js";export{escapeHtml}from"../chunk-G6DKCCWH.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{useGridSelection}from"../chunk-VLKDWKVR.js";export{MARQUEE_IGNORE,marqueeHits,rectsIntersect,useMarquee}from"../chunk-OLFYNMTD.js";export{edgeScrollDelta,getScrollParent,scrollBoundsOf}from"../chunk-LACL4MAR.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-CUZQVBPC.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{contrastRatio,hexToHsv,hexToRgb,hsvToHex,parseHexColor,readableInk,relativeLuminance}from"../chunk-S6OB6HJB.js";export{AlignmentGrid}from"../chunk-7DKPJUGU.js";export{DataTable}from"../chunk-2NMT3Y5H.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-D7FT2PXG.js";export{ListFooter}from"../chunk-Q3OCGLW7.js";export{ListLoadError}from"../chunk-M2LLVSBR.js";export{Pagination}from"../chunk-M5P6A7KS.js";export{WaterfallChart}from"../chunk-2C6IG7LG.js";export{SankeyChart}from"../chunk-CRLSG5AY.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-ZNCU3UIW.js";export{StatTile}from"../chunk-Y5T257HX.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-JPP7UWQA.js";export{TreemapChart}from"../chunk-6NMDKOQA.js";export{squarify}from"../chunk-46BYGPGD.js";export{HeatmapChart}from"../chunk-H33Z4ZIY.js";export{HistogramChart}from"../chunk-IFDW5QW6.js";export{Meter}from"../chunk-E5ALJIXV.js";export{PieChart}from"../chunk-NID6MGGC.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DITCVBR7.js";export{RadialBarChart}from"../chunk-4CFOKYVR.js";export{RangeChart}from"../chunk-ZNXBKFV7.js";export{RankedBars}from"../chunk-WYN5KVU4.js";export{ChordChart}from"../chunk-DODH46ZQ.js";import"../chunk-CDRXZBVR.js";export{FunnelChart}from"../chunk-X6PPP6NX.js";export{StepChain,StepChainItem}from"../chunk-MC43PRTL.js";export{Markdown,Markdown as MarkdownLite,plainCell,tableToCsv}from"../chunk-ECCUEG3J.js";export{Textarea_default as Textarea}from"../chunk-7PCI6AUU.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{ContextMenu,useContextMenu}from"../chunk-JDKRQG7X.js";export{Banner}from"../chunk-MY755PTJ.js";import"../chunk-TZHWF3P5.js";export{Input_default as Input}from"../chunk-GX2GSDJP.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-PF3ANJFI.js";export{IconButton_default as IconButton}from"../chunk-4CANQ3B3.js";export{CHART_SPEC_LIMITS,parseChartSpec}from"../chunk-CR7T435F.js";export{SpecChart}from"../chunk-BKZGI76S.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{TimeSeriesChart}from"../chunk-WSPO4N72.js";export{ChartBrush}from"../chunk-EYKUKN32.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-BRHIRE4D.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-ETF7LAYZ.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-Y4MI6NRI.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-SEXLHFMR.js";import"../chunk-5A7MWTXX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-Y53KNQKL.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-MOD4PGVF.js";export{Dialog}from"../chunk-F2AEP37B.js";import"../chunk-4AJRHTTB.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-4NXMMWL6.js";export{ColoredBadge}from"../chunk-4GVH4ZUH.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-D323R2FT.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{VERSION}from"../chunk-WAZTGEMG.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-FKZEGBLK.js";export{MENU_ON_MEDIA_ATTR,leavesContextMenuAlone}from"../chunk-5QFPTDQF.js";import"../chunk-QR4RM7PO.js";export{Button_default as Button}from"../chunk-4IU5BSVE.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7U4RWXJ.js";export{Icon}from"../chunk-2SHYR3RA.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";import"../chunk-VH6GB73Q.js";export{LoadingSpinner,SpinnerRing}from"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";import"../chunk-6KO5VTL7.js";export{Tooltip}from"../chunk-22S6LG6D.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-37CCKGHU.js";export{CandlestickChart}from"../chunk-JUGPTBMS.js";export{ChartTooltip}from"../chunk-P5BOTIJU.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-I4VD5D43.js";import"../chunk-MG7A3R75.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-E6UCGCOC.js";import"../chunk-C3QOHMR6.js";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export{APP_VERSION,VERSION}from"./chunk-HSOREHQB.js";
1
+ export{APP_VERSION,VERSION}from"./chunk-WAZTGEMG.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "8.34.0",
3
+ "version": "8.35.1",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-KNVE7CMS.js";import{useWidgetSettings as n}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[N,j]=c(!1),[y,C]=c(""),[x,f]=c([]),[v,$]=c(!1),[W,T]=c(()=>e(h)),[E,w]=c(!1),[J,K]=c(W),L=i(null);n(l(()=>{K({...W}),w(!0)},[W]));const S=l(e=>{C(""),k(t=>N||"0"===t?(j(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),Q=l(()=>{k("0"),d(null),g(null),j(!1)},[]),R=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),U=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!N){const e=R(p,t,b);k(String(e)),d(e),f(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),j(!0)},[m,p,b,N,R]),V=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=R(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),C(n),k(String(t)),d(null),g(null),j(!0)},[m,p,b,R]),D=l(()=>{k(e=>String(parseFloat(e)/100))},[]),F=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?S(e.key):"."===e.key?S("."):"+"===e.key?U("+"):"-"===e.key?U("-"):"*"===e.key?U("×"):"/"===e.key?(e.preventDefault(),U("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&L.current?.contains(e.target)&&e.preventDefault(),V()):"Escape"===e.key?Q():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&D())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[S,U,V,Q,D]);const G="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",M=`${G} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,O=`${G} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,A=`${G} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,B=`${G} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return s(a,{children:[
3
- /* @__PURE__ */s("div",{ref:L,className:"flex flex-col h-full",style:{opacity:W.activeOpacity/100,backdropFilter:W.activeBlur>0?`blur(${W.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */s("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:x.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${N?"":m}`}),
6
- /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
- /* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:Q,className:A,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:F,className:A,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:D,className:A,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>U("÷"),className:`${O} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>S("7"),className:M,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>S("8"),className:M,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>S("9"),className:M,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>U("×"),className:`${O} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>S("4"),className:M,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>S("5"),className:M,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>S("6"),className:M,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>U("-"),className:`${O} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>S("1"),className:M,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>S("2"),className:M,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>S("3"),className:M,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>U("+"),className:`${O} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>S("0"),className:`${M} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>S("."),className:M,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:V,className:B,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:E,onClose:()=>w(!1),title:"Calculator Settings",appearance:J,onAppearanceChange:K,onSave:()=>{T(J),localStorage.setItem(h,JSON.stringify(J)),w(!1)}})]})}export{m as default};
@@ -1,21 +0,0 @@
1
- import{loadAppearance as t,WidgetSettingsModal as e}from"./chunk-KNVE7CMS.js";import{useWidgetSettings as r}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as a,useEffect as o}from"react";import{jsxs as c,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function g(t){try{const e=JSON.parse(localStorage.getItem(d)||"{}")[t];if(e&&Date.now()-e.timestamp<36e5)return e.rates}catch{}return null}function k(t,e){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[t]={rates:e,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function N(){try{const t=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(t)&&t.length)return t.slice(0,4)}catch{}return u}var f={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function j(){const[u,d]=s(N),[j,y]=s(()=>t(h)),[x,b]=s({}),[S,D]=s(!1),[C,v]=s(!1),[U,J]=s([]),[R,K]=s(j),[L,W]=s("USD"),[B,G]=s("CNY");r(a(()=>{J([...u]),K({...j}),v(!0)},[u,j])),o(()=>{const t=[...new Set(u.map(([t])=>t))];let e=!0;return async function(){D(!0);const r={};for(const e of t){const t=g(e);if(t)r[e]=t;else try{const t=await fetch(`https://open.er-api.com/v6/latest/${e}`),n=await t.json();n.rates&&(r[e]=n.rates,k(e,n.rates))}catch{}}e&&(b(r),D(!1))}(),()=>{e=!1}},[u]);/* @__PURE__ */
2
- return c(i,{children:[
3
- /* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${j.activeOpacity/100})`,backdropFilter:j.activeBlur>0?`blur(${j.activeBlur}px)`:void 0},children:/* @__PURE__ */c("div",{className:"px-4 py-3 space-y-1",children:[S&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([t,e],r)=>{const n=x[t]?.[e];/* @__PURE__ */
4
- return c("button",{onClick:()=>{const t=u.map((t,e)=>e===r?[t[1],t[0]]:t);d(t),localStorage.setItem(p,JSON.stringify(t))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
5
- /* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
6
- /* @__PURE__ */l("span",{className:"text-base",children:f[t]||""}),
7
- /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:t}),
8
- /* @__PURE__ */l("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
9
- /* @__PURE__ */l("span",{className:"text-base",children:f[e]||""}),
10
- /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:e})]}),
11
- /* @__PURE__ */l("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${t}-${e}-${r}`)})]})}),
12
- /* @__PURE__ */l(e,{open:C,onClose:()=>v(!1),title:"Currency Settings",appearance:R,onAppearanceChange:K,onSave:()=>{if(0===U.length)return;const t=U.slice(0,4);d(t),y(R),localStorage.setItem(p,JSON.stringify(t)),localStorage.setItem(h,JSON.stringify(R)),v(!1)},children:/* @__PURE__ */c("div",{children:[
13
- /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Currency Pairs ",
14
- /* @__PURE__ */c("span",{className:"text-2xs font-normal text-gray-400",children:["(",U.length,"/",4,")"]})]}),
15
- /* @__PURE__ */l("div",{className:"space-y-1 mb-2",children:U.map(([t,e],r)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
16
- /* @__PURE__ */c("span",{className:"text-sm",children:[f[t]||""," ",t," → ",f[e]||""," ",e]}),
17
- /* @__PURE__ */l("button",{onClick:()=>J(t=>t.filter((t,e)=>e!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),U.length<4?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
18
- /* @__PURE__ */l("select",{value:L,onChange:t=>W(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
19
- /* @__PURE__ */l("span",{className:"text-gray-400",children:"→"}),
20
- /* @__PURE__ */l("select",{value:B,onChange:t=>G(t.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(t=>/* @__PURE__ */l("option",{children:t},t))}),
21
- /* @__PURE__ */l("button",{onClick:()=>{L!==B&&U.length<4&&J(t=>[...t,[L,B]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-2xs text-gray-400 italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{j as default};
@@ -1,25 +0,0 @@
1
- import{getNumberingConfigs as e}from"./chunk-XC55NMXR.js";import{SidebarLayout as t}from"./chunk-KKSW5IZ7.js";import"./chunk-QWK6DRSN.js";import"./chunk-KZHPX4FM.js";import{timeAgo as r}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{AboutApp as n}from"./chunk-3BPF6PP3.js";import{useWindowManager as o,client_default as i}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import{useShellPrefs as s}from"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{toast_default as c}from"./chunk-4NXMMWL6.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-HSOREHQB.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as a}from"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useEffect as p,useState as d,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as y,jsx as g}from"react/jsx-runtime";var x=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var k={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:N,save:v}=s(),{data:j}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=l({});p(()=>{if(!j)return;const e={};for(const t of j){const r=k[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[j]);const T=N.notepad_notes||[],[_,C]=d(null),[W,S]=d(""),[X,K]=d(""),[$,R]=d("yellow"),[D,O]=d(!1),[M,P]=d(!1),Q=l(null),U=l(),J=T.find(e=>e.id===_);p(()=>{if(!_&&T.length>0){const e=T[0];C(e.id),S(e.title),K(e.content),R(e.color)}},[T.length]);const L=m(e=>{v({notepad_notes:e})},[v]),V=m(()=>{if(!_||!D)return;const e=T.map(e=>e.id===_?{...e,title:W,content:X,color:$,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);L(e),O(!1)},[_,D,W,X,$,T,L]);p(()=>{if(D)return U.current&&clearTimeout(U.current),U.current=setTimeout(V,800),()=>{U.current&&clearTimeout(U.current)}},[D,V]),p(()=>()=>{D&&V()},[]);const G=e=>{D&&V(),C(e.id),S(e.title),K(e.content),R(e.color),O(!1),P(!1)},I=e=>{const t=X.slice(0,e),r=X.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=X.slice(e+r[0].length);K(t+n+o),O(!0)},B=async(e,t)=>{const r=w.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,n):c.error(`${n} not found`)}catch{c.error(`Failed to look up ${n}`)}},E="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",F=/* @__PURE__ */h(y,{children:[
2
- /* @__PURE__ */g("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{D&&V();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...T];L(t),C(e.id),S(""),K(""),R("yellow"),O(!1),P(!0),setTimeout(()=>Q.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-blue-600 text-white px-3 min-h-8 py-1 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
3
- /* @__PURE__ */g(a,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
4
- /* @__PURE__ */g("div",{className:"flex-1 overflow-y-auto",children:0===T.length?/* @__PURE__ */g("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):T.map(e=>{const t=(n=e.color,x.find(e=>e.key===n)||x[0]);var n;/* @__PURE__ */
5
- return h("button",{onClick:()=>G(e),className:"w-full text-left px-3 py-3 border-b border-gray-100 transition-colors "+(_===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
6
- /* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */g("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
8
- /* @__PURE__ */g("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */g(a,{name:"bookmark",look:"solid",className:"h-3 w-3 text-amber-500 shrink-0"})]}),
9
- /* @__PURE__ */g("p",{className:"text-xs text-gray-400 mt-0.5 truncate ml-5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
10
- /* @__PURE__ */g("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:r(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
11
- return h("div",{className:"h-full",children:[
12
- /* @__PURE__ */g(n,{app:"notepad"}),
13
- /* @__PURE__ */g(t,{sidebar:F,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:_?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
14
- /* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
15
- /* @__PURE__ */g("input",{value:W,onChange:e=>{S(e.target.value),O(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
16
- /* @__PURE__ */g("div",{className:"flex gap-1",children:x.map(e=>/* @__PURE__ */g("button",{onClick:()=>{R(e.key),O(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${$===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
17
- /* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);L(t);const r=t.find(t=>t.id===e);c.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(_),title:J?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(J?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */g(a,{name:"bookmark",className:"h-4 w-4",fill:J?.sticky?"currentColor":"none",strokeWidth:1.5})}),
18
- /* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.filter(t=>t.id!==e);if(L(t),_===e){const e=t[0];e?G(e):(C(null),S(""),K(""))}})(_),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */g(a,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),M?/* @__PURE__ */g("textarea",{ref:Q,value:X,onChange:e=>{K(e.target.value),O(!0)},onBlur:()=>{P(!1),D&&V()},placeholder:E,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */g("div",{onClick:()=>{P(!0),setTimeout(()=>Q.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:X?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],s=/([A-Z]{2,4})#(\d{4,6})/g;let c;for(;null!==(c=s.exec(e));){const e=c[1],t=c[2];if(w.current[e]){const n=c.index,o=c[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */g("button",{onClick:()=>B(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let l=0;for(let e=0;e<r;e++)l+=t[e].length+1;for(;null!==(c=b.exec(e));){const e="x"===c[1]||"X"===c[1],t=c.index,n=l+t;i.push({idx:t,len:c[0].length,render:()=>/* @__PURE__ */g("button",{onClick:()=>I(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */g(a,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */g("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */g("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */g("span",{children:"​"},`empty-${r}`));const p=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
19
- return g("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(X):/* @__PURE__ */g("p",{className:"text-gray-300 whitespace-pre-line",children:E})}),
20
- /* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-gray-100 flex items-center gap-4 text-2xs text-gray-400",children:[
21
- /* @__PURE__ */g("span",{children:"[] checkbox"}),
22
- /* @__PURE__ */g("span",{children:"SO#35001 entity link"}),
23
- /* @__PURE__ */g("span",{className:"ml-auto",children:M?"Editing":"Click to edit"})]})]}):/* @__PURE__ */g("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
24
- /* @__PURE__ */g(a,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
25
- /* @__PURE__ */g("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-QQK3XS6H.js";import"./chunk-4NXMMWL6.js";import"./chunk-K7U4RWXJ.js";import"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";
@@ -1,43 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,RAIL_WIDTH_KEY as n,toggleOpenSection as i,writeStored as l}from"./chunk-Y65MPP3M.js";import{ResizeHandle as o}from"./chunk-KZHPX4FM.js";import{openGlobalSearch as s}from"./chunk-K7KQDPLW.js";import{partitionNav as c,flyoutGroups as d,visibleSectionItems as m,rowsContainRoute as h,visibleNavChildren as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-4CANQ3B3.js";import{RAIL_MENU_GAP as g,navSections as f,startMenuCategories as y,TAB_STRIP_H as x,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as C,navIcons as j,sectionIcons as w}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as W,PopupMenuLabel as z}from"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import{Icon as M}from"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as R,useRef as I,useEffect as K,isValidElement as T,cloneElement as H}from"react";import{jsx as P,jsxs as Q,Fragment as D}from"react/jsx-runtime";var B="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function J(e,t,a){const r=Math.max(8,a-t.bottom);return{left:e+g,bottom:r,maxHeight:a-r-8,overflowY:"auto"}}var O=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),U="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function G({open:e}){/* @__PURE__ */
2
- return P(M,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function _({dir:e}){/* @__PURE__ */
3
- return P(M,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function F({className:e}){/* @__PURE__ */
4
- return P(M,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var V=e=>.75+1.75*e+"rem";function X({width:X,collapsed:Y,onToggleCollapsed:Z,onResize:E,onHome:q,onOpen:ee,activeRoute:te,profile:ae,user:re,onLogout:ne,onSwitchToDesktop:ie,onReportBug:le,onClose:oe,navSections:se=f,navIcons:ce=j,sectionIcons:de=w,categories:me=y,productName:he,productIcon:ue,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:ge=null,logoIsLight:fe=null}){const ye=$().layout,{hasAnyPerm:xe}=e(),ke=A(()=>c(se,me,xe),[se,me,xe]),[ve,Ne]=R(()=>t(a(r))),Ce=e=>Ne(t=>{const a=i(t,e);return l(r,JSON.stringify([...a])),a}),[je,we]=R(null),[Se,Le]=R(!1),We=I(null);K(()=>{Y||we(null)},[Y]);const ze=(e,t)=>{we(null),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Me=(e,t)=>{const a=t[e];/* @__PURE__ */
5
- return P("span",{className:U,"aria-hidden":"true",children:a&&T(a)?H(a,{className:"size-[18px]"}):a})},$e=(e,t)=>{const a=u(e,xe),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ve.has(n),l=!i&&h(a,te,xe);/* @__PURE__ */
6
- return Q("div",{children:[
7
- /* @__PURE__ */Q("button",{type:"button",onClick:()=>Ce(n),"aria-expanded":i,className:O(l,!1),style:t>0?{paddingLeft:V(t)}:void 0,children:[0===t&&Me(e.to,ce),
8
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
- /* @__PURE__ */P(G,{open:i})]}),i&&/* @__PURE__ */P("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>$e(e,t+1))}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:V(t)},"aria-hidden":"true"})]},e.to)}const n=e.to===te;/* @__PURE__ */
10
- return Q("div",{children:[
11
- /* @__PURE__ */Q("button",{type:"button",onClick:t=>ze(e,t),onAuxClick:t=>{1===t.button&&ze(e,t)},"aria-current":n?"page":void 0,className:O(n,!1),style:t>0?{paddingLeft:V(t)}:void 0,children:[0===t&&Me(e.to,ce),
12
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:V(t)},"aria-hidden":"true"})]},e.to)},Ae=(e,t)=>{const a=t?e.items:m(e,xe);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */P("span",{className:U,"aria-hidden":"true",children:e.icon}):Me(e.label,de),n=e.menuLabel??e.label,i=h(a,te,xe),l="dividerAfter"in e&&e.dividerAfter;if(Y)/* @__PURE__ */
13
- return Q("div",{children:[
14
- /* @__PURE__ */P("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":je?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();we(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:O(i||je?.label===e.label,!0),children:r}),l&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return Q("div",{children:[
16
- /* @__PURE__ */Q("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:O(!o&&i,!1),children:[r,
17
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */P(G,{open:o})]}),
19
- /* @__PURE__ */P("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&a.map(e=>$e(e,1))}),l&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},Re=ae?.first_name?`${ae.first_name} ${ae.last_name||""}`.trim():re?.email||"",Ie=(ae?.first_name?.charAt(0)||re?.email?.charAt(0)||"?").toUpperCase(),Ke=ae?.avatar_url?/* @__PURE__ */P("img",{src:ae.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */P("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ie}),Te=Se?We.current?.getBoundingClientRect():void 0,He=Y?"":"px-3",Pe=Y?{paddingInline:k}:void 0,Qe=`${Y?ye.expandSidebar:ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,De=q?{run:q,label:ye.goHome,title:ye.goHome}:oe?null:{run:Z,label:Y?ye.expandSidebar:ye.collapseSidebar,title:Qe},Be=/* @__PURE__ */Q(D,{children:[ue&&/* @__PURE__ */P(p,{src:ue,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:ge,isLight:fe,size:28,decorative:!0}),!Y&&/* @__PURE__ */Q("span",{className:"min-w-0 text-left leading-tight",children:[
20
- /* @__PURE__ */P("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:he??"Apps"}),pe&&/* @__PURE__ */P("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),Je=ke.erpSections.length>0||ke.systemSections.length>0||ke.virtualSections.length>0;/* @__PURE__ */
21
- return Q("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:X},children:[
22
- /* @__PURE__ */Q("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Y?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:x},children:[De?/* @__PURE__ */P("button",{type:"button",onClick:De.run,"aria-label":De.label,title:De.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Y?"justify-center p-0.5":"-ml-1 p-1"),children:Be}):/* @__PURE__ */P("span",{className:"flex min-w-0 items-center gap-2",children:Be}),oe?/* @__PURE__ */P(b,{onClick:oe,"aria-label":ye.closeMenu,children:/* @__PURE__ */P(M,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Y&&/* @__PURE__ */P("button",{type:"button",onClick:Z,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */P(_,{dir:"left"})})]}),
23
- /* @__PURE__ */P("div",{className:`shrink-0 pt-3 ${He}`,style:Pe,children:Y?/* @__PURE__ */P("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${B?"⌘K":"Ctrl K"})`,className:O(!1,!0),children:/* @__PURE__ */P(F,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */Q("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
24
- /* @__PURE__ */P(F,{className:"size-3.5 text-gray-500"}),
25
- /* @__PURE__ */P("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ye.search}),
26
- /* @__PURE__ */P("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:B?"⌘K":"Ctrl K"})]})}),
27
- /* @__PURE__ */Q("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${He} ${Y?"space-y-1":"space-y-0.5"}`,style:Pe,children:[Y&&/* @__PURE__ */P("button",{type:"button",onClick:Z,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${B?"⌘":"Ctrl"} .)`,className:`${O(!1,!0)} mb-3`,children:/* @__PURE__ */P(_,{dir:"right"})}),ke.topItems.map(e=>{if(!Y)return $e(e,0);const t=u(e,xe),a=e.to===te||h(t,te,xe),r=e.menuLabel??e.label;/* @__PURE__ */
28
- return Q("div",{children:[
29
- /* @__PURE__ */P("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ze(e,a);const r=a.currentTarget.getBoundingClientRect();we(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:O(a,!0),children:Me(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ke.topItems.length>0&&Je&&!ke.topItems[ke.topItems.length-1].dividerAfter&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.erpSections.map(e=>Ae(e,!1)),ke.systemSections.map(e=>Ae(e,!1)),ke.virtualSections.map(e=>Ae(e,!0)),ke.footerSections.length>0&&/* @__PURE__ */P("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.footerSections.map(e=>Ae(e,!1))]}),
30
- /* @__PURE__ */P("div",{className:`shrink-0 border-t border-gray-200 py-2 ${He}`,style:Pe,children:/* @__PURE__ */Q("button",{ref:We,type:"button",onClick:()=>Le(e=>!e),"aria-haspopup":"menu","aria-expanded":Se,"aria-label":Y?ye.accountMenu(Re):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Y?"justify-center py-2":"px-2 py-2"),children:[Ke,!Y&&/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 text-left",children:[
31
- /* @__PURE__ */P("span",{className:"block truncate text-sm font-semibold text-gray-800",children:Re}),re?.email&&Re!==re.email&&/* @__PURE__ */P("span",{className:"block truncate text-2xs text-gray-500",children:re.email})]})]})}),E&&!Y&&!oe&&/* @__PURE__ */P(o,{side:"left",width:X,onResize:E,min:C,max:N,defaultWidth:v,storageKey:n,label:ye.resizeSidebar}),Se&&Te&&/* @__PURE__ */Q(S,{portal:!0,minWidth:224,onClose:()=>Le(!1),style:J(X,Te,window.innerHeight),children:[Y&&/* @__PURE__ */Q("div",{className:"border-b border-gray-200 px-3 py-3",children:[
32
- /* @__PURE__ */P("p",{className:"truncate text-sm font-semibold text-gray-800",children:Re}),re?.email&&/* @__PURE__ */P("p",{className:"truncate text-xs text-gray-500",children:re.email})]}),
33
- /* @__PURE__ */Q(L,{onClick:()=>{Le(!1),ee("/profile",!1)},children:[
34
- /* @__PURE__ */P(M,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ke.footerItems.map(e=>/* @__PURE__ */Q(L,{onClick:()=>{Le(!1),ze(e)},children:[
35
- /* @__PURE__ */P("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),le&&/* @__PURE__ */Q(L,{onClick:()=>{Le(!1),le()},children:[
36
- /* @__PURE__ */P(M,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
37
- /* @__PURE__ */P(W,{}),ie&&/* @__PURE__ */Q(D,{children:[
38
- /* @__PURE__ */Q(L,{onClick:()=>{Le(!1),ie()},children:[
39
- /* @__PURE__ */P(M,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
40
- /* @__PURE__ */P(W,{})]}),
41
- /* @__PURE__ */Q(L,{danger:!0,onClick:()=>{Le(!1),ne()},children:[
42
- /* @__PURE__ */P(M,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),je&&Y&&/* @__PURE__ */P(S,{portal:!0,minWidth:220,onClose:()=>we(null),style:{left:X+g,top:Math.min(je.top,window.innerHeight-48*Math.min(je.items.length,10)-16)},children:d(je.items,xe).map((e,t)=>/* @__PURE__ */Q("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */P(W,{}),e.heading&&/* @__PURE__ */P(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */Q(L,{onClick:()=>ze(e),children:[Me(e.to,ce),
43
- /* @__PURE__ */P("span",{className:e.to===te?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{J as accountMenuPosition,X as default};
@@ -1,37 +0,0 @@
1
- import{EditableGrid as e}from"./chunk-2RBWQVDC.js";import"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-3BPF6PP3.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-HSOREHQB.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function k(e,t){const r=e.rows?e.rows.map(e=>e.map(e=>String(e??""))):v(e.csv??"");if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function w(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const w=l(g.current?.data??null),j=(()=>{const e=g.current;if(!e)return null;const t=k(e.data,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[C,N]=s(j?[j.sheet]:[f("Sheet 1")]),[S,U]=s(0),M=l([]),D=l(C),L=l(!1);c(()=>{L.current?L.current=!1:D.current!==C&&(M.current.push(D.current),M.current.length>50&&M.current.shift()),D.current=C},[C]);const E=i(()=>{const e=M.current.pop();e&&(L.current=!0,N(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),E())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E]);const[R,K]=s(j?.title??"Untitled"),[$,A]=s(()=>g.current?.data.onEmail),V=i(e=>{const t=k(e,"Sheet 1");t&&(N([t]),U(0),K(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),A(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&V(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&V(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[W,Q]=s(!1),[B,F]=s(null),[J,T]=s(""),G=l(null),[O,H]=s("1"),[P,I]=s("10"),X=C[S]||C[0],Y=X.data,Z=X.columns,z=X.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&N(n=>n.map((n,o)=>{if(o!==S)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,S]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?z[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{N(t=>t.map((t,r)=>r===S?{...t,...e}:t))},[S]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==Z.length?se({data:e,columns:y(t)}):se({data:e})},[se,Z.length]),ie=(e,t)=>{N(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),F(null)},ue=()=>Y.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];Y.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=Y.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
2
- return u("div",{ref:m,className:"flex flex-col h-full",children:[
3
- /* @__PURE__ */d(a,{title:`${me=R||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
4
- /* @__PURE__ */d(t,{app:"spreadsheet"}),
5
- /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[W?/* @__PURE__ */d("input",{type:"text",value:R,onChange:e=>K(e.target.value),onBlur:()=>Q(!1),onKeyDown:e=>{"Enter"===e.key&&Q(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>Q(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:R||"Untitled"}),
6
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
7
- /* @__PURE__ */d("input",{ref:G,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});N(a),U(0),K(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),K(r)}G.current&&(G.current.value="")},className:"hidden"}),
8
- /* @__PURE__ */d("button",{onClick:()=>G.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
9
- /* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${R||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),$&&/* @__PURE__ */d("button",{onClick:()=>$(ue(),`${R||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
10
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
11
- /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
12
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:O,onChange:e=>H(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
13
- /* @__PURE__ */d("button",{onClick:()=>(e=>{const t=Z.length+e;se({columns:y(t),data:Y.map(t=>[...t,...Array(e).fill("")])})})(parseInt(O)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
14
- /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
15
- /* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:P,onChange:e=>I(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
16
- /* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(P)||10,void se({data:[...Y,...Array.from({length:e},()=>Array(Z.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
17
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
18
- /* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
19
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
20
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5",title:le?"":"Click a cell first",children:[
21
- /* @__PURE__ */d("button",{onClick:()=>ne("bold"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors font-bold ${ae.bold?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"B"}),
22
- /* @__PURE__ */d("button",{onClick:()=>ne("italic"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors italic ${ae.italic?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"I"}),
23
- /* @__PURE__ */d("button",{onClick:()=>ne("underline"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors underline ${ae.underline?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"U"}),
24
- /* @__PURE__ */u("select",{value:ae.fontSize??"base",onChange:e=>ne("fontSize",e.target.value),disabled:!le,className:"ml-1 text-xs border border-gray-300 rounded px-1 py-0.5 bg-white disabled:opacity-40 disabled:cursor-not-allowed",children:[
25
- /* @__PURE__ */d("option",{value:"sm",children:"XS"}),
26
- /* @__PURE__ */d("option",{value:"base",children:"S"}),
27
- /* @__PURE__ */d("option",{value:"lg",children:"M"}),
28
- /* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
29
- /* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:Z,data:Y,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:z,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
30
- /* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
31
- /* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[C.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>U(t),onDoubleClick:()=>{F(t),T(e.name)},onContextMenu:e=>{e.preventDefault(),C.length>1&&(e=>{C.length<=1||(N(t=>t.filter((t,r)=>r!==e)),S>=e&&S>0&&U(S-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===S?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:B===t?/* @__PURE__ */d("input",{type:"text",value:J,onChange:e=>T(e.target.value),onBlur:()=>ie(t,J||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,J||e.name),"Escape"===r.key&&F(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
32
- /* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${C.length+1}`;N(t=>[...t,f(e)]),U(C.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
33
- /* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
34
- /* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
35
- /* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
36
- /* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
37
- /* @__PURE__ */u("span",{children:[Y.length," × ",Z.length]})]})]})]});var me}export{w as default};
@@ -1,16 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-KNVE7CMS.js";import{useWidgetSettings as r}from"./chunk-L3NYH4QV.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-HVX37PKU.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-FL2PUQX7.js";import"./chunk-ZN3O2KJ7.js";import"./chunk-YCQVEJOT.js";import"./chunk-KC3EX26K.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-XWLWG4HS.js";import"./chunk-CDAJKLGL.js";import"./chunk-D323R2FT.js";import"./chunk-PJCVNFWM.js";import"./chunk-QR4RM7PO.js";import"./chunk-5QFPTDQF.js";import"./chunk-4IU5BSVE.js";import"./chunk-K7U4RWXJ.js";import"./chunk-VH6GB73Q.js";import"./chunk-KIBL6M3T.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-6KO5VTL7.js";import"./chunk-22S6LG6D.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-E6UCGCOC.js";import"./chunk-C3QOHMR6.js";import{useState as n,useCallback as c}from"react";import{jsxs as a,Fragment as s,jsx as i}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",l="stock_appearance",h={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},p=Object.keys(h);function u(){try{const e=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return o}var d=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function g(){const[o,g]=n(u),[x,k]=n(()=>e(l)),[y,j]=n(!1),[N,b]=n([]),[f,v]=n(x),[C,S]=n(""),A=c(()=>{b([...o]),v({...x}),S(""),j(!0)},[o,x]);r(A);const L=()=>{const e=C.trim().toUpperCase();!e||N.includes(e)||N.length>=8||(b(t=>[...t,e]),S(""))},D=p.filter(e=>!N.includes(e));/* @__PURE__ */
2
- return a(s,{children:[
3
- /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${x.activeOpacity/100})`,backdropFilter:x.activeBlur>0?`blur(${x.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:o.map(e=>{const t=h[e],r=(t?.change??0)>=0,n=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
4
- return a("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
5
- /* @__PURE__ */i("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:e}),t?/* @__PURE__ */a("div",{className:"flex flex-col items-end leading-tight",children:[
6
- /* @__PURE__ */i("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(c=t.price,`$${c.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
7
- /* @__PURE__ */a("span",{className:`text-2xs font-medium tabular-nums ${n}`,children:[r?"▲":"▼"," ",d(t.change)," (",d(t.changePct),"%)"]})]}):/* @__PURE__ */i("span",{className:"text-sm font-mono text-gray-400 tabular-nums",children:"—"})]},e);var c})})})}),
8
- /* @__PURE__ */i(t,{open:y,onClose:()=>j(!1),title:"Stock Settings",appearance:f,onAppearanceChange:v,onSave:()=>{const e=N.map(e=>e.toUpperCase()).slice(0,8);g(e),k(f),localStorage.setItem(m,JSON.stringify(e)),localStorage.setItem(l,JSON.stringify(f)),j(!1)},children:/* @__PURE__ */a("div",{children:[
9
- /* @__PURE__ */a("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Symbols ",
10
- /* @__PURE__ */a("span",{className:"text-2xs font-normal text-gray-400",children:["(",N.length,"/",8,")"]})]}),
11
- /* @__PURE__ */a("div",{className:"space-y-1 mb-2",children:[N.map((e,t)=>/* @__PURE__ */a("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
12
- /* @__PURE__ */i("span",{className:"text-sm font-semibold text-gray-700",children:e}),
13
- /* @__PURE__ */i("button",{onClick:()=>b(e=>e.filter((e,r)=>r!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===N.length&&/* @__PURE__ */i("p",{className:"text-2xs text-gray-400 italic",children:"No symbols — add a ticker below."})]}),N.length<8?/* @__PURE__ */a("div",{className:"flex items-center gap-2",children:[
14
- /* @__PURE__ */i("input",{value:C,onChange:e=>S(e.target.value),onKeyDown:e=>{"Enter"===e.key&&L()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
15
- /* @__PURE__ */i("button",{onClick:L,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */a("p",{className:"text-2xs text-gray-400 italic",children:["Max ",8," symbols — remove one to add another."]}),D.length>0&&N.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-2 mt-2",children:D.map(e=>/* @__PURE__ */i("button",{onClick:()=>b(t=>t.length<8?[...t,e]:t),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
16
- /* @__PURE__ */i("p",{className:"text-2xs text-gray-400 mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{g as default};
@@ -1,3 +0,0 @@
1
- import{DropdownMenu as e}from"./chunk-W7S56JZ7.js";import{Button_default as i}from"./chunk-4IU5BSVE.js";import{iconButtonClasses as n}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{Tooltip as a}from"./chunk-22S6LG6D.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:W,menuFooterLabel:C,align:L="end",side:z="bottom",menuMinWidth:I,linkAs:R,block:B=!1,className:D=""},M){const S=g&&(null!=N&&""!==N&&!1!==N)&&!v,$=x&&null!=j&&""!==j&&!1!==j,A=o(),F=/* @__PURE__ */t(i,{ref:M,type:b,variant:f,size:p,loading:v,leftIcon:k,block:B,disabled:g&&!S,"aria-disabled":!!S||void 0,disabledReason:S?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),J=B?"relative flex min-w-0 flex-1":"relative inline-flex",K=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
2
- return s("div",{className:[B?"flex w-full":"inline-flex","items-stretch",D].filter(Boolean).join(" "),children:[null==w||""===w||S?F:/* @__PURE__ */t(a,{content:w,className:J,children:F}),
3
- /* @__PURE__ */t(a,{content:$?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":$?A:void 0,items:h,align:L,side:z,minWidth:I,linkAs:R,disabled:x&&!$,"aria-disabled":$,onOpenChange:y,footer:W,footerLabel:C,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:K,strokeWidth:2,"aria-hidden":"true"})})}),$&&/* @__PURE__ */t("span",{id:A,className:"sr-only",children:j})]})});export{c as SplitButton_default};
@@ -1,29 +0,0 @@
1
- import{Tree as e,TreeRow as l,TreeGroup as n}from"./chunk-G433MKIN.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as r}from"./chunk-KDZUWQEG.js";import{ImageLightbox as i}from"./chunk-RGBX3EVC.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-YW2DH6YQ.js";import{Breadcrumbs as d}from"./chunk-WJ3XSJ6B.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as m,mediaLibraryMenu as u}from"./chunk-7CFH6Y4T.js";import{useMediaMoveItems as h}from"./chunk-DFDDRKIJ.js";import{copyToClipboard as p}from"./chunk-5PY4H4ZJ.js";import{DropdownMenu as f}from"./chunk-W7S56JZ7.js";import{NativeSelect as g}from"./chunk-RERNKFEW.js";import{MediaUploadGrid as v}from"./chunk-V4KQUOUP.js";import{MediaUsedInList as y}from"./chunk-EZGY6CFN.js";import{Input_default as k}from"./chunk-GX2GSDJP.js";import{useFileIntake as b,FileIntakeAlert as w}from"./chunk-YDYDR72S.js";import{Segmented as x}from"./chunk-N6DTTOB6.js";import{Checkbox_default as C}from"./chunk-CGZBDI6C.js";import{useContextMenu as N,ContextMenu as I}from"./chunk-AX7KPMDV.js";import{Banner as D}from"./chunk-WTY3SXO7.js";import{IconButton_default as S}from"./chunk-4CANQ3B3.js";import{ColoredBadge as j}from"./chunk-XWLWG4HS.js";import{Button_default as z}from"./chunk-4IU5BSVE.js";import{buttonClasses as F}from"./chunk-K7U4RWXJ.js";import{Icon as T}from"./chunk-KIBL6M3T.js";import{Tooltip as O}from"./chunk-22S6LG6D.js";import{usePlotWidth as E}from"./chunk-MAFUXCPZ.js";import{useShellStrings as P}from"./chunk-E6UCGCOC.js";import{useRef as L,useMemo as M,useCallback as A,useState as K,useEffect as R}from"react";import{jsxs as U,Fragment as B,jsx as G}from"react/jsx-runtime";var W="application/x-efficient-media-files",J="application/x-efficient-media-folder",V={type:"all",use:"any",sort:"newest"},Y={lock:/* @__PURE__ */G(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */G(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */G(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */G(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */G(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */G(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */G(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */G(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */G(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */G(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */G(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */G(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */G(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */G(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */G(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */G(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},H={link:/* @__PURE__ */G(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */G(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */G(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */G(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function X({value:e,label:l,onDone:n}){const[a,r]=K(e),i=L(!1),t=e=>{i.current||(i.current=!0,n(e))};/* @__PURE__ */
2
- return G(k,{size:"sm",autoFocus:!0,"aria-label":l,value:a,onChange:e=>r(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:l=>{l.stopPropagation(),"Enter"===l.key?(l.preventDefault(),t(a.trim()||e)):"Escape"===l.key&&(l.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function $(T){const{mode:$="manage",layout:Z="auto",location:Q,onLocationChange:q,folders:_,products:ee,allFilesCount:le,trashCount:ne,files:ae,query:re,onQueryChange:ie,filters:te=V,onFiltersChange:oe,extraFilters:de,view:se="grid",onViewChange:ce,selectedIds:me,onSelectionChange:ue,usedIn:he,denied:pe={},accept:fe="image/*,video/*",maxSizeBytes:ge,busy:ve,progress:ye,onUpload:ke,onNewFolder:be,onRename:we,onMove:xe,onTrash:Ce,onDeleteFolder:Ne,onRestore:Ie,onDeleteForever:De,onEmptyTrash:Se,onReplace:je,onCropEdit:ze,onOpenInDesign:Fe,onChoose:Te,onCancel:Oe,pickNote:Ee,className:Pe=""}=T,Le=P().mediaLibrary,Me=P().media,Ae="pick"===$,Ke=!Ae,Re=L(null),Ue=E(Re,"phone"===Z?343:1200),Be="phone"===Z||"auto"===Z&&Ue<640,Ge=M(()=>function(e=[]){const l=/* @__PURE__ */new Map,n=(e,a)=>{for(const r of e){const e=[...a,r];l.set(r.id,{node:r,path:e}),r.children&&n(r.children,e)}};return n(e,[]),l}(ee),[ee]),We=M(()=>new Map(_.map(e=>[e.id,e])),[_]),Je=M(()=>{const e=/* @__PURE__ */new Map;for(const l of _){const n=l.parentId&&We.has(l.parentId)?l.parentId:null;e.set(n,[...e.get(n)??[],l])}return e},[_,We]),Ve=A(e=>{const l=[];for(let n=e?We.get(e):void 0;n&&(l.unshift(n),!(l.length>_.length));n=n.parentId?We.get(n.parentId):void 0);return l},[We,_.length]),Ye=A((e,l)=>Ve(e).some(e=>e.id===l),[Ve]),[He,Xe]=K(()=>/* @__PURE__ */new Set(["@files"])),$e=e=>Xe(l=>{const n=new Set(l);return n.has(e)?n.delete(e):n.add(e),n}),Ze=A(e=>{Xe(l=>e.every(e=>l.has(e))?l:/* @__PURE__ */new Set([...l,...e]))},[]),Qe="files"===(qe=Q).place?`files:${qe.folderId??""}`:"products"===qe.place?`products:${qe.nodeId??""}`:"trash";var qe;R(()=>{if("files"===Q.place)Ze(["@files",...Ve(Q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===Q.place){const e=Q.nodeId?Ge.get(Q.nodeId)?.path??[]:[];Ze(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[Qe]);const _e="products"===Q.place,el="trash"===Q.place,ll="files"===Q.place,nl=ll?Q.folderId:null,al=_e&&Q.nodeId?Ge.get(Q.nodeId)?.path[0]:void 0,rl=e=>e?.sharedFrom?`${Le.readOnly} ${Le.editedAtHq(e.sharedFrom)}`:Le.readOnly,il=M(()=>ae.map(e=>e.id),[ae]),tl=M(()=>new Map(ae.map(e=>[e.id,e])),[ae]),ol=s(il),dl=M(()=>il.filter(e=>ol.selected.has(e)),[il,ol.selected]),sl=1===dl.length?tl.get(dl[0]):void 0,cl=L(!0);R(()=>{cl.current?cl.current=!1:ol.clear()},[Qe]);const ml=me?.join("\0");R(()=>{me&&ol.setSelection(me)},[ml]);const ul=L(ml??""),hl=dl.join("\0");R(()=>{ul.current!==hl&&(ul.current=hl,ue?.(dl))},[hl]);const pl=(e,l={})=>{Ae?ol.select(e):ol.select(e,{ctrl:!(!l.ctrlKey&&!l.metaKey),shift:!!l.shiftKey})},[fl,gl]=K(null),vl=e=>{const l=fl;if(gl(null),!l||null==e)return;e!==("folder"===l.kind?We.get(l.id)?.name:tl.get(l.id)?.name)&&we?.(l,e)},yl=async e=>{if(!be)return;const l=await be(e);Ze(["@files",...e?[e]:[]]),"string"==typeof l&&gl({kind:"folder",id:l})},kl=A(e=>{const l=[],n=l=>{if("files"===e.kind)return l===nl&&ll?Le.alreadyHere:void 0;const n=We.get(e.id);return l===e.id||l&&Ye(l,e.id)?Le.notIntoItself:(n?.parentId??null)===l?Le.folderAlreadyHere:void 0};l.push({key:m,label:Le.allFiles,disabledReason:n(null)});const a=(e,r)=>{for(const i of Je.get(e)??[])l.push({key:i.id,label:i.name,depth:r,disabledReason:n(i.id)}),a(i.id,r+1)};return a(null,1),l},[Je,We,ll,Ye,nl,Le]),bl=A(e=>{const l=new Set(e.map(e=>tl.get(e)?.kind??"image"));return 1===l.size?[...l][0]:"file"},[tl]),[wl,xl]=K(null),Cl={words:Le,media:Me,denied:pe,moveTargets:kl,kindOf:bl,urlOf:e=>tl.get(e)?.url,newSubfolder:be&&Ke?e=>{yl(e)}:void 0,rename:we&&Ke?e=>{"file"!==e.kind||ol.isSelected(e.id)||ol.select(e.id),gl(e)}:void 0,move:xe&&Ke?xe:void 0,trash:Ce&&Ke?Ce:void 0,deleteFolder:Ne&&Ke?Ne:void 0,folderNotEmpty:e=>!!We.get(e)?.notEmpty,replace:je&&Ke?je:void 0,copyUrl:e=>{const l=tl.get(e)?.url;l&&p(Le.urlLabel,l)},openInDesign:Fe,restore:Ie,deleteForever:De},Nl=e=>u(e,Cl),Il=N(),Dl=(e,l)=>{Ae||(ol.isSelected(e)||ol.select(e),Il.open(l,(e=>{const l=ol.isSelected(e)?dl:[e];return _e?{kind:"render",id:e}:el?{kind:"trashed",ids:l}:{kind:"files",ids:l}})(e)))},[Sl,jl]=K(null),[zl,Fl]=K(null),[Tl,Ol]=K(null);R(()=>{if(!zl&&!Sl)return;const e=()=>{Fl(null),jl(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[zl,Sl]);const El=(e,l)=>Array.from(e.dataTransfer?.types??[]).includes(l),Pl=(e,l)=>!(!xe||pe.move||Ae)&&(!!El(e,W)||!(!El(e,J)||!Tl)&&(l!==Tl&&!(l&&Ye(l,Tl)))),Ll=(e,l)=>({onDragEnter:n=>{Pl(n,l)&&(n.preventDefault(),jl(e))},onDragOver:n=>{Pl(n,l)&&(n.preventDefault(),n.dataTransfer.dropEffect="move",Sl!==e&&jl(e))},onDragLeave:l=>{const n=l.relatedTarget;n&&l.currentTarget.contains(n)||jl(l=>l===e?null:l)},onDrop:e=>{if(Pl(e,l))if(e.preventDefault(),jl(null),El(e,W)){let n;try{n=JSON.parse(e.dataTransfer.getData(W))}catch{n=null}Array.isArray(n)&&n.length&&xe({kind:"files",ids:n.map(String)},l)}else Tl&&(xe({kind:"folder",id:Tl},l),Ol(null))}}),Ml=e=>{const l=e=>El(e,W)||El(e,J)||El(e,"Files");return{onDragEnter:n=>{l(n)&&Fl(e)},onDragOver:n=>{l(n)&&zl!==e&&Fl(e)},onDragLeave:l=>{const n=l.relatedTarget;n&&l.currentTarget.contains(n)||Fl(l=>l===e?null:l)}}},Al=(e,l,n)=>/* @__PURE__ */G(O,{side:"right",content:zl===e?Le.noDropProducts:rl(n),open:zl===e||!zl&&void 0,children:/* @__PURE__ */G("span",{children:l})}),Kl=e=>({onContextMenu:l=>{Il.open(l,e)}}),Rl=(e,a,r)=>e.map(e=>{const i=`p:${e.id}`,t=r??e,o=He.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
3
- return U("div",{role:"none",className:"contents",children:[
4
- /* @__PURE__ */G(l,{label:Al(i,e.name,t),level:a,icon:d&&o?Y.folderOpen:Y.folder,badge:null!=e.count?e.count:void 0,selected:_e&&Q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>$e(i):void 0,onSelect:()=>q({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Ml(i),...Ke?Kl({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */G(n,{children:Rl(d,a+1,t)})]},e.id)}),Ul=(e,a)=>(Je.get(e)??[]).map(e=>{const r=Je.get(e.id),i=He.has(e.id),t="folder"===fl?.kind&&fl.id===e.id,o=Nl({kind:"folder",id:e.id});/* @__PURE__ */
5
- return U("div",{role:"none",className:"contents",children:[
6
- /* @__PURE__ */G(l,{label:e.name,level:a,icon:r&&i?Y.folderOpen:Y.folder,badge:null!=e.count?e.count:void 0,selected:t||ll&&Q.folderId===e.id,expanded:r?i:void 0,onToggle:r?()=>$e(e.id):void 0,onSelect:()=>q({place:"files",folderId:e.id}),drop:Sl===e.id?"into":void 0,dragging:Tl===e.id,draggable:Ke&&!!xe&&!pe.move,rename:t?/* @__PURE__ */G(X,{value:e.name,label:Le.folderName,onDone:vl}):void 0,actions:Ke&&o.length?/* @__PURE__ */G(f,{align:"end","aria-label":Le.folderActions,trigger:Y.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Ll(e.id,e.id),...Ke?Kl({kind:"folder",id:e.id}):{},...Ke&&xe&&!pe.move?{draggable:!0,onDragStart:l=>{l.dataTransfer.effectAllowed="move",l.dataTransfer.setData(J,e.id),Ol(e.id)},onDragEnd:()=>{Ol(null),jl(null)}}:{}}}),r&&i&&/* @__PURE__ */G(n,{children:Ul(e.id,a+1)})]},e.id)}),Bl=He.has("@files"),Gl=He.has("@products"),Wl=/* @__PURE__ */U(e,{"aria-label":Le.folders,children:[ee&&/* @__PURE__ */U(B,{children:[
7
- /* @__PURE__ */G(l,{label:Al("@products",Le.products),level:1,icon:Y.lock,badge:{label:Le.readOnlyBadge,tone:"neutral"},expanded:ee.length?Gl:void 0,onToggle:()=>$e("@products"),selected:_e&&null==Q.nodeId,onSelect:()=>q({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Ml("@products")}}),Gl&&ee.length>0&&/* @__PURE__ */G(n,{children:Rl(ee,2)})]}),
8
- /* @__PURE__ */G(l,{label:Le.allFiles,level:1,icon:Bl?Y.folderOpen:Y.folder,badge:null!=le?le:void 0,expanded:Je.get(null)?.length?Bl:void 0,onToggle:()=>$e("@files"),selected:ll&&null==Q.folderId,onSelect:()=>q({place:"files",folderId:null}),drop:"@files"===Sl?"into":void 0,rowProps:{"data-media-row":"@files",...Ll("@files",null)}}),Bl&&(Je.get(null)?.length??0)>0&&/* @__PURE__ */G(n,{children:Ul(null,2)}),Ke&&/* @__PURE__ */G(l,{label:Le.trash,level:1,icon:Y.trash,badge:null!=ne?ne:void 0,selected:el,onSelect:()=>q({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Jl=(()=>{if(el)return[{label:Le.trash}];if(_e){const e=Q.nodeId?Ge.get(Q.nodeId)?.path??[]:[];return[{label:Le.products,onClick:e.length?()=>q({place:"products",nodeId:null}):void 0},...e.map((l,n)=>({label:l.name,onClick:n<e.length-1?()=>q({place:"products",nodeId:l.id}):void 0}))]}const e=Ve(nl);return[{label:Le.allFiles,onClick:e.length?()=>q({place:"files",folderId:null}):void 0},...e.map((l,n)=>({label:l.name,onClick:n<e.length-1?()=>q({place:"files",folderId:l.id}):void 0}))]})(),Vl=_e?Le.readOnly:pe.upload,Yl=!!ke&&!el&&!Vl,Hl=b({accept:fe,maxSizeBytes:ge,multiple:!0,disabled:!Yl,onAccept:e=>ke?.(e,nl)}),Xl=_e?Le.noProductFolder:pe.newFolder,$l=e=>e?{"aria-disabled":!0,disabledReason:e}:{},Zl=/* @__PURE__ */U("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&be&&!el&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.folderPlus,onClick:()=>{yl(nl)},...$l(Xl),children:Le.newFolder}),ke&&!el&&/* @__PURE__ */G(z,{variant:"primary",size:"sm",leftIcon:Y.upload,onClick:()=>Hl.open(),...$l(Vl),children:Le.upload}),Ke&&el&&Se&&ae.length>0&&/* @__PURE__ */G(z,{variant:"danger",size:"sm",onClick:Se,...$l(pe.deleteForever),children:Le.emptyTrash})]}),Ql=(e,l,n,a,r)=>/* @__PURE__ */G("div",{style:{width:Be?void 0:r,flex:Be?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */G(g,{size:"sm","aria-label":e,value:l,onChange:a,options:n})},e),ql=e=>l=>oe?.({...te,[e]:l}),_l=/* @__PURE__ */U("div",{className:"flex flex-wrap items-center gap-2",children:[ie&&/* @__PURE__ */G("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */G(k,{size:"sm",type:"search",leftIcon:Y.search,placeholder:_e?Le.searchProducts:Le.search,"aria-label":_e?Le.searchProducts:Le.search,value:re??"",onChange:e=>ie(e.target.value)})}),oe&&Ql(Le.mediaType,te.type,[{value:"all",label:Le.allTypes},{value:"image",label:Le.images},{value:"video",label:Le.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],ql("type"),130),oe&&!_e&&!el&&Ql(Le.use,te.use,[{value:"any",label:Le.anyUse},{value:"email",label:Le.emailOnly},{value:"website",label:Le.websiteOnly},{value:"unused",label:Le.notUsed}],ql("use"),130),oe&&Ke&&Ql(Le.sort,te.sort,[{value:"newest",label:Le.newest},{value:"name",label:Le.byName},{value:"size",label:Le.bySize}],ql("sort"),110),de?.map(e=>Ql(e.label,e.value,e.options,e.onChange,120)),ce&&/* @__PURE__ */G(x,{size:"sm",label:Le.view,value:se,onChange:ce,options:[{value:"grid",label:Le.grid,icon:Y.grid},{value:"list",label:Le.list,icon:Y.list}]})]}),en=e=>{const l=[];return null!=e.trashedDaysAgo&&l.push({key:"t",label:Le.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:H.clock,tone:"neutral"}),e.usedCount&&l.push({key:"u",label:Le.used(e.usedCount),count:e.usedCount,icon:H.link,tone:"active"}),e.email&&l.push({key:"e",label:Le.email,icon:H.email,tone:"queued"}),e.private&&l.push({key:"p",label:Le.private,icon:H.lock,tone:"neutral"}),l},ln=e=>en(e).map(e=>/* @__PURE__ */G(j,{tone:e.tone,size:"xs",children:e.label},e.key)),nn=Ke&&ll&&!!xe&&!pe.move,an=ae.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:en(e),dragData:nn?JSON.stringify(ol.isSelected(e.id)?dl:[e.id]):void 0})),rn=Be?Math.max(72,Math.floor((Ue-24-16-1)/3)):112,tn=L(null),on=c({containerRef:tn,enabled:Ke&&!Be&&ae.length>0,selected:ol.selected,setSelection:e=>ol.setSelection(e),clearSelection:ol.clear}),dn=e=>{if(Ae){const l=tl.get(e);return void(!l||l.private||l.pickDisabledReason||Te?.(l))}const l=il.indexOf(e);l>=0&&xl(l)},sn=ae.length?null:re?/* @__PURE__ */G(r,{variant:"dashed",title:Le.noMatches}):_e?/* @__PURE__ */G(r,{variant:"dashed",title:Le.emptyProducts,description:rl(al)}):el?/* @__PURE__ */G(r,{variant:"dashed",title:Le.trashEmpty}):!Yl||Ae?/* @__PURE__ */G(r,{variant:"dashed",title:Le.emptyFolder}):null,cn="list"===se&&ae.length>0,mn=sn??(cn?/* @__PURE__ */G("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Le.folders,className:"flex flex-col gap-1",children:ae.map(e=>/* @__PURE__ */U("li",{role:"option","aria-selected":ol.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:l=>pl(e.id,l),onDoubleClick:()=>dn(e.id),onContextMenu:l=>Dl(e.id,l),onKeyDown:l=>{"Enter"!==l.key&&" "!==l.key||(l.preventDefault(),pl(e.id,l))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(ol.isSelected(e.id)?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-gray-100"),children:[
9
- /* @__PURE__ */G("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
10
- /* @__PURE__ */G("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
11
- /* @__PURE__ */G("span",{className:"flex shrink-0 items-center gap-1",children:ln(e)}),e.sizeLabel&&/* @__PURE__ */G("span",{className:"w-16 shrink-0 text-right text-xs text-gray-500",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */G(v,{items:an,readOnly:!Yl||Ae,onFiles:Yl&&!Ae?e=>ke(e,nl):void 0,accept:fe,maxSizeBytes:ge,busy:ve,progress:ye,fit:"contain",thumbSize:rn,dragType:nn?W:void 0,selected:ol.selected,onItemClick:pl,onItemDoubleClick:dn,onItemContextMenu:Ke?Dl:void 0,menuOnMedia:Ke})),un=h({count:dl.length,kind:bl(dl),targets:kl({kind:"files",ids:dl}),onPick:e=>xe?.({kind:"files",ids:dl},e.key===m?null:e.key)}),hn=F({variant:"secondary",size:"sm"}),pn=/* @__PURE__ */G(f,{align:"start",triggerClassName:hn,trigger:/* @__PURE__ */U(B,{children:[Y.folder,Le.moveTo]}),items:un,disabled:!!pe.move}),fn=Ke&&dl.length>1&&!_e?/* @__PURE__ */U("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-gray-200 px-3 py-2",children:[
12
- /* @__PURE__ */G(C,{checked:dl.length===ae.length,indeterminate:dl.length<ae.length,onChange:e=>e?ol.selectAll():ol.clear(),label:Le.selected(dl.length)}),/* @__PURE__ */U(B,el?{children:[Ie&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.undo,onClick:()=>Ie(dl),...$l(pe.restore),children:Le.restore}),De&&/* @__PURE__ */G(z,{variant:"secondary-danger",size:"sm",onClick:()=>De(dl),...$l(pe.deleteForever),children:Le.deleteForever})]}:{children:[xe&&pn,we&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.edit,disabled:!0,children:Le.rename}),Ce&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.trash,onClick:()=>Ce({kind:"files",ids:dl}),...$l(pe.trash),children:Le.moveFilesToTrash(dl.length)})]}),
13
- /* @__PURE__ */G(z,{variant:"ghost",size:"sm",onClick:ol.clear,children:Le.clearSelection})]}):null,gn=e=>{const l=[],n=(e,n,a)=>{null!=a&&""!==a&&l.push({key:e,label:n,value:a})},a="file"===fl?.kind&&fl.id===e.id;n("name",Le.name,a?/* @__PURE__ */G(X,{value:e.name,label:Le.fileName,onDone:vl}):e.name),n("type",Le.type,e.typeLabel),n("size",Le.size,e.sizeLabel),n("resolution",Le.resolution,e.resolution),_e?(n("design",Le.design,e.design),n("finish",Le.finish,e.finish),n("angle",Le.angleLug,e.angleLug),n("owner",Le.owner,e.owner)):(n("added",Le.addedBy,e.addedBy),n("folder",Le.folder,e.folderPath)),n("used",Le.usedIn,null!=e.usedCount?Le.places(e.usedCount):void 0);const r=u({kind:"files",ids:[e.id]},Cl).find(e=>"submenu"===e.type);/* @__PURE__ */
14
- return U("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
15
- /* @__PURE__ */G("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),_e&&/* @__PURE__ */G(D,{tone:"neutral",title:Le.readOnlyBadge,children:rl(al)}),
16
- /* @__PURE__ */G(t,{size:"sm",columns:1,items:l}),!el&&/* @__PURE__ */U("div",{className:"flex gap-2",children:[
17
- /* @__PURE__ */G("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */G(k,{size:"sm",readOnly:!0,value:e.url,"aria-label":Le.fileUrl,onFocus:e=>e.currentTarget.select()})}),
18
- /* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.copy,onClick:()=>Cl.copyUrl(e.id),children:Le.copyUrl})]}),ll&&Ke&&/* @__PURE__ */U("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.swap,onClick:()=>je(e.id),...$l(pe.replace),children:Le.replace}),ze&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.crop,onClick:()=>ze(e.id),children:Le.cropEdit}),xe&&"submenu"===r?.type&&/* @__PURE__ */G(f,{align:"start",triggerClassName:hn,trigger:/* @__PURE__ */U(B,{children:[Y.folder,Le.moveTo]}),items:r.items,disabled:!!pe.move}),we&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.edit,onClick:()=>gl({kind:"file",id:e.id}),...$l(pe.rename),children:Le.rename}),Ce&&/* @__PURE__ */G(S,{"aria-label":Le.moveToTrash,size:"sm",onClick:()=>Ce({kind:"files",ids:[e.id]}),disabledReason:pe.trash,"aria-disabled":!!pe.trash||void 0,children:Y.trash})]}),el&&Ke&&/* @__PURE__ */U("div",{className:"flex flex-wrap gap-2",children:[Ie&&/* @__PURE__ */G(z,{variant:"primary",size:"sm",leftIcon:Y.undo,onClick:()=>Ie([e.id]),...$l(pe.restore),children:Le.restore}),De&&/* @__PURE__ */G(z,{variant:"danger",size:"sm",onClick:()=>De([e.id]),...$l(pe.deleteForever),children:Le.deleteForever})]}),_e&&Fe&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",leftIcon:Y.external,onClick:()=>Fe({kind:"render",id:e.id}),children:Le.openInDesign}),he&&/* @__PURE__ */G(y,{items:he})]})},vn=sl?sl.private?Le.privateNoPick:sl.pickDisabledReason:void 0,yn=Ae?/* @__PURE__ */U("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-gray-200 px-3 py-2",children:[
19
- /* @__PURE__ */G("span",{className:"min-w-0 truncate text-sm text-gray-500",children:sl?Le.oneChosen(sl.name):Le.noneChosen}),
20
- /* @__PURE__ */U("div",{className:"flex gap-2",children:[Oe&&/* @__PURE__ */G(z,{variant:"secondary",size:"sm",onClick:Oe,children:Le.cancel}),
21
- /* @__PURE__ */G(z,{variant:"primary",size:"sm",disabled:!sl,...$l(vn),onClick:()=>{sl&&!vn&&Te?.(sl)},children:Le.chooseImage})]})]}):null,kn=Ke&&!!sl,bn=/* @__PURE__ */U("div",{className:"flex min-w-0 flex-col gap-3",children:[Ee&&/* @__PURE__ */G(D,{tone:"neutral",children:Ee}),
22
- /* @__PURE__ */U("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
23
- /* @__PURE__ */G(d,{items:Jl}),Zl]}),_l,fn,
24
- /* @__PURE__ */U("div",{ref:tn,className:"relative",onPointerDown:on.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),ol.selectAll()):"Escape"===e.key&&ol.size&&ol.clear()},children:[mn,
25
- /* @__PURE__ */G(a,{rect:on.rect})]}),Yl&&/* @__PURE__ */G("input",{...Hl.inputProps}),
26
- /* @__PURE__ */G(w,{rejections:Hl.rejections})]});/* @__PURE__ */
27
- return U("div",{ref:Re,"data-media-library":"","data-layout":Be?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Pe}`.trim(),children:[/* @__PURE__ */U("div",Be?{className:"flex flex-col gap-3 p-3",children:[Wl,bn]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
28
- /* @__PURE__ */G("div",{className:"shrink-0 overflow-y-auto border-r border-gray-200 p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Wl}),
29
- /* @__PURE__ */G("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:bn}),kn&&/* @__PURE__ */G("div",{className:"shrink-0 overflow-y-auto border-l border-gray-200 p-3",style:{width:300},children:gn(sl)})]}),yn,Be&&/* @__PURE__ */G(o,{open:kn,onClose:ol.clear,side:"bottom",title:sl?.name,children:sl&&gn(sl)}),Il.state&&/* @__PURE__ */G(I,{...Il.props,items:Nl(Il.state.data)}),null!=wl&&ae.length>0&&/* @__PURE__ */G(i,{images:ae.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(wl,ae.length-1),onClose:()=>xl(null)})]})}export{W as MEDIA_FILES_DRAG_TYPE,J as MEDIA_FOLDER_DRAG_TYPE,$ as MediaLibrary};
@@ -1,8 +0,0 @@
1
- import{optionMatches as e,OptionSublabel as t}from"./chunk-UQBPKZUR.js";import{inputClasses as n}from"./chunk-PF3ANJFI.js";import{GROUP_COLORS as r}from"./chunk-D323R2FT.js";import{Tooltip as o}from"./chunk-22S6LG6D.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as d}from"./chunk-E6UCGCOC.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as g}from"react-dom";import{jsxs as v,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-blue-50 px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${r.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:r,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:D,id:L,className:E="",tone:F,tooltip:W,split:$}){const[B,G]=m(!1),[I,J]=m(""),M=d(),R=h(null),S=h(null),T=h(null),U=a(R,B),P=e=>k.find(t=>t.value===e)?.label??e,H=p(()=>{const t=new Set(r),n=[],o=I.trim().toLowerCase();for(const r of k)t.has(r.value)||(t.add(r.value),o&&!e(r,o)||n.push(r));return n},[k,r,I]),K=e=>{const t=[...r];for(const n of e){const e=n.trim();if(!e)continue;const r=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===r)?.value,l=o??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==r.length&&y(t)},z=e=>{e&&!r.includes(e)?(y([...r,e]),J("")):J("")},A=e=>y(r.filter(t=>t!==e)),O=()=>{const e=I.trim();if($&&e)return K(e.split($)),void J("");j&&e?z(e):J("")},Q=h(()=>{});Q.current=()=>{O(),G(!1)},f(()=>{if(!B)return;const e=e=>{const t=e.target;R.current?.contains(t)||T.current?.contains(t)||(O(),G(!1))};document.addEventListener("mousedown",e);const t=l(()=>Q.current());return()=>{document.removeEventListener("mousedown",e),t()}});const Z=k.length>0;/* @__PURE__ */
2
- return v("div",{ref:R,className:"relative",children:[
3
- /* @__PURE__ */v("div",{onMouseDown:e=>{D||e.target.closest("button")||(e.preventDefault(),S.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${D?"bg-gray-50 cursor-not-allowed":""} ${E}`}),children:[r.map(e=>{const t=F?.(e),n=w[t??"accent"],r=/* @__PURE__ */v("span",{"data-tone":t,className:n.chip,children:[
4
- /* @__PURE__ */x("span",{className:"truncate",children:P(e)}),!D&&/* @__PURE__ */x("button",{type:"button","aria-label":M.select.removeItem?.(P(e))??`${M.select.remove} ${P(e)}`,onClick:()=>A(e),className:n.remove,children:"×"})]},e),l=W?.(e);return null==l?r:/* @__PURE__ */x(o,{content:l,className:"relative inline-flex max-w-full",children:r},e)}),
5
- /* @__PURE__ */x("input",{id:L,ref:S,type:"text",autoComplete:"off",role:"combobox","aria-expanded":B&&Z,"aria-invalid":C||void 0,disabled:D,value:I,placeholder:0===r.length?N:void 0,onChange:e=>{(e=>{if($){const t=e.split($);if(t.length>1)return K(t.slice(0,-1)),void J(t[t.length-1])}J(e)})(e.target.value),G(!0)},onFocus:()=>{!D&&Z&&G(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=I.trim(),r=n?H.filter(t=>e(t,n.toLowerCase())):[];1===r.length?z(r[0].value):O()}else"Backspace"===t.key&&""===I&&r.length>0?A(r[r.length-1]):"Escape"===t.key?(G(!1),J(""),S.current?.blur()):"Tab"===t.key&&(O(),G(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-gray-800 placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),B&&Z&&g(
6
- /* @__PURE__ */x("div",{ref:T,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:U?.left,right:U?.right,top:U?.top,bottom:U?.bottom,minWidth:U?.minWidth,maxWidth:U?.maxWidth??s,width:"max-content",visibility:U?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:U?.maxHeight??c},children:0===H.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&r.length>=k.length?M.select.allSelected:M.select.noMatches}):H.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-gray-50 text-gray-700 whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(b,{children:[
7
- /* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
8
- /* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
@@ -1 +0,0 @@
1
- var r="8.34.0",a=r;export{a as APP_VERSION,r as VERSION};