@sheetxl/react 0.4.18 → 0.4.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.
- package/browser/cjs/{CrbFF9YxdqqKWcm6.cjs → CGI2BcTiIO1cJwAK.cjs} +1 -1
- package/browser/cjs/{DLn0plneSe__KkYD.cjs → CX6l4lNPTiSB3HUX.cjs} +1 -1
- package/browser/cjs/{nxPMTvPNoBU3lMlz.cjs → Dw31E_I05ytgzGk2.cjs} +1 -1
- package/browser/cjs/index.cjs +4 -4
- package/browser/esm/{DgeZmCiK5hfeXqAk.mjs → B5NkP56B0onsUVLy.mjs} +1 -1
- package/browser/esm/{CLOJUe_N_B-j0gNK.mjs → BxmnMuUkG1ti58-4.mjs} +1 -1
- package/browser/esm/index.mjs +4 -4
- package/browser/esm/{s02nuPBrn5MrQ_UJ.mjs → x7Cs5_IIejRdxYRP.mjs} +1 -1
- package/licenses/dependencies.txt +2 -2
- package/node/esm/{DLAVoFJX3y-isocF.mjs → CF8NDkLcqmeVZv-g.mjs} +1 -1
- package/node/esm/index.mjs +2 -2
- package/package.json +5 -5
package/browser/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6{pointer-events:none}._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6 *{pointer-events:initial}._sheetxl-sheet_1qeq6_5 .cell-container>*{overflow:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .text-box{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .text-line{text-rendering:optimizespeed;position:absolute;vertical-align:baseline;white-space:pre}._sheetxl-sheet_1qeq6_5 .cell-container .filter-button{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:row;margin-bottom:4px}._sheetxl-sheet_1qeq6_5 .cell-container .text-debug-bounds{position:absolute;background:green;pointer-events:none;opacity:.2}._sheetxl-sheet_1qeq6_5 .cell-container .fill{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .pending{width:6px;height:6px;top:5px;left:4px;position:absolute;border:var(--sxl-app-color-primary-dark, grey) .5px;border-style:double;border-radius:50%;background-color:var(--sxl-app-color-button-surface, grey);opacity:1;animation:_pulse_1qeq6_1 1.5s infinite alternate}@keyframes _pulse_1qeq6_1{0%{transform:scale(1);opacity:1}50%{transform:scale(1.2);opacity:.8}to{transform:scale(1);opacity:1}}._sheetxl-sheet_1qeq6_5 .cell-container .slider{position:absolute;width:130%;height:2px;bottom:1px;opacity:0;animation:_fadeIn_1qeq6_1 0s .5s forwards;overflow-x:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .line{position:absolute;opacity:.3;background:var(--sxl-app-color-primary-light, rgb(173, 173, 173)) .5px;width:100%;height:2px}._sheetxl-sheet_1qeq6_5 .cell-container .subline{position:absolute;background:var(--sxl-app-color-primary, rgb(77, 77, 77)) .5px;opacity:.9;height:3px}._sheetxl-sheet_1qeq6_5 .cell-container .inc{animation-delay:0s;animation:_increase_1qeq6_1 3s infinite}@keyframes _fadeIn_1qeq6_1{0%{opacity:0;height:0px}to{opacity:1;height:2px}}@keyframes _increase_1qeq6_1{0%{left:-150%;width:30%;animation-timing-function:ease}to{left:100%;width:30%}}._sheet-selection_12wyx_5 .fill-handle .dragging,._movable-area_314c6_5 .moveable-control-box .dragging{opacity:0}._movable-area_314c6_5 .moveable-control-box .moveable-control{width:11px;height:11px;margin-top:-5.5px;margin-left:-5.5px;background-color:var(--sxl-app-color-background, white);background-image:var(--sxl-app-image-background);border:2px solid var(--sxl-app-color-primary-dark, grey)}._movable-area_314c6_5 .moveable-control-box .moveable-line{background:var(--sxl-app-color-grey, grey)}@media (pointer: coarse){._movable-area_314c6_5 .moveable-control-box .moveable-control{width:22px;height:22px;margin-top:-11px;margin-left:-11px}}._editable-input_1bqx6_6{position:absolute;left:0;top:0;width:100%;min-height:calc(100% + 1px);border:none;padding:0;outline:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.2;letter-spacing:inherit;text-transform:inherit;background:transparent}@keyframes _pop_1wyun_1{0%{transform:scale(1)}to{transform:scale(var(--scale))}}@keyframes _fadeIn_1wyun_33{0%{opacity:0}to{opacity:1}}._Wrapper_1wyun_25{display:flex;box-sizing:border-box;transform:translate3d(var(--translate-x, 0),var(--translate-y, 0),0) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));transform-origin:0 0;touch-action:manipulation}._Wrapper_1wyun_25._dragOverlay_1wyun_37{z-index:999}._Item_1wyun_47{position:relative;display:flex;align-items:center;outline:none;box-sizing:border-box;transform-origin:50% 50%;-webkit-tap-highlight-color:transparent;transform:scale(var(--scale, 1))}._Item_1wyun_47:not(._withHandle_1wyun_61){touch-action:manipulation}._Item_1wyun_47._dragging_1wyun_66:not(._dragOverlay_1wyun_37){z-index:999}._Item_1wyun_47._dragOverlay_1wyun_37{cursor:inherit;animation:_pop_1wyun_1 .2s cubic-bezier(.18,.67,.6,1.22);transform:scale(var(--scale));opacity:1}._Row_1kr10_1{display:flex;box-sizing:border-box}._TabStrip_3x0dp_1::-webkit-scrollbar{display:none;height:0px}._TabStrip_3x0dp_1{overflow-y:auto;overflow-x:hidden;position:relative}._script-editor_iy654_5 .monaco-editor{position:absolute}._script-editor_iy654_5 .monaco-editor .margin-icon{display:block;width:16px;height:16px;background-size:16px;background-repeat:no-repeat;background-position:center;background-size:contain}._script-editor_iy654_5 .monaco-editor .formula{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="m 12.106007,8.1692949 c 0.124174,-0.1578352 0.181773,-0.3565642 0.283755,-0.5271169 0.10273,-0.1715492 0.04413,-0.2027176 -0.129161,-0.2014713 -0.685452,0.00576 -1.371152,-0.00277 -2.056604,0.00501 C 10.021228,7.4479573 9.9586414,7.407817 9.9935503,7.2080883 10.145401,6.3413623 10.291269,5.4736396 10.51219,4.6213758 10.642847,4.1167002 10.782479,3.6117747 11.061498,3.1622046 11.339518,2.7138809 11.726751,2.5974365 12.2035,2.829328 c 0.398455,0.1934923 0.722604,0.4827333 0.990152,0.8340617 0.116944,0.1535968 0.27079,0.2740306 0.449073,0.1715499 0.343348,-0.1974819 0.644807,-0.4383502 0.819599,-0.826332 0.100985,-0.2244112 0.157836,-0.476001 0.04039,-0.7058977 C 14.339646,1.9840253 14.038187,1.7618584 13.707056,1.6394296 13.156999,1.4362128 12.562559,1.4840872 12.017239,1.6758341 11.38789,1.8970037 10.783727,2.2625445 10.259602,2.6724688 10.066109,2.8238217 9.8783519,2.9839017 9.7013165,3.1547035 9.0502751,3.7823067 8.5657962,4.529097 8.2246919,5.3651534 7.9823276,5.9595939 7.7888351,6.5660026 7.6913412,7.2015842 7.673637,7.318528 7.6357391,7.423253 7.5065759,7.4432009 7.3472438,7.4678879 7.1592376,7.4436995 6.9974121,7.4441728 6.6351128,7.4451447 6.2598478,7.3676233 5.9915515,7.6815496 5.8721151,7.8211835 5.7461952,7.9840062 5.6439635,8.1371045 c -0.1009847,0.1518511 -0.093255,0.3002122 0.085027,0.367535 0.1957362,0.073561 0.4528118,0.026182 0.6530361,0.0197 0.2645558,-0.00847 0.5291116,0.00501 0.7936674,-7.476e-4 0.1820229,-0.00374 0.2413669,0.030421 0.2064588,0.2358807 C 7.3487406,8.9587006 7.3095941,9.1492003 7.2804197,9.3464333 7.1804317,10.024404 7.0667304,10.700629 6.9525298,11.376606 6.7936963,12.314146 6.6371075,13.252434 6.4655575,14.188478 6.3017374,15.082631 6.1855427,15.985013 5.983074,16.873433 5.8249883,17.568607 5.7240037,18.277248 5.5556954,18.969682 5.4145655,19.550158 5.293882,20.143601 4.9722259,20.665731 4.7380909,21.045734 4.3959882,21.206312 3.9663652,21.104829 3.5778849,21.012322 3.2115961,20.866205 2.8951763,20.608631 2.6862246,20.438328 2.4473513,20.31141 2.1920214,20.458026 1.9519014,20.595915 1.7791048,20.851743 1.646453,21.088123 1.2205704,21.847879 1.915497,22.569984 2.6655289,22.684434 3.1692071,22.760986 3.666153,22.580208 4.1087416,22.356046 4.6996913,22.056582 5.2103511,21.635437 5.6387269,21.13874 5.9898058,20.731558 6.3575906,20.343327 6.6500737,19.890016 6.8450616,19.58756 7.0238427,19.274881 7.1866655,18.954471 7.7639005,17.817206 8.1227091,16.589926 8.4189318,15.354418 8.5613081,14.760227 8.716401,14.169777 8.8478064,13.572843 9.0268365,12.760724 9.1741996,11.934891 9.3083481,11.114294 9.3749255,10.707112 9.4310263,10.300679 9.5160532,9.8967389 9.5861222,9.5636133 9.6442168,9.2185186 9.6890985,8.8814035 9.7414633,8.4891827 9.990308,8.5136187 10.329668,8.4762164 c 0.286249,-0.03167 0.574492,-0.046376 0.861739,-0.067571 0.230395,-0.016703 0.494951,0.00396 0.711881,-0.088019 0.07754,-0.032911 0.147613,-0.080788 0.202719,-0.1513533 z"/><path d="M 22.473802,7.8481382 C 22.426924,7.6912996 22.341898,7.5501696 22.231437,7.4294861 22.130452,7.3192756 21.987827,7.1749046 21.851933,7.1098255 21.411589,6.8988785 20.817398,7.0838898 20.436149,7.3422154 20.23343,7.479854 20.052405,7.6519026 19.871131,7.8167201 19.691352,7.9802913 19.517061,8.1488492 19.35723,8.3321177 19.025101,8.7128687 18.724639,9.1210479 18.436396,9.5354601 18.296263,9.7374301 17.901549,10.472252 17.781115,10.399942 17.654198,10.323892 17.495365,9.5905657 17.435023,9.3843566 17.351243,9.0978583 17.29539,8.8016361 17.161741,8.5323425 16.97922,8.1643081 16.865268,7.7623629 16.608941,7.4307332 16.325934,7.0639457 16.001036,6.9584722 15.558946,7.092371 c -0.43436,0.1314054 -0.78469,0.4049374 -1.128539,0.6819608 -0.503927,0.4056851 -0.879442,0.926319 -1.256951,1.4439609 -0.28226,0.387483 -0.284753,0.3857373 0.04488,0.7380631 0.206458,0.2211702 0.202718,0.2184272 0.389229,-0.00847 0.2663,-0.3251469 0.524872,-0.6595196 0.882433,-0.8934057 0.261315,-0.1713009 0.417904,-0.1368908 0.57948,0.1326518 0.07929,0.1326517 0.146866,0.2752777 0.200225,0.4208957 0.335619,0.9141014 0.590201,1.8541344 0.89191,2.7784594 0.03815,0.117691 -0.01122,0.193991 -0.06707,0.278519 -0.356565,0.538837 -0.719363,1.074182 -1.123054,1.578607 -0.320409,0.401198 -0.643312,0.803891 -1.073932,1.097621 -0.187757,0.128912 -0.40768,0.217679 -0.635831,0.156839 -0.233887,-0.06283 -0.37377,-0.27478 -0.587459,-0.373521 -0.006,-0.003 -0.01272,-0.0052 -0.01895,-0.0079 -0.09974,-0.04064 -0.249845,-0.0389 -0.353074,-0.01571 -0.454059,0.102482 -0.697669,0.614139 -0.790177,1.023813 -0.08379,0.371776 -0.0013,0.778209 0.261315,1.062463 0.228899,0.24785 0.572248,0.351327 0.901634,0.356315 0.189003,0.0028 0.39995,-0.04663 0.57549,-0.11445 0.670241,-0.262062 1.181649,-0.887172 1.605038,-1.441717 0.285501,-0.374517 0.550555,-0.763994 0.829573,-1.143499 0.230645,-0.313677 0.68595,-1.247726 0.81586,-1.250718 0.07854,-0.0017 0.09924,0.185762 0.114199,0.241117 0.03341,0.123675 0.06658,0.247351 0.102232,0.370279 0.167561,0.578481 0.343848,1.156464 0.525122,1.730458 0.120934,0.384242 0.315921,0.782697 0.560779,1.103356 0.07431,0.09749 0.167311,0.190749 0.26306,0.266799 0.371276,0.296972 0.838799,0.27453 1.266177,0.123177 0.191498,-0.06757 0.370029,-0.163071 0.539335,-0.275527 0.781948,-0.519886 1.340732,-1.244235 1.868598,-2.002495 0.124423,-0.178781 0.107467,-0.278769 -0.03441,-0.428127 -0.367286,-0.386237 -0.357062,-0.389727 -0.705149,0.01995 -0.261066,0.306446 -0.527117,0.612643 -0.879442,0.818851 -0.245855,0.144621 -0.413416,0.103229 -0.592696,-0.118439 -0.14861,-0.183518 -0.246353,-0.396709 -0.33138,-0.614886 -0.349831,-0.901136 -0.588954,-1.838675 -0.885177,-2.757515 -0.21743,-0.674231 -0.223414,-0.680464 0.20945,-1.248723 0.447575,-0.587708 0.875703,-1.1968602 1.462163,-1.6613914 0.431119,-0.3416031 0.73183,-0.3226534 1.129037,0.059094 0.0788,0.075801 0.207456,0.1388856 0.316919,0.1476127 0.369781,0.029674 0.691187,-0.3024566 0.880939,-0.5792304 0.188006,-0.2727835 0.259319,-0.6183768 0.163072,-0.9392845 z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .macro{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M 5.1933594,1.4433594 6.3417969,2.5234375 6.2109375,2.6621094 c -3.466072,3.6769426 -3.467641,9.6565186 0,13.3339846 l 0.1308594,0.136718 -1.1484375,1.082032 -0.1328125,-0.140625 c -4.0371886,-4.28224 -4.0373752,-11.2077961 0,-15.4902346 z m 14.4726566,0 0.132812,0.140625 c 4.03717,4.2822197 4.037356,11.2058636 0,15.4882816 l -0.132812,0.140625 -1.148438,-1.080079 0.130859,-0.138671 c 3.465532,-3.675243 3.466902,-9.6542123 0,-13.3320316 L 18.517578,2.5234375 Z M 7.7597656,4.4335937 8.8769531,5.5488281 8.7421875,5.6816406 c -2.0366665,2.0366662 -2.037411,5.3404354 0,7.3769534 L 8.8769531,13.191406 7.7597656,14.310547 7.625,14.173828 C 4.9718615,11.520692 4.9723209,7.222936 7.6269531,4.5683594 Z m 9.3398434,0 0.132813,0.1347657 c 2.653779,2.6537788 2.65545,6.9500666 0,9.6054686 l -0.132813,0.136719 -1.117187,-1.119141 0.134765,-0.132812 c 2.036637,-2.035554 2.037534,-5.3391996 0,-7.3769534 L 15.982422,5.5488281 Z m -4.669921,1.7011719 c 0.811773,0 1.627703,0.304374 2.25,0.90625 1.260638,1.2198223 1.260413,3.1986104 0,4.4179684 -0.355144,0.343115 -0.779063,0.585007 -1.226563,0.732422 l -0.234375,0.07617 v 3.386719 h 0.002 v 6.048828 c 0,0.436615 -0.351565,0.791016 -0.789062,0.791016 -0.43763,0 -0.791016,-0.354618 -0.791016,-0.791016 v -3.308594 -6.126953 l -0.234375,-0.07617 c -0.448339,-0.147699 -0.871819,-0.38969 -1.226562,-0.732422 -1.2608671,-1.22004 -1.2605877,-3.1984433 0,-4.4179684 0.62227,-0.6019293 1.438264,-0.90625 2.25,-0.90625 z m 0,1.5820313 c -0.417461,0 -0.829931,0.1510762 -1.146485,0.4570312 -0.615751,0.5967629 -0.616877,1.5583713 0,2.1562499 0.314469,0.303373 0.726552,0.455078 1.146485,0.455078 0.421182,0 0.833304,-0.153008 1.148437,-0.457031 0.61548,-0.5965047 0.616739,-1.5585025 0,-2.15625 C 13.261859,7.8661993 12.846121,7.7167969 12.429688,7.7167969 Z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .autorun{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M10 15h5.88c.27-.31.67-.5 1.12-.5.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5c-.44 0-.84-.19-1.12-.5H11.9c-.46 2.28-2.48 4-4.9 4-2.76 0-5-2.24-5-5 0-2.42 1.72-4.44 4-4.9v2.07c-1.16.41-2 1.53-2 2.83 0 1.65 1.35 3 3 3s3-1.35 3-3zm2.5-11c1.65 0 3 1.35 3 3h2c0-2.76-2.24-5-5-5s-5 2.24-5 5c0 1.43.6 2.71 1.55 3.62l-2.35 3.9c-.68.14-1.2.75-1.2 1.48 0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5c0-.16-.02-.31-.07-.45l3.38-5.63C10.49 9.61 9.5 8.42 9.5 7c0-1.65 1.35-3 3-3m4.5 9c-.64 0-1.23.2-1.72.54l-3.05-5.07C11.53 8.35 11 7.74 11 7c0-.83.67-1.5 1.5-1.5S14 6.17 14 7c0 .15-.02.29-.06.43l2.19 3.65c.28-.05.57-.08.87-.08 2.76 0 5 2.24 5 5s-2.24 5-5 5c-1.85 0-3.47-1.01-4.33-2.5h2.67c.48.32 1.05.5 1.66.5 1.65 0 3-1.35 3-3s-1.35-3-3-3"/></svg>');cursor:pointer}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
"use strict";/**
|
|
3
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.4.
|
|
3
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.4.20
|
|
4
4
|
*
|
|
5
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
6
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
@@ -27,14 +27,14 @@ All contents and formatting are removed.`,shortcut:{key:"Delete",modifiers:[Q.Ct
|
|
|
27
27
|
|
|
28
28
|
The formatting is not applied.`,shortcut:{key:"V",modifiers:[Q.Ctrl,Q.Shift]}}),new ne("pasteFormats",S,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:`Paste only the formats of the selected cells.
|
|
29
29
|
|
|
30
|
-
The content is not applied.`}),new ne("pasteFormulas",S,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new ne("pasteTranspose",S,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new ne("pasteLinks",S,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];o.addCommands(k,!0)},[o,t]),l.useEffect(()=>{if(!o)return;const S={disabled:!e.getProtection().isFormatCellsAllowed()};o.getCommand("pasteValues").updateCallback(k=>F.paste({...cc,...k})).update(S),o.getCommand("pasteFormats").updateCallback((k,N)=>F.paste({...dc,description:N.label(),...k})).update(S),o.getCommand("pasteFormulas").updateCallback((k,N)=>F.paste({...uc,description:N.label(),...k})).update(S),o.getCommand("pasteTranspose").updateCallback((k,N)=>F.paste({...hc,description:N.label(),...k})).update(S),o.getCommand("pasteLinks").updateCallback((k,N)=>F.paste({...gc,description:N.label(),...k})).update(S),o.getCommand("cut").update(S),o.getCommand("paste").update(S)},[e,o]);const E=l.useMemo(()=>{if(!I||!b.current)return;const S=I.key;if(S!=="copy"&&S!=="cut"&&S!=="formatPainter")return;const k=b.current.getItem();if(k.getSource()!==e)return;const N=b.current.isCut?.(),R=N?f:c,T=N?d:a,G=k.getCoords(),O=G?[G]:null;return O&&O.length!==0?j=>{const z=[];for(let B=0;B<O.length;B++){const Z=O[B],P=j.toClipBounds(j.getRangeCoordsBounds(Z,{top:0,left:0,right:1,bottom:1}),ft.SELECTION_CLIP_INSETS);P&&(z.push(w({range:Z,key:`copy-selection-background-${B}`,x:P.x,y:P.y,width:Math.max(P.width,0),height:Math.max(P.height,0),stroke:R,strokeWidth:2})),z.push(w({range:Z,key:`copy-selection-foreground-${B}`,x:P.x+(P.width<=2?-1:0),y:P.y,width:Math.max(P.width,3),height:Math.max(P.height,3),stroke:T,strokeWidth:2,isAnimatedStroke:!0})))}return z}:null},[I,e,n,a,c,d,f]);return{...F,clipboard:v,overlays:E}},mc=l.memo(l.forwardRef((t,e)=>{const{view:n,element:o,sheet:r,gridStyle:i,commands:s,notifier:a}=t,d=i.body??{},c=r.getView(),{overlays:f}=Jl({element:o,sheet:r,sheetView:c,commands:s,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:d.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:d.fill,notifier:a});return it(r?.getSelection(),{onChange(h){}}),l.useEffect(()=>{n?.getStage()},[n?.getStage()]),f&&n?f(n):null})),fc="_sheet-selection_12wyx_5",pc={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},vc={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},wc={key:"dragCopy",description:"Drag selection to copy cell contents."},yc={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Vi=(t,e)=>e.ctrlKey&&e.shiftKey?yc:e.ctrlKey?wc:e.shiftKey?vc:pc,bc={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},xc=l.memo(l.forwardRef((t,e)=>{const{view:n,commands:o,className:r,onFirstRender:i,notifier:s,onShowTooltip:a,onCloseTooltip:d,sheet:c,gridRef:f,gridStyle:h,isActive:u,editingCoords:w,...b}=t,q=n?.getBounds(),I=X(a,[a]),$=X(d,[d]),[D,v]=l.useState(()=>c?.getSelection().getCoords()),F=X(ge=>{ut.isEqualSelectionCoords(ge,D)||c&&c.getSelection().updateCoords(ge)},[c,D]),E=Gt(),S=l.useRef(null),[k,N]=l.useState(c?.getProtection().isLocked()),[R,T]=l.useState(c?.getView().getMovableSelection().length>0),G=Qe.detectIt().primaryInput==="touch",O=!G&&u,j=w!==null||R,z=X(ge=>{const fe=ut.cellToRange(ge);if(c.isClosed())return fe;const Se=c.getRange(fe,{excludeHidden:!0}).getMerges();return Se.length===0?fe:Se[0]},[c]),B=X((ge,fe,Se,pe,Ce,Ae)=>{const ye=c.getSelectedRange().getExtended(pe,ge).getCoords();switch(pe){case p.IRange.Direction.Up:return ye.rowStart;case p.IRange.Direction.Down:return ye.rowEnd;case p.IRange.Direction.Left:return ye.colStart;case p.IRange.Direction.Right:return ye.colEnd}},[c]),Z=X(()=>{const ge=c.getUsedRange()?.getCoords(),fe=c.getRowHeaders().getUsedRange()?.getCoords(),Se=c.getColumnHeaders().getUsedRange()?.getCoords();return{...ge,colEnd:Math.max(ge?.colEnd??0,Se?.max??0),rowEnd:Math.max(ge?.rowEnd??0,fe?.max??0)}},[c]),P=X((ge,fe)=>c.getRowHeaders().hiddenHeadersAt(ge,fe),[c]),M=X((ge,fe)=>c.getColumnHeaders().hiddenHeadersAt(ge,fe),[c]),H=X(ge=>c.getRange(ge,{excludeHidden:!0}).getMerges(),[c]),oe=X(ge=>{c?.getSelection().setAdjusting(ge)},[c]),ue=X(async()=>{c?.getSelection().setAdjusting(null),E.getMode()?.key==="formatPainter"&&(await o?.getCommand("pasteFormats")?.execute({}),E.setMode(null))},[E,D,c,o]),te=l.useMemo(()=>{const ge=E.getMode();return ge?.key==="cut"||ge?.key==="copy"},[E]);it(c?.getView(),{onMovableSelectionChange:()=>{T(c.getView().getMovableSelection().length>0)}}),it(c?.getSelection(),{onChange(ge){const fe=c.getSelection().getCoords();v(fe)}}),it(c,{onProtectionChange:()=>{N(c.getProtection().isLocked())}});const{body:K={}}=h||{},le=n.getLayout(),Re=!(O&&D.ranges.length<=1&&w===null&&!k&&(!E.getMode()||te)),{cursor:Te,overlay:ae,onPointerDown:Fe}=ft.useSelection({gridRef:f,commands:o,layout:le,getCellCoordsAsRangeCoords:z,selection:D,fillHandleBorderColor:K.fill,selectionBackgroundColor:u?h.selection.fill:h.selectionInactive.fill,selectionBorderColor:u?h.selection.strokeFill:h.selectionInactive.strokeFill,selectionRemoveBackgroundColor:u?h.selectionRemove.fill:h.selectionInactive.fill,selectionRemoveBorderColor:u?h.selectionRemove.strokeFill:h.selectionInactive.strokeFill,disableFillDrag:Re,disableMoveDrag:G||!(u&&D.ranges.length<=1&&w===null&&!k),disableTouchSelection:j,onSelectionChange:F,onSelectionDragStart:oe,onSelectionDragEnd:ue,onMoveDragStart:(ge,fe,Se)=>{E.setMode(Vi(0,Se))},onMoveDragUpdate:(ge,fe,Se)=>{E.setMode(Vi(0,Se))},onMoveDragEnd:(ge,fe)=>{E.setMode(null)},onMoveDragDone:async(ge,fe,Se)=>{if(ut.isEqualRanges(ge,fe))return;const pe=c.getRange(fe);if(s?.showOptions){const Pe=pe.getDifferences(ge);let $e=!1;for(let C=0;!$e&&C<Pe.getCount();C++)$e=Pe.at(C).isContentful();if($e&&await s?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const Ce=!Se.ctrlKey,Ae=Se.shiftKey,ye=Ae?Ce?"Insert Moved Cells":"Insert Copied Cells":Ce?"Move Cells":"Copy Cells",De=await s?.showBusy?.(ye);try{const Pe=c.getRange(ge);await pe.doBatch(async()=>{Ae?await pe.insertFrom(ge,{isCut:Ce,undoRange:Pe}):await pe.copyFrom(ge,{isCut:Ce,undoRange:Pe}),Pe.autoFit({skipCustomSize:!0,orientations:p.IRange.Orientations.Row,minContent:!0}),pe.autoFit({skipCustomSize:!0,orientations:p.IRange.Orientations.Row,minContent:!0})},{description:ye,autoSelect:!0})}catch(Pe){s?.showError?.(Pe)}finally{De?.()}},contentfulCellFinder:B,hiddenRowsAt:P,hiddenColumnsAt:M,mergedRanges:H,getDataCoords:Z,canSelectionSpanMergedCells:ge=>{const fe=c.getRange(ge);return fe.isEntireColumns()||fe.isEntireRows()},onFill:async(ge,fe)=>{const Se="Auto Fill",pe=await s?.showBusy?.(Se);try{await c.doBatch(()=>{c.getRange(ge).autoFill(fe),c.getRange(fe).autoFit({orientations:p.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:Se,autoSelect:!0})}catch(Ce){s?.showError?.(Ce)}finally{S.current=null,pe?.()}},onFillPreview:(ge,fe,Se)=>{if(f.current&&I){E.setMode(bc);try{S.current?.direction!==Se&&(S.current=null,c.getRange(ge).autoFill(fe,{previewOnly:C=>{S.current={callback:C,direction:Se}}}));const pe=S.current?.callback?.(fe);if(!pe||pe.isEmpty())return;const Ce=pe.toText();if(!Ce)return;const Ae=ut.cellToRange(pe.getCoords()),ye=n.getRelativePointFromClient(0,0);let De=0,Pe=0,$e=hn.Bottom;if(Se===p.IRange.Direction.Down){De=le.getColOffset(Ae.colEnd+1)-ye.x;const C=le.getRowOffset(Ae.rowEnd),We=le.getRowOffset(Ae.rowEnd+1);Pe=We-(We-C)/2-ye.y,$e=hn.Right}else if(Se===p.IRange.Direction.Right){Pe=le.getRowOffset(Ae.rowEnd+1)-ye.y;const C=le.getColOffset(Ae.colEnd),We=le.getColOffset(Ae.colEnd+1);De=We-(We-C)/2-ye.x,$e=hn.Bottom}else if(Se===p.IRange.Direction.Up){De=le.getColOffset(Ae.colEnd+1)-ye.x;const C=le.getRowOffset(Ae.rowStart),We=le.getRowOffset(Ae.rowStart+1);Pe=We-(We-C)/2-ye.y,$e=hn.Right}else if(Se===p.IRange.Direction.Left){Pe=le.getRowOffset(Ae.rowEnd+1)-ye.y;const C=le.getColOffset(Ae.colStart),We=le.getColOffset(Ae.colStart+1);De=We-(We-C)/2-ye.x,$e=hn.Bottom}I({anchor:{x:De,y:Pe},display:Ce,placement:$e})}catch(pe){s?.showError?.(pe)}}},onFillDone:()=>{S.current=null,E.setMode(null),$?.()}}),me=X(ge=>{Fe(Qe.createSyntheticEvent(ge))},[Fe,w]);l.useEffect(()=>{const ge=n?.getStage();if(ge)return ge.addEventListener("pointerdown",me),()=>{ge.removeEventListener("pointerdown",me)}},[n?.getStage()]);const Oe=Ft(e,()=>({}),[]),xe=l.useRef(null);return g.jsx("div",{className:kt(r,"sheet-selection",fc),style:{position:"absolute",width:q?.width,height:q?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Cn([Oe,xe]),...b,children:ae(n)})})),go=Object.freeze({x:0,y:0,width:0,height:0}),Cc={fireOnModelChange:!1},Sc=l.memo(l.forwardRef((t,e)=>{const{children:n,view:o,movable:r,onRefLoad:i,onRefUnload:s,onHide:a,onShow:d,onUnFocus:c,isDragging:f,updateFrameBounds:h,dragStart:u,style:w,disabled:b,renderMovable:q,...I}=t,[$,D]=l.useState(go),[v,F]=l.useState(null),[E,S]=l.useState(!1),k=l.useRef(null);l.useLayoutEffect(()=>{if(r.isClosed())return;const R=r.getBounds();if(!R)return;const T=o.toViewBounds(R);D(T??go),h(T??go)},[o?.getBounds()]),it(r,{onBoundsChange:R=>{const T=R.getBounds();if(!T)return;const G=o.toViewBounds(T);D(G??go),h(G)},onSelectionChange:()=>{const R=Ue.hasFocus(k.current,!0);!E&&!R||r.isSelected()||c()}}),it(r,{onRequestFocus:()=>Ue.whenFocus(k.current,!0)},Cc),l.useEffect(()=>{const R=k.current;return i(R),()=>{s(R)}},[]);const N=l.useMemo(()=>{if(!$)return null;let{width:R,height:T}=$;return q({view:o,movable:r,disabled:b,isDragging:f,style:{position:"relative",left:0,top:0,width:R,height:T},onHide:a,onShow:d})},[o,r,$.width,$.height,b,f]);return g.jsx("div",{className:"movable",tabIndex:0,ref:Cn([k,e]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:$.x,top:$.y,width:$.width,height:$.height,...w},onMouseDown:async R=>{const T=R.shiftKey||R.ctrlKey,G=r.isSelected(),O=R.currentTarget;T&&G?r.unselect():(G&&!T||await r.select({addToSelection:T}),u(R.nativeEvent,O),O.focus())},onFocus:R=>{R.relatedTarget&&!v&&F(R.relatedTarget),S(!0)},onBlur:R=>{v&&!k?.current?.contains(R.relatedTarget)&&F(null),R.relatedTarget&&S(!1)},...I,children:N})})),qc="_movable-area_314c6_5",Ql=l.memo(l.forwardRef((t,e)=>{const{view:n,movables:o,movablesView:r,renderMovable:i,transactional:s,onUnFocus:a,onFocus:d,disabled:c=!1,disableDrag:f=!1,disableResize:h=!1,className:u,style:w,renderDirections:b=["nw","n","ne","w","e","sw","s","se"],onFirstRender:q,...I}=t,$=n.getBounds(),D=X(q,[q]),v=X(a,[a]),F=X(d,[d]),[E,S]=l.useState([]),[k,N]=l.useState(!1),[R,T]=l.useState(!1),G=l.useRef(!0),O=l.useRef(new Map),j=l.useRef(new Map),z=l.useRef(new Map),B=l.useRef(new Map),Z=l.useRef(new Map),P=l.useRef({onRequestFocus:ee=>(fe(ee),null)}),M=l.useRef(null),H=l.useRef(null),oe=l.useRef(null),[ue,te]=l.useReducer(ee=>ee+1,0);l.useLayoutEffect(()=>{te()},[n,o]),it(o,{onCollectionChange:()=>{const ee=o.search({address:n.getVisibleRangeCoords(),excludeHidden:!0}),_e=Z.current;_e.forEach(Me=>{Me()}),_e.clear();const Ve=P.current;for(let Me=0;Me<ee.length;Me++){const Le=ee[Me];if(Le.isClosed())continue;const Ie=Le.addListeners(Ve);_e.set(Le,Ie)}te()},onInvalidated:()=>{te()}}),it(r,{onMovableSelectionChange(ee){le(),te()}});const K=l.useCallback((ee,_e)=>{const Ve=z.current.get(ee);oe.current&&(oe.current.getTargets().forEach(Me=>{if(Me===Ve)return Me.style.left=_e.x+"px",Me.style.top=_e.y+"px",Me.style.width=_e.width+"px",void(Me.style.height=_e.height+"px")}),oe.current.updateRect())},[]),le=()=>{const ee=[],_e=r.getMovableSelection();_e.forEach(Ve=>{const Me=z.current.get(Ve);Me&&_e.indexOf(Ve)!==-1&&ee.push(Me)}),S(Ve=>Ue.isEqualArrays(Ve,ee)?Ve:ee)},Re=l.useRef(null),Te=l.useMemo(()=>new Promise(ee=>{Re.current=ee}),[]),ae=l.useRef(null),Fe=X(async(ee,_e)=>{ae.current=_e,await(async()=>!(!await Te.then()||!oe.current))()&&ae.current===_e&&oe.current.dragStart(ee,_e)},[E]),[me,Oe]=l.useState(!1),xe=l.useRef(null),ge=l.useRef(null),fe=X(async(ee=null)=>{if(ee||(ee=r.getMovableSelection()[0]),!ee)return v?.(),!1;const _e=z.current.get(ee);_e?(await Ue.whenFocus(_e),_e.focus(),ge.current=_e,xe.current=null):xe.current=ee},[r]);l.useEffect(()=>{me&&E.length>0&&ge.current!==E[0]&&fe(),G.current&&(D?.(),G.current=!1)},[E]);const Se=l.useMemo(()=>{const ee=o.search({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(ee.length===0&&O.current.size===0)return null;const _e=(L,se,U,J=!0)=>{const m=L.isSelected(),_={tabIndex:U,view:n,movable:L,onRefLoad:A=>{xe.current===L&&(A.focus(),ge.current=A,xe.current=null),z.current.set(L,A),j.current.set(A,L),se.rendered=!0,le()},onRefUnload:A=>{z.current.delete(L),j.current.delete(A),se.rendered=!1,le()},onUnFocus:v,onHide:A=>{se.onHide=A},onShow:A=>{se.onShow=A},isDragging:m&&(R||k),disabled:c,renderMovable:i,updateFrameBounds:A=>{K(L,A)},dragStart:Fe,onMouseUp:()=>{if(ae.current=null,H.current){N(!1),T(!1);let A=!1;B.current?.forEach(x=>{Ue.isEqualBounds(x.movable.getBounds(),x.startBounds)||(A=!0)}),A?Ce():Ae()}},style:{opacity:J?k&&m?.7:void 0:0,zIndex:k&&m?L.getZIndex()+ee.length:void 0,pointerEvents:J?void 0:"none",cursor:R&&m?"grabbing":c||f?"initial":"move",boxShadow:!m||R&&!k?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return g.jsx(Sc,{..._},`movable-${L.getUUID()}`)},Ve=O.current,Me=new Map,Le=[];for(let L=0;L<ee.length;L++){const se=ee[L];if(se.isClosed())continue;let U=Ve.get(se);U||(U={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(J,m)=>{if(!m||m.shown===!0)return;m.shown=!0;const _=++m.visibilityRequestId;requestAnimationFrame(()=>{const A=O.current.get(J);A&&_===m.visibilityRequestId&&(m.onShow?.(J),A.shown=!0)})},doHide:async(J,m)=>{if(!m||m?.shown===!1)return;m.shown=!1;const _=++m.visibilityRequestId,A=await Promise.resolve(m.onHide?.(J));_===m.visibilityRequestId&&A!==!1&&(m.shown=!1,O.current.delete(J),te())},visibilityRequestId:0}),U.frame=_e(se,U,L,!0),Le.push(U.frame),U.doShow(se,U),Ve.delete(se),Me.set(se,U)}const Ie=[];return r.getMovableSelection().forEach(L=>{const se=Ve.get(L);se&&(se.frame=_e(L,se,-1,!1),Ie.push(se.frame),Ve.delete(L),Me.set(L,se))}),Ve.forEach((L,se)=>{L.frame=_e(se,L,-1,!1),Ie.push(L.frame),L.doHide(se,L),Ve.delete(se),Me.set(se,L)}),O.current=Me,le(),[...Ie,...Le]},[ue,n,i,c,f,h,k,R]),pe=X((ee,_e)=>{const Ve=`${_e} ${E.length===1?p.TextUtils.capitalize(j.current?.get(E[0]).getContent().getType()):"Drawings"}`;H.current&&(console.warn(`Transaction ${H.current.getDescription()} is being replaced by ${Ve}`),H.current.rollback(),H.current=null),H.current=s.beginCommit({description:Ve}),B.current.clear();for(let Me=0;Me<E.length;Me++){const Le=E[Me],Ie=j.current?.get(Le);Ie?B.current.set(Le,{movable:Ie,startBounds:n.toViewBounds(Ie.getBounds())}):console.warn("invalid element",Ie)}},[s,n,E]),Ce=l.useCallback(()=>{if(!H.current)return;const ee=[];B.current?.forEach(_e=>{ee.push(_e.movable)}),H.current.commit({viewAfter:{view:r,movableSelection:ee}}),B.current.clear(),H.current=null},[]),Ae=l.useCallback(()=>{H.current&&(H.current.rollback(),H.current=null)},[]),ye=l.useRef(null);l.useEffect(()=>{ye.current&&(ye.current.onscroll=ee=>{ee.preventDefault(),ee.srcElement.scrollTop=0,ee.srcElement.scrollLeft=0})},[ye.current]);const De=Ft(e,()=>({isMovableArea:()=>!0,focusMovable:fe,focus:()=>{fe()}}),[r]),[Pe,$e]=l.useState(null),C=l.useRef(!1),We=l.useRef(!1),nt=l.useRef(!1);l.useEffect(()=>{if(c||E.length===0||nt.current||C.current)return;if(We.current)return void requestAnimationFrame(()=>{oe.current&&M.current&&oe.current.refTargets.length>0&&(nt.current=!0,Re.current?.(!0)),S([...E])});C.current=!0;const ee=l.lazy(async()=>{try{const _e=await Promise.resolve().then(()=>require("./nxPMTvPNoBU3lMlz.cjs"));return C.current=!1,We.current=!0,S([...E]),_e}catch(_e){return console.warn(_e),Re.current?.(!1),null}});$e(ee)},[E,c,f,h]);const Ke=l.useMemo(()=>!Pe||c?null:g.jsx(l.Suspense,{children:g.jsx(Pe,{className:kt({dragging:k||R,resizing:k,moving:R}),container:null,ref:oe,target:oe.current?E:[],draggable:!c&&!f,resizable:!c&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:b,onResizeStart:ee=>{pe(ee.target,"Resize")},onResize:ee=>{if(!H.current)return ee.stopDrag(),void te();N(!0);const _e=ee.direction[0]!==0&&ee.direction[1]!==0;let Ve=0,Me=0;for(let Le=0;Le<E.length;Le++){const Ie=E[Le],L=B.current.get(Ie),se=j.current.get(Ie);if(!L||!se){console.warn("invalid element");continue}let U=ee.dist[0],J=ee.dist[1],m=ee.drag.dist[0],_=ee.drag.dist[1],A=L.startBounds.width,x=L.startBounds.height;Le===0?(Ve=A,Me=x):(U*=A/Ve,m*=A/Ve,J*=x/Me,_*=x/Me);const V={...L.startBounds};if(V.width=Math.max(0,A+U),V.height=Math.max(0,x+J),ee.direction[0]===-1&&(V.width=Math.max(0,Math.min(L.startBounds.x+A,A-m))),ee.direction[1]===-1&&(V.height=Math.max(0,Math.min(L.startBounds.y+x,x-_))),_e&&(se.isLockAspectRatio()||ee.inputEvent?.shiftKey)){const y=A/x,W=V.width/V.height;W>y?V.height=V.width/y:W<y&&(V.width=V.height*y)}ee.direction[0]===-1&&(V.x=Math.max(0,Math.min(L.startBounds.x+A,L.startBounds.x+A-V.width))),ee.direction[1]===-1&&(V.y=Math.min(L.startBounds.y+x,L.startBounds.y+x-V.height)),L.movable.setBounds(n.toAbsoluteBounds(V))}},onResizeEnd:ee=>{N(!1),Ce()},onDragStart:ee=>{pe(ee.target,"Move")},onDrag:ee=>{if(!H.current)return ee.stopDrag(),void te();T(!0);for(let _e=0;_e<E.length;_e++){const Ve=E[_e],Me=B.current.get(Ve);Me?Me.movable.setBounds(n.toAbsoluteBounds({...Me.startBounds,x:Me.startBounds.x+ee.translate[0],y:Me.startBounds.y+ee.translate[1]})):console.warn("invalid element")}},onDragEnd:ee=>{},onMouseUp:ee=>{}})}),[ue,Pe,E,n,c,f,h,k,R]);return g.jsx("div",{className:kt(u,"movable-area",qc),style:{width:$.width,height:$.height,...w,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Cn([De,ye]),...I,children:g.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:$.width,height:$.height},...I,children:g.jsxs("div",{ref:M,style:{position:"absolute",pointerEvents:"auto"},onFocus:ee=>{F?.(),Oe(!0)},onBlur:ee=>{Oe(!1)},onKeyDownCapture:ee=>{if(ee.isDefaultPrevented())return;const _e=ee.nativeEvent.ctrlKey,Ve=ee.nativeEvent.altKey,Me=ee.nativeEvent.shiftKey;if(ee.which===St.Escape){const U=r.getMovableSelection();let J=[...U];return E.forEach(m=>{if(J.length===0)return;const _=j.current.get(m);let A=J.indexOf(_);J.splice(A,1)}),J.length!==U.length&&r.selectMovables(J),J.length===0&&v?.(),void ee.preventDefault()}const Le=.1,Ie=U=>{o.updateSelected(J=>{J.setRotation(J.getRotation()+U)},"Rotate")},L=(U,J=!0)=>{o.updateSelected(m=>{const _=m.getBounds();let A=1+U;J||(A=1/A);const x=Math.sqrt(Math.pow(_.width,2)+Math.pow(_.height,2)),V=Math.atan2(_.height,_.width),y=A*x;if(y<10)return;const W=y*Math.cos(V),Y=y*Math.sin(V),ie={x:_.x+(_.width-W)/2,y:_.y+(_.height-Y)/2,width:W,height:Y};m.setBounds(ie)},"Resize")},se=U=>{o.updateSelected(J=>{const m=J.getBounds(),_={x:m.x+(U.x??0),y:m.y+(U.y??0),width:m.width+(U.width??0),height:m.height+(U.height??0)};J.setBounds(_)},"Nudge")};if(ee.which===St.Delete)o.updateSelected(U=>{U.delete()},"Delete"),ee.preventDefault();else if(ee.key==="a"&&_e){const U=r.getMovableSelection();r.selectMovables(o.search(),!0),r.selectMovables(U,!0),ee.preventDefault()}else ee.key==="ArrowLeft"?(Me?L(Le,!1):Ve?Ie(-10):se({x:_e?-10:-1}),ee.preventDefault()):ee.key==="ArrowRight"?(Me?L(Le,!0):Ve?Ie(10):se({x:_e?10:1}),ee.preventDefault()):ee.key==="ArrowUp"?(Me?L(Le,!0):se({y:_e?-10:-1}),ee.preventDefault()):ee.key==="ArrowDown"&&(Me?L(Le,!1):se({y:_e?10:1}),ee.preventDefault())},children:[Se,Ke]})})})})),un=t=>{let e=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,o=0,r=0;for(let i=0;i<t.length;i++){const s=t[i].getBounds();e=Math.min(s.x,e),n=Math.min(s.y,n),o=Math.max(s.x+s.width,o),r=Math.max(s.y+s.height,r)}return{x:e,y:n,width:o-e,height:r-n}},Hi=(t,e=!0)=>{const n=[],o=e?"x":"y",r=e?"y":"x",i=e?"width":"height";let s=0,a=Number.MAX_SAFE_INTEGER,d=0;for(let h=0;h<t.length;h++){const u=t[h],w=u.getBounds();s+=w[i],a=Math.min(w[o],a),d=Math.max(w[o]+w[i],d),n.push({bounds:w,movable:u})}const c=(d-a-s)/(t.length-1);n.sort((h,u)=>{const w=h.bounds[o],b=u.bounds[o];return w!==b?w-b:h.bounds[r]-u.bounds[r]});const f=new Map;f.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const u=n[h-1].bounds,w={...n[h].bounds};w[o]=u[o]+u[i]+c,n[h].bounds=w,f.set(n[h].movable,w)}return f.set(n[n.length-1].movable,n[n.length-1].bounds),f};function es(t){const{movables:e,movablesView:n,transactional:o,commands:r,target:i,onRepeatCommandChange:s,notifier:a}=t,d=Gt();l.useRef(d.getMode()).current=d.getMode();const c=X(async(v,F,E=null,S=!0)=>{const k=async()=>{const N=await Promise.resolve(a?.showBusy?.(v.label()));try{await F();const R=E??v?.label?.();if(s){let T=null;v&&R!==!1&&(T=new Ne(v.key(),i,{label:R,description:R},k)),s(T)}N?.(),S&&d.setMode(null)}catch(R){N?.(),a?.showError?.(R)}};await k()},[s,a]),[f,h]=l.useReducer(v=>v+1,0),u=X((v,F,E)=>{if(!n)return;const S=n.getMovableSelection();if(S.length===0)return;let k="Drawings";if(S.length===1){const R=S[0];k=p.TextUtils.capitalize(R.getContent().getType())??"Drawing"}const N=`${v.label()} ${k}`;c(v,()=>{let R=null;o&&(R=o.beginCommit(N));const T=n.getMovableSelection();if(T.length===0)return;const G=E?.(T);for(let O=0;O<T.length;O++){const j=T[O];F(j,G)}R?.commit()})},[n,o]),[w,b]=l.useState(n.getMovableSelection()[0]??null),[q,I]=l.useState(!w||w?.isProtected()),$=l.useMemo(()=>[new ne("moveToFront",i,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[Q.Ctrl,Q.Shift]}},function(){u(this,v=>{v.moveToFront()})}),new ne("moveForward",i,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[Q.Ctrl]}},function(){u(this,v=>{v.moveForward()})}),new ne("moveToBack",i,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[Q.Ctrl,Q.Shift]}},function(){u(this,v=>{v.moveToBack()})}),new ne("moveBackward",i,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[Q.Ctrl]}},function(){u(this,v=>{v.moveBackward()})}),new ne("toggleLockAspectRatio",i,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){u(this,v=>{v.setLockAspectRatio(!v.isLockAspectRatio())})}),new ne("formatAnchorTypeTwoCell",i,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){u(this,v=>{v.setAnchorType(p.IAnchored.Type.TwoCell)})}),new ne("formatAnchorTypeOneCell",i,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){u(this,v=>{v.setAnchorType(p.IAnchored.Type.OneCell)})}),new ne("formatAnchorTypeAbsolute",i,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){u(this,v=>{v.setAnchorType(p.IAnchored.Type.Absolute)})}),new ne("formatDrawAlignLeft",i,{label:"Align Left",description:"Align the selected drawings to the left."},function(){u(this,(v,F)=>{v.setBounds({x:F.x})},un)}),new ne("formatDrawAlignCenter",i,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){u(this,(v,F)=>{v.setBounds({x:(F.width-v.getBounds().width)/2+F.x})},un)}),new ne("formatDrawAlignRight",i,{label:"Align Right",description:"Align the selected drawings to the right."},function(){u(this,(v,F)=>{v.setBounds({x:F.width-v.getBounds().width+F.x})},un)}),new ne("formatDrawAlignTop",i,{label:"Align Top",description:"Align the selected drawings to the top."},function(){u(this,(v,F)=>{v.setBounds({y:F.y})},un)}),new ne("formatDrawAlignMiddle",i,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){u(this,(v,F)=>{v.setBounds({y:(F.height-v.getBounds().height)/2+F.y})},un)}),new ne("formatDrawAlignBottom",i,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){u(this,(v,F)=>{v.setBounds({y:F.height-v.getBounds().height+F.y})},un)}),new ne("formatDrawDistributeHorz",i,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){u(this,(v,F)=>{v.setBounds(F.get(v))},v=>Hi(v))}),new ne("formatDrawDistributeVert",i,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){u(this,(v,F)=>{v.setBounds(F.get(v))},v=>Hi(v,!1))}),new ne("formatDrawFlipHorz",i,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new ne("formatDrawFlipVert",i,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new ne("formatDrawGroup",i,{label:"Group",description:"Group the selected drawings into a single drawing."}),new ne("formatDrawUngroup",i,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new ne("formatDrawSwapShapes",i,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new ne("formatDrawSwapShapesHorz",i,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new ne("formatDrawSwapShapesVert",i,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,w]);l.useEffect(()=>{},[d]);const D=l.useMemo(()=>{let v=null;return v=r?r.createChildGroup(i,"movable",!1):new nn(i,"movable"),v.addCommands($,!0),v},[r,$]);return it(w,{onAnyChange:()=>{D.getCommand("formatAnchorTypeTwoCell").update({state:w?.getAnchorType()===p.IAnchored.Type.TwoCell}),D.getCommand("formatAnchorTypeOneCell").update({state:w?.getAnchorType()===p.IAnchored.Type.OneCell}),D.getCommand("formatAnchorTypeAbsolute").update({state:w?.getAnchorType()===p.IAnchored.Type.Absolute}),D.getCommand("formatAnchorTypeAbsolute").update({state:w?.getAnchorType()===p.IAnchored.Type.Absolute}),D.getCommand("toggleLockAspectRatio").update({state:w?.isLockAspectRatio()})},onProtectedChange:v=>{I(v.isProtected())},onDelete:()=>{}}),it(n,{onMovableSelectionChange:()=>{const v=n.getMovableSelection()[0]??null;b(v),I(!v||v.isProtected()),h()}}),it(e,{onCollectionChange:()=>{h()}}),l.useEffect(()=>{const v={disabled:q};D.getCommand("formatAnchorTypeTwoCell").update(v),D.getCommand("formatAnchorTypeOneCell").update(v),D.getCommand("formatAnchorTypeAbsolute").update(v),D.getCommand("toggleLockAspectRatio").update(v);const F=e.getCount(),E=n.getMovableSelection(),S=q||F<=1||E.length===0;let k={disabled:S},N=k;if(!S&&E.length===1){const G=E[0];G.getZIndex()===0&&(k={disabled:!0}),G.getZIndex()===F-1&&(N={disabled:!0})}D.getCommand("moveToFront").update(N),D.getCommand("moveForward").update(N),D.getCommand("moveToBack").update(k),D.getCommand("moveBackward").update(k);const R={disabled:q||E.length<=1};D.getCommand("formatDrawAlignLeft").update(R),D.getCommand("formatDrawAlignCenter").update(R),D.getCommand("formatDrawAlignRight").update(R),D.getCommand("formatDrawAlignTop").update(R),D.getCommand("formatDrawAlignMiddle").update(R),D.getCommand("formatDrawAlignBottom").update(R),D.getCommand("formatDrawFlipHorz").update(R),D.getCommand("formatDrawFlipVert").update(R),D.getCommand("formatDrawGroup").update(R),D.getCommand("formatDrawUngroup").update(R),D.getCommand("formatDrawSwapShapes").update(R),D.getCommand("formatDrawSwapShapesHorz").update(R),D.getCommand("formatDrawSwapShapesVert").update(R);const T={disabled:q||E.length<=2};D.getCommand("formatDrawDistributeHorz").update(T),D.getCommand("formatDrawDistributeVert").update(T)},[f,q,f]),D}const Rc=l.memo(l.forwardRef((t,e)=>{const{children:n,disabled:o,description:r,view:i,isDragging:s,onHide:a,onShow:d,...c}=t;l.useEffect(()=>{},[r]);const f=Ft(e,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:u,width:w}]=en();return g.jsx("div",{...c,ref:Cn([f,h]),children:g.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",border:"var(--sxl-app-color-grey, grey) solid 1px",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",filter:o?"blur(1px)":void 0,boxShadow:s?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:g.jsx("div",{style:{textAlign:"center"},children:r})})})})),Ec=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o,movableProps:r,renderMovable:i,commands:s,target:a,notifier:d,onRepeatCommandChange:c}=t,f=es({movables:o.getMovables(),movablesView:o?.getView(),transactional:o,onRepeatCommandChange:c,commands:s,target:a,notifier:d});l.useEffect(()=>{n?.getStage()},[n?.getStage()]);const h=l.useMemo(()=>g.jsx(Ql,{ref:e,view:n,movables:o.getMovables(),disableResize:!o.getProtection().isObjectsAllowed(),disableDrag:!o.getProtection().isObjectsAllowed(),movablesView:o.getView(),transactional:o,renderMovable:i,...r,onFocus:()=>{f.activate(),r?.onFocus?.()}},"movable-area"),[o,r,s,f]);return h&&n?h:null})),Tc=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o,gridStyle:r,getCellEditor:i,showProtectedError:s,setEditingCoords:a,commands:d,notifier:c=xo}=t,f=Gt(),[h,u]=l.useState(null),[w,b]=l.useState(null),[q,I]=l.useState(null),[$,D]=l.useState(null),[v,F]=l.useState(null);l.useLayoutEffect(()=>{if(q===null)return D(null),void F(null);const M=()=>{const H=o.getRange(q).getCell(),oe=H.getStyle();let ue,te=oe.getFill()?.toCSS(r.body.darkMode);te.background!=="none"&&te.background!=="transparent"||(te=o.getStyles().getNormal().getFill().toCSS(r.body.darkMode)),te.background!=="none"&&te.background!=="transparent"||(te={background:r.body.fill}),D({style:te}),H&&!H.getFormula()&&(ue=H?.getRenderHorizontalAlignment()),F(ue??Rl.Left)};return M(),o.getRange(q).addListener(()=>{M()})},[o,q,r?.body]);const E=X(()=>{let M=w.editState.dirty??"";if(w.editState.dirty!==void 0){const H=p.TextUtils.clampString(M);try{const oe=w.sheet.getRange(w.coords),ue=`Typing '${H}' into ${oe.toString()}`;return oe.setValue(M,{description:ue,autoFit:!0}),I(null),b(null),f.setMode(null),a(null),!0}catch(oe){throw c.showError(new Error(`Unable to enter '${H}'.`,{cause:oe})),oe}}},[o,w,c]),S=X(M=>o.getRange(M).getCell().getExtrusions()??ut.cellToRange(M),[o]),k=X(M=>{let H=p.IRange.Orientation.Row,oe=!1;M!==p.IRange.Direction.Up&&M!==p.IRange.Direction.Down||(H=p.IRange.Orientation.Column),M!==p.IRange.Direction.Left&&M!==p.IRange.Direction.Up||(oe=!0),o.getSelection().traverse(H,oe)},[o]),N=l.useCallback((M,H)=>{if(i)return i(M,H);if(!o)return null;const{ref:oe,...ue}=M;return g.jsx(Ul,{ref:oe,...ue,sheet:o,bodyStyle:r?.body,activeCoords:H,commands:d,onChangeEdit:te=>{const K={sheet:o,coords:H,editState:te};f.setMode(le=>({...le,description:K.editState.editMode?"Edit":"Enter",args:{...le?.args,stateAndCoords:K}}))},editState:w.editState})},[o,$,i,w,q]),{overlay:R,startEdit:T,submitEdit:G,cancelEdit:O,onKeyboardEventNative:j,onPointerEventNative:z}=ft.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:N,canEdit:()=>{const M=o.getProtection();if(M.isReadOnly())return!1;const H=M.isLocked();return H&&s(),!H},onBeforeStartEdit:M=>{const H=Wl(()=>o.getRange(M).getCell()),oe={sheet:o,coords:M,editState:Object.freeze(H)};f.setMode({key:"edit",args:{stateAndCoords:oe}}),b(oe)},onStartEdit:M=>{I(M),a(M)},onSubmitEdit:E,onCancelEdit:M=>{I(null),b(null),f.setMode(null),a(null)},onDoneEdit:M=>{f.setMode(null)},onNavigate:k,containerProps:$,borderStrokeFill:r.selection?.strokeFill,borderStrokeWidth:o?.getSelection().getCoords().ranges?.length>1?1:2,alignment:v,getRangeCoords:S});it(o.getSelection(),{onChange(M){u(o.getSelection().getCoords().cell)}});const B=X(M=>{z(M),q&&G()},[z,O,q]),Z=l.useCallback(M=>{z(M)},[z]),P=l.useCallback(M=>{j(M)},[j]);return l.useEffect(()=>{const M=n?.getStage();if(M)return M.addEventListener("pointerdown",B),M.addEventListener("dblclick",Z),M.addEventListener("keydown",P),()=>{M.removeEventListener("pointerdown",B),M.removeEventListener("dblclick",Z),M.removeEventListener("keydown",P)}},[n?.getStage()]),l.useEffect(()=>{const M=f.getMode(),H=M?.key;H==="edit"||H==="enter"?w?M.args?.cancel?O():M.args?.submit?G():b(M.args?.stateAndCoords):T(M.args?.start):q&&O()},[f]),R(n,e)})),ts="white",ns="black",Mc=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${ns}' fill='${ts}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,kc=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 13.24564,12.979958 H 5.2023009 L 7.500398,10.681861 2.3296796,5.5111425 5.7768252,2.0639969 10.947543,7.2347153 13.24564,4.9366182 Z' stroke='${ns}' fill='${ts}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,_c=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o}=t,[r,i]=l.useState(o.getTables().getCount()>0),[s,a]=l.useState(null),[d,c]=l.useState(null),[f,h]=l.useState(null),[u,w]=l.useState(null),b=X(()=>{if(o.getTables().getCount()>0){i(!0);const E=o.getTables().search({address:n.getVisibleRangeCoords()});a(E.length>0?E:null)}else i(!1),a(null)},[o,n]),q=X(E=>{E.preventDefault(),E.stopPropagation();const S=n.getCellCoordsFromClient(E.clientX,E.clientY),k=o.getTables().search({address:S});k.length===1&&k[0].select()},[n,o]),I=X(E=>{E.preventDefault(),E.stopPropagation();const S=n.getCellCoordsFromClient(E.clientX,E.clientY),k=o.getTables().search({address:S});if(k.length===1){const N=k[0].getRange().getCoords(),R={colStart:N.colStart,rowStart:S.rowIndex,colEnd:N.colEnd,rowEnd:S.rowIndex};o.getRange(R).select()}},[n,o]),$=X(()=>{if(!r)return;const E=o.getTables().search({address:n.getVisibleRangeCoords()});a(E.length>0?E:null)},[o,r,n]);it(o?.getSelection(),{onChange(E){c(o.getSelection().getCoords().cell)}}),it(f,{onAnyChange(E){b(),$()}}),it(u,{onAnyChange(E){$()}}),it(o,{onTablesChange(E){b(),$()},onInvalidated(E){b(),$()}});const D=l.useMemo(()=>Ue.debounce(Ue.throttle($,300),300),[]);l.useEffect(()=>{D()},[n]),l.useEffect(()=>{let E=null;if(s)for(let S=0;S<s.length&&!E;S++){const k=s[S],N=k.getRange().getCoords();p.CoordUtils.isCellWithinRange(d,N)&&(E=k)}h(E)},[d,s]);const v=X(E=>{let S=null;if(s)for(let k=0;k<s.length;k++){const N=s[k],R=N.getRange().getCoords();let T=n.getRangeCoordsBounds(R);const G=n.getRelativePointFromClient(E.clientX,E.clientY),O=G.x,j=G.y;if(O>=T.x&&O<=T.x+T.width&&j>=T.y&&j<=T.y+T.height){const z=n.getViewportSize();O<=0||j<=0||O>=z.width||j>=z.height||(S=N)}}w(S)},[n,s]);if(l.useEffect(()=>{const E=n?.getStage();if(E&&s)return E.addEventListener("mousemove",v),E.addEventListener("mouseleave",v),()=>{E.removeEventListener("mousemove",v),E.removeEventListener("mouseleave",v)}},[s,n?.getStage()]),!n||!s||s.length===0)return null;const F=[];for(let E=0;E<s.length;E++){const S=s[E];if(S.isClosed())continue;const k=S===u,N=S===f,R=S.getRange().getCoords(),T=n.getRangeCoordsBounds(R);let G;if(k||N){const O=S.getStyle().getProperties(),j=O.headerRow?.fill?.background??O.wholeTable?.border?.top?.color?.toString();if(j&&o){const z=o.getStyles().parseColor(j);z&&(G=z.toCSS())}G||(G="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}F.push(g.jsx("div",{style:{position:"absolute",left:T.x,top:T.y,width:Math.min(16,T.width),height:T.height,pointerEvents:"all",cursor:Mc},onMouseDown:I},`table-select-row-${S.getName()}`)),F.push(g.jsx("div",{style:{position:"absolute",left:T.x,top:T.y,width:Math.min(16,T.width),height:Math.min(16,T.height),pointerEvents:"all",cursor:kc},onMouseDown:q},`table-select-${S.getName()}`)),F.push(g.jsx(ft.Selection,{x:T.x,y:T.y,width:T.width,height:T.height,range:R,strokeWidth:N?.5:0,stroke:G??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:k?`${G} 0px 0px 1px 1px`:void 0}},`table-outline-${S.getName()}`))}return F})),Ic=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o,animationTime:r=60}=t,[i,s]=l.useState(null),[a,d]=l.useState(null),c=l.useRef(null),f=X(()=>{const I=o.getSelectedCell(),$=I.getSpill()?.getCoords()??null;ut.isEqualRanges($,i)||(d($?{transition:i?"move":"in",bounds:n.getRangeCoordsBounds($),coords:$}:{transition:"out",bounds:n.getRangeCoordsBounds(i),coords:i}),s($))},[o,n,i]);l.useEffect(()=>(c.current&&(clearTimeout(c.current),c.current=null),a&&(c.current=setTimeout(()=>{d(null),c.current=null},r)),()=>{c.current&&(clearTimeout(c.current),c.current=null)}),[a,r]);const h=l.useMemo(()=>Ue.debounce(Ue.throttle(f,80),80),[]);if(it(o?.getSelection(),{onChange(I){h()}}),it(o,{onSpillsChange(I){f()},onInvalidated(I){f()}}),!n||!i&&!a)return null;const u=o.getRange(i).getValue()instanceof p.FormulaError.Spill,w=[];let b=a?.bounds??n.getRangeCoordsBounds(i);if(a&&!Ue.isEqualBounds(a.bounds,n.getRangeCoordsBounds(a.coords))&&d(null),b=n.toClipBounds(b,-10),!b)return;const q="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return w.push(g.jsx(ft.Selection,{x:b.x,y:b.y,width:b.width,height:b.height,range:i,strokeWidth:1,stroke:q,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:u?"6 3":void 0,opacity:a?.transition==="out"?0:1,transition:a?.transition?a.transition==="in"||a.transition==="out"?`opacity ${1.5*r}ms ease-in-out`:`left ${r}ms ease-out, top ${r}ms ease-out, width ${r}ms ease-out, height ${r}ms ease-out`:"none",boxShadow:`${q} 0px 0px 4px 0px`}},"spill-outline}")),w})),Fc={position:"absolute",top:0,left:0,bottom:0,right:0},$i=(t,e)=>{const n={...t},o=e?.getNormal().getFont(),r=o?.toCSS(),i={text:{fontFamily:r?.fontFamily,fontSize:o?.getSize()}},s=n.body=Ue.mergeContentful(t.body,i);return n.body=Ue.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},s),n.buttonSurface=Ue.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...t.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...t.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...t.selectionRemove},n.headerSelection={...n.selection,...t.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...t.headerSelectionInactive},n.header=Ue.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},t.header),n.header=Ue.mergeContentful(n.header,i),n.headerSelect=Ue.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},t.headerSelect),n.headerSelect=Ue.mergeContentful(n.headerSelect,i),n.headerSelectAll=Ue.mergeContentful(n.headerSelect,{},t.headerSelectAll),n.headerSelectAll=Ue.mergeContentful(n.headerSelectAll,i),n},Dc={fireOnModelChange:!1},Ui={},os=l.memo(l.forwardRef((t,e)=>{const{sheet:n,gridStyle:o=Ui,headersStyle:r=Ui,onSheetContextMenu:i,showColumnHeaders:s,columnHeaderProps:a,showRowHeaders:d,rowHeaderProps:c,showScrollbars:f=!0,scrollPaneProps:h,onViewportChange:u,commands:w,onRepeatCommandChange:b,onMoveCell:q,overlays:I,renderMovable:$,viewportComponent:D,onElementLoad:v,getCellEditor:F,onFocus:E,onBlur:S,style:k=Qe.EmptyCssProperties,notifier:N,onShowTooltip:R,onShowColumnTooltip:T,onShowRowTooltip:G,onCloseTooltip:O,gridProps:j,cellRenderProps:z,...B}=t;if(l.useEffect(()=>{p.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[Z,P]=l.useReducer(re=>re+1,0),[M,{width:H,height:oe}]=en(),ue=X(R,[R]),te=X(T,[T]),K=X(G,[G]),le=X(O,[O]),Re=l.useRef(!1);l.useLayoutEffect(()=>{Re.current=!0},[n]);const Te=n?.getStyles(),ae=l.useMemo(()=>$i(o,Te),[o,Te]),Fe=l.useMemo(()=>$i(r,Te),[r,Te]),{body:me={},buttonSurface:Oe={}}=ae,{header:xe={},headerSelect:ge={},headerSelectAll:fe={}}=Fe,Se=l.useRef(null),[pe,Ce]=l.useState(()=>n?.getView()),Ae=(pe?.getZoomScale()??100)/100,ye=l.useMemo(()=>({vertical:pe.isShowColumnGridlines()&&Ae>=.4,horizontal:pe.isShowRowGridlines()&&Ae>=.4}),[pe?.isShowColumnGridlines(),pe?.isShowRowGridlines(),Ae]),De=l.useMemo(()=>{if(pe?.getGridLineColor())return{strokeDasharray:"1,1"}},[pe?.getGridLineColor(),ae]),Pe=s??pe?.isShowColumnHeaders(),$e=d??pe?.isShowRowHeaders(),[C,We]=l.useState({width:0,height:0}),nt=l.useMemo(()=>{let re=40,Ee=20;const ke=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ge=ke?.toCSS()?.fontFamily??ae.header.text.fontFamily,Je=ke?.getSize()??ae.header.text.fontSize,rt=p.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Je*p.IFont.getDeviceScale()),Ge);re=rt.width,Ee=rt.lineHeight}return{width:Math.round(re+5),height:Math.round(Ee+3)}},[C,ae?.header.text,n]),Ke=$e?Ae*nt.width:xe.edgeStrokeWidth,ee=Pe?Ae*nt.height:xe.edgeStrokeWidth,_e=Math.max(H,(n?.getColumnHeaders().getDefaultSize()??nt.width)+Ke+1),Ve=Math.max(oe,(n?.getRowHeaders().getDefaultSize()??nt.height)+ee+1),Me=l.useRef(new Map),Le=l.useRef(null),Ie=()=>({getColOffset:re=>n.getColumnHeaders().findOffset(re),getColIndex:re=>n.getColumnHeaders().findIndex(re),getRowOffset:re=>n.getRowHeaders().findOffset(re),getRowIndex:re=>n.getRowHeaders().findIndex(re)}),[L,se]=l.useState(()=>Ie()),[U,J]=l.useState(!1),[m,_]=l.useState(null),A=!0,x=ae.selection?.strokeFill,V=l.useCallback(()=>jt.current,[]),[y,W]=l.useState(),Y=X(re=>{W(re),n&&n.getView()&&n.getView().setTopLeft(re?{left:re.left,top:re.top}:null),u?.(re)},[n,u]),ie=l.useRef(null);l.useEffect(()=>{if(!y||!n)return;const re=n.getRangeAtBounds({x:y.left,y:y.top,width:y.width,height:y.height});ie.current?.(),ie.current=re.addListener(()=>{const Ee=re.getCoords();Se?.current?.invalidate(Ee)})},[y,n]);const[de,ce]=l.useState(()=>n?.getView().getTopLeft()),he=X(re=>{const Ee=ut.cellToRange(re);if(n.isClosed())return Ee;const ke=n.getRange(Ee,{excludeHidden:!0}).getMerges();return ke.length===0?Ee:ke[0]},[n]),be=re=>{if(!re||re.coords.colIndex===0&&re.coords.rowIndex===0)return null;const Ee={};return re.coords.colIndex>0&&(Ee[ct.Left]={index:re.coords.colIndex,scrollOffset:re.topLeft.left}),re.coords.rowIndex>0&&(Ee[ct.Top]={index:re.coords.rowIndex,scrollOffset:re.topLeft.top}),Ee},[ve,we]=l.useState(()=>be(n.getView().getFreezePanes())),qe=Gt(),Be=l.useCallback(()=>Se.current,[]),ze=X(re=>{qe.setMode(Ee=>Ee?.key==="edit"?{...Ee,args:{...Ee.args}}:{key:"edit",args:{stateAndCoords:null,start:re}})},[]),Ze=X(()=>y,[y]),He=Xl({sheet:n,commands:w,target:Be,onRepeatCommandChange:b,bodyStyle:me,notifier:N,onStartEdit:ze,getViewport:Ze}),[Ye,je]=l.useState(n.getSelection().isEntire()),[et,ht]=l.useState(pe?.getMovableSelection().length>0),Et=m!==null||et,Dt=null,[Xe,at]=l.useState(!1);l.useEffect(()=>{at(!1)},[n.getProtection()]);const Tt=X(()=>{Xe||(at(!0),N.showMessage?.(g.jsxs("span",{children:["This sheet is protected.",g.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:bn.Error}))},[N,Xe]),_t=l.useMemo(()=>{const re=qe.getMode();return re?.cursor?re.cursor:null},[Dt,qe]),[Mt,yt]=l.useState(null),dt=l.useRef(!1),[Bt,on]=l.useState([]),Rn=l.useRef(null),[Kt,En]=l.useState(Vn.EmptyTopLeft),[Nt,Qn]=l.useState(Vn.EmptyTopLeft);l.useEffect(()=>{En({left:de?.left,top:0})},[de?.left]),l.useEffect(()=>{Qn({left:0,top:de?.top})},[de?.top]),it(n?.getView(),{onFreezeSplitChange:()=>{we(be(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ce(n.getView().getTopLeft())},onMovableSelectionChange:()=>{ht(n.getView().getMovableSelection().length>0)}}),it(n?.getSelection(),{onChange:()=>{je(n.getSelection().isEntire())}}),it(n,{onViewChange(){Ce(n.getView()),se(Ie())},onLayoutChange:()=>{const re=n.getEntireRange();We({height:re.getRowCount(),width:re.getColumnCount()}),se(Ie())},onStyleChange:()=>{Zt()},onMovablesChange:()=>{},onInvalidated:()=>{Zt()}}),it(n,{onRequestScrollIntoView:async(re,Ee)=>{if(!Ee)return;const ke={colIndex:Ee?.coords.colStart,rowIndex:Ee?.coords.rowStart};return await Se.current?.scrollCellCoordsIntoView(ke,Ee?.scroll),!0},onRequestFocus:()=>Ue.whenFocus(jt.current)},Dc);const eo=l.useMemo(()=>{const re=(ke,Ge)=>{dt.current=!0,yt([Je=>{if(!Je.toClipBounds(Je.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:ke,colEnd:ke})))return;const rt=Je.getLayout(),st=Math.max(0,rt.getColOffset(ke)),ot=Je.getBounds(),mt=Math.min(ot.x+ot.width,rt.getColOffset(ke+1)),xt=Je.getAnchor();if(Ge!==null&&(xt===ct.Left||xt===ct.Center||xt===ct.Right)){const Uo=Ue.roundAccurately(Ge*Ue.getDPI(),0),io=Ue.roundAccurately(n?.getColumnWidthAsFontUnit(Ge/Ae),2).toFixed(2),Wo="Width: "+(Ge?io+" ("+Uo+" pixels)":"Hidden"),Fn=an.current.getGridElement().getRelativePointFromClient(0,0),cn=0-Fn.y,lo=0-Fn.y+ee,Go={x:st-(Fn.x-ot.x),y:cn,width:mt-st,height:lo-cn};requestAnimationFrame(()=>{dt.current&&te?.({anchor:Go,display:Wo})})}const Vt=[0,0,0,ot.height],In={style:{boxShadow:`0.5px 0px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},Vo={x:st-1,y:0,width:1,height:ot.height},Ho={style:{boxShadow:`-0.5px 0px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},$o={x:mt-1,y:0,width:1,height:ot.height};return g.jsxs(l.Fragment,{children:[g.jsx(ft.SVGLine,{linePoints:Vt,bounds:Vo,...In}),g.jsx(ft.SVGLine,{linePoints:Vt,bounds:$o,...Ho})]},"resize-dividers")}])};let Ee=null;return{onResizeHeadersStart:(ke,Ge,Je)=>{Ee=n.beginCommit(Je),re(ke,Ge)},onResizeHeaders:(ke,Ge,Je)=>{re(ke,Ge)},onResizeHeadersDown:(ke,Ge)=>{re(ke,Ge)},onResizeHeadersEnd:(ke,Ge,Je)=>{Ee?.commit({description:Je}),Ee=null,requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},...a}},[n,a,ee,Mt]),rn=l.useMemo(()=>{const re=(ke,Ge)=>{dt.current=!0,yt([Je=>{if(!Je.toClipBounds(Je.getRangeCoordsBounds({rowStart:ke,rowEnd:ke,colStart:0,colEnd:C.width})))return;const rt=Je.getLayout(),st=Math.max(0,rt.getRowOffset(ke)),ot=Je.getBounds(),mt=Math.min(ot.y+ot.height,rt.getRowOffset(ke+1)),xt=Je.getAnchor();if(Ge!==null&&(xt===ct.Top||xt===ct.Center||xt===ct.Bottom)){const Uo=Math.floor(10*Ue.getDPI())/10,io=Ue.roundAccurately(Ge*Uo,0),Wo=Ue.roundAccurately(io/Ae/(n?.getRowHeaders().getScaleFactor()*Ue.getDPI()),2).toFixed(2),Fn="Height: "+(Ge?Wo+" ("+io+" pixels)":"Hidden"),cn=_n.current.getGridElement().getRelativePointFromClient(0,0),lo=0-cn.x,Go=0-cn.x+Ke,Vs={x:lo,y:st-(cn.y-ot.y),width:Go-lo,height:mt-st};requestAnimationFrame(()=>{dt.current&&K?.({anchor:Vs,display:Fn})})}const Vt=[0,0,ot.width,0],In={style:{boxShadow:`0px 0.5px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},Vo={x:0,y:st-1,width:ot.width,height:1},Ho={style:{boxShadow:`0px -0.5px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},$o={x:0,y:mt-1,width:ot.width,height:1};return g.jsxs(l.Fragment,{children:[g.jsx(ft.SVGLine,{linePoints:Vt,bounds:Vo,...In}),g.jsx(ft.SVGLine,{linePoints:Vt,bounds:$o,...Ho})]},"resize-dividers")}])};let Ee=null;return{onResizeHeadersStart:(ke,Ge,Je)=>{Ee=n.beginCommit(Je),re(ke,Ge)},onResizeHeaders:(ke,Ge,Je)=>{re(ke,Ge)},onResizeHeadersDown:(ke,Ge)=>{re(ke,Ge)},onResizeHeadersEnd:(ke,Ge,Je)=>{Ee?.commit({description:Je}),Ee=null,requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},...c}},[n,c,Ke]),jt=Ft(e,()=>{const re=ke=>{n?.getView()&&n.getView().selectMovables([]),Le.current=null,Se?.current?.focus(ke)},Ee=async(ke=null)=>{if(ke||(ke=n?.getView().getMovableSelection()[0]),!ke)return!1;const Ge=ke.getAnchorCoords();if(!Ge)return!1;const Je=Se.current?.getViewFromCellCoords({colIndex:Ge.colStart,rowIndex:Ge.rowStart});if(!Je)return!1;const rt=Je.getAnchor();n?.getView().getMovableSelection().indexOf(ke)===-1&&n?.getView().selectMovables([ke]);let st=Me.current?.get(rt);return st?.current?(await st.current.focusMovable(ke),!0):(Le.current={movable:ke,anchor:rt},!0)};return{getGridElement:()=>Se.current,getRowHeaderElement:()=>_n.current,getColumnHeaderElement:()=>an.current,rowHeaderHeight:()=>ee,colHeaderWidth:()=>Ke,startEdit:ze,submitEdit:()=>{qe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{qe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:m!==null,focus:ke=>{n?.getView().getMovableSelection().length>0&&Ee()||re(ke)},focusSheet:re,focusMovable:Ee,contains:ke=>Se?.current?.contains?.(ke),invalidate:Zt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Zt=l.useCallback(re=>{Re.current||(Se?.current?.invalidate(re),P?.())},[]);l.useEffect(()=>{Zt()},[ae]);const Tn=Ye?fe.edgeStrokeFill:xe.fill,Oo=Ye?ge.fill:typeof ae.headerHover=="function"?ae.headerHover(xe)?.fill:xe.fill,lt=l.useMemo(()=>D?g.jsx("div",{className:kt("sheetxl-viewport-overlay",oc),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:D}):g.jsx(g.Fragment,{}),[D]);let Mn=null;Pe&&$e&&(Mn=g.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${ee}px`,width:`${Ke}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:re=>{let Ee=!re.ctrlKey;He?.getCommand("selectAll")?.execute(!Ee||re.button!==0),re.nativeEvent.which===_r.Right?i?.({originalEvent:re,clientX:re.clientX,clientY:re.clientY,rowIndex:-1,colIndex:-1}):Se.current?.focus()},children:[g.jsx("div",{style:{height:ee-5+"px",width:ee-5+"px",clipPath:`path('M${ee-5} 0 L0 ${ee-5} L${ee-5} ${ee-5} L${ee-5} 0 Z')`,borderRight:`2px solid ${Tn}`,borderBottom:`2px solid ${Tn}`,background:`${Oo}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),g.jsx("div",{style:{position:"absolute",height:`${ee}px`,width:`${Ke}px`,boxSizing:"border-box",borderRight:`solid 1px ${xe.strokeFill}`,borderBottom:`solid 1px ${xe.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const ln=X(({_left:re,_top:Ee})=>{},[]),to=X(re=>{if(!i)return;const Ee=Se.current.getViewFromClient(re.clientX,re.clientY)?.getCellCoordsFromClient(re.clientX,re.clientY);Ee&&(i({originalEvent:re,clientX:re.clientX,clientY:re.clientY,rowIndex:Ee.rowIndex,colIndex:Ee.colIndex}),re.stopPropagation(),re.preventDefault())},[i]),gt=X(re=>{if(!(!re.shiftKey&&(re.ctrlKey||re.metaKey)))return;const{deltaY:Ee}=re;return Ee>0?He.getCommand("sheetZoomOut")?.execute():Ee<0&&He.getCommand("sheetZoomIn")?.execute(),Ee===0},[He]);l.useEffect(()=>{on(null),Rn.current=null,dt.current=!1,yt(null);const re=n?.getView().getTopLeft();ln(re),Se.current?.scrollTo(re),ce(re),Ce(n.getView()),we(be(n.getView().getFreezePanes())),se(Ie()),P()},[n?.getView()]);const bt=X(re=>{const Ee=re.getVisibleRangeCoords();if(!Ee)return null;const ke=[];return n.getRange(Ee).forEach((Ge,Je)=>{const rt=Je.getCoords(),st=Je.getCell();(ot=>{if(ot.isEmpty())return!1;const mt=ot.getSpans();if(mt.width>1||mt.height>1||ot.getStyle().hasVisibleStyling()||pe.isShowFormulas()&&ot.getFormula()!==null)return!0;const xt=ot.getValue();return xt!==null&&!(!pe.isShowZeros()&&xt===0&&ot.getType()===p.ScalarType.Number)})(st)&&ke.push({coords:rt,value:st,range:pe.isShowFormulas()?null:st.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),ke},[n,pe.isShowZeros(),pe.isShowFormulas(),m]);l.useEffect(()=>{const re=[];I&&re.push(...I),Mt&&re.push(...Mt),Ue.isEqualArrays(re,Rn.current)||(Rn.current=re,on(re))},[I,Mt,ae]);const kn=l.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:o?.body?.text?.fill??"black"}}),[ae?.header?.edgeStrokeFill]),no=X(re=>{re.isDefaultPrevented()||re.isPropagationStopped()||(Le.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),sn=l.useMemo(()=>{const re=qe.getMode();return re?.key==="cut"||re?.key==="copy"},[qe]),jo=X(async re=>{const Ee=qe.getMode();return re.keyCode===St.Escape&&Ee?(re.preventDefault(),void qe.setMode(null)):re.keyCode===St.Enter&&sn?(re.preventDefault(),await He?.getCommand("paste")?.execute(),void qe.setMode(null)):void He?.dispatchToFocusedCommand(re)},[He,qe]),_n=l.useRef(null),oo=l.useMemo(()=>g.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${Ke+xe.edgeStrokeWidth}px`,minWidth:`${Ke+xe.edgeStrokeWidth}px`,borderRight:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2"},children:g.jsx(Bi,{ref:_n,sheetElement:jt.current,gridRef:Se,freezeStart:ve?.[ct.Top],oppositeSize:Ke,containerWidth:Ke,containerHeight:Ve,sheetHeader:n.getRowHeaders(),gridStyle:Fe,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Nt,onSheetContextMenu:i,tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${Ke+xe.edgeStrokeWidth}px`,minWidth:`${Ke+xe.edgeStrokeWidth}px`,borderRight:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2",...rn?.style},...rn})}),[Ke,ee,Ve,n,Nt,ve?.[ct.Top],ae,A,i,xe.fill,c]),an=l.useRef(null),ro=l.useMemo(()=>g.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${ee+xe.edgeStrokeWidth}px`,minHeight:`${ee+xe.edgeStrokeWidth}px`,borderBottom:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:g.jsx(Bi,{ref:an,sheetElement:jt.current,gridRef:Se,freezeStart:ve?.[ct.Left],oppositeSize:ee,containerWidth:_e,containerHeight:ee,sheetHeader:n.getColumnHeaders(),gridStyle:Fe,scrollPoint:Kt,onSheetContextMenu:i,...eo,style:{...eo?.style,position:"relative",left:"0px",width:"100%",height:`${ee+xe.edgeStrokeWidth}px`,minHeight:`${ee+xe.edgeStrokeWidth}px`,borderBottom:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[ee,_e,n,Kt,ve?.[ct.Left],ae,xe.fill,A,i,a]),zs=X(re=>{const{value:Ee,key:ke,...Ge}=re;let Je=Ee,rt=m;if(!rt||rt.colIndex===re.coords.colIndex&&rt.rowIndex===re.coords.rowIndex||(rt=null),!Je){const mt=re.range;if(Je=n.getRange({rowIndex:mt.rowStart,colIndex:mt.colStart}).getCell(),Je.isEmpty())return null}let st=null;Je.getHyperlink()&&(st=async mt=>{if(z?.onLinkMouseDown?.(mt),mt.button===0&&!mt.isDefaultPrevented()){mt.stopPropagation(),mt.preventDefault();try{await Je.getHyperlink()?.open()}catch(xt){N?.showError?.(xt)}}}),rt&&rt.colIndex===re.range.colStart&&rt.rowIndex===re.range.rowStart&&(Je=Je.createTemporaryCell({value:null}));const ot=n.getStyles();return l.createElement($l,{...Ge,key:ke,bodyStyle:me,docTheme:ot.getTheme(),normalStyle:ot.getNormal(),showFormulas:pe.isShowFormulas(),showZeros:pe.isShowZeros(),onLinkMouseDown:st,...z,value:Je})},[n,L,me,m,pe?.isShowFormulas(),pe.isShowZeros()]),Os=l.useCallback((re,Ee)=>{const{key:ke,...Ge}=re;return[g.jsx(lc,{ref:Ee,getVisibleCells:bt,sheet:n,gridStyle:ae,...Ge},`border-${ke}`),g.jsx(_c,{ref:Ee,sheet:n,commands:He,...Ge},`table-${ke}`),g.jsx(Ic,{ref:Ee,sheet:n,...Ge},`spill-${ke}`),g.jsx(xc,{ref:Ee,sheet:n,commands:He,notifier:N,onShowTooltip:ue,onCloseTooltip:le,gridStyle:ae,gridRef:Se,editingCoords:m,isActive:A,...Ge},`selection-${ke}`),g.jsx(mc,{ref:Ee,sheet:n,commands:He,gridStyle:ae,element:V,notifier:N,...Ge},`copy-paste-${ke}`),g.jsx(Ec,{ref:Ee,sheet:n,commands:He,target:Be,notifier:N,renderMovable:$,movableProps:{onUnFocus:()=>{jt.current.focus()}},...Ge},`movable-${ke}`),g.jsx(Tc,{ref:Ee,sheet:n,commands:He,notifier:N,gridStyle:ae,getCellEditor:F,showProtectedError:Tt,setEditingCoords:_,...Ge},`editor-${ke}`)]},[n,Se.current,ae,F,He,N]),[Zr,js]=l.useState(!1),Ns=l.useMemo(()=>{if(_e===0||Ve===0)return null;const re=n.getStyles().getNormal(),Ee=re.getFont(),ke=re.getFill(),Ge=re.getBorder(),Je=re.getFill().getType()===p.IFill.Type.None;let rt=De,st=De;const ot=(xt,Vt,In)=>In?{stroke:Ge.getBottom().isNone()?"none":xt.getColor().toRGBA(me.darkMode).toString(),...Vt}:Vt;st=ot(Ge.getBottom(),st,!Ge.getBottom().isNone()),st=ot(Ge.getTop(),st,!Ge.getTop().isNone()),rt=ot(Ge.getRight(),rt,!Ge.getRight().isNone()),rt=ot(Ge.getLeft(),rt,!Ge.getLeft().isNone());let mt=pe?.getGridLineColor()?.toRGBA(me.darkMode).toString()??me.strokeFill;return Je||(st=ot(Ge.getBottom(),st,!0),st=ot(Ge.getTop(),st,!0),rt=ot(Ge.getRight(),rt,!0),rt=ot(Ge.getLeft(),rt,!0)),g.jsx(ft.Grid,{className:"sheetxl-sheet-primary",style:{...Fc,...ke.toCSS(me.darkMode),...Ee.toCSS(me.darkMode,Ae),"--sxl-app-color-background":me.fill,"--sxl-app-color-shadow":ae.colorShadow,"--sxl-app-color-grey":ae.colorGrey,"--sxl-app-color-button-fill":Oe.fill,"--sxl-app-color-button-text":Oe.text?.fill,"--sxl-app-color-button-border":Oe.edgeStrokeFill,"--sxl-app-color-primary-dark":ae.selection.strokeFill},ref:Se,zoom:Ae,...j,onFirstRender:xt=>{js(!0),j?.onFirstRender?.(xt),He?.activate()},showGridLines:ye,gridLineColor:mt,gridLineColumnsProps:rt,gridLineRowsProps:st,freezeLeft:ve?.[ct.Left],freezeLeftProps:kn,freezeTop:ve?.[ct.Top],freezeTopProps:kn,width:_e,height:Ve,columnCount:C.width,rowCount:C.height,cursor:_t??Dt??"cell",clipCells:!0,layout:L,cellRenderer:zs,overlayRenderer:Os,getCellCoordsAsRangeCoords:he,getVisibleCells:bt,onWheelScroll:gt,onPointerDown:no,onKeyDown:jo,onViewportChange:Y,onImmediateScroll:ln,scrollPoint:de,stageProps:{onFocus:()=>{He?.activate()}},overlays:Bt})},[Z]);l.useEffect(()=>{Re.current||P()},[L,ve,Ae,He,de?.left,de?.top,me,j,_e,Ve,_t,Bt,A,Dt]);let No={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};f||(No={...No,...k});const Ps=l.useMemo(()=>{const re=n.getStyles().getTheme(),Ee=re.getColorScheme(),ke=re.getFontScheme();return{"--sxl-doc-color-dk1":Ee.getDk1().toCSS(me.darkMode),"--sxl-doc-color-dk2":Ee.getDk2().toCSS(me.darkMode),"--sxl-doc-color-lt1":Ee.getLt1().toCSS(me.darkMode),"--sxl-doc-color-lt2":Ee.getLt2().toCSS(me.darkMode),"--sxl-doc-color-accent1":Ee.getAccent1().toCSS(me.darkMode),"--sxl-doc-color-accent2":Ee.getAccent2().toCSS(me.darkMode),"--sxl-doc-color-accent3":Ee.getAccent3().toCSS(me.darkMode),"--sxl-doc-color-accent4":Ee.getAccent4().toCSS(me.darkMode),"--sxl-doc-color-accent5":Ee.getAccent5().toCSS(me.darkMode),"--sxl-doc-color-accent6":Ee.getAccent6().toCSS(me.darkMode),"--sxl-doc-color-hlink":Ee.getHlink().toCSS(me.darkMode),"--sxl-doc-color-fol-hlink":Ee.getFolHlink().toCSS(me.darkMode),"--sxl-doc-font-major":ke.getMajorFont(),"--sxl-doc-font-minor":ke.getMinorFont()}},[n.getStyles().getTheme()]);let Po=g.jsx("div",{style:No,onTouchStart:()=>{Yr()},onFocus:re=>{J(!0),E?.(re)},onBlur:re=>{J(!1),S?.(re)},ref:jt,...B,children:g.jsx("div",{className:kt("sheetxl-sheet",nc),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...Ps},children:g.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Mn,oo,g.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[ro,g.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,backgroundColor:me.fill},ref:M,onContextMenu:to,children:[Ns,lt,g.jsx(rc,{style:{position:"absolute",right:24,bottom:4},colorLicensee:ae?.selection?.strokeFill,colorCredits:ae?.body?.text?.fill})]})]})]})})});if(f){const re=Ee=>g.jsx(Pr,{...Ee,sheet:n});Po=g.jsx(Ar,{style:{flex:"1 1 100%",overflow:"hidden",background:`${xe.fill}`,minHeight:2*nt.height,minWidth:2*nt.width,...k},viewport:y,touchElement:Se.current?.stage,disableTouch:Et,onScrollViewport:Ee=>{Se.current?.scrollTo(Ee)},createHorizontalScrollbar:re,createVerticalScrollbar:re,...h,children:Po})}l.useEffect(()=>{Re.current=!1,P?.(),U&&jt.current?.focus()},[n]);const[Bo,Bs]=l.useState(!1),Yr=X(()=>{Bo||Bs(!0)},[Bo]);return l.useEffect(()=>{if(Zr)return typeof v=="function"&&v(),Qe.detectIt().primaryInput==="touch"&&Yr(),()=>{}},[v,Zr,Bo]),Po}));os.displayName="SheetElement";const Ac=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Wi="data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=",rs=l.memo(l.forwardRef((t,e)=>{const{children:n,disabled:o,style:r,picture:i,description:s,isDragging:a,view:d,onHide:c,onShow:f,onKeyDownCapture:h,onFocus:u,onBlur:w,loadingPanel:b,...q}=t,[I,$]=l.useState(!1),[D,v]=l.useState(null),[F,E]=l.useState(null),[S,k]=l.useState(null);l.useEffect(()=>{E(null),i.getDetails().then(T=>{$(!1),E(T.asUrl()),T.asSVGText?.()&&k(T.asSVGText())}).catch(T=>{console.warn(T),$(!0),E(Wi),k(null)})},[i]);const N=Ft(e,()=>({isPictureEditor:()=>!0}),[]),R=l.useMemo(()=>{if(F||S)return g.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:I?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:I?"var(--sxl-app-color-background, white)":void 0,boxShadow:I?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:I?"contain":void 0,opacity:D?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:F,onLoad:()=>{v(!0)},onError:({currentTarget:T})=>{console.log("error"),T.onerror=null,E(Wi),$(!0)},alt:s??`${i.getType()}`})},[D,i,F,S,a]);if(!i.isClosed())return g.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:a?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...r,width:"100%",height:"100%"},tabIndex:0,...q,onKeyDownCapture:T=>{h?.(T)},ref:N,children:[D||I?void 0:b,R]})}));rs.displayName="PictureEditor";const Lc=l.memo(l.forwardRef((t,e)=>{const{children:n,disabled:o,chart:r,view:i,isDragging:s,onHide:a,onShow:d,...c}=t;l.useEffect(()=>{},[r]);const f=Ft(e,()=>({isChartEditor:()=>!0}),[]),[h,{height:u,width:w}]=en();if(!r.isClosed())return g.jsx("div",{...c,ref:Cn([f,h]),children:g.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:o?"blur(1px)":void 0,boxShadow:s?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:g.jsx("div",{style:{textAlign:"center"},children:r.getDescription()})})})})),zc="_editable-input_1bqx6_6",Oc=t=>g.jsx("input",{...t}),is=l.memo(l.forwardRef((t,e)=>{const{style:n={},className:o,value:r="",onSubmit:i,onChange:s,onCancel:a,createInput:d=Oc,notifier:c,styleHover:f={},dragging:h,maxLength:u,disabled:w=!1,readOnly:b=!1,...q}=t,[I,$]=l.useState(!1),[D,v]=l.useState(!1),[F,E]=l.useState(r);l.useEffect(()=>{E(r)},[r]);const S=l.useRef(null),[k,N]=l.useState(null),R=l.useCallback(function(Z){const P=Z.message;k!==P&&(c?.showMessage?.(P,{type:bn.Error}),N(P))},[c,k]),T=l.useCallback(Z=>{let P=!1;try{P=i?.(Z)??!0}catch(M){R(M)}return P?(S.current=null,v(!1),E(Z),P):(setTimeout(()=>{S.current?.focus()},0),P)},[i]),G=X(()=>{E(r),S.current=null,v(!1),a?.()},[a,r]),O=l.useMemo(()=>{if(!D)return null;const Z={className:kt(zc),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:u,type:"text",value:F,onFocus:P=>{S.current||(S.current=P.target,setTimeout(()=>{P.target?.select()},0))},onBlur:P=>{S.current&&T(F)},onChange:P=>{D&&E(P.target.value)},onMouseDown:P=>P.stopPropagation(),onKeyDown:P=>P.code==="Escape"?(P.preventDefault(),void G()):P.code==="Enter"?(P.preventDefault(),void T(P.target.value)):void(P.code!=="Tab"?P.stopPropagation():T(P.target.value))};return g.jsx(g.Fragment,{children:d(Z)})},[D,F,T,G,d,w]),[j,z]=l.useState();l.useLayoutEffect(()=>{let Z=Object.assign({},n);(h||I)&&(Z=Object.assign(Z,f)),z(Z)},[h,I,f,n]),l.useEffect(()=>{O&&s?.(F)},[O,s,F]);const B=Ft(e,()=>({startEdit(){w||b||v(!0)},cancel(){G()}}),[]);return g.jsxs("div",{...q,ref:B,style:{flexDirection:"column",display:"flex",...j},className:kt(o),children:[g.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{w||b||v(!0)},onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:[g.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:D?0:1},children:F}),O]}),g.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...f},children:F})]})})),Fo=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Sn(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Br(t){return"nodeType"in t}function Rt(t){var e,n;return t?Sn(t)?t:Br(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Vr(t){const{Document:e}=Rt(t);return t instanceof e}function Yn(t){return!Sn(t)&&t instanceof Rt(t).HTMLElement}function ls(t){return t instanceof Rt(t).SVGElement}function xn(t){return t?Sn(t)?t.document:Br(t)?Vr(t)?t:Yn(t)||ls(t)?t.ownerDocument:document:document:document}const zt=Fo?l.useLayoutEffect:l.useEffect;function Do(t){const e=l.useRef(t);return zt(()=>{e.current=t}),l.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}function Gn(t,e){e===void 0&&(e=[t]);const n=l.useRef(t);return zt(()=>{n.current!==t&&(n.current=t)},e),n}function jn(t,e){const n=l.useRef();return l.useMemo(()=>{const o=t(n.current);return n.current=o,o},[...e])}function qo(t){const e=Do(t),n=l.useRef(null),o=l.useCallback(r=>{r!==n.current&&e?.(r,n.current),n.current=r},[]);return[n,o]}function Ro(t){const e=l.useRef();return l.useEffect(()=>{e.current=t},[t]),e.current}let ir={};function Xn(t,e){return l.useMemo(()=>{if(e)return e;const n=ir[t]==null?0:ir[t]+1;return ir[t]=n,t+"-"+n},[t,e])}function ss(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((i,s)=>{const a=Object.entries(s);for(const[d,c]of a){const f=i[d];f!=null&&(i[d]=f+t*c)}return i},{...e})}}const vn=ss(1),Kn=ss(-1);function Ao(t){if(!t)return!1;const{KeyboardEvent:e}=Rt(t.target);return e&&t instanceof e}function Eo(t){if(function(e){if(!e)return!1;const{TouchEvent:n}=Rt(e.target);return n&&e instanceof n}(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(t)?{x:t.clientX,y:t.clientY}:null}const tn=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[tn.Translate.toString(t),tn.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:o}=t;return e+" "+n+"ms "+o}}}),Gi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jc(t){return t.matches(Gi)?t:t.querySelector(Gi)}const Nc={display:"none"};function Pc(t){let{id:e,value:n}=t;return l.createElement("div",{id:e,style:Nc},n)}function Bc(t){let{id:e,announcement:n,ariaLiveType:o="assertive"}=t;return l.createElement("div",{id:e,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const as=l.createContext(null),Vc={draggable:`
|
|
30
|
+
The content is not applied.`}),new ne("pasteFormulas",S,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new ne("pasteTranspose",S,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new ne("pasteLinks",S,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];o.addCommands(k,!0)},[o,t]),l.useEffect(()=>{if(!o)return;const S={disabled:!e.getProtection().isFormatCellsAllowed()};o.getCommand("pasteValues").updateCallback(k=>F.paste({...cc,...k})).update(S),o.getCommand("pasteFormats").updateCallback((k,N)=>F.paste({...dc,description:N.label(),...k})).update(S),o.getCommand("pasteFormulas").updateCallback((k,N)=>F.paste({...uc,description:N.label(),...k})).update(S),o.getCommand("pasteTranspose").updateCallback((k,N)=>F.paste({...hc,description:N.label(),...k})).update(S),o.getCommand("pasteLinks").updateCallback((k,N)=>F.paste({...gc,description:N.label(),...k})).update(S),o.getCommand("cut").update(S),o.getCommand("paste").update(S)},[e,o]);const E=l.useMemo(()=>{if(!I||!b.current)return;const S=I.key;if(S!=="copy"&&S!=="cut"&&S!=="formatPainter")return;const k=b.current.getItem();if(k.getSource()!==e)return;const N=b.current.isCut?.(),R=N?f:c,T=N?d:a,G=k.getCoords(),O=G?[G]:null;return O&&O.length!==0?j=>{const z=[];for(let B=0;B<O.length;B++){const Z=O[B],P=j.toClipBounds(j.getRangeCoordsBounds(Z,{top:0,left:0,right:1,bottom:1}),ft.SELECTION_CLIP_INSETS);P&&(z.push(w({range:Z,key:`copy-selection-background-${B}`,x:P.x,y:P.y,width:Math.max(P.width,0),height:Math.max(P.height,0),stroke:R,strokeWidth:2})),z.push(w({range:Z,key:`copy-selection-foreground-${B}`,x:P.x+(P.width<=2?-1:0),y:P.y,width:Math.max(P.width,3),height:Math.max(P.height,3),stroke:T,strokeWidth:2,isAnimatedStroke:!0})))}return z}:null},[I,e,n,a,c,d,f]);return{...F,clipboard:v,overlays:E}},mc=l.memo(l.forwardRef((t,e)=>{const{view:n,element:o,sheet:r,gridStyle:i,commands:s,notifier:a}=t,d=i.body??{},c=r.getView(),{overlays:f}=Jl({element:o,sheet:r,sheetView:c,commands:s,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:d.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:d.fill,notifier:a});return it(r?.getSelection(),{onChange(h){}}),l.useEffect(()=>{n?.getStage()},[n?.getStage()]),f&&n?f(n):null})),fc="_sheet-selection_12wyx_5",pc={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},vc={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},wc={key:"dragCopy",description:"Drag selection to copy cell contents."},yc={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Vi=(t,e)=>e.ctrlKey&&e.shiftKey?yc:e.ctrlKey?wc:e.shiftKey?vc:pc,bc={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},xc=l.memo(l.forwardRef((t,e)=>{const{view:n,commands:o,className:r,onFirstRender:i,notifier:s,onShowTooltip:a,onCloseTooltip:d,sheet:c,gridRef:f,gridStyle:h,isActive:u,editingCoords:w,...b}=t,q=n?.getBounds(),I=X(a,[a]),$=X(d,[d]),[D,v]=l.useState(()=>c?.getSelection().getCoords()),F=X(ge=>{ut.isEqualSelectionCoords(ge,D)||c&&c.getSelection().updateCoords(ge)},[c,D]),E=Gt(),S=l.useRef(null),[k,N]=l.useState(c?.getProtection().isLocked()),[R,T]=l.useState(c?.getView().getMovableSelection().length>0),G=Qe.detectIt().primaryInput==="touch",O=!G&&u,j=w!==null||R,z=X(ge=>{const fe=ut.cellToRange(ge);if(c.isClosed())return fe;const Se=c.getRange(fe,{excludeHidden:!0}).getMerges();return Se.length===0?fe:Se[0]},[c]),B=X((ge,fe,Se,pe,Ce,Ae)=>{const ye=c.getSelectedRange().getExtended(pe,ge).getCoords();switch(pe){case p.IRange.Direction.Up:return ye.rowStart;case p.IRange.Direction.Down:return ye.rowEnd;case p.IRange.Direction.Left:return ye.colStart;case p.IRange.Direction.Right:return ye.colEnd}},[c]),Z=X(()=>{const ge=c.getUsedRange()?.getCoords(),fe=c.getRowHeaders().getUsedRange()?.getCoords(),Se=c.getColumnHeaders().getUsedRange()?.getCoords();return{...ge,colEnd:Math.max(ge?.colEnd??0,Se?.max??0),rowEnd:Math.max(ge?.rowEnd??0,fe?.max??0)}},[c]),P=X((ge,fe)=>c.getRowHeaders().hiddenHeadersAt(ge,fe),[c]),M=X((ge,fe)=>c.getColumnHeaders().hiddenHeadersAt(ge,fe),[c]),H=X(ge=>c.getRange(ge,{excludeHidden:!0}).getMerges(),[c]),oe=X(ge=>{c?.getSelection().setAdjusting(ge)},[c]),ue=X(async()=>{c?.getSelection().setAdjusting(null),E.getMode()?.key==="formatPainter"&&(await o?.getCommand("pasteFormats")?.execute({}),E.setMode(null))},[E,D,c,o]),te=l.useMemo(()=>{const ge=E.getMode();return ge?.key==="cut"||ge?.key==="copy"},[E]);it(c?.getView(),{onMovableSelectionChange:()=>{T(c.getView().getMovableSelection().length>0)}}),it(c?.getSelection(),{onChange(ge){const fe=c.getSelection().getCoords();v(fe)}}),it(c,{onProtectionChange:()=>{N(c.getProtection().isLocked())}});const{body:K={}}=h||{},le=n.getLayout(),Re=!(O&&D.ranges.length<=1&&w===null&&!k&&(!E.getMode()||te)),{cursor:Te,overlay:ae,onPointerDown:Fe}=ft.useSelection({gridRef:f,commands:o,layout:le,getCellCoordsAsRangeCoords:z,selection:D,fillHandleBorderColor:K.fill,selectionBackgroundColor:u?h.selection.fill:h.selectionInactive.fill,selectionBorderColor:u?h.selection.strokeFill:h.selectionInactive.strokeFill,selectionRemoveBackgroundColor:u?h.selectionRemove.fill:h.selectionInactive.fill,selectionRemoveBorderColor:u?h.selectionRemove.strokeFill:h.selectionInactive.strokeFill,disableFillDrag:Re,disableMoveDrag:G||!(u&&D.ranges.length<=1&&w===null&&!k),disableTouchSelection:j,onSelectionChange:F,onSelectionDragStart:oe,onSelectionDragEnd:ue,onMoveDragStart:(ge,fe,Se)=>{E.setMode(Vi(0,Se))},onMoveDragUpdate:(ge,fe,Se)=>{E.setMode(Vi(0,Se))},onMoveDragEnd:(ge,fe)=>{E.setMode(null)},onMoveDragDone:async(ge,fe,Se)=>{if(ut.isEqualRanges(ge,fe))return;const pe=c.getRange(fe);if(s?.showOptions){const Pe=pe.getDifferences(ge);let $e=!1;for(let C=0;!$e&&C<Pe.getCount();C++)$e=Pe.at(C).isContentful();if($e&&await s?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const Ce=!Se.ctrlKey,Ae=Se.shiftKey,ye=Ae?Ce?"Insert Moved Cells":"Insert Copied Cells":Ce?"Move Cells":"Copy Cells",De=await s?.showBusy?.(ye);try{const Pe=c.getRange(ge);await pe.doBatch(async()=>{Ae?await pe.insertFrom(ge,{isCut:Ce,undoRange:Pe}):await pe.copyFrom(ge,{isCut:Ce,undoRange:Pe}),Pe.autoFit({skipCustomSize:!0,orientations:p.IRange.Orientations.Row,minContent:!0}),pe.autoFit({skipCustomSize:!0,orientations:p.IRange.Orientations.Row,minContent:!0})},{description:ye,autoSelect:!0})}catch(Pe){s?.showError?.(Pe)}finally{De?.()}},contentfulCellFinder:B,hiddenRowsAt:P,hiddenColumnsAt:M,mergedRanges:H,getDataCoords:Z,canSelectionSpanMergedCells:ge=>{const fe=c.getRange(ge);return fe.isEntireColumns()||fe.isEntireRows()},onFill:async(ge,fe)=>{const Se="Auto Fill",pe=await s?.showBusy?.(Se);try{await c.doBatch(()=>{c.getRange(ge).autoFill(fe),c.getRange(fe).autoFit({orientations:p.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:Se,autoSelect:!0})}catch(Ce){s?.showError?.(Ce)}finally{S.current=null,pe?.()}},onFillPreview:(ge,fe,Se)=>{if(f.current&&I){E.setMode(bc);try{S.current?.direction!==Se&&(S.current=null,c.getRange(ge).autoFill(fe,{previewOnly:C=>{S.current={callback:C,direction:Se}}}));const pe=S.current?.callback?.(fe);if(!pe||pe.isEmpty())return;const Ce=pe.toText();if(!Ce)return;const Ae=ut.cellToRange(pe.getCoords()),ye=n.getRelativePointFromClient(0,0);let De=0,Pe=0,$e=hn.Bottom;if(Se===p.IRange.Direction.Down){De=le.getColOffset(Ae.colEnd+1)-ye.x;const C=le.getRowOffset(Ae.rowEnd),We=le.getRowOffset(Ae.rowEnd+1);Pe=We-(We-C)/2-ye.y,$e=hn.Right}else if(Se===p.IRange.Direction.Right){Pe=le.getRowOffset(Ae.rowEnd+1)-ye.y;const C=le.getColOffset(Ae.colEnd),We=le.getColOffset(Ae.colEnd+1);De=We-(We-C)/2-ye.x,$e=hn.Bottom}else if(Se===p.IRange.Direction.Up){De=le.getColOffset(Ae.colEnd+1)-ye.x;const C=le.getRowOffset(Ae.rowStart),We=le.getRowOffset(Ae.rowStart+1);Pe=We-(We-C)/2-ye.y,$e=hn.Right}else if(Se===p.IRange.Direction.Left){Pe=le.getRowOffset(Ae.rowEnd+1)-ye.y;const C=le.getColOffset(Ae.colStart),We=le.getColOffset(Ae.colStart+1);De=We-(We-C)/2-ye.x,$e=hn.Bottom}I({anchor:{x:De,y:Pe},display:Ce,placement:$e})}catch(pe){s?.showError?.(pe)}}},onFillDone:()=>{S.current=null,E.setMode(null),$?.()}}),me=X(ge=>{Fe(Qe.createSyntheticEvent(ge))},[Fe,w]);l.useEffect(()=>{const ge=n?.getStage();if(ge)return ge.addEventListener("pointerdown",me),()=>{ge.removeEventListener("pointerdown",me)}},[n?.getStage()]);const Oe=Ft(e,()=>({}),[]),xe=l.useRef(null);return g.jsx("div",{className:kt(r,"sheet-selection",fc),style:{position:"absolute",width:q?.width,height:q?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Cn([Oe,xe]),...b,children:ae(n)})})),go=Object.freeze({x:0,y:0,width:0,height:0}),Cc={fireOnModelChange:!1},Sc=l.memo(l.forwardRef((t,e)=>{const{children:n,view:o,movable:r,onRefLoad:i,onRefUnload:s,onHide:a,onShow:d,onUnFocus:c,isDragging:f,updateFrameBounds:h,dragStart:u,style:w,disabled:b,renderMovable:q,...I}=t,[$,D]=l.useState(go),[v,F]=l.useState(null),[E,S]=l.useState(!1),k=l.useRef(null);l.useLayoutEffect(()=>{if(r.isClosed())return;const R=r.getBounds();if(!R)return;const T=o.toViewBounds(R);D(T??go),h(T??go)},[o?.getBounds()]),it(r,{onBoundsChange:R=>{const T=R.getBounds();if(!T)return;const G=o.toViewBounds(T);D(G??go),h(G)},onSelectionChange:()=>{const R=Ue.hasFocus(k.current,!0);!E&&!R||r.isSelected()||c()}}),it(r,{onRequestFocus:()=>Ue.whenFocus(k.current,!0)},Cc),l.useEffect(()=>{const R=k.current;return i(R),()=>{s(R)}},[]);const N=l.useMemo(()=>{if(!$)return null;let{width:R,height:T}=$;return q({view:o,movable:r,disabled:b,isDragging:f,style:{position:"relative",left:0,top:0,width:R,height:T},onHide:a,onShow:d})},[o,r,$.width,$.height,b,f]);return g.jsx("div",{className:"movable",tabIndex:0,ref:Cn([k,e]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:$.x,top:$.y,width:$.width,height:$.height,...w},onMouseDown:async R=>{const T=R.shiftKey||R.ctrlKey,G=r.isSelected(),O=R.currentTarget;T&&G?r.unselect():(G&&!T||await r.select({addToSelection:T}),u(R.nativeEvent,O),O.focus())},onFocus:R=>{R.relatedTarget&&!v&&F(R.relatedTarget),S(!0)},onBlur:R=>{v&&!k?.current?.contains(R.relatedTarget)&&F(null),R.relatedTarget&&S(!1)},...I,children:N})})),qc="_movable-area_314c6_5",Ql=l.memo(l.forwardRef((t,e)=>{const{view:n,movables:o,movablesView:r,renderMovable:i,transactional:s,onUnFocus:a,onFocus:d,disabled:c=!1,disableDrag:f=!1,disableResize:h=!1,className:u,style:w,renderDirections:b=["nw","n","ne","w","e","sw","s","se"],onFirstRender:q,...I}=t,$=n.getBounds(),D=X(q,[q]),v=X(a,[a]),F=X(d,[d]),[E,S]=l.useState([]),[k,N]=l.useState(!1),[R,T]=l.useState(!1),G=l.useRef(!0),O=l.useRef(new Map),j=l.useRef(new Map),z=l.useRef(new Map),B=l.useRef(new Map),Z=l.useRef(new Map),P=l.useRef({onRequestFocus:ee=>(fe(ee),null)}),M=l.useRef(null),H=l.useRef(null),oe=l.useRef(null),[ue,te]=l.useReducer(ee=>ee+1,0);l.useLayoutEffect(()=>{te()},[n,o]),it(o,{onCollectionChange:()=>{const ee=o.search({address:n.getVisibleRangeCoords(),excludeHidden:!0}),_e=Z.current;_e.forEach(Me=>{Me()}),_e.clear();const Ve=P.current;for(let Me=0;Me<ee.length;Me++){const Le=ee[Me];if(Le.isClosed())continue;const Ie=Le.addListeners(Ve);_e.set(Le,Ie)}te()},onInvalidated:()=>{te()}}),it(r,{onMovableSelectionChange(ee){le(),te()}});const K=l.useCallback((ee,_e)=>{const Ve=z.current.get(ee);oe.current&&(oe.current.getTargets().forEach(Me=>{if(Me===Ve)return Me.style.left=_e.x+"px",Me.style.top=_e.y+"px",Me.style.width=_e.width+"px",void(Me.style.height=_e.height+"px")}),oe.current.updateRect())},[]),le=()=>{const ee=[],_e=r.getMovableSelection();_e.forEach(Ve=>{const Me=z.current.get(Ve);Me&&_e.indexOf(Ve)!==-1&&ee.push(Me)}),S(Ve=>Ue.isEqualArrays(Ve,ee)?Ve:ee)},Re=l.useRef(null),Te=l.useMemo(()=>new Promise(ee=>{Re.current=ee}),[]),ae=l.useRef(null),Fe=X(async(ee,_e)=>{ae.current=_e,await(async()=>!(!await Te.then()||!oe.current))()&&ae.current===_e&&oe.current.dragStart(ee,_e)},[E]),[me,Oe]=l.useState(!1),xe=l.useRef(null),ge=l.useRef(null),fe=X(async(ee=null)=>{if(ee||(ee=r.getMovableSelection()[0]),!ee)return v?.(),!1;const _e=z.current.get(ee);_e?(await Ue.whenFocus(_e),_e.focus(),ge.current=_e,xe.current=null):xe.current=ee},[r]);l.useEffect(()=>{me&&E.length>0&&ge.current!==E[0]&&fe(),G.current&&(D?.(),G.current=!1)},[E]);const Se=l.useMemo(()=>{const ee=o.search({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(ee.length===0&&O.current.size===0)return null;const _e=(L,se,U,J=!0)=>{const m=L.isSelected(),_={tabIndex:U,view:n,movable:L,onRefLoad:A=>{xe.current===L&&(A.focus(),ge.current=A,xe.current=null),z.current.set(L,A),j.current.set(A,L),se.rendered=!0,le()},onRefUnload:A=>{z.current.delete(L),j.current.delete(A),se.rendered=!1,le()},onUnFocus:v,onHide:A=>{se.onHide=A},onShow:A=>{se.onShow=A},isDragging:m&&(R||k),disabled:c,renderMovable:i,updateFrameBounds:A=>{K(L,A)},dragStart:Fe,onMouseUp:()=>{if(ae.current=null,H.current){N(!1),T(!1);let A=!1;B.current?.forEach(x=>{Ue.isEqualBounds(x.movable.getBounds(),x.startBounds)||(A=!0)}),A?Ce():Ae()}},style:{opacity:J?k&&m?.7:void 0:0,zIndex:k&&m?L.getZIndex()+ee.length:void 0,pointerEvents:J?void 0:"none",cursor:R&&m?"grabbing":c||f?"initial":"move",boxShadow:!m||R&&!k?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return g.jsx(Sc,{..._},`movable-${L.getUUID()}`)},Ve=O.current,Me=new Map,Le=[];for(let L=0;L<ee.length;L++){const se=ee[L];if(se.isClosed())continue;let U=Ve.get(se);U||(U={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(J,m)=>{if(!m||m.shown===!0)return;m.shown=!0;const _=++m.visibilityRequestId;requestAnimationFrame(()=>{const A=O.current.get(J);A&&_===m.visibilityRequestId&&(m.onShow?.(J),A.shown=!0)})},doHide:async(J,m)=>{if(!m||m?.shown===!1)return;m.shown=!1;const _=++m.visibilityRequestId,A=await Promise.resolve(m.onHide?.(J));_===m.visibilityRequestId&&A!==!1&&(m.shown=!1,O.current.delete(J),te())},visibilityRequestId:0}),U.frame=_e(se,U,L,!0),Le.push(U.frame),U.doShow(se,U),Ve.delete(se),Me.set(se,U)}const Ie=[];return r.getMovableSelection().forEach(L=>{const se=Ve.get(L);se&&(se.frame=_e(L,se,-1,!1),Ie.push(se.frame),Ve.delete(L),Me.set(L,se))}),Ve.forEach((L,se)=>{L.frame=_e(se,L,-1,!1),Ie.push(L.frame),L.doHide(se,L),Ve.delete(se),Me.set(se,L)}),O.current=Me,le(),[...Ie,...Le]},[ue,n,i,c,f,h,k,R]),pe=X((ee,_e)=>{const Ve=`${_e} ${E.length===1?p.TextUtils.capitalize(j.current?.get(E[0]).getContent().getType()):"Drawings"}`;H.current&&(console.warn(`Transaction ${H.current.getDescription()} is being replaced by ${Ve}`),H.current.rollback(),H.current=null),H.current=s.beginCommit({description:Ve}),B.current.clear();for(let Me=0;Me<E.length;Me++){const Le=E[Me],Ie=j.current?.get(Le);Ie?B.current.set(Le,{movable:Ie,startBounds:n.toViewBounds(Ie.getBounds())}):console.warn("invalid element",Ie)}},[s,n,E]),Ce=l.useCallback(()=>{if(!H.current)return;const ee=[];B.current?.forEach(_e=>{ee.push(_e.movable)}),H.current.commit({viewAfter:{view:r,movableSelection:ee}}),B.current.clear(),H.current=null},[]),Ae=l.useCallback(()=>{H.current&&(H.current.rollback(),H.current=null)},[]),ye=l.useRef(null);l.useEffect(()=>{ye.current&&(ye.current.onscroll=ee=>{ee.preventDefault(),ee.srcElement.scrollTop=0,ee.srcElement.scrollLeft=0})},[ye.current]);const De=Ft(e,()=>({isMovableArea:()=>!0,focusMovable:fe,focus:()=>{fe()}}),[r]),[Pe,$e]=l.useState(null),C=l.useRef(!1),We=l.useRef(!1),nt=l.useRef(!1);l.useEffect(()=>{if(c||E.length===0||nt.current||C.current)return;if(We.current)return void requestAnimationFrame(()=>{oe.current&&M.current&&oe.current.refTargets.length>0&&(nt.current=!0,Re.current?.(!0)),S([...E])});C.current=!0;const ee=l.lazy(async()=>{try{const _e=await Promise.resolve().then(()=>require("./Dw31E_I05ytgzGk2.cjs"));return C.current=!1,We.current=!0,S([...E]),_e}catch(_e){return console.warn(_e),Re.current?.(!1),null}});$e(ee)},[E,c,f,h]);const Ke=l.useMemo(()=>!Pe||c?null:g.jsx(l.Suspense,{children:g.jsx(Pe,{className:kt({dragging:k||R,resizing:k,moving:R}),container:null,ref:oe,target:oe.current?E:[],draggable:!c&&!f,resizable:!c&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:b,onResizeStart:ee=>{pe(ee.target,"Resize")},onResize:ee=>{if(!H.current)return ee.stopDrag(),void te();N(!0);const _e=ee.direction[0]!==0&&ee.direction[1]!==0;let Ve=0,Me=0;for(let Le=0;Le<E.length;Le++){const Ie=E[Le],L=B.current.get(Ie),se=j.current.get(Ie);if(!L||!se){console.warn("invalid element");continue}let U=ee.dist[0],J=ee.dist[1],m=ee.drag.dist[0],_=ee.drag.dist[1],A=L.startBounds.width,x=L.startBounds.height;Le===0?(Ve=A,Me=x):(U*=A/Ve,m*=A/Ve,J*=x/Me,_*=x/Me);const V={...L.startBounds};if(V.width=Math.max(0,A+U),V.height=Math.max(0,x+J),ee.direction[0]===-1&&(V.width=Math.max(0,Math.min(L.startBounds.x+A,A-m))),ee.direction[1]===-1&&(V.height=Math.max(0,Math.min(L.startBounds.y+x,x-_))),_e&&(se.isLockAspectRatio()||ee.inputEvent?.shiftKey)){const y=A/x,W=V.width/V.height;W>y?V.height=V.width/y:W<y&&(V.width=V.height*y)}ee.direction[0]===-1&&(V.x=Math.max(0,Math.min(L.startBounds.x+A,L.startBounds.x+A-V.width))),ee.direction[1]===-1&&(V.y=Math.min(L.startBounds.y+x,L.startBounds.y+x-V.height)),L.movable.setBounds(n.toAbsoluteBounds(V))}},onResizeEnd:ee=>{N(!1),Ce()},onDragStart:ee=>{pe(ee.target,"Move")},onDrag:ee=>{if(!H.current)return ee.stopDrag(),void te();T(!0);for(let _e=0;_e<E.length;_e++){const Ve=E[_e],Me=B.current.get(Ve);Me?Me.movable.setBounds(n.toAbsoluteBounds({...Me.startBounds,x:Me.startBounds.x+ee.translate[0],y:Me.startBounds.y+ee.translate[1]})):console.warn("invalid element")}},onDragEnd:ee=>{},onMouseUp:ee=>{}})}),[ue,Pe,E,n,c,f,h,k,R]);return g.jsx("div",{className:kt(u,"movable-area",qc),style:{width:$.width,height:$.height,...w,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Cn([De,ye]),...I,children:g.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:$.width,height:$.height},...I,children:g.jsxs("div",{ref:M,style:{position:"absolute",pointerEvents:"auto"},onFocus:ee=>{F?.(),Oe(!0)},onBlur:ee=>{Oe(!1)},onKeyDownCapture:ee=>{if(ee.isDefaultPrevented())return;const _e=ee.nativeEvent.ctrlKey,Ve=ee.nativeEvent.altKey,Me=ee.nativeEvent.shiftKey;if(ee.which===St.Escape){const U=r.getMovableSelection();let J=[...U];return E.forEach(m=>{if(J.length===0)return;const _=j.current.get(m);let A=J.indexOf(_);J.splice(A,1)}),J.length!==U.length&&r.selectMovables(J),J.length===0&&v?.(),void ee.preventDefault()}const Le=.1,Ie=U=>{o.updateSelected(J=>{J.setRotation(J.getRotation()+U)},"Rotate")},L=(U,J=!0)=>{o.updateSelected(m=>{const _=m.getBounds();let A=1+U;J||(A=1/A);const x=Math.sqrt(Math.pow(_.width,2)+Math.pow(_.height,2)),V=Math.atan2(_.height,_.width),y=A*x;if(y<10)return;const W=y*Math.cos(V),Y=y*Math.sin(V),ie={x:_.x+(_.width-W)/2,y:_.y+(_.height-Y)/2,width:W,height:Y};m.setBounds(ie)},"Resize")},se=U=>{o.updateSelected(J=>{const m=J.getBounds(),_={x:m.x+(U.x??0),y:m.y+(U.y??0),width:m.width+(U.width??0),height:m.height+(U.height??0)};J.setBounds(_)},"Nudge")};if(ee.which===St.Delete)o.updateSelected(U=>{U.delete()},"Delete"),ee.preventDefault();else if(ee.key==="a"&&_e){const U=r.getMovableSelection();r.selectMovables(o.search(),!0),r.selectMovables(U,!0),ee.preventDefault()}else ee.key==="ArrowLeft"?(Me?L(Le,!1):Ve?Ie(-10):se({x:_e?-10:-1}),ee.preventDefault()):ee.key==="ArrowRight"?(Me?L(Le,!0):Ve?Ie(10):se({x:_e?10:1}),ee.preventDefault()):ee.key==="ArrowUp"?(Me?L(Le,!0):se({y:_e?-10:-1}),ee.preventDefault()):ee.key==="ArrowDown"&&(Me?L(Le,!1):se({y:_e?10:1}),ee.preventDefault())},children:[Se,Ke]})})})})),un=t=>{let e=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,o=0,r=0;for(let i=0;i<t.length;i++){const s=t[i].getBounds();e=Math.min(s.x,e),n=Math.min(s.y,n),o=Math.max(s.x+s.width,o),r=Math.max(s.y+s.height,r)}return{x:e,y:n,width:o-e,height:r-n}},Hi=(t,e=!0)=>{const n=[],o=e?"x":"y",r=e?"y":"x",i=e?"width":"height";let s=0,a=Number.MAX_SAFE_INTEGER,d=0;for(let h=0;h<t.length;h++){const u=t[h],w=u.getBounds();s+=w[i],a=Math.min(w[o],a),d=Math.max(w[o]+w[i],d),n.push({bounds:w,movable:u})}const c=(d-a-s)/(t.length-1);n.sort((h,u)=>{const w=h.bounds[o],b=u.bounds[o];return w!==b?w-b:h.bounds[r]-u.bounds[r]});const f=new Map;f.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const u=n[h-1].bounds,w={...n[h].bounds};w[o]=u[o]+u[i]+c,n[h].bounds=w,f.set(n[h].movable,w)}return f.set(n[n.length-1].movable,n[n.length-1].bounds),f};function es(t){const{movables:e,movablesView:n,transactional:o,commands:r,target:i,onRepeatCommandChange:s,notifier:a}=t,d=Gt();l.useRef(d.getMode()).current=d.getMode();const c=X(async(v,F,E=null,S=!0)=>{const k=async()=>{const N=await Promise.resolve(a?.showBusy?.(v.label()));try{await F();const R=E??v?.label?.();if(s){let T=null;v&&R!==!1&&(T=new Ne(v.key(),i,{label:R,description:R},k)),s(T)}N?.(),S&&d.setMode(null)}catch(R){N?.(),a?.showError?.(R)}};await k()},[s,a]),[f,h]=l.useReducer(v=>v+1,0),u=X((v,F,E)=>{if(!n)return;const S=n.getMovableSelection();if(S.length===0)return;let k="Drawings";if(S.length===1){const R=S[0];k=p.TextUtils.capitalize(R.getContent().getType())??"Drawing"}const N=`${v.label()} ${k}`;c(v,()=>{let R=null;o&&(R=o.beginCommit(N));const T=n.getMovableSelection();if(T.length===0)return;const G=E?.(T);for(let O=0;O<T.length;O++){const j=T[O];F(j,G)}R?.commit()})},[n,o]),[w,b]=l.useState(n.getMovableSelection()[0]??null),[q,I]=l.useState(!w||w?.isProtected()),$=l.useMemo(()=>[new ne("moveToFront",i,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[Q.Ctrl,Q.Shift]}},function(){u(this,v=>{v.moveToFront()})}),new ne("moveForward",i,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[Q.Ctrl]}},function(){u(this,v=>{v.moveForward()})}),new ne("moveToBack",i,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[Q.Ctrl,Q.Shift]}},function(){u(this,v=>{v.moveToBack()})}),new ne("moveBackward",i,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[Q.Ctrl]}},function(){u(this,v=>{v.moveBackward()})}),new ne("toggleLockAspectRatio",i,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){u(this,v=>{v.setLockAspectRatio(!v.isLockAspectRatio())})}),new ne("formatAnchorTypeTwoCell",i,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){u(this,v=>{v.setAnchorType(p.IAnchored.Type.TwoCell)})}),new ne("formatAnchorTypeOneCell",i,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){u(this,v=>{v.setAnchorType(p.IAnchored.Type.OneCell)})}),new ne("formatAnchorTypeAbsolute",i,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){u(this,v=>{v.setAnchorType(p.IAnchored.Type.Absolute)})}),new ne("formatDrawAlignLeft",i,{label:"Align Left",description:"Align the selected drawings to the left."},function(){u(this,(v,F)=>{v.setBounds({x:F.x})},un)}),new ne("formatDrawAlignCenter",i,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){u(this,(v,F)=>{v.setBounds({x:(F.width-v.getBounds().width)/2+F.x})},un)}),new ne("formatDrawAlignRight",i,{label:"Align Right",description:"Align the selected drawings to the right."},function(){u(this,(v,F)=>{v.setBounds({x:F.width-v.getBounds().width+F.x})},un)}),new ne("formatDrawAlignTop",i,{label:"Align Top",description:"Align the selected drawings to the top."},function(){u(this,(v,F)=>{v.setBounds({y:F.y})},un)}),new ne("formatDrawAlignMiddle",i,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){u(this,(v,F)=>{v.setBounds({y:(F.height-v.getBounds().height)/2+F.y})},un)}),new ne("formatDrawAlignBottom",i,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){u(this,(v,F)=>{v.setBounds({y:F.height-v.getBounds().height+F.y})},un)}),new ne("formatDrawDistributeHorz",i,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){u(this,(v,F)=>{v.setBounds(F.get(v))},v=>Hi(v))}),new ne("formatDrawDistributeVert",i,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){u(this,(v,F)=>{v.setBounds(F.get(v))},v=>Hi(v,!1))}),new ne("formatDrawFlipHorz",i,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new ne("formatDrawFlipVert",i,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new ne("formatDrawGroup",i,{label:"Group",description:"Group the selected drawings into a single drawing."}),new ne("formatDrawUngroup",i,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new ne("formatDrawSwapShapes",i,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new ne("formatDrawSwapShapesHorz",i,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new ne("formatDrawSwapShapesVert",i,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,w]);l.useEffect(()=>{},[d]);const D=l.useMemo(()=>{let v=null;return v=r?r.createChildGroup(i,"movable",!1):new nn(i,"movable"),v.addCommands($,!0),v},[r,$]);return it(w,{onAnyChange:()=>{D.getCommand("formatAnchorTypeTwoCell").update({state:w?.getAnchorType()===p.IAnchored.Type.TwoCell}),D.getCommand("formatAnchorTypeOneCell").update({state:w?.getAnchorType()===p.IAnchored.Type.OneCell}),D.getCommand("formatAnchorTypeAbsolute").update({state:w?.getAnchorType()===p.IAnchored.Type.Absolute}),D.getCommand("formatAnchorTypeAbsolute").update({state:w?.getAnchorType()===p.IAnchored.Type.Absolute}),D.getCommand("toggleLockAspectRatio").update({state:w?.isLockAspectRatio()})},onProtectedChange:v=>{I(v.isProtected())},onDelete:()=>{}}),it(n,{onMovableSelectionChange:()=>{const v=n.getMovableSelection()[0]??null;b(v),I(!v||v.isProtected()),h()}}),it(e,{onCollectionChange:()=>{h()}}),l.useEffect(()=>{const v={disabled:q};D.getCommand("formatAnchorTypeTwoCell").update(v),D.getCommand("formatAnchorTypeOneCell").update(v),D.getCommand("formatAnchorTypeAbsolute").update(v),D.getCommand("toggleLockAspectRatio").update(v);const F=e.getCount(),E=n.getMovableSelection(),S=q||F<=1||E.length===0;let k={disabled:S},N=k;if(!S&&E.length===1){const G=E[0];G.getZIndex()===0&&(k={disabled:!0}),G.getZIndex()===F-1&&(N={disabled:!0})}D.getCommand("moveToFront").update(N),D.getCommand("moveForward").update(N),D.getCommand("moveToBack").update(k),D.getCommand("moveBackward").update(k);const R={disabled:q||E.length<=1};D.getCommand("formatDrawAlignLeft").update(R),D.getCommand("formatDrawAlignCenter").update(R),D.getCommand("formatDrawAlignRight").update(R),D.getCommand("formatDrawAlignTop").update(R),D.getCommand("formatDrawAlignMiddle").update(R),D.getCommand("formatDrawAlignBottom").update(R),D.getCommand("formatDrawFlipHorz").update(R),D.getCommand("formatDrawFlipVert").update(R),D.getCommand("formatDrawGroup").update(R),D.getCommand("formatDrawUngroup").update(R),D.getCommand("formatDrawSwapShapes").update(R),D.getCommand("formatDrawSwapShapesHorz").update(R),D.getCommand("formatDrawSwapShapesVert").update(R);const T={disabled:q||E.length<=2};D.getCommand("formatDrawDistributeHorz").update(T),D.getCommand("formatDrawDistributeVert").update(T)},[f,q,f]),D}const Rc=l.memo(l.forwardRef((t,e)=>{const{children:n,disabled:o,description:r,view:i,isDragging:s,onHide:a,onShow:d,...c}=t;l.useEffect(()=>{},[r]);const f=Ft(e,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:u,width:w}]=en();return g.jsx("div",{...c,ref:Cn([f,h]),children:g.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",border:"var(--sxl-app-color-grey, grey) solid 1px",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",filter:o?"blur(1px)":void 0,boxShadow:s?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:g.jsx("div",{style:{textAlign:"center"},children:r})})})})),Ec=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o,movableProps:r,renderMovable:i,commands:s,target:a,notifier:d,onRepeatCommandChange:c}=t,f=es({movables:o.getMovables(),movablesView:o?.getView(),transactional:o,onRepeatCommandChange:c,commands:s,target:a,notifier:d});l.useEffect(()=>{n?.getStage()},[n?.getStage()]);const h=l.useMemo(()=>g.jsx(Ql,{ref:e,view:n,movables:o.getMovables(),disableResize:!o.getProtection().isObjectsAllowed(),disableDrag:!o.getProtection().isObjectsAllowed(),movablesView:o.getView(),transactional:o,renderMovable:i,...r,onFocus:()=>{f.activate(),r?.onFocus?.()}},"movable-area"),[o,r,s,f]);return h&&n?h:null})),Tc=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o,gridStyle:r,getCellEditor:i,showProtectedError:s,setEditingCoords:a,commands:d,notifier:c=xo}=t,f=Gt(),[h,u]=l.useState(null),[w,b]=l.useState(null),[q,I]=l.useState(null),[$,D]=l.useState(null),[v,F]=l.useState(null);l.useLayoutEffect(()=>{if(q===null)return D(null),void F(null);const M=()=>{const H=o.getRange(q).getCell(),oe=H.getStyle();let ue,te=oe.getFill()?.toCSS(r.body.darkMode);te.background!=="none"&&te.background!=="transparent"||(te=o.getStyles().getNormal().getFill().toCSS(r.body.darkMode)),te.background!=="none"&&te.background!=="transparent"||(te={background:r.body.fill}),D({style:te}),H&&!H.getFormula()&&(ue=H?.getRenderHorizontalAlignment()),F(ue??Rl.Left)};return M(),o.getRange(q).addListener(()=>{M()})},[o,q,r?.body]);const E=X(()=>{let M=w.editState.dirty??"";if(w.editState.dirty!==void 0){const H=p.TextUtils.clampString(M);try{const oe=w.sheet.getRange(w.coords),ue=`Typing '${H}' into ${oe.toString()}`;return oe.setValue(M,{description:ue,autoFit:!0}),I(null),b(null),f.setMode(null),a(null),!0}catch(oe){throw c.showError(new Error(`Unable to enter '${H}'.`,{cause:oe})),oe}}},[o,w,c]),S=X(M=>o.getRange(M).getCell().getExtrusions()??ut.cellToRange(M),[o]),k=X(M=>{let H=p.IRange.Orientation.Row,oe=!1;M!==p.IRange.Direction.Up&&M!==p.IRange.Direction.Down||(H=p.IRange.Orientation.Column),M!==p.IRange.Direction.Left&&M!==p.IRange.Direction.Up||(oe=!0),o.getSelection().traverse(H,oe)},[o]),N=l.useCallback((M,H)=>{if(i)return i(M,H);if(!o)return null;const{ref:oe,...ue}=M;return g.jsx(Ul,{ref:oe,...ue,sheet:o,bodyStyle:r?.body,activeCoords:H,commands:d,onChangeEdit:te=>{const K={sheet:o,coords:H,editState:te};f.setMode(le=>({...le,description:K.editState.editMode?"Edit":"Enter",args:{...le?.args,stateAndCoords:K}}))},editState:w.editState})},[o,$,i,w,q]),{overlay:R,startEdit:T,submitEdit:G,cancelEdit:O,onKeyboardEventNative:j,onPointerEventNative:z}=ft.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:N,canEdit:()=>{const M=o.getProtection();if(M.isReadOnly())return!1;const H=M.isLocked();return H&&s(),!H},onBeforeStartEdit:M=>{const H=Wl(()=>o.getRange(M).getCell()),oe={sheet:o,coords:M,editState:Object.freeze(H)};f.setMode({key:"edit",args:{stateAndCoords:oe}}),b(oe)},onStartEdit:M=>{I(M),a(M)},onSubmitEdit:E,onCancelEdit:M=>{I(null),b(null),f.setMode(null),a(null)},onDoneEdit:M=>{f.setMode(null)},onNavigate:k,containerProps:$,borderStrokeFill:r.selection?.strokeFill,borderStrokeWidth:o?.getSelection().getCoords().ranges?.length>1?1:2,alignment:v,getRangeCoords:S});it(o.getSelection(),{onChange(M){u(o.getSelection().getCoords().cell)}});const B=X(M=>{z(M),q&&G()},[z,O,q]),Z=l.useCallback(M=>{z(M)},[z]),P=l.useCallback(M=>{j(M)},[j]);return l.useEffect(()=>{const M=n?.getStage();if(M)return M.addEventListener("pointerdown",B),M.addEventListener("dblclick",Z),M.addEventListener("keydown",P),()=>{M.removeEventListener("pointerdown",B),M.removeEventListener("dblclick",Z),M.removeEventListener("keydown",P)}},[n?.getStage()]),l.useEffect(()=>{const M=f.getMode(),H=M?.key;H==="edit"||H==="enter"?w?M.args?.cancel?O():M.args?.submit?G():b(M.args?.stateAndCoords):T(M.args?.start):q&&O()},[f]),R(n,e)})),ts="white",ns="black",Mc=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${ns}' fill='${ts}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,kc=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 13.24564,12.979958 H 5.2023009 L 7.500398,10.681861 2.3296796,5.5111425 5.7768252,2.0639969 10.947543,7.2347153 13.24564,4.9366182 Z' stroke='${ns}' fill='${ts}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,_c=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o}=t,[r,i]=l.useState(o.getTables().getCount()>0),[s,a]=l.useState(null),[d,c]=l.useState(null),[f,h]=l.useState(null),[u,w]=l.useState(null),b=X(()=>{if(o.getTables().getCount()>0){i(!0);const E=o.getTables().search({address:n.getVisibleRangeCoords()});a(E.length>0?E:null)}else i(!1),a(null)},[o,n]),q=X(E=>{E.preventDefault(),E.stopPropagation();const S=n.getCellCoordsFromClient(E.clientX,E.clientY),k=o.getTables().search({address:S});k.length===1&&k[0].select()},[n,o]),I=X(E=>{E.preventDefault(),E.stopPropagation();const S=n.getCellCoordsFromClient(E.clientX,E.clientY),k=o.getTables().search({address:S});if(k.length===1){const N=k[0].getRange().getCoords(),R={colStart:N.colStart,rowStart:S.rowIndex,colEnd:N.colEnd,rowEnd:S.rowIndex};o.getRange(R).select()}},[n,o]),$=X(()=>{if(!r)return;const E=o.getTables().search({address:n.getVisibleRangeCoords()});a(E.length>0?E:null)},[o,r,n]);it(o?.getSelection(),{onChange(E){c(o.getSelection().getCoords().cell)}}),it(f,{onAnyChange(E){b(),$()}}),it(u,{onAnyChange(E){$()}}),it(o,{onTablesChange(E){b(),$()},onInvalidated(E){b(),$()}});const D=l.useMemo(()=>Ue.debounce(Ue.throttle($,300),300),[]);l.useEffect(()=>{D()},[n]),l.useEffect(()=>{let E=null;if(s)for(let S=0;S<s.length&&!E;S++){const k=s[S],N=k.getRange().getCoords();p.CoordUtils.isCellWithinRange(d,N)&&(E=k)}h(E)},[d,s]);const v=X(E=>{let S=null;if(s)for(let k=0;k<s.length;k++){const N=s[k],R=N.getRange().getCoords();let T=n.getRangeCoordsBounds(R);const G=n.getRelativePointFromClient(E.clientX,E.clientY),O=G.x,j=G.y;if(O>=T.x&&O<=T.x+T.width&&j>=T.y&&j<=T.y+T.height){const z=n.getViewportSize();O<=0||j<=0||O>=z.width||j>=z.height||(S=N)}}w(S)},[n,s]);if(l.useEffect(()=>{const E=n?.getStage();if(E&&s)return E.addEventListener("mousemove",v),E.addEventListener("mouseleave",v),()=>{E.removeEventListener("mousemove",v),E.removeEventListener("mouseleave",v)}},[s,n?.getStage()]),!n||!s||s.length===0)return null;const F=[];for(let E=0;E<s.length;E++){const S=s[E];if(S.isClosed())continue;const k=S===u,N=S===f,R=S.getRange().getCoords(),T=n.getRangeCoordsBounds(R);let G;if(k||N){const O=S.getStyle().getProperties(),j=O.headerRow?.fill?.background??O.wholeTable?.border?.top?.color?.toString();if(j&&o){const z=o.getStyles().parseColor(j);z&&(G=z.toCSS())}G||(G="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}F.push(g.jsx("div",{style:{position:"absolute",left:T.x,top:T.y,width:Math.min(16,T.width),height:T.height,pointerEvents:"all",cursor:Mc},onMouseDown:I},`table-select-row-${S.getName()}`)),F.push(g.jsx("div",{style:{position:"absolute",left:T.x,top:T.y,width:Math.min(16,T.width),height:Math.min(16,T.height),pointerEvents:"all",cursor:kc},onMouseDown:q},`table-select-${S.getName()}`)),F.push(g.jsx(ft.Selection,{x:T.x,y:T.y,width:T.width,height:T.height,range:R,strokeWidth:N?.5:0,stroke:G??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:k?`${G} 0px 0px 1px 1px`:void 0}},`table-outline-${S.getName()}`))}return F})),Ic=l.memo(l.forwardRef((t,e)=>{const{view:n,sheet:o,animationTime:r=60}=t,[i,s]=l.useState(null),[a,d]=l.useState(null),c=l.useRef(null),f=X(()=>{const I=o.getSelectedCell(),$=I.getSpill()?.getCoords()??null;ut.isEqualRanges($,i)||(d($?{transition:i?"move":"in",bounds:n.getRangeCoordsBounds($),coords:$}:{transition:"out",bounds:n.getRangeCoordsBounds(i),coords:i}),s($))},[o,n,i]);l.useEffect(()=>(c.current&&(clearTimeout(c.current),c.current=null),a&&(c.current=setTimeout(()=>{d(null),c.current=null},r)),()=>{c.current&&(clearTimeout(c.current),c.current=null)}),[a,r]);const h=l.useMemo(()=>Ue.debounce(Ue.throttle(f,80),80),[]);if(it(o?.getSelection(),{onChange(I){h()}}),it(o,{onSpillsChange(I){f()},onInvalidated(I){f()}}),!n||!i&&!a)return null;const u=o.getRange(i).getValue()instanceof p.FormulaError.Spill,w=[];let b=a?.bounds??n.getRangeCoordsBounds(i);if(a&&!Ue.isEqualBounds(a.bounds,n.getRangeCoordsBounds(a.coords))&&d(null),b=n.toClipBounds(b,-10),!b)return;const q="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return w.push(g.jsx(ft.Selection,{x:b.x,y:b.y,width:b.width,height:b.height,range:i,strokeWidth:1,stroke:q,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:u?"6 3":void 0,opacity:a?.transition==="out"?0:1,transition:a?.transition?a.transition==="in"||a.transition==="out"?`opacity ${1.5*r}ms ease-in-out`:`left ${r}ms ease-out, top ${r}ms ease-out, width ${r}ms ease-out, height ${r}ms ease-out`:"none",boxShadow:`${q} 0px 0px 4px 0px`}},"spill-outline}")),w})),Fc={position:"absolute",top:0,left:0,bottom:0,right:0},$i=(t,e)=>{const n={...t},o=e?.getNormal().getFont(),r=o?.toCSS(),i={text:{fontFamily:r?.fontFamily,fontSize:o?.getSize()}},s=n.body=Ue.mergeContentful(t.body,i);return n.body=Ue.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},s),n.buttonSurface=Ue.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...t.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...t.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...t.selectionRemove},n.headerSelection={...n.selection,...t.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...t.headerSelectionInactive},n.header=Ue.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},t.header),n.header=Ue.mergeContentful(n.header,i),n.headerSelect=Ue.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},t.headerSelect),n.headerSelect=Ue.mergeContentful(n.headerSelect,i),n.headerSelectAll=Ue.mergeContentful(n.headerSelect,{},t.headerSelectAll),n.headerSelectAll=Ue.mergeContentful(n.headerSelectAll,i),n},Dc={fireOnModelChange:!1},Ui={},os=l.memo(l.forwardRef((t,e)=>{const{sheet:n,gridStyle:o=Ui,headersStyle:r=Ui,onSheetContextMenu:i,showColumnHeaders:s,columnHeaderProps:a,showRowHeaders:d,rowHeaderProps:c,showScrollbars:f=!0,scrollPaneProps:h,onViewportChange:u,commands:w,onRepeatCommandChange:b,onMoveCell:q,overlays:I,renderMovable:$,viewportComponent:D,onElementLoad:v,getCellEditor:F,onFocus:E,onBlur:S,style:k=Qe.EmptyCssProperties,notifier:N,onShowTooltip:R,onShowColumnTooltip:T,onShowRowTooltip:G,onCloseTooltip:O,gridProps:j,cellRenderProps:z,...B}=t;if(l.useEffect(()=>{p.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[Z,P]=l.useReducer(re=>re+1,0),[M,{width:H,height:oe}]=en(),ue=X(R,[R]),te=X(T,[T]),K=X(G,[G]),le=X(O,[O]),Re=l.useRef(!1);l.useLayoutEffect(()=>{Re.current=!0},[n]);const Te=n?.getStyles(),ae=l.useMemo(()=>$i(o,Te),[o,Te]),Fe=l.useMemo(()=>$i(r,Te),[r,Te]),{body:me={},buttonSurface:Oe={}}=ae,{header:xe={},headerSelect:ge={},headerSelectAll:fe={}}=Fe,Se=l.useRef(null),[pe,Ce]=l.useState(()=>n?.getView()),Ae=(pe?.getZoomScale()??100)/100,ye=l.useMemo(()=>({vertical:pe.isShowColumnGridlines()&&Ae>=.4,horizontal:pe.isShowRowGridlines()&&Ae>=.4}),[pe?.isShowColumnGridlines(),pe?.isShowRowGridlines(),Ae]),De=l.useMemo(()=>{if(pe?.getGridLineColor())return{strokeDasharray:"1,1"}},[pe?.getGridLineColor(),ae]),Pe=s??pe?.isShowColumnHeaders(),$e=d??pe?.isShowRowHeaders(),[C,We]=l.useState({width:0,height:0}),nt=l.useMemo(()=>{let re=40,Ee=20;const ke=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ge=ke?.toCSS()?.fontFamily??ae.header.text.fontFamily,Je=ke?.getSize()??ae.header.text.fontSize,rt=p.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Je*p.IFont.getDeviceScale()),Ge);re=rt.width,Ee=rt.lineHeight}return{width:Math.round(re+5),height:Math.round(Ee+3)}},[C,ae?.header.text,n]),Ke=$e?Ae*nt.width:xe.edgeStrokeWidth,ee=Pe?Ae*nt.height:xe.edgeStrokeWidth,_e=Math.max(H,(n?.getColumnHeaders().getDefaultSize()??nt.width)+Ke+1),Ve=Math.max(oe,(n?.getRowHeaders().getDefaultSize()??nt.height)+ee+1),Me=l.useRef(new Map),Le=l.useRef(null),Ie=()=>({getColOffset:re=>n.getColumnHeaders().findOffset(re),getColIndex:re=>n.getColumnHeaders().findIndex(re),getRowOffset:re=>n.getRowHeaders().findOffset(re),getRowIndex:re=>n.getRowHeaders().findIndex(re)}),[L,se]=l.useState(()=>Ie()),[U,J]=l.useState(!1),[m,_]=l.useState(null),A=!0,x=ae.selection?.strokeFill,V=l.useCallback(()=>jt.current,[]),[y,W]=l.useState(),Y=X(re=>{W(re),n&&n.getView()&&n.getView().setTopLeft(re?{left:re.left,top:re.top}:null),u?.(re)},[n,u]),ie=l.useRef(null);l.useEffect(()=>{if(!y||!n)return;const re=n.getRangeAtBounds({x:y.left,y:y.top,width:y.width,height:y.height});ie.current?.(),ie.current=re.addListener(()=>{const Ee=re.getCoords();Se?.current?.invalidate(Ee)})},[y,n]);const[de,ce]=l.useState(()=>n?.getView().getTopLeft()),he=X(re=>{const Ee=ut.cellToRange(re);if(n.isClosed())return Ee;const ke=n.getRange(Ee,{excludeHidden:!0}).getMerges();return ke.length===0?Ee:ke[0]},[n]),be=re=>{if(!re||re.coords.colIndex===0&&re.coords.rowIndex===0)return null;const Ee={};return re.coords.colIndex>0&&(Ee[ct.Left]={index:re.coords.colIndex,scrollOffset:re.topLeft.left}),re.coords.rowIndex>0&&(Ee[ct.Top]={index:re.coords.rowIndex,scrollOffset:re.topLeft.top}),Ee},[ve,we]=l.useState(()=>be(n.getView().getFreezePanes())),qe=Gt(),Be=l.useCallback(()=>Se.current,[]),ze=X(re=>{qe.setMode(Ee=>Ee?.key==="edit"?{...Ee,args:{...Ee.args}}:{key:"edit",args:{stateAndCoords:null,start:re}})},[]),Ze=X(()=>y,[y]),He=Xl({sheet:n,commands:w,target:Be,onRepeatCommandChange:b,bodyStyle:me,notifier:N,onStartEdit:ze,getViewport:Ze}),[Ye,je]=l.useState(n.getSelection().isEntire()),[et,ht]=l.useState(pe?.getMovableSelection().length>0),Et=m!==null||et,Dt=null,[Xe,at]=l.useState(!1);l.useEffect(()=>{at(!1)},[n.getProtection()]);const Tt=X(()=>{Xe||(at(!0),N.showMessage?.(g.jsxs("span",{children:["This sheet is protected.",g.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:bn.Error}))},[N,Xe]),_t=l.useMemo(()=>{const re=qe.getMode();return re?.cursor?re.cursor:null},[Dt,qe]),[Mt,yt]=l.useState(null),dt=l.useRef(!1),[Bt,on]=l.useState([]),Rn=l.useRef(null),[Kt,En]=l.useState(Vn.EmptyTopLeft),[Nt,Qn]=l.useState(Vn.EmptyTopLeft);l.useEffect(()=>{En({left:de?.left,top:0})},[de?.left]),l.useEffect(()=>{Qn({left:0,top:de?.top})},[de?.top]),it(n?.getView(),{onFreezeSplitChange:()=>{we(be(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ce(n.getView().getTopLeft())},onMovableSelectionChange:()=>{ht(n.getView().getMovableSelection().length>0)}}),it(n?.getSelection(),{onChange:()=>{je(n.getSelection().isEntire())}}),it(n,{onViewChange(){Ce(n.getView()),se(Ie())},onLayoutChange:()=>{const re=n.getEntireRange();We({height:re.getRowCount(),width:re.getColumnCount()}),se(Ie())},onStyleChange:()=>{Zt()},onMovablesChange:()=>{},onInvalidated:()=>{Zt()}}),it(n,{onRequestScrollIntoView:async(re,Ee)=>{if(!Ee)return;const ke={colIndex:Ee?.coords.colStart,rowIndex:Ee?.coords.rowStart};return await Se.current?.scrollCellCoordsIntoView(ke,Ee?.scroll),!0},onRequestFocus:()=>Ue.whenFocus(jt.current)},Dc);const eo=l.useMemo(()=>{const re=(ke,Ge)=>{dt.current=!0,yt([Je=>{if(!Je.toClipBounds(Je.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:ke,colEnd:ke})))return;const rt=Je.getLayout(),st=Math.max(0,rt.getColOffset(ke)),ot=Je.getBounds(),mt=Math.min(ot.x+ot.width,rt.getColOffset(ke+1)),xt=Je.getAnchor();if(Ge!==null&&(xt===ct.Left||xt===ct.Center||xt===ct.Right)){const Uo=Ue.roundAccurately(Ge*Ue.getDPI(),0),io=Ue.roundAccurately(n?.getColumnWidthAsFontUnit(Ge/Ae),2).toFixed(2),Wo="Width: "+(Ge?io+" ("+Uo+" pixels)":"Hidden"),Fn=an.current.getGridElement().getRelativePointFromClient(0,0),cn=0-Fn.y,lo=0-Fn.y+ee,Go={x:st-(Fn.x-ot.x),y:cn,width:mt-st,height:lo-cn};requestAnimationFrame(()=>{dt.current&&te?.({anchor:Go,display:Wo})})}const Vt=[0,0,0,ot.height],In={style:{boxShadow:`0.5px 0px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},Vo={x:st-1,y:0,width:1,height:ot.height},Ho={style:{boxShadow:`-0.5px 0px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},$o={x:mt-1,y:0,width:1,height:ot.height};return g.jsxs(l.Fragment,{children:[g.jsx(ft.SVGLine,{linePoints:Vt,bounds:Vo,...In}),g.jsx(ft.SVGLine,{linePoints:Vt,bounds:$o,...Ho})]},"resize-dividers")}])};let Ee=null;return{onResizeHeadersStart:(ke,Ge,Je)=>{Ee=n.beginCommit(Je),re(ke,Ge)},onResizeHeaders:(ke,Ge,Je)=>{re(ke,Ge)},onResizeHeadersDown:(ke,Ge)=>{re(ke,Ge)},onResizeHeadersEnd:(ke,Ge,Je)=>{Ee?.commit({description:Je}),Ee=null,requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},...a}},[n,a,ee,Mt]),rn=l.useMemo(()=>{const re=(ke,Ge)=>{dt.current=!0,yt([Je=>{if(!Je.toClipBounds(Je.getRangeCoordsBounds({rowStart:ke,rowEnd:ke,colStart:0,colEnd:C.width})))return;const rt=Je.getLayout(),st=Math.max(0,rt.getRowOffset(ke)),ot=Je.getBounds(),mt=Math.min(ot.y+ot.height,rt.getRowOffset(ke+1)),xt=Je.getAnchor();if(Ge!==null&&(xt===ct.Top||xt===ct.Center||xt===ct.Bottom)){const Uo=Math.floor(10*Ue.getDPI())/10,io=Ue.roundAccurately(Ge*Uo,0),Wo=Ue.roundAccurately(io/Ae/(n?.getRowHeaders().getScaleFactor()*Ue.getDPI()),2).toFixed(2),Fn="Height: "+(Ge?Wo+" ("+io+" pixels)":"Hidden"),cn=_n.current.getGridElement().getRelativePointFromClient(0,0),lo=0-cn.x,Go=0-cn.x+Ke,Vs={x:lo,y:st-(cn.y-ot.y),width:Go-lo,height:mt-st};requestAnimationFrame(()=>{dt.current&&K?.({anchor:Vs,display:Fn})})}const Vt=[0,0,ot.width,0],In={style:{boxShadow:`0px 0.5px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},Vo={x:0,y:st-1,width:ot.width,height:1},Ho={style:{boxShadow:`0px -0.5px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:x}},$o={x:0,y:mt-1,width:ot.width,height:1};return g.jsxs(l.Fragment,{children:[g.jsx(ft.SVGLine,{linePoints:Vt,bounds:Vo,...In}),g.jsx(ft.SVGLine,{linePoints:Vt,bounds:$o,...Ho})]},"resize-dividers")}])};let Ee=null;return{onResizeHeadersStart:(ke,Ge,Je)=>{Ee=n.beginCommit(Je),re(ke,Ge)},onResizeHeaders:(ke,Ge,Je)=>{re(ke,Ge)},onResizeHeadersDown:(ke,Ge)=>{re(ke,Ge)},onResizeHeadersEnd:(ke,Ge,Je)=>{Ee?.commit({description:Je}),Ee=null,requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},onResizeHeadersUp:ke=>{requestAnimationFrame(()=>le?.()),dt.current=!1,yt(null)},...c}},[n,c,Ke]),jt=Ft(e,()=>{const re=ke=>{n?.getView()&&n.getView().selectMovables([]),Le.current=null,Se?.current?.focus(ke)},Ee=async(ke=null)=>{if(ke||(ke=n?.getView().getMovableSelection()[0]),!ke)return!1;const Ge=ke.getAnchorCoords();if(!Ge)return!1;const Je=Se.current?.getViewFromCellCoords({colIndex:Ge.colStart,rowIndex:Ge.rowStart});if(!Je)return!1;const rt=Je.getAnchor();n?.getView().getMovableSelection().indexOf(ke)===-1&&n?.getView().selectMovables([ke]);let st=Me.current?.get(rt);return st?.current?(await st.current.focusMovable(ke),!0):(Le.current={movable:ke,anchor:rt},!0)};return{getGridElement:()=>Se.current,getRowHeaderElement:()=>_n.current,getColumnHeaderElement:()=>an.current,rowHeaderHeight:()=>ee,colHeaderWidth:()=>Ke,startEdit:ze,submitEdit:()=>{qe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{qe.setMode(ke=>ke?.key!=="edit"?ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:m!==null,focus:ke=>{n?.getView().getMovableSelection().length>0&&Ee()||re(ke)},focusSheet:re,focusMovable:Ee,contains:ke=>Se?.current?.contains?.(ke),invalidate:Zt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Zt=l.useCallback(re=>{Re.current||(Se?.current?.invalidate(re),P?.())},[]);l.useEffect(()=>{Zt()},[ae]);const Tn=Ye?fe.edgeStrokeFill:xe.fill,Oo=Ye?ge.fill:typeof ae.headerHover=="function"?ae.headerHover(xe)?.fill:xe.fill,lt=l.useMemo(()=>D?g.jsx("div",{className:kt("sheetxl-viewport-overlay",oc),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:D}):g.jsx(g.Fragment,{}),[D]);let Mn=null;Pe&&$e&&(Mn=g.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${ee}px`,width:`${Ke}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:re=>{let Ee=!re.ctrlKey;He?.getCommand("selectAll")?.execute(!Ee||re.button!==0),re.nativeEvent.which===_r.Right?i?.({originalEvent:re,clientX:re.clientX,clientY:re.clientY,rowIndex:-1,colIndex:-1}):Se.current?.focus()},children:[g.jsx("div",{style:{height:ee-5+"px",width:ee-5+"px",clipPath:`path('M${ee-5} 0 L0 ${ee-5} L${ee-5} ${ee-5} L${ee-5} 0 Z')`,borderRight:`2px solid ${Tn}`,borderBottom:`2px solid ${Tn}`,background:`${Oo}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),g.jsx("div",{style:{position:"absolute",height:`${ee}px`,width:`${Ke}px`,boxSizing:"border-box",borderRight:`solid 1px ${xe.strokeFill}`,borderBottom:`solid 1px ${xe.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const ln=X(({_left:re,_top:Ee})=>{},[]),to=X(re=>{if(!i)return;const Ee=Se.current.getViewFromClient(re.clientX,re.clientY)?.getCellCoordsFromClient(re.clientX,re.clientY);Ee&&(i({originalEvent:re,clientX:re.clientX,clientY:re.clientY,rowIndex:Ee.rowIndex,colIndex:Ee.colIndex}),re.stopPropagation(),re.preventDefault())},[i]),gt=X(re=>{if(!(!re.shiftKey&&(re.ctrlKey||re.metaKey)))return;const{deltaY:Ee}=re;return Ee>0?He.getCommand("sheetZoomOut")?.execute():Ee<0&&He.getCommand("sheetZoomIn")?.execute(),Ee===0},[He]);l.useEffect(()=>{on(null),Rn.current=null,dt.current=!1,yt(null);const re=n?.getView().getTopLeft();ln(re),Se.current?.scrollTo(re),ce(re),Ce(n.getView()),we(be(n.getView().getFreezePanes())),se(Ie()),P()},[n?.getView()]);const bt=X(re=>{const Ee=re.getVisibleRangeCoords();if(!Ee)return null;const ke=[];return n.getRange(Ee).forEach((Ge,Je)=>{const rt=Je.getCoords(),st=Je.getCell();(ot=>{if(ot.isEmpty())return!1;const mt=ot.getSpans();if(mt.width>1||mt.height>1||ot.getStyle().hasVisibleStyling()||pe.isShowFormulas()&&ot.getFormula()!==null)return!0;const xt=ot.getValue();return xt!==null&&!(!pe.isShowZeros()&&xt===0&&ot.getType()===p.ScalarType.Number)})(st)&&ke.push({coords:rt,value:st,range:pe.isShowFormulas()?null:st.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),ke},[n,pe.isShowZeros(),pe.isShowFormulas(),m]);l.useEffect(()=>{const re=[];I&&re.push(...I),Mt&&re.push(...Mt),Ue.isEqualArrays(re,Rn.current)||(Rn.current=re,on(re))},[I,Mt,ae]);const kn=l.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${o?.body?.fill}`},pathProps:{stroke:o?.body?.text?.fill??"black"}}),[ae?.header?.edgeStrokeFill]),no=X(re=>{re.isDefaultPrevented()||re.isPropagationStopped()||(Le.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),sn=l.useMemo(()=>{const re=qe.getMode();return re?.key==="cut"||re?.key==="copy"},[qe]),jo=X(async re=>{const Ee=qe.getMode();return re.keyCode===St.Escape&&Ee?(re.preventDefault(),void qe.setMode(null)):re.keyCode===St.Enter&&sn?(re.preventDefault(),await He?.getCommand("paste")?.execute(),void qe.setMode(null)):void He?.dispatchToFocusedCommand(re)},[He,qe]),_n=l.useRef(null),oo=l.useMemo(()=>g.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${Ke+xe.edgeStrokeWidth}px`,minWidth:`${Ke+xe.edgeStrokeWidth}px`,borderRight:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2"},children:g.jsx(Bi,{ref:_n,sheetElement:jt.current,gridRef:Se,freezeStart:ve?.[ct.Top],oppositeSize:Ke,containerWidth:Ke,containerHeight:Ve,sheetHeader:n.getRowHeaders(),gridStyle:Fe,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Nt,onSheetContextMenu:i,tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${Ke+xe.edgeStrokeWidth}px`,minWidth:`${Ke+xe.edgeStrokeWidth}px`,borderRight:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2",...rn?.style},...rn})}),[Ke,ee,Ve,n,Nt,ve?.[ct.Top],ae,A,i,xe.fill,c]),an=l.useRef(null),ro=l.useMemo(()=>g.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${ee+xe.edgeStrokeWidth}px`,minHeight:`${ee+xe.edgeStrokeWidth}px`,borderBottom:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:g.jsx(Bi,{ref:an,sheetElement:jt.current,gridRef:Se,freezeStart:ve?.[ct.Left],oppositeSize:ee,containerWidth:_e,containerHeight:ee,sheetHeader:n.getColumnHeaders(),gridStyle:Fe,scrollPoint:Kt,onSheetContextMenu:i,...eo,style:{...eo?.style,position:"relative",left:"0px",width:"100%",height:`${ee+xe.edgeStrokeWidth}px`,minHeight:`${ee+xe.edgeStrokeWidth}px`,borderBottom:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[ee,_e,n,Kt,ve?.[ct.Left],ae,xe.fill,A,i,a]),zs=X(re=>{const{value:Ee,key:ke,...Ge}=re;let Je=Ee,rt=m;if(!rt||rt.colIndex===re.coords.colIndex&&rt.rowIndex===re.coords.rowIndex||(rt=null),!Je){const mt=re.range;if(Je=n.getRange({rowIndex:mt.rowStart,colIndex:mt.colStart}).getCell(),Je.isEmpty())return null}let st=null;Je.getHyperlink()&&(st=async mt=>{if(z?.onLinkMouseDown?.(mt),mt.button===0&&!mt.isDefaultPrevented()){mt.stopPropagation(),mt.preventDefault();try{await Je.getHyperlink()?.open()}catch(xt){N?.showError?.(xt)}}}),rt&&rt.colIndex===re.range.colStart&&rt.rowIndex===re.range.rowStart&&(Je=Je.createTemporaryCell({value:null}));const ot=n.getStyles();return l.createElement($l,{...Ge,key:ke,bodyStyle:me,docTheme:ot.getTheme(),normalStyle:ot.getNormal(),showFormulas:pe.isShowFormulas(),showZeros:pe.isShowZeros(),onLinkMouseDown:st,...z,value:Je})},[n,L,me,m,pe?.isShowFormulas(),pe.isShowZeros()]),Os=l.useCallback((re,Ee)=>{const{key:ke,...Ge}=re;return[g.jsx(lc,{ref:Ee,getVisibleCells:bt,sheet:n,gridStyle:ae,...Ge},`border-${ke}`),g.jsx(_c,{ref:Ee,sheet:n,commands:He,...Ge},`table-${ke}`),g.jsx(Ic,{ref:Ee,sheet:n,...Ge},`spill-${ke}`),g.jsx(xc,{ref:Ee,sheet:n,commands:He,notifier:N,onShowTooltip:ue,onCloseTooltip:le,gridStyle:ae,gridRef:Se,editingCoords:m,isActive:A,...Ge},`selection-${ke}`),g.jsx(mc,{ref:Ee,sheet:n,commands:He,gridStyle:ae,element:V,notifier:N,...Ge},`copy-paste-${ke}`),g.jsx(Ec,{ref:Ee,sheet:n,commands:He,target:Be,notifier:N,renderMovable:$,movableProps:{onUnFocus:()=>{jt.current.focus()}},...Ge},`movable-${ke}`),g.jsx(Tc,{ref:Ee,sheet:n,commands:He,notifier:N,gridStyle:ae,getCellEditor:F,showProtectedError:Tt,setEditingCoords:_,...Ge},`editor-${ke}`)]},[n,Se.current,ae,F,He,N]),[Zr,js]=l.useState(!1),Ns=l.useMemo(()=>{if(_e===0||Ve===0)return null;const re=n.getStyles().getNormal(),Ee=re.getFont(),ke=re.getFill(),Ge=re.getBorder(),Je=re.getFill().getType()===p.IFill.Type.None;let rt=De,st=De;const ot=(xt,Vt,In)=>In?{stroke:Ge.getBottom().isNone()?"none":xt.getColor().toRGBA(me.darkMode).toString(),...Vt}:Vt;st=ot(Ge.getBottom(),st,!Ge.getBottom().isNone()),st=ot(Ge.getTop(),st,!Ge.getTop().isNone()),rt=ot(Ge.getRight(),rt,!Ge.getRight().isNone()),rt=ot(Ge.getLeft(),rt,!Ge.getLeft().isNone());let mt=pe?.getGridLineColor()?.toRGBA(me.darkMode).toString()??me.strokeFill;return Je||(st=ot(Ge.getBottom(),st,!0),st=ot(Ge.getTop(),st,!0),rt=ot(Ge.getRight(),rt,!0),rt=ot(Ge.getLeft(),rt,!0)),g.jsx(ft.Grid,{className:"sheetxl-sheet-primary",style:{...Fc,...ke.toCSS(me.darkMode),...Ee.toCSS(me.darkMode,Ae),"--sxl-app-color-background":me.fill,"--sxl-app-color-shadow":ae.colorShadow,"--sxl-app-color-grey":ae.colorGrey,"--sxl-app-color-button-fill":Oe.fill,"--sxl-app-color-button-text":Oe.text?.fill,"--sxl-app-color-button-border":Oe.edgeStrokeFill,"--sxl-app-color-primary-dark":ae.selection.strokeFill},ref:Se,zoom:Ae,...j,onFirstRender:xt=>{js(!0),j?.onFirstRender?.(xt),He?.activate()},showGridLines:ye,gridLineColor:mt,gridLineColumnsProps:rt,gridLineRowsProps:st,freezeLeft:ve?.[ct.Left],freezeLeftProps:kn,freezeTop:ve?.[ct.Top],freezeTopProps:kn,width:_e,height:Ve,columnCount:C.width,rowCount:C.height,cursor:_t??Dt??"cell",clipCells:!0,layout:L,cellRenderer:zs,overlayRenderer:Os,getCellCoordsAsRangeCoords:he,getVisibleCells:bt,onWheelScroll:gt,onPointerDown:no,onKeyDown:jo,onViewportChange:Y,onImmediateScroll:ln,scrollPoint:de,stageProps:{onFocus:()=>{He?.activate()}},overlays:Bt})},[Z]);l.useEffect(()=>{Re.current||P()},[L,ve,Ae,He,de?.left,de?.top,me,j,_e,Ve,_t,Bt,A,Dt]);let No={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};f||(No={...No,...k});const Ps=l.useMemo(()=>{const re=n.getStyles().getTheme(),Ee=re.getColorScheme(),ke=re.getFontScheme();return{"--sxl-doc-color-dk1":Ee.getDk1().toCSS(me.darkMode),"--sxl-doc-color-dk2":Ee.getDk2().toCSS(me.darkMode),"--sxl-doc-color-lt1":Ee.getLt1().toCSS(me.darkMode),"--sxl-doc-color-lt2":Ee.getLt2().toCSS(me.darkMode),"--sxl-doc-color-accent1":Ee.getAccent1().toCSS(me.darkMode),"--sxl-doc-color-accent2":Ee.getAccent2().toCSS(me.darkMode),"--sxl-doc-color-accent3":Ee.getAccent3().toCSS(me.darkMode),"--sxl-doc-color-accent4":Ee.getAccent4().toCSS(me.darkMode),"--sxl-doc-color-accent5":Ee.getAccent5().toCSS(me.darkMode),"--sxl-doc-color-accent6":Ee.getAccent6().toCSS(me.darkMode),"--sxl-doc-color-hlink":Ee.getHlink().toCSS(me.darkMode),"--sxl-doc-color-fol-hlink":Ee.getFolHlink().toCSS(me.darkMode),"--sxl-doc-font-major":ke.getMajorFont(),"--sxl-doc-font-minor":ke.getMinorFont()}},[n.getStyles().getTheme()]);let Po=g.jsx("div",{style:No,onTouchStart:()=>{Yr()},onFocus:re=>{J(!0),E?.(re)},onBlur:re=>{J(!1),S?.(re)},ref:jt,...B,children:g.jsx("div",{className:kt("sheetxl-sheet",nc),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...Ps},children:g.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Mn,oo,g.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[ro,g.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${xe.edgeStrokeWidth}px ${xe.edgeStrokeFill}`,backgroundColor:me.fill},ref:M,onContextMenu:to,children:[Ns,lt,g.jsx(rc,{style:{position:"absolute",right:24,bottom:4},colorLicensee:ae?.selection?.strokeFill,colorCredits:ae?.body?.text?.fill})]})]})]})})});if(f){const re=Ee=>g.jsx(Pr,{...Ee,sheet:n});Po=g.jsx(Ar,{style:{flex:"1 1 100%",overflow:"hidden",background:`${xe.fill}`,minHeight:2*nt.height,minWidth:2*nt.width,...k},viewport:y,touchElement:Se.current?.stage,disableTouch:Et,onScrollViewport:Ee=>{Se.current?.scrollTo(Ee)},createHorizontalScrollbar:re,createVerticalScrollbar:re,...h,children:Po})}l.useEffect(()=>{Re.current=!1,P?.(),U&&jt.current?.focus()},[n]);const[Bo,Bs]=l.useState(!1),Yr=X(()=>{Bo||Bs(!0)},[Bo]);return l.useEffect(()=>{if(Zr)return typeof v=="function"&&v(),Qe.detectIt().primaryInput==="touch"&&Yr(),()=>{}},[v,Zr,Bo]),Po}));os.displayName="SheetElement";const Ac=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Wi="data:image/webp;base64,UklGRhIPAABXRUJQVlA4TAYPAAAv/8F/EM8HIZJtWU0fdlTh3wRCIMlkE+EqkiTFyt57/KQ8/zKeEf5iaseNJClS1DGDxWcwvhfuCo5tW88SHw8Xh5ypbC3tnf8QHEfOB/D97w4PuFHBIx6MHJ74zvj/0aLdlH9AYWEjHiwOJR5M7Q+FAigmTRQOJRqczrVUKABQSMYgoAFFAhIwBkgaYEkBSABowDGgcYakUZirArQhRMUIIHGLBIAEEoDRfyokIAEAMhrSRmEOSPyS/jvR+BYFIWkUhLQhCpLGGQ2rhPiCOKPxDIVQmAZQDMYIjCTfNQXVJv8pnQqhuAonnczGDPv0VwFw/w+uGiAwQYjJXxffaJzROKPHoArGAPA+6o9AtiIj4XgAWGKCwAQBVNMSHQNEjTMqOSWPQEFRHOVl4vp/nnhI/DBNK8CGXCpeFvONip/jvPn67qb957v+Nssyv96/Jwg/xzT9yORhfR4fb6vF9ef39Nt62g55v37/7dRzfx9xFLRtIyX8ae+/AxARE8APxbCQtkidoqVGDBDxR3r8/59vo88vnW07v9nrY+l0tn0zemuSnn03W83Otn2zcarbfIrZqnG7Ykr77/nS5PP+/E6/iP7DgiRJiZX13F2QhYM/OrBtm7at/ZB927Zt27ZtPr/oK7Jt27b9x7dtGxcv1sFcc/R1woj+S2IkSZGkaXMpD2sZhqf3R5Y/23+2/2z/2f6z/Wf7z/af7T/bf7b/bP/97S8/r8tpn2+Rafa98ufeMc3nfK8v3V9QZHWVtFs5f/i2z8bd7+E/nX/Vuk9+uO6dF3IuWEy12r0S9eGUdA5q0RtuvnxxXpUFVPf5eQlfe7jG8j58Q6+uZZZNRGmv+GgOidbMMHMMy/WbJu7az/wcUqUk9C01LJNj5tZsDsnuizfPWh/F3WdN4FDO/eiYow4LozJuhpfDoPtcywyr8pAYDpv2RlmOB1TF7fBymPXAqA4Wwskrp3JY9oVZZA2efmm8m8O2Xa796tcoMprDvA2DAprXfkYWC9C0eflat2xrBgtRrKuDwgXemsKS5I6vr2zVzq9ZnLbUUzSHL5lFast+JTPi1rJUZWzN1bBuSSxZ7pvqaFfeVpYub2QtzaqI3McCtsppqPXPTWc0C9kjB3TqyFcsZ54b8/XpXJSHRW23qU1LJrC4PdFRlWsMzWCJ815ZpUYDU1no7mqiQ7VvYbnz9zIUaOkqFr3tZ7XnfKSHhe/+ON3pNJblL8N1QXEG+xlCXzXXmvKZjKJYn9IWKV7POMqIqlaYVtEMpU0l6lq46Eo3g2lvO2WtRPoB48m/SFXjwt3JiMqYp6eJkHWTGVQ3BZSky30Mq0/KVMTnZ2BN6aggV2UwtPa0UI+rGV1pylkm1RjB+IpZqpoxRG5ghGW/oZjr9xlj+xarZSiBBEaZe5BSxhK4jXHmeVElj/2Bkeb2KeQVzWKs7eumDnMZbemtlGEU4236UVUYyojb3UATK5Yx5lY30sOqRVlBn3YPdqKCgrexZ7SwcknQP13bfjWC6nD1XEcreHs8QgXOTg369bDmlxFQNU28mRpwYUMNXDcTQVXC2woYTOo2DrJxk1+ZQ9/9PIeNprjRs72ij4H2wbdZjdzdTDYizUXG9P3gnfZGDVy3gFMxD5ZBN9U7BWoJpoK2OpBvHvbYArWBUlFDgXu8QG2BVJanG2xLxC/UckNZZ6Om5VZmnd1NQfvtrRJzByPGXHr8ohqyn/eOr0MIZXAJZFvF1zGAUvC0AuzT+LpgXxJ7K/BuK/jA8LpiXhpPwZ3dcFN4XbIukUVgnVR01Y4WhVi19KLTC6Ca/vD4uevReM40PgHVY9GFMC2bHkAtG10Qy9K5rzHOLQkcGVwYwxJ6H+fspuAC2ZVSG5Rbjg0ulFk5Ta2FcUHTvcqtGrCo7aqZFo2EaK3oOXi0mpOO+xoinOB8cGgF2JTYrQC9EFoRJqV2Gp6Z3oisEItymxKBbniR+yIrxqDsBoCzUGQFpS+93fnYNiO4Z6FVwxc1WjXpotdCc0HoXHRMPucfY0qQTXJ6L+jqGCY0EzekcaOm+LY/g4PSCGCuirwgDtJ4dePy/uCvg2tJ8wNkhDzmObBsJDkhj7OagtL3rrwAhX84mnWiv8Yz+M/IXgyZHTFNc3jZ7dLYfSNo5uA2EpLzJT/c8b1liOY47CtHKOEfj+xcyRJ2vCqAx0MyRR2zE88uwr4hV9RxkoHGeIDv93Cf8aVotiT/uiTb0X+uKfFgnCw5Y473FWJxu7whx/wull0JkMwhx5MMJJ6UPeKYjyCZ43iw/BHHTwOxtAQAOPafwGEExem+vKd794bhxzckhNFvDgGbYbhCgoAbe46jcKsw0MbcH4Qv3hAH2vgOHIsbg4CNPScxuFcoWGPuhWFX8WnO/gt7hufPIVhSEstIOjN7ChF4WDhIY34RwcqGb4uHWfjnPZwmAQGN73PI7xkh4Yy5nvzuFhPOeKj4OkhQsqeJF9qz0DXAWB45sBFU7K6QXoKENTLOzPyC9PYIDGR8sfBOscikTwfzHp3MJlOPcujyB2TnYjiEMbeUfn0jOoRxP9GVeRgPYPyk6FqH3AaAUh5ZkOL4hpC/XLOim8/yXQ3yxXxWck9o4gb3h85/inFrhLfLQf3iIZIPNfmWLFQvniG4DyUPtYvHij7V0UXl4uxqua0vG3WLOUduNxjdELBn98vm8Jroy5z5jCSzJpY9m/CWnF43NYtvlHu8CclKxeJPxDabzNQrfkBsZ8pNteLMCKmdIDu1irmj1LaRn1rFraT2oAxVKh4oNcuHj7aRx9FNhof3pPaq5Djyzsi2RD3sDXmCSAejD/wqmeIM3y7JzS1b9YkfkfpAIchXdeI1Yu9ZqrHaxNOFdqGcVSbmgMyW974v2DmPb3A+lMhsbcl6rMrMXCCz9WSuKnFDmW0gdzWJc2S2suxVJO4s9YiT/uoRt5TZ1gJQjbitzMaJQC3iFVJfqhAElYiX6M3VCQ7FijMOokpYIfSTMFQLbYV+QQhlobUXtDJB9dBZ6OnOAFVEjtDznfyribpCz3e2ryoKLP9yJ4Uyu9x+rsmYUS2zS7yrjDSpjwuidbXxtdCmda46NghtGuPq4yOphx071LYKeZ+E7hXXamTk37XjTjzo+gqq0ThI7L2Nq9X7Z7Gexp1aq1ofnovVNO7cmfX67FyspXEnP/P74qxa1uho3Omrm6ZePpF73PkPzL41q5gbSOzu8PrOvGbek9uoXvF2Z1bKbQOvd8yajU3kdpHRx+W6yY4QfGfjfT4tV87dJLfBD1y+Kqudm0jwjjX5orx6+ol+ISM9viernxV/5+53wqw94f3OSCHJ/XII3Z/23S+tgPeHH5DovQgYoAWye5ovQkdldwpehNIDspuOLkSPkfDdCXaXo+7Pdj8G87pGemPRgnRI/Eua2/Pd78zMMvH3OhxtZhw/I/G7AytM78lvS6o4lQI4YuRQcbofwH5n//w6UqDeJwDtSBSpNyEcXSigSHkgHIqUqXq6x53xGUFoV56ZdHwZg41hYuU5jsF0b6AE6zEC0fEk0RqAwpIg0XKXwDiC6G9ghGsLwWgXolUZFzVxWAxjph3TgRyLsuFHIATsfQLS1gQRWw7laOMARGyyQUi61z5k/QiKRd1Dtq8Qi79e847ZDst/3Al+ROO7N6xn5HGtQWh62DdqiwiOWWyjtipAeLrXNGzvQjq40J5hu/ccIoPvOcbtUlBnFMF8VdZFswowGX6U4Yl+2KOLQHWiW+D2NUPl5/29Ijcb2NEGtYqc/ySw0wlzV2+038muI2AtFXWS2zCsewq3gsl+ZytEZnC/Xmi/011M0FpQYSPW/QRcwWC/80WfA3fcCXdOr2+ElFz+/U74CoFrnkPjFCy97I2tInRdo9T6RkgGku93yrYEz68HZdY3QrKQungC2DoKVCQTifM3g3g6yfboZfY76zCC2CeKHAvMNmPW/U47vogw9kKo4KzkLGMFzONOfFSo0Myk3O3A3xLMLlKowOxk3O/MtQlnj8QKy1C+/U69koCa6/BYQVnK1kcEtUV6kP1OvqsRVkOuV+wYMpuOqfY7ew8C26/7B+s6Y4maQXC7VMG6zFqaHigmvK0aravMZfm5E7SFfMJhdo/WRfZy/NwZ5hHk5vkgWscByNAj1YS5CxStwxCUb3dTQt2T4ToKQvGfO0kbgu3f28J1EIbCP3eWKwl40x8Yrm0ginaLQcg79ZCgX7UJRcEmnSPsncBBv2oZjGLF5sA/70y3oj/vTIcVcIpRHw3+nS1mnLHIzH1JAdV+MPhXk4WkRC5SQU1Sg3711QgJSnwfRWjhFPPuQ33e2b4oIi30WgZDblUd0kPzIbsvhzTRMMCm1yNddClc3iPqOO+ULrD2HSJ15EiEyr2YFFJVPFCeHqSSAh/gvPsZtZx32ptQPkd3xZx24NkYX1EbIsVczQUotivppivhSW1J2undDHDzGhqQfno+HZmHCkhDtYzG5fZzpKOOTUblxmrSUic2gjrv9KSoym8GJH0l6SozC40J9UlbHUnB4vETpK9OPorkZURWkcY6H4VjEbPupLWe9WKwriHpreZfIniyqPOkuSLmuaU3rRtpr4N7hf9/4yfSX+d2Sj6tqZdBKsx5j9Tu6EBa7IRLZLt6OUiRHZoqr62NSJddiHTLKsVJ+uzAWElXLBheRhrN4ZwmpcdakFarNS9bxDnMToMUW9148cTMKyfldvpu0WTecJz0mxEn1x2e+DzScQ6fTAsmZ2xtTz+n5juS5bGlM+m66meSZPl7Y2dnUnjLtmaIsSpxVEdSerkuvwiTmOedIMV38uKUcHfXqwFSflVL4zPDeJxhV3uyBB2/cnx4+sK8QJahqm47Y8PNg9c0JItRedyM2PAxMWqZQVakyrgZMeFg7y8PsS7VeuO70P4bxP3ZRaUGWZ6OmVv9oSk63llBVqkLh4Zt9IaW1Tt6tjfIYhWRY86YGCKH/WWGmUOWraaHxzw1yV2DMxQ2zHq51Tmyfl2o99bI25Jig2vP54ljDp9ykLWsdj3fkO9vvWPKtL8wndo7YeztOy8bcKh5OVncyhq2XNrd96ZpLrjy5/qYb/l8S7q2r1NJlj/bf7b/bP/Z/rP9Z/vP9p/tP9t/tv9s//3djwA=",rs=l.memo(l.forwardRef((t,e)=>{const{children:n,disabled:o,style:r,picture:i,description:s,isDragging:a,view:d,onHide:c,onShow:f,onKeyDownCapture:h,onFocus:u,onBlur:w,loadingPanel:b,...q}=t,[I,$]=l.useState(!1),[D,v]=l.useState(null),[F,E]=l.useState(null),[S,k]=l.useState(null);l.useEffect(()=>{E(null),i.getDetails().then(T=>{$(!1),E(T.asUrl()),T.asSVGText?.()&&k(T.asSVGText())}).catch(T=>{console.warn(T),$(!0),E(Wi),k(null)})},[i]);const N=Ft(e,()=>({isPictureEditor:()=>!0}),[]),R=l.useMemo(()=>{if(F||S)return g.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:I?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:I?"var(--sxl-app-color-background, white)":void 0,boxShadow:I?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:I?"contain":void 0,opacity:D?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:F,onLoad:()=>{v(!0)},onError:({currentTarget:T})=>{console.log("error"),T.onerror=null,E(Wi),$(!0)},alt:s??`${i.getType()}`})},[D,i,F,S,a]);if(!i.isClosed())return g.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:a?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...r,width:"100%",height:"100%"},tabIndex:0,...q,onKeyDownCapture:T=>{h?.(T)},ref:N,children:[D||I?void 0:b,R]})}));rs.displayName="PictureEditor";const Lc=l.memo(l.forwardRef((t,e)=>{const{children:n,disabled:o,chart:r,view:i,isDragging:s,onHide:a,onShow:d,...c}=t;l.useEffect(()=>{},[r]);const f=Ft(e,()=>({isChartEditor:()=>!0}),[]),[h,{height:u,width:w}]=en();if(!r.isClosed())return g.jsx("div",{...c,ref:Cn([f,h]),children:g.jsx("div",{className:"chart-editor",style:{width:"100%",height:"100%",backgroundColor:"var(--sxl-app-color-background, white)",backgroundImage:"var(--sxl-app-image-background)",alignItems:"center",justifyContent:"center",zoom:i.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:o?"blur(1px)":void 0,boxShadow:s?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:g.jsx("div",{style:{textAlign:"center"},children:r.getDescription()})})})})),zc="_editable-input_1bqx6_6",Oc=t=>g.jsx("input",{...t}),is=l.memo(l.forwardRef((t,e)=>{const{style:n={},className:o,value:r="",onSubmit:i,onChange:s,onCancel:a,createInput:d=Oc,notifier:c,styleHover:f={},dragging:h,maxLength:u,disabled:w=!1,readOnly:b=!1,...q}=t,[I,$]=l.useState(!1),[D,v]=l.useState(!1),[F,E]=l.useState(r);l.useEffect(()=>{E(r)},[r]);const S=l.useRef(null),[k,N]=l.useState(null),R=l.useCallback(function(Z){const P=Z.message;k!==P&&(c?.showMessage?.(P,{type:bn.Error}),N(P))},[c,k]),T=l.useCallback(Z=>{let P=!1;try{P=i?.(Z)??!0}catch(M){R(M)}return P?(S.current=null,v(!1),E(Z),P):(setTimeout(()=>{S.current?.focus()},0),P)},[i]),G=X(()=>{E(r),S.current=null,v(!1),a?.()},[a,r]),O=l.useMemo(()=>{if(!D)return null;const Z={className:kt(zc),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:u,type:"text",value:F,onFocus:P=>{S.current||(S.current=P.target,setTimeout(()=>{P.target?.select()},0))},onBlur:P=>{S.current&&T(F)},onChange:P=>{D&&E(P.target.value)},onMouseDown:P=>P.stopPropagation(),onKeyDown:P=>P.code==="Escape"?(P.preventDefault(),void G()):P.code==="Enter"?(P.preventDefault(),void T(P.target.value)):void(P.code!=="Tab"?P.stopPropagation():T(P.target.value))};return g.jsx(g.Fragment,{children:d(Z)})},[D,F,T,G,d,w]),[j,z]=l.useState();l.useLayoutEffect(()=>{let Z=Object.assign({},n);(h||I)&&(Z=Object.assign(Z,f)),z(Z)},[h,I,f,n]),l.useEffect(()=>{O&&s?.(F)},[O,s,F]);const B=Ft(e,()=>({startEdit(){w||b||v(!0)},cancel(){G()}}),[]);return g.jsxs("div",{...q,ref:B,style:{flexDirection:"column",display:"flex",...j},className:kt(o),children:[g.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{w||b||v(!0)},onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),children:[g.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:D?0:1},children:F}),O]}),g.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...f},children:F})]})})),Fo=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Sn(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Br(t){return"nodeType"in t}function Rt(t){var e,n;return t?Sn(t)?t:Br(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Vr(t){const{Document:e}=Rt(t);return t instanceof e}function Yn(t){return!Sn(t)&&t instanceof Rt(t).HTMLElement}function ls(t){return t instanceof Rt(t).SVGElement}function xn(t){return t?Sn(t)?t.document:Br(t)?Vr(t)?t:Yn(t)||ls(t)?t.ownerDocument:document:document:document}const zt=Fo?l.useLayoutEffect:l.useEffect;function Do(t){const e=l.useRef(t);return zt(()=>{e.current=t}),l.useCallback(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}function Gn(t,e){e===void 0&&(e=[t]);const n=l.useRef(t);return zt(()=>{n.current!==t&&(n.current=t)},e),n}function jn(t,e){const n=l.useRef();return l.useMemo(()=>{const o=t(n.current);return n.current=o,o},[...e])}function qo(t){const e=Do(t),n=l.useRef(null),o=l.useCallback(r=>{r!==n.current&&e?.(r,n.current),n.current=r},[]);return[n,o]}function Ro(t){const e=l.useRef();return l.useEffect(()=>{e.current=t},[t]),e.current}let ir={};function Xn(t,e){return l.useMemo(()=>{if(e)return e;const n=ir[t]==null?0:ir[t]+1;return ir[t]=n,t+"-"+n},[t,e])}function ss(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((i,s)=>{const a=Object.entries(s);for(const[d,c]of a){const f=i[d];f!=null&&(i[d]=f+t*c)}return i},{...e})}}const vn=ss(1),Kn=ss(-1);function Ao(t){if(!t)return!1;const{KeyboardEvent:e}=Rt(t.target);return e&&t instanceof e}function Eo(t){if(function(e){if(!e)return!1;const{TouchEvent:n}=Rt(e.target);return n&&e instanceof n}(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(t)?{x:t.clientX,y:t.clientY}:null}const tn=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[tn.Translate.toString(t),tn.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:o}=t;return e+" "+n+"ms "+o}}}),Gi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function jc(t){return t.matches(Gi)?t:t.querySelector(Gi)}const Nc={display:"none"};function Pc(t){let{id:e,value:n}=t;return l.createElement("div",{id:e,style:Nc},n)}function Bc(t){let{id:e,announcement:n,ariaLiveType:o="assertive"}=t;return l.createElement("div",{id:e,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const as=l.createContext(null),Vc={draggable:`
|
|
31
31
|
To pick up a draggable item, press the space bar.
|
|
32
32
|
While dragging, use the arrow keys to move the item.
|
|
33
33
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
34
|
-
`},Hc={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function $c(t){let{announcements:e=Hc,container:n,hiddenTextDescribedById:o,screenReaderInstructions:r=Vc}=t;const{announce:i,announcement:s}=function(){const[h,u]=l.useState("");return{announce:l.useCallback(w=>{w!=null&&u(w)},[]),announcement:h}}(),a=Xn("DndLiveRegion"),[d,c]=l.useState(!1);if(l.useEffect(()=>{c(!0)},[]),function(h){const u=l.useContext(as);l.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(h)},[h,u])}(l.useMemo(()=>({onDragStart(h){let{active:u}=h;i(e.onDragStart({active:u}))},onDragMove(h){let{active:u,over:w}=h;e.onDragMove&&i(e.onDragMove({active:u,over:w}))},onDragOver(h){let{active:u,over:w}=h;i(e.onDragOver({active:u,over:w}))},onDragEnd(h){let{active:u,over:w}=h;i(e.onDragEnd({active:u,over:w}))},onDragCancel(h){let{active:u,over:w}=h;i(e.onDragCancel({active:u,over:w}))}}),[i,e])),!d)return null;const f=l.createElement(l.Fragment,null,l.createElement(Pc,{id:o,value:r.draggable}),l.createElement(Bc,{id:a,announcement:s}));return n?Wt.createPortal(f,n):f}var pt;function To(){}function lr(t,e){return l.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(pt||(pt={}));const Ot=Object.freeze({x:0,y:0});function cs(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Uc(t,e){const n=Eo(t);return n?(n.x-e.left)/e.width*100+"% "+(n.y-e.top)/e.height*100+"%":"0 0"}function ds(t,e){let{data:{value:n}}=t,{data:{value:o}}=e;return n-o}function Wc(t,e){let{data:{value:n}}=t,{data:{value:o}}=e;return o-n}function Ki(t){let{left:e,top:n,height:o,width:r}=t;return[{x:e,y:n},{x:e+r,y:n},{x:e,y:n+o},{x:e+r,y:n+o}]}function us(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Zi(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+.5*t.width,y:n+.5*t.height}}const Gc=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=t;const r=Zi(e,e.left,e.top),i=[];for(const s of o){const{id:a}=s,d=n.get(a);if(d){const c=cs(Zi(d),r);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(ds)};function Kc(t,e){const n=Math.max(e.top,t.top),o=Math.max(e.left,t.left),r=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),s=r-o,a=i-n;if(o<r&&n<i){const d=e.width*e.height,c=t.width*t.height,f=s*a;return Number((f/(d+c-f)).toFixed(4))}return 0}const Zc=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=t;const r=[];for(const i of o){const{id:s}=i,a=n.get(s);if(a){const d=Kc(a,e);d>0&&r.push({id:s,data:{droppableContainer:i,value:d}})}}return r.sort(Wc)};function Yi(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Ot}function Yc(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((i,s)=>({...i,top:i.top+t*s.y,bottom:i.bottom+t*s.y,left:i.left+t*s.x,right:i.right+t*s.x}),{...e})}}const Xc=Yc(1);function hs(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}const Jc={ignoreTransform:!1};function qn(t,e){e===void 0&&(e=Jc);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:f}=Rt(t).getComputedStyle(t);c&&(n=function(h,u,w){const b=hs(u);if(!b)return h;const{scaleX:q,scaleY:I,x:$,y:D}=b,v=h.left-$-(1-q)*parseFloat(w),F=h.top-D-(1-I)*parseFloat(w.slice(w.indexOf(" ")+1)),E=q?h.width/q:h.width,S=I?h.height/I:h.height;return{width:E,height:S,top:F,right:v+E,bottom:F+S,left:v}}(n,c,f))}const{top:o,left:r,width:i,height:s,bottom:a,right:d}=n;return{top:o,left:r,width:i,height:s,bottom:a,right:d}}function Xi(t){return qn(t,{ignoreTransform:!0})}function Lo(t,e){const n=[];return t?function o(r){if(e!=null&&n.length>=e||!r)return n;if(Vr(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Yn(r)||ls(r)||n.includes(r))return n;const i=Rt(t).getComputedStyle(r);return r!==t&&function(s,a){a===void 0&&(a=Rt(s).getComputedStyle(s));const d=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(c=>{const f=a[c];return typeof f=="string"&&d.test(f)})}(r,i)&&n.push(r),function(s,a){return a===void 0&&(a=Rt(s).getComputedStyle(s)),a.position==="fixed"}(r,i)?n:o(r.parentNode)}(t):n}function gs(t){const[e]=Lo(t,1);return e??null}function sr(t){return Fo&&t?Sn(t)?t:Br(t)?Vr(t)||t===xn(t).scrollingElement?window:Yn(t)?t:null:null:null}function ms(t){return Sn(t)?t.scrollX:t.scrollLeft}function fs(t){return Sn(t)?t.scrollY:t.scrollTop}function qr(t){return{x:ms(t),y:fs(t)}}var vt;function ps(t){return!(!Fo||!t)&&t===document.scrollingElement}function vs(t){const e={x:0,y:0},n=ps(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},o={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height};return{isTop:t.scrollTop<=e.y,isLeft:t.scrollLeft<=e.x,isBottom:t.scrollTop>=o.y,isRight:t.scrollLeft>=o.x,maxScroll:o,minScroll:e}}(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(vt||(vt={}));const Qc={x:.2,y:.2};function ed(t,e,n,o,r){let{top:i,left:s,right:a,bottom:d}=n;o===void 0&&(o=10),r===void 0&&(r=Qc);const{isTop:c,isBottom:f,isLeft:h,isRight:u}=vs(t),w={x:0,y:0},b={x:0,y:0},q=e.height*r.y,I=e.width*r.x;return!c&&i<=e.top+q?(w.y=vt.Backward,b.y=o*Math.abs((e.top+q-i)/q)):!f&&d>=e.bottom-q&&(w.y=vt.Forward,b.y=o*Math.abs((e.bottom-q-d)/q)),!u&&a>=e.right-I?(w.x=vt.Forward,b.x=o*Math.abs((e.right-I-a)/I)):!h&&s<=e.left+I&&(w.x=vt.Backward,b.x=o*Math.abs((e.left+I-s)/I)),{direction:w,speed:b}}function td(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:e,left:n,right:o,bottom:r}=t.getBoundingClientRect();return{top:e,left:n,right:o,bottom:r,width:t.clientWidth,height:t.clientHeight}}function ws(t){return t.reduce((e,n)=>vn(e,qr(n)),Ot)}function ys(t,e){if(e===void 0&&(e=qn),!t)return;const{top:n,left:o,bottom:r,right:i}=e(t);gs(t)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const nd=[["x",["left","right"],function(t){return t.reduce((e,n)=>e+ms(n),0)}],["y",["top","bottom"],function(t){return t.reduce((e,n)=>e+fs(n),0)}]];class Rr{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=Lo(n),r=ws(o);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,s,a]of nd)for(const d of s)Object.defineProperty(this,d,{get:()=>{const c=a(o),f=r[i]-c;return this.rect[d]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Nn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=e}add(e,n,o){var r;(r=this.target)==null||r.addEventListener(e,n,o),this.listeners.push([e,n,o])}}function ar(t,e){const n=Math.abs(t.x),o=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+o**2)>e:"x"in e&&"y"in e?n>e.x&&o>e.y:"x"in e?n>e.x:"y"in e&&o>e.y}var At,tt;function Ji(t){t.preventDefault()}function od(t){t.stopPropagation()}(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(At||(At={})),function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"}(tt||(tt={}));const bs={start:[tt.Space,tt.Enter],cancel:[tt.Esc],end:[tt.Space,tt.Enter,tt.Tab]},rd=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case tt.Right:return{...n,x:n.x+25};case tt.Left:return{...n,x:n.x-25};case tt.Down:return{...n,y:n.y+25};case tt.Up:return{...n,y:n.y-25}}};class Hr{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Nn(xn(n)),this.windowListeners=new Nn(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(At.Resize,this.handleCancel),this.windowListeners.add(At.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(At.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,o=e.node.current;o&&ys(o),n(Ot)}handleKeyDown(e){if(Ao(e)){const{active:n,context:o,options:r}=this.props,{keyboardCodes:i=bs,coordinateGetter:s=rd,scrollBehavior:a="smooth"}=r,{code:d}=e;if(i.end.includes(d))return void this.handleEnd(e);if(i.cancel.includes(d))return void this.handleCancel(e);const{collisionRect:c}=o.current,f=c?{x:c.left,y:c.top}:Ot;this.referenceCoordinates||(this.referenceCoordinates=f);const h=s(e,{active:n,context:o.current,currentCoordinates:f});if(h){const u=Kn(h,f),w={x:0,y:0},{scrollableAncestors:b}=o.current;for(const q of b){const I=e.code,{isTop:$,isRight:D,isLeft:v,isBottom:F,maxScroll:E,minScroll:S}=vs(q),k=td(q),N={x:Math.min(I===tt.Right?k.right-k.width/2:k.right,Math.max(I===tt.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(I===tt.Down?k.bottom-k.height/2:k.bottom,Math.max(I===tt.Down?k.top:k.top+k.height/2,h.y))},R=I===tt.Right&&!D||I===tt.Left&&!v,T=I===tt.Down&&!F||I===tt.Up&&!$;if(R&&N.x!==h.x){const G=q.scrollLeft+u.x,O=I===tt.Right&&G<=E.x||I===tt.Left&&G>=S.x;if(O&&!u.y)return void q.scrollTo({left:G,behavior:a});w.x=O?q.scrollLeft-G:I===tt.Right?q.scrollLeft-E.x:q.scrollLeft-S.x,w.x&&q.scrollBy({left:-w.x,behavior:a});break}if(T&&N.y!==h.y){const G=q.scrollTop+u.y,O=I===tt.Down&&G<=E.y||I===tt.Up&&G>=S.y;if(O&&!u.x)return void q.scrollTo({top:G,behavior:a});w.y=O?q.scrollTop-G:I===tt.Down?q.scrollTop-E.y:q.scrollTop-S.y,w.y&&q.scrollBy({top:-w.y,behavior:a});break}}this.handleMove(e,vn(Kn(h,this.referenceCoordinates),w))}}}handleMove(e,n){const{onMove:o}=this.props;e.preventDefault(),o(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Qi(t){return!!(t&&"distance"in t)}function el(t){return!!(t&&"delay"in t)}Hr.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:o=bs,onActivation:r}=e,{active:i}=n;const{code:s}=t.nativeEvent;if(o.start.includes(s)){const a=i.activatorNode.current;return(!a||t.target===a)&&(t.preventDefault(),r?.({event:t.nativeEvent}),!0)}return!1}}];class $r{constructor(e,n,o){var r;o===void 0&&(o=function(a){const{EventTarget:d}=Rt(a);return a instanceof d?a:xn(a)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:s}=i;this.props=e,this.events=n,this.document=xn(s),this.documentListeners=new Nn(this.document),this.listeners=new Nn(o),this.windowListeners=new Nn(Rt(s)),this.initialCoordinates=(r=Eo(i))!=null?r:Ot,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(At.Resize,this.handleCancel),this.windowListeners.add(At.DragStart,Ji),this.windowListeners.add(At.VisibilityChange,this.handleCancel),this.windowListeners.add(At.ContextMenu,Ji),this.documentListeners.add(At.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(el(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(Qi(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:o,onPending:r}=this.props;r(o,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(At.Click,od,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(At.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:o,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!r)return;const d=(n=Eo(e))!=null?n:Ot,c=Kn(r,d);if(!o&&a){if(Qi(a)){if(a.tolerance!=null&&ar(c,a.tolerance))return this.handleCancel();if(ar(c,a.distance))return this.handleStart()}return el(a)&&ar(c,a.tolerance)?this.handleCancel():void this.handlePending(a,c)}e.cancelable&&e.preventDefault(),s(d)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===tt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const id={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class xs extends $r{constructor(e){const{event:n}=e,o=xn(n.target);super(e,id,o)}}xs.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:o}=e;return!(!n.isPrimary||n.button!==0)&&(o?.({event:n}),!0)}}];const ld={move:{name:"mousemove"},end:{name:"mouseup"}};var Er;(function(t){t[t.RightClick=2]="RightClick"})(Er||(Er={}));class Cs extends $r{constructor(e){super(e,ld,xn(e.event.target))}}Cs.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:o}=e;return n.button!==Er.RightClick&&(o?.({event:n}),!0)}}];const cr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ss extends $r{constructor(e){super(e,cr)}static setup(){return window.addEventListener(cr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(cr.move.name,e)};function e(){}}}var Pn,Mo;function sd(t){let{acceleration:e,activator:n=Pn.Pointer,canScroll:o,draggingRect:r,enabled:i,interval:s=5,order:a=Mo.TreeOrder,pointerCoordinates:d,scrollableAncestors:c,scrollableAncestorRects:f,delta:h,threshold:u}=t;const w=function(S){let{delta:k,disabled:N}=S;const R=Ro(k);return jn(T=>{if(N||!R||!T)return ad;const G={x:Math.sign(k.x-R.x),y:Math.sign(k.y-R.y)};return{x:{[vt.Backward]:T.x[vt.Backward]||G.x===-1,[vt.Forward]:T.x[vt.Forward]||G.x===1},y:{[vt.Backward]:T.y[vt.Backward]||G.y===-1,[vt.Forward]:T.y[vt.Forward]||G.y===1}}},[N,k,R])}({delta:h,disabled:!i}),[b,q]=function(){const S=l.useRef(null);return[l.useCallback((k,N)=>{S.current=setInterval(k,N)},[]),l.useCallback(()=>{S.current!==null&&(clearInterval(S.current),S.current=null)},[])]}(),I=l.useRef({x:0,y:0}),$=l.useRef({x:0,y:0}),D=l.useMemo(()=>{switch(n){case Pn.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Pn.DraggableRect:return r}},[n,r,d]),v=l.useRef(null),F=l.useCallback(()=>{const S=v.current;if(!S)return;const k=I.current.x*$.current.x,N=I.current.y*$.current.y;S.scrollBy(k,N)},[]),E=l.useMemo(()=>a===Mo.TreeOrder?[...c].reverse():c,[a,c]);l.useEffect(()=>{if(i&&c.length&&D){for(const S of E){if(o?.(S)===!1)continue;const k=c.indexOf(S),N=f[k];if(!N)continue;const{direction:R,speed:T}=ed(S,N,D,e,u);for(const G of["x","y"])w[G][R[G]]||(T[G]=0,R[G]=0);if(T.x>0||T.y>0)return q(),v.current=S,b(F,s),I.current=T,void($.current=R)}I.current={x:0,y:0},$.current={x:0,y:0},q()}else q()},[e,F,o,q,i,s,JSON.stringify(D),JSON.stringify(w),b,c,E,f,JSON.stringify(u)])}Ss.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:o}=e;const{touches:r}=n;return!(r.length>1)&&(o?.({event:n}),!0)}}],function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"}(Pn||(Pn={})),function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"}(Mo||(Mo={}));const ad={x:{[vt.Backward]:!1,[vt.Forward]:!1},y:{[vt.Backward]:!1,[vt.Forward]:!1}};var Zn,Tr;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Zn||(Zn={})),function(t){t.Optimized="optimized"}(Tr||(Tr={}));const tl=new Map;function Mr(t,e){return jn(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function ko(t){let{callback:e,disabled:n}=t;const o=Do(e),r=l.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:i}=window;return new i(o)},[n]);return l.useEffect(()=>()=>r?.disconnect(),[r]),r}function cd(t){return new Rr(qn(t),t)}function nl(t,e,n){e===void 0&&(e=cd);const[o,r]=l.useState(null);function i(){r(d=>{if(!t)return null;var c;if(t.isConnected===!1)return(c=d??n)!=null?c:null;const f=e(t);return JSON.stringify(d)===JSON.stringify(f)?d:f})}const s=function(d){let{callback:c,disabled:f}=d;const h=Do(c),u=l.useMemo(()=>{if(f||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:w}=window;return new w(h)},[h,f]);return l.useEffect(()=>()=>u?.disconnect(),[u]),u}({callback(d){if(t)for(const c of d){const{type:f,target:h}=c;if(f==="childList"&&h instanceof HTMLElement&&h.contains(t)){i();break}}}}),a=ko({callback:i});return zt(()=>{i(),t?(a?.observe(t),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[t]),o}const ol=[];function rl(t,e){e===void 0&&(e=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},e),l.useEffect(()=>{const o=t!==Ot;o&&!n.current&&(n.current=t),!o&&n.current&&(n.current=null)},[t]),n.current?Kn(t,n.current):Ot}function il(t){return l.useMemo(()=>t?function(e){const n=e.innerWidth,o=e.innerHeight;return{top:0,left:0,right:n,bottom:o,width:n,height:o}}(t):null,[t])}const ll=[];function qs(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Yn(e)?e:t}const dd=[{sensor:xs,options:{}},{sensor:Hr,options:{}}],ud={current:{}},yo={draggable:{measure:Xi},droppable:{measure:Xi,strategy:Zn.WhileDragging,frequency:Tr.Optimized},dragOverlay:{measure:qn}};class Bn extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,o;return(n=(o=this.get(e))==null?void 0:o.node.current)!=null?n:void 0}}const hd={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:To},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yo,measureDroppableContainers:To,windowRect:null,measuringScheduled:!1},Rs={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:To,draggableNodes:new Map,over:null,measureDroppableContainers:To},Jn=l.createContext(Rs),Es=l.createContext(hd);function gd(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bn}}}function md(t,e){switch(e.type){case pt.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case pt.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case pt.DragEnd:case pt.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case pt.RegisterDroppable:{const{element:n}=e,{id:o}=n,r=new Bn(t.droppable.containers);return r.set(o,n),{...t,droppable:{...t.droppable,containers:r}}}case pt.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=e,i=t.droppable.containers.get(n);if(!i||o!==i.key)return t;const s=new Bn(t.droppable.containers);return s.set(n,{...i,disabled:r}),{...t,droppable:{...t.droppable,containers:s}}}case pt.UnregisterDroppable:{const{id:n,key:o}=e,r=t.droppable.containers.get(n);if(!r||o!==r.key)return t;const i=new Bn(t.droppable.containers);return i.delete(n),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function fd(t){let{disabled:e}=t;const{active:n,activatorEvent:o,draggableNodes:r}=l.useContext(Jn),i=Ro(o),s=Ro(n?.id);return l.useEffect(()=>{if(!e&&!o&&i&&s!=null){if(!Ao(i)||document.activeElement===i.target)return;const a=r.get(s);if(!a)return;const{activatorNode:d,node:c}=a;if(!d.current&&!c.current)return;requestAnimationFrame(()=>{for(const f of[d.current,c.current]){if(!f)continue;const h=jc(f);if(h){h.focus();break}}})}},[o,e,r,s,i]),null}function Ts(t,e){let{transform:n,...o}=e;return t!=null&&t.length?t.reduce((r,i)=>i({transform:r,...o}),n):n}const zo=l.createContext({...Ot,scaleX:1,scaleY:1});var Ut;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Ut||(Ut={}));const pd=l.memo(function(t){var e,n,o,r;let{id:i,accessibility:s,autoScroll:a=!0,children:d,sensors:c=dd,collisionDetection:f=Zc,measuring:h,modifiers:u,...w}=t;const b=l.useReducer(md,void 0,gd),[q,I]=b,[$,D]=function(){const[y]=l.useState(()=>new Set),W=l.useCallback(Y=>(y.add(Y),()=>y.delete(Y)),[y]);return[l.useCallback(Y=>{let{type:ie,event:de}=Y;y.forEach(ce=>{var he;return(he=ce[ie])==null?void 0:he.call(ce,de)})},[y]),W]}(),[v,F]=l.useState(Ut.Uninitialized),E=v===Ut.Initialized,{draggable:{active:S,nodes:k,translate:N},droppable:{containers:R}}=q,T=S!=null?k.get(S):null,G=l.useRef({initial:null,translated:null}),O=l.useMemo(()=>{var y;return S!=null?{id:S,data:(y=T?.data)!=null?y:ud,rect:G}:null},[S,T]),j=l.useRef(null),[z,B]=l.useState(null),[Z,P]=l.useState(null),M=Gn(w,Object.values(w)),H=Xn("DndDescribedBy",i),oe=l.useMemo(()=>R.getEnabled(),[R]),ue=(te=h,l.useMemo(()=>({draggable:{...yo.draggable,...te?.draggable},droppable:{...yo.droppable,...te?.droppable},dragOverlay:{...yo.dragOverlay,...te?.dragOverlay}}),[te?.draggable,te?.droppable,te?.dragOverlay]));var te;const{droppableRects:K,measureDroppableContainers:le,measuringScheduled:Re}=function(y,W){let{dragging:Y,dependencies:ie,config:de}=W;const[ce,he]=l.useState(null),{frequency:be,measure:ve,strategy:we}=de,qe=l.useRef(y),Be=function(){switch(we){case Zn.Always:return!1;case Zn.BeforeDragging:return Y;default:return!Y}}(),ze=Gn(Be),Ze=l.useCallback(function(je){je===void 0&&(je=[]),ze.current||he(et=>et===null?je:et.concat(je.filter(ht=>!et.includes(ht))))},[ze]),He=l.useRef(null),Ye=jn(je=>{if(Be&&!Y)return tl;if(!je||je===tl||qe.current!==y||ce!=null){const et=new Map;for(let ht of y){if(!ht)continue;if(ce&&ce.length>0&&!ce.includes(ht.id)&&ht.rect.current){et.set(ht.id,ht.rect.current);continue}const Et=ht.node.current,Dt=Et?new Rr(ve(Et),Et):null;ht.rect.current=Dt,Dt&&et.set(ht.id,Dt)}return et}return je},[y,ce,Y,Be,ve]);return l.useEffect(()=>{qe.current=y},[y]),l.useEffect(()=>{Be||Ze()},[Y,Be]),l.useEffect(()=>{ce&&ce.length>0&&he(null)},[JSON.stringify(ce)]),l.useEffect(()=>{Be||typeof be!="number"||He.current!==null||(He.current=setTimeout(()=>{Ze(),He.current=null},be))},[be,Be,Ze,...ie]),{droppableRects:Ye,measureDroppableContainers:Ze,measuringScheduled:ce!=null}}(oe,{dragging:E,dependencies:[N.x,N.y],config:ue.droppable}),Te=function(y,W){const Y=W!=null?y.get(W):void 0,ie=Y?Y.node.current:null;return jn(de=>{var ce;return W==null?null:(ce=ie??de)!=null?ce:null},[ie,W])}(k,S),ae=l.useMemo(()=>Z?Eo(Z):null,[Z]),Fe=function(){const y=z?.autoScrollEnabled===!1,W=typeof a=="object"?a.enabled===!1:a===!1,Y=E&&!y&&!W;return typeof a=="object"?{...a,enabled:Y}:{enabled:Y}}(),me=function(y,W){return Mr(y,W)}(Te,ue.draggable.measure);(function(y){let{activeNode:W,measure:Y,initialRect:ie,config:de=!0}=y;const ce=l.useRef(!1),{x:he,y:be}=typeof de=="boolean"?{x:de,y:de}:de;zt(()=>{if(!he&&!be||!W)return void(ce.current=!1);if(ce.current||!ie)return;const ve=W?.node.current;if(!ve||ve.isConnected===!1)return;const we=Yi(Y(ve),ie);if(he||(we.x=0),be||(we.y=0),ce.current=!0,Math.abs(we.x)>0||Math.abs(we.y)>0){const qe=gs(ve);qe&&qe.scrollBy({top:we.y,left:we.x})}},[W,he,be,ie,Y])})({activeNode:S!=null?k.get(S):null,config:Fe.layoutShiftCompensation,initialRect:me,measure:ue.draggable.measure});const Oe=nl(Te,ue.draggable.measure,me),xe=nl(Te?Te.parentElement:null),ge=l.useRef({activatorEvent:null,active:null,activeNode:Te,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),fe=R.getNodeFor((e=ge.current.over)==null?void 0:e.id),Se=function(y){let{measure:W}=y;const[Y,ie]=l.useState(null),de=ko({callback:l.useCallback(ve=>{for(const{target:we}of ve)if(Yn(we)){ie(qe=>{const Be=W(we);return qe?{...qe,width:Be.width,height:Be.height}:Be});break}},[W])}),ce=l.useCallback(ve=>{const we=qs(ve);de?.disconnect(),we&&de?.observe(we),ie(we?W(we):null)},[W,de]),[he,be]=qo(ce);return l.useMemo(()=>({nodeRef:he,rect:Y,setRef:be}),[Y,he,be])}({measure:ue.dragOverlay.measure}),pe=(n=Se.nodeRef.current)!=null?n:Te,Ce=E?(o=Se.rect)!=null?o:Oe:null,Ae=!!(Se.nodeRef.current&&Se.rect),ye=Yi(De=Ae?null:Oe,Mr(De));var De;const Pe=il(pe?Rt(pe):null),$e=function(y){const W=l.useRef(y),Y=jn(ie=>y?ie&&ie!==ol&&y&&W.current&&y.parentNode===W.current.parentNode?ie:Lo(y):ol,[y]);return l.useEffect(()=>{W.current=y},[y]),Y}(E?fe??Te:null),C=function(y,W){W===void 0&&(W=qn);const[Y]=y,ie=il(Y?Rt(Y):null),[de,ce]=l.useState(ll);function he(){ce(()=>y.length?y.map(ve=>ps(ve)?ie:new Rr(W(ve),ve)):ll)}const be=ko({callback:he});return zt(()=>{be?.disconnect(),he(),y.forEach(ve=>be?.observe(ve))},[y]),de}($e),We=Ts(u,{transform:{x:N.x-ye.x,y:N.y-ye.y,scaleX:1,scaleY:1},activatorEvent:Z,active:O,activeNodeRect:Oe,containerNodeRect:xe,draggingNodeRect:Ce,over:ge.current.over,overlayNodeRect:Se.rect,scrollableAncestors:$e,scrollableAncestorRects:C,windowRect:Pe}),nt=ae?vn(ae,N):null,Ke=function(y){const[W,Y]=l.useState(null),ie=l.useRef(y),de=l.useCallback(ce=>{const he=sr(ce.target);he&&Y(be=>be?(be.set(he,qr(he)),new Map(be)):null)},[]);return l.useEffect(()=>{const ce=ie.current;if(y!==ce){he(ce);const be=y.map(ve=>{const we=sr(ve);return we?(we.addEventListener("scroll",de,{passive:!0}),[we,qr(we)]):null}).filter(ve=>ve!=null);Y(be.length?new Map(be):null),ie.current=y}return()=>{he(y),he(ce)};function he(be){be.forEach(ve=>{const we=sr(ve);we?.removeEventListener("scroll",de)})}},[de,y]),l.useMemo(()=>y.length?W?Array.from(W.values()).reduce((ce,he)=>vn(ce,he),Ot):ws(y):Ot,[y,W])}($e),ee=rl(Ke),_e=rl(Ke,[Oe]),Ve=vn(We,ee),Me=Ce?Xc(Ce,We):null,Le=O&&Me?f({active:O,collisionRect:Me,droppableRects:K,droppableContainers:oe,pointerCoordinates:nt}):null,Ie=us(Le,"id"),[L,se]=l.useState(null),U=function(y,W,Y){return{...y,scaleX:W&&Y?W.width/Y.width:1,scaleY:W&&Y?W.height/Y.height:1}}(Ae?We:vn(We,_e),(r=L?.rect)!=null?r:null,Oe),J=l.useRef(null),m=l.useCallback((y,W)=>{let{sensor:Y,options:ie}=W;if(j.current==null)return;const de=k.get(j.current);if(!de)return;const ce=y.nativeEvent,he=new Y({active:j.current,activeNode:de,event:ce,options:ie,context:ge,onAbort(ve){if(!k.get(ve))return;const{onDragAbort:we}=M.current,qe={id:ve};we?.(qe),$({type:"onDragAbort",event:qe})},onPending(ve,we,qe,Be){if(!k.get(ve))return;const{onDragPending:ze}=M.current,Ze={id:ve,constraint:we,initialCoordinates:qe,offset:Be};ze?.(Ze),$({type:"onDragPending",event:Ze})},onStart(ve){const we=j.current;if(we==null)return;const qe=k.get(we);if(!qe)return;const{onDragStart:Be}=M.current,ze={activatorEvent:ce,active:{id:we,data:qe.data,rect:G}};Wt.unstable_batchedUpdates(()=>{Be?.(ze),F(Ut.Initializing),I({type:pt.DragStart,initialCoordinates:ve,active:we}),$({type:"onDragStart",event:ze}),B(J.current),P(ce)})},onMove(ve){I({type:pt.DragMove,coordinates:ve})},onEnd:be(pt.DragEnd),onCancel:be(pt.DragCancel)});function be(ve){return async function(){const{active:we,collisions:qe,over:Be,scrollAdjustedTranslate:ze}=ge.current;let Ze=null;if(we&&ze){const{cancelDrop:He}=M.current;Ze={activatorEvent:ce,active:we,collisions:qe,delta:ze,over:Be},ve===pt.DragEnd&&typeof He=="function"&&await Promise.resolve(He(Ze))&&(ve=pt.DragCancel)}j.current=null,Wt.unstable_batchedUpdates(()=>{I({type:ve}),F(Ut.Uninitialized),se(null),B(null),P(null),J.current=null;const He=ve===pt.DragEnd?"onDragEnd":"onDragCancel";if(Ze){const Ye=M.current[He];Ye?.(Ze),$({type:He,event:Ze})}})}}J.current=he},[k]),_=l.useCallback((y,W)=>(Y,ie)=>{const de=Y.nativeEvent,ce=k.get(ie);if(j.current!==null||!ce||de.dndKit||de.defaultPrevented)return;const he={active:ce};y(Y,W.options,he)===!0&&(de.dndKit={capturedBy:W.sensor},j.current=ie,m(Y,W))},[k,m]),A=function(y,W){return l.useMemo(()=>y.reduce((Y,ie)=>{const{sensor:de}=ie;return[...Y,...de.activators.map(ce=>({eventName:ce.eventName,handler:W(ce.handler,ie)}))]},[]),[y,W])}(c,_);(function(y){l.useEffect(()=>{if(!Fo)return;const W=y.map(Y=>{let{sensor:ie}=Y;return ie.setup==null?void 0:ie.setup()});return()=>{for(const Y of W)Y?.()}},y.map(W=>{let{sensor:Y}=W;return Y}))})(c),zt(()=>{Oe&&v===Ut.Initializing&&F(Ut.Initialized)},[Oe,v]),l.useEffect(()=>{const{onDragMove:y}=M.current,{active:W,activatorEvent:Y,collisions:ie,over:de}=ge.current;if(!W||!Y)return;const ce={active:W,activatorEvent:Y,collisions:ie,delta:{x:Ve.x,y:Ve.y},over:de};Wt.unstable_batchedUpdates(()=>{y?.(ce),$({type:"onDragMove",event:ce})})},[Ve.x,Ve.y]),l.useEffect(()=>{const{active:y,activatorEvent:W,collisions:Y,droppableContainers:ie,scrollAdjustedTranslate:de}=ge.current;if(!y||j.current==null||!W||!de)return;const{onDragOver:ce}=M.current,he=ie.get(Ie),be=he&&he.rect.current?{id:he.id,rect:he.rect.current,data:he.data,disabled:he.disabled}:null,ve={active:y,activatorEvent:W,collisions:Y,delta:{x:de.x,y:de.y},over:be};Wt.unstable_batchedUpdates(()=>{se(be),ce?.(ve),$({type:"onDragOver",event:ve})})},[Ie]),zt(()=>{ge.current={activatorEvent:Z,active:O,activeNode:Te,collisionRect:Me,collisions:Le,droppableRects:K,draggableNodes:k,draggingNode:pe,draggingNodeRect:Ce,droppableContainers:R,over:L,scrollableAncestors:$e,scrollAdjustedTranslate:Ve},G.current={initial:Ce,translated:Me}},[O,Te,Le,Me,k,pe,Ce,K,R,L,$e,Ve]),sd({...Fe,delta:N,draggingRect:Me,pointerCoordinates:nt,scrollableAncestors:$e,scrollableAncestorRects:C});const x=l.useMemo(()=>({active:O,activeNode:Te,activeNodeRect:Oe,activatorEvent:Z,collisions:Le,containerNodeRect:xe,dragOverlay:Se,draggableNodes:k,droppableContainers:R,droppableRects:K,over:L,measureDroppableContainers:le,scrollableAncestors:$e,scrollableAncestorRects:C,measuringConfiguration:ue,measuringScheduled:Re,windowRect:Pe}),[O,Te,Oe,Z,Le,xe,Se,k,R,K,L,le,$e,C,ue,Re,Pe]),V=l.useMemo(()=>({activatorEvent:Z,activators:A,active:O,activeNodeRect:Oe,ariaDescribedById:{draggable:H},dispatch:I,draggableNodes:k,over:L,measureDroppableContainers:le}),[Z,A,O,Oe,I,H,k,L,le]);return l.createElement(as.Provider,{value:D},l.createElement(Jn.Provider,{value:V},l.createElement(Es.Provider,{value:x},l.createElement(zo.Provider,{value:U},d)),l.createElement(fd,{disabled:s?.restoreFocus===!1})),l.createElement($c,{...s,hiddenTextDescribedById:H}))}),vd=l.createContext(null),sl="button";function wd(t){let{id:e,data:n,disabled:o=!1,attributes:r}=t;const i=Xn("Draggable"),{activators:s,activatorEvent:a,active:d,activeNodeRect:c,ariaDescribedById:f,draggableNodes:h,over:u}=l.useContext(Jn),{role:w=sl,roleDescription:b="draggable",tabIndex:q=0}=r??{},I=d?.id===e,$=l.useContext(I?zo:vd),[D,v]=qo(),[F,E]=qo(),S=function(N,R){return l.useMemo(()=>N.reduce((T,G)=>{let{eventName:O,handler:j}=G;return T[O]=z=>{j(z,R)},T},{}),[N,R])}(s,e),k=Gn(n);return zt(()=>(h.set(e,{id:e,key:i,node:D,activatorNode:F,data:k}),()=>{const N=h.get(e);N&&N.key===i&&h.delete(e)}),[h,e]),{active:d,activatorEvent:a,activeNodeRect:c,attributes:l.useMemo(()=>({role:w,tabIndex:q,"aria-disabled":o,"aria-pressed":!(!I||w!==sl)||void 0,"aria-roledescription":b,"aria-describedby":f.draggable}),[o,w,q,I,b,f.draggable]),isDragging:I,listeners:o?void 0:S,node:D,over:u,setNodeRef:v,setActivatorNodeRef:E,transform:$}}function Ms(){return l.useContext(Es)}const yd={timeout:25};function bd(t){let{animation:e,children:n}=t;const[o,r]=l.useState(null),[i,s]=l.useState(null),a=Ro(n);return n||o||!a||r(a),zt(()=>{if(!i)return;const d=o?.key,c=o?.props.id;d!=null&&c!=null?Promise.resolve(e(c,i)).then(()=>{r(null)}):r(null)},[e,o,i]),l.createElement(l.Fragment,null,n,o?l.cloneElement(o,{ref:s}):null)}const xd={x:0,y:0,scaleX:1,scaleY:1};function Cd(t){let{children:e}=t;return l.createElement(Jn.Provider,{value:Rs},l.createElement(zo.Provider,{value:xd},e))}const Sd={position:"fixed",touchAction:"none"},qd=t=>Ao(t)?"transform 250ms ease":void 0,Rd=l.forwardRef((t,e)=>{let{as:n,activatorEvent:o,adjustScale:r,children:i,className:s,rect:a,style:d,transform:c,transition:f=qd}=t;if(!a)return null;const h=r?c:{...c,scaleX:1,scaleY:1},u={...Sd,width:a.width,height:a.height,top:a.top,left:a.left,transform:tn.Transform.toString(h),transformOrigin:r&&o?Uc(o,a):void 0,transition:typeof f=="function"?f(o):f,...d};return l.createElement(n,{className:s,style:u,ref:e},i)}),Ed=t=>e=>{let{active:n,dragOverlay:o}=e;const r={},{styles:i,className:s}=t;if(i!=null&&i.active)for(const[a,d]of Object.entries(i.active))d!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,d));if(i!=null&&i.dragOverlay)for(const[a,d]of Object.entries(i.dragOverlay))d!==void 0&&o.node.style.setProperty(a,d);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(const[a,d]of Object.entries(r))n.node.style.setProperty(a,d);s!=null&&s.active&&n.node.classList.remove(s.active)}},ks={duration:250,easing:"ease",keyframes:t=>{let{transform:{initial:e,final:n}}=t;return[{transform:tn.Transform.toString(e)},{transform:tn.Transform.toString(n)}]},sideEffects:Ed({styles:{active:{opacity:"0"}}})};function Td(t){let{config:e,draggableNodes:n,droppableContainers:o,measuringConfiguration:r}=t;return Do((i,s)=>{if(e===null)return;const a=n.get(i);if(!a)return;const d=a.node.current;if(!d)return;const c=qs(s);if(!c)return;const{transform:f}=Rt(s).getComputedStyle(s),h=hs(f);if(!h)return;const u=typeof e=="function"?e:function(w){const{duration:b,easing:q,sideEffects:I,keyframes:$}={...ks,...w};return D=>{let{active:v,dragOverlay:F,transform:E,...S}=D;if(!b)return;const k={x:F.rect.left-v.rect.left,y:F.rect.top-v.rect.top},N={scaleX:E.scaleX!==1?v.rect.width*E.scaleX/F.rect.width:1,scaleY:E.scaleY!==1?v.rect.height*E.scaleY/F.rect.height:1},R={x:E.x-k.x,y:E.y-k.y,...N},T=$({...S,active:v,dragOverlay:F,transform:{initial:E,final:R}}),[G]=T,O=T[T.length-1];if(JSON.stringify(G)===JSON.stringify(O))return;const j=I?.({active:v,dragOverlay:F,...S}),z=F.node.animate(T,{duration:b,easing:q,fill:"forwards"});return new Promise(B=>{z.onfinish=()=>{j?.(),B()}})}}(e);return ys(d,r.draggable.measure),u({active:{id:i,data:a.data,node:d,rect:r.draggable.measure(d)},draggableNodes:n,dragOverlay:{node:s,rect:r.dragOverlay.measure(c)},droppableContainers:o,measuringConfiguration:r,transform:h})})}let al=0;function Md(t){return l.useMemo(()=>{if(t!=null)return al++,al},[t])}const kd=l.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:o,style:r,transition:i,modifiers:s,wrapperElement:a="div",className:d,zIndex:c=999}=t;const{activatorEvent:f,active:h,activeNodeRect:u,containerNodeRect:w,draggableNodes:b,droppableContainers:q,dragOverlay:I,over:$,measuringConfiguration:D,scrollableAncestors:v,scrollableAncestorRects:F,windowRect:E}=Ms(),S=l.useContext(zo),k=Md(h?.id),N=Ts(s,{activatorEvent:f,active:h,activeNodeRect:u,containerNodeRect:w,draggingNodeRect:I.rect,over:$,overlayNodeRect:I.rect,scrollableAncestors:v,scrollableAncestorRects:F,transform:S,windowRect:E}),R=Mr(u),T=Td({config:o,draggableNodes:b,droppableContainers:q,measuringConfiguration:D}),G=R?I.setRef:void 0;return l.createElement(Cd,null,l.createElement(bd,{animation:T},h&&k?l.createElement(Rd,{key:k,id:h.id,ref:G,as:a,activatorEvent:f,adjustScale:e,className:d,transition:i,rect:R,style:{zIndex:c,...r},transform:N},n):null))});function Ur(t,e,n){const o=t.slice();return o.splice(n<0?o.length+n:n,0,o.splice(e,1)[0]),o}function _d(t,e){return t.reduce((n,o,r)=>{const i=e.get(o);return i&&(n[r]=i),n},Array(t.length))}function mo(t){return t!==null&&t>=0}const fo={scaleX:1,scaleY:1},Id=t=>{var e;let{rects:n,activeNodeRect:o,activeIndex:r,overIndex:i,index:s}=t;const a=(e=n[r])!=null?e:o;if(!a)return null;const d=function(c,f,h){const u=c[f],w=c[f-1],b=c[f+1];return!u||!w&&!b?0:h<f?w?u.left-(w.left+w.width):b.left-(u.left+u.width):b?b.left-(u.left+u.width):u.left-(w.left+w.width)}(n,s,r);if(s===r){const c=n[i];return c?{x:r<i?c.left+c.width-(a.left+a.width):c.left-a.left,y:0,...fo}:null}return s>r&&s<=i?{x:-a.width-d,y:0,...fo}:s<r&&s>=i?{x:a.width+d,y:0,...fo}:{x:0,y:0,...fo}},Wr=t=>{let{rects:e,activeIndex:n,overIndex:o,index:r}=t;const i=Ur(e,o,n),s=e[r],a=i[r];return a&&s?{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}:null},_s="Sortable",Is=l.createContext({activeIndex:-1,containerId:_s,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Wr,disabled:{draggable:!1,droppable:!1}});function Fd(t){let{children:e,id:n,items:o,strategy:r=Wr,disabled:i=!1}=t;const{active:s,dragOverlay:a,droppableRects:d,over:c,measureDroppableContainers:f}=Ms(),h=Xn(_s,n),u=a.rect!==null,w=l.useMemo(()=>o.map(S=>typeof S=="object"&&"id"in S?S.id:S),[o]),b=s!=null,q=s?w.indexOf(s.id):-1,I=c?w.indexOf(c.id):-1,$=l.useRef(w),D=!function(S,k){if(S===k)return!0;if(S.length!==k.length)return!1;for(let N=0;N<S.length;N++)if(S[N]!==k[N])return!1;return!0}(w,$.current),v=I!==-1&&q===-1||D,F=function(S){return typeof S=="boolean"?{draggable:S,droppable:S}:S}(i);zt(()=>{D&&b&&f(w)},[D,w,b,f]),l.useEffect(()=>{$.current=w},[w]);const E=l.useMemo(()=>({activeIndex:q,containerId:h,disabled:F,disableTransforms:v,items:w,overIndex:I,useDragOverlay:u,sortedRects:_d(w,d),strategy:r}),[q,h,F.draggable,F.droppable,v,w,I,d,u,r]);return l.createElement(Is.Provider,{value:E},e)}const Dd=t=>{let{id:e,items:n,activeIndex:o,overIndex:r}=t;return Ur(n,o,r).indexOf(e)},Ad=t=>{let{containerId:e,isSorting:n,wasDragging:o,index:r,items:i,newIndex:s,previousItems:a,previousContainerId:d,transition:c}=t;return!(!c||!o)&&(a===i||r!==s)&&(!!n||s!==r&&e===d)},Ld={duration:200,easing:"ease"},Fs="transform",zd=tn.Transition.toString({property:Fs,duration:0,easing:"linear"}),Od={roleDescription:"sortable"};function jd(t){let{animateLayoutChanges:e=Ad,attributes:n,disabled:o,data:r,getNewIndex:i=Dd,id:s,strategy:a,resizeObserverConfig:d,transition:c=Ld}=t;const{items:f,containerId:h,activeIndex:u,disabled:w,disableTransforms:b,sortedRects:q,overIndex:I,useDragOverlay:$,strategy:D}=l.useContext(Is),v=function(fe,Se){var pe,Ce;return typeof fe=="boolean"?{draggable:fe,droppable:!1}:{draggable:(pe=fe?.draggable)!=null?pe:Se.draggable,droppable:(Ce=fe?.droppable)!=null?Ce:Se.droppable}}(o,w),F=f.indexOf(s),E=l.useMemo(()=>({sortable:{containerId:h,index:F,items:f},...r}),[h,r,F,f]),S=l.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:k,node:N,isOver:R,setNodeRef:T}=function(fe){let{data:Se,disabled:pe=!1,id:Ce,resizeObserverConfig:Ae}=fe;const ye=Xn("Droppable"),{active:De,dispatch:Pe,over:$e,measureDroppableContainers:C}=l.useContext(Jn),We=l.useRef({disabled:pe}),nt=l.useRef(!1),Ke=l.useRef(null),ee=l.useRef(null),{disabled:_e,updateMeasurementsFor:Ve,timeout:Me}={...yd,...Ae},Le=Gn(Ve??Ce),Ie=ko({callback:l.useCallback(()=>{nt.current?(ee.current!=null&&clearTimeout(ee.current),ee.current=setTimeout(()=>{C(Array.isArray(Le.current)?Le.current:[Le.current]),ee.current=null},Me)):nt.current=!0},[Me]),disabled:_e||!De}),L=l.useCallback((m,_)=>{Ie&&(_&&(Ie.unobserve(_),nt.current=!1),m&&Ie.observe(m))},[Ie]),[se,U]=qo(L),J=Gn(Se);return l.useEffect(()=>{Ie&&se.current&&(Ie.disconnect(),nt.current=!1,Ie.observe(se.current))},[se,Ie]),l.useEffect(()=>(Pe({type:pt.RegisterDroppable,element:{id:Ce,key:ye,disabled:pe,node:se,rect:Ke,data:J}}),()=>Pe({type:pt.UnregisterDroppable,key:ye,id:Ce})),[Ce]),l.useEffect(()=>{pe!==We.current.disabled&&(Pe({type:pt.SetDroppableDisabled,id:Ce,key:ye,disabled:pe}),We.current.disabled=pe)},[Ce,ye,pe,Pe]),{active:De,rect:Ke,isOver:$e?.id===Ce,node:se,over:$e,setNodeRef:U}}({id:s,data:E,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...d}}),{active:G,activatorEvent:O,activeNodeRect:j,attributes:z,setNodeRef:B,listeners:Z,isDragging:P,over:M,setActivatorNodeRef:H,transform:oe}=wd({id:s,data:E,attributes:{...Od,...n},disabled:v.draggable}),ue=function(){for(var fe=arguments.length,Se=new Array(fe),pe=0;pe<fe;pe++)Se[pe]=arguments[pe];return l.useMemo(()=>Ce=>{Se.forEach(Ae=>Ae(Ce))},Se)}(T,B),te=!!G,K=te&&!b&&mo(u)&&mo(I),le=!$&&P,Re=le&&K?oe:null,Te=K?Re??(a??D)({rects:q,activeNodeRect:j,activeIndex:u,overIndex:I,index:F}):null,ae=mo(u)&&mo(I)?i({id:s,items:f,activeIndex:u,overIndex:I}):F,Fe=G?.id,me=l.useRef({activeId:Fe,items:f,newIndex:ae,containerId:h}),Oe=f!==me.current.items,xe=e({active:G,containerId:h,isDragging:P,isSorting:te,id:s,index:F,items:f,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:c,wasDragging:me.current.activeId!=null}),ge=function(fe){let{disabled:Se,index:pe,node:Ce,rect:Ae}=fe;const[ye,De]=l.useState(null),Pe=l.useRef(pe);return zt(()=>{if(!Se&&pe!==Pe.current&&Ce.current){const $e=Ae.current;if($e){const C=qn(Ce.current,{ignoreTransform:!0}),We={x:$e.left-C.left,y:$e.top-C.top,scaleX:$e.width/C.width,scaleY:$e.height/C.height};(We.x||We.y)&&De(We)}}pe!==Pe.current&&(Pe.current=pe)},[Se,pe,Ce,Ae]),l.useEffect(()=>{ye&&De(null)},[ye]),ye}({disabled:!xe,index:F,node:N,rect:k});return l.useEffect(()=>{te&&me.current.newIndex!==ae&&(me.current.newIndex=ae),h!==me.current.containerId&&(me.current.containerId=h),f!==me.current.items&&(me.current.items=f)},[te,ae,h,f]),l.useEffect(()=>{if(Fe===me.current.activeId)return;if(Fe!=null&&me.current.activeId==null)return void(me.current.activeId=Fe);const fe=setTimeout(()=>{me.current.activeId=Fe},50);return()=>clearTimeout(fe)},[Fe]),{active:G,activeIndex:u,attributes:z,data:E,rect:k,index:F,newIndex:ae,items:f,isOver:R,isSorting:te,isDragging:P,listeners:Z,node:N,overIndex:I,over:M,setNodeRef:ue,setActivatorNodeRef:H,setDroppableNodeRef:T,setDraggableNodeRef:B,transform:ge??Te,transition:function(){if(ge||Oe&&me.current.newIndex===F)return zd;if(!(le&&!Ao(O)||!c)&&(te||xe))return tn.Transition.toString({...c,property:Fs})}()}}function _o(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Nd=[tt.Down,tt.Right,tt.Up,tt.Left],Pd=(t,e)=>{let{context:{active:n,collisionRect:o,droppableRects:r,droppableContainers:i,over:s,scrollableAncestors:a}}=e;if(Nd.includes(t.code)){if(t.preventDefault(),!n||!o)return;const d=[];i.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const u=r.get(h.id);if(u)switch(t.code){case tt.Down:o.top<u.top&&d.push(h);break;case tt.Up:o.top>u.top&&d.push(h);break;case tt.Left:o.left>u.left&&d.push(h);break;case tt.Right:o.left<u.left&&d.push(h)}});const c=(h=>{let{collisionRect:u,droppableRects:w,droppableContainers:b}=h;const q=Ki(u),I=[];for(const $ of b){const{id:D}=$,v=w.get(D);if(v){const F=Ki(v),E=q.reduce((k,N,R)=>k+cs(F[R],N),0),S=Number((E/4).toFixed(4));I.push({id:D,data:{droppableContainer:$,value:S}})}}return I.sort(ds)})({collisionRect:o,droppableRects:r,droppableContainers:d});let f=us(c,"id");if(f===s?.id&&c.length>1&&(f=c[1].id),f!=null){const h=i.get(n.id),u=i.get(f),w=u?r.get(u.id):null,b=u?.node.current;if(b&&w&&h&&u){const q=Lo(b).some((F,E)=>a[E]!==F),I=cl(h,u),$=function(F,E){return!_o(F)||!_o(E)||!cl(F,E)?!1:F.data.current.sortable.index<E.data.current.sortable.index}(h,u),D=q||!I?{x:0,y:0}:{x:$?o.width-w.width:0,y:$?o.height-w.height:0},v={x:w.left,y:w.top};return D.x&&D.y?v:Kn(v,D)}}}};function cl(t,e){return!(!_o(t)||!_o(e))&&t.data.current.sortable.containerId===e.data.current.sortable.containerId}const Bd=t=>{let{transform:e}=t;return{...e,y:0}},Ds=l.memo(l.forwardRef((t,e)=>{const{children:n,style:o,className:r,index:i,editing:s,editable:a,selectedIndex:d,background:c,activeColor:f,borderColor:h,borderWidth:u,dragging:w,...b}=t;return g.jsxs("div",{ref:e,className:kt(r),style:{...o,display:"flex",flexDirection:"column",background:d===i?"white":c,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:d===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...b,children:[g.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[g.jsx("div",{style:{marginLeft:d===i?"0px":"-1px",marginTop:d===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,d===i?g.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):g.jsx(g.Fragment,{})]}),g.jsx("div",{style:{flex:"1 1 100%",background:d===i&&f?f?.toCSS():"none",minHeight:"2px"}})]})})),Lt={Wrapper:"_Wrapper_1wyun_25",fadeIn:"_fadeIn_1wyun_33",dragOverlay:"_dragOverlay_1wyun_37",Item:"_Item_1wyun_47",withHandle:"_withHandle_1wyun_61",dragging:"_dragging_1wyun_66",disabled:"_disabled_1wyun_74"},Gr=l.memo(l.forwardRef(({color:t,dragOverlay:e,dragging:n,disabled:o,fadeIn:r,handle:i,height:s,index:a,listeners:d,onRemove:c,renderItem:f,sorting:h,style:u,transition:w,transform:b,value:q,wrapperStyle:I,...$},D)=>{l.useEffect(()=>{if(e)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[e]);const v=f?f({dragOverlay:!!e,dragging:!!n,sorting:!!h,index:a,fadeIn:!!r,listeners:d,ref:D,style:u,transform:b,transition:w,value:q}):g.jsx(g.Fragment,{children:q});return g.jsx("div",{className:kt("tab-item",Lt.Wrapper,r&&Lt.fadeIn,h&&Lt.sorting,e&&Lt.dragOverlay),style:{...I,transition:[w,I?.transition].filter(Boolean).join(", "),"--translate-x":b?`${Math.round(b.x)}px`:void 0,"--translate-y":b?`${Math.round(b.y)}px`:void 0,"--scale-x":b?.scaleX?`${b.scaleX}`:void 0,"--scale-y":b?.scaleY?`${b.scaleY}`:void 0,"--index":a},ref:D,children:g.jsx("div",{className:kt(Lt.Item,n&&Lt.dragging,i&&Lt.withHandle,e&&Lt.dragOverlay,o&&Lt.disabled,t&&Lt.color,"dragging"),style:u,"data-cypress":"draggable-item",...i?void 0:d,...$,tabIndex:i?void 0:-1,children:v})})})),dl={Row:"_Row_1kr10_1"},As=l.memo(l.forwardRef(({children:t,horizontal:e,style:n},o)=>g.jsx("div",{ref:o,style:{...n},className:kt(dl.Row,e&&dl.horizontal),children:t}))),Vd={...ks},Hd=l.memo(l.forwardRef((t,e)=>{const{className:n,activationConstraint:o,animateLayoutChanges:r,adjustScale:i=!1,collisionDetection:s=Gc,coordinateGetter:a=Pd,dropAnimation:d=Vd,getItemStyles:c=()=>({}),getNewIndex:f,handle:h=!1,items:u,onMove:w,isDisabled:b=()=>!1,measuring:q,modifiers:I,renderItem:$,renderDivider:D,reorderItems:v=Ur,strategy:F=Wr,style:E,useDragOverlay:S=!0,onDragStart:k,wrapperStyle:N=()=>({})}=t,[R,T]=l.useState(()=>u);l.useEffect(()=>{T(u)},[u]);const[G,O]=l.useState(null),j=function(){for(var M=arguments.length,H=new Array(M),oe=0;oe<M;oe++)H[oe]=arguments[oe];return l.useMemo(()=>[...H].filter(ue=>ue!=null),[...H])}(lr(Cs,{activationConstraint:o}),lr(Ss,{activationConstraint:o}),lr(Hr,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:a})),z=R.indexOf.bind(R),B=G?z(G):-1,Z=[];R.map((M,H)=>{Z.push(g.jsx($d,{id:M,handle:h,index:H,style:c,wrapperStyle:N,disabled:b(M),renderItem:$,animateLayoutChanges:r,useDragOverlay:S,getNewIndex:f},M+"-"+H));const oe=D?.({key:"divider-"+H});oe&&Z.push(oe)});const{getPortalContainer:P}=Ol();return g.jsxs(pd,{sensors:j,collisionDetection:s,onDragStart:M=>{const{active:H}=M;H&&(k?.(M),O(H.id))},autoScroll:{canScroll:M=>!0},onDragEnd:M=>{if(O(null),M.over){const H=z(M.over.id);B!==H&&(T(oe=>v(oe,B,H)),w?.(B,H))}},onDragCancel:()=>{O(null)},measuring:q,modifiers:I,children:[g.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...E},className:kt(n,Lt.Wrapper),children:g.jsx(Fd,{items:R,strategy:F,children:g.jsx(As,{ref:e,children:Z})})}),S?Wt.createPortal(g.jsx(kd,{adjustScale:i,dropAnimation:d,children:G?g.jsx(Gr,{value:R[B],handle:h,renderItem:$,wrapperStyle:N({index:B,isDragging:!0,id:R[B]}),index:B,dragging:!0,style:c({id:R[B],index:B,isSorting:G!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),P()):null]})}));function $d({disabled:t,animateLayoutChanges:e,getNewIndex:n,handle:o,id:r,index:i,onRemove:s,style:a,renderItem:d,useDragOverlay:c,wrapperStyle:f}){const{attributes:h,isDragging:u,isSorting:w,listeners:b,overIndex:q,setNodeRef:I,transform:$,transition:D}=jd({id:r,animateLayoutChanges:e,disabled:t,getNewIndex:n});return g.jsx(Gr,{ref:I,value:r,disabled:t,dragging:u,sorting:w,handle:o,renderItem:d,index:i,style:a({index:i,id:r,isDragging:u,isSorting:w,overIndex:q}),onRemove:s?()=>s(r):void 0,transform:$,transition:D,wrapperStyle:f({index:i,isDragging:u,id:r}),listeners:b,"data-index":i,"data-id":r,dragOverlay:!c&&u,...h})}const Ud="_TabStrip_3x0dp_1",Wd=new p.Color("rgb(33, 115, 70)"),Gd="#eee",Kd=t=>g.jsx(Ds,{...t}),Ls=l.memo(l.forwardRef((t,e)=>{const{children:n,style:o,className:r,selectedTabIndex:i=0,tabNames:s=[],onSelectedTabIndexChange:a,onTabNameChange:d,onTabMove:c,createScrollStartButton:f=Ir,createScrollEndButton:h=Fr,createScrollEdgeButton:u=Ml,createTabButton:w=Kd,createTabDivider:b,editLabelProps:q,disabled:I=!1,disableDrag:$=!1,background:D="white",activeColor:v=Wd,borderColor:F=Gd,borderWidth:E=1}=t,[S,k]=l.useState(i),[N,R]=l.useState(s),T=l.useCallback(ye=>{const De=P.current?.[ye]?.closest(".tab-item")??P.current?.[ye];De&&le.current?.scrollTo({top:De.offsetTop,left:De.offsetLeft,behavior:"smooth"})},[]);l.useEffect(()=>{T(i)},[i]);const G=l.useCallback((ye,De)=>{De!==S&&(k(De),a?.(De)),T(De)},[a,S]),O=l.useCallback((ye,De)=>{c?.(ye,De)},[c]),j=l.useRef(null),[z,B]=l.useState(-1),Z=l.useCallback((ye,De)=>{d?.(ye,De)},[d]);l.useLayoutEffect(()=>{k(i)},[i]),l.useLayoutEffect(()=>{R(s)},[s]);const P=l.useRef([]),M=l.useRef(null);l.useImperativeHandle(e,()=>Object.assign({startEdit(ye){P.current?.[ye]?.startEdit()},cancel(ye){P.current?.[ye]?.cancel()}},M.current),[S,z]);const H=l.useCallback(({value:ye,index:De,dragging:Pe})=>{const{style:$e,maxLength:C,...We}=q||{},nt=g.jsx(is,{ref:Ke=>{P.current[De]=Ke},value:ye,disabled:I,maxLength:C,style:{color:S===De&&v?v?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...$e},styleHover:{},onSubmit:Ke=>(j.current=!1,B(-1),Z(De,Ke)),onCancel:()=>{j.current=!1,B(-1)},onChange:Ke=>{j.current=!0,B(De)},...We});return w({onClick:Ke=>G(Ke,De),value:ye,index:De,editing:z===De&&j.current,editable:!0,disabled:I,selectedIndex:S,background:D,activeColor:v,borderColor:F,borderWidth:E,dragging:Pe,children:nt})},[S,Z,G,q,I,z,w]),[oe,{width:ue}]=en(),[te,{width:K}]=en(),le=l.useRef(null),[Re,Te]=l.useState({left:0,top:0,width:0,height:0}),[ae,Fe]=l.useState(null);l.useEffect(()=>{ae!==null&&le.current&&le.current.scrollTo({left:ae,behavior:"smooth"})},[ae]);const me=l.useCallback((ye,De=!1)=>{if(!le.current)return 0;let Pe=le.current.firstChild.getBoundingClientRect(),$e=le.current.firstChild.firstChild.children,C=0;return C=De?0:pr.getScrollTo(ye,Pe.left,$e,!0,Math.max(0,ye-200)),Fe(C),Math.max(0,C)},[]),Oe=l.useCallback((ye,De=!1)=>{if(!le.current)return 0;let Pe=le.current.firstChild.getBoundingClientRect(),$e=le.current.firstChild.firstChild.children,C=0;const We=Math.ceil(K-ue);return C=De?We:pr.getScrollTo(ye,Pe.left,$e,!1,Math.max(0,ye+200)),Fe(C),Math.min(We,C)},[K,ue]),xe=l.useRef(null),ge=l.useRef(null),fe=l.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null,xe.current=null)},[]),Se=l.useCallback((ye,De,Pe=260)=>{xe.current=ye,ge.current=setTimeout(()=>{const $e=De?me(xe.current||ye):Oe(xe.current||ye);$e!==xe.current?Se($e,De,120):fe()},Pe)},[me,Oe,fe]);l.useEffect(()=>()=>fe(),[fe]);const pe=l.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Re.left)<=0||Math.floor(K-ue)===0,orientation:wt.Horizontal,onMouseUp:fe,onMouseLeave:fe,onMouseDown:()=>Se(le.current.scrollLeft,!0),onClick:ye=>me(Math.min(le.current.scrollLeft,ae??Number.MAX_SAFE_INTEGER),ye.ctrlKey)}),[Re,ae,K,ue]),Ce=l.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(K-ue)<=Math.ceil(Re.left),orientation:wt.Horizontal,onMouseUp:fe,onMouseLeave:fe,onMouseDown:()=>Se(le.current.scrollLeft,!1),onClick:ye=>Oe(Math.max(le.current.scrollLeft,ae??0),ye.ctrlKey)}),[Re,ae,K,ue]),Ae=l.useMemo(()=>g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{minWidth:"16px"}}),n,u?.(pe)]}),[pe,Ce,f,h,n,u]);return g.jsxs("div",{style:{...o,display:"flex",alignItems:"stretch"},className:kt(Ud,r),ref:M,children:[g.jsx("div",{style:{borderTop:`solid ${F} ${E}px`,position:"absolute",width:"100%"}}),g.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Ae}),g.jsx("div",{className:"Tabs",ref:oe,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:g.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:le,onScroll:ye=>{Te({left:ye.target.scrollLeft,top:ye.target.scrollTop,width:ye.target.scrollWidth,height:ye.target.scrollHeight})},children:g.jsx(Hd,{isDisabled:ye=>I||$,items:N,strategy:Id,modifiers:[Bd],ref:te,renderItem:H,renderDivider:b,onMove:O,activationConstraint:{distance:15}})})}),g.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:u(Ce)})]})}));Ls.displayName="TabStrip";const dr=l.createContext(null),Zd="_script-editor_iy654_5",Yd=l.lazy(()=>Promise.resolve().then(()=>require("./CrbFF9YxdqqKWcm6.cjs"))),Xd={lightbulb:{enabled:!1},tabSize:2,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:"on",accessibilitySupport:"auto",automaticLayout:!0,autoIndent:!1,codeLens:!0,colorDecorators:!0,contextmenu:!0,cursorBlinking:"blink",cursorSmoothCaretAnimation:!1,cursorStyle:"line",disableLayerHinting:!1,disableMonospaceOptimizations:!1,dragAndDrop:!0,glyphMargin:!0,fixedOverflowWidgets:!1,folding:!0,foldingStrategy:"auto",fontLigatures:!1,formatOnPaste:!0,formatOnType:!1,hideCursorInOverviewRuler:!1,highlightActiveIndentGuide:!0,links:!0,lineDecorationsWidth:8,lineNumbersMinChars:3,mouseWheelZoom:!1,multiCursorMergeOverlapping:!0,multiCursorModifier:"alt",overviewRulerBorder:!0,overviewRulerLanes:2,quickSuggestions:!0,quickSuggestionsDelay:100,readOnly:!1,renderControlCharacters:!1,renderFinalNewline:!0,renderIndentGuides:!0,renderLineHighlight:"all",renderWhitespace:"none",revealHorizontalRightPadding:30,roundedSelection:!0,rulers:[],scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,selectOnLineNumbers:!0,selectionClipboard:!0,selectionHighlight:!0,showLightbulbIconMode:!1,showFoldingControls:"mouseover",smoothScrolling:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:!0,wordSeparators:`~!@#$%^&*()-=+[{]}|;:'",.<>/?`,wordWrap:"off",wordWrapBreakAfterCharacters:" })]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},ul=async(t,e,n)=>{const o=t.getModel();if(!o)return;const r=await e.languages.typescript.getTypeScriptWorker(),i=await r(o.uri),s=await i.getNavigationTree(o.uri.toString()),a=t.getPosition();let d={...a};d.lineNumber=1,d.column=1;let c=!1;for(let q=a.lineNumber;q>=1;q--)if(o.getLineContent(q).trim()===""){const I=Kr(s,o.getOffsetAt({lineNumber:q,column:1}),"function");if(!I||Qd(I)){c=!0,d.lineNumber=q+1;break}{const $=I.spans[0].start;q=o.getPositionAt($).lineNumber,d.lineNumber=q}}let f=n,h=!1;!c&&!f.startsWith(`
|
|
34
|
+
`},Hc={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function $c(t){let{announcements:e=Hc,container:n,hiddenTextDescribedById:o,screenReaderInstructions:r=Vc}=t;const{announce:i,announcement:s}=function(){const[h,u]=l.useState("");return{announce:l.useCallback(w=>{w!=null&&u(w)},[]),announcement:h}}(),a=Xn("DndLiveRegion"),[d,c]=l.useState(!1);if(l.useEffect(()=>{c(!0)},[]),function(h){const u=l.useContext(as);l.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(h)},[h,u])}(l.useMemo(()=>({onDragStart(h){let{active:u}=h;i(e.onDragStart({active:u}))},onDragMove(h){let{active:u,over:w}=h;e.onDragMove&&i(e.onDragMove({active:u,over:w}))},onDragOver(h){let{active:u,over:w}=h;i(e.onDragOver({active:u,over:w}))},onDragEnd(h){let{active:u,over:w}=h;i(e.onDragEnd({active:u,over:w}))},onDragCancel(h){let{active:u,over:w}=h;i(e.onDragCancel({active:u,over:w}))}}),[i,e])),!d)return null;const f=l.createElement(l.Fragment,null,l.createElement(Pc,{id:o,value:r.draggable}),l.createElement(Bc,{id:a,announcement:s}));return n?Wt.createPortal(f,n):f}var pt;function To(){}function lr(t,e){return l.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(pt||(pt={}));const Ot=Object.freeze({x:0,y:0});function cs(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Uc(t,e){const n=Eo(t);return n?(n.x-e.left)/e.width*100+"% "+(n.y-e.top)/e.height*100+"%":"0 0"}function ds(t,e){let{data:{value:n}}=t,{data:{value:o}}=e;return n-o}function Wc(t,e){let{data:{value:n}}=t,{data:{value:o}}=e;return o-n}function Ki(t){let{left:e,top:n,height:o,width:r}=t;return[{x:e,y:n},{x:e+r,y:n},{x:e,y:n+o},{x:e+r,y:n+o}]}function us(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function Zi(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+.5*t.width,y:n+.5*t.height}}const Gc=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=t;const r=Zi(e,e.left,e.top),i=[];for(const s of o){const{id:a}=s,d=n.get(a);if(d){const c=cs(Zi(d),r);i.push({id:a,data:{droppableContainer:s,value:c}})}}return i.sort(ds)};function Kc(t,e){const n=Math.max(e.top,t.top),o=Math.max(e.left,t.left),r=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height),s=r-o,a=i-n;if(o<r&&n<i){const d=e.width*e.height,c=t.width*t.height,f=s*a;return Number((f/(d+c-f)).toFixed(4))}return 0}const Zc=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:o}=t;const r=[];for(const i of o){const{id:s}=i,a=n.get(s);if(a){const d=Kc(a,e);d>0&&r.push({id:s,data:{droppableContainer:i,value:d}})}}return r.sort(Wc)};function Yi(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:Ot}function Yc(t){return function(e){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((i,s)=>({...i,top:i.top+t*s.y,bottom:i.bottom+t*s.y,left:i.left+t*s.x,right:i.right+t*s.x}),{...e})}}const Xc=Yc(1);function hs(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}const Jc={ignoreTransform:!1};function qn(t,e){e===void 0&&(e=Jc);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:f}=Rt(t).getComputedStyle(t);c&&(n=function(h,u,w){const b=hs(u);if(!b)return h;const{scaleX:q,scaleY:I,x:$,y:D}=b,v=h.left-$-(1-q)*parseFloat(w),F=h.top-D-(1-I)*parseFloat(w.slice(w.indexOf(" ")+1)),E=q?h.width/q:h.width,S=I?h.height/I:h.height;return{width:E,height:S,top:F,right:v+E,bottom:F+S,left:v}}(n,c,f))}const{top:o,left:r,width:i,height:s,bottom:a,right:d}=n;return{top:o,left:r,width:i,height:s,bottom:a,right:d}}function Xi(t){return qn(t,{ignoreTransform:!0})}function Lo(t,e){const n=[];return t?function o(r){if(e!=null&&n.length>=e||!r)return n;if(Vr(r)&&r.scrollingElement!=null&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!Yn(r)||ls(r)||n.includes(r))return n;const i=Rt(t).getComputedStyle(r);return r!==t&&function(s,a){a===void 0&&(a=Rt(s).getComputedStyle(s));const d=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(c=>{const f=a[c];return typeof f=="string"&&d.test(f)})}(r,i)&&n.push(r),function(s,a){return a===void 0&&(a=Rt(s).getComputedStyle(s)),a.position==="fixed"}(r,i)?n:o(r.parentNode)}(t):n}function gs(t){const[e]=Lo(t,1);return e??null}function sr(t){return Fo&&t?Sn(t)?t:Br(t)?Vr(t)||t===xn(t).scrollingElement?window:Yn(t)?t:null:null:null}function ms(t){return Sn(t)?t.scrollX:t.scrollLeft}function fs(t){return Sn(t)?t.scrollY:t.scrollTop}function qr(t){return{x:ms(t),y:fs(t)}}var vt;function ps(t){return!(!Fo||!t)&&t===document.scrollingElement}function vs(t){const e={x:0,y:0},n=ps(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},o={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height};return{isTop:t.scrollTop<=e.y,isLeft:t.scrollLeft<=e.x,isBottom:t.scrollTop>=o.y,isRight:t.scrollLeft>=o.x,maxScroll:o,minScroll:e}}(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(vt||(vt={}));const Qc={x:.2,y:.2};function ed(t,e,n,o,r){let{top:i,left:s,right:a,bottom:d}=n;o===void 0&&(o=10),r===void 0&&(r=Qc);const{isTop:c,isBottom:f,isLeft:h,isRight:u}=vs(t),w={x:0,y:0},b={x:0,y:0},q=e.height*r.y,I=e.width*r.x;return!c&&i<=e.top+q?(w.y=vt.Backward,b.y=o*Math.abs((e.top+q-i)/q)):!f&&d>=e.bottom-q&&(w.y=vt.Forward,b.y=o*Math.abs((e.bottom-q-d)/q)),!u&&a>=e.right-I?(w.x=vt.Forward,b.x=o*Math.abs((e.right-I-a)/I)):!h&&s<=e.left+I&&(w.x=vt.Backward,b.x=o*Math.abs((e.left+I-s)/I)),{direction:w,speed:b}}function td(t){if(t===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:e,left:n,right:o,bottom:r}=t.getBoundingClientRect();return{top:e,left:n,right:o,bottom:r,width:t.clientWidth,height:t.clientHeight}}function ws(t){return t.reduce((e,n)=>vn(e,qr(n)),Ot)}function ys(t,e){if(e===void 0&&(e=qn),!t)return;const{top:n,left:o,bottom:r,right:i}=e(t);gs(t)&&(r<=0||i<=0||n>=window.innerHeight||o>=window.innerWidth)&&t.scrollIntoView({block:"center",inline:"center"})}const nd=[["x",["left","right"],function(t){return t.reduce((e,n)=>e+ms(n),0)}],["y",["top","bottom"],function(t){return t.reduce((e,n)=>e+fs(n),0)}]];class Rr{constructor(e,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=Lo(n),r=ws(o);this.rect={...e},this.width=e.width,this.height=e.height;for(const[i,s,a]of nd)for(const d of s)Object.defineProperty(this,d,{get:()=>{const c=a(o),f=r[i]-c;return this.rect[d]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Nn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=e}add(e,n,o){var r;(r=this.target)==null||r.addEventListener(e,n,o),this.listeners.push([e,n,o])}}function ar(t,e){const n=Math.abs(t.x),o=Math.abs(t.y);return typeof e=="number"?Math.sqrt(n**2+o**2)>e:"x"in e&&"y"in e?n>e.x&&o>e.y:"x"in e?n>e.x:"y"in e&&o>e.y}var At,tt;function Ji(t){t.preventDefault()}function od(t){t.stopPropagation()}(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(At||(At={})),function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"}(tt||(tt={}));const bs={start:[tt.Space,tt.Enter],cancel:[tt.Esc],end:[tt.Space,tt.Enter,tt.Tab]},rd=(t,e)=>{let{currentCoordinates:n}=e;switch(t.code){case tt.Right:return{...n,x:n.x+25};case tt.Left:return{...n,x:n.x-25};case tt.Down:return{...n,y:n.y+25};case tt.Up:return{...n,y:n.y-25}}};class Hr{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:n}}=e;this.props=e,this.listeners=new Nn(xn(n)),this.windowListeners=new Nn(Rt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(At.Resize,this.handleCancel),this.windowListeners.add(At.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(At.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:n}=this.props,o=e.node.current;o&&ys(o),n(Ot)}handleKeyDown(e){if(Ao(e)){const{active:n,context:o,options:r}=this.props,{keyboardCodes:i=bs,coordinateGetter:s=rd,scrollBehavior:a="smooth"}=r,{code:d}=e;if(i.end.includes(d))return void this.handleEnd(e);if(i.cancel.includes(d))return void this.handleCancel(e);const{collisionRect:c}=o.current,f=c?{x:c.left,y:c.top}:Ot;this.referenceCoordinates||(this.referenceCoordinates=f);const h=s(e,{active:n,context:o.current,currentCoordinates:f});if(h){const u=Kn(h,f),w={x:0,y:0},{scrollableAncestors:b}=o.current;for(const q of b){const I=e.code,{isTop:$,isRight:D,isLeft:v,isBottom:F,maxScroll:E,minScroll:S}=vs(q),k=td(q),N={x:Math.min(I===tt.Right?k.right-k.width/2:k.right,Math.max(I===tt.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(I===tt.Down?k.bottom-k.height/2:k.bottom,Math.max(I===tt.Down?k.top:k.top+k.height/2,h.y))},R=I===tt.Right&&!D||I===tt.Left&&!v,T=I===tt.Down&&!F||I===tt.Up&&!$;if(R&&N.x!==h.x){const G=q.scrollLeft+u.x,O=I===tt.Right&&G<=E.x||I===tt.Left&&G>=S.x;if(O&&!u.y)return void q.scrollTo({left:G,behavior:a});w.x=O?q.scrollLeft-G:I===tt.Right?q.scrollLeft-E.x:q.scrollLeft-S.x,w.x&&q.scrollBy({left:-w.x,behavior:a});break}if(T&&N.y!==h.y){const G=q.scrollTop+u.y,O=I===tt.Down&&G<=E.y||I===tt.Up&&G>=S.y;if(O&&!u.x)return void q.scrollTo({top:G,behavior:a});w.y=O?q.scrollTop-G:I===tt.Down?q.scrollTop-E.y:q.scrollTop-S.y,w.y&&q.scrollBy({top:-w.y,behavior:a});break}}this.handleMove(e,vn(Kn(h,this.referenceCoordinates),w))}}}handleMove(e,n){const{onMove:o}=this.props;e.preventDefault(),o(n)}handleEnd(e){const{onEnd:n}=this.props;e.preventDefault(),this.detach(),n()}handleCancel(e){const{onCancel:n}=this.props;e.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Qi(t){return!!(t&&"distance"in t)}function el(t){return!!(t&&"delay"in t)}Hr.activators=[{eventName:"onKeyDown",handler:(t,e,n)=>{let{keyboardCodes:o=bs,onActivation:r}=e,{active:i}=n;const{code:s}=t.nativeEvent;if(o.start.includes(s)){const a=i.activatorNode.current;return(!a||t.target===a)&&(t.preventDefault(),r?.({event:t.nativeEvent}),!0)}return!1}}];class $r{constructor(e,n,o){var r;o===void 0&&(o=function(a){const{EventTarget:d}=Rt(a);return a instanceof d?a:xn(a)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=n;const{event:i}=e,{target:s}=i;this.props=e,this.events=n,this.document=xn(s),this.documentListeners=new Nn(this.document),this.listeners=new Nn(o),this.windowListeners=new Nn(Rt(s)),this.initialCoordinates=(r=Eo(i))!=null?r:Ot,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(At.Resize,this.handleCancel),this.windowListeners.add(At.DragStart,Ji),this.windowListeners.add(At.VisibilityChange,this.handleCancel),this.windowListeners.add(At.ContextMenu,Ji),this.documentListeners.add(At.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(el(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(Qi(n))return void this.handlePending(n)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,n){const{active:o,onPending:r}=this.props;r(o,e,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:e}=this,{onStart:n}=this.props;e&&(this.activated=!0,this.documentListeners.add(At.Click,od,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(At.SelectionChange,this.removeTextSelection),n(e))}handleMove(e){var n;const{activated:o,initialCoordinates:r,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!r)return;const d=(n=Eo(e))!=null?n:Ot,c=Kn(r,d);if(!o&&a){if(Qi(a)){if(a.tolerance!=null&&ar(c,a.tolerance))return this.handleCancel();if(ar(c,a.distance))return this.handleStart()}return el(a)&&ar(c,a.tolerance)?this.handleCancel():void this.handlePending(a,c)}e.cancelable&&e.preventDefault(),s(d)}handleEnd(){const{onAbort:e,onEnd:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleCancel(){const{onAbort:e,onCancel:n}=this.props;this.detach(),this.activated||e(this.props.active),n()}handleKeydown(e){e.code===tt.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}}const id={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class xs extends $r{constructor(e){const{event:n}=e,o=xn(n.target);super(e,id,o)}}xs.activators=[{eventName:"onPointerDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:o}=e;return!(!n.isPrimary||n.button!==0)&&(o?.({event:n}),!0)}}];const ld={move:{name:"mousemove"},end:{name:"mouseup"}};var Er;(function(t){t[t.RightClick=2]="RightClick"})(Er||(Er={}));class Cs extends $r{constructor(e){super(e,ld,xn(e.event.target))}}Cs.activators=[{eventName:"onMouseDown",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:o}=e;return n.button!==Er.RightClick&&(o?.({event:n}),!0)}}];const cr={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Ss extends $r{constructor(e){super(e,cr)}static setup(){return window.addEventListener(cr.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(cr.move.name,e)};function e(){}}}var Pn,Mo;function sd(t){let{acceleration:e,activator:n=Pn.Pointer,canScroll:o,draggingRect:r,enabled:i,interval:s=5,order:a=Mo.TreeOrder,pointerCoordinates:d,scrollableAncestors:c,scrollableAncestorRects:f,delta:h,threshold:u}=t;const w=function(S){let{delta:k,disabled:N}=S;const R=Ro(k);return jn(T=>{if(N||!R||!T)return ad;const G={x:Math.sign(k.x-R.x),y:Math.sign(k.y-R.y)};return{x:{[vt.Backward]:T.x[vt.Backward]||G.x===-1,[vt.Forward]:T.x[vt.Forward]||G.x===1},y:{[vt.Backward]:T.y[vt.Backward]||G.y===-1,[vt.Forward]:T.y[vt.Forward]||G.y===1}}},[N,k,R])}({delta:h,disabled:!i}),[b,q]=function(){const S=l.useRef(null);return[l.useCallback((k,N)=>{S.current=setInterval(k,N)},[]),l.useCallback(()=>{S.current!==null&&(clearInterval(S.current),S.current=null)},[])]}(),I=l.useRef({x:0,y:0}),$=l.useRef({x:0,y:0}),D=l.useMemo(()=>{switch(n){case Pn.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Pn.DraggableRect:return r}},[n,r,d]),v=l.useRef(null),F=l.useCallback(()=>{const S=v.current;if(!S)return;const k=I.current.x*$.current.x,N=I.current.y*$.current.y;S.scrollBy(k,N)},[]),E=l.useMemo(()=>a===Mo.TreeOrder?[...c].reverse():c,[a,c]);l.useEffect(()=>{if(i&&c.length&&D){for(const S of E){if(o?.(S)===!1)continue;const k=c.indexOf(S),N=f[k];if(!N)continue;const{direction:R,speed:T}=ed(S,N,D,e,u);for(const G of["x","y"])w[G][R[G]]||(T[G]=0,R[G]=0);if(T.x>0||T.y>0)return q(),v.current=S,b(F,s),I.current=T,void($.current=R)}I.current={x:0,y:0},$.current={x:0,y:0},q()}else q()},[e,F,o,q,i,s,JSON.stringify(D),JSON.stringify(w),b,c,E,f,JSON.stringify(u)])}Ss.activators=[{eventName:"onTouchStart",handler:(t,e)=>{let{nativeEvent:n}=t,{onActivation:o}=e;const{touches:r}=n;return!(r.length>1)&&(o?.({event:n}),!0)}}],function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"}(Pn||(Pn={})),function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"}(Mo||(Mo={}));const ad={x:{[vt.Backward]:!1,[vt.Forward]:!1},y:{[vt.Backward]:!1,[vt.Forward]:!1}};var Zn,Tr;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Zn||(Zn={})),function(t){t.Optimized="optimized"}(Tr||(Tr={}));const tl=new Map;function Mr(t,e){return jn(n=>t?n||(typeof e=="function"?e(t):t):null,[e,t])}function ko(t){let{callback:e,disabled:n}=t;const o=Do(e),r=l.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:i}=window;return new i(o)},[n]);return l.useEffect(()=>()=>r?.disconnect(),[r]),r}function cd(t){return new Rr(qn(t),t)}function nl(t,e,n){e===void 0&&(e=cd);const[o,r]=l.useState(null);function i(){r(d=>{if(!t)return null;var c;if(t.isConnected===!1)return(c=d??n)!=null?c:null;const f=e(t);return JSON.stringify(d)===JSON.stringify(f)?d:f})}const s=function(d){let{callback:c,disabled:f}=d;const h=Do(c),u=l.useMemo(()=>{if(f||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:w}=window;return new w(h)},[h,f]);return l.useEffect(()=>()=>u?.disconnect(),[u]),u}({callback(d){if(t)for(const c of d){const{type:f,target:h}=c;if(f==="childList"&&h instanceof HTMLElement&&h.contains(t)){i();break}}}}),a=ko({callback:i});return zt(()=>{i(),t?(a?.observe(t),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[t]),o}const ol=[];function rl(t,e){e===void 0&&(e=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},e),l.useEffect(()=>{const o=t!==Ot;o&&!n.current&&(n.current=t),!o&&n.current&&(n.current=null)},[t]),n.current?Kn(t,n.current):Ot}function il(t){return l.useMemo(()=>t?function(e){const n=e.innerWidth,o=e.innerHeight;return{top:0,left:0,right:n,bottom:o,width:n,height:o}}(t):null,[t])}const ll=[];function qs(t){if(!t)return null;if(t.children.length>1)return t;const e=t.children[0];return Yn(e)?e:t}const dd=[{sensor:xs,options:{}},{sensor:Hr,options:{}}],ud={current:{}},yo={draggable:{measure:Xi},droppable:{measure:Xi,strategy:Zn.WhileDragging,frequency:Tr.Optimized},dragOverlay:{measure:qn}};class Bn extends Map{get(e){var n;return e!=null&&(n=super.get(e))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:n}=e;return!n})}getNodeFor(e){var n,o;return(n=(o=this.get(e))==null?void 0:o.node.current)!=null?n:void 0}}const hd={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Bn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:To},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yo,measureDroppableContainers:To,windowRect:null,measuringScheduled:!1},Rs={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:To,draggableNodes:new Map,over:null,measureDroppableContainers:To},Jn=l.createContext(Rs),Es=l.createContext(hd);function gd(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Bn}}}function md(t,e){switch(e.type){case pt.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:e.initialCoordinates,active:e.active}};case pt.DragMove:return t.draggable.active==null?t:{...t,draggable:{...t.draggable,translate:{x:e.coordinates.x-t.draggable.initialCoordinates.x,y:e.coordinates.y-t.draggable.initialCoordinates.y}}};case pt.DragEnd:case pt.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case pt.RegisterDroppable:{const{element:n}=e,{id:o}=n,r=new Bn(t.droppable.containers);return r.set(o,n),{...t,droppable:{...t.droppable,containers:r}}}case pt.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=e,i=t.droppable.containers.get(n);if(!i||o!==i.key)return t;const s=new Bn(t.droppable.containers);return s.set(n,{...i,disabled:r}),{...t,droppable:{...t.droppable,containers:s}}}case pt.UnregisterDroppable:{const{id:n,key:o}=e,r=t.droppable.containers.get(n);if(!r||o!==r.key)return t;const i=new Bn(t.droppable.containers);return i.delete(n),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function fd(t){let{disabled:e}=t;const{active:n,activatorEvent:o,draggableNodes:r}=l.useContext(Jn),i=Ro(o),s=Ro(n?.id);return l.useEffect(()=>{if(!e&&!o&&i&&s!=null){if(!Ao(i)||document.activeElement===i.target)return;const a=r.get(s);if(!a)return;const{activatorNode:d,node:c}=a;if(!d.current&&!c.current)return;requestAnimationFrame(()=>{for(const f of[d.current,c.current]){if(!f)continue;const h=jc(f);if(h){h.focus();break}}})}},[o,e,r,s,i]),null}function Ts(t,e){let{transform:n,...o}=e;return t!=null&&t.length?t.reduce((r,i)=>i({transform:r,...o}),n):n}const zo=l.createContext({...Ot,scaleX:1,scaleY:1});var Ut;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Ut||(Ut={}));const pd=l.memo(function(t){var e,n,o,r;let{id:i,accessibility:s,autoScroll:a=!0,children:d,sensors:c=dd,collisionDetection:f=Zc,measuring:h,modifiers:u,...w}=t;const b=l.useReducer(md,void 0,gd),[q,I]=b,[$,D]=function(){const[y]=l.useState(()=>new Set),W=l.useCallback(Y=>(y.add(Y),()=>y.delete(Y)),[y]);return[l.useCallback(Y=>{let{type:ie,event:de}=Y;y.forEach(ce=>{var he;return(he=ce[ie])==null?void 0:he.call(ce,de)})},[y]),W]}(),[v,F]=l.useState(Ut.Uninitialized),E=v===Ut.Initialized,{draggable:{active:S,nodes:k,translate:N},droppable:{containers:R}}=q,T=S!=null?k.get(S):null,G=l.useRef({initial:null,translated:null}),O=l.useMemo(()=>{var y;return S!=null?{id:S,data:(y=T?.data)!=null?y:ud,rect:G}:null},[S,T]),j=l.useRef(null),[z,B]=l.useState(null),[Z,P]=l.useState(null),M=Gn(w,Object.values(w)),H=Xn("DndDescribedBy",i),oe=l.useMemo(()=>R.getEnabled(),[R]),ue=(te=h,l.useMemo(()=>({draggable:{...yo.draggable,...te?.draggable},droppable:{...yo.droppable,...te?.droppable},dragOverlay:{...yo.dragOverlay,...te?.dragOverlay}}),[te?.draggable,te?.droppable,te?.dragOverlay]));var te;const{droppableRects:K,measureDroppableContainers:le,measuringScheduled:Re}=function(y,W){let{dragging:Y,dependencies:ie,config:de}=W;const[ce,he]=l.useState(null),{frequency:be,measure:ve,strategy:we}=de,qe=l.useRef(y),Be=function(){switch(we){case Zn.Always:return!1;case Zn.BeforeDragging:return Y;default:return!Y}}(),ze=Gn(Be),Ze=l.useCallback(function(je){je===void 0&&(je=[]),ze.current||he(et=>et===null?je:et.concat(je.filter(ht=>!et.includes(ht))))},[ze]),He=l.useRef(null),Ye=jn(je=>{if(Be&&!Y)return tl;if(!je||je===tl||qe.current!==y||ce!=null){const et=new Map;for(let ht of y){if(!ht)continue;if(ce&&ce.length>0&&!ce.includes(ht.id)&&ht.rect.current){et.set(ht.id,ht.rect.current);continue}const Et=ht.node.current,Dt=Et?new Rr(ve(Et),Et):null;ht.rect.current=Dt,Dt&&et.set(ht.id,Dt)}return et}return je},[y,ce,Y,Be,ve]);return l.useEffect(()=>{qe.current=y},[y]),l.useEffect(()=>{Be||Ze()},[Y,Be]),l.useEffect(()=>{ce&&ce.length>0&&he(null)},[JSON.stringify(ce)]),l.useEffect(()=>{Be||typeof be!="number"||He.current!==null||(He.current=setTimeout(()=>{Ze(),He.current=null},be))},[be,Be,Ze,...ie]),{droppableRects:Ye,measureDroppableContainers:Ze,measuringScheduled:ce!=null}}(oe,{dragging:E,dependencies:[N.x,N.y],config:ue.droppable}),Te=function(y,W){const Y=W!=null?y.get(W):void 0,ie=Y?Y.node.current:null;return jn(de=>{var ce;return W==null?null:(ce=ie??de)!=null?ce:null},[ie,W])}(k,S),ae=l.useMemo(()=>Z?Eo(Z):null,[Z]),Fe=function(){const y=z?.autoScrollEnabled===!1,W=typeof a=="object"?a.enabled===!1:a===!1,Y=E&&!y&&!W;return typeof a=="object"?{...a,enabled:Y}:{enabled:Y}}(),me=function(y,W){return Mr(y,W)}(Te,ue.draggable.measure);(function(y){let{activeNode:W,measure:Y,initialRect:ie,config:de=!0}=y;const ce=l.useRef(!1),{x:he,y:be}=typeof de=="boolean"?{x:de,y:de}:de;zt(()=>{if(!he&&!be||!W)return void(ce.current=!1);if(ce.current||!ie)return;const ve=W?.node.current;if(!ve||ve.isConnected===!1)return;const we=Yi(Y(ve),ie);if(he||(we.x=0),be||(we.y=0),ce.current=!0,Math.abs(we.x)>0||Math.abs(we.y)>0){const qe=gs(ve);qe&&qe.scrollBy({top:we.y,left:we.x})}},[W,he,be,ie,Y])})({activeNode:S!=null?k.get(S):null,config:Fe.layoutShiftCompensation,initialRect:me,measure:ue.draggable.measure});const Oe=nl(Te,ue.draggable.measure,me),xe=nl(Te?Te.parentElement:null),ge=l.useRef({activatorEvent:null,active:null,activeNode:Te,collisionRect:null,collisions:null,droppableRects:K,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),fe=R.getNodeFor((e=ge.current.over)==null?void 0:e.id),Se=function(y){let{measure:W}=y;const[Y,ie]=l.useState(null),de=ko({callback:l.useCallback(ve=>{for(const{target:we}of ve)if(Yn(we)){ie(qe=>{const Be=W(we);return qe?{...qe,width:Be.width,height:Be.height}:Be});break}},[W])}),ce=l.useCallback(ve=>{const we=qs(ve);de?.disconnect(),we&&de?.observe(we),ie(we?W(we):null)},[W,de]),[he,be]=qo(ce);return l.useMemo(()=>({nodeRef:he,rect:Y,setRef:be}),[Y,he,be])}({measure:ue.dragOverlay.measure}),pe=(n=Se.nodeRef.current)!=null?n:Te,Ce=E?(o=Se.rect)!=null?o:Oe:null,Ae=!!(Se.nodeRef.current&&Se.rect),ye=Yi(De=Ae?null:Oe,Mr(De));var De;const Pe=il(pe?Rt(pe):null),$e=function(y){const W=l.useRef(y),Y=jn(ie=>y?ie&&ie!==ol&&y&&W.current&&y.parentNode===W.current.parentNode?ie:Lo(y):ol,[y]);return l.useEffect(()=>{W.current=y},[y]),Y}(E?fe??Te:null),C=function(y,W){W===void 0&&(W=qn);const[Y]=y,ie=il(Y?Rt(Y):null),[de,ce]=l.useState(ll);function he(){ce(()=>y.length?y.map(ve=>ps(ve)?ie:new Rr(W(ve),ve)):ll)}const be=ko({callback:he});return zt(()=>{be?.disconnect(),he(),y.forEach(ve=>be?.observe(ve))},[y]),de}($e),We=Ts(u,{transform:{x:N.x-ye.x,y:N.y-ye.y,scaleX:1,scaleY:1},activatorEvent:Z,active:O,activeNodeRect:Oe,containerNodeRect:xe,draggingNodeRect:Ce,over:ge.current.over,overlayNodeRect:Se.rect,scrollableAncestors:$e,scrollableAncestorRects:C,windowRect:Pe}),nt=ae?vn(ae,N):null,Ke=function(y){const[W,Y]=l.useState(null),ie=l.useRef(y),de=l.useCallback(ce=>{const he=sr(ce.target);he&&Y(be=>be?(be.set(he,qr(he)),new Map(be)):null)},[]);return l.useEffect(()=>{const ce=ie.current;if(y!==ce){he(ce);const be=y.map(ve=>{const we=sr(ve);return we?(we.addEventListener("scroll",de,{passive:!0}),[we,qr(we)]):null}).filter(ve=>ve!=null);Y(be.length?new Map(be):null),ie.current=y}return()=>{he(y),he(ce)};function he(be){be.forEach(ve=>{const we=sr(ve);we?.removeEventListener("scroll",de)})}},[de,y]),l.useMemo(()=>y.length?W?Array.from(W.values()).reduce((ce,he)=>vn(ce,he),Ot):ws(y):Ot,[y,W])}($e),ee=rl(Ke),_e=rl(Ke,[Oe]),Ve=vn(We,ee),Me=Ce?Xc(Ce,We):null,Le=O&&Me?f({active:O,collisionRect:Me,droppableRects:K,droppableContainers:oe,pointerCoordinates:nt}):null,Ie=us(Le,"id"),[L,se]=l.useState(null),U=function(y,W,Y){return{...y,scaleX:W&&Y?W.width/Y.width:1,scaleY:W&&Y?W.height/Y.height:1}}(Ae?We:vn(We,_e),(r=L?.rect)!=null?r:null,Oe),J=l.useRef(null),m=l.useCallback((y,W)=>{let{sensor:Y,options:ie}=W;if(j.current==null)return;const de=k.get(j.current);if(!de)return;const ce=y.nativeEvent,he=new Y({active:j.current,activeNode:de,event:ce,options:ie,context:ge,onAbort(ve){if(!k.get(ve))return;const{onDragAbort:we}=M.current,qe={id:ve};we?.(qe),$({type:"onDragAbort",event:qe})},onPending(ve,we,qe,Be){if(!k.get(ve))return;const{onDragPending:ze}=M.current,Ze={id:ve,constraint:we,initialCoordinates:qe,offset:Be};ze?.(Ze),$({type:"onDragPending",event:Ze})},onStart(ve){const we=j.current;if(we==null)return;const qe=k.get(we);if(!qe)return;const{onDragStart:Be}=M.current,ze={activatorEvent:ce,active:{id:we,data:qe.data,rect:G}};Wt.unstable_batchedUpdates(()=>{Be?.(ze),F(Ut.Initializing),I({type:pt.DragStart,initialCoordinates:ve,active:we}),$({type:"onDragStart",event:ze}),B(J.current),P(ce)})},onMove(ve){I({type:pt.DragMove,coordinates:ve})},onEnd:be(pt.DragEnd),onCancel:be(pt.DragCancel)});function be(ve){return async function(){const{active:we,collisions:qe,over:Be,scrollAdjustedTranslate:ze}=ge.current;let Ze=null;if(we&&ze){const{cancelDrop:He}=M.current;Ze={activatorEvent:ce,active:we,collisions:qe,delta:ze,over:Be},ve===pt.DragEnd&&typeof He=="function"&&await Promise.resolve(He(Ze))&&(ve=pt.DragCancel)}j.current=null,Wt.unstable_batchedUpdates(()=>{I({type:ve}),F(Ut.Uninitialized),se(null),B(null),P(null),J.current=null;const He=ve===pt.DragEnd?"onDragEnd":"onDragCancel";if(Ze){const Ye=M.current[He];Ye?.(Ze),$({type:He,event:Ze})}})}}J.current=he},[k]),_=l.useCallback((y,W)=>(Y,ie)=>{const de=Y.nativeEvent,ce=k.get(ie);if(j.current!==null||!ce||de.dndKit||de.defaultPrevented)return;const he={active:ce};y(Y,W.options,he)===!0&&(de.dndKit={capturedBy:W.sensor},j.current=ie,m(Y,W))},[k,m]),A=function(y,W){return l.useMemo(()=>y.reduce((Y,ie)=>{const{sensor:de}=ie;return[...Y,...de.activators.map(ce=>({eventName:ce.eventName,handler:W(ce.handler,ie)}))]},[]),[y,W])}(c,_);(function(y){l.useEffect(()=>{if(!Fo)return;const W=y.map(Y=>{let{sensor:ie}=Y;return ie.setup==null?void 0:ie.setup()});return()=>{for(const Y of W)Y?.()}},y.map(W=>{let{sensor:Y}=W;return Y}))})(c),zt(()=>{Oe&&v===Ut.Initializing&&F(Ut.Initialized)},[Oe,v]),l.useEffect(()=>{const{onDragMove:y}=M.current,{active:W,activatorEvent:Y,collisions:ie,over:de}=ge.current;if(!W||!Y)return;const ce={active:W,activatorEvent:Y,collisions:ie,delta:{x:Ve.x,y:Ve.y},over:de};Wt.unstable_batchedUpdates(()=>{y?.(ce),$({type:"onDragMove",event:ce})})},[Ve.x,Ve.y]),l.useEffect(()=>{const{active:y,activatorEvent:W,collisions:Y,droppableContainers:ie,scrollAdjustedTranslate:de}=ge.current;if(!y||j.current==null||!W||!de)return;const{onDragOver:ce}=M.current,he=ie.get(Ie),be=he&&he.rect.current?{id:he.id,rect:he.rect.current,data:he.data,disabled:he.disabled}:null,ve={active:y,activatorEvent:W,collisions:Y,delta:{x:de.x,y:de.y},over:be};Wt.unstable_batchedUpdates(()=>{se(be),ce?.(ve),$({type:"onDragOver",event:ve})})},[Ie]),zt(()=>{ge.current={activatorEvent:Z,active:O,activeNode:Te,collisionRect:Me,collisions:Le,droppableRects:K,draggableNodes:k,draggingNode:pe,draggingNodeRect:Ce,droppableContainers:R,over:L,scrollableAncestors:$e,scrollAdjustedTranslate:Ve},G.current={initial:Ce,translated:Me}},[O,Te,Le,Me,k,pe,Ce,K,R,L,$e,Ve]),sd({...Fe,delta:N,draggingRect:Me,pointerCoordinates:nt,scrollableAncestors:$e,scrollableAncestorRects:C});const x=l.useMemo(()=>({active:O,activeNode:Te,activeNodeRect:Oe,activatorEvent:Z,collisions:Le,containerNodeRect:xe,dragOverlay:Se,draggableNodes:k,droppableContainers:R,droppableRects:K,over:L,measureDroppableContainers:le,scrollableAncestors:$e,scrollableAncestorRects:C,measuringConfiguration:ue,measuringScheduled:Re,windowRect:Pe}),[O,Te,Oe,Z,Le,xe,Se,k,R,K,L,le,$e,C,ue,Re,Pe]),V=l.useMemo(()=>({activatorEvent:Z,activators:A,active:O,activeNodeRect:Oe,ariaDescribedById:{draggable:H},dispatch:I,draggableNodes:k,over:L,measureDroppableContainers:le}),[Z,A,O,Oe,I,H,k,L,le]);return l.createElement(as.Provider,{value:D},l.createElement(Jn.Provider,{value:V},l.createElement(Es.Provider,{value:x},l.createElement(zo.Provider,{value:U},d)),l.createElement(fd,{disabled:s?.restoreFocus===!1})),l.createElement($c,{...s,hiddenTextDescribedById:H}))}),vd=l.createContext(null),sl="button";function wd(t){let{id:e,data:n,disabled:o=!1,attributes:r}=t;const i=Xn("Draggable"),{activators:s,activatorEvent:a,active:d,activeNodeRect:c,ariaDescribedById:f,draggableNodes:h,over:u}=l.useContext(Jn),{role:w=sl,roleDescription:b="draggable",tabIndex:q=0}=r??{},I=d?.id===e,$=l.useContext(I?zo:vd),[D,v]=qo(),[F,E]=qo(),S=function(N,R){return l.useMemo(()=>N.reduce((T,G)=>{let{eventName:O,handler:j}=G;return T[O]=z=>{j(z,R)},T},{}),[N,R])}(s,e),k=Gn(n);return zt(()=>(h.set(e,{id:e,key:i,node:D,activatorNode:F,data:k}),()=>{const N=h.get(e);N&&N.key===i&&h.delete(e)}),[h,e]),{active:d,activatorEvent:a,activeNodeRect:c,attributes:l.useMemo(()=>({role:w,tabIndex:q,"aria-disabled":o,"aria-pressed":!(!I||w!==sl)||void 0,"aria-roledescription":b,"aria-describedby":f.draggable}),[o,w,q,I,b,f.draggable]),isDragging:I,listeners:o?void 0:S,node:D,over:u,setNodeRef:v,setActivatorNodeRef:E,transform:$}}function Ms(){return l.useContext(Es)}const yd={timeout:25};function bd(t){let{animation:e,children:n}=t;const[o,r]=l.useState(null),[i,s]=l.useState(null),a=Ro(n);return n||o||!a||r(a),zt(()=>{if(!i)return;const d=o?.key,c=o?.props.id;d!=null&&c!=null?Promise.resolve(e(c,i)).then(()=>{r(null)}):r(null)},[e,o,i]),l.createElement(l.Fragment,null,n,o?l.cloneElement(o,{ref:s}):null)}const xd={x:0,y:0,scaleX:1,scaleY:1};function Cd(t){let{children:e}=t;return l.createElement(Jn.Provider,{value:Rs},l.createElement(zo.Provider,{value:xd},e))}const Sd={position:"fixed",touchAction:"none"},qd=t=>Ao(t)?"transform 250ms ease":void 0,Rd=l.forwardRef((t,e)=>{let{as:n,activatorEvent:o,adjustScale:r,children:i,className:s,rect:a,style:d,transform:c,transition:f=qd}=t;if(!a)return null;const h=r?c:{...c,scaleX:1,scaleY:1},u={...Sd,width:a.width,height:a.height,top:a.top,left:a.left,transform:tn.Transform.toString(h),transformOrigin:r&&o?Uc(o,a):void 0,transition:typeof f=="function"?f(o):f,...d};return l.createElement(n,{className:s,style:u,ref:e},i)}),Ed=t=>e=>{let{active:n,dragOverlay:o}=e;const r={},{styles:i,className:s}=t;if(i!=null&&i.active)for(const[a,d]of Object.entries(i.active))d!==void 0&&(r[a]=n.node.style.getPropertyValue(a),n.node.style.setProperty(a,d));if(i!=null&&i.dragOverlay)for(const[a,d]of Object.entries(i.dragOverlay))d!==void 0&&o.node.style.setProperty(a,d);return s!=null&&s.active&&n.node.classList.add(s.active),s!=null&&s.dragOverlay&&o.node.classList.add(s.dragOverlay),function(){for(const[a,d]of Object.entries(r))n.node.style.setProperty(a,d);s!=null&&s.active&&n.node.classList.remove(s.active)}},ks={duration:250,easing:"ease",keyframes:t=>{let{transform:{initial:e,final:n}}=t;return[{transform:tn.Transform.toString(e)},{transform:tn.Transform.toString(n)}]},sideEffects:Ed({styles:{active:{opacity:"0"}}})};function Td(t){let{config:e,draggableNodes:n,droppableContainers:o,measuringConfiguration:r}=t;return Do((i,s)=>{if(e===null)return;const a=n.get(i);if(!a)return;const d=a.node.current;if(!d)return;const c=qs(s);if(!c)return;const{transform:f}=Rt(s).getComputedStyle(s),h=hs(f);if(!h)return;const u=typeof e=="function"?e:function(w){const{duration:b,easing:q,sideEffects:I,keyframes:$}={...ks,...w};return D=>{let{active:v,dragOverlay:F,transform:E,...S}=D;if(!b)return;const k={x:F.rect.left-v.rect.left,y:F.rect.top-v.rect.top},N={scaleX:E.scaleX!==1?v.rect.width*E.scaleX/F.rect.width:1,scaleY:E.scaleY!==1?v.rect.height*E.scaleY/F.rect.height:1},R={x:E.x-k.x,y:E.y-k.y,...N},T=$({...S,active:v,dragOverlay:F,transform:{initial:E,final:R}}),[G]=T,O=T[T.length-1];if(JSON.stringify(G)===JSON.stringify(O))return;const j=I?.({active:v,dragOverlay:F,...S}),z=F.node.animate(T,{duration:b,easing:q,fill:"forwards"});return new Promise(B=>{z.onfinish=()=>{j?.(),B()}})}}(e);return ys(d,r.draggable.measure),u({active:{id:i,data:a.data,node:d,rect:r.draggable.measure(d)},draggableNodes:n,dragOverlay:{node:s,rect:r.dragOverlay.measure(c)},droppableContainers:o,measuringConfiguration:r,transform:h})})}let al=0;function Md(t){return l.useMemo(()=>{if(t!=null)return al++,al},[t])}const kd=l.memo(t=>{let{adjustScale:e=!1,children:n,dropAnimation:o,style:r,transition:i,modifiers:s,wrapperElement:a="div",className:d,zIndex:c=999}=t;const{activatorEvent:f,active:h,activeNodeRect:u,containerNodeRect:w,draggableNodes:b,droppableContainers:q,dragOverlay:I,over:$,measuringConfiguration:D,scrollableAncestors:v,scrollableAncestorRects:F,windowRect:E}=Ms(),S=l.useContext(zo),k=Md(h?.id),N=Ts(s,{activatorEvent:f,active:h,activeNodeRect:u,containerNodeRect:w,draggingNodeRect:I.rect,over:$,overlayNodeRect:I.rect,scrollableAncestors:v,scrollableAncestorRects:F,transform:S,windowRect:E}),R=Mr(u),T=Td({config:o,draggableNodes:b,droppableContainers:q,measuringConfiguration:D}),G=R?I.setRef:void 0;return l.createElement(Cd,null,l.createElement(bd,{animation:T},h&&k?l.createElement(Rd,{key:k,id:h.id,ref:G,as:a,activatorEvent:f,adjustScale:e,className:d,transition:i,rect:R,style:{zIndex:c,...r},transform:N},n):null))});function Ur(t,e,n){const o=t.slice();return o.splice(n<0?o.length+n:n,0,o.splice(e,1)[0]),o}function _d(t,e){return t.reduce((n,o,r)=>{const i=e.get(o);return i&&(n[r]=i),n},Array(t.length))}function mo(t){return t!==null&&t>=0}const fo={scaleX:1,scaleY:1},Id=t=>{var e;let{rects:n,activeNodeRect:o,activeIndex:r,overIndex:i,index:s}=t;const a=(e=n[r])!=null?e:o;if(!a)return null;const d=function(c,f,h){const u=c[f],w=c[f-1],b=c[f+1];return!u||!w&&!b?0:h<f?w?u.left-(w.left+w.width):b.left-(u.left+u.width):b?b.left-(u.left+u.width):u.left-(w.left+w.width)}(n,s,r);if(s===r){const c=n[i];return c?{x:r<i?c.left+c.width-(a.left+a.width):c.left-a.left,y:0,...fo}:null}return s>r&&s<=i?{x:-a.width-d,y:0,...fo}:s<r&&s>=i?{x:a.width+d,y:0,...fo}:{x:0,y:0,...fo}},Wr=t=>{let{rects:e,activeIndex:n,overIndex:o,index:r}=t;const i=Ur(e,o,n),s=e[r],a=i[r];return a&&s?{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}:null},_s="Sortable",Is=l.createContext({activeIndex:-1,containerId:_s,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Wr,disabled:{draggable:!1,droppable:!1}});function Fd(t){let{children:e,id:n,items:o,strategy:r=Wr,disabled:i=!1}=t;const{active:s,dragOverlay:a,droppableRects:d,over:c,measureDroppableContainers:f}=Ms(),h=Xn(_s,n),u=a.rect!==null,w=l.useMemo(()=>o.map(S=>typeof S=="object"&&"id"in S?S.id:S),[o]),b=s!=null,q=s?w.indexOf(s.id):-1,I=c?w.indexOf(c.id):-1,$=l.useRef(w),D=!function(S,k){if(S===k)return!0;if(S.length!==k.length)return!1;for(let N=0;N<S.length;N++)if(S[N]!==k[N])return!1;return!0}(w,$.current),v=I!==-1&&q===-1||D,F=function(S){return typeof S=="boolean"?{draggable:S,droppable:S}:S}(i);zt(()=>{D&&b&&f(w)},[D,w,b,f]),l.useEffect(()=>{$.current=w},[w]);const E=l.useMemo(()=>({activeIndex:q,containerId:h,disabled:F,disableTransforms:v,items:w,overIndex:I,useDragOverlay:u,sortedRects:_d(w,d),strategy:r}),[q,h,F.draggable,F.droppable,v,w,I,d,u,r]);return l.createElement(Is.Provider,{value:E},e)}const Dd=t=>{let{id:e,items:n,activeIndex:o,overIndex:r}=t;return Ur(n,o,r).indexOf(e)},Ad=t=>{let{containerId:e,isSorting:n,wasDragging:o,index:r,items:i,newIndex:s,previousItems:a,previousContainerId:d,transition:c}=t;return!(!c||!o)&&(a===i||r!==s)&&(!!n||s!==r&&e===d)},Ld={duration:200,easing:"ease"},Fs="transform",zd=tn.Transition.toString({property:Fs,duration:0,easing:"linear"}),Od={roleDescription:"sortable"};function jd(t){let{animateLayoutChanges:e=Ad,attributes:n,disabled:o,data:r,getNewIndex:i=Dd,id:s,strategy:a,resizeObserverConfig:d,transition:c=Ld}=t;const{items:f,containerId:h,activeIndex:u,disabled:w,disableTransforms:b,sortedRects:q,overIndex:I,useDragOverlay:$,strategy:D}=l.useContext(Is),v=function(fe,Se){var pe,Ce;return typeof fe=="boolean"?{draggable:fe,droppable:!1}:{draggable:(pe=fe?.draggable)!=null?pe:Se.draggable,droppable:(Ce=fe?.droppable)!=null?Ce:Se.droppable}}(o,w),F=f.indexOf(s),E=l.useMemo(()=>({sortable:{containerId:h,index:F,items:f},...r}),[h,r,F,f]),S=l.useMemo(()=>f.slice(f.indexOf(s)),[f,s]),{rect:k,node:N,isOver:R,setNodeRef:T}=function(fe){let{data:Se,disabled:pe=!1,id:Ce,resizeObserverConfig:Ae}=fe;const ye=Xn("Droppable"),{active:De,dispatch:Pe,over:$e,measureDroppableContainers:C}=l.useContext(Jn),We=l.useRef({disabled:pe}),nt=l.useRef(!1),Ke=l.useRef(null),ee=l.useRef(null),{disabled:_e,updateMeasurementsFor:Ve,timeout:Me}={...yd,...Ae},Le=Gn(Ve??Ce),Ie=ko({callback:l.useCallback(()=>{nt.current?(ee.current!=null&&clearTimeout(ee.current),ee.current=setTimeout(()=>{C(Array.isArray(Le.current)?Le.current:[Le.current]),ee.current=null},Me)):nt.current=!0},[Me]),disabled:_e||!De}),L=l.useCallback((m,_)=>{Ie&&(_&&(Ie.unobserve(_),nt.current=!1),m&&Ie.observe(m))},[Ie]),[se,U]=qo(L),J=Gn(Se);return l.useEffect(()=>{Ie&&se.current&&(Ie.disconnect(),nt.current=!1,Ie.observe(se.current))},[se,Ie]),l.useEffect(()=>(Pe({type:pt.RegisterDroppable,element:{id:Ce,key:ye,disabled:pe,node:se,rect:Ke,data:J}}),()=>Pe({type:pt.UnregisterDroppable,key:ye,id:Ce})),[Ce]),l.useEffect(()=>{pe!==We.current.disabled&&(Pe({type:pt.SetDroppableDisabled,id:Ce,key:ye,disabled:pe}),We.current.disabled=pe)},[Ce,ye,pe,Pe]),{active:De,rect:Ke,isOver:$e?.id===Ce,node:se,over:$e,setNodeRef:U}}({id:s,data:E,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...d}}),{active:G,activatorEvent:O,activeNodeRect:j,attributes:z,setNodeRef:B,listeners:Z,isDragging:P,over:M,setActivatorNodeRef:H,transform:oe}=wd({id:s,data:E,attributes:{...Od,...n},disabled:v.draggable}),ue=function(){for(var fe=arguments.length,Se=new Array(fe),pe=0;pe<fe;pe++)Se[pe]=arguments[pe];return l.useMemo(()=>Ce=>{Se.forEach(Ae=>Ae(Ce))},Se)}(T,B),te=!!G,K=te&&!b&&mo(u)&&mo(I),le=!$&&P,Re=le&&K?oe:null,Te=K?Re??(a??D)({rects:q,activeNodeRect:j,activeIndex:u,overIndex:I,index:F}):null,ae=mo(u)&&mo(I)?i({id:s,items:f,activeIndex:u,overIndex:I}):F,Fe=G?.id,me=l.useRef({activeId:Fe,items:f,newIndex:ae,containerId:h}),Oe=f!==me.current.items,xe=e({active:G,containerId:h,isDragging:P,isSorting:te,id:s,index:F,items:f,newIndex:me.current.newIndex,previousItems:me.current.items,previousContainerId:me.current.containerId,transition:c,wasDragging:me.current.activeId!=null}),ge=function(fe){let{disabled:Se,index:pe,node:Ce,rect:Ae}=fe;const[ye,De]=l.useState(null),Pe=l.useRef(pe);return zt(()=>{if(!Se&&pe!==Pe.current&&Ce.current){const $e=Ae.current;if($e){const C=qn(Ce.current,{ignoreTransform:!0}),We={x:$e.left-C.left,y:$e.top-C.top,scaleX:$e.width/C.width,scaleY:$e.height/C.height};(We.x||We.y)&&De(We)}}pe!==Pe.current&&(Pe.current=pe)},[Se,pe,Ce,Ae]),l.useEffect(()=>{ye&&De(null)},[ye]),ye}({disabled:!xe,index:F,node:N,rect:k});return l.useEffect(()=>{te&&me.current.newIndex!==ae&&(me.current.newIndex=ae),h!==me.current.containerId&&(me.current.containerId=h),f!==me.current.items&&(me.current.items=f)},[te,ae,h,f]),l.useEffect(()=>{if(Fe===me.current.activeId)return;if(Fe!=null&&me.current.activeId==null)return void(me.current.activeId=Fe);const fe=setTimeout(()=>{me.current.activeId=Fe},50);return()=>clearTimeout(fe)},[Fe]),{active:G,activeIndex:u,attributes:z,data:E,rect:k,index:F,newIndex:ae,items:f,isOver:R,isSorting:te,isDragging:P,listeners:Z,node:N,overIndex:I,over:M,setNodeRef:ue,setActivatorNodeRef:H,setDroppableNodeRef:T,setDraggableNodeRef:B,transform:ge??Te,transition:function(){if(ge||Oe&&me.current.newIndex===F)return zd;if(!(le&&!Ao(O)||!c)&&(te||xe))return tn.Transition.toString({...c,property:Fs})}()}}function _o(t){if(!t)return!1;const e=t.data.current;return!!(e&&"sortable"in e&&typeof e.sortable=="object"&&"containerId"in e.sortable&&"items"in e.sortable&&"index"in e.sortable)}const Nd=[tt.Down,tt.Right,tt.Up,tt.Left],Pd=(t,e)=>{let{context:{active:n,collisionRect:o,droppableRects:r,droppableContainers:i,over:s,scrollableAncestors:a}}=e;if(Nd.includes(t.code)){if(t.preventDefault(),!n||!o)return;const d=[];i.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const u=r.get(h.id);if(u)switch(t.code){case tt.Down:o.top<u.top&&d.push(h);break;case tt.Up:o.top>u.top&&d.push(h);break;case tt.Left:o.left>u.left&&d.push(h);break;case tt.Right:o.left<u.left&&d.push(h)}});const c=(h=>{let{collisionRect:u,droppableRects:w,droppableContainers:b}=h;const q=Ki(u),I=[];for(const $ of b){const{id:D}=$,v=w.get(D);if(v){const F=Ki(v),E=q.reduce((k,N,R)=>k+cs(F[R],N),0),S=Number((E/4).toFixed(4));I.push({id:D,data:{droppableContainer:$,value:S}})}}return I.sort(ds)})({collisionRect:o,droppableRects:r,droppableContainers:d});let f=us(c,"id");if(f===s?.id&&c.length>1&&(f=c[1].id),f!=null){const h=i.get(n.id),u=i.get(f),w=u?r.get(u.id):null,b=u?.node.current;if(b&&w&&h&&u){const q=Lo(b).some((F,E)=>a[E]!==F),I=cl(h,u),$=function(F,E){return!_o(F)||!_o(E)||!cl(F,E)?!1:F.data.current.sortable.index<E.data.current.sortable.index}(h,u),D=q||!I?{x:0,y:0}:{x:$?o.width-w.width:0,y:$?o.height-w.height:0},v={x:w.left,y:w.top};return D.x&&D.y?v:Kn(v,D)}}}};function cl(t,e){return!(!_o(t)||!_o(e))&&t.data.current.sortable.containerId===e.data.current.sortable.containerId}const Bd=t=>{let{transform:e}=t;return{...e,y:0}},Ds=l.memo(l.forwardRef((t,e)=>{const{children:n,style:o,className:r,index:i,editing:s,editable:a,selectedIndex:d,background:c,activeColor:f,borderColor:h,borderWidth:u,dragging:w,...b}=t;return g.jsxs("div",{ref:e,className:kt(r),style:{...o,display:"flex",flexDirection:"column",background:d===i?"white":c,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:d===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...b,children:[g.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[g.jsx("div",{style:{marginLeft:d===i?"0px":"-1px",marginTop:d===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,d===i?g.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):g.jsx(g.Fragment,{})]}),g.jsx("div",{style:{flex:"1 1 100%",background:d===i&&f?f?.toCSS():"none",minHeight:"2px"}})]})})),Lt={Wrapper:"_Wrapper_1wyun_25",fadeIn:"_fadeIn_1wyun_33",dragOverlay:"_dragOverlay_1wyun_37",Item:"_Item_1wyun_47",withHandle:"_withHandle_1wyun_61",dragging:"_dragging_1wyun_66",disabled:"_disabled_1wyun_74"},Gr=l.memo(l.forwardRef(({color:t,dragOverlay:e,dragging:n,disabled:o,fadeIn:r,handle:i,height:s,index:a,listeners:d,onRemove:c,renderItem:f,sorting:h,style:u,transition:w,transform:b,value:q,wrapperStyle:I,...$},D)=>{l.useEffect(()=>{if(e)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[e]);const v=f?f({dragOverlay:!!e,dragging:!!n,sorting:!!h,index:a,fadeIn:!!r,listeners:d,ref:D,style:u,transform:b,transition:w,value:q}):g.jsx(g.Fragment,{children:q});return g.jsx("div",{className:kt("tab-item",Lt.Wrapper,r&&Lt.fadeIn,h&&Lt.sorting,e&&Lt.dragOverlay),style:{...I,transition:[w,I?.transition].filter(Boolean).join(", "),"--translate-x":b?`${Math.round(b.x)}px`:void 0,"--translate-y":b?`${Math.round(b.y)}px`:void 0,"--scale-x":b?.scaleX?`${b.scaleX}`:void 0,"--scale-y":b?.scaleY?`${b.scaleY}`:void 0,"--index":a},ref:D,children:g.jsx("div",{className:kt(Lt.Item,n&&Lt.dragging,i&&Lt.withHandle,e&&Lt.dragOverlay,o&&Lt.disabled,t&&Lt.color,"dragging"),style:u,"data-cypress":"draggable-item",...i?void 0:d,...$,tabIndex:i?void 0:-1,children:v})})})),dl={Row:"_Row_1kr10_1"},As=l.memo(l.forwardRef(({children:t,horizontal:e,style:n},o)=>g.jsx("div",{ref:o,style:{...n},className:kt(dl.Row,e&&dl.horizontal),children:t}))),Vd={...ks},Hd=l.memo(l.forwardRef((t,e)=>{const{className:n,activationConstraint:o,animateLayoutChanges:r,adjustScale:i=!1,collisionDetection:s=Gc,coordinateGetter:a=Pd,dropAnimation:d=Vd,getItemStyles:c=()=>({}),getNewIndex:f,handle:h=!1,items:u,onMove:w,isDisabled:b=()=>!1,measuring:q,modifiers:I,renderItem:$,renderDivider:D,reorderItems:v=Ur,strategy:F=Wr,style:E,useDragOverlay:S=!0,onDragStart:k,wrapperStyle:N=()=>({})}=t,[R,T]=l.useState(()=>u);l.useEffect(()=>{T(u)},[u]);const[G,O]=l.useState(null),j=function(){for(var M=arguments.length,H=new Array(M),oe=0;oe<M;oe++)H[oe]=arguments[oe];return l.useMemo(()=>[...H].filter(ue=>ue!=null),[...H])}(lr(Cs,{activationConstraint:o}),lr(Ss,{activationConstraint:o}),lr(Hr,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:a})),z=R.indexOf.bind(R),B=G?z(G):-1,Z=[];R.map((M,H)=>{Z.push(g.jsx($d,{id:M,handle:h,index:H,style:c,wrapperStyle:N,disabled:b(M),renderItem:$,animateLayoutChanges:r,useDragOverlay:S,getNewIndex:f},M+"-"+H));const oe=D?.({key:"divider-"+H});oe&&Z.push(oe)});const{getPortalContainer:P}=Ol();return g.jsxs(pd,{sensors:j,collisionDetection:s,onDragStart:M=>{const{active:H}=M;H&&(k?.(M),O(H.id))},autoScroll:{canScroll:M=>!0},onDragEnd:M=>{if(O(null),M.over){const H=z(M.over.id);B!==H&&(T(oe=>v(oe,B,H)),w?.(B,H))}},onDragCancel:()=>{O(null)},measuring:q,modifiers:I,children:[g.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...E},className:kt(n,Lt.Wrapper),children:g.jsx(Fd,{items:R,strategy:F,children:g.jsx(As,{ref:e,children:Z})})}),S?Wt.createPortal(g.jsx(kd,{adjustScale:i,dropAnimation:d,children:G?g.jsx(Gr,{value:R[B],handle:h,renderItem:$,wrapperStyle:N({index:B,isDragging:!0,id:R[B]}),index:B,dragging:!0,style:c({id:R[B],index:B,isSorting:G!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),P()):null]})}));function $d({disabled:t,animateLayoutChanges:e,getNewIndex:n,handle:o,id:r,index:i,onRemove:s,style:a,renderItem:d,useDragOverlay:c,wrapperStyle:f}){const{attributes:h,isDragging:u,isSorting:w,listeners:b,overIndex:q,setNodeRef:I,transform:$,transition:D}=jd({id:r,animateLayoutChanges:e,disabled:t,getNewIndex:n});return g.jsx(Gr,{ref:I,value:r,disabled:t,dragging:u,sorting:w,handle:o,renderItem:d,index:i,style:a({index:i,id:r,isDragging:u,isSorting:w,overIndex:q}),onRemove:s?()=>s(r):void 0,transform:$,transition:D,wrapperStyle:f({index:i,isDragging:u,id:r}),listeners:b,"data-index":i,"data-id":r,dragOverlay:!c&&u,...h})}const Ud="_TabStrip_3x0dp_1",Wd=new p.Color("rgb(33, 115, 70)"),Gd="#eee",Kd=t=>g.jsx(Ds,{...t}),Ls=l.memo(l.forwardRef((t,e)=>{const{children:n,style:o,className:r,selectedTabIndex:i=0,tabNames:s=[],onSelectedTabIndexChange:a,onTabNameChange:d,onTabMove:c,createScrollStartButton:f=Ir,createScrollEndButton:h=Fr,createScrollEdgeButton:u=Ml,createTabButton:w=Kd,createTabDivider:b,editLabelProps:q,disabled:I=!1,disableDrag:$=!1,background:D="white",activeColor:v=Wd,borderColor:F=Gd,borderWidth:E=1}=t,[S,k]=l.useState(i),[N,R]=l.useState(s),T=l.useCallback(ye=>{const De=P.current?.[ye]?.closest(".tab-item")??P.current?.[ye];De&&le.current?.scrollTo({top:De.offsetTop,left:De.offsetLeft,behavior:"smooth"})},[]);l.useEffect(()=>{T(i)},[i]);const G=l.useCallback((ye,De)=>{De!==S&&(k(De),a?.(De)),T(De)},[a,S]),O=l.useCallback((ye,De)=>{c?.(ye,De)},[c]),j=l.useRef(null),[z,B]=l.useState(-1),Z=l.useCallback((ye,De)=>{d?.(ye,De)},[d]);l.useLayoutEffect(()=>{k(i)},[i]),l.useLayoutEffect(()=>{R(s)},[s]);const P=l.useRef([]),M=l.useRef(null);l.useImperativeHandle(e,()=>Object.assign({startEdit(ye){P.current?.[ye]?.startEdit()},cancel(ye){P.current?.[ye]?.cancel()}},M.current),[S,z]);const H=l.useCallback(({value:ye,index:De,dragging:Pe})=>{const{style:$e,maxLength:C,...We}=q||{},nt=g.jsx(is,{ref:Ke=>{P.current[De]=Ke},value:ye,disabled:I,maxLength:C,style:{color:S===De&&v?v?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...$e},styleHover:{},onSubmit:Ke=>(j.current=!1,B(-1),Z(De,Ke)),onCancel:()=>{j.current=!1,B(-1)},onChange:Ke=>{j.current=!0,B(De)},...We});return w({onClick:Ke=>G(Ke,De),value:ye,index:De,editing:z===De&&j.current,editable:!0,disabled:I,selectedIndex:S,background:D,activeColor:v,borderColor:F,borderWidth:E,dragging:Pe,children:nt})},[S,Z,G,q,I,z,w]),[oe,{width:ue}]=en(),[te,{width:K}]=en(),le=l.useRef(null),[Re,Te]=l.useState({left:0,top:0,width:0,height:0}),[ae,Fe]=l.useState(null);l.useEffect(()=>{ae!==null&&le.current&&le.current.scrollTo({left:ae,behavior:"smooth"})},[ae]);const me=l.useCallback((ye,De=!1)=>{if(!le.current)return 0;let Pe=le.current.firstChild.getBoundingClientRect(),$e=le.current.firstChild.firstChild.children,C=0;return C=De?0:pr.getScrollTo(ye,Pe.left,$e,!0,Math.max(0,ye-200)),Fe(C),Math.max(0,C)},[]),Oe=l.useCallback((ye,De=!1)=>{if(!le.current)return 0;let Pe=le.current.firstChild.getBoundingClientRect(),$e=le.current.firstChild.firstChild.children,C=0;const We=Math.ceil(K-ue);return C=De?We:pr.getScrollTo(ye,Pe.left,$e,!1,Math.max(0,ye+200)),Fe(C),Math.min(We,C)},[K,ue]),xe=l.useRef(null),ge=l.useRef(null),fe=l.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null,xe.current=null)},[]),Se=l.useCallback((ye,De,Pe=260)=>{xe.current=ye,ge.current=setTimeout(()=>{const $e=De?me(xe.current||ye):Oe(xe.current||ye);$e!==xe.current?Se($e,De,120):fe()},Pe)},[me,Oe,fe]);l.useEffect(()=>()=>fe(),[fe]);const pe=l.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Re.left)<=0||Math.floor(K-ue)===0,orientation:wt.Horizontal,onMouseUp:fe,onMouseLeave:fe,onMouseDown:()=>Se(le.current.scrollLeft,!0),onClick:ye=>me(Math.min(le.current.scrollLeft,ae??Number.MAX_SAFE_INTEGER),ye.ctrlKey)}),[Re,ae,K,ue]),Ce=l.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(K-ue)<=Math.ceil(Re.left),orientation:wt.Horizontal,onMouseUp:fe,onMouseLeave:fe,onMouseDown:()=>Se(le.current.scrollLeft,!1),onClick:ye=>Oe(Math.max(le.current.scrollLeft,ae??0),ye.ctrlKey)}),[Re,ae,K,ue]),Ae=l.useMemo(()=>g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{minWidth:"16px"}}),n,u?.(pe)]}),[pe,Ce,f,h,n,u]);return g.jsxs("div",{style:{...o,display:"flex",alignItems:"stretch"},className:kt(Ud,r),ref:M,children:[g.jsx("div",{style:{borderTop:`solid ${F} ${E}px`,position:"absolute",width:"100%"}}),g.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Ae}),g.jsx("div",{className:"Tabs",ref:oe,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:g.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:le,onScroll:ye=>{Te({left:ye.target.scrollLeft,top:ye.target.scrollTop,width:ye.target.scrollWidth,height:ye.target.scrollHeight})},children:g.jsx(Hd,{isDisabled:ye=>I||$,items:N,strategy:Id,modifiers:[Bd],ref:te,renderItem:H,renderDivider:b,onMove:O,activationConstraint:{distance:15}})})}),g.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:u(Ce)})]})}));Ls.displayName="TabStrip";const dr=l.createContext(null),Zd="_script-editor_iy654_5",Yd=l.lazy(()=>Promise.resolve().then(()=>require("./CGI2BcTiIO1cJwAK.cjs"))),Xd={lightbulb:{enabled:!1},tabSize:2,acceptSuggestionOnCommitCharacter:!0,acceptSuggestionOnEnter:"on",accessibilitySupport:"auto",automaticLayout:!0,autoIndent:!1,codeLens:!0,colorDecorators:!0,contextmenu:!0,cursorBlinking:"blink",cursorSmoothCaretAnimation:!1,cursorStyle:"line",disableLayerHinting:!1,disableMonospaceOptimizations:!1,dragAndDrop:!0,glyphMargin:!0,fixedOverflowWidgets:!1,folding:!0,foldingStrategy:"auto",fontLigatures:!1,formatOnPaste:!0,formatOnType:!1,hideCursorInOverviewRuler:!1,highlightActiveIndentGuide:!0,links:!0,lineDecorationsWidth:8,lineNumbersMinChars:3,mouseWheelZoom:!1,multiCursorMergeOverlapping:!0,multiCursorModifier:"alt",overviewRulerBorder:!0,overviewRulerLanes:2,quickSuggestions:!0,quickSuggestionsDelay:100,readOnly:!1,renderControlCharacters:!1,renderFinalNewline:!0,renderIndentGuides:!0,renderLineHighlight:"all",renderWhitespace:"none",revealHorizontalRightPadding:30,roundedSelection:!0,rulers:[],scrollBeyondLastColumn:5,scrollBeyondLastLine:!0,selectOnLineNumbers:!0,selectionClipboard:!0,selectionHighlight:!0,showLightbulbIconMode:!1,showFoldingControls:"mouseover",smoothScrolling:!0,suggestOnTriggerCharacters:!0,wordBasedSuggestions:!0,wordSeparators:`~!@#$%^&*()-=+[{]}|;:'",.<>/?`,wordWrap:"off",wordWrapBreakAfterCharacters:" })]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},ul=async(t,e,n)=>{const o=t.getModel();if(!o)return;const r=await e.languages.typescript.getTypeScriptWorker(),i=await r(o.uri),s=await i.getNavigationTree(o.uri.toString()),a=t.getPosition();let d={...a};d.lineNumber=1,d.column=1;let c=!1;for(let q=a.lineNumber;q>=1;q--)if(o.getLineContent(q).trim()===""){const I=Kr(s,o.getOffsetAt({lineNumber:q,column:1}),"function");if(!I||Qd(I)){c=!0,d.lineNumber=q+1;break}{const $=I.spans[0].start;q=o.getPositionAt($).lineNumber,d.lineNumber=q}}let f=n,h=!1;!c&&!f.startsWith(`
|
|
35
35
|
`)&&d.lineNumber>1&&(f=`
|
|
36
36
|
`+f,h=!0);let u=!1;o.getLineCount()>1&&(f.endsWith(`
|
|
37
37
|
|
|
38
38
|
`)||(f+=`
|
|
39
39
|
|
|
40
|
-
`,u=!0));const w=[{range:new e.Range(d.lineNumber,d.column,d.lineNumber,d.column),text:`${f}`}];let b=null;o.pushEditOperations([],w,q=>(b=q[0].range,h&&b.startLineNumber++,u&&b.endLineNumber--,[new e.Selection(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn)])),t.setSelection({startLineNumber:b.endLineNumber,startColumn:b.endColumn,endLineNumber:b.startLineNumber,endColumn:b.startColumn})};function Jd(t,e){let n=null;for(let o=0;!n&&o<t.length;o++){const r=t[o];r.getName()===e.text&&(n=r)}return n?n.getContext():"formula"}function kr(t,e,n,o,r=[]){if(o.kind==="function"&&o.kindModifiers==="export"){const i=o.spans[0].start,s=t.getPositionAt(i);r.push({name:o.text,type:Jd(n,o),lineNumber:s.lineNumber})}if(o.childItems)for(const i of o.childItems)kr(t,e,n,i,r);return r}function Kr(t,e,n="function",o){const r=t.spans;for(let i=0;i<r.length;i++){const s=r[i];if(s.start<=e&&e<s.start+s.length){if(t.kind===n&&(!o||t.kindModifiers===o))return t;for(const a of t.childItems||[]){const d=Kr(a,e,n,o);if(d)return d}}return null}}function Qd(t){return t.kind==="comment"}const eu=l.memo(l.forwardRef((t,e)=>{const{className:n,style:o,commands:r,readOnly:i=!1,onClose:s,darkMode:a,loadingPanel:d,autoFocus:c=!0,onStatusChange:f,...h}=t,u=l.useRef(null),w=X(s,[s]),b=l.useRef(!1),q=l.useMemo(()=>({contains(M){if(!u.current)return;const H=u.current.editor;return H&&H.getDomNode()?.contains(M)},focus(){if(!u.current)return;const M=u.current.editor;return M&&M.getDomNode()?.focus()}}),[]),I=l.useMemo(()=>[new ne("help",q,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),$=l.useMemo(()=>{let M=null;const H=()=>q;return M=r?r.createChildGroup(H,"scriptEditor",!1):new nn(H,"scriptEditor"),M.addCommands(I,!0),M},[r,I]),D=zr($,["executeSelectedScript"])[0],v=D?.context(),F=X(M=>{D?.execute(M)},[D]),E=l.useRef(""),[S,k]=l.useState(!1),N=X(async()=>{if(!u.current)return null;const M=u.current,H=M.editor;if(!H)return null;const oe=M.monaco,ue=await(async(te,K,le="export")=>{const Re=te.getModel();if(!Re)return null;const Te=await K.languages.typescript.getTypeScriptWorker(),ae=await Te(Re.uri),Fe=await ae.getNavigationTree(Re.uri.toString());let me=null,Oe=te.getSelection();const xe=Oe.startLineNumber===Oe.endLineNumber&&Oe.startColumn===Oe.endColumn?Re.getLineCount():Math.min(Oe.endLineNumber,Re.getLineCount());for(let ge=Oe.startLineNumber;!me&&ge<=xe;ge++){const fe=Kr(Fe,Re.getOffsetAt({lineNumber:ge,column:1}),"function",le);fe&&(me=fe.text)}return me})(H,oe);return f?.({message:(ue??"").toUpperCase()}),ue?{source:H.getValue(),name:ue}:null},[f]),R=X(async(M,H,oe)=>{const ue=await v.getScripts().createModule({source:oe?.getValue(),declarationsOnly:!0}),te=ue?ue.getFunctions().search():Ue.EmptyArray;ue&&(async function(K,le){const Re=[];for(let Te=1;Te<K.getLineCount()+1;Te++){const ae={startLineNumber:Te,startColumn:1,endLineNumber:Te,endColumn:K.getLineLength(Te)+1},Fe=K.getValueInRange(ae).indexOf("modelt");Fe!==-1&&Re.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:le.MarkerSeverity.Hint,startLineNumber:ae.startLineNumber,startColumn:Fe+1,endLineNumber:ae.startLineNumber,endColumn:Fe+5})}le.editor.setModelMarkers(K,"owner",Re)}(M,H),async function(K,le,Re,Te){const ae=await le.languages.typescript.getTypeScriptWorker(),Fe=await ae(K.uri),me=await Fe.getNavigationTree(K.uri.toString()),Oe=kr(K,le,Te,me).map(xe=>{let ge=null,fe=null;return xe.type==="formula"?(ge="formula.margin-icon",fe="Formula"):xe.type==="macro"?(ge="macro.margin-icon",fe="Macro"):xe.type==="autoRun"&&(ge="autorun.margin-icon",fe="Auto Run"),{range:new le.Range(xe.lineNumber,1,xe.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:ge,glyphMarginHoverMessage:fe,stickiness:le.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});j.current&&j.current.clear(),j.current=Re.createDecorationsCollection(Oe)}(M,H,oe,te))},[v]),T=X(Ue.debounce(R,580),[]),G=X(async(M=void 0)=>{if(!u.current||!v)return;const H=u.current.editor.getPosition(),oe={cursor:H?H.toString():""};M!==void 0&&(oe.message=M),f?.(oe);const ue=N();v.setSelectedFunction(ue)},[v,f]);l.useEffect(()=>{if(!v)return;const M={insertSnippet:oe=>{u.current?.editor&&(S?ul(u.current.editor,u.current.monaco,oe):E.current=oe)}};v.setEditor(M),v.setSelectedFunction(N());const H=v.addContainerListener({onBeforeSave:async()=>{if(!u.current?.editor||!v)return;const oe=u.current.editor,ue=v?.getScripts().getModules().getByName("scripting"),te=ue?.getSource(),K=oe.getValue();if(!((te?.length??0)!==K.length||te!==K))return;await v.saveSource(oe.getValue());const le=(te?.length??0)!==K.length||te!==K;f?.({dirty:le})},onReadonlyChange(){},onScriptChange:async()=>{if(!u.current?.editor||!v)return;const oe=u.current.editor,ue=v.getScripts().getModules().search()[0]?.getSource()??"";oe.setValue(ue)}});return()=>{H(),v.setSelectedFunction(null),v.setEditor(null)}},[v,S]),l.useEffect(()=>()=>{if(!u.current?.editor)return;const M=u.current.editor;v?.saveSource(M.getValue())},[]);const O=X(M=>{const H=u.current;if(!H)return!1;const oe=H.editor;return!!oe&&(oe.focus(),!0)},[]),j=l.useRef(null),z=X((M,H)=>{u.current={monaco:H,editor:M},k(!0),G("Loading Types");const oe=v.getScripts().getModules().search()[0]?.getSource()??"";M.setValue(oe),Promise.resolve().then(()=>require("./DLn0plneSe__KkYD.cjs")).then(te=>te.customEditor).then(te=>{G(""),te.AutoTypings.create(M,{shareCache:!0,monaco:H,onError:K=>{K==="Not implemented yet"&&(K="Compile Errors"),console.warn("Error compiling types",K)}}).then(async K=>{const le=M.getModel();T(le,H,M)})}),M.addCommand("executeScript",function(te,...K){K?.[0]&&F({functionName:K?.[0]})},""),M.addAction({id:"executeScript",label:"Execute",keybindings:[H.KeyCode.F8],run:async te=>{const K=N();v.setSelectedFunction(K);const le=await K;F(le)}}),M.addAction({id:"saveScript",label:"Save Script",keybindings:[H.KeyMod.CtrlCmd|H.KeyCode.KeyS],run:te=>{v?.saveSource(M.getValue()).then(()=>{const K=v?.getScripts().getModules().getByName("scripting"),le=K?.getSource(),Re=M.getValue(),Te=(le?.length??0)!==Re.length||le!==Re;f?.({dirty:Te})})}}),M.onMouseDown(async te=>{if(te.target.type===H.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const K=te.target.position.lineNumber,le=await H.languages.typescript.getTypeScriptWorker(),Re=await le(ue.uri),Te=await Re.getNavigationTree(ue.uri.toString()),ae=M?.getValue(),Fe=(await v?.saveSource(ae)).getFunctions().search(),me=kr(ue,H,Fe,Te).find(Oe=>Oe.lineNumber===K);if(me){const Oe=te.event.browserEvent.button;Oe===0?me.type==="macro"||me.type==="autoRun"?F({functionName:me.name}):me.type==="formula"&&v.quickInsertFunction?.(me.name):Oe===2&&(console.log("Context menu for function:",me.name),te.event.browserEvent.preventDefault())}}}),M.onDidChangeModelContent(()=>{const te=M.getModel();T(te,H,M)});const ue=M.getModel();(function(te,K){K.languages.registerInlayHintsProvider("typescript",{provideInlayHints(le,Re,Te){const ae=[];for(let Fe=1;Fe<le.getLineCount()+1;Fe++){const me={startLineNumber:Fe,startColumn:1,endLineNumber:Fe,endColumn:le.getLineLength(Fe)+1},Oe="hint",xe=le.getValueInRange(me).indexOf("hint");xe!==-1&&ae.push({kind:K.languages.InlayHintKind.Type,position:{lineNumber:me.startLineNumber,column:xe+Oe.length+1},label:"[hint]"})}return{hints:ae,dispose:()=>{}}}})})(0,H),ue.onDidChangeContent(te=>{const K=v?.getScripts().getModules().getByName("scripting"),le=K?.getSource(),Re=M.getValue(),Te=(le?.length??0)!==Re.length||le!==Re;f?.({dirty:Te})}),M.onDidChangeCursorPosition(te=>{G()})},[v,f]),B=l.useMemo(()=>S?null:d||g.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[S,d]),Z=l.useMemo(()=>{const M=v?.getScripts().getModules().getByName("scripting")?.getSource()??"";return g.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[g.jsx(l.Suspense,{children:g.jsx(Yd,{theme:a?"extended-dark":"extended",options:{...Xd,fixedOverflowWidgets:!0,readOnly:i},language:"typescript",value:M,onValidate:H=>{let oe=!1;for(let ue=0;!oe&&ue<H?.length;ue++)H[ue].severity===8&&(oe=!0)},beforeMount:H=>{H.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),H.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),H.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),H.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let oe=!1;try{const te=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),K=H.Uri.parse('inmemory://model/"sheetxl-models".d.ts'),le=H.editor.createModel(te,"typescript",K);H.editor.setModelMarkers(le,"default",[]),oe=!0}catch(te){console.warn("cant load types",te)}H.languages.registerLinkProvider("*",{provideLinks:(te,K)=>{const le=[],Re={links:le},Te=te.getLinesContent();for(let ae=1;ae<=Te.length;ae++){const Fe=Te[ae-1],me=H.editor.tokenize(Fe,"typescript");for(let Oe=0;Oe<me[0].length;Oe++){const xe=me[0]?.[Oe];if(xe&&xe.type.startsWith("string")){let ge=xe.offset,fe=me[0]?.[Oe+1]?.offset??Fe.length,Se=new H.Range(ae,ge+1,ae,fe+1),pe=te.getValueInRange(Se);const Ce=pe[0];Ce!=="`"&&Ce!=="'"&&Ce!=='"'||(ge++,pe=pe.substring(1));const Ae=pe[pe.length-1];Ae!=="`"&&Ae!=="'"&&Ae!=='"'||(ge++,pe=pe.substring(0,pe.length-1));try{v.getRanges(pe)&&le.push({range:{endColumn:fe,endLineNumber:ae,startColumn:ge,startLineNumber:ae},tooltip:`Goto range '${pe}'`,url:`/range/${pe}`})}catch(ye){console.warn(ye)}}}}return Re}}),H.editor.registerLinkOpener({open(te){if(te?.path?.startsWith("/range/")){try{v.getRanges(te.path.substring(7))?.select()}catch(K){console.warn("invalid range",K)}return!0}return!1}});const ue=H.languages.typescript.typescriptDefaults.getCompilerOptions();H.languages.typescript.typescriptDefaults.setCompilerOptions({...ue,target:H.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:H.languages.typescript.ModuleResolutionKind.Classic,baseUrl:"inmemory://model/",allowNonTsExtensions:!0}),E.current&&(await ul(u.current.editor,u.current.monaco,E.current),E.current=null),b.current&&requestAnimationFrame(async()=>{b.current&&H.editor.focus()}),H.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),k(!0)})()},onMount:z})}),B]})},[v,$,i,B,a]),P=Ft(e,()=>({isScriptEditorElement:()=>!0,focus:M=>{O(M)},close:()=>{w?.()},getEditor:()=>v?.getEditor()}),[v]);return l.useEffect(()=>(c&&requestAnimationFrame(()=>{O()}),()=>{u.current?.editor&&requestAnimationFrame(()=>{P.current?.contains(document.activeElement)&&O()})}),[]),g.jsx("div",{className:kt("script-editor",Zd,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...o},ref:P,...h,children:Z})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>p.LicenseManager}),exports.ChartAreaIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),g.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),g.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),g.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),g.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),g.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),g.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),g.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),g.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),g.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),g.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),g.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),g.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),g.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),g.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),g.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),g.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),g.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),g.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),g.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=Lc,exports.ChartLineIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),g.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),g.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),g.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),g.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),g.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),g.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),g.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),g.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),g.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),g.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),g.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),g.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),g.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),g.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),g.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),g.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),g.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),g.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),g.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),g.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),g.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),g.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.Command=ne,exports.CommandButtonType={Toolbar:"toolbar",Menuitem:"menuitem"},exports.CommandContext=Ac,exports.CommandGroup=nn,exports.CornerTriangle=Sr,exports.DateUtils=$a,exports.DefaultNotifier=xo,exports.DocThemesContext=dr,exports.DocThemesProvider=t=>{const{themes:e,children:n}=t;return g.jsx(dr.Provider,{value:e,children:n})},exports.EditableLabel=is,exports.EmptyFrame=Rc,exports.FilterButton=Hl,exports.FocusKeyNavigation=_a,exports.FontUtils=Ua,exports.HorizontalAlignment=Rl,exports.Item=Gr,exports.KeyCodes=St,exports.KeyModifiers=Q,exports.LogoNoPaddingIcon=t=>g.jsxs("svg",{...t,viewBox:"0 0 48 48",children:[g.jsx("path",{d:"M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z",fill:"#547DBE"}),g.jsx("path",{d:"m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z",fill:"#FFFFFF"}),g.jsx("path",{d:"m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z",fill:"#547DBE",fillOpacity:"0.4"}),g.jsx("path",{d:"m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z",strokeWidth:"2.5",stroke:"#EB594D",fill:"#f9CECB"})]}),exports.LogoTextNoPaddingIcon=Yl,exports.MouseButtonCodes=_r,exports.MovableArea=Ql,exports.NotificationType=bn,exports.PictureEditor=rs,exports.ReactUtils=Qe,exports.RoundedTab=Ia,exports.Row=As,exports.ScriptEditor=eu,exports.ScrollPane=Ar,exports.ScrollUtils=pr,exports.Scrollbar=Io,exports.ScrollbarOrientation=wt,exports.SheetCellEditor=Ul,exports.SheetCellRenderer=$l,exports.SheetElement=os,exports.SheetScrollbar=Pr,exports.SimpleCommand=Ne,exports.SplitPane=Da,exports.SplitPaneResizer=jl,exports.StaticBorderRenderer=tc,exports.StyledStrokePath=Gl,exports.Tab=Ds,exports.TabStrip=Ls,exports.ToolTipPlacement=hn,exports.VirtualScrollbar=Lr,exports.createCellEditStateFromCell=Wl,exports.defaultCreateScrollCorner=Ll,exports.defaultCreateScrollEdgeButton=Ml,exports.defaultCreateScrollEndButton=Fr,exports.defaultCreateScrollStartButton=Ir,exports.defaultCreateScrollbar=yr,exports.getDevicePixelRatio=function(t){if(typeof window>"u")return 1;const{defaultDpr:e=1,maxDpr:n=3,round:o=!0}=t||{},r=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:e;return Math.min(Math.max(1,o?Math.floor(r):r),n)},exports.getPortalContainer=zl,exports.toShortcutString=gn,exports.useBordersOverlay=Nr,exports.useCallbackRef=X,exports.useCommand=function(t,e=null){const n=l.useRef(e);n.current=e;const[o,r]=l.useReducer(s=>s+1,0),i=l.useMemo(()=>Array.isArray(t)?t:[t],[t]);return l.useEffect(()=>{if(!i||i.length===0)return;const s=(c,f)=>{n.current?.onChange?.(f),r()};let a=null;e&&(a={onExecute(c,f){n.current?.onExecute?.(c,f)},onError(c,f,h){n.current?.onError?.(c,f,h)}});const d=new Set;for(let c=0;c<i.length;c++)d.add(i[c]?.addPropertyListener(Ue.debounce(s,0),!0)),e&&d.add(i[c]?.addExecuteListener(a));return()=>{d.forEach(c=>{c?.()})}},[t]),o},exports.useCommands=zr,exports.useCopyPaste=jr,exports.useDevicePixelRatio=function(t){const[e,n]=l.useState(typeof window<"u"?window.devicePixelRatio:1),o=l.useRef(null);return l.useEffect(()=>{if(!(typeof window<"u"&&"matchMedia"in window))return;const r=()=>{const i=window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);i.addEventListener("change",r,{once:!0,passive:!0}),n(window.devicePixelRatio),o.current={mediaMatcher:i,listener:r}};return r(),()=>{o.current&&o.current.mediaMatcher.removeEventListener("change",o.current.listener)}},[t]),e},exports.useDocThemes=()=>{const t=l.useContext(dr),[e]=l.useState(()=>new p.ThemeCollection);return l.useMemo(()=>t||e,[t])},exports.useEditMode=Gt,exports.useFullscreenPortal=Ol,exports.useGlobalClipboard=Or,exports.useId=Va,exports.useImperativeElement=Ft,exports.useModelListener=it,exports.useMouseDownAndHoldListener=function(t,e){return Si({onPointerDown:t,onPointerMoveOrWait:(n,o,r)=>{t?.(r)},...e})},exports.useMovableCommands=es,exports.useOnClickOrFocusAway=function(t,e,n){const o=X(e,[e]);l.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&o(i)};return n&&n.mouseEvents===!1||(document.addEventListener("mousedown",r),document.addEventListener("touchstart",r)),n&&n.focusEvents===!1||document.addEventListener("focus",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r),document.removeEventListener("focus",r)}},[t])},exports.useRangeListener=(t,e,n,o)=>{const r=l.useRef(n);r.current=n;const i=o?.fireOnAddressChange??!0;l.useEffect(()=>{if(!t||!e||!r.current){const d={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void r.current?.(d)}const s=d=>{r.current?.(d)},a=t.getRange(e).addListener(s,o);if(i){const d=t.getRange(e);s({getSource:()=>d,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{a?.()}},[t,e])},exports.useSheetCommands=Xl,exports.useSheetCopyPaste=Jl,exports.useSynchronizedPointerHandler=Si,exports.useTraceUpdate=function(t,e=!0){const n=l.useRef(t);l.useEffect(()=>{if(e){const o=Object.entries(t).reduce((r,[i,s])=>(n.current[i]!==s&&(r[i]=[n.current[i],s]),r),{});Object.keys(o).length>0&&console.log("Changed props:",o)}n.current=t})},exports.useUndoManager=({manager:t,commands:e,disabled:n,notifier:o=xo})=>{const r=X(s=>{try{t?.undo(s)}catch(a){o.showError?.(a)}},[t]),i=X(s=>{try{t?.redo(s)}catch(a){o.showError?.(a)}},[t]);return l.useMemo(()=>{if(!e)return;const s={contains:d=>!0,focus(){}},a=[new ne("undo",s,{label:"Undo",description:Ri,shortcut:{key:"z",modifiers:[Q.Ctrl]},disabled:!0},r),new ne("redo",s,{label:"Redo",description:Ei,shortcut:[{key:"y",modifiers:[Q.Ctrl]},{key:"F4"},{key:"Enter",modifiers:[Q.Alt]}],disabled:!0},i)];e?.addCommands(a,!0)},[e]),l.useEffect(()=>{if(!e)return;const s=()=>{const d=t?.getTopUndoDescription(),c={};var f;e.getCommand("undo").update({disabled:n||!t||!t.hasUndo(),description:d?(f=d,`Undo ${f}`):Ri,state:c,context:{undoManager:t}});const h=t?.getTopRedoDescription();e.getCommand("redo").update({disabled:n||!t||!t.hasRedo(),description:h?Ha(h):Ei,state:c,context:{undoManager:t}})};if(s(),!t)return;const a=t.addListener({onStackChange(){s()}});return()=>a?.()},[t,e,n]),{undo:r,redo:i}};
|
|
40
|
+
`,u=!0));const w=[{range:new e.Range(d.lineNumber,d.column,d.lineNumber,d.column),text:`${f}`}];let b=null;o.pushEditOperations([],w,q=>(b=q[0].range,h&&b.startLineNumber++,u&&b.endLineNumber--,[new e.Selection(b.startLineNumber,b.startColumn,b.endLineNumber,b.endColumn)])),t.setSelection({startLineNumber:b.endLineNumber,startColumn:b.endColumn,endLineNumber:b.startLineNumber,endColumn:b.startColumn})};function Jd(t,e){let n=null;for(let o=0;!n&&o<t.length;o++){const r=t[o];r.getName()===e.text&&(n=r)}return n?n.getContext():"formula"}function kr(t,e,n,o,r=[]){if(o.kind==="function"&&o.kindModifiers==="export"){const i=o.spans[0].start,s=t.getPositionAt(i);r.push({name:o.text,type:Jd(n,o),lineNumber:s.lineNumber})}if(o.childItems)for(const i of o.childItems)kr(t,e,n,i,r);return r}function Kr(t,e,n="function",o){const r=t.spans;for(let i=0;i<r.length;i++){const s=r[i];if(s.start<=e&&e<s.start+s.length){if(t.kind===n&&(!o||t.kindModifiers===o))return t;for(const a of t.childItems||[]){const d=Kr(a,e,n,o);if(d)return d}}return null}}function Qd(t){return t.kind==="comment"}const eu=l.memo(l.forwardRef((t,e)=>{const{className:n,style:o,commands:r,readOnly:i=!1,onClose:s,darkMode:a,loadingPanel:d,autoFocus:c=!0,onStatusChange:f,...h}=t,u=l.useRef(null),w=X(s,[s]),b=l.useRef(!1),q=l.useMemo(()=>({contains(M){if(!u.current)return;const H=u.current.editor;return H&&H.getDomNode()?.contains(M)},focus(){if(!u.current)return;const M=u.current.editor;return M&&M.getDomNode()?.focus()}}),[]),I=l.useMemo(()=>[new ne("help",q,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),$=l.useMemo(()=>{let M=null;const H=()=>q;return M=r?r.createChildGroup(H,"scriptEditor",!1):new nn(H,"scriptEditor"),M.addCommands(I,!0),M},[r,I]),D=zr($,["executeSelectedScript"])[0],v=D?.context(),F=X(M=>{D?.execute(M)},[D]),E=l.useRef(""),[S,k]=l.useState(!1),N=X(async()=>{if(!u.current)return null;const M=u.current,H=M.editor;if(!H)return null;const oe=M.monaco,ue=await(async(te,K,le="export")=>{const Re=te.getModel();if(!Re)return null;const Te=await K.languages.typescript.getTypeScriptWorker(),ae=await Te(Re.uri),Fe=await ae.getNavigationTree(Re.uri.toString());let me=null,Oe=te.getSelection();const xe=Oe.startLineNumber===Oe.endLineNumber&&Oe.startColumn===Oe.endColumn?Re.getLineCount():Math.min(Oe.endLineNumber,Re.getLineCount());for(let ge=Oe.startLineNumber;!me&&ge<=xe;ge++){const fe=Kr(Fe,Re.getOffsetAt({lineNumber:ge,column:1}),"function",le);fe&&(me=fe.text)}return me})(H,oe);return f?.({message:(ue??"").toUpperCase()}),ue?{source:H.getValue(),name:ue}:null},[f]),R=X(async(M,H,oe)=>{const ue=await v.getScripts().createModule({source:oe?.getValue(),declarationsOnly:!0}),te=ue?ue.getFunctions().search():Ue.EmptyArray;ue&&(async function(K,le){const Re=[];for(let Te=1;Te<K.getLineCount()+1;Te++){const ae={startLineNumber:Te,startColumn:1,endLineNumber:Te,endColumn:K.getLineLength(Te)+1},Fe=K.getValueInRange(ae).indexOf("modelt");Fe!==-1&&Re.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:le.MarkerSeverity.Hint,startLineNumber:ae.startLineNumber,startColumn:Fe+1,endLineNumber:ae.startLineNumber,endColumn:Fe+5})}le.editor.setModelMarkers(K,"owner",Re)}(M,H),async function(K,le,Re,Te){const ae=await le.languages.typescript.getTypeScriptWorker(),Fe=await ae(K.uri),me=await Fe.getNavigationTree(K.uri.toString()),Oe=kr(K,le,Te,me).map(xe=>{let ge=null,fe=null;return xe.type==="formula"?(ge="formula.margin-icon",fe="Formula"):xe.type==="macro"?(ge="macro.margin-icon",fe="Macro"):xe.type==="autoRun"&&(ge="autorun.margin-icon",fe="Auto Run"),{range:new le.Range(xe.lineNumber,1,xe.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:ge,glyphMarginHoverMessage:fe,stickiness:le.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});j.current&&j.current.clear(),j.current=Re.createDecorationsCollection(Oe)}(M,H,oe,te))},[v]),T=X(Ue.debounce(R,580),[]),G=X(async(M=void 0)=>{if(!u.current||!v)return;const H=u.current.editor.getPosition(),oe={cursor:H?H.toString():""};M!==void 0&&(oe.message=M),f?.(oe);const ue=N();v.setSelectedFunction(ue)},[v,f]);l.useEffect(()=>{if(!v)return;const M={insertSnippet:oe=>{u.current?.editor&&(S?ul(u.current.editor,u.current.monaco,oe):E.current=oe)}};v.setEditor(M),v.setSelectedFunction(N());const H=v.addContainerListener({onBeforeSave:async()=>{if(!u.current?.editor||!v)return;const oe=u.current.editor,ue=v?.getScripts().getModules().getByName("scripting"),te=ue?.getSource(),K=oe.getValue();if(!((te?.length??0)!==K.length||te!==K))return;await v.saveSource(oe.getValue());const le=(te?.length??0)!==K.length||te!==K;f?.({dirty:le})},onReadonlyChange(){},onScriptChange:async()=>{if(!u.current?.editor||!v)return;const oe=u.current.editor,ue=v.getScripts().getModules().search()[0]?.getSource()??"";oe.setValue(ue)}});return()=>{H(),v.setSelectedFunction(null),v.setEditor(null)}},[v,S]),l.useEffect(()=>()=>{if(!u.current?.editor)return;const M=u.current.editor;v?.saveSource(M.getValue())},[]);const O=X(M=>{const H=u.current;if(!H)return!1;const oe=H.editor;return!!oe&&(oe.focus(),!0)},[]),j=l.useRef(null),z=X((M,H)=>{u.current={monaco:H,editor:M},k(!0),G("Loading Types");const oe=v.getScripts().getModules().search()[0]?.getSource()??"";M.setValue(oe),Promise.resolve().then(()=>require("./CX6l4lNPTiSB3HUX.cjs")).then(te=>te.customEditor).then(te=>{G(""),te.AutoTypings.create(M,{shareCache:!0,monaco:H,onError:K=>{K==="Not implemented yet"&&(K="Compile Errors"),console.warn("Error compiling types",K)}}).then(async K=>{const le=M.getModel();T(le,H,M)})}),M.addCommand("executeScript",function(te,...K){K?.[0]&&F({functionName:K?.[0]})},""),M.addAction({id:"executeScript",label:"Execute",keybindings:[H.KeyCode.F8],run:async te=>{const K=N();v.setSelectedFunction(K);const le=await K;F(le)}}),M.addAction({id:"saveScript",label:"Save Script",keybindings:[H.KeyMod.CtrlCmd|H.KeyCode.KeyS],run:te=>{v?.saveSource(M.getValue()).then(()=>{const K=v?.getScripts().getModules().getByName("scripting"),le=K?.getSource(),Re=M.getValue(),Te=(le?.length??0)!==Re.length||le!==Re;f?.({dirty:Te})})}}),M.onMouseDown(async te=>{if(te.target.type===H.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const K=te.target.position.lineNumber,le=await H.languages.typescript.getTypeScriptWorker(),Re=await le(ue.uri),Te=await Re.getNavigationTree(ue.uri.toString()),ae=M?.getValue(),Fe=(await v?.saveSource(ae)).getFunctions().search(),me=kr(ue,H,Fe,Te).find(Oe=>Oe.lineNumber===K);if(me){const Oe=te.event.browserEvent.button;Oe===0?me.type==="macro"||me.type==="autoRun"?F({functionName:me.name}):me.type==="formula"&&v.quickInsertFunction?.(me.name):Oe===2&&(console.log("Context menu for function:",me.name),te.event.browserEvent.preventDefault())}}}),M.onDidChangeModelContent(()=>{const te=M.getModel();T(te,H,M)});const ue=M.getModel();(function(te,K){K.languages.registerInlayHintsProvider("typescript",{provideInlayHints(le,Re,Te){const ae=[];for(let Fe=1;Fe<le.getLineCount()+1;Fe++){const me={startLineNumber:Fe,startColumn:1,endLineNumber:Fe,endColumn:le.getLineLength(Fe)+1},Oe="hint",xe=le.getValueInRange(me).indexOf("hint");xe!==-1&&ae.push({kind:K.languages.InlayHintKind.Type,position:{lineNumber:me.startLineNumber,column:xe+Oe.length+1},label:"[hint]"})}return{hints:ae,dispose:()=>{}}}})})(0,H),ue.onDidChangeContent(te=>{const K=v?.getScripts().getModules().getByName("scripting"),le=K?.getSource(),Re=M.getValue(),Te=(le?.length??0)!==Re.length||le!==Re;f?.({dirty:Te})}),M.onDidChangeCursorPosition(te=>{G()})},[v,f]),B=l.useMemo(()=>S?null:d||g.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[S,d]),Z=l.useMemo(()=>{const M=v?.getScripts().getModules().getByName("scripting")?.getSource()??"";return g.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[g.jsx(l.Suspense,{children:g.jsx(Yd,{theme:a?"extended-dark":"extended",options:{...Xd,fixedOverflowWidgets:!0,readOnly:i},language:"typescript",value:M,onValidate:H=>{let oe=!1;for(let ue=0;!oe&&ue<H?.length;ue++)H[ue].severity===8&&(oe=!0)},beforeMount:H=>{H.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),H.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),H.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),H.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let oe=!1;try{const te=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),K=H.Uri.parse('inmemory://model/"sheetxl-models".d.ts'),le=H.editor.createModel(te,"typescript",K);H.editor.setModelMarkers(le,"default",[]),oe=!0}catch(te){console.warn("cant load types",te)}H.languages.registerLinkProvider("*",{provideLinks:(te,K)=>{const le=[],Re={links:le},Te=te.getLinesContent();for(let ae=1;ae<=Te.length;ae++){const Fe=Te[ae-1],me=H.editor.tokenize(Fe,"typescript");for(let Oe=0;Oe<me[0].length;Oe++){const xe=me[0]?.[Oe];if(xe&&xe.type.startsWith("string")){let ge=xe.offset,fe=me[0]?.[Oe+1]?.offset??Fe.length,Se=new H.Range(ae,ge+1,ae,fe+1),pe=te.getValueInRange(Se);const Ce=pe[0];Ce!=="`"&&Ce!=="'"&&Ce!=='"'||(ge++,pe=pe.substring(1));const Ae=pe[pe.length-1];Ae!=="`"&&Ae!=="'"&&Ae!=='"'||(ge++,pe=pe.substring(0,pe.length-1));try{v.getRanges(pe)&&le.push({range:{endColumn:fe,endLineNumber:ae,startColumn:ge,startLineNumber:ae},tooltip:`Goto range '${pe}'`,url:`/range/${pe}`})}catch(ye){console.warn(ye)}}}}return Re}}),H.editor.registerLinkOpener({open(te){if(te?.path?.startsWith("/range/")){try{v.getRanges(te.path.substring(7))?.select()}catch(K){console.warn("invalid range",K)}return!0}return!1}});const ue=H.languages.typescript.typescriptDefaults.getCompilerOptions();H.languages.typescript.typescriptDefaults.setCompilerOptions({...ue,target:H.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:H.languages.typescript.ModuleResolutionKind.Classic,baseUrl:"inmemory://model/",allowNonTsExtensions:!0}),E.current&&(await ul(u.current.editor,u.current.monaco,E.current),E.current=null),b.current&&requestAnimationFrame(async()=>{b.current&&H.editor.focus()}),H.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),k(!0)})()},onMount:z})}),B]})},[v,$,i,B,a]),P=Ft(e,()=>({isScriptEditorElement:()=>!0,focus:M=>{O(M)},close:()=>{w?.()},getEditor:()=>v?.getEditor()}),[v]);return l.useEffect(()=>(c&&requestAnimationFrame(()=>{O()}),()=>{u.current?.editor&&requestAnimationFrame(()=>{P.current?.contains(document.activeElement)&&O()})}),[]),g.jsx("div",{className:kt("script-editor",Zd,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...o},ref:P,...h,children:Z})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>p.LicenseManager}),exports.ChartAreaIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),g.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),g.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),g.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),g.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),g.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),g.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),g.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),g.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),g.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),g.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),g.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),g.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),g.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),g.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),g.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),g.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),g.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),g.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),g.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),g.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),g.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),g.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),g.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),g.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=Lc,exports.ChartLineIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),g.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),g.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),g.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),g.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),g.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),g.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),g.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),g.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),g.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),g.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),g.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),g.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),g.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),g.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),g.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),g.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),g.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),g.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),g.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),g.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),g.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),g.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=t=>g.jsxs("svg",{viewBox:"0,0,2048,2048",...t,children:[g.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),g.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),g.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),g.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.Command=ne,exports.CommandButtonType={Toolbar:"toolbar",Menuitem:"menuitem"},exports.CommandContext=Ac,exports.CommandGroup=nn,exports.CornerTriangle=Sr,exports.DateUtils=$a,exports.DefaultNotifier=xo,exports.DocThemesContext=dr,exports.DocThemesProvider=t=>{const{themes:e,children:n}=t;return g.jsx(dr.Provider,{value:e,children:n})},exports.EditableLabel=is,exports.EmptyFrame=Rc,exports.FilterButton=Hl,exports.FocusKeyNavigation=_a,exports.FontUtils=Ua,exports.HorizontalAlignment=Rl,exports.Item=Gr,exports.KeyCodes=St,exports.KeyModifiers=Q,exports.LogoNoPaddingIcon=t=>g.jsxs("svg",{...t,viewBox:"0 0 48 48",children:[g.jsx("path",{d:"M 2.2827924,0 C 1.5038324,0 0.87090248,0.52603 0.87090248,1.17149 v 25.39667 h -0.01 v 20.2607 c 0,0.39663 0.24025002,0.74639 0.60481992,0.95852 v 0.18499 h 0.50664 c 0.0972,0.0173 0.19732,0.0276 0.30092,0.0276 h 15.5346916 16.7448 v 0 h 11.35822 c 0.10311,0 0.20276,-0.0104 0.29945,-0.0276 h 0.0696 v -0.0182 c 0.59938,-0.13566 1.04238,-0.58606 1.04238,-1.12526 V 26.96484 c 0.006,-0.0429 0.009,-0.0853 0.009,-0.12925 V 1.17154 c 0,-0.64586 -0.63293,-1.17149 -1.41189,-1.17149 h -15.7478 v 2e-4 h -2.06997 V 5e-5 Z",fill:"#547DBE"}),g.jsx("path",{d:"m 2.8338324,2.7184 v 9.0404 H 11.538484 V 2.7184 Z m 11.2334116,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.26696,0 v 9.0404 h 8.70465 V 2.7184 Z m 11.33258,0 v 9.0404 h 8.70465 V 2.7184 Z M 2.8338324,14.32723 v 8.84046 h 8.7046516 v -8.84046 z m 11.2334116,0 v 8.84046 h 8.70465 v -8.84046 z m 11.26696,0 v 8.84046 h 8.70465 v -8.84046 z m 11.33258,0 v 8.84046 h 8.70465 V 14.32723 Z M 2.8338324,25.73691 v 8.67308 h 8.7046516 v -8.67308 z m 11.2334116,0 v 8.67308 h 8.73721 v -8.67308 z m 11.26696,0 v 8.67308 h 8.70465 v -8.67308 z m 11.33258,0 v 8.67308 h 8.70465 V 25.73691 Z M 2.8693424,36.61859 v 8.67357 h 8.7046616 v -8.67357 z m 11.2339116,0 v 8.67357 h 8.73771 v -8.67357 z m 11.26697,0 v 8.67357 h 8.70465 v -8.67357 z m 11.33257,0 v 8.67357 h 8.70465 v -8.67357 z",fill:"#FFFFFF"}),g.jsx("path",{d:"m 2.8254424,2.72091 v 9.04041 H 11.570544 V 2.72091 Z m 0,11.60889 v 8.84036 H 11.570544 V 14.3298 Z m 0,11.40958 v 8.67357 h 8.7451016 v -8.67357 z m 0.036,10.88167 v 8.67358 h 8.7451116 v -8.67358 z",fill:"#547DBE",fillOpacity:"0.4"}),g.jsx("path",{d:"m 30.820434,6.19497 c 1.85291,0 3.66241,0.29708 5.4285,0.89113 1.7656,0.5942 3.49568,1.50108 5.19073,2.72107 l -2.37584,3.25571 c -1.40941,-1.01391 -2.79515,-1.76647 -4.15721,-2.25759 -1.36206,-0.49111 -2.72412,-0.73667 -4.08618,-0.73667 -2.5817,0 -4.58902,0.53064 -6.02232,1.59218 -1.43334,1.06143 -2.14989,2.56661 -2.14989,4.51523 v 0.0237 c 0,1.36241 0.41177,2.40021 1.23532,3.11315 0.82355,0.71288 1.89253,1.24367 3.20703,1.59217 1.31446,0.3485 2.71608,0.67341 4.20493,0.97439 1.29842,0.26929 2.58944,0.58216 3.87257,0.9386 1.28263,0.3565 2.45032,0.8635 3.50356,1.52097 1.05324,0.65747 1.89288,1.5486 2.51841,2.6734 0.62553,1.12485 0.93829,2.59035 0.93829,4.39635 v 0.0477 c 0,3.18435 -1.10849,5.64817 -3.32597,7.39066 -2.21698,1.7425 -5.33724,2.61399 -9.35978,2.61399 -1.67882,0 -3.25863,-0.15841 -4.73958,-0.47523 -1.4808,-0.31681 -2.86644,-0.79204 -4.15737,-1.42617 -1.29077,-0.63363 -2.49827,-1.42567 -3.6227,-2.37612 l 2.54179,-3.20819 c 1.39383,1.204 2.91819,2.10717 4.57323,2.70928 1.6549,0.60205 3.45641,0.90307 5.40463,0.90307 2.73991,0 4.85823,-0.52704 6.35447,-1.58048 1.49674,-1.05359 2.24511,-2.53098 2.24511,-4.43213 v -0.0237 c 0,-1.37834 -0.37197,-2.43583 -1.11639,-3.17245 -0.74442,-0.73668 -1.71824,-1.2912 -2.92194,-1.66359 -1.2037,-0.37223 -2.51051,-0.6851 -3.91993,-0.9386 -1.34627,-0.23762 -2.69635,-0.51485 -4.05046,-0.83182 -1.35417,-0.31677 -2.59339,-0.7841 -3.71782,-1.40204 -1.12448,-0.61779 -2.03125,-1.49708 -2.72017,-2.63782 -0.68898,-1.14078 -1.03341,-2.66156 -1.03341,-4.5627 v -0.0237 c 0,-3.21623 1.06898,-5.70753 3.20718,-7.47386 2.13805,-1.76648 5.15506,-2.64981 9.05121,-2.64981 z",strokeWidth:"2.5",stroke:"#EB594D",fill:"#f9CECB"})]}),exports.LogoTextNoPaddingIcon=Yl,exports.MouseButtonCodes=_r,exports.MovableArea=Ql,exports.NotificationType=bn,exports.PictureEditor=rs,exports.ReactUtils=Qe,exports.RoundedTab=Ia,exports.Row=As,exports.ScriptEditor=eu,exports.ScrollPane=Ar,exports.ScrollUtils=pr,exports.Scrollbar=Io,exports.ScrollbarOrientation=wt,exports.SheetCellEditor=Ul,exports.SheetCellRenderer=$l,exports.SheetElement=os,exports.SheetScrollbar=Pr,exports.SimpleCommand=Ne,exports.SplitPane=Da,exports.SplitPaneResizer=jl,exports.StaticBorderRenderer=tc,exports.StyledStrokePath=Gl,exports.Tab=Ds,exports.TabStrip=Ls,exports.ToolTipPlacement=hn,exports.VirtualScrollbar=Lr,exports.createCellEditStateFromCell=Wl,exports.defaultCreateScrollCorner=Ll,exports.defaultCreateScrollEdgeButton=Ml,exports.defaultCreateScrollEndButton=Fr,exports.defaultCreateScrollStartButton=Ir,exports.defaultCreateScrollbar=yr,exports.getDevicePixelRatio=function(t){if(typeof window>"u")return 1;const{defaultDpr:e=1,maxDpr:n=3,round:o=!0}=t||{},r=typeof window<"u"&&typeof window.devicePixelRatio=="number"?window.devicePixelRatio:e;return Math.min(Math.max(1,o?Math.floor(r):r),n)},exports.getPortalContainer=zl,exports.toShortcutString=gn,exports.useBordersOverlay=Nr,exports.useCallbackRef=X,exports.useCommand=function(t,e=null){const n=l.useRef(e);n.current=e;const[o,r]=l.useReducer(s=>s+1,0),i=l.useMemo(()=>Array.isArray(t)?t:[t],[t]);return l.useEffect(()=>{if(!i||i.length===0)return;const s=(c,f)=>{n.current?.onChange?.(f),r()};let a=null;e&&(a={onExecute(c,f){n.current?.onExecute?.(c,f)},onError(c,f,h){n.current?.onError?.(c,f,h)}});const d=new Set;for(let c=0;c<i.length;c++)d.add(i[c]?.addPropertyListener(Ue.debounce(s,0),!0)),e&&d.add(i[c]?.addExecuteListener(a));return()=>{d.forEach(c=>{c?.()})}},[t]),o},exports.useCommands=zr,exports.useCopyPaste=jr,exports.useDevicePixelRatio=function(t){const[e,n]=l.useState(typeof window<"u"?window.devicePixelRatio:1),o=l.useRef(null);return l.useEffect(()=>{if(!(typeof window<"u"&&"matchMedia"in window))return;const r=()=>{const i=window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);i.addEventListener("change",r,{once:!0,passive:!0}),n(window.devicePixelRatio),o.current={mediaMatcher:i,listener:r}};return r(),()=>{o.current&&o.current.mediaMatcher.removeEventListener("change",o.current.listener)}},[t]),e},exports.useDocThemes=()=>{const t=l.useContext(dr),[e]=l.useState(()=>new p.ThemeCollection);return l.useMemo(()=>t||e,[t])},exports.useEditMode=Gt,exports.useFullscreenPortal=Ol,exports.useGlobalClipboard=Or,exports.useId=Va,exports.useImperativeElement=Ft,exports.useModelListener=it,exports.useMouseDownAndHoldListener=function(t,e){return Si({onPointerDown:t,onPointerMoveOrWait:(n,o,r)=>{t?.(r)},...e})},exports.useMovableCommands=es,exports.useOnClickOrFocusAway=function(t,e,n){const o=X(e,[e]);l.useEffect(()=>{const r=i=>{t.current&&!t.current.contains(i.target)&&o(i)};return n&&n.mouseEvents===!1||(document.addEventListener("mousedown",r),document.addEventListener("touchstart",r)),n&&n.focusEvents===!1||document.addEventListener("focus",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r),document.removeEventListener("focus",r)}},[t])},exports.useRangeListener=(t,e,n,o)=>{const r=l.useRef(n);r.current=n;const i=o?.fireOnAddressChange??!0;l.useEffect(()=>{if(!t||!e||!r.current){const d={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void r.current?.(d)}const s=d=>{r.current?.(d)},a=t.getRange(e).addListener(s,o);if(i){const d=t.getRange(e);s({getSource:()=>d,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{a?.()}},[t,e])},exports.useSheetCommands=Xl,exports.useSheetCopyPaste=Jl,exports.useSynchronizedPointerHandler=Si,exports.useTraceUpdate=function(t,e=!0){const n=l.useRef(t);l.useEffect(()=>{if(e){const o=Object.entries(t).reduce((r,[i,s])=>(n.current[i]!==s&&(r[i]=[n.current[i],s]),r),{});Object.keys(o).length>0&&console.log("Changed props:",o)}n.current=t})},exports.useUndoManager=({manager:t,commands:e,disabled:n,notifier:o=xo})=>{const r=X(s=>{try{t?.undo(s)}catch(a){o.showError?.(a)}},[t]),i=X(s=>{try{t?.redo(s)}catch(a){o.showError?.(a)}},[t]);return l.useMemo(()=>{if(!e)return;const s={contains:d=>!0,focus(){}},a=[new ne("undo",s,{label:"Undo",description:Ri,shortcut:{key:"z",modifiers:[Q.Ctrl]},disabled:!0},r),new ne("redo",s,{label:"Redo",description:Ei,shortcut:[{key:"y",modifiers:[Q.Ctrl]},{key:"F4"},{key:"Enter",modifiers:[Q.Alt]}],disabled:!0},i)];e?.addCommands(a,!0)},[e]),l.useEffect(()=>{if(!e)return;const s=()=>{const d=t?.getTopUndoDescription(),c={};var f;e.getCommand("undo").update({disabled:n||!t||!t.hasUndo(),description:d?(f=d,`Undo ${f}`):Ri,state:c,context:{undoManager:t}});const h=t?.getTopRedoDescription();e.getCommand("redo").update({disabled:n||!t||!t.hasRedo(),description:h?Ha(h):Ei,state:c,context:{undoManager:t}})};if(s(),!t)return;const a=t.addListener({onStackChange(){s()}});return()=>a?.()},[t,e,n]),{undo:r,redo:i}};
|