@sheetxl/studio-mui 0.8.0-beta.10 → 0.8.0-beta.11

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 (119) hide show
  1. package/browser/esm/0BWO0bLZ8Vm_dKd2.mjs +582 -0
  2. package/browser/esm/BAbq4-I5f5oUiNaF.mjs +141 -0
  3. package/browser/esm/BED6h6YAwCf1HEQJ.mjs +161 -0
  4. package/browser/esm/{CEvZe2cZK-voZTif.mjs → BXhNFzyEGokTF-BL.mjs} +5 -5
  5. package/browser/esm/BYE9gCDWKyx6mnVs.mjs +381 -0
  6. package/browser/esm/{DBtc4lku0uHVcqWn.mjs → BjvD_4t2KGsZP5V8.mjs} +3 -3
  7. package/browser/esm/{DU3J8Gcf-WpBxNYg.mjs → BknfGJouygmnpFIU.mjs} +4 -4
  8. package/browser/esm/{D8al_cJ4U-NgzwoK.mjs → BlE_8o8tO2AgAlaj.mjs} +19 -17
  9. package/browser/esm/BokqKEpU6TFgfRs6.mjs +252 -0
  10. package/browser/esm/{DHY19rkSiiRZxShC.mjs → Brsh5yscJ_4uKFXp.mjs} +3 -3
  11. package/browser/esm/Bujtz_Guj88d03vI.mjs +831 -0
  12. package/browser/esm/Buqcl7J75MJrhpVE.mjs +1379 -0
  13. package/browser/esm/BvhYPwX3GrRaO9CM.mjs +319 -0
  14. package/browser/esm/C0wlMAIn9iREPK6w.mjs +87 -0
  15. package/browser/esm/C8JU4KsMasmLvojI.mjs +103 -0
  16. package/browser/esm/{CjznclrKqJRi7u9O.mjs → C9pIZVACtl9unFOp.mjs} +2 -2
  17. package/browser/esm/CBD4RiRKbbZtSXV-.mjs +318 -0
  18. package/browser/esm/{Blaj2R5hYxtLAW__.mjs → CEtXsBzEjEKk9GOj.mjs} +6 -6
  19. package/browser/esm/{CIu1bjPJe_x31Oww.mjs → COlZu93LRwuBvjE-.mjs} +3 -3
  20. package/browser/esm/{CoSiOS-og0zFw4Ws.mjs → CTjqDD-swFMZzI-Y.mjs} +2 -2
  21. package/browser/esm/CWkOgdL7mOKiTR62.mjs +975 -0
  22. package/browser/esm/ChSVxkPTIjgcC8PL.mjs +412 -0
  23. package/browser/esm/{5cbK03T_Oh3tNdR7.mjs → ClBvNPeNCAhuVWrG.mjs} +1 -1
  24. package/browser/esm/CyLn6zOOp_biA3xU.mjs +335 -0
  25. package/browser/esm/CynTY0oNtyJnoaBq.mjs +14 -0
  26. package/browser/esm/{xKiLJKiLxto8SayF.mjs → D3rRUK4dIM5gUSmj.mjs} +2 -2
  27. package/browser/esm/D9ISy7VkaRRFJl46.mjs +515 -0
  28. package/browser/esm/{fb126BNj3F8URR19.mjs → DDc6rDuU9JAo1DH_.mjs} +3 -3
  29. package/browser/esm/DDczwkXhz_MHub4z.mjs +197 -0
  30. package/browser/esm/{X1Db3b_7b_7OuCk6.mjs → DEv4pIEgYr5C7etm.mjs} +1 -1
  31. package/browser/esm/DG21x7RKDpge6zAE.mjs +31 -0
  32. package/browser/esm/DJOOed_OtB-XT7f3.mjs +437 -0
  33. package/browser/esm/{9eKCkvqpMQwqcXiw.mjs → DKtJxrpN0axtuQ0l.mjs} +1 -1
  34. package/browser/esm/DRSCS6aLiYmPjUz1.mjs +1543 -0
  35. package/browser/esm/{ByeL_BZuJ2kl8gtf.mjs → DTpRkgsTm_zYnWfW.mjs} +1 -1
  36. package/browser/esm/DV6i9RQZfJiKtEaJ.mjs +2552 -0
  37. package/browser/esm/DdcZrjMLWVukWcU5.mjs +7473 -0
  38. package/browser/esm/Di3BUxA0SqFWWgeg.mjs +94 -0
  39. package/browser/esm/DnGaP5F7mLwCGUYG.mjs +408 -0
  40. package/browser/esm/DpD4fg2WcyiKX_2K.mjs +414 -0
  41. package/browser/esm/{C1Rp2hZrApo5MUc8.mjs → Ds3XRkne7HxcXD8J.mjs} +2 -2
  42. package/browser/esm/{sFOAxZpxXo-qvDSp.mjs → DsoNMWDwHZP8UXQd.mjs} +1 -1
  43. package/browser/esm/G0Inqm6Eqw47dMpa.mjs +212 -0
  44. package/browser/esm/{B1Yp_uy1vFHcJB3U.mjs → HViD4Wfoi0mmqk9w.mjs} +1 -1
  45. package/browser/esm/LZoYSQAYV2wksnDv.mjs +386 -0
  46. package/browser/esm/{CtEFHbzYNvYjDYvi.mjs → QgaAIDUMmBQBsXP9.mjs} +8 -8
  47. package/browser/esm/{D6S8kVTzOjCn0-SK.mjs → YThnrg3PadGs7B4j.mjs} +51 -51
  48. package/browser/esm/index.mjs +1028 -170
  49. package/browser/esm/ttjcNHcFn8O6hfnd.mjs +1288 -0
  50. package/browser/esm/{yZxC4qUENOlMhVUH.mjs → w_JrR69vEpvoyeMy.mjs} +1 -1
  51. package/browser/esm/{DmCQbW4zwkT_Rq88.mjs → xFqkfN8QMCxvsetB.mjs} +1 -1
  52. package/browser/esm/{IQLeaAbtGTipUsOD.mjs → zqilJefihVd7At2T.mjs} +22 -21
  53. package/licenses/dependencies.txt +94 -94
  54. package/node/esm/{BYsG3KYVmxSe_CIQ.mjs → 1bf4gn-2vld4BZ9u.mjs} +1 -1
  55. package/node/esm/{CKu1AtRgyltyEdEN.mjs → 3WghtBXAvCDwcVrq.mjs} +1 -1
  56. package/node/esm/{cqzp431iNSLWictb.mjs → 4HmLH0bPVJCZLgik.mjs} +22 -22
  57. package/node/esm/{BYVLi0md4AYuDsB_.mjs → B0bdb_6p7fQI_ivo.mjs} +28 -28
  58. package/node/esm/BIMkjQUwG4Ih-6Sh.mjs +142 -0
  59. package/node/esm/BNg4QQY0WAPLE0q7.mjs +141 -0
  60. package/node/esm/BPzcW4BejRqso338.mjs +72 -0
  61. package/node/esm/BR45ogAR-hY2bE60.mjs +318 -0
  62. package/node/esm/BlN7G0DVC24zauig.mjs +197 -0
  63. package/node/esm/{ah3CUg4-VmNstGk_.mjs → Bph-sR3l6AYWeuxK.mjs} +2 -2
  64. package/node/esm/CPq-MIdEnc-53JpF.mjs +319 -0
  65. package/node/esm/CSAnTp5rwId0DUb8.mjs +380 -0
  66. package/node/esm/CWcv7UVXF8IUB0PC.mjs +1379 -0
  67. package/node/esm/{D9rzScOA9pEYFrtz.mjs → CYIoK22I6Yvv12_x.mjs} +20 -20
  68. package/node/esm/CZyA9uD4SkTvqp_G.mjs +1283 -0
  69. package/node/esm/{ci8d-mF1H9wnYzix.mjs → CjC6s3RUJQNCF7mP.mjs} +1 -1
  70. package/node/esm/{D6oQL8knsPpgdXuk.mjs → CuMePia6i_8yfJ6S.mjs} +9 -9
  71. package/node/esm/CvRbu8JPxFarsSR-.mjs +412 -0
  72. package/node/esm/{DNSjK5DAH3M14Qbc.mjs → CyafafEgfmjLqE5O.mjs} +1 -1
  73. package/node/esm/D-xqQ5qOSd6WrzwJ.mjs +94 -0
  74. package/node/esm/DLqBHdFp6wvm6EGs.mjs +212 -0
  75. package/node/esm/{BcwMb6CyVfvEwbHn.mjs → DMXLxp3T0E0SRTQc.mjs} +1 -1
  76. package/node/esm/{DZzvTQxIKr9LbEsA.mjs → DWqvf4H5F2wMnZ0L.mjs} +32 -30
  77. package/node/esm/DatM6eEYPpAtIMy-.mjs +405 -0
  78. package/node/esm/Db3dbaYLKUO66T9s.mjs +1689 -0
  79. package/node/esm/{B_jRGdwGFkudwmL-.mjs → DdEzhVqYTrGODXrz.mjs} +1 -1
  80. package/node/esm/DeZJlLk8WJ3BLtLs.mjs +975 -0
  81. package/node/esm/DfCuL8AUxMFoEG2s.mjs +519 -0
  82. package/node/esm/{Bb1sLMqXWKjdve23.mjs → Do-zCKziWhoG5eAv.mjs} +2 -2
  83. package/node/esm/{B8SQfjKjzYHLxzZR.mjs → DpJ2gmZJioCyq8La.mjs} +67 -67
  84. package/node/esm/{ETK6T6G0SIcFXDe5.mjs → XEDcegsv5AGKBfu2.mjs} +40 -40
  85. package/node/esm/index.mjs +8941 -13558
  86. package/node/esm/yCUxQuqVuC4DHKPx.mjs +385 -0
  87. package/node/esm/zITjZ7R4raDqhP-n.mjs +515 -0
  88. package/package.json +9 -9
  89. package/resources/locales/de/ui.msg.json +97 -0
  90. package/resources/locales/en/ui.msg.json +97 -0
  91. package/types/src/anchorItems/AnchorItemsDescriptor.d.ts +4 -4
  92. package/types/src/anomalies/AnomaliesPlugin.d.ts +5 -0
  93. package/types/src/anomalies/AnomaliesTaskPane.d.ts +17 -0
  94. package/types/src/anomalies/index.d.ts +3 -0
  95. package/types/src/border/BorderTemplateIcon.d.ts +6 -1
  96. package/types/src/chart/ChartFormatPanel.d.ts +20 -0
  97. package/types/src/chart/ChartPlugin.d.ts +6 -0
  98. package/types/src/chart/index.d.ts +3 -0
  99. package/types/src/comments/CommentCard.d.ts +2 -2
  100. package/types/src/conditions/useFormulaOption.d.ts +2 -2
  101. package/types/src/dialog/WorkbookStatisticsDialog.d.ts +1 -1
  102. package/types/src/format/BorderPreview.d.ts +11 -4
  103. package/types/src/format/useFormatSelection.d.ts +4 -4
  104. package/types/src/formulaBar/MobileFormulaBar.d.ts +18 -6
  105. package/types/src/formulaBar/MobileInputToolbar.d.ts +9 -3
  106. package/types/src/formulaBar/useFormulaBarSession.d.ts +6 -3
  107. package/types/src/index.d.ts +15 -6
  108. package/types/src/protection/ProtectedCellsPanel.d.ts +2 -2
  109. package/types/src/protection/{SheetProtectionPanel.d.ts → WorksheetProtectionPanel.d.ts} +6 -6
  110. package/types/src/protection/index.d.ts +1 -1
  111. package/types/src/slicer/PresetSlicerStylesCommandButton.d.ts +2 -2
  112. package/types/src/workbook/DefaultRenderers.d.ts +2 -2
  113. package/types/src/workbook/WorkbookContextMenu.d.ts +4 -0
  114. package/browser/esm/Biy7bhzzzPb5sfRN.mjs +0 -152
  115. package/browser/esm/COv-m-c2byCgvU3M.mjs +0 -14861
  116. package/browser/esm/Die9NXVFveHvcCT-.mjs +0 -4205
  117. package/browser/esm/sam1KGQZ59B_fADz.mjs +0 -1941
  118. package/node/esm/BYwXhrEwkRAt9nJS.mjs +0 -71
  119. package/node/esm/Cmt8Wv806N7NmE4Y.mjs +0 -3344
@@ -1,65 +1,202 @@
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.10
3
+ * @license @sheetxl/studio-mui - Studio - Spreadsheet UI built with SheetXL SDK using React & MUI. - v0.8.0-beta.11
4
4
  *
5
5
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
7
7
  */
8
- import { $ as e, $t as t, A as n, B as r, C as i, Cn as a, D as o, Dn as s, E as c, En as l, F as u, G as d, Gt as f, H as p, I as m, J as h, K as g, Kt as _, L as v, M as y, N as b, O as x, On as S, P as C, Q as w, Qt as T, R as E, S as ee, Sn as te, St as ne, T as re, Tn as ie, Tt as ae, U as oe, V as se, W as ce, X as le, Xt as ue, Y as de, Yt as fe, Z as pe, Zt as me, _ as he, _n as ge, _t as _e, an as ve, at as ye, b as be, bn as xe, bt as Se, c as Ce, ct as we, d as Te, dn as Ee, dt as De, en as Oe, et as ke, f as Ae, fn as je, ft as Me, g as Ne, gn as Pe, gt as Fe, h as Ie, hn as Le, ht as Re, i as ze, in as Be, it as Ve, j as He, k as Ue, kn as We, kt as Ge, lt as Ke, m as qe, mn as Je, mt as Ye, n as Xe, nn as Ze, nt as Qe, on as $e, ot as et, p as tt, pn as nt, pt as rt, q as it, qt as at, r as ot, rn as st, rt as ct, s as lt, sn as ut, st as dt, tn as ft, tt as pt, u as mt, un as ht, ut as gt, v as _t, vn as vt, vt as yt, w as bt, wn as xt, wt as St, x as Ct, xn as wt, xt as Tt, y as Et, yn as Dt, yt as Ot, z as kt } from "./COv-m-c2byCgvU3M.mjs";
9
- import { C as At, E as jt, T as Mt, _ as Nt, a as Pt, b as Ft, c as It, d as Lt, f as Rt, g as zt, h as Bt, i as Vt, l as Ht, m as Ut, n as Wt, o as Gt, p as Kt, r as qt, s as Jt, t as Yt, u as Xt, v as Zt, w as Qt, x as $t, y as en } from "./sam1KGQZ59B_fADz.mjs";
10
- import { t as tn } from "./5cbK03T_Oh3tNdR7.mjs";
11
- import { t as nn } from "./Biy7bhzzzPb5sfRN.mjs";
12
- import { n as rn, t as an } from "./fb126BNj3F8URR19.mjs";
13
- import { a as on, i as sn, n as cn, o as ln, r as un, t as dn } from "./CIu1bjPJe_x31Oww.mjs";
14
- import { t as fn } from "./IQLeaAbtGTipUsOD.mjs";
15
- import { LicenseManager as pn, LicenseManager as mn } from "@sheetxl/sdk";
16
- import { DefaultTaskPaneRegistry as hn, ThemeStateDefaults as gn, ThemeStateKey as D, WorkbookIO as _n, WorkbookIO as O, setPrintExamplesOnLoad as vn, useModelListener as yn, useRangeListener as bn, useWindowChrome as xn, useWorkbook as Sn, useWorkbookFormat as Cn, useWorkbookName as wn } from "@sheetxl/react";
17
- import { CommandButtonType as k, createThemeScopeClass as Tn, lazyComponent as En, useCallbackRef as A, useCommandButtonEntry as j, useCommandButtonRegistry as Dn, useCommands as M, useLocationSearch as On, usePersistentState as kn, useResolvedThemeMode as An, useTranslator as jn } from "@sheetxl/utils-react";
18
- import { Suspense as Mn, createElement as N, forwardRef as P, memo as F, useCallback as I, useEffect as L, useId as Nn, useMemo as R, useRef as z, useState as B } from "react";
19
- import { CommandButton as V, CommandGroup as Pn, CommandPopupButton as H, ExhibitDivider as U, LabelIcon as Fn, LazyLoadErrorPanel as In, OptionsDialog as Ln, defaultCreatePopupPanel as W, renderMembers as Rn } from "@sheetxl/utils-mui";
20
- import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
21
- import { Box as J, Paper as zn, TextField as Y, Typography as Bn, useMediaQuery as Vn } from "@mui/material";
22
- import { defineLazyModule as Hn } from "@sheetxl/utils";
23
- var X = Object.defineProperty, Un = (e, t) => {
24
- let n = {};
25
- for (var r in e) X(n, r, {
26
- get: e[r],
27
- enumerable: !0
8
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, W as S, X as C, Y as w, Z as T, _ as E, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as P, h as F, i as ee, it as te, j as I, k as ne, m as re, n as L, nt as ie, ot as ae, p as oe, q as se, r as ce, rt as le, s as ue, st as de, tt as fe, u as pe, v as me, w as he, x as ge, y as _e, z as ve } from "./DdcZrjMLWVukWcU5.mjs";
9
+ import { c as ye, i as be, l as xe, n as Se, o as Ce, r as we, s as Te, t as Ee } from "./Bujtz_Guj88d03vI.mjs";
10
+ import { t as De } from "./C8JU4KsMasmLvojI.mjs";
11
+ import { a as Oe } from "./CyLn6zOOp_biA3xU.mjs";
12
+ import { t as R } from "./ClBvNPeNCAhuVWrG.mjs";
13
+ import { a as ke, c as Ae, n as je, o as Me, s as Ne, t as Pe } from "./0BWO0bLZ8Vm_dKd2.mjs";
14
+ import { n as Fe, r as Ie, t as Le } from "./DJOOed_OtB-XT7f3.mjs";
15
+ import { t as Re } from "./HViD4Wfoi0mmqk9w.mjs";
16
+ import { n as ze, t as Be } from "./DDc6rDuU9JAo1DH_.mjs";
17
+ import { t as Ve } from "./BED6h6YAwCf1HEQJ.mjs";
18
+ import { n as He, r as Ue, t as We } from "./BokqKEpU6TFgfRs6.mjs";
19
+ import { a as Ge, i as Ke, n as qe, o as Je, r as Ye, t as Xe } from "./COlZu93LRwuBvjE-.mjs";
20
+ import { t as Ze } from "./ChSVxkPTIjgcC8PL.mjs";
21
+ import { t as Qe } from "./C0wlMAIn9iREPK6w.mjs";
22
+ import { Color as $e, IFill as z, LicenseManager as et, LicenseManager as tt } from "@sheetxl/sdk";
23
+ import { DefaultTaskPaneRegistry as nt, ThemeStateDefaults as rt, ThemeStateKey as it, WorkbookIO as at, WorkbookIO as ot, setPrintExamplesOnLoad as st, useInputField as ct, useModelListener as lt, useRangeListener as ut, useWindowChrome as dt, useWorkbook as ft, useWorkbookFormat as pt, useWorkbookName as mt } from "@sheetxl/react";
24
+ import { CommandButtonType as ht, DynamicIcon as B, createThemeScopeClass as gt, lazyComponent as _t, useCallbackRef as V, useCommandButtonEntry as vt, useCommandButtonRegistry as yt, useCommands as bt, useFloatStack as xt, useLocationSearch as St, usePersistentState as Ct, useResolvedThemeMode as wt, useTextSelectionDrag as Tt, useTranslator as H } from "@sheetxl/utils-react";
25
+ import { Suspense as Et, createElement as Dt, forwardRef as Ot, memo as U, useCallback as W, useEffect as G, useId as kt, useImperativeHandle as At, useLayoutEffect as jt, useMemo as K, useRef as q, useState as J } from "react";
26
+ import { CommandButton as Y, CommandGroup as Mt, CommandPopupButton as X, ExhibitDivider as Nt, ExhibitIconButton as Pt, ExhibitPopupIconButton as Ft, ExhibitTooltip as It, LabelIcon as Lt, LazyLoadErrorPanel as Rt, SimpleTooltip as zt, defaultCreatePopupPanel as Bt, renderMembers as Vt } from "@sheetxl/utils-mui";
27
+ import { Fragment as Ht, jsx as Z, jsxs as Q } from "react/jsx-runtime";
28
+ import { Box as $, FormControl as Ut, InputAdornment as Wt, InputLabel as Gt, MenuItem as Kt, Paper as qt, Select as Jt, TextField as Yt, Typography as Xt, useMediaQuery as Zt, useTheme as Qt } from "@mui/material";
29
+ import { defineLazyModule as $t } from "@sheetxl/utils";
30
+ var en = (e) => {
31
+ e.button === 0 && e.preventDefault();
32
+ }, tn = U(Ot((e, t) => {
33
+ 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 = Tt(), E = h ?? w("namedInput.label"), D = Re(), O = s && D ? D.register(s, c) : null, k = ct({
34
+ value: o ?? "",
35
+ onChange: l,
36
+ onChangeText: u,
37
+ onDone: d,
38
+ changeOn: f,
39
+ onValidate: p,
40
+ disabled: n
28
41
  });
29
- return t || X(n, Symbol.toStringTag, { value: "Module" }), n;
30
- }, Z = F(P((e, t) => {
31
- let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = B([]), s = O.canWrite(), c = O.canRead();
32
- L(() => {
42
+ At(m, () => k, [k]);
43
+ let A = q(D);
44
+ A.current = D;
45
+ let j = q(v);
46
+ j.current = v;
47
+ let M = q(null);
48
+ G(() => {
49
+ if (k.error === M.current || (M.current = k.error, j.current?.(k.error), !s)) return;
50
+ let e = A.current;
51
+ e && (k.error ? e.setError(s, { message: w(k.error) }) : e.clearErrors(s));
52
+ }, [k.error, s]);
53
+ let N = f === "done", P = k.engaged && k.dirty, F = K(() => {
54
+ if (!y && N) return Q(Wt, {
55
+ tabIndex: -1,
56
+ onMouseDown: en,
57
+ "aria-hidden": !P,
58
+ sx: {
59
+ display: "flex",
60
+ position: "relative",
61
+ flex: "0",
62
+ ...P ? null : {
63
+ visibility: "hidden",
64
+ pointerEvents: "none"
65
+ }
66
+ },
67
+ position: "end",
68
+ children: [Z(Pt, {
69
+ dense: !0,
70
+ outlined: !1,
71
+ color: "primary",
72
+ "aria-label": "commit-input",
73
+ icon: Z(B, { iconKey: "CheckSuccess" }),
74
+ propsTooltip: {
75
+ label: w("referenceInput.commit"),
76
+ simple: !0
77
+ },
78
+ disabled: !!k.error,
79
+ tabIndex: -1,
80
+ onMouseDown: en,
81
+ onClick: () => {
82
+ k.commit();
83
+ }
84
+ }), Z(Pt, {
85
+ dense: !0,
86
+ outlined: !1,
87
+ color: "warning",
88
+ "aria-label": "cancel-input",
89
+ icon: Z(B, { iconKey: "CloseError" }),
90
+ propsTooltip: {
91
+ label: w("referenceInput.cancel"),
92
+ simple: !0
93
+ },
94
+ tabIndex: -1,
95
+ onMouseDown: en,
96
+ onClick: () => {
97
+ k.cancel();
98
+ }
99
+ })]
100
+ });
101
+ }, [
102
+ y,
103
+ N,
104
+ P,
105
+ k.commit,
106
+ k.cancel,
107
+ !!k.error
108
+ ]);
109
+ return Z(Ut, {
110
+ sx: {
111
+ minWidth: 135,
112
+ width: "100%",
113
+ ...i
114
+ },
115
+ size: "small",
116
+ ref: t,
117
+ className: R("sxl-input-field", r),
118
+ ...C,
119
+ children: Z(Yt, {
120
+ label: E,
121
+ placeholder: a,
122
+ disabled: n,
123
+ error: !!k.error,
124
+ helperText: k.error && _ ? w(k.error) : g === void 0 ? " " : g,
125
+ sx: { "& .MuiFormHelperText-root": { marginTop: (e) => e.spacing(.5) } },
126
+ slotProps: {
127
+ input: { endAdornment: F },
128
+ inputLabel: { shrink: !0 },
129
+ htmlInput: {
130
+ spellCheck: !1,
131
+ autoComplete: "off",
132
+ onPointerDown: T.onPointerDown,
133
+ onDragStart: T.onDragStart,
134
+ ...b,
135
+ className: R("autoFocus", b?.className),
136
+ name: s,
137
+ readOnly: n,
138
+ sx: {
139
+ paddingTop: (e) => e.spacing(1.25),
140
+ paddingBottom: (e) => e.spacing(.75)
141
+ }
142
+ }
143
+ },
144
+ value: k.inputProps.value,
145
+ inputRef: (e) => {
146
+ k.inputProps.ref(e), O?.ref && O.ref(e);
147
+ },
148
+ onChange: (e) => {
149
+ k.inputProps.onChange(e), O?.onChange(e);
150
+ },
151
+ onKeyDown: (e) => {
152
+ k.inputProps.onKeyDown(e), e.defaultPrevented || x?.(e);
153
+ },
154
+ onFocus: (e) => {
155
+ k.inputProps.onFocus(e), S?.(e);
156
+ },
157
+ onBlur: (e) => {
158
+ k.inputProps.onBlur(e), O?.onBlur(e);
159
+ },
160
+ onContextMenu: (e) => {
161
+ e.stopPropagation();
162
+ }
163
+ })
164
+ });
165
+ }));
166
+ tn.displayName = "InputField";
167
+ var nn = U(Ot((e, t) => {
168
+ let { groupKey: n = "workbook", disabled: r, ...i } = e, [a, o] = J([]), s = ot.canWrite(), c = ot.canRead();
169
+ G(() => {
33
170
  let e = !0;
34
- return O.getWriteFormats().then((t) => {
171
+ return ot.getWriteFormats().then((t) => {
35
172
  e && o(t);
36
173
  }), () => {
37
174
  e = !1;
38
175
  };
39
176
  }, []);
40
- let l = Sn(), u = Cn(l), d = R(() => {
177
+ let l = ft(), u = pt(l), d = K(() => {
41
178
  if (a.length === 0) return null;
42
179
  let e = u?.toLowerCase();
43
180
  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];
44
- }, [a, u]), [f] = M(d ? `saveWorkbookAs${d.key}` : []), p = Dn(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = A((e) => {
181
+ }, [a, u]), [f] = bt(d ? `saveWorkbookAs${d.key}` : []), p = yt(), m = p.resolveMembers("newWorkbookOptions") ?? ["newWorkbook"], h = V((e) => {
45
182
  let t = {
46
- variant: k.Menuitem,
183
+ variant: ht.Menuitem,
47
184
  groupKey: n,
48
185
  disabled: r
49
- }, i = q(G, { children: [
50
- m.length > 1 ? K(H, {
186
+ }, i = Q(Ht, { children: [
187
+ m.length > 1 ? Z(X, {
51
188
  ...t,
52
189
  quickCommand: "newWorkbook",
53
190
  createPopupPanel: (e) => {
54
- let t = Rn(m, {
55
- variant: k.Menuitem,
191
+ let t = Vt(m, {
192
+ variant: ht.Menuitem,
56
193
  dividerOrientation: "horizontal",
57
194
  groupKey: "newWorkbookOptions",
58
195
  registry: p,
59
196
  propsCommandButton: { disabled: r },
60
197
  propsCommandPopup: { disabled: r }
61
198
  });
62
- return W({
199
+ return Bt({
63
200
  ...e,
64
201
  children: t,
65
202
  onClick: () => {
@@ -67,28 +204,28 @@ var X = Object.defineProperty, Un = (e, t) => {
67
204
  }
68
205
  });
69
206
  }
70
- }) : K(V, {
207
+ }) : Z(Y, {
71
208
  ...t,
72
209
  commandKey: "newWorkbook"
73
210
  }),
74
- K(U, { orientation: "horizontal" }),
75
- c ? K(H, {
211
+ Z(Nt, { orientation: "horizontal" }),
212
+ c ? Z(X, {
76
213
  ...t,
77
214
  quickCommand: "openWorkbook",
78
215
  createPopupPanel: (e) => {
79
216
  let n = {
80
217
  ...t,
81
218
  groupKey: "openWorkbookOptions"
82
- }, r = [N(V, {
219
+ }, r = [Dt(Y, {
83
220
  ...n,
84
221
  key: "device",
85
222
  commandKey: "openWorkbook"
86
- }), N(V, {
223
+ }), Dt(Y, {
87
224
  ...n,
88
225
  key: "web",
89
226
  commandKey: "openWorkbookFromUrl"
90
227
  })];
91
- return W({
228
+ return Bt({
92
229
  ...e,
93
230
  children: r,
94
231
  onClick: () => {
@@ -97,28 +234,28 @@ var X = Object.defineProperty, Un = (e, t) => {
97
234
  });
98
235
  }
99
236
  }) : null,
100
- s && a.length > 0 ? K(H, {
237
+ s && a.length > 0 ? Z(X, {
101
238
  ...t,
102
239
  quickCommand: "saveWorkbook",
103
240
  createPopupPanel: (e) => {
104
241
  let n = {
105
242
  ...t,
106
243
  groupKey: "saveWorkbookOptions"
107
- }, r = [N(V, {
244
+ }, r = [Dt(Y, {
108
245
  ...n,
109
246
  key: "saveWorkbookAs",
110
247
  commandKey: "saveWorkbookAs",
111
248
  label: f?.getLabel("saveWorkbookOptions"),
112
249
  icon: f?.getIcon("saveWorkbookOptions")
113
250
  })], i = a.filter((e) => !e.advanced && e.key !== d?.key);
114
- return i.length > 0 && r.push(K(U, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
251
+ return i.length > 0 && r.push(Z(Nt, { orientation: "horizontal" }, "divider")), i.forEach((e) => {
115
252
  let t = e.key, i = `saveWorkbookAs${t}`;
116
- r.push(N(V, {
253
+ r.push(Dt(Y, {
117
254
  ...n,
118
255
  key: t,
119
256
  commandKey: i
120
257
  }));
121
- }), W({
258
+ }), Bt({
122
259
  ...e,
123
260
  children: r,
124
261
  onClick: () => {
@@ -128,7 +265,7 @@ var X = Object.defineProperty, Un = (e, t) => {
128
265
  }
129
266
  }) : null
130
267
  ] });
131
- return W({
268
+ return Bt({
132
269
  ...e,
133
270
  children: i,
134
271
  onClick: (t) => {
@@ -143,8 +280,8 @@ var X = Object.defineProperty, Un = (e, t) => {
143
280
  f,
144
281
  m,
145
282
  p
146
- ]), g = j("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
147
- return K(H, {
283
+ ]), g = vt("fileOptions"), _ = g?.getLabel?.() ?? "File", v = g?.getDescription?.() ?? "Options for saving and loading the workbook.";
284
+ return Z(X, {
148
285
  disabled: r,
149
286
  groupKey: n,
150
287
  label: _,
@@ -159,40 +296,40 @@ var X = Object.defineProperty, Un = (e, t) => {
159
296
  },
160
297
  ...i,
161
298
  createPopupPanel: h,
162
- icon: K(Fn, {
299
+ icon: Z(Lt, {
163
300
  className: "label",
164
301
  icon: null,
165
302
  label: _
166
303
  })
167
304
  });
168
305
  }));
169
- Z.displayName = "FileCommandButton";
170
- var Wn = F(P((e, t) => {
171
- let { groupKey: n, disabled: r, ...i } = e, [a] = M(["themeMode"]), o = j("appearanceOptions"), s = A((e) => {
306
+ nn.displayName = "FileCommandButton";
307
+ var rn = U(Ot((e, t) => {
308
+ let { groupKey: n, disabled: r, ...i } = e, [a] = bt(["themeMode"]), o = vt("appearanceOptions"), s = V((e) => {
172
309
  let t = {
173
- variant: k.Menuitem,
310
+ variant: ht.Menuitem,
174
311
  groupKey: "appearanceOptions",
175
312
  disabled: r
176
- }, n = q(G, { children: [
177
- K(V, {
313
+ }, n = Q(Ht, { children: [
314
+ Z(Y, {
178
315
  ...t,
179
316
  commandKey: "themeMode"
180
317
  }),
181
- K(V, {
318
+ Z(Y, {
182
319
  ...t,
183
320
  commandKey: "defaultThemeMode"
184
321
  }),
185
- K(U, { orientation: "horizontal" }),
186
- K(V, {
322
+ Z(Nt, { orientation: "horizontal" }),
323
+ Z(Y, {
187
324
  ...t,
188
325
  commandKey: "enableDarkGrid"
189
326
  }),
190
- K(V, {
327
+ Z(Y, {
191
328
  ...t,
192
329
  commandKey: "enableDarkImages"
193
330
  })
194
331
  ] });
195
- return W({
332
+ return Bt({
196
333
  ...e,
197
334
  children: n
198
335
  });
@@ -200,8 +337,8 @@ var Wn = F(P((e, t) => {
200
337
  r,
201
338
  a,
202
339
  n
203
- ]), c = a?.getState(), l = Vn("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
204
- return K(H, {
340
+ ]), c = a?.getState(), l = Zt("(prefers-color-scheme: dark)"), u = c === "dark" || c === null && l, d = a?.getState() !== null;
341
+ return Z(X, {
205
342
  ref: t,
206
343
  quickCommand: "themeMode",
207
344
  createPopupPanel: s,
@@ -213,109 +350,830 @@ var Wn = F(P((e, t) => {
213
350
  selected: d,
214
351
  ...i
215
352
  });
216
- })), Gn = F(P((e, t) => {
353
+ })), an = U(Ot((e, t) => {
217
354
  let { ...n } = e;
218
- return K(Pn, {
355
+ return Z(Mt, {
219
356
  ref: t,
220
357
  groupKey: "insertFunctionSumOptions",
221
358
  ...n
222
359
  });
223
360
  }));
224
- Gn.displayName = "InsertFunctionSumCommandPopupButton";
225
- var Kn = Un({
226
- PasswordDialog: () => Q,
227
- default: () => Q
228
- }), Q = (e) => {
229
- let t = jn(), { description: n, requireCurrent: r = !1, onApply: i, title: a, sx: o, ...s } = e, [c, l] = B(""), [u, d] = B(""), [f, p] = B(""), [m, h] = B(!1), g = u === "", _ = f !== u, v = !g && !_;
230
- return K(Ln, {
231
- title: a ?? t(r ? "password.titleChange" : "password.title"),
232
- options: ["Ok", "Cancel"],
233
- defaultOption: "Ok",
234
- cancelOption: "Cancel",
235
- autoFocusSel: ".autoFocus",
236
- sx: {
237
- width: "380px",
238
- ...o
361
+ function on(e, t, n) {
362
+ return e === z.BuiltInSheetPattern.Solid ? {
363
+ foreground: n,
364
+ background: t
365
+ } : {
366
+ foreground: t,
367
+ background: n
368
+ };
369
+ }
370
+ an.displayName = "InsertFunctionSumCommandPopupButton";
371
+ var sn = U((e) => {
372
+ let { patternType: t, foreground: n, background: r, createCell: i, darkMode: a = !1, className: o, style: s, ...c } = e, l = K(() => {
373
+ let e = on(t, n, r);
374
+ return i({ style: { fill: {
375
+ type: z.Type.Pattern,
376
+ patternType: t,
377
+ foreground: e.foreground ?? void 0,
378
+ background: e.background ?? void 0
379
+ } } })?.getStyle().getFill().toCSS(a) ?? {};
380
+ }, [
381
+ t,
382
+ n,
383
+ r,
384
+ i,
385
+ a
386
+ ]);
387
+ return Z("div", {
388
+ className: R("sxl-pattern-swatch", o),
389
+ style: {
390
+ width: "100%",
391
+ height: "100%",
392
+ ...l,
393
+ ...s
239
394
  },
240
- onValidateOption: (e) => e === "Cancel" || (h(!0), v),
241
- onOption: (e, t) => {
242
- if (!t && e === "Ok") return i(u, r ? c : void 0);
395
+ ...c
396
+ });
397
+ });
398
+ sn.displayName = "PatternSwatch";
399
+ var cn = Object.freeze([
400
+ z.BuiltInSheetPattern.Solid,
401
+ z.BuiltInSheetPattern.DarkGray,
402
+ z.BuiltInSheetPattern.MediumGray,
403
+ z.BuiltInSheetPattern.LightGray,
404
+ z.BuiltInSheetPattern.Gray125,
405
+ z.BuiltInSheetPattern.Gray0625,
406
+ z.BuiltInSheetPattern.DarkHorizontal,
407
+ z.BuiltInSheetPattern.DarkVertical,
408
+ z.BuiltInSheetPattern.DarkDown,
409
+ z.BuiltInSheetPattern.DarkUp,
410
+ z.BuiltInSheetPattern.DarkGrid,
411
+ z.BuiltInSheetPattern.DarkTrellis,
412
+ z.BuiltInSheetPattern.LightHorizontal,
413
+ z.BuiltInSheetPattern.LightVertical,
414
+ z.BuiltInSheetPattern.LightDown,
415
+ z.BuiltInSheetPattern.LightUp,
416
+ z.BuiltInSheetPattern.LightGrid,
417
+ z.BuiltInSheetPattern.LightTrellis
418
+ ]);
419
+ function ln(e, t) {
420
+ switch (t) {
421
+ case z.BuiltInSheetPattern.None: return e("fill.pattern.none");
422
+ case z.BuiltInSheetPattern.Solid: return e("fill.pattern.solid");
423
+ case z.BuiltInSheetPattern.Gray0625: return e("fill.pattern.gray0625");
424
+ case z.BuiltInSheetPattern.Gray125: return e("fill.pattern.gray125");
425
+ case z.BuiltInSheetPattern.LightGray: return e("fill.pattern.lightGray");
426
+ case z.BuiltInSheetPattern.MediumGray: return e("fill.pattern.mediumGray");
427
+ case z.BuiltInSheetPattern.DarkGray: return e("fill.pattern.darkGray");
428
+ case z.BuiltInSheetPattern.LightHorizontal: return e("fill.pattern.lightHorizontal");
429
+ case z.BuiltInSheetPattern.LightVertical: return e("fill.pattern.lightVertical");
430
+ case z.BuiltInSheetPattern.LightDown: return e("fill.pattern.lightDown");
431
+ case z.BuiltInSheetPattern.LightUp: return e("fill.pattern.lightUp");
432
+ case z.BuiltInSheetPattern.LightGrid: return e("fill.pattern.lightGrid");
433
+ case z.BuiltInSheetPattern.LightTrellis: return e("fill.pattern.lightTrellis");
434
+ case z.BuiltInSheetPattern.DarkHorizontal: return e("fill.pattern.darkHorizontal");
435
+ case z.BuiltInSheetPattern.DarkVertical: return e("fill.pattern.darkVertical");
436
+ case z.BuiltInSheetPattern.DarkDown: return e("fill.pattern.darkDown");
437
+ case z.BuiltInSheetPattern.DarkUp: return e("fill.pattern.darkUp");
438
+ case z.BuiltInSheetPattern.DarkGrid: return e("fill.pattern.darkGrid");
439
+ case z.BuiltInSheetPattern.DarkTrellis: return e("fill.pattern.darkTrellis");
440
+ default: return t;
441
+ }
442
+ }
443
+ var un = U((e) => {
444
+ 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 = W((e) => {
445
+ let { closeFloat: i } = e;
446
+ return Z($, {
447
+ sx: {
448
+ display: "grid",
449
+ gridTemplateColumns: "repeat(6, 34px)",
450
+ gap: "4px",
451
+ padding: "8px"
452
+ },
453
+ children: cn.map((e) => Z(It, {
454
+ label: ln(l, e),
455
+ children: Z($, {
456
+ role: "button",
457
+ tabIndex: 0,
458
+ "aria-label": ln(l, e),
459
+ "aria-pressed": e === t,
460
+ onMouseDown: (e) => e.preventDefault(),
461
+ onMouseUp: () => {
462
+ i?.(), u(e);
463
+ },
464
+ onKeyDown: (t) => {
465
+ t.key !== "Enter" && t.key !== " " || (t.preventDefault(), i?.(), u(e));
466
+ },
467
+ sx: {
468
+ width: "34px",
469
+ height: "34px",
470
+ cursor: "pointer",
471
+ borderRadius: "2px",
472
+ outline: (n) => e === t ? `2px solid ${n.palette.primary.main}` : `1px solid ${n.palette.divider}`,
473
+ outlineOffset: "-1px",
474
+ "&:hover": { outline: (e) => `2px solid ${e.palette.primary.light}` }
475
+ },
476
+ children: Z(sn, {
477
+ patternType: e,
478
+ foreground: n,
479
+ background: r,
480
+ createCell: a,
481
+ darkMode: o
482
+ })
483
+ })
484
+ }, e))
485
+ });
486
+ }, [
487
+ t,
488
+ n,
489
+ r,
490
+ a,
491
+ o,
492
+ u,
493
+ l
494
+ ]);
495
+ return Z(Ft, {
496
+ disabled: s,
497
+ tooltip: l("fill.patternTooltip", { pattern: ln(l, t) }),
498
+ createPopupPanel: d,
499
+ icon: Z($, {
500
+ sx: {
501
+ width: "48px",
502
+ height: "20px",
503
+ borderRadius: "2px",
504
+ outline: (e) => `1px solid ${e.palette.divider}`,
505
+ outlineOffset: "-1px",
506
+ overflow: "hidden"
507
+ },
508
+ children: Z(sn, {
509
+ patternType: t,
510
+ foreground: n,
511
+ background: r,
512
+ createCell: a,
513
+ darkMode: o
514
+ })
515
+ }),
516
+ ...c
517
+ });
518
+ });
519
+ un.displayName = "PatternPopupButton";
520
+ var dn = {
521
+ resizeOnOverflow: !1,
522
+ placement: "bottom",
523
+ offsets: [0, 2],
524
+ shift: { padding: 8 }
525
+ }, fn = ((e) => {
526
+ let t = [], n = e.length;
527
+ for (let r = 0; r < n; r++) {
528
+ let [i, a] = e[(r + n - 1) % n], [o, s, c] = e[r], [l, u] = e[(r + 1) % n], d = (e, t) => {
529
+ let n = Math.hypot(e - o, t - s) || 1, r = Math.min(c, n / 2);
530
+ return [o + (e - o) / n * r, s + (t - s) / n * r];
531
+ }, [f, p] = d(i, a), [m, h] = d(l, u);
532
+ t.push(`${r === 0 ? "M" : "L"}${f.toFixed(2)} ${p.toFixed(2)} Q${o} ${s} ${m.toFixed(2)} ${h.toFixed(2)}`);
533
+ }
534
+ return t.join(" ") + " Z";
535
+ })([
536
+ [
537
+ 7,
538
+ .5,
539
+ 1
540
+ ],
541
+ [
542
+ 13.5,
543
+ 6,
544
+ 1.5
545
+ ],
546
+ [
547
+ 13.5,
548
+ 16.5,
549
+ 2
550
+ ],
551
+ [
552
+ .5,
553
+ 16.5,
554
+ 2
555
+ ],
556
+ [
557
+ .5,
558
+ 6,
559
+ 1.5
560
+ ]
561
+ ]), pn = (e) => Math.max(0, Math.min(1, e)), mn = (e, t, n) => {
562
+ try {
563
+ return (e instanceof $e ? e : new $e(e, t)).toCSS(n);
564
+ } catch {
565
+ return "transparent";
566
+ }
567
+ }, hn = (e, t, n) => {
568
+ try {
569
+ let r = new $e(e, n).toRGBA(), i = new $e(t, n).toRGBA(), a = (e, t) => Math.round((e + t) / 2).toString(16).padStart(2, "0");
570
+ return `${a(r.red, i.red)}${a(r.green, i.green)}${a(r.blue, i.blue)}`;
571
+ } catch {
572
+ return e;
573
+ }
574
+ }, gn = (e, t) => e.offset === t.offset && String(e.color) === String(t.color), _n = (e, t) => e.length === t.length && e.every((e, n) => gn(e, t[n])), vn = U((e) => {
575
+ let { percent: t, disabled: n, inputRef: r, onChange: i } = e, a = H(), [o, s] = J(String(t)), [c, l] = J(!1);
576
+ return G(() => {
577
+ c || s(String(t));
578
+ }, [t, c]), Z(Yt, {
579
+ type: "number",
580
+ size: "small",
581
+ disabled: n,
582
+ inputRef: r,
583
+ label: a("fill.gradientPosition"),
584
+ value: o,
585
+ onFocus: () => l(!0),
586
+ onBlur: () => {
587
+ l(!1), s(String(t));
588
+ },
589
+ onChange: (e) => {
590
+ if (s(e.target.value), e.target.value === "") return;
591
+ let t = Math.max(0, Math.min(100, parseInt(e.target.value, 10) || 0));
592
+ i(t);
593
+ },
594
+ slotProps: {
595
+ htmlInput: {
596
+ min: 0,
597
+ max: 100,
598
+ step: 5,
599
+ style: { textAlign: "right" }
600
+ },
601
+ inputLabel: { shrink: !0 },
602
+ input: { endAdornment: Z(Wt, {
603
+ position: "end",
604
+ disableTypography: !0,
605
+ children: "%"
606
+ }) }
243
607
  },
244
- ...s,
245
- children: q(J, {
608
+ sx: { width: 120 }
609
+ });
610
+ });
611
+ vn.displayName = "StopPositionField";
612
+ var yn = U((e) => {
613
+ 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(), _ = Qt(), v = K(() => new $e(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) => {
614
+ b(e), f(t, e ?? null);
615
+ }, [t, f]), P = V((e) => {
616
+ d(t, e / 100);
617
+ }, [t, d]), F = Math.round(100 * r), ee = mn(y ?? v, i, o), te = W((e) => {
618
+ let { closeFloat: n } = e;
619
+ return Q($, {
620
+ className: "sxl-gradient-stop-popup",
246
621
  sx: {
247
622
  display: "flex",
248
- flexDirection: "column",
249
- gap: (e) => e.spacing(2),
250
- paddingTop: (e) => e.spacing(1)
623
+ flexDirection: "column"
251
624
  },
252
- children: [
253
- n ? K(Bn, {
254
- variant: "body2",
255
- sx: { color: "text.secondary" },
256
- children: n
257
- }) : null,
258
- r ? K(Y, {
259
- type: "password",
260
- size: "small",
261
- label: t("password.current"),
262
- value: c,
263
- onChange: (e) => l(e.target.value),
264
- slotProps: {
265
- inputLabel: { shrink: !0 },
266
- htmlInput: {
267
- className: "autoFocus",
268
- autoComplete: "current-password",
269
- spellCheck: !1
270
- }
271
- }
272
- }) : null,
273
- K(Y, {
274
- type: "password",
275
- size: "small",
276
- label: t(r ? "password.new" : "password.label"),
277
- value: u,
278
- error: m && g,
279
- helperText: m && g ? t("password.required") : " ",
280
- onChange: (e) => d(e.target.value),
281
- slotProps: {
282
- inputLabel: { shrink: !0 },
283
- htmlInput: {
284
- className: r ? void 0 : "autoFocus",
285
- autoComplete: "new-password",
286
- spellCheck: !1
287
- }
288
- }
289
- }),
290
- K(Y, {
291
- type: "password",
292
- size: "small",
293
- label: t("protection.passwordConfirm"),
294
- value: f,
295
- error: m && !g && _,
296
- helperText: m && !g && _ ? t("protection.passwordMismatch") : " ",
297
- onChange: (e) => p(e.target.value),
298
- slotProps: {
299
- inputLabel: { shrink: !0 },
300
- htmlInput: {
301
- autoComplete: "new-password",
302
- spellCheck: !1
303
- }
304
- }
625
+ children: [Z(be, {
626
+ selectedColor: v,
627
+ previewColor: y,
628
+ disableAlpha: !0,
629
+ schemeLookup: i,
630
+ recentColors: a,
631
+ darkMode: o,
632
+ onDone: n,
633
+ onPreviewColor: N,
634
+ onPreviewColorImmediate: N,
635
+ onSelectColor: (e) => {
636
+ N(void 0), e && p(t, e);
637
+ }
638
+ }), Z($, {
639
+ sx: {
640
+ display: "flex",
641
+ alignItems: "center",
642
+ gap: 1,
643
+ paddingX: 1,
644
+ paddingBottom: 1
645
+ },
646
+ children: Z(vn, {
647
+ percent: F,
648
+ disabled: s,
649
+ inputRef: j,
650
+ onChange: P
651
+ })
652
+ })]
653
+ });
654
+ }, [
655
+ v,
656
+ y,
657
+ F,
658
+ t,
659
+ i,
660
+ a,
661
+ o,
662
+ s,
663
+ N,
664
+ p,
665
+ P
666
+ ]), I = xt({
667
+ anchor: x,
668
+ label: "gradient-stop",
669
+ createPopupPanel: te,
670
+ propsPopper: dn,
671
+ onOpen: () => {
672
+ w(!0), h(t, !0), M.current && (M.current = !1, requestAnimationFrame(() => j.current?.focus()));
673
+ },
674
+ onClose: () => {
675
+ w(!1), h(t, !1), N(void 0);
676
+ }
677
+ }), ne = V((e) => {
678
+ M.current = e, I.reference.open(0);
679
+ }, [I]), re = V(() => {
680
+ C ? I.reference.close(0) : ne(!1);
681
+ }, [
682
+ C,
683
+ I,
684
+ ne
685
+ ]), L = q(null), ie = V((e) => {
686
+ s || e.button !== 0 || (e.currentTarget.setPointerCapture(e.pointerId), L.current = {
687
+ pointerId: e.pointerId,
688
+ startX: e.clientX,
689
+ startOffset: r,
690
+ moved: !1,
691
+ offset: r
692
+ });
693
+ }, [s, r]), ae = V((e) => {
694
+ let n = L.current;
695
+ if (!n || n.pointerId !== e.pointerId) return;
696
+ let r = e.clientX - n.startX;
697
+ if (!n.moved) {
698
+ if (Math.abs(r) < 3) return;
699
+ n.moved = !0, E(!0), A(!1), I.reference.close(0);
700
+ }
701
+ let i = l.current?.getBoundingClientRect().width ?? 0;
702
+ n.offset = i > 0 ? pn(n.startOffset + r / i) : n.startOffset, u(t, n.offset, !1);
703
+ }, [
704
+ t,
705
+ l,
706
+ I,
707
+ u
708
+ ]), oe = V((e) => {
709
+ let n = L.current;
710
+ if (n && n.pointerId === e.pointerId) {
711
+ if (L.current = null, n.moved) return E(!1), u(t, n.offset, !0), void d(t, n.offset);
712
+ re();
713
+ }
714
+ }, [
715
+ t,
716
+ u,
717
+ d,
718
+ re
719
+ ]), se = V((e) => {
720
+ let n = L.current;
721
+ n && n.pointerId === e.pointerId && (L.current = null, n.moved && (E(!1), u(t, n.startOffset, !0)));
722
+ }, [t, u]), ce = V((e) => {
723
+ if (s) return;
724
+ let n = e.shiftKey ? .1 : .01;
725
+ switch (e.key) {
726
+ case "ArrowLeft":
727
+ d(t, pn(r - n));
728
+ break;
729
+ case "ArrowRight":
730
+ d(t, pn(r + n));
731
+ break;
732
+ case "Home":
733
+ d(t, 0);
734
+ break;
735
+ case "End":
736
+ d(t, 1);
737
+ break;
738
+ case "Delete":
739
+ case "Backspace":
740
+ c && m(t);
741
+ break;
742
+ case "Enter":
743
+ case " ":
744
+ ne(!0);
745
+ break;
746
+ case "Escape":
747
+ if (!C) return;
748
+ I.reference.close(0);
749
+ break;
750
+ default: return;
751
+ }
752
+ e.preventDefault();
753
+ }, [
754
+ s,
755
+ t,
756
+ r,
757
+ c,
758
+ C,
759
+ I,
760
+ ne,
761
+ d,
762
+ m
763
+ ]), le = C || T || D, ue = !s && !T && !C && k, de = Q($, {
764
+ className: "sxl-gradient-stop-toolbar",
765
+ onPointerDown: (e) => {
766
+ e.stopPropagation();
767
+ },
768
+ sx: {
769
+ display: "flex",
770
+ alignItems: "center",
771
+ gap: .25
772
+ },
773
+ children: [Z(Pt, {
774
+ tabIndex: -1,
775
+ propsTooltip: {
776
+ label: g("fill.gradientStopColor"),
777
+ simple: !0
778
+ },
779
+ icon: Z($, {
780
+ className: "color-wrapper",
781
+ sx: {
782
+ lineHeight: 0,
783
+ "& .activeColor": { fill: ee }
784
+ },
785
+ children: Z(B, { iconKey: "circle.colored" })
786
+ }),
787
+ onClick: () => {
788
+ A(!1), re();
789
+ }
790
+ }), Z(Pt, {
791
+ tabIndex: -1,
792
+ disabled: !c,
793
+ propsTooltip: {
794
+ label: g("fill.gradientRemoveStop"),
795
+ simple: !0
796
+ },
797
+ icon: Z(B, { iconKey: "Close" }),
798
+ onClick: () => m(t)
799
+ })]
800
+ });
801
+ return Q(Ht, { children: [Z(zt, {
802
+ title: de,
803
+ open: ue,
804
+ onOpen: () => A(!0),
805
+ onClose: () => A(!1),
806
+ enterDelay: 250,
807
+ enterNextDelay: 250,
808
+ leaveDelay: 400,
809
+ placement: "bottom",
810
+ disableFocusListener: !0,
811
+ disableTouchListener: !0,
812
+ slotProps: { tooltip: { sx: {
813
+ backgroundColor: (e) => e.palette.background.paper,
814
+ color: (e) => e.palette.text.primary,
815
+ border: (e) => `1px solid ${e.palette.divider}`,
816
+ boxShadow: (e) => e.shadows[3],
817
+ padding: "2px",
818
+ marginTop: "4px !important"
819
+ } } },
820
+ children: Z($, {
821
+ ref: S,
822
+ role: "button",
823
+ tabIndex: s ? -1 : 0,
824
+ "aria-label": g("fill.gradientStop", { position: F }),
825
+ "aria-disabled": s || void 0,
826
+ className: R("sxl-gradient-stop", {
827
+ "sxl-gradient-stop-open": C,
828
+ "sxl-gradient-stop-dragging": T
829
+ }),
830
+ onPointerDown: ie,
831
+ onPointerMove: ae,
832
+ onPointerUp: oe,
833
+ onPointerCancel: se,
834
+ onFocus: () => O(!0),
835
+ onBlur: () => O(!1),
836
+ onKeyDown: ce,
837
+ sx: {
838
+ position: "absolute",
839
+ left: 100 * r + "%",
840
+ top: "calc(100% - 4px)",
841
+ width: 14,
842
+ height: 17,
843
+ transform: "translateX(-50%)",
844
+ transition: T ? "none" : "left 120ms ease-out",
845
+ lineHeight: 0,
846
+ cursor: s ? "default" : T ? "grabbing" : "grab",
847
+ touchAction: "none",
848
+ outline: "none",
849
+ zIndex: +!!T,
850
+ filter: le ? `drop-shadow(0 1px 2px ${_.palette.action.active})` : void 0
851
+ },
852
+ children: Z("svg", {
853
+ width: 14,
854
+ height: 17,
855
+ viewBox: "0 0 14 17",
856
+ "aria-hidden": "true",
857
+ children: Z("path", {
858
+ d: fn,
859
+ fill: ee,
860
+ stroke: le ? _.palette.primary.main : _.palette.text.secondary,
861
+ strokeWidth: le ? 1.5 : 1,
862
+ strokeLinejoin: "round"
305
863
  })
306
- ]
864
+ })
307
865
  })
866
+ }), I.component] });
867
+ });
868
+ yn.displayName = "StopHandle";
869
+ var bn = U((e) => {
870
+ 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({
871
+ known: [],
872
+ next: 1
873
+ }), m = K(() => {
874
+ let e = p.current, n = ((e, t, n) => {
875
+ for (let n of t) if (_n(e, n.stops)) return n.keys;
876
+ let r = /* @__PURE__ */ new Set();
877
+ return e.map((e) => {
878
+ for (let n of t) {
879
+ let t = n.stops.findIndex((t, i) => !r.has(n.keys[i]) && gn(t, e));
880
+ if (t >= 0) return r.add(n.keys[t]), n.keys[t];
881
+ }
882
+ return -1;
883
+ }).map((e) => e >= 0 ? e : n());
884
+ })(t, e.known, () => e.next++);
885
+ return e.known[0]?.keys !== n && (e.known = [{
886
+ stops: t,
887
+ keys: n
888
+ }, ...e.known].slice(0, 3)), n;
889
+ }, [t]), [h, g] = J(null), [_, v] = J(null), [y, b] = J(null);
890
+ jt(() => {
891
+ g((e) => {
892
+ if (!e?.released) return e;
893
+ let n = m.indexOf(e.key);
894
+ return n >= 0 && t[n].offset === e.offset ? null : e;
895
+ });
896
+ }, [t, m]), jt(() => {
897
+ if (!h?.released) return;
898
+ let e = window.setTimeout(() => g((e) => e?.released ? null : e), 1e3);
899
+ return () => window.clearTimeout(e);
900
+ }, [h]);
901
+ let x = !c && t.length < i, S = !c && t.length > r, C = V((e) => {
902
+ let t = [...e].sort((e, t) => e.stop.offset - t.stop.offset), r = {
903
+ stops: t.map((e) => e.stop),
904
+ keys: t.map((e) => e.key)
905
+ }, i = p.current;
906
+ i.known = [r, ...i.known].slice(0, 3), n(r.stops.slice());
907
+ }, [n]), w = V(() => t.map((e, t) => ({
908
+ stop: e,
909
+ key: m[t]
910
+ })), [t, m]), T = V((e, t, n) => {
911
+ g({
912
+ key: m[e],
913
+ offset: t,
914
+ released: n
915
+ });
916
+ }, [m]), E = V((e, t) => {
917
+ C(w().map((n, r) => r === e ? {
918
+ ...n,
919
+ stop: {
920
+ ...n.stop,
921
+ offset: t
922
+ }
923
+ } : n));
924
+ }, [w, C]), D = V((e, t) => {
925
+ v(t ? {
926
+ key: m[e],
927
+ color: t
928
+ } : null);
929
+ }, [m]), O = V((e, t) => {
930
+ let n = m[e];
931
+ b((e) => t ? n : e === n ? null : e);
932
+ }, [m]), k = V((e, t) => {
933
+ C(w().map((n, r) => r === e ? {
934
+ ...n,
935
+ stop: {
936
+ ...n.stop,
937
+ color: t.toString()
938
+ }
939
+ } : n));
940
+ }, [w, C]), A = V((e) => {
941
+ t.length <= r || C(w().filter((t, n) => n !== e));
942
+ }, [
943
+ t,
944
+ r,
945
+ w,
946
+ C
947
+ ]), j = V((e) => {
948
+ if (t.length >= i) return;
949
+ let n = [...t].sort((e, t) => e.offset - t.offset), r = e;
950
+ if (r === void 0) {
951
+ let e = -1;
952
+ for (let t = 0; t + 1 < n.length; t++) {
953
+ let i = n[t + 1].offset - n[t].offset;
954
+ i > e && (e = i, r = (n[t].offset + n[t + 1].offset) / 2);
955
+ }
956
+ r === void 0 && (r = 1);
957
+ }
958
+ let o = [...n].reverse().find((e) => e.offset <= r) ?? n[0], s = n.find((e) => e.offset >= r) ?? n[n.length - 1];
959
+ C([...w(), {
960
+ stop: {
961
+ offset: r,
962
+ color: hn(o.color, s.color, a)
963
+ },
964
+ key: p.current.next++
965
+ }]);
966
+ }, [
967
+ t,
968
+ i,
969
+ a,
970
+ w,
971
+ C
972
+ ]), M = V((e) => {
973
+ if (!x || e.button !== 0 || y !== null || e.target.closest(".sxl-gradient-stop")) return;
974
+ let t = e.currentTarget.getBoundingClientRect();
975
+ t.width <= 0 || j(pn((e.clientX - t.left) / t.width));
976
+ }, [
977
+ x,
978
+ y,
979
+ j
980
+ ]), N = K(() => {
981
+ let e = t.map((e, t) => ({
982
+ offset: h?.key === m[t] ? h.offset : e.offset,
983
+ css: mn(_?.key === m[t] ? _.color : e.color, a, s)
984
+ }));
985
+ return e.sort((e, t) => e.offset - t.offset), `linear-gradient(90deg, ${e.map((e) => `${e.css} ${(100 * e.offset).toFixed(2)}%`).join(", ")})`;
986
+ }, [
987
+ t,
988
+ m,
989
+ h,
990
+ _,
991
+ a,
992
+ s
993
+ ]);
994
+ return Q($, {
995
+ className: R("sxl-gradient-stops", l),
996
+ sx: {
997
+ display: "flex",
998
+ alignItems: "flex-start",
999
+ gap: .5,
1000
+ minWidth: 0
1001
+ },
1002
+ ...u,
1003
+ children: [Z($, {
1004
+ sx: {
1005
+ flex: 1,
1006
+ minWidth: 0,
1007
+ paddingX: "7px",
1008
+ paddingBottom: "15px"
1009
+ },
1010
+ children: Z($, {
1011
+ ref: f,
1012
+ className: "sxl-gradient-stops-ramp",
1013
+ onPointerDown: M,
1014
+ sx: {
1015
+ position: "relative",
1016
+ height: 18,
1017
+ borderRadius: 1,
1018
+ border: (e) => `1px solid ${e.palette.divider}`,
1019
+ backgroundImage: N,
1020
+ backgroundRepeat: "no-repeat",
1021
+ cursor: x ? "copy" : "default",
1022
+ opacity: c ? .5 : 1
1023
+ },
1024
+ children: t.map((e, t) => Z(yn, {
1025
+ index: t,
1026
+ stop: e,
1027
+ offset: h?.key === m[t] ? h.offset : e.offset,
1028
+ schemeLookup: a,
1029
+ recentColors: o,
1030
+ darkMode: s,
1031
+ disabled: c,
1032
+ canRemove: S,
1033
+ rampRef: f,
1034
+ onDrag: T,
1035
+ onMove: E,
1036
+ onPreviewColor: D,
1037
+ onChangeColor: k,
1038
+ onRemove: A,
1039
+ onOpenChange: O
1040
+ }, m[t]))
1041
+ })
1042
+ }), Z(Pt, {
1043
+ disabled: !x,
1044
+ propsTooltip: {
1045
+ label: d("fill.gradientAddStop"),
1046
+ simple: !0
1047
+ },
1048
+ icon: Z(B, { iconKey: "Add" }),
1049
+ onClick: () => j(),
1050
+ sx: { marginTop: "-3px" }
1051
+ })]
308
1052
  });
309
- }, qn = /* @__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.manageVisualViewport.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), Jn = () => K(G, {}), Yn = Hn("studio:eagerStudio", () => import("./Die9NXVFveHvcCT-.mjs")), Xn = ({ error: e, onShown: t }) => (L(() => {
1053
+ });
1054
+ bn.displayName = "GradientStopsBar";
1055
+ var xn = U((e) => {
1056
+ 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) => {
1057
+ n({
1058
+ ...t,
1059
+ ...e
1060
+ });
1061
+ }, [t, n]), p = t.gradientType === z.GradientType.Linear;
1062
+ return Q($, {
1063
+ className: R("sxl-gradient-editor", l),
1064
+ sx: {
1065
+ display: "flex",
1066
+ flexDirection: "column",
1067
+ gap: 1.25,
1068
+ minWidth: 0
1069
+ },
1070
+ ...u,
1071
+ children: [Q($, {
1072
+ sx: {
1073
+ display: "flex",
1074
+ flexWrap: "wrap",
1075
+ gap: 1,
1076
+ alignItems: "center"
1077
+ },
1078
+ children: [Q(Ut, {
1079
+ size: "small",
1080
+ sx: {
1081
+ minWidth: 132,
1082
+ flex: "1 1 132px"
1083
+ },
1084
+ children: [Z(Gt, {
1085
+ shrink: !0,
1086
+ children: d("fill.gradientStyle")
1087
+ }), Q(Jt, {
1088
+ label: d("fill.gradientStyle"),
1089
+ notched: !0,
1090
+ disabled: c,
1091
+ value: t.gradientType,
1092
+ onChange: (e) => f({ gradientType: e.target.value }),
1093
+ children: [Z(Kt, {
1094
+ value: z.GradientType.Linear,
1095
+ children: d("fill.gradientLinear")
1096
+ }), Z(Kt, {
1097
+ value: z.GradientType.Path,
1098
+ children: d("fill.gradientRadial")
1099
+ })]
1100
+ })]
1101
+ }), Z(Yt, {
1102
+ label: d("fill.gradientAngle"),
1103
+ type: "number",
1104
+ size: "small",
1105
+ disabled: c || !p,
1106
+ value: t.angle,
1107
+ onChange: (e) => {
1108
+ let t = parseInt(e.target.value, 10) || 0;
1109
+ f({ angle: (t % 360 + 360) % 360 });
1110
+ },
1111
+ slotProps: {
1112
+ htmlInput: {
1113
+ min: 0,
1114
+ max: 359,
1115
+ step: 15
1116
+ },
1117
+ inputLabel: { shrink: !0 }
1118
+ },
1119
+ sx: { width: 104 }
1120
+ })]
1121
+ }), Q($, {
1122
+ sx: {
1123
+ display: "flex",
1124
+ flexDirection: "column",
1125
+ gap: .5,
1126
+ minWidth: 0
1127
+ },
1128
+ children: [Z(Xt, {
1129
+ variant: "caption",
1130
+ component: "div",
1131
+ sx: { color: "text.secondary" },
1132
+ children: d("fill.gradientStops")
1133
+ }), Z(bn, {
1134
+ stops: t.stops,
1135
+ onChange: (e) => f({ stops: e }),
1136
+ minStops: r,
1137
+ maxStops: i,
1138
+ schemeLookup: a,
1139
+ recentColors: o,
1140
+ darkMode: s,
1141
+ disabled: c
1142
+ })]
1143
+ })]
1144
+ });
1145
+ });
1146
+ xn.displayName = "GradientEditor";
1147
+ var Sn = (e) => {
1148
+ let t = e.getStops();
1149
+ return {
1150
+ gradientType: e.getGradientType(),
1151
+ angle: e.getAngle() ?? 0,
1152
+ stops: t.length >= 2 ? t.map((e) => ({
1153
+ offset: e.getOffset(),
1154
+ color: e.getColor().toString()
1155
+ })) : [...Cn.stops]
1156
+ };
1157
+ }, Cn = Object.freeze({
1158
+ gradientType: z.GradientType.Linear,
1159
+ angle: 90,
1160
+ stops: [{
1161
+ offset: 0,
1162
+ color: "ffffff"
1163
+ }, {
1164
+ offset: 1,
1165
+ color: "4472c4"
1166
+ }]
1167
+ }), wn = /* @__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.manageVisualViewport.editable.showStatusBar.propsStatusBar.renderStatusBar.propsToolbar.renderToolbar.topLeft.topRight.muiTheme.tokens.cssBaseline.autoFocus.licenseKey.prefetch".split(".")), Tn = () => Z(Ht, {}), En = $t("studio:eagerStudio", () => import("./DV6i9RQZfJiKtEaJ.mjs")), Dn = ({ error: e, onShown: t }) => (G(() => {
310
1168
  t();
311
- }, []), K(In, { error: e })), $ = F(P((e, t) => {
312
- let { sx: n, style: r, className: i, licenseKey: a, renderDocumentLoading: o = lt, propsDocumentLoading: s, onWorkbookLoad: c, onDocumentError: l, ...u } = e, [d, f] = ((e) => {
1169
+ }, []), Z(Rt, { error: e })), On = U(Ot((e, t) => {
1170
+ let { sx: n, style: r, className: i, licenseKey: a, renderDocumentLoading: o = ue, propsDocumentLoading: s, onWorkbookLoad: c, onDocumentError: l, ...u } = e, [d, f] = ((e) => {
313
1171
  let t = {}, n = {};
314
- for (let r in e) (qn.has(r) ? t : n)[r] = e[r];
1172
+ for (let r in e) (wn.has(r) ? t : n)[r] = e[r];
315
1173
  return [t, n];
316
1174
  })(u);
317
- a && mn.setLicenseKey(a);
318
- let [p] = kn(D.Mode, gn[D.Mode]), { themeMode: m } = An({ mode: p ?? void 0 }), h = m === "dark", [g, _] = B(null), v = Tn("studio", Nn()), [y, b] = B(!1), x = R(() => !o || y ? null : K(zn, {
1175
+ a && tt.setLicenseKey(a);
1176
+ let [p] = Ct(it.Mode, rt[it.Mode]), { themeMode: m } = wt({ mode: p ?? void 0 }), h = m === "dark", [g, _] = J(null), v = gt("studio", kt()), [y, b] = J(!1), x = K(() => !o || y ? null : Z(qt, {
319
1177
  style: {
320
1178
  backgroundColor: `var(--sxl-color-base-100, ${h ? "#121212" : "#fff"})`,
321
1179
  inset: 0,
@@ -333,13 +1191,13 @@ var Kn = Un({
333
1191
  s,
334
1192
  h,
335
1193
  y
336
- ]), S = R(() => En(Yn.load, { renderError: (e) => K(Xn, {
1194
+ ]), S = K(() => _t(En.load, { renderError: (e) => Z(Dn, {
337
1195
  error: e,
338
1196
  onShown: () => b(!0)
339
1197
  }) }), []);
340
- return q(J, {
1198
+ return Q($, {
341
1199
  ref: _,
342
- className: tn("sheetxl-studio", v, i),
1200
+ className: R("sheetxl-studio", v, i),
343
1201
  "data-sxl-theme-mode": m,
344
1202
  sx: n,
345
1203
  style: {
@@ -355,29 +1213,29 @@ var Kn = Un({
355
1213
  ...r
356
1214
  },
357
1215
  ...f,
358
- children: [K(Mn, {
1216
+ children: [Z(Et, {
359
1217
  fallback: null,
360
- children: K(S, {
1218
+ children: Z(S, {
361
1219
  ...d,
362
1220
  host: g,
363
1221
  scopeClass: v,
364
1222
  onWorkbookLoad: (e) => (requestAnimationFrame(() => requestAnimationFrame(() => b(!0))), c?.(e)),
365
1223
  onDocumentError: (e) => (b(!0), l?.(e)),
366
- renderDocumentLoading: Jn,
1224
+ renderDocumentLoading: Tn,
367
1225
  ref: t
368
1226
  })
369
1227
  }), x]
370
1228
  });
371
1229
  }));
372
- $.displayName = "Studio";
373
- var Zn = (e = {}) => {
374
- let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = On(), [f, p] = B(null), [m, h] = B(!1), g = wn(f);
375
- xn(g, m, {
1230
+ On.displayName = "Studio";
1231
+ var kn = (e = {}) => {
1232
+ let { source: t, startWith: n, templatePath: r, onWorkbookLoad: i, onWorkbookChange: a, onDirtyChange: o, documentTitle: s, confirmOnClose: c, keyboardGuard: l, ...u } = e, d = St(), [f, p] = J(null), [m, h] = J(!1), g = mt(f);
1233
+ dt(g, m, {
376
1234
  documentTitle: s,
377
1235
  confirmOnClose: c,
378
1236
  keyboardGuard: l
379
1237
  });
380
- let { workbook: _, urlTitle: v } = R(() => {
1238
+ let { workbook: _, urlTitle: v } = K(() => {
381
1239
  if (t != null) return {
382
1240
  workbook: typeof t == "string" ? { source: t } : t,
383
1241
  urlTitle: null
@@ -393,29 +1251,29 @@ var Zn = (e = {}) => {
393
1251
  workbook: void 0,
394
1252
  urlTitle: null
395
1253
  };
396
- }, [t, d]), y = z(null);
397
- R(() => {
1254
+ }, [t, d]), y = q(null);
1255
+ K(() => {
398
1256
  y.current = v;
399
1257
  }, [v]);
400
- let b = z(a);
1258
+ let b = q(a);
401
1259
  b.current = a;
402
- let x = I((e) => {
1260
+ let x = W((e) => {
403
1261
  e && y.current && (e.getOrigin().setName(y.current), y.current = null), p(e), b.current?.(e);
404
- }, []), S = z(o);
1262
+ }, []), S = q(o);
405
1263
  S.current = o;
406
- let C = I((e) => {
1264
+ let C = W((e) => {
407
1265
  h(e), S.current?.(e);
408
1266
  }, []);
409
- L(() => {
410
- n === "welcome" && _ === void 0 && Xe(r);
1267
+ G(() => {
1268
+ n === "welcome" && _ === void 0 && L(r);
411
1269
  }, [
412
1270
  n,
413
1271
  _,
414
1272
  r
415
1273
  ]);
416
- let w = z(!1), T = z(i);
1274
+ let w = q(!1), T = q(i);
417
1275
  T.current = i;
418
- let E = I((e) => (w.current || (w.current = !0, n === "welcome" && _ === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
1276
+ let E = W((e) => (w.current || (w.current = !0, n === "welcome" && _ === void 0 && requestAnimationFrame(() => requestAnimationFrame(() => {
419
1277
  e.source?.getCommandScope?.()?.resolve("showWelcome")?.execute({
420
1278
  templatePath: r,
421
1279
  atStartup: !0
@@ -433,4 +1291,4 @@ var Zn = (e = {}) => {
433
1291
  onWorkbookLoad: E
434
1292
  };
435
1293
  };
436
- export { C as AlignmentPanel, Wn as AppearanceCommandButton, Mt as AutoColorPosition, xt as BorderCommandButton, x as BorderPanel, ie as BorderPopupButton, Ue as BorderPreview, Zt as BorderStylePopupButton, l as BorderTemplateIcon, p as COMMENTS_FILTER_KEY, ue as CalculationOptionsCommandButton, Ye as CalculationRequiredStatus, Re as CircularReferenceStatus, Qt as ColorButton, At as ColorButtonList, ge as ColorCommandButton, $t as ColorPanel, jt as ColorPanelType, Ft as ColorPopupButton, r as ColumnMenu, ce as CommentCard, se as CommentsPlugin, oe as CommentsTaskPane, Ht as DEFAULT_GRADIENT, hn as DefaultTaskPaneRegistry, yt as DefaultWorkbookToolbars, me as DocThemeCommandButton, ot as DocumentTitle, pe as ExternalLinkCardBody, le as ExternalLinkChip, de as ExternalLinkLocation, h as ExternalLinkSettingsTab, it as ExternalLinksPanel, d as ExternalLinksPlugin, g as ExternalLinksTaskPane, re as FORMAT_TAB_KEY, i as FORMAT_TASK_PANE_KEY, pt as FORMULA_BAR_EDITOR_ID, an as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, Z as FileCommandButton, mt as FillMenu, Yt as FillPanel, Pe as FontFamilyCommandButton, b as FontPanel, a as FontSizeCommandButton, qt as FormatButtonGroup, m as FormatCellPreview, Vt as FormatNumberField, bt as FormatPlugin, Pt as FormatRow, Gt as FormatSection, c as FormatTab, o as FormatTaskPane, ke as FormulaBar, rn as FormulaField, on as FunctionArgumentsPanel, ln as FunctionSearchPanel, Xt as GradientEditor, Rt as GradientStopsBar, dn as INSERT_FUNCTION_PAGE_CLASS, nn as InputField, St as InsertFunctionCommandPopupButton, cn as InsertFunctionOption, Gn as InsertFunctionSumCommandPopupButton, un as InsertFunctionWizard, _ as ItemCard, at as ItemCardAction, f as ItemsSearchField, pn as LicenseManager, fn as LinePanel, Ne as ManageProtectionTaskPane, w as MobileFormulaBar, e as MobileInputToolbar, dt as NAMED_TYPE_FORMULA, Me as NamedCollectionEditor, ye as NamedDetailsPanel, Ve as NamedDetailsTaskPane, et as NamedEditorPanel, ct as NamedPlugin, Dt as NumberFormatCommandButton, xe as NumberFormatOption, u as NumberFormatPanel, Fe as NumberStats, Bt as PATTERN_GALLERY, n as PREVIEW_EDGES, Q as PasswordDialog, ee as PasswordField, Je as PasteCommandButton, Kt as PatternPopupButton, zt as PatternSwatch, nt as PresetCellStylesCommandButton, Ge as PresetChip, kt as PresetSlicerStylesCommandButton, Be as PresetTableStylesCommandButton, Et as ProtectedCellsPanel, he as ProtectedRangeDetailsTaskPane, Ie as ProtectionPlugin, be as SheetProtectionPanel, qe as SheetTabMenu, s as SheetZoomCommandButton, _e as SheetZoomScale, tt as SheetsAllMenu, E as SlicerPlugin, rt as StatusBar, $ as Studio, en as StyledStrokeIcon, ut as TableDetailsPanel, $e as TableDetailsTaskPane, ve as TablePlugin, Ee as TableStyleCanvasPreview, ht as TableStyleOptionsPanel, je as TableStylePreview, Le as TextEffectsCommandButton, S as TextRotateGroupButton, st as ThemeSelectButton, Ze as ThemeSelectPanel, ft as ThemeSelectPopupButton, vt as UndoRedoCommandButton, fe as WalkingCopyCommandButton, Te as WorkbookContextMenu, ze as WorkbookElement, _n as WorkbookIO, Ct as WorkbookProtectionPanel, _t as WorkbookProtectionTab, Ae as WorkbookStrip, Ot as WorkbookToolbars, we as createNamedDraft, T as createStudioThemeCSS, t as createThemeFromMUITheme, He as edgeLabel, y as edgesAt, Ke as expressionOf, Wt as fillSelectionOf, gt as isEditableNamed, wt as numberFormatCategoryLabel, te as numberFormatTypeLabel, Jt as onReselect, sn as optionsForPage, It as panelSx, Ut as patternLabel, ae as registerSheetCommandGroups, We as registerStudioCommandCatalogs, Tt as registerStudioCommandGroups, ne as registerWorkbookCommandGroups, Ce as renderWorkbookSheetTab, Se as renderWorkbookToolbars, De as saveNamedDraft, vn as setPrintExamplesOnLoad, Kn as t, Lt as toGradientValue, Nt as toPatternSlots, Oe as tokensToMuiOptions, v as useFormatSelection, Qe as useFormulaBarSession, yn as useModelListener, bn as useRangeListener, Zn as useStudioApp };
1294
+ export { ge as AnomaliesPlugin, rn as AppearanceCommandButton, ye as AutoColorPosition, D as BorderCommandButton, Oe as BorderPopupButton, Ee as BorderStylePopupButton, De as BorderTemplateIcon, s as CalculationOptionsCommandButton, p as CalculationRequiredStatus, m as CircularReferenceStatus, Te as ColorButton, Ce as ColorButtonList, je as ColorCommandButton, be as ColorPanel, xe as ColorPanelType, we as ColorPopupButton, O as ColumnMenu, Ze as CommentCard, y as CommentsPlugin, Cn as DEFAULT_GRADIENT, nt as DefaultTaskPaneRegistry, l as DefaultWorkbookToolbars, d as DocThemeCommandButton, ce as DocumentTitle, r as ExternalLinksPlugin, P as FORMAT_TASK_PANE_KEY, i as FORMULA_BAR_EDITOR_ID, Be as FORMULA_FIELD_ABOVE_LABEL_HEIGHT, nn as FileCommandButton, pe as FillMenu, Pe as FontFamilyCommandButton, Ae as FontSizeCommandButton, E as FormatPlugin, a as FormulaBar, ze as FormulaField, Ge as FunctionArgumentsPanel, Je as FunctionSearchPanel, xn as GradientEditor, bn as GradientStopsBar, Xe as INSERT_FUNCTION_PAGE_CLASS, tn as InputField, c as InsertFunctionCommandPopupButton, qe as InsertFunctionOption, an as InsertFunctionSumCommandPopupButton, Ye as InsertFunctionWizard, He as ItemCard, Ue as ItemCardAction, We as ItemsSearchField, et as LicenseManager, he as MobileFormulaBar, b as MobileInputToolbar, t as NamedCollectionEditor, ne as NamedPlugin, te as NumberFormatCommandButton, ke as NumberFormatOption, g as NumberStats, cn as PATTERN_GALLERY, Qe as PasswordField, fe as PasteCommandButton, un as PatternPopupButton, sn as PatternSwatch, M as PresetCellStylesCommandButton, Ve as PresetChip, _e as PresetSlicerStylesCommandButton, Le as PresetTableStylesCommandButton, F as ProtectionPlugin, re as SheetTabMenu, ae as SheetZoomCommandButton, o as SheetZoomScale, oe as SheetsAllMenu, me as SlicerPlugin, I as StatusBar, On as Studio, Se as StyledStrokeIcon, e as TablePlugin, Fe as TableStyleCanvasPreview, Ie as TableStylePreview, ie as TextEffectsCommandButton, de as TextRotateGroupButton, _ as ThemeSelectButton, T as ThemeSelectPanel, C as ThemeSelectPopupButton, le as UndoRedoCommandButton, S as WalkingCopyCommandButton, j as WorkbookContextMenu, ee as WorkbookElement, at as WorkbookIO, N as WorkbookStrip, f as WorkbookToolbars, se as createStudioThemeCSS, u as createThemeFromMUITheme, Me as numberFormatCategoryLabel, Ne as numberFormatTypeLabel, Ke as optionsForPage, ln as patternLabel, x as registerSheetCommandGroups, A as registerStudioCommandCatalogs, ve as registerStudioCommandGroups, n as registerWorkbookCommandGroups, k as renderWorkbookSheetTab, v as renderWorkbookToolbars, st as setPrintExamplesOnLoad, Sn as toGradientValue, on as toPatternSlots, w as tokensToMuiOptions, h as useFormulaBarSession, lt as useModelListener, ut as useRangeListener, kn as useStudioApp };