@sheetxl/react 0.6.3 → 0.6.4
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/{CO3QFg229FikFVtG.cjs → CsCdNsZRtE7M2QdX.cjs} +1 -1
- package/browser/cjs/{Cyh9Bap4TpoyCtJH.cjs → Dc9ZsVsB8QvyqXD9.cjs} +1 -1
- package/browser/cjs/{D8nQoQYBjMa8aYTt.cjs → DkQ3go6MSBUQhnPx.cjs} +1 -1
- package/browser/cjs/index.cjs +4 -4
- package/browser/esm/{BjkKvf1gjemfnoHr.mjs → B3LS-aKF-m1teapI.mjs} +1 -1
- package/browser/esm/{BicU25h_rgZ803fI.mjs → BRvM8IOxI2u8z7I3.mjs} +1 -1
- package/browser/esm/{qB4RFwPC3QbPg_lu.mjs → CEzK3Idg7F3B2m6Y.mjs} +1 -1
- package/browser/esm/index.mjs +4 -4
- package/node/esm/{ejU1APlFhtupMVGr.mjs → 3dKyZwkSrh-3iori.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.6.
|
|
3
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.6.4
|
|
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.
|
|
@@ -20,14 +20,14 @@ All contents and formatting are removed.`,shortcut:{key:"Delete",modifiers:[r.Ke
|
|
|
20
20
|
|
|
21
21
|
The formatting is not applied.`,shortcut:{key:"V",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("pasteFormats",w,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:`Paste only the formats of the selected cells.
|
|
22
22
|
|
|
23
|
-
The content is not applied.`}),new r.Command("pasteFormulas",w,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new r.Command("pasteTranspose",w,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new r.Command("pasteLinks",w,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];i.addCommands(k,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const w={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(k=>B.paste({...Ll,...k})).update(w),i.getCommand("pasteFormats").updateCallback((k,O)=>B.paste({...Ol,description:O.label(),...k})).update(w),i.getCommand("pasteFormulas").updateCallback((k,O)=>B.paste({...jl,description:O.label(),...k})).update(w),i.getCommand("pasteTranspose").updateCallback((k,O)=>B.paste({...Bl,description:O.label(),...k})).update(w),i.getCommand("pasteLinks").updateCallback((k,O)=>B.paste({...Vl,description:O.label(),...k})).update(w),i.getCommand("cut").update(w),i.getCommand("paste").update(w)},[t,i]);const S=o.useMemo(()=>{if(!D||!q.current)return;const w=D.key;if(w!=="copy"&&w!=="cut"&&w!=="formatPainter")return;const k=q.current.getItem();if(k.getSource()!==t)return;const O=q.current.isCut?.(),E=O?x:g,F=O?p:m,Z=k.getCoords(),_=Z?[Z]:null;return _&&_.length!==0?P=>{const V=[];for(let $=0;$<_.length;$++){const oe=_[$],L=P.toClipBounds(P.getRangeCoordsBounds(oe,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);L&&(V.push(T({range:oe,key:`copy-selection-background-${$}`,x:L.x,y:L.y,width:Math.max(L.width,0),height:Math.max(L.height,0),stroke:E,strokeWidth:2})),V.push(T({range:oe,key:`copy-selection-foreground-${$}`,x:L.x+(L.width<=2?-1:0),y:L.y,width:Math.max(L.width,3),height:Math.max(L.height,3),stroke:F,strokeWidth:2,isAnimatedStroke:!0})))}return V}:null},[D,t,n,m,g,p,x]);return{...B,clipboard:y,overlays:S}},Pl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:d,notifier:m}=e,p=l.body??{},g=a.getView(),{overlays:x}=kr({element:i,sheet:a,sheetView:g,commands:d,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:p.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:p.fill,notifier:m});return tt(a?.getSelection(),{onChange(h){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),x&&n?x(n):null})),Hl="_sheet-selection_12wyx_5",Ul={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Kl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},$l={key:"dragCopy",description:"Drag selection to copy cell contents."},Wl={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Wo=(e,t)=>t.ctrlKey&&t.shiftKey?Wl:t.ctrlKey?$l:t.shiftKey?Kl:Ul,Gl={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},_l=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,notifier:d,onShowTooltip:m,onCloseTooltip:p,sheet:g,gridRef:x,gridStyle:h,isActive:f,editingCoords:T,...q}=e,A=n?.getBounds(),D=r.useCallbackRef(m,[m]),G=r.useCallbackRef(p,[p]),[U,y]=o.useState(()=>g?.getSelection().getCoords()),B=r.useCallbackRef(ce=>{ue.CoordUtils.isEqualSelectionCoords(ce,U)||g&&g.getSelection().updateCoords(ce)},[g,U]),S=r.useEditMode(),w=o.useRef(null),[k,O]=o.useState(g?.getProtection().isLocked()),[E,F]=o.useState(g?.getView().getMovableSelection().length>0),Z=r.ReactUtils.detectIt().primaryInput==="touch",_=!Z&&f,P=T!==null||E,V=r.useCallbackRef(ce=>{const de=ue.CoordUtils.cellToRange(ce);if(g.isClosed())return de;const me=g.getRange(de,{excludeHidden:!0}).getMerges();return me.length===0?de:me[0]},[g]),$=r.useCallbackRef((ce,de,me,Ce,xe,Me)=>{const we=g.getSelectedRange().getExtended(Ce,ce).getCoords();switch(Ce){case s.IRange.Direction.Up:return we.rowStart;case s.IRange.Direction.Down:return we.rowEnd;case s.IRange.Direction.Left:return we.colStart;case s.IRange.Direction.Right:return we.colEnd}},[g]),oe=r.useCallbackRef(()=>{const ce=g.getUsedRange()?.getCoords(),de=g.getRowHeaders().getUsedRange()?.getCoords(),me=g.getColumnHeaders().getUsedRange()?.getCoords();return{...ce,colEnd:Math.max(ce?.colEnd??0,me?.max??0),rowEnd:Math.max(ce?.rowEnd??0,de?.max??0)}},[g]),L=r.useCallbackRef((ce,de)=>g.getRowHeaders().hiddenHeadersAt(ce,de),[g]),z=r.useCallbackRef((ce,de)=>g.getColumnHeaders().hiddenHeadersAt(ce,de),[g]),K=r.useCallbackRef(ce=>g.getRange(ce,{excludeHidden:!0}).getMerges(),[g]),W=r.useCallbackRef(ce=>{g?.getSelection().setAdjusting(ce)},[g]),ge=r.useCallbackRef(async()=>{g?.getSelection().setAdjusting(null),S.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),S.setMode(null))},[S,U,g,i]),ae=o.useMemo(()=>{const ce=S.getMode();return ce?.key==="cut"||ce?.key==="copy"},[S]);tt(g?.getView(),{onMovableSelectionChange:()=>{F(g.getView().getMovableSelection().length>0)}}),tt(g?.getSelection(),{onChange(ce){const de=g.getSelection().getCoords();y(de)}}),tt(g,{onProtectionChange:()=>{O(g.getProtection().isLocked())}});const{body:Q={}}=h||{},X=n.getLayout(),be=!(_&&U.ranges.length<=1&&T===null&&!k&&(!S.getMode()||ae)),{cursor:ke,overlay:ve,onPointerDown:Pe}=dt.useSelection({gridRef:x,commands:i,layout:X,getCellCoordsAsRangeCoords:V,selection:U,fillHandleBorderColor:Q.fill,selectionBackgroundColor:f?h.selection.fill:h.selectionInactive.fill,selectionBorderColor:f?h.selection.strokeFill:h.selectionInactive.strokeFill,selectionRemoveBackgroundColor:f?h.selectionRemove.fill:h.selectionInactive.fill,selectionRemoveBorderColor:f?h.selectionRemove.strokeFill:h.selectionInactive.strokeFill,disableFillDrag:be,disableMoveDrag:Z||!(f&&U.ranges.length<=1&&T===null&&!k),disableTouchSelection:P,onSelectionChange:B,onSelectionDragStart:W,onSelectionDragEnd:ge,onMoveDragStart:(ce,de,me)=>{S.setMode(Wo(0,me))},onMoveDragUpdate:(ce,de,me)=>{S.setMode(Wo(0,me))},onMoveDragEnd:(ce,de)=>{S.setMode(null)},onMoveDragDone:async(ce,de,me)=>{if(ue.CoordUtils.isEqualRanges(ce,de))return;const Ce=g.getRange(de);if(d?.showOptions){const Le=Ce.getDifferences(ce);let Ve=!1;for(let C=0;!Ve&&C<Le.getCount();C++)Ve=Le.at(C).isContentful();if(Ve&&await d?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const xe=!me.ctrlKey,Me=me.shiftKey,we=Me?xe?"Insert Moved Cells":"Insert Copied Cells":xe?"Move Cells":"Copy Cells",Ee=await d?.showBusy?.(we);try{const Le=g.getRange(ce);await Ce.doBatch(async()=>{Me?await Ce.insertFrom(ce,{isCut:xe,undoRange:Le}):await Ce.copyFrom(ce,{isCut:xe,undoRange:Le}),Le.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0}),Ce.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0})},{description:we,autoSelect:!0})}catch(Le){d?.showError?.(Le)}finally{Ee?.()}},contentfulCellFinder:$,hiddenRowsAt:L,hiddenColumnsAt:z,mergedRanges:K,getDataCoords:oe,canSelectionSpanMergedCells:ce=>{const de=g.getRange(ce);return de.isEntireColumns()||de.isEntireRows()},onFill:async(ce,de)=>{const me="Auto Fill",Ce=await d?.showBusy?.(me);try{await g.doBatch(()=>{g.getRange(ce).autoFill(de),g.getRange(de).autoFit({orientations:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:me,autoSelect:!0})}catch(xe){d?.showError?.(xe)}finally{w.current=null,Ce?.()}},onFillPreview:(ce,de,me)=>{if(x.current&&D){S.setMode(Gl);try{w.current?.direction!==me&&(w.current=null,g.getRange(ce).autoFill(de,{previewOnly:C=>{w.current={callback:C,direction:me}}}));const Ce=w.current?.callback?.(de);if(!Ce||Ce.isEmpty())return;const xe=Ce.toText();if(!xe)return;const Me=ue.CoordUtils.cellToRange(Ce.getCoords()),we=n.getRelativePointFromClient(0,0);let Ee=0,Le=0,Ve=r.ToolTipPlacement.Bottom;if(me===s.IRange.Direction.Down){Ee=X.getColOffset(Me.colEnd+1)-we.x;const C=X.getRowOffset(Me.rowEnd),Ue=X.getRowOffset(Me.rowEnd+1);Le=Ue-(Ue-C)/2-we.y,Ve=r.ToolTipPlacement.Right}else if(me===s.IRange.Direction.Right){Le=X.getRowOffset(Me.rowEnd+1)-we.y;const C=X.getColOffset(Me.colEnd),Ue=X.getColOffset(Me.colEnd+1);Ee=Ue-(Ue-C)/2-we.x,Ve=r.ToolTipPlacement.Bottom}else if(me===s.IRange.Direction.Up){Ee=X.getColOffset(Me.colEnd+1)-we.x;const C=X.getRowOffset(Me.rowStart),Ue=X.getRowOffset(Me.rowStart+1);Le=Ue-(Ue-C)/2-we.y,Ve=r.ToolTipPlacement.Right}else if(me===s.IRange.Direction.Left){Le=X.getRowOffset(Me.rowEnd+1)-we.y;const C=X.getColOffset(Me.colStart),Ue=X.getColOffset(Me.colStart+1);Ee=Ue-(Ue-C)/2-we.x,Ve=r.ToolTipPlacement.Bottom}D({anchor:{x:Ee,y:Le},display:xe,placement:Ve})}catch(Ce){d?.showError?.(Ce)}}},onFillDone:()=>{w.current=null,S.setMode(null),G?.()}}),he=r.useCallbackRef(ce=>{Pe(r.ReactUtils.createSyntheticEvent(ce))},[Pe,T]);o.useEffect(()=>{const ce=n?.getStage();if(ce)return ce.addEventListener("pointerdown",he),()=>{ce.removeEventListener("pointerdown",he)}},[n?.getStage()]);const He=r.useImperativeElement(t,()=>({}),[]),Se=o.useRef(null);return c.jsx("div",{className:bt(a,"sheet-selection",Hl),style:{position:"absolute",width:A?.width,height:A?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Gt([He,Se]),...q,children:ve(n)})})),In=Object.freeze({x:0,y:0,width:0,height:0}),Zl={fireOnModelChange:!1},Xl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:d,onHide:m,onShow:p,onUnFocus:g,isDragging:x,updateFrameBounds:h,dragStart:f,style:T,disabled:q,renderMovable:A,...D}=e,[G,U]=o.useState(In),[y,B]=o.useState(null),[S,w]=o.useState(!1),k=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const E=a.getBounds();if(!E)return;const F=i.toViewBounds(E);U(F??In),h(F??In)},[i?.getBounds()]),tt(a,{onBoundsChange:E=>{const F=E.getBounds();if(!F)return;const Z=i.toViewBounds(F);U(Z??In),h(Z)},onSelectionChange:()=>{const E=ue.CommonUtils.hasFocus(k.current,!0);!S&&!E||a.isSelected()||g()}}),tt(a,{onRequestFocus:()=>ue.CommonUtils.whenFocus(k.current,!0)},Zl),o.useEffect(()=>{const E=k.current;return l(E),()=>{d(E)}},[]);const O=o.useMemo(()=>{if(!G)return null;let{width:E,height:F}=G;return A({view:i,movable:a,disabled:q,isDragging:x,style:{position:"relative",left:0,top:0,width:E,height:F},onHide:m,onShow:p})},[i,a,G.width,G.height,q,x]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Gt([k,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:G.x,top:G.y,width:G.width,height:G.height,...T},onMouseDown:async E=>{const F=E.shiftKey||E.ctrlKey,Z=a.isSelected(),_=E.currentTarget;F&&Z?a.unselect():(Z&&!F||await a.select({addToSelection:F}),f(E.nativeEvent,_),_.focus())},onFocus:E=>{E.relatedTarget&&!y&&B(E.relatedTarget),w(!0)},onBlur:E=>{y&&!k?.current?.contains(E.relatedTarget)&&B(null),E.relatedTarget&&w(!1)},...D,children:O})})),Yl="_movable-area_314c6_5",Mr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:d,onUnFocus:m,onFocus:p,disabled:g=!1,disableDrag:x=!1,disableResize:h=!1,className:f,style:T,renderDirections:q=["nw","n","ne","w","e","sw","s","se"],onFirstRender:A,...D}=e,G=n.getBounds(),U=r.useCallbackRef(A,[A]),y=r.useCallbackRef(m,[m]),B=r.useCallbackRef(p,[p]),[S,w]=o.useState([]),[k,O]=o.useState(!1),[E,F]=o.useState(!1),Z=o.useRef(!0),_=o.useRef(new Map),P=o.useRef(new Map),V=o.useRef(new Map),$=o.useRef(new Map),oe=o.useRef(new Map),L=o.useRef({onRequestFocus:ee=>(de(ee),null)}),z=o.useRef(null),K=o.useRef(null),W=o.useRef(null),[ge,ae]=o.useReducer(ee=>ee+1,0);o.useLayoutEffect(()=>{ae()},[n,i]),tt(i,{onCollectionChange:()=>{const ee=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0}),Fe=oe.current;Fe.forEach(Ie=>{Ie()}),Fe.clear();const Be=L.current;for(let Ie=0;Ie<ee.length;Ie++){const ze=ee[Ie];if(ze.isClosed())continue;const Ae=ze.addListeners(Be);Fe.set(ze,Ae)}ae()},onInvalidated:()=>{ae()}}),tt(a,{onMovableSelectionChange(ee){X(),ae()}});const Q=o.useCallback((ee,Fe)=>{const Be=V.current.get(ee);W.current&&(W.current.getTargets().forEach(Ie=>{if(Ie===Be)return Ie.style.left=Fe.x+"px",Ie.style.top=Fe.y+"px",Ie.style.width=Fe.width+"px",void(Ie.style.height=Fe.height+"px")}),W.current.updateRect())},[]),X=()=>{const ee=[],Fe=a.getMovableSelection();Fe.forEach(Be=>{const Ie=V.current.get(Be);Ie&&Fe.indexOf(Be)!==-1&&ee.push(Ie)}),w(Be=>ue.CommonUtils.isEqualArrays(Be,ee)?Be:ee)},be=o.useRef(null),ke=o.useMemo(()=>new Promise(ee=>{be.current=ee}),[]),ve=o.useRef(null),Pe=r.useCallbackRef(async(ee,Fe)=>{ve.current=Fe,await(async()=>!(!await ke.then()||!W.current))()&&ve.current===Fe&&W.current.dragStart(ee,Fe)},[S]),[he,He]=o.useState(!1),Se=o.useRef(null),ce=o.useRef(null),de=r.useCallbackRef(async(ee=null)=>{if(ee||(ee=a.getMovableSelection()[0]),!ee)return y?.(),!1;const Fe=V.current.get(ee);Fe?(await ue.CommonUtils.whenFocus(Fe),Fe.focus(),ce.current=Fe,Se.current=null):Se.current=ee},[a]);o.useEffect(()=>{he&&S.length>0&&ce.current!==S[0]&&de(),Z.current&&(U?.(),Z.current=!1)},[S]);const me=o.useMemo(()=>{const ee=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(ee.length===0&&_.current.size===0)return null;const Fe=(R,re,j,J=!0)=>{const u=R.isSelected(),M={tabIndex:j,view:n,movable:R,onRefLoad:I=>{Se.current===R&&(I.focus(),ce.current=I,Se.current=null),V.current.set(R,I),P.current.set(I,R),re.rendered=!0,X()},onRefUnload:I=>{V.current.delete(R),P.current.delete(I),re.rendered=!1,X()},onUnFocus:y,onHide:I=>{re.onHide=I},onShow:I=>{re.onShow=I},isDragging:u&&(E||k),disabled:g,renderMovable:l,updateFrameBounds:I=>{Q(R,I)},dragStart:Pe,onMouseUp:()=>{if(ve.current=null,K.current){O(!1),F(!1);let I=!1;$.current?.forEach(b=>{ue.CommonUtils.isEqualBounds(b.movable.getBounds(),b.startBounds)||(I=!0)}),I?xe():Me()}},style:{opacity:J?k&&u?.7:void 0:0,zIndex:k&&u?R.getZIndex()+ee.length:void 0,pointerEvents:J?void 0:"none",cursor:E&&u?"grabbing":g||x?"initial":"move",boxShadow:!u||E&&!k?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Xl,{...M},`movable-${R.getUUID()}`)},Be=_.current,Ie=new Map,ze=[];for(let R=0;R<ee.length;R++){const re=ee[R];if(re.isClosed())continue;let j=Be.get(re);j||(j={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(J,u)=>{if(!u||u.shown===!0)return;u.shown=!0;const M=++u.visibilityRequestId;requestAnimationFrame(()=>{const I=_.current.get(J);I&&M===u.visibilityRequestId&&(u.onShow?.(J),I.shown=!0)})},doHide:async(J,u)=>{if(!u||u?.shown===!1)return;u.shown=!1;const M=++u.visibilityRequestId,I=await Promise.resolve(u.onHide?.(J));M===u.visibilityRequestId&&I!==!1&&(u.shown=!1,_.current.delete(J),ae())},visibilityRequestId:0}),j.frame=Fe(re,j,R,!0),ze.push(j.frame),j.doShow(re,j),Be.delete(re),Ie.set(re,j)}const Ae=[];return a.getMovableSelection().forEach(R=>{const re=Be.get(R);re&&(re.frame=Fe(R,re,-1,!1),Ae.push(re.frame),Be.delete(R),Ie.set(R,re))}),Be.forEach((R,re)=>{R.frame=Fe(re,R,-1,!1),Ae.push(R.frame),R.doHide(re,R),Be.delete(re),Ie.set(re,R)}),_.current=Ie,X(),[...Ae,...ze]},[ge,n,l,g,x,h,k,E]),Ce=r.useCallbackRef((ee,Fe)=>{const Be=`${Fe} ${S.length===1?s.TextUtils.capitalize(P.current?.get(S[0]).getContent().getType()):"Drawings"}`;K.current&&(console.warn(`Transaction ${K.current.getDescription()} is being replaced by ${Be}`),K.current.rollback(),K.current=null),K.current=d.beginCommit({description:Be}),$.current.clear();for(let Ie=0;Ie<S.length;Ie++){const ze=S[Ie],Ae=P.current?.get(ze);Ae?$.current.set(ze,{movable:Ae,startBounds:n.toViewBounds(Ae.getBounds())}):console.warn("invalid element",Ae)}},[d,n,S]),xe=o.useCallback(()=>{if(!K.current)return;const ee=[];$.current?.forEach(Fe=>{ee.push(Fe.movable)}),K.current.commit({viewAfter:{view:a,movableSelection:ee}}),$.current.clear(),K.current=null},[]),Me=o.useCallback(()=>{K.current&&(K.current.rollback(),K.current=null)},[]),we=o.useRef(null);o.useEffect(()=>{we.current&&(we.current.onscroll=ee=>{ee.preventDefault(),ee.srcElement.scrollTop=0,ee.srcElement.scrollLeft=0})},[we.current]);const Ee=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:de,focus:()=>{de()}}),[a]),[Le,Ve]=o.useState(null),C=o.useRef(!1),Ue=o.useRef(!1),Qe=o.useRef(!1);o.useEffect(()=>{if(g||S.length===0||Qe.current||C.current)return;if(Ue.current)return void requestAnimationFrame(()=>{W.current&&z.current&&W.current.refTargets.length>0&&(Qe.current=!0,be.current?.(!0)),w([...S])});C.current=!0;const ee=o.lazy(async()=>{try{const Fe=await Promise.resolve().then(()=>require("./CO3QFg229FikFVtG.cjs"));return C.current=!1,Ue.current=!0,w([...S]),Fe}catch(Fe){return console.warn(Fe),be.current?.(!1),null}});Ve(ee)},[S,g,x,h]);const $e=o.useMemo(()=>!Le||g?null:c.jsx(o.Suspense,{children:c.jsx(Le,{className:bt({dragging:k||E,resizing:k,moving:E}),container:null,ref:W,target:W.current?S:[],draggable:!g&&!x,resizable:!g&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:q,onResizeStart:ee=>{Ce(ee.target,"Resize")},onResize:ee=>{if(!K.current)return ee.stopDrag(),void ae();O(!0);const Fe=ee.direction[0]!==0&&ee.direction[1]!==0;let Be=0,Ie=0;for(let ze=0;ze<S.length;ze++){const Ae=S[ze],R=$.current.get(Ae),re=P.current.get(Ae);if(!R||!re){console.warn("invalid element");continue}let j=ee.dist[0],J=ee.dist[1],u=ee.drag.dist[0],M=ee.drag.dist[1],I=R.startBounds.width,b=R.startBounds.height;ze===0?(Be=I,Ie=b):(j*=I/Be,u*=I/Be,J*=b/Ie,M*=b/Ie);const N={...R.startBounds};if(N.width=Math.max(0,I+j),N.height=Math.max(0,b+J),ee.direction[0]===-1&&(N.width=Math.max(0,Math.min(R.startBounds.x+I,I-u))),ee.direction[1]===-1&&(N.height=Math.max(0,Math.min(R.startBounds.y+b,b-M))),Fe&&(re.isLockAspectRatio()||ee.inputEvent?.shiftKey)){const v=I/b,H=N.width/N.height;H>v?N.height=N.width/v:H<v&&(N.width=N.height*v)}ee.direction[0]===-1&&(N.x=Math.max(0,Math.min(R.startBounds.x+I,R.startBounds.x+I-N.width))),ee.direction[1]===-1&&(N.y=Math.min(R.startBounds.y+b,R.startBounds.y+b-N.height)),R.movable.setBounds(n.toAbsoluteBounds(N))}},onResizeEnd:ee=>{O(!1),xe()},onDragStart:ee=>{Ce(ee.target,"Move")},onDrag:ee=>{if(!K.current)return ee.stopDrag(),void ae();F(!0);for(let Fe=0;Fe<S.length;Fe++){const Be=S[Fe],Ie=$.current.get(Be);Ie?Ie.movable.setBounds(n.toAbsoluteBounds({...Ie.startBounds,x:Ie.startBounds.x+ee.translate[0],y:Ie.startBounds.y+ee.translate[1]})):console.warn("invalid element")}},onDragEnd:ee=>{},onMouseUp:ee=>{}})}),[ge,Le,S,n,g,x,h,k,E]);return c.jsx("div",{className:bt(f,"movable-area",Yl),style:{width:G.width,height:G.height,...T,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Gt([Ee,we]),...D,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:G.width,height:G.height},...D,children:c.jsxs("div",{ref:z,style:{position:"absolute",pointerEvents:"auto"},onFocus:ee=>{B?.(),He(!0)},onBlur:ee=>{He(!1)},onKeyDownCapture:ee=>{if(ee.isDefaultPrevented())return;const Fe=ee.nativeEvent.ctrlKey,Be=ee.nativeEvent.altKey,Ie=ee.nativeEvent.shiftKey;if(ee.which===r.KeyCodes.Escape){const j=a.getMovableSelection();let J=[...j];return S.forEach(u=>{if(J.length===0)return;const M=P.current.get(u);let I=J.indexOf(M);J.splice(I,1)}),J.length!==j.length&&a.selectMovables(J),J.length===0&&y?.(),void ee.preventDefault()}const ze=.1,Ae=j=>{i.updateSelected(J=>{J.setRotation(J.getRotation()+j)},"Rotate")},R=(j,J=!0)=>{i.updateSelected(u=>{const M=u.getBounds();let I=1+j;J||(I=1/I);const b=Math.sqrt(Math.pow(M.width,2)+Math.pow(M.height,2)),N=Math.atan2(M.height,M.width),v=I*b;if(v<10)return;const H=v*Math.cos(N),Y=v*Math.sin(N),ne={x:M.x+(M.width-H)/2,y:M.y+(M.height-Y)/2,width:H,height:Y};u.setBounds(ne)},"Resize")},re=j=>{i.updateSelected(J=>{const u=J.getBounds(),M={x:u.x+(j.x??0),y:u.y+(j.y??0),width:u.width+(j.width??0),height:u.height+(j.height??0)};J.setBounds(M)},"Nudge")};if(ee.which===r.KeyCodes.Delete)i.updateSelected(j=>{j.delete()},"Delete"),ee.preventDefault();else if(ee.key==="a"&&Fe){const j=a.getMovableSelection();a.selectMovables(i.getItems(),!0),a.selectMovables(j,!0),ee.preventDefault()}else ee.key==="ArrowLeft"?(Ie?R(ze,!1):Be?Ae(-10):re({x:Fe?-10:-1}),ee.preventDefault()):ee.key==="ArrowRight"?(Ie?R(ze,!0):Be?Ae(10):re({x:Fe?10:1}),ee.preventDefault()):ee.key==="ArrowUp"?(Ie?R(ze,!0):re({y:Fe?-10:-1}),ee.preventDefault()):ee.key==="ArrowDown"&&(Ie?R(ze,!1):re({y:Fe?10:1}),ee.preventDefault())},children:[me,$e]})})})})),Ut=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,i=0,a=0;for(let l=0;l<e.length;l++){const d=e[l].getBounds();t=Math.min(d.x,t),n=Math.min(d.y,n),i=Math.max(d.x+d.width,i),a=Math.max(d.y+d.height,a)}return{x:t,y:n,width:i-t,height:a-n}},Go=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let d=0,m=Number.MAX_SAFE_INTEGER,p=0;for(let h=0;h<e.length;h++){const f=e[h],T=f.getBounds();d+=T[l],m=Math.min(T[i],m),p=Math.max(T[i]+T[l],p),n.push({bounds:T,movable:f})}const g=(p-m-d)/(e.length-1);n.sort((h,f)=>{const T=h.bounds[i],q=f.bounds[i];return T!==q?T-q:h.bounds[a]-f.bounds[a]});const x=new Map;x.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const f=n[h-1].bounds,T={...n[h].bounds};T[i]=f[i]+f[l]+g,n[h].bounds=T,x.set(n[h].movable,T)}return x.set(n[n.length-1].movable,n[n.length-1].bounds),x};function Tr(e){const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:d,notifier:m}=e,p=r.useEditMode();o.useRef(p.getMode()).current=p.getMode();const g=r.useCallbackRef(async(y,B,S=null,w=!0)=>{const k=async()=>{const O=await Promise.resolve(m?.showBusy?.(y.label()));try{await B();const E=S??y?.label?.();if(d){let F=null;y&&E!==!1&&(F=new r.SimpleCommand(y.key(),l,{label:E,description:E},k)),d(F)}O?.(),w&&p.setMode(null)}catch(E){O?.(),m?.showError?.(E)}};await k()},[d,m]),[x,h]=o.useReducer(y=>y+1,0),f=r.useCallbackRef((y,B,S)=>{if(!n)return;const w=n.getMovableSelection();if(w.length===0)return;let k="Drawings";if(w.length===1){const E=w[0];k=s.TextUtils.capitalize(E.getContent().getType())??"Drawing"}const O=`${y.label()} ${k}`;g(y,()=>{let E=null;i&&(E=i.beginCommit(O));const F=n.getMovableSelection();if(F.length===0)return;const Z=S?.(F);for(let _=0;_<F.length;_++){const P=F[_];B(P,Z)}E?.commit()})},[n,i]),[T,q]=o.useState(n.getMovableSelection()[0]??null),[A,D]=o.useState(!T||T?.isProtected()),G=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){f(this,y=>{y.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){f(this,y=>{y.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){f(this,y=>{y.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){f(this,y=>{y.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){f(this,y=>{y.setLockAspectRatio(!y.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){f(this,y=>{y.setAnchorType(s.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",l,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){f(this,y=>{y.setAnchorType(s.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",l,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){f(this,y=>{y.setAnchorType(s.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left."},function(){f(this,(y,B)=>{y.setBounds({x:B.x})},Ut)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){f(this,(y,B)=>{y.setBounds({x:(B.width-y.getBounds().width)/2+B.x})},Ut)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right."},function(){f(this,(y,B)=>{y.setBounds({x:B.width-y.getBounds().width+B.x})},Ut)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top."},function(){f(this,(y,B)=>{y.setBounds({y:B.y})},Ut)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){f(this,(y,B)=>{y.setBounds({y:(B.height-y.getBounds().height)/2+B.y})},Ut)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){f(this,(y,B)=>{y.setBounds({y:B.height-y.getBounds().height+B.y})},Ut)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){f(this,(y,B)=>{y.setBounds(B.get(y))},y=>Go(y))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){f(this,(y,B)=>{y.setBounds(B.get(y))},y=>Go(y,!1))}),new r.Command("formatDrawFlipHorz",l,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",l,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",l,{label:"Group",description:"Group the selected drawings into a single drawing."}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new r.Command("formatDrawSwapShapes",l,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",l,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",l,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,T]);o.useEffect(()=>{},[p]);const U=o.useMemo(()=>{let y=null;return y=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),y.addCommands(G,!0),y},[a,G]);return tt(T,{onAnyChange:()=>{U.getCommand("formatAnchorTypeTwoCell").update({state:T?.getAnchorType()===s.IAnchored.Type.TwoCell}),U.getCommand("formatAnchorTypeOneCell").update({state:T?.getAnchorType()===s.IAnchored.Type.OneCell}),U.getCommand("formatAnchorTypeAbsolute").update({state:T?.getAnchorType()===s.IAnchored.Type.Absolute}),U.getCommand("formatAnchorTypeAbsolute").update({state:T?.getAnchorType()===s.IAnchored.Type.Absolute}),U.getCommand("toggleLockAspectRatio").update({state:T?.isLockAspectRatio()})},onProtectedChange:y=>{D(y.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const y=n.getMovableSelection()[0]??null;q(y),D(!y||y.isProtected()),h()}}),tt(t,{onCollectionChange:()=>{h()}}),o.useEffect(()=>{const y={disabled:A};U.getCommand("formatAnchorTypeTwoCell").update(y),U.getCommand("formatAnchorTypeOneCell").update(y),U.getCommand("formatAnchorTypeAbsolute").update(y),U.getCommand("toggleLockAspectRatio").update(y);const B=t.getCount(),S=n.getMovableSelection(),w=A||B<=1||S.length===0;let k={disabled:w},O=k;if(!w&&S.length===1){const Z=S[0];Z.getZIndex()===0&&(k={disabled:!0}),Z.getZIndex()===B-1&&(O={disabled:!0})}U.getCommand("moveToFront").update(O),U.getCommand("moveForward").update(O),U.getCommand("moveToBack").update(k),U.getCommand("moveBackward").update(k);const E={disabled:A||S.length<=1};U.getCommand("formatDrawAlignLeft").update(E),U.getCommand("formatDrawAlignCenter").update(E),U.getCommand("formatDrawAlignRight").update(E),U.getCommand("formatDrawAlignTop").update(E),U.getCommand("formatDrawAlignMiddle").update(E),U.getCommand("formatDrawAlignBottom").update(E),U.getCommand("formatDrawFlipHorz").update(E),U.getCommand("formatDrawFlipVert").update(E),U.getCommand("formatDrawGroup").update(E),U.getCommand("formatDrawUngroup").update(E),U.getCommand("formatDrawSwapShapes").update(E),U.getCommand("formatDrawSwapShapesHorz").update(E),U.getCommand("formatDrawSwapShapesVert").update(E);const F={disabled:A||S.length<=2};U.getCommand("formatDrawDistributeHorz").update(F),U.getCommand("formatDrawDistributeVert").update(F)},[x,A,x]),U}const Jl=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:d,onHide:m,onShow:p,...g}=e;o.useEffect(()=>{},[a]);const x=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:f,width:T}]=Nt();return c.jsx("div",{...g,ref:Gt([x,h]),children:c.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:l.getZoom(),display:"flex",position:"relative",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),Ql=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:d,target:m,notifier:p,onRepeatCommandChange:g}=e,x=Tr({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:g,commands:d,target:m,notifier:p});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const h=o.useMemo(()=>c.jsx(Mr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{x.activate(),a?.onFocus?.()}},"movable-area"),[i,a,d,x]);return h&&n?h:null})),ei=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:d,setEditingCoords:m,commands:p,notifier:g=r.DefaultNotifier}=e,x=r.useEditMode(),[h,f]=o.useState(null),[T,q]=o.useState(null),[A,D]=o.useState(null),[G,U]=o.useState(null),[y,B]=o.useState(null);o.useLayoutEffect(()=>{if(A===null)return U(null),void B(null);const z=()=>{const K=i.getRange(A).getCell(),W=K.getStyle();let ge,ae=W.getFill()?.toCSS(a.body.darkMode);ae.background!=="none"&&ae.background!=="transparent"||(ae=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),ae.background!=="none"&&ae.background!=="transparent"||(ae={background:a.body.fill}),U({style:ae}),K&&!K.getFormula()&&(ge=K?.getRenderHorizontalAlignment()),B(ge??r.HorizontalAlignment.Left)};return z(),i.getRange(A).addListener(()=>{z()})},[i,A,a?.body]);const S=r.useCallbackRef(()=>{let z=T.editState.dirty??"";if(T.editState.dirty!==void 0){const K=s.TextUtils.clampString(z);try{const W=T.sheet.getRange(T.coords),ge=`Typing '${K}' into ${W.toString()}`;return W.setValue(z,{description:ge,autoFit:!0}),D(null),q(null),x.setMode(null),m(null),!0}catch(W){throw g.showError(new Error(`Unable to enter '${K}'.`,{cause:W})),W}}},[i,T,g]),w=r.useCallbackRef(z=>i.getRange(z).getCell().getExtrusions()??ue.CoordUtils.cellToRange(z),[i]),k=r.useCallbackRef(z=>{let K=s.IRange.Orientation.Row,W=!1;z!==s.IRange.Direction.Up&&z!==s.IRange.Direction.Down||(K=s.IRange.Orientation.Column),z!==s.IRange.Direction.Left&&z!==s.IRange.Direction.Up||(W=!0),i.getSelection().traverse(K,W)},[i]),O=o.useCallback((z,K)=>{if(l)return l(z,K);if(!i)return null;const{ref:W,...ge}=z;return c.jsx(br,{ref:W,...ge,sheet:i,bodyStyle:a?.body,activeCoords:K,commands:p,onChangeEdit:ae=>{const Q={sheet:i,coords:K,editState:ae};x.setMode(X=>({...X,description:Q.editState.editMode?"Edit":"Enter",args:{...X?.args,stateAndCoords:Q}}))},editState:T.editState})},[i,G,l,T,A]),{overlay:E,startEdit:F,submitEdit:Z,cancelEdit:_,onKeyboardEventNative:P,onPointerEventNative:V}=dt.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:O,canEdit:()=>{const z=i.getProtection();if(z.isReadOnly())return!1;const K=z.isLocked();return K&&d(),!K},onBeforeStartEdit:z=>{const K=wr(()=>i.getRange(z).getCell()),W={sheet:i,coords:z,editState:Object.freeze(K)};x.setMode({key:"edit",args:{stateAndCoords:W}}),q(W)},onStartEdit:z=>{D(z),m(z)},onSubmitEdit:S,onCancelEdit:z=>{D(null),q(null),x.setMode(null),m(null)},onDoneEdit:z=>{x.setMode(null)},onNavigate:k,containerProps:G,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:y,getRangeCoords:w});tt(i.getSelection(),{onChange(z){f(i.getSelection().getCoords().cell)}});const $=r.useCallbackRef(z=>{V(z),A&&Z()},[V,_,A]),oe=o.useCallback(z=>{V(z)},[V]),L=o.useCallback(z=>{P(z)},[P]);return o.useEffect(()=>{const z=n?.getStage();if(z)return z.addEventListener("pointerdown",$),z.addEventListener("dblclick",oe),z.addEventListener("keydown",L),()=>{z.removeEventListener("pointerdown",$),z.removeEventListener("dblclick",oe),z.removeEventListener("keydown",L)}},[n?.getStage()]),o.useEffect(()=>{const z=x.getMode(),K=z?.key;K==="edit"||K==="enter"?T?z.args?.cancel?_():z.args?.submit?Z():q(z.args?.stateAndCoords):F(z.args?.start):A&&_()},[x]),E(n,t)})),Ir="white",Er="black",ti=`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='${Er}' fill='${Ir}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,ni=`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='${Er}' fill='${Ir}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,oi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[d,m]=o.useState(null),[p,g]=o.useState(null),[x,h]=o.useState(null),[f,T]=o.useState(null),q=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const S=i.getTables().getItems({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)}else l(!1),m(null)},[i,n]),A=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),k=i.getTables().getItems({address:w});k.length===1&&k[0].select()},[n,i]),D=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),k=i.getTables().getItems({address:w});if(k.length===1){const O=k[0].getRange().getCoords(),E={colStart:O.colStart,rowStart:w.rowIndex,colEnd:O.colEnd,rowEnd:w.rowIndex};i.getRange(E).select()}},[n,i]),G=r.useCallbackRef(()=>{if(!a)return;const S=i.getTables().getItems({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)},[i,a,n]);tt(i?.getSelection(),{onChange(S){g(i.getSelection().getCoords().cell)}}),tt(x,{onAnyChange(S){q(),G()}}),tt(f,{onAnyChange(S){G()}}),tt(i,{onTablesChange(S){q(),G()},onInvalidated(S){q(),G()}});const U=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(G,300),300),[]);o.useEffect(()=>{U()},[n]),o.useEffect(()=>{let S=null;if(d)for(let w=0;w<d.length&&!S;w++){const k=d[w],O=k.getRange().getCoords();s.CoordUtils.isCellWithinRange(p,O)&&(S=k)}h(S)},[p,d]);const y=r.useCallbackRef(S=>{let w=null;if(d)for(let k=0;k<d.length;k++){const O=d[k],E=O.getRange().getCoords();let F=n.getRangeCoordsBounds(E);const Z=n.getRelativePointFromClient(S.clientX,S.clientY),_=Z.x,P=Z.y;if(_>=F.x&&_<=F.x+F.width&&P>=F.y&&P<=F.y+F.height){const V=n.getViewportSize();_<=0||P<=0||_>=V.width||P>=V.height||(w=O)}}T(w)},[n,d]);if(o.useEffect(()=>{const S=n?.getStage();if(S&&d)return S.addEventListener("mousemove",y),S.addEventListener("mouseleave",y),()=>{S.removeEventListener("mousemove",y),S.removeEventListener("mouseleave",y)}},[d,n?.getStage()]),!n||!d||d.length===0)return null;const B=[];for(let S=0;S<d.length;S++){const w=d[S];if(w.isClosed())continue;const k=w===f,O=w===x,E=w.getRange().getCoords(),F=n.getRangeCoordsBounds(E);let Z;if(k||O){const _=w.getStyle().getProperties(),P=_.headerRow?.fill?.background??_.wholeTable?.border?.top?.color?.toString();if(P&&i){const V=i.getStyles().parseColor(P);V&&(Z=V.toCSS())}Z||(Z="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}B.push(c.jsx("div",{style:{position:"absolute",left:F.x,top:F.y,width:Math.min(16,F.width),height:F.height,pointerEvents:"all",cursor:ti},onMouseDown:D},`table-select-row-${w.getName()}`)),B.push(c.jsx("div",{style:{position:"absolute",left:F.x,top:F.y,width:Math.min(16,F.width),height:Math.min(16,F.height),pointerEvents:"all",cursor:ni},onMouseDown:A},`table-select-${w.getName()}`)),B.push(c.jsx(dt.Selection,{x:F.x,y:F.y,width:F.width,height:F.height,range:E,strokeWidth:O?.5:0,stroke:Z??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:k?`${Z} 0px 0px 1px 1px`:void 0}},`table-outline-${w.getName()}`))}return B})),ri=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,d]=o.useState(null),[m,p]=o.useState(null),g=o.useRef(null),x=r.useCallbackRef(()=>{const D=i.getSelectedCell(),G=D.getSpill()?.getCoords()??null;ue.CoordUtils.isEqualRanges(G,l)||(p(G?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(G),coords:G}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),d(G))},[i,n,l]);o.useEffect(()=>(g.current&&(clearTimeout(g.current),g.current=null),m&&(g.current=setTimeout(()=>{p(null),g.current=null},a)),()=>{g.current&&(clearTimeout(g.current),g.current=null)}),[m,a]);const h=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(x,80),80),[]);if(tt(i?.getSelection(),{onChange(D){h()}}),tt(i,{onSpillsChange(D){x()},onInvalidated(D){x()}}),!n||!l&&!m)return null;const f=i.getRange(l).getValue()instanceof s.FormulaError.Spill,T=[];let q=m?.bounds??n.getRangeCoordsBounds(l);if(m&&!ue.CommonUtils.isEqualBounds(m.bounds,n.getRangeCoordsBounds(m.coords))&&p(null),q=n.toClipBounds(q,-10),!q)return;const A="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return T.push(c.jsx(dt.Selection,{x:q.x,y:q.y,width:q.width,height:q.height,range:l,strokeWidth:1,stroke:A,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:f?"6 3":void 0,opacity:m?.transition==="out"?0:1,transition:m?.transition?m.transition==="in"||m.transition==="out"?`opacity ${1.5*a}ms ease-in-out`:`left ${a}ms ease-out, top ${a}ms ease-out, width ${a}ms ease-out, height ${a}ms ease-out`:"none",boxShadow:`${A} 0px 0px 4px 0px`}},"spill-outline}")),T})),li={position:"absolute",top:0,left:0,bottom:0,right:0},_o=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},d=n.body=ue.CommonUtils.mergeContentful(e.body,l);return n.body=ue.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},d),n.buttonSurface=ue.CommonUtils.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...e.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...e.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...e.selectionRemove},n.headerSelection={...n.selection,...e.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...e.headerSelectionInactive},n.header=ue.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=ue.CommonUtils.mergeContentful(n.header,l),n.headerSelect=ue.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=ue.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelectAll,l),n},ii={fireOnModelChange:!1},Zo={},Fr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Zo,headersStyle:a=Zo,onSheetContextMenu:l,showColumnHeaders:d,columnHeaderProps:m,showRowHeaders:p,rowHeaderProps:g,showScrollbars:x=!0,scrollPaneProps:h,onViewportChange:f,commands:T,onRepeatCommandChange:q,onMoveCell:A,overlays:D,renderMovable:G,viewportComponent:U,onElementLoad:y,getCellEditor:B,onFocus:S,onBlur:w,style:k=r.ReactUtils.EmptyCssProperties,notifier:O,onShowTooltip:E,onShowColumnTooltip:F,onShowRowTooltip:Z,onCloseTooltip:_,gridProps:P,cellRenderProps:V,...$}=e;if(o.useEffect(()=>{s.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[oe,L]=o.useReducer(te=>te+1,0),[z,{width:K,height:W}]=Nt(),ge=r.useCallbackRef(E,[E]),ae=r.useCallbackRef(F,[F]),Q=r.useCallbackRef(Z,[Z]),X=r.useCallbackRef(_,[_]),be=o.useRef(!1);o.useLayoutEffect(()=>{be.current=!0},[n]);const ke=n?.getStyles(),ve=o.useMemo(()=>_o(i,ke),[i,ke]),Pe=o.useMemo(()=>_o(a,ke),[a,ke]),{body:he={},buttonSurface:He={}}=ve,{header:Se={},headerSelect:ce={},headerSelectAll:de={}}=Pe,me=o.useRef(null),[Ce,xe]=o.useState(()=>n?.getView()),Me=(Ce?.getZoomScale()??100)/100,we=o.useMemo(()=>({vertical:Ce.isShowColumnGridlines()&&Me>=.4,horizontal:Ce.isShowRowGridlines()&&Me>=.4}),[Ce?.isShowColumnGridlines(),Ce?.isShowRowGridlines(),Me]),Ee=o.useMemo(()=>{if(Ce?.getGridLineColor())return{strokeDasharray:"1,1"}},[Ce?.getGridLineColor(),ve]),Le=d??Ce?.isShowColumnHeaders(),Ve=p??Ce?.isShowRowHeaders(),[C,Ue]=o.useState({width:0,height:0}),Qe=o.useMemo(()=>{let te=40,Re=20;const Te=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ke=Te?.toCSS()?.fontFamily??ve.header.text.fontFamily,Ze=Te?.getSize()??ve.header.text.fontSize,et=s.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Ze*s.IFont.getDeviceScale()),Ke);te=et.width,Re=et.lineHeight}return{width:Math.round(te+5),height:Math.round(Re+3)}},[C,ve?.header.text,n]),$e=Ve?Me*Qe.width:Se.edgeStrokeWidth,ee=Le?Me*Qe.height:Se.edgeStrokeWidth,Fe=Math.max(K,(n?.getColumnHeaders().getDefaultSize()??Qe.width)+$e+1),Be=Math.max(W,(n?.getRowHeaders().getDefaultSize()??Qe.height)+ee+1),Ie=o.useRef(new Map),ze=o.useRef(null),Ae=()=>({getColOffset:te=>n.getColumnHeaders().findOffset(te),getColIndex:te=>n.getColumnHeaders().findIndex(te),getRowOffset:te=>n.getRowHeaders().findOffset(te),getRowIndex:te=>n.getRowHeaders().findIndex(te)}),[R,re]=o.useState(()=>Ae()),[j,J]=o.useState(!1),[u,M]=o.useState(null),I=!0,b=ve.selection?.strokeFill,N=o.useCallback(()=>kt.current,[]),[v,H]=o.useState(),Y=r.useCallbackRef(te=>{H(te),n&&n.getView()&&n.getView().setTopLeft(te?{left:te.left,top:te.top}:null),f?.(te)},[n,f]),ne=o.useRef(null);o.useEffect(()=>{if(!v||!n)return;const te=n.getRangeAtBounds({x:v.left,y:v.top,width:v.width,height:v.height});ne.current?.(),ne.current=te.addListener(()=>{const Re=te.getCoords();me?.current?.invalidate(Re)})},[v,n]);const[le,ie]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(te=>{const Re=ue.CoordUtils.cellToRange(te);if(n.isClosed())return Re;const Te=n.getRange(Re,{excludeHidden:!0}).getMerges();return Te.length===0?Re:Te[0]},[n]),ye=te=>{if(!te||te.coords.colIndex===0&&te.coords.rowIndex===0)return null;const Re={};return te.coords.colIndex>0&&(Re[ue.AnchorLocation.Left]={index:te.coords.colIndex,scrollOffset:te.topLeft.left}),te.coords.rowIndex>0&&(Re[ue.AnchorLocation.Top]={index:te.coords.rowIndex,scrollOffset:te.topLeft.top}),Re},[fe,pe]=o.useState(()=>ye(n.getView().getFreezePanes())),qe=r.useEditMode(),Oe=o.useCallback(()=>me.current,[]),De=r.useCallbackRef(te=>{qe.setMode(Re=>Re?.key==="edit"?{...Re,args:{...Re.args}}:{key:"edit",args:{stateAndCoords:null,start:te}})},[]),We=r.useCallbackRef(()=>v,[v]),je=Rr({sheet:n,commands:T,target:Oe,onRepeatCommandChange:q,bodyStyle:he,notifier:O,onStartEdit:De,getViewport:We}),[Ge,Ne]=o.useState(n.getSelection().isEntire()),[Xe,it]=o.useState(Ce?.getMovableSelection().length>0),pt=u!==null||Xe,yt=null,[_e,rt]=o.useState(!1);o.useEffect(()=>{rt(!1)},[n.getProtection()]);const vt=r.useCallbackRef(()=>{_e||(rt(!0),O.showMessage?.(c.jsxs("span",{children:["This sheet is protected.",c.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:r.NotificationType.Error}))},[O,_e]),wt=o.useMemo(()=>{const te=qe.getMode();return te?.cursor?te.cursor:null},[yt,qe]),[Ct,gt]=o.useState(null),lt=o.useRef(!1),[Tt,Ot]=o.useState([]),Xt=o.useRef(null),[At,Yt]=o.useState(ue.TypesUtils.EmptyTopLeft),[Mt,wn]=o.useState(ue.TypesUtils.EmptyTopLeft);o.useEffect(()=>{Yt({left:le?.left,top:0})},[le?.left]),o.useEffect(()=>{wn({left:0,top:le?.top})},[le?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{pe(ye(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ie(n.getView().getTopLeft())},onMovableSelectionChange:()=>{it(n.getView().getMovableSelection().length>0)}}),tt(n?.getSelection(),{onChange:()=>{Ne(n.getSelection().isEntire())}}),tt(n,{onViewChange(){xe(n.getView()),re(Ae())},onLayoutChange:()=>{const te=n.getEntireRange();Ue({height:te.getRowCount(),width:te.getColumnCount()}),re(Ae())},onStyleChange:()=>{Dt()},onMovablesChange:()=>{},onInvalidated:()=>{Dt()}}),tt(n,{onRequestScrollIntoView:async(te,Re)=>{if(!Re)return;const Te={colIndex:Re?.coords.colStart,rowIndex:Re?.coords.rowStart};return await me.current?.scrollCellCoordsIntoView(Te,Re?.scroll),!0},onRequestFocus:()=>ue.CommonUtils.whenFocus(kt.current)},ii);const yn=o.useMemo(()=>{const te=(Te,Ke)=>{lt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:Te,colEnd:Te})))return;const et=Ze.getLayout(),ot=Math.max(0,et.getColOffset(Te)),Je=Ze.getBounds(),st=Math.min(Je.x+Je.width,et.getColOffset(Te+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Left||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Right)){const eo=ue.CommonUtils.roundAccurately(Ke*ue.CommonUtils.getDPI(),0),kn=ue.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ke/Me),2).toFixed(2),to="Width: "+(Ke?kn+" ("+eo+" pixels)":"Hidden"),on=Pt.current.getGridElement().getRelativePointFromClient(0,0),Ht=0-on.y,Mn=0-on.y+ee,no={x:ot-(on.x-Je.x),y:Ht,width:st-ot,height:Mn-Ht};requestAnimationFrame(()=>{lt.current&&ae?.({anchor:no,display:to})})}const It=[0,0,0,Je.height],nn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Yn={x:ot-1,y:0,width:1,height:Je.height},Jn={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Qn={x:st-1,y:0,width:1,height:Je.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Yn,...nn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Qn,...Jn})]},"resize-dividers")}])};let Re=null;return{onResizeHeadersStart:(Te,Ke,Ze)=>{Re=n.beginCommit(Ze),te(Te,Ke)},onResizeHeaders:(Te,Ke,Ze)=>{te(Te,Ke)},onResizeHeadersDown:(Te,Ke)=>{te(Te,Ke)},onResizeHeadersEnd:(Te,Ke,Ze)=>{Re?.commit({description:Ze}),Re=null,requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},onResizeHeadersUp:Te=>{requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},...m}},[n,m,ee,Ct]),jt=o.useMemo(()=>{const te=(Te,Ke)=>{lt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:Te,rowEnd:Te,colStart:0,colEnd:C.width})))return;const et=Ze.getLayout(),ot=Math.max(0,et.getRowOffset(Te)),Je=Ze.getBounds(),st=Math.min(Je.y+Je.height,et.getRowOffset(Te+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Top||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Bottom)){const eo=Math.floor(10*ue.CommonUtils.getDPI())/10,kn=ue.CommonUtils.roundAccurately(Ke*eo,0),to=ue.CommonUtils.roundAccurately(kn/Me/(n?.getRowHeaders().getScaleFactor()*ue.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ke?to+" ("+kn+" pixels)":"Hidden"),Ht=tn.current.getGridElement().getRelativePointFromClient(0,0),Mn=0-Ht.x,no=0-Ht.x+$e,pl={x:Mn,y:ot-(Ht.y-Je.y),width:no-Mn,height:st-ot};requestAnimationFrame(()=>{lt.current&&Q?.({anchor:pl,display:on})})}const It=[0,0,Je.width,0],nn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Yn={x:0,y:ot-1,width:Je.width,height:1},Jn={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Qn={x:0,y:st-1,width:Je.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Yn,...nn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Qn,...Jn})]},"resize-dividers")}])};let Re=null;return{onResizeHeadersStart:(Te,Ke,Ze)=>{Re=n.beginCommit(Ze),te(Te,Ke)},onResizeHeaders:(Te,Ke,Ze)=>{te(Te,Ke)},onResizeHeadersDown:(Te,Ke)=>{te(Te,Ke)},onResizeHeadersEnd:(Te,Ke,Ze)=>{Re?.commit({description:Ze}),Re=null,requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},onResizeHeadersUp:Te=>{requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},...g}},[n,g,$e]),kt=r.useImperativeElement(t,()=>{const te=Te=>{n?.getView()&&n.getView().selectMovables([]),ze.current=null,me?.current?.focus(Te)},Re=async(Te=null)=>{if(Te||(Te=n?.getView().getMovableSelection()[0]),!Te)return!1;const Ke=Te.getAnchorCoords();if(!Ke)return!1;const Ze=me.current?.getViewFromCellCoords({colIndex:Ke.colStart,rowIndex:Ke.rowStart});if(!Ze)return!1;const et=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(Te)===-1&&n?.getView().selectMovables([Te]);let ot=Ie.current?.get(et);return ot?.current?(await ot.current.focusMovable(Te),!0):(ze.current={movable:Te,anchor:et},!0)};return{getGridElement:()=>me.current,getRowHeaderElement:()=>tn.current,getColumnHeaderElement:()=>Pt.current,rowHeaderHeight:()=>ee,colHeaderWidth:()=>$e,startEdit:De,submitEdit:()=>{qe.setMode(Te=>Te?.key!=="edit"?Te:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{qe.setMode(Te=>Te?.key!=="edit"?Te:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:u!==null,focus:Te=>{n?.getView().getMovableSelection().length>0&&Re()||te(Te)},focusSheet:te,focusMovable:Re,contains:Te=>me?.current?.contains?.(Te),invalidate:Dt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Dt=o.useCallback(te=>{be.current||(me?.current?.invalidate(te),L?.())},[]);o.useEffect(()=>{Dt()},[ve]);const Jt=Ge?de.edgeStrokeFill:Se.fill,Wn=Ge?ce.fill:typeof ve.headerHover=="function"?ve.headerHover(Se)?.fill:Se.fill,nt=o.useMemo(()=>U?c.jsx("div",{className:bt("sheetxl-viewport-overlay",El),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:U}):c.jsx(c.Fragment,{}),[U]);let Qt=null;Le&&Ve&&(Qt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${ee}px`,width:`${$e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:te=>{let Re=!te.ctrlKey;je?.getCommand("selectAll")?.execute(!Re||te.button!==0),te.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:te,clientX:te.clientX,clientY:te.clientY,rowIndex:-1,colIndex:-1}):me.current?.focus()},children:[c.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 ${Jt}`,borderBottom:`2px solid ${Jt}`,background:`${Wn}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${ee}px`,width:`${$e}px`,boxSizing:"border-box",borderRight:`solid 1px ${Se.strokeFill}`,borderBottom:`solid 1px ${Se.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const Bt=r.useCallbackRef(({_left:te,_top:Re})=>{},[]),xn=r.useCallbackRef(te=>{if(!l)return;const Re=me.current.getViewFromClient(te.clientX,te.clientY)?.getCellCoordsFromClient(te.clientX,te.clientY);Re&&(l({originalEvent:te,clientX:te.clientX,clientY:te.clientY,rowIndex:Re.rowIndex,colIndex:Re.colIndex}),te.stopPropagation(),te.preventDefault())},[l]),at=r.useCallbackRef(te=>{if(!(!te.shiftKey&&(te.ctrlKey||te.metaKey)))return;const{deltaY:Re}=te;return Re>0?je.getCommand("sheetZoomOut")?.execute():Re<0&&je.getCommand("sheetZoomIn")?.execute(),Re===0},[je]);o.useEffect(()=>{Ot(null),Xt.current=null,lt.current=!1,gt(null);const te=n?.getView().getTopLeft();Bt(te),me.current?.scrollTo(te),ie(te),xe(n.getView()),pe(ye(n.getView().getFreezePanes())),re(Ae()),L()},[n?.getView()]);const ht=r.useCallbackRef(te=>{const Re=te.getVisibleRangeCoords();if(!Re)return null;const Te=[];return n.getRange(Re).forEach((Ke,Ze)=>{const et=Ze.getCoords(),ot=Ze.getCell();(Je=>{if(Je.isEmpty())return!1;const st=Je.getSpans();if(st.width>1||st.height>1||Je.getStyle().hasVisibleStyling()||Ce.isShowFormulas()&&Je.getFormula()!==null)return!0;const mt=Je.getValue();return mt!==null&&!(!Ce.isShowZeros()&&mt===0&&Je.getType()===s.ScalarType.Number)})(ot)&&Te.push({coords:et,value:ot,range:Ce.isShowFormulas()?null:ot.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),Te},[n,Ce.isShowZeros(),Ce.isShowFormulas(),u]);o.useEffect(()=>{const te=[];D&&te.push(...D),Ct&&te.push(...Ct),ue.CommonUtils.isEqualArrays(te,Xt.current)||(Xt.current=te,Ot(te))},[D,Ct,ve]);const en=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[ve?.header?.edgeStrokeFill]),qn=r.useCallbackRef(te=>{te.isDefaultPrevented()||te.isPropagationStopped()||(ze.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Vt=o.useMemo(()=>{const te=qe.getMode();return te?.key==="cut"||te?.key==="copy"},[qe]),Gn=r.useCallbackRef(async te=>{const Re=qe.getMode();return te.keyCode===r.KeyCodes.Escape&&Re?(te.preventDefault(),void qe.setMode(null)):te.keyCode===r.KeyCodes.Enter&&Vt?(te.preventDefault(),await je?.getCommand("paste")?.execute(),void qe.setMode(null)):void je?.dispatchToFocusedCommand(te)},[je,qe]),tn=o.useRef(null),Sn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx($o,{ref:tn,sheetElement:kt.current,gridRef:me,freezeStart:fe?.[ue.AnchorLocation.Top],oppositeSize:$e,containerWidth:$e,containerHeight:Be,sheetHeader:n.getRowHeaders(),gridStyle:Pe,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Mt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2",...jt?.style},...jt})}),[$e,ee,Be,n,Mt,fe?.[ue.AnchorLocation.Top],ve,I,l,Se.fill,g]),Pt=o.useRef(null),Rn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${ee+Se.edgeStrokeWidth}px`,minHeight:`${ee+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx($o,{ref:Pt,sheetElement:kt.current,gridRef:me,freezeStart:fe?.[ue.AnchorLocation.Left],oppositeSize:ee,containerWidth:Fe,containerHeight:ee,sheetHeader:n.getColumnHeaders(),gridStyle:Pe,scrollPoint:At,onSheetContextMenu:l,...yn,style:{...yn?.style,position:"relative",left:"0px",width:"100%",height:`${ee+Se.edgeStrokeWidth}px`,minHeight:`${ee+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[ee,Fe,n,At,fe?.[ue.AnchorLocation.Left],ve,Se.fill,I,l,m]),cl=r.useCallbackRef(te=>{const{value:Re,key:Te,...Ke}=te;let Ze=Re,et=u;if(!et||et.colIndex===te.coords.colIndex&&et.rowIndex===te.coords.rowIndex||(et=null),!Ze){const st=te.range;if(Ze=n.getRange({rowIndex:st.rowStart,colIndex:st.colStart}).getCell(),Ze.isEmpty())return null}let ot=null;Ze.getHyperlink()&&(ot=async st=>{if(V?.onLinkMouseDown?.(st),st.button===0&&!st.isDefaultPrevented()){st.stopPropagation(),st.preventDefault();try{await Ze.getHyperlink()?.open()}catch(mt){O?.showError?.(mt)}}}),et&&et.colIndex===te.range.colStart&&et.rowIndex===te.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const Je=n.getStyles();return o.createElement(Cr,{...Ke,key:Te,bodyStyle:he,docTheme:Je.getTheme(),normalStyle:Je.getNormal(),showFormulas:Ce.isShowFormulas(),showZeros:Ce.isShowZeros(),onLinkMouseDown:ot,...V,value:Ze})},[n,R,he,u,Ce?.isShowFormulas(),Ce.isShowZeros()]),ul=o.useCallback((te,Re)=>{const{key:Te,...Ke}=te;return[c.jsx(Dl,{ref:Re,getVisibleCells:ht,sheet:n,gridStyle:ve,...Ke},`border-${Te}`),c.jsx(oi,{ref:Re,sheet:n,commands:je,...Ke},`table-${Te}`),c.jsx(ri,{ref:Re,sheet:n,...Ke},`spill-${Te}`),c.jsx(_l,{ref:Re,sheet:n,commands:je,notifier:O,onShowTooltip:ge,onCloseTooltip:X,gridStyle:ve,gridRef:me,editingCoords:u,isActive:I,...Ke},`selection-${Te}`),c.jsx(Pl,{ref:Re,sheet:n,commands:je,gridStyle:ve,element:N,notifier:O,...Ke},`copy-paste-${Te}`),c.jsx(Ql,{ref:Re,sheet:n,commands:je,target:Oe,notifier:O,renderMovable:G,movableProps:{onUnFocus:()=>{kt.current.focus()}},...Ke},`movable-${Te}`),c.jsx(ei,{ref:Re,sheet:n,commands:je,notifier:O,gridStyle:ve,getCellEditor:B,showProtectedError:vt,setEditingCoords:M,...Ke},`editor-${Te}`)]},[n,me.current,ve,B,je,O]),[Io,gl]=o.useState(!1),hl=o.useMemo(()=>{if(Fe===0||Be===0)return null;const te=n.getStyles().getNormal(),Re=te.getFont(),Te=te.getFill(),Ke=te.getBorder(),Ze=te.getFill().getType()===s.IFill.Type.None;let et=Ee,ot=Ee;const Je=(mt,It,nn)=>nn?{stroke:Ke.getBottom().isNone()?"none":mt.getColor().toRGBA(he.darkMode).toString(),...It}:It;ot=Je(Ke.getBottom(),ot,!Ke.getBottom().isNone()),ot=Je(Ke.getTop(),ot,!Ke.getTop().isNone()),et=Je(Ke.getRight(),et,!Ke.getRight().isNone()),et=Je(Ke.getLeft(),et,!Ke.getLeft().isNone());let st=Ce?.getGridLineColor()?.toRGBA(he.darkMode).toString()??he.strokeFill;return Ze||(ot=Je(Ke.getBottom(),ot,!0),ot=Je(Ke.getTop(),ot,!0),et=Je(Ke.getRight(),et,!0),et=Je(Ke.getLeft(),et,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...li,...Te.toCSS(he.darkMode),...Re.toCSS(he.darkMode,Me),"--sxl-app-color-background":he.fill,"--sxl-app-color-shadow":ve.colorShadow,"--sxl-app-color-grey":ve.colorGrey,"--sxl-app-color-button-fill":He.fill,"--sxl-app-color-button-text":He.text?.fill,"--sxl-app-color-button-border":He.edgeStrokeFill,"--sxl-app-color-primary-dark":ve.selection.strokeFill},ref:me,zoom:Me,...P,onFirstRender:mt=>{gl(!0),P?.onFirstRender?.(mt),je?.activate()},showGridLines:we,gridLineColor:st,gridLineColumnsProps:et,gridLineRowsProps:ot,freezeLeft:fe?.[ue.AnchorLocation.Left],freezeLeftProps:en,freezeTop:fe?.[ue.AnchorLocation.Top],freezeTopProps:en,width:Fe,height:Be,columnCount:C.width,rowCount:C.height,cursor:wt??yt??"cell",clipCells:!0,layout:R,cellRenderer:cl,overlayRenderer:ul,getCellCoordsAsRangeCoords:se,getVisibleCells:ht,onWheelScroll:at,onPointerDown:qn,onKeyDown:Gn,onViewportChange:Y,onImmediateScroll:Bt,scrollPoint:le,stageProps:{onFocus:()=>{je?.activate()}},overlays:Tt})},[oe]);o.useEffect(()=>{be.current||L()},[R,fe,Me,je,le?.left,le?.top,he,P,Fe,Be,wt,Tt,I,yt]);let _n={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};x||(_n={..._n,...k});const ml=o.useMemo(()=>{const te=n.getStyles().getTheme(),Re=te.getColorScheme(),Te=te.getFontScheme();return{"--sxl-doc-color-dk1":Re.getDk1().toCSS(he.darkMode),"--sxl-doc-color-dk2":Re.getDk2().toCSS(he.darkMode),"--sxl-doc-color-lt1":Re.getLt1().toCSS(he.darkMode),"--sxl-doc-color-lt2":Re.getLt2().toCSS(he.darkMode),"--sxl-doc-color-accent1":Re.getAccent1().toCSS(he.darkMode),"--sxl-doc-color-accent2":Re.getAccent2().toCSS(he.darkMode),"--sxl-doc-color-accent3":Re.getAccent3().toCSS(he.darkMode),"--sxl-doc-color-accent4":Re.getAccent4().toCSS(he.darkMode),"--sxl-doc-color-accent5":Re.getAccent5().toCSS(he.darkMode),"--sxl-doc-color-accent6":Re.getAccent6().toCSS(he.darkMode),"--sxl-doc-color-hlink":Re.getHlink().toCSS(he.darkMode),"--sxl-doc-color-fol-hlink":Re.getFolHlink().toCSS(he.darkMode),"--sxl-doc-font-major":Te.getMajorFont(),"--sxl-doc-font-minor":Te.getMinorFont()}},[n.getStyles().getTheme()]);let Zn=c.jsx("div",{style:_n,onTouchStart:()=>{Eo()},onFocus:te=>{J(!0),S?.(te)},onBlur:te=>{J(!1),w?.(te)},ref:kt,...$,children:c.jsx("div",{className:bt("sheetxl-sheet",Il),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...ml},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Qt,Sn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[Rn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,backgroundColor:he.fill},ref:z,onContextMenu:xn,children:[hl,nt,c.jsx(Fl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:ve?.selection?.strokeFill,colorCredits:ve?.body?.text?.fill})]})]})]})})});if(x){const te=Re=>c.jsx(wo,{...Re,sheet:n});Zn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${Se.fill}`,minHeight:2*Qe.height,minWidth:2*Qe.width,...k},viewport:v,touchElement:me.current?.stage,disableTouch:pt,onScrollViewport:Re=>{me.current?.scrollTo(Re)},createHorizontalScrollbar:te,createVerticalScrollbar:te,...h,children:Zn})}o.useEffect(()=>{be.current=!1,L?.(),j&&kt.current?.focus()},[n]);const[Xn,fl]=o.useState(!1),Eo=r.useCallbackRef(()=>{Xn||fl(!0)},[Xn]);return o.useEffect(()=>{if(Io)return typeof y=="function"&&y(),r.ReactUtils.detectIt().primaryInput==="touch"&&Eo(),()=>{}},[y,Io,Xn]),Zn}));Fr.displayName="SheetElement";const ai=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xo="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=",Ar=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:d,isDragging:m,view:p,onHide:g,onShow:x,onKeyDownCapture:h,onFocus:f,onBlur:T,loadingPanel:q,...A}=e,[D,G]=o.useState(!1),[U,y]=o.useState(null),[B,S]=o.useState(null),[w,k]=o.useState(null);o.useEffect(()=>{S(null),l.getDetails().then(F=>{G(!1),S(F.asUrl()),F.asSVGText?.()&&k(F.asSVGText())}).catch(F=>{console.warn(F),G(!0),S(Xo),k(null)})},[l]);const O=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),E=o.useMemo(()=>{if(B||w)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:D?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:D?"var(--sxl-app-color-background, white)":void 0,boxShadow:D?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:D?"contain":void 0,opacity:U?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:B,onLoad:()=>{y(!0)},onError:({currentTarget:F})=>{console.log("error"),F.onerror=null,S(Xo),G(!0)},alt:d??`${l.getType()}`})},[U,l,B,w,m]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:m?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...a,width:"100%",height:"100%"},tabIndex:0,...A,onKeyDownCapture:F=>{h?.(F)},ref:O,children:[U||D?void 0:q,E]})}));Ar.displayName="PictureEditor";const si=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:d,onHide:m,onShow:p,...g}=e;o.useEffect(()=>{},[a]);const x=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[h,{height:f,width:T}]=Nt();if(!a.isClosed())return c.jsx("div",{...g,ref:Gt([x,h]),children:c.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:l.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),di="_editable-input_1bqx6_6",ci=e=>c.jsx("input",{...e}),Dr=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:d,onCancel:m,createInput:p=ci,notifier:g,styleHover:x={},dragging:h,maxLength:f,disabled:T=!1,readOnly:q=!1,...A}=e,[D,G]=o.useState(!1),[U,y]=o.useState(!1),[B,S]=o.useState(a);o.useEffect(()=>{S(a)},[a]);const w=o.useRef(null),[k,O]=o.useState(null),E=o.useCallback(function(oe){const L=oe.message;k!==L&&(g?.showMessage?.(L,{type:r.NotificationType.Error}),O(L))},[g,k]),F=o.useCallback(oe=>{let L=!1;try{L=l?.(oe)??!0}catch(z){E(z)}return L?(w.current=null,y(!1),S(oe),L):(setTimeout(()=>{w.current?.focus()},0),L)},[l]),Z=r.useCallbackRef(()=>{S(a),w.current=null,y(!1),m?.()},[m,a]),_=o.useMemo(()=>{if(!U)return null;const oe={className:bt(di),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:f,type:"text",value:B,onFocus:L=>{w.current||(w.current=L.target,setTimeout(()=>{L.target?.select()},0))},onBlur:L=>{w.current&&F(B)},onChange:L=>{U&&S(L.target.value)},onMouseDown:L=>L.stopPropagation(),onKeyDown:L=>L.code==="Escape"?(L.preventDefault(),void Z()):L.code==="Enter"?(L.preventDefault(),void F(L.target.value)):void(L.code!=="Tab"?L.stopPropagation():F(L.target.value))};return c.jsx(c.Fragment,{children:p(oe)})},[U,B,F,Z,p,T]),[P,V]=o.useState();o.useLayoutEffect(()=>{let oe=Object.assign({},n);(h||D)&&(oe=Object.assign(oe,x)),V(oe)},[h,D,x,n]),o.useEffect(()=>{_&&d?.(B)},[_,d,B]);const $=r.useImperativeElement(t,()=>({startEdit(){T||q||y(!0)},cancel(){Z()}}),[]);return c.jsxs("div",{...A,ref:$,style:{flexDirection:"column",display:"flex",...P},className:bt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{T||q||y(!0)},onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:U?0:1},children:B}),_]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...x},children:B})]})})),Pn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function _t(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function yo(e){return"nodeType"in e}function ft(e){var t,n;return e?_t(e)?e:yo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function xo(e){const{Document:t}=ft(e);return e instanceof t}function vn(e){return!_t(e)&&e instanceof ft(e).HTMLElement}function zr(e){return e instanceof ft(e).SVGElement}function Wt(e){return e?_t(e)?e.document:yo(e)?xo(e)?e:vn(e)||zr(e)?e.ownerDocument:document:document:document}const St=Pn?o.useLayoutEffect:o.useEffect;function Hn(e){const t=o.useRef(e);return St(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.current==null?void 0:t.current(...i)},[])}function mn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return St(()=>{n.current!==e&&(n.current=e)},t),n}function dn(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function zn(e){const t=Hn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Nn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let lo={};function Cn(e,t){return o.useMemo(()=>{if(t)return t;const n=lo[e]==null?0:lo[e]+1;return lo[e]=n,e+"-"+n},[e,t])}function Nr(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>{const m=Object.entries(d);for(const[p,g]of m){const x=l[p];x!=null&&(l[p]=x+e*g)}return l},{...t})}}const $t=Nr(1),fn=Nr(-1);function Un(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function Ln(e){if(function(t){if(!t)return!1;const{TouchEvent:n}=ft(t.target);return n&&t instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(t){return"clientX"in t&&"clientY"in t}(e)?{x:e.clientX,y:e.clientY}:null}const Lt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Lt.Translate.toString(e),Lt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),Yo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ui(e){return e.matches(Yo)?e:e.querySelector(Yo)}const gi={display:"none"};function hi(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:gi},n)}function mi(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return o.createElement("div",{id:t,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":i,"aria-atomic":!0},n)}const Lr=o.createContext(null),fi={draggable:`
|
|
23
|
+
The content is not applied.`}),new r.Command("pasteFormulas",w,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new r.Command("pasteTranspose",w,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new r.Command("pasteLinks",w,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];i.addCommands(k,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const w={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(k=>B.paste({...Ll,...k})).update(w),i.getCommand("pasteFormats").updateCallback((k,O)=>B.paste({...Ol,description:O.label(),...k})).update(w),i.getCommand("pasteFormulas").updateCallback((k,O)=>B.paste({...jl,description:O.label(),...k})).update(w),i.getCommand("pasteTranspose").updateCallback((k,O)=>B.paste({...Bl,description:O.label(),...k})).update(w),i.getCommand("pasteLinks").updateCallback((k,O)=>B.paste({...Vl,description:O.label(),...k})).update(w),i.getCommand("cut").update(w),i.getCommand("paste").update(w)},[t,i]);const S=o.useMemo(()=>{if(!D||!q.current)return;const w=D.key;if(w!=="copy"&&w!=="cut"&&w!=="formatPainter")return;const k=q.current.getItem();if(k.getSource()!==t)return;const O=q.current.isCut?.(),E=O?x:g,F=O?p:m,Z=k.getCoords(),_=Z?[Z]:null;return _&&_.length!==0?P=>{const V=[];for(let $=0;$<_.length;$++){const oe=_[$],L=P.toClipBounds(P.getRangeCoordsBounds(oe,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);L&&(V.push(T({range:oe,key:`copy-selection-background-${$}`,x:L.x,y:L.y,width:Math.max(L.width,0),height:Math.max(L.height,0),stroke:E,strokeWidth:2})),V.push(T({range:oe,key:`copy-selection-foreground-${$}`,x:L.x+(L.width<=2?-1:0),y:L.y,width:Math.max(L.width,3),height:Math.max(L.height,3),stroke:F,strokeWidth:2,isAnimatedStroke:!0})))}return V}:null},[D,t,n,m,g,p,x]);return{...B,clipboard:y,overlays:S}},Pl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:d,notifier:m}=e,p=l.body??{},g=a.getView(),{overlays:x}=kr({element:i,sheet:a,sheetView:g,commands:d,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:p.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:p.fill,notifier:m});return tt(a?.getSelection(),{onChange(h){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),x&&n?x(n):null})),Hl="_sheet-selection_12wyx_5",Ul={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Kl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},$l={key:"dragCopy",description:"Drag selection to copy cell contents."},Wl={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Wo=(e,t)=>t.ctrlKey&&t.shiftKey?Wl:t.ctrlKey?$l:t.shiftKey?Kl:Ul,Gl={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},_l=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,notifier:d,onShowTooltip:m,onCloseTooltip:p,sheet:g,gridRef:x,gridStyle:h,isActive:f,editingCoords:T,...q}=e,A=n?.getBounds(),D=r.useCallbackRef(m,[m]),G=r.useCallbackRef(p,[p]),[U,y]=o.useState(()=>g?.getSelection().getCoords()),B=r.useCallbackRef(ce=>{ue.CoordUtils.isEqualSelectionCoords(ce,U)||g&&g.getSelection().updateCoords(ce)},[g,U]),S=r.useEditMode(),w=o.useRef(null),[k,O]=o.useState(g?.getProtection().isLocked()),[E,F]=o.useState(g?.getView().getMovableSelection().length>0),Z=r.ReactUtils.detectIt().primaryInput==="touch",_=!Z&&f,P=T!==null||E,V=r.useCallbackRef(ce=>{const de=ue.CoordUtils.cellToRange(ce);if(g.isClosed())return de;const me=g.getRange(de,{excludeHidden:!0}).getMerges();return me.length===0?de:me[0]},[g]),$=r.useCallbackRef((ce,de,me,Ce,xe,Me)=>{const we=g.getSelectedRange().getExtended(Ce,ce).getCoords();switch(Ce){case s.IRange.Direction.Up:return we.rowStart;case s.IRange.Direction.Down:return we.rowEnd;case s.IRange.Direction.Left:return we.colStart;case s.IRange.Direction.Right:return we.colEnd}},[g]),oe=r.useCallbackRef(()=>{const ce=g.getUsedRange()?.getCoords(),de=g.getRowHeaders().getUsedRange()?.getCoords(),me=g.getColumnHeaders().getUsedRange()?.getCoords();return{...ce,colEnd:Math.max(ce?.colEnd??0,me?.max??0),rowEnd:Math.max(ce?.rowEnd??0,de?.max??0)}},[g]),L=r.useCallbackRef((ce,de)=>g.getRowHeaders().hiddenHeadersAt(ce,de),[g]),z=r.useCallbackRef((ce,de)=>g.getColumnHeaders().hiddenHeadersAt(ce,de),[g]),K=r.useCallbackRef(ce=>g.getRange(ce,{excludeHidden:!0}).getMerges(),[g]),W=r.useCallbackRef(ce=>{g?.getSelection().setAdjusting(ce)},[g]),ge=r.useCallbackRef(async()=>{g?.getSelection().setAdjusting(null),S.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),S.setMode(null))},[S,U,g,i]),ae=o.useMemo(()=>{const ce=S.getMode();return ce?.key==="cut"||ce?.key==="copy"},[S]);tt(g?.getView(),{onMovableSelectionChange:()=>{F(g.getView().getMovableSelection().length>0)}}),tt(g?.getSelection(),{onChange(ce){const de=g.getSelection().getCoords();y(de)}}),tt(g,{onProtectionChange:()=>{O(g.getProtection().isLocked())}});const{body:Q={}}=h||{},X=n.getLayout(),be=!(_&&U.ranges.length<=1&&T===null&&!k&&(!S.getMode()||ae)),{cursor:ke,overlay:ve,onPointerDown:Pe}=dt.useSelection({gridRef:x,commands:i,layout:X,getCellCoordsAsRangeCoords:V,selection:U,fillHandleBorderColor:Q.fill,selectionBackgroundColor:f?h.selection.fill:h.selectionInactive.fill,selectionBorderColor:f?h.selection.strokeFill:h.selectionInactive.strokeFill,selectionRemoveBackgroundColor:f?h.selectionRemove.fill:h.selectionInactive.fill,selectionRemoveBorderColor:f?h.selectionRemove.strokeFill:h.selectionInactive.strokeFill,disableFillDrag:be,disableMoveDrag:Z||!(f&&U.ranges.length<=1&&T===null&&!k),disableTouchSelection:P,onSelectionChange:B,onSelectionDragStart:W,onSelectionDragEnd:ge,onMoveDragStart:(ce,de,me)=>{S.setMode(Wo(0,me))},onMoveDragUpdate:(ce,de,me)=>{S.setMode(Wo(0,me))},onMoveDragEnd:(ce,de)=>{S.setMode(null)},onMoveDragDone:async(ce,de,me)=>{if(ue.CoordUtils.isEqualRanges(ce,de))return;const Ce=g.getRange(de);if(d?.showOptions){const Le=Ce.getDifferences(ce);let Ve=!1;for(let C=0;!Ve&&C<Le.getCount();C++)Ve=Le.at(C).isContentful();if(Ve&&await d?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const xe=!me.ctrlKey,Me=me.shiftKey,we=Me?xe?"Insert Moved Cells":"Insert Copied Cells":xe?"Move Cells":"Copy Cells",Ee=await d?.showBusy?.(we);try{const Le=g.getRange(ce);await Ce.doBatch(async()=>{Me?await Ce.insertFrom(ce,{isCut:xe,undoRange:Le}):await Ce.copyFrom(ce,{isCut:xe,undoRange:Le}),Le.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0}),Ce.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0})},{description:we,autoSelect:!0})}catch(Le){d?.showError?.(Le)}finally{Ee?.()}},contentfulCellFinder:$,hiddenRowsAt:L,hiddenColumnsAt:z,mergedRanges:K,getDataCoords:oe,canSelectionSpanMergedCells:ce=>{const de=g.getRange(ce);return de.isEntireColumns()||de.isEntireRows()},onFill:async(ce,de)=>{const me="Auto Fill",Ce=await d?.showBusy?.(me);try{await g.doBatch(()=>{g.getRange(ce).autoFill(de),g.getRange(de).autoFit({orientations:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:me,autoSelect:!0})}catch(xe){d?.showError?.(xe)}finally{w.current=null,Ce?.()}},onFillPreview:(ce,de,me)=>{if(x.current&&D){S.setMode(Gl);try{w.current?.direction!==me&&(w.current=null,g.getRange(ce).autoFill(de,{previewOnly:C=>{w.current={callback:C,direction:me}}}));const Ce=w.current?.callback?.(de);if(!Ce||Ce.isEmpty())return;const xe=Ce.toText();if(!xe)return;const Me=ue.CoordUtils.cellToRange(Ce.getCoords()),we=n.getRelativePointFromClient(0,0);let Ee=0,Le=0,Ve=r.ToolTipPlacement.Bottom;if(me===s.IRange.Direction.Down){Ee=X.getColOffset(Me.colEnd+1)-we.x;const C=X.getRowOffset(Me.rowEnd),Ue=X.getRowOffset(Me.rowEnd+1);Le=Ue-(Ue-C)/2-we.y,Ve=r.ToolTipPlacement.Right}else if(me===s.IRange.Direction.Right){Le=X.getRowOffset(Me.rowEnd+1)-we.y;const C=X.getColOffset(Me.colEnd),Ue=X.getColOffset(Me.colEnd+1);Ee=Ue-(Ue-C)/2-we.x,Ve=r.ToolTipPlacement.Bottom}else if(me===s.IRange.Direction.Up){Ee=X.getColOffset(Me.colEnd+1)-we.x;const C=X.getRowOffset(Me.rowStart),Ue=X.getRowOffset(Me.rowStart+1);Le=Ue-(Ue-C)/2-we.y,Ve=r.ToolTipPlacement.Right}else if(me===s.IRange.Direction.Left){Le=X.getRowOffset(Me.rowEnd+1)-we.y;const C=X.getColOffset(Me.colStart),Ue=X.getColOffset(Me.colStart+1);Ee=Ue-(Ue-C)/2-we.x,Ve=r.ToolTipPlacement.Bottom}D({anchor:{x:Ee,y:Le},display:xe,placement:Ve})}catch(Ce){d?.showError?.(Ce)}}},onFillDone:()=>{w.current=null,S.setMode(null),G?.()}}),he=r.useCallbackRef(ce=>{Pe(r.ReactUtils.createSyntheticEvent(ce))},[Pe,T]);o.useEffect(()=>{const ce=n?.getStage();if(ce)return ce.addEventListener("pointerdown",he),()=>{ce.removeEventListener("pointerdown",he)}},[n?.getStage()]);const He=r.useImperativeElement(t,()=>({}),[]),Se=o.useRef(null);return c.jsx("div",{className:bt(a,"sheet-selection",Hl),style:{position:"absolute",width:A?.width,height:A?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Gt([He,Se]),...q,children:ve(n)})})),In=Object.freeze({x:0,y:0,width:0,height:0}),Zl={fireOnModelChange:!1},Xl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:d,onHide:m,onShow:p,onUnFocus:g,isDragging:x,updateFrameBounds:h,dragStart:f,style:T,disabled:q,renderMovable:A,...D}=e,[G,U]=o.useState(In),[y,B]=o.useState(null),[S,w]=o.useState(!1),k=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const E=a.getBounds();if(!E)return;const F=i.toViewBounds(E);U(F??In),h(F??In)},[i?.getBounds()]),tt(a,{onBoundsChange:E=>{const F=E.getBounds();if(!F)return;const Z=i.toViewBounds(F);U(Z??In),h(Z)},onSelectionChange:()=>{const E=ue.CommonUtils.hasFocus(k.current,!0);!S&&!E||a.isSelected()||g()}}),tt(a,{onRequestFocus:()=>ue.CommonUtils.whenFocus(k.current,!0)},Zl),o.useEffect(()=>{const E=k.current;return l(E),()=>{d(E)}},[]);const O=o.useMemo(()=>{if(!G)return null;let{width:E,height:F}=G;return A({view:i,movable:a,disabled:q,isDragging:x,style:{position:"relative",left:0,top:0,width:E,height:F},onHide:m,onShow:p})},[i,a,G.width,G.height,q,x]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Gt([k,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:G.x,top:G.y,width:G.width,height:G.height,...T},onMouseDown:async E=>{const F=E.shiftKey||E.ctrlKey,Z=a.isSelected(),_=E.currentTarget;F&&Z?a.unselect():(Z&&!F||await a.select({addToSelection:F}),f(E.nativeEvent,_),_.focus())},onFocus:E=>{E.relatedTarget&&!y&&B(E.relatedTarget),w(!0)},onBlur:E=>{y&&!k?.current?.contains(E.relatedTarget)&&B(null),E.relatedTarget&&w(!1)},...D,children:O})})),Yl="_movable-area_314c6_5",Mr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:d,onUnFocus:m,onFocus:p,disabled:g=!1,disableDrag:x=!1,disableResize:h=!1,className:f,style:T,renderDirections:q=["nw","n","ne","w","e","sw","s","se"],onFirstRender:A,...D}=e,G=n.getBounds(),U=r.useCallbackRef(A,[A]),y=r.useCallbackRef(m,[m]),B=r.useCallbackRef(p,[p]),[S,w]=o.useState([]),[k,O]=o.useState(!1),[E,F]=o.useState(!1),Z=o.useRef(!0),_=o.useRef(new Map),P=o.useRef(new Map),V=o.useRef(new Map),$=o.useRef(new Map),oe=o.useRef(new Map),L=o.useRef({onRequestFocus:ee=>(de(ee),null)}),z=o.useRef(null),K=o.useRef(null),W=o.useRef(null),[ge,ae]=o.useReducer(ee=>ee+1,0);o.useLayoutEffect(()=>{ae()},[n,i]),tt(i,{onCollectionChange:()=>{const ee=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0}),Fe=oe.current;Fe.forEach(Ie=>{Ie()}),Fe.clear();const Be=L.current;for(let Ie=0;Ie<ee.length;Ie++){const ze=ee[Ie];if(ze.isClosed())continue;const Ae=ze.addListeners(Be);Fe.set(ze,Ae)}ae()},onInvalidated:()=>{ae()}}),tt(a,{onMovableSelectionChange(ee){X(),ae()}});const Q=o.useCallback((ee,Fe)=>{const Be=V.current.get(ee);W.current&&(W.current.getTargets().forEach(Ie=>{if(Ie===Be)return Ie.style.left=Fe.x+"px",Ie.style.top=Fe.y+"px",Ie.style.width=Fe.width+"px",void(Ie.style.height=Fe.height+"px")}),W.current.updateRect())},[]),X=()=>{const ee=[],Fe=a.getMovableSelection();Fe.forEach(Be=>{const Ie=V.current.get(Be);Ie&&Fe.indexOf(Be)!==-1&&ee.push(Ie)}),w(Be=>ue.CommonUtils.isEqualArrays(Be,ee)?Be:ee)},be=o.useRef(null),ke=o.useMemo(()=>new Promise(ee=>{be.current=ee}),[]),ve=o.useRef(null),Pe=r.useCallbackRef(async(ee,Fe)=>{ve.current=Fe,await(async()=>!(!await ke.then()||!W.current))()&&ve.current===Fe&&W.current.dragStart(ee,Fe)},[S]),[he,He]=o.useState(!1),Se=o.useRef(null),ce=o.useRef(null),de=r.useCallbackRef(async(ee=null)=>{if(ee||(ee=a.getMovableSelection()[0]),!ee)return y?.(),!1;const Fe=V.current.get(ee);Fe?(await ue.CommonUtils.whenFocus(Fe),Fe.focus(),ce.current=Fe,Se.current=null):Se.current=ee},[a]);o.useEffect(()=>{he&&S.length>0&&ce.current!==S[0]&&de(),Z.current&&(U?.(),Z.current=!1)},[S]);const me=o.useMemo(()=>{const ee=i.getItems({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(ee.length===0&&_.current.size===0)return null;const Fe=(R,re,j,J=!0)=>{const u=R.isSelected(),M={tabIndex:j,view:n,movable:R,onRefLoad:I=>{Se.current===R&&(I.focus(),ce.current=I,Se.current=null),V.current.set(R,I),P.current.set(I,R),re.rendered=!0,X()},onRefUnload:I=>{V.current.delete(R),P.current.delete(I),re.rendered=!1,X()},onUnFocus:y,onHide:I=>{re.onHide=I},onShow:I=>{re.onShow=I},isDragging:u&&(E||k),disabled:g,renderMovable:l,updateFrameBounds:I=>{Q(R,I)},dragStart:Pe,onMouseUp:()=>{if(ve.current=null,K.current){O(!1),F(!1);let I=!1;$.current?.forEach(b=>{ue.CommonUtils.isEqualBounds(b.movable.getBounds(),b.startBounds)||(I=!0)}),I?xe():Me()}},style:{opacity:J?k&&u?.7:void 0:0,zIndex:k&&u?R.getZIndex()+ee.length:void 0,pointerEvents:J?void 0:"none",cursor:E&&u?"grabbing":g||x?"initial":"move",boxShadow:!u||E&&!k?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Xl,{...M},`movable-${R.getUUID()}`)},Be=_.current,Ie=new Map,ze=[];for(let R=0;R<ee.length;R++){const re=ee[R];if(re.isClosed())continue;let j=Be.get(re);j||(j={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(J,u)=>{if(!u||u.shown===!0)return;u.shown=!0;const M=++u.visibilityRequestId;requestAnimationFrame(()=>{const I=_.current.get(J);I&&M===u.visibilityRequestId&&(u.onShow?.(J),I.shown=!0)})},doHide:async(J,u)=>{if(!u||u?.shown===!1)return;u.shown=!1;const M=++u.visibilityRequestId,I=await Promise.resolve(u.onHide?.(J));M===u.visibilityRequestId&&I!==!1&&(u.shown=!1,_.current.delete(J),ae())},visibilityRequestId:0}),j.frame=Fe(re,j,R,!0),ze.push(j.frame),j.doShow(re,j),Be.delete(re),Ie.set(re,j)}const Ae=[];return a.getMovableSelection().forEach(R=>{const re=Be.get(R);re&&(re.frame=Fe(R,re,-1,!1),Ae.push(re.frame),Be.delete(R),Ie.set(R,re))}),Be.forEach((R,re)=>{R.frame=Fe(re,R,-1,!1),Ae.push(R.frame),R.doHide(re,R),Be.delete(re),Ie.set(re,R)}),_.current=Ie,X(),[...Ae,...ze]},[ge,n,l,g,x,h,k,E]),Ce=r.useCallbackRef((ee,Fe)=>{const Be=`${Fe} ${S.length===1?s.TextUtils.capitalize(P.current?.get(S[0]).getContent().getType()):"Drawings"}`;K.current&&(console.warn(`Transaction ${K.current.getDescription()} is being replaced by ${Be}`),K.current.rollback(),K.current=null),K.current=d.beginCommit({description:Be}),$.current.clear();for(let Ie=0;Ie<S.length;Ie++){const ze=S[Ie],Ae=P.current?.get(ze);Ae?$.current.set(ze,{movable:Ae,startBounds:n.toViewBounds(Ae.getBounds())}):console.warn("invalid element",Ae)}},[d,n,S]),xe=o.useCallback(()=>{if(!K.current)return;const ee=[];$.current?.forEach(Fe=>{ee.push(Fe.movable)}),K.current.commit({viewAfter:{view:a,movableSelection:ee}}),$.current.clear(),K.current=null},[]),Me=o.useCallback(()=>{K.current&&(K.current.rollback(),K.current=null)},[]),we=o.useRef(null);o.useEffect(()=>{we.current&&(we.current.onscroll=ee=>{ee.preventDefault(),ee.srcElement.scrollTop=0,ee.srcElement.scrollLeft=0})},[we.current]);const Ee=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:de,focus:()=>{de()}}),[a]),[Le,Ve]=o.useState(null),C=o.useRef(!1),Ue=o.useRef(!1),Qe=o.useRef(!1);o.useEffect(()=>{if(g||S.length===0||Qe.current||C.current)return;if(Ue.current)return void requestAnimationFrame(()=>{W.current&&z.current&&W.current.refTargets.length>0&&(Qe.current=!0,be.current?.(!0)),w([...S])});C.current=!0;const ee=o.lazy(async()=>{try{const Fe=await Promise.resolve().then(()=>require("./CsCdNsZRtE7M2QdX.cjs"));return C.current=!1,Ue.current=!0,w([...S]),Fe}catch(Fe){return console.warn(Fe),be.current?.(!1),null}});Ve(ee)},[S,g,x,h]);const $e=o.useMemo(()=>!Le||g?null:c.jsx(o.Suspense,{children:c.jsx(Le,{className:bt({dragging:k||E,resizing:k,moving:E}),container:null,ref:W,target:W.current?S:[],draggable:!g&&!x,resizable:!g&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:q,onResizeStart:ee=>{Ce(ee.target,"Resize")},onResize:ee=>{if(!K.current)return ee.stopDrag(),void ae();O(!0);const Fe=ee.direction[0]!==0&&ee.direction[1]!==0;let Be=0,Ie=0;for(let ze=0;ze<S.length;ze++){const Ae=S[ze],R=$.current.get(Ae),re=P.current.get(Ae);if(!R||!re){console.warn("invalid element");continue}let j=ee.dist[0],J=ee.dist[1],u=ee.drag.dist[0],M=ee.drag.dist[1],I=R.startBounds.width,b=R.startBounds.height;ze===0?(Be=I,Ie=b):(j*=I/Be,u*=I/Be,J*=b/Ie,M*=b/Ie);const N={...R.startBounds};if(N.width=Math.max(0,I+j),N.height=Math.max(0,b+J),ee.direction[0]===-1&&(N.width=Math.max(0,Math.min(R.startBounds.x+I,I-u))),ee.direction[1]===-1&&(N.height=Math.max(0,Math.min(R.startBounds.y+b,b-M))),Fe&&(re.isLockAspectRatio()||ee.inputEvent?.shiftKey)){const v=I/b,H=N.width/N.height;H>v?N.height=N.width/v:H<v&&(N.width=N.height*v)}ee.direction[0]===-1&&(N.x=Math.max(0,Math.min(R.startBounds.x+I,R.startBounds.x+I-N.width))),ee.direction[1]===-1&&(N.y=Math.min(R.startBounds.y+b,R.startBounds.y+b-N.height)),R.movable.setBounds(n.toAbsoluteBounds(N))}},onResizeEnd:ee=>{O(!1),xe()},onDragStart:ee=>{Ce(ee.target,"Move")},onDrag:ee=>{if(!K.current)return ee.stopDrag(),void ae();F(!0);for(let Fe=0;Fe<S.length;Fe++){const Be=S[Fe],Ie=$.current.get(Be);Ie?Ie.movable.setBounds(n.toAbsoluteBounds({...Ie.startBounds,x:Ie.startBounds.x+ee.translate[0],y:Ie.startBounds.y+ee.translate[1]})):console.warn("invalid element")}},onDragEnd:ee=>{},onMouseUp:ee=>{}})}),[ge,Le,S,n,g,x,h,k,E]);return c.jsx("div",{className:bt(f,"movable-area",Yl),style:{width:G.width,height:G.height,...T,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Gt([Ee,we]),...D,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:G.width,height:G.height},...D,children:c.jsxs("div",{ref:z,style:{position:"absolute",pointerEvents:"auto"},onFocus:ee=>{B?.(),He(!0)},onBlur:ee=>{He(!1)},onKeyDownCapture:ee=>{if(ee.isDefaultPrevented())return;const Fe=ee.nativeEvent.ctrlKey,Be=ee.nativeEvent.altKey,Ie=ee.nativeEvent.shiftKey;if(ee.which===r.KeyCodes.Escape){const j=a.getMovableSelection();let J=[...j];return S.forEach(u=>{if(J.length===0)return;const M=P.current.get(u);let I=J.indexOf(M);J.splice(I,1)}),J.length!==j.length&&a.selectMovables(J),J.length===0&&y?.(),void ee.preventDefault()}const ze=.1,Ae=j=>{i.updateSelected(J=>{J.setRotation(J.getRotation()+j)},"Rotate")},R=(j,J=!0)=>{i.updateSelected(u=>{const M=u.getBounds();let I=1+j;J||(I=1/I);const b=Math.sqrt(Math.pow(M.width,2)+Math.pow(M.height,2)),N=Math.atan2(M.height,M.width),v=I*b;if(v<10)return;const H=v*Math.cos(N),Y=v*Math.sin(N),ne={x:M.x+(M.width-H)/2,y:M.y+(M.height-Y)/2,width:H,height:Y};u.setBounds(ne)},"Resize")},re=j=>{i.updateSelected(J=>{const u=J.getBounds(),M={x:u.x+(j.x??0),y:u.y+(j.y??0),width:u.width+(j.width??0),height:u.height+(j.height??0)};J.setBounds(M)},"Nudge")};if(ee.which===r.KeyCodes.Delete)i.updateSelected(j=>{j.delete()},"Delete"),ee.preventDefault();else if(ee.key==="a"&&Fe){const j=a.getMovableSelection();a.selectMovables(i.getItems(),!0),a.selectMovables(j,!0),ee.preventDefault()}else ee.key==="ArrowLeft"?(Ie?R(ze,!1):Be?Ae(-10):re({x:Fe?-10:-1}),ee.preventDefault()):ee.key==="ArrowRight"?(Ie?R(ze,!0):Be?Ae(10):re({x:Fe?10:1}),ee.preventDefault()):ee.key==="ArrowUp"?(Ie?R(ze,!0):re({y:Fe?-10:-1}),ee.preventDefault()):ee.key==="ArrowDown"&&(Ie?R(ze,!1):re({y:Fe?10:1}),ee.preventDefault())},children:[me,$e]})})})})),Ut=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,i=0,a=0;for(let l=0;l<e.length;l++){const d=e[l].getBounds();t=Math.min(d.x,t),n=Math.min(d.y,n),i=Math.max(d.x+d.width,i),a=Math.max(d.y+d.height,a)}return{x:t,y:n,width:i-t,height:a-n}},Go=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let d=0,m=Number.MAX_SAFE_INTEGER,p=0;for(let h=0;h<e.length;h++){const f=e[h],T=f.getBounds();d+=T[l],m=Math.min(T[i],m),p=Math.max(T[i]+T[l],p),n.push({bounds:T,movable:f})}const g=(p-m-d)/(e.length-1);n.sort((h,f)=>{const T=h.bounds[i],q=f.bounds[i];return T!==q?T-q:h.bounds[a]-f.bounds[a]});const x=new Map;x.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const f=n[h-1].bounds,T={...n[h].bounds};T[i]=f[i]+f[l]+g,n[h].bounds=T,x.set(n[h].movable,T)}return x.set(n[n.length-1].movable,n[n.length-1].bounds),x};function Tr(e){const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:d,notifier:m}=e,p=r.useEditMode();o.useRef(p.getMode()).current=p.getMode();const g=r.useCallbackRef(async(y,B,S=null,w=!0)=>{const k=async()=>{const O=await Promise.resolve(m?.showBusy?.(y.label()));try{await B();const E=S??y?.label?.();if(d){let F=null;y&&E!==!1&&(F=new r.SimpleCommand(y.key(),l,{label:E,description:E},k)),d(F)}O?.(),w&&p.setMode(null)}catch(E){O?.(),m?.showError?.(E)}};await k()},[d,m]),[x,h]=o.useReducer(y=>y+1,0),f=r.useCallbackRef((y,B,S)=>{if(!n)return;const w=n.getMovableSelection();if(w.length===0)return;let k="Drawings";if(w.length===1){const E=w[0];k=s.TextUtils.capitalize(E.getContent().getType())??"Drawing"}const O=`${y.label()} ${k}`;g(y,()=>{let E=null;i&&(E=i.beginCommit(O));const F=n.getMovableSelection();if(F.length===0)return;const Z=S?.(F);for(let _=0;_<F.length;_++){const P=F[_];B(P,Z)}E?.commit()})},[n,i]),[T,q]=o.useState(n.getMovableSelection()[0]??null),[A,D]=o.useState(!T||T?.isProtected()),G=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){f(this,y=>{y.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){f(this,y=>{y.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){f(this,y=>{y.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){f(this,y=>{y.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){f(this,y=>{y.setLockAspectRatio(!y.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){f(this,y=>{y.setAnchorType(s.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",l,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){f(this,y=>{y.setAnchorType(s.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",l,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){f(this,y=>{y.setAnchorType(s.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left."},function(){f(this,(y,B)=>{y.setBounds({x:B.x})},Ut)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){f(this,(y,B)=>{y.setBounds({x:(B.width-y.getBounds().width)/2+B.x})},Ut)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right."},function(){f(this,(y,B)=>{y.setBounds({x:B.width-y.getBounds().width+B.x})},Ut)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top."},function(){f(this,(y,B)=>{y.setBounds({y:B.y})},Ut)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){f(this,(y,B)=>{y.setBounds({y:(B.height-y.getBounds().height)/2+B.y})},Ut)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){f(this,(y,B)=>{y.setBounds({y:B.height-y.getBounds().height+B.y})},Ut)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){f(this,(y,B)=>{y.setBounds(B.get(y))},y=>Go(y))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){f(this,(y,B)=>{y.setBounds(B.get(y))},y=>Go(y,!1))}),new r.Command("formatDrawFlipHorz",l,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",l,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",l,{label:"Group",description:"Group the selected drawings into a single drawing."}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new r.Command("formatDrawSwapShapes",l,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",l,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",l,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,T]);o.useEffect(()=>{},[p]);const U=o.useMemo(()=>{let y=null;return y=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),y.addCommands(G,!0),y},[a,G]);return tt(T,{onAnyChange:()=>{U.getCommand("formatAnchorTypeTwoCell").update({state:T?.getAnchorType()===s.IAnchored.Type.TwoCell}),U.getCommand("formatAnchorTypeOneCell").update({state:T?.getAnchorType()===s.IAnchored.Type.OneCell}),U.getCommand("formatAnchorTypeAbsolute").update({state:T?.getAnchorType()===s.IAnchored.Type.Absolute}),U.getCommand("formatAnchorTypeAbsolute").update({state:T?.getAnchorType()===s.IAnchored.Type.Absolute}),U.getCommand("toggleLockAspectRatio").update({state:T?.isLockAspectRatio()})},onProtectedChange:y=>{D(y.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const y=n.getMovableSelection()[0]??null;q(y),D(!y||y.isProtected()),h()}}),tt(t,{onCollectionChange:()=>{h()}}),o.useEffect(()=>{const y={disabled:A};U.getCommand("formatAnchorTypeTwoCell").update(y),U.getCommand("formatAnchorTypeOneCell").update(y),U.getCommand("formatAnchorTypeAbsolute").update(y),U.getCommand("toggleLockAspectRatio").update(y);const B=t.getCount(),S=n.getMovableSelection(),w=A||B<=1||S.length===0;let k={disabled:w},O=k;if(!w&&S.length===1){const Z=S[0];Z.getZIndex()===0&&(k={disabled:!0}),Z.getZIndex()===B-1&&(O={disabled:!0})}U.getCommand("moveToFront").update(O),U.getCommand("moveForward").update(O),U.getCommand("moveToBack").update(k),U.getCommand("moveBackward").update(k);const E={disabled:A||S.length<=1};U.getCommand("formatDrawAlignLeft").update(E),U.getCommand("formatDrawAlignCenter").update(E),U.getCommand("formatDrawAlignRight").update(E),U.getCommand("formatDrawAlignTop").update(E),U.getCommand("formatDrawAlignMiddle").update(E),U.getCommand("formatDrawAlignBottom").update(E),U.getCommand("formatDrawFlipHorz").update(E),U.getCommand("formatDrawFlipVert").update(E),U.getCommand("formatDrawGroup").update(E),U.getCommand("formatDrawUngroup").update(E),U.getCommand("formatDrawSwapShapes").update(E),U.getCommand("formatDrawSwapShapesHorz").update(E),U.getCommand("formatDrawSwapShapesVert").update(E);const F={disabled:A||S.length<=2};U.getCommand("formatDrawDistributeHorz").update(F),U.getCommand("formatDrawDistributeVert").update(F)},[x,A,x]),U}const Jl=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:d,onHide:m,onShow:p,...g}=e;o.useEffect(()=>{},[a]);const x=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:f,width:T}]=Nt();return c.jsx("div",{...g,ref:Gt([x,h]),children:c.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:l.getZoom(),display:"flex",position:"relative",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),Ql=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:d,target:m,notifier:p,onRepeatCommandChange:g}=e,x=Tr({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:g,commands:d,target:m,notifier:p});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const h=o.useMemo(()=>c.jsx(Mr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{x.activate(),a?.onFocus?.()}},"movable-area"),[i,a,d,x]);return h&&n?h:null})),ei=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:d,setEditingCoords:m,commands:p,notifier:g=r.DefaultNotifier}=e,x=r.useEditMode(),[h,f]=o.useState(null),[T,q]=o.useState(null),[A,D]=o.useState(null),[G,U]=o.useState(null),[y,B]=o.useState(null);o.useLayoutEffect(()=>{if(A===null)return U(null),void B(null);const z=()=>{const K=i.getRange(A).getCell(),W=K.getStyle();let ge,ae=W.getFill()?.toCSS(a.body.darkMode);ae.background!=="none"&&ae.background!=="transparent"||(ae=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),ae.background!=="none"&&ae.background!=="transparent"||(ae={background:a.body.fill}),U({style:ae}),K&&!K.getFormula()&&(ge=K?.getRenderHorizontalAlignment()),B(ge??r.HorizontalAlignment.Left)};return z(),i.getRange(A).addListener(()=>{z()})},[i,A,a?.body]);const S=r.useCallbackRef(()=>{let z=T.editState.dirty??"";if(T.editState.dirty!==void 0){const K=s.TextUtils.clampString(z);try{const W=T.sheet.getRange(T.coords),ge=`Typing '${K}' into ${W.toString()}`;return W.setValue(z,{description:ge,autoFit:!0}),D(null),q(null),x.setMode(null),m(null),!0}catch(W){throw g.showError(new Error(`Unable to enter '${K}'.`,{cause:W})),W}}},[i,T,g]),w=r.useCallbackRef(z=>i.getRange(z).getCell().getExtrusions()??ue.CoordUtils.cellToRange(z),[i]),k=r.useCallbackRef(z=>{let K=s.IRange.Orientation.Row,W=!1;z!==s.IRange.Direction.Up&&z!==s.IRange.Direction.Down||(K=s.IRange.Orientation.Column),z!==s.IRange.Direction.Left&&z!==s.IRange.Direction.Up||(W=!0),i.getSelection().traverse(K,W)},[i]),O=o.useCallback((z,K)=>{if(l)return l(z,K);if(!i)return null;const{ref:W,...ge}=z;return c.jsx(br,{ref:W,...ge,sheet:i,bodyStyle:a?.body,activeCoords:K,commands:p,onChangeEdit:ae=>{const Q={sheet:i,coords:K,editState:ae};x.setMode(X=>({...X,description:Q.editState.editMode?"Edit":"Enter",args:{...X?.args,stateAndCoords:Q}}))},editState:T.editState})},[i,G,l,T,A]),{overlay:E,startEdit:F,submitEdit:Z,cancelEdit:_,onKeyboardEventNative:P,onPointerEventNative:V}=dt.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:O,canEdit:()=>{const z=i.getProtection();if(z.isReadOnly())return!1;const K=z.isLocked();return K&&d(),!K},onBeforeStartEdit:z=>{const K=wr(()=>i.getRange(z).getCell()),W={sheet:i,coords:z,editState:Object.freeze(K)};x.setMode({key:"edit",args:{stateAndCoords:W}}),q(W)},onStartEdit:z=>{D(z),m(z)},onSubmitEdit:S,onCancelEdit:z=>{D(null),q(null),x.setMode(null),m(null)},onDoneEdit:z=>{x.setMode(null)},onNavigate:k,containerProps:G,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:y,getRangeCoords:w});tt(i.getSelection(),{onChange(z){f(i.getSelection().getCoords().cell)}});const $=r.useCallbackRef(z=>{V(z),A&&Z()},[V,_,A]),oe=o.useCallback(z=>{V(z)},[V]),L=o.useCallback(z=>{P(z)},[P]);return o.useEffect(()=>{const z=n?.getStage();if(z)return z.addEventListener("pointerdown",$),z.addEventListener("dblclick",oe),z.addEventListener("keydown",L),()=>{z.removeEventListener("pointerdown",$),z.removeEventListener("dblclick",oe),z.removeEventListener("keydown",L)}},[n?.getStage()]),o.useEffect(()=>{const z=x.getMode(),K=z?.key;K==="edit"||K==="enter"?T?z.args?.cancel?_():z.args?.submit?Z():q(z.args?.stateAndCoords):F(z.args?.start):A&&_()},[x]),E(n,t)})),Ir="white",Er="black",ti=`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='${Er}' fill='${Ir}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,ni=`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='${Er}' fill='${Ir}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,oi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[d,m]=o.useState(null),[p,g]=o.useState(null),[x,h]=o.useState(null),[f,T]=o.useState(null),q=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const S=i.getTables().getItems({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)}else l(!1),m(null)},[i,n]),A=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),k=i.getTables().getItems({address:w});k.length===1&&k[0].select()},[n,i]),D=r.useCallbackRef(S=>{S.preventDefault(),S.stopPropagation();const w=n.getCellCoordsFromClient(S.clientX,S.clientY),k=i.getTables().getItems({address:w});if(k.length===1){const O=k[0].getRange().getCoords(),E={colStart:O.colStart,rowStart:w.rowIndex,colEnd:O.colEnd,rowEnd:w.rowIndex};i.getRange(E).select()}},[n,i]),G=r.useCallbackRef(()=>{if(!a)return;const S=i.getTables().getItems({address:n.getVisibleRangeCoords()});m(S.length>0?S:null)},[i,a,n]);tt(i?.getSelection(),{onChange(S){g(i.getSelection().getCoords().cell)}}),tt(x,{onAnyChange(S){q(),G()}}),tt(f,{onAnyChange(S){G()}}),tt(i,{onTablesChange(S){q(),G()},onInvalidated(S){q(),G()}});const U=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(G,300),300),[]);o.useEffect(()=>{U()},[n]),o.useEffect(()=>{let S=null;if(d)for(let w=0;w<d.length&&!S;w++){const k=d[w],O=k.getRange().getCoords();s.CoordUtils.isCellWithinRange(p,O)&&(S=k)}h(S)},[p,d]);const y=r.useCallbackRef(S=>{let w=null;if(d)for(let k=0;k<d.length;k++){const O=d[k],E=O.getRange().getCoords();let F=n.getRangeCoordsBounds(E);const Z=n.getRelativePointFromClient(S.clientX,S.clientY),_=Z.x,P=Z.y;if(_>=F.x&&_<=F.x+F.width&&P>=F.y&&P<=F.y+F.height){const V=n.getViewportSize();_<=0||P<=0||_>=V.width||P>=V.height||(w=O)}}T(w)},[n,d]);if(o.useEffect(()=>{const S=n?.getStage();if(S&&d)return S.addEventListener("mousemove",y),S.addEventListener("mouseleave",y),()=>{S.removeEventListener("mousemove",y),S.removeEventListener("mouseleave",y)}},[d,n?.getStage()]),!n||!d||d.length===0)return null;const B=[];for(let S=0;S<d.length;S++){const w=d[S];if(w.isClosed())continue;const k=w===f,O=w===x,E=w.getRange().getCoords(),F=n.getRangeCoordsBounds(E);let Z;if(k||O){const _=w.getStyle().getProperties(),P=_.headerRow?.fill?.background??_.wholeTable?.border?.top?.color?.toString();if(P&&i){const V=i.getStyles().parseColor(P);V&&(Z=V.toCSS())}Z||(Z="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}B.push(c.jsx("div",{style:{position:"absolute",left:F.x,top:F.y,width:Math.min(16,F.width),height:F.height,pointerEvents:"all",cursor:ti},onMouseDown:D},`table-select-row-${w.getName()}`)),B.push(c.jsx("div",{style:{position:"absolute",left:F.x,top:F.y,width:Math.min(16,F.width),height:Math.min(16,F.height),pointerEvents:"all",cursor:ni},onMouseDown:A},`table-select-${w.getName()}`)),B.push(c.jsx(dt.Selection,{x:F.x,y:F.y,width:F.width,height:F.height,range:E,strokeWidth:O?.5:0,stroke:Z??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:k?`${Z} 0px 0px 1px 1px`:void 0}},`table-outline-${w.getName()}`))}return B})),ri=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,d]=o.useState(null),[m,p]=o.useState(null),g=o.useRef(null),x=r.useCallbackRef(()=>{const D=i.getSelectedCell(),G=D.getSpill()?.getCoords()??null;ue.CoordUtils.isEqualRanges(G,l)||(p(G?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(G),coords:G}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),d(G))},[i,n,l]);o.useEffect(()=>(g.current&&(clearTimeout(g.current),g.current=null),m&&(g.current=setTimeout(()=>{p(null),g.current=null},a)),()=>{g.current&&(clearTimeout(g.current),g.current=null)}),[m,a]);const h=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(x,80),80),[]);if(tt(i?.getSelection(),{onChange(D){h()}}),tt(i,{onSpillsChange(D){x()},onInvalidated(D){x()}}),!n||!l&&!m)return null;const f=i.getRange(l).getValue()instanceof s.FormulaError.Spill,T=[];let q=m?.bounds??n.getRangeCoordsBounds(l);if(m&&!ue.CommonUtils.isEqualBounds(m.bounds,n.getRangeCoordsBounds(m.coords))&&p(null),q=n.toClipBounds(q,-10),!q)return;const A="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return T.push(c.jsx(dt.Selection,{x:q.x,y:q.y,width:q.width,height:q.height,range:l,strokeWidth:1,stroke:A,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:f?"6 3":void 0,opacity:m?.transition==="out"?0:1,transition:m?.transition?m.transition==="in"||m.transition==="out"?`opacity ${1.5*a}ms ease-in-out`:`left ${a}ms ease-out, top ${a}ms ease-out, width ${a}ms ease-out, height ${a}ms ease-out`:"none",boxShadow:`${A} 0px 0px 4px 0px`}},"spill-outline}")),T})),li={position:"absolute",top:0,left:0,bottom:0,right:0},_o=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},d=n.body=ue.CommonUtils.mergeContentful(e.body,l);return n.body=ue.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},d),n.buttonSurface=ue.CommonUtils.mergeContentful({fill:"#fff",text:{fill:"black"},edgeStrokeFill:"black"},n.buttonSurface),n.selection={fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#217346",strokeWidth:2,...e.selection},n.selectionInactive={...n.selection,fill:"rgba(16, 124, 65, 0.1)",strokeFill:"#dad8d6",...e.selectionInactive},n.selectionRemove={...n.selection,fill:"rgba(200, 0, 0, 0.1)",strokeFill:"rgba(200, 0, 0, 1)",...e.selectionRemove},n.headerSelection={...n.selection,...e.headerSelection},n.headerSelectionInactive={...n.selectionInactive,...e.headerSelectionInactive},n.header=ue.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=ue.CommonUtils.mergeContentful(n.header,l),n.headerSelect=ue.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=ue.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=ue.CommonUtils.mergeContentful(n.headerSelectAll,l),n},ii={fireOnModelChange:!1},Zo={},Fr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Zo,headersStyle:a=Zo,onSheetContextMenu:l,showColumnHeaders:d,columnHeaderProps:m,showRowHeaders:p,rowHeaderProps:g,showScrollbars:x=!0,scrollPaneProps:h,onViewportChange:f,commands:T,onRepeatCommandChange:q,onMoveCell:A,overlays:D,renderMovable:G,viewportComponent:U,onElementLoad:y,getCellEditor:B,onFocus:S,onBlur:w,style:k=r.ReactUtils.EmptyCssProperties,notifier:O,onShowTooltip:E,onShowColumnTooltip:F,onShowRowTooltip:Z,onCloseTooltip:_,gridProps:P,cellRenderProps:V,...$}=e;if(o.useEffect(()=>{s.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[oe,L]=o.useReducer(te=>te+1,0),[z,{width:K,height:W}]=Nt(),ge=r.useCallbackRef(E,[E]),ae=r.useCallbackRef(F,[F]),Q=r.useCallbackRef(Z,[Z]),X=r.useCallbackRef(_,[_]),be=o.useRef(!1);o.useLayoutEffect(()=>{be.current=!0},[n]);const ke=n?.getStyles(),ve=o.useMemo(()=>_o(i,ke),[i,ke]),Pe=o.useMemo(()=>_o(a,ke),[a,ke]),{body:he={},buttonSurface:He={}}=ve,{header:Se={},headerSelect:ce={},headerSelectAll:de={}}=Pe,me=o.useRef(null),[Ce,xe]=o.useState(()=>n?.getView()),Me=(Ce?.getZoomScale()??100)/100,we=o.useMemo(()=>({vertical:Ce.isShowColumnGridlines()&&Me>=.4,horizontal:Ce.isShowRowGridlines()&&Me>=.4}),[Ce?.isShowColumnGridlines(),Ce?.isShowRowGridlines(),Me]),Ee=o.useMemo(()=>{if(Ce?.getGridLineColor())return{strokeDasharray:"1,1"}},[Ce?.getGridLineColor(),ve]),Le=d??Ce?.isShowColumnHeaders(),Ve=p??Ce?.isShowRowHeaders(),[C,Ue]=o.useState({width:0,height:0}),Qe=o.useMemo(()=>{let te=40,Re=20;const Te=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ke=Te?.toCSS()?.fontFamily??ve.header.text.fontFamily,Ze=Te?.getSize()??ve.header.text.fontSize,et=s.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Ze*s.IFont.getDeviceScale()),Ke);te=et.width,Re=et.lineHeight}return{width:Math.round(te+5),height:Math.round(Re+3)}},[C,ve?.header.text,n]),$e=Ve?Me*Qe.width:Se.edgeStrokeWidth,ee=Le?Me*Qe.height:Se.edgeStrokeWidth,Fe=Math.max(K,(n?.getColumnHeaders().getDefaultSize()??Qe.width)+$e+1),Be=Math.max(W,(n?.getRowHeaders().getDefaultSize()??Qe.height)+ee+1),Ie=o.useRef(new Map),ze=o.useRef(null),Ae=()=>({getColOffset:te=>n.getColumnHeaders().findOffset(te),getColIndex:te=>n.getColumnHeaders().findIndex(te),getRowOffset:te=>n.getRowHeaders().findOffset(te),getRowIndex:te=>n.getRowHeaders().findIndex(te)}),[R,re]=o.useState(()=>Ae()),[j,J]=o.useState(!1),[u,M]=o.useState(null),I=!0,b=ve.selection?.strokeFill,N=o.useCallback(()=>kt.current,[]),[v,H]=o.useState(),Y=r.useCallbackRef(te=>{H(te),n&&n.getView()&&n.getView().setTopLeft(te?{left:te.left,top:te.top}:null),f?.(te)},[n,f]),ne=o.useRef(null);o.useEffect(()=>{if(!v||!n)return;const te=n.getRangeAtBounds({x:v.left,y:v.top,width:v.width,height:v.height});ne.current?.(),ne.current=te.addListener(()=>{const Re=te.getCoords();me?.current?.invalidate(Re)})},[v,n]);const[le,ie]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(te=>{const Re=ue.CoordUtils.cellToRange(te);if(n.isClosed())return Re;const Te=n.getRange(Re,{excludeHidden:!0}).getMerges();return Te.length===0?Re:Te[0]},[n]),ye=te=>{if(!te||te.coords.colIndex===0&&te.coords.rowIndex===0)return null;const Re={};return te.coords.colIndex>0&&(Re[ue.AnchorLocation.Left]={index:te.coords.colIndex,scrollOffset:te.topLeft.left}),te.coords.rowIndex>0&&(Re[ue.AnchorLocation.Top]={index:te.coords.rowIndex,scrollOffset:te.topLeft.top}),Re},[fe,pe]=o.useState(()=>ye(n.getView().getFreezePanes())),qe=r.useEditMode(),Oe=o.useCallback(()=>me.current,[]),De=r.useCallbackRef(te=>{qe.setMode(Re=>Re?.key==="edit"?{...Re,args:{...Re.args}}:{key:"edit",args:{stateAndCoords:null,start:te}})},[]),We=r.useCallbackRef(()=>v,[v]),je=Rr({sheet:n,commands:T,target:Oe,onRepeatCommandChange:q,bodyStyle:he,notifier:O,onStartEdit:De,getViewport:We}),[Ge,Ne]=o.useState(n.getSelection().isEntire()),[Xe,it]=o.useState(Ce?.getMovableSelection().length>0),pt=u!==null||Xe,yt=null,[_e,rt]=o.useState(!1);o.useEffect(()=>{rt(!1)},[n.getProtection()]);const vt=r.useCallbackRef(()=>{_e||(rt(!0),O.showMessage?.(c.jsxs("span",{children:["This sheet is protected.",c.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:r.NotificationType.Error}))},[O,_e]),wt=o.useMemo(()=>{const te=qe.getMode();return te?.cursor?te.cursor:null},[yt,qe]),[Ct,gt]=o.useState(null),lt=o.useRef(!1),[Tt,Ot]=o.useState([]),Xt=o.useRef(null),[At,Yt]=o.useState(ue.TypesUtils.EmptyTopLeft),[Mt,wn]=o.useState(ue.TypesUtils.EmptyTopLeft);o.useEffect(()=>{Yt({left:le?.left,top:0})},[le?.left]),o.useEffect(()=>{wn({left:0,top:le?.top})},[le?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{pe(ye(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ie(n.getView().getTopLeft())},onMovableSelectionChange:()=>{it(n.getView().getMovableSelection().length>0)}}),tt(n?.getSelection(),{onChange:()=>{Ne(n.getSelection().isEntire())}}),tt(n,{onViewChange(){xe(n.getView()),re(Ae())},onLayoutChange:()=>{const te=n.getEntireRange();Ue({height:te.getRowCount(),width:te.getColumnCount()}),re(Ae())},onStyleChange:()=>{Dt()},onMovablesChange:()=>{},onInvalidated:()=>{Dt()}}),tt(n,{onRequestScrollIntoView:async(te,Re)=>{if(!Re)return;const Te={colIndex:Re?.coords.colStart,rowIndex:Re?.coords.rowStart};return await me.current?.scrollCellCoordsIntoView(Te,Re?.scroll),!0},onRequestFocus:()=>ue.CommonUtils.whenFocus(kt.current)},ii);const yn=o.useMemo(()=>{const te=(Te,Ke)=>{lt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:Te,colEnd:Te})))return;const et=Ze.getLayout(),ot=Math.max(0,et.getColOffset(Te)),Je=Ze.getBounds(),st=Math.min(Je.x+Je.width,et.getColOffset(Te+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Left||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Right)){const eo=ue.CommonUtils.roundAccurately(Ke*ue.CommonUtils.getDPI(),0),kn=ue.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ke/Me),2).toFixed(2),to="Width: "+(Ke?kn+" ("+eo+" pixels)":"Hidden"),on=Pt.current.getGridElement().getRelativePointFromClient(0,0),Ht=0-on.y,Mn=0-on.y+ee,no={x:ot-(on.x-Je.x),y:Ht,width:st-ot,height:Mn-Ht};requestAnimationFrame(()=>{lt.current&&ae?.({anchor:no,display:to})})}const It=[0,0,0,Je.height],nn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Yn={x:ot-1,y:0,width:1,height:Je.height},Jn={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Qn={x:st-1,y:0,width:1,height:Je.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Yn,...nn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Qn,...Jn})]},"resize-dividers")}])};let Re=null;return{onResizeHeadersStart:(Te,Ke,Ze)=>{Re=n.beginCommit(Ze),te(Te,Ke)},onResizeHeaders:(Te,Ke,Ze)=>{te(Te,Ke)},onResizeHeadersDown:(Te,Ke)=>{te(Te,Ke)},onResizeHeadersEnd:(Te,Ke,Ze)=>{Re?.commit({description:Ze}),Re=null,requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},onResizeHeadersUp:Te=>{requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},...m}},[n,m,ee,Ct]),jt=o.useMemo(()=>{const te=(Te,Ke)=>{lt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:Te,rowEnd:Te,colStart:0,colEnd:C.width})))return;const et=Ze.getLayout(),ot=Math.max(0,et.getRowOffset(Te)),Je=Ze.getBounds(),st=Math.min(Je.y+Je.height,et.getRowOffset(Te+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Top||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Bottom)){const eo=Math.floor(10*ue.CommonUtils.getDPI())/10,kn=ue.CommonUtils.roundAccurately(Ke*eo,0),to=ue.CommonUtils.roundAccurately(kn/Me/(n?.getRowHeaders().getScaleFactor()*ue.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ke?to+" ("+kn+" pixels)":"Hidden"),Ht=tn.current.getGridElement().getRelativePointFromClient(0,0),Mn=0-Ht.x,no=0-Ht.x+$e,pl={x:Mn,y:ot-(Ht.y-Je.y),width:no-Mn,height:st-ot};requestAnimationFrame(()=>{lt.current&&Q?.({anchor:pl,display:on})})}const It=[0,0,Je.width,0],nn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Yn={x:0,y:ot-1,width:Je.width,height:1},Jn={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Qn={x:0,y:st-1,width:Je.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Yn,...nn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Qn,...Jn})]},"resize-dividers")}])};let Re=null;return{onResizeHeadersStart:(Te,Ke,Ze)=>{Re=n.beginCommit(Ze),te(Te,Ke)},onResizeHeaders:(Te,Ke,Ze)=>{te(Te,Ke)},onResizeHeadersDown:(Te,Ke)=>{te(Te,Ke)},onResizeHeadersEnd:(Te,Ke,Ze)=>{Re?.commit({description:Ze}),Re=null,requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},onResizeHeadersUp:Te=>{requestAnimationFrame(()=>X?.()),lt.current=!1,gt(null)},...g}},[n,g,$e]),kt=r.useImperativeElement(t,()=>{const te=Te=>{n?.getView()&&n.getView().selectMovables([]),ze.current=null,me?.current?.focus(Te)},Re=async(Te=null)=>{if(Te||(Te=n?.getView().getMovableSelection()[0]),!Te)return!1;const Ke=Te.getAnchorCoords();if(!Ke)return!1;const Ze=me.current?.getViewFromCellCoords({colIndex:Ke.colStart,rowIndex:Ke.rowStart});if(!Ze)return!1;const et=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(Te)===-1&&n?.getView().selectMovables([Te]);let ot=Ie.current?.get(et);return ot?.current?(await ot.current.focusMovable(Te),!0):(ze.current={movable:Te,anchor:et},!0)};return{getGridElement:()=>me.current,getRowHeaderElement:()=>tn.current,getColumnHeaderElement:()=>Pt.current,rowHeaderHeight:()=>ee,colHeaderWidth:()=>$e,startEdit:De,submitEdit:()=>{qe.setMode(Te=>Te?.key!=="edit"?Te:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{qe.setMode(Te=>Te?.key!=="edit"?Te:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:u!==null,focus:Te=>{n?.getView().getMovableSelection().length>0&&Re()||te(Te)},focusSheet:te,focusMovable:Re,contains:Te=>me?.current?.contains?.(Te),invalidate:Dt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Dt=o.useCallback(te=>{be.current||(me?.current?.invalidate(te),L?.())},[]);o.useEffect(()=>{Dt()},[ve]);const Jt=Ge?de.edgeStrokeFill:Se.fill,Wn=Ge?ce.fill:typeof ve.headerHover=="function"?ve.headerHover(Se)?.fill:Se.fill,nt=o.useMemo(()=>U?c.jsx("div",{className:bt("sheetxl-viewport-overlay",El),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:U}):c.jsx(c.Fragment,{}),[U]);let Qt=null;Le&&Ve&&(Qt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${ee}px`,width:`${$e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:te=>{let Re=!te.ctrlKey;je?.getCommand("selectAll")?.execute(!Re||te.button!==0),te.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:te,clientX:te.clientX,clientY:te.clientY,rowIndex:-1,colIndex:-1}):me.current?.focus()},children:[c.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 ${Jt}`,borderBottom:`2px solid ${Jt}`,background:`${Wn}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${ee}px`,width:`${$e}px`,boxSizing:"border-box",borderRight:`solid 1px ${Se.strokeFill}`,borderBottom:`solid 1px ${Se.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const Bt=r.useCallbackRef(({_left:te,_top:Re})=>{},[]),xn=r.useCallbackRef(te=>{if(!l)return;const Re=me.current.getViewFromClient(te.clientX,te.clientY)?.getCellCoordsFromClient(te.clientX,te.clientY);Re&&(l({originalEvent:te,clientX:te.clientX,clientY:te.clientY,rowIndex:Re.rowIndex,colIndex:Re.colIndex}),te.stopPropagation(),te.preventDefault())},[l]),at=r.useCallbackRef(te=>{if(!(!te.shiftKey&&(te.ctrlKey||te.metaKey)))return;const{deltaY:Re}=te;return Re>0?je.getCommand("sheetZoomOut")?.execute():Re<0&&je.getCommand("sheetZoomIn")?.execute(),Re===0},[je]);o.useEffect(()=>{Ot(null),Xt.current=null,lt.current=!1,gt(null);const te=n?.getView().getTopLeft();Bt(te),me.current?.scrollTo(te),ie(te),xe(n.getView()),pe(ye(n.getView().getFreezePanes())),re(Ae()),L()},[n?.getView()]);const ht=r.useCallbackRef(te=>{const Re=te.getVisibleRangeCoords();if(!Re)return null;const Te=[];return n.getRange(Re).forEach((Ke,Ze)=>{const et=Ze.getCoords(),ot=Ze.getCell();(Je=>{if(Je.isEmpty())return!1;const st=Je.getSpans();if(st.width>1||st.height>1||Je.getStyle().hasVisibleStyling()||Ce.isShowFormulas()&&Je.getFormula()!==null)return!0;const mt=Je.getValue();return mt!==null&&!(!Ce.isShowZeros()&&mt===0&&Je.getType()===s.ScalarType.Number)})(ot)&&Te.push({coords:et,value:ot,range:Ce.isShowFormulas()?null:ot.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),Te},[n,Ce.isShowZeros(),Ce.isShowFormulas(),u]);o.useEffect(()=>{const te=[];D&&te.push(...D),Ct&&te.push(...Ct),ue.CommonUtils.isEqualArrays(te,Xt.current)||(Xt.current=te,Ot(te))},[D,Ct,ve]);const en=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[ve?.header?.edgeStrokeFill]),qn=r.useCallbackRef(te=>{te.isDefaultPrevented()||te.isPropagationStopped()||(ze.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Vt=o.useMemo(()=>{const te=qe.getMode();return te?.key==="cut"||te?.key==="copy"},[qe]),Gn=r.useCallbackRef(async te=>{const Re=qe.getMode();return te.keyCode===r.KeyCodes.Escape&&Re?(te.preventDefault(),void qe.setMode(null)):te.keyCode===r.KeyCodes.Enter&&Vt?(te.preventDefault(),await je?.getCommand("paste")?.execute(),void qe.setMode(null)):void je?.dispatchToFocusedCommand(te)},[je,qe]),tn=o.useRef(null),Sn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx($o,{ref:tn,sheetElement:kt.current,gridRef:me,freezeStart:fe?.[ue.AnchorLocation.Top],oppositeSize:$e,containerWidth:$e,containerHeight:Be,sheetHeader:n.getRowHeaders(),gridStyle:Pe,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Mt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${ee+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${ee}px)`,boxSizing:"border-box",zIndex:"2",...jt?.style},...jt})}),[$e,ee,Be,n,Mt,fe?.[ue.AnchorLocation.Top],ve,I,l,Se.fill,g]),Pt=o.useRef(null),Rn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${ee+Se.edgeStrokeWidth}px`,minHeight:`${ee+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx($o,{ref:Pt,sheetElement:kt.current,gridRef:me,freezeStart:fe?.[ue.AnchorLocation.Left],oppositeSize:ee,containerWidth:Fe,containerHeight:ee,sheetHeader:n.getColumnHeaders(),gridStyle:Pe,scrollPoint:At,onSheetContextMenu:l,...yn,style:{...yn?.style,position:"relative",left:"0px",width:"100%",height:`${ee+Se.edgeStrokeWidth}px`,minHeight:`${ee+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[ee,Fe,n,At,fe?.[ue.AnchorLocation.Left],ve,Se.fill,I,l,m]),cl=r.useCallbackRef(te=>{const{value:Re,key:Te,...Ke}=te;let Ze=Re,et=u;if(!et||et.colIndex===te.coords.colIndex&&et.rowIndex===te.coords.rowIndex||(et=null),!Ze){const st=te.range;if(Ze=n.getRange({rowIndex:st.rowStart,colIndex:st.colStart}).getCell(),Ze.isEmpty())return null}let ot=null;Ze.getHyperlink()&&(ot=async st=>{if(V?.onLinkMouseDown?.(st),st.button===0&&!st.isDefaultPrevented()){st.stopPropagation(),st.preventDefault();try{await Ze.getHyperlink()?.open()}catch(mt){O?.showError?.(mt)}}}),et&&et.colIndex===te.range.colStart&&et.rowIndex===te.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const Je=n.getStyles();return o.createElement(Cr,{...Ke,key:Te,bodyStyle:he,docTheme:Je.getTheme(),normalStyle:Je.getNormal(),showFormulas:Ce.isShowFormulas(),showZeros:Ce.isShowZeros(),onLinkMouseDown:ot,...V,value:Ze})},[n,R,he,u,Ce?.isShowFormulas(),Ce.isShowZeros()]),ul=o.useCallback((te,Re)=>{const{key:Te,...Ke}=te;return[c.jsx(Dl,{ref:Re,getVisibleCells:ht,sheet:n,gridStyle:ve,...Ke},`border-${Te}`),c.jsx(oi,{ref:Re,sheet:n,commands:je,...Ke},`table-${Te}`),c.jsx(ri,{ref:Re,sheet:n,...Ke},`spill-${Te}`),c.jsx(_l,{ref:Re,sheet:n,commands:je,notifier:O,onShowTooltip:ge,onCloseTooltip:X,gridStyle:ve,gridRef:me,editingCoords:u,isActive:I,...Ke},`selection-${Te}`),c.jsx(Pl,{ref:Re,sheet:n,commands:je,gridStyle:ve,element:N,notifier:O,...Ke},`copy-paste-${Te}`),c.jsx(Ql,{ref:Re,sheet:n,commands:je,target:Oe,notifier:O,renderMovable:G,movableProps:{onUnFocus:()=>{kt.current.focus()}},...Ke},`movable-${Te}`),c.jsx(ei,{ref:Re,sheet:n,commands:je,notifier:O,gridStyle:ve,getCellEditor:B,showProtectedError:vt,setEditingCoords:M,...Ke},`editor-${Te}`)]},[n,me.current,ve,B,je,O]),[Io,gl]=o.useState(!1),hl=o.useMemo(()=>{if(Fe===0||Be===0)return null;const te=n.getStyles().getNormal(),Re=te.getFont(),Te=te.getFill(),Ke=te.getBorder(),Ze=te.getFill().getType()===s.IFill.Type.None;let et=Ee,ot=Ee;const Je=(mt,It,nn)=>nn?{stroke:Ke.getBottom().isNone()?"none":mt.getColor().toRGBA(he.darkMode).toString(),...It}:It;ot=Je(Ke.getBottom(),ot,!Ke.getBottom().isNone()),ot=Je(Ke.getTop(),ot,!Ke.getTop().isNone()),et=Je(Ke.getRight(),et,!Ke.getRight().isNone()),et=Je(Ke.getLeft(),et,!Ke.getLeft().isNone());let st=Ce?.getGridLineColor()?.toRGBA(he.darkMode).toString()??he.strokeFill;return Ze||(ot=Je(Ke.getBottom(),ot,!0),ot=Je(Ke.getTop(),ot,!0),et=Je(Ke.getRight(),et,!0),et=Je(Ke.getLeft(),et,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...li,...Te.toCSS(he.darkMode),...Re.toCSS(he.darkMode,Me),"--sxl-app-color-background":he.fill,"--sxl-app-color-shadow":ve.colorShadow,"--sxl-app-color-grey":ve.colorGrey,"--sxl-app-color-button-fill":He.fill,"--sxl-app-color-button-text":He.text?.fill,"--sxl-app-color-button-border":He.edgeStrokeFill,"--sxl-app-color-primary-dark":ve.selection.strokeFill},ref:me,zoom:Me,...P,onFirstRender:mt=>{gl(!0),P?.onFirstRender?.(mt),je?.activate()},showGridLines:we,gridLineColor:st,gridLineColumnsProps:et,gridLineRowsProps:ot,freezeLeft:fe?.[ue.AnchorLocation.Left],freezeLeftProps:en,freezeTop:fe?.[ue.AnchorLocation.Top],freezeTopProps:en,width:Fe,height:Be,columnCount:C.width,rowCount:C.height,cursor:wt??yt??"cell",clipCells:!0,layout:R,cellRenderer:cl,overlayRenderer:ul,getCellCoordsAsRangeCoords:se,getVisibleCells:ht,onWheelScroll:at,onPointerDown:qn,onKeyDown:Gn,onViewportChange:Y,onImmediateScroll:Bt,scrollPoint:le,stageProps:{onFocus:()=>{je?.activate()}},overlays:Tt})},[oe]);o.useEffect(()=>{be.current||L()},[R,fe,Me,je,le?.left,le?.top,he,P,Fe,Be,wt,Tt,I,yt]);let _n={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};x||(_n={..._n,...k});const ml=o.useMemo(()=>{const te=n.getStyles().getTheme(),Re=te.getColorScheme(),Te=te.getFontScheme();return{"--sxl-doc-color-dk1":Re.getDk1().toCSS(he.darkMode),"--sxl-doc-color-dk2":Re.getDk2().toCSS(he.darkMode),"--sxl-doc-color-lt1":Re.getLt1().toCSS(he.darkMode),"--sxl-doc-color-lt2":Re.getLt2().toCSS(he.darkMode),"--sxl-doc-color-accent1":Re.getAccent1().toCSS(he.darkMode),"--sxl-doc-color-accent2":Re.getAccent2().toCSS(he.darkMode),"--sxl-doc-color-accent3":Re.getAccent3().toCSS(he.darkMode),"--sxl-doc-color-accent4":Re.getAccent4().toCSS(he.darkMode),"--sxl-doc-color-accent5":Re.getAccent5().toCSS(he.darkMode),"--sxl-doc-color-accent6":Re.getAccent6().toCSS(he.darkMode),"--sxl-doc-color-hlink":Re.getHlink().toCSS(he.darkMode),"--sxl-doc-color-fol-hlink":Re.getFolHlink().toCSS(he.darkMode),"--sxl-doc-font-major":Te.getMajorFont(),"--sxl-doc-font-minor":Te.getMinorFont()}},[n.getStyles().getTheme()]);let Zn=c.jsx("div",{style:_n,onTouchStart:()=>{Eo()},onFocus:te=>{J(!0),S?.(te)},onBlur:te=>{J(!1),w?.(te)},ref:kt,...$,children:c.jsx("div",{className:bt("sheetxl-sheet",Il),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...ml},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Qt,Sn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[Rn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,backgroundColor:he.fill},ref:z,onContextMenu:xn,children:[hl,nt,c.jsx(Fl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:ve?.selection?.strokeFill,colorCredits:ve?.body?.text?.fill})]})]})]})})});if(x){const te=Re=>c.jsx(wo,{...Re,sheet:n});Zn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${Se.fill}`,minHeight:2*Qe.height,minWidth:2*Qe.width,...k},viewport:v,touchElement:me.current?.stage,disableTouch:pt,onScrollViewport:Re=>{me.current?.scrollTo(Re)},createHorizontalScrollbar:te,createVerticalScrollbar:te,...h,children:Zn})}o.useEffect(()=>{be.current=!1,L?.(),j&&kt.current?.focus()},[n]);const[Xn,fl]=o.useState(!1),Eo=r.useCallbackRef(()=>{Xn||fl(!0)},[Xn]);return o.useEffect(()=>{if(Io)return typeof y=="function"&&y(),r.ReactUtils.detectIt().primaryInput==="touch"&&Eo(),()=>{}},[y,Io,Xn]),Zn}));Fr.displayName="SheetElement";const ai=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xo="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=",Ar=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:d,isDragging:m,view:p,onHide:g,onShow:x,onKeyDownCapture:h,onFocus:f,onBlur:T,loadingPanel:q,...A}=e,[D,G]=o.useState(!1),[U,y]=o.useState(null),[B,S]=o.useState(null),[w,k]=o.useState(null);o.useEffect(()=>{S(null),l.getDetails().then(F=>{G(!1),S(F.asUrl()),F.asSVGText?.()&&k(F.asSVGText())}).catch(F=>{console.warn(F),G(!0),S(Xo),k(null)})},[l]);const O=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),E=o.useMemo(()=>{if(B||w)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:D?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:D?"var(--sxl-app-color-background, white)":void 0,boxShadow:D?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:D?"contain":void 0,opacity:U?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:B,onLoad:()=>{y(!0)},onError:({currentTarget:F})=>{console.log("error"),F.onerror=null,S(Xo),G(!0)},alt:d??`${l.getType()}`})},[U,l,B,w,m]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:m?"drop-shadow(1px 1px 1.5px var(--sxl-app-color-shadow, rgba(0, 0, 0, .25)))":void 0,...a,width:"100%",height:"100%"},tabIndex:0,...A,onKeyDownCapture:F=>{h?.(F)},ref:O,children:[U||D?void 0:q,E]})}));Ar.displayName="PictureEditor";const si=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:d,onHide:m,onShow:p,...g}=e;o.useEffect(()=>{},[a]);const x=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[h,{height:f,width:T}]=Nt();if(!a.isClosed())return c.jsx("div",{...g,ref:Gt([x,h]),children:c.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:l.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:i?"blur(1px)":void 0,boxShadow:d?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),di="_editable-input_1bqx6_6",ci=e=>c.jsx("input",{...e}),Dr=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:d,onCancel:m,createInput:p=ci,notifier:g,styleHover:x={},dragging:h,maxLength:f,disabled:T=!1,readOnly:q=!1,...A}=e,[D,G]=o.useState(!1),[U,y]=o.useState(!1),[B,S]=o.useState(a);o.useEffect(()=>{S(a)},[a]);const w=o.useRef(null),[k,O]=o.useState(null),E=o.useCallback(function(oe){const L=oe.message;k!==L&&(g?.showMessage?.(L,{type:r.NotificationType.Error}),O(L))},[g,k]),F=o.useCallback(oe=>{let L=!1;try{L=l?.(oe)??!0}catch(z){E(z)}return L?(w.current=null,y(!1),S(oe),L):(setTimeout(()=>{w.current?.focus()},0),L)},[l]),Z=r.useCallbackRef(()=>{S(a),w.current=null,y(!1),m?.()},[m,a]),_=o.useMemo(()=>{if(!U)return null;const oe={className:bt(di),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:f,type:"text",value:B,onFocus:L=>{w.current||(w.current=L.target,setTimeout(()=>{L.target?.select()},0))},onBlur:L=>{w.current&&F(B)},onChange:L=>{U&&S(L.target.value)},onMouseDown:L=>L.stopPropagation(),onKeyDown:L=>L.code==="Escape"?(L.preventDefault(),void Z()):L.code==="Enter"?(L.preventDefault(),void F(L.target.value)):void(L.code!=="Tab"?L.stopPropagation():F(L.target.value))};return c.jsx(c.Fragment,{children:p(oe)})},[U,B,F,Z,p,T]),[P,V]=o.useState();o.useLayoutEffect(()=>{let oe=Object.assign({},n);(h||D)&&(oe=Object.assign(oe,x)),V(oe)},[h,D,x,n]),o.useEffect(()=>{_&&d?.(B)},[_,d,B]);const $=r.useImperativeElement(t,()=>({startEdit(){T||q||y(!0)},cancel(){Z()}}),[]);return c.jsxs("div",{...A,ref:$,style:{flexDirection:"column",display:"flex",...P},className:bt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{T||q||y(!0)},onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:U?0:1},children:B}),_]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...x},children:B})]})})),Pn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function _t(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function yo(e){return"nodeType"in e}function ft(e){var t,n;return e?_t(e)?e:yo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function xo(e){const{Document:t}=ft(e);return e instanceof t}function vn(e){return!_t(e)&&e instanceof ft(e).HTMLElement}function zr(e){return e instanceof ft(e).SVGElement}function Wt(e){return e?_t(e)?e.document:yo(e)?xo(e)?e:vn(e)||zr(e)?e.ownerDocument:document:document:document}const St=Pn?o.useLayoutEffect:o.useEffect;function Hn(e){const t=o.useRef(e);return St(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t.current==null?void 0:t.current(...i)},[])}function mn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return St(()=>{n.current!==e&&(n.current=e)},t),n}function dn(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function zn(e){const t=Hn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Nn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let lo={};function Cn(e,t){return o.useMemo(()=>{if(t)return t;const n=lo[e]==null?0:lo[e]+1;return lo[e]=n,e+"-"+n},[e,t])}function Nr(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>{const m=Object.entries(d);for(const[p,g]of m){const x=l[p];x!=null&&(l[p]=x+e*g)}return l},{...t})}}const $t=Nr(1),fn=Nr(-1);function Un(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function Ln(e){if(function(t){if(!t)return!1;const{TouchEvent:n}=ft(t.target);return n&&t instanceof n}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(t){return"clientX"in t&&"clientY"in t}(e)?{x:e.clientX,y:e.clientY}:null}const Lt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Lt.Translate.toString(e),Lt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),Yo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ui(e){return e.matches(Yo)?e:e.querySelector(Yo)}const gi={display:"none"};function hi(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:gi},n)}function mi(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return o.createElement("div",{id:t,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":i,"aria-atomic":!0},n)}const Lr=o.createContext(null),fi={draggable:`
|
|
24
24
|
To pick up a draggable item, press the space bar.
|
|
25
25
|
While dragging, use the arrow keys to move the item.
|
|
26
26
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
27
|
-
`},pi={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vi(e){let{announcements:t=pi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=fi}=e;const{announce:l,announcement:d}=function(){const[h,f]=o.useState("");return{announce:o.useCallback(T=>{T!=null&&f(T)},[]),announcement:h}}(),m=Cn("DndLiveRegion"),[p,g]=o.useState(!1);if(o.useEffect(()=>{g(!0)},[]),function(h){const f=o.useContext(Lr);o.useEffect(()=>{if(!f)throw new Error("useDndMonitor must be used within a children of <DndContext>");return f(h)},[h,f])}(o.useMemo(()=>({onDragStart(h){let{active:f}=h;l(t.onDragStart({active:f}))},onDragMove(h){let{active:f,over:T}=h;t.onDragMove&&l(t.onDragMove({active:f,over:T}))},onDragOver(h){let{active:f,over:T}=h;l(t.onDragOver({active:f,over:T}))},onDragEnd(h){let{active:f,over:T}=h;l(t.onDragEnd({active:f,over:T}))},onDragCancel(h){let{active:f,over:T}=h;l(t.onDragCancel({active:f,over:T}))}}),[l,t])),!p)return null;const x=o.createElement(o.Fragment,null,o.createElement(hi,{id:i,value:a.draggable}),o.createElement(mi,{id:m,announcement:d}));return n?zt.createPortal(x,n):x}var ct;function On(){}function io(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ct||(ct={}));const Rt=Object.freeze({x:0,y:0});function Or(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ci(e,t){const n=Ln(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function jr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function bi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Jo(e){let{left:t,top:n,height:i,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+i},{x:t+a,y:n+i}]}function Br(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Qo(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const wi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Qo(t,t.left,t.top),l=[];for(const d of i){const{id:m}=d,p=n.get(m);if(p){const g=Or(Qo(p),a);l.push({id:m,data:{droppableContainer:d,value:g}})}}return l.sort(jr)};function yi(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),d=a-i,m=l-n;if(i<a&&n<l){const p=t.width*t.height,g=e.width*e.height,x=d*m;return Number((x/(p+g-x)).toFixed(4))}return 0}const xi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:d}=l,m=n.get(d);if(m){const p=yi(m,t);p>0&&a.push({id:d,data:{droppableContainer:l,value:p}})}}return a.sort(bi)};function er(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Rt}function qi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>({...l,top:l.top+e*d.y,bottom:l.bottom+e*d.y,left:l.left+e*d.x,right:l.right+e*d.x}),{...t})}}const Si=qi(1);function Vr(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Ri={ignoreTransform:!1};function Zt(e,t){t===void 0&&(t=Ri);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:x}=ft(e).getComputedStyle(e);g&&(n=function(h,f,T){const q=Vr(f);if(!q)return h;const{scaleX:A,scaleY:D,x:G,y:U}=q,y=h.left-G-(1-A)*parseFloat(T),B=h.top-U-(1-D)*parseFloat(T.slice(T.indexOf(" ")+1)),S=A?h.width/A:h.width,w=D?h.height/D:h.height;return{width:S,height:w,top:B,right:y+S,bottom:B+w,left:y}}(n,g,x))}const{top:i,left:a,width:l,height:d,bottom:m,right:p}=n;return{top:i,left:a,width:l,height:d,bottom:m,right:p}}function tr(e){return Zt(e,{ignoreTransform:!0})}function Kn(e,t){const n=[];return e?function i(a){if(t!=null&&n.length>=t||!a)return n;if(xo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!vn(a)||zr(a)||n.includes(a))return n;const l=ft(e).getComputedStyle(a);return a!==e&&function(d,m){m===void 0&&(m=ft(d).getComputedStyle(d));const p=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(g=>{const x=m[g];return typeof x=="string"&&p.test(x)})}(a,l)&&n.push(a),function(d,m){return m===void 0&&(m=ft(d).getComputedStyle(d)),m.position==="fixed"}(a,l)?n:i(a.parentNode)}(e):n}function Pr(e){const[t]=Kn(e,1);return t??null}function ao(e){return Pn&&e?_t(e)?e:yo(e)?xo(e)||e===Wt(e).scrollingElement?window:vn(e)?e:null:null:null}function Hr(e){return _t(e)?e.scrollX:e.scrollLeft}function Ur(e){return _t(e)?e.scrollY:e.scrollTop}function ho(e){return{x:Hr(e),y:Ur(e)}}var ut;function Kr(e){return!(!Pn||!e)&&e===document.scrollingElement}function $r(e){const t={x:0,y:0},n=Kr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ut||(ut={}));const ki={x:.2,y:.2};function Mi(e,t,n,i,a){let{top:l,left:d,right:m,bottom:p}=n;i===void 0&&(i=10),a===void 0&&(a=ki);const{isTop:g,isBottom:x,isLeft:h,isRight:f}=$r(e),T={x:0,y:0},q={x:0,y:0},A=t.height*a.y,D=t.width*a.x;return!g&&l<=t.top+A?(T.y=ut.Backward,q.y=i*Math.abs((t.top+A-l)/A)):!x&&p>=t.bottom-A&&(T.y=ut.Forward,q.y=i*Math.abs((t.bottom-A-p)/A)),!f&&m>=t.right-D?(T.x=ut.Forward,q.x=i*Math.abs((t.right-D-m)/D)):!h&&d<=t.left+D&&(T.x=ut.Backward,q.x=i*Math.abs((t.left+D-d)/D)),{direction:T,speed:q}}function Ti(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:d}=window;return{top:0,left:0,right:l,bottom:d,width:l,height:d}}const{top:t,left:n,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Wr(e){return e.reduce((t,n)=>$t(t,ho(n)),Rt)}function Gr(e,t){if(t===void 0&&(t=Zt),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);Pr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ii=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Hr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Ur(n),0)}]];class mo{constructor(t,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 i=Kn(n),a=Wr(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,d,m]of Ii)for(const p of d)Object.defineProperty(this,p,{get:()=>{const g=m(i),x=a[l]-g;return this.rect[p]+x},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function so(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var xt,Ye;function nr(e){e.preventDefault()}function Ei(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(xt||(xt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ye||(Ye={}));const _r={start:[Ye.Space,Ye.Enter],cancel:[Ye.Esc],end:[Ye.Space,Ye.Enter,Ye.Tab]},Fi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ye.Right:return{...n,x:n.x+25};case Ye.Left:return{...n,x:n.x-25};case Ye.Down:return{...n,y:n.y+25};case Ye.Up:return{...n,y:n.y-25}}};class qo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new cn(Wt(n)),this.windowListeners=new cn(ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Gr(i),n(Rt)}handleKeyDown(t){if(Un(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=_r,coordinateGetter:d=Fi,scrollBehavior:m="smooth"}=a,{code:p}=t;if(l.end.includes(p))return void this.handleEnd(t);if(l.cancel.includes(p))return void this.handleCancel(t);const{collisionRect:g}=i.current,x=g?{x:g.left,y:g.top}:Rt;this.referenceCoordinates||(this.referenceCoordinates=x);const h=d(t,{active:n,context:i.current,currentCoordinates:x});if(h){const f=fn(h,x),T={x:0,y:0},{scrollableAncestors:q}=i.current;for(const A of q){const D=t.code,{isTop:G,isRight:U,isLeft:y,isBottom:B,maxScroll:S,minScroll:w}=$r(A),k=Ti(A),O={x:Math.min(D===Ye.Right?k.right-k.width/2:k.right,Math.max(D===Ye.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(D===Ye.Down?k.bottom-k.height/2:k.bottom,Math.max(D===Ye.Down?k.top:k.top+k.height/2,h.y))},E=D===Ye.Right&&!U||D===Ye.Left&&!y,F=D===Ye.Down&&!B||D===Ye.Up&&!G;if(E&&O.x!==h.x){const Z=A.scrollLeft+f.x,_=D===Ye.Right&&Z<=S.x||D===Ye.Left&&Z>=w.x;if(_&&!f.y)return void A.scrollTo({left:Z,behavior:m});T.x=_?A.scrollLeft-Z:D===Ye.Right?A.scrollLeft-S.x:A.scrollLeft-w.x,T.x&&A.scrollBy({left:-T.x,behavior:m});break}if(F&&O.y!==h.y){const Z=A.scrollTop+f.y,_=D===Ye.Down&&Z<=S.y||D===Ye.Up&&Z>=w.y;if(_&&!f.x)return void A.scrollTo({top:Z,behavior:m});T.y=_?A.scrollTop-Z:D===Ye.Down?A.scrollTop-S.y:A.scrollTop-w.y,T.y&&A.scrollBy({top:-T.y,behavior:m});break}}this.handleMove(t,$t(fn(h,this.referenceCoordinates),T))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function or(e){return!!(e&&"distance"in e)}function rr(e){return!!(e&&"delay"in e)}qo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=_r,onActivation:a}=t,{active:l}=n;const{code:d}=e.nativeEvent;if(i.start.includes(d)){const m=l.activatorNode.current;return(!m||e.target===m)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class So{constructor(t,n,i){var a;i===void 0&&(i=function(m){const{EventTarget:p}=ft(m);return m instanceof p?m:Wt(m)}(t.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=t,this.events=n;const{event:l}=t,{target:d}=l;this.props=t,this.events=n,this.document=Wt(d),this.documentListeners=new cn(this.document),this.listeners=new cn(i),this.windowListeners=new cn(ft(d)),this.initialCoordinates=(a=Ln(l))!=null?a:Rt,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:t,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.DragStart,nr),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,nr),this.documentListeners.add(xt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(rr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(or(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(t,n){const{active:i,onPending:a}=this.props;a(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(xt.Click,Ei,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:d,options:{activationConstraint:m}}=l;if(!a)return;const p=(n=Ln(t))!=null?n:Rt,g=fn(a,p);if(!i&&m){if(or(m)){if(m.tolerance!=null&&so(g,m.tolerance))return this.handleCancel();if(so(g,m.distance))return this.handleStart()}return rr(m)&&so(g,m.tolerance)?this.handleCancel():void this.handlePending(m,g)}t.cancelable&&t.preventDefault(),d(p)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ye.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ai={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Zr extends So{constructor(t){const{event:n}=t,i=Wt(n.target);super(t,Ai,i)}}Zr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Di={move:{name:"mousemove"},end:{name:"mouseup"}};var fo;(function(e){e[e.RightClick=2]="RightClick"})(fo||(fo={}));class Xr extends So{constructor(t){super(t,Di,Wt(t.event.target))}}Xr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==fo.RightClick&&(i?.({event:n}),!0)}}];const co={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Yr extends So{constructor(t){super(t,co)}static setup(){return window.addEventListener(co.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(co.move.name,t)};function t(){}}}var un,jn;function zi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:d=5,order:m=jn.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:x,delta:h,threshold:f}=e;const T=function(w){let{delta:k,disabled:O}=w;const E=Nn(k);return dn(F=>{if(O||!E||!F)return Ni;const Z={x:Math.sign(k.x-E.x),y:Math.sign(k.y-E.y)};return{x:{[ut.Backward]:F.x[ut.Backward]||Z.x===-1,[ut.Forward]:F.x[ut.Forward]||Z.x===1},y:{[ut.Backward]:F.y[ut.Backward]||Z.y===-1,[ut.Forward]:F.y[ut.Forward]||Z.y===1}}},[O,k,E])}({delta:h,disabled:!l}),[q,A]=function(){const w=o.useRef(null);return[o.useCallback((k,O)=>{w.current=setInterval(k,O)},[]),o.useCallback(()=>{w.current!==null&&(clearInterval(w.current),w.current=null)},[])]}(),D=o.useRef({x:0,y:0}),G=o.useRef({x:0,y:0}),U=o.useMemo(()=>{switch(n){case un.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case un.DraggableRect:return a}},[n,a,p]),y=o.useRef(null),B=o.useCallback(()=>{const w=y.current;if(!w)return;const k=D.current.x*G.current.x,O=D.current.y*G.current.y;w.scrollBy(k,O)},[]),S=o.useMemo(()=>m===jn.TreeOrder?[...g].reverse():g,[m,g]);o.useEffect(()=>{if(l&&g.length&&U){for(const w of S){if(i?.(w)===!1)continue;const k=g.indexOf(w),O=x[k];if(!O)continue;const{direction:E,speed:F}=Mi(w,O,U,t,f);for(const Z of["x","y"])T[Z][E[Z]]||(F[Z]=0,E[Z]=0);if(F.x>0||F.y>0)return A(),y.current=w,q(B,d),D.current=F,void(G.current=E)}D.current={x:0,y:0},G.current={x:0,y:0},A()}else A()},[t,B,i,A,l,d,JSON.stringify(U),JSON.stringify(T),q,g,S,x,JSON.stringify(f)])}Yr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:a}=n;return!(a.length>1)&&(i?.({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(un||(un={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(jn||(jn={}));const Ni={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var pn,po;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(pn||(pn={})),function(e){e.Optimized="optimized"}(po||(po={}));const lr=new Map;function vo(e,t){return dn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Bn(e){let{callback:t,disabled:n}=e;const i=Hn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Li(e){return new mo(Zt(e),e)}function ir(e,t,n){t===void 0&&(t=Li);const[i,a]=o.useState(null);function l(){a(p=>{if(!e)return null;var g;if(e.isConnected===!1)return(g=p??n)!=null?g:null;const x=t(e);return JSON.stringify(p)===JSON.stringify(x)?p:x})}const d=function(p){let{callback:g,disabled:x}=p;const h=Hn(g),f=o.useMemo(()=>{if(x||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:T}=window;return new T(h)},[h,x]);return o.useEffect(()=>()=>f?.disconnect(),[f]),f}({callback(p){if(e)for(const g of p){const{type:x,target:h}=g;if(x==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),m=Bn({callback:l});return St(()=>{l(),e?(m?.observe(e),d?.observe(document.body,{childList:!0,subtree:!0})):(m?.disconnect(),d?.disconnect())},[e]),i}const ar=[];function sr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==Rt;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?fn(e,n.current):Rt}function dr(e){return o.useMemo(()=>e?function(t){const n=t.innerWidth,i=t.innerHeight;return{top:0,left:0,right:n,bottom:i,width:n,height:i}}(e):null,[e])}const cr=[];function Jr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vn(t)?t:e}const Oi=[{sensor:Zr,options:{}},{sensor:qo,options:{}}],ji={current:{}},An={draggable:{measure:tr},droppable:{measure:tr,strategy:pn.WhileDragging,frequency:po.Optimized},dragOverlay:{measure:Zt}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Bi={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:On},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:An,measureDroppableContainers:On,windowRect:null,measuringScheduled:!1},Qr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:On,draggableNodes:new Map,over:null,measureDroppableContainers:On},bn=o.createContext(Qr),el=o.createContext(Bi);function Vi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function Pi(e,t){switch(t.type){case ct.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ct.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ct.DragEnd:case ct.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ct.RegisterDroppable:{const{element:n}=t,{id:i}=n,a=new gn(e.droppable.containers);return a.set(i,n),{...e,droppable:{...e.droppable,containers:a}}}case ct.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const d=new gn(e.droppable.containers);return d.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:d}}}case ct.UnregisterDroppable:{const{id:n,key:i}=t,a=e.droppable.containers.get(n);if(!a||i!==a.key)return e;const l=new gn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Hi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(bn),l=Nn(i),d=Nn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&d!=null){if(!Un(l)||document.activeElement===l.target)return;const m=a.get(d);if(!m)return;const{activatorNode:p,node:g}=m;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const x of[p.current,g.current]){if(!x)continue;const h=ui(x);if(h){h.focus();break}}})}},[i,t,a,d,l]),null}function tl(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const $n=o.createContext({...Rt,scaleX:1,scaleY:1});var Ft;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ft||(Ft={}));const Ui=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:d,autoScroll:m=!0,children:p,sensors:g=Oi,collisionDetection:x=xi,measuring:h,modifiers:f,...T}=e;const q=o.useReducer(Pi,void 0,Vi),[A,D]=q,[G,U]=function(){const[v]=o.useState(()=>new Set),H=o.useCallback(Y=>(v.add(Y),()=>v.delete(Y)),[v]);return[o.useCallback(Y=>{let{type:ne,event:le}=Y;v.forEach(ie=>{var se;return(se=ie[ne])==null?void 0:se.call(ie,le)})},[v]),H]}(),[y,B]=o.useState(Ft.Uninitialized),S=y===Ft.Initialized,{draggable:{active:w,nodes:k,translate:O},droppable:{containers:E}}=A,F=w!=null?k.get(w):null,Z=o.useRef({initial:null,translated:null}),_=o.useMemo(()=>{var v;return w!=null?{id:w,data:(v=F?.data)!=null?v:ji,rect:Z}:null},[w,F]),P=o.useRef(null),[V,$]=o.useState(null),[oe,L]=o.useState(null),z=mn(T,Object.values(T)),K=Cn("DndDescribedBy",l),W=o.useMemo(()=>E.getEnabled(),[E]),ge=(ae=h,o.useMemo(()=>({draggable:{...An.draggable,...ae?.draggable},droppable:{...An.droppable,...ae?.droppable},dragOverlay:{...An.dragOverlay,...ae?.dragOverlay}}),[ae?.draggable,ae?.droppable,ae?.dragOverlay]));var ae;const{droppableRects:Q,measureDroppableContainers:X,measuringScheduled:be}=function(v,H){let{dragging:Y,dependencies:ne,config:le}=H;const[ie,se]=o.useState(null),{frequency:ye,measure:fe,strategy:pe}=le,qe=o.useRef(v),Oe=function(){switch(pe){case pn.Always:return!1;case pn.BeforeDragging:return Y;default:return!Y}}(),De=mn(Oe),We=o.useCallback(function(Ne){Ne===void 0&&(Ne=[]),De.current||se(Xe=>Xe===null?Ne:Xe.concat(Ne.filter(it=>!Xe.includes(it))))},[De]),je=o.useRef(null),Ge=dn(Ne=>{if(Oe&&!Y)return lr;if(!Ne||Ne===lr||qe.current!==v||ie!=null){const Xe=new Map;for(let it of v){if(!it)continue;if(ie&&ie.length>0&&!ie.includes(it.id)&&it.rect.current){Xe.set(it.id,it.rect.current);continue}const pt=it.node.current,yt=pt?new mo(fe(pt),pt):null;it.rect.current=yt,yt&&Xe.set(it.id,yt)}return Xe}return Ne},[v,ie,Y,Oe,fe]);return o.useEffect(()=>{qe.current=v},[v]),o.useEffect(()=>{Oe||We()},[Y,Oe]),o.useEffect(()=>{ie&&ie.length>0&&se(null)},[JSON.stringify(ie)]),o.useEffect(()=>{Oe||typeof ye!="number"||je.current!==null||(je.current=setTimeout(()=>{We(),je.current=null},ye))},[ye,Oe,We,...ne]),{droppableRects:Ge,measureDroppableContainers:We,measuringScheduled:ie!=null}}(W,{dragging:S,dependencies:[O.x,O.y],config:ge.droppable}),ke=function(v,H){const Y=H!=null?v.get(H):void 0,ne=Y?Y.node.current:null;return dn(le=>{var ie;return H==null?null:(ie=ne??le)!=null?ie:null},[ne,H])}(k,w),ve=o.useMemo(()=>oe?Ln(oe):null,[oe]),Pe=function(){const v=V?.autoScrollEnabled===!1,H=typeof m=="object"?m.enabled===!1:m===!1,Y=S&&!v&&!H;return typeof m=="object"?{...m,enabled:Y}:{enabled:Y}}(),he=function(v,H){return vo(v,H)}(ke,ge.draggable.measure);(function(v){let{activeNode:H,measure:Y,initialRect:ne,config:le=!0}=v;const ie=o.useRef(!1),{x:se,y:ye}=typeof le=="boolean"?{x:le,y:le}:le;St(()=>{if(!se&&!ye||!H)return void(ie.current=!1);if(ie.current||!ne)return;const fe=H?.node.current;if(!fe||fe.isConnected===!1)return;const pe=er(Y(fe),ne);if(se||(pe.x=0),ye||(pe.y=0),ie.current=!0,Math.abs(pe.x)>0||Math.abs(pe.y)>0){const qe=Pr(fe);qe&&qe.scrollBy({top:pe.y,left:pe.x})}},[H,se,ye,ne,Y])})({activeNode:w!=null?k.get(w):null,config:Pe.layoutShiftCompensation,initialRect:he,measure:ge.draggable.measure});const He=ir(ke,ge.draggable.measure,he),Se=ir(ke?ke.parentElement:null),ce=o.useRef({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),de=E.getNodeFor((t=ce.current.over)==null?void 0:t.id),me=function(v){let{measure:H}=v;const[Y,ne]=o.useState(null),le=Bn({callback:o.useCallback(fe=>{for(const{target:pe}of fe)if(vn(pe)){ne(qe=>{const Oe=H(pe);return qe?{...qe,width:Oe.width,height:Oe.height}:Oe});break}},[H])}),ie=o.useCallback(fe=>{const pe=Jr(fe);le?.disconnect(),pe&&le?.observe(pe),ne(pe?H(pe):null)},[H,le]),[se,ye]=zn(ie);return o.useMemo(()=>({nodeRef:se,rect:Y,setRef:ye}),[Y,se,ye])}({measure:ge.dragOverlay.measure}),Ce=(n=me.nodeRef.current)!=null?n:ke,xe=S?(i=me.rect)!=null?i:He:null,Me=!!(me.nodeRef.current&&me.rect),we=er(Ee=Me?null:He,vo(Ee));var Ee;const Le=dr(Ce?ft(Ce):null),Ve=function(v){const H=o.useRef(v),Y=dn(ne=>v?ne&&ne!==ar&&v&&H.current&&v.parentNode===H.current.parentNode?ne:Kn(v):ar,[v]);return o.useEffect(()=>{H.current=v},[v]),Y}(S?de??ke:null),C=function(v,H){H===void 0&&(H=Zt);const[Y]=v,ne=dr(Y?ft(Y):null),[le,ie]=o.useState(cr);function se(){ie(()=>v.length?v.map(fe=>Kr(fe)?ne:new mo(H(fe),fe)):cr)}const ye=Bn({callback:se});return St(()=>{ye?.disconnect(),se(),v.forEach(fe=>ye?.observe(fe))},[v]),le}(Ve),Ue=tl(f,{transform:{x:O.x-we.x,y:O.y-we.y,scaleX:1,scaleY:1},activatorEvent:oe,active:_,activeNodeRect:He,containerNodeRect:Se,draggingNodeRect:xe,over:ce.current.over,overlayNodeRect:me.rect,scrollableAncestors:Ve,scrollableAncestorRects:C,windowRect:Le}),Qe=ve?$t(ve,O):null,$e=function(v){const[H,Y]=o.useState(null),ne=o.useRef(v),le=o.useCallback(ie=>{const se=ao(ie.target);se&&Y(ye=>ye?(ye.set(se,ho(se)),new Map(ye)):null)},[]);return o.useEffect(()=>{const ie=ne.current;if(v!==ie){se(ie);const ye=v.map(fe=>{const pe=ao(fe);return pe?(pe.addEventListener("scroll",le,{passive:!0}),[pe,ho(pe)]):null}).filter(fe=>fe!=null);Y(ye.length?new Map(ye):null),ne.current=v}return()=>{se(v),se(ie)};function se(ye){ye.forEach(fe=>{const pe=ao(fe);pe?.removeEventListener("scroll",le)})}},[le,v]),o.useMemo(()=>v.length?H?Array.from(H.values()).reduce((ie,se)=>$t(ie,se),Rt):Wr(v):Rt,[v,H])}(Ve),ee=sr($e),Fe=sr($e,[He]),Be=$t(Ue,ee),Ie=xe?Si(xe,Ue):null,ze=_&&Ie?x({active:_,collisionRect:Ie,droppableRects:Q,droppableContainers:W,pointerCoordinates:Qe}):null,Ae=Br(ze,"id"),[R,re]=o.useState(null),j=function(v,H,Y){return{...v,scaleX:H&&Y?H.width/Y.width:1,scaleY:H&&Y?H.height/Y.height:1}}(Me?Ue:$t(Ue,Fe),(a=R?.rect)!=null?a:null,He),J=o.useRef(null),u=o.useCallback((v,H)=>{let{sensor:Y,options:ne}=H;if(P.current==null)return;const le=k.get(P.current);if(!le)return;const ie=v.nativeEvent,se=new Y({active:P.current,activeNode:le,event:ie,options:ne,context:ce,onAbort(fe){if(!k.get(fe))return;const{onDragAbort:pe}=z.current,qe={id:fe};pe?.(qe),G({type:"onDragAbort",event:qe})},onPending(fe,pe,qe,Oe){if(!k.get(fe))return;const{onDragPending:De}=z.current,We={id:fe,constraint:pe,initialCoordinates:qe,offset:Oe};De?.(We),G({type:"onDragPending",event:We})},onStart(fe){const pe=P.current;if(pe==null)return;const qe=k.get(pe);if(!qe)return;const{onDragStart:Oe}=z.current,De={activatorEvent:ie,active:{id:pe,data:qe.data,rect:Z}};zt.unstable_batchedUpdates(()=>{Oe?.(De),B(Ft.Initializing),D({type:ct.DragStart,initialCoordinates:fe,active:pe}),G({type:"onDragStart",event:De}),$(J.current),L(ie)})},onMove(fe){D({type:ct.DragMove,coordinates:fe})},onEnd:ye(ct.DragEnd),onCancel:ye(ct.DragCancel)});function ye(fe){return async function(){const{active:pe,collisions:qe,over:Oe,scrollAdjustedTranslate:De}=ce.current;let We=null;if(pe&&De){const{cancelDrop:je}=z.current;We={activatorEvent:ie,active:pe,collisions:qe,delta:De,over:Oe},fe===ct.DragEnd&&typeof je=="function"&&await Promise.resolve(je(We))&&(fe=ct.DragCancel)}P.current=null,zt.unstable_batchedUpdates(()=>{D({type:fe}),B(Ft.Uninitialized),re(null),$(null),L(null),J.current=null;const je=fe===ct.DragEnd?"onDragEnd":"onDragCancel";if(We){const Ge=z.current[je];Ge?.(We),G({type:je,event:We})}})}}J.current=se},[k]),M=o.useCallback((v,H)=>(Y,ne)=>{const le=Y.nativeEvent,ie=k.get(ne);if(P.current!==null||!ie||le.dndKit||le.defaultPrevented)return;const se={active:ie};v(Y,H.options,se)===!0&&(le.dndKit={capturedBy:H.sensor},P.current=ne,u(Y,H))},[k,u]),I=function(v,H){return o.useMemo(()=>v.reduce((Y,ne)=>{const{sensor:le}=ne;return[...Y,...le.activators.map(ie=>({eventName:ie.eventName,handler:H(ie.handler,ne)}))]},[]),[v,H])}(g,M);(function(v){o.useEffect(()=>{if(!Pn)return;const H=v.map(Y=>{let{sensor:ne}=Y;return ne.setup==null?void 0:ne.setup()});return()=>{for(const Y of H)Y?.()}},v.map(H=>{let{sensor:Y}=H;return Y}))})(g),St(()=>{He&&y===Ft.Initializing&&B(Ft.Initialized)},[He,y]),o.useEffect(()=>{const{onDragMove:v}=z.current,{active:H,activatorEvent:Y,collisions:ne,over:le}=ce.current;if(!H||!Y)return;const ie={active:H,activatorEvent:Y,collisions:ne,delta:{x:Be.x,y:Be.y},over:le};zt.unstable_batchedUpdates(()=>{v?.(ie),G({type:"onDragMove",event:ie})})},[Be.x,Be.y]),o.useEffect(()=>{const{active:v,activatorEvent:H,collisions:Y,droppableContainers:ne,scrollAdjustedTranslate:le}=ce.current;if(!v||P.current==null||!H||!le)return;const{onDragOver:ie}=z.current,se=ne.get(Ae),ye=se&&se.rect.current?{id:se.id,rect:se.rect.current,data:se.data,disabled:se.disabled}:null,fe={active:v,activatorEvent:H,collisions:Y,delta:{x:le.x,y:le.y},over:ye};zt.unstable_batchedUpdates(()=>{re(ye),ie?.(fe),G({type:"onDragOver",event:fe})})},[Ae]),St(()=>{ce.current={activatorEvent:oe,active:_,activeNode:ke,collisionRect:Ie,collisions:ze,droppableRects:Q,draggableNodes:k,draggingNode:Ce,draggingNodeRect:xe,droppableContainers:E,over:R,scrollableAncestors:Ve,scrollAdjustedTranslate:Be},Z.current={initial:xe,translated:Ie}},[_,ke,ze,Ie,k,Ce,xe,Q,E,R,Ve,Be]),zi({...Pe,delta:O,draggingRect:Ie,pointerCoordinates:Qe,scrollableAncestors:Ve,scrollableAncestorRects:C});const b=o.useMemo(()=>({active:_,activeNode:ke,activeNodeRect:He,activatorEvent:oe,collisions:ze,containerNodeRect:Se,dragOverlay:me,draggableNodes:k,droppableContainers:E,droppableRects:Q,over:R,measureDroppableContainers:X,scrollableAncestors:Ve,scrollableAncestorRects:C,measuringConfiguration:ge,measuringScheduled:be,windowRect:Le}),[_,ke,He,oe,ze,Se,me,k,E,Q,R,X,Ve,C,ge,be,Le]),N=o.useMemo(()=>({activatorEvent:oe,activators:I,active:_,activeNodeRect:He,ariaDescribedById:{draggable:K},dispatch:D,draggableNodes:k,over:R,measureDroppableContainers:X}),[oe,I,_,He,D,K,k,R,X]);return o.createElement(Lr.Provider,{value:U},o.createElement(bn.Provider,{value:N},o.createElement(el.Provider,{value:b},o.createElement($n.Provider,{value:j},p)),o.createElement(Hi,{disabled:d?.restoreFocus===!1})),o.createElement(vi,{...d,hiddenTextDescribedById:K}))}),Ki=o.createContext(null),ur="button";function $i(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=Cn("Draggable"),{activators:d,activatorEvent:m,active:p,activeNodeRect:g,ariaDescribedById:x,draggableNodes:h,over:f}=o.useContext(bn),{role:T=ur,roleDescription:q="draggable",tabIndex:A=0}=a??{},D=p?.id===t,G=o.useContext(D?$n:Ki),[U,y]=zn(),[B,S]=zn(),w=function(O,E){return o.useMemo(()=>O.reduce((F,Z)=>{let{eventName:_,handler:P}=Z;return F[_]=V=>{P(V,E)},F},{}),[O,E])}(d,t),k=mn(n);return St(()=>(h.set(t,{id:t,key:l,node:U,activatorNode:B,data:k}),()=>{const O=h.get(t);O&&O.key===l&&h.delete(t)}),[h,t]),{active:p,activatorEvent:m,activeNodeRect:g,attributes:o.useMemo(()=>({role:T,tabIndex:A,"aria-disabled":i,"aria-pressed":!(!D||T!==ur)||void 0,"aria-roledescription":q,"aria-describedby":x.draggable}),[i,T,A,D,q,x.draggable]),isDragging:D,listeners:i?void 0:w,node:U,over:f,setNodeRef:y,setActivatorNodeRef:S,transform:G}}function nl(){return o.useContext(el)}const Wi={timeout:25};function Gi(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,d]=o.useState(null),m=Nn(n);return n||i||!m||a(m),St(()=>{if(!l)return;const p=i?.key,g=i?.props.id;p!=null&&g!=null?Promise.resolve(t(g,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:d}):null)}const _i={x:0,y:0,scaleX:1,scaleY:1};function Zi(e){let{children:t}=e;return o.createElement(bn.Provider,{value:Qr},o.createElement($n.Provider,{value:_i},t))}const Xi={position:"fixed",touchAction:"none"},Yi=e=>Un(e)?"transform 250ms ease":void 0,Ji=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:d,rect:m,style:p,transform:g,transition:x=Yi}=e;if(!m)return null;const h=a?g:{...g,scaleX:1,scaleY:1},f={...Xi,width:m.width,height:m.height,top:m.top,left:m.left,transform:Lt.Transform.toString(h),transformOrigin:a&&i?Ci(i,m):void 0,transition:typeof x=="function"?x(i):x,...p};return o.createElement(n,{className:d,style:f,ref:t},l)}),Qi=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:d}=e;if(l!=null&&l.active)for(const[m,p]of Object.entries(l.active))p!==void 0&&(a[m]=n.node.style.getPropertyValue(m),n.node.style.setProperty(m,p));if(l!=null&&l.dragOverlay)for(const[m,p]of Object.entries(l.dragOverlay))p!==void 0&&i.node.style.setProperty(m,p);return d!=null&&d.active&&n.node.classList.add(d.active),d!=null&&d.dragOverlay&&i.node.classList.add(d.dragOverlay),function(){for(const[m,p]of Object.entries(a))n.node.style.setProperty(m,p);d!=null&&d.active&&n.node.classList.remove(d.active)}},ol={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Lt.Transform.toString(t)},{transform:Lt.Transform.toString(n)}]},sideEffects:Qi({styles:{active:{opacity:"0"}}})};function ea(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return Hn((l,d)=>{if(t===null)return;const m=n.get(l);if(!m)return;const p=m.node.current;if(!p)return;const g=Jr(d);if(!g)return;const{transform:x}=ft(d).getComputedStyle(d),h=Vr(x);if(!h)return;const f=typeof t=="function"?t:function(T){const{duration:q,easing:A,sideEffects:D,keyframes:G}={...ol,...T};return U=>{let{active:y,dragOverlay:B,transform:S,...w}=U;if(!q)return;const k={x:B.rect.left-y.rect.left,y:B.rect.top-y.rect.top},O={scaleX:S.scaleX!==1?y.rect.width*S.scaleX/B.rect.width:1,scaleY:S.scaleY!==1?y.rect.height*S.scaleY/B.rect.height:1},E={x:S.x-k.x,y:S.y-k.y,...O},F=G({...w,active:y,dragOverlay:B,transform:{initial:S,final:E}}),[Z]=F,_=F[F.length-1];if(JSON.stringify(Z)===JSON.stringify(_))return;const P=D?.({active:y,dragOverlay:B,...w}),V=B.node.animate(F,{duration:q,easing:A,fill:"forwards"});return new Promise($=>{V.onfinish=()=>{P?.(),$()}})}}(t);return Gr(p,a.draggable.measure),f({active:{id:l,data:m.data,node:p,rect:a.draggable.measure(p)},draggableNodes:n,dragOverlay:{node:d,rect:a.dragOverlay.measure(g)},droppableContainers:i,measuringConfiguration:a,transform:h})})}let gr=0;function ta(e){return o.useMemo(()=>{if(e!=null)return gr++,gr},[e])}const na=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:d,wrapperElement:m="div",className:p,zIndex:g=999}=e;const{activatorEvent:x,active:h,activeNodeRect:f,containerNodeRect:T,draggableNodes:q,droppableContainers:A,dragOverlay:D,over:G,measuringConfiguration:U,scrollableAncestors:y,scrollableAncestorRects:B,windowRect:S}=nl(),w=o.useContext($n),k=ta(h?.id),O=tl(d,{activatorEvent:x,active:h,activeNodeRect:f,containerNodeRect:T,draggingNodeRect:D.rect,over:G,overlayNodeRect:D.rect,scrollableAncestors:y,scrollableAncestorRects:B,transform:w,windowRect:S}),E=vo(f),F=ea({config:i,draggableNodes:q,droppableContainers:A,measuringConfiguration:U}),Z=E?D.setRef:void 0;return o.createElement(Zi,null,o.createElement(Gi,{animation:F},h&&k?o.createElement(Ji,{key:k,id:h.id,ref:Z,as:m,activatorEvent:x,adjustScale:t,className:p,transition:l,rect:E,style:{zIndex:g,...a},transform:O},n):null))});function Ro(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function oa(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function En(e){return e!==null&&e>=0}const Fn={scaleX:1,scaleY:1},ra=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:d}=e;const m=(t=n[a])!=null?t:i;if(!m)return null;const p=function(g,x,h){const f=g[x],T=g[x-1],q=g[x+1];return!f||!T&&!q?0:h<x?T?f.left-(T.left+T.width):q.left-(f.left+f.width):q?q.left-(f.left+f.width):f.left-(T.left+T.width)}(n,d,a);if(d===a){const g=n[l];return g?{x:a<l?g.left+g.width-(m.left+m.width):g.left-m.left,y:0,...Fn}:null}return d>a&&d<=l?{x:-m.width-p,y:0,...Fn}:d<a&&d>=l?{x:m.width+p,y:0,...Fn}:{x:0,y:0,...Fn}},ko=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=Ro(t,i,n),d=t[a],m=l[a];return m&&d?{x:m.left-d.left,y:m.top-d.top,scaleX:m.width/d.width,scaleY:m.height/d.height}:null},rl="Sortable",ll=o.createContext({activeIndex:-1,containerId:rl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ko,disabled:{draggable:!1,droppable:!1}});function la(e){let{children:t,id:n,items:i,strategy:a=ko,disabled:l=!1}=e;const{active:d,dragOverlay:m,droppableRects:p,over:g,measureDroppableContainers:x}=nl(),h=Cn(rl,n),f=m.rect!==null,T=o.useMemo(()=>i.map(w=>typeof w=="object"&&"id"in w?w.id:w),[i]),q=d!=null,A=d?T.indexOf(d.id):-1,D=g?T.indexOf(g.id):-1,G=o.useRef(T),U=!function(w,k){if(w===k)return!0;if(w.length!==k.length)return!1;for(let O=0;O<w.length;O++)if(w[O]!==k[O])return!1;return!0}(T,G.current),y=D!==-1&&A===-1||U,B=function(w){return typeof w=="boolean"?{draggable:w,droppable:w}:w}(l);St(()=>{U&&q&&x(T)},[U,T,q,x]),o.useEffect(()=>{G.current=T},[T]);const S=o.useMemo(()=>({activeIndex:A,containerId:h,disabled:B,disableTransforms:y,items:T,overIndex:D,useDragOverlay:f,sortedRects:oa(T,p),strategy:a}),[A,h,B.draggable,B.droppable,y,T,D,p,f,a]);return o.createElement(ll.Provider,{value:S},t)}const ia=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return Ro(n,i,a).indexOf(t)},aa=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:d,previousItems:m,previousContainerId:p,transition:g}=e;return!(!g||!i)&&(m===l||a!==d)&&(!!n||d!==a&&t===p)},sa={duration:200,easing:"ease"},il="transform",da=Lt.Transition.toString({property:il,duration:0,easing:"linear"}),ca={roleDescription:"sortable"};function ua(e){let{animateLayoutChanges:t=aa,attributes:n,disabled:i,data:a,getNewIndex:l=ia,id:d,strategy:m,resizeObserverConfig:p,transition:g=sa}=e;const{items:x,containerId:h,activeIndex:f,disabled:T,disableTransforms:q,sortedRects:A,overIndex:D,useDragOverlay:G,strategy:U}=o.useContext(ll),y=function(de,me){var Ce,xe;return typeof de=="boolean"?{draggable:de,droppable:!1}:{draggable:(Ce=de?.draggable)!=null?Ce:me.draggable,droppable:(xe=de?.droppable)!=null?xe:me.droppable}}(i,T),B=x.indexOf(d),S=o.useMemo(()=>({sortable:{containerId:h,index:B,items:x},...a}),[h,a,B,x]),w=o.useMemo(()=>x.slice(x.indexOf(d)),[x,d]),{rect:k,node:O,isOver:E,setNodeRef:F}=function(de){let{data:me,disabled:Ce=!1,id:xe,resizeObserverConfig:Me}=de;const we=Cn("Droppable"),{active:Ee,dispatch:Le,over:Ve,measureDroppableContainers:C}=o.useContext(bn),Ue=o.useRef({disabled:Ce}),Qe=o.useRef(!1),$e=o.useRef(null),ee=o.useRef(null),{disabled:Fe,updateMeasurementsFor:Be,timeout:Ie}={...Wi,...Me},ze=mn(Be??xe),Ae=Bn({callback:o.useCallback(()=>{Qe.current?(ee.current!=null&&clearTimeout(ee.current),ee.current=setTimeout(()=>{C(Array.isArray(ze.current)?ze.current:[ze.current]),ee.current=null},Ie)):Qe.current=!0},[Ie]),disabled:Fe||!Ee}),R=o.useCallback((u,M)=>{Ae&&(M&&(Ae.unobserve(M),Qe.current=!1),u&&Ae.observe(u))},[Ae]),[re,j]=zn(R),J=mn(me);return o.useEffect(()=>{Ae&&re.current&&(Ae.disconnect(),Qe.current=!1,Ae.observe(re.current))},[re,Ae]),o.useEffect(()=>(Le({type:ct.RegisterDroppable,element:{id:xe,key:we,disabled:Ce,node:re,rect:$e,data:J}}),()=>Le({type:ct.UnregisterDroppable,key:we,id:xe})),[xe]),o.useEffect(()=>{Ce!==Ue.current.disabled&&(Le({type:ct.SetDroppableDisabled,id:xe,key:we,disabled:Ce}),Ue.current.disabled=Ce)},[xe,we,Ce,Le]),{active:Ee,rect:$e,isOver:Ve?.id===xe,node:re,over:Ve,setNodeRef:j}}({id:d,data:S,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...p}}),{active:Z,activatorEvent:_,activeNodeRect:P,attributes:V,setNodeRef:$,listeners:oe,isDragging:L,over:z,setActivatorNodeRef:K,transform:W}=$i({id:d,data:S,attributes:{...ca,...n},disabled:y.draggable}),ge=function(){for(var de=arguments.length,me=new Array(de),Ce=0;Ce<de;Ce++)me[Ce]=arguments[Ce];return o.useMemo(()=>xe=>{me.forEach(Me=>Me(xe))},me)}(F,$),ae=!!Z,Q=ae&&!q&&En(f)&&En(D),X=!G&&L,be=X&&Q?W:null,ke=Q?be??(m??U)({rects:A,activeNodeRect:P,activeIndex:f,overIndex:D,index:B}):null,ve=En(f)&&En(D)?l({id:d,items:x,activeIndex:f,overIndex:D}):B,Pe=Z?.id,he=o.useRef({activeId:Pe,items:x,newIndex:ve,containerId:h}),He=x!==he.current.items,Se=t({active:Z,containerId:h,isDragging:L,isSorting:ae,id:d,index:B,items:x,newIndex:he.current.newIndex,previousItems:he.current.items,previousContainerId:he.current.containerId,transition:g,wasDragging:he.current.activeId!=null}),ce=function(de){let{disabled:me,index:Ce,node:xe,rect:Me}=de;const[we,Ee]=o.useState(null),Le=o.useRef(Ce);return St(()=>{if(!me&&Ce!==Le.current&&xe.current){const Ve=Me.current;if(Ve){const C=Zt(xe.current,{ignoreTransform:!0}),Ue={x:Ve.left-C.left,y:Ve.top-C.top,scaleX:Ve.width/C.width,scaleY:Ve.height/C.height};(Ue.x||Ue.y)&&Ee(Ue)}}Ce!==Le.current&&(Le.current=Ce)},[me,Ce,xe,Me]),o.useEffect(()=>{we&&Ee(null)},[we]),we}({disabled:!Se,index:B,node:O,rect:k});return o.useEffect(()=>{ae&&he.current.newIndex!==ve&&(he.current.newIndex=ve),h!==he.current.containerId&&(he.current.containerId=h),x!==he.current.items&&(he.current.items=x)},[ae,ve,h,x]),o.useEffect(()=>{if(Pe===he.current.activeId)return;if(Pe!=null&&he.current.activeId==null)return void(he.current.activeId=Pe);const de=setTimeout(()=>{he.current.activeId=Pe},50);return()=>clearTimeout(de)},[Pe]),{active:Z,activeIndex:f,attributes:V,data:S,rect:k,index:B,newIndex:ve,items:x,isOver:E,isSorting:ae,isDragging:L,listeners:oe,node:O,overIndex:D,over:z,setNodeRef:ge,setActivatorNodeRef:K,setDroppableNodeRef:F,setDraggableNodeRef:$,transform:ce??ke,transition:function(){if(ce||He&&he.current.newIndex===B)return da;if(!(X&&!Un(_)||!g)&&(ae||Se))return Lt.Transition.toString({...g,property:il})}()}}function Vn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ga=[Ye.Down,Ye.Right,Ye.Up,Ye.Left],ha=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:d,scrollableAncestors:m}}=t;if(ga.includes(e.code)){if(e.preventDefault(),!n||!i)return;const p=[];l.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const f=a.get(h.id);if(f)switch(e.code){case Ye.Down:i.top<f.top&&p.push(h);break;case Ye.Up:i.top>f.top&&p.push(h);break;case Ye.Left:i.left>f.left&&p.push(h);break;case Ye.Right:i.left<f.left&&p.push(h)}});const g=(h=>{let{collisionRect:f,droppableRects:T,droppableContainers:q}=h;const A=Jo(f),D=[];for(const G of q){const{id:U}=G,y=T.get(U);if(y){const B=Jo(y),S=A.reduce((k,O,E)=>k+Or(B[E],O),0),w=Number((S/4).toFixed(4));D.push({id:U,data:{droppableContainer:G,value:w}})}}return D.sort(jr)})({collisionRect:i,droppableRects:a,droppableContainers:p});let x=Br(g,"id");if(x===d?.id&&g.length>1&&(x=g[1].id),x!=null){const h=l.get(n.id),f=l.get(x),T=f?a.get(f.id):null,q=f?.node.current;if(q&&T&&h&&f){const A=Kn(q).some((B,S)=>m[S]!==B),D=hr(h,f),G=function(B,S){return!Vn(B)||!Vn(S)||!hr(B,S)?!1:B.data.current.sortable.index<S.data.current.sortable.index}(h,f),U=A||!D?{x:0,y:0}:{x:G?i.width-T.width:0,y:G?i.height-T.height:0},y={x:T.left,y:T.top};return U.x&&U.y?y:fn(y,U)}}}};function hr(e,t){return!(!Vn(e)||!Vn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ma=e=>{let{transform:t}=e;return{...t,y:0}},al=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:d,editable:m,selectedIndex:p,background:g,activeColor:x,borderColor:h,borderWidth:f,dragging:T,...q}=e;return c.jsxs("div",{ref:t,className:bt(a),style:{...i,display:"flex",flexDirection:"column",background:p===l?"white":g,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:p===l?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...q,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:p===l?"0px":"-1px",marginTop:p===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,p===l?c.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):c.jsx(c.Fragment,{})]}),c.jsx("div",{style:{flex:"1 1 100%",background:p===l&&x?x?.toCSS():"none",minHeight:"2px"}})]})})),qt={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"},Mo=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:d,index:m,listeners:p,onRemove:g,renderItem:x,sorting:h,style:f,transition:T,transform:q,value:A,wrapperStyle:D,...G},U)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const y=x?x({dragOverlay:!!t,dragging:!!n,sorting:!!h,index:m,fadeIn:!!a,listeners:p,ref:U,style:f,transform:q,transition:T,value:A}):c.jsx(c.Fragment,{children:A});return c.jsx("div",{className:bt("tab-item",qt.Wrapper,a&&qt.fadeIn,h&&qt.sorting,t&&qt.dragOverlay),style:{...D,transition:[T,D?.transition].filter(Boolean).join(", "),"--translate-x":q?`${Math.round(q.x)}px`:void 0,"--translate-y":q?`${Math.round(q.y)}px`:void 0,"--scale-x":q?.scaleX?`${q.scaleX}`:void 0,"--scale-y":q?.scaleY?`${q.scaleY}`:void 0,"--index":m},ref:U,children:c.jsx("div",{className:bt(qt.Item,n&&qt.dragging,l&&qt.withHandle,t&&qt.dragOverlay,i&&qt.disabled,e&&qt.color,"dragging"),style:f,"data-cypress":"draggable-item",...l?void 0:p,...G,tabIndex:l?void 0:-1,children:y})})})),mr={Row:"_Row_1kr10_1"},sl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:bt(mr.Row,t&&mr.horizontal),children:e}))),fa={...ol},pa=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:d=wi,coordinateGetter:m=ha,dropAnimation:p=fa,getItemStyles:g=()=>({}),getNewIndex:x,handle:h=!1,items:f,onMove:T,isDisabled:q=()=>!1,measuring:A,modifiers:D,renderItem:G,renderDivider:U,reorderItems:y=Ro,strategy:B=ko,style:S,useDragOverlay:w=!0,onDragStart:k,wrapperStyle:O=()=>({})}=e,[E,F]=o.useState(()=>f);o.useEffect(()=>{F(f)},[f]);const[Z,_]=o.useState(null),P=function(){for(var z=arguments.length,K=new Array(z),W=0;W<z;W++)K[W]=arguments[W];return o.useMemo(()=>[...K].filter(ge=>ge!=null),[...K])}(io(Xr,{activationConstraint:i}),io(Yr,{activationConstraint:i}),io(qo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:m})),V=E.indexOf.bind(E),$=Z?V(Z):-1,oe=[];E.map((z,K)=>{oe.push(c.jsx(va,{id:z,handle:h,index:K,style:g,wrapperStyle:O,disabled:q(z),renderItem:G,animateLayoutChanges:a,useDragOverlay:w,getNewIndex:x},z+"-"+K));const W=U?.({key:"divider-"+K});W&&oe.push(W)});const{getPortalContainer:L}=r.useFullscreenPortal();return c.jsxs(Ui,{sensors:P,collisionDetection:d,onDragStart:z=>{const{active:K}=z;K&&(k?.(z),_(K.id))},autoScroll:{canScroll:z=>!0},onDragEnd:z=>{if(_(null),z.over){const K=V(z.over.id);$!==K&&(F(W=>y(W,$,K)),T?.($,K))}},onDragCancel:()=>{_(null)},measuring:A,modifiers:D,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...S},className:bt(n,qt.Wrapper),children:c.jsx(la,{items:E,strategy:B,children:c.jsx(sl,{ref:t,children:oe})})}),w?zt.createPortal(c.jsx(na,{adjustScale:l,dropAnimation:p,children:Z?c.jsx(Mo,{value:E[$],handle:h,renderItem:G,wrapperStyle:O({index:$,isDragging:!0,id:E[$]}),index:$,dragging:!0,style:g({id:E[$],index:$,isSorting:Z!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),L()):null]})}));function va({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:d,style:m,renderItem:p,useDragOverlay:g,wrapperStyle:x}){const{attributes:h,isDragging:f,isSorting:T,listeners:q,overIndex:A,setNodeRef:D,transform:G,transition:U}=ua({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(Mo,{ref:D,value:a,disabled:e,dragging:f,sorting:T,handle:i,renderItem:p,index:l,style:m({index:l,id:a,isDragging:f,isSorting:T,overIndex:A}),onRemove:d?()=>d(a):void 0,transform:G,transition:U,wrapperStyle:x({index:l,isDragging:f,id:a}),listeners:q,"data-index":l,"data-id":a,dragOverlay:!g&&f,...h})}const Ca="_TabStrip_3x0dp_1",ba=new s.Color("rgb(33, 115, 70)"),wa="#eee",ya=e=>c.jsx(al,{...e}),dl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:d=[],onSelectedTabIndexChange:m,onTabNameChange:p,onTabMove:g,createScrollStartButton:x=r.defaultCreateScrollStartButton,createScrollEndButton:h=r.defaultCreateScrollEndButton,createScrollEdgeButton:f=r.defaultCreateScrollEdgeButton,createTabButton:T=ya,createTabDivider:q,editLabelProps:A,disabled:D=!1,disableDrag:G=!1,background:U="white",activeColor:y=ba,borderColor:B=wa,borderWidth:S=1}=e,[w,k]=o.useState(l),[O,E]=o.useState(d),F=o.useCallback(we=>{const Ee=L.current?.[we]?.closest(".tab-item")??L.current?.[we];Ee&&X.current?.scrollTo({top:Ee.offsetTop,left:Ee.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{F(l)},[l]);const Z=o.useCallback((we,Ee)=>{Ee!==w&&(k(Ee),m?.(Ee)),F(Ee)},[m,w]),_=o.useCallback((we,Ee)=>{g?.(we,Ee)},[g]),P=o.useRef(null),[V,$]=o.useState(-1),oe=o.useCallback((we,Ee)=>{p?.(we,Ee)},[p]);o.useLayoutEffect(()=>{k(l)},[l]),o.useLayoutEffect(()=>{E(d)},[d]);const L=o.useRef([]),z=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(we){L.current?.[we]?.startEdit()},cancel(we){L.current?.[we]?.cancel()}},z.current),[w,V]);const K=o.useCallback(({value:we,index:Ee,dragging:Le})=>{const{style:Ve,maxLength:C,...Ue}=A||{},Qe=c.jsx(Dr,{ref:$e=>{L.current[Ee]=$e},value:we,disabled:D,maxLength:C,style:{color:w===Ee&&y?y?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...Ve},styleHover:{},onSubmit:$e=>(P.current=!1,$(-1),oe(Ee,$e)),onCancel:()=>{P.current=!1,$(-1)},onChange:$e=>{P.current=!0,$(Ee)},...Ue});return T({onClick:$e=>Z($e,Ee),value:we,index:Ee,editing:V===Ee&&P.current,editable:!0,disabled:D,selectedIndex:w,background:U,activeColor:y,borderColor:B,borderWidth:S,dragging:Le,children:Qe})},[w,oe,Z,A,D,V,T]),[W,{width:ge}]=Nt(),[ae,{width:Q}]=Nt(),X=o.useRef(null),[be,ke]=o.useState({left:0,top:0,width:0,height:0}),[ve,Pe]=o.useState(null);o.useEffect(()=>{ve!==null&&X.current&&X.current.scrollTo({left:ve,behavior:"smooth"})},[ve]);const he=o.useCallback((we,Ee=!1)=>{if(!X.current)return 0;let Le=X.current.firstChild.getBoundingClientRect(),Ve=X.current.firstChild.firstChild.children,C=0;return C=Ee?0:r.ScrollUtils.getScrollTo(we,Le.left,Ve,!0,Math.max(0,we-200)),Pe(C),Math.max(0,C)},[]),He=o.useCallback((we,Ee=!1)=>{if(!X.current)return 0;let Le=X.current.firstChild.getBoundingClientRect(),Ve=X.current.firstChild.firstChild.children,C=0;const Ue=Math.ceil(Q-ge);return C=Ee?Ue:r.ScrollUtils.getScrollTo(we,Le.left,Ve,!1,Math.max(0,we+200)),Pe(C),Math.min(Ue,C)},[Q,ge]),Se=o.useRef(null),ce=o.useRef(null),de=o.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null,Se.current=null)},[]),me=o.useCallback((we,Ee,Le=260)=>{Se.current=we,ce.current=setTimeout(()=>{const Ve=Ee?he(Se.current||we):He(Se.current||we);Ve!==Se.current?me(Ve,Ee,120):de()},Le)},[he,He,de]);o.useEffect(()=>()=>de(),[de]);const Ce=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(be.left)<=0||Math.floor(Q-ge)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:de,onMouseLeave:de,onMouseDown:()=>me(X.current.scrollLeft,!0),onClick:we=>he(Math.min(X.current.scrollLeft,ve??Number.MAX_SAFE_INTEGER),we.ctrlKey)}),[be,ve,Q,ge]),xe=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(Q-ge)<=Math.ceil(be.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:de,onMouseLeave:de,onMouseDown:()=>me(X.current.scrollLeft,!1),onClick:we=>He(Math.max(X.current.scrollLeft,ve??0),we.ctrlKey)}),[be,ve,Q,ge]),Me=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,f?.(Ce)]}),[Ce,xe,x,h,n,f]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:bt(Ca,a),ref:z,children:[c.jsx("div",{style:{borderTop:`solid ${B} ${S}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Me}),c.jsx("div",{className:"Tabs",ref:W,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:c.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:X,onScroll:we=>{ke({left:we.target.scrollLeft,top:we.target.scrollTop,width:we.target.scrollWidth,height:we.target.scrollHeight})},children:c.jsx(pa,{isDisabled:we=>D||G,items:O,strategy:ra,modifiers:[ma],ref:ae,renderItem:K,renderDivider:q,onMove:_,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:f(xe)})]})}));dl.displayName="TabStrip";const Dn=o.createContext(null);Dn.displayName="DocThemesContext";const xa="_script-editor_iy654_5",qa=o.lazy(()=>Promise.resolve().then(()=>require("./D8nQoQYBjMa8aYTt.cjs"))),Sa={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"};let ln,an,Et=["define","require"];const fr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),d=await l.getNavigationTree(i.uri.toString()),m=e.getPosition();let p={...m};p.lineNumber=1,p.column=1;let g=!1;for(let A=m.lineNumber;A>=1;A--)if(i.getLineContent(A).trim()===""){const D=To(d,i.getOffsetAt({lineNumber:A,column:1}),"function");if(!D||ka(D)){g=!0,p.lineNumber=A+1;break}{const G=D.spans[0].start;A=i.getPositionAt(G).lineNumber,p.lineNumber=A}}let x=n,h=!1;!g&&!x.startsWith(`
|
|
27
|
+
`},pi={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vi(e){let{announcements:t=pi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=fi}=e;const{announce:l,announcement:d}=function(){const[h,f]=o.useState("");return{announce:o.useCallback(T=>{T!=null&&f(T)},[]),announcement:h}}(),m=Cn("DndLiveRegion"),[p,g]=o.useState(!1);if(o.useEffect(()=>{g(!0)},[]),function(h){const f=o.useContext(Lr);o.useEffect(()=>{if(!f)throw new Error("useDndMonitor must be used within a children of <DndContext>");return f(h)},[h,f])}(o.useMemo(()=>({onDragStart(h){let{active:f}=h;l(t.onDragStart({active:f}))},onDragMove(h){let{active:f,over:T}=h;t.onDragMove&&l(t.onDragMove({active:f,over:T}))},onDragOver(h){let{active:f,over:T}=h;l(t.onDragOver({active:f,over:T}))},onDragEnd(h){let{active:f,over:T}=h;l(t.onDragEnd({active:f,over:T}))},onDragCancel(h){let{active:f,over:T}=h;l(t.onDragCancel({active:f,over:T}))}}),[l,t])),!p)return null;const x=o.createElement(o.Fragment,null,o.createElement(hi,{id:i,value:a.draggable}),o.createElement(mi,{id:m,announcement:d}));return n?zt.createPortal(x,n):x}var ct;function On(){}function io(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ct||(ct={}));const Rt=Object.freeze({x:0,y:0});function Or(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ci(e,t){const n=Ln(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function jr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function bi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Jo(e){let{left:t,top:n,height:i,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+i},{x:t+a,y:n+i}]}function Br(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Qo(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const wi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Qo(t,t.left,t.top),l=[];for(const d of i){const{id:m}=d,p=n.get(m);if(p){const g=Or(Qo(p),a);l.push({id:m,data:{droppableContainer:d,value:g}})}}return l.sort(jr)};function yi(e,t){const n=Math.max(t.top,e.top),i=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),d=a-i,m=l-n;if(i<a&&n<l){const p=t.width*t.height,g=e.width*e.height,x=d*m;return Number((x/(p+g-x)).toFixed(4))}return 0}const xi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:d}=l,m=n.get(d);if(m){const p=yi(m,t);p>0&&a.push({id:d,data:{droppableContainer:l,value:p}})}}return a.sort(bi)};function er(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Rt}function qi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,d)=>({...l,top:l.top+e*d.y,bottom:l.bottom+e*d.y,left:l.left+e*d.x,right:l.right+e*d.x}),{...t})}}const Si=qi(1);function Vr(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Ri={ignoreTransform:!1};function Zt(e,t){t===void 0&&(t=Ri);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:x}=ft(e).getComputedStyle(e);g&&(n=function(h,f,T){const q=Vr(f);if(!q)return h;const{scaleX:A,scaleY:D,x:G,y:U}=q,y=h.left-G-(1-A)*parseFloat(T),B=h.top-U-(1-D)*parseFloat(T.slice(T.indexOf(" ")+1)),S=A?h.width/A:h.width,w=D?h.height/D:h.height;return{width:S,height:w,top:B,right:y+S,bottom:B+w,left:y}}(n,g,x))}const{top:i,left:a,width:l,height:d,bottom:m,right:p}=n;return{top:i,left:a,width:l,height:d,bottom:m,right:p}}function tr(e){return Zt(e,{ignoreTransform:!0})}function Kn(e,t){const n=[];return e?function i(a){if(t!=null&&n.length>=t||!a)return n;if(xo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!vn(a)||zr(a)||n.includes(a))return n;const l=ft(e).getComputedStyle(a);return a!==e&&function(d,m){m===void 0&&(m=ft(d).getComputedStyle(d));const p=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(g=>{const x=m[g];return typeof x=="string"&&p.test(x)})}(a,l)&&n.push(a),function(d,m){return m===void 0&&(m=ft(d).getComputedStyle(d)),m.position==="fixed"}(a,l)?n:i(a.parentNode)}(e):n}function Pr(e){const[t]=Kn(e,1);return t??null}function ao(e){return Pn&&e?_t(e)?e:yo(e)?xo(e)||e===Wt(e).scrollingElement?window:vn(e)?e:null:null:null}function Hr(e){return _t(e)?e.scrollX:e.scrollLeft}function Ur(e){return _t(e)?e.scrollY:e.scrollTop}function ho(e){return{x:Hr(e),y:Ur(e)}}var ut;function Kr(e){return!(!Pn||!e)&&e===document.scrollingElement}function $r(e){const t={x:0,y:0},n=Kr(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},i={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=i.y,isRight:e.scrollLeft>=i.x,maxScroll:i,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ut||(ut={}));const ki={x:.2,y:.2};function Mi(e,t,n,i,a){let{top:l,left:d,right:m,bottom:p}=n;i===void 0&&(i=10),a===void 0&&(a=ki);const{isTop:g,isBottom:x,isLeft:h,isRight:f}=$r(e),T={x:0,y:0},q={x:0,y:0},A=t.height*a.y,D=t.width*a.x;return!g&&l<=t.top+A?(T.y=ut.Backward,q.y=i*Math.abs((t.top+A-l)/A)):!x&&p>=t.bottom-A&&(T.y=ut.Forward,q.y=i*Math.abs((t.bottom-A-p)/A)),!f&&m>=t.right-D?(T.x=ut.Forward,q.x=i*Math.abs((t.right-D-m)/D)):!h&&d<=t.left+D&&(T.x=ut.Backward,q.x=i*Math.abs((t.left+D-d)/D)),{direction:T,speed:q}}function Ti(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:d}=window;return{top:0,left:0,right:l,bottom:d,width:l,height:d}}const{top:t,left:n,right:i,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:i,bottom:a,width:e.clientWidth,height:e.clientHeight}}function Wr(e){return e.reduce((t,n)=>$t(t,ho(n)),Rt)}function Gr(e,t){if(t===void 0&&(t=Zt),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);Pr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ii=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Hr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Ur(n),0)}]];class mo{constructor(t,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 i=Kn(n),a=Wr(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,d,m]of Ii)for(const p of d)Object.defineProperty(this,p,{get:()=>{const g=m(i),x=a[l]-g;return this.rect[p]+x},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class cn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function so(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var xt,Ye;function nr(e){e.preventDefault()}function Ei(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(xt||(xt={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"}(Ye||(Ye={}));const _r={start:[Ye.Space,Ye.Enter],cancel:[Ye.Esc],end:[Ye.Space,Ye.Enter,Ye.Tab]},Fi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ye.Right:return{...n,x:n.x+25};case Ye.Left:return{...n,x:n.x-25};case Ye.Down:return{...n,y:n.y+25};case Ye.Up:return{...n,y:n.y-25}}};class qo{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new cn(Wt(n)),this.windowListeners=new cn(ft(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(xt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Gr(i),n(Rt)}handleKeyDown(t){if(Un(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=_r,coordinateGetter:d=Fi,scrollBehavior:m="smooth"}=a,{code:p}=t;if(l.end.includes(p))return void this.handleEnd(t);if(l.cancel.includes(p))return void this.handleCancel(t);const{collisionRect:g}=i.current,x=g?{x:g.left,y:g.top}:Rt;this.referenceCoordinates||(this.referenceCoordinates=x);const h=d(t,{active:n,context:i.current,currentCoordinates:x});if(h){const f=fn(h,x),T={x:0,y:0},{scrollableAncestors:q}=i.current;for(const A of q){const D=t.code,{isTop:G,isRight:U,isLeft:y,isBottom:B,maxScroll:S,minScroll:w}=$r(A),k=Ti(A),O={x:Math.min(D===Ye.Right?k.right-k.width/2:k.right,Math.max(D===Ye.Right?k.left:k.left+k.width/2,h.x)),y:Math.min(D===Ye.Down?k.bottom-k.height/2:k.bottom,Math.max(D===Ye.Down?k.top:k.top+k.height/2,h.y))},E=D===Ye.Right&&!U||D===Ye.Left&&!y,F=D===Ye.Down&&!B||D===Ye.Up&&!G;if(E&&O.x!==h.x){const Z=A.scrollLeft+f.x,_=D===Ye.Right&&Z<=S.x||D===Ye.Left&&Z>=w.x;if(_&&!f.y)return void A.scrollTo({left:Z,behavior:m});T.x=_?A.scrollLeft-Z:D===Ye.Right?A.scrollLeft-S.x:A.scrollLeft-w.x,T.x&&A.scrollBy({left:-T.x,behavior:m});break}if(F&&O.y!==h.y){const Z=A.scrollTop+f.y,_=D===Ye.Down&&Z<=S.y||D===Ye.Up&&Z>=w.y;if(_&&!f.x)return void A.scrollTo({top:Z,behavior:m});T.y=_?A.scrollTop-Z:D===Ye.Down?A.scrollTop-S.y:A.scrollTop-w.y,T.y&&A.scrollBy({top:-T.y,behavior:m});break}}this.handleMove(t,$t(fn(h,this.referenceCoordinates),T))}}}handleMove(t,n){const{onMove:i}=this.props;t.preventDefault(),i(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function or(e){return!!(e&&"distance"in e)}function rr(e){return!!(e&&"delay"in e)}qo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=_r,onActivation:a}=t,{active:l}=n;const{code:d}=e.nativeEvent;if(i.start.includes(d)){const m=l.activatorNode.current;return(!m||e.target===m)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class So{constructor(t,n,i){var a;i===void 0&&(i=function(m){const{EventTarget:p}=ft(m);return m instanceof p?m:Wt(m)}(t.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=t,this.events=n;const{event:l}=t,{target:d}=l;this.props=t,this.events=n,this.document=Wt(d),this.documentListeners=new cn(this.document),this.listeners=new cn(i),this.windowListeners=new cn(ft(d)),this.initialCoordinates=(a=Ln(l))!=null?a:Rt,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:t,props:{options:{activationConstraint:n,bypassActivationConstraint:i}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(xt.Resize,this.handleCancel),this.windowListeners.add(xt.DragStart,nr),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,nr),this.documentListeners.add(xt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(rr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(or(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(t,n){const{active:i,onPending:a}=this.props;a(i,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(xt.Click,Ei,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(xt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:d,options:{activationConstraint:m}}=l;if(!a)return;const p=(n=Ln(t))!=null?n:Rt,g=fn(a,p);if(!i&&m){if(or(m)){if(m.tolerance!=null&&so(g,m.tolerance))return this.handleCancel();if(so(g,m.distance))return this.handleStart()}return rr(m)&&so(g,m.tolerance)?this.handleCancel():void this.handlePending(m,g)}t.cancelable&&t.preventDefault(),d(p)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ye.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ai={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Zr extends So{constructor(t){const{event:n}=t,i=Wt(n.target);super(t,Ai,i)}}Zr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Di={move:{name:"mousemove"},end:{name:"mouseup"}};var fo;(function(e){e[e.RightClick=2]="RightClick"})(fo||(fo={}));class Xr extends So{constructor(t){super(t,Di,Wt(t.event.target))}}Xr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==fo.RightClick&&(i?.({event:n}),!0)}}];const co={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Yr extends So{constructor(t){super(t,co)}static setup(){return window.addEventListener(co.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(co.move.name,t)};function t(){}}}var un,jn;function zi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:d=5,order:m=jn.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:x,delta:h,threshold:f}=e;const T=function(w){let{delta:k,disabled:O}=w;const E=Nn(k);return dn(F=>{if(O||!E||!F)return Ni;const Z={x:Math.sign(k.x-E.x),y:Math.sign(k.y-E.y)};return{x:{[ut.Backward]:F.x[ut.Backward]||Z.x===-1,[ut.Forward]:F.x[ut.Forward]||Z.x===1},y:{[ut.Backward]:F.y[ut.Backward]||Z.y===-1,[ut.Forward]:F.y[ut.Forward]||Z.y===1}}},[O,k,E])}({delta:h,disabled:!l}),[q,A]=function(){const w=o.useRef(null);return[o.useCallback((k,O)=>{w.current=setInterval(k,O)},[]),o.useCallback(()=>{w.current!==null&&(clearInterval(w.current),w.current=null)},[])]}(),D=o.useRef({x:0,y:0}),G=o.useRef({x:0,y:0}),U=o.useMemo(()=>{switch(n){case un.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case un.DraggableRect:return a}},[n,a,p]),y=o.useRef(null),B=o.useCallback(()=>{const w=y.current;if(!w)return;const k=D.current.x*G.current.x,O=D.current.y*G.current.y;w.scrollBy(k,O)},[]),S=o.useMemo(()=>m===jn.TreeOrder?[...g].reverse():g,[m,g]);o.useEffect(()=>{if(l&&g.length&&U){for(const w of S){if(i?.(w)===!1)continue;const k=g.indexOf(w),O=x[k];if(!O)continue;const{direction:E,speed:F}=Mi(w,O,U,t,f);for(const Z of["x","y"])T[Z][E[Z]]||(F[Z]=0,E[Z]=0);if(F.x>0||F.y>0)return A(),y.current=w,q(B,d),D.current=F,void(G.current=E)}D.current={x:0,y:0},G.current={x:0,y:0},A()}else A()},[t,B,i,A,l,d,JSON.stringify(U),JSON.stringify(T),q,g,S,x,JSON.stringify(f)])}Yr.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;const{touches:a}=n;return!(a.length>1)&&(i?.({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(un||(un={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(jn||(jn={}));const Ni={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var pn,po;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(pn||(pn={})),function(e){e.Optimized="optimized"}(po||(po={}));const lr=new Map;function vo(e,t){return dn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Bn(e){let{callback:t,disabled:n}=e;const i=Hn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Li(e){return new mo(Zt(e),e)}function ir(e,t,n){t===void 0&&(t=Li);const[i,a]=o.useState(null);function l(){a(p=>{if(!e)return null;var g;if(e.isConnected===!1)return(g=p??n)!=null?g:null;const x=t(e);return JSON.stringify(p)===JSON.stringify(x)?p:x})}const d=function(p){let{callback:g,disabled:x}=p;const h=Hn(g),f=o.useMemo(()=>{if(x||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:T}=window;return new T(h)},[h,x]);return o.useEffect(()=>()=>f?.disconnect(),[f]),f}({callback(p){if(e)for(const g of p){const{type:x,target:h}=g;if(x==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),m=Bn({callback:l});return St(()=>{l(),e?(m?.observe(e),d?.observe(document.body,{childList:!0,subtree:!0})):(m?.disconnect(),d?.disconnect())},[e]),i}const ar=[];function sr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==Rt;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?fn(e,n.current):Rt}function dr(e){return o.useMemo(()=>e?function(t){const n=t.innerWidth,i=t.innerHeight;return{top:0,left:0,right:n,bottom:i,width:n,height:i}}(e):null,[e])}const cr=[];function Jr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vn(t)?t:e}const Oi=[{sensor:Zr,options:{}},{sensor:qo,options:{}}],ji={current:{}},An={draggable:{measure:tr},droppable:{measure:tr,strategy:pn.WhileDragging,frequency:po.Optimized},dragOverlay:{measure:Zt}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,i;return(n=(i=this.get(t))==null?void 0:i.node.current)!=null?n:void 0}}const Bi={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:On},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:An,measureDroppableContainers:On,windowRect:null,measuringScheduled:!1},Qr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:On,draggableNodes:new Map,over:null,measureDroppableContainers:On},bn=o.createContext(Qr),el=o.createContext(Bi);function Vi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function Pi(e,t){switch(t.type){case ct.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ct.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ct.DragEnd:case ct.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ct.RegisterDroppable:{const{element:n}=t,{id:i}=n,a=new gn(e.droppable.containers);return a.set(i,n),{...e,droppable:{...e.droppable,containers:a}}}case ct.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const d=new gn(e.droppable.containers);return d.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:d}}}case ct.UnregisterDroppable:{const{id:n,key:i}=t,a=e.droppable.containers.get(n);if(!a||i!==a.key)return e;const l=new gn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Hi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(bn),l=Nn(i),d=Nn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&d!=null){if(!Un(l)||document.activeElement===l.target)return;const m=a.get(d);if(!m)return;const{activatorNode:p,node:g}=m;if(!p.current&&!g.current)return;requestAnimationFrame(()=>{for(const x of[p.current,g.current]){if(!x)continue;const h=ui(x);if(h){h.focus();break}}})}},[i,t,a,d,l]),null}function tl(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const $n=o.createContext({...Rt,scaleX:1,scaleY:1});var Ft;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ft||(Ft={}));const Ui=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:d,autoScroll:m=!0,children:p,sensors:g=Oi,collisionDetection:x=xi,measuring:h,modifiers:f,...T}=e;const q=o.useReducer(Pi,void 0,Vi),[A,D]=q,[G,U]=function(){const[v]=o.useState(()=>new Set),H=o.useCallback(Y=>(v.add(Y),()=>v.delete(Y)),[v]);return[o.useCallback(Y=>{let{type:ne,event:le}=Y;v.forEach(ie=>{var se;return(se=ie[ne])==null?void 0:se.call(ie,le)})},[v]),H]}(),[y,B]=o.useState(Ft.Uninitialized),S=y===Ft.Initialized,{draggable:{active:w,nodes:k,translate:O},droppable:{containers:E}}=A,F=w!=null?k.get(w):null,Z=o.useRef({initial:null,translated:null}),_=o.useMemo(()=>{var v;return w!=null?{id:w,data:(v=F?.data)!=null?v:ji,rect:Z}:null},[w,F]),P=o.useRef(null),[V,$]=o.useState(null),[oe,L]=o.useState(null),z=mn(T,Object.values(T)),K=Cn("DndDescribedBy",l),W=o.useMemo(()=>E.getEnabled(),[E]),ge=(ae=h,o.useMemo(()=>({draggable:{...An.draggable,...ae?.draggable},droppable:{...An.droppable,...ae?.droppable},dragOverlay:{...An.dragOverlay,...ae?.dragOverlay}}),[ae?.draggable,ae?.droppable,ae?.dragOverlay]));var ae;const{droppableRects:Q,measureDroppableContainers:X,measuringScheduled:be}=function(v,H){let{dragging:Y,dependencies:ne,config:le}=H;const[ie,se]=o.useState(null),{frequency:ye,measure:fe,strategy:pe}=le,qe=o.useRef(v),Oe=function(){switch(pe){case pn.Always:return!1;case pn.BeforeDragging:return Y;default:return!Y}}(),De=mn(Oe),We=o.useCallback(function(Ne){Ne===void 0&&(Ne=[]),De.current||se(Xe=>Xe===null?Ne:Xe.concat(Ne.filter(it=>!Xe.includes(it))))},[De]),je=o.useRef(null),Ge=dn(Ne=>{if(Oe&&!Y)return lr;if(!Ne||Ne===lr||qe.current!==v||ie!=null){const Xe=new Map;for(let it of v){if(!it)continue;if(ie&&ie.length>0&&!ie.includes(it.id)&&it.rect.current){Xe.set(it.id,it.rect.current);continue}const pt=it.node.current,yt=pt?new mo(fe(pt),pt):null;it.rect.current=yt,yt&&Xe.set(it.id,yt)}return Xe}return Ne},[v,ie,Y,Oe,fe]);return o.useEffect(()=>{qe.current=v},[v]),o.useEffect(()=>{Oe||We()},[Y,Oe]),o.useEffect(()=>{ie&&ie.length>0&&se(null)},[JSON.stringify(ie)]),o.useEffect(()=>{Oe||typeof ye!="number"||je.current!==null||(je.current=setTimeout(()=>{We(),je.current=null},ye))},[ye,Oe,We,...ne]),{droppableRects:Ge,measureDroppableContainers:We,measuringScheduled:ie!=null}}(W,{dragging:S,dependencies:[O.x,O.y],config:ge.droppable}),ke=function(v,H){const Y=H!=null?v.get(H):void 0,ne=Y?Y.node.current:null;return dn(le=>{var ie;return H==null?null:(ie=ne??le)!=null?ie:null},[ne,H])}(k,w),ve=o.useMemo(()=>oe?Ln(oe):null,[oe]),Pe=function(){const v=V?.autoScrollEnabled===!1,H=typeof m=="object"?m.enabled===!1:m===!1,Y=S&&!v&&!H;return typeof m=="object"?{...m,enabled:Y}:{enabled:Y}}(),he=function(v,H){return vo(v,H)}(ke,ge.draggable.measure);(function(v){let{activeNode:H,measure:Y,initialRect:ne,config:le=!0}=v;const ie=o.useRef(!1),{x:se,y:ye}=typeof le=="boolean"?{x:le,y:le}:le;St(()=>{if(!se&&!ye||!H)return void(ie.current=!1);if(ie.current||!ne)return;const fe=H?.node.current;if(!fe||fe.isConnected===!1)return;const pe=er(Y(fe),ne);if(se||(pe.x=0),ye||(pe.y=0),ie.current=!0,Math.abs(pe.x)>0||Math.abs(pe.y)>0){const qe=Pr(fe);qe&&qe.scrollBy({top:pe.y,left:pe.x})}},[H,se,ye,ne,Y])})({activeNode:w!=null?k.get(w):null,config:Pe.layoutShiftCompensation,initialRect:he,measure:ge.draggable.measure});const He=ir(ke,ge.draggable.measure,he),Se=ir(ke?ke.parentElement:null),ce=o.useRef({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:Q,draggableNodes:k,draggingNode:null,draggingNodeRect:null,droppableContainers:E,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),de=E.getNodeFor((t=ce.current.over)==null?void 0:t.id),me=function(v){let{measure:H}=v;const[Y,ne]=o.useState(null),le=Bn({callback:o.useCallback(fe=>{for(const{target:pe}of fe)if(vn(pe)){ne(qe=>{const Oe=H(pe);return qe?{...qe,width:Oe.width,height:Oe.height}:Oe});break}},[H])}),ie=o.useCallback(fe=>{const pe=Jr(fe);le?.disconnect(),pe&&le?.observe(pe),ne(pe?H(pe):null)},[H,le]),[se,ye]=zn(ie);return o.useMemo(()=>({nodeRef:se,rect:Y,setRef:ye}),[Y,se,ye])}({measure:ge.dragOverlay.measure}),Ce=(n=me.nodeRef.current)!=null?n:ke,xe=S?(i=me.rect)!=null?i:He:null,Me=!!(me.nodeRef.current&&me.rect),we=er(Ee=Me?null:He,vo(Ee));var Ee;const Le=dr(Ce?ft(Ce):null),Ve=function(v){const H=o.useRef(v),Y=dn(ne=>v?ne&&ne!==ar&&v&&H.current&&v.parentNode===H.current.parentNode?ne:Kn(v):ar,[v]);return o.useEffect(()=>{H.current=v},[v]),Y}(S?de??ke:null),C=function(v,H){H===void 0&&(H=Zt);const[Y]=v,ne=dr(Y?ft(Y):null),[le,ie]=o.useState(cr);function se(){ie(()=>v.length?v.map(fe=>Kr(fe)?ne:new mo(H(fe),fe)):cr)}const ye=Bn({callback:se});return St(()=>{ye?.disconnect(),se(),v.forEach(fe=>ye?.observe(fe))},[v]),le}(Ve),Ue=tl(f,{transform:{x:O.x-we.x,y:O.y-we.y,scaleX:1,scaleY:1},activatorEvent:oe,active:_,activeNodeRect:He,containerNodeRect:Se,draggingNodeRect:xe,over:ce.current.over,overlayNodeRect:me.rect,scrollableAncestors:Ve,scrollableAncestorRects:C,windowRect:Le}),Qe=ve?$t(ve,O):null,$e=function(v){const[H,Y]=o.useState(null),ne=o.useRef(v),le=o.useCallback(ie=>{const se=ao(ie.target);se&&Y(ye=>ye?(ye.set(se,ho(se)),new Map(ye)):null)},[]);return o.useEffect(()=>{const ie=ne.current;if(v!==ie){se(ie);const ye=v.map(fe=>{const pe=ao(fe);return pe?(pe.addEventListener("scroll",le,{passive:!0}),[pe,ho(pe)]):null}).filter(fe=>fe!=null);Y(ye.length?new Map(ye):null),ne.current=v}return()=>{se(v),se(ie)};function se(ye){ye.forEach(fe=>{const pe=ao(fe);pe?.removeEventListener("scroll",le)})}},[le,v]),o.useMemo(()=>v.length?H?Array.from(H.values()).reduce((ie,se)=>$t(ie,se),Rt):Wr(v):Rt,[v,H])}(Ve),ee=sr($e),Fe=sr($e,[He]),Be=$t(Ue,ee),Ie=xe?Si(xe,Ue):null,ze=_&&Ie?x({active:_,collisionRect:Ie,droppableRects:Q,droppableContainers:W,pointerCoordinates:Qe}):null,Ae=Br(ze,"id"),[R,re]=o.useState(null),j=function(v,H,Y){return{...v,scaleX:H&&Y?H.width/Y.width:1,scaleY:H&&Y?H.height/Y.height:1}}(Me?Ue:$t(Ue,Fe),(a=R?.rect)!=null?a:null,He),J=o.useRef(null),u=o.useCallback((v,H)=>{let{sensor:Y,options:ne}=H;if(P.current==null)return;const le=k.get(P.current);if(!le)return;const ie=v.nativeEvent,se=new Y({active:P.current,activeNode:le,event:ie,options:ne,context:ce,onAbort(fe){if(!k.get(fe))return;const{onDragAbort:pe}=z.current,qe={id:fe};pe?.(qe),G({type:"onDragAbort",event:qe})},onPending(fe,pe,qe,Oe){if(!k.get(fe))return;const{onDragPending:De}=z.current,We={id:fe,constraint:pe,initialCoordinates:qe,offset:Oe};De?.(We),G({type:"onDragPending",event:We})},onStart(fe){const pe=P.current;if(pe==null)return;const qe=k.get(pe);if(!qe)return;const{onDragStart:Oe}=z.current,De={activatorEvent:ie,active:{id:pe,data:qe.data,rect:Z}};zt.unstable_batchedUpdates(()=>{Oe?.(De),B(Ft.Initializing),D({type:ct.DragStart,initialCoordinates:fe,active:pe}),G({type:"onDragStart",event:De}),$(J.current),L(ie)})},onMove(fe){D({type:ct.DragMove,coordinates:fe})},onEnd:ye(ct.DragEnd),onCancel:ye(ct.DragCancel)});function ye(fe){return async function(){const{active:pe,collisions:qe,over:Oe,scrollAdjustedTranslate:De}=ce.current;let We=null;if(pe&&De){const{cancelDrop:je}=z.current;We={activatorEvent:ie,active:pe,collisions:qe,delta:De,over:Oe},fe===ct.DragEnd&&typeof je=="function"&&await Promise.resolve(je(We))&&(fe=ct.DragCancel)}P.current=null,zt.unstable_batchedUpdates(()=>{D({type:fe}),B(Ft.Uninitialized),re(null),$(null),L(null),J.current=null;const je=fe===ct.DragEnd?"onDragEnd":"onDragCancel";if(We){const Ge=z.current[je];Ge?.(We),G({type:je,event:We})}})}}J.current=se},[k]),M=o.useCallback((v,H)=>(Y,ne)=>{const le=Y.nativeEvent,ie=k.get(ne);if(P.current!==null||!ie||le.dndKit||le.defaultPrevented)return;const se={active:ie};v(Y,H.options,se)===!0&&(le.dndKit={capturedBy:H.sensor},P.current=ne,u(Y,H))},[k,u]),I=function(v,H){return o.useMemo(()=>v.reduce((Y,ne)=>{const{sensor:le}=ne;return[...Y,...le.activators.map(ie=>({eventName:ie.eventName,handler:H(ie.handler,ne)}))]},[]),[v,H])}(g,M);(function(v){o.useEffect(()=>{if(!Pn)return;const H=v.map(Y=>{let{sensor:ne}=Y;return ne.setup==null?void 0:ne.setup()});return()=>{for(const Y of H)Y?.()}},v.map(H=>{let{sensor:Y}=H;return Y}))})(g),St(()=>{He&&y===Ft.Initializing&&B(Ft.Initialized)},[He,y]),o.useEffect(()=>{const{onDragMove:v}=z.current,{active:H,activatorEvent:Y,collisions:ne,over:le}=ce.current;if(!H||!Y)return;const ie={active:H,activatorEvent:Y,collisions:ne,delta:{x:Be.x,y:Be.y},over:le};zt.unstable_batchedUpdates(()=>{v?.(ie),G({type:"onDragMove",event:ie})})},[Be.x,Be.y]),o.useEffect(()=>{const{active:v,activatorEvent:H,collisions:Y,droppableContainers:ne,scrollAdjustedTranslate:le}=ce.current;if(!v||P.current==null||!H||!le)return;const{onDragOver:ie}=z.current,se=ne.get(Ae),ye=se&&se.rect.current?{id:se.id,rect:se.rect.current,data:se.data,disabled:se.disabled}:null,fe={active:v,activatorEvent:H,collisions:Y,delta:{x:le.x,y:le.y},over:ye};zt.unstable_batchedUpdates(()=>{re(ye),ie?.(fe),G({type:"onDragOver",event:fe})})},[Ae]),St(()=>{ce.current={activatorEvent:oe,active:_,activeNode:ke,collisionRect:Ie,collisions:ze,droppableRects:Q,draggableNodes:k,draggingNode:Ce,draggingNodeRect:xe,droppableContainers:E,over:R,scrollableAncestors:Ve,scrollAdjustedTranslate:Be},Z.current={initial:xe,translated:Ie}},[_,ke,ze,Ie,k,Ce,xe,Q,E,R,Ve,Be]),zi({...Pe,delta:O,draggingRect:Ie,pointerCoordinates:Qe,scrollableAncestors:Ve,scrollableAncestorRects:C});const b=o.useMemo(()=>({active:_,activeNode:ke,activeNodeRect:He,activatorEvent:oe,collisions:ze,containerNodeRect:Se,dragOverlay:me,draggableNodes:k,droppableContainers:E,droppableRects:Q,over:R,measureDroppableContainers:X,scrollableAncestors:Ve,scrollableAncestorRects:C,measuringConfiguration:ge,measuringScheduled:be,windowRect:Le}),[_,ke,He,oe,ze,Se,me,k,E,Q,R,X,Ve,C,ge,be,Le]),N=o.useMemo(()=>({activatorEvent:oe,activators:I,active:_,activeNodeRect:He,ariaDescribedById:{draggable:K},dispatch:D,draggableNodes:k,over:R,measureDroppableContainers:X}),[oe,I,_,He,D,K,k,R,X]);return o.createElement(Lr.Provider,{value:U},o.createElement(bn.Provider,{value:N},o.createElement(el.Provider,{value:b},o.createElement($n.Provider,{value:j},p)),o.createElement(Hi,{disabled:d?.restoreFocus===!1})),o.createElement(vi,{...d,hiddenTextDescribedById:K}))}),Ki=o.createContext(null),ur="button";function $i(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=Cn("Draggable"),{activators:d,activatorEvent:m,active:p,activeNodeRect:g,ariaDescribedById:x,draggableNodes:h,over:f}=o.useContext(bn),{role:T=ur,roleDescription:q="draggable",tabIndex:A=0}=a??{},D=p?.id===t,G=o.useContext(D?$n:Ki),[U,y]=zn(),[B,S]=zn(),w=function(O,E){return o.useMemo(()=>O.reduce((F,Z)=>{let{eventName:_,handler:P}=Z;return F[_]=V=>{P(V,E)},F},{}),[O,E])}(d,t),k=mn(n);return St(()=>(h.set(t,{id:t,key:l,node:U,activatorNode:B,data:k}),()=>{const O=h.get(t);O&&O.key===l&&h.delete(t)}),[h,t]),{active:p,activatorEvent:m,activeNodeRect:g,attributes:o.useMemo(()=>({role:T,tabIndex:A,"aria-disabled":i,"aria-pressed":!(!D||T!==ur)||void 0,"aria-roledescription":q,"aria-describedby":x.draggable}),[i,T,A,D,q,x.draggable]),isDragging:D,listeners:i?void 0:w,node:U,over:f,setNodeRef:y,setActivatorNodeRef:S,transform:G}}function nl(){return o.useContext(el)}const Wi={timeout:25};function Gi(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,d]=o.useState(null),m=Nn(n);return n||i||!m||a(m),St(()=>{if(!l)return;const p=i?.key,g=i?.props.id;p!=null&&g!=null?Promise.resolve(t(g,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:d}):null)}const _i={x:0,y:0,scaleX:1,scaleY:1};function Zi(e){let{children:t}=e;return o.createElement(bn.Provider,{value:Qr},o.createElement($n.Provider,{value:_i},t))}const Xi={position:"fixed",touchAction:"none"},Yi=e=>Un(e)?"transform 250ms ease":void 0,Ji=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:d,rect:m,style:p,transform:g,transition:x=Yi}=e;if(!m)return null;const h=a?g:{...g,scaleX:1,scaleY:1},f={...Xi,width:m.width,height:m.height,top:m.top,left:m.left,transform:Lt.Transform.toString(h),transformOrigin:a&&i?Ci(i,m):void 0,transition:typeof x=="function"?x(i):x,...p};return o.createElement(n,{className:d,style:f,ref:t},l)}),Qi=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:d}=e;if(l!=null&&l.active)for(const[m,p]of Object.entries(l.active))p!==void 0&&(a[m]=n.node.style.getPropertyValue(m),n.node.style.setProperty(m,p));if(l!=null&&l.dragOverlay)for(const[m,p]of Object.entries(l.dragOverlay))p!==void 0&&i.node.style.setProperty(m,p);return d!=null&&d.active&&n.node.classList.add(d.active),d!=null&&d.dragOverlay&&i.node.classList.add(d.dragOverlay),function(){for(const[m,p]of Object.entries(a))n.node.style.setProperty(m,p);d!=null&&d.active&&n.node.classList.remove(d.active)}},ol={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Lt.Transform.toString(t)},{transform:Lt.Transform.toString(n)}]},sideEffects:Qi({styles:{active:{opacity:"0"}}})};function ea(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return Hn((l,d)=>{if(t===null)return;const m=n.get(l);if(!m)return;const p=m.node.current;if(!p)return;const g=Jr(d);if(!g)return;const{transform:x}=ft(d).getComputedStyle(d),h=Vr(x);if(!h)return;const f=typeof t=="function"?t:function(T){const{duration:q,easing:A,sideEffects:D,keyframes:G}={...ol,...T};return U=>{let{active:y,dragOverlay:B,transform:S,...w}=U;if(!q)return;const k={x:B.rect.left-y.rect.left,y:B.rect.top-y.rect.top},O={scaleX:S.scaleX!==1?y.rect.width*S.scaleX/B.rect.width:1,scaleY:S.scaleY!==1?y.rect.height*S.scaleY/B.rect.height:1},E={x:S.x-k.x,y:S.y-k.y,...O},F=G({...w,active:y,dragOverlay:B,transform:{initial:S,final:E}}),[Z]=F,_=F[F.length-1];if(JSON.stringify(Z)===JSON.stringify(_))return;const P=D?.({active:y,dragOverlay:B,...w}),V=B.node.animate(F,{duration:q,easing:A,fill:"forwards"});return new Promise($=>{V.onfinish=()=>{P?.(),$()}})}}(t);return Gr(p,a.draggable.measure),f({active:{id:l,data:m.data,node:p,rect:a.draggable.measure(p)},draggableNodes:n,dragOverlay:{node:d,rect:a.dragOverlay.measure(g)},droppableContainers:i,measuringConfiguration:a,transform:h})})}let gr=0;function ta(e){return o.useMemo(()=>{if(e!=null)return gr++,gr},[e])}const na=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:d,wrapperElement:m="div",className:p,zIndex:g=999}=e;const{activatorEvent:x,active:h,activeNodeRect:f,containerNodeRect:T,draggableNodes:q,droppableContainers:A,dragOverlay:D,over:G,measuringConfiguration:U,scrollableAncestors:y,scrollableAncestorRects:B,windowRect:S}=nl(),w=o.useContext($n),k=ta(h?.id),O=tl(d,{activatorEvent:x,active:h,activeNodeRect:f,containerNodeRect:T,draggingNodeRect:D.rect,over:G,overlayNodeRect:D.rect,scrollableAncestors:y,scrollableAncestorRects:B,transform:w,windowRect:S}),E=vo(f),F=ea({config:i,draggableNodes:q,droppableContainers:A,measuringConfiguration:U}),Z=E?D.setRef:void 0;return o.createElement(Zi,null,o.createElement(Gi,{animation:F},h&&k?o.createElement(Ji,{key:k,id:h.id,ref:Z,as:m,activatorEvent:x,adjustScale:t,className:p,transition:l,rect:E,style:{zIndex:g,...a},transform:O},n):null))});function Ro(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function oa(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function En(e){return e!==null&&e>=0}const Fn={scaleX:1,scaleY:1},ra=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:d}=e;const m=(t=n[a])!=null?t:i;if(!m)return null;const p=function(g,x,h){const f=g[x],T=g[x-1],q=g[x+1];return!f||!T&&!q?0:h<x?T?f.left-(T.left+T.width):q.left-(f.left+f.width):q?q.left-(f.left+f.width):f.left-(T.left+T.width)}(n,d,a);if(d===a){const g=n[l];return g?{x:a<l?g.left+g.width-(m.left+m.width):g.left-m.left,y:0,...Fn}:null}return d>a&&d<=l?{x:-m.width-p,y:0,...Fn}:d<a&&d>=l?{x:m.width+p,y:0,...Fn}:{x:0,y:0,...Fn}},ko=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=Ro(t,i,n),d=t[a],m=l[a];return m&&d?{x:m.left-d.left,y:m.top-d.top,scaleX:m.width/d.width,scaleY:m.height/d.height}:null},rl="Sortable",ll=o.createContext({activeIndex:-1,containerId:rl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ko,disabled:{draggable:!1,droppable:!1}});function la(e){let{children:t,id:n,items:i,strategy:a=ko,disabled:l=!1}=e;const{active:d,dragOverlay:m,droppableRects:p,over:g,measureDroppableContainers:x}=nl(),h=Cn(rl,n),f=m.rect!==null,T=o.useMemo(()=>i.map(w=>typeof w=="object"&&"id"in w?w.id:w),[i]),q=d!=null,A=d?T.indexOf(d.id):-1,D=g?T.indexOf(g.id):-1,G=o.useRef(T),U=!function(w,k){if(w===k)return!0;if(w.length!==k.length)return!1;for(let O=0;O<w.length;O++)if(w[O]!==k[O])return!1;return!0}(T,G.current),y=D!==-1&&A===-1||U,B=function(w){return typeof w=="boolean"?{draggable:w,droppable:w}:w}(l);St(()=>{U&&q&&x(T)},[U,T,q,x]),o.useEffect(()=>{G.current=T},[T]);const S=o.useMemo(()=>({activeIndex:A,containerId:h,disabled:B,disableTransforms:y,items:T,overIndex:D,useDragOverlay:f,sortedRects:oa(T,p),strategy:a}),[A,h,B.draggable,B.droppable,y,T,D,p,f,a]);return o.createElement(ll.Provider,{value:S},t)}const ia=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return Ro(n,i,a).indexOf(t)},aa=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:d,previousItems:m,previousContainerId:p,transition:g}=e;return!(!g||!i)&&(m===l||a!==d)&&(!!n||d!==a&&t===p)},sa={duration:200,easing:"ease"},il="transform",da=Lt.Transition.toString({property:il,duration:0,easing:"linear"}),ca={roleDescription:"sortable"};function ua(e){let{animateLayoutChanges:t=aa,attributes:n,disabled:i,data:a,getNewIndex:l=ia,id:d,strategy:m,resizeObserverConfig:p,transition:g=sa}=e;const{items:x,containerId:h,activeIndex:f,disabled:T,disableTransforms:q,sortedRects:A,overIndex:D,useDragOverlay:G,strategy:U}=o.useContext(ll),y=function(de,me){var Ce,xe;return typeof de=="boolean"?{draggable:de,droppable:!1}:{draggable:(Ce=de?.draggable)!=null?Ce:me.draggable,droppable:(xe=de?.droppable)!=null?xe:me.droppable}}(i,T),B=x.indexOf(d),S=o.useMemo(()=>({sortable:{containerId:h,index:B,items:x},...a}),[h,a,B,x]),w=o.useMemo(()=>x.slice(x.indexOf(d)),[x,d]),{rect:k,node:O,isOver:E,setNodeRef:F}=function(de){let{data:me,disabled:Ce=!1,id:xe,resizeObserverConfig:Me}=de;const we=Cn("Droppable"),{active:Ee,dispatch:Le,over:Ve,measureDroppableContainers:C}=o.useContext(bn),Ue=o.useRef({disabled:Ce}),Qe=o.useRef(!1),$e=o.useRef(null),ee=o.useRef(null),{disabled:Fe,updateMeasurementsFor:Be,timeout:Ie}={...Wi,...Me},ze=mn(Be??xe),Ae=Bn({callback:o.useCallback(()=>{Qe.current?(ee.current!=null&&clearTimeout(ee.current),ee.current=setTimeout(()=>{C(Array.isArray(ze.current)?ze.current:[ze.current]),ee.current=null},Ie)):Qe.current=!0},[Ie]),disabled:Fe||!Ee}),R=o.useCallback((u,M)=>{Ae&&(M&&(Ae.unobserve(M),Qe.current=!1),u&&Ae.observe(u))},[Ae]),[re,j]=zn(R),J=mn(me);return o.useEffect(()=>{Ae&&re.current&&(Ae.disconnect(),Qe.current=!1,Ae.observe(re.current))},[re,Ae]),o.useEffect(()=>(Le({type:ct.RegisterDroppable,element:{id:xe,key:we,disabled:Ce,node:re,rect:$e,data:J}}),()=>Le({type:ct.UnregisterDroppable,key:we,id:xe})),[xe]),o.useEffect(()=>{Ce!==Ue.current.disabled&&(Le({type:ct.SetDroppableDisabled,id:xe,key:we,disabled:Ce}),Ue.current.disabled=Ce)},[xe,we,Ce,Le]),{active:Ee,rect:$e,isOver:Ve?.id===xe,node:re,over:Ve,setNodeRef:j}}({id:d,data:S,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...p}}),{active:Z,activatorEvent:_,activeNodeRect:P,attributes:V,setNodeRef:$,listeners:oe,isDragging:L,over:z,setActivatorNodeRef:K,transform:W}=$i({id:d,data:S,attributes:{...ca,...n},disabled:y.draggable}),ge=function(){for(var de=arguments.length,me=new Array(de),Ce=0;Ce<de;Ce++)me[Ce]=arguments[Ce];return o.useMemo(()=>xe=>{me.forEach(Me=>Me(xe))},me)}(F,$),ae=!!Z,Q=ae&&!q&&En(f)&&En(D),X=!G&&L,be=X&&Q?W:null,ke=Q?be??(m??U)({rects:A,activeNodeRect:P,activeIndex:f,overIndex:D,index:B}):null,ve=En(f)&&En(D)?l({id:d,items:x,activeIndex:f,overIndex:D}):B,Pe=Z?.id,he=o.useRef({activeId:Pe,items:x,newIndex:ve,containerId:h}),He=x!==he.current.items,Se=t({active:Z,containerId:h,isDragging:L,isSorting:ae,id:d,index:B,items:x,newIndex:he.current.newIndex,previousItems:he.current.items,previousContainerId:he.current.containerId,transition:g,wasDragging:he.current.activeId!=null}),ce=function(de){let{disabled:me,index:Ce,node:xe,rect:Me}=de;const[we,Ee]=o.useState(null),Le=o.useRef(Ce);return St(()=>{if(!me&&Ce!==Le.current&&xe.current){const Ve=Me.current;if(Ve){const C=Zt(xe.current,{ignoreTransform:!0}),Ue={x:Ve.left-C.left,y:Ve.top-C.top,scaleX:Ve.width/C.width,scaleY:Ve.height/C.height};(Ue.x||Ue.y)&&Ee(Ue)}}Ce!==Le.current&&(Le.current=Ce)},[me,Ce,xe,Me]),o.useEffect(()=>{we&&Ee(null)},[we]),we}({disabled:!Se,index:B,node:O,rect:k});return o.useEffect(()=>{ae&&he.current.newIndex!==ve&&(he.current.newIndex=ve),h!==he.current.containerId&&(he.current.containerId=h),x!==he.current.items&&(he.current.items=x)},[ae,ve,h,x]),o.useEffect(()=>{if(Pe===he.current.activeId)return;if(Pe!=null&&he.current.activeId==null)return void(he.current.activeId=Pe);const de=setTimeout(()=>{he.current.activeId=Pe},50);return()=>clearTimeout(de)},[Pe]),{active:Z,activeIndex:f,attributes:V,data:S,rect:k,index:B,newIndex:ve,items:x,isOver:E,isSorting:ae,isDragging:L,listeners:oe,node:O,overIndex:D,over:z,setNodeRef:ge,setActivatorNodeRef:K,setDroppableNodeRef:F,setDraggableNodeRef:$,transform:ce??ke,transition:function(){if(ce||He&&he.current.newIndex===B)return da;if(!(X&&!Un(_)||!g)&&(ae||Se))return Lt.Transition.toString({...g,property:il})}()}}function Vn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ga=[Ye.Down,Ye.Right,Ye.Up,Ye.Left],ha=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:d,scrollableAncestors:m}}=t;if(ga.includes(e.code)){if(e.preventDefault(),!n||!i)return;const p=[];l.getEnabled().forEach(h=>{if(!h||h!=null&&h.disabled)return;const f=a.get(h.id);if(f)switch(e.code){case Ye.Down:i.top<f.top&&p.push(h);break;case Ye.Up:i.top>f.top&&p.push(h);break;case Ye.Left:i.left>f.left&&p.push(h);break;case Ye.Right:i.left<f.left&&p.push(h)}});const g=(h=>{let{collisionRect:f,droppableRects:T,droppableContainers:q}=h;const A=Jo(f),D=[];for(const G of q){const{id:U}=G,y=T.get(U);if(y){const B=Jo(y),S=A.reduce((k,O,E)=>k+Or(B[E],O),0),w=Number((S/4).toFixed(4));D.push({id:U,data:{droppableContainer:G,value:w}})}}return D.sort(jr)})({collisionRect:i,droppableRects:a,droppableContainers:p});let x=Br(g,"id");if(x===d?.id&&g.length>1&&(x=g[1].id),x!=null){const h=l.get(n.id),f=l.get(x),T=f?a.get(f.id):null,q=f?.node.current;if(q&&T&&h&&f){const A=Kn(q).some((B,S)=>m[S]!==B),D=hr(h,f),G=function(B,S){return!Vn(B)||!Vn(S)||!hr(B,S)?!1:B.data.current.sortable.index<S.data.current.sortable.index}(h,f),U=A||!D?{x:0,y:0}:{x:G?i.width-T.width:0,y:G?i.height-T.height:0},y={x:T.left,y:T.top};return U.x&&U.y?y:fn(y,U)}}}};function hr(e,t){return!(!Vn(e)||!Vn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ma=e=>{let{transform:t}=e;return{...t,y:0}},al=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:d,editable:m,selectedIndex:p,background:g,activeColor:x,borderColor:h,borderWidth:f,dragging:T,...q}=e;return c.jsxs("div",{ref:t,className:bt(a),style:{...i,display:"flex",flexDirection:"column",background:p===l?"white":g,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:p===l?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...q,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:p===l?"0px":"-1px",marginTop:p===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,p===l?c.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):c.jsx(c.Fragment,{})]}),c.jsx("div",{style:{flex:"1 1 100%",background:p===l&&x?x?.toCSS():"none",minHeight:"2px"}})]})})),qt={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"},Mo=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:d,index:m,listeners:p,onRemove:g,renderItem:x,sorting:h,style:f,transition:T,transform:q,value:A,wrapperStyle:D,...G},U)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const y=x?x({dragOverlay:!!t,dragging:!!n,sorting:!!h,index:m,fadeIn:!!a,listeners:p,ref:U,style:f,transform:q,transition:T,value:A}):c.jsx(c.Fragment,{children:A});return c.jsx("div",{className:bt("tab-item",qt.Wrapper,a&&qt.fadeIn,h&&qt.sorting,t&&qt.dragOverlay),style:{...D,transition:[T,D?.transition].filter(Boolean).join(", "),"--translate-x":q?`${Math.round(q.x)}px`:void 0,"--translate-y":q?`${Math.round(q.y)}px`:void 0,"--scale-x":q?.scaleX?`${q.scaleX}`:void 0,"--scale-y":q?.scaleY?`${q.scaleY}`:void 0,"--index":m},ref:U,children:c.jsx("div",{className:bt(qt.Item,n&&qt.dragging,l&&qt.withHandle,t&&qt.dragOverlay,i&&qt.disabled,e&&qt.color,"dragging"),style:f,"data-cypress":"draggable-item",...l?void 0:p,...G,tabIndex:l?void 0:-1,children:y})})})),mr={Row:"_Row_1kr10_1"},sl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:bt(mr.Row,t&&mr.horizontal),children:e}))),fa={...ol},pa=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:d=wi,coordinateGetter:m=ha,dropAnimation:p=fa,getItemStyles:g=()=>({}),getNewIndex:x,handle:h=!1,items:f,onMove:T,isDisabled:q=()=>!1,measuring:A,modifiers:D,renderItem:G,renderDivider:U,reorderItems:y=Ro,strategy:B=ko,style:S,useDragOverlay:w=!0,onDragStart:k,wrapperStyle:O=()=>({})}=e,[E,F]=o.useState(()=>f);o.useEffect(()=>{F(f)},[f]);const[Z,_]=o.useState(null),P=function(){for(var z=arguments.length,K=new Array(z),W=0;W<z;W++)K[W]=arguments[W];return o.useMemo(()=>[...K].filter(ge=>ge!=null),[...K])}(io(Xr,{activationConstraint:i}),io(Yr,{activationConstraint:i}),io(qo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:m})),V=E.indexOf.bind(E),$=Z?V(Z):-1,oe=[];E.map((z,K)=>{oe.push(c.jsx(va,{id:z,handle:h,index:K,style:g,wrapperStyle:O,disabled:q(z),renderItem:G,animateLayoutChanges:a,useDragOverlay:w,getNewIndex:x},z+"-"+K));const W=U?.({key:"divider-"+K});W&&oe.push(W)});const{getPortalContainer:L}=r.useFullscreenPortal();return c.jsxs(Ui,{sensors:P,collisionDetection:d,onDragStart:z=>{const{active:K}=z;K&&(k?.(z),_(K.id))},autoScroll:{canScroll:z=>!0},onDragEnd:z=>{if(_(null),z.over){const K=V(z.over.id);$!==K&&(F(W=>y(W,$,K)),T?.($,K))}},onDragCancel:()=>{_(null)},measuring:A,modifiers:D,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...S},className:bt(n,qt.Wrapper),children:c.jsx(la,{items:E,strategy:B,children:c.jsx(sl,{ref:t,children:oe})})}),w?zt.createPortal(c.jsx(na,{adjustScale:l,dropAnimation:p,children:Z?c.jsx(Mo,{value:E[$],handle:h,renderItem:G,wrapperStyle:O({index:$,isDragging:!0,id:E[$]}),index:$,dragging:!0,style:g({id:E[$],index:$,isSorting:Z!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),L()):null]})}));function va({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:d,style:m,renderItem:p,useDragOverlay:g,wrapperStyle:x}){const{attributes:h,isDragging:f,isSorting:T,listeners:q,overIndex:A,setNodeRef:D,transform:G,transition:U}=ua({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(Mo,{ref:D,value:a,disabled:e,dragging:f,sorting:T,handle:i,renderItem:p,index:l,style:m({index:l,id:a,isDragging:f,isSorting:T,overIndex:A}),onRemove:d?()=>d(a):void 0,transform:G,transition:U,wrapperStyle:x({index:l,isDragging:f,id:a}),listeners:q,"data-index":l,"data-id":a,dragOverlay:!g&&f,...h})}const Ca="_TabStrip_3x0dp_1",ba=new s.Color("rgb(33, 115, 70)"),wa="#eee",ya=e=>c.jsx(al,{...e}),dl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:d=[],onSelectedTabIndexChange:m,onTabNameChange:p,onTabMove:g,createScrollStartButton:x=r.defaultCreateScrollStartButton,createScrollEndButton:h=r.defaultCreateScrollEndButton,createScrollEdgeButton:f=r.defaultCreateScrollEdgeButton,createTabButton:T=ya,createTabDivider:q,editLabelProps:A,disabled:D=!1,disableDrag:G=!1,background:U="white",activeColor:y=ba,borderColor:B=wa,borderWidth:S=1}=e,[w,k]=o.useState(l),[O,E]=o.useState(d),F=o.useCallback(we=>{const Ee=L.current?.[we]?.closest(".tab-item")??L.current?.[we];Ee&&X.current?.scrollTo({top:Ee.offsetTop,left:Ee.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{F(l)},[l]);const Z=o.useCallback((we,Ee)=>{Ee!==w&&(k(Ee),m?.(Ee)),F(Ee)},[m,w]),_=o.useCallback((we,Ee)=>{g?.(we,Ee)},[g]),P=o.useRef(null),[V,$]=o.useState(-1),oe=o.useCallback((we,Ee)=>{p?.(we,Ee)},[p]);o.useLayoutEffect(()=>{k(l)},[l]),o.useLayoutEffect(()=>{E(d)},[d]);const L=o.useRef([]),z=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(we){L.current?.[we]?.startEdit()},cancel(we){L.current?.[we]?.cancel()}},z.current),[w,V]);const K=o.useCallback(({value:we,index:Ee,dragging:Le})=>{const{style:Ve,maxLength:C,...Ue}=A||{},Qe=c.jsx(Dr,{ref:$e=>{L.current[Ee]=$e},value:we,disabled:D,maxLength:C,style:{color:w===Ee&&y?y?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...Ve},styleHover:{},onSubmit:$e=>(P.current=!1,$(-1),oe(Ee,$e)),onCancel:()=>{P.current=!1,$(-1)},onChange:$e=>{P.current=!0,$(Ee)},...Ue});return T({onClick:$e=>Z($e,Ee),value:we,index:Ee,editing:V===Ee&&P.current,editable:!0,disabled:D,selectedIndex:w,background:U,activeColor:y,borderColor:B,borderWidth:S,dragging:Le,children:Qe})},[w,oe,Z,A,D,V,T]),[W,{width:ge}]=Nt(),[ae,{width:Q}]=Nt(),X=o.useRef(null),[be,ke]=o.useState({left:0,top:0,width:0,height:0}),[ve,Pe]=o.useState(null);o.useEffect(()=>{ve!==null&&X.current&&X.current.scrollTo({left:ve,behavior:"smooth"})},[ve]);const he=o.useCallback((we,Ee=!1)=>{if(!X.current)return 0;let Le=X.current.firstChild.getBoundingClientRect(),Ve=X.current.firstChild.firstChild.children,C=0;return C=Ee?0:r.ScrollUtils.getScrollTo(we,Le.left,Ve,!0,Math.max(0,we-200)),Pe(C),Math.max(0,C)},[]),He=o.useCallback((we,Ee=!1)=>{if(!X.current)return 0;let Le=X.current.firstChild.getBoundingClientRect(),Ve=X.current.firstChild.firstChild.children,C=0;const Ue=Math.ceil(Q-ge);return C=Ee?Ue:r.ScrollUtils.getScrollTo(we,Le.left,Ve,!1,Math.max(0,we+200)),Pe(C),Math.min(Ue,C)},[Q,ge]),Se=o.useRef(null),ce=o.useRef(null),de=o.useCallback(()=>{ce.current&&(clearTimeout(ce.current),ce.current=null,Se.current=null)},[]),me=o.useCallback((we,Ee,Le=260)=>{Se.current=we,ce.current=setTimeout(()=>{const Ve=Ee?he(Se.current||we):He(Se.current||we);Ve!==Se.current?me(Ve,Ee,120):de()},Le)},[he,He,de]);o.useEffect(()=>()=>de(),[de]);const Ce=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(be.left)<=0||Math.floor(Q-ge)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:de,onMouseLeave:de,onMouseDown:()=>me(X.current.scrollLeft,!0),onClick:we=>he(Math.min(X.current.scrollLeft,ve??Number.MAX_SAFE_INTEGER),we.ctrlKey)}),[be,ve,Q,ge]),xe=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(Q-ge)<=Math.ceil(be.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:de,onMouseLeave:de,onMouseDown:()=>me(X.current.scrollLeft,!1),onClick:we=>He(Math.max(X.current.scrollLeft,ve??0),we.ctrlKey)}),[be,ve,Q,ge]),Me=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,f?.(Ce)]}),[Ce,xe,x,h,n,f]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:bt(Ca,a),ref:z,children:[c.jsx("div",{style:{borderTop:`solid ${B} ${S}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Me}),c.jsx("div",{className:"Tabs",ref:W,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:c.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:X,onScroll:we=>{ke({left:we.target.scrollLeft,top:we.target.scrollTop,width:we.target.scrollWidth,height:we.target.scrollHeight})},children:c.jsx(pa,{isDisabled:we=>D||G,items:O,strategy:ra,modifiers:[ma],ref:ae,renderItem:K,renderDivider:q,onMove:_,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:f(xe)})]})}));dl.displayName="TabStrip";const Dn=o.createContext(null);Dn.displayName="DocThemesContext";const xa="_script-editor_iy654_5",qa=o.lazy(()=>Promise.resolve().then(()=>require("./DkQ3go6MSBUQhnPx.cjs"))),Sa={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"};let ln,an,Et=["define","require"];const fr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),d=await l.getNavigationTree(i.uri.toString()),m=e.getPosition();let p={...m};p.lineNumber=1,p.column=1;let g=!1;for(let A=m.lineNumber;A>=1;A--)if(i.getLineContent(A).trim()===""){const D=To(d,i.getOffsetAt({lineNumber:A,column:1}),"function");if(!D||ka(D)){g=!0,p.lineNumber=A+1;break}{const G=D.spans[0].start;A=i.getPositionAt(G).lineNumber,p.lineNumber=A}}let x=n,h=!1;!g&&!x.startsWith(`
|
|
28
28
|
`)&&p.lineNumber>1&&(x=`
|
|
29
29
|
`+x,h=!0);let f=!1;i.getLineCount()>1&&(x.endsWith(`
|
|
30
30
|
|
|
31
31
|
`)||(x+=`
|
|
32
32
|
|
|
33
|
-
`,f=!0));const T=[{range:new t.Range(p.lineNumber,p.column,p.lineNumber,p.column),text:`${x}`}];let q=null;i.pushEditOperations([],T,A=>(q=A[0].range,h&&q.startLineNumber++,f&&q.endLineNumber--,[new t.Selection(q.startLineNumber,q.startColumn,q.endLineNumber,q.endColumn)])),e.setSelection({startLineNumber:q.endLineNumber,startColumn:q.endColumn,endLineNumber:q.startLineNumber,endColumn:q.startColumn})};function Ra(e,t){let n=null;for(let i=0;!n&&i<e.length;i++){const a=e[i];a.getName()===t.text&&(n=a)}return n?n.getContext():"formula"}function Co(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,d=e.getPositionAt(l);a.push({name:i.text,type:Ra(n,i),lineNumber:d.lineNumber})}if(i.childItems)for(const l of i.childItems)Co(e,t,n,l,a);return a}function To(e,t,n="function",i){const a=e.spans;for(let l=0;l<a.length;l++){const d=a[l];if(d.start<=t&&t<d.start+d.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const m of e.childItems||[]){const p=To(m,t,n,i);if(p)return p}}return null}}function ka(e){return e.kind==="comment"}const Ma=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,onClose:d,darkMode:m,loadingPanel:p,autoFocus:g=!0,onStatusChange:x,...h}=e,f=o.useRef(null),T=r.useCallbackRef(d,[d]),q=o.useRef(!1),A=o.useMemo(()=>({contains(K){if(!f.current)return;const W=f.current.editor;return W&&W.getDomNode()?.contains(K)},focus(){if(!f.current)return;const K=f.current.editor;return K&&K.getDomNode()?.focus()}}),[]),D=o.useMemo(()=>[new r.Command("help",A,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),G=o.useMemo(()=>{let K=null;const W=()=>A;return K=a?a.createChildGroup(W,"scriptEditor",!1):new r.CommandGroup(W,"scriptEditor"),K.addCommands(D,!0),K},[a,D]),U=r.useCommands(G,["executeSelectedScript"])[0],y=U?.context(),B=r.useCallbackRef(K=>{U?.execute(K)},[U]),S=o.useRef(""),[w,k]=o.useState(!1),O=r.useCallbackRef(async()=>{if(!f.current)return null;const K=f.current,W=K.editor;if(!W)return null;const ge=K.monaco,ae=await(async(Q,X,be="export")=>{const ke=Q.getModel();if(!ke)return null;const ve=await X.languages.typescript.getTypeScriptWorker(),Pe=await ve(ke.uri),he=await Pe.getNavigationTree(ke.uri.toString());let He=null,Se=Q.getSelection();const ce=Se.startLineNumber===Se.endLineNumber&&Se.startColumn===Se.endColumn?ke.getLineCount():Math.min(Se.endLineNumber,ke.getLineCount());for(let de=Se.startLineNumber;!He&&de<=ce;de++){const me=To(he,ke.getOffsetAt({lineNumber:de,column:1}),"function",be);me&&(He=me.text)}return He})(W,ge);return x?.({message:(ae??"").toUpperCase()}),ae?{source:W.getValue(),name:ae}:null},[x]),E=r.useCallbackRef(async(K,W,ge)=>{const ae=await y.getScripts().createModule({source:ge?.getValue(),declarationsOnly:!0}),Q=ae?ae.getFunctions().getItems():ue.CommonUtils.EmptyArray;ae&&(async function(X,be){const ke=[];for(let ve=1;ve<X.getLineCount()+1;ve++){const Pe={startLineNumber:ve,startColumn:1,endLineNumber:ve,endColumn:X.getLineLength(ve)+1},he=X.getValueInRange(Pe).indexOf("modelt");he!==-1&&ke.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:be.MarkerSeverity.Hint,startLineNumber:Pe.startLineNumber,startColumn:he+1,endLineNumber:Pe.startLineNumber,endColumn:he+5})}be.editor.setModelMarkers(X,"owner",ke)}(K,W),async function(X,be,ke,ve){const Pe=await be.languages.typescript.getTypeScriptWorker(),he=await Pe(X.uri),He=await he.getNavigationTree(X.uri.toString()),Se=Co(X,be,ve,He).map(ce=>{let de=null,me=null;return ce.type==="formula"?(de="formula.margin-icon",me="Formula"):ce.type==="macro"?(de="macro.margin-icon",me="Macro"):ce.type==="autoRun"&&(de="autorun.margin-icon",me="Auto Run"),{range:new be.Range(ce.lineNumber,1,ce.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:de,glyphMarginHoverMessage:{value:me},stickiness:be.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});V.current&&V.current.clear(),V.current=ke.createDecorationsCollection(Se)}(K,W,ge,Q))},[y]),F=r.useCallbackRef(ue.CommonUtils.debounce(E,580),[]),Z=r.useCallbackRef(async(K=void 0)=>{if(!f.current||!y)return;const W=f.current.editor.getPosition(),ge={cursor:W?W.toString():""};K!==void 0&&(ge.message=K),x?.(ge);const ae=O();y.setSelectedFunction(ae)},[y,x]),_=o.useRef(null);o.useEffect(()=>{if(!y)return;const K={insertSnippet:ge=>{f.current?.editor&&(w?fr(f.current.editor,f.current.monaco,ge):S.current=ge)}};y.setEditor(K),y.setSelectedFunction(O());const W=y.addContainerListener({onBeforeSave:async()=>{if(!f.current?.editor||!y)return;const ge=f.current.editor,ae=y?.getScripts().getModules().getByName("scripting"),Q=ae?.getSource(),X=ge.getValue();if(!((Q?.length??0)!==X.length||Q!==X))return;await y.saveSource(ge.getValue());const be=(Q?.length??0)!==X.length||Q!==X;x?.({dirty:be})},onReadonlyChange(){},onScriptChange:async()=>{if(!f.current?.editor||!y)return;const ge=f.current.editor,ae=y.getScripts().getModules().getItems()[0]?.getSource()??"";ge.setValue(ae)}});return()=>{W(),y.setSelectedFunction(null),y.setEditor(null);const ge=_.current;if(ge){ge.dispose();const ae=ge.debounceTimer;ae!==void 0&&clearTimeout(ae),_.current=null}}},[y,w]),o.useEffect(()=>()=>{if(!f.current?.editor)return;const K=f.current.editor;y?.saveSource(K.getValue())},[]);const P=r.useCallbackRef(K=>{const W=f.current;if(!W)return!1;const ge=W.editor;return!!ge&&(ge.focus(),!0)},[]),V=o.useRef(null),$=r.useCallbackRef((K,W)=>{f.current={monaco:W,editor:K},k(!0),Z("Loading Types");const ge=y.getScripts().getModules().getItems()[0]?.getSource()??"";K.setValue(ge),Promise.resolve().then(()=>require("./Cyh9Bap4TpoyCtJH.cjs")).then(Q=>Q.customEditor).then(async Q=>{Z(""),Q.AutoTypings.create(K,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:W,onUpdate:(X,be)=>{if(X.type==="LookedUpPackage"&&X.success!==void 0){const ke=W.languages.typescript.typescriptDefaults.getDiagnosticsOptions();W.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...ke,diagnosticCodesToIgnore:[]})}},onError:X=>{X==="Not implemented yet"&&(X="Compile Errors"),console.warn("Error compiling types",X)}}).then(X=>{_.current=X;const be=K.getModel();F(be,W,K)})}),K.addCommand("executeScript",function(Q,...X){X?.[0]&&B({functionName:X?.[0]})},""),K.addAction({id:"executeScript",label:"Execute",keybindings:[W.KeyCode.F8],run:async Q=>{const X=O();y.setSelectedFunction(X);const be=await X;B(be)}}),K.addAction({id:"saveScript",label:"Save Script",keybindings:[W.KeyMod.CtrlCmd|W.KeyCode.KeyS],run:Q=>{y?.saveSource(K.getValue()).then(()=>{const X=y?.getScripts().getModules().getByName("scripting"),be=X?.getSource(),ke=K.getValue(),ve=(be?.length??0)!==ke.length||be!==ke;x?.({dirty:ve})})}}),K.onMouseDown(async Q=>{if(Q.target.type===W.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const X=Q.target.position.lineNumber,be=await W.languages.typescript.getTypeScriptWorker(),ke=await be(ae.uri),ve=await ke.getNavigationTree(ae.uri.toString()),Pe=K?.getValue(),he=(await y?.saveSource(Pe)).getFunctions().getItems(),He=Co(ae,W,he,ve).find(Se=>Se.lineNumber===X);if(He){const Se=Q.event.browserEvent.button;Se===0?He.type==="macro"||He.type==="autoRun"?B({functionName:He.name}):He.type==="formula"&&y.quickInsertFunction?.(He.name):Se===2&&(console.log("Context menu for function:",He.name),Q.event.browserEvent.preventDefault())}}}),K.onDidChangeModelContent(()=>{F(ae,W,K)}),W.editor.onDidChangeMarkers(Q=>{Q.some(X=>X.toString()===ae.uri.toString())});const ae=K.getModel();(function(Q,X){X.languages.registerInlayHintsProvider("typescript",{provideInlayHints(be,ke,ve){const Pe=[];for(let he=1;he<be.getLineCount()+1;he++){const He={startLineNumber:he,startColumn:1,endLineNumber:he,endColumn:be.getLineLength(he)+1},Se="hint",ce=be.getValueInRange(He).indexOf("hint");ce!==-1&&Pe.push({kind:X.languages.InlayHintKind.Type,position:{lineNumber:He.startLineNumber,column:ce+Se.length+1},label:"[hint]"})}return{hints:Pe,dispose:()=>{}}}})})(0,W),ae.onDidChangeContent(Q=>{const X=y?.getScripts().getModules().getByName("scripting"),be=X?.getSource(),ke=K.getValue(),ve=(be?.length??0)!==ke.length||be!==ke;x?.({dirty:ve})}),K.onDidChangeCursorPosition(Q=>{Z()})},[y,x]),oe=o.useMemo(()=>w?null:p||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[w,p]),L=o.useMemo(()=>{if(!w){if(!ln){ln={};for(let W=0;W<Et.length;W++){const ge=Et[W];ln[ge]=globalThis[ge]}}if(an)for(let W=0;W<Et.length;W++){const ge=Et[W];globalThis[ge]=an[ge]}}const K=y?.getScripts().getModules().getByName("scripting")?.getSource()??"";return c.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[c.jsx(o.Suspense,{children:c.jsx(qa,{theme:m?"extended-dark":"extended",options:{...Sa,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:K,onValidate:W=>{let ge=!1;for(let ae=0;!ge&&ae<W?.length;ae++)W[ae].severity===8&&(ge=!0)},beforeMount:W=>{W.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),W.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),W.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),W.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let ge=!1,ae=!1;try{const Q=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),X=W.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let be=W.editor.getModel(X);be?ae=!0:be=W.editor.createModel(Q,"typescript",X),W.editor.setModelMarkers(be,"default",[]),ge=!0}catch(Q){console.warn("cant load types",Q)}if(!ae){W.languages.registerLinkProvider("*",{provideLinks:(X,be)=>{const ke=[],ve={links:ke},Pe=X.getLinesContent();for(let he=1;he<=Pe.length;he++){const He=Pe[he-1],Se=W.editor.tokenize(He,"typescript");for(let ce=0;ce<Se[0].length;ce++){const de=Se[0]?.[ce];if(de&&de.type.startsWith("string")){let me=de.offset,Ce=Se[0]?.[ce+1]?.offset??He.length,xe=new W.Range(he,me+1,he,Ce+1),Me=X.getValueInRange(xe);const we=Me[0];we!=="`"&&we!=="'"&&we!=='"'||(me++,Me=Me.substring(1));const Ee=Me[Me.length-1];Ee!=="`"&&Ee!=="'"&&Ee!=='"'||(me++,Me=Me.substring(0,Me.length-1));try{y.getRanges(Me)&&ke.push({range:{endColumn:Ce,endLineNumber:he,startColumn:me,startLineNumber:he},tooltip:`Goto range '${Me}'`,url:`/range/${Me}`})}catch(Le){console.warn(Le)}}}}return ve}}),W.editor.registerLinkOpener({open(X){if(X?.path?.startsWith("/range/")){try{y.getRanges(X.path.substring(7))?.select()}catch(be){console.warn("invalid range",be)}return!0}return!1}});const Q=W.languages.typescript.typescriptDefaults.getCompilerOptions();W.languages.typescript.typescriptDefaults.setCompilerOptions({...Q,target:W.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:W.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(S.current&&(await fr(f.current.editor,f.current.monaco,S.current),S.current=null),q.current&&requestAnimationFrame(async()=>{q.current&&W.editor.focus()}),!an){an={};for(let Q=0;Q<Et.length;Q++){const X=Et[Q];an[X]=globalThis[X]}}(()=>{const Q=(X,be)=>{try{if(be===void 0)try{delete globalThis[X]}catch{try{globalThis[X]=void 0}catch{}}else globalThis[X]=be}catch{}};for(let X=0;X<Et.length;X++){const be=Et[X];Q(be,ln[be])}ln=void 0})(),k(!0)})()},onMount:$})}),oe]})},[y,G,l,oe,m]),z=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:K=>{P(K)},close:()=>{T?.()},getEditor:()=>y?.getEditor()}),[y]);return o.useEffect(()=>(g&&requestAnimationFrame(()=>{P()}),()=>{f.current?.editor&&requestAnimationFrame(()=>{z.current?.contains(document.activeElement)&&P()})}),[]),c.jsx("div",{className:bt("script-editor",xa,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:z,...h,children:L})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>s.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.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"}),c.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"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.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=si,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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.CommandContext=ai,exports.CornerTriangle=go,exports.DateUtils=vl,exports.DocThemesContext=Dn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Dn.Provider,{value:t,children:n})},exports.EditableLabel=Dr,exports.EmptyFrame=Jl,exports.FilterButton=vr,exports.FontUtils=Cl,exports.Item=Mo,exports.LogoNoPaddingIcon=e=>c.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[c.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"}),c.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"}),c.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"}),c.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=Sr,exports.MovableArea=Mr,exports.PictureEditor=Ar,exports.Row=sl,exports.ScriptEditor=Ma,exports.SheetCellEditor=br,exports.SheetCellRenderer=Cr,exports.SheetElement=Fr,exports.SheetScrollbar=wo,exports.StaticBorderRenderer=Tl,exports.StyledStrokePath=yr,exports.Tab=al,exports.TabStrip=dl,exports.createCellEditStateFromCell=wr,exports.useBordersOverlay=bo,exports.useDocThemes=()=>{const e=o.useContext(Dn),[t]=o.useState(()=>new s.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=Tr,exports.useRangeListener=(e,t,n,i)=>{const a=o.useRef(n);a.current=n;const l=i?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const p={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(p)}const d=p=>{a.current?.(p)},m=e.getRange(t).addListener(d,i);if(l){const p=e.getRange(t);d({getSource:()=>p,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{m?.()}},[e,t])},exports.useSheetCommands=Rr,exports.useSheetCopyPaste=kr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
|
|
33
|
+
`,f=!0));const T=[{range:new t.Range(p.lineNumber,p.column,p.lineNumber,p.column),text:`${x}`}];let q=null;i.pushEditOperations([],T,A=>(q=A[0].range,h&&q.startLineNumber++,f&&q.endLineNumber--,[new t.Selection(q.startLineNumber,q.startColumn,q.endLineNumber,q.endColumn)])),e.setSelection({startLineNumber:q.endLineNumber,startColumn:q.endColumn,endLineNumber:q.startLineNumber,endColumn:q.startColumn})};function Ra(e,t){let n=null;for(let i=0;!n&&i<e.length;i++){const a=e[i];a.getName()===t.text&&(n=a)}return n?n.getContext():"formula"}function Co(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,d=e.getPositionAt(l);a.push({name:i.text,type:Ra(n,i),lineNumber:d.lineNumber})}if(i.childItems)for(const l of i.childItems)Co(e,t,n,l,a);return a}function To(e,t,n="function",i){const a=e.spans;for(let l=0;l<a.length;l++){const d=a[l];if(d.start<=t&&t<d.start+d.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const m of e.childItems||[]){const p=To(m,t,n,i);if(p)return p}}return null}}function ka(e){return e.kind==="comment"}const Ma=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,onClose:d,darkMode:m,loadingPanel:p,autoFocus:g=!0,onStatusChange:x,...h}=e,f=o.useRef(null),T=r.useCallbackRef(d,[d]),q=o.useRef(!1),A=o.useMemo(()=>({contains(K){if(!f.current)return;const W=f.current.editor;return W&&W.getDomNode()?.contains(K)},focus(){if(!f.current)return;const K=f.current.editor;return K&&K.getDomNode()?.focus()}}),[]),D=o.useMemo(()=>[new r.Command("help",A,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),G=o.useMemo(()=>{let K=null;const W=()=>A;return K=a?a.createChildGroup(W,"scriptEditor",!1):new r.CommandGroup(W,"scriptEditor"),K.addCommands(D,!0),K},[a,D]),U=r.useCommands(G,["executeSelectedScript"])[0],y=U?.context(),B=r.useCallbackRef(K=>{U?.execute(K)},[U]),S=o.useRef(""),[w,k]=o.useState(!1),O=r.useCallbackRef(async()=>{if(!f.current)return null;const K=f.current,W=K.editor;if(!W)return null;const ge=K.monaco,ae=await(async(Q,X,be="export")=>{const ke=Q.getModel();if(!ke)return null;const ve=await X.languages.typescript.getTypeScriptWorker(),Pe=await ve(ke.uri),he=await Pe.getNavigationTree(ke.uri.toString());let He=null,Se=Q.getSelection();const ce=Se.startLineNumber===Se.endLineNumber&&Se.startColumn===Se.endColumn?ke.getLineCount():Math.min(Se.endLineNumber,ke.getLineCount());for(let de=Se.startLineNumber;!He&&de<=ce;de++){const me=To(he,ke.getOffsetAt({lineNumber:de,column:1}),"function",be);me&&(He=me.text)}return He})(W,ge);return x?.({message:(ae??"").toUpperCase()}),ae?{source:W.getValue(),name:ae}:null},[x]),E=r.useCallbackRef(async(K,W,ge)=>{const ae=await y.getScripts().createModule({source:ge?.getValue(),declarationsOnly:!0}),Q=ae?ae.getFunctions().getItems():ue.CommonUtils.EmptyArray;ae&&(async function(X,be){const ke=[];for(let ve=1;ve<X.getLineCount()+1;ve++){const Pe={startLineNumber:ve,startColumn:1,endLineNumber:ve,endColumn:X.getLineLength(ve)+1},he=X.getValueInRange(Pe).indexOf("modelt");he!==-1&&ke.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:be.MarkerSeverity.Hint,startLineNumber:Pe.startLineNumber,startColumn:he+1,endLineNumber:Pe.startLineNumber,endColumn:he+5})}be.editor.setModelMarkers(X,"owner",ke)}(K,W),async function(X,be,ke,ve){const Pe=await be.languages.typescript.getTypeScriptWorker(),he=await Pe(X.uri),He=await he.getNavigationTree(X.uri.toString()),Se=Co(X,be,ve,He).map(ce=>{let de=null,me=null;return ce.type==="formula"?(de="formula.margin-icon",me="Formula"):ce.type==="macro"?(de="macro.margin-icon",me="Macro"):ce.type==="autoRun"&&(de="autorun.margin-icon",me="Auto Run"),{range:new be.Range(ce.lineNumber,1,ce.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:de,glyphMarginHoverMessage:{value:me},stickiness:be.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});V.current&&V.current.clear(),V.current=ke.createDecorationsCollection(Se)}(K,W,ge,Q))},[y]),F=r.useCallbackRef(ue.CommonUtils.debounce(E,580),[]),Z=r.useCallbackRef(async(K=void 0)=>{if(!f.current||!y)return;const W=f.current.editor.getPosition(),ge={cursor:W?W.toString():""};K!==void 0&&(ge.message=K),x?.(ge);const ae=O();y.setSelectedFunction(ae)},[y,x]),_=o.useRef(null);o.useEffect(()=>{if(!y)return;const K={insertSnippet:ge=>{f.current?.editor&&(w?fr(f.current.editor,f.current.monaco,ge):S.current=ge)}};y.setEditor(K),y.setSelectedFunction(O());const W=y.addContainerListener({onBeforeSave:async()=>{if(!f.current?.editor||!y)return;const ge=f.current.editor,ae=y?.getScripts().getModules().getByName("scripting"),Q=ae?.getSource(),X=ge.getValue();if(!((Q?.length??0)!==X.length||Q!==X))return;await y.saveSource(ge.getValue());const be=(Q?.length??0)!==X.length||Q!==X;x?.({dirty:be})},onReadonlyChange(){},onScriptChange:async()=>{if(!f.current?.editor||!y)return;const ge=f.current.editor,ae=y.getScripts().getModules().getItems()[0]?.getSource()??"";ge.setValue(ae)}});return()=>{W(),y.setSelectedFunction(null),y.setEditor(null);const ge=_.current;if(ge){ge.dispose();const ae=ge.debounceTimer;ae!==void 0&&clearTimeout(ae),_.current=null}}},[y,w]),o.useEffect(()=>()=>{if(!f.current?.editor)return;const K=f.current.editor;y?.saveSource(K.getValue())},[]);const P=r.useCallbackRef(K=>{const W=f.current;if(!W)return!1;const ge=W.editor;return!!ge&&(ge.focus(),!0)},[]),V=o.useRef(null),$=r.useCallbackRef((K,W)=>{f.current={monaco:W,editor:K},k(!0),Z("Loading Types");const ge=y.getScripts().getModules().getItems()[0]?.getSource()??"";K.setValue(ge),Promise.resolve().then(()=>require("./Dc9ZsVsB8QvyqXD9.cjs")).then(Q=>Q.customEditor).then(async Q=>{Z(""),Q.AutoTypings.create(K,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:W,onUpdate:(X,be)=>{if(X.type==="LookedUpPackage"&&X.success!==void 0){const ke=W.languages.typescript.typescriptDefaults.getDiagnosticsOptions();W.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...ke,diagnosticCodesToIgnore:[]})}},onError:X=>{X==="Not implemented yet"&&(X="Compile Errors"),console.warn("Error compiling types",X)}}).then(X=>{_.current=X;const be=K.getModel();F(be,W,K)})}),K.addCommand("executeScript",function(Q,...X){X?.[0]&&B({functionName:X?.[0]})},""),K.addAction({id:"executeScript",label:"Execute",keybindings:[W.KeyCode.F8],run:async Q=>{const X=O();y.setSelectedFunction(X);const be=await X;B(be)}}),K.addAction({id:"saveScript",label:"Save Script",keybindings:[W.KeyMod.CtrlCmd|W.KeyCode.KeyS],run:Q=>{y?.saveSource(K.getValue()).then(()=>{const X=y?.getScripts().getModules().getByName("scripting"),be=X?.getSource(),ke=K.getValue(),ve=(be?.length??0)!==ke.length||be!==ke;x?.({dirty:ve})})}}),K.onMouseDown(async Q=>{if(Q.target.type===W.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const X=Q.target.position.lineNumber,be=await W.languages.typescript.getTypeScriptWorker(),ke=await be(ae.uri),ve=await ke.getNavigationTree(ae.uri.toString()),Pe=K?.getValue(),he=(await y?.saveSource(Pe)).getFunctions().getItems(),He=Co(ae,W,he,ve).find(Se=>Se.lineNumber===X);if(He){const Se=Q.event.browserEvent.button;Se===0?He.type==="macro"||He.type==="autoRun"?B({functionName:He.name}):He.type==="formula"&&y.quickInsertFunction?.(He.name):Se===2&&(console.log("Context menu for function:",He.name),Q.event.browserEvent.preventDefault())}}}),K.onDidChangeModelContent(()=>{F(ae,W,K)}),W.editor.onDidChangeMarkers(Q=>{Q.some(X=>X.toString()===ae.uri.toString())});const ae=K.getModel();(function(Q,X){X.languages.registerInlayHintsProvider("typescript",{provideInlayHints(be,ke,ve){const Pe=[];for(let he=1;he<be.getLineCount()+1;he++){const He={startLineNumber:he,startColumn:1,endLineNumber:he,endColumn:be.getLineLength(he)+1},Se="hint",ce=be.getValueInRange(He).indexOf("hint");ce!==-1&&Pe.push({kind:X.languages.InlayHintKind.Type,position:{lineNumber:He.startLineNumber,column:ce+Se.length+1},label:"[hint]"})}return{hints:Pe,dispose:()=>{}}}})})(0,W),ae.onDidChangeContent(Q=>{const X=y?.getScripts().getModules().getByName("scripting"),be=X?.getSource(),ke=K.getValue(),ve=(be?.length??0)!==ke.length||be!==ke;x?.({dirty:ve})}),K.onDidChangeCursorPosition(Q=>{Z()})},[y,x]),oe=o.useMemo(()=>w?null:p||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[w,p]),L=o.useMemo(()=>{if(!w){if(!ln){ln={};for(let W=0;W<Et.length;W++){const ge=Et[W];ln[ge]=globalThis[ge]}}if(an)for(let W=0;W<Et.length;W++){const ge=Et[W];globalThis[ge]=an[ge]}}const K=y?.getScripts().getModules().getByName("scripting")?.getSource()??"";return c.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[c.jsx(o.Suspense,{children:c.jsx(qa,{theme:m?"extended-dark":"extended",options:{...Sa,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:K,onValidate:W=>{let ge=!1;for(let ae=0;!ge&&ae<W?.length;ae++)W[ae].severity===8&&(ge=!0)},beforeMount:W=>{W.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),W.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),W.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),W.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let ge=!1,ae=!1;try{const Q=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),X=W.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let be=W.editor.getModel(X);be?ae=!0:be=W.editor.createModel(Q,"typescript",X),W.editor.setModelMarkers(be,"default",[]),ge=!0}catch(Q){console.warn("cant load types",Q)}if(!ae){W.languages.registerLinkProvider("*",{provideLinks:(X,be)=>{const ke=[],ve={links:ke},Pe=X.getLinesContent();for(let he=1;he<=Pe.length;he++){const He=Pe[he-1],Se=W.editor.tokenize(He,"typescript");for(let ce=0;ce<Se[0].length;ce++){const de=Se[0]?.[ce];if(de&&de.type.startsWith("string")){let me=de.offset,Ce=Se[0]?.[ce+1]?.offset??He.length,xe=new W.Range(he,me+1,he,Ce+1),Me=X.getValueInRange(xe);const we=Me[0];we!=="`"&&we!=="'"&&we!=='"'||(me++,Me=Me.substring(1));const Ee=Me[Me.length-1];Ee!=="`"&&Ee!=="'"&&Ee!=='"'||(me++,Me=Me.substring(0,Me.length-1));try{y.getRanges(Me)&&ke.push({range:{endColumn:Ce,endLineNumber:he,startColumn:me,startLineNumber:he},tooltip:`Goto range '${Me}'`,url:`/range/${Me}`})}catch(Le){console.warn(Le)}}}}return ve}}),W.editor.registerLinkOpener({open(X){if(X?.path?.startsWith("/range/")){try{y.getRanges(X.path.substring(7))?.select()}catch(be){console.warn("invalid range",be)}return!0}return!1}});const Q=W.languages.typescript.typescriptDefaults.getCompilerOptions();W.languages.typescript.typescriptDefaults.setCompilerOptions({...Q,target:W.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:W.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(S.current&&(await fr(f.current.editor,f.current.monaco,S.current),S.current=null),q.current&&requestAnimationFrame(async()=>{q.current&&W.editor.focus()}),!an){an={};for(let Q=0;Q<Et.length;Q++){const X=Et[Q];an[X]=globalThis[X]}}(()=>{const Q=(X,be)=>{try{if(be===void 0)try{delete globalThis[X]}catch{try{globalThis[X]=void 0}catch{}}else globalThis[X]=be}catch{}};for(let X=0;X<Et.length;X++){const be=Et[X];Q(be,ln[be])}ln=void 0})(),k(!0)})()},onMount:$})}),oe]})},[y,G,l,oe,m]),z=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:K=>{P(K)},close:()=>{T?.()},getEditor:()=>y?.getEditor()}),[y]);return o.useEffect(()=>(g&&requestAnimationFrame(()=>{P()}),()=>{f.current?.editor&&requestAnimationFrame(()=>{z.current?.contains(document.activeElement)&&P()})}),[]),c.jsx("div",{className:bt("script-editor",xa,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:z,...h,children:L})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>s.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.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"}),c.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"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.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"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.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=si,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.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"}),c.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"}),c.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"}),c.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.CommandContext=ai,exports.CornerTriangle=go,exports.DateUtils=vl,exports.DocThemesContext=Dn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Dn.Provider,{value:t,children:n})},exports.EditableLabel=Dr,exports.EmptyFrame=Jl,exports.FilterButton=vr,exports.FontUtils=Cl,exports.Item=Mo,exports.LogoNoPaddingIcon=e=>c.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[c.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"}),c.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"}),c.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"}),c.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=Sr,exports.MovableArea=Mr,exports.PictureEditor=Ar,exports.Row=sl,exports.ScriptEditor=Ma,exports.SheetCellEditor=br,exports.SheetCellRenderer=Cr,exports.SheetElement=Fr,exports.SheetScrollbar=wo,exports.StaticBorderRenderer=Tl,exports.StyledStrokePath=yr,exports.Tab=al,exports.TabStrip=dl,exports.createCellEditStateFromCell=wr,exports.useBordersOverlay=bo,exports.useDocThemes=()=>{const e=o.useContext(Dn),[t]=o.useState(()=>new s.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=Tr,exports.useRangeListener=(e,t,n,i)=>{const a=o.useRef(n);a.current=n;const l=i?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const p={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(p)}const d=p=>{a.current?.(p)},m=e.getRange(t).addListener(d,i);if(l){const p=e.getRange(t);d({getSource:()=>p,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{m?.()}},[e,t])},exports.useSheetCommands=Rr,exports.useSheetCopyPaste=kr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
|