@sheetxl/studio-mui 0.8.0-beta.2 → 0.8.0-beta.20

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 (299) hide show
  1. package/LICENSE.md +17 -7
  2. package/browser/esm/3xocDjPLOJXjOs3x.mjs +633 -0
  3. package/browser/esm/4RkuBXBVmw7VYQ2a.mjs +490 -0
  4. package/browser/esm/6R-JS1ZrhnwQAyOl.mjs +975 -0
  5. package/browser/esm/B4L3swgLGqcOHo7U.mjs +335 -0
  6. package/browser/esm/BAFzUBAc7BpGUWl_.mjs +87 -0
  7. package/browser/esm/{DIGlcemS7napWyKW.mjs → BENsK9C3A3CnZyXZ.mjs} +8 -6
  8. package/browser/esm/BRnwCembfaZpk0sc.mjs +1288 -0
  9. package/browser/esm/BSVc4NYkBnFa7T_w.mjs +119 -0
  10. package/browser/esm/{C5-J1xiO3O1-qaaP.mjs → BTWjCKBwd6qXldxi.mjs} +83 -95
  11. package/browser/esm/BWSZkGPSgg9pPKni.mjs +1550 -0
  12. package/browser/esm/{B1YOQZHyO_dmHUN4.mjs → BXVE3yfw5gdtyl-s.mjs} +2 -2
  13. package/browser/esm/Bfb84N1ywaVZm9kH.mjs +72 -0
  14. package/browser/esm/{C2Eke_9Dj_m6mtMj.mjs → BrZVnbTt-3DeAMxo.mjs} +47 -48
  15. package/browser/esm/BrdpRbJ-xKeF87FO.mjs +392 -0
  16. package/browser/esm/{xGJU5xUJx3HF317Q.mjs → BtrFK5bYpBJfHRDr.mjs} +14 -13
  17. package/browser/esm/BuSv-OgJpZJGjcyA.mjs +318 -0
  18. package/browser/esm/C1XMVwyIJNbYmtkV.mjs +414 -0
  19. package/browser/esm/{DE7MVTTfExTzvyMW.mjs → C2MuUgU0H05eZ5qQ.mjs} +33 -31
  20. package/browser/esm/{Dv3hSCyjvwo6GcH1.mjs → C5ZWkOAoFpcZwFw2.mjs} +4 -4
  21. package/browser/esm/C72jL8eQk_hPFDLn.mjs +8 -0
  22. package/browser/esm/CDJ0jdx7Km3a5v6w.mjs +294 -0
  23. package/browser/esm/CGDNdoMTlI8f1kRw.mjs +14 -0
  24. package/browser/esm/{Bo74PCF42KVYJF0j.mjs → CGomW4hI6SQ96yIm.mjs} +4 -4
  25. package/browser/esm/CHT8_XB3_hp307XA.mjs +68 -0
  26. package/browser/esm/{CppDmJ4ckCH3alQf.mjs → COkfKd7FvEtpgAAI.mjs} +156 -109
  27. package/browser/esm/CSgwY4Yb3l0WoprP.mjs +225 -0
  28. package/browser/esm/CgvHVv7iIzRRgmlF.mjs +197 -0
  29. package/browser/esm/ClqW5S7FR6Pwmp1U.mjs +442 -0
  30. package/browser/esm/ColttpEsydVwkHtf.mjs +77 -0
  31. package/browser/esm/Cvwz0PddEGW1FJ4c.mjs +94 -0
  32. package/browser/esm/CzfkYZGGhFc_gq0P.mjs +424 -0
  33. package/browser/esm/D-3WlyQuxUZCwLkb.mjs +831 -0
  34. package/browser/esm/D3Aests6-QUrBfmJ.mjs +235 -0
  35. package/browser/esm/D3bI-7D37_22_-T9.mjs +31 -0
  36. package/browser/esm/D7ZdGXqJXmdAHu8I.mjs +14 -0
  37. package/browser/esm/D83oSH8xR3JfeRjI.mjs +242 -0
  38. package/browser/esm/DCxc5HMSf1ZSHRoi.mjs +412 -0
  39. package/browser/esm/{DSGFnb1gYyL22p0t.mjs → DF0hjPW_C_3TpnDs.mjs} +20 -18
  40. package/browser/esm/DGFdTu5VfKecMohK.mjs +386 -0
  41. package/browser/esm/DHrJOjy3Du7ZBo96.mjs +360 -0
  42. package/browser/esm/DIZ9pueRPHaNzQqo.mjs +103 -0
  43. package/browser/esm/DMifD__JRvHH4COB.mjs +106 -0
  44. package/browser/esm/{D7fA9EyCNSzQMgxg.mjs → DQNnDQPNut_4wO6Y.mjs} +2 -2
  45. package/browser/esm/D_VpGjXScR-D-TWZ.mjs +2699 -0
  46. package/browser/esm/DdtM4Sy4hFIFwWvO.mjs +13 -0
  47. package/browser/esm/De7cege6OU7QJqBb.mjs +225 -0
  48. package/browser/esm/{iM5uEM9H4e8HGt5y.mjs → DobmIAozt-IiJp1P.mjs} +3 -3
  49. package/browser/esm/DwYjy-b-w1xnqteA.mjs +267 -0
  50. package/browser/esm/JBCZvp0T2f4n-Csb.mjs +94 -0
  51. package/browser/esm/LOzFCd9lrGWhNoCz.mjs +161 -0
  52. package/browser/esm/LQC_4LWJQR_JjcxV.mjs +141 -0
  53. package/browser/esm/UC9qbIWz2dYrCbJn.mjs +252 -0
  54. package/browser/esm/{CNLLwRPWnd4PJgPO.mjs → VoncM-mkj4eoKD1J.mjs} +5 -5
  55. package/browser/esm/{BlZiWp3SB3wH5O38.mjs → bOlMSpqTkmRboj5-.mjs} +4 -4
  56. package/browser/esm/hbiHjiOvIyYM3TIl.mjs +517 -0
  57. package/browser/esm/index.mjs +1878 -286
  58. package/browser/esm/mlTMBwB5PG7Fo1mU.mjs +8547 -0
  59. package/browser/esm/nmox4_ypwR5ILBKj.mjs +516 -0
  60. package/browser/esm/p-2ZZeZwGZfutcDk.mjs +973 -0
  61. package/browser/esm/{_v6Wbw_y3QgJy3qY.mjs → xLnpGjmsP-zJuXUE.mjs} +2 -2
  62. package/licenses/dependencies.txt +113 -366
  63. package/node/esm/3MP8rnjjEE0LpSoH.mjs +638 -0
  64. package/node/esm/{C0M1VbsIRuRauUI-.mjs → 539u16kqHOnXHBnN.mjs} +85 -97
  65. package/node/esm/{BMoRatciTqOi1HkT.mjs → B1WnY8cmRz7W1yrZ.mjs} +21 -21
  66. package/node/esm/B5kuWO6ix3DmmdhQ.mjs +391 -0
  67. package/node/esm/{DN-bhyNbuBbNB0Ky.mjs → BCYThTuIrSXfyd-N.mjs} +3 -3
  68. package/node/esm/{DVshSSmP5QZU7GoY.mjs → BJLg7uLC_b9f_1NJ.mjs} +29 -29
  69. package/node/esm/BWIatgbno8eMdTy4.mjs +385 -0
  70. package/node/esm/BXKb4oUGpTWCF8ni.mjs +412 -0
  71. package/node/esm/B_TEor8YFmwmyhWj.mjs +294 -0
  72. package/node/esm/Bqda2dQ0l75gjnDb.mjs +267 -0
  73. package/node/esm/BqkiJZsCP2hEkJs9.mjs +142 -0
  74. package/node/esm/C-s3vhDAhWAnJntP.mjs +118 -0
  75. package/node/esm/CAfDDLrXsXte2avr.mjs +224 -0
  76. package/node/esm/{DvMAUBSQsZmIsRxi.mjs → CDj1mR4aA0wufjjK.mjs} +2 -2
  77. package/node/esm/CJX21c9lbs0lFHFH.mjs +14 -0
  78. package/node/esm/CN5U8EzIhztKzktG.mjs +425 -0
  79. package/node/esm/CY8Mel9qXoQcoE6D.mjs +516 -0
  80. package/node/esm/Cs9OyntWvICLrQk-.mjs +141 -0
  81. package/node/esm/{BoDCV8cDmFVAYtaW.mjs → CsnknBUOfx3FVTP_.mjs} +2 -2
  82. package/node/esm/{CCWQ116Z67Kz78Uo.mjs → D8RVd9U84QC8lAvP.mjs} +33 -31
  83. package/node/esm/DAuVxjZwldORNkvx.mjs +1838 -0
  84. package/node/esm/DLx_RKfK6MMX0tiy.mjs +94 -0
  85. package/node/esm/DSZIOgi3X_EmsT65.mjs +106 -0
  86. package/node/esm/D_dyzcsGBlCNrIVJ.mjs +73 -0
  87. package/node/esm/Dbg6kW_63xZ_x2es.mjs +975 -0
  88. package/node/esm/DcIZXVJ5TJYu8Xf1.mjs +68 -0
  89. package/node/esm/DcIySopuRr-At74Y.mjs +94 -0
  90. package/node/esm/{DVaQ6xIbKQgBk0uw.mjs → Dpzk8tIhwke93vji.mjs} +70 -71
  91. package/node/esm/FHL9tW8a0eqpp8dm.mjs +1283 -0
  92. package/node/esm/GeLMvw9JlqlFr6jw.mjs +972 -0
  93. package/node/esm/{BJi0FlhIqCMEwROu.mjs → N8h_Ft32UJATwjlk.mjs} +190 -141
  94. package/node/esm/{cJDXopFIX6f3_oi3.mjs → VeNMuIWoztqGMKsZ.mjs} +2 -2
  95. package/node/esm/XJAfD-_V2Sx4aW33.mjs +77 -0
  96. package/node/esm/bIfQAr55kQq2xXaT.mjs +197 -0
  97. package/node/esm/e5DJjIF9cuF9r_ub.mjs +242 -0
  98. package/node/esm/h0ih_bazDGjgIXQd.mjs +489 -0
  99. package/node/esm/index.mjs +10334 -8697
  100. package/node/esm/rEdJke7xorzb_Nmh.mjs +519 -0
  101. package/node/esm/uCFRHXTVhzTQ53TT.mjs +319 -0
  102. package/node/esm/{DAji2BXelmIUxioS.mjs → ymnOnQfaRduubuPk.mjs} +23 -23
  103. package/package.json +16 -19
  104. package/resources/contents.json +6 -0
  105. package/resources/locales/contents.json +14 -0
  106. package/resources/locales/de/groups.cmd.json +61 -10
  107. package/resources/locales/de/ui.msg.json +293 -17
  108. package/resources/locales/de/workbookAnomalies.cmd.json +14 -0
  109. package/resources/locales/en/groups.cmd.json +71 -11
  110. package/resources/locales/en/ui.msg.json +298 -17
  111. package/resources/locales/en/workbookAnomalies.cmd.json +14 -0
  112. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +10 -4
  113. package/types/src/anomalies/AnomaliesCommands.d.ts +8 -0
  114. package/types/src/anomalies/AnomaliesMessages.d.ts +30 -0
  115. package/types/src/anomalies/AnomaliesPlugin.d.ts +12 -0
  116. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  117. package/types/src/anomalies/_source.d.ts +7 -0
  118. package/types/src/anomalies/index.d.ts +3 -0
  119. package/types/src/border/BorderPopupButton.d.ts +1 -1
  120. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  121. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  122. package/types/src/chart/ChartPlugin.d.ts +6 -0
  123. package/types/src/chart/index.d.ts +3 -0
  124. package/types/src/color/ColorPopupButton.d.ts +1 -1
  125. package/types/src/command/AccountingStyleCommandButton.d.ts +1 -1
  126. package/types/src/command/ColorCommandButton.d.ts +5 -0
  127. package/types/src/command/DocThemeCommandButton.d.ts +1 -1
  128. package/types/src/command/FontFamilyCommandButton.d.ts +1 -1
  129. package/types/src/command/FontSizeCommandButton.d.ts +1 -1
  130. package/types/src/command/InsertCellControlCommandButton.d.ts +17 -0
  131. package/types/src/command/LanguageCommandButton.d.ts +1 -1
  132. package/types/src/command/LocaleCommandButton.d.ts +1 -1
  133. package/types/src/command/PresetCellStylesCommandButton.d.ts +3 -3
  134. package/types/src/command/PresetPivotStylesCommandButton.d.ts +17 -0
  135. package/types/src/command/SheetZoomCommandButton.d.ts +4 -3
  136. package/types/src/command/index.d.ts +2 -0
  137. package/types/src/comments/CommentCard.d.ts +41 -0
  138. package/types/src/comments/CommentsPlugin.d.ts +6 -0
  139. package/types/src/comments/CommentsTaskPane.d.ts +23 -0
  140. package/types/src/comments/index.d.ts +4 -0
  141. package/types/src/conditionalFormat/ConditionalFormatPlugin.d.ts +1 -1
  142. package/types/src/conditionalFormat/ConditionalFormatStylePicker.d.ts +4 -4
  143. package/types/src/conditionalFormat/IconPickerPopupButton.d.ts +3 -3
  144. package/types/src/conditionalFormat/IconSetRulePanel.d.ts +1 -1
  145. package/types/src/conditions/BetweenOption.d.ts +5 -0
  146. package/types/src/conditions/CombinatorOption.d.ts +7 -0
  147. package/types/src/conditions/ConditionEditor.d.ts +55 -3
  148. package/types/src/conditions/ConditionUtils.d.ts +34 -6
  149. package/types/src/conditions/ExpressionOption.d.ts +6 -0
  150. package/types/src/conditions/MembershipOption.d.ts +67 -0
  151. package/types/src/conditions/OperatorAndParamEditor.d.ts +36 -1
  152. package/types/src/conditions/OperatorSelectPopupButton.d.ts +1 -1
  153. package/types/src/conditions/ScalarOption.d.ts +19 -0
  154. package/types/src/conditions/SelectorSelect.d.ts +16 -7
  155. package/types/src/conditions/index.d.ts +1 -1
  156. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  157. package/types/src/dataValidation/DataValidationEditorPanel.d.ts +9 -5
  158. package/types/src/dataValidation/DataValidationIcon.d.ts +1 -1
  159. package/types/src/dataValidation/DataValidationPlugin.d.ts +1 -1
  160. package/types/src/dialog/HyperlinkDialog.d.ts +15 -0
  161. package/types/src/dialog/OutlineSettingsDialog.d.ts +12 -0
  162. package/types/src/dialog/PivotTableNewDialog.d.ts +11 -0
  163. package/types/src/dialog/SparklineEditDialog.d.ts +10 -0
  164. package/types/src/dialog/SparklineNewDialog.d.ts +23 -0
  165. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  166. package/types/src/dialog/_ShortcutSearch.d.ts +26 -0
  167. package/types/src/dialog/index.d.ts +0 -1
  168. package/types/src/externalLink/ExternalLinkSettingsTab.d.ts +1 -1
  169. package/types/src/externalLink/ExternalLinksPlugin.d.ts +1 -1
  170. package/types/src/fill/GradientEditor.d.ts +15 -13
  171. package/types/src/fill/GradientStopsBar.d.ts +43 -0
  172. package/types/src/fill/PatternPopupButton.d.ts +1 -1
  173. package/types/src/fill/index.d.ts +1 -0
  174. package/types/src/filter/ColumnMenu.d.ts +31 -1
  175. package/types/src/filter/PivotMenu.d.ts +31 -0
  176. package/types/src/filter/index.d.ts +1 -1
  177. package/types/src/form/FormulaField.d.ts +10 -4
  178. package/types/src/form/InputField.d.ts +5 -5
  179. package/types/src/format/AlignmentPanel.d.ts +1 -2
  180. package/types/src/format/BorderPreview.d.ts +33 -16
  181. package/types/src/format/FillPanel.d.ts +42 -2
  182. package/types/src/format/FormatPanelParts.d.ts +3 -1
  183. package/types/src/format/FormatPlugin.d.ts +1 -6
  184. package/types/src/format/LinePanel.d.ts +53 -0
  185. package/types/src/format/LinePreviews.d.ts +71 -0
  186. package/types/src/format/index.d.ts +1 -0
  187. package/types/src/format/useFormatSelection.d.ts +7 -6
  188. package/types/src/formulaBar/IFormulaBar.d.ts +32 -3
  189. package/types/src/formulaBar/MobileFormulaBar.d.ts +42 -0
  190. package/types/src/formulaBar/MobileInputToolbar.d.ts +43 -0
  191. package/types/src/formulaBar/index.d.ts +3 -0
  192. package/types/src/formulaBar/useFormulaBarSession.d.ts +68 -0
  193. package/types/src/index.d.ts +19 -5
  194. package/types/src/itemsPanel/EditorCommit.d.ts +32 -0
  195. package/types/src/itemsPanel/EditorPanel.d.ts +1 -2
  196. package/types/src/itemsPanel/ItemCard.d.ts +50 -7
  197. package/types/src/itemsPanel/ItemsDescriptor.d.ts +13 -0
  198. package/types/src/itemsPanel/ItemsPanel.d.ts +5 -0
  199. package/types/src/itemsPanel/ItemsSearchField.d.ts +17 -0
  200. package/types/src/itemsPanel/index.d.ts +2 -0
  201. package/types/src/named/NamedDetailsPanel.d.ts +2 -2
  202. package/types/src/named/NamedPlugin.d.ts +1 -1
  203. package/types/src/picture/PicturePlugin.d.ts +6 -0
  204. package/types/src/picture/index.d.ts +2 -0
  205. package/types/src/pivot/PivotChipMenu.d.ts +10 -0
  206. package/types/src/pivot/PivotPlugin.d.ts +3 -0
  207. package/types/src/pivot/PivotStyleCanvasPreview.d.ts +23 -0
  208. package/types/src/pivot/PivotTableHeader.d.ts +12 -0
  209. package/types/src/pivot/PivotValueSettingsDialog.d.ts +15 -0
  210. package/types/src/pivot/_pivotSource.d.ts +7 -0
  211. package/types/src/presence/PresenceOverlay.d.ts +14 -0
  212. package/types/src/presence/PresencePlugin.d.ts +31 -0
  213. package/types/src/presence/PresenceStrip.d.ts +22 -0
  214. package/types/src/presence/PresenceTaskPane.d.ts +13 -0
  215. package/types/src/presence/Timeline.d.ts +29 -0
  216. package/types/src/presence/index.d.ts +5 -0
  217. package/types/src/protection/ProtectedCellsPanel.d.ts +3 -3
  218. package/types/src/protection/ProtectionPlugin.d.ts +1 -1
  219. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  220. package/types/src/protection/index.d.ts +1 -1
  221. package/types/src/shape/ShapeFormatPanel.d.ts +11 -0
  222. package/types/src/shape/ShapeGalleryCommandButton.d.ts +18 -0
  223. package/types/src/shape/ShapePlugin.d.ts +8 -0
  224. package/types/src/shape/index.d.ts +3 -0
  225. package/types/src/slicer/InsertSlicerCommandButton.d.ts +13 -0
  226. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +12 -0
  227. package/types/src/slicer/SlicerPlugin.d.ts +6 -0
  228. package/types/src/slicer/index.d.ts +3 -0
  229. package/types/src/statusBar/PendingStatus.d.ts +19 -0
  230. package/types/src/statusBar/SheetZoomScale.d.ts +6 -0
  231. package/types/src/statusBar/index.d.ts +1 -0
  232. package/types/src/studio/CommandsWrapper.d.ts +2 -0
  233. package/types/src/studio/StudioCommandProvider.d.ts +7 -0
  234. package/types/src/studio/StudioCommands.d.ts +2 -2
  235. package/types/src/studio/StudioProps.d.ts +50 -22
  236. package/types/src/studio/StudioSplitPane.d.ts +1 -1
  237. package/types/src/studio/formulaBarPlacement.d.ts +35 -0
  238. package/types/src/studio/useStudioApp.d.ts +23 -23
  239. package/types/src/table/TablePlugin.d.ts +1 -1
  240. package/types/src/table/_drawStyleSwatch.d.ts +25 -0
  241. package/types/src/template/TemplateDialog.d.ts +1 -1
  242. package/types/src/template/TemplatePanel.d.ts +5 -1
  243. package/types/src/template/TemplateSearchField.d.ts +17 -1
  244. package/types/src/template/categoryColor.d.ts +8 -0
  245. package/types/src/template/useTemplateCatalog.d.ts +7 -5
  246. package/types/src/theme/ThemeSelectPopupButton.d.ts +1 -1
  247. package/types/src/toolbar/WorkbookToolbars.d.ts +2 -2
  248. package/types/src/workbook/DefaultRenderers.d.ts +45 -15
  249. package/types/src/workbook/OutlineButtons.d.ts +11 -0
  250. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  251. package/types/src/workbook/WorkbookElement.d.ts +5 -4
  252. package/types/src/workbook/WorkbookStrip.d.ts +8 -7
  253. package/types/src/workbook/index.d.ts +1 -1
  254. package/browser/cjs/3k_KqDFr-AybPztc.cjs +0 -5
  255. package/browser/cjs/3uprnzi2l0iT17Dg.cjs +0 -1
  256. package/browser/cjs/B9GcCj7sj8XdjPZF.cjs +0 -1
  257. package/browser/cjs/BGvoJjUs21bbuE1i.cjs +0 -1
  258. package/browser/cjs/BHb7TnK1NmimV4OX.cjs +0 -1
  259. package/browser/cjs/BJ-wdkCaXqJaejKf.cjs +0 -1
  260. package/browser/cjs/BNqyPYRxYISp-uEg.cjs +0 -1
  261. package/browser/cjs/BQJKf40kttQWOzLw.cjs +0 -20
  262. package/browser/cjs/BTZ5uzK0wHzpiZGC.cjs +0 -1
  263. package/browser/cjs/BXkdjAb4jpTr412c.cjs +0 -1
  264. package/browser/cjs/Bc-YisjBtD56vBAW.cjs +0 -1
  265. package/browser/cjs/Bo9Kx3L_XQkGPBJ5.cjs +0 -1
  266. package/browser/cjs/C97KHSuikAbr1qVM.cjs +0 -1
  267. package/browser/cjs/CPSc2VSYZeZ1B9mi.cjs +0 -1
  268. package/browser/cjs/CPcBvw4ZPwHVTUZF.cjs +0 -1
  269. package/browser/cjs/CdDYyAfccXme8w6m.cjs +0 -1
  270. package/browser/cjs/CuqM721PsKey3yMP.cjs +0 -1
  271. package/browser/cjs/Cy_XmYq6BsWmCXkk.cjs +0 -3
  272. package/browser/cjs/D948H7ell-f87BX3.cjs +0 -1
  273. package/browser/cjs/Dy6O3OWbDBKIj_Ak.cjs +0 -8
  274. package/browser/cjs/KZvriGbhEOVkQD0b.cjs +0 -1
  275. package/browser/cjs/M0_dvdYwhikqP9kg.cjs +0 -2
  276. package/browser/cjs/QI6GKw7uo1f8gY8C.cjs +0 -1
  277. package/browser/cjs/eCw4rAEIYE3BftpG.cjs +0 -1
  278. package/browser/cjs/iMWEL01eC83oU-YY.cjs +0 -1
  279. package/browser/cjs/index.cjs +0 -2
  280. package/browser/cjs/rCZbExyf1Q3aHloQ.cjs +0 -13
  281. package/browser/esm/894KM-_Oc5cB6ExA.mjs +0 -97
  282. package/browser/esm/BQSamOMBAoFdQdJe.mjs +0 -12903
  283. package/browser/esm/CIbDvsCeLOFHzzId.mjs +0 -152
  284. package/browser/esm/CyHNVjgkMYZYlJpY.mjs +0 -5315
  285. package/browser/esm/D8VPmFDvXDE778_x.mjs +0 -222
  286. package/browser/esm/DEEnXLhYlUARg6MU.mjs +0 -410
  287. package/browser/esm/DN4cwAPYCrtR4gS9.mjs +0 -236
  288. package/browser/esm/DlEshYp6NPfHxFvI.mjs +0 -115
  289. package/browser/esm/GmQ9XFFY3hi1L_Ej.mjs +0 -1150
  290. package/browser/esm/z3zkU7Jf3WJ2_Z_P.mjs +0 -52
  291. package/node/esm/BI8XFczUY--Db2n3.mjs +0 -98
  292. package/node/esm/BgxeTfCn3jZHGwd7.mjs +0 -414
  293. package/node/esm/C_oV7ldFStOF_fAd.mjs +0 -115
  294. package/node/esm/Dbv0IltYad9SQrj3.mjs +0 -236
  295. package/node/esm/OmUP1AfaJcOxWQAg.mjs +0 -4462
  296. package/types/src/conditions/DateTimeOption.d.ts +0 -43
  297. package/types/src/conditions/ListSourceOption.d.ts +0 -31
  298. package/types/src/dialog/CommentsDialog.d.ts +0 -11
  299. package/types/src/filter/FilterList.d.ts +0 -31
@@ -1,107 +1,203 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._sheetxl-reset_11z3j_1{margin:0;padding:0;line-height:1;display:block}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{border-collapse:inherit;border-spacing:0;border:none;border-color:inherit;width:auto;height:auto;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;margin:0;padding:0;display:block}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{user-select:none;grid-template-columns:1fr;display:grid;@container (width>600px){grid-template-rows:repeat(3,auto);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px}}._range-row_1yps2_1{flex-direction:column;flex:100%;align-items:center;row-gap:8px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-between;gap:12px}}._action-row_1yps2_17{flex-direction:column;align-items:start;gap:4px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-evenly;align-items:center}}._details-panel_mdq6z_1{box-sizing:border-box;background:0 0;flex-direction:column;flex:auto;align-items:stretch;width:100%;height:100%;display:flex;overflow:hidden}._editor_mdq6z_13{flex-direction:column;height:100%;display:flex}._editor-panel_mdq6z_19{flex-direction:column;display:flex}._editor-buttons_mdq6z_24{justify-content:flex-end;display:flex}._card_mdq6z_29{flex-direction:column;display:flex}._stats-items_151a8_1{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;min-width:0;max-height:1rem;display:flex;overflow:hidden}._stats-item_151a8_1{flex-shrink:0}._stats-item-label_151a8_15{user-select:none;white-space:nowrap;cursor:pointer;border-radius:2px;align-items:center;gap:4px;padding:0 4px;transition:background-color .2s;display:flex}._stats-item-label_151a8_15:hover{background-color:#0000000a}._stats-item-label_151a8_15:active{background-color:#00000014}._formula-bar_uer84_1{flex-direction:row;flex:100%;align-items:start;display:flex}._card_h0jnt_7{width:100%}._actionRoot_h0jnt_11{justify-content:space-between;padding:8px 8px 8px 16px}._icons_h0jnt_16{align-items:center;margin-left:auto;display:flex}._expand_h0jnt_22{color:var(--sxl-color-error-content);padding:8px;transition:all .2s ease-in-out;transform:rotate(0)}._expandOpen_h0jnt_29{transform:rotate(180deg)}._stackTraceContainer_h0jnt_33{padding:16px}._paper_h0jnt_37{background-color:#fff;padding:16px}._checkIcon_h0jnt_42{padding-right:4px;font-size:20px}._button_h0jnt_47{text-transform:none;padding:0}._styled-resizer_fdl5y_3{background-color:var(--sxl-color-neutral,grey)}._styled-resizer_fdl5y_3:hover,.splitPane.dragging ._styled-resizer_fdl5y_3{background-color:var(--sxl-color-primary,blue)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`._sheetxl-reset_11z3j_1{margin:0;padding:0;line-height:1;display:block}._sheetxl-reset_11z3j_1 table,._sheetxl-reset_11z3j_1 thead,._sheetxl-reset_11z3j_1 tbody,._sheetxl-reset_11z3j_1 tfoot,._sheetxl-reset_11z3j_1 tr,._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{border-collapse:inherit;border-spacing:0;border:none;border-color:inherit;width:auto;height:auto;vertical-align:inherit;text-align:left;font-weight:inherit;-webkit-border-horizontal-spacing:0;-webkit-border-vertical-spacing:0;margin:0;padding:0;display:block}._sheetxl-reset_11z3j_1 th,._sheetxl-reset_11z3j_1 td{display:inline}html{color:initial}._stats-items_151a8_1{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:2px;min-width:0;max-height:1rem;display:flex;overflow:hidden}._stats-item_151a8_1{flex-shrink:0}._stats-item-label_151a8_15{user-select:none;white-space:nowrap;cursor:pointer;border-radius:2px;align-items:center;gap:4px;padding:0 4px;transition:background-color .2s;display:flex}._stats-item-label_151a8_15:hover{background-color:#0000000a}._stats-item-label_151a8_15:active{background-color:#00000014}._formula-bar_uer84_1{flex-direction:row;flex:100%;align-items:start;display:flex}._details-panel_mdq6z_1{box-sizing:border-box;background:0 0;flex-direction:column;flex:auto;align-items:stretch;width:100%;height:100%;display:flex;overflow:hidden}._editor_mdq6z_13{flex-direction:column;height:100%;display:flex}._editor-panel_mdq6z_19{flex-direction:column;display:flex}._editor-buttons_mdq6z_24{justify-content:flex-end;display:flex}._card_mdq6z_29{flex-direction:column;display:flex}._table-style-options-container_1kfn2_1{container-type:inline-size}._table-style-options_1kfn2_1{user-select:none;grid-template-columns:1fr;display:grid;@container (width>600px){grid-template-rows:repeat(3,auto);grid-auto-columns:1fr;grid-auto-flow:column;gap:2px}}._range-row_1yps2_1{flex-direction:column;flex:100%;align-items:center;row-gap:8px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-between;gap:12px}}._action-row_1yps2_17{flex-direction:column;align-items:start;gap:4px;width:100%;display:flex;@container (width>600px){flex-direction:row;justify-content:space-evenly;align-items:center}}._card_h0jnt_7{width:100%}._actionRoot_h0jnt_11{justify-content:space-between;padding:8px 8px 8px 16px}._icons_h0jnt_16{align-items:center;margin-left:auto;display:flex}._expand_h0jnt_22{color:var(--sxl-color-error-content);padding:8px;transition:all .2s ease-in-out;transform:rotate(0)}._expandOpen_h0jnt_29{transform:rotate(180deg)}._stackTraceContainer_h0jnt_33{padding:16px}._paper_h0jnt_37{background-color:#fff;padding:16px}._checkIcon_h0jnt_42{padding-right:4px;font-size:20px}._button_h0jnt_47{text-transform:none;padding:0}._styled-resizer_fdl5y_3{background-color:var(--sxl-color-neutral,grey)}._styled-resizer_fdl5y_3:hover,.splitPane.dragging ._styled-resizer_fdl5y_3{background-color:var(--sxl-color-primary,blue)}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
2
  /**
3
- * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.2
3
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.20
4
4
  *
5
5
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
6
- * License: The license can be found at https://www.sheetxl.com/license.
6
+ * License: MIT
7
7
  */
8
- import { $ as e, $t as t, A as n, An as r, At as i, B as a, C as o, Cn as s, Ct as c, D as l, Dn as u, Dt as d, E as f, En as p, Et as m, F as h, G as g, H as _, I as v, J as y, Jt as b, K as x, L as S, M as C, Mn as ee, N as te, Nn as ne, O as re, On as ie, Ot as ae, P as oe, Pn as se, Q as ce, Qt as le, R as ue, S as de, Sn as fe, St as pe, T as me, Tn as he, Tt as ge, U as _e, V as ve, W as ye, X as be, Xt as xe, Y as Se, Yt as Ce, Z as we, Zt as Te, _ as Ee, _n as De, _t as Oe, an as ke, at as Ae, b as je, bn as Me, bt as Ne, c as Pe, cn as Fe, ct as Ie, d as Le, dn as Re, dt as ze, en as Be, et as Ve, f as He, fn as Ue, ft as We, g as Ge, gn as Ke, gt as qe, h as Je, hn as Ye, ht as Xe, i as Ze, in as Qe, it as $e, j as et, jn as tt, k as nt, kn as rt, kt as it, ln as at, lt as ot, m as st, mn as ct, mt as lt, n as ut, nn as dt, nt as ft, ot as pt, p as mt, pn as ht, pt as gt, q as _t, qt as vt, r as yt, rn as bt, rt as xt, s as St, sn as Ct, st as wt, tn as Tt, tt as Et, u as Dt, un as Ot, ut as kt, v as At, vn as jt, vt as Mt, w as Nt, wn as Pt, wt as Ft, x as It, xn as Lt, xt as Rt, y as zt, yn as Bt, yt as Vt, z as Ht } from "./BQSamOMBAoFdQdJe.mjs";
9
- import { t as Ut } from "./DIGlcemS7napWyKW.mjs";
10
- import { i as w, n as T, r as E } from "./z3zkU7Jf3WJ2_Z_P.mjs";
11
- import { n as Wt, t as Gt } from "./D8VPmFDvXDE778_x.mjs";
12
- import { t as Kt } from "./CIbDvsCeLOFHzzId.mjs";
13
- import { a as qt, i as Jt, n as Yt, o as Xt, r as Zt, t as Qt } from "./Dv3hSCyjvwo6GcH1.mjs";
14
- import { LicenseManager as $t, LicenseManager as en } from "@sheetxl/sdk";
15
- import { DefaultTaskPaneRegistry as tn, ThemeStateKey as nn, WorkbookIO as rn, WorkbookIO as D, setPrintExamplesOnLoad as an, useModelListener as on, useRangeListener as sn, useWindowChrome as cn, useWorkbook as ln, useWorkbookFormat as un, useWorkbookName as dn } from "@sheetxl/react";
16
- import { CommandButtonType as O, createThemeScopeClass as fn, lazyComponent as pn, useCallbackRef as k, useCommandButtonEntry as A, useCommandButtonRegistry as mn, useCommands as j, usePersistenceState as hn, useResolvedThemeMode as gn, useTranslator as _n } from "@sheetxl/utils-react";
17
- import { Suspense as vn, createElement as M, forwardRef as N, memo as P, useCallback as F, useEffect as I, useId as yn, useMemo as L, useRef as R, useState as z } from "react";
18
- import { CommandButton as B, CommandGroup as bn, CommandPopupButton as V, ExhibitDivider as H, LabelIcon as xn, LazyLoadErrorPanel as Sn, OptionsDialog as Cn, defaultCreatePopupPanel as U, renderMembers as wn } from "@sheetxl/utils-mui";
19
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
20
- import { Box as q, Paper as Tn, TextField as J, Typography as En, useMediaQuery as Dn } from "@mui/material";
21
- import { LazyModules as On, defineLazyModule as kn } from "@sheetxl/utils";
22
- var Y = Object.defineProperty, An = (e, t) => {
23
- let n = {};
24
- for (var r in e) Y(n, r, {
25
- get: e[r],
26
- enumerable: !0
8
+ import { $ as e, A as t, At as n, B as r, C as i, Ct as a, D as o, Dt as s, E as c, Et as l, F as u, G as d, H as f, I as p, J as m, K as h, L as g, M as _, N as v, O as y, Ot as b, P as x, Q as S, R as C, S as w, St as T, T as E, Tt as D, U as O, V as k, W as A, X as j, Y as M, Z as N, _ as P, _t as ee, a as te, at as ne, b as F, bt as re, c as ie, ct as I, d as ae, dt as oe, et as se, f as ce, ft as le, g as ue, gt as de, h as fe, ht as pe, i as me, it as he, j as ge, jt as _e, k as ve, kt as ye, l as be, lt as xe, m as Se, mt as Ce, n as we, nt as Te, o as Ee, ot as De, p as Oe, pt as ke, q as Ae, r as je, rt as Me, s as Ne, tt as Pe, u as Fe, ut as Ie, v as Le, vt as Re, w as ze, wt as Be, x as Ve, xt as He, y as Ue, yt as We, z as Ge } from "./mlTMBwB5PG7Fo1mU.mjs";
9
+ import { c as Ke, i as qe, l as Je, n as Ye, o as Xe, r as Ze, s as Qe, t as $e } from "./D-3WlyQuxUZCwLkb.mjs";
10
+ import { t as et } from "./DIZ9pueRPHaNzQqo.mjs";
11
+ import { a as tt } from "./B4L3swgLGqcOHo7U.mjs";
12
+ import { t as L } from "./BENsK9C3A3CnZyXZ.mjs";
13
+ import { n as nt, r as rt, t as it } from "./DHrJOjy3Du7ZBo96.mjs";
14
+ import { a as at, i as ot, r as st } from "./D3Aests6-QUrBfmJ.mjs";
15
+ import { a as ct, n as lt, t as ut } from "./ClqW5S7FR6Pwmp1U.mjs";
16
+ import { t as dt } from "./DdtM4Sy4hFIFwWvO.mjs";
17
+ import { n as ft, t as pt } from "./CSgwY4Yb3l0WoprP.mjs";
18
+ import { t as mt } from "./LOzFCd9lrGWhNoCz.mjs";
19
+ import { n as ht, r as gt, t as _t } from "./UC9qbIWz2dYrCbJn.mjs";
20
+ import { a as vt, i as yt, n as bt, o as xt, r as St, t as Ct } from "./C5ZWkOAoFpcZwFw2.mjs";
21
+ import { t as wt } from "./DCxc5HMSf1ZSHRoi.mjs";
22
+ import { t as Tt } from "./BAFzUBAc7BpGUWl_.mjs";
23
+ import { Color as Et, IFill as R, LicenseManager as Dt, LicenseManager as Ot } from "@sheetxl/sdk";
24
+ import { DEFAULT_ANNOTATION_STYLES as kt, DefaultSheetLayersRegistry as At, DefaultTaskPaneRegistry as jt, DefaultTaskPaneRegistry as Mt, PRESENCE_ICON as Nt, PRESENCE_PANE_KEY as Pt, PRESENCE_PIN_ICON as Ft, PresenceCommandKeys as It, PresenceMessages as z, PresenceStore as Lt, RangeAnnotationLayer as Rt, ThemeStateDefaults as zt, ThemeStateKey as Bt, WorkbookIO as Vt, WorkbookIO as Ht, createPresenceCommands as Ut, getRangeAnnotationState as Wt, isWalkedIntent as Gt, registerPresenceCommandChrome as Kt, setPrintExamplesOnLoad as qt, useInputField as Jt, useModelListener as Yt, usePresenceCommits as Xt, usePresenceSnapshot as Zt, useRangeListener as Qt, useWindowChrome as $t, useWorkbook as en, useWorkbookFormat as tn, useWorkbookName as nn } from "@sheetxl/react";
25
+ import { Command as rn, CommandButtonType as an, DynamicIcon as B, RenderSlot as on, ThemeModeFallbackContext as sn, createThemeScopeClass as cn, lazyComponent as ln, useCallbackRef as V, useCommandButtonEntry as un, useCommandButtonRegistry as dn, useCommands as fn, useFloatStack as pn, useLocationSearch as mn, usePersistentState as hn, useResolvedThemeMode as gn, useTextSelectionDrag as _n, useTranslator as H } from "@sheetxl/utils-react";
26
+ import vn, { Suspense as yn, createElement as U, forwardRef as bn, memo as W, useCallback as xn, useEffect as G, useId as Sn, useImperativeHandle as Cn, useLayoutEffect as wn, useMemo as K, useRef as q, useState as J } from "react";
27
+ import { CommandButton as Y, CommandGroup as Tn, CommandPopupButton as En, ExhibitDivider as Dn, ExhibitIconButton as On, ExhibitPopupIconButton as kn, ExhibitTooltip as An, LabelIcon as jn, LazyLoadErrorPanel as Mn, SimpleTooltip as Nn, defaultRenderPopupPanel as Pn, renderMembers as Fn } from "@sheetxl/utils-mui";
28
+ import { Fragment as X, jsx as Z, jsxs as Q } from "react/jsx-runtime";
29
+ import { Box as $, Button as In, ButtonBase as Ln, Collapse as Rn, FormControl as zn, InputAdornment as Bn, InputLabel as Vn, Link as Hn, List as Un, ListItem as Wn, ListItemButton as Gn, ListItemText as Kn, MenuItem as qn, Paper as Jn, Select as Yn, Tab as Xn, Tabs as Zn, TextField as Qn, Typography as $n, useMediaQuery as er, useTheme as tr } from "@mui/material";
30
+ import { defineLazyModule as nr, t as rr } from "@sheetxl/utils";
31
+ var ir = (e) => {
32
+ e.button === 0 && e.preventDefault();
33
+ }, ar = W(bn((e, t) => {
34
+ let { disabled: n, className: r, sx: i, defaultInput: a, value: o, formName: s, formOptions: c, onChangeInput: l, onChangeText: u, onDone: d, changeOn: f, onValidate: p, apiRef: m, label: h, helperText: g, showError: _ = !0, onChangeError: v, hideAdornment: y, propsInput: b, onKeyDown: x, onFocus: S, ...C } = e, w = H(), T = _n(), E = h ?? w("namedInput.label"), D = dt(), O = s && D ? D.register(s, c) : null, k = Jt({
35
+ value: o ?? "",
36
+ onChange: l,
37
+ onChangeText: u,
38
+ onDone: d,
39
+ changeOn: f,
40
+ onValidate: p,
41
+ disabled: n
27
42
  });
28
- return t || Y(n, Symbol.toStringTag, { value: "Module" }), n;
29
- }, X = function(e) {
30
- var t = window.history, n = t[e];
31
- t[e] = function(t) {
32
- var r = n.apply(this, arguments), i = new Event(e.toLowerCase());
33
- return i.state = t, window.dispatchEvent(i), r;
34
- };
35
- };
36
- T && (X("pushState"), X("replaceState"));
37
- var Z = function(e) {
38
- var t = window.history, n = t.state, r = t.length, i = window.location;
39
- return {
40
- trigger: e,
41
- state: n,
42
- length: r,
43
- hash: i.hash,
44
- host: i.host,
45
- hostname: i.hostname,
46
- href: i.href,
47
- origin: i.origin,
48
- pathname: i.pathname,
49
- port: i.port,
50
- protocol: i.protocol,
51
- search: i.search
52
- };
53
- }, jn = T && typeof Event == "function" ? function() {
54
- var e = z(Z("load")), t = e[0], n = e[1];
55
- return I(function() {
56
- var e = function() {
57
- return n(Z("popstate"));
58
- }, t = function() {
59
- return n(Z("pushstate"));
60
- }, r = function() {
61
- return n(Z("replacestate"));
62
- };
63
- return w(window, "popstate", e), w(window, "pushstate", t), w(window, "replacestate", r), function() {
64
- E(window, "popstate", e), E(window, "pushstate", t), E(window, "replacestate", r);
65
- };
66
- }, []), t;
67
- } : function() {
68
- return {
69
- trigger: "load",
70
- length: 1
71
- };
72
- }, Q = P(N((e, t) => {
73
- let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = z([]), s = D.canWrite(), c = D.canRead();
74
- I(() => {
43
+ Cn(m, () => k, [k]);
44
+ let A = q(D);
45
+ A.current = D;
46
+ let j = q(v);
47
+ j.current = v;
48
+ let M = q(null);
49
+ G(() => {
50
+ if (k.error === M.current || (M.current = k.error, j.current?.(k.error), !s)) return;
51
+ let e = A.current;
52
+ e && (k.error ? e.setError(s, { message: w(k.error) }) : e.clearErrors(s));
53
+ }, [k.error, s]);
54
+ let N = f === "done", P = k.engaged && k.dirty, ee = K(() => {
55
+ if (!y && N) return Q(Bn, {
56
+ tabIndex: -1,
57
+ onMouseDown: ir,
58
+ "aria-hidden": !P,
59
+ sx: {
60
+ display: "flex",
61
+ position: "relative",
62
+ flex: "0",
63
+ ...P ? null : {
64
+ visibility: "hidden",
65
+ pointerEvents: "none"
66
+ }
67
+ },
68
+ position: "end",
69
+ children: [Z(On, {
70
+ dense: !0,
71
+ outlined: !1,
72
+ color: "primary",
73
+ "aria-label": "commit-input",
74
+ icon: Z(B, { iconKey: "CheckSuccess" }),
75
+ propsTooltip: {
76
+ label: w("referenceInput.commit"),
77
+ simple: !0
78
+ },
79
+ disabled: !!k.error,
80
+ tabIndex: -1,
81
+ onMouseDown: ir,
82
+ onClick: () => {
83
+ k.commit();
84
+ }
85
+ }), Z(On, {
86
+ dense: !0,
87
+ outlined: !1,
88
+ color: "warning",
89
+ "aria-label": "cancel-input",
90
+ icon: Z(B, { iconKey: "CloseError" }),
91
+ propsTooltip: {
92
+ label: w("referenceInput.cancel"),
93
+ simple: !0
94
+ },
95
+ tabIndex: -1,
96
+ onMouseDown: ir,
97
+ onClick: () => {
98
+ k.cancel();
99
+ }
100
+ })]
101
+ });
102
+ }, [
103
+ y,
104
+ N,
105
+ P,
106
+ k.commit,
107
+ k.cancel,
108
+ !!k.error
109
+ ]);
110
+ return Z(zn, {
111
+ sx: {
112
+ minWidth: 135,
113
+ width: "100%",
114
+ ...i
115
+ },
116
+ size: "small",
117
+ ref: t,
118
+ className: L("sxl-input-field", r),
119
+ ...C,
120
+ children: Z(Qn, {
121
+ label: E,
122
+ placeholder: a,
123
+ disabled: n,
124
+ error: !!k.error,
125
+ helperText: k.error && _ ? w(k.error) : g === void 0 ? " " : g,
126
+ sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
127
+ slotProps: {
128
+ input: { endAdornment: ee },
129
+ inputLabel: { shrink: !0 },
130
+ htmlInput: {
131
+ spellCheck: !1,
132
+ autoComplete: "off",
133
+ onPointerDown: T.onPointerDown,
134
+ onDragStart: T.onDragStart,
135
+ ...b,
136
+ className: L("autoFocus", b?.className),
137
+ name: s,
138
+ readOnly: n,
139
+ sx: {
140
+ paddingTop: (e) => e.spacing(1.25),
141
+ paddingBottom: (e) => e.spacing(.75)
142
+ }
143
+ }
144
+ },
145
+ value: k.inputProps.value,
146
+ inputRef: (e) => {
147
+ k.inputProps.ref(e), O?.ref && O.ref(e);
148
+ },
149
+ onChange: (e) => {
150
+ k.inputProps.onChange(e), O?.onChange(e);
151
+ },
152
+ onKeyDown: (e) => {
153
+ k.inputProps.onKeyDown(e), e.defaultPrevented || x?.(e);
154
+ },
155
+ onFocus: (e) => {
156
+ k.inputProps.onFocus(e), S?.(e);
157
+ },
158
+ onBlur: (e) => {
159
+ k.inputProps.onBlur(e), O?.onBlur(e);
160
+ },
161
+ onContextMenu: (e) => {
162
+ e.stopPropagation();
163
+ }
164
+ })
165
+ });
166
+ }));
167
+ ar.displayName = "InputField";
168
+ var or = W(bn((e, t) => {
169
+ let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s = Ht.canWrite(), c = Ht.canRead();
170
+ G(() => {
75
171
  let e = !0;
76
- return D.getWriteFormats().then((t) => {
172
+ return Ht.getWriteFormats().then((t) => {
77
173
  e && o(t);
78
174
  }), () => {
79
175
  e = !1;
80
176
  };
81
177
  }, []);
82
- let l = un(ln()), u = L(() => {
178
+ let l = en(), u = tn(l), d = K(() => {
83
179
  if (a.length === 0) return null;
84
- let e = l?.toLowerCase();
180
+ let e = u?.toLowerCase();
85
181
  return (e ? a.find((t) => t.key.toLowerCase() === e) ?? a.find((t) => t.exts?.some((t) => t.toLowerCase() === e)) : void 0) ?? a.find((e) => e.exts?.some((e) => e.toLowerCase() === "sxl")) ?? a.find((e) => !e.advanced) ?? a[0];
86
- }, [a, l]), [d] = j(u ? `saveWorkbookAs${u.key}` : []), f = mn(), p = f.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], m = k((e) => {
182
+ }, [a, u]), [f] = fn(d ? `saveWorkbookAs${d.key}` : []), p = dn(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = V((e) => {
87
183
  let t = {
88
- variant: O.Menuitem,
184
+ variant: an.Menuitem,
89
185
  groupKey: n,
90
186
  disabled: r
91
- }, i = K(W, { children: [
92
- p.length > 1 ? G(V, {
187
+ }, i = Q(X, { children: [
188
+ m.length > 1 ? Z(En, {
93
189
  ...t,
94
190
  quickCommand: "newWorkbook",
95
- createPopupPanel: (e) => {
96
- let t = wn(p, {
97
- variant: O.Menuitem,
191
+ renderPopupPanel: (e) => {
192
+ let t = Fn(m, {
193
+ variant: an.Menuitem,
98
194
  dividerOrientation: "horizontal",
99
195
  groupKey: "newWorkbookOptions",
100
- registry: f,
196
+ registry: p,
101
197
  propsCommandButton: { disabled: r },
102
198
  propsCommandPopup: { disabled: r }
103
199
  });
104
- return U({
200
+ return Pn({
105
201
  ...e,
106
202
  children: t,
107
203
  onClick: () => {
@@ -109,28 +205,28 @@ var Z = function(e) {
109
205
  }
110
206
  });
111
207
  }
112
- }) : G(B, {
208
+ }) : Z(Y, {
113
209
  ...t,
114
210
  commandKey: "newWorkbook"
115
211
  }),
116
- G(H, { orientation: "horizontal" }),
117
- c ? G(V, {
212
+ Z(Dn, { orientation: "horizontal" }),
213
+ c ? Z(En, {
118
214
  ...t,
119
215
  quickCommand: "openWorkbook",
120
- createPopupPanel: (e) => {
216
+ renderPopupPanel: (e) => {
121
217
  let n = {
122
218
  ...t,
123
219
  groupKey: "openWorkbookOptions"
124
- }, r = [M(B, {
220
+ }, r = [U(Y, {
125
221
  ...n,
126
222
  key: "device",
127
223
  commandKey: "openWorkbook"
128
- }), M(B, {
224
+ }), U(Y, {
129
225
  ...n,
130
226
  key: "web",
131
227
  commandKey: "openWorkbookFromUrl"
132
228
  })];
133
- return U({
229
+ return Pn({
134
230
  ...e,
135
231
  children: r,
136
232
  onClick: () => {
@@ -139,28 +235,28 @@ var Z = function(e) {
139
235
  });
140
236
  }
141
237
  }) : null,
142
- s && a.length > 0 ? G(V, {
238
+ s && a.length > 0 ? Z(En, {
143
239
  ...t,
144
240
  quickCommand: "saveWorkbook",
145
- createPopupPanel: (e) => {
241
+ renderPopupPanel: (e) => {
146
242
  let n = {
147
243
  ...t,
148
244
  groupKey: "saveWorkbookOptions"
149
- }, r = [M(B, {
245
+ }, r = [U(Y, {
150
246
  ...n,
151
247
  key: "saveWorkbookAs",
152
248
  commandKey: "saveWorkbookAs",
153
- label: d?.getLabel("saveWorkbookOptions"),
154
- icon: d?.getIcon("saveWorkbookOptions")
155
- })], i = a.filter((e) => !e.advanced && e.key !== u?.key);
156
- return i.length > 0 && r.push(G(H, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
249
+ label: f?.getLabel("saveWorkbookOptions"),
250
+ icon: f?.getIcon("saveWorkbookOptions")
251
+ })], i = a.filter((e) => !e.advanced && e.key !== d?.key);
252
+ return i.length > 0 && r.push(Z(Dn, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
157
253
  let t = e.key, i = `saveWorkbookAs${t}`;
158
- r.push(M(B, {
254
+ r.push(U(Y, {
159
255
  ...n,
160
256
  key: t,
161
257
  commandKey: i
162
258
  }));
163
- }), U({
259
+ }), Pn({
164
260
  ...e,
165
261
  children: r,
166
262
  onClick: () => {
@@ -170,7 +266,7 @@ var Z = function(e) {
170
266
  }
171
267
  }) : null
172
268
  ] });
173
- return U({
269
+ return Pn({
174
270
  ...e,
175
271
  children: i,
176
272
  onClick: (t) => {
@@ -181,16 +277,16 @@ var Z = function(e) {
181
277
  r,
182
278
  n,
183
279
  a,
184
- u,
185
280
  d,
186
- p,
187
- f
188
- ]), h = A("fileOptions"), g = h?.getLabel?.() ?? "File";
189
- return G(V, {
281
+ f,
282
+ m,
283
+ p
284
+ ]), g = un("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
285
+ return Z(En, {
190
286
  disabled: r,
191
287
  groupKey: n,
192
- label: g,
193
- tooltip: h?.getDescription?.() ?? "Options for saving and loading the workbook.",
288
+ label: _,
289
+ tooltip: v,
194
290
  sx: {
195
291
  paddingBottom: "0px",
196
292
  "& button": {
@@ -200,41 +296,41 @@ var Z = function(e) {
200
296
  }
201
297
  },
202
298
  ...i,
203
- createPopupPanel: m,
204
- icon: G(xn, {
299
+ renderPopupPanel: h,
300
+ icon: Z(jn, {
205
301
  className: "label",
206
302
  icon: null,
207
- label: g
303
+ label: _
208
304
  })
209
305
  });
210
306
  }));
211
- Q.displayName = "FileCommandButton";
212
- var Mn = P(N((e, t) => {
213
- let { groupKey: n, disabled: r, ...i } = e, [a] = j(["themeMode"]), o = A("appearanceOptions"), s = k((e) => {
307
+ or.displayName = "FileCommandButton";
308
+ var sr = W(bn((e, t) => {
309
+ let { groupKey: n, disabled: r, ...i } = e, [a] = fn(["themeMode"]), o = un("appearanceOptions"), s = V((e) => {
214
310
  let t = {
215
- variant: O.Menuitem,
311
+ variant: an.Menuitem,
216
312
  groupKey: "appearanceOptions",
217
313
  disabled: r
218
- }, n = K(W, { children: [
219
- G(B, {
314
+ }, n = Q(X, { children: [
315
+ Z(Y, {
220
316
  ...t,
221
317
  commandKey: "themeMode"
222
318
  }),
223
- G(B, {
319
+ Z(Y, {
224
320
  ...t,
225
321
  commandKey: "defaultThemeMode"
226
322
  }),
227
- G(H, { orientation: "horizontal" }),
228
- G(B, {
323
+ Z(Dn, { orientation: "horizontal" }),
324
+ Z(Y, {
229
325
  ...t,
230
326
  commandKey: "enableDarkGrid"
231
327
  }),
232
- G(B, {
328
+ Z(Y, {
233
329
  ...t,
234
330
  commandKey: "enableDarkImages"
235
331
  })
236
332
  ] });
237
- return U({
333
+ return Pn({
238
334
  ...e,
239
335
  children: n
240
336
  });
@@ -242,11 +338,11 @@ var Mn = P(N((e, t) => {
242
338
  r,
243
339
  a,
244
340
  n
245
- ]), c = a?.getState(), l = Dn("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
246
- return G(V, {
341
+ ]), c = a?.getState(), l = er("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
342
+ return Z(En, {
247
343
  ref: t,
248
344
  quickCommand: "themeMode",
249
- createPopupPanel: s,
345
+ renderPopupPanel: s,
250
346
  label: o?.getLabel?.(),
251
347
  tooltip: o?.getDescription?.(),
252
348
  onQuickClick: () => {
@@ -255,109 +351,1604 @@ var Mn = P(N((e, t) => {
255
351
  selected: d,
256
352
  ...i
257
353
  });
258
- })), Nn = P(N((e, t) => {
354
+ })), cr = W(bn((e, t) => {
259
355
  let { ...n } = e;
260
- return G(bn, {
356
+ return Z(Tn, {
261
357
  ref: t,
262
358
  groupKey: "insertFunctionSumOptions",
263
359
  ...n
264
360
  });
265
361
  }));
266
- Nn.displayName = "InsertFunctionSumCommandPopupButton";
267
- var Pn = An({
268
- PasswordDialog: () => $,
269
- default: () => $
270
- }), $ = (e) => {
271
- let t = _n(), { description: n, requireCurrent: r = !1, onApply: i, title: a, sx: o, ...s } = e, [c, l] = z(""), [u, d] = z(""), [f, p] = z(""), [m, h] = z(!1), g = u === "", _ = f !== u, v = !g && !_;
272
- return G(Cn, {
273
- title: a ?? t(r ? "password.titleChange" : "password.title"),
274
- options: ["Ok", "Cancel"],
275
- defaultOption: "Ok",
276
- cancelOption: "Cancel",
277
- autoFocusSel: ".autoFocus",
362
+ cr.displayName = "InsertFunctionSumCommandPopupButton";
363
+ var lr = 20, ur = kt.working.chip, dr = "sxl-agent-strip-style";
364
+ function fr() {
365
+ if (typeof document > "u" || document.getElementById(dr)) return;
366
+ let e = document.createElement("style");
367
+ e.id = dr, e.textContent = `@keyframes sxl-agent-pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.25); opacity: 0; } }\n@keyframes sxl-agent-working { 0%, 60% { border-color: ${ur}; } 30% { border-color: transparent; } }`, document.head.appendChild(e);
368
+ }
369
+ var pr = ({ activity: e, children: t }) => {
370
+ fr();
371
+ let n = tr(), [r, i] = J(0), a = q(e), o = q(0), s = q(null);
372
+ return G(() => {
373
+ if (e === a.current) return;
374
+ let t = Date.now(), n = t - o.current > 3e3;
375
+ o.current = t, n && (i(e), s.current && clearTimeout(s.current), s.current = setTimeout(() => i(0), 1400));
376
+ }, [e]), G(() => () => {
377
+ s.current && clearTimeout(s.current);
378
+ }, []), Z($, {
278
379
  sx: {
279
- width: "380px",
280
- ...o
380
+ display: "flex",
381
+ alignItems: "center"
281
382
  },
282
- onValidateOption: (e) => e === "Cancel" || (h(!0), v),
283
- onOption: (e, t) => {
284
- if (!t && e === "Ok") return i(u, r ? c : void 0);
383
+ children: Q($, {
384
+ sx: {
385
+ position: "relative",
386
+ display: "flex",
387
+ alignItems: "center"
388
+ },
389
+ children: [r ? Z("span", {
390
+ "aria-hidden": !0,
391
+ style: {
392
+ position: "absolute",
393
+ inset: 0,
394
+ borderRadius: 6,
395
+ pointerEvents: "none",
396
+ border: `2px solid ${n.palette.primary.main}`,
397
+ animation: "sxl-agent-pulse 1400ms ease-out"
398
+ }
399
+ }, r) : null, t]
400
+ })
401
+ });
402
+ }, mr = {
403
+ tabIndex: -1,
404
+ onMouseDown: (e) => {
405
+ e.button === 0 && e.preventDefault();
406
+ },
407
+ disableRipple: !0
408
+ }, hr = {
409
+ width: lr,
410
+ height: lr,
411
+ padding: 0,
412
+ borderRadius: "50%",
413
+ "& .MuiTouchRipple-child": { borderRadius: "50% !important" }
414
+ }, gr = {
415
+ height: lr,
416
+ lineHeight: 1,
417
+ borderRadius: "10px"
418
+ }, _r = ({ title: e, iconKey: t, onClick: n, disabled: r, selected: i }) => Z(On, {
419
+ dense: !0,
420
+ ...mr,
421
+ "aria-label": e,
422
+ icon: Z(B, {
423
+ iconKey: t,
424
+ size: 16
425
+ }),
426
+ propsTooltip: { label: e },
427
+ disabled: r,
428
+ selected: i,
429
+ onClick: n,
430
+ sx: hr
431
+ }), vr = ({ open: e, max: t, className: n, children: r }) => Z($, {
432
+ className: n,
433
+ inert: !e,
434
+ sx: {
435
+ display: "flex",
436
+ justifyContent: "flex-end",
437
+ overflow: "hidden",
438
+ height: 24,
439
+ alignItems: "center",
440
+ maxWidth: e ? t : 0,
441
+ opacity: +!!e,
442
+ transition: "max-width 0.25s ease, opacity 0.2s ease"
443
+ },
444
+ children: Z($, {
445
+ sx: {
446
+ display: "flex",
447
+ alignItems: "center",
448
+ gap: .25,
449
+ flex: "0 0 auto"
285
450
  },
286
- ...s,
287
- children: K(q, {
451
+ children: r
452
+ })
453
+ }), yr = ({ store: e }) => {
454
+ fr();
455
+ let t = Zt(e), n = H(), [r, i] = J(!1), [a, o] = J(!1), s = q(null), { status: c, navigable: l, position: u, needsAttention: d, working: f } = t, p = l.length, m = p > 0 && (r || a), h = m || p > 0 || d || !!f;
456
+ return G(() => {
457
+ p === 0 && i(!1);
458
+ }, [p]), G(() => () => {
459
+ s.current && clearTimeout(s.current);
460
+ }, []), Q($, {
461
+ className: "sxl-agent-strip",
462
+ sx: {
463
+ display: "flex",
464
+ alignItems: "center",
465
+ height: 28,
466
+ pr: .5
467
+ },
468
+ children: [Q($, {
469
+ className: "sxl-agent-pill",
470
+ onMouseEnter: () => {
471
+ s.current && clearTimeout(s.current), s.current = null, o(!0);
472
+ },
473
+ onMouseLeave: () => {
474
+ s.current && clearTimeout(s.current), s.current = setTimeout(() => o(!1), 400);
475
+ },
288
476
  sx: {
289
477
  display: "flex",
290
- flexDirection: "column",
291
- gap: (e) => e.spacing(2),
292
- paddingTop: (e) => e.spacing(1)
478
+ alignItems: "center",
479
+ height: 26,
480
+ borderRadius: "13px",
481
+ px: h ? "3px" : 0,
482
+ mr: h ? .75 : 0,
483
+ backgroundColor: h ? "var(--sxl-color-elevated, var(--sxl-color-base-100))" : "transparent",
484
+ border: "1px solid",
485
+ borderColor: h ? "var(--sxl-color-elevated-border, transparent)" : "transparent",
486
+ animation: f ? "sxl-agent-working 1600ms ease-in-out infinite" : "none",
487
+ transition: "padding 0.25s ease, margin 0.25s ease, background-color 0.2s ease, border-color 0.2s ease"
293
488
  },
294
489
  children: [
295
- n ? G(En, {
490
+ Q(vr, {
491
+ className: "sxl-agent-navigator",
492
+ open: m,
493
+ max: 180,
494
+ children: [
495
+ Z(Nn, {
496
+ disableInteractive: !0,
497
+ title: n(z.goToCurrent),
498
+ children: Z(In, {
499
+ size: "small",
500
+ color: "inherit",
501
+ ...mr,
502
+ "aria-label": n(z.goToCurrent),
503
+ onClick: () => {
504
+ t.current ? e.goTo(t.current.id) : e.next();
505
+ },
506
+ sx: {
507
+ ...gr,
508
+ minWidth: 36,
509
+ py: 0,
510
+ px: .5,
511
+ fontSize: 12,
512
+ textTransform: "none",
513
+ fontVariantNumeric: "tabular-nums"
514
+ },
515
+ children: n(z.position, {
516
+ position: u || "–",
517
+ total: p
518
+ })
519
+ })
520
+ }),
521
+ Z(_r, {
522
+ title: n(z.previous),
523
+ iconKey: "ArrowUpward",
524
+ onClick: () => e.prev()
525
+ }),
526
+ Z(_r, {
527
+ title: n(z.next),
528
+ iconKey: "ArrowDownward",
529
+ onClick: () => e.next()
530
+ }),
531
+ Z(_r, {
532
+ title: n(z.dismiss),
533
+ iconKey: "Close",
534
+ disabled: !t.current,
535
+ onClick: () => e.dismissCurrent()
536
+ }),
537
+ Z(_r, {
538
+ title: n(r ? z.unpin : z.pin),
539
+ iconKey: Ft,
540
+ selected: r,
541
+ onClick: () => i(!r)
542
+ })
543
+ ]
544
+ }),
545
+ Z(vr, {
546
+ className: "sxl-agent-working",
547
+ open: !!f,
548
+ max: 30,
549
+ children: Z(Nn, {
550
+ disableInteractive: !0,
551
+ title: f ? n(z.working, { where: f.label ? `${f.label} (${f.range})` : f.range }) : "",
552
+ children: Z(Ln, {
553
+ ...mr,
554
+ "aria-label": n(z.working, { where: f ? f.label ?? f.range : "" }),
555
+ onClick: () => {
556
+ f && e.goTo(f.id);
557
+ },
558
+ sx: {
559
+ width: lr,
560
+ height: lr,
561
+ borderRadius: "50%"
562
+ },
563
+ children: Z($, {
564
+ component: "span",
565
+ sx: {
566
+ width: 8,
567
+ height: 8,
568
+ borderRadius: "50%",
569
+ backgroundColor: ur
570
+ }
571
+ })
572
+ })
573
+ })
574
+ }),
575
+ Z(vr, {
576
+ className: "sxl-agent-badge",
577
+ open: p > 0 && !m,
578
+ max: 60,
579
+ children: Z(In, {
580
+ size: "small",
581
+ color: "inherit",
582
+ ...mr,
583
+ "aria-label": n(z.findingsOpen, { count: p }),
584
+ onClick: () => {
585
+ t.current || e.next(), i(!0);
586
+ },
587
+ sx: {
588
+ ...gr,
589
+ minWidth: lr,
590
+ py: 0,
591
+ px: .5,
592
+ fontSize: 12,
593
+ fontWeight: 600,
594
+ fontVariantNumeric: "tabular-nums"
595
+ },
596
+ children: p
597
+ })
598
+ }),
599
+ Z(vr, {
600
+ className: "sxl-agent-attention",
601
+ open: d,
602
+ max: 30,
603
+ children: Z(Nn, {
604
+ disableInteractive: !0,
605
+ title: n(z.needsAttention),
606
+ children: Z($, {
607
+ component: "span",
608
+ role: "img",
609
+ "aria-label": n(z.needsAttention),
610
+ sx: {
611
+ display: "inline-flex",
612
+ px: .5,
613
+ color: "warning.main",
614
+ "& svg": {
615
+ width: 18,
616
+ height: 18
617
+ }
618
+ },
619
+ children: Z(B, { iconKey: "Help" })
620
+ })
621
+ })
622
+ })
623
+ ]
624
+ }), Z(pr, {
625
+ activity: c.activity,
626
+ children: Z(En, {
627
+ className: "sxl-agent-menu",
628
+ quickCommand: It.showPane,
629
+ renderPopupPanel: (e) => Pn({
630
+ ...e,
631
+ children: Q(X, { children: [Z(Y, {
632
+ variant: an.Menuitem,
633
+ commandKey: It.showPane
634
+ }), Z(Y, {
635
+ variant: an.Menuitem,
636
+ commandKey: It.clearFindings
637
+ })] })
638
+ })
639
+ })
640
+ })]
641
+ });
642
+ }, br = ({ className: e, children: t }) => Z(Un, {
643
+ dense: !0,
644
+ disablePadding: !0,
645
+ className: e ? `sxl-agent-timeline ${e}` : "sxl-agent-timeline",
646
+ sx: {
647
+ position: "relative",
648
+ "&::before": {
649
+ content: "\"\"",
650
+ position: "absolute",
651
+ left: 9,
652
+ top: 12,
653
+ bottom: 12,
654
+ width: 2,
655
+ borderRadius: 1,
656
+ bgcolor: "divider"
657
+ }
658
+ },
659
+ children: t
660
+ }), xr = (e) => {
661
+ let { dotColor: t, primary: n, secondary: r, actions: i, onClick: a, details: o, className: s } = e, [c, l] = J(!1), u = o != null, d = u ? () => l((e) => !e) : a, f = Q(X, { children: [
662
+ Z($, {
663
+ component: "span",
664
+ "aria-hidden": !0,
665
+ sx: {
666
+ position: "absolute",
667
+ left: 6,
668
+ top: 12,
669
+ width: 8,
670
+ height: 8,
671
+ borderRadius: "50%",
672
+ bgcolor: t
673
+ }
674
+ }),
675
+ Z(Kn, {
676
+ primary: n,
677
+ secondary: r,
678
+ sx: { my: 0 },
679
+ slotProps: {
680
+ primary: {
296
681
  variant: "body2",
297
- sx: { color: "text.secondary" },
298
- children: n
299
- }) : null,
300
- r ? G(J, {
301
- type: "password",
302
- size: "small",
303
- label: t("password.current"),
304
- value: c,
305
- onChange: (e) => l(e.target.value),
306
- slotProps: {
307
- inputLabel: { shrink: !0 },
308
- htmlInput: {
309
- className: "autoFocus",
310
- autoComplete: "current-password",
311
- spellCheck: !1
312
- }
313
- }
314
- }) : null,
315
- G(J, {
316
- type: "password",
317
- size: "small",
318
- label: t(r ? "password.new" : "password.label"),
319
- value: u,
320
- error: m && g,
321
- helperText: m && g ? t("password.required") : " ",
322
- onChange: (e) => d(e.target.value),
323
- slotProps: {
324
- inputLabel: { shrink: !0 },
325
- htmlInput: {
326
- className: r ? void 0 : "autoFocus",
327
- autoComplete: "new-password",
328
- spellCheck: !1
329
- }
682
+ noWrap: !0
683
+ },
684
+ secondary: {
685
+ variant: "caption",
686
+ noWrap: !0,
687
+ sx: {
688
+ color: "text.disabled",
689
+ display: "block"
330
690
  }
331
- }),
332
- G(J, {
333
- type: "password",
334
- size: "small",
335
- label: t("protection.passwordConfirm"),
336
- value: f,
337
- error: m && !g && _,
338
- helperText: m && !g && _ ? t("protection.passwordMismatch") : " ",
339
- onChange: (e) => p(e.target.value),
340
- slotProps: {
341
- inputLabel: { shrink: !0 },
342
- htmlInput: {
343
- autoComplete: "new-password",
344
- spellCheck: !1
345
- }
691
+ }
692
+ }
693
+ }),
694
+ u ? Z($, {
695
+ component: "span",
696
+ sx: {
697
+ display: "inline-flex",
698
+ color: "text.secondary",
699
+ ml: .5,
700
+ mt: .25
701
+ },
702
+ children: Z(B, {
703
+ iconKey: c ? "ExpandLess" : "ExpandMore",
704
+ size: 16,
705
+ ariaHidden: !0
706
+ })
707
+ }) : null
708
+ ] }), p = {
709
+ position: "relative",
710
+ alignItems: "flex-start",
711
+ pl: "32px",
712
+ py: .5,
713
+ borderRadius: 1
714
+ };
715
+ return Q(X, { children: [Z(Wn, {
716
+ disablePadding: !0,
717
+ className: s,
718
+ secondaryAction: i,
719
+ sx: {
720
+ borderRadius: 1,
721
+ ...d ? null : { "&:hover": { bgcolor: "action.hover" } },
722
+ "& .MuiListItemSecondaryAction-root": {
723
+ top: 2,
724
+ transform: "none",
725
+ opacity: 0,
726
+ transition: "opacity 0.15s ease"
727
+ },
728
+ "&:hover .MuiListItemSecondaryAction-root, &:focus-within .MuiListItemSecondaryAction-root": { opacity: 1 }
729
+ },
730
+ children: d ? Z(Gn, {
731
+ onClick: d,
732
+ "aria-expanded": u ? c : void 0,
733
+ sx: p,
734
+ children: f
735
+ }) : Z($, {
736
+ sx: {
737
+ ...p,
738
+ display: "flex",
739
+ width: "100%",
740
+ pr: 2
741
+ },
742
+ children: f
743
+ })
744
+ }), u ? Z(Rn, {
745
+ in: c,
746
+ unmountOnExit: !0,
747
+ children: Z($, {
748
+ sx: {
749
+ pl: "32px",
750
+ pr: 1,
751
+ pb: 1
752
+ },
753
+ children: o
754
+ })
755
+ }) : null] });
756
+ }, Sr = (e) => (kt[e.intent] ?? kt.finding).chip, Cr = {}, wr = ({ title: e, className: t, children: n }) => Q($, {
757
+ className: t,
758
+ sx: {
759
+ display: "flex",
760
+ flexDirection: "column",
761
+ gap: 1
762
+ },
763
+ children: [Z($n, {
764
+ variant: "body2",
765
+ children: e
766
+ }), n]
767
+ }), Tr = ({ children: e }) => Z($n, {
768
+ variant: "body2",
769
+ sx: {
770
+ color: "text.secondary",
771
+ pl: 1
772
+ },
773
+ children: e
774
+ }), Er = ({ item: e }) => Z(mt, {
775
+ className: "sxl-agent-finding-media",
776
+ sx: {
777
+ width: "auto",
778
+ minWidth: 20,
779
+ height: 20,
780
+ px: .5,
781
+ fontSize: 11,
782
+ background: Sr(e.finding),
783
+ borderColor: Sr(e.finding),
784
+ color: "#fff",
785
+ fontWeight: 600,
786
+ fontVariantNumeric: "tabular-nums",
787
+ opacity: e.finding.status === "stale" ? .5 : 1
788
+ },
789
+ children: e.ordinal > 0 ? e.ordinal : Z(B, {
790
+ iconKey: e.finding.intent === "question" ? "Help" : "CheckSuccess",
791
+ size: 14,
792
+ ariaHidden: !0
793
+ })
794
+ });
795
+ function Dr(e) {
796
+ let t = new Date(e), n = /* @__PURE__ */ new Date();
797
+ return t.toDateString() === n.toDateString() ? t.toLocaleTimeString() : t.toLocaleString();
798
+ }
799
+ var Or = ({ item: e, isCurrent: t, onSelect: n, onDismiss: r }) => {
800
+ let i = H(), { finding: a } = e;
801
+ return Z(ht, {
802
+ className: "sxl-agent-finding",
803
+ item: e,
804
+ messageKeys: Cr,
805
+ title: a.label ?? a.range,
806
+ selected: t,
807
+ onSelect: n,
808
+ caption: a.status === "stale" ? i(z.findingsStale) : a.range,
809
+ sx: { "&.Mui-selected": { outline: `2px solid ${Sr(a)}` } },
810
+ Media: Er,
811
+ actions: Z(gt, {
812
+ title: i(z.dismiss),
813
+ iconKey: "Close",
814
+ onClick: r
815
+ })
816
+ });
817
+ }, kr = ({ parts: e }) => Z(X, { children: e.filter((e) => e != null && !1 !== e).map((e, t) => Q(vn.Fragment, { children: [t > 0 ? " · " : null, e] }, t)) }), Ar = ({ range: e, onSelect: t }) => {
818
+ let n = H(), r = (e) => {
819
+ e.stopPropagation(), t();
820
+ };
821
+ return Z(Hn, {
822
+ component: "span",
823
+ role: "link",
824
+ tabIndex: 0,
825
+ underline: "hover",
826
+ title: n(z.promptGoto, { range: e }),
827
+ onMouseDown: (e) => e.stopPropagation(),
828
+ onClick: r,
829
+ onKeyDown: (e) => {
830
+ e.key !== "Enter" && e.key !== " " || (e.preventDefault(), r(e));
831
+ },
832
+ sx: { cursor: "pointer" },
833
+ children: e
834
+ });
835
+ }, jr = ({ commit: e }) => {
836
+ let t = H();
837
+ return Z(xr, {
838
+ className: "sxl-agent-commit",
839
+ dotColor: "primary.main",
840
+ primary: e.description ?? t(z.changesUntitled),
841
+ secondary: Z(kr, { parts: [t(z.historyKindChange), Dr(e.timestamp)] })
842
+ });
843
+ }, Mr = ({ finding: e, onSelect: t, onSelectRange: n }) => {
844
+ let r = H();
845
+ return Z(xr, {
846
+ className: "sxl-agent-logged-finding",
847
+ dotColor: Sr(e),
848
+ primary: e.label ?? e.range,
849
+ secondary: Z(kr, { parts: [
850
+ e.intent === "question" ? r(z.historyKindQuestion) : r(z.historyKindFinding),
851
+ Dr(e.raisedAt),
852
+ n ? Z(Ar, {
853
+ range: e.range,
854
+ onSelect: n
855
+ }) : e.range
856
+ ] }),
857
+ onClick: t
858
+ });
859
+ }, Nr = ({ store: e }) => {
860
+ let t = H(), { findings: n, navigable: r, current: i } = Zt(e), a = [];
861
+ for (let e of n) {
862
+ if (e.intent === "working") continue;
863
+ let t = a[a.length - 1];
864
+ t && t[0].walk === e.walk ? t.push(e) : a.push([e]);
865
+ }
866
+ return Z(X, { children: Z(wr, {
867
+ className: "sxl-agent-findings",
868
+ title: t(z.sectionFindings),
869
+ children: a.length === 0 ? Z(Tr, { children: t(z.findingsNone) }) : Q(X, { children: [a.map((t) => Z($, {
870
+ sx: {
871
+ display: "flex",
872
+ flexDirection: "column",
873
+ gap: .75
874
+ },
875
+ children: t.map((t) => Z(Or, {
876
+ item: {
877
+ finding: t,
878
+ ordinal: r.indexOf(t) + 1
879
+ },
880
+ isCurrent: t === i,
881
+ onSelect: t.status === "stale" ? void 0 : () => e.goTo(t.id),
882
+ onDismiss: () => e.dismiss(t.id)
883
+ }, t.id))
884
+ }, t[0].walk)), Z($, {
885
+ sx: {
886
+ display: "flex",
887
+ justifyContent: "flex-end"
888
+ },
889
+ children: Z(In, {
890
+ size: "small",
891
+ onClick: () => e.dismissAll(),
892
+ sx: { textTransform: "none" },
893
+ children: t(z.dismissAll)
894
+ })
895
+ })] })
896
+ }) });
897
+ }, Pr = ({ className: e, color: t, text: n, onClick: r }) => Q(Ln, {
898
+ className: e,
899
+ disabled: !r,
900
+ onClick: r,
901
+ sx: {
902
+ display: "flex",
903
+ alignItems: "center",
904
+ justifyContent: "flex-start",
905
+ gap: 1,
906
+ width: "100%",
907
+ borderRadius: 1,
908
+ px: .5,
909
+ py: .25,
910
+ "&:hover": { bgcolor: "action.hover" }
911
+ },
912
+ children: [Z($, {
913
+ component: "span",
914
+ "aria-hidden": !0,
915
+ sx: {
916
+ flex: "0 0 auto",
917
+ width: 8,
918
+ height: 8,
919
+ borderRadius: "50%",
920
+ bgcolor: t
921
+ }
922
+ }), Z($n, {
923
+ variant: "caption",
924
+ noWrap: !0,
925
+ sx: {
926
+ color: "text.primary",
927
+ minWidth: 0
928
+ },
929
+ children: n
930
+ })]
931
+ }), Fr = ({ store: e, working: t }) => {
932
+ let n = H(), r = t.label ? `${t.label} (${t.range})` : t.range;
933
+ return Z(Nn, {
934
+ disableInteractive: !0,
935
+ title: n(z.working, { where: r }),
936
+ children: Z(Ln, {
937
+ className: "sxl-agent-status-working",
938
+ "aria-label": n(z.working, { where: r }),
939
+ onClick: () => e.goTo(t.id),
940
+ sx: {
941
+ width: 16,
942
+ height: 16,
943
+ borderRadius: "50%"
944
+ },
945
+ children: Z($, {
946
+ component: "span",
947
+ sx: {
948
+ width: 8,
949
+ height: 8,
950
+ borderRadius: "50%",
951
+ bgcolor: kt.working.chip
952
+ }
953
+ })
954
+ })
955
+ });
956
+ }, Ir = ({ store: e }) => {
957
+ let t = H(), { promptQuestion: n, working: r, status: i } = Zt(e);
958
+ return n || r || i.meter !== void 0 ? Q($, {
959
+ className: "sxl-agent-status",
960
+ sx: {
961
+ flex: "0 0 auto",
962
+ display: "flex",
963
+ flexDirection: "column",
964
+ gap: .25,
965
+ px: 1,
966
+ py: .75,
967
+ borderTop: 1,
968
+ borderColor: "divider"
969
+ },
970
+ children: [n ? Z(Pr, {
971
+ className: "sxl-agent-status-waiting",
972
+ color: "warning.main",
973
+ text: t(z.waitingOnYou, { question: n.header ?? n.message }),
974
+ onClick: n.range ? () => e.reveal(n.range) : void 0
975
+ }) : null, r || i.meter !== void 0 ? Q($, {
976
+ sx: {
977
+ display: "flex",
978
+ alignItems: "center",
979
+ gap: .75,
980
+ px: .5,
981
+ minHeight: 20
982
+ },
983
+ children: [r ? Z(Fr, {
984
+ store: e,
985
+ working: r
986
+ }) : null, i.meter === void 0 ? null : Z($n, {
987
+ className: "sxl-agent-meter",
988
+ variant: "caption",
989
+ sx: { color: "text.secondary" },
990
+ children: t(z.meter, { count: i.meter })
991
+ })]
992
+ }) : null]
993
+ }) : null;
994
+ }, Lr = ({ store: e }) => {
995
+ let t = H(), { log: n, findings: r, workbook: i } = Zt(e), a = Xt(i, 1e3), [o, s] = J(""), c = o.trim().toLowerCase(), l = (...e) => !c || e.some((e) => !!e && e.toLowerCase().includes(c)), u = [...n.map((e) => ({
996
+ kind: "finding",
997
+ at: e.raisedAt,
998
+ finding: e
999
+ })), ...a.map((e) => ({
1000
+ kind: "change",
1001
+ at: e.timestamp,
1002
+ commit: e
1003
+ }))].sort((e, t) => t.at - e.at), d = u.filter((e) => e.kind === "finding" ? l(e.finding.label, e.finding.range) : l(e.commit.description ?? t(z.changesUntitled))), f = new Map(r.map((e) => [e.id, e]));
1004
+ return Q(X, { children: [Z(_t, {
1005
+ value: o,
1006
+ onChange: s,
1007
+ placeholder: t(z.historySearch),
1008
+ clearLabel: t(z.historyClearSearch),
1009
+ sx: { flexShrink: 0 }
1010
+ }), u.length === 0 ? Z(Tr, { children: t(z.historyNone) }) : d.length === 0 ? Z(Tr, { children: t(z.historyNoMatches) }) : Z(br, {
1011
+ className: "sxl-agent-history",
1012
+ children: d.map((t) => {
1013
+ if (t.kind === "change") return Z(jr, { commit: t.commit }, t.commit.id);
1014
+ let { finding: n } = t, r = f.get(n.id), i = !!r && r.status === "open";
1015
+ return Z(Mr, {
1016
+ finding: n,
1017
+ onSelect: i ? () => e.goTo(n.id) : r?.status === "stale" ? void 0 : () => e.select(n.range),
1018
+ onSelectRange: r?.status === "stale" ? void 0 : () => e.select(n.range)
1019
+ }, n.id);
1020
+ })
1021
+ })] });
1022
+ }, Rr = W((e) => {
1023
+ let { store: t, model: n, args: r, entryKey: i, frame: a, ref: o, ...s } = e, c = H(), [l, u] = J("review");
1024
+ return Q($, {
1025
+ ref: o,
1026
+ ...s,
1027
+ className: "sxl-agent-pane",
1028
+ sx: {
1029
+ display: "flex",
1030
+ flexDirection: "column",
1031
+ width: "100%",
1032
+ minWidth: 0,
1033
+ flex: "1 1 auto",
1034
+ height: "100%",
1035
+ minHeight: 0,
1036
+ overflowX: "hidden"
1037
+ },
1038
+ children: [
1039
+ Q(Zn, {
1040
+ value: l,
1041
+ onChange: (e, t) => u(t),
1042
+ variant: "fullWidth",
1043
+ sx: {
1044
+ width: "100%",
1045
+ flex: "0 0 auto",
1046
+ minHeight: "36px",
1047
+ borderBottom: 1,
1048
+ borderColor: "divider",
1049
+ "& .MuiTab-root": {
1050
+ minHeight: "36px",
1051
+ textTransform: "none",
1052
+ pt: .5,
1053
+ pb: .5,
1054
+ px: .5,
1055
+ minWidth: 0
346
1056
  }
1057
+ },
1058
+ children: [Z(Xn, {
1059
+ value: "review",
1060
+ label: c(z.tabReview)
1061
+ }), Z(Xn, {
1062
+ value: "history",
1063
+ label: c(z.tabHistory)
1064
+ })]
1065
+ }),
1066
+ Z($, {
1067
+ sx: {
1068
+ flex: "1 1 auto",
1069
+ minHeight: 0,
1070
+ overflowY: "auto",
1071
+ display: "flex",
1072
+ flexDirection: "column",
1073
+ gap: 2,
1074
+ p: 1.5
1075
+ },
1076
+ children: Z(l === "review" ? Nr : Lr, { store: t })
1077
+ }),
1078
+ Z(Ir, { store: t })
1079
+ ]
1080
+ });
1081
+ });
1082
+ Rr.displayName = "PresenceTaskPane";
1083
+ var zr = ({ store: e }) => {
1084
+ let { prompt: t, working: n, workbook: r } = Zt(e), i = !!n;
1085
+ return G(() => {
1086
+ if (!i || t) return;
1087
+ let n = (t) => {
1088
+ if (t.key !== "Escape" || t.defaultPrevented) return;
1089
+ let n = r ? Wt(r) : null;
1090
+ n?.current || n?.hovered || e.clearWorking();
1091
+ };
1092
+ return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
1093
+ }, [
1094
+ i,
1095
+ t,
1096
+ e,
1097
+ r
1098
+ ]), null;
1099
+ }, Br = (e) => Gt(e.intent);
1100
+ function Vr(e) {
1101
+ let t = new Lt(e);
1102
+ Kt();
1103
+ let n = rn.DefaultCommandRegistry.registerDynamic("workbook", Ut(t)), r = Mt.registerTaskPane({
1104
+ key: Pt,
1105
+ getTitle: () => rr(z.paneTitle),
1106
+ getIcon: () => Nt,
1107
+ component: (e) => U(Rr, {
1108
+ ...e,
1109
+ store: t
1110
+ })
1111
+ }, !0), i = At.register({
1112
+ key: "presence",
1113
+ layers: U(Rt, {
1114
+ key: "presence-findings",
1115
+ className: "sxl-agent-highlights",
1116
+ filter: (e) => {
1117
+ let n = t.getSnapshot().sessionId;
1118
+ return !!n && e.source === n;
1119
+ },
1120
+ showChip: Br
1121
+ })
1122
+ }, !0);
1123
+ return {
1124
+ store: t,
1125
+ strip: U(yr, { store: t }),
1126
+ overlay: U(zr, { store: t }),
1127
+ dispose() {
1128
+ i(), r(), n(), t.dispose();
1129
+ }
1130
+ };
1131
+ }
1132
+ function Hr(e, t, n) {
1133
+ return e === R.BuiltInSheetPattern.Solid ? {
1134
+ foreground: n,
1135
+ background: t
1136
+ } : {
1137
+ foreground: t,
1138
+ background: n
1139
+ };
1140
+ }
1141
+ var Ur = W((e) => {
1142
+ let { patternType: t, foreground: n, background: r, createCell: i, darkMode: a = !1, className: o, style: s, ...c } = e, l = K(() => {
1143
+ let e = Hr(t, n, r);
1144
+ return i({ style: { fill: {
1145
+ type: R.Type.Pattern,
1146
+ patternType: t,
1147
+ foreground: e.foreground ?? void 0,
1148
+ background: e.background ?? void 0
1149
+ } } })?.getStyle().getFill().toCSS(a) ?? {};
1150
+ }, [
1151
+ t,
1152
+ n,
1153
+ r,
1154
+ i,
1155
+ a
1156
+ ]);
1157
+ return Z("div", {
1158
+ className: L("sxl-pattern-swatch", o),
1159
+ style: {
1160
+ width: "100%",
1161
+ height: "100%",
1162
+ ...l,
1163
+ ...s
1164
+ },
1165
+ ...c
1166
+ });
1167
+ });
1168
+ Ur.displayName = "PatternSwatch";
1169
+ var Wr = Object.freeze([
1170
+ R.BuiltInSheetPattern.Solid,
1171
+ R.BuiltInSheetPattern.DarkGray,
1172
+ R.BuiltInSheetPattern.MediumGray,
1173
+ R.BuiltInSheetPattern.LightGray,
1174
+ R.BuiltInSheetPattern.Gray125,
1175
+ R.BuiltInSheetPattern.Gray0625,
1176
+ R.BuiltInSheetPattern.DarkHorizontal,
1177
+ R.BuiltInSheetPattern.DarkVertical,
1178
+ R.BuiltInSheetPattern.DarkDown,
1179
+ R.BuiltInSheetPattern.DarkUp,
1180
+ R.BuiltInSheetPattern.DarkGrid,
1181
+ R.BuiltInSheetPattern.DarkTrellis,
1182
+ R.BuiltInSheetPattern.LightHorizontal,
1183
+ R.BuiltInSheetPattern.LightVertical,
1184
+ R.BuiltInSheetPattern.LightDown,
1185
+ R.BuiltInSheetPattern.LightUp,
1186
+ R.BuiltInSheetPattern.LightGrid,
1187
+ R.BuiltInSheetPattern.LightTrellis
1188
+ ]);
1189
+ function Gr(e, t) {
1190
+ switch (t) {
1191
+ case R.BuiltInSheetPattern.None: return e("fill.pattern.none");
1192
+ case R.BuiltInSheetPattern.Solid: return e("fill.pattern.solid");
1193
+ case R.BuiltInSheetPattern.Gray0625: return e("fill.pattern.gray0625");
1194
+ case R.BuiltInSheetPattern.Gray125: return e("fill.pattern.gray125");
1195
+ case R.BuiltInSheetPattern.LightGray: return e("fill.pattern.lightGray");
1196
+ case R.BuiltInSheetPattern.MediumGray: return e("fill.pattern.mediumGray");
1197
+ case R.BuiltInSheetPattern.DarkGray: return e("fill.pattern.darkGray");
1198
+ case R.BuiltInSheetPattern.LightHorizontal: return e("fill.pattern.lightHorizontal");
1199
+ case R.BuiltInSheetPattern.LightVertical: return e("fill.pattern.lightVertical");
1200
+ case R.BuiltInSheetPattern.LightDown: return e("fill.pattern.lightDown");
1201
+ case R.BuiltInSheetPattern.LightUp: return e("fill.pattern.lightUp");
1202
+ case R.BuiltInSheetPattern.LightGrid: return e("fill.pattern.lightGrid");
1203
+ case R.BuiltInSheetPattern.LightTrellis: return e("fill.pattern.lightTrellis");
1204
+ case R.BuiltInSheetPattern.DarkHorizontal: return e("fill.pattern.darkHorizontal");
1205
+ case R.BuiltInSheetPattern.DarkVertical: return e("fill.pattern.darkVertical");
1206
+ case R.BuiltInSheetPattern.DarkDown: return e("fill.pattern.darkDown");
1207
+ case R.BuiltInSheetPattern.DarkUp: return e("fill.pattern.darkUp");
1208
+ case R.BuiltInSheetPattern.DarkGrid: return e("fill.pattern.darkGrid");
1209
+ case R.BuiltInSheetPattern.DarkTrellis: return e("fill.pattern.darkTrellis");
1210
+ default: return t;
1211
+ }
1212
+ }
1213
+ var Kr = W((e) => {
1214
+ let { selectedPattern: t, foreground: n, background: r, onSelectPattern: i, createCell: a, darkMode: o = !1, disabled: s, ...c } = e, l = H(), u = V(i ?? ((e) => {}), [i]), d = xn((e) => {
1215
+ let { closeFloat: i } = e;
1216
+ return Z($, {
1217
+ sx: {
1218
+ display: "grid",
1219
+ gridTemplateColumns: "repeat(6, 34px)",
1220
+ gap: "4px",
1221
+ padding: "8px"
1222
+ },
1223
+ children: Wr.map((e) => Z(An, {
1224
+ label: Gr(l, e),
1225
+ children: Z($, {
1226
+ role: "button",
1227
+ tabIndex: 0,
1228
+ "aria-label": Gr(l, e),
1229
+ "aria-pressed": e === t,
1230
+ onMouseDown: (e) => e.preventDefault(),
1231
+ onMouseUp: () => {
1232
+ i?.(), u(e);
1233
+ },
1234
+ onKeyDown: (t) => {
1235
+ t.key !== "Enter" && t.key !== " " || (t.preventDefault(), i?.(), u(e));
1236
+ },
1237
+ sx: {
1238
+ width: "34px",
1239
+ height: "34px",
1240
+ cursor: "pointer",
1241
+ borderRadius: "2px",
1242
+ outline: (n) => e === t ? `2px solid ${n.palette.primary.main}` : `1px solid ${n.palette.divider}`,
1243
+ outlineOffset: "-1px",
1244
+ "&:hover": { outline: (e) => `2px solid ${e.palette.primary.light}` }
1245
+ },
1246
+ children: Z(Ur, {
1247
+ patternType: e,
1248
+ foreground: n,
1249
+ background: r,
1250
+ createCell: a,
1251
+ darkMode: o
1252
+ })
347
1253
  })
348
- ]
1254
+ }, e))
1255
+ });
1256
+ }, [
1257
+ t,
1258
+ n,
1259
+ r,
1260
+ a,
1261
+ o,
1262
+ u,
1263
+ l
1264
+ ]);
1265
+ return Z(kn, {
1266
+ disabled: s,
1267
+ tooltip: l("fill.patternTooltip", { pattern: Gr(l, t) }),
1268
+ renderPopupPanel: d,
1269
+ icon: Z($, {
1270
+ sx: {
1271
+ width: "48px",
1272
+ height: "20px",
1273
+ borderRadius: "2px",
1274
+ outline: (e) => `1px solid ${e.palette.divider}`,
1275
+ outlineOffset: "-1px",
1276
+ overflow: "hidden"
1277
+ },
1278
+ children: Z(Ur, {
1279
+ patternType: t,
1280
+ foreground: n,
1281
+ background: r,
1282
+ createCell: a,
1283
+ darkMode: o
1284
+ })
1285
+ }),
1286
+ ...c
1287
+ });
1288
+ });
1289
+ Kr.displayName = "PatternPopupButton";
1290
+ var qr = {
1291
+ resizeOnOverflow: !1,
1292
+ placement: "bottom",
1293
+ offsets: [0, 2],
1294
+ shift: { padding: 8 }
1295
+ }, Jr = ((e) => {
1296
+ let t = [], n = e.length;
1297
+ for (let r = 0; r < n; r++) {
1298
+ let [i, a] = e[(r + n - 1) % n], [o, s, c] = e[r], [l, u] = e[(r + 1) % n], d = (e, t) => {
1299
+ let n = Math.hypot(e - o, t - s) || 1, r = Math.min(c, n / 2);
1300
+ return [o + (e - o) / n * r, s + (t - s) / n * r];
1301
+ }, [f, p] = d(i, a), [m, h] = d(l, u);
1302
+ t.push(`${r === 0 ? "M" : "L"}${f.toFixed(2)} ${p.toFixed(2)} Q${o} ${s} ${m.toFixed(2)} ${h.toFixed(2)}`);
1303
+ }
1304
+ return t.join(" ") + " Z";
1305
+ })([
1306
+ [
1307
+ 7,
1308
+ .5,
1309
+ 1
1310
+ ],
1311
+ [
1312
+ 13.5,
1313
+ 6,
1314
+ 1.5
1315
+ ],
1316
+ [
1317
+ 13.5,
1318
+ 16.5,
1319
+ 2
1320
+ ],
1321
+ [
1322
+ .5,
1323
+ 16.5,
1324
+ 2
1325
+ ],
1326
+ [
1327
+ .5,
1328
+ 6,
1329
+ 1.5
1330
+ ]
1331
+ ]), Yr = (e) => Math.max(0, Math.min(1, e)), Xr = (e, t, n) => {
1332
+ try {
1333
+ return (e instanceof Et ? e : new Et(e, t)).toCSS(n);
1334
+ } catch {
1335
+ return "transparent";
1336
+ }
1337
+ }, Zr = (e, t, n) => {
1338
+ try {
1339
+ let r = new Et(e, n).toRGBA(), i = new Et(t, n).toRGBA(), a = (e, t) => Math.round((e + t) / 2).toString(16).padStart(2, "0");
1340
+ return `${a(r.red, i.red)}${a(r.green, i.green)}${a(r.blue, i.blue)}`;
1341
+ } catch {
1342
+ return e;
1343
+ }
1344
+ }, Qr = (e, t) => e.offset === t.offset && String(e.color) === String(t.color), $r = (e, t) => e.length === t.length && e.every((e, n) => Qr(e, t[n])), ei = W((e) => {
1345
+ let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a = H(), [o, s] = J(String(t)), [c, l] = J(!1);
1346
+ return G(() => {
1347
+ c || s(String(t));
1348
+ }, [t, c]), Z(Qn, {
1349
+ type: "number",
1350
+ size: "small",
1351
+ disabled: n,
1352
+ inputRef: r,
1353
+ label: a("fill.gradientPosition"),
1354
+ value: o,
1355
+ onFocus: () => l(!0),
1356
+ onBlur: () => {
1357
+ l(!1), s(String(t));
1358
+ },
1359
+ onChange: (e) => {
1360
+ if (s(e.target.value), e.target.value === "") return;
1361
+ let t = Math.max(0, Math.min(100, parseInt(e.target.value, 10) || 0));
1362
+ i(t);
1363
+ },
1364
+ slotProps: {
1365
+ htmlInput: {
1366
+ min: 0,
1367
+ max: 100,
1368
+ step: 5,
1369
+ style: { textAlign: "right" }
1370
+ },
1371
+ inputLabel: { shrink: !0 },
1372
+ input: { endAdornment: Z(Bn, {
1373
+ position: "end",
1374
+ disableTypography: !0,
1375
+ children: "%"
1376
+ }) }
1377
+ },
1378
+ sx: { width: 120 }
1379
+ });
1380
+ });
1381
+ ei.displayName = "StopPositionField";
1382
+ var ti = W((e) => {
1383
+ let { index: t, stop: n, offset: r, schemeLookup: i, recentColors: a, darkMode: o, disabled: s, canRemove: c, rampRef: l, onDrag: u, onMove: d, onPreviewColor: f, onChangeColor: p, onRemove: m, onOpenChange: h } = e, g = H(), _ = tr(), v = K(() => new Et(n.color, i), [n.color, i]), [y, b] = J(void 0), [x, S] = J(null), [C, w] = J(!1), [T, E] = J(!1), [D, O] = J(!1), [k, A] = J(!1), j = q(null), M = q(!1), N = V((e) => {
1384
+ b(e), f(t, e ?? null);
1385
+ }, [t, f]), P = V((e) => {
1386
+ d(t, e / 100);
1387
+ }, [t, d]), ee = Math.round(100 * r), te = Xr(y ?? v, i, o), ne = xn((e) => {
1388
+ let { closeFloat: n } = e;
1389
+ return Q($, {
1390
+ className: "sxl-gradient-stop-popup",
1391
+ sx: {
1392
+ display: "flex",
1393
+ flexDirection: "column"
1394
+ },
1395
+ children: [Z(qe, {
1396
+ selectedColor: v,
1397
+ previewColor: y,
1398
+ disableAlpha: !0,
1399
+ schemeLookup: i,
1400
+ recentColors: a,
1401
+ darkMode: o,
1402
+ onDone: n,
1403
+ onPreviewColor: N,
1404
+ onPreviewColorImmediate: N,
1405
+ onSelectColor: (e) => {
1406
+ N(void 0), e && p(t, e);
1407
+ }
1408
+ }), Z($, {
1409
+ sx: {
1410
+ display: "flex",
1411
+ alignItems: "center",
1412
+ gap: 1,
1413
+ paddingX: 1,
1414
+ paddingBottom: 1
1415
+ },
1416
+ children: Z(ei, {
1417
+ percent: ee,
1418
+ disabled: s,
1419
+ inputRef: j,
1420
+ onChange: P
1421
+ })
1422
+ })]
1423
+ });
1424
+ }, [
1425
+ v,
1426
+ y,
1427
+ ee,
1428
+ t,
1429
+ i,
1430
+ a,
1431
+ o,
1432
+ s,
1433
+ N,
1434
+ p,
1435
+ P
1436
+ ]), F = pn({
1437
+ anchor: x,
1438
+ label: "gradient-stop",
1439
+ renderPopupPanel: ne,
1440
+ propsPopper: qr,
1441
+ onOpen: () => {
1442
+ w(!0), h(t, !0), M.current && (M.current = !1, requestAnimationFrame(() => j.current?.focus()));
1443
+ },
1444
+ onClose: () => {
1445
+ w(!1), h(t, !1), N(void 0);
1446
+ }
1447
+ }), re = V((e) => {
1448
+ M.current = e, F.reference.open(0);
1449
+ }, [F]), ie = V(() => {
1450
+ C ? F.reference.close(0) : re(!1);
1451
+ }, [
1452
+ C,
1453
+ F,
1454
+ re
1455
+ ]), I = q(null), ae = V((e) => {
1456
+ s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), I.current = {
1457
+ pointerId: e.pointerId,
1458
+ startX: e.clientX,
1459
+ startOffset: r,
1460
+ moved: !1,
1461
+ offset: r
1462
+ });
1463
+ }, [s, r]), oe = V((e) => {
1464
+ let n = I.current;
1465
+ if (!n || n.pointerId !== e.pointerId) return;
1466
+ let r = e.clientX - n.startX;
1467
+ if (!n.moved) {
1468
+ if (Math.abs(r) < 3) return;
1469
+ n.moved = !0, E(!0), A(!1), F.reference.close(0);
1470
+ }
1471
+ let i = l.current?.getBoundingClientRect().width ?? 0;
1472
+ n.offset = i > 0 ? Yr(n.startOffset + r / i) : n.startOffset, u(t, n.offset, !1);
1473
+ }, [
1474
+ t,
1475
+ l,
1476
+ F,
1477
+ u
1478
+ ]), se = V((e) => {
1479
+ let n = I.current;
1480
+ if (n && n.pointerId === e.pointerId) {
1481
+ if (I.current = null, n.moved) return E(!1), u(t, n.offset, !0), void d(t, n.offset);
1482
+ ie();
1483
+ }
1484
+ }, [
1485
+ t,
1486
+ u,
1487
+ d,
1488
+ ie
1489
+ ]), ce = V((e) => {
1490
+ let n = I.current;
1491
+ n && n.pointerId === e.pointerId && (I.current = null, n.moved && (E(!1), u(t, n.startOffset, !0)));
1492
+ }, [t, u]), le = V((e) => {
1493
+ if (s) return;
1494
+ let n = e.shiftKey ? .1 : .01;
1495
+ switch (e.key) {
1496
+ case "ArrowLeft":
1497
+ d(t, Yr(r - n));
1498
+ break;
1499
+ case "ArrowRight":
1500
+ d(t, Yr(r + n));
1501
+ break;
1502
+ case "Home":
1503
+ d(t, 0);
1504
+ break;
1505
+ case "End":
1506
+ d(t, 1);
1507
+ break;
1508
+ case "Delete":
1509
+ case "Backspace":
1510
+ c && m(t);
1511
+ break;
1512
+ case "Enter":
1513
+ case " ":
1514
+ re(!0);
1515
+ break;
1516
+ case "Escape":
1517
+ if (!C) return;
1518
+ F.reference.close(0);
1519
+ break;
1520
+ default: return;
1521
+ }
1522
+ e.preventDefault();
1523
+ }, [
1524
+ s,
1525
+ t,
1526
+ r,
1527
+ c,
1528
+ C,
1529
+ F,
1530
+ re,
1531
+ d,
1532
+ m
1533
+ ]), ue = C || T || D, de = !s && !T && !C && k, fe = Q($, {
1534
+ className: "sxl-gradient-stop-toolbar",
1535
+ onPointerDown: (e) => {
1536
+ e.stopPropagation();
1537
+ },
1538
+ sx: {
1539
+ display: "flex",
1540
+ alignItems: "center",
1541
+ gap: .25
1542
+ },
1543
+ children: [Z(On, {
1544
+ tabIndex: -1,
1545
+ propsTooltip: {
1546
+ label: g("fill.gradientStopColor"),
1547
+ simple: !0
1548
+ },
1549
+ icon: Z($, {
1550
+ className: "color-wrapper",
1551
+ sx: {
1552
+ lineHeight: 0,
1553
+ "& .activeColor": { fill: te }
1554
+ },
1555
+ children: Z(B, { iconKey: "circle.colored" })
1556
+ }),
1557
+ onClick: () => {
1558
+ A(!1), ie();
1559
+ }
1560
+ }), Z(On, {
1561
+ tabIndex: -1,
1562
+ disabled: !c,
1563
+ propsTooltip: {
1564
+ label: g("fill.gradientRemoveStop"),
1565
+ simple: !0
1566
+ },
1567
+ icon: Z(B, { iconKey: "Close" }),
1568
+ onClick: () => m(t)
1569
+ })]
1570
+ });
1571
+ return Q(X, { children: [Z(Nn, {
1572
+ title: fe,
1573
+ open: de,
1574
+ onOpen: () => A(!0),
1575
+ onClose: () => A(!1),
1576
+ enterDelay: 250,
1577
+ enterNextDelay: 250,
1578
+ leaveDelay: 400,
1579
+ placement: "bottom",
1580
+ disableFocusListener: !0,
1581
+ disableTouchListener: !0,
1582
+ slotProps: { tooltip: { sx: {
1583
+ backgroundColor: (e) => e.palette.background.paper,
1584
+ color: (e) => e.palette.text.primary,
1585
+ border: (e) => `1px solid ${e.palette.divider}`,
1586
+ boxShadow: (e) => e.shadows[3],
1587
+ padding: "2px",
1588
+ marginTop: "4px !important"
1589
+ } } },
1590
+ children: Z($, {
1591
+ ref: S,
1592
+ role: "button",
1593
+ tabIndex: s ? -1 : 0,
1594
+ "aria-label": g("fill.gradientStop", { position: ee }),
1595
+ "aria-disabled": s || void 0,
1596
+ className: L("sxl-gradient-stop", {
1597
+ "sxl-gradient-stop-open": C,
1598
+ "sxl-gradient-stop-dragging": T
1599
+ }),
1600
+ onPointerDown: ae,
1601
+ onPointerMove: oe,
1602
+ onPointerUp: se,
1603
+ onPointerCancel: ce,
1604
+ onFocus: () => O(!0),
1605
+ onBlur: () => O(!1),
1606
+ onKeyDown: le,
1607
+ sx: {
1608
+ position: "absolute",
1609
+ left: 100 * r + "%",
1610
+ top: "calc(100% - 4px)",
1611
+ width: 14,
1612
+ height: 17,
1613
+ transform: "translateX(-50%)",
1614
+ transition: T ? "none" : "left 120ms ease-out",
1615
+ lineHeight: 0,
1616
+ cursor: s ? "default" : T ? "grabbing" : "grab",
1617
+ touchAction: "none",
1618
+ outline: "none",
1619
+ zIndex: +!!T,
1620
+ filter: ue ? `drop-shadow(0 1px 2px ${_.palette.action.active})` : void 0
1621
+ },
1622
+ children: Z("svg", {
1623
+ width: 14,
1624
+ height: 17,
1625
+ viewBox: "0 0 14 17",
1626
+ "aria-hidden": "true",
1627
+ children: Z("path", {
1628
+ d: Jr,
1629
+ fill: te,
1630
+ stroke: ue ? _.palette.primary.main : _.palette.text.secondary,
1631
+ strokeWidth: ue ? 1.5 : 1,
1632
+ strokeLinejoin: "round"
1633
+ })
1634
+ })
349
1635
  })
1636
+ }), F.component] });
1637
+ });
1638
+ ti.displayName = "StopHandle";
1639
+ var ni = W((e) => {
1640
+ let { stops: t, onChange: n, minStops: r = 2, maxStops: i = 8, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = H(), f = q(null), p = q({
1641
+ known: [],
1642
+ next: 1
1643
+ }), m = K(() => {
1644
+ let e = p.current, n = ((e, t, n) => {
1645
+ for (let n of t) if ($r(e, n.stops)) return n.keys;
1646
+ let r = /* @__PURE__ */ new Set();
1647
+ return e.map((e) => {
1648
+ for (let n of t) {
1649
+ let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) && Qr(t, e));
1650
+ if (t >= 0) return r.add(n.keys[t]), n.keys[t];
1651
+ }
1652
+ return -1;
1653
+ }).map((e) => e >= 0 ? e : n());
1654
+ })(t, e.known, () => e.next++);
1655
+ return e.known[0]?.keys !== n && (e.known = [{
1656
+ stops: t,
1657
+ keys: n
1658
+ }, ...e.known].slice(0, 3)), n;
1659
+ }, [t]), [h, g] = J(null), [_, v] = J(null), [y, b] = J(null);
1660
+ wn(() => {
1661
+ g((e) => {
1662
+ if (!e?.released) return e;
1663
+ let n = m.indexOf(e.key);
1664
+ return n >= 0 && t[n].offset === e.offset ? null : e;
1665
+ });
1666
+ }, [t, m]), wn(() => {
1667
+ if (!h?.released) return;
1668
+ let e = window.setTimeout(() => g((e) => e?.released ? null : e), 1e3);
1669
+ return () => window.clearTimeout(e);
1670
+ }, [h]);
1671
+ let x = !c && t.length < i, S = !c && t.length > r, C = V((e) => {
1672
+ let t = [...e].sort((e, t) => e.stop.offset - t.stop.offset), r = {
1673
+ stops: t.map((e) => e.stop),
1674
+ keys: t.map((e) => e.key)
1675
+ }, i = p.current;
1676
+ i.known = [r, ...i.known].slice(0, 3), n(r.stops.slice());
1677
+ }, [n]), w = V(() => t.map((e, t) => ({
1678
+ stop: e,
1679
+ key: m[t]
1680
+ })), [t, m]), T = V((e, t, n) => {
1681
+ g({
1682
+ key: m[e],
1683
+ offset: t,
1684
+ released: n
1685
+ });
1686
+ }, [m]), E = V((e, t) => {
1687
+ C(w().map((n, r) => r === e ? {
1688
+ ...n,
1689
+ stop: {
1690
+ ...n.stop,
1691
+ offset: t
1692
+ }
1693
+ } : n));
1694
+ }, [w, C]), D = V((e, t) => {
1695
+ v(t ? {
1696
+ key: m[e],
1697
+ color: t
1698
+ } : null);
1699
+ }, [m]), O = V((e, t) => {
1700
+ let n = m[e];
1701
+ b((e) => t ? n : e === n ? null : e);
1702
+ }, [m]), k = V((e, t) => {
1703
+ C(w().map((n, r) => r === e ? {
1704
+ ...n,
1705
+ stop: {
1706
+ ...n.stop,
1707
+ color: t.toString()
1708
+ }
1709
+ } : n));
1710
+ }, [w, C]), A = V((e) => {
1711
+ t.length <= r || C(w().filter((t, n) => n !== e));
1712
+ }, [
1713
+ t,
1714
+ r,
1715
+ w,
1716
+ C
1717
+ ]), j = V((e) => {
1718
+ if (t.length >= i) return;
1719
+ let n = [...t].sort((e, t) => e.offset - t.offset), r = e;
1720
+ if (r === void 0) {
1721
+ let e = -1;
1722
+ for (let t = 0; t + 1 < n.length; t++) {
1723
+ let i = n[t + 1].offset - n[t].offset;
1724
+ i > e && (e = i, r = (n[t].offset + n[t + 1].offset) / 2);
1725
+ }
1726
+ r === void 0 && (r = 1);
1727
+ }
1728
+ let o = [...n].reverse().find((e) => e.offset <= r) ?? n[0], s = n.find((e) => e.offset >= r) ?? n[n.length - 1];
1729
+ C([...w(), {
1730
+ stop: {
1731
+ offset: r,
1732
+ color: Zr(o.color, s.color, a)
1733
+ },
1734
+ key: p.current.next++
1735
+ }]);
1736
+ }, [
1737
+ t,
1738
+ i,
1739
+ a,
1740
+ w,
1741
+ C
1742
+ ]), M = V((e) => {
1743
+ if (!x || e.button !== 0 || y !== null || e.target.closest(".sxl-gradient-stop")) return;
1744
+ let t = e.currentTarget.getBoundingClientRect();
1745
+ t.width <= 0 || j(Yr((e.clientX - t.left) / t.width));
1746
+ }, [
1747
+ x,
1748
+ y,
1749
+ j
1750
+ ]), N = K(() => {
1751
+ let e = t.map((e, t) => ({
1752
+ offset: h?.key === m[t] ? h.offset : e.offset,
1753
+ css: Xr(_?.key === m[t] ? _.color : e.color, a, s)
1754
+ }));
1755
+ return e.sort((e, t) => e.offset - t.offset), `linear-gradient(90deg, ${e.map((e) => `${e.css} ${(100 * e.offset).toFixed(2)}%`).join(", ")})`;
1756
+ }, [
1757
+ t,
1758
+ m,
1759
+ h,
1760
+ _,
1761
+ a,
1762
+ s
1763
+ ]);
1764
+ return Q($, {
1765
+ className: L("sxl-gradient-stops", l),
1766
+ sx: {
1767
+ display: "flex",
1768
+ alignItems: "flex-start",
1769
+ gap: .5,
1770
+ minWidth: 0
1771
+ },
1772
+ ...u,
1773
+ children: [Z($, {
1774
+ sx: {
1775
+ flex: 1,
1776
+ minWidth: 0,
1777
+ paddingX: "7px",
1778
+ paddingBottom: "15px"
1779
+ },
1780
+ children: Z($, {
1781
+ ref: f,
1782
+ className: "sxl-gradient-stops-ramp",
1783
+ onPointerDown: M,
1784
+ sx: {
1785
+ position: "relative",
1786
+ height: 18,
1787
+ borderRadius: 1,
1788
+ border: (e) => `1px solid ${e.palette.divider}`,
1789
+ backgroundImage: N,
1790
+ backgroundRepeat: "no-repeat",
1791
+ cursor: x ? "copy" : "default",
1792
+ opacity: c ? .5 : 1
1793
+ },
1794
+ children: t.map((e, t) => Z(ti, {
1795
+ index: t,
1796
+ stop: e,
1797
+ offset: h?.key === m[t] ? h.offset : e.offset,
1798
+ schemeLookup: a,
1799
+ recentColors: o,
1800
+ darkMode: s,
1801
+ disabled: c,
1802
+ canRemove: S,
1803
+ rampRef: f,
1804
+ onDrag: T,
1805
+ onMove: E,
1806
+ onPreviewColor: D,
1807
+ onChangeColor: k,
1808
+ onRemove: A,
1809
+ onOpenChange: O
1810
+ }, m[t]))
1811
+ })
1812
+ }), Z(On, {
1813
+ disabled: !x,
1814
+ propsTooltip: {
1815
+ label: d("fill.gradientAddStop"),
1816
+ simple: !0
1817
+ },
1818
+ icon: Z(B, { iconKey: "Add" }),
1819
+ onClick: () => j(),
1820
+ sx: { marginTop: "-3px" }
1821
+ })]
350
1822
  });
351
- }, Fn = /* @__PURE__ */ new Set(/* @__PURE__ */ "square.elevation.variant.title.onKeyDown.workbook.onWorkbookChange.onDocumentError.propsDocumentError.renderDocumentError.propsDocumentLoading.renderDocumentLoading.propsWorkbook.onWorkbookLoad.propsTaskPaneArea.renderTaskPaneArea.taskPaneSide.logo.onDirtyChange.propsDocumentTitle.showFormulaBar.propsFormulaBar.renderFormulaBar.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), In = () => G(W, {}), Ln = kn("studio:eagerStudio", () => import("./CyHNVjgkMYZYlJpY.mjs"), { tier: "startup" }), Rn = ({ error: e, onShown: t }) => (I(() => {
1823
+ });
1824
+ ni.displayName = "GradientStopsBar";
1825
+ var ri = W((e) => {
1826
+ let { value: t, onChange: n, minStops: r, maxStops: i, schemeLookup: a, recentColors: o, darkMode: s = !1, disabled: c = !1, className: l, ...u } = e, d = H(), f = V((e) => {
1827
+ n({
1828
+ ...t,
1829
+ ...e
1830
+ });
1831
+ }, [t, n]), p = t.gradientType === R.GradientType.Linear;
1832
+ return Q($, {
1833
+ className: L("sxl-gradient-editor", l),
1834
+ sx: {
1835
+ display: "flex",
1836
+ flexDirection: "column",
1837
+ gap: 1.25,
1838
+ minWidth: 0
1839
+ },
1840
+ ...u,
1841
+ children: [Q($, {
1842
+ sx: {
1843
+ display: "flex",
1844
+ flexWrap: "wrap",
1845
+ gap: 1,
1846
+ alignItems: "center"
1847
+ },
1848
+ children: [Q(zn, {
1849
+ size: "small",
1850
+ sx: {
1851
+ minWidth: 132,
1852
+ flex: "1 1 132px"
1853
+ },
1854
+ children: [Z(Vn, {
1855
+ shrink: !0,
1856
+ children: d("fill.gradientStyle")
1857
+ }), Q(Yn, {
1858
+ label: d("fill.gradientStyle"),
1859
+ notched: !0,
1860
+ disabled: c,
1861
+ value: t.gradientType,
1862
+ onChange: (e) => f({ gradientType: e.target.value }),
1863
+ children: [Z(qn, {
1864
+ value: R.GradientType.Linear,
1865
+ children: d("fill.gradientLinear")
1866
+ }), Z(qn, {
1867
+ value: R.GradientType.Path,
1868
+ children: d("fill.gradientRadial")
1869
+ })]
1870
+ })]
1871
+ }), Z(Qn, {
1872
+ label: d("fill.gradientAngle"),
1873
+ type: "number",
1874
+ size: "small",
1875
+ disabled: c || !p,
1876
+ value: t.angle,
1877
+ onChange: (e) => {
1878
+ let t = parseInt(e.target.value, 10) || 0;
1879
+ f({ angle: (t % 360 + 360) % 360 });
1880
+ },
1881
+ slotProps: {
1882
+ htmlInput: {
1883
+ min: 0,
1884
+ max: 359,
1885
+ step: 15
1886
+ },
1887
+ inputLabel: { shrink: !0 }
1888
+ },
1889
+ sx: { width: 104 }
1890
+ })]
1891
+ }), Q($, {
1892
+ sx: {
1893
+ display: "flex",
1894
+ flexDirection: "column",
1895
+ gap: .5,
1896
+ minWidth: 0
1897
+ },
1898
+ children: [Z($n, {
1899
+ variant: "caption",
1900
+ component: "div",
1901
+ sx: { color: "text.secondary" },
1902
+ children: d("fill.gradientStops")
1903
+ }), Z(ni, {
1904
+ stops: t.stops,
1905
+ onChange: (e) => f({ stops: e }),
1906
+ minStops: r,
1907
+ maxStops: i,
1908
+ schemeLookup: a,
1909
+ recentColors: o,
1910
+ darkMode: s,
1911
+ disabled: c
1912
+ })]
1913
+ })]
1914
+ });
1915
+ });
1916
+ ri.displayName = "GradientEditor";
1917
+ var ii = (e) => {
1918
+ let t = e.getStops();
1919
+ return {
1920
+ gradientType: e.getGradientType(),
1921
+ angle: e.getAngle() ?? 0,
1922
+ stops: t.length >= 2 ? t.map((e) => ({
1923
+ offset: e.getOffset(),
1924
+ color: e.getColor().toString()
1925
+ })) : [...ai.stops]
1926
+ };
1927
+ }, ai = Object.freeze({
1928
+ gradientType: R.GradientType.Linear,
1929
+ angle: 90,
1930
+ stops: [{
1931
+ offset: 0,
1932
+ color: "ffffff"
1933
+ }, {
1934
+ offset: 1,
1935
+ color: "4472c4"
1936
+ }]
1937
+ }), oi = /* @__PURE__ */ new Set(/* @__PURE__ */ "square.elevation.variant.title.onKeyDown.workbook.onWorkbookChange.onDocumentError.propsDocumentError.renderDocumentError.propsDocumentLoading.renderDocumentLoading.propsWorkbook.onWorkbookLoad.propsTaskPaneArea.renderTaskPaneArea.taskPaneSide.logo.onDirtyChange.propsDocumentTitle.showFormulaBar.propsFormulaBar.renderFormulaBar.formulaBarPlacement.virtualKeyboard.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), si = nr("studio:eagerStudio", () => import("./D_VpGjXScR-D-TWZ.mjs").then((e) => e.t)), ci = ({ error: e, onShown: t }) => (G(() => {
352
1938
  t();
353
- }, []), G(Sn, { error: e })), zn = P(N((e, t) => {
354
- let { sx: n, style: r, className: i, licenseKey: a, prefetch: o = "common", renderDocumentLoading: s = St, propsDocumentLoading: c, onWorkbookLoad: l, onDocumentError: u, ...d } = e, [f, p] = ((e) => {
1939
+ }, []), Z(Mn, { error: e })), li = W(bn((e, t) => {
1940
+ let { sx: n, style: r, className: i, licenseKey: a, renderDocumentLoading: o = c, propsDocumentLoading: s, onWorkbookLoad: l, onDocumentError: u, ...d } = e, [f, p] = ((e) => {
355
1941
  let t = {}, n = {};
356
- for (let r in e) (Fn.has(r) ? t : n)[r] = e[r];
1942
+ for (let r in e) (oi.has(r) ? t : n)[r] = e[r];
357
1943
  return [t, n];
358
1944
  })(d);
359
- a && en.setLicenseKey(a);
360
- let [m] = hn(nn.Mode, void 0), { themeMode: h } = gn({ mode: m ?? void 0 }), g = h === "dark", [_, v] = z(null), y = fn("studio", yn()), [b, x] = z(!1), S = L(() => !s || b ? null : G(Tn, {
1945
+ K(() => {
1946
+ a && Ot.setLicenseKey(a).catch(() => {});
1947
+ }, [a]);
1948
+ let [m] = hn(Bt.Mode, zt[Bt.Mode]), { themeMode: h } = gn({
1949
+ mode: m ?? void 0,
1950
+ fallback: "system"
1951
+ }), g = h === "dark", [_, v] = J(null), y = cn("studio", Sn()), [b, x] = J(!1), S = K(() => !o || b ? null : Z(Jn, {
361
1952
  style: {
362
1953
  backgroundColor: `var(--sxl-color-base-100, ${g ? "#121212" : "#fff"})`,
363
1954
  inset: 0,
@@ -369,82 +1960,69 @@ var Pn = An({
369
1960
  justifyContent: "center",
370
1961
  zIndex: 9900
371
1962
  },
372
- children: s(c ?? {})
1963
+ children: Z(on, {
1964
+ render: o,
1965
+ props: s ?? {}
1966
+ })
373
1967
  }), [
1968
+ o,
374
1969
  s,
375
- c,
376
1970
  g,
377
1971
  b
378
- ]);
379
- I(() => {
380
- if (!b || o === "none") return;
381
- let e = o === "all" ? [
382
- "startup",
383
- "common",
384
- "rare"
385
- ] : ["startup", "common"], t = new AbortController(), n = () => {
386
- On.prefetch({
387
- tiers: e,
388
- signal: t.signal
389
- });
390
- };
391
- n();
392
- let r = navigator.connection;
393
- return window.addEventListener("online", n), r?.addEventListener?.("change", n), () => {
394
- t.abort(), window.removeEventListener("online", n), r?.removeEventListener?.("change", n);
395
- };
396
- }, [b, o]);
397
- let C = L(() => pn(Ln.load, { renderError: (e) => G(Rn, {
1972
+ ]), C = K(() => ln(si.load, { renderError: ({ error: e }) => Z(ci, {
398
1973
  error: e,
399
1974
  onShown: () => x(!0)
400
1975
  }) }), []);
401
- return K(q, {
402
- ref: v,
403
- className: Ut("sheetxl-studio", y, i),
404
- "data-sxl-theme-mode": h,
405
- sx: n,
406
- style: {
407
- display: "flex",
408
- flexDirection: "column",
409
- flex: "1 1 100%",
410
- width: "100%",
411
- height: "100%",
412
- minWidth: 0,
413
- minHeight: 0,
414
- position: "relative",
415
- overflow: "hidden",
416
- ...r
417
- },
418
- ...p,
419
- children: [G(vn, {
420
- fallback: null,
421
- children: G(C, {
422
- ...f,
423
- host: _,
424
- scopeClass: y,
425
- onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() => x(!0))), l?.(e)),
426
- onDocumentError: (e) => (x(!0), u?.(e)),
427
- renderDocumentLoading: In,
428
- ref: t
429
- })
430
- }), S]
1976
+ return Z(sn.Provider, {
1977
+ value: "system",
1978
+ children: Q($, {
1979
+ ref: v,
1980
+ className: L("sheetxl-studio", y, i),
1981
+ "data-sxl-theme-mode": h,
1982
+ sx: n,
1983
+ style: {
1984
+ display: "flex",
1985
+ flexDirection: "column",
1986
+ flex: "1 1 100%",
1987
+ width: "100%",
1988
+ height: "100%",
1989
+ minWidth: 0,
1990
+ minHeight: 0,
1991
+ position: "relative",
1992
+ overflow: "hidden",
1993
+ ...r
1994
+ },
1995
+ ...p,
1996
+ children: [Z(yn, {
1997
+ fallback: null,
1998
+ children: Z(C, {
1999
+ ...f,
2000
+ host: _,
2001
+ scopeClass: y,
2002
+ onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() => x(!0))), l?.(e)),
2003
+ onDocumentError: (e) => (x(!0), u?.(e)),
2004
+ renderDocumentLoading: null,
2005
+ ref: t
2006
+ })
2007
+ }), S]
2008
+ })
431
2009
  });
432
2010
  }));
433
- zn.displayName = "Studio";
434
- var Bn = (e = {}) => {
435
- let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, documentTitle: a, confirmOnClose: o, keyboardGuard: s } = e, c = jn(), [l, u] = z(null), [d, f] = z(!1);
436
- cn(dn(l), d, {
437
- documentTitle: a,
438
- confirmOnClose: o,
439
- keyboardGuard: s
2011
+ li.displayName = "Studio";
2012
+ var ui = (e = {}) => {
2013
+ let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = mn(), [f, p] = J(null), [m, h] = J(!1), g = nn(f);
2014
+ $t(g, m, {
2015
+ documentTitle: s,
2016
+ confirmOnClose: c,
2017
+ keyboardGuard: l
440
2018
  });
441
- let { workbook: p, urlTitle: m } = L(() => {
2019
+ let { workbook: _, urlTitle: v } = K(() => {
442
2020
  if (t != null) return {
443
2021
  workbook: typeof t == "string" ? { source: t } : t,
444
2022
  urlTitle: null
445
2023
  };
446
- if (c.search) {
447
- let e = new URLSearchParams(c.search), t = e.get("source");
2024
+ if (d) {
2025
+ let e = new URLSearchParams(d), t = e.get("source");
448
2026
  if (t) return {
449
2027
  workbook: { source: t },
450
2028
  urlTitle: e.get("title")
@@ -454,31 +2032,45 @@ var Bn = (e = {}) => {
454
2032
  workbook: void 0,
455
2033
  urlTitle: null
456
2034
  };
457
- }, [t, c.search]), h = F((e) => {
458
- e && m && e.getOrigin().setName(m), u(e);
459
- }, [m]);
460
- I(() => {
461
- n === "welcome" && p === void 0 && ut(r);
2035
+ }, [t, d]), y = q(null);
2036
+ K(() => {
2037
+ y.current = v;
2038
+ }, [v]);
2039
+ let b = q(a);
2040
+ b.current = a;
2041
+ let x = xn((e) => {
2042
+ e && y.current && (e.getOrigin().setName(y.current), y.current = null), p(e), b.current?.(e);
2043
+ }, []), S = q(o);
2044
+ S.current = o;
2045
+ let C = xn((e) => {
2046
+ h(e), S.current?.(e);
2047
+ }, []);
2048
+ G(() => {
2049
+ n === "welcome" && _ === void 0 && we(r);
462
2050
  }, [
463
2051
  n,
464
- p,
2052
+ _,
465
2053
  r
466
2054
  ]);
467
- let g = R(!1), _ = R(i);
468
- return _.current = i, {
469
- workbook: p,
470
- onWorkbookChange: h,
471
- onDirtyChange: f,
472
- onWorkbookLoad: F((e) => (g.current || (g.current = !0, n === "welcome" && p === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
473
- e.source?.getCommandScope?.()?.resolve("showWelcome")?.execute({
474
- templatePath: r,
475
- atStartup: !0
476
- });
477
- }))), _.current?.(e)), [
478
- n,
479
- r,
480
- p
481
- ])
2055
+ let w = q(!1), T = q(i);
2056
+ T.current = i;
2057
+ let E = xn((e) => (w.current || (w.current = !0, n === "welcome" && _ === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
2058
+ e.source?.getCommandScope?.()?.resolve("showWelcome")?.execute({
2059
+ templatePath: r,
2060
+ atStartup: !0
2061
+ });
2062
+ }))), T.current?.(e)), [
2063
+ n,
2064
+ r,
2065
+ _
2066
+ ]);
2067
+ return {
2068
+ virtualKeyboard: "resize",
2069
+ ...u,
2070
+ workbook: _,
2071
+ onWorkbookChange: x,
2072
+ onDirtyChange: C,
2073
+ onWorkbookLoad: E
482
2074
  };
483
2075
  };
484
- export { h as AlignmentPanel, Mn as AppearanceCommandButton, r as AutoColorPosition, Lt as BorderCommandButton, re as BorderPanel, fe as BorderPopupButton, nt as BorderPreview, Pt as BorderStylePopupButton, s as BorderTemplateIcon, b as CalculationOptionsCommandButton, Ne as CalculationRequiredStatus, Rt as CircularReferenceStatus, rt as ColorButton, ie as ColorButtonList, ct as ColorCommandButton, u as ColorPanel, tt as ColorPanelType, p as ColorPopupButton, e as ColumnMenu, g as DEFAULT_GRADIENT, tn as DefaultTaskPaneRegistry, Ft as DefaultWorkbookToolbars, Ce as DocThemeCommandButton, yt as DocumentTitle, wt as ExternalLinkCardBody, pt as ExternalLinkChip, Ae as ExternalLinkLocation, $e as ExternalLinkSettingsTab, xt as ExternalLinksPanel, Et as ExternalLinksPlugin, ft as ExternalLinksTaskPane, me as FORMAT_TAB_KEY, o as FORMAT_TASK_PANE_KEY, Gt as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, Q as FileCommandButton, Dt as FillMenu, te as FillPanel, Ve as FilterList, ht as FontFamilyCommandButton, oe as FontPanel, Me as FontSizeCommandButton, ue as FormatButtonGroup, S as FormatCellPreview, Ht as FormatNumberField, Nt as FormatPlugin, a as FormatRow, ve as FormatSection, f as FormatTab, l as FormatTaskPane, Ie as FormulaBar, Wt as FormulaField, qt as FunctionArgumentsPanel, Xt as FunctionSearchPanel, x as GradientEditor, Qt as INSERT_FUNCTION_PAGE_CLASS, Kt as InputField, it as InsertFunctionCommandPopupButton, Yt as InsertFunctionOption, Nn as InsertFunctionSumCommandPopupButton, Zt as InsertFunctionWizard, $t as LicenseManager, Ge as ManageProtectionTaskPane, gt as NAMED_TYPE_FORMULA, Mt as NamedCollectionEditor, ze as NamedDetailsPanel, kt as NamedDetailsTaskPane, We as NamedEditorPanel, ot as NamedPlugin, Ke as NumberFormatCommandButton, De as NumberFormatOption, v as NumberFormatPanel, pe as NumberStats, be as PATTERN_GALLERY, n as PREVIEW_EDGES, $ as PasswordDialog, de as PasswordField, Re as PasteCommandButton, y as PatternPopupButton, we as PatternSwatch, Ot as PresetCellStylesCommandButton, dt as PresetTableStylesCommandButton, zt as ProtectedCellsPanel, Ee as ProtectedRangeDetailsTaskPane, Je as ProtectionPlugin, je as SheetProtectionPanel, st as SheetTabMenu, ee as SheetZoomCommandButton, c as SheetZoomScale, mt as SheetsAllMenu, Vt as StatusBar, zn as Studio, he as StyledStrokeIcon, ke as TableDetailsPanel, Qe as TableDetailsTaskPane, bt as TablePlugin, Fe as TableStyleCanvasPreview, Ct as TableStyleOptionsPanel, at as TableStylePreview, Ue as TextEffectsCommandButton, ne as TextRotateGroupButton, Tt as ThemeSelectButton, Be as ThemeSelectPanel, t as ThemeSelectPopupButton, Ye as UndoRedoCommandButton, vt as WalkingCopyCommandButton, Le as WorkbookContextMenu, Ze as WorkbookElement, rn as WorkbookIO, It as WorkbookProtectionPanel, At as WorkbookProtectionTab, He as WorkbookStrip, ge as WorkbookToolbars, lt as createNamedDraft, xe as createStudioThemeCSS, Te as createThemeFromMUITheme, et as edgeAt, C as edgeLabel, Xe as expressionOf, qe as isEditableNamed, jt as numberFormatCategoryLabel, Bt as numberFormatTypeLabel, _ as onReselect, Jt as optionsForPage, _e as panelSx, Se as patternLabel, i as registerSheetCommandGroups, se as registerStudioCommandCatalogs, d as registerStudioCommandGroups, ae as registerWorkbookCommandGroups, Pe as renderWorkbookSheetTab, m as renderWorkbookToolbars, Oe as saveNamedDraft, an as setPrintExamplesOnLoad, Pn as t, _t as toGradientValue, ce as toPatternSlots, le as tokensToMuiOptions, ye as useFormatSelection, on as useModelListener, sn as useRangeListener, Bn as useStudioApp };
2076
+ export { Ge as ANOMALIES_REVIEW_BUTTON, r as AnomaliesPlugin, sr as AppearanceCommandButton, Ke as AutoColorPosition, b as BorderCommandButton, tt as BorderPopupButton, $e as BorderStylePopupButton, et as BorderTemplateIcon, ke as CalculationOptionsCommandButton, S as CalculationRequiredStatus, e as CircularReferenceStatus, Qe as ColorButton, Xe as ColorButtonList, nt as ColorCommandButton, qe as ColorPanel, Je as ColorPanelType, Ze as ColorPopupButton, C as ColumnMenu, wt as CommentCard, k as CommentsPlugin, ai as DEFAULT_GRADIENT, jt as DefaultTaskPaneRegistry, Te as DefaultWorkbookToolbars, Ce as DocThemeCommandButton, je as DocumentTitle, f as ExternalLinksPlugin, h as FORMULA_BAR_EDITOR_ID, pt as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, or as FileCommandButton, y as FillMenu, it as FontFamilyCommandButton, rt as FontSizeCommandButton, x as FormatPlugin, d as FormulaBar, ft as FormulaField, vt as FunctionArgumentsPanel, xt as FunctionSearchPanel, ri as GradientEditor, ni as GradientStopsBar, I as INSERT_CELL_CONTROL_OPTIONS_KEY, Ct as INSERT_FUNCTION_PAGE_CLASS, ar as InputField, xe as InsertCellControlCommandButton, Ie as InsertFunctionCommandPopupButton, bt as InsertFunctionOption, cr as InsertFunctionSumCommandPopupButton, St as InsertFunctionWizard, ht as ItemCard, gt as ItemCardAction, _t as ItemsSearchField, Dt as LicenseManager, O as MobileFormulaBar, A as MobileInputToolbar, M as NamedCollectionEditor, m as NamedPlugin, s as NumberFormatCommandButton, st as NumberFormatOption, se as NumberStats, Wr as PATTERN_GALLERY, Tt as PasswordField, Be as PasteCommandButton, Kr as PatternPopupButton, Ur as PatternSwatch, N as PendingStatus, g as PivotMenu, te as PivotToolbar, zr as PresenceOverlay, Vr as PresencePlugin, yr as PresenceStrip, Rr as PresenceTaskPane, a as PresetCellStylesCommandButton, mt as PresetChip, He as PresetPivotStylesCommandButton, p as PresetSlicerStylesCommandButton, ut as PresetTableStylesCommandButton, v as ProtectionPlugin, _ as SheetTabMenu, ye as SheetZoomCommandButton, Pe as SheetZoomScale, ge as SheetsAllMenu, u as SlicerPlugin, j as StatusBar, li as Studio, Ye as StyledStrokeIcon, T as TablePlugin, lt as TableStyleCanvasPreview, ct as TableStylePreview, Ee as TableToolbar, D as TextEffectsCommandButton, n as TextRotateGroupButton, re as ThemeSelectButton, We as ThemeSelectPanel, Re as ThemeSelectPopupButton, l as UndoRedoCommandButton, le as WalkingCopyCommandButton, ve as WorkbookContextMenu, me as WorkbookElement, Vt as WorkbookIO, t as WorkbookStrip, Me as WorkbookToolbars, pe as createStudioThemeCSS, de as createThemeFromMUITheme, Ne as defaultRenderColumnMenu, ie as defaultRenderCommentCard, be as defaultRenderContextMenu, Fe as defaultRenderFillMenu, ae as defaultRenderFormulaBar, ce as defaultRenderHyperlinkCard, Oe as defaultRenderMovableMenu, Se as defaultRenderOutlineButton, fe as defaultRenderOutlineLevelButton, ue as defaultRenderPivotMenu, P as defaultRenderPivotToolbar, Le as defaultRenderSheetTab, Ue as defaultRenderSheetTabMenu, F as defaultRenderSheetsAll, Ve as defaultRenderStatusBar, w as defaultRenderTableToolbar, i as defaultRenderTabs, he as defaultRenderToolbar, ze as defaultRenderTooltip, E as defaultRenderWorkbookError, c as defaultRenderWorkbookLoading, o as defaultRenderWorksheet, ot as numberFormatCategoryLabel, at as numberFormatTypeLabel, yt as optionsForPage, Gr as patternLabel, oe as registerSheetCommandGroups, _e as registerStudioCommandCatalogs, ne as registerStudioCommandGroups, De as registerWorkbookCommandGroups, qt as setPrintExamplesOnLoad, ii as toGradientValue, Hr as toPatternSlots, ee as tokensToMuiOptions, Ae as useFormulaBarSession, Yt as useModelListener, Qt as useRangeListener, ui as useStudioApp };