@sheetxl/react 0.4.13 → 0.4.15
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/B4TwkpKRQsSXODnS.cjs +16 -0
- package/browser/cjs/BM-anvzow9Dh4y3e.cjs +7 -0
- package/browser/cjs/C_lMEo0Cjr7rC6jW.cjs +161 -0
- package/browser/cjs/index.cjs +30 -10
- package/browser/esm/BZaycSL3ucaTCTWP.mjs +1377 -0
- package/browser/esm/CwxORB4v0OL4tjEv.mjs +394 -0
- package/browser/esm/DGPDR-dMEjbV9Ib9.mjs +3905 -0
- package/browser/esm/index.mjs +4896 -8
- package/node/esm/{zLbuHfkIrtIaHyAW.mjs → D88cX0-0FRXuWoiu.mjs} +1 -1
- package/node/esm/index.mjs +2 -2
- package/package.json +5 -5
- package/browser/cjs/BAyV6eAD3nC4LPRe.cjs +0 -7
- package/browser/cjs/CtxoVwfZ8EYJes0Y.cjs +0 -7
- package/browser/cjs/DL8USyvC-1ZSog-z.cjs +0 -7
- package/browser/esm/B4BYWB5Uu9K6VSTT.mjs +0 -7
- package/browser/esm/BWXhJF6hNCn3u44J.mjs +0 -7
- package/browser/esm/X4Oh9I7hCVznAbe3.mjs +0 -7
package/browser/cjs/index.cjs
CHANGED
|
@@ -1,13 +1,33 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
try{if(typeof document != 'undefined'){var elementStyle = document.createElement('style');elementStyle.appendChild(document.createTextNode("/**\n * CSS files with the .module.css suffix will be treated as CSS modules\n * and scoped locally.\n */\n._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6 {\n pointer-events: none;\n }\n._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6 * {\n pointer-events: initial;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container {\n /* inspired by - https://codepen.io/shalimano/pen/wBmNGJ */\n /* :global(.dec) {\n animation: decrease 4s 0.5s infinite;\n } */\n\n /* @keyframes decrease {\n 0% { left: -80%; width: 80%; animation-timing-function: ease; }\n 80% { left: 110%; width: 10%; animation-timing-function: steps(1, end); }\n 100% { left: 110%; width: 10%; }\n } */\n\n /* from { left: -80%; width: 80%; }\n to { left: 110%; width: 10%;} */\n\n }\n._sheetxl-sheet_1qeq6_5 .cell-container > * {\n /* position: absolute; Inherited from grid not needed*/\n overflow: hidden;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .text-box {\n position: absolute;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .text-line {\n text-rendering: optimizespeed;\n position: absolute;\n vertical-align: baseline;\n white-space: pre;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .filter-button {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n margin-bottom: 4px;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .text-debug-bounds {\n position: absolute;\n background: green;\n pointer-events: none;\n /* border: solid 2px red */\n opacity: 0.2;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .fill {\n position: absolute;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .pending {\n width: 6px; /* Adjust size as needed */\n height: 6px;\n top: 5px;\n left: 4px;\n position: absolute;\n border: var(--sxl-app-color-primary-dark, grey) 0.5px;\n border-style: double;\n border-radius: 50%; /* Creates a circle */\n background-color: var(--sxl-app-color-button-surface, grey); /* A color of your choice */\n opacity: 1; /* Initial opacity */\n animation: _pulse_1qeq6_1 1.5s infinite alternate; /* Animation settings */\n }\n@keyframes _pulse_1qeq6_1 {\n 0% {\n transform: scale(1); /* Initial size */\n opacity: 1;\n }\n 50% {\n transform: scale(1.2); /* Slightly larger size */\n opacity: 0.8; /* Slightly less opaque */\n }\n 100% {\n transform: scale(1); /* Back to initial size */\n opacity: 1;\n }\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .slider {\n position: absolute;\n width: 130%;\n /* height: 100%; */\n height: 2px;\n bottom: 1px;\n opacity: 0; /* Start with opacity 0 */\n animation: _fadeIn_1qeq6_1 0.0s 0.5s forwards;\n overflow-x: hidden;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .line {\n position: absolute;\n opacity: 0.3;\n background: var(--sxl-app-color-primary-light, rgb(173, 173, 173)) 0.5px;\n width: 100%;\n /* height: 100%; */\n height: 2px;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .subline {\n position: absolute;\n background: var(--sxl-app-color-primary, rgb(77, 77, 77)) 0.5px;\n opacity: 0.9;\n /* height: 100%; */\n height: 3px;\n }\n._sheetxl-sheet_1qeq6_5 .cell-container .inc {\n animation-delay: 0s;\n animation: _increase_1qeq6_1 3s infinite;\n }\n@keyframes _fadeIn_1qeq6_1 {\n 0% { opacity: 0; height: 0px; }\n 100% { opacity: 1; height: 2px }\n }\n/* @keyframes increase {\n from { left: -5%; width: 5%; }\n to { left: 130%; width: 100%;}\n } */\n@keyframes _increase_1qeq6_1 {\n /* from { left: -5%; width: 5%; }\n to { left: 130%; width: 100%;} */\n 0% { left: -150%; width: 30%; animation-timing-function: ease; }\n 100% { left: 100%; width: 30%; }\n }\n/**\n * CSS files with the .module.css suffix will be treated as CSS modules\n * and scoped locally.\n */\n._sheet-selection_12wyx_5 .fill-handle .dragging {\n opacity: 0;\n }\n/**\n * CSS files with the .module.css suffix will be treated as CSS modules\n * and scoped locally.\n */\n._movable-area_314c6_5 .moveable-control-box .dragging {\n opacity: 0;\n }\n._movable-area_314c6_5 .moveable-control-box .moveable-control {\n width: 11px;\n height: 11px;\n margin-top: -5.5px;\n margin-left: -5.5px;\n background-color: var(--sxl-app-color-background, white);\n background-image: var(--sxl-app-image-background);\n border: 2px solid var(--sxl-app-color-primary-dark, grey);\n }\n._movable-area_314c6_5 .moveable-control-box .moveable-line {\n background: var(--sxl-app-color-grey, grey);\n }\n\n@media (pointer: coarse) {\n ._movable-area_314c6_5 .moveable-control-box .moveable-control {\n width: 22px;\n height: 22px;\n margin-top: -11px;\n margin-left: -11px;\n }\n}\n/*\n.EditableLabel {\n}\n*/\n\n._editable-input_1bqx6_6 {\n position: absolute;\n left: 0px;\n top: 0px;\n width: 100%;\n min-height: calc(100% + 1px); /* hack for padding */\n border: none;\n padding: 0 0;\n outline: none;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n line-height: 1.2;\n letter-spacing: inherit;\n text-transform: inherit;\n background: transparent;\n}@keyframes _pop_1wyun_1 {\n 0% {\n transform: scale(1);\n /* box-shadow: var(--box-shadow); */\n }\n 100% {\n transform: scale(var(--scale));\n /* box-shadow: var(--box-shadow-picked-up); */\n }\n}\n\n@keyframes _fadeIn_1wyun_33 {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n._Wrapper_1wyun_25 {\n display: flex;\n box-sizing: border-box;\n transform: translate3d(var(--translate-x, 0), var(--translate-y, 0), 0)\n scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));\n transform-origin: 0 0;\n touch-action: manipulation;\n}\n\n._Wrapper_1wyun_25._fadeIn_1wyun_33 {\n /* animation: fadeIn 500ms ease; */\n }\n\n._Wrapper_1wyun_25._dragOverlay_1wyun_37 {\n /* --scale: 1.05; */\n /* --box-shadow: $box-shadow;\n --box-shadow-picked-up: $box-shadow-border,\n -1px 0 15px 0 rgba(34, 33, 81, 0.01),\n 0px 15px 15px 0 rgba(34, 33, 81, 0.25); */\n z-index: 999;\n }\n\n._Item_1wyun_47 {\n position: relative;\n display: flex;\n align-items: center;\n\n /* box-shadow: $box-shadow; */\n outline: none;\n box-sizing: border-box;\n transform-origin: 50% 50%;\n\n -webkit-tap-highlight-color: transparent;\n\n transform: scale(var(--scale, 1));\n\n}\n\n._Item_1wyun_47:not(._withHandle_1wyun_61) {\n touch-action: manipulation;\n /* cursor: grab; */\n }\n\n._Item_1wyun_47._dragging_1wyun_66:not(._dragOverlay_1wyun_37) {\n /* opacity: var(--dragging-opacity, 1); */\n z-index: 999;\n /* &:focus {\n box-shadow: $box-shadow;\n } */\n }\n\n._Item_1wyun_47._disabled_1wyun_74 {\n /* &:focus {\n box-shadow: 0 0px 4px 1px rgba(0, 0, 0, 0.1), $box-shadow;\n } */\n /* cursor: not-allowed; */\n }\n\n._Item_1wyun_47._dragOverlay_1wyun_37 {\n cursor: inherit;\n animation: _pop_1wyun_1 200ms cubic-bezier(0.18, 0.67, 0.6, 1.22);\n transform: scale(var(--scale));\n /* box-shadow: var(--box-shadow-picked-up); */\n opacity: 1;\n }._Row_1kr10_1 {\n display: flex;\n box-sizing: border-box;\n /* padding: 0px;\n margin: 0px; */\n /* transition: background-color 350ms ease; */\n /* overflow: hidden; */\n /* &::-webkit-scrollbar {\n display: none;\n width: 0px;\n height: 0px;\n } */\n}\n/*\n To support Autoscrolling\n * dnd-kit checks for the container element to have an overflow property. So we do a few hacks.\n * the better answer is to fork dnd-kit and add to dndcontext scrollableAncestors as a property.\n\n * It seems we are one of the few/only libraries that don't include the scrollbar within the container; Even the virtualized examples show a scrollbar\n * see - dndkit-isScrollable\n */\n ._TabStrip_3x0dp_1::-webkit-scrollbar {\n display: none;\n height: 0px;\n }\n ._TabStrip_3x0dp_1 {\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n}\n\n\n/**\n * CSS files with the .module.css suffix will be treated as CSS modules\n * and scoped locally.\n */\n._script-editor_iy654_5 .monaco-editor {\n position: absolute;\n }\n._script-editor_iy654_5 .monaco-editor .margin-icon {\n display: block;\n width: 16px; /* Adjust size */\n height: 16px; /* Adjust size */\n background-size: 16px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n }\n._script-editor_iy654_5 .monaco-editor .formula {\n 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>');\n cursor: pointer;\n }\n._script-editor_iy654_5 .monaco-editor .macro {\n 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>');\n cursor: pointer;\n }\n._script-editor_iy654_5 .monaco-editor .autorun {\n 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>');\n cursor: pointer;\n }\n\n/*\n:global .mtk11.jsdoc-tag {\n color: #569CD6 !important;\n font-weight: bold;\n}\n\n:global .mtk11.jsdoc-type {\n color: #4EC9B0 !important;\n}\n\n:global .mtk11.jsdoc-param {\n color: #9CDCFE !important;\n}\n*/"));document.head.appendChild(elementStyle);}}catch(e){console.error('vite-plugin-css-injected-by-js', e);}
|
|
5
|
-
|
|
6
|
-
})();
|
|
7
|
-
/**
|
|
8
|
-
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.4.13
|
|
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
|
+
"use strict";/**
|
|
3
|
+
* @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.4.15
|
|
9
4
|
*
|
|
10
5
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
11
6
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
12
|
-
*/
|
|
13
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@sheetxl/sdk"),t=require("@sheetxl/utils-react"),n=require("react/jsx-runtime"),o=require("@sheetxl/utils"),r=require("react"),l=require("@sheetxl/grid-react"),i=require("react-dom"),a=(e=6e4)=>new Date(Math.floor(Date.now()/e)*e),s=Object.freeze(Object.defineProperty({__proto__:null,nowWithPrecision:a},Symbol.toStringTag,{value:"Module"})),d=Object.freeze([8,9,10,11,12,14,16,18,20,22,24,26,28,30,36,48,72]),c=(e,t=!0,n=d)=>{if(!n||0===n.length)return e;if(void 0===e)return n[0];if(t&&e>=n[n.length-1])return e;if(!t&&e<=n[0])return e;let r=o.CommonUtils.findEqualOrGreater(n,e);return t?(n[r]===e&&(r+=1),n[r]||(r-=1),n[r]):(r-=1,n[r])},u=Object.freeze(Object.defineProperty({__proto__:null,DefaultFontSizes:d,findNextFontSize:c},Symbol.toStringTag,{value:"Module"})),g=r.memo(e=>{const{anchorLocation:t=o.AnchorLocation.TopLeft,cellWidth:r,cellHeight:l,size:i=7,inset:a=1,darkMode:s,fill:d,pathProps:c,style:u,...g}=e,h=i,m=a;let f="red",p=[],v=[];return t===o.AnchorLocation.TopLeft?(f=s?"rgb(255, 198, 246)":"green",p.push(m),v.push(m),p.push(m+h),v.push(m),p.push(m),v.push(m+h)):t===o.AnchorLocation.TopRight?(f=s?"rgb(0, 255, 255)":"red",p.push(r-m),v.push(m),p.push(r-(m+h)),v.push(m),p.push(r-m),v.push(m+h)):t===o.AnchorLocation.BottomRight?(f=s?"rgb(236, 252, 211)":"purple",p.push(r-m),v.push(l-m),p.push(r-(m+h)),v.push(l-m),p.push(r-m),v.push(l-(m+h))):t===o.AnchorLocation.BottomLeft&&(f=s?"rgb(255, 236, 183)":"blue",p.push(m),v.push(l-m),p.push(m+h),v.push(l-m),p.push(m),v.push(l-(m+h))),n.jsx("svg",{width:`${r}`,height:`${l}`,viewBox:`0 0 ${r} ${l}`,style:{position:"absolute",width:`${r}px`,height:`${l}px`,pointerEvents:"none",...u},...g,children:n.jsx("path",{d:`M ${p[0]} ${v[0]} L ${p[1]} ${v[1]} L ${p[2]} ${v[2]} L ${p[0]} ${v[0]} Z`,fill:d??f,...c})})}),h=e=>{const{renderBounds:t,darkMode:o,zoom:l,disabled:i,filter:a,onFilterButtonMouseDown:s,style:d,...c}=e,u=r.useMemo(()=>{let e=null;const t=a.getSortField();t&&(e=t.reverse);const n=a.getField(),o=n&&n.criteria&&n.criteria.length>0;return!0===e?o?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z":"m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":!1===e?o?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z":"m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":o?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":"m 3,5.025 4.5,5 4.5,-5 z"},[a]),[g,h]=r.useState(!1);const m=Math.min(Math.min(18,t.height-8),t.width);return n.jsx("div",{style:{width:`${m}px`,height:`${m}px`,right:"0px",boxShadow:`0px 0px 0px 0.5px var(${g&&!i?"--sxl-app-color-primary-light, rgba(0,0,0,.55)":"--sxl-app-color-border-button, grey"})`,backgroundColor:"var(--sxl-app-color-button-fill, white)",backgroundImage:"var(--sxl-app-image-background)",borderRadius:(m>12?1:0)+"px",marginRight:"2px",display:"flex",alignItems:"center",justifyContent:"center",cursor:i?void 0:"pointer",...d},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onMouseDown:e=>{s?.(e,a)},...c,children:n.jsx("svg",{width:""+15*l,height:""+15*l,viewBox:"0 0 15 15",style:{fill:`var(${g&&!i?"--sxl-app-color-primary-dark":"--sxl-app-color-button-text"}, grey)`,opacity:i?.6:1},children:n.jsx("path",{d:u})})})},m=r=>{const{value:l,coords:i,bounds:a,children:s,style:d,range:c,zoom:u=1,view:m,bodyStyle:f,normalStyle:p,showFormulas:v,showZeros:C,docTheme:b,onLinkMouseDown:w,onFilterButtonMouseDown:y,filterButtonProps:x,createFilterButton:q=h,...S}=r,R=a.height/u,k=a.width/u,M=l,T=M.getValue(),I=l.getStyle(),E=f?.darkMode??!1;let F,A;const D=T&&T.isFormulaError,z=D&&T instanceof e.FormulaError.Parse;let N,L=v||z;if(L)if(M.isSpillOverflow())A="";else{const t=M.getFormulaText();t?A=t:F=M.getNumberFormat(e.NumberFormat.Type.General)}else F=M.getNumberFormat();L||(N=M.getTextOverflow());const O=N?N.colBounds.width+N.leftOffset+N.rightOffset:k,j=N?N.anchorBounds.x-N.leftOffset:0,B=N?N.anchorBounds.width:k,V=N?N.anchorBounds.x:0;let P,H=M.getRenderHorizontalAlignment();F&&(P=F?.formattedRuns,A=P?.runs[0]?.text??F.displayText);const U=M.getCalcStatus()===e.ICell.CalcStatus.Pending;let K=null,W=I.getFill().toCSS(E,a),$=0,G=0;if(!I.getBorder().isEmpty()){const t=I.getBorder().getRight();!t.isNone()&&e.IBorder.BuiltInDefinitions.get(t.getStyle()).width>1&&($=1);const n=I.getBorder().getBottom();!n.isNone()&&e.IBorder.BuiltInDefinitions.get(n.getStyle()).width>1&&(G=1)}let _=null;if(k!==B||$||G||"number"==typeof W?.backgroundPosition){const{backgroundPosition:e,...o}=W,r=e??0,l=m?.getScrollTopLeft(),i=r?-(a.x+(l.left??0))%r:0,s=r?-(a.y+(l.top??0))%r:0;(void 0!==e||$||G||k!==B)&&(1===Object.keys(o).length&&"none"===o.background||(W=null,_=n.jsx("div",{className:"fill",style:{marginLeft:`${i}px`,marginTop:`${s}px`,left:V*u,width:t.ReactUtils.boundPixel(B*u-i+1+$),height:t.ReactUtils.boundPixel(a.height-s+1+G),...o}},"background")))}let Z=null;const X=M.getComments(),Y=M.getWarnings(),J=M.getErrors();if(X||D||J.length>0||Y.length>0){const e={size:7*u,darkMode:E,cellWidth:B*u+2,cellHeight:R*u+2,style:{top:-1,left:V*u-1}};Z=Z??[],(Y.length>0||J.length>0||D)&&Z.push(n.jsx(g,{anchorLocation:o.AnchorLocation.TopLeft,...e},`indicator-${Z.length}`)),X&&Z.push(n.jsx(g,{anchorLocation:o.AnchorLocation.TopRight,...e},`indicator-${Z.length}`))}const Q=I.getFont();let ee=F?.conditionalColor;const te=I.getAlignment(),ne=te.getHorizontal()===e.ITextFrame.HorizontalAlignment.Fill,oe=te.getHorizontal()===e.ITextFrame.HorizontalAlignment.CenterContinuous||ne,re=oe||L?0:te.getRotation(),le=M.getInsets(),ie=le.top+le.bottom;let ae=le.left,se=le.right;const de={...d,left:d.left-1,top:d.top-1,width:d.width+1+$,height:d.height+1+G},ce=M.getColumnFilter(),ue=ce&&!ce?.hasHiddenButton();let ge=null;U&&(ge=n.jsxs("div",{className:"slider",children:[n.jsx("div",{className:"line"}),n.jsx("div",{className:"subline inc"})]},"pending"));const he=!(U||ue||_||s||Z||P?.runs.length>1||N||re%360!=0);"none"===W?.background&&(W=null);let me=oe||!(!N||!(N.rightIndex>0||N.leftIndex>0||N.colSpan>1));if(!me){const e=M.getSpans();(e.width>1||e.height>1)&&(me=!0)}const fe={...W,...de,pointerEvents:w?"auto":void 0};if(!o.CommonUtils.isEmpty(A)||!o.CommonUtils.isEmpty(F?.repeatPlaceholder)){const t=F?.canWrap??!1;let r=null,l=null,i=null,a=[],s=!0;C||L||0!==T||(s=!1);const c=M.getTextFrame(L);if(s&&c){let s=O-1-(ae+se);if(re){const t=c.layout();r=t.bounds;const n={x:0,y:0,width:O-1,height:R};if(P){let t=P.width;if(F.repeatPlaceholder||F.repeatChars.length>0){const o=e.GeomUtils.boundsToPoints(n),r=e.GeomUtils.rotatePoints(o,-re);t=e.GeomUtils.minBoundingRect(r).width}r={...r,width:t}}i=e.GeomUtils.clipToOuterRect({...r,width:r.width+1+ae+se},n,re),s=i.width-1-(ae+se)+.01}let g=null;t&&(g={width:s});let h=null,m=F?.repeatPlaceholder;const f=c.layout(g);if(r=f.bounds,L?r={...r,width:0}:P&&(r={...r,width:F.repeatPlaceholder||F.repeatChars.length>0?s:P.width}),re&&t){let t=null;f.visitLines({visitTextLine:(n,o)=>{let r=n.bounds;const l=e.GeomUtils.boundsToPoints(r),i=e.GeomUtils.rotatePoints(l,re),a=e.GeomUtils.minBoundingRect(i);r={...r,x:(a.width-r.width)/2,y:(a.height-r.height)/2},t=t?e.GeomUtils.unionBounds(t,r):r}}),r={...t,width:t.width+ae+se}}if(!m&&M.getType()!==e.ScalarType.String&&Math.floor(r.width)>s){if("General"===I.getNumberFormat()&&M.getType()===e.ScalarType.Number){const e=I.measureText("0"),t=Math.floor(s/e.width),n=T,r=o.CommonUtils.splitNumber(n),l=Math.min(10,t-(Math.max(1,r.ipLength)+1)-(n<0?1:0));if(l>=-1){const e=`0${l>0?".":""}${"#".repeat(Math.max(0,l))}`;h=M.getNumberFormat(e).displayText,"0"===h&&n<0&&(h="-0")}else if(Math.abs(n)>=Math.pow(10,5)||Math.abs(n)<=Math.pow(10,-5)){const e=t-5-(n<0?1:0);if(e>=0){const t=`0.${"0".repeat(Math.max(0,e-1))}E+00`;h=M.getNumberFormat(t).displayText}}}h||(m="#")}if(!m&&P?.lastRepeatIndex>=0&&P?.width>s&&(m="#"),m&&s>0){const e=I.measureText(m),t=Math.floor((s||1)/(e?.width||1));h=t>0?m.repeat(t):""}if(L&&(H=e.ITextFrame.HorizontalAlignment.Left),h){const e=I.measureText(h).width;e&&(r={...r,width:e})}if(l={...r,width:r.width+ae+se,height:r.height},re&&!t){const t=e.GeomUtils.boundsToPoints(l),n=e.GeomUtils.rotatePoints(t,re),o=e.GeomUtils.minBoundingRect(n);l.width=o.width,l.height=o.height}H===e.ITextFrame.HorizontalAlignment.Center||H===e.ITextFrame.HorizontalAlignment.CenterContinuous?l.x=(O-l.width)/2:H===e.ITextFrame.HorizontalAlignment.Right?l.x=O-l.width-.5:l.x=.5,te.getVertical()===e.ITextFrame.VerticalAlignment.Center?l.y=(R-l.height)/2:te.getVertical()===e.ITextFrame.VerticalAlignment.Bottom?l.y=R-l.height-ie:l.y=ie;const p=he?{...S}:void 0,v={style:{left:d.left-1,top:d.top-1,width:d.width+1,height:d.height+1,transform:re?`rotate(${re}deg)`:void 0,cursor:w?"pointer":void 0,pointerEvents:w?"auto":void 0,zIndex:me?1:void 0,...W},onMouseDown:w,onDoubleClick:w?e=>{e.stopPropagation(),e.preventDefault()}:null,...p};z&&(v.style.textDecorationStyle="wavy",v.style.textDecorationColor=E?"rgb(0, 255, 255)":"red",v.style.textDecorationLine="underline");const C=Q.getSize(),b=(o,i,d,c,g,h,m,f=null)=>{let p=C*u,v=d,b=m?.runs?m.runs:[{type:e.NumberFormat.ParseRunType.Text,text:o,width:I.measureText(o,p).width}];m&&m?.width!==r.width&&(r={...r,width:m?.width});let w=ae;if(m?.lastRepeatIndex>=0&&s>m?.width){const t=m.runs[m.lastRepeatIndex];if(t){const n=[...b],o=Math.max(0,s-1-m.width);let l=0,i="";if(o>0){const e=Math.floor(o/t.width);i=e>0?t.text.repeat(e):"",l=o}n[m.lastRepeatIndex]={type:e.NumberFormat.ParseRunType.Repeat,text:i,width:l},b=n,r={...r,width:m.width+l}}}const y=(o,r,l,i,s,d,c,m,f,C=null)=>{let b,y=v.width;g===e.ITextFrame.HorizontalAlignment.Justify?(y=s,h||(b="justify")):g===e.ITextFrame.HorizontalAlignment.Distributed&&(y=s,b=h||o.text.split(" ").length-1==0?"center":"justify");const{style:x,className:q,...S}=C;let R=o.text;if(g===e.ITextFrame.HorizontalAlignment.Fill&&0===F?.repeatChars.length){const e=Math.max(1,Math.floor((v?.width??0)/(c?.width??1)));R=R.repeat(e)}let k=v.height;const M=Q.getVerticalAlignment(),T=M===e.IFont.VerticalAlignment.Sub,I=M===e.IFont.VerticalAlignment.Super;if(T||I){const e=Q.getSuperSubScale();p*=e,k*=e}const A={textAlign:b,textAlignLast:b,background:void 0,...x,...Q.toCSS(E,u,!0),fontSize:p*e.IFont.getDeviceScale()};ee&&(A.color=ee.toCSS(E));const D=w+r;let z=le.top+v.y+0;if(T&&(z+=f-p),d){const e=(c.x+D)*u+1,t=(c.y+z)*u+1;t<0?A.marginTop=t:A.paddingTop=t,e<0?(A.width=(x?.width??0)-e,A.left=(x?.left??0)+e):A.paddingLeft=e,A.paddingRight=Math.max(0,(x?.width??0)-y*u-e),A.paddingBottom=Math.max(0,(x?.height??0)-v.height*u-t),A.height=(x?.height??0)+(t<0?-t:0),(t<0||e<0)&&(A.clipPath=`inset(${t<0?-t:0}px 0px 0px ${e<0?1-e:0}px)`)}else if(A.left=(c.x+D)*u+1,A.top=(c.y+z)*u+1,A.width=c.width*u,A.height=c.height*u,re&&!t){A.left=(c.x+r)*u+1,A.top=(c.y+(v.y+0))*u+1;const t=e.GeomUtils.centerPoint({x:w+r,y:0,width:o.width,height:v.height}),n=e.GeomUtils.centerPoint({x:w,y:0,width:s,height:v.height}),l=e.GeomUtils.rotatePoints([t],re,n),i={x:l[0].x-t.x,y:l[0].y-t.y};A.left=A.left+i.x*u,A.top=A.top+i.y*u;const a={...v,x:w,y:le.top,width:v.width+(ae+se)},d=e.GeomUtils.boundsToPoints(a),g=e.GeomUtils.rotatePoints(d,re),h=e.GeomUtils.minBoundingRect(g);a.width=h.width,a.height=h.height;const m=e.GeomUtils.centerPoint(a),f={x:m.x-n.x,y:m.y-n.y};A.left=A.left+f.x*u,A.top=A.top+f.y*u}A.lineHeight=k*u+"px";const N=he?void 0:"text-line";a.push(n.jsx("div",{className:q?`${q} ${N}`:N,style:A,...S,children:R},`text-${v.y}-${i}-${l}`))};if(te.getOverflow()===e.ITextFrame.Overflow.Shrink&&s>0){let e=r?.width??0,t=0;for(;e>1&&e>s&&p>2&&t<100;){p*=s/e;e=I.measureText(o,p).width,t++}r={...r,width:e}}let x=v.x;g===e.ITextFrame.HorizontalAlignment.Right?x+=r.width-v.width:g!==e.ITextFrame.HorizontalAlignment.Center&&g!==e.ITextFrame.HorizontalAlignment.CenterContinuous||(x+=(r.width-v.width)/2),m?.lastRepeatIndex>=0&&(x=v.x);const q=b.length;for(let t=0;t<q;t++){const n=b[t];if(n.type===e.NumberFormat.ParseRunType.Text||n.type===e.NumberFormat.ParseRunType.Repeat){n.type,e.NumberFormat.ParseRunType.Repeat;y(n,x,t,i,g===e.ITextFrame.HorizontalAlignment.Justify||g===e.ITextFrame.HorizontalAlignment.Distributed||m?.lastRepeatIndex>=0?s:v.width,he,{x:l.x+j,y:l.y,width:n.width,height:r.height},0,c,f)}x+=n.width}};h?b(h,0,{x:0,y:0,...r},f.lines[0].baseline,H,!0,null,v):f.visitLines({visitTextLine:(t,n,o)=>{const l=t.runs[0].text.replace(/\s+$/,""),i=n===o-1;let a=H===e.ITextFrame.HorizontalAlignment.Justify&&(i||t.runs[0].text.endsWith("\n"))?e.ITextFrame.HorizontalAlignment.Left:H,d=0;n>0&&(te.getVertical()===e.ITextFrame.VerticalAlignment.Distributed||te.getVertical()===e.ITextFrame.VerticalAlignment.Justify)&&(d=Math.max(0,(R-(ie+3)-t.bounds.height*o)/(o-1)*n)),te.getVertical()===e.ITextFrame.VerticalAlignment.Distributed&&re&&re%90==0&&re%180!=0&&(a=e.ITextFrame.HorizontalAlignment.Distributed),a!==e.ITextFrame.HorizontalAlignment.Justify&&a!==e.ITextFrame.HorizontalAlignment.Distributed&&a!==e.ITextFrame.HorizontalAlignment.Fill||(r={...r,width:s});const u={...t.bounds,y:t.bounds.y+d+0,width:ne||F&&(F.repeatChars.length>0||F.spacingChars.length>0)?r.width:t.bounds.width};b(l,n,u,c.lines[0].baseline,a,i,1===o?P:null,he&&n>0?{...v,style:{...v.style,background:void 0}}:v)}})}a.length>0&&(K=a)}if(he)return K&&K.length>0?K:n.jsx("div",{style:fe,...S});let pe=w?"auto":de.pointerEvents,ve=null;if(ue){const e={x:V*u-1,y:-1,width:B*u+1,height:R*u+1};pe="auto",ve=q({renderBounds:e,darkMode:E,className:"filter-button",disabled:!M.isEditAllowed(),zoom:u,filter:M.getColumnFilter(),onFilterButtonMouseDown:y,...x}),ve&&(ve=n.jsx("div",{style:{...e,position:"absolute",zIndex:2,display:"flex",alignItems:"end"},onDoubleClick:e=>{e.stopPropagation(),e.preventDefault()},children:ve},"filterButton"))}U&&!K&&(K=n.jsx("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:"..."},"pending-ellipsis"));const Ce=[_,K,s,Z,ge,ve];return n.jsx("div",{style:{...W,...de,pointerEvents:pe},...S,children:Ce})},f={text:"",placeholder:""},p=(e,t)=>{if(!e.clean().getStyle().getNumberFormat().endsWith("%"))return!1;const n=t??e.dirty??"";return 0===n.length||n.endsWith("%")&&!isNaN(parseFloat(n.substring(0,n.length-1)))},v=Object.freeze([t.KeyCodes.Delete,t.KeyCodes.Home,t.KeyCodes.End]),C=r.memo(r.forwardRef((i,s)=>{const{editState:d,onStartEdit:c,onChangeEdit:u,onSubmitEdit:g,onCancelEdit:h,onDoneEdit:m,defaultTextStyle:C,useRichStyling:b=!0,bodyStyle:w,activeCoords:y,sheet:x,commands:q,containerBounds:S,setNaturalDimensions:R,onFocus:k,disabled:M,style:T,zoom:I=1,linesVisible:E,autoFocus:F=!1,...A}=i,{height:D=0,width:z=0}=S??{},N=w?.darkMode??!1,L=r.useRef(null),[O,j]=r.useState(!1),[B,V]=r.useState(null),[P,H]=r.useState(()=>d);r.useEffect(()=>{Y.current=!1,H(d)},[d]);const U=r.useMemo(()=>{const t=P.clean();let n=t.getStyle();b||(n=n.createTemporaryStyle({font:{size:C?.fontSize}}));const r=t.getFormula(),l=n.getAlignment(),i=r?e.ITextFrame.HorizontalAlignment.Left:l.getHorizontal(),a=l.getVertical(),s=l.getOverflow()===e.ITextFrame.Overflow.Wrap||t.getType()===e.ScalarType.String&&(i===e.ITextFrame.HorizontalAlignment.Justify||i===e.ITextFrame.HorizontalAlignment.Distributed||a===e.ITextFrame.VerticalAlignment.Justify||a===e.ITextFrame.VerticalAlignment.Distributed),d=(e=>{if(!e)return f;const t=e.clean();if(!t)return f;let n=t.getStyle()?.getQuotePrefix();if(void 0===e.dirty||null===e.dirty){let o="",r=t.getFormulaText();r&&(o=r,n=!1),o||(o=t.toTextUnformatted(!0)??"");let l="";if(!e.editMode&&t.isSpillOverflow()){const e=t.getSpill();if(e){const n=e.getCell(),o=n.getFormulaText();n.isEqual(t)||(l=o)}}return n&&(o="'"+o),{text:o,placeholder:l}}return{text:e.dirty??"",placeholder:""}})(P),c=d.text,u=e.ITextFrame.toCSSHorizontalTextAlign(b&&!r?P.clean()?.getRenderHorizontalAlignment():e.ITextFrame.HorizontalAlignment.Left);return{style:n,isWrapped:s,textValue:c,formula:r,frameVertAlign:a,placeholder:d.placeholder,insets:b?t.getInsets():o.TypesUtils.EmptyRect,textAlign:u}},[P,C,N,I,b]),K=r.useRef(null),W=t.useImperativeElement(s,()=>({startEdit:e=>{L.current=e?.initialSelection;const t={...d,editMode:e?.editMode??!1};void 0!==e?.text&&(t.dirty=e.text),t.editMode===d.editMode&&t.dirty===d.dirty||(H(t),_?.(t))},submitEdit:()=>J(),cancelEdit(){Q()},autoFocus(){K.current.focus()},dispatchEvent:e=>K.current.dispatchEvent(e),focus(){K.current.focus()},getLineHeight:G}),[c,d]);r.useLayoutEffect(()=>{if(!B||!O)return;const e=K.current;U.textValue,e&&e.setSelectionRange(B.start,B.end,B.direction)},[K.current,B,U.textValue]);const $=r.useMemo(()=>{const t=P?.clean(),n=U.style.createTemporaryTextFrame(U.textValue,t?.getType()===e.ScalarType.String),o=b?t.getInsets().right+t.getInsets().left:0;let r=null;U.isWrapped&&(r={width:z-o});return n.layout(r)},[U,z,P,b]),G=t.useCallbackRef(()=>Math.ceil($?.lines[0]?.bounds.height),[$]);r.useLayoutEffect(()=>{if(!$)return;const e=U.style,t=e.getInsets()??o.TypesUtils.EmptyRect,n=b?t.left+t.right:0,r=b?.04*e.getFont().getSize():1,l=Math.round(U.isWrapped?void 0:$.bounds.width+n+r),i=Math.round($.bounds.height);R?.({width:l,height:i})},[$,R,U,b,P]);const _=t.useCallbackRef(u,[u]),Z=t.useCallbackRef(e=>{if(P.dirty===e)return;const t={...P};t.dirty=e,K.current,H(t),_?.(t)},[P]),X=t.useCallbackRef(e=>{if(P.editMode===e)return;const t={...P};t.editMode=e,H(t),_?.(t)},[P]),Y=r.useRef(!1),J=t.useCallbackRef(()=>{if(Y.current)return!1;try{g?.(P),m?.(),Y.current=!0}catch(e){return!1}return!0},[g,P]),Q=t.useCallbackRef(()=>{Y.current=!0,H(d),h?.(),m?.()},[h,d]),ee=t.useCallbackRef(n=>{if(!K.current)return;if(n.key,n.isDefaultPrevented(),!(n.isTrusted||n.nativeEvent.ctrlKey||n.nativeEvent.metaKey||n.nativeEvent.altKey||n.nativeEvent.isComposing||-1===l.STANDARD_KEY_CHARS.indexOf(n.nativeEvent.key)&&"Backspace"!==n.nativeEvent.key)){const e={...P};let t=0;return p(e,e.dirty)&&!isNaN(parseFloat(n.key))?(e.dirty?.endsWith("%")?e.dirty=(e.dirty.substring(0,e.dirty.length-1)??"")+n.key+"%":e.dirty=(e.dirty??"")+n.key+"%",t=e.dirty.length-1):"Backspace"===n.nativeEvent.key?(e.dirty="",t=e.dirty.length):(e.dirty=(e.dirty??"")+n.key,t=e.dirty.length),K.current.value=e?.dirty,L.current={start:t,end:t,direction:"forward"},K.current?.setSelectionRange(t,t,"forward"),H(e),_?.(e),void n.preventDefault()}const o=n.nativeEvent.ctrlKey,r=n.nativeEvent.shiftKey,i=n.nativeEvent.altKey,a=n.nativeEvent.metaKey;if(o&&"z"===n.key&&n.stopPropagation(),n.which===t.KeyCodes.Escape)return n.preventDefault(),void Q();if(n.which===t.KeyCodes.F2)return X(!0),void n.preventDefault();const s=n.target;if("%"===n.key&&s.selectionStart===s.selectionEnd&&"%"===s.value[s.selectionStart]&&P?.clean().getStyle().numberFormat.includes("%"))return V({start:s.selectionStart+1,end:s.selectionEnd+1,direction:s.selectionDirection}),void n.preventDefault();if(n.which===t.KeyCodes.Enter){if(n.preventDefault(),a||i){const e=U.textValue.substring(0,s.selectionStart)+"\n"+U.textValue.substring(s.selectionEnd);return Z(e),void V({start:s.selectionStart+1,end:s.selectionStart+1,direction:s.selectionDirection})}return void(J()&&x.getSelection().traverse(e.IRange.Orientation.Column,r))}if(n.which===t.KeyCodes.Tab)return n.preventDefault(),void(J()&&x.getSelection().traverse(e.IRange.Orientation.Row,r));let d=null;switch(n.which){case t.KeyCodes.Left:d=e.IRange.Direction.Left;break;case t.KeyCodes.Right:d=e.IRange.Direction.Right;break;case t.KeyCodes.Up:d=e.IRange.Direction.Up;break;case t.KeyCodes.Down:d=e.IRange.Direction.Down}if(d){if(!(o||r||i||a)&&!P.editMode)return void J()}P.editMode&&(d||v.includes(n.which))&&n.stopPropagation()},[P,x,U]),te=r.useCallback(()=>{K.current?.focus(),setTimeout(()=>{K.current?.select()},0)},[]),ne=r.useCallback(()=>{K.current?.focus(),console.log("implement toggleRelativeReferences")},[]),oe=t.useCallbackRef(()=>{const e=K.current?.value;let t="";if(y.rowIndex>0){const e=x.getRange({rowIndex:y.rowIndex-1,colIndex:y.colIndex}).getCell();e&&(t=e.toTextUnformatted(!0))}Z(e+t)},[y,x]);r.useEffect(()=>x.getRange(y).addListener(()=>{const e={...P,clean:()=>x.getRange(y).getCell()};H(e),_?.(e)}),[y,x]);const re=r.useCallback(()=>{const e=P.clean().createTemporaryCell({value:a(),style:{numberFormat:"Medium Time"}}).toText();Z((K.current?.value??"")+e)},[x]),le=r.useCallback(()=>{const e=P.clean().createTemporaryCell({value:a(),style:{numberFormat:"Short Date"}}).toText();Z((K.current?.value??"")+e)},[x]),ie=r.useMemo(()=>({element:()=>K.current,doCopy:e=>{const t=K.current.value.substring(K.current.selectionStart,K.current.selectionEnd);if(e?.isCut){const e=K.current.value.substring(0,K.current.selectionStart)+K.current.value.substring(K.current.selectionEnd,K.current.value.length);Z(e)}return t}}),[K.current]),ae=r.useMemo(()=>({element:()=>K.current,doPaste:async(e,t)=>{const n=await(e.toText?.());if(!n)return!0;const o=K.current.value.substring(0,K.current.selectionStart)+n+K.current.value.substring(K.current.selectionEnd,K.current.value.length);return Z(o),V({start:K.current.selectionStart+n.length,end:K.current.selectionStart+n.length,direction:"forward"}),!0}}),[K.current]),se=r.useMemo(()=>({contains:e=>K.current?.contains(e)||!1,focus(){K.current.focus()}}),[]),de=r.useMemo(()=>[new t.SimpleCommand("selectAll",se,{label:"Select All",description:"Select all of the text in cell.",shortcut:{key:"a",modifiers:[t.KeyModifiers.Ctrl]}},te),new t.SimpleCommand("startEditValueAbove",se,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:'"',modifiers:[t.KeyModifiers.Ctrl]},{key:'"',modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}]},oe),new t.SimpleCommand("startEditCurrentTime",se,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},re),new t.SimpleCommand("startEditCurrentDate",se,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[t.KeyModifiers.Ctrl]}},le),new t.Command("relativeReferencesToggle",se,{label:"Toggle References",description:"Toggles cell references from relative to absolute, to partially absolute, back to relative again.",shortcut:{key:"F4"}},ne),new t.Command("toggleEditorFocus",se,{label:"Toggle Editor Focus",description:"Moves focus between editors such as formula editor and inline editor.",shortcut:{key:"F2",modifiers:[t.KeyModifiers.Ctrl]}})],[]),ce=r.useMemo(()=>{let e=null;const n=()=>({contains:e=>K.current?.contains(e)||!1,focus(){K.current.focus()}});return e=q?q.createChildGroup(n,"editor",!1):new t.CommandGroup(n,"editor"),e.addCommands(de,!0),e},[q,de]),ue=r.useMemo(()=>({notifier:null,source:ie,target:ae,commands:ce}),[ie,ae,ce]);t.useCopyPaste(ue);const[ge,he]=r.useState(!F);r.useEffect(()=>{he(!1)},[]);const me=t.useCallbackRef(e=>{j(!0),ce?.activate();const t=L.current;if(!1!==t){let e,n;const o=K.current.value;p(P,o)&&(e=o.length-1,n=o.length-1),e=t?.start??e??o.length,n=t?.end??n??o.length,L.current=!1,V({start:e,end:n,direction:"forward"})}k?.(e)},[k,P]),fe=U.insets;let pe=fe.left+1;const ve=fe.left+fe.right+2-1,Ce=$?.bounds.height??0;let be,we=fe.top;U.frameVertAlign===e.ITextFrame.VerticalAlignment.Center?we=Math.max(0,(D-(fe.top+fe.bottom)-Ce)/2):U.frameVertAlign===e.ITextFrame.VerticalAlignment.Bottom&&(we=Math.max(0,D-(fe.top+fe.bottom)-Ce)),void 0!==E&&$?.lines[0]?.bounds&&(be=$?.lines[0]?.bounds.height*E);const ye=U.style.getFont();let xe=ye.getSize();ye.isSuperSub()&&(xe*=ye.getSuperSubScale()),xe*=e.IFont.getDeviceScale()*I;const qe=b?ye.toCSS(N,I):null;return n.jsx("div",{className:"sheet-cell-editor",onMouseDown:e=>{K.current&&document.activeElement!==K.current&&requestAnimationFrame(()=>{K.current.focus()})},ref:W,...A,style:{display:"flex",flexGrow:1,alignSelf:"stretch",height:"100%",width:"100%",maxWidth:"100%",maxHeight:"100%",cursor:"initial",...T},children:n.jsx("div",{className:"editor-placement",style:{display:"flex",flexGrow:1,position:"relative",top:we*I+1,left:pe*I,width:`calc(100% - ${ve*I}px)`,maxWidth:`calc(100% - ${ve*I}px)`,height:(be??Ce)*I,maxHeight:(be??Ce)*I},children:n.jsx("textarea",{spellCheck:"false",placeholder:U.placeholder,ref:K,value:U.textValue,disabled:ge,readOnly:M||x.getProtection().isReadOnly(),name:"sheet-cell-editor",autoComplete:"off",autoCapitalize:"off",style:{flex:"1 1 100%",font:"inherit",...qe,fontSize:xe?`${xe}px`:"inherit",textAlign:U.textAlign,lineHeight:($?.lines[0]?.bounds.height??0)*I+"px",height:($?.bounds.height??0)*I,boxSizing:"border-box",padding:"0px",margin:"0px",borderWidth:0,outline:"none",resize:"none",overflow:"hidden",background:"transparent",maxHeight:"100%",maxWidth:"100%",width:"100%",userSelect:"text",position:"absolute",whiteSpace:U.isWrapped?"normal":"pre",wordWrap:"break-word"},onFocus:me,onBlur:()=>{j(!1)},onSelect:e=>{},onChange:e=>{K.current&&!Y.current&&(L.current=!1,Z(e.target.value),U.textValue,e.target.value,e.target.selectionStart,e.target.selectionEnd,e.target.selectionDirection,V({start:e.target.selectionStart,end:e.target.selectionEnd,direction:e.target.selectionDirection}))},onMouseDown:e=>{O&&X(!0)},onKeyDown:ee})})})})),b=(e,t)=>({clean:e,dirty:t,editMode:!1}),w=e=>{const{length:o=0,width:r=1,dashArray:l=null,dashArrayAdditional:i=null,isDouble:a=!1,isAngled:s=!1,offsetX:d=0,offsetY:c=0,isVertical:u=!1,...g}=e,h=e=>{let t=null;if(e&&r>0){t="";for(let n=0;n<e.length;n++)t+=e[n],n<e.length-1&&(t+=",")}return t},m=h(l);let f=m;i&&(f=h(i));let p=r,v=o,C=null;if(a){p=Math.floor(r/2);const e=p+p/2+1;let o=null;o=u?`M ${t.ReactUtils.boundPixel(d+e)} ${t.ReactUtils.boundPixel(c)} L ${t.ReactUtils.boundPixel(d+e)} ${t.ReactUtils.boundPixel(c+v)}`:`M ${t.ReactUtils.boundPixel(d)} ${t.ReactUtils.boundPixel(c+e)} L ${t.ReactUtils.boundPixel(d+v)} ${t.ReactUtils.boundPixel(c+e)}`,C=n.jsx("path",{strokeWidth:p,strokeDasharray:f,d:o,...g})}if(s){p=r/2;const e=p+p/2;let o=f,l=null;l=u?`M ${t.ReactUtils.boundPixel(d+e)} ${t.ReactUtils.boundPixel(c)} L ${t.ReactUtils.boundPixel(d+e)} ${t.ReactUtils.boundPixel(c+v)}`:`M ${t.ReactUtils.boundPixel(d)} ${t.ReactUtils.boundPixel(c+e)} L ${t.ReactUtils.boundPixel(d+v)} ${t.ReactUtils.boundPixel(c+e)}`,C=n.jsx("path",{strokeWidth:p,strokeDasharray:o,strokeDashoffset:"1",shapeRendering:"crispEdges",d:l,...g})}let b=null;return b=u?`M ${t.ReactUtils.boundPixel(d+p/2)} ${t.ReactUtils.boundPixel(c)} L ${t.ReactUtils.boundPixel(d+p/2)} ${t.ReactUtils.boundPixel(c+v)}`:`M ${t.ReactUtils.boundPixel(d)} ${t.ReactUtils.boundPixel(c+p/2)} L ${t.ReactUtils.boundPixel(d+v)} ${t.ReactUtils.boundPixel(c+p/2)}`,n.jsxs(n.Fragment,{children:[n.jsx("path",{strokeWidth:p,strokeDasharray:m,d:b,...g}),C]})};function y(e,t){if("function"==typeof e)return e(t);e&&(e.current=t)}var x=parseInt(r.version.split(".")[0],10)>=19?function(e){return t=>{const n=[];for(const o of e){const e=y(o,t),r="function"==typeof e;n.push(r?e:()=>y(o,null))}return()=>{for(const e of n)e()}}}:function(e){return t=>{for(const n of e)y(n,t)}},q=function(){},S="undefined"!=typeof window,R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},k=S?r.useLayoutEffect:r.useEffect,M={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const T=S&&void 0!==window.ResizeObserver?function(){var e=r.useState(null),t=e[0],n=e[1],o=r.useState(M),l=o[0],i=o[1],a=r.useMemo(function(){return new window.ResizeObserver(function(e){if(e[0]){var t=e[0].contentRect,n=t.x,o=t.y,r=t.width,l=t.height,a=t.top,s=t.left,d=t.bottom,c=t.right;i({x:n,y:o,width:r,height:l,top:a,left:s,bottom:d,right:c})}})},[]);return k(function(){if(t)return a.observe(t),function(){a.disconnect()}},[t]),[n,l]}:function(){return[q,M]},I=(e,t)=>e.colStart===t.colStart?e.rowStart-t.rowStart:e.colStart-t.colStart,E=(e,t)=>e.rowStart===t.rowStart?e.colStart-t.colStart:e.rowStart-t.rowStart,F=t=>{const{key:o,points:r,range:l,stroke:i,darkMode:a,forceThinBorder:s=!1,shiftIfWide:d=!1,isVertical:c=!1,intersections:u,layout:g}=t,h=e.IBorder.BuiltInDefinitions.get(s?e.IBorder.StrokeStyle.Thin:i.getStyle());if(!h)return null;const m=r[0],f=r[1],p=r[2],v=r[3];let C=1+(c?v-f:p-m),b=0;const y=i.getColor().toRGBA(a).toString(),x=h.description.toLowerCase().includes("double");let q,S;const R=c?"rowStart":"colStart",k=c?"rowEnd":"colEnd",M=c?f:m;if(u?.length>0){const t=u[0];if(t?.range[R]===l[R]){const n=e.IBorder.BuiltInDefinitions.get(t.stroke.getStyle());b=Math.floor(n.width/2)}const n=u[u.length-1];if(n?.range[k]===l[k]){const t=e.IBorder.BuiltInDefinitions.get(u[u.length-1].stroke.getStyle());C=Math.floor(C+(2===t.width?0:t.width/2))}if(x){const t=c?"colStart":"rowStart",n=c?"colEnd":"rowEnd",o=c?g?.getRowOffset:g?.getColOffset;let r=0,i=0;q=[],S=[];for(let a=0;a<u.length;a++){const s=u[a];if(s.stroke.getStyle()===e.IBorder.StrokeStyle.Double&&o){const e=o(s.range[R])-(M-b);s.range[t]<l[t]&&(q.push(e-r),r=e,q.push(1),r++),s.range[n]>l[n]&&(S.push(e-i),i=e,S.push(1),i++)}}q.length>0&&r<C&&q.push(C-r),S.length>0&&i<C&&S.push(C-i)}}let T=c?-Math.floor(h.width/2):-b,I=c?-b:-Math.floor(h.width/2);const E=d&&h.width>2?-1:0;return n.jsx(w,{offsetX:m+T+E,offsetY:f+I+E,length:C+b,isVertical:c,stroke:y,width:h.width,dashArray:q??h.pattern,dashArrayAdditional:S,isDouble:x,isAngled:h.description.toLowerCase().includes("slant")},o)},A=({getBorderAt:l,borderRenderer:i=F,getVisibleCells:a,darkMode:s,forceThinBorder:d=!1,defaultColor:c="black",shiftIfWide:u=!1})=>{const g=t.useCallbackRef(a,[a]),h=r.useMemo(()=>t=>{const r=t.toClipBounds(t.getRangeCoordsBounds(),-3);if(!r)return;const a=g(t);if(0===a.length)return;const h=t.getVisibleColumnOffsets(),m=t.getVisibleRowOffsets();let f=[],p=[];const v=t.getVisibleColumns(),C=t.getVisibleRows(),b=[],w=[],y=[],x=(e,t,n,o,r,l,i)=>{const a={index:o,stroke:r,visibleIndex:n,edge:l,length:i};e[t]||(e[t]=[]),e[t].length>0&&e[t][e[t].length-1]?.index===o?e[t][e[t].length-1]=a:e[t].push(a)};for(let n=0;n<a.length;n++){const r=a[n],i=r.coords;if(!i)continue;const s=r?.range??{rowStart:i.rowIndex,colStart:i.colIndex,rowEnd:i.rowIndex,colEnd:i.colIndex},d=t.getVisibleRangeCoords();if(!o.CoordUtils.isRangesIntersect(s,d)&&!o.CoordUtils.isRangeWithinRange(s,d))continue;const c=i.colIndex,u=i.rowIndex,g=h[c],y=m[u];if(s.rowEnd!==s.rowStart){const e=m[s.rowStart]?.spanIndex??-1,t=m[s.rowEnd]?.spanIndex??m[C[C.length-1]].spanIndex+1;f.push({...s,rowStart:e,rowEnd:t})}if(s.colEnd!==s.colStart){const e=h[s.colStart]?.spanIndex??-1,t=h[s.colEnd]?.spanIndex??h[v[v.length-1]].spanIndex+1;p.push({...s,colStart:e,colEnd:t})}const q=r.value,S=l(q,n);if(!S||S.isEmpty())continue;const R=S.getLeft(),k=S.getTop(),M=S.getRight(),T=S.getBottom();let I=1,E=1;if(!g||!y)continue;const F=g.spanIndex,A=y.spanIndex;R.isNone()||x(b,F,A,u,R,e.IBorder.Edge.Left,I),k.isNone()||x(w,A,F,c,k,e.IBorder.Edge.Top,E),M.isNone()||x(b,F+E,A,u,M,e.IBorder.Edge.Right,I),T.isNone()||x(w,A+I,F,c,T,e.IBorder.Edge.Bottom,E)}const q=(e,t,n)=>{const o=[];return e.forEach((e,r)=>{let l=null;e.sort((e,t)=>e.visibleIndex-t.visibleIndex);for(let i=0;i<e.length;i++){const a=e[i];if(!a?.stroke)continue;if(void 0===t[r]&&void 0===t[r-1])continue;let s=!1;if(n)for(let e=0;!s&&e<f.length;e++){let t=f[e];t.colStart<=a.index&&t.colEnd>=a.index&&t.rowStart<r&&t.rowEnd>=r&&(s=!0)}else for(let e=0;!s&&e<p.length;e++){let t=p[e];t.rowStart<=a.index&&t.rowEnd>=a.index&&t.colStart<r&&t.colEnd>=r&&(s=!0)}if(s)continue;const d=a.stroke?.getColor(),u=d?d.toRGBA().toString():c,g=a.stroke.getStyle()+":"+u;(g!==l?.key||l&&l.visibleIndex+1<a.visibleIndex)&&(l&&o.push(l),l={key:g,index:t[r]??t[r-1]+1,visibleIndex:a.visibleIndex,edge:a.edge,stroke:a.stroke,from:a.index,to:a.index+a.length-1,intersections:[],length:1}),l.to=a.index+a.length-1,l.visibleIndex=a.visibleIndex}l&&o.push(l)}),o};f=f.sort(E),p=p.sort(I);const S=q(b,v,!1),R=q(w,C,!0);if(0===S.length&&0===R.length)return null;for(let e=0;e<R.length;e++){const t=R[e];let n=o.CommonUtils.findEqualOrGreater(S,t.from,e=>e.index),r=!1;for(;!r;){const e=S[n++];e&&e.index>=t.from&&e.index<=t.to+1&&e.from<=t.index&&e.to+1>=t.index&&(t.intersections.push({stroke:e.stroke,range:{rowStart:e.from,rowEnd:e.to+1,colStart:e.index,colEnd:e.index}}),e.intersections.push({stroke:t.stroke,range:{rowStart:t.index,rowEnd:t.index,colStart:t.from,colEnd:t.to+1}})),r=!e||e.index>t.to+1}}for(let e=0;e<R.length;e++){const n=R[e];let o=n.stroke;const r=`rBorder:${n.index}:${n.from}:${n.to}:${n.edge}`,l={rowStart:n.index,rowEnd:n.index,colStart:n.from,colEnd:n.to+1},a=t.getLayout(),c=!1,g=a.getColOffset(l.colStart),h=a.getRowOffset(l.rowStart),m=[g,h,a.getColOffset(l.colEnd),h];y.push(i({key:r,points:m,stroke:o,darkMode:s,forceThinBorder:d,shiftIfWide:u,range:l,intersections:n.intersections,layout:a,isVertical:c}))}for(let e=0;e<S.length;e++){const n=S[e];let o=n.stroke;const r=`cBorder:${n.index}:${n.from}:${n.to}:${n.edge}`,l={rowStart:n.from,rowEnd:n.to+1,colStart:n.index,colEnd:n.index},a=t.getLayout(),c=!0,g=a.getColOffset(l.colStart),h=[g,a.getRowOffset(l.rowStart),g,a.getRowOffset(l.rowEnd)];y.push(i({key:r,stroke:o,points:h,darkMode:s,forceThinBorder:d,shiftIfWide:u,range:l,intersections:n.intersections,layout:a,isVertical:c}))}return n.jsx("svg",{width:`${r.width}`,height:`${r.height}`,viewBox:`0 0 ${r.width} ${r.height}`,preserveAspectRatio:"none",shapeRendering:"crispEdges",style:{position:"absolute",left:"0px",top:"0px",width:`${r.width}px`,height:`${r.height}px`,pointerEvents:"none",transitionTimingFunction:"linear",transitionDelay:"0",transitionProperty:"left, top, width, height",willChange:"left, top, width, height, stroke-dashoffset",overflow:"visible"},children:y},"borders")},[l,s]);return{overlay:h}},D=o.AnchorLocation.Center,z=Object.freeze({horizontal:!1,vertical:!1}),N=o.TypesUtils.EmptyTopLeft,L=(e,t)=>o.CoordUtils.EmptyCell,O=(e,t)=>new Promise((e,t)=>{t("StaticBorderRenderer does not support scrolling")}),j=r.memo(e=>{const{getBorderAt:t,width:l,height:i,style:a,rowCount:s=2,columnCount:d=2,darkMode:c,forceThinBorder:u,children:g,...h}=e,m=r.useRef(null),[f,{width:p,height:v}]=T(),C=l??p,b=i??v,w=r.useMemo(()=>{const e=[];for(let t=0;t<s;t++)for(let n=0;n<d;n++){const o={colIndex:n,rowIndex:t};e.push({coords:o,value:o})}return e},[]),y=r.useCallback(e=>w,[w]),{overlay:q}=A({getVisibleCells:y,getBorderAt:t,darkMode:c,forceThinBorder:u}),S=Math.floor(C/d),R=Math.floor(b/s),k={getColOffset:e=>Math.ceil(e*S)+0,getRowOffset:e=>Math.ceil(e*R)+0,getColIndex:e=>Math.floor((e-0)/S)-1,getRowIndex:e=>Math.floor((e-0)/R)-1},M={rowStart:0,colStart:0,rowEnd:s,colEnd:d},I={x:0,y:0,width:Math.max(0,C)+0,height:Math.max(0,b)+0},E=r.useMemo(()=>{const e={},t=Math.floor(C/d);for(let n=0;n<d;n++)e[n]={offset:n*t,size:t,spanIndex:n};return e},[C,b]),F=r.useMemo(()=>{const e={},t=Math.floor(b/s);for(let n=0;n<s;n++)e[n]={offset:n*t,size:t,spanIndex:n};return e},[C,b]);if(!q)return null;const j={width:C,height:b},B={width:C,height:b},V={getStage:()=>m.current,getTotalSize:()=>j,getViewportSize:()=>B,getLayout:()=>k,getCellCoordsAsRangeCoords:o.CoordUtils.cellToRange,getVisibleRangeCoords:()=>M,getVisibleRows:()=>{const e=[];for(let t=0;t<s;t++)e.push(t);return e},getTotalRangeCoords:()=>M,getRelativePointFromClient:(e,t)=>({x:e,y:t}),getVisibleColumns:()=>{const e=[];for(let t=0;t<d;t++)e.push(t);return e},toClipBounds:(e,t)=>I,toViewBounds:e=>e,toAbsoluteBounds:e=>e,getBounds:()=>I,getInsets:()=>null,getRangeCoordsBounds:(e,t)=>null,getVisibleColumnOffsets:()=>E,getVisibleRowOffsets:()=>F,allViews:()=>({[D]:V}),getAnchor:()=>D,getZoom:()=>1,scrollCellCoordsIntoView:O,getCellCoordsFromClient:L,getScrollOrientation:()=>z,getScrollTopLeft:()=>N,getFreezeTopLeft:()=>N},P=q(V);return n.jsxs("div",{style:{...a,position:"relative",display:"flex"},...h,children:[n.jsx("div",{ref:x([m,f]),style:{flex:"1 1 100%",display:"flex",maxWidth:"100%",maxHeight:"100%"},children:g}),P]})});function B(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=B(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function V(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=B(e))&&(o&&(o+=" "),o+=t);return o}const P="_sheetxl-sheet_1qeq6_5",H="_viewport-overlay_1qeq6_6",U=e=>{const{style:t,...o}=e??{};return n.jsxs("svg",{style:{width:"135px",height:"37px",...t},viewBox:"0 0 135 37",...o,children:[n.jsx("path",{d:"M 1.0984,0 C 0.4978,0 0.01,0.40548 0.01,0.90302 v 19.5766 H 0 v 15.61762 c 0,0.30574 0.185,0.57535 0.466,0.73886 v 0.1426 H 0.8565 C 0.9315,36.992 1.0086,37 1.0883,37 H 13.063 25.9706 v 0 h 8.7553 c 0.08,0 0.1563,-0.008 0.2308,-0.0213 h 0.054 v -0.0141 c 0.4621,-0.10457 0.8035,-0.45175 0.8035,-0.86739 v -15.312 c 0,-0.0328 0.01,-0.0658 0.01,-0.0995 V 0.90304 C 35.8242,0.4052 35.3363,6e-5 34.7358,6e-5 H 22.5969 V 1.7e-4 H 21.0014 V 6e-5 Z",fill:"#547dbe",fillRule:"evenodd"}),n.jsx("path",{d:"M 1.4849,2.09543 V 9.06408 H 8.1947 V 2.09543 Z m 8.6592,0 V 9.06408 H 16.854 V 2.09543 Z m 8.685,0 v 6.96865 h 6.7098 V 2.09543 Z m 8.7355,0 v 6.96865 h 6.7099 V 2.09543 Z M 1.4849,11.04391 v 6.81444 h 6.7098 v -6.81444 z m 8.6592,0 v 6.81444 h 6.7099 v -6.81444 z m 8.685,0 v 6.81444 h 6.7098 v -6.81444 z m 8.7355,0 v 6.81444 h 6.7099 V 11.04391 Z M 1.4849,19.83872 v 6.68584 h 6.7098 v -6.68584 z m 8.6592,0 v 6.68584 h 6.7351 v -6.68584 z m 8.685,0 v 6.68584 h 6.7098 v -6.68584 z m 8.7355,0 v 6.68584 h 6.7099 v -6.68584 z m -26.052,8.38811 v 6.68588 h 6.7098 v -6.68588 z m 8.6592,0 v 6.68588 h 6.7355 v -6.68588 z m 8.685,0 v 6.68588 h 6.7099 v -6.68588 z m 8.7356,0 v 6.68588 h 6.7098 v -6.68588 z",fill:"#ffffff",fillRule:"evenodd"}),n.jsx("path",{d:"m 1.4785,2.09737 v 6.96865 h 6.741 V 2.09737 Z m 0,8.94851 v 6.81449 h 6.741 v -6.81449 z m 0,8.79485 v 6.6858 h 6.741 v -6.6858 z m 0.028,8.388 v 6.68588 h 6.741 v -6.68588 z",fill:"#547dbe",fillRule:"evenodd",strokeWidth:"0.4"}),n.jsx("path",{d:"M 120.9895,32.82218 V 10.13469 h 4.7986 v 18.71559 h 9.2153 v 3.9719 z m 0.4853,0 h -5.4976 l -5.275,-8.57923 -5.2751,8.57923 h -5.1481 l 7.5314,-11.69325 -7.0545,-10.99424 h 5.3067 l 4.8936,8.16618 4.7986,-8.16618 h 5.1796 l -7.118,11.24826 z M 95.9361,29.04099 c 0.5297,0 1.0381,-0.053 1.5254,-0.15888 0.4872,-0.10591 0.9745,-0.23299 1.4617,-0.3813 v 3.52703 c -0.5084,0.21183 -1.144,0.39189 -1.9066,0.54018 -0.7415,0.16946 -1.5571,0.2542 -2.4469,0.2542 -1.038,0 -1.9701,-0.16947 -2.7964,-0.5084 -0.805,-0.33894 -1.4511,-0.92148 -1.9384,-1.74763 -0.466,-0.84734 -0.6991,-2.01241 -0.6991,-3.49526 v -8.35686 h -2.2562 v -2.00181 l 2.6058,-1.58876 1.3664,-3.65411 h 3.0189 v 3.6859 h 4.8619 v 3.55878 h -4.8619 v 8.35686 c 0,0.65668 0.1906,1.15449 0.5719,1.49342 0.3814,0.31776 0.8792,0.47664 1.4935,0.47664 z M 79.1445,14.83743 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3983,1.35581 2.0972,3.29411 2.0972,5.81491 v 2.28769 H 75.7444 c 0.042,1.33475 0.4342,2.38315 1.1758,3.14596 0.7626,0.76244 1.8113,1.14385 3.1459,1.14385 1.1227,0 2.1396,-0.10609 3.0506,-0.3179 0.9109,-0.23311 1.8536,-0.58257 2.8283,-1.0484 v 3.654 c -0.8476,0.42362 -1.7479,0.73087 -2.7012,0.92139 -0.9322,0.21181 -2.0655,0.3179 -3.4001,0.3179 -1.7373,0 -3.2731,-0.3179 -4.6078,-0.95333 -1.3346,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0169,-5.05235 0.6991,-1.35578 1.6629,-2.37258 2.8917,-3.0504 1.2286,-0.67783 2.6586,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.2879,0.88967 -0.5933,0.59322 -0.9428,1.51461 -1.0487,2.76455 h 6.6415 c -0.021,-1.05904 -0.2967,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3559,-1.04855 -2.4787,-1.04855 z m -17.011,-3.36815 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3982,1.35581 2.0973,3.29411 2.0973,5.81491 v 2.28769 H 58.7653 c 0.042,1.33475 0.4343,2.38315 1.1758,3.14596 0.7627,0.76244 1.8113,1.14385 3.1459,1.14385 1.1228,0 2.1397,-0.10609 3.0507,-0.3179 0.911,-0.23311 1.8536,-0.58257 2.8282,-1.0484 v 3.654 c -0.8475,0.42362 -1.7478,0.73087 -2.7011,0.92139 -0.9321,0.21181 -2.0655,0.3179 -3.4002,0.3179 -1.7372,0 -3.273,-0.3179 -4.6077,-0.95333 -1.3347,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0168,-5.05235 0.6991,-1.35578 1.6631,-2.37258 2.8918,-3.0504 1.2287,-0.67783 2.6587,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.288,0.88967 -0.5931,0.59322 -0.9427,1.51461 -1.0486,2.76455 h 6.6414 c -0.021,-1.05904 -0.2965,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3558,-1.04855 -2.4786,-1.04855 z M 41.7033,13.59817 c 0,0.84739 -0.032,1.66288 -0.095,2.44668 -0.042,0.78385 -0.085,1.33456 -0.1271,1.65231 h 0.2542 c 0.5508,-0.88968 1.2605,-1.53575 2.1291,-1.93827 0.8686,-0.40251 1.8325,-0.60371 2.8917,-0.60371 1.8855,0 3.3896,0.50838 4.5124,1.52518 1.144,0.99558 1.716,2.60556 1.716,4.82998 V 32.82218 H 48.2498 V 22.68575 c 0,-2.49951 -0.9322,-3.74937 -2.7964,-3.74937 -1.4194,0 -2.4045,0.49788 -2.9553,1.49362 -0.5297,0.97424 -0.7945,2.38314 -0.7945,4.22592 v 8.16626 H 36.9688 V 8.67305 h 4.7348 z",fill:"#eb594d"}),n.jsx("path",{d:"m 23.345,4.88926 c 1.4307,0 2.8282,0.229 4.1916,0.68692 1.3636,0.45803 2.6999,1.15712 4.0084,2.09748 l -1.8344,2.50966 C 28.6222,9.40175 27.5522,8.82162 26.5004,8.44306 25.4486,8.0645 24.3968,7.87524 23.345,7.87524 c -1.9935,0 -3.5435,0.40902 -4.6503,1.22728 -1.1068,0.81819 -1.6601,1.97842 -1.6601,3.48048 v 0.0183 c 0,1.05019 0.3179,1.8502 0.9538,2.39973 0.636,0.54952 1.4615,0.95869 2.4765,1.22731 1.015,0.26862 2.0975,0.51907 3.2468,0.75111 1.003,0.20755 1.9996,0.44872 2.9905,0.7235 0.9905,0.27478 1.8922,0.66562 2.7057,1.1724 0.813,0.50679 1.4615,1.1937 1.9444,2.06075 0.4832,0.86705 0.7247,1.99672 0.7247,3.38884 v 0.0367 c 0,2.45464 -0.8561,4.35355 -2.5682,5.69703 -1.7122,1.34311 -4.1216,2.01505 -7.2278,2.01505 -1.2963,0 -2.5162,-0.12207 -3.6598,-0.36658 -1.1434,-0.24413 -2.2134,-0.61071 -3.2102,-1.09898 -0.9968,-0.48864 -1.9292,-1.09897 -2.7975,-1.83175 l 1.9628,-2.47308 c 1.0763,0.92809 2.2534,1.62428 3.5314,2.08825 1.2779,0.46431 2.669,0.69627 4.1733,0.69627 2.1158,0 3.7513,-0.40613 4.9071,-1.21827 1.1558,-0.81214 1.7335,-1.95096 1.7335,-3.4164 v -0.0183 c 0,-1.06247 -0.2872,-1.87762 -0.8622,-2.44543 -0.5746,-0.56786 -1.3267,-0.99528 -2.2563,-1.28234 -0.9292,-0.28695 -1.9383,-0.52812 -3.0267,-0.72354 -1.0397,-0.18314 -2.0822,-0.39685 -3.1278,-0.64117 -1.0457,-0.24417 -2.0026,-0.60444 -2.8709,-1.08076 -0.8683,-0.47621 -1.5685,-1.15396 -2.1005,-2.0333 -0.532,-0.87933 -0.798,-2.05162 -0.798,-3.5171 v -0.0183 c 0,-2.4792 0.8255,-4.39955 2.4766,-5.7611 1.651,-1.36167 3.9807,-2.04258 6.9892,-2.04258 z",stroke:"#eb594d",strokeWidth:"2",fill:"#f9cecb"})]})},K=r.memo(t=>{const{colorLicensee:o="blue",colorError:l="red",colorCredits:i="grey",credits:a="All rights reserved - Michael Ford",feature:s,style:d,...c}=t??{},[u,g]=r.useState(null);r.useEffect(()=>{(async()=>{const t=await e.LicenseManager.getDetails();g(t)})()},[]);const[h,m]=r.useState(!1),f={opacity:.65},p=r.useMemo(()=>{const e=u?.exceptions(),t=e?.length??0;if(0===t)return null;const o=[];for(let r=0;r<t;r++){const t=e[r];o.push(n.jsx("div",{style:{opacity:.8,fontSize:"16px",textAlign:"left",color:l},children:t},r))}return o},[u,l]);if(null===u)return null;if(u.isValidFor(s))return null;const v=u.type(),C=!p&&v.endsWith("ity"),b=u.licensee(),w=C?1.6:1,y=135/w,x=37/w;let q=null;return!v&&b?.length>0&&(q=n.jsx("div",{style:{opacity:.7,fontWeight:"500",fontSize:"16px",textAlign:"left",color:o},children:b})),n.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",overflow:"hidden",...d},...c,children:n.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column"},children:[h?n.jsx(U,{style:f}):n.jsx("svg",{width:y,height:x,style:f,children:n.jsx("image",{style:{width:y,height:x},href:"https://www.sheetxl.com/watermark.svg",onError:()=>m(!0)})}),n.jsxs("div",{children:[q,p,n.jsx("div",{style:{height:"0px",fontSize:"16px",textAlign:"left",width:"0px",opacity:.8,color:i},children:a})]})]})})}),W=(e,t,n)=>{const o=r.useRef(t);o.current=t;const l=n?.fireOnModelChange??!0;r.useEffect(()=>{if(!e||!o.current)return;const t=Object.keys(o.current),r={},i=t.length;for(let e=0;e<i;e++){const n=t[e];r[n]=(e,t)=>{o.current[n]?.(e,t)}}const a=e.addListeners(r,n);if(l)for(let n=0;n<i;n++){r[t[n]](e)}return()=>{a?.()}},[e])},$=new e.Color("transparent");function G(l){const{sheet:s,onRepeatCommandChange:d,bodyStyle:u,commands:g,target:h,notifier:m,onStartEdit:f,getViewport:p}=l,[v,C]=r.useState(null),[b,w]=r.useState(null),y=r.useRef(null),x=t.useCallbackRef(f,[f]),q=t.useCallbackRef(p,[p]),[S,R]=r.useState(),[k,M]=r.useState(()=>s?.getStyles().parseColor(e.IColor.Scheme.Bg2)),[T,I]=r.useState(()=>s?.getStyles().getNormal().getFont().getFill()),E=t.useEditMode();r.useRef(E.getMode()).current=E.getMode();const F=t.useGlobalClipboard(),[A,D]=r.useState(o.CommonUtils.EmptyArray),z=r.useCallback(()=>{if(y.current!==s)return;const e=s.getSelectedRanges();let t=null;A.length>0&&o.CoordUtils.isCellWithinRange(v,A[0].getRange().getCoords())&&(t=A[0]);const n=s?.getSelectedCell(),r=n?.getCoords()??null;i.unstable_batchedUpdates(()=>{K(t),C(r),w(e)})},[s,A,b,v]),N=r.useCallback(o.CommonUtils.debounce(z,210),[z]);r.useEffect(()=>{y.current=s,z()},[s]);const L=t.useCallbackRef(()=>s.getRange(v).getCell(),[s,v]),O=t.useCallbackRef(async(e,n,o=null,r=!1,l=!0)=>{const i=e?.label?.(),a=async()=>{const e=await Promise.resolve(l&&m?.showBusy?.(i??"Busy..."));try{await s.doBatch(async()=>n(s),i),r&&E.setMode(null),e&&e()}catch(t){if(e&&e(),!t)return;m?.showError?.(t)}},c=[];let u=!1;const g=async()=>(c.push(a),(async()=>{if(!u){for(u=!0;c.length>0;){const e=c.shift();e&&await e()}u=!1}})());if(d){let n=null;if(!1!==o&&e){const r=o??i;n=new t.SimpleCommand(e.key(),h,{label:r,description:r},g)}d(n)}return g()},[s,d,m]),j=t.useCallbackRef((t,n,o=!1,r)=>O(t,t=>{const l=t.getSelectedRanges();o&&l.updateStyle(null,r),l.updateStyle(n,r),l.autoFit({expandOnly:e.IRange.Orientation.Column,minContent:!0,skipCustomSize:!0})}),[s]),B=t.useCallbackRef((e,t,n)=>{O(e,e=>{let o=t;(n||t?.address)&&(o=o??{},!n&&t?.address?.startsWith("#")?n=t?.address.substring(1):n&&(o.displayText=n)),e.getSelectedRange().setHyperlink(o)})},[s]),V=t.useCallbackRef((e,t)=>{O(e,e=>{e.getSelectedRange().setComments(t)})},[s]),P=t.useCallbackRef((e,t)=>{O(e,e=>{e.getSelectedRanges().clear(t)})},[s]),H=t.useCallbackRef(async(t,n,o=!1,r=!1)=>O(t,async t=>{let l=t.getSelectedRanges();o&&(n===e.IRange.Orientation.Row?l=l.getEntireRows(r):n===e.IRange.Orientation.Column&&(l=l.getEntireColumns(r)));let i=null;const a=E.getMode()?.key;if("copy"===a||"cut"===a){const e=await F.getClipboard().readReference();e&&"range"===e.getItemType()&&(i=e.getItem(),i.getCoords()||(i=null))}if(i){const t=await l.insertFrom(i,{...i.getMarkOptions(),orientation:n,autoSelect:!0});!t||t.isEntireRows()||t.isEntireColumns()||t.autoFit({orientations:e.IRange.Orientations.Row,minContent:!0}),E.setMode(null)}else l.insert(n,{autoSelect:!0})},"Insert Cells",!1),[E]),[U,K]=r.useState(null),G=t.useCallbackRef(e=>s.getStyles().setDefaultTableStyle(e),[s]),_=t.useCallbackRef(e=>{s.getStyles().getTableStyle(e)?.delete()},[s]),Z=t.useCallbackRef((t,n)=>{O(t,async t=>{const o=t.getSelectedRange(),r=t.getSelectedCell().getCoords();let l=null,i=0;const a=r.rowIndex>0?t.getRange({rowIndex:r.rowIndex,colIndex:r.colIndex}).getExtended(e.IRange.Direction.Up):null;a&&t.getRange({colStart:r.colIndex,rowStart:a.getCoords().rowStart,colEnd:r.colIndex,rowEnd:a.getCoords().rowStart}).isContentful()&&(l=e.IRange.Direction.Up,i=r.rowIndex-a.getCoords().rowEnd);const s=r.colIndex>0?t.getRange({rowIndex:r.rowIndex,colIndex:r.colIndex-1}).getExtended(e.IRange.Direction.Left):null;if(s&&t.getRange({colStart:s.getCoords().colStart,rowStart:r.rowIndex,colEnd:s.getCoords().colStart,rowEnd:r.rowIndex}).isContentful()){const t=r.colIndex-s.getCoords().colEnd;(t<i||!l)&&(l=e.IRange.Direction.Left,i=t)}let d=null;if(l===e.IRange.Direction.Up){if(d={...a.getCoords()},(d.rowEnd===r.rowIndex||!t.getRange({colIndex:r.colIndex,rowIndex:r.rowIndex-1}).isContentful())&&d.rowStart>0&&t.getRange({colIndex:r.colIndex,rowIndex:d.rowStart-1}).isContentful()){const t=a.getExtended(e.IRange.Direction.Up);d={colStart:r.colIndex,rowStart:t.getCoords().rowStart,colEnd:r.colIndex,rowEnd:a.getCoords().rowEnd}}d.rowEnd=r.rowIndex-1}else if(l===e.IRange.Direction.Left){if(d={...s.getCoords()},(d.colEnd===r.colIndex||!t.getRange({colIndex:r.colIndex-1,rowIndex:r.rowIndex}).isContentful())&&d.colStart>0&&t.getRange({colIndex:d.colStart-1,rowIndex:r.rowIndex}).isContentful()){const t=s.getExtended(e.IRange.Direction.Left);d={colStart:t.getCoords().colStart,rowStart:r.rowIndex,colEnd:t.getCoords().colEnd,rowEnd:r.rowIndex}}d.colEnd=r.colIndex-1}if(1!==o.size&&l){const r=o.getCoords(),i=o.startIncrementalUpdates({orientation:e.IRange.Orientation.Column}),a={...d},s=r.rowStart,c=r.rowEnd,u=r.colStart,g=r.colEnd,h=l===e.IRange.Direction.Up;for(let e=u;e<=g;e++){a.colStart=h?e:d.colStart+(e-u),a.colEnd=h?e:d.colEnd+(e-u);for(let o=s;o<=c;o++){a.rowStart=h?d.rowStart+(o-s):o,a.rowEnd=h?d.rowEnd+(o-s):o;const r=t.getRange(a).toString();i.pushAt(o,e,`=${n}(${r})`)}}i.apply()}else{const e=d?t.getRange(d).toString():"",o=`=${n}(`;x?.({text:`${o}${e})`,editMode:!0,initialSelection:{start:o.length,end:o.length+e.length}})}},!1)},[s]),X=t.useCallbackRef((e,t,n=!1,o=!0)=>{O(e,async r=>{let l=null;if(U)return void U.updateStyleOptions(t);{const e=r.getSelectedRanges().getFixed(!0),t=r.getSelectedRange().getDefaultSortCriteria();let n={ranges:e,hasHeader:t?.options?.hasHeader??!1};l=o?new Promise((e,t)=>{const o={tableOptions:n,onCancel:()=>{t()},onDone:t=>{e(t)},context:{getNames:()=>r.getNames()}};m.showWindow?.("tableNew",o)}):{option:"Ok",tableOptions:n}}const i=await Promise.resolve(l);if("Ok"!==i?.option)throw null;const a=await Promise.resolve(m?.showBusy?.(e.label()));try{const e=r.getTables().add(i.tableOptions.ranges.at(0),{styleName:t?.name,clearFormatting:n,hasHeader:i.tableOptions.hasHeader});await e.getRange().select()}catch(e){a(),m?.showError?.(e)}a()},!1,!0,!1)},[U]),Y=t.useCallbackRef(()=>u,[u]),J=t.useCallbackRef(e=>({styles:()=>s.getStyles(),table:()=>e,bodyStyle:Y,getNames:()=>s.getNames()}),[s]),Q=t.useCallbackRef(async(e,t,n,o=!0)=>{let r=null;if(!t){let e=s.getSelectedRange();1===e.size&&(e=e.getSurrounding());let n=s.getTables().search({address:s.getSelectedRange()});n.length>0&&(t=n[0]),await e.select()}if(t){if(o){try{n&&await t.select()}catch(e){}r=new Promise(async(n,o)=>{e.update({context:J(t)});const r={command:e,commands:me,notifier:m,onDone:e=>{n(e)}},l=await(m.showWindow?.("tableDetails",r,{disableAutoDestroy:!0}));setTimeout(()=>{l.focus()},180)})}Promise.resolve(r).then(e=>{},e=>{m?.showError?.(e)})}},[m]),ee=t.useCallbackRef(async(e,t,n=!1)=>{let o=null;if(t)t.isITable?o=t:t.getValue()&&(o=t.getValue());else{const e=s.getTables().search({address:s.getSelectedRange()});e.length>0&&(o=e[0])}if(o){if(!n){const e=o.getRange().getCoords(),t=(e.colEnd-e.colStart+1)*(e.rowEnd-e.rowStart+1);if(t>1e4){if("Convert"!==await(m?.showOptions({title:"Confirm",description:`Converting a table to range with '${t}' cells will set a large number of cell styles and may affect performance.\nContinue?`,options:["Convert","Cancel"],defaultOption:"Convert"})))return}}O(e,async()=>{n?o.delete():o.convertToRange()},!1,!0)}},[m]),te=t.useCallbackRef((t,n,o)=>{O(t,async r=>{let l=r.getSelectedRanges();if(l.getCount()>1)throw new Error("Can not sort on multiple cell ranges. Please select a single range and try again.");let i=l.at(0);1===i.size&&(i=i.getSurrounding());const a=r.getSelection().getCoords().cell;let s=i.getDefaultSortCriteria(e.IRange.Orientation.Row,a);if(!s){if(o)throw new Error("Invalid sort selection. Sort requires a single range with data.");return}let d=s.options;if(o&&(d=new Promise((e,t)=>{const n={range:i,options:s.options,cell:a,onCancel:()=>{t()},onDone:n=>{n?e(n.options):t()}};m.showWindow?.("sort",n)})),d=await Promise.resolve(d),!d)return;const c=await Promise.resolve(m?.showBusy?.(t.label()));try{i.doBatch(()=>{const t={...d,...n};i.sort(t),i.autoFit({orientations:t?.orientation===e.IRange.Orientation.Column?e.IRange.Orientations.Column:e.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},t?.label?.())}catch(e){c(),m?.showError?.(e)}c()},!1,!1,!1)},[m]),ne=t.useCallbackRef(()=>{console.log("compactedSelection");const e=s.getSelection().getCoords(),t=s.getSelectedRanges().getFlattened().getCoords(),n=(e=>{const t=new Blob([e],{type:"application/javascript"}),n=URL.createObjectURL(t),o=new Worker(n);return URL.revokeObjectURL(n),o})("console.log('hello from worker');");setTimeout(()=>{n.terminate(),console.log("Worker terminated")},5e3);let r=-1;for(let n=0;-1===r&&n<t.length;n++)o.CoordUtils.isCellWithinRange(e.cell,t[n])&&(r=n);if(o.CoordUtils.isEqualRangesArrays(e.ranges,t))return;const l={cell:e.cell,ranges:t,rangeIndex:r};s.getSelection().updateCoords(l)},[s]),oe=t.useCallbackRef(()=>{console.log("selectComments")},[s]),re=t.useCallbackRef(async(e=!1,t=!1)=>{let n=null;if(t)n=s.getEntireRange();else{const t=s.getSelectedRange();if(t.isEntireRange()){const e=s.getSelection().getCoords().cell,t=s.getRange(e);n=t.getSurrounding(),n.isEntireRange()&&(n=t)}else n=t.getSurrounding({contentOnly:e})}n&&await n.select()},[s]),le=t.useCallbackRef((t,n,o)=>{O(t,async t=>{let r=t.getSelectedRanges();o&&(n===e.IRange.Orientation.Row?r=r.getEntireRows():n===e.IRange.Orientation.Column&&(r=r.getEntireColumns())),r.delete(n)},"Delete Cells")},[s]);t.useCallbackRef(async e=>{let t=null;const n=q(),o=Math.min(n.width-8,480),r=Math.min(n.height-8,288);try{s.getSelectedRanges();t=await s.getMovables().add({bounds:{x:n.left+(n.width-o)/2,y:n.top+(n.height-r)/2,width:o,height:r},type:"chart",json:e.template}),t.select(),E.setMode(null)}catch(e){m?.showError?.(e)}return t},[s,m]);const ie=t.useCallbackRef(async(e,n,o)=>{const r=await(m?.showBusy?.(e.label()));try{const e=await s.getMovables().addImage(n,{autoSelect:!0,...o});return r(),E.setMode(null),e}catch(e){r();let n=e;"string"!=typeof n&&(console.warn(e),n="Unable to resolve image."),m?.showMessage?.(n,{type:t.NotificationType.Error})}},[s,m]),ae=t.useCallbackRef((t,n)=>{O(t,async r=>{const l=r.getSelectedRanges();l.doBatch(()=>{const t=n===e.IRange.Direction.Up||n===e.IRange.Direction.Down,i=l.getCoords().slice().sort(o.CoordUtils.createRangeComparator(t?e.IRange.Orientation.Row:e.IRange.Orientation.Column));for(let t=0;t<i.length;t++){const o=i[t];let l=o;const a=r.getRange(l).getMerges();let s=0,d=0;if(a.length>0){const e=a[0];s=e.rowEnd-e.rowStart,d=e.colEnd-e.colStart}n===e.IRange.Direction.Left?l={...o,colStart:o.colEnd+d}:n===e.IRange.Direction.Right?l={...o,colEnd:o.colStart+d}:n===e.IRange.Direction.Up?l={...o,rowStart:o.rowEnd+s}:n===e.IRange.Direction.Down&&(l={...o,rowEnd:o.rowStart+s}),r.getRange(l).autoFill(o,{filler:e.AutoFill.Types.Copy}),r.getRange(o).autoFit({orientations:e.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:t.label()})})},[m]),se=t.useCallbackRef(()=>{let e=null;const t=s.getSelectedCell().getCoords();if(t?.rowIndex>0){const n=s.getRange({rowIndex:t.rowIndex-1,colIndex:t.colIndex}).getCell();n&&(e=n.toTextUnformatted(!0))}x?.({text:e})},[s]),[de,ce]=r.useReducer(e=>e+1,0),[ue,ge]=r.useReducer(e=>e+1,0),he=r.useMemo(()=>[new t.Command("gridlinesToggle",h,{label:"Gridlines",scopedLabels:{view:"Gridlines"},description:"Toggle whether the lines between rows and columns in the sheet are displayed."}),new t.Command("sheetViewToggleGridlinesRows",h,{label:"Row Gridlines",scopedLabels:{view:"Row Gridlines",gridlines:"Rows"},description:"Toggle whether the lines between rows in the sheet are displayed."}),new t.Command("sheetViewToggleGridlinesColumns",h,{label:"Column Gridlines",scopedLabels:{view:"Columns Gridlines",gridlines:"Columns"},description:"Toggle whether the lines between columns in the sheet are displayed."}),new t.Command("sheetViewFormatGridlinesColor",h,{label:"Gridlines Color",description:"Color the rows and column gridlines."}),new t.Command("sheetViewToggleShowHeadings",h,{label:"Headings",scopedLabels:{view:"Headings"},description:"Toggle whether the row and column headings are displayed."}),new t.Command("sheetViewToggleShowHeadingRows",h,{label:"Row Headings",scopedLabels:{view:"Row Headings",headings:"Rows"},description:"Toggle whether the row headings are displayed."}),new t.Command("sheetViewToggleShowHeadingColumns",h,{label:"Column Headings",scopedLabels:{view:"Columns Headings",headings:"Columns"},description:"Toggle whether the column headings are displayed."}),new t.Command("sheetViewToggleShowHeadingsNumeric",h,{label:"Numeric Headers",description:"Toggle whether cell headings show numbers or A1 conventions.",shortcut:{key:"h",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}}),new t.Command("sheetViewToggleFormulaView",h,{label:"Show Formulas",description:"Toggle whether cells show formula or values.",shortcut:[{key:"`",modifiers:[t.KeyModifiers.Ctrl]},{key:"`",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}]}),new t.Command("sheetViewToggleShowZeros",h,{label:"Show Zeros",description:"Toggle whether cell with zero value shows '0' or blank."}),new t.SimpleCommand("selectComments",h,{label:"Select Comments",description:"Select the cells with comments.",shortcut:{key:"O",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},()=>oe()),new t.Command("selectAll",h,{label:"Select All",description:"Select the closest data or the entire sheet if no data is nearby.",shortcut:[{key:"A",modifiers:[t.KeyModifiers.Ctrl]},{key:"Space",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}]},(e=!1)=>re(!1,e)),new t.SimpleCommand("selectRegion",h,{label:"Select Region",description:"Select the closest data.",shortcut:{key:"*",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},()=>re(!0,!1)),new t.SimpleCommand("breakSelection",h,{label:"Select Visible",description:"Break the selection based on hidden rows and columns.",shortcut:{key:"Semicolon",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}},()=>ne()),new t.SimpleCommand("formatTextRotate0",h,{label:"No Text Rotation",description:"Remove all text rotation."}),new t.SimpleCommand("formatTextRotate45",h,{label:"Angle Clockwise",description:"Angle text 45 degrees downward."}),new t.SimpleCommand("formatTextRotate90",h,{label:"Rotate Text Down",description:"Angle your text so that it aligns with the left."}),new t.SimpleCommand("formatTextRotate270",h,{label:"Rotate Text Up",description:"Angle your text so that it aligns with the right."}),new t.SimpleCommand("formatTextRotate315",h,{label:"Angle Counterclockwise",description:"Angle text 45 degrees upward."}),new t.Command("formatTextRotateCustom",h,{label:"Custom Text Rotation",description:"Angle your text using a custom angle."}),new t.SimpleCommand("formatTextRotateVertical",h,{label:"Vertical Text",description:"Stack text vertically."}),new t.SimpleCommand("sortAscending",h,{label:"Sort Ascending",scopedLabels:{sort:"Ascending"},description:"Lowest to Highest."},function(){te(this,{reverse:!1},!1)}),new t.SimpleCommand("sortDescending",h,{label:"Sort Descending",scopedLabels:{sort:"Descending"},description:"Highest to Lowest."},function(){te(this,{reverse:!0},!1)}),new t.SimpleCommand("sortCustom",h,{label:"Custom Sort…",scopedLabels:{sort:"Custom…"},description:"Choose more options, such as sorting by multiple columns or rows, and case-sensitive sorts."},function(){te(this,{},!0)}),new t.Command("protectionSheetToggle",h,{label:"Protect Sheet",scopedLabels:{sheet:"Protected"},description:"Prevent unwanted changes from others by limiting their ability to edit.\nFor example, you can prevent people from editing locked cells or making formatting changes."}),new t.Command("formatSheetTabColor",h,{label:"Tab Color",description:"Color the tab to help differentiate for other sheets."}),new t.Command("formatCellStyle",h,{label:"Cell Styles",scopedLabels:{cellStyle:"Apply"},description:"A colorful style is a great way to make important data stand out on the sheet."},function(e){j(this,{named:e.getName()},!0)}),new t.Command("formatTableStyle",h,{label:"Format as Table",scopedLabels:{table:"Apply (Keep Styles)"},description:"Create a table or apply style to the current table."},function(e){X(this,e)}),new t.Command("formatTableStyleClearCellStyles",h,{label:"Format as Table (Clear Styles)",scopedLabels:{table:"Apply (Clear Styles)"},description:"Create a table or apply style to the current table and clears all cell styles."},function(e){X(this,e,!0)}),new t.Command("formatTableStyleClearTableStyle",h,{label:"Clear Table Style",scopedLabels:{table:"Clear Style"},description:"Remove all the styling that is specific for the table."},function(){X(this,{name:null},!0)}),new t.Command("setDefaultTableStyle",h,{label:"Set Default Table Style",scopedLabels:{table:"Set As Default"},description:"Sets the default table style used when a table is inserted."},G),new t.Command("deleteTableStyle",h,{label:"Delete Table Style",scopedLabels:{table:"Delete"},description:"Remove the current table style."},_),new t.Command("formatBorder",h,{label:"Border",description:"Create an outline border."},function(e){j(this,{border:e})}),new t.Command("formatFillColor",h,{label:"Fill Color",description:"Color the background of the cells to make them stand out."},function(e){j(this,{fill:e})}),new t.Command("formatFontColor",h,{label:"Font Color",description:"Change the color of your text."},function(e){j(this,{font:{fill:e}})}),new t.Command("formatBoldToggle",h,{label:"Bold",description:"Toggle bold formatting of text.",shortcut:[{key:"B",modifiers:[t.KeyModifiers.Ctrl]},{key:"2",modifiers:[t.KeyModifiers.Ctrl]}]}),new t.Command("formatItalicToggle",h,{label:"Italic",description:"Toggle italic formatting of text.",shortcut:[{key:"I",modifiers:[t.KeyModifiers.Ctrl]},{key:"3",modifiers:[t.KeyModifiers.Ctrl]}]}),new t.Command("formatUnderlinedToggle",h,{label:"Underline",scopedLabels:{underline:"Single"},description:"Underline the text.",shortcut:[{key:"u",modifiers:[t.KeyModifiers.Ctrl]},{key:"4",modifiers:[t.KeyModifiers.Ctrl]}]}),new t.Command("formatUnderlinedDoubleToggle",h,{label:"Double Underline",scopedLabels:{underline:"Double"},description:"Double underline the text."}),new t.Command("formatUnderlinedAccountingToggle",h,{label:"Accounting Underline",scopedLabels:{underline:"Accounting"},description:"Use accounting underline for the text."}),new t.Command("formatUnderlinedAccountingDoubleToggle",h,{label:"Double Accounting Underline",scopedLabels:{underline:"Double Accounting"},description:"Use accounting double underline the text."}),new t.Command("formatStrikeThroughToggle",h,{label:"Strikethrough",description:"Toggle strike-through formatting of text.",shortcut:{key:"5",modifiers:[t.KeyModifiers.Ctrl]}}),new t.Command("formatSuperscriptToggle",h,{label:"Superscript",description:"Format your text to be smaller and sit at the top of the line."}),new t.Command("formatSubscriptToggle",h,{label:"Subscript",description:"Format your text to be smaller and sit at the bottom of the line."}),new t.Command("formatAlignTopToggle",h,{label:"Align Top",description:"Align text to the top."}),new t.Command("formatTextOverflowVisibleToggle",h,{label:"Overflow Text",description:"Overflow text to the next cells."}),new t.Command("formatTextOverflowWrapToggle",h,{label:"Wrap Text",description:"Wrap text with the existing cell and increase the height as required."}),new t.Command("formatTextOverflowClipToggle",h,{label:"Clip Text",description:"Clip text that falls outside of the existing cell."}),new t.Command("formatTextOverflowShrinkToggle",h,{label:"Shrink Text",description:"Shrink the text font to fit within existing cell."}),new t.Command("formatTextOverflowEllipsisToggle",h,{label:"Ellipsis Text",description:"Add a trailing '…' to the text to indicate text is partially hidden."}),new t.Command("formatAlignMiddleToggle",h,{label:"Align Middle",description:"Align text so that it is centered between the top and bottom of the cell."}),new t.Command("formatAlignBottomToggle",h,{label:"Align Bottom",description:"Align text to the bottom."}),new t.Command("formatAlignJustifyVerticalToggle",h,{label:"Justify Vertically",description:"Each 'word' in each line of text inside the cell is evenly distributed across the height of the cell."}),new t.Command("formatAlignDistributedVerticalToggle",h,{label:"Distribute Vertically",description:"Justify your content vertically."}),new t.Command("formatAlignLeftToggle",h,{label:"Align Left",description:"Align your content to the left."}),new t.Command("formatAlignCenterToggle",h,{label:"Align Center",description:"Center your content."}),new t.Command("formatAlignRightToggle",h,{label:"Align Right",description:"Align your content to the right."}),new t.Command("formatAlignJustifyToggle",h,{label:"Align Justify",description:"Justify your content."}),new t.Command("formatAlignCenterContinuousToggle",h,{label:"Center Across",description:"Center your content across multiple cells."}),new t.Command("formatAlignFillToggle",h,{label:"Fill Across",description:"Repeat the value to fill the entire cell."}),new t.Command("formatAlignDistributedHorizontalToggle",h,{label:"Distribute Horizontally",description:"Each 'word' in each line of text inside the cell is evenly distributed across the width of the cell."}),new t.SimpleCommand("formatFontSizeIncrease",h,{label:"Increase Font Size",description:"Make your text a bit bigger.",shortcut:{key:">",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,e=>({font:{size:c(e.getFont().getSize(),!0)}}))}),new t.SimpleCommand("formatFontSizeDecrease",h,{label:"Decrease Font Size",description:"Make your text a bit smaller.",shortcut:{key:"<",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,e=>({font:{size:c(e.getFont().getSize(),!1)}}))}),new t.Command("formatFontFamily",h,{label:"Font",description:"Select the font your text."},function(e){j(this,{font:{family:e}})}),new t.Command("formatFontSize",h,{label:"Font Size",description:"Change the size of your text."},function(e){j(this,{font:{size:e}})}),new t.Command("formatNumberDialog",h,{label:"Custom Number Format",scopedLabels:{numberFormat:"Custom"},description:"Create a custom number format.",shortcut:[{key:"1",modifiers:[t.KeyModifiers.Ctrl]},{key:"1",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}]},function(e,t){const n=this,o={initialValue:e??t.state(),context:t.context(),onInputOption:(e,t)=>{j(n,{numberFormat:e})}};m.showWindow?.("numberFormat",o)}),new t.Command("formatNumberFormat",h,{label:"Number Format",description:"Choose the format for your cells, such as percentage, currency, date or time."},function(e){j(this,{numberFormat:e})}),new t.Command("formatNumberFormatGeneralStyle",h,{label:"General Style",description:"Remove all specific formatting.",shortcut:{key:"Backquote",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,{numberFormat:e.NumberFormat.Type.General})}),new t.Command("formatNumberFormatNumberStyle",h,{label:"Number Style",description:"Format as number with two decimals and comma.",shortcut:{key:"1",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,{numberFormat:"#,##0.00"})}),new t.Command("formatNumberFormatTimeStyle",h,{label:"Time Style",description:"Format as time with hour and minute, and AM or PM.",shortcut:{key:"2",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,{numberFormat:"h:mm AM/PM"})}),new t.Command("formatNumberFormatDateStyle",h,{label:"Date Style",description:"Format as date with day, month, and year.",shortcut:{key:"3",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,{numberFormat:"d-mmm-yy"})}),new t.Command("formatNumberFormatAccountingStyle",h,{label:"Accounting Style",description:"Format as Dollars, Euros, or other currency.",shortcut:{key:"4",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(e){j(this,{numberFormat:e??'_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)'})}),new t.Command("formatNumberFormatPercentStyle",h,{label:"Percent Style",description:"Format as a percent with no decimal places.",shortcut:{key:"5",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,{numberFormat:"0%"})}),new t.Command("formatNumberFormatScientificStyle",h,{label:"Scientific Style",description:"Format as a scientific number with two decimal places .",shortcut:{key:"6",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){j(this,{numberFormat:"0.00E+00"})}),new t.Command("formatNumberFormatCommaStyle",h,{label:"Comma Style",description:"Format with a thousands separator.",shortcut:{key:",",modifiers:[t.KeyModifiers.Ctrl]}},function(){j(this,{numberFormat:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)'})}),new t.Command("formatNumberFormatIncreaseDecimal",h,{label:"Increase Decimal",description:"Show more decimal places for a more precise value."},function(){j(this,t=>({numberFormat:e.NumberFormat.Parser.adjustDecimalPlaces(t.getNumberFormat(),1)}))}),new t.Command("formatNumberFormatDecreaseDecimal",h,{label:"Decrease Decimal",description:"Show few decimal places."},function(){j(this,t=>({numberFormat:e.NumberFormat.Parser.adjustDecimalPlaces(t.getNumberFormat(),-1)}))}),new t.Command("displayPlaceholdersToggle",h,{label:"Display Placeholders",description:"Switch between hiding objects, displaying objects, and displaying placeholders for objects.",shortcut:{key:"6",modifiers:[t.KeyModifiers.Ctrl]}}),new t.SimpleCommand("noOp",h,{label:"Do nothing",description:"Do Nothing.",shortcut:{key:"7",modifiers:[t.KeyModifiers.Ctrl]}},function(){}),new t.Command("displayOutlineSymbolsToggle",h,{label:"Display Outline Symbols",description:"Display or hide the outline symbols.",shortcut:{key:"8",modifiers:[t.KeyModifiers.Ctrl]}}),new t.Command("hideRows",h,{label:"Hide Rows",description:"Hide the rows.",shortcut:{key:"9",modifiers:[t.KeyModifiers.Ctrl]}}),new t.Command("unhideRows",h,{label:"Unhide Rows",description:"Unhide the rows.",shortcut:{key:"(",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}}),new t.Command("hideColumns",h,{label:"Hide Columns",description:"Hide the columns.",shortcut:[{key:"0",modifiers:[t.KeyModifiers.Ctrl]},{key:"0",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}]}),new t.Command("unhideColumns",h,{label:"Unhide Columns",description:"Unhide the columns.",shortcut:{key:")",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}}),new t.Command("quickFormulaSum",h,{label:"Quick Sum",scopedLabels:{quickFormula:"Sum"},description:"Quick sum of the cells.",shortcut:{key:"=",modifiers:[t.KeyModifiers.Alt]}},function(){Z(this,"SUM")}),new t.Command("quickFormulaAverage",h,{label:"Quick Average",scopedLabels:{quickFormula:"Average"},description:"Quick average of the cells."},function(){Z(this,"AVERAGE")}),new t.Command("quickFormulaCount",h,{label:"Quick Count",scopedLabels:{quickFormula:"Count Numbers"},description:"Quick count of the cells."},function(){Z(this,"COUNT")}),new t.Command("quickFormulaMax",h,{label:"Quick Max",scopedLabels:{quickFormula:"Max"},description:"Quick maximum of the cells."},function(){Z(this,"MAX")}),new t.Command("quickFormulaMin",h,{label:"Quick Min",scopedLabels:{quickFormula:"Min"},description:"Quick minimum of the cells."},function(){Z(this,"MIN")}),new t.Command("startEditCurrentTime",h,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){x?.({text:s.createTemporaryCell({value:a(),style:{numberFormat:"Medium Time"}}).toText()})}),new t.Command("startEditCurrentDate",h,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[t.KeyModifiers.Ctrl]}},function(){x?.({text:s.createTemporaryCell({value:a(),style:{numberFormat:"Short Date"}}).toText()})}),new t.SimpleCommand("sheetZoomOut",h,{label:"Zoom Out",description:"Zoom out to see less detail but more area.",shortcut:[{key:"-",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]},{key:"NumpadSubtract",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}]}),new t.SimpleCommand("sheetZoomIn",h,{label:"Zoom In",description:"Zoom in to see more detail but less area.",shortcut:[{key:"=",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]},{key:"NumpadAdd",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}]}),new t.SimpleCommand("sheetZoom100",h,{label:"Zoom 100%",description:"Zoom document to 100%.",shortcut:{key:"o",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}}),new t.Command("insertFunction",h,{label:"Insert Function",disabled:!0,scopedLabels:{insert:"Function",quickFormula:"More Functions..."},description:"Work with the formula in the current cell.",shortcut:{key:"F3",modifiers:[t.KeyModifiers.Shift]}},function(e,t){console.log("insertFunction")}),new t.Command("updateHyperlink",h,{label:"Link",scopedLabels:{contextMenu:"Insert Link…",insert:"Link…",hyperlink:"Edit"},description:"Create a hyperlink to either another webpage or another location within this document.",context:()=>L,shortcut:[{key:"K",modifiers:[t.KeyModifiers.Ctrl]},{key:"K",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}]},async function(e,t){const n=this,o={context:t.context(),onUpdateHyperlink:(e,t)=>{B(n,e,t)}};m.showWindow?.("hyperlink",o)}),new t.Command("openHyperlink",h,{label:"Open Link",scopedLabels:{hyperlink:"Open"},shortcut:{key:"Enter",modifiers:[t.KeyModifiers.Ctrl]},description:"Open the hyperlink or goto another location within this document.",context:()=>L},async(e,t)=>{const n=t.context()();if(!n)return;const o=n.getHyperlink();if(o)try{await o.open()}catch(e){m?.showError?.(e)}}),new t.Command("deleteHyperlink",h,{label:"Delete Link",scopedLabels:{hyperlink:"Delete"},description:"Remove the hyperlink.",context:()=>L},function(e,t){B(this,null,null)}),new t.SimpleCommand("insertNote",h,{label:"Insert Note",scopedLabels:{contextMenu:"Insert Note…",insert:"Note"},shortcut:{key:"F2",modifiers:[t.KeyModifiers.Shift]},description:"Add a note to the cell."},(e,t)=>{((e,t)=>{e?.showMessage?.(n.jsxs("p",{style:{marginTop:"0px",marginBottom:"0px"},children:[t," is not yet implemented.",n.jsx("br",{}),n.jsx("br",{}),"Please see the ",n.jsx("a",{style:{whiteSpace:"nowrap"},href:"https://www.sheetxl.com/docs/introduction/roadmap",target:"_blank",rel:"noopener",children:"SheetXL Roadmap"}),"."]}))})(m,t.label())}),new t.Command("updateComments",h,{label:"Comments",scopedLabels:{contextMenu:"Insert Comments…",insert:"Comments…"},shortcut:{key:"M",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]},description:"Add a comment to the current cell.",context:()=>L},async function(e,t){const n=this,o={context:t.context(),onUpdateComments:e=>{V(n,e)}};m.showWindow?.("comments",o)}),new t.Command("deleteComments",h,{label:"Delete Comments",description:"Remove any comments.",context:()=>L},function(e,t){V(this,null)}),new t.Command("insertImageFromFile",h,{label:"Insert Image",scopedLabels:{contextMenu:"Insert Image…",insert:"Image…",insertImage:"From Device…"},description:"Insert a picture from your device."},async function(e=null){let t=null,n=null;"string"==typeof e?n=e:t=e?.file?e.file:e,(t||(t=await o.CommonUtils.openFileDialog(n??"image/*"),t))&&await ie(this,{file:t},e?.options)}),new t.Command("insertImageFromURL",h,{label:"Insert Image From Web",scopedLabels:{insert:"Image From Web",insertImage:"From the Web…"},description:"Insert a picture from the web."},async function(e){if(!e){const t=await(m?.showInputOptions?.({title:"Insert Image from Web",description:"Enter the web address for the image to insert.",inputLabel:"Address",initialValue:"https://picsum.photos/360",inputProps:{style:{minWidth:"440px"}},options:["Insert"]}));if("Insert"!==t.option)return;e=t.input}e&&ie(this,{fetch:e})}),new t.SimpleCommand("insertTable",h,{label:"Insert Table",scopedLabels:{contextMenu:"Insert Table…",insert:"Table"},description:"Create a table. Tables enable auto formatting, sorting, filtering, and other advanced features.",shortcut:[{key:"L",modifiers:[t.KeyModifiers.Ctrl]},{key:"T",modifiers:[t.KeyModifiers.Alt,t.KeyModifiers.Ctrl]}]},function(){X(this)}),new t.Command("editTable",h,{label:"Edit Table…",scopedLabels:{table:"Edit…",namedItem:"Edit…"},description:"Edit the table to adjust formatting, sorting, filtering, or other advanced features."},function(e){let t=null,n=!1;e.isITable?t=e:e.getValue()&&(t=e.getValue(),n=!0),Q(this,t,n)}),new t.Command("deleteTable",h,{label:"Delete Table",scopedLabels:{delete:"Table",table:"Delete",namedItem:"Delete"},description:"Remove the table.\n\nThe table and table specific styling will be removed but the values will be preserved."},function(e){ee(this,e,!0)}),new t.Command("convertTableToRange",h,{label:"Convert To Range",description:"Convert the table into a normal range of cells.\n\nThe values and the formatting are preserved."},function(e){ee(this,e,!1)}),new t.Command("tableTotalRowToggle",h,{label:"Toggle Table Total Row",description:"Toggle Total Row on/off.",scopedLabels:{table:"Total Row"},shortcut:{key:"T",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}},function(){const e=this.context().table();e&&e.setShowTotals(!e.getShowTotals())}),new t.Command("tableHeaderRowToggle",h,{label:"Toggle Table Header Row",description:"Toggle Header Row on/off.",scopedLabels:{table:"Header Row"}},function(){const e=this.context().table();e&&e.setShowHeaders(!e.getShowHeaders())}),new t.Command("autoFilterToggle",h,{label:"Toggle Filter",scopedLabels:{filter:"Filter"},description:"Toggle Auto Filter on/off.",shortcut:{key:"L",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){const e=this.context().table();e&&e.setShowFilterButton(!e.getShowFilterButton())}),new t.Command("autoFilterReapply",h,{label:"Reapply Filter",scopedLabels:{filter:"Reapply"},description:"Reapply the filter and sort with the latest changes.",shortcut:{key:"L",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}}),new t.Command("autoFilterClear",h,{label:"Clear Filter",scopedLabels:{filter:"Clear"},description:"Clear the filters criteria from the current filter.."}),new t.SimpleCommand("startEditValueAbove",h,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:"Quote",modifiers:[t.KeyModifiers.Ctrl]},{key:'"',modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}]},se),new t.Command("formatPainterToggle",h,{label:"Format Painter",description:"Apply style to another part of your workbook."}),new t.SimpleCommand("insertCells",h,{label:"Insert Cells",scopedLabels:{insertCells:"At Selection"},description:"Inserts cells at the current selection.",shortcut:{key:"=",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){H(this)}),new t.SimpleCommand("insertCellsShiftRight",h,{label:"Insert Cells (Shift Right)",scopedLabels:{insertCells:"Shift Right"},description:"Insert cells to the left and shift the current cells to the right."},function(){H(this,e.IRange.Orientation.Column)}),new t.SimpleCommand("insertCellsShiftDown",h,{label:"Insert Cells (Shift Down)",scopedLabels:{insertCells:"Shift Down"},description:"Insert cells above and shift the current cells downward."},function(){return H(this,e.IRange.Orientation.Row)}),new t.SimpleCommand("insertRows",h,{label:"Insert Row(s)",scopedLabels:{insertCells:"Row(s)"},description:"Insert a row above the current position."},function(){return H(this,e.IRange.Orientation.Row,!0)}),new t.SimpleCommand("insertColumns",h,{label:"Insert Column(s)",scopedLabels:{insertCells:"Column(s)"},description:"Insert a column before the current position."},function(){return H(this,e.IRange.Orientation.Column,!0)}),new t.SimpleCommand("insertRowsAfter",h,{label:"Insert Row Below",scopedLabels:{insertCells:"Row Below"},description:"Insert a row below the current position."},function(){return H(this,e.IRange.Orientation.Row,!0,!0)}),new t.SimpleCommand("insertColumnsAfter",h,{label:"Insert Column After",scopedLabels:{insertCells:"Column After"},description:"Insert a column after the current position."},function(){return H(this,e.IRange.Orientation.Column,!0,!0)}),new t.SimpleCommand("deleteCells",h,{label:"Delete Cells",scopedLabels:{deleteCells:"At Selection"},description:"Delete the cells.",shortcut:{key:"-",modifiers:[t.KeyModifiers.Ctrl]}},function(){return le(this)}),new t.SimpleCommand("deleteCellsShiftUp",h,{label:"Delete Cells (Shift Up)",scopedLabels:{deleteCells:"Shift up"},description:"Delete cells the current current downward."},function(){return le(this,e.IRange.Orientation.Row)}),new t.SimpleCommand("deleteCellsShiftLeft",h,{label:"Delete Cells (Shift Left)",scopedLabels:{deleteCells:"Shift Left"},description:"Delete cells the current cells to the right."},function(){return le(this,e.IRange.Orientation.Column)}),new t.SimpleCommand("deleteRows",h,{label:"Delete Rows",scopedLabels:{deleteCells:"Rows"},description:"Delete the rows at the current selection."},function(){return le(this,e.IRange.Orientation.Row,!0)}),new t.SimpleCommand("deleteColumns",h,{label:"Delete Columns",scopedLabels:{deleteCells:"Columns"},description:"Delete the columns at the current selection."},function(){return le(this,e.IRange.Orientation.Column,!0)}),new t.SimpleCommand("flashFill",h,{label:"Flash Fill",description:"Do a flash fill.",shortcut:[{key:"e",modifiers:[t.KeyModifiers.Ctrl]},{key:"e",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Alt]}]}),new t.SimpleCommand("fillDown",h,{label:"Fill Down",description:"Copy the top-most value from the selection to the bottom of the selection.",shortcut:{key:"d",modifiers:[t.KeyModifiers.Ctrl]}},function(){return ae(this,e.IRange.Direction.Down)}),new t.SimpleCommand("fillRight",h,{label:"Fill Right",description:"Copy the left-most value from the selection to the right of the selection.",shortcut:[{key:"r",modifiers:[t.KeyModifiers.Ctrl]}]},function(){return ae(this,e.IRange.Direction.Right)}),new t.SimpleCommand("fillUp",h,{label:"Fill Up",description:"Copy the bottom-most value from the selection to the top of the selection."},function(){return ae(this,e.IRange.Direction.Up)}),new t.SimpleCommand("fillLeft",h,{label:"Fill Left",description:"Copy the right-most value from the selection to the left of the selection."},function(){return ae(this,e.IRange.Direction.Left)}),new t.SimpleCommand("formatBorderAddOutline",h,{label:"Add Outline Border",description:"Apply an outline border.",shortcut:{key:"7",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){return j(this,{border:{left:{style:e.IBorder.StrokeStyle.Thin,color:null},top:{style:e.IBorder.StrokeStyle.Thin,color:null},right:{style:e.IBorder.StrokeStyle.Thin,color:null},bottom:{style:e.IBorder.StrokeStyle.Thin,color:null}}})}),new t.SimpleCommand("formatBorderClearOutline",h,{label:"Remove Outline Border",description:"Remove the outline border.",shortcut:{key:"_",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){return j(this,{border:null})}),new t.SimpleCommand("formatIndentDecrease",h,{label:"Decrease Indent",description:"Move your content closer to the border."},function(){return j(this,e=>{const t=e.getAlignment().getIndent()-1;return{alignment:{indent:t>0?t:0}}})}),new t.SimpleCommand("formatIndentIncrease",h,{label:"Increase Indent",description:"Move your content further from the border."},function(){return j(this,t=>{const n={alignment:{indent:t.getAlignment().getIndent()+1}};return t.getAlignment().getHorizontal()===e.ITextFrame.HorizontalAlignment.General&&(n.alignment.horizontal=e.ITextFrame.HorizontalAlignment.Left),n})}),new t.Command("mergeToggle",h,{label:"Merge",description:"Combine and center the contents into a single cell.",shortcut:{key:"m",modifiers:[t.KeyModifiers.Ctrl]}}),new t.SimpleCommand("mergeHorizontal",h,{label:"Merge Horizontally",description:"Combine the contents into horizontal rows."}),new t.SimpleCommand("mergeVertical",h,{label:"Merge Vertically",description:"Combine the contents into vertical columns."}),new t.SimpleCommand("unmerge",h,{label:"Unmerge",description:"Split merged cells into multiple cells."}),new t.SimpleCommand("clearContents",h,{label:"Clear Contents",scopedLabels:{clear:"Contents"},description:"Clear only the contents in the cells.\n\nThe formatting is not cleared.",shortcut:{key:"Delete"}},function(){P(this,e.ICell.Content.Values)}),new t.SimpleCommand("clearFormats",h,{label:"Clear Formats",scopedLabels:{clear:"Formats"},description:"Clear only the formatting that is applied to the cells."},function(){P(this,e.ICell.Content.Formats)}),new t.SimpleCommand("clearHyperlinks",h,{label:"Clear Hyperlinks",scopedLabels:{clear:"Hyperlinks"},description:"Clear only the hyperlinks in the cells."},function(){P(this,e.ICell.Content.Hyperlinks)}),new t.SimpleCommand("clearComments",h,{label:"Clear Comments",scopedLabels:{clear:"Comments"},description:"Clear the comments from the cells."},function(){P(this,e.ICell.Content.Comments)}),new t.SimpleCommand("clearAll",h,{label:"Clear All",scopedLabels:{clear:"All"},description:"Clears everything from the cells.\n\nAll contents and formatting are removed.",shortcut:{key:"Delete",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){P(this)}),new t.Command("freezeToggle",h,{label:"Freeze Panes",description:"Keep rows and columns visible while the rest of the sheet scrolls (based on current selection)."}),new t.Command("freezeToggleHorizontal",h,{label:"Freeze Top Rows",description:"Keep the top rows visible while scrolling through the rest of the sheet."}),new t.Command("freezeToggleVertical",h,{label:"Freeze Left Columns",description:"Keep the left columns visible while scrolling through the rest of the sheet."}),new t.SimpleCommand("unfreeze",h,{label:"Unfreeze Panes",description:"Unfreeze both the rows and columns."}),new t.SimpleCommand("autoFitRows",h,{label:"Autofit Rows",description:"Adjust the rows to the best height."}),new t.SimpleCommand("autoFitColumns",h,{label:"Autofit Columns",description:"Adjust the columns to the best width."})],[]),me=r.useMemo(()=>{let e=null;return e=g?g.createChildGroup(h,"sheet",!1):new t.CommandGroup(h,"sheet"),e.addCommands(he,!0),e},[g,he]),[fe,pe]=r.useState(!1),[ve,Ce]=r.useState(!1);r.useEffect(()=>{if(y.current!==s||!b)return;const e=b.getCoords(),t=s.getTables().search({address:e[0]});D(e=>o.CommonUtils.isEqualArrays(e,t)?e:t),v&&t[0]&&o.CoordUtils.isCellWithinRange(v,t[0].getRange().getCoords())?K(t[0]??null):K(null);const n=s.getSelectedRanges(),r=n.getMerges().length>0,l=n.isOverlapping();let i=!0;for(let t=0;i&&t<e.length;t++)i=o.CoordUtils.isSingleCell(e[t]);Ce(l),pe(0===t.length&&!l&&(r||!i))},[ue,b,s]),t.useCommands(g,null,{onChange:()=>{const e=!s.getProtection().isFormatCellsAllowed(),t="formatPainter"===E.getMode()?.key;me.getCommand("formatPainterToggle").update({disabled:e||!g?.getCommand("copy"),state:()=>t}).updateCallback(()=>{if(t)return void E.setMode(null);return me.getCommand("copy").execute({editMode:{key:"formatPainter",description:"Use the mouse to apply the copied format to another selection.",cursor:"url(\"data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='black' fill='white'/%3E%3C/g%3E%3C/svg%3E%0A\") 7 12, pointer"}})})}},[E,de,g]),W(s.getView(),{onFreezeSplitChange:()=>{ge()}}),W(s.getSelection(),{onChange:()=>{N()}});const be=()=>{me.getCommand("sheetViewFormatGridlinesColor").update({state:()=>s.getView().getGridLineColor(),context:()=>({onColorSelect:e=>{},darkMode:u.darkMode,autoColor:s.getStyles().parseColor(u.strokeFill),schemeLookup:s.getStyles().schemeLookup(),recentColors:()=>s.getStyles().recentColors(),addRecentColor:e=>s.getStyles().addRecentColor(e),clearRecentColors:()=>s.getStyles().clearRecentColors()})}),me.getCommand("formatSheetTabColor").updateCallback(e=>{s.setTabColor(e)}).update({state:()=>s?.getTabColor()??$,context:()=>({onColorSelect:e=>{},darkMode:u.darkMode,autoColor:$,schemeLookup:s.getStyles().schemeLookup(),recentColors:()=>s.getStyles().recentColors(),addRecentColor:e=>s.getStyles().addRecentColor(e),clearRecentColors:()=>s.getStyles().clearRecentColors()})})},we=()=>{me.getCommand("formatBorder").update({context:()=>({onBorderSelect:e=>{R(e)},darkMode:u.darkMode,quickBorder:S,autoColor:s.getStyles().getNormal().getFont().getFill(),autoStyle:e.IBorder.StrokeStyle.Thin,createTemporaryBorder:e=>s.getStyles().getNormal().createTemporaryStyle({border:e}).getBorder(),schemeLookup:s.getStyles().schemeLookup()})})};r.useEffect(()=>{we()},[S]),r.useEffect(()=>{const e=!s.getProtection().isInsertHyperlinksAllowed();me.getCommand("openHyperlink").update({disabled:!L().getHyperlink()}),me.getCommand("deleteHyperlink").update({disabled:e||!L().getHyperlink()});const t=L().getHyperlink()?"Edit":"Insert",n="Link";me.getCommand("updateHyperlink").update({label:()=>(L().getHyperlink(),`${t} ${n}`),scopedLabels:{contextMenu:`${t} ${n}…`,insert:`${n}…`,hyperlink:`${t}…`},disabled:e})},[L()?.getHyperlink(),de]),r.useEffect(()=>{const e=L().getComments(),t=()=>e?"Edit":"Insert",n=()=>e?"Comments":"Comment";me.getCommand("updateComments").update({label:()=>`${t()} ${n()}`,scopedLabels:{contextMenu:`${t()} ${n()}…`,insert:`${n()}…`}})},[L()?.getComments(),de]),W(s,{onViewChange:()=>{const t=s.getView();me.getCommand("sheetViewToggleFormulaView").update({state:t.isShowFormulas()}),me.getCommand("sheetViewToggleShowZeros").update({state:t.isShowZeros()}),me.getCommand("gridlinesToggle").update({state:t.isShowColumnGridlines()||t.isShowRowGridlines()}),me.getCommand("sheetViewToggleGridlinesColumns").update({state:t.isShowColumnGridlines()}),me.getCommand("sheetViewToggleGridlinesRows").update({state:t.isShowRowGridlines()}),me.getCommand("sheetViewToggleShowHeadings").update({state:t.isShowColumnHeaders()||t.isShowRowHeaders()}),me.getCommand("sheetViewToggleShowHeadingColumns").update({state:t.isShowColumnHeaders()}),me.getCommand("sheetViewToggleShowHeadingRows").update({state:t.isShowRowHeaders()}),me.getCommand("sheetViewToggleShowHeadingsNumeric").update({state:()=>s.getView().getColumnHeaderStyle()===e.ISheetView.HeaderTextStyle.Zero&&s.getView().getRowHeaderStyle()===e.ISheetView.HeaderTextStyle.Zero}),be()},onTabColorChange:()=>{be()},onMergesChange:()=>{ge()},onMovablesChange:()=>{ge()},onTablesChange:()=>{ge()},onProtectionChange:()=>{ge(),ce()},onStyleChange:()=>{be(),we(),ge()}}),r.useEffect(()=>{be(),we()},[u]),r.useEffect(()=>{const e=!s.getProtection().isFormatCellsAllowed(),t=A.length>0&&!U||e,n=J(U),o={context:n};me.getCommand("editTable").update(o),me.getCommand("deleteTable").update(o),me.getCommand("convertTableToRange").update(o);const r={context:n,disabled:t};me.getCommand("formatTableStyle").update({label:U?"Apply Table Style":"Format As Table",...r}),me.getCommand("formatTableStyleClearCellStyles").update(r),me.getCommand("deleteTableStyle").update(r),me.getCommand("convertTableToRange").update(r),me.getCommand("insertTable").update({disabled:t||A.length>0});const l={context:n,disabled:t||0===A.length};me.getCommand("tableHeaderRowToggle").update(l),me.getCommand("tableTotalRowToggle").update(l),me.getCommand("autoFilterToggle").update(l),me.getCommand("formatTableStyleClearTableStyle").update({...l,disabled:l.disabled||!U||null===U.getStyleOptions().name})},[U,A,de]),r.useEffect(()=>{me.getCommand("sheetZoomOut").updateCallback(()=>{s.getView().update({zoomScale:o.CommonUtils.findNextStep(s.getView().getZoomScale(),!1)})}),me.getCommand("sheetZoomIn").updateCallback(()=>{s.getView().update({zoomScale:o.CommonUtils.findNextStep(s.getView().getZoomScale())})}),me.getCommand("sheetZoom100").updateCallback(()=>{s.getView().update({zoomScale:100})}),me.getCommand("gridlinesToggle").updateCallback(()=>{const e=s.getView().isShowColumnGridlines()&&s.getView().isShowRowGridlines();s.getView().update({showColumnGridlines:!e,showRowGridlines:!e})}),me.getCommand("sheetViewToggleGridlinesRows").updateCallback(()=>{s.getView().update({showRowGridlines:!s.getView().isShowRowGridlines()})}),me.getCommand("sheetViewToggleGridlinesColumns").updateCallback(()=>{s.getView().update({showColumnGridlines:!s.getView().isShowColumnGridlines()})}),me.getCommand("sheetViewFormatGridlinesColor").updateCallback(e=>{s.getView().update({gridLineColor:e})}),me.getCommand("sheetViewToggleShowHeadings").updateCallback(()=>{const e=s.getView().isShowColumnHeaders()&&s.getView().isShowRowHeaders();s.getView().update({showColumnHeaders:!e,showRowHeaders:!e})}),me.getCommand("sheetViewToggleShowHeadingColumns").updateCallback(()=>{s.getView().update({showColumnHeaders:!s.getView().isShowColumnHeaders()})}),me.getCommand("sheetViewToggleShowHeadingRows").updateCallback(()=>{s.getView().update({showRowHeaders:!s.getView().isShowRowHeaders()})}),me.getCommand("sheetViewToggleShowHeadingsNumeric").updateCallback(()=>{const t=s.getView().getColumnHeaderStyle()===e.ISheetView.HeaderTextStyle.Zero&&s.getView().getRowHeaderStyle()===e.ISheetView.HeaderTextStyle.Zero;s.getView().update({columnHeaderStyle:t?e.ISheetView.HeaderTextStyle.A1:e.ISheetView.HeaderTextStyle.Zero,rowHeaderStyle:t?e.ISheetView.HeaderTextStyle.One:e.ISheetView.HeaderTextStyle.Zero})}),me.getCommand("sheetViewToggleFormulaView").updateCallback(()=>{s.getView().update({showFormulas:!s.getView().isShowFormulas()})}),me.getCommand("sheetViewToggleShowZeros").updateCallback(()=>{s.getView().update({showZeros:!s.getView().isShowZeros()})})},[s]),r.useEffect(()=>{const e=s.getView().getFreezePanes(),t=()=>0!==e.coords.rowIndex,n=()=>0!==e.coords.colIndex,o=()=>0!==e.coords.rowIndex||0!==e.coords.colIndex;me.getCommand("freezeToggle").updateCallback(()=>{o()?s.getView().setFreezePanes(null):o()?n()?s.getView().setFreezePanes({coords:{rowIndex:v.rowIndex}}):t()&&s.getView().setFreezePanes({coords:{colIndex:v.colIndex}}):s.getView().setFreezePanes({coords:v})}).update({state:o,disabled:()=>!v||!o()&&0===v.rowIndex&&0===v.colIndex}),me.getCommand("freezeToggleHorizontal").updateCallback(()=>{s.getView().setFreezePanes({coords:{rowIndex:t()?0:v.rowIndex}})}).update({state:t,disabled:()=>!v||!t()&&0===v.rowIndex}),me.getCommand("freezeToggleVertical").updateCallback(()=>{s.getView().setFreezePanes({coords:{colIndex:n()?0:v.colIndex}})}).update({state:n,disabled:()=>!v||!n()&&0===v.colIndex}),me.getCommand("unfreeze").updateCallback(()=>{s.getView().setFreezePanes(null)}).update({disabled:()=>!o()})},[ue,v,s,u]);const ye=L().getStyle(),xe=ye.getFont(),qe=ye.getAlignment(),Se=qe.getHorizontal(),Re=qe.getVertical(),ke=qe.getOverflow(),Me=qe.getRotation();return r.useEffect(()=>{me.getCommand("formatCellStyle").update({context:()=>({styles:()=>s.getStyles(),named:()=>L().getStyle(!0).getNamed(),bodyStyle:Y,createTemporaryCell:e=>s.createTemporaryCell(e)})}),me.getCommand("formatFillColor").update({state:()=>{let t=null;const n=ye.getFill();return n?.getType()===e.IFill.Type.Solid?t=n.getColor():n?.getType()===e.IFill.Type.Gradient?t=n.getStops()?.[0]?.getColor():n?.getType()===e.IFill.Type.Pattern&&(t=n.getBackground()),t},context:()=>{const e=s.getStyles();return{onColorSelect:e=>{M(e??$)},darkMode:u.darkMode,quickColor:k,autoColor:$,schemeLookup:e.schemeLookup(),recentColors:e.recentColors(),addRecentColor:t=>e.addRecentColor(t),clearRecentColors:()=>e.clearRecentColors()}}}),me.getCommand("formatFontColor").update({state:()=>xe.toJSON()?.fill?xe.getFill():null,context:()=>{const e=s.getStyles();return{onColorSelect:e=>{I(e)},darkMode:u.darkMode,quickColor:T,autoColor:e.getNormal().getFont().getFill(),schemeLookup:e.schemeLookup(),recentColors:e.recentColors(),addRecentColor:t=>e.addRecentColor(t),clearRecentColors:()=>e.clearRecentColors()}}}),me.getCommand("formatNumberFormat").update({state:()=>ye.getNumberFormat(),context:()=>L}),me.getCommand("formatNumberDialog").update({state:()=>ye.getNumberFormat(),context:()=>L}),me.getCommand("formatFontFamily").update({state:()=>xe.getFamily()}),me.getCommand("formatFontSize").update({state:()=>xe.getSize()});const t=function(){const e=xe.getWeight()||0;return!isNaN(e)&&e>500};me.getCommand("formatBoldToggle").updateCallback(function(){j(this,{font:{weight:t()?400:700}})}).update({state:t});const n=function(){return xe.getStyle()===e.IFont.Style.Italic};me.getCommand("formatItalicToggle").updateCallback(function(){j(this,{font:{style:n()?e.IFont.Style.Normal:e.IFont.Style.Italic}})}).update({state:n}),me.getCommand("formatStrikeThroughToggle").updateCallback(function(){j(this,{font:{strike:!xe.getStrike()}})}).update({state:xe.getStrike()}),me.getCommand("formatUnderlinedToggle").updateCallback(function(){j(this,{font:{underline:xe.getUnderline()!==e.IFont.UnderlineStyle.Single?e.IFont.UnderlineStyle.Single:e.IFont.UnderlineStyle.None}})}).update({state:xe.getUnderline()===e.IFont.UnderlineStyle.Single}),me.getCommand("formatUnderlinedDoubleToggle").updateCallback(function(){j(this,{font:{underline:xe.getUnderline()!==e.IFont.UnderlineStyle.Double?e.IFont.UnderlineStyle.Double:e.IFont.UnderlineStyle.None}})}).update({state:xe.getUnderline()===e.IFont.UnderlineStyle.Double}),me.getCommand("formatUnderlinedAccountingToggle").updateCallback(function(){j(this,{font:{underline:xe.getUnderline()!==e.IFont.UnderlineStyle.SingleAccounting?e.IFont.UnderlineStyle.SingleAccounting:e.IFont.UnderlineStyle.None}})}).update({state:xe.getUnderline()===e.IFont.UnderlineStyle.SingleAccounting}),me.getCommand("formatUnderlinedAccountingDoubleToggle").updateCallback(function(){j(this,{font:{underline:xe.getUnderline()!==e.IFont.UnderlineStyle.DoubleAccounting?e.IFont.UnderlineStyle.DoubleAccounting:e.IFont.UnderlineStyle.None}})}).update({state:xe.getUnderline()===e.IFont.UnderlineStyle.DoubleAccounting}),me.getCommand("formatSuperscriptToggle").updateCallback(function(){j(this,{font:{verticalAlign:xe.getVerticalAlignment()!==e.IFont.VerticalAlignment.Super?e.IFont.VerticalAlignment.Super:e.IFont.VerticalAlignment.Baseline}})}).update({state:xe.getVerticalAlignment()===e.IFont.VerticalAlignment.Super}),me.getCommand("formatSubscriptToggle").updateCallback(function(){j(this,{font:{verticalAlign:xe.getVerticalAlignment()!==e.IFont.VerticalAlignment.Sub?e.IFont.VerticalAlignment.Sub:e.IFont.VerticalAlignment.Baseline}})}).update({state:xe.getVerticalAlignment()===e.IFont.VerticalAlignment.Sub});const o=()=>ke===e.ITextFrame.Overflow.Visible;me.getCommand("formatTextOverflowVisibleToggle").updateCallback(function(){j(this,{alignment:{overflow:(o(),e.ITextFrame.Overflow.Visible)}})}).update({state:o});const r=()=>ke===e.ITextFrame.Overflow.Wrap;me.getCommand("formatTextOverflowWrapToggle").updateCallback(function(){j(this,{alignment:{overflow:r()?e.ITextFrame.Overflow.Visible:e.ITextFrame.Overflow.Wrap}})}).update({state:r});const l=function(){return ke===e.ITextFrame.Overflow.Clip};me.getCommand("formatTextOverflowClipToggle").updateCallback(function(){j(this,{alignment:{overflow:l()?e.ITextFrame.Overflow.Visible:e.ITextFrame.Overflow.Clip}})}).update({state:l});const i=function(){return ke===e.ITextFrame.Overflow.Shrink};me.getCommand("formatTextOverflowShrinkToggle").updateCallback(function(){j(this,{alignment:{overflow:i()?e.ITextFrame.Overflow.Visible:e.ITextFrame.Overflow.Shrink}})}).update({state:i});const a=function(){return ke===e.ITextFrame.Overflow.Shrink};me.getCommand("formatTextOverflowEllipsisToggle").updateCallback(function(){j(this,{alignment:{overflow:a()?e.ITextFrame.Overflow.Visible:e.ITextFrame.Overflow.Ellipsis}})}).update({state:a,disabled:!0});const d=function(){return Re===e.ITextFrame.VerticalAlignment.Top};me.getCommand("formatAlignTopToggle").updateCallback(function(){j(this,{alignment:{vertical:d()?e.ITextFrame.VerticalAlignment.Bottom:e.ITextFrame.VerticalAlignment.Top}})}).update({state:d});const c=function(){return Re===e.ITextFrame.VerticalAlignment.Center};me.getCommand("formatAlignMiddleToggle").updateCallback(function(){j(this,{alignment:{vertical:c()?e.ITextFrame.VerticalAlignment.Bottom:e.ITextFrame.VerticalAlignment.Center}})}).update({state:c});const g=function(){return Re===e.ITextFrame.VerticalAlignment.Bottom};me.getCommand("formatAlignBottomToggle").updateCallback(function(){j(this,{alignment:{vertical:(g(),e.ITextFrame.VerticalAlignment.Bottom)}})}).update({state:g});const h=function(){return Re===e.ITextFrame.VerticalAlignment.Justify};me.getCommand("formatAlignJustifyVerticalToggle").updateCallback(function(){j(this,{alignment:{vertical:h()?e.ITextFrame.VerticalAlignment.Bottom:e.ITextFrame.VerticalAlignment.Justify}})}).update({state:h});const m=function(){return Re===e.ITextFrame.VerticalAlignment.Distributed};me.getCommand("formatAlignDistributedVerticalToggle").updateCallback(function(){j(this,{alignment:{vertical:m()?e.ITextFrame.VerticalAlignment.Bottom:e.ITextFrame.VerticalAlignment.Distributed}})}).update({state:m});const f=function(){return Se===e.ITextFrame.HorizontalAlignment.Left};me.getCommand("formatAlignLeftToggle").updateCallback(function(){j(this,{alignment:{horizontal:f()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.Left}})}).update({state:f});const p=function(){return Se===e.ITextFrame.HorizontalAlignment.Center};me.getCommand("formatAlignCenterToggle").updateCallback(function(){j(this,{alignment:{horizontal:p()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.Center}})}).update({state:p});const v=function(){return Se===e.ITextFrame.HorizontalAlignment.CenterContinuous};me.getCommand("formatAlignCenterContinuousToggle").updateCallback(function(){const t={alignment:{horizontal:v()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.CenterContinuous,rotation:null}};j(this,t)}).update({state:v});const C=function(){return Se===e.ITextFrame.HorizontalAlignment.Fill};me.getCommand("formatAlignFillToggle").updateCallback(function(){const t={alignment:{horizontal:C()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.Fill,rotation:null}};j(this,t)}).update({state:C});const b=function(){return Se===e.ITextFrame.HorizontalAlignment.Distributed};me.getCommand("formatAlignDistributedHorizontalToggle").updateCallback(function(){j(this,{alignment:{horizontal:b()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.Distributed}})}).update({state:b});const w=function(){return Se===e.ITextFrame.HorizontalAlignment.Right};me.getCommand("formatAlignRightToggle").updateCallback(function(){j(this,{alignment:{horizontal:w()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.Right}})}).update({state:w});const y=function(){return Se===e.ITextFrame.HorizontalAlignment.Justify};me.getCommand("formatAlignJustifyToggle").updateCallback(function(){j(this,{alignment:{horizontal:y()?e.ITextFrame.HorizontalAlignment.General:e.ITextFrame.HorizontalAlignment.Justify}})}).update({state:y});const x=!s.getProtection().isFormatCellsAllowed(),q=Se===e.ITextFrame.HorizontalAlignment.CenterContinuous||Se===e.ITextFrame.HorizontalAlignment.Fill;me.getCommand("formatTextRotate0").updateCallback(function(e){j(this,{alignment:{rotation:0}})}).update({disabled:x||q,state:0===Me}),me.getCommand("formatTextRotate45").updateCallback(function(e){j(this,{alignment:{rotation:e??1?45:0}})}).update({disabled:x||q,state:45===Me}),me.getCommand("formatTextRotate90").updateCallback(function(e){j(this,{alignment:{rotation:e??1?90:0}})}).update({disabled:x||q,state:90===Me}),me.getCommand("formatTextRotate270").updateCallback(function(e){j(this,{alignment:{rotation:e??1?270:0}})}).update({disabled:x||q,state:270===Me}),me.getCommand("formatTextRotate315").updateCallback(function(e){j(this,{alignment:{rotation:e??1?315:0}})}).update({disabled:x||q,state:315===Me}),me.getCommand("formatTextRotateCustom").updateCallback(function(e){j(this,{alignment:{rotation:e}})}).update({disabled:x||q,state:Me??0})},[ye,s,u,k,T]),r.useEffect(()=>{const t=!s.getProtection().isFormatCellsAllowed(),n=s.getSelectedRanges().getMerges().length>0,r=async(t,n)=>{O(n,async o=>{const r=async(r=!1)=>{const l=await Promise.resolve(m?.showBusy?.(n.label()));try{const n=o.getSelectedRanges();if(n.merge({orientations:t,discardMultipleValues:r}),t===e.IRange.Orientations.Both){const t={alignment:{horizontal:e.ITextFrame.HorizontalAlignment.Center}};n.updateStyle(t)}}catch(e){throw e}finally{l?.()}};let l;try{await r()}catch(e){if("discardMultipleValues"!==e.type)throw e;l=!0}if(l&&m?.showOptions){if("Merge"!==await(m?.showOptions({title:"Confirm",description:"Merging cells will only keep the upper-left value. Some data will be discarded. Continue?",options:["Merge","Cancel"],defaultOption:"Merge"})))return;await r(!0)}},void 0,void 0,!1)},l=e=>{O(e,async e=>{try{const t=e.getSelectedRanges();t.unmerge();const n={alignment:{horizontal:null}};t.updateStyle(n)}catch(e){throw e}})};me.getCommand("mergeToggle").updateCallback(function(){o.CoordUtils.isSingleCell(s.getSelectedRange().getCoords())||(n?l(this):r(e.IRange.Orientations.Both,this))}).update({state:n,disabled:!fe||t}),me.getCommand("mergeHorizontal").updateCallback(function(){r(e.IRange.Orientations.Column,this)}).update({disabled:!fe||t}),me.getCommand("mergeVertical").updateCallback(function(){r(e.IRange.Orientations.Row,this)}).update({disabled:!fe}),me.getCommand("unmerge").updateCallback(function(){l(this)}).update({disabled:!n||!fe||t});const i={disabled:t};me.getCommand("hideRows").updateCallback(function(){O(this,e=>{e.getRowHeaders().setHidden(e.getSelectedRanges().getCoords(),!0)})}).update(i),me.getCommand("hideColumns").updateCallback(function(){O(this,e=>{e.getColumnHeaders().setHidden(e.getSelectedRanges().getCoords(),!0)})}).update(i),me.getCommand("unhideRows").updateCallback(function(){O(this,e=>{e.getRowHeaders().setHidden(e.getSelectedRanges().getCoords(),!1)})}).update(i),me.getCommand("unhideColumns").updateCallback(function(){O(this,e=>{e.getColumnHeaders().setHidden(e.getSelectedRanges().getCoords(),!1)})}).update(i),me.getCommand("autoFitRows").updateCallback(function(){O(this,t=>{t.getSelectedRanges().autoFit({orientations:e.IRange.Orientations.Row})})}).update(i),me.getCommand("autoFitColumns").updateCallback(function(){O(this,t=>{t.getSelectedRanges().autoFit({orientations:e.IRange.Orientations.Column})})}).update(i);let a=!1,d=0,c=!1,u=!1,g=0,h=!1;!b||t||ve||(a=b.isEntireColumnsAny(),a&&!b.isEntireColumns()?c=!0:d=b.getColumnCount(),u=b.isEntireRowsAny(),u&&!b.isEntireRows()?h=!0:g=b.getRowCount());const f={disabled:t||b&&1!==b.getCount()};me.getCommand("sortAscending").update(f),me.getCommand("sortDescending").update(f);const p={disabled:a||u||t||ve},v=a||t||ve||h;v&&(d=1);const C=u||t||ve||c;C&&(g=1);let w="",y="",x="",q="",S="",R="",k="",M="",T="";d>1&&(R=y=d+" ",k=x="s"),g>1&&(M=q=g+" ",T=S="s"),"copy"===E.getMode()?.key?(w=q=y="Copied ",x=S="s"):"cut"===E.getMode()?.key&&(w=q=y="Cut ",x=S="s");let I="",F="";if(b){const t=b.getDefaultShiftOrientation()===e.IRange.Orientation.Column;I=` (${t?"Shift Right":"Shift Down"})`,F=` (${t?"Shift Left":"Shift up"})`,me.getCommand("deleteCells").update({label:`Delete Cells${F}`})}me.getCommand("insertCells").update({label:`Insert ${w}Cells${I}`,scopedLabels:{insertCells:`${w}At Selection`}}),me.getCommand("insertCellsShiftRight").update(p),me.getCommand("insertCellsShiftDown").update(p),me.getCommand("deleteCellsShiftUp").update(p),me.getCommand("deleteCellsShiftLeft").update(p),me.getCommand("insertRows").update({label:`Insert ${q}Row${S}`,scopedLabels:{insertCells:`${q}Row${S}`},disabled:C}),me.getCommand("insertRowsAfter").update({label:`Insert ${q}Row${S} Below`,disabled:C}),me.getCommand("insertColumns").update({label:`Insert ${y}Column${x}`,scopedLabels:{insertCells:`${y}Column${x}`},disabled:v}),me.getCommand("insertColumnsAfter").update({label:`Insert ${y}Column${x} After`,disabled:v}),me.getCommand("deleteRows").update({label:`Delete ${M}Row${T}`,scopedLabels:{deleteCells:`${M}Row${T}`},disabled:C}),me.getCommand("deleteColumns").update({label:`Delete ${R}Column${k}`,scopedLabels:{deleteCells:`${R}Column${k}`},disabled:v})},[ue,fe,ve,b,E,m,de]),r.useEffect(()=>{const t=s.getProtection(),n=s.getProtection().isLocked(),o=!t.isFormatCellsAllowed(),r={disabled:o};me.getCommand("protectionSheetToggle").updateCallback(async(e,o)=>{let r=null;try{if(n){let e=null;if(t.hasPassword()){const t=await(m?.showInputOptions({title:"Password Required",description:"Enter a password to unprotected",options:["Unprotect","Cancel"],defaultOption:"Unprotect",inputType:"password"}));if("Unprotect"!==t.option)return;e=t.input}r=await Promise.resolve(m?.showBusy?.(o.label())),await t.unlock(e)}else r=await Promise.resolve(m?.showBusy?.(o.label())),await t.lock();r?.()}catch(e){r?.(),m?.showError?.(e)}}).update({state:n,label:()=>n?"Unprotect Sheet":"Protect Sheet",scopedLabels:{sheet:n?"Unprotect":"Protect"}}),me.getCommand("deleteTable").update(r),me.getCommand("sortAscending").update(r),me.getCommand("sortDescending").update(r),me.getCommand("sortCustom")?.update(r),me.getCommand("updateComments").update(r),me.getCommand("deleteComments").update(r),me.getCommand("insertChart")?.update(r),me.getCommand("insertImageFromFile").update(r),me.getCommand("insertImageFromURL").update(r),me.getCommand("formatBorder").update(r),me.getCommand("formatFillColor").update(r),me.getCommand("formatFontColor").update(r),me.getCommand("formatBoldToggle").update(r),me.getCommand("formatItalicToggle").update(r),me.getCommand("formatUnderlinedToggle").update(r),me.getCommand("formatStrikeThroughToggle").update(r),me.getCommand("formatSuperscriptToggle").update(r),me.getCommand("formatSubscriptToggle").update(r),me.getCommand("formatAlignTopToggle").update(r),me.getCommand("formatTextOverflowVisibleToggle").update(r),me.getCommand("formatTextOverflowWrapToggle").update(r),me.getCommand("formatTextOverflowClipToggle").update(r),me.getCommand("formatTextOverflowShrinkToggle").update(r),me.getCommand("formatAlignMiddleToggle").update(r),me.getCommand("formatAlignBottomToggle").update(r),me.getCommand("formatAlignDistributedVerticalToggle").update(r),me.getCommand("formatAlignJustifyVerticalToggle").update(r),me.getCommand("formatAlignLeftToggle").update(r),me.getCommand("formatAlignCenterToggle").update(r),me.getCommand("formatAlignRightToggle").update(r),me.getCommand("formatAlignJustifyToggle").update(r),me.getCommand("formatAlignCenterContinuousToggle").update(r),me.getCommand("formatAlignDistributedHorizontalToggle").update(r),me.getCommand("formatAlignFillToggle").update(r),me.getCommand("formatFontSizeIncrease").update(r),me.getCommand("formatFontSizeDecrease").update(r),me.getCommand("formatFontFamily").update(r),me.getCommand("formatFontSize").update(r),me.getCommand("formatNumberFormat").update(r),me.getCommand("formatNumberFormatGeneralStyle").update(r),me.getCommand("formatNumberFormatNumberStyle").update(r),me.getCommand("formatNumberFormatTimeStyle").update(r),me.getCommand("formatNumberFormatDateStyle").update(r),me.getCommand("formatNumberFormatAccountingStyle").update(r),me.getCommand("formatNumberFormatPercentStyle").update(r),me.getCommand("formatNumberFormatScientificStyle").update(r),me.getCommand("formatNumberFormatCommaStyle").update(r),me.getCommand("formatNumberFormatIncreaseDecimal").update(r),me.getCommand("formatNumberFormatDecreaseDecimal").update(r),me.getCommand("hideColumns").update(r),me.getCommand("unhideColumns").update(r),me.getCommand("hideRows").update(r),me.getCommand("unhideRows").update(r),me.getCommand("quickFormulaSum").update(r),me.getCommand("quickFormulaAverage").update(r),me.getCommand("quickFormulaCount").update(r),me.getCommand("quickFormulaMax").update(r),me.getCommand("quickFormulaMin").update(r),me.getCommand("startEditCurrentTime").update(r),me.getCommand("startEditCurrentDate").update(r),me.getCommand("startEditValueAbove").update(r),me.getCommand("fillDown").update(r),me.getCommand("fillRight").update(r),me.getCommand("fillUp").update(r),me.getCommand("fillLeft").update(r),me.getCommand("formatCellStyle").update(r),me.getCommand("formatTableStyle").update(r),me.getCommand("formatPainterToggle").update(r),me.getCommand("formatBorderAddOutline").update(r),me.getCommand("formatBorderClearOutline").update(r),me.getCommand("formatIndentDecrease").update(r),me.getCommand("formatIndentIncrease").update(r),me.getCommand("clearContents").update(r),me.getCommand("clearFormats").update(r),me.getCommand("clearAll").update(r),me.getCommand("clearComments").update(r),me.getCommand("clearHyperlinks").update(r),me.getCommand("autoFilterClear").update(r),me.getCommand("autoFilterReapply").update(r);const l=Se===e.ITextFrame.HorizontalAlignment.CenterContinuous||Se===e.ITextFrame.HorizontalAlignment.Fill,i={disabled:o||l};me.getCommand("formatTextRotate0").update(i),me.getCommand("formatTextRotate45").update(i),me.getCommand("formatTextRotate90").update(i),me.getCommand("formatTextRotate270").update(i),me.getCommand("formatTextRotate315").update(i),me.getCommand("formatTextRotateCustom").update(i),me.getCommand("formatTextRotateVertical").update(i)},[ue]),me}var _,Z;!function(){if(Z)return _;Z=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,o=/^0o[0-7]+$/i,r=parseInt,l="object"==typeof R&&R&&R.Object===Object&&R,i="object"==typeof self&&self&&self.Object===Object&&self,a=l||i||Function("return this")(),s=Object.prototype.toString,d=Math.max,c=Math.min,u=function(){return a.Date.now()};function g(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function h(l){if("number"==typeof l)return l;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==s.call(e)}(l))return NaN;if(g(l)){var i="function"==typeof l.valueOf?l.valueOf():l;l=g(i)?i+"":i}if("string"!=typeof l)return 0===l?l:+l;l=l.replace(e,"");var a=n.test(l);return a||o.test(l)?r(l.slice(2),a?2:8):t.test(l)?NaN:+l}_=function(e,t,n){var o,r,l,i,a,s,m=0,f=!1,p=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function C(t){var n=o,l=r;return o=r=void 0,m=t,i=e.apply(l,n)}function b(e){var n=e-s;return void 0===s||n>=t||n<0||p&&e-m>=l}function w(){var e=u();if(b(e))return y(e);a=setTimeout(w,function(e){var n=t-(e-s);return p?c(n,l-(e-m)):n}(e))}function y(e){return a=void 0,v&&o?C(e):(o=r=void 0,i)}function x(){var e=u(),n=b(e);if(o=arguments,r=this,s=e,n){if(void 0===a)return function(e){return m=e,a=setTimeout(w,t),f?C(e):i}(s);if(p)return a=setTimeout(w,t),C(s)}return void 0===a&&(a=setTimeout(w,t)),i}return t=h(t)||0,g(n)&&(f=!!n.leading,l=(p="maxWait"in n)?d(h(n.maxWait)||0,t):l,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==a&&clearTimeout(a),m=0,o=s=r=a=void 0},x.flush=function(){return void 0===a?i:y(u())},x}}();var X,Y,J={exports:{}},Q={};Y||(Y=1,J.exports=function(){if(X)return Q;X=1;var e=r,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,o=e.useEffect,l=e.useLayoutEffect,i=e.useDebugValue;function a(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!t(e,o)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),s=n({inst:{value:r,getSnapshot:t}}),d=s[0].inst,c=s[1];return l(function(){d.value=r,d.getSnapshot=t,a(d)&&c({inst:d})},[e,r,t]),o(function(){return a(d)&&c({inst:d}),e(function(){a(d)&&c({inst:d})})},[e]),i(r),r};return Q.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,Q}()),J.exports;var ee,te,ne={exports:{}},oe={exports:{}},re=oe.exports;function le(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}!function(){if(te)return ne.exports;te=1;for(var e=(ee||(ee=1,function(){var e,t,n,o,r,l;"undefined"!=typeof performance&&null!==performance&&performance.now?oe.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(oe.exports=function(){return(e()-r)/1e6},t=process.hrtime,o=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),l=1e9*process.uptime(),r=o-l):Date.now?(oe.exports=function(){return Date.now()-n},n=Date.now()):(oe.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}.call(re)),oe.exports),t="undefined"==typeof window?R:window,n=["moz","webkit"],o="AnimationFrame",r=t["request"+o],l=t["cancel"+o]||t["cancelRequest"+o],i=0;!r&&i<n.length;i++)r=t[n[i]+"Request"+o],l=t[n[i]+"Cancel"+o]||t[n[i]+"CancelRequest"+o];if(!r||!l){var a=0,s=0,d=[],c=1e3/60;r=function(t){if(0===d.length){var n=e(),o=Math.max(0,c-(n-a));a=o+n,setTimeout(function(){var e=d.slice(0);d.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(a)}catch(e){setTimeout(function(){throw e},0)}},Math.round(o))}return d.push({handle:++s,callback:t,cancelled:!1}),s},l=function(e){for(var t=0;t<d.length;t++)d[t].handle===e&&(d[t].cancelled=!0)}}ne.exports=function(e){return r.call(t,e)},ne.exports.cancel=function(){l.apply(t,arguments)},ne.exports.polyfill=function(e){e||(e=t),e.requestAnimationFrame=r,e.cancelAnimationFrame=l},ne.exports}();const ie=r.memo(r.forwardRef((e,l)=>{const{style:i=t.ReactUtils.EmptyCssProperties,orientation:a,sheet:s,onShowTooltip:d,onCloseTooltip:c,onScrollOffset:u,showCustomScrollButtons:g=!1,offset:h=0,totalSize:m=0,viewportSize:f=0,...p}=e;if(!s)throw new Error("SheetScrollBar needs a sheet model");const[v]=T(),C=t.useCallbackRef(d,[d]),b=t.useCallbackRef(c,[c]),w=(y=v,x=l,r.useMemo(()=>null===y&&null===x?null:e=>{le(y,e),le(x,e)},[y,x]));var y,x;const[q,S]=r.useState(()=>{const e=s.getView().getTopLeft();return a===t.ScrollbarOrientation.Vertical?e.top:e.left}),R=()=>{const e=s.getView().getFreezePanes();if(a===t.ScrollbarOrientation.Vertical){if(0===e.coords.rowIndex)return{shift:0,scroll:0};return{shift:s.getRowHeaders().findOffset(e.coords.rowIndex)-e.topLeft.top,scroll:e.topLeft.top}}if(0===e.coords.colIndex)return{shift:0,scroll:0};return{shift:s.getColumnHeaders().findOffset(e.coords.colIndex)-e.topLeft.left,scroll:e.topLeft.left}},[k,M]=r.useState(R),[I,E]=r.useState(null),[F,A]=r.useState(!1),D=a===t.ScrollbarOrientation.Vertical?s.getRowHeaders():s.getColumnHeaders(),z=()=>{const e=s.getUsedRange()?.getCoords()??o.CoordUtils.EmptyRange,t=s.getSelection().getCoords().cell;return{colIndex:Math.max(e.colEnd,t.colIndex),rowIndex:Math.max(e.rowEnd,t.rowIndex)}},[N,L]=r.useState(z),O=N?(a===t.ScrollbarOrientation.Vertical?N.rowIndex:N.colIndex)+1:0,j=()=>{const e=z();o.CoordUtils.isEqualCells(N,e)||L(e)};W(s.getView(),{onFreezeSplitChange:()=>{M(R)}}),W(s.getSelection(),{onChange:j}),W(s,{onUsedRangeChange:j}),r.useEffect(()=>{L(z())},[s]),r.useEffect(()=>{if(!I)return F&&b?.(),void A(!1);const e=D.getTextAt(D.findIndex(q/(s.getView().getZoomScale()/100)+k.scroll+k.shift));A(!0),C?.({...I,display:(a===t.ScrollbarOrientation.Vertical?"Row":"Column")+": "+e})},[h,q,k,a,I,D,F,s]);const B=t.useCallbackRef((e,t,n)=>{S(e);const o=e+k.scroll,r=t+k.shift,l=n+k.shift+k.scroll;u?.(o,r,l)},[u,k]),V=h-k.scroll,P=f-k.shift,H=m-(k.shift+k.scroll),U=D.findOffset(O)*(s.getView().getZoomScale()/100)-(k.scroll+k.shift);return n.jsx(t.VirtualScrollbar,{ref:w,style:i,offset:V,viewportSize:P,totalSize:H,orientation:a,showCustomScrollButtons:g,onMouseDown:e=>{E({anchor:{x:e.clientX,y:e.clientY}}),e.preventDefault()},onScrollOffset:B,onMouseOut:()=>{E(null)},onMouseUp:()=>{E(null)},minSize:U,...p})}));ie.displayName="SheetScrollbar";const ae=(e,t,n=null)=>{const o=[];for(let r=0;r<e.length;r++)if(e[r].value.isSelectedAll){if(e[r].min===e[r].max&&e[r].min===n)continue;o.push({address:{min:e[r].min,max:e[r].max},update:t})}return o},se=r.memo(r.forwardRef((i,a)=>{const{sheetHeader:s,gridRef:d,sheetElement:c,commands:u,oppositeSize:g=30,containerWidth:h,containerHeight:m,headerText:f,freezeStart:p,gridStyle:v,verticalPadding:C,horizontalPadding:b,onSheetContextMenu:w,onResizeHeadersStart:y,onResizeHeaders:x,onResizeHeadersEnd:q,onResizeHeadersDown:S,onResizeHeadersUp:R,scrollPoint:k,onSelectionStart:M,onSelectionEnd:T}=i,I=r.useMemo(()=>s.getOrientation(),[s]),E=r.useRef(null),[F,A]=r.useReducer(e=>e+1,0),[D,z]=r.useReducer(e=>e+1,0),N=s?.getSheet(),L=r.useRef(!1);r.useLayoutEffect(()=>{L.current=!0},[s]);const O=r.useMemo(()=>s.getEntireRange().getCoords().max+1,[s]),j=r.useMemo(()=>{const t=I===e.IRange.Orientation.Column;return{left:t?k.left:0,top:t?0:k.top}},[k]),[B,V]=r.useState(N?.getView().getZoomScale()/100),[P,H]=r.useState(null);W(s,{onSizesChange:e=>{V(N?.getView().getZoomScale()/100),ie(re())}});const U=r.useCallback(()=>{E.current?.invalidate(),z()},[]),K=r.useCallback(o.CommonUtils.debounce(()=>{U()},10),[]),[$,G]=r.useState(null);W(s.getSheet(),{onSelectionChange(){G(N?.getSelection().getCoords()),K()},onProtectionChange(){U()},onViewChange(){K()}}),r.useLayoutEffect(()=>{ie(re())},[I,B,g]),r.useLayoutEffect(()=>{H(null),V(s?.getSheet().getView().getZoomScale()/100),ie(re())},[s]);const _=r.useCallback(e=>s.at(e)?.isHidden()||0===s.at(e)?.getSize(),[s]),Z=r.useCallback((e,t)=>s.hiddenHeadersAt(e,t),[_]),X=t.useCallbackRef(e=>s.isSelected(e),[s]),Y=t.useCallbackRef(e=>s.isSelectedAll(e),[s]),J=r.useCallback(()=>s.getMinSize(),[s]),Q=r.useCallback(()=>s.getMaxSize(),[s]),ee=t.useCallbackRef((t,n,r)=>{n/=B;const l={size:n=Math.max(J(),Math.min(o.CommonUtils.roundAccurately(n,J()),Q())),hidden:!1},i=[];if(n<=0&&(l.hidden=!0,l.size=r),i.push({address:{min:t,max:t},update:l}),n<0){const o=I===e.IRange.Orientation.Column,r=o?le.getColOffset:le.getRowOffset,l=o?le.getColIndex:le.getRowIndex,a=r(t);let s=l(a+n);const d=r(s);d===a+n?s--:i.push({address:{min:s,max:s},update:{size:a-d+n}}),t-s>1&&i.push({address:{min:s+1,max:t-1},update:{hidden:!0}})}s.updateHeaderPairs(i),x?.(t,n,r)},[F,s,B,x]),te=t.useCallbackRef((t,n,o)=>{const r=I===e.IRange.Orientation.Column;let l=null,i={min:t,max:t};if(s.isSelectedAll(t)){const e=s.getSelectedRuns();e.length>1?l="Resize "+(r?"Columns":"Rows"):i=e[0];const a={hidden:n<=0,size:(n<=0?o:n)/B};s.updateHeaderPairs(ae(e,a,t))}if(i){const e=i.max-i.min+1;let t;t=1===e?s.getRange(i).at(0).getDisplayText():s.getRange(i).toString(),l=`Resize ${r?"Column":"Row"}${e>1?"s":""} '${t}'`}q?.(t,n,l)},[F,s,q]),ne=t.useCallbackRef((t,n)=>{const o=I===e.IRange.Orientation.Column;y(t,n,`Resize ${o?"Column":"Row"}(s)`)},[y]),oe=t.useCallbackRef(t=>{let n=!1;const o=I===e.IRange.Orientation.Column,r=s.getSheet().getEntireRange().getCoords(),l=[],i=s.getSelectedRuns(),a=e=>{let t;t=o?{colStart:e.min,rowStart:r.rowStart,colEnd:e.max,rowEnd:r.rowEnd}:{colStart:r.colStart,rowStart:e.min,colEnd:r.colEnd,rowEnd:e.max},l.push(t)};for(let e=0;e<i.length;e++){const o=i[e];o.value.isSelectedAll&&(o.min<=t&&o.max>=t&&(n=!0),a(o))}n||a({min:t,max:t}),s.getSheet().getRanges(l).autoFit({orientations:o?e.IRange.Orientations.Column:e.IRange.Orientations.Row});if(_(t)){const e={hidden:null},o=ae(i,e);n||o.push({address:t,update:e}),s.updateHeaderPairs(o)}q?.(t,null,"Resize Column(s)")},[F,s,q,_]),re=()=>{const t=I===e.IRange.Orientation.Column;return{getColOffset:e=>t?s.findOffset(e):0===e?0:g/B,getColIndex:e=>t?s.findIndex(e):0,getRowOffset:e=>t?0===e?0:g/B:s.findOffset(e),getRowIndex:e=>t?0:s.findIndex(e)}},[le,ie]=r.useState(()=>re()),se=r.useCallback((n,o)=>!(n.nativeEvent.which===t.MouseButtonCodes.Right)||!Y(I===e.IRange.Orientation.Column?o.colIndex:o.rowIndex),[I,Y]),de=t.useCallbackRef(e=>{c.focusSheet()},[c]),ce=t.useCallbackRef(e=>{N?.getSelection().updateCoords(e)},[N]),{...ue}=l.useSelection({gridRef:d,commands:null,layout:le,selection:$,fillHandleBorderColor:v.body.fill,selectionBackgroundColor:v.selection.fill,selectionBorderColor:v.selection.strokeFill,selectionRemoveBackgroundColor:v.selectionRemove.fill,selectionRemoveBorderColor:v.selectionRemove.strokeFill,disableTouchSelection:!0,onSelectionChange:ce,canSelectionSpanMergedCells:e=>{const t=N.getRange(e);return t.isEntireColumns()||t.isEntireRows()}}),ge=t.useCallbackRef(()=>{M?.();const e=N?.getSelection();e&&e.setAdjusting(e.getCoords())},[N,M]),he=t.useCallbackRef(async()=>{N?.getSelection().setAdjusting(null),T?.()},[N,T]),{...me}=l.useHeaderSelection({orientation:I,headerCount:O,gridRef:E,gridMainRef:d,newSelection:ue?.newSelection,modifySelection:ue?.modifySelection,appendSelection:ue?.appendSelection,clearSelections:ue?.clearSelections,pointerDownInterceptor:se,onPointerUp:de,onDragStart:ge,onDragEnd:he}),fe=v.selection?.strokeFill;r.useEffect(()=>{if(!E.current)return void H(null);const r=I===e.IRange.Orientation.Column,i=s.getSelectedRuns(),a=s.isProtected()?null:ee,d=(e,o,l)=>{if(l)return r?n.jsx("div",{style:{position:"absolute",borderBottom:`${v.headerSelection.strokeWidth}px solid ${fe}`,pointerEvents:"none",top:`${t.ReactUtils.boundPixel(-v.headerSelection.strokeWidth/2)}px`,left:`${t.ReactUtils.boundPixel(l.x-v.headerSelection.strokeWidth)}px`,width:`${t.ReactUtils.boundPixel(l.width+v.headerSelection.strokeWidth+1,!0)}px`,height:g+v.headerSelection.strokeWidth-.5+"px"}},e):n.jsx("div",{style:{position:"absolute",borderRight:`${v.headerSelection.strokeWidth}px solid ${fe}`,pointerEvents:"none",top:`${t.ReactUtils.boundPixel(l.y-v.headerSelection.strokeWidth)}px`,left:`${t.ReactUtils.boundPixel(-v.headerSelection.strokeWidth/2)}px`,width:g+v.headerSelection.strokeWidth-.5+"px",height:`${t.ReactUtils.boundPixel(l.height+v.headerSelection.strokeWidth+1,!0)}px`}},e)},c=(e,t,n)=>{const o={x:0,y:0,width:0,height:0};if(r){const r=n.toClipBounds(n.getRangeCoordsBounds({rowStart:0,rowEnd:0,colStart:e,colEnd:Math.min(O,t)}),l.SELECTION_CLIP_INSETS);if(!r)return;o.x=r.x,o.width=r.width}else{const r=n.toClipBounds(n.getRangeCoordsBounds({rowStart:e,rowEnd:Math.min(O,t),colStart:0,colEnd:0}),l.SELECTION_CLIP_INSETS);if(!r)return;o.y=r.y,o.height=r.height}return{x:o.x,y:o.y,width:o.width,height:o.height}};H([e=>{const t=[];let d=null,c=r?e.getVisibleColumns():e.getVisibleRows();const u=r?e.getTotalRangeCoords().colStart:e.getTotalRangeCoords().rowStart;c.length>0&&c[0]>u&&(c=[c[0]-1,...c]);let g=[];const h=[];for(let e=0;e<c.length;e++){const t=c[e],n=e<c.length-1?c[e+1]:t+Z(t+1,!1)+1,r=t+1!==n;if(!d||d.max<t)if(i.length>0&&i[i.length-1].max>=t){const e=o.CommonUtils.findEqualOrGreater(i,t,e=>e.max);d=i[e]}else d=null;let l=!1,s=!1;if(d?.value&&(d.min<=t||d.min<=n&&!r)&&(l=!0,s=d.value.isSelectedAll),t===u){let e=!1,n=!1;d?.value&&d.min<=t&&(e=!0,n=d.value.isSelectedAll),t>0&&h.push({index:t-1,isNextHidden:r,isSelected:e,isSelectedAll:n,disabledResize:!0})}if(s&&g.push(h.length),h.push({index:t,isHidden:0===e&&Z(t,!1)>0,isNextHidden:r,isSelected:l,isSelectedAll:s,onDividerMouseDown:S,onDividerResizeStart:ne,onDividerResize:a,onDividerMouseUp:R,onDividerResizeEnd:te,onDividerAutoFit:oe}),r){let e=!1,r=!1;if(d&&d.min>=t&&d.max<=n-1&&d.value.isSelectedAll&&g.push(h.length),d?.value&&d.max>=n);else if(i.length>0&&i[i.length-1].max>=n){const e=o.CommonUtils.findEqualOrGreater(i,n,e=>e.max);d=i[e]}else d=null;d?.value&&d.min<=n&&(e=d.value.isSelected,r=d.value.isSelectedAll),n>0&&h.push({index:n-1,isHidden:!0,isSelected:e,isSelectedAll:r,onDividerMouseDown:S,onDividerResizeStart:ne,onDividerResize:a,onDividerMouseUp:R,onDividerResizeEnd:te,onDividerAutoFit:oe})}}if(g.length>0){let t=g.length-1;if(g.length>0){const n=h[g[t]].index;let o=null;r?(o=e.getRangeCoordsBounds({rowStart:0,rowEnd:0,colStart:n,colEnd:n}),o.x+o.width>e.getBounds().width&&(t-=1,0===t&&(t=-1))):(o=e.getRangeCoordsBounds({rowStart:n,rowEnd:n,colStart:0,colEnd:0}),o.y+o.height>e.getBounds().height&&(t-=1,0===t&&(t=-1)))}const n=i?.[i.length-1],o=e.getAnchor();if("t"===o||"l"===o){const e=h[g[Math.max(0,g.length-1)]];e.showTouchDivider=n&&n.max<=e.index}else t>=0&&(h[g[t]].showTouchDivider=!0)}const{header:m,headerSelect:f,headerSelectAll:p,headerHover:C}=v??{};for(let o=0;o<h.length;o++)t.push(n.jsx(l.HeaderDivider,{orientation:I,view:e,headerStyle:m,headerStyleSelect:f,headerStyleSelectAll:p,headerStyleHover:C,disabled:s.isProtected(),...h[o]},`divider${o}`));return t},e=>{const t=[];for(let n=0;i&&n<i.length;n++)t.push(d(`selection:${e.getAnchor()}:${n}`,0,c(i[n].min,i[n].max,e)));return t}])},[D,!0,fe,v,le,O,p,F,B]),r.useEffect(()=>{E.current?.invalidate()},[F]);const pe=t.useCallbackRef(e=>f?f(e):s.getTextAt(e),[f,s]),ve=t.useCallbackRef(t=>{const{header:o,headerSelect:r,headerSelectAll:i,headerHover:a}=v??{},{range:s,key:d,...c}=t;return n.jsx(l.HeaderRenderer,{orientation:I,index:I===e.IRange.Orientation.Column?s.colStart:s.rowStart,isSelected:X,isSelectedAll:Y,zoomScale:100*B,headerText:pe,headerStyle:o,headerStyleSelect:r,headerStyleSelectAll:i,headerStyleHover:a,verticalPadding:C,horizontalPadding:b,...c},d)},[F,O,v,B,s]),Ce=t.useEditMode(),be=r.useMemo(()=>{const n="white",o="black",r={};if("touch"!==t.ReactUtils.detectIt().primaryInput){let t=I===e.IRange.Orientation.Column?`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 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${o}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 8 15, pointer`:`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='${o}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`;const l=Ce.getMode();if("formatPainter"===l?.key){const e=30,r=22;t=`url("data:image/svg+xml,%3Csvg width='${e}' height='${r}' viewBox='0 0 ${e} ${r}' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='${"M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z"}' stroke='${o}' fill='${n}'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`}r.cursor=t}return r.backgroundColor=v?.header?.fill||"transparent",r},[I,F,Ce,v]),we=t.useImperativeElement(a,()=>({scrollTo:e=>{E.current?.scrollTo(e)},forceRender:()=>{A()},getGridElement:()=>E.current}),[]),ye=r.useCallback(e=>{me.onPointerDown(e)},[me]),xe=r.useCallback(t=>{const n=me.getCellCoordsFromClient(t.clientX,t.clientY);if(!n)return;if(!w)return;const o=I===e.IRange.Orientation.Column;w({originalEvent:t,clientX:t.clientX,clientY:t.clientY,rowIndex:o?-1:n.rowIndex,colIndex:o?n.colIndex:-1}),t.stopPropagation(),t.preventDefault()},[me,w]),qe=r.useMemo(()=>{const t=I===e.IRange.Orientation.Column;return n.jsx("div",{ref:we,children:n.jsx(l.Grid,{className:"sheet-header",style:be,ref:E,scrollPoint:j,columnCount:t?O:1,rowCount:t?1:O,width:t?h:g,height:t?g:m,freezeLeft:t?p:void 0,freezeTop:t?void 0:p,hiddenColumnsAt:t?Z:void 0,hiddenRowsAt:t?void 0:Z,showGridLines:!1,layout:le,clipCells:!1,allowOverlaysOverflow:!0,enableMouseWheel:!1,onContextMenu:xe,onPointerDown:ye,zoom:B,cellRenderer:ve,overlays:P})})},[P,le,h,m,j,be,D]);return r.useEffect(()=>{L.current=!1,E.current?.invalidate(),z()},[s,v]),qe})),de=r.memo(r.forwardRef((e,n)=>{const{view:o,sheet:r,getVisibleCells:l,gridStyle:i}=e,a=t.useCallbackRef((e,t)=>e.getStyle().getBorder(),[]),{overlay:s}=A({getVisibleCells:l,getBorderAt:a,darkMode:i.body.darkMode,shiftIfWide:!0}),d=s(o);return d&&o?d:null})),ce={key:"copy",description:"'Copy' Select destination and press ENTER or choose Paste."},ue={key:"cut",description:"'Cut' Select destination and press ENTER or choose Paste."},ge={type:e.ICell.Content.Values},he={fitDestination:!0,type:e.ICell.Content.Formats},me={fitDestination:!0,type:e.ICell.Content.Formulas},fe={transpose:!0},pe={fitDestination:!0,adjustCells:(e,t,n)=>({value:`=${t.getA1({$colIndex:!0,$rowIndex:!0})}`})},ve=({element:n,sheet:i,sheetView:a,commands:s,onClipboardUpdate:d,onPaste:c,selectionRenderer:u=l.defaultSelectionRenderer,copyForegroundColor:g="rgb(33, 115, 70)",cutForegroundColor:h="rgb(33, 115, 70)",copyBackgroundColor:m="white",cutBackgroundColor:f="white",notifier:p,...v})=>{const C=t.useCallbackRef(u,[u]),b=r.useRef(null),w=t.useEditMode(),y=w.getMode(),x=r.useMemo(()=>({element:n,doCopy:t=>{const n=i.getSelectedRanges().getSnapshot(t);return new e.RangeClipboardItem(n)}}),[i,a,n]),q=r.useMemo(()=>({element:n,importFromExternal:async(t,n)=>{const o=new e.ExternalRangeClipboardItem(t,n,i.getStyles(),i.isDate1904());return await o.parse()?o:null},doPaste:async(t,n)=>{if("range"!==t?.getItemType())return;n?.contentsOnly&&delete(n={...n,type:e.ICell.Content.Values}).contentsOnly;const o=i.getSelectedRange(),r=t.getItem(),l=r.getName();return await o.doBatch(async()=>{const t=await o.copyFrom(r,n);!t||t.isEntireRows()||t.isEntireColumns()||t.autoFit({orientations:e.IRange.Orientations.Row,minContent:!0})},{description:"Paste"+(l?` ${l}`:""),autoSelect:!0}),!0}}),[i,a,p,n]),{clipboard:S,...R}=t.useCopyPaste({...v,source:x,commands:s,target:q,notifier:p,onClipboardUpdate:e=>{const t="range"===e?.getItemType()?e:null;if(t){const t=e.editMode?.(),n={...e?.isCut?.()?ue:ce,...t,args:{isClipboard:!0,...t?.args},onModeChange:e=>{e?.args?.isClipboard||S.clear(!0),t?.onModeChange?.(e)}};w.setMode(n)}b.current=t,d?.(t)},onPaste:(e,t)=>{if("range"!==e?.getItemType())return;let r="cut"===w.getMode()?.key||e.isCut?.();if(!r&&"copy"===w.getMode()?.key){const t=e.getItem().getCoords(),n=i.getSelectedRanges().getCoords();let l=!1;if(!l&&t&&n&&e.getItem().getSource?.()===i)for(let e=0;!l&&e<n.length;e++)l=o.CoordUtils.isRangesIntersect(t,n[e]);r=l}r&&w.setMode(null),n?.()?.focus(),c?.(e,t)}});r.useMemo(()=>{const e=n;if(!s)return;const o=[new t.Command("pasteValues",e,{label:"Paste Values",scopedLabels:{paste:"Values"},description:"Paste only the values of the selected cells.\n\nThe formatting is not applied.",shortcut:{key:"V",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}}),new t.Command("pasteFormats",e,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:"Paste only the formats of the selected cells.\n\nThe content is not applied."}),new t.Command("pasteFormulas",e,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied."}),new t.Command("pasteTranspose",e,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped."}),new t.Command("pasteLinks",e,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells."})];s.addCommands(o,!0)},[s,n]),r.useEffect(()=>{if(!s)return;const e={disabled:!i.getProtection().isFormatCellsAllowed()};s.getCommand("pasteValues").updateCallback(e=>R.paste({...ge,...e})).update(e),s.getCommand("pasteFormats").updateCallback((e,t)=>R.paste({...he,description:t.label(),...e})).update(e),s.getCommand("pasteFormulas").updateCallback((e,t)=>R.paste({...me,description:t.label(),...e})).update(e),s.getCommand("pasteTranspose").updateCallback((e,t)=>R.paste({...fe,description:t.label(),...e})).update(e),s.getCommand("pasteLinks").updateCallback((e,t)=>R.paste({...pe,description:t.label(),...e})).update(e),s.getCommand("cut").update(e),s.getCommand("paste").update(e)},[i,s]);const k=r.useMemo(()=>{if(!y||!b.current)return;const e=y.key;if("copy"!==e&&"cut"!==e&&"formatPainter"!==e)return;const t=b.current.getItem();if(t.getSource()!==i)return;const n=b.current.isCut?.(),o=n?f:m,r=n?h:g,a=t.getCoords(),s=a?[a]:null;return s&&0!==s.length?e=>{const t=[];for(let n=0;n<s.length;n++){const i=s[n],a=e.toClipBounds(e.getRangeCoordsBounds(i,{top:0,left:0,right:1,bottom:1}),l.SELECTION_CLIP_INSETS);a&&(t.push(C({range:i,key:`copy-selection-background-${n}`,x:a.x,y:a.y,width:Math.max(a.width,0),height:Math.max(a.height,0),stroke:o,strokeWidth:2})),t.push(C({range:i,key:`copy-selection-foreground-${n}`,x:a.x+(a.width<=2?-1:0),y:a.y,width:Math.max(a.width,3),height:Math.max(a.height,3),stroke:r,strokeWidth:2,isAnimatedStroke:!0})))}return t}:null},[y,i,a,g,m,h,f]);return{...R,clipboard:S,overlays:k}},Ce=r.memo(r.forwardRef((e,t)=>{const{view:n,element:o,sheet:l,gridStyle:i,commands:a,notifier:s}=e,d=i.body??{},c=l.getView(),{overlays:u}=ve({element:o,sheet:l,sheetView:c,commands:a,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:d.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:d.fill,notifier:s});return W(l?.getSelection(),{onChange(e){}}),r.useEffect(()=>{n?.getStage()},[n?.getStage()]),u&&n?u(n):null})),be="_sheet-selection_12wyx_5",we={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},ye={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},xe={key:"dragCopy",description:"Drag selection to copy cell contents."},qe={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Se=(e,t)=>t.ctrlKey&&t.shiftKey?qe:t.ctrlKey?xe:t.shiftKey?ye:we,Re={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},ke=r.memo(r.forwardRef((i,a)=>{const{view:s,commands:d,className:c,onFirstRender:u,notifier:g,onShowTooltip:h,onCloseTooltip:m,sheet:f,gridRef:p,gridStyle:v,isActive:C,editingCoords:b,...w}=i,y=s?.getBounds(),q=t.useCallbackRef(h,[h]),S=t.useCallbackRef(m,[m]),[R,k]=r.useState(()=>f?.getSelection().getCoords()),M=t.useCallbackRef(e=>{o.CoordUtils.isEqualSelectionCoords(e,R)||f&&f.getSelection().updateCoords(e)},[f,R]),T=t.useEditMode(),I=r.useRef(null),[E,F]=r.useState(f?.getProtection().isLocked()),[A,D]=r.useState(f?.getView().getMovableSelection().length>0),z="touch"===t.ReactUtils.detectIt().primaryInput,N=!z&&C,L=null!==b||A,O=t.useCallbackRef(e=>{const t=o.CoordUtils.cellToRange(e);if(f.isClosed())return t;const n=f.getRange(t,{excludeHidden:!0}).getMerges();return 0===n.length?t:n[0]},[f]),j=t.useCallbackRef((t,n,o,r,l,i)=>{const a=f.getSelectedRange().getExtended(r,t).getCoords();switch(r){case e.IRange.Direction.Up:return a.rowStart;case e.IRange.Direction.Down:return a.rowEnd;case e.IRange.Direction.Left:return a.colStart;case e.IRange.Direction.Right:return a.colEnd}},[f]),B=t.useCallbackRef(()=>{const e=f.getUsedRange()?.getCoords(),t=f.getRowHeaders().getUsedRange()?.getCoords(),n=f.getColumnHeaders().getUsedRange()?.getCoords();return{...e,colEnd:Math.max(e?.colEnd??0,n?.max??0),rowEnd:Math.max(e?.rowEnd??0,t?.max??0)}},[f]),P=t.useCallbackRef((e,t)=>f.getRowHeaders().hiddenHeadersAt(e,t),[f]),H=t.useCallbackRef((e,t)=>f.getColumnHeaders().hiddenHeadersAt(e,t),[f]),U=t.useCallbackRef(e=>f.getRange(e,{excludeHidden:!0}).getMerges(),[f]),K=t.useCallbackRef(e=>{f?.getSelection().setAdjusting(e)},[f]),$=t.useCallbackRef(async()=>{f?.getSelection().setAdjusting(null);const e=T.getMode();"formatPainter"===e?.key&&(await(d?.getCommand("pasteFormats")?.execute({})),T.setMode(null))},[T,R,f,d]),G=r.useMemo(()=>{const e=T.getMode();return"cut"===e?.key||"copy"===e?.key},[T]);W(f?.getView(),{onMovableSelectionChange:()=>{D(f.getView().getMovableSelection().length>0)}}),W(f?.getSelection(),{onChange(e){const t=f.getSelection().getCoords();k(t)}}),W(f,{onProtectionChange:()=>{F(f.getProtection().isLocked())}});const{body:_={}}=v||{},Z=s.getLayout(),X=!(N&&R.ranges.length<=1&&null===b&&!E&&(!T.getMode()||G)),{cursor:Y,overlay:J,onPointerDown:Q}=l.useSelection({gridRef:p,commands:d,layout:Z,getCellCoordsAsRangeCoords:O,selection:R,fillHandleBorderColor:_.fill,selectionBackgroundColor:C?v.selection.fill:v.selectionInactive.fill,selectionBorderColor:C?v.selection.strokeFill:v.selectionInactive.strokeFill,selectionRemoveBackgroundColor:C?v.selectionRemove.fill:v.selectionInactive.fill,selectionRemoveBorderColor:C?v.selectionRemove.strokeFill:v.selectionInactive.strokeFill,disableFillDrag:X,disableMoveDrag:z||!(C&&R.ranges.length<=1&&null===b&&!E),disableTouchSelection:L,onSelectionChange:M,onSelectionDragStart:K,onSelectionDragEnd:$,onMoveDragStart:(e,t,n)=>{T.setMode(Se(0,n))},onMoveDragUpdate:(e,t,n)=>{T.setMode(Se(0,n))},onMoveDragEnd:(e,t)=>{T.setMode(null)},onMoveDragDone:async(t,n,r)=>{if(o.CoordUtils.isEqualRanges(t,n))return;const l=f.getRange(n);if(g?.showOptions){const e=l.getDifferences(t);let n=!1;for(let t=0;!n&&t<e.getCount();t++)n=e.at(t).isContentful();if(n){if("Replace"!==await(g?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})))return}}const i=!r.ctrlKey,a=r.shiftKey,s=a?i?"Insert Moved Cells":"Insert Copied Cells":i?"Move Cells":"Copy Cells",d=await(g?.showBusy?.(s));try{const n=f.getRange(t);await l.doBatch(async()=>{a?await l.insertFrom(t,{isCut:i,undoRange:n}):await l.copyFrom(t,{isCut:i,undoRange:n}),n.autoFit({skipCustomSize:!0,orientations:e.IRange.Orientations.Row,minContent:!0}),l.autoFit({skipCustomSize:!0,orientations:e.IRange.Orientations.Row,minContent:!0})},{description:s,autoSelect:!0})}catch(e){g?.showError?.(e)}finally{d?.()}},contentfulCellFinder:j,hiddenRowsAt:P,hiddenColumnsAt:H,mergedRanges:U,getDataCoords:B,canSelectionSpanMergedCells:e=>{const t=f.getRange(e);return t.isEntireColumns()||t.isEntireRows()},onFill:async(t,n)=>{const o="Auto Fill",r=await(g?.showBusy?.(o));try{await f.doBatch(()=>{f.getRange(t).autoFill(n),f.getRange(n).autoFit({orientations:e.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:o,autoSelect:!0})}catch(e){g?.showError?.(e)}finally{I.current=null,r?.()}},onFillPreview:(n,r,l)=>{if(p.current&&q){T.setMode(Re);try{I.current?.direction!==l&&(I.current=null,f.getRange(n).autoFill(r,{previewOnly:e=>{I.current={callback:e,direction:l}}}));const i=I.current?.callback?.(r);if(!i||i.isEmpty())return;const a=i.toText();if(!a)return;const d=o.CoordUtils.cellToRange(i.getCoords()),c=s.getRelativePointFromClient(0,0);let u=0,g=0,h=t.ToolTipPlacement.Bottom;if(l===e.IRange.Direction.Down){u=Z.getColOffset(d.colEnd+1)-c.x;const e=Z.getRowOffset(d.rowEnd),n=Z.getRowOffset(d.rowEnd+1);g=n-(n-e)/2-c.y,h=t.ToolTipPlacement.Right}else if(l===e.IRange.Direction.Right){g=Z.getRowOffset(d.rowEnd+1)-c.y;const e=Z.getColOffset(d.colEnd),n=Z.getColOffset(d.colEnd+1);u=n-(n-e)/2-c.x,h=t.ToolTipPlacement.Bottom}else if(l===e.IRange.Direction.Up){u=Z.getColOffset(d.colEnd+1)-c.x;const e=Z.getRowOffset(d.rowStart),n=Z.getRowOffset(d.rowStart+1);g=n-(n-e)/2-c.y,h=t.ToolTipPlacement.Right}else if(l===e.IRange.Direction.Left){g=Z.getRowOffset(d.rowEnd+1)-c.y;const e=Z.getColOffset(d.colStart),n=Z.getColOffset(d.colStart+1);u=n-(n-e)/2-c.x,h=t.ToolTipPlacement.Bottom}q({anchor:{x:u,y:g},display:a,placement:h})}catch(e){g?.showError?.(e)}}},onFillDone:()=>{I.current=null,T.setMode(null),S?.()}}),ee=t.useCallbackRef(e=>{Q(t.ReactUtils.createSyntheticEvent(e))},[Q,b]);r.useEffect(()=>{const e=s?.getStage();if(e)return e.addEventListener("pointerdown",ee),()=>{e.removeEventListener("pointerdown",ee)}},[s?.getStage()]);const te=t.useImperativeElement(a,()=>({}),[]),ne=r.useRef(null);return n.jsx("div",{className:V(c,"sheet-selection",be),style:{position:"absolute",width:y?.width,height:y?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:x([te,ne]),...w,children:J(s)})})),Me=Object.freeze({x:0,y:0,width:0,height:0}),Te={fireOnModelChange:!1},Ie=r.memo(r.forwardRef((e,t)=>{const{children:l,view:i,movable:a,onRefLoad:s,onRefUnload:d,onHide:c,onShow:u,onUnFocus:g,isDragging:h,updateFrameBounds:m,dragStart:f,style:p,disabled:v,renderMovable:C,...b}=e,[w,y]=r.useState(Me),[q,S]=r.useState(null),[R,k]=r.useState(!1),M=r.useRef(null);r.useLayoutEffect(()=>{if(a.isClosed())return;const e=a.getBounds();if(!e)return;const t=i.toViewBounds(e);y(t??Me),m(t??Me)},[i?.getBounds()]),W(a,{onBoundsChange:e=>{const t=e.getBounds();if(!t)return;const n=i.toViewBounds(t);y(n??Me),m(n)},onSelectionChange:()=>{const e=o.CommonUtils.hasFocus(M.current,!0);!R&&!e||a.isSelected()||g()}}),W(a,{onRequestFocus:()=>o.CommonUtils.whenFocus(M.current,!0)},Te),r.useEffect(()=>{const e=M.current;return s(e),()=>{d(e)}},[]);const T=r.useMemo(()=>{if(!w)return null;let{width:e,height:t}=w;return C({view:i,movable:a,disabled:v,isDragging:h,style:{position:"relative",left:0,top:0,width:e,height:t},onHide:c,onShow:u})},[i,a,w.width,w.height,v,h]);return n.jsx("div",{className:"movable",tabIndex:0,ref:x([M,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:w.x,top:w.y,width:w.width,height:w.height,...p},onMouseDown:async e=>{const t=e.shiftKey||e.ctrlKey,n=a.isSelected(),o=e.currentTarget;t&&n?a.unselect():(n&&!t||await a.select({addToSelection:t}),f(e.nativeEvent,o),o.focus())},onFocus:e=>{e.relatedTarget&&!q&&S(e.relatedTarget),k(!0)},onBlur:e=>{q&&!M?.current?.contains(e.relatedTarget)&&S(null),e.relatedTarget&&k(!1)},...b,children:T})})),Ee="_movable-area_314c6_5",Fe=r.memo(r.forwardRef((l,i)=>{const{view:a,movables:s,movablesView:d,renderMovable:c,transactional:u,onUnFocus:g,onFocus:h,disabled:m=!1,disableDrag:f=!1,disableResize:p=!1,className:v,style:C,renderDirections:b=["nw","n","ne","w","e","sw","s","se"],onFirstRender:w,...y}=l,q=a.getBounds(),S=t.useCallbackRef(w,[w]),R=t.useCallbackRef(g,[g]),k=t.useCallbackRef(h,[h]),[M,T]=r.useState([]),[I,E]=r.useState(!1),[F,A]=r.useState(!1),D=r.useRef(!0),z=r.useRef(new Map),N=r.useRef(new Map),L=r.useRef(new Map),O=r.useRef(new Map),j=r.useRef(new Map),B=r.useRef({onRequestFocus:e=>(oe(e),null)}),P=r.useRef(null),H=r.useRef(null),U=r.useRef(null),[K,$]=r.useReducer(e=>e+1,0);r.useLayoutEffect(()=>{$()},[a,s]),W(s,{onCollectionChange:()=>{const e=s.search({address:a.getVisibleRangeCoords(),excludeHidden:!0}),t=j.current;t.forEach(e=>{e()}),t.clear();const n=B.current;for(let o=0;o<e.length;o++){const r=e[o];if(r.isClosed())continue;const l=r.addListeners(n);t.set(r,l)}$()},onInvalidated:()=>{$()}}),W(d,{onMovableSelectionChange(e){_(),$()}});const G=r.useCallback((e,t)=>{const n=L.current.get(e);U.current&&(U.current.getTargets().forEach(e=>{if(e===n)return e.style.left=t.x+"px",e.style.top=t.y+"px",e.style.width=t.width+"px",void(e.style.height=t.height+"px")}),U.current.updateRect())},[]),_=()=>{const e=[],t=d.getMovableSelection();t.forEach(n=>{const o=L.current.get(n);if(!o)return;-1!==t.indexOf(n)&&e.push(o)}),T(t=>o.CommonUtils.isEqualArrays(t,e)?t:e)},Z=r.useRef(null),X=r.useMemo(()=>new Promise(e=>{Z.current=e}),[]),Y=r.useRef(null),J=t.useCallbackRef(async(e,t)=>{Y.current=t;await(async()=>!(!await X.then()||!U.current))()&&Y.current===t&&U.current.dragStart(e,t)},[M]),[Q,ee]=r.useState(!1),te=r.useRef(null),ne=r.useRef(null),oe=t.useCallbackRef(async(e=null)=>{if(e||(e=d.getMovableSelection()[0]),!e)return R?.(),!1;const t=L.current.get(e);t?(await o.CommonUtils.whenFocus(t),t.focus(),ne.current=t,te.current=null):te.current=e},[d]);r.useEffect(()=>{Q&&M.length>0&&ne.current!==M[0]&&oe(),D.current&&(S?.(),D.current=!1)},[M]);const re=r.useMemo(()=>{const e=s.search({address:a.getVisibleRangeCoords(),excludeHidden:!0});if(0===e.length&&0===z.current.size)return null;const t=(t,r,l,i=!0)=>{const s=t.isSelected(),d={tabIndex:l,view:a,movable:t,onRefLoad:e=>{te.current===t&&(e.focus(),ne.current=e,te.current=null),L.current.set(t,e),N.current.set(e,t),r.rendered=!0,_()},onRefUnload:e=>{L.current.delete(t),N.current.delete(e),r.rendered=!1,_()},onUnFocus:R,onHide:e=>{r.onHide=e},onShow:e=>{r.onShow=e},isDragging:s&&(F||I),disabled:m,renderMovable:c,updateFrameBounds:e=>{G(t,e)},dragStart:J,onMouseUp:()=>{if(Y.current=null,H.current){E(!1),A(!1);let e=!1;O.current?.forEach(t=>{o.CommonUtils.isEqualBounds(t.movable.getBounds(),t.startBounds)||(e=!0)}),e?ie():ae()}},style:{opacity:i?I&&s?.7:void 0:0,zIndex:I&&s?t.getZIndex()+e.length:void 0,pointerEvents:i?void 0:"none",cursor:F&&s?"grabbing":m||f?"initial":"move",boxShadow:!s||F&&!I?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return n.jsx(Ie,{...d},`movable-${t.getUUID()}`)},r=z.current,l=new Map,i=[];for(let n=0;n<e.length;n++){const o=e[n];if(o.isClosed())continue;let a=r.get(o);a||(a={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(e,t)=>{if(!t||!0===t.shown)return;t.shown=!0;const n=++t.visibilityRequestId;requestAnimationFrame(()=>{const o=z.current.get(e);o&&n===t.visibilityRequestId&&(t.onShow?.(e),o.shown=!0)})},doHide:async(e,t)=>{if(!t||!1===t?.shown)return;t.shown=!1;const n=++t.visibilityRequestId,o=await Promise.resolve(t.onHide?.(e));n===t.visibilityRequestId&&!1!==o&&(t.shown=!1,z.current.delete(e),$())},visibilityRequestId:0}),a.frame=t(o,a,n,!0),i.push(a.frame),a.doShow(o,a),r.delete(o),l.set(o,a)}const u=[];return d.getMovableSelection().forEach(e=>{const n=r.get(e);n&&(n.frame=t(e,n,-1,!1),u.push(n.frame),r.delete(e),l.set(e,n))}),r.forEach((e,n)=>{e.frame=t(n,e,-1,!1),u.push(e.frame),e.doHide(n,e),r.delete(n),l.set(n,e)}),z.current=l,_(),[...u,...i]},[K,a,c,m,f,p,I,F]),le=t.useCallbackRef((t,n)=>{const o=`${n} ${1===M.length?e.TextUtils.capitalize(N.current?.get(M[0]).getContent().getType()):"Drawings"}`;H.current&&(console.warn(`Transaction ${H.current.getDescription()} is being replaced by ${o}`),H.current.rollback(),H.current=null),H.current=u.beginCommit({description:o}),O.current.clear();for(let e=0;e<M.length;e++){const t=M[e],n=N.current?.get(t);n?O.current.set(t,{movable:n,startBounds:a.toViewBounds(n.getBounds())}):console.warn("invalid element",n)}},[u,a,M]),ie=r.useCallback(()=>{if(!H.current)return;const e=[];O.current?.forEach(t=>{e.push(t.movable)}),H.current.commit({viewAfter:{view:d,movableSelection:e}}),O.current.clear(),H.current=null},[]),ae=r.useCallback(()=>{H.current&&(H.current.rollback(),H.current=null)},[]),se=r.useRef(null);r.useEffect(()=>{se.current&&(se.current.onscroll=e=>{e.preventDefault(),e.srcElement.scrollTop=0,e.srcElement.scrollLeft=0})},[se.current]);const de=t.useImperativeElement(i,()=>({isMovableArea:()=>!0,focusMovable:oe,focus:()=>{oe()}}),[d]),[ce,ue]=r.useState(null),ge=r.useRef(!1),he=r.useRef(!1),me=r.useRef(!1);r.useEffect(()=>{if(m||0===M.length)return;if(me.current)return;if(ge.current)return;if(he.current)return void requestAnimationFrame(()=>{U.current&&P.current&&U.current.refTargets.length>0&&(me.current=!0,Z.current?.(!0)),T([...M])});ge.current=!0;const e=r.lazy(async()=>{try{const e=await Promise.resolve().then(()=>require("./BAyV6eAD3nC4LPRe.cjs"));return ge.current=!1,he.current=!0,T([...M]),e}catch(e){return console.warn(e),Z.current?.(!1),null}});ue(e)},[M,m,f,p]);const fe=r.useMemo(()=>!ce||m?null:n.jsx(r.Suspense,{children:n.jsx(ce,{className:V({dragging:I||F,resizing:I,moving:F}),container:null,ref:U,target:U.current?M:[],draggable:!m&&!f,resizable:!m&&!p,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:b,onResizeStart:e=>{le(e.target,"Resize")},onResize:e=>{if(!H.current)return e.stopDrag(),void $();E(!0);const t=0!==e.direction[0]&&0!==e.direction[1];let n=0,o=0;for(let r=0;r<M.length;r++){const l=M[r],i=O.current.get(l),s=N.current.get(l);if(!i||!s){console.warn("invalid element");continue}let d=e.dist[0],c=e.dist[1],u=e.drag.dist[0],g=e.drag.dist[1],h=i.startBounds.width,m=i.startBounds.height;0===r?(n=h,o=m):(d*=h/n,u*=h/n,c*=m/o,g*=m/o);const f={...i.startBounds};if(f.width=Math.max(0,h+d),f.height=Math.max(0,m+c),-1===e.direction[0]&&(f.width=Math.max(0,Math.min(i.startBounds.x+h,h-u))),-1===e.direction[1]&&(f.height=Math.max(0,Math.min(i.startBounds.y+m,m-g))),t&&(s.isLockAspectRatio()||e.inputEvent?.shiftKey)){const e=h/m,t=f.width/f.height;t>e?f.height=f.width/e:t<e&&(f.width=f.height*e)}-1===e.direction[0]&&(f.x=Math.max(0,Math.min(i.startBounds.x+h,i.startBounds.x+h-f.width))),-1===e.direction[1]&&(f.y=Math.min(i.startBounds.y+m,i.startBounds.y+m-f.height)),i.movable.setBounds(a.toAbsoluteBounds(f))}},onResizeEnd:e=>{E(!1),ie()},onDragStart:e=>{le(e.target,"Move")},onDrag:e=>{if(!H.current)return e.stopDrag(),void $();A(!0);for(let t=0;t<M.length;t++){const n=M[t],o=O.current.get(n);o?o.movable.setBounds(a.toAbsoluteBounds({...o.startBounds,x:o.startBounds.x+e.translate[0],y:o.startBounds.y+e.translate[1]})):console.warn("invalid element")}},onDragEnd:e=>{},onMouseUp:e=>{}})}),[K,ce,M,a,m,f,p,I,F]);return n.jsx("div",{className:V(v,"movable-area",Ee),style:{width:q.width,height:q.height,...C,position:"absolute",overflow:"hidden",willChange:"transform"},ref:x([de,se]),...y,children:n.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:q.width,height:q.height},...y,children:n.jsxs("div",{ref:P,style:{position:"absolute",pointerEvents:"auto"},onFocus:e=>{k?.(),ee(!0)},onBlur:e=>{ee(!1)},onKeyDownCapture:e=>{if(e.isDefaultPrevented())return;const n=e.nativeEvent.ctrlKey,o=e.nativeEvent.altKey,r=e.nativeEvent.shiftKey;if(e.which===t.KeyCodes.Escape){const t=d.getMovableSelection();let n=[...t];return M.forEach(e=>{if(0===n.length)return;const t=N.current.get(e);let o=n.indexOf(t);n.splice(o,1)}),n.length!==t.length&&d.selectMovables(n),0===n.length&&R?.(),void e.preventDefault()}const l=.1,i=e=>{s.updateSelected(t=>{t.setRotation(t.getRotation()+e)},"Rotate")},a=(e,t=!0)=>{s.updateSelected(n=>{const o=n.getBounds();let r=1+e;t||(r=1/r);const l=Math.sqrt(Math.pow(o.width,2)+Math.pow(o.height,2)),i=Math.atan2(o.height,o.width),a=r*l;if(a<10)return;const s=a*Math.cos(i),d=a*Math.sin(i),c={x:o.x+(o.width-s)/2,y:o.y+(o.height-d)/2,width:s,height:d};n.setBounds(c)},"Resize")},c=e=>{s.updateSelected(t=>{const n=t.getBounds(),o={x:n.x+(e.x??0),y:n.y+(e.y??0),width:n.width+(e.width??0),height:n.height+(e.height??0)};t.setBounds(o)},"Nudge")};if(e.which===t.KeyCodes.Delete)s.updateSelected(e=>{e.delete()},"Delete"),e.preventDefault();else if("a"===e.key&&n){const t=d.getMovableSelection();d.selectMovables(s.search(),!0),d.selectMovables(t,!0),e.preventDefault()}else"ArrowLeft"===e.key?(r?a(l,!1):o?i(-10):c({x:n?-10:-1}),e.preventDefault()):"ArrowRight"===e.key?(r?a(l,!0):o?i(10):c({x:n?10:1}),e.preventDefault()):"ArrowUp"===e.key?(r?a(l,!0):c({y:n?-10:-1}),e.preventDefault()):"ArrowDown"===e.key&&(r?a(l,!1):c({y:n?10:1}),e.preventDefault())},children:[re,fe]})})})})),Ae=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,o=0,r=0;for(let l=0;l<e.length;l++){const i=e[l].getBounds();t=Math.min(i.x,t),n=Math.min(i.y,n),o=Math.max(i.x+i.width,o),r=Math.max(i.y+i.height,r)}return{x:t,y:n,width:o-t,height:r-n}},De=(e,t=!0)=>{const n=[],o=t?"x":"y",r=t?"y":"x",l=t?"width":"height";let i=0,a=Number.MAX_SAFE_INTEGER,s=0;for(let t=0;t<e.length;t++){const r=e[t],d=r.getBounds();i+=d[l],a=Math.min(d[o],a),s=Math.max(d[o]+d[l],s),n.push({bounds:d,movable:r})}const d=(s-a-i)/(e.length-1);n.sort((e,t)=>{const n=e.bounds[o],l=t.bounds[o];return n!==l?n-l:e.bounds[r]-t.bounds[r]});const c=new Map;c.set(n[0].movable,n[0].bounds);for(let e=1;e<n.length-1;e++){const t=n[e-1].bounds,r={...n[e].bounds};r[o]=t[o]+t[l]+d,n[e].bounds=r,c.set(n[e].movable,r)}return c.set(n[n.length-1].movable,n[n.length-1].bounds),c};function ze(n){const{movables:o,movablesView:l,transactional:i,commands:a,target:s,onRepeatCommandChange:d,notifier:c}=n,u=t.useEditMode();r.useRef(u.getMode()).current=u.getMode();const g=t.useCallbackRef(async(e,n,o=null,r=!0)=>{const l=async()=>{const i=await Promise.resolve(c?.showBusy?.(e.label()));try{await n();const a=o??e?.label?.();if(d){let n=null;e&&!1!==a&&(n=new t.SimpleCommand(e.key(),s,{label:a,description:a},l)),d(n)}i?.(),r&&u.setMode(null)}catch(e){i?.(),c?.showError?.(e)}};await l()},[d,c]),[h,m]=r.useReducer(e=>e+1,0),f=t.useCallbackRef((t,n,o)=>{if(!l)return;const r=l.getMovableSelection();if(0===r.length)return;let a="Drawings";if(1===r.length){const t=r[0];a=e.TextUtils.capitalize(t.getContent().getType())??"Drawing"}const s=`${t.label()} ${a}`;g(t,()=>{let e=null;i&&(e=i.beginCommit(s));const t=l.getMovableSelection();if(0===t.length)return;const r=o?.(t);for(let e=0;e<t.length;e++){const o=t[e];n(o,r)}e?.commit()})},[l,i]),[p,v]=r.useState(l.getMovableSelection()[0]??null),[C,b]=r.useState(!p||p?.isProtected()),w=r.useMemo(()=>[new t.Command("moveToFront",s,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",shortcut:{key:"BracketRight",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){f(this,e=>{e.moveToFront()})}),new t.Command("moveForward",s,{label:"Bring Forward",description:"Move forward one layer in the z order.",shortcut:{key:"BracketRight",modifiers:[t.KeyModifiers.Ctrl]}},function(){f(this,e=>{e.moveForward()})}),new t.Command("moveToBack",s,{label:"Send to Back",description:"Move to the back of all of the other drawings.",shortcut:{key:"BracketLeft",modifiers:[t.KeyModifiers.Ctrl,t.KeyModifiers.Shift]}},function(){f(this,e=>{e.moveToBack()})}),new t.Command("moveBackward",s,{label:"Send Backward",description:"Move backwards one layer in the z order.",shortcut:{key:"BracketLeft",modifiers:[t.KeyModifiers.Ctrl]}},function(){f(this,e=>{e.moveBackward()})}),new t.Command("toggleLockAspectRatio",s,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners."},function(){f(this,e=>{e.setLockAspectRatio(!e.isLockAspectRatio())})}),new t.Command("formatAnchorTypeTwoCell",s,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes."},function(){f(this,t=>{t.setAnchorType(e.IAnchored.Type.TwoCell)})}),new t.Command("formatAnchorTypeOneCell",s,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes."},function(){f(this,t=>{t.setAnchorType(e.IAnchored.Type.OneCell)})}),new t.Command("formatAnchorTypeAbsolute",s,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes."},function(){f(this,t=>{t.setAnchorType(e.IAnchored.Type.Absolute)})}),new t.Command("formatDrawAlignLeft",s,{label:"Align Left",description:"Align the selected drawings to the left."},function(){f(this,(e,t)=>{e.setBounds({x:t.x})},Ae)}),new t.Command("formatDrawAlignCenter",s,{label:"Align Center",description:"Align the selected drawings vertically relative to each other."},function(){f(this,(e,t)=>{e.setBounds({x:(t.width-e.getBounds().width)/2+t.x})},Ae)}),new t.Command("formatDrawAlignRight",s,{label:"Align Right",description:"Align the selected drawings to the right."},function(){f(this,(e,t)=>{e.setBounds({x:t.width-e.getBounds().width+t.x})},Ae)}),new t.Command("formatDrawAlignTop",s,{label:"Align Top",description:"Align the selected drawings to the top."},function(){f(this,(e,t)=>{e.setBounds({y:t.y})},Ae)}),new t.Command("formatDrawAlignMiddle",s,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other."},function(){f(this,(e,t)=>{e.setBounds({y:(t.height-e.getBounds().height)/2+t.y})},Ae)}),new t.Command("formatDrawAlignBottom",s,{label:"Align Bottom",description:"Align the selected drawings to the bottom."},function(){f(this,(e,t)=>{e.setBounds({y:t.height-e.getBounds().height+t.y})},Ae)}),new t.Command("formatDrawDistributeHorz",s,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each."},function(){f(this,(e,t)=>{e.setBounds(t.get(e))},e=>De(e))}),new t.Command("formatDrawDistributeVert",s,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each."},function(){f(this,(e,t)=>{e.setBounds(t.get(e))},e=>De(e,!1))}),new t.Command("formatDrawFlipHorz",s,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new t.Command("formatDrawFlipVert",s,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new t.Command("formatDrawGroup",s,{label:"Group",description:"Group the selected drawings into a single drawing."}),new t.Command("formatDrawUngroup",s,{label:"Ungroup",description:"Break the group of a drawing into individual drawings."}),new t.Command("formatDrawSwapShapes",s,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new t.Command("formatDrawSwapShapesHorz",s,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new t.Command("formatDrawSwapShapesVert",s,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[l,p]);r.useEffect(()=>{},[u]);const y=r.useMemo(()=>{let e=null;return e=a?a.createChildGroup(s,"movable",!1):new t.CommandGroup(s,"movable"),e.addCommands(w,!0),e},[a,w]);return W(p,{onAnyChange:()=>{y.getCommand("formatAnchorTypeTwoCell").update({state:p?.getAnchorType()===e.IAnchored.Type.TwoCell}),y.getCommand("formatAnchorTypeOneCell").update({state:p?.getAnchorType()===e.IAnchored.Type.OneCell}),y.getCommand("formatAnchorTypeAbsolute").update({state:p?.getAnchorType()===e.IAnchored.Type.Absolute}),y.getCommand("formatAnchorTypeAbsolute").update({state:p?.getAnchorType()===e.IAnchored.Type.Absolute}),y.getCommand("toggleLockAspectRatio").update({state:p?.isLockAspectRatio()})},onProtectedChange:e=>{b(e.isProtected())},onDelete:()=>{}}),W(l,{onMovableSelectionChange:()=>{const e=l.getMovableSelection()[0]??null;v(e),b(!e||e.isProtected()),m()}}),W(o,{onCollectionChange:()=>{m()}}),r.useEffect(()=>{const e={disabled:C};y.getCommand("formatAnchorTypeTwoCell").update(e),y.getCommand("formatAnchorTypeOneCell").update(e),y.getCommand("formatAnchorTypeAbsolute").update(e),y.getCommand("toggleLockAspectRatio").update(e);const t=o.getCount(),n=l.getMovableSelection(),r=C||t<=1||0===n.length;let i={disabled:r},a=i;if(!r&&1===n.length){const e=n[0];0===e.getZIndex()&&(i={disabled:!0}),e.getZIndex()===t-1&&(a={disabled:!0})}y.getCommand("moveToFront").update(a),y.getCommand("moveForward").update(a),y.getCommand("moveToBack").update(i),y.getCommand("moveBackward").update(i);const s={disabled:C||n.length<=1};y.getCommand("formatDrawAlignLeft").update(s),y.getCommand("formatDrawAlignCenter").update(s),y.getCommand("formatDrawAlignRight").update(s),y.getCommand("formatDrawAlignTop").update(s),y.getCommand("formatDrawAlignMiddle").update(s),y.getCommand("formatDrawAlignBottom").update(s),y.getCommand("formatDrawFlipHorz").update(s),y.getCommand("formatDrawFlipVert").update(s),y.getCommand("formatDrawGroup").update(s),y.getCommand("formatDrawUngroup").update(s),y.getCommand("formatDrawSwapShapes").update(s),y.getCommand("formatDrawSwapShapesHorz").update(s),y.getCommand("formatDrawSwapShapesVert").update(s);const d={disabled:C||n.length<=2};y.getCommand("formatDrawDistributeHorz").update(d),y.getCommand("formatDrawDistributeVert").update(d)},[h,C,h]),y}const Ne=r.memo(r.forwardRef((e,o)=>{const{children:l,disabled:i,description:a,view:s,isDragging:d,onHide:c,onShow:u,...g}=e;r.useEffect(()=>{},[a]);const h=t.useImperativeElement(o,()=>({isEmptyFrame:()=>!0}),[]),[m,{height:f,width:p}]=T();return n.jsx("div",{...g,ref:x([h,m]),children:n.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:s.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:n.jsx("div",{style:{textAlign:"center"},children:a})})})})),Le=r.memo(r.forwardRef((e,t)=>{const{view:o,sheet:l,movableProps:i,renderMovable:a,commands:s,target:d,notifier:c,onRepeatCommandChange:u}=e,g=ze({movables:l.getMovables(),movablesView:l?.getView(),transactional:l,onRepeatCommandChange:u,commands:s,target:d,notifier:c});r.useEffect(()=>{o?.getStage()},[o?.getStage()]);const h=r.useMemo(()=>n.jsx(Fe,{ref:t,view:o,movables:l.getMovables(),disableResize:!l.getProtection().isObjectsAllowed(),disableDrag:!l.getProtection().isObjectsAllowed(),movablesView:l.getView(),transactional:l,renderMovable:a,...i,onFocus:()=>{g.activate(),i?.onFocus?.()}},"movable-area"),[l,i,s,g]);return h&&o?h:null})),Oe=r.memo(r.forwardRef((i,a)=>{const{view:s,sheet:d,gridStyle:c,getCellEditor:u,showProtectedError:g,setEditingCoords:h,commands:m,notifier:f=t.DefaultNotifier}=i,p=t.useEditMode(),[v,w]=r.useState(null),[y,x]=r.useState(null),[q,S]=r.useState(null),[R,k]=r.useState(null),[M,T]=r.useState(null);r.useLayoutEffect(()=>{if(null===q)return k(null),void T(null);const e=()=>{const e=d.getRange(q).getCell(),n=e.getStyle();let o,r=n.getFill()?.toCSS(c.body.darkMode);"none"!==r.background&&"transparent"!==r.background||(r=d.getStyles().getNormal().getFill().toCSS(c.body.darkMode)),"none"!==r.background&&"transparent"!==r.background||(r={background:c.body.fill}),k({style:r}),e&&!e.getFormula()&&(o=e?.getRenderHorizontalAlignment()),T(o??t.HorizontalAlignment.Left)};return e(),d.getRange(q).addListener(()=>{e()})},[d,q,c?.body]);const I=t.useCallbackRef(()=>{let t=y.editState.dirty??"";if(void 0!==y.editState.dirty){const n=e.TextUtils.clampString(t);try{const e=y.sheet.getRange(y.coords),o=`Typing '${n}' into ${e.toString()}`;return e.setValue(t,{description:o,autoFit:!0}),S(null),x(null),p.setMode(null),h(null),!0}catch(e){throw f.showError(new Error(`Unable to enter '${n}'.`,{cause:e})),e}}},[d,y,f]),E=t.useCallbackRef(e=>d.getRange(e).getCell().getExtrusions()??o.CoordUtils.cellToRange(e),[d]),F=t.useCallbackRef(t=>{let n=e.IRange.Orientation.Row,o=!1;t!==e.IRange.Direction.Up&&t!==e.IRange.Direction.Down||(n=e.IRange.Orientation.Column),t!==e.IRange.Direction.Left&&t!==e.IRange.Direction.Up||(o=!0),d.getSelection().traverse(n,o)},[d]),A=r.useCallback((e,t)=>{if(u)return u(e,t);if(!d)return null;const{ref:o,...r}=e;return n.jsx(C,{ref:o,...r,sheet:d,bodyStyle:c?.body,activeCoords:t,commands:m,onChangeEdit:e=>{const n={sheet:d,coords:t,editState:e};p.setMode(e=>({...e,description:n.editState.editMode?"Edit":"Enter",args:{...e?.args,stateAndCoords:n}}))},editState:y.editState})},[d,R,u,y,q]),{overlay:D,startEdit:z,submitEdit:N,cancelEdit:L,onKeyboardEventNative:O,onPointerEventNative:j}=l.useKeyboardEditorOverlay({view:s,activeCoords:v,getCellEditor:A,canEdit:()=>{const e=d.getProtection();if(e.isReadOnly())return!1;const t=e.isLocked();return t&&g(),!t},onBeforeStartEdit:e=>{const t=b(()=>d.getRange(e).getCell()),n={sheet:d,coords:e,editState:Object.freeze(t)};p.setMode({key:"edit",args:{stateAndCoords:n}}),x(n)},onStartEdit:e=>{S(e),h(e)},onSubmitEdit:I,onCancelEdit:e=>{S(null),x(null),p.setMode(null),h(null)},onDoneEdit:e=>{p.setMode(null)},onNavigate:F,containerProps:R,borderStrokeFill:c.selection?.strokeFill,borderStrokeWidth:d?.getSelection().getCoords().ranges?.length>1?1:2,alignment:M,getRangeCoords:E});W(d.getSelection(),{onChange(e){w(d.getSelection().getCoords().cell)}});const B=t.useCallbackRef(e=>{j(e),q&&N()},[j,L,q]),V=r.useCallback(e=>{j(e)},[j]),P=r.useCallback(e=>{O(e)},[O]);return r.useEffect(()=>{const e=s?.getStage();if(e)return e.addEventListener("pointerdown",B),e.addEventListener("dblclick",V),e.addEventListener("keydown",P),()=>{e.removeEventListener("pointerdown",B),e.removeEventListener("dblclick",V),e.removeEventListener("keydown",P)}},[s?.getStage()]),r.useEffect(()=>{const e=p.getMode(),t=e?.key;"edit"===t||"enter"===t?y?e.args?.cancel?L():e.args?.submit?N():x(e.args?.stateAndCoords):z(e.args?.start):q&&L()},[p]),D(s,a)})),je="white",Be="black",Ve=`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='${Be}' fill='${je}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,Pe=`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='${Be}' fill='${je}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,He=r.memo(r.forwardRef((i,a)=>{const{view:s,sheet:d}=i,[c,u]=r.useState(d.getTables().getCount()>0),[g,h]=r.useState(null),[m,f]=r.useState(null),[p,v]=r.useState(null),[C,b]=r.useState(null),w=t.useCallbackRef(()=>{if(d.getTables().getCount()>0){u(!0);const e=d.getTables().search({address:s.getVisibleRangeCoords()});h(e.length>0?e:null)}else u(!1),h(null)},[d,s]),y=t.useCallbackRef(e=>{e.preventDefault(),e.stopPropagation();const t=s.getCellCoordsFromClient(e.clientX,e.clientY),n=d.getTables().search({address:t});if(1===n.length){n[0].select()}},[s,d]),x=t.useCallbackRef(e=>{e.preventDefault(),e.stopPropagation();const t=s.getCellCoordsFromClient(e.clientX,e.clientY),n=d.getTables().search({address:t});if(1===n.length){const e=n[0].getRange().getCoords(),o={colStart:e.colStart,rowStart:t.rowIndex,colEnd:e.colEnd,rowEnd:t.rowIndex};d.getRange(o).select()}},[s,d]),q=t.useCallbackRef(()=>{if(!c)return;const e=d.getTables().search({address:s.getVisibleRangeCoords()});h(e.length>0?e:null)},[d,c,s]);W(d?.getSelection(),{onChange(e){f(d.getSelection().getCoords().cell)}}),W(p,{onAnyChange(e){w(),q()}}),W(C,{onAnyChange(e){q()}}),W(d,{onTablesChange(e){w(),q()},onInvalidated(e){w(),q()}});const S=r.useMemo(()=>o.CommonUtils.debounce(o.CommonUtils.throttle(q,300),300),[]);r.useEffect(()=>{S()},[s]),r.useEffect(()=>{let t=null;if(g)for(let n=0;n<g.length&&!t;n++){const o=g[n],r=o.getRange().getCoords();e.CoordUtils.isCellWithinRange(m,r)&&(t=o)}v(t)},[m,g]);const R=t.useCallbackRef(e=>{let t=null;if(g)for(let n=0;n<g.length;n++){const o=g[n],r=o.getRange().getCoords();let l=s.getRangeCoordsBounds(r);const i=s.getRelativePointFromClient(e.clientX,e.clientY),a=i.x,d=i.y;if(a>=l.x&&a<=l.x+l.width&&d>=l.y&&d<=l.y+l.height){const e=s.getViewportSize();a<=0||d<=0||a>=e.width||d>=e.height||(t=o)}}b(t)},[s,g]);if(r.useEffect(()=>{const e=s?.getStage();if(e&&g)return e.addEventListener("mousemove",R),e.addEventListener("mouseleave",R),()=>{e.removeEventListener("mousemove",R),e.removeEventListener("mouseleave",R)}},[g,s?.getStage()]),!s)return null;if(!g||0===g.length)return null;const k=[];for(let e=0;e<g.length;e++){const t=g[e];if(t.isClosed())continue;const o=t===C,r=t===p,i=t.getRange().getCoords(),a=s.getRangeCoordsBounds(i);let c;if(o||r){const e=t.getStyle().getProperties(),n=e.headerRow?.fill?.background??e.wholeTable?.border?.top?.color?.toString();if(n&&d){const e=d.getStyles().parseColor(n);e&&(c=e.toCSS())}c||(c="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}k.push(n.jsx("div",{style:{position:"absolute",left:a.x,top:a.y,width:Math.min(16,a.width),height:a.height,pointerEvents:"all",cursor:Ve},onMouseDown:x},`table-select-row-${t.getName()}`)),k.push(n.jsx("div",{style:{position:"absolute",left:a.x,top:a.y,width:Math.min(16,a.width),height:Math.min(16,a.height),pointerEvents:"all",cursor:Pe},onMouseDown:y},`table-select-${t.getName()}`)),k.push(n.jsx(l.Selection,{x:a.x,y:a.y,width:a.width,height:a.height,range:i,strokeWidth:r?.5:0,stroke:c??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:o?`${c} 0px 0px 1px 1px`:void 0}},`table-outline-${t.getName()}`))}return k})),Ue=r.memo(r.forwardRef((i,a)=>{const{view:s,sheet:d,animationTime:c=60}=i,[u,g]=r.useState(null),[h,m]=r.useState(null),f=r.useRef(null),p=t.useCallbackRef(()=>{const e=d.getSelectedCell(),t=e.getSpill()?.getCoords()??null;o.CoordUtils.isEqualRanges(t,u)||(m(t?{transition:u?"move":"in",bounds:s.getRangeCoordsBounds(t),coords:t}:{transition:"out",bounds:s.getRangeCoordsBounds(u),coords:u}),g(t))},[d,s,u]);r.useEffect(()=>(f.current&&(clearTimeout(f.current),f.current=null),h&&(f.current=setTimeout(()=>{m(null),f.current=null},c)),()=>{f.current&&(clearTimeout(f.current),f.current=null)}),[h,c]);const v=r.useMemo(()=>o.CommonUtils.debounce(o.CommonUtils.throttle(p,80),80),[]);if(W(d?.getSelection(),{onChange(e){v()}}),W(d,{onSpillsChange(e){p()},onInvalidated(e){p()}}),!s)return null;if(!u&&!h)return null;const C=d.getRange(u).getValue()instanceof e.FormulaError.Spill,b=[];let w=h?.bounds??s.getRangeCoordsBounds(u);if(h&&!o.CommonUtils.isEqualBounds(h.bounds,s.getRangeCoordsBounds(h.coords))&&m(null),w=s.toClipBounds(w,-10),!w)return;const y="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return b.push(n.jsx(l.Selection,{x:w.x,y:w.y,width:w.width,height:w.height,range:u,strokeWidth:1,stroke:y,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:C?"6 3":void 0,opacity:"out"===h?.transition?0:1,transition:h?.transition?"in"===h.transition||"out"===h.transition?`opacity ${1.5*c}ms ease-in-out`:`left ${c}ms ease-out, top ${c}ms ease-out, width ${c}ms ease-out, height ${c}ms ease-out`:"none",boxShadow:`${y} 0px 0px 4px 0px`}},"spill-outline}")),b})),Ke={position:"absolute",top:0,left:0,bottom:0,right:0},We=(e,t)=>{const n={...e},r=t?.getNormal().getFont(),l=r?.toCSS(),i={text:{fontFamily:l?.fontFamily,fontSize:r?.getSize()}},a=n.body=o.CommonUtils.mergeContentful(e.body,i);return n.body=o.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},a),n.buttonSurface=o.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=o.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=o.CommonUtils.mergeContentful(n.header,i),n.headerSelect=o.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=o.CommonUtils.mergeContentful(n.headerSelect,i),n.headerSelectAll=o.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=o.CommonUtils.mergeContentful(n.headerSelectAll,i),n},$e={fireOnModelChange:!1},Ge={},_e=r.memo(r.forwardRef((i,a)=>{const{sheet:s,gridStyle:d=Ge,headersStyle:c=Ge,onSheetContextMenu:u,showColumnHeaders:g,columnHeaderProps:h,showRowHeaders:f,rowHeaderProps:p,showScrollbars:v=!0,scrollPaneProps:C,onViewportChange:b,commands:w,onRepeatCommandChange:y,onMoveCell:x,overlays:q,renderMovable:S,viewportComponent:R,onElementLoad:k,getCellEditor:M,onFocus:I,onBlur:E,style:F=t.ReactUtils.EmptyCssProperties,notifier:A,onShowTooltip:D,onShowColumnTooltip:z,onShowRowTooltip:N,onCloseTooltip:L,gridProps:O,cellRenderProps:j,...B}=i;if(r.useEffect(()=>{e.LicenseManager._validate(!0)},[]),!s)throw new Error("ISheet must be provided.");const[U,$]=r.useReducer(e=>e+1,0),[_,{width:Z,height:X}]=T(),Y=t.useCallbackRef(D,[D]),J=t.useCallbackRef(z,[z]),Q=t.useCallbackRef(N,[N]),ee=t.useCallbackRef(L,[L]),te=r.useRef(!1);r.useLayoutEffect(()=>{te.current=!0},[s]);const ne=s?.getStyles(),oe=r.useMemo(()=>We(d,ne),[d,ne]),re=r.useMemo(()=>We(c,ne),[c,ne]),{body:le={},buttonSurface:ae={}}=oe,{header:ce={},headerSelect:ue={},headerSelectAll:ge={}}=re,he=r.useRef(null),[me,fe]=r.useState(()=>s?.getView()),pe=(me?.getZoomScale()??100)/100,ve=r.useMemo(()=>({vertical:me.isShowColumnGridlines()&&pe>=.4,horizontal:me.isShowRowGridlines()&&pe>=.4}),[me?.isShowColumnGridlines(),me?.isShowRowGridlines(),pe]),be=r.useMemo(()=>{if(me?.getGridLineColor())return{strokeDasharray:"1,1"}},[me?.getGridLineColor(),oe]),we=g??me?.isShowColumnHeaders(),ye=f??me?.isShowRowHeaders(),[xe,qe]=r.useState({width:0,height:0}),Se=r.useMemo(()=>{let t=40,n=20;const o=s?.getStyles().getNormal().getFont();if(xe.width>0&&xe.height>0){const r=o?.toCSS()?.fontFamily??oe.header.text.fontFamily,l=o?.getSize()??oe.header.text.fontSize,i=e.IFont.getSharedMeasurer()(""+xe.height,Math.ceil(l*e.IFont.getDeviceScale()),r);t=i.width,n=i.lineHeight}return{width:Math.round(t+5),height:Math.round(n+3)}},[xe,oe?.header.text,s]),Re=ye?pe*Se.width:ce.edgeStrokeWidth,Me=we?pe*Se.height:ce.edgeStrokeWidth,Te=Math.max(Z,(s?.getColumnHeaders().getDefaultSize()??Se.width)+Re+1),Ie=Math.max(X,(s?.getRowHeaders().getDefaultSize()??Se.height)+Me+1),Ee=r.useRef(new Map),Fe=r.useRef(null),Ae=()=>({getColOffset:e=>s.getColumnHeaders().findOffset(e),getColIndex:e=>s.getColumnHeaders().findIndex(e),getRowOffset:e=>s.getRowHeaders().findOffset(e),getRowIndex:e=>s.getRowHeaders().findIndex(e)}),[De,ze]=r.useState(()=>Ae()),[Ne,je]=r.useState(!1),[Be,Ve]=r.useState(null),Pe=!0,_e=oe.selection?.strokeFill,Ze=r.useCallback(()=>Dt.current,[]),[Xe,Ye]=r.useState(),Je=t.useCallbackRef(e=>{Ye(e),s&&s.getView()&&s.getView().setTopLeft(e?{left:e.left,top:e.top}:null),b?.(e)},[s,b]),Qe=r.useRef(null);r.useEffect(()=>{if(!Xe||!s)return;const e=s.getRangeAtBounds({x:Xe.left,y:Xe.top,width:Xe.width,height:Xe.height});Qe.current?.(),Qe.current=e.addListener(()=>{const t=e.getCoords();he?.current?.invalidate(t)})},[Xe,s]);const[et,tt]=r.useState(()=>s?.getView().getTopLeft()),nt=t.useCallbackRef(e=>{const t=o.CoordUtils.cellToRange(e);if(s.isClosed())return t;const n=s.getRange(t,{excludeHidden:!0}).getMerges();return 0===n.length?t:n[0]},[s]),ot=e=>{if(!e||0===e.coords.colIndex&&0===e.coords.rowIndex)return null;const t={};return e.coords.colIndex>0&&(t[o.AnchorLocation.Left]={index:e.coords.colIndex,scrollOffset:e.topLeft.left}),e.coords.rowIndex>0&&(t[o.AnchorLocation.Top]={index:e.coords.rowIndex,scrollOffset:e.topLeft.top}),t},[rt,lt]=r.useState(()=>ot(s.getView().getFreezePanes())),it=t.useEditMode(),at=r.useCallback(()=>he.current,[]),st=t.useCallbackRef(e=>{it.setMode(t=>"edit"===t?.key?{...t,args:{...t.args}}:{key:"edit",args:{stateAndCoords:null,start:e}})},[]),dt=t.useCallbackRef(()=>Xe,[Xe]),ct=G({sheet:s,commands:w,target:at,onRepeatCommandChange:y,bodyStyle:le,notifier:A,onStartEdit:st,getViewport:dt}),[ut,gt]=r.useState(s.getSelection().isEntire()),[ht,mt]=r.useState(me?.getMovableSelection().length>0),ft=null!==Be||ht,pt=null,[vt,Ct]=r.useState(!1);r.useEffect(()=>{Ct(!1)},[s.getProtection()]);const bt=t.useCallbackRef(()=>{vt||(Ct(!0),A.showMessage?.(n.jsxs("span",{children:["This sheet is protected.",n.jsx("br",{}),"To make a change, unprotect the sheet. You might be requested to enter a password."]}),{type:t.NotificationType.Error}))},[A,vt]),wt=r.useMemo(()=>{const e=it.getMode();return e?.cursor?e.cursor:null},[pt,it]),[yt,xt]=r.useState(null),qt=r.useRef(!1),[St,Rt]=r.useState([]),kt=r.useRef(null),[Mt,Tt]=r.useState(o.TypesUtils.EmptyTopLeft),[It,Et]=r.useState(o.TypesUtils.EmptyTopLeft);r.useEffect(()=>{Tt({left:et?.left,top:0})},[et?.left]),r.useEffect(()=>{Et({left:0,top:et?.top})},[et?.top]),W(s?.getView(),{onFreezeSplitChange:()=>{lt(ot(s.getView().getFreezePanes()))},onTopLeftChange:()=>{tt(s.getView().getTopLeft())},onMovableSelectionChange:()=>{mt(s.getView().getMovableSelection().length>0)}}),W(s?.getSelection(),{onChange:()=>{gt(s.getSelection().isEntire())}}),W(s,{onViewChange(){fe(s.getView()),ze(Ae())},onLayoutChange:()=>{const e=s.getEntireRange();qe({height:e.getRowCount(),width:e.getColumnCount()}),ze(Ae())},onStyleChange:()=>{zt()},onMovablesChange:()=>{},onInvalidated:()=>{zt()}}),W(s,{onRequestScrollIntoView:async(e,t)=>{if(!t)return;const n={colIndex:t?.coords.colStart,rowIndex:t?.coords.rowStart};return await(he.current?.scrollCellCoordsIntoView(n,t?.scroll)),!0},onRequestFocus:()=>o.CommonUtils.whenFocus(Dt.current)},$e);const Ft=r.useMemo(()=>{const e=(e,t)=>{qt.current=!0,xt([i=>{if(!i.toClipBounds(i.getRangeCoordsBounds({rowStart:0,rowEnd:xe.height,colStart:e,colEnd:e})))return;const a=i.getLayout(),c=Math.max(0,a.getColOffset(e)),u=i.getBounds(),g=Math.min(u.x+u.width,a.getColOffset(e+1)),h=i.getAnchor();if(null!==t&&(h===o.AnchorLocation.Left||h===o.AnchorLocation.Center||h===o.AnchorLocation.Right)){const e=o.CommonUtils.roundAccurately(t*o.CommonUtils.getDPI(),0),n=o.CommonUtils.roundAccurately(s?.getColumnWidthAsFontUnit(t/pe),2).toFixed(2),r="Width: "+(t?n+" ("+e+" pixels)":"Hidden"),l=Zt.current.getGridElement().getRelativePointFromClient(0,0),i=0-l.y,a=0-l.y+Me,d={x:c-(l.x-u.x),y:i,width:g-c,height:a-i};requestAnimationFrame(()=>{qt.current&&J?.({anchor:d,display:r})})}const m=[0,0,0,u.height],f={style:{boxShadow:`0.5px 0px 0px 0px ${d?.body?.fill}`},pathProps:{stroke:_e}},p={x:c-1,y:0,width:1,height:u.height},v={style:{boxShadow:`-0.5px 0px 0px 0px ${d?.body?.fill}`},pathProps:{stroke:_e}},C={x:g-1,y:0,width:1,height:u.height};return n.jsxs(r.Fragment,{children:[n.jsx(l.SVGLine,{linePoints:m,bounds:p,...f}),n.jsx(l.SVGLine,{linePoints:m,bounds:C,...v})]},"resize-dividers")}])};let t=null;return{onResizeHeadersStart:(n,o,r)=>{t=s.beginCommit(r),e(n,o)},onResizeHeaders:(t,n,o)=>{e(t,n)},onResizeHeadersDown:(t,n)=>{e(t,n)},onResizeHeadersEnd:(e,n,o)=>{t?.commit({description:o}),t=null,requestAnimationFrame(()=>ee?.()),qt.current=!1,xt(null)},onResizeHeadersUp:e=>{requestAnimationFrame(()=>ee?.()),qt.current=!1,xt(null)},...h}},[s,h,Me,yt]),At=r.useMemo(()=>{const e=(e,t)=>{qt.current=!0,xt([i=>{if(!i.toClipBounds(i.getRangeCoordsBounds({rowStart:e,rowEnd:e,colStart:0,colEnd:xe.width})))return;const a=i.getLayout(),c=Math.max(0,a.getRowOffset(e)),u=i.getBounds(),g=Math.min(u.y+u.height,a.getRowOffset(e+1)),h=i.getAnchor();if(null!==t&&(h===o.AnchorLocation.Top||h===o.AnchorLocation.Center||h===o.AnchorLocation.Bottom)){const e=Math.floor(10*o.CommonUtils.getDPI())/10,n=o.CommonUtils.roundAccurately(t*e,0),r=o.CommonUtils.roundAccurately(n/pe/(s?.getRowHeaders().getScaleFactor()*o.CommonUtils.getDPI()),2).toFixed(2),l="Height: "+(t?r+" ("+n+" pixels)":"Hidden"),i=Gt.current.getGridElement().getRelativePointFromClient(0,0),a=0-i.x,d=0-i.x+Re,h={x:a,y:c-(i.y-u.y),width:d-a,height:g-c};requestAnimationFrame(()=>{qt.current&&Q?.({anchor:h,display:l})})}const m=[0,0,u.width,0],f={style:{boxShadow:`0px 0.5px 0px 0px ${d?.body?.fill}`},pathProps:{stroke:_e}},p={x:0,y:c-1,width:u.width,height:1},v={style:{boxShadow:`0px -0.5px 0px 0px ${d?.body?.fill}`},pathProps:{stroke:_e}},C={x:0,y:g-1,width:u.width,height:1};return n.jsxs(r.Fragment,{children:[n.jsx(l.SVGLine,{linePoints:m,bounds:p,...f}),n.jsx(l.SVGLine,{linePoints:m,bounds:C,...v})]},"resize-dividers")}])};let t=null;return{onResizeHeadersStart:(n,o,r)=>{t=s.beginCommit(r),e(n,o)},onResizeHeaders:(t,n,o)=>{e(t,n)},onResizeHeadersDown:(t,n)=>{e(t,n)},onResizeHeadersEnd:(e,n,o)=>{t?.commit({description:o}),t=null,requestAnimationFrame(()=>ee?.()),qt.current=!1,xt(null)},onResizeHeadersUp:e=>{requestAnimationFrame(()=>ee?.()),qt.current=!1,xt(null)},...p}},[s,p,Re]),Dt=t.useImperativeElement(a,()=>{const e=e=>{s?.getView()&&s.getView().selectMovables([]),Fe.current=null,he?.current?.focus(e)},t=async(e=null)=>{if(e||(e=s?.getView().getMovableSelection()[0]),!e)return!1;const t=e.getAnchorCoords();if(!t)return!1;const n=he.current?.getViewFromCellCoords({colIndex:t.colStart,rowIndex:t.rowStart});if(!n)return!1;const o=n.getAnchor();-1===s?.getView().getMovableSelection().indexOf(e)&&s?.getView().selectMovables([e]);let r=Ee.current?.get(o);return r?.current?(await r.current.focusMovable(e),!0):(Fe.current={movable:e,anchor:o},!0)};return{getGridElement:()=>he.current,getRowHeaderElement:()=>Gt.current,getColumnHeaderElement:()=>Zt.current,rowHeaderHeight:()=>Me,colHeaderWidth:()=>Re,startEdit:st,submitEdit:()=>{it.setMode(e=>"edit"!==e?.key?e:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{it.setMode(e=>"edit"!==e?.key?e:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:null!==Be,focus:n=>{s?.getView().getMovableSelection().length>0&&t()||e(n)},focusSheet:e,focusMovable:t,contains:e=>he?.current?.contains?.(e),invalidate:zt,isSheetElement:()=>!0,getSheet:()=>s}},[s]),zt=r.useCallback(e=>{te.current||(he?.current?.invalidate(e),$?.())},[]);r.useEffect(()=>{zt()},[oe]);const Nt=ut?ge.edgeStrokeFill:ce.fill,Lt=ut?ue.fill:"function"==typeof oe.headerHover?oe.headerHover(ce)?.fill:ce.fill,Ot=r.useMemo(()=>R?n.jsx("div",{className:V("sheetxl-viewport-overlay",H),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:R}):n.jsx(n.Fragment,{}),[R]);let jt=null;we&&ye&&(jt=n.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Me}px`,width:`${Re}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:e=>{let n=!e.ctrlKey;ct?.getCommand("selectAll")?.execute(!n||0!==e.button),e.nativeEvent.which===t.MouseButtonCodes.Right?u?.({originalEvent:e,clientX:e.clientX,clientY:e.clientY,rowIndex:-1,colIndex:-1}):he.current?.focus()},children:[n.jsx("div",{style:{height:Me-5+"px",width:Me-5+"px",clipPath:`path('M${Me-5} 0 L0 ${Me-5} L${Me-5} ${Me-5} L${Me-5} 0 Z')`,borderRight:`2px solid ${Nt}`,borderBottom:`2px solid ${Nt}`,background:`${Lt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),n.jsx("div",{style:{position:"absolute",height:`${Me}px`,width:`${Re}px`,boxSizing:"border-box",borderRight:`solid 1px ${ce.strokeFill}`,borderBottom:`solid 1px ${ce.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const Bt=t.useCallbackRef(({_left:e,_top:t})=>{},[]),Vt=t.useCallbackRef(e=>{if(!u)return;const t=he.current.getViewFromClient(e.clientX,e.clientY)?.getCellCoordsFromClient(e.clientX,e.clientY);t&&(u({originalEvent:e,clientX:e.clientX,clientY:e.clientY,rowIndex:t.rowIndex,colIndex:t.colIndex}),e.stopPropagation(),e.preventDefault())},[u]),Pt=t.useCallbackRef(e=>{if(!(!e.shiftKey&&(e.ctrlKey||e.metaKey)))return;const{deltaY:t}=e;return t>0?ct.getCommand("sheetZoomOut")?.execute():t<0&&ct.getCommand("sheetZoomIn")?.execute(),0===t},[ct]);r.useEffect(()=>{Rt(null),kt.current=null,qt.current=!1,xt(null);const e=s?.getView().getTopLeft();Bt(e),he.current?.scrollTo(e),tt(e),fe(s.getView()),lt(ot(s.getView().getFreezePanes())),ze(Ae()),$()},[s?.getView()]);const Ht=t.useCallbackRef(t=>{const n=t.getVisibleRangeCoords();if(!n)return null;const o=[];return s.getRange(n).forEach((t,n)=>{const r=n.getCoords(),l=n.getCell();(t=>{if(t.isEmpty())return!1;const n=t.getSpans();if(n.width>1||n.height>1)return!0;if(t.getStyle().hasVisibleStyling())return!0;if(me.isShowFormulas()&&null!==t.getFormula())return!0;const o=t.getValue();return null!==o&&!(!me.isShowZeros()&&0===o&&t.getType()===e.ScalarType.Number)})(l)&&o.push({coords:r,value:l,range:me.isShowFormulas()?null:l.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),o},[s,me.isShowZeros(),me.isShowFormulas(),Be]);r.useEffect(()=>{const e=[];q&&e.push(...q),yt&&e.push(...yt),o.CommonUtils.isEqualArrays(e,kt.current)||(kt.current=e,Rt(e))},[q,yt,oe]);const Ut=r.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${d?.body?.fill}`},pathProps:{stroke:d?.body?.text?.fill??"black"}}),[oe?.header?.edgeStrokeFill]),Kt=t.useCallbackRef(e=>{e.isDefaultPrevented()||e.isPropagationStopped()||(Fe.current=null,s?.getView().getMovableSelection().length>0&&s.getView().selectMovables([]))},[s]),Wt=r.useMemo(()=>{const e=it.getMode();return"cut"===e?.key||"copy"===e?.key},[it]),$t=t.useCallbackRef(async e=>{const n=it.getMode();return e.keyCode===t.KeyCodes.Escape&&n?(e.preventDefault(),void it.setMode(null)):e.keyCode===t.KeyCodes.Enter&&Wt?(e.preventDefault(),await(ct?.getCommand("paste")?.execute()),void it.setMode(null)):void ct?.dispatchToFocusedCommand(e)},[ct,it]),Gt=r.useRef(null),_t=r.useMemo(()=>n.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Me+1}px`,width:`${Re+ce.edgeStrokeWidth}px`,minWidth:`${Re+ce.edgeStrokeWidth}px`,borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,height:`calc(100% - ${Me}px)`,boxSizing:"border-box",zIndex:"2"},children:n.jsx(se,{ref:Gt,sheetElement:Dt.current,gridRef:he,freezeStart:rt?.[o.AnchorLocation.Top],oppositeSize:Re,containerWidth:Re,containerHeight:Ie,sheetHeader:s.getRowHeaders(),gridStyle:re,verticalPadding:Math.max(0,Math.floor(s.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:It,onSheetContextMenu:u,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Me+1}px`,width:`${Re+ce.edgeStrokeWidth}px`,minWidth:`${Re+ce.edgeStrokeWidth}px`,borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,height:`calc(100% - ${Me}px)`,boxSizing:"border-box",zIndex:"2",...At?.style},...At})}),[Re,Me,Ie,s,It,rt?.[o.AnchorLocation.Top],oe,Pe,u,ce.fill,p]),Zt=r.useRef(null),Xt=r.useMemo(()=>n.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Me+ce.edgeStrokeWidth}px`,minHeight:`${Me+ce.edgeStrokeWidth}px`,borderBottom:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:n.jsx(se,{ref:Zt,sheetElement:Dt.current,gridRef:he,freezeStart:rt?.[o.AnchorLocation.Left],oppositeSize:Me,containerWidth:Te,containerHeight:Me,sheetHeader:s.getColumnHeaders(),gridStyle:re,scrollPoint:Mt,onSheetContextMenu:u,...Ft,style:{...Ft?.style,position:"relative",left:"0px",width:"100%",height:`${Me+ce.edgeStrokeWidth}px`,minHeight:`${Me+ce.edgeStrokeWidth}px`,borderBottom:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Me,Te,s,Mt,rt?.[o.AnchorLocation.Left],oe,ce.fill,Pe,u,h]),Yt=t.useCallbackRef(e=>{const{value:t,key:n,...o}=e;let l=t,i=Be;if(!i||i.colIndex===e.coords.colIndex&&i.rowIndex===e.coords.rowIndex||(i=null),!l){const t=e.range;if(l=s.getRange({rowIndex:t.rowStart,colIndex:t.colStart}).getCell(),l.isEmpty())return null}let a=null;l.getHyperlink()&&(a=async e=>{if(j?.onLinkMouseDown?.(e),0===e.button&&!e.isDefaultPrevented()){e.stopPropagation(),e.preventDefault();try{await(l.getHyperlink()?.open())}catch(e){A?.showError?.(e)}}}),i&&i.colIndex===e.range.colStart&&i.rowIndex===e.range.rowStart&&(l=l.createTemporaryCell({value:null}));const d=s.getStyles();return r.createElement(m,{...o,key:n,bodyStyle:le,docTheme:d.getTheme(),normalStyle:d.getNormal(),showFormulas:me.isShowFormulas(),showZeros:me.isShowZeros(),onLinkMouseDown:a,...j,value:l})},[s,De,le,Be,me?.isShowFormulas(),me.isShowZeros()]),Jt=r.useCallback((e,t)=>{const{key:o,...r}=e;return[n.jsx(de,{ref:t,getVisibleCells:Ht,sheet:s,gridStyle:oe,...r},`border-${o}`),n.jsx(He,{ref:t,sheet:s,commands:ct,...r},`table-${o}`),n.jsx(Ue,{ref:t,sheet:s,...r},`spill-${o}`),n.jsx(ke,{ref:t,sheet:s,commands:ct,notifier:A,onShowTooltip:Y,onCloseTooltip:ee,gridStyle:oe,gridRef:he,editingCoords:Be,isActive:Pe,...r},`selection-${o}`),n.jsx(Ce,{ref:t,sheet:s,commands:ct,gridStyle:oe,element:Ze,notifier:A,...r},`copy-paste-${o}`),n.jsx(Le,{ref:t,sheet:s,commands:ct,target:at,notifier:A,renderMovable:S,movableProps:{onUnFocus:()=>{Dt.current.focus()}},...r},`movable-${o}`),n.jsx(Oe,{ref:t,sheet:s,commands:ct,notifier:A,gridStyle:oe,getCellEditor:M,showProtectedError:bt,setEditingCoords:Ve,...r},`editor-${o}`)]},[s,he.current,oe,M,ct,A]),[Qt,en]=r.useState(!1),tn=r.useMemo(()=>{if(0===Te||0===Ie)return null;const t=s.getStyles().getNormal(),r=t.getFont(),i=t.getFill(),a=t.getBorder(),d=t.getFill().getType()===e.IFill.Type.None;let c=be,u=be;const g=(e,t,n)=>n?{stroke:a.getBottom().isNone()?"none":e.getColor().toRGBA(le.darkMode).toString(),...t}:t;u=g(a.getBottom(),u,!a.getBottom().isNone()),u=g(a.getTop(),u,!a.getTop().isNone()),c=g(a.getRight(),c,!a.getRight().isNone()),c=g(a.getLeft(),c,!a.getLeft().isNone());let h=me?.getGridLineColor()?.toRGBA(le.darkMode).toString()??le.strokeFill;return d||(u=g(a.getBottom(),u,!0),u=g(a.getTop(),u,!0),c=g(a.getRight(),c,!0),c=g(a.getLeft(),c,!0)),n.jsx(l.Grid,{className:"sheetxl-sheet-primary",style:{...Ke,...i.toCSS(le.darkMode),...r.toCSS(le.darkMode,pe),"--sxl-app-color-background":le.fill,"--sxl-app-color-shadow":oe.colorShadow,"--sxl-app-color-grey":oe.colorGrey,"--sxl-app-color-button-fill":ae.fill,"--sxl-app-color-button-text":ae.text?.fill,"--sxl-app-color-button-border":ae.edgeStrokeFill,"--sxl-app-color-primary-dark":oe.selection.strokeFill},ref:he,zoom:pe,...O,onFirstRender:e=>{en(!0),O?.onFirstRender?.(e),ct?.activate()},showGridLines:ve,gridLineColor:h,gridLineColumnsProps:c,gridLineRowsProps:u,freezeLeft:rt?.[o.AnchorLocation.Left],freezeLeftProps:Ut,freezeTop:rt?.[o.AnchorLocation.Top],freezeTopProps:Ut,width:Te,height:Ie,columnCount:xe.width,rowCount:xe.height,cursor:wt??pt??"cell",clipCells:!0,layout:De,cellRenderer:Yt,overlayRenderer:Jt,getCellCoordsAsRangeCoords:nt,getVisibleCells:Ht,onWheelScroll:Pt,onPointerDown:Kt,onKeyDown:$t,onViewportChange:Je,onImmediateScroll:Bt,scrollPoint:et,stageProps:{onFocus:()=>{ct?.activate()}},overlays:St})},[U]);r.useEffect(()=>{te.current||$()},[De,rt,pe,ct,et?.left,et?.top,le,O,Te,Ie,wt,St,Pe,pt]);let nn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};v||(nn={...nn,...F});const on=r.useMemo(()=>{const e=s.getStyles().getTheme(),t=e.getColorScheme(),n=e.getFontScheme();return{"--sxl-doc-color-dk1":t.getDk1().toCSS(le.darkMode),"--sxl-doc-color-dk2":t.getDk2().toCSS(le.darkMode),"--sxl-doc-color-lt1":t.getLt1().toCSS(le.darkMode),"--sxl-doc-color-lt2":t.getLt2().toCSS(le.darkMode),"--sxl-doc-color-accent1":t.getAccent1().toCSS(le.darkMode),"--sxl-doc-color-accent2":t.getAccent2().toCSS(le.darkMode),"--sxl-doc-color-accent3":t.getAccent3().toCSS(le.darkMode),"--sxl-doc-color-accent4":t.getAccent4().toCSS(le.darkMode),"--sxl-doc-color-accent5":t.getAccent5().toCSS(le.darkMode),"--sxl-doc-color-accent6":t.getAccent6().toCSS(le.darkMode),"--sxl-doc-color-hlink":t.getHlink().toCSS(le.darkMode),"--sxl-doc-color-fol-hlink":t.getFolHlink().toCSS(le.darkMode),"--sxl-doc-font-major":n.getMajorFont(),"--sxl-doc-font-minor":n.getMinorFont()}},[s.getStyles().getTheme()]);let rn=n.jsx("div",{style:nn,onTouchStart:()=>{sn()},onFocus:e=>{je(!0),I?.(e)},onBlur:e=>{je(!1),E?.(e)},ref:Dt,...B,children:n.jsx("div",{className:V("sheetxl-sheet",P),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...on},children:n.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[jt,_t,n.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[Xt,n.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${ce.edgeStrokeWidth}px ${ce.edgeStrokeFill}`,backgroundColor:le.fill},ref:_,onContextMenu:Vt,children:[tn,Ot,n.jsx(K,{style:{position:"absolute",right:24,bottom:4},colorLicensee:oe?.selection?.strokeFill,colorCredits:oe?.body?.text?.fill})]})]})]})})});if(v){const e=e=>n.jsx(ie,{...e,sheet:s});rn=n.jsx(t.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${ce.fill}`,minHeight:2*Se.height,minWidth:2*Se.width,...F},viewport:Xe,touchElement:he.current?.stage,disableTouch:ft,onScrollViewport:e=>{he.current?.scrollTo(e)},createHorizontalScrollbar:e,createVerticalScrollbar:e,...C,children:rn})}r.useEffect(()=>{te.current=!1,$?.(),Ne&&Dt.current?.focus()},[s]);const[ln,an]=r.useState(!1),sn=t.useCallbackRef(()=>{ln||an(!0)},[ln]);return r.useEffect(()=>{if(Qt)return"function"==typeof k&&k(),"touch"===t.ReactUtils.detectIt().primaryInput&&sn(),()=>{}},[k,Qt,ln]),rn}));_e.displayName="SheetElement";const Ze=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Xe="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=",Ye=r.memo(r.forwardRef((e,o)=>{const{children:l,disabled:i,style:a,picture:s,description:d,isDragging:c,view:u,onHide:g,onShow:h,onKeyDownCapture:m,onFocus:f,onBlur:p,loadingPanel:v,...C}=e,[b,w]=r.useState(!1),[y,x]=r.useState(null),[q,S]=r.useState(null),[R,k]=r.useState(null);r.useEffect(()=>{S(null),s.getDetails().then(e=>{w(!1),S(e.asUrl()),e.asSVGText?.()&&k(e.asSVGText())}).catch(e=>{console.warn(e),w(!0),S(Xe),k(null)})},[s]);const M=t.useImperativeElement(o,()=>({isPictureEditor:()=>!0}),[]),T=r.useMemo(()=>{if(q||R)return n.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:b?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:b?"var(--sxl-app-color-background, white)":void 0,boxShadow:b?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:b?"contain":void 0,opacity:y?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:q,onLoad:()=>{x(!0)},onError:({currentTarget:e})=>{console.log("error"),e.onerror=null,S(Xe),w(!0)},alt:d??`${s.getType()}`})},[y,s,q,R,c]);if(!s.isClosed())return n.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:c?"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,...C,onKeyDownCapture:e=>{m?.(e)},ref:M,children:[y||b?void 0:v,T]})}));Ye.displayName="PictureEditor";const Je=r.memo(r.forwardRef((e,o)=>{const{children:l,disabled:i,chart:a,view:s,isDragging:d,onHide:c,onShow:u,...g}=e;r.useEffect(()=>{},[a]);const h=t.useImperativeElement(o,()=>({isChartEditor:()=>!0}),[]),[m,{height:f,width:p}]=T();if(!a.isClosed())return n.jsx("div",{...g,ref:x([h,m]),children:n.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:s.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:n.jsx("div",{style:{textAlign:"center"},children:a.getDescription()})})})})),Qe="_editable-input_1bqx6_6",et=e=>n.jsx("input",{...e}),tt=r.memo(r.forwardRef((e,o)=>{const{style:l={},className:i,value:a="",onSubmit:s,onChange:d,onCancel:c,createInput:u=et,notifier:g,styleHover:h={},dragging:m,maxLength:f,disabled:p=!1,readOnly:v=!1,...C}=e,[b,w]=r.useState(!1),[y,x]=r.useState(!1),[q,S]=r.useState(a);r.useEffect(()=>{S(a)},[a]);const R=r.useRef(null),[k,M]=r.useState(null),T=r.useCallback(function(e){const n=e.message;k!==n&&(g?.showMessage?.(n,{type:t.NotificationType.Error}),M(n))},[g,k]),I=r.useCallback(e=>{let t=!1;try{t=s?.(e)??!0}catch(e){T(e)}return t?(R.current=null,x(!1),S(e),t):(setTimeout(()=>{R.current?.focus()},0),t)},[s]),E=t.useCallbackRef(()=>{S(a),R.current=null,x(!1),c?.()},[c,a]),F=r.useMemo(()=>{if(!y)return null;const e={className:V(Qe),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:f,type:"text",value:q,onFocus:e=>{R.current||(R.current=e.target,setTimeout(()=>{e.target?.select()},0))},onBlur:e=>{R.current&&I(q)},onChange:e=>{y&&S(e.target.value)},onMouseDown:e=>e.stopPropagation(),onKeyDown:e=>"Escape"===e.code?(e.preventDefault(),void E()):"Enter"===e.code?(e.preventDefault(),void I(e.target.value)):void("Tab"!==e.code?e.stopPropagation():I(e.target.value))};return n.jsx(n.Fragment,{children:u(e)})},[y,q,I,E,u,p]),[A,D]=r.useState();r.useLayoutEffect(()=>{let e=Object.assign({},l);(m||b)&&(e=Object.assign(e,h)),D(e)},[m,b,h,l]),r.useEffect(()=>{F&&d?.(q)},[F,d,q]);const z=t.useImperativeElement(o,()=>({startEdit(){p||v||x(!0)},cancel(){E()}}),[]);return n.jsxs("div",{...C,ref:z,style:{flexDirection:"column",display:"flex",...A},className:V(i),children:[n.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{p||v||x(!0)},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),children:[n.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:y?0:1},children:q}),F]}),n.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...h},children:q})]})}));const nt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function ot(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function rt(e){return"nodeType"in e}function lt(e){var t,n;return e?ot(e)?e:rt(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function it(e){const{Document:t}=lt(e);return e instanceof t}function at(e){return!ot(e)&&e instanceof lt(e).HTMLElement}function st(e){return e instanceof lt(e).SVGElement}function dt(e){return e?ot(e)?e.document:rt(e)?it(e)?e:at(e)||st(e)?e.ownerDocument:document:document:document}const ct=nt?r.useLayoutEffect:r.useEffect;function ut(e){const t=r.useRef(e);return ct(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)},[])}function gt(e,t){void 0===t&&(t=[e]);const n=r.useRef(e);return ct(()=>{n.current!==e&&(n.current=e)},t),n}function ht(e,t){const n=r.useRef();return r.useMemo(()=>{const t=e(n.current);return n.current=t,t},[...t])}function mt(e){const t=ut(e),n=r.useRef(null),o=r.useCallback(e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e},[]);return[n,o]}function ft(e){const t=r.useRef();return r.useEffect(()=>{t.current=e},[e]),t.current}let pt={};function vt(e,t){return r.useMemo(()=>{if(t)return t;const n=null==pt[e]?0:pt[e]+1;return pt[e]=n,e+"-"+n},[e,t])}function Ct(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t},{...t})}}const bt=Ct(1),wt=Ct(-1);function yt(e){if(!e)return!1;const{KeyboardEvent:t}=lt(e.target);return t&&e instanceof t}function xt(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=lt(e.target);return t&&e instanceof t}(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(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const qt=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[qt.Translate.toString(e),qt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),St="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Rt(e){return e.matches(St)?e:e.querySelector(St)}const kt={display:"none"};function Mt(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:kt},n)}function Tt(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.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":o,"aria-atomic":!0},n)}const It=r.createContext(null);const Et={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},Ft={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 At(e){let{announcements:t=Ft,container:n,hiddenTextDescribedById:o,screenReaderInstructions:l=Et}=e;const{announce:a,announcement:s}=function(){const[e,t]=r.useState("");return{announce:r.useCallback(e=>{null!=e&&t(e)},[]),announcement:e}}(),d=vt("DndLiveRegion"),[c,u]=r.useState(!1);if(r.useEffect(()=>{u(!0)},[]),function(e){const t=r.useContext(It);r.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}(r.useMemo(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:o}=e;t.onDragMove&&a(t.onDragMove({active:n,over:o}))},onDragOver(e){let{active:n,over:o}=e;a(t.onDragOver({active:n,over:o}))},onDragEnd(e){let{active:n,over:o}=e;a(t.onDragEnd({active:n,over:o}))},onDragCancel(e){let{active:n,over:o}=e;a(t.onDragCancel({active:n,over:o}))}}),[a,t])),!c)return null;const g=r.createElement(r.Fragment,null,r.createElement(Mt,{id:o,value:l.draggable}),r.createElement(Tt,{id:d,announcement:s}));return n?i.createPortal(g,n):g}var Dt;function zt(){}function Nt(e,t){return r.useMemo(()=>({sensor:e,options:null!=t?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"}(Dt||(Dt={}));const Lt=Object.freeze({x:0,y:0});function Ot(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function jt(e,t){const n=xt(e);if(!n)return"0 0";return(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%"}function Bt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function Vt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function Pt(e){let{left:t,top:n,height:o,width:r}=e;return[{x:t,y:n},{x:t+r,y:n},{x:t,y:n+o},{x:t+r,y:n+o}]}function Ht(e,t){if(!e||0===e.length)return null;const[n]=e;return n[t]}function Ut(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const Kt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Ut(t,t.left,t.top),l=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=Ot(Ut(o),r);l.push({id:t,data:{droppableContainer:e,value:n}})}}return l.sort(Bt)};function Wt(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),i=r-o,a=l-n;if(o<r&&n<l){const n=t.width*t.height,o=e.width*e.height,r=i*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const $t=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,l=n.get(o);if(l){const n=Wt(l,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(Vt)};function Gt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Lt}function _t(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}const Zt=_t(1);function Xt(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 Yt={ignoreTransform:!1};function Jt(e,t){void 0===t&&(t=Yt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=lt(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=Xt(t);if(!o)return e;const{scaleX:r,scaleY:l,x:i,y:a}=o,s=e.left-i-(1-r)*parseFloat(n),d=e.top-a-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=l?e.height/l:e.height;return{width:c,height:u,top:d,right:s+c,bottom:d+u,left:s}}(n,t,o))}const{top:o,left:r,width:l,height:i,bottom:a,right:s}=n;return{top:o,left:r,width:l,height:i,bottom:a,right:s}}function Qt(e){return Jt(e,{ignoreTransform:!0})}function en(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t)return n;if(!r)return n;if(it(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!at(r)||st(r))return n;if(n.includes(r))return n;const l=lt(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=lt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const o=t[e];return"string"==typeof o&&n.test(o)})}(r,l)&&n.push(r),function(e,t){return void 0===t&&(t=lt(e).getComputedStyle(e)),"fixed"===t.position}(r,l)?n:o(r.parentNode)}(e):n}function tn(e){const[t]=en(e,1);return null!=t?t:null}function nn(e){return nt&&e?ot(e)?e:rt(e)?it(e)||e===dt(e).scrollingElement?window:at(e)?e:null:null:null}function on(e){return ot(e)?e.scrollX:e.scrollLeft}function rn(e){return ot(e)?e.scrollY:e.scrollTop}function ln(e){return{x:on(e),y:rn(e)}}var an;function sn(e){return!(!nt||!e)&&e===document.scrollingElement}function dn(e){const t={x:0,y:0},n=sn(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(an||(an={}));const cn={x:.2,y:.2};function un(e,t,n,o,r){let{top:l,left:i,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=cn);const{isTop:d,isBottom:c,isLeft:u,isRight:g}=dn(e),h={x:0,y:0},m={x:0,y:0},f=t.height*r.y,p=t.width*r.x;return!d&&l<=t.top+f?(h.y=an.Backward,m.y=o*Math.abs((t.top+f-l)/f)):!c&&s>=t.bottom-f&&(h.y=an.Forward,m.y=o*Math.abs((t.bottom-f-s)/f)),!g&&a>=t.right-p?(h.x=an.Forward,m.x=o*Math.abs((t.right-p-a)/p)):!u&&i<=t.left+p&&(h.x=an.Backward,m.x=o*Math.abs((t.left+p-i)/p)),{direction:h,speed:m}}function gn(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function hn(e){return e.reduce((e,t)=>bt(e,ln(t)),Lt)}function mn(e,t){if(void 0===t&&(t=Jt),!e)return;const{top:n,left:o,bottom:r,right:l}=t(e);tn(e)&&(r<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const fn=[["x",["left","right"],function(e){return e.reduce((e,t)=>e+on(t),0)}],["y",["top","bottom"],function(e){return e.reduce((e,t)=>e+rn(t),0)}]];class pn{constructor(e,t){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 n=en(t),o=hn(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of fn)for(const l of t)Object.defineProperty(this,l,{get:()=>{const t=r(n),i=o[e]-t;return this.rect[l]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vn{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)})},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Cn(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var bn,wn;function yn(e){e.preventDefault()}function xn(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"}(bn||(bn={})),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"}(wn||(wn={}));const qn={start:[wn.Space,wn.Enter],cancel:[wn.Esc],end:[wn.Space,wn.Enter,wn.Tab]},Sn=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case wn.Right:return{...n,x:n.x+25};case wn.Left:return{...n,x:n.x-25};case wn.Down:return{...n,y:n.y+25};case wn.Up:return{...n,y:n.y-25}}};class Rn{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new vn(dt(t)),this.windowListeners=new vn(lt(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(bn.Resize,this.handleCancel),this.windowListeners.add(bn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(bn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&mn(n),t(Lt)}handleKeyDown(e){if(yt(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=qn,coordinateGetter:l=Sn,scrollBehavior:i="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,d=s?{x:s.left,y:s.top}:Lt;this.referenceCoordinates||(this.referenceCoordinates=d);const c=l(e,{active:t,context:n.current,currentCoordinates:d});if(c){const t=wt(c,d),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:l,isRight:a,isLeft:s,isBottom:d,maxScroll:u,minScroll:g}=dn(n),h=gn(n),m={x:Math.min(r===wn.Right?h.right-h.width/2:h.right,Math.max(r===wn.Right?h.left:h.left+h.width/2,c.x)),y:Math.min(r===wn.Down?h.bottom-h.height/2:h.bottom,Math.max(r===wn.Down?h.top:h.top+h.height/2,c.y))},f=r===wn.Right&&!a||r===wn.Left&&!s,p=r===wn.Down&&!d||r===wn.Up&&!l;if(f&&m.x!==c.x){const e=n.scrollLeft+t.x,l=r===wn.Right&&e<=u.x||r===wn.Left&&e>=g.x;if(l&&!t.y)return void n.scrollTo({left:e,behavior:i});o.x=l?n.scrollLeft-e:r===wn.Right?n.scrollLeft-u.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:i});break}if(p&&m.y!==c.y){const e=n.scrollTop+t.y,l=r===wn.Down&&e<=u.y||r===wn.Up&&e>=g.y;if(l&&!t.x)return void n.scrollTo({top:e,behavior:i});o.y=l?n.scrollTop-e:r===wn.Down?n.scrollTop-u.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:i});break}}this.handleMove(e,bt(wt(c,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function kn(e){return Boolean(e&&"distance"in e)}function Mn(e){return Boolean(e&&"delay"in e)}Rn.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=qn,onActivation:r}=t,{active:l}=n;const{code:i}=e.nativeEvent;if(o.start.includes(i)){const t=l.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class Tn{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=lt(e);return e instanceof t?e:dt(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:l}=r;this.props=e,this.events=t,this.document=dt(l),this.documentListeners=new vn(this.document),this.listeners=new vn(n),this.windowListeners=new vn(lt(l)),this.initialCoordinates=null!=(o=xt(r))?o:Lt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(bn.Resize,this.handleCancel),this.windowListeners.add(bn.DragStart,yn),this.windowListeners.add(bn.VisibilityChange,this.handleCancel),this.windowListeners.add(bn.ContextMenu,yn),this.documentListeners.add(bn.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Mn(t))return this.timeoutId=setTimeout(this.handleStart,t.delay),void this.handlePending(t);if(kn(t))return void this.handlePending(t)}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:n,onPending:o}=this.props;o(n,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(bn.Click,xn,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(bn.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:l,options:{activationConstraint:i}}=r;if(!o)return;const a=null!=(t=xt(e))?t:Lt,s=wt(o,a);if(!n&&i){if(kn(i)){if(null!=i.tolerance&&Cn(s,i.tolerance))return this.handleCancel();if(Cn(s,i.distance))return this.handleStart()}return Mn(i)&&Cn(s,i.tolerance)?this.handleCancel():void this.handlePending(i,s)}e.cancelable&&e.preventDefault(),l(a)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===wn.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const In={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class En extends Tn{constructor(e){const{event:t}=e,n=dt(t.target);super(e,In,n)}}En.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const Fn={move:{name:"mousemove"},end:{name:"mouseup"}};var An;!function(e){e[e.RightClick=2]="RightClick"}(An||(An={}));class Dn extends Tn{constructor(e){super(e,Fn,dt(e.event.target))}}Dn.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==An.RightClick&&(null==o||o({event:n}),!0)}}];const zn={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Nn extends Tn{constructor(e){super(e,zn)}static setup(){return window.addEventListener(zn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(zn.move.name,e)};function e(){}}}var Ln,On;function jn(e){let{acceleration:t,activator:n=Ln.Pointer,canScroll:o,draggingRect:l,enabled:i,interval:a=5,order:s=On.TreeOrder,pointerCoordinates:d,scrollableAncestors:c,scrollableAncestorRects:u,delta:g,threshold:h}=e;const m=function(e){let{delta:t,disabled:n}=e;const o=ft(t);return ht(e=>{if(n||!o||!e)return Bn;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[an.Backward]:e.x[an.Backward]||-1===r.x,[an.Forward]:e.x[an.Forward]||1===r.x},y:{[an.Backward]:e.y[an.Backward]||-1===r.y,[an.Forward]:e.y[an.Forward]||1===r.y}}},[n,t,o])}({delta:g,disabled:!i}),[f,p]=function(){const e=r.useRef(null);return[r.useCallback((t,n)=>{e.current=setInterval(t,n)},[]),r.useCallback(()=>{null!==e.current&&(clearInterval(e.current),e.current=null)},[])]}(),v=r.useRef({x:0,y:0}),C=r.useRef({x:0,y:0}),b=r.useMemo(()=>{switch(n){case Ln.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Ln.DraggableRect:return l}},[n,l,d]),w=r.useRef(null),y=r.useCallback(()=>{const e=w.current;if(!e)return;const t=v.current.x*C.current.x,n=v.current.y*C.current.y;e.scrollBy(t,n)},[]),x=r.useMemo(()=>s===On.TreeOrder?[...c].reverse():c,[s,c]);r.useEffect(()=>{if(i&&c.length&&b){for(const e of x){if(!1===(null==o?void 0:o(e)))continue;const n=c.indexOf(e),r=u[n];if(!r)continue;const{direction:l,speed:i}=un(e,r,b,t,h);for(const e of["x","y"])m[e][l[e]]||(i[e]=0,l[e]=0);if(i.x>0||i.y>0)return p(),w.current=e,f(y,a),v.current=i,void(C.current=l)}v.current={x:0,y:0},C.current={x:0,y:0},p()}else p()},[t,y,o,p,i,a,JSON.stringify(b),JSON.stringify(m),f,c,x,u,JSON.stringify(h)])}Nn.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(Ln||(Ln={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(On||(On={}));const Bn={x:{[an.Backward]:!1,[an.Forward]:!1},y:{[an.Backward]:!1,[an.Forward]:!1}};var Vn,Pn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(Vn||(Vn={})),function(e){e.Optimized="optimized"}(Pn||(Pn={}));const Hn=new Map;function Un(e,t){return ht(n=>e?n||("function"==typeof t?t(e):e):null,[t,e])}function Kn(e){let{callback:t,disabled:n}=e;const o=ut(t),l=r.useMemo(()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)},[n]);return r.useEffect(()=>()=>null==l?void 0:l.disconnect(),[l]),l}function Wn(e){return new pn(Jt(e),e)}function $n(e,t,n){void 0===t&&(t=Wn);const[o,l]=r.useState(null);function i(){l(o=>{if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=null!=o?o:n)?r:null;const l=t(e);return JSON.stringify(o)===JSON.stringify(l)?o:l})}const a=function(e){let{callback:t,disabled:n}=e;const o=ut(t),l=r.useMemo(()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)},[o,n]);return r.useEffect(()=>()=>null==l?void 0:l.disconnect(),[l]),l}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){i();break}}}}),s=Kn({callback:i});return ct(()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())},[e]),o}const Gn=[];function _n(e,t){void 0===t&&(t=[]);const n=r.useRef(null);return r.useEffect(()=>{n.current=null},t),r.useEffect(()=>{const t=e!==Lt;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?wt(e,n.current):Lt}function Zn(e){return r.useMemo(()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null,[e])}const Xn=[];function Yn(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return at(t)?t:e}const Jn=[{sensor:En,options:{}},{sensor:Rn,options:{}}],Qn={current:{}},eo={draggable:{measure:Qt},droppable:{measure:Qt,strategy:Vn.WhileDragging,frequency:Pn.Optimized},dragOverlay:{measure:Jt}};class to extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const no={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new to,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:zt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:eo,measureDroppableContainers:zt,windowRect:null,measuringScheduled:!1},oo={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:zt,draggableNodes:new Map,over:null,measureDroppableContainers:zt},ro=r.createContext(oo),lo=r.createContext(no);function io(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new to}}}function ao(e,t){switch(t.type){case Dt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Dt.DragMove:return null==e.draggable.active?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Dt.DragEnd:case Dt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Dt.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new to(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case Dt.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,l=e.droppable.containers.get(n);if(!l||o!==l.key)return e;const i=new to(e.droppable.containers);return i.set(n,{...l,disabled:r}),{...e,droppable:{...e.droppable,containers:i}}}case Dt.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const l=new to(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function so(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:l}=r.useContext(ro),i=ft(o),a=ft(null==n?void 0:n.id);return r.useEffect(()=>{if(!t&&!o&&i&&null!=a){if(!yt(i))return;if(document.activeElement===i.target)return;const e=l.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=Rt(e);if(t){t.focus();break}}})}},[o,t,l,a,i]),null}function co(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce((e,t)=>t({transform:e,...o}),n):n}const uo=r.createContext({...Lt,scaleX:1,scaleY:1});var go;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(go||(go={}));const ho=r.memo(function(e){var t,n,o,l;let{id:a,accessibility:s,autoScroll:d=!0,children:c,sensors:u=Jn,collisionDetection:g=$t,measuring:h,modifiers:m,...f}=e;const p=r.useReducer(ao,void 0,io),[v,C]=p,[b,w]=function(){const[e]=r.useState(()=>new Set),t=r.useCallback(t=>(e.add(t),()=>e.delete(t)),[e]);return[r.useCallback(t=>{let{type:n,event:o}=t;e.forEach(e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)})},[e]),t]}(),[y,x]=r.useState(go.Uninitialized),q=y===go.Initialized,{draggable:{active:S,nodes:R,translate:k},droppable:{containers:M}}=v,T=null!=S?R.get(S):null,I=r.useRef({initial:null,translated:null}),E=r.useMemo(()=>{var e;return null!=S?{id:S,data:null!=(e=null==T?void 0:T.data)?e:Qn,rect:I}:null},[S,T]),F=r.useRef(null),[A,D]=r.useState(null),[z,N]=r.useState(null),L=gt(f,Object.values(f)),O=vt("DndDescribedBy",a),j=r.useMemo(()=>M.getEnabled(),[M]),B=(V=h,r.useMemo(()=>({draggable:{...eo.draggable,...null==V?void 0:V.draggable},droppable:{...eo.droppable,...null==V?void 0:V.droppable},dragOverlay:{...eo.dragOverlay,...null==V?void 0:V.dragOverlay}}),[null==V?void 0:V.draggable,null==V?void 0:V.droppable,null==V?void 0:V.dragOverlay]));var V;const{droppableRects:P,measureDroppableContainers:H,measuringScheduled:U}=function(e,t){let{dragging:n,dependencies:o,config:l}=t;const[i,a]=r.useState(null),{frequency:s,measure:d,strategy:c}=l,u=r.useRef(e),g=function(){switch(c){case Vn.Always:return!1;case Vn.BeforeDragging:return n;default:return!n}}(),h=gt(g),m=r.useCallback(function(e){void 0===e&&(e=[]),h.current||a(t=>null===t?e:t.concat(e.filter(e=>!t.includes(e))))},[h]),f=r.useRef(null),p=ht(t=>{if(g&&!n)return Hn;if(!t||t===Hn||u.current!==e||null!=i){const t=new Map;for(let n of e){if(!n)continue;if(i&&i.length>0&&!i.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new pn(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t},[e,i,n,g,d]);return r.useEffect(()=>{u.current=e},[e]),r.useEffect(()=>{g||m()},[n,g]),r.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),r.useEffect(()=>{g||"number"!=typeof s||null!==f.current||(f.current=setTimeout(()=>{m(),f.current=null},s))},[s,g,m,...o]),{droppableRects:p,measureDroppableContainers:m,measuringScheduled:null!=i}}(j,{dragging:q,dependencies:[k.x,k.y],config:B.droppable}),K=function(e,t){const n=null!=t?e.get(t):void 0,o=n?n.node.current:null;return ht(e=>{var n;return null==t?null:null!=(n=null!=o?o:e)?n:null},[o,t])}(R,S),W=r.useMemo(()=>z?xt(z):null,[z]),$=function(){const e=!1===(null==A?void 0:A.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=q&&!e&&!t;if("object"==typeof d)return{...d,enabled:n};return{enabled:n}}(),G=function(e,t){return Un(e,t)}(K,B.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:l=!0}=e;const i=r.useRef(!1),{x:a,y:s}="boolean"==typeof l?{x:l,y:l}:l;ct(()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=Gt(n(e),o);if(a||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=tn(e);t&&t.scrollBy({top:r.y,left:r.x})}},[t,a,s,o,n])}({activeNode:null!=S?R.get(S):null,config:$.layoutShiftCompensation,initialRect:G,measure:B.draggable.measure});const _=$n(K,B.draggable.measure,G),Z=$n(K?K.parentElement:null),X=r.useRef({activatorEvent:null,active:null,activeNode:K,collisionRect:null,collisions:null,droppableRects:P,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Y=M.getNodeFor(null==(t=X.current.over)?void 0:t.id),J=function(e){let{measure:t}=e;const[n,o]=r.useState(null),l=Kn({callback:r.useCallback(e=>{for(const{target:n}of e)if(at(n)){o(e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o});break}},[t])}),i=r.useCallback(e=>{const n=Yn(e);null==l||l.disconnect(),n&&(null==l||l.observe(n)),o(n?t(n):null)},[t,l]),[a,s]=mt(i);return r.useMemo(()=>({nodeRef:a,rect:n,setRef:s}),[n,a,s])}({measure:B.dragOverlay.measure}),Q=null!=(n=J.nodeRef.current)?n:K,ee=q?null!=(o=J.rect)?o:_:null,te=Boolean(J.nodeRef.current&&J.rect),ne=Gt(oe=te?null:_,Un(oe));var oe;const re=Zn(Q?lt(Q):null),le=function(e){const t=r.useRef(e),n=ht(n=>e?n&&n!==Gn&&e&&t.current&&e.parentNode===t.current.parentNode?n:en(e):Gn,[e]);return r.useEffect(()=>{t.current=e},[e]),n}(q?null!=Y?Y:K:null),ie=function(e,t){void 0===t&&(t=Jt);const[n]=e,o=Zn(n?lt(n):null),[l,i]=r.useState(Xn);function a(){i(()=>e.length?e.map(e=>sn(e)?o:new pn(t(e),e)):Xn)}const s=Kn({callback:a});return ct(()=>{null==s||s.disconnect(),a(),e.forEach(e=>null==s?void 0:s.observe(e))},[e]),l}(le),ae=co(m,{transform:{x:k.x-ne.x,y:k.y-ne.y,scaleX:1,scaleY:1},activatorEvent:z,active:E,activeNodeRect:_,containerNodeRect:Z,draggingNodeRect:ee,over:X.current.over,overlayNodeRect:J.rect,scrollableAncestors:le,scrollableAncestorRects:ie,windowRect:re}),se=W?bt(W,k):null,de=function(e){const[t,n]=r.useState(null),o=r.useRef(e),l=r.useCallback(e=>{const t=nn(e.target);t&&n(e=>e?(e.set(t,ln(t)),new Map(e)):null)},[]);return r.useEffect(()=>{const t=o.current;if(e!==t){r(t);const i=e.map(e=>{const t=nn(e);return t?(t.addEventListener("scroll",l,{passive:!0}),[t,ln(t)]):null}).filter(e=>null!=e);n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach(e=>{const t=nn(e);null==t||t.removeEventListener("scroll",l)})}},[l,e]),r.useMemo(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>bt(e,t),Lt):hn(e):Lt,[e,t])}(le),ce=_n(de),ue=_n(de,[_]),ge=bt(ae,ce),he=ee?Zt(ee,ae):null,me=E&&he?g({active:E,collisionRect:he,droppableRects:P,droppableContainers:j,pointerCoordinates:se}):null,fe=Ht(me,"id"),[pe,ve]=r.useState(null),Ce=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(te?ae:bt(ae,ue),null!=(l=null==pe?void 0:pe.rect)?l:null,_),be=r.useRef(null),we=r.useCallback((e,t)=>{let{sensor:n,options:o}=t;if(null==F.current)return;const r=R.get(F.current);if(!r)return;const l=e.nativeEvent,a=new n({active:F.current,activeNode:r,event:l,options:o,context:X,onAbort(e){if(!R.get(e))return;const{onDragAbort:t}=L.current,n={id:e};null==t||t(n),b({type:"onDragAbort",event:n})},onPending(e,t,n,o){if(!R.get(e))return;const{onDragPending:r}=L.current,l={id:e,constraint:t,initialCoordinates:n,offset:o};null==r||r(l),b({type:"onDragPending",event:l})},onStart(e){const t=F.current;if(null==t)return;const n=R.get(t);if(!n)return;const{onDragStart:o}=L.current,r={activatorEvent:l,active:{id:t,data:n.data,rect:I}};i.unstable_batchedUpdates(()=>{null==o||o(r),x(go.Initializing),C({type:Dt.DragStart,initialCoordinates:e,active:t}),b({type:"onDragStart",event:r}),D(be.current),N(l)})},onMove(e){C({type:Dt.DragMove,coordinates:e})},onEnd:s(Dt.DragEnd),onCancel:s(Dt.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=X.current;let a=null;if(t&&r){const{cancelDrop:i}=L.current;if(a={activatorEvent:l,active:t,collisions:n,delta:r,over:o},e===Dt.DragEnd&&"function"==typeof i){await Promise.resolve(i(a))&&(e=Dt.DragCancel)}}F.current=null,i.unstable_batchedUpdates(()=>{C({type:e}),x(go.Uninitialized),ve(null),D(null),N(null),be.current=null;const t=e===Dt.DragEnd?"onDragEnd":"onDragCancel";if(a){const e=L.current[t];null==e||e(a),b({type:t,event:a})}})}}be.current=a},[R]),ye=r.useCallback((e,t)=>(n,o)=>{const r=n.nativeEvent,l=R.get(o);if(null!==F.current||!l||r.dndKit||r.defaultPrevented)return;const i={active:l};!0===e(n,t.options,i)&&(r.dndKit={capturedBy:t.sensor},F.current=o,we(n,t))},[R,we]),xe=function(e,t){return r.useMemo(()=>e.reduce((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}))]},[]),[e,t])}(u,ye);!function(e){r.useEffect(()=>{if(!nt)return;const t=e.map(e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()});return()=>{for(const e of t)null==e||e()}},e.map(e=>{let{sensor:t}=e;return t}))}(u),ct(()=>{_&&y===go.Initializing&&x(go.Initialized)},[_,y]),r.useEffect(()=>{const{onDragMove:e}=L.current,{active:t,activatorEvent:n,collisions:o,over:r}=X.current;if(!t||!n)return;const l={active:t,activatorEvent:n,collisions:o,delta:{x:ge.x,y:ge.y},over:r};i.unstable_batchedUpdates(()=>{null==e||e(l),b({type:"onDragMove",event:l})})},[ge.x,ge.y]),r.useEffect(()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=X.current;if(!e||null==F.current||!t||!r)return;const{onDragOver:l}=L.current,a=o.get(fe),s=a&&a.rect.current?{id:a.id,rect:a.rect.current,data:a.data,disabled:a.disabled}:null,d={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:s};i.unstable_batchedUpdates(()=>{ve(s),null==l||l(d),b({type:"onDragOver",event:d})})},[fe]),ct(()=>{X.current={activatorEvent:z,active:E,activeNode:K,collisionRect:he,collisions:me,droppableRects:P,draggableNodes:R,draggingNode:Q,draggingNodeRect:ee,droppableContainers:M,over:pe,scrollableAncestors:le,scrollAdjustedTranslate:ge},I.current={initial:ee,translated:he}},[E,K,me,he,R,Q,ee,P,M,pe,le,ge]),jn({...$,delta:k,draggingRect:he,pointerCoordinates:se,scrollableAncestors:le,scrollableAncestorRects:ie});const qe=r.useMemo(()=>({active:E,activeNode:K,activeNodeRect:_,activatorEvent:z,collisions:me,containerNodeRect:Z,dragOverlay:J,draggableNodes:R,droppableContainers:M,droppableRects:P,over:pe,measureDroppableContainers:H,scrollableAncestors:le,scrollableAncestorRects:ie,measuringConfiguration:B,measuringScheduled:U,windowRect:re}),[E,K,_,z,me,Z,J,R,M,P,pe,H,le,ie,B,U,re]),Se=r.useMemo(()=>({activatorEvent:z,activators:xe,active:E,activeNodeRect:_,ariaDescribedById:{draggable:O},dispatch:C,draggableNodes:R,over:pe,measureDroppableContainers:H}),[z,xe,E,_,C,O,R,pe,H]);return r.createElement(It.Provider,{value:w},r.createElement(ro.Provider,{value:Se},r.createElement(lo.Provider,{value:qe},r.createElement(uo.Provider,{value:Ce},c)),r.createElement(so,{disabled:!1===(null==s?void 0:s.restoreFocus)})),r.createElement(At,{...s,hiddenTextDescribedById:O}))}),mo=r.createContext(null),fo="button";function po(e){let{id:t,data:n,disabled:o=!1,attributes:l}=e;const i=vt("Draggable"),{activators:a,activatorEvent:s,active:d,activeNodeRect:c,ariaDescribedById:u,draggableNodes:g,over:h}=r.useContext(ro),{role:m=fo,roleDescription:f="draggable",tabIndex:p=0}=null!=l?l:{},v=(null==d?void 0:d.id)===t,C=r.useContext(v?uo:mo),[b,w]=mt(),[y,x]=mt(),q=function(e,t){return r.useMemo(()=>e.reduce((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e},{}),[e,t])}(a,t),S=gt(n);ct(()=>(g.set(t,{id:t,key:i,node:b,activatorNode:y,data:S}),()=>{const e=g.get(t);e&&e.key===i&&g.delete(t)}),[g,t]);return{active:d,activatorEvent:s,activeNodeRect:c,attributes:r.useMemo(()=>({role:m,tabIndex:p,"aria-disabled":o,"aria-pressed":!(!v||m!==fo)||void 0,"aria-roledescription":f,"aria-describedby":u.draggable}),[o,m,p,v,f,u.draggable]),isDragging:v,listeners:o?void 0:q,node:b,over:h,setNodeRef:w,setActivatorNodeRef:x,transform:C}}function vo(){return r.useContext(lo)}const Co={timeout:25};function bo(e){let{animation:t,children:n}=e;const[o,l]=r.useState(null),[i,a]=r.useState(null),s=ft(n);return n||o||!s||l(s),ct(()=>{if(!i)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,i)).then(()=>{l(null)}):l(null)},[t,o,i]),r.createElement(r.Fragment,null,n,o?r.cloneElement(o,{ref:a}):null)}const wo={x:0,y:0,scaleX:1,scaleY:1};function yo(e){let{children:t}=e;return r.createElement(ro.Provider,{value:oo},r.createElement(uo.Provider,{value:wo},t))}const xo={position:"fixed",touchAction:"none"},qo=e=>yt(e)?"transform 250ms ease":void 0,So=r.forwardRef((e,t)=>{let{as:n,activatorEvent:o,adjustScale:l,children:i,className:a,rect:s,style:d,transform:c,transition:u=qo}=e;if(!s)return null;const g=l?c:{...c,scaleX:1,scaleY:1},h={...xo,width:s.width,height:s.height,top:s.top,left:s.left,transform:qt.Transform.toString(g),transformOrigin:l&&o?jt(o,s):void 0,transition:"function"==typeof u?u(o):u,...d};return r.createElement(n,{className:a,style:h,ref:t},i)}),Ro=e=>t=>{let{active:n,dragOverlay:o}=t;const r={},{styles:l,className:i}=e;if(null!=l&&l.active)for(const[e,t]of Object.entries(l.active))void 0!==t&&(r[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=l&&l.dragOverlay)for(const[e,t]of Object.entries(l.dragOverlay))void 0!==t&&o.node.style.setProperty(e,t);return null!=i&&i.active&&n.node.classList.add(i.active),null!=i&&i.dragOverlay&&o.node.classList.add(i.dragOverlay),function(){for(const[e,t]of Object.entries(r))n.node.style.setProperty(e,t);null!=i&&i.active&&n.node.classList.remove(i.active)}},ko={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:qt.Transform.toString(t)},{transform:qt.Transform.toString(n)}]},sideEffects:Ro({styles:{active:{opacity:"0"}}})};function Mo(e){let{config:t,draggableNodes:n,droppableContainers:o,measuringConfiguration:r}=e;return ut((e,l)=>{if(null===t)return;const i=n.get(e);if(!i)return;const a=i.node.current;if(!a)return;const s=Yn(l);if(!s)return;const{transform:d}=lt(l).getComputedStyle(l),c=Xt(d);if(!c)return;const u="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:o,keyframes:r}={...ko,...e};return e=>{let{active:l,dragOverlay:i,transform:a,...s}=e;if(!t)return;const d={x:i.rect.left-l.rect.left,y:i.rect.top-l.rect.top},c={scaleX:1!==a.scaleX?l.rect.width*a.scaleX/i.rect.width:1,scaleY:1!==a.scaleY?l.rect.height*a.scaleY/i.rect.height:1},u={x:a.x-d.x,y:a.y-d.y,...c},g=r({...s,active:l,dragOverlay:i,transform:{initial:a,final:u}}),[h]=g,m=g[g.length-1];if(JSON.stringify(h)===JSON.stringify(m))return;const f=null==o?void 0:o({active:l,dragOverlay:i,...s}),p=i.node.animate(g,{duration:t,easing:n,fill:"forwards"});return new Promise(e=>{p.onfinish=()=>{null==f||f(),e()}})}}(t);return mn(a,r.draggable.measure),u({active:{id:e,data:i.data,node:a,rect:r.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:l,rect:r.dragOverlay.measure(s)},droppableContainers:o,measuringConfiguration:r,transform:c})})}let To=0;function Io(e){return r.useMemo(()=>{if(null!=e)return To++,To},[e])}const Eo=r.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:l,transition:i,modifiers:a,wrapperElement:s="div",className:d,zIndex:c=999}=e;const{activatorEvent:u,active:g,activeNodeRect:h,containerNodeRect:m,draggableNodes:f,droppableContainers:p,dragOverlay:v,over:C,measuringConfiguration:b,scrollableAncestors:w,scrollableAncestorRects:y,windowRect:x}=vo(),q=r.useContext(uo),S=Io(null==g?void 0:g.id),R=co(a,{activatorEvent:u,active:g,activeNodeRect:h,containerNodeRect:m,draggingNodeRect:v.rect,over:C,overlayNodeRect:v.rect,scrollableAncestors:w,scrollableAncestorRects:y,transform:q,windowRect:x}),k=Un(h),M=Mo({config:o,draggableNodes:f,droppableContainers:p,measuringConfiguration:b}),T=k?v.setRef:void 0;return r.createElement(yo,null,r.createElement(bo,{animation:M},g&&S?r.createElement(So,{key:S,id:g.id,ref:T,as:s,activatorEvent:u,adjustScale:t,className:d,transition:i,rect:k,style:{zIndex:c,...l},transform:R},n):null))});function Fo(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Ao(e,t){return e.reduce((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e},Array(e.length))}function Do(e){return null!==e&&e>=0}const zo={scaleX:1,scaleY:1},No=e=>{var t;let{rects:n,activeNodeRect:o,activeIndex:r,overIndex:l,index:i}=e;const a=null!=(t=n[r])?t:o;if(!a)return null;const s=function(e,t,n){const o=e[t],r=e[t-1],l=e[t+1];if(!o||!r&&!l)return 0;if(n<t)return r?o.left-(r.left+r.width):l.left-(o.left+o.width);return l?l.left-(o.left+o.width):o.left-(r.left+r.width)}(n,i,r);if(i===r){const e=n[l];return e?{x:r<l?e.left+e.width-(a.left+a.width):e.left-a.left,y:0,...zo}:null}return i>r&&i<=l?{x:-a.width-s,y:0,...zo}:i<r&&i>=l?{x:a.width+s,y:0,...zo}:{x:0,y:0,...zo}};const Lo=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const l=Fo(t,o,n),i=t[r],a=l[r];return a&&i?{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}:null},Oo="Sortable",jo=r.createContext({activeIndex:-1,containerId:Oo,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Lo,disabled:{draggable:!1,droppable:!1}});function Bo(e){let{children:t,id:n,items:o,strategy:l=Lo,disabled:i=!1}=e;const{active:a,dragOverlay:s,droppableRects:d,over:c,measureDroppableContainers:u}=vo(),g=vt(Oo,n),h=Boolean(null!==s.rect),m=r.useMemo(()=>o.map(e=>"object"==typeof e&&"id"in e?e.id:e),[o]),f=null!=a,p=a?m.indexOf(a.id):-1,v=c?m.indexOf(c.id):-1,C=r.useRef(m),b=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(m,C.current),w=-1!==v&&-1===p||b,y=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(i);ct(()=>{b&&f&&u(m)},[b,m,f,u]),r.useEffect(()=>{C.current=m},[m]);const x=r.useMemo(()=>({activeIndex:p,containerId:g,disabled:y,disableTransforms:w,items:m,overIndex:v,useDragOverlay:h,sortedRects:Ao(m,d),strategy:l}),[p,g,y.draggable,y.droppable,w,m,v,d,h,l]);return r.createElement(jo.Provider,{value:x},t)}const Vo=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Fo(n,o,r).indexOf(t)},Po=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:l,newIndex:i,previousItems:a,previousContainerId:s,transition:d}=e;return!(!d||!o)&&((a===l||r!==i)&&(!!n||i!==r&&t===s))},Ho={duration:200,easing:"ease"},Uo="transform",Ko=qt.Transition.toString({property:Uo,duration:0,easing:"linear"}),Wo={roleDescription:"sortable"};function $o(e){let{animateLayoutChanges:t=Po,attributes:n,disabled:o,data:l,getNewIndex:i=Vo,id:a,strategy:s,resizeObserverConfig:d,transition:c=Ho}=e;const{items:u,containerId:g,activeIndex:h,disabled:m,disableTransforms:f,sortedRects:p,overIndex:v,useDragOverlay:C,strategy:b}=r.useContext(jo),w=function(e,t){var n,o;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(o,m),y=u.indexOf(a),x=r.useMemo(()=>({sortable:{containerId:g,index:y,items:u},...l}),[g,l,y,u]),q=r.useMemo(()=>u.slice(u.indexOf(a)),[u,a]),{rect:S,node:R,isOver:k,setNodeRef:M}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:l}=e;const i=vt("Droppable"),{active:a,dispatch:s,over:d,measureDroppableContainers:c}=r.useContext(ro),u=r.useRef({disabled:n}),g=r.useRef(!1),h=r.useRef(null),m=r.useRef(null),{disabled:f,updateMeasurementsFor:p,timeout:v}={...Co,...l},C=gt(null!=p?p:o),b=Kn({callback:r.useCallback(()=>{g.current?(null!=m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{c(Array.isArray(C.current)?C.current:[C.current]),m.current=null},v)):g.current=!0},[v]),disabled:f||!a}),w=r.useCallback((e,t)=>{b&&(t&&(b.unobserve(t),g.current=!1),e&&b.observe(e))},[b]),[y,x]=mt(w),q=gt(t);return r.useEffect(()=>{b&&y.current&&(b.disconnect(),g.current=!1,b.observe(y.current))},[y,b]),r.useEffect(()=>(s({type:Dt.RegisterDroppable,element:{id:o,key:i,disabled:n,node:y,rect:h,data:q}}),()=>s({type:Dt.UnregisterDroppable,key:i,id:o})),[o]),r.useEffect(()=>{n!==u.current.disabled&&(s({type:Dt.SetDroppableDisabled,id:o,key:i,disabled:n}),u.current.disabled=n)},[o,i,n,s]),{active:a,rect:h,isOver:(null==d?void 0:d.id)===o,node:y,over:d,setNodeRef:x}}({id:a,data:x,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:q,...d}}),{active:T,activatorEvent:I,activeNodeRect:E,attributes:F,setNodeRef:A,listeners:D,isDragging:z,over:N,setActivatorNodeRef:L,transform:O}=po({id:a,data:x,attributes:{...Wo,...n},disabled:w.draggable}),j=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo(()=>e=>{t.forEach(t=>t(e))},t)}(M,A),B=Boolean(T),V=B&&!f&&Do(h)&&Do(v),P=!C&&z,H=P&&V?O:null,U=V?null!=H?H:(null!=s?s:b)({rects:p,activeNodeRect:E,activeIndex:h,overIndex:v,index:y}):null,K=Do(h)&&Do(v)?i({id:a,items:u,activeIndex:h,overIndex:v}):y,W=null==T?void 0:T.id,$=r.useRef({activeId:W,items:u,newIndex:K,containerId:g}),G=u!==$.current.items,_=t({active:T,containerId:g,isDragging:z,isSorting:B,id:a,index:y,items:u,newIndex:$.current.newIndex,previousItems:$.current.items,previousContainerId:$.current.containerId,transition:c,wasDragging:null!=$.current.activeId}),Z=function(e){let{disabled:t,index:n,node:o,rect:l}=e;const[i,a]=r.useState(null),s=r.useRef(n);return ct(()=>{if(!t&&n!==s.current&&o.current){const e=l.current;if(e){const t=Jt(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&a(n)}}n!==s.current&&(s.current=n)},[t,n,o,l]),r.useEffect(()=>{i&&a(null)},[i]),i}({disabled:!_,index:y,node:R,rect:S});return r.useEffect(()=>{B&&$.current.newIndex!==K&&($.current.newIndex=K),g!==$.current.containerId&&($.current.containerId=g),u!==$.current.items&&($.current.items=u)},[B,K,g,u]),r.useEffect(()=>{if(W===$.current.activeId)return;if(null!=W&&null==$.current.activeId)return void($.current.activeId=W);const e=setTimeout(()=>{$.current.activeId=W},50);return()=>clearTimeout(e)},[W]),{active:T,activeIndex:h,attributes:F,data:x,rect:S,index:y,newIndex:K,items:u,isOver:k,isSorting:B,isDragging:z,listeners:D,node:R,overIndex:v,over:N,setNodeRef:j,setActivatorNodeRef:L,setDroppableNodeRef:M,setDraggableNodeRef:A,transform:null!=Z?Z:U,transition:function(){if(Z||G&&$.current.newIndex===y)return Ko;if(P&&!yt(I)||!c)return;if(B||_)return qt.Transition.toString({...c,property:Uo});return}()}}function Go(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const _o=[wn.Down,wn.Right,wn.Up,wn.Left],Zo=(e,t)=>{let{context:{active:n,collisionRect:o,droppableRects:r,droppableContainers:l,over:i,scrollableAncestors:a}}=t;if(_o.includes(e.code)){if(e.preventDefault(),!n||!o)return;const t=[];l.getEnabled().forEach(n=>{if(!n||null!=n&&n.disabled)return;const l=r.get(n.id);if(l)switch(e.code){case wn.Down:o.top<l.top&&t.push(n);break;case wn.Up:o.top>l.top&&t.push(n);break;case wn.Left:o.left>l.left&&t.push(n);break;case wn.Right:o.left<l.left&&t.push(n)}});const s=(e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=Pt(t),l=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=Pt(o),i=r.reduce((e,t,o)=>e+Ot(n[o],t),0),a=Number((i/4).toFixed(4));l.push({id:t,data:{droppableContainer:e,value:a}})}}return l.sort(Bt)})({collisionRect:o,droppableRects:r,droppableContainers:t});let d=Ht(s,"id");if(d===(null==i?void 0:i.id)&&s.length>1&&(d=s[1].id),null!=d){const e=l.get(n.id),t=l.get(d),i=t?r.get(t.id):null,s=null==t?void 0:t.node.current;if(s&&i&&e&&t){const n=en(s).some((e,t)=>a[t]!==e),r=Xo(e,t),l=function(e,t){if(!Go(e)||!Go(t))return!1;if(!Xo(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),d=n||!r?{x:0,y:0}:{x:l?o.width-i.width:0,y:l?o.height-i.height:0},c={x:i.left,y:i.top};return d.x&&d.y?c:wt(c,d)}}}};function Xo(e,t){return!(!Go(e)||!Go(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const Yo=e=>{let{transform:t}=e;return{...t,y:0}},Jo=r.memo(r.forwardRef((e,t)=>{const{children:o,style:r,className:l,index:i,editing:a,editable:s,selectedIndex:d,background:c,activeColor:u,borderColor:g,borderWidth:h,dragging:m,...f}=e;return n.jsxs("div",{ref:t,className:V(l),style:{...r,display:"flex",flexDirection:"column",background:d===i?"white":c,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:d===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...f,children:[n.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[n.jsx("div",{style:{marginLeft:d===i?"0px":"-1px",marginTop:d===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),o,d===i?n.jsx("div",{style:{marginLeft:"0px",marginTop:"0px",marginBottom:"0px",background:"grey",minWidth:"1px"}}):n.jsx(n.Fragment,{})]}),n.jsx("div",{style:{flex:"1 1 100%",background:d===i&&u?u?.toCSS():"none",minHeight:"2px"}})]})})),Qo={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"},er=r.memo(r.forwardRef(({color:e,dragOverlay:t,dragging:o,disabled:l,fadeIn:i,handle:a,height:s,index:d,listeners:c,onRemove:u,renderItem:g,sorting:h,style:m,transition:f,transform:p,value:v,wrapperStyle:C,...b},w)=>{r.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const y=g?g({dragOverlay:Boolean(t),dragging:Boolean(o),sorting:Boolean(h),index:d,fadeIn:Boolean(i),listeners:c,ref:w,style:m,transform:p,transition:f,value:v}):n.jsx(n.Fragment,{children:v});return n.jsx("div",{className:V("tab-item",Qo.Wrapper,i&&Qo.fadeIn,h&&Qo.sorting,t&&Qo.dragOverlay),style:{...C,transition:[f,C?.transition].filter(Boolean).join(", "),"--translate-x":p?`${Math.round(p.x)}px`:void 0,"--translate-y":p?`${Math.round(p.y)}px`:void 0,"--scale-x":p?.scaleX?`${p.scaleX}`:void 0,"--scale-y":p?.scaleY?`${p.scaleY}`:void 0,"--index":d},ref:w,children:n.jsx("div",{className:V(Qo.Item,o&&Qo.dragging,a&&Qo.withHandle,t&&Qo.dragOverlay,l&&Qo.disabled,e&&Qo.color,"dragging"),style:m,"data-cypress":"draggable-item",...a?void 0:c,...b,tabIndex:a?void 0:-1,children:y})})})),tr={Row:"_Row_1kr10_1"},nr=r.memo(r.forwardRef(({children:e,horizontal:t,style:o},r)=>n.jsx("div",{ref:r,style:{...o},className:V(tr.Row,t&&tr.horizontal),children:e}))),or={...ko},rr=r.memo(r.forwardRef((e,o)=>{const{className:l,activationConstraint:a,animateLayoutChanges:s,adjustScale:d=!1,collisionDetection:c=Kt,coordinateGetter:u=Zo,dropAnimation:g=or,getItemStyles:h=()=>({}),getNewIndex:m,handle:f=!1,items:p,onMove:v,isDisabled:C=()=>!1,measuring:b,modifiers:w,renderItem:y,renderDivider:x,reorderItems:q=Fo,strategy:S=Lo,style:R,useDragOverlay:k=!0,onDragStart:M,wrapperStyle:T=()=>({})}=e,[I,E]=r.useState(()=>p);r.useEffect(()=>{E(p)},[p]);const[F,A]=r.useState(null),D=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useMemo(()=>[...t].filter(e=>null!=e),[...t])}(Nt(Dn,{activationConstraint:a}),Nt(Nn,{activationConstraint:a}),Nt(Rn,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:u})),z=I.indexOf.bind(I),N=F?z(F):-1,L=[];I.map((e,t)=>{L.push(n.jsx(lr,{id:e,handle:f,index:t,style:h,wrapperStyle:T,disabled:C(e),renderItem:y,animateLayoutChanges:s,useDragOverlay:k,getNewIndex:m},e+"-"+t));const o=x?.({key:"divider-"+t});o&&L.push(o)});const{getPortalContainer:O}=t.useFullscreenPortal();return n.jsxs(ho,{sensors:D,collisionDetection:c,onDragStart:e=>{const{active:t}=e;t&&(M?.(e),A(t.id))},autoScroll:{canScroll:e=>!0},onDragEnd:e=>{if(A(null),e.over){const t=z(e.over.id);N!==t&&(E(e=>q(e,N,t)),v?.(N,t))}},onDragCancel:()=>{A(null)},measuring:b,modifiers:w,children:[n.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...R},className:V(l,Qo.Wrapper),children:n.jsx(Bo,{items:I,strategy:S,children:n.jsx(nr,{ref:o,children:L})})}),k?i.createPortal(n.jsx(Eo,{adjustScale:d,dropAnimation:g,children:F?n.jsx(er,{value:I[N],handle:f,renderItem:y,wrapperStyle:T({index:N,isDragging:!0,id:I[N]}),index:N,dragging:!0,style:h({id:I[N],index:N,isSorting:null!==F,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),O()):null]})}));function lr({disabled:e,animateLayoutChanges:t,getNewIndex:o,handle:r,id:l,index:i,onRemove:a,style:s,renderItem:d,useDragOverlay:c,wrapperStyle:u}){const{attributes:g,isDragging:h,isSorting:m,listeners:f,overIndex:p,setNodeRef:v,transform:C,transition:b}=$o({id:l,animateLayoutChanges:t,disabled:e,getNewIndex:o});return n.jsx(er,{ref:v,value:l,disabled:e,dragging:h,sorting:m,handle:r,renderItem:d,index:i,style:s({index:i,id:l,isDragging:h,isSorting:m,overIndex:p}),onRemove:a?()=>a(l):void 0,transform:C,transition:b,wrapperStyle:u({index:i,isDragging:h,id:l}),listeners:f,"data-index":i,"data-id":l,dragOverlay:!c&&h,...g})}const ir="_TabStrip_3x0dp_1",ar=new e.Color("rgb(33, 115, 70)"),sr="#eee",dr=e=>n.jsx(Jo,{...e}),cr=r.memo(r.forwardRef((e,o)=>{const{children:l,style:i,className:a,selectedTabIndex:s=0,tabNames:d=[],onSelectedTabIndexChange:c,onTabNameChange:u,onTabMove:g,createScrollStartButton:h=t.defaultCreateScrollStartButton,createScrollEndButton:m=t.defaultCreateScrollEndButton,createScrollEdgeButton:f=t.defaultCreateScrollEdgeButton,createTabButton:p=dr,createTabDivider:v,editLabelProps:C,disabled:b=!1,disableDrag:w=!1,background:y="white",activeColor:x=ar,borderColor:q=sr,borderWidth:S=1}=e,[R,k]=r.useState(s),[M,I]=r.useState(d),E=r.useCallback(e=>{const t=O.current?.[e]?.closest(".tab-item")??O.current?.[e];t&&W.current?.scrollTo({top:t.offsetTop,left:t.offsetLeft,behavior:"smooth"})},[]);r.useEffect(()=>{E(s)},[s]);const F=r.useCallback((e,t)=>{t!==R&&(k(t),c?.(t)),E(t)},[c,R]),A=r.useCallback((e,t)=>{g?.(e,t)},[g]),D=r.useRef(null),[z,N]=r.useState(-1),L=r.useCallback((e,t)=>{u?.(e,t)},[u]);r.useLayoutEffect(()=>{k(s)},[s]),r.useLayoutEffect(()=>{I(d)},[d]);const O=r.useRef([]),j=r.useRef(null);r.useImperativeHandle(o,()=>Object.assign({startEdit(e){O.current?.[e]?.startEdit()},cancel(e){O.current?.[e]?.cancel()}},j.current),[R,z]);const B=r.useCallback(({value:e,index:t,dragging:o})=>{const{style:r,maxLength:l,...i}=C||{},a=n.jsx(tt,{ref:e=>{O.current[t]=e},value:e,disabled:b,maxLength:l,style:{color:R===t&&x?x?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...r},styleHover:{},onSubmit:e=>(D.current=!1,N(-1),L(t,e)),onCancel:()=>{D.current=!1,N(-1)},onChange:e=>{D.current=!0,N(t)},...i});return p({onClick:e=>F(e,t),value:e,index:t,editing:z===t&&D.current,editable:!0,disabled:b,selectedIndex:R,background:y,activeColor:x,borderColor:q,borderWidth:S,dragging:o,children:a})},[R,L,F,C,b,z,p]),[P,{width:H}]=T(),[U,{width:K}]=T(),W=r.useRef(null),[$,G]=r.useState({left:0,top:0,width:0,height:0}),[_,Z]=r.useState(null);r.useEffect(()=>{null!==_&&W.current&&W.current.scrollTo({left:_,behavior:"smooth"})},[_]);const X=r.useCallback((e,n=!1)=>{if(!W.current)return 0;let o=W.current.firstChild.getBoundingClientRect(),r=W.current.firstChild.firstChild.children,l=0;return l=n?0:t.ScrollUtils.getScrollTo(e,o.left,r,!0,Math.max(0,e-200)),Z(l),Math.max(0,l)},[]),Y=r.useCallback((e,n=!1)=>{if(!W.current)return 0;let o=W.current.firstChild.getBoundingClientRect(),r=W.current.firstChild.firstChild.children,l=0;const i=Math.ceil(K-H);return l=n?i:t.ScrollUtils.getScrollTo(e,o.left,r,!1,Math.max(0,e+200)),Z(l),Math.min(i,l)},[K,H]),J=r.useRef(null),Q=r.useRef(null),ee=r.useCallback(()=>{Q.current&&(clearTimeout(Q.current),Q.current=null,J.current=null)},[]),te=r.useCallback((e,t,n=260)=>{J.current=e,Q.current=setTimeout(()=>{const n=t?X(J.current||e):Y(J.current||e);n!==J.current?te(n,t,120):ee()},n)},[X,Y,ee]);r.useEffect(()=>()=>ee(),[ee]);const ne=r.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor($.left)<=0||0===Math.floor(K-H),orientation:t.ScrollbarOrientation.Horizontal,onMouseUp:ee,onMouseLeave:ee,onMouseDown:()=>te(W.current.scrollLeft,!0),onClick:e=>X(Math.min(W.current.scrollLeft,_??Number.MAX_SAFE_INTEGER),e.ctrlKey)}),[$,_,K,H]),oe=r.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(K-H)<=Math.ceil($.left),orientation:t.ScrollbarOrientation.Horizontal,onMouseUp:ee,onMouseLeave:ee,onMouseDown:()=>te(W.current.scrollLeft,!1),onClick:e=>Y(Math.max(W.current.scrollLeft,_??0),e.ctrlKey)}),[$,_,K,H]),re=r.useMemo(()=>n.jsxs(n.Fragment,{children:[n.jsx("div",{style:{minWidth:"16px"}}),l,f?.(ne)]}),[ne,oe,h,m,l,f]);return n.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:V(ir,a),ref:j,children:[n.jsx("div",{style:{borderTop:`solid ${q} ${S}px`,position:"absolute",width:"100%"}}),n.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:re}),n.jsx("div",{className:"Tabs",ref:P,style:{flex:"1 1 100%",display:"flex",position:"relative",overflow:"hidden"},children:n.jsx("div",{style:{position:"relative",overflowY:"hidden",overflowX:"hidden",marginBottom:"3px"},ref:W,onScroll:e=>{G({left:e.target.scrollLeft,top:e.target.scrollTop,width:e.target.scrollWidth,height:e.target.scrollHeight})},children:n.jsx(rr,{isDisabled:e=>b||w,items:M,strategy:No,modifiers:[Yo],ref:U,renderItem:B,renderDivider:v,onMove:A,activationConstraint:{distance:15}})})}),n.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:f(oe)})]})}));cr.displayName="TabStrip";const ur=r.createContext(null),gr="_script-editor_iy654_5",hr=r.lazy(()=>Promise.resolve().then(()=>require("./CtxoVwfZ8EYJes0Y.cjs"))),mr={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:"\t})]?|&,;",wordWrapBreakBeforeCharacters:"{([+",wordWrapBreakObtrusiveCharacters:".",wordWrapColumn:80,wordWrapMinified:!0,wrappingIndent:"none"},fr=async(e,t,n)=>{const o=e.getModel();if(!o)return;const r=await t.languages.typescript.getTypeScriptWorker(),l=await r(o.uri),i=await l.getNavigationTree(o.uri.toString()),a=e.getPosition();let s={...a};s.lineNumber=1,s.column=1;let d=!1;for(let e=a.lineNumber;e>=1;e--){if(""===o.getLineContent(e).trim()){const t=Cr(i,o.getOffsetAt({lineNumber:e,column:1}),"function");if(!t||br(t)){d=!0,s.lineNumber=e+1;break}{const n=t.spans[0].start;e=o.getPositionAt(n).lineNumber,s.lineNumber=e}}}let c=n,u=!1;!d&&!c.startsWith("\n")&&s.lineNumber>1&&(c="\n"+c,u=!0);let g=!1;o.getLineCount()>1&&(c.endsWith("\n\n")||(c+="\n\n",g=!0));const h=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${c}`}];let m=null;o.pushEditOperations([],h,e=>(m=e[0].range,u&&m.startLineNumber++,g&&m.endLineNumber--,[new t.Selection(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)])),e.setSelection({startLineNumber:m.endLineNumber,startColumn:m.endColumn,endLineNumber:m.startLineNumber,endColumn:m.startColumn})};function pr(e,t){let n=null;for(let o=0;!n&&o<e.length;o++){const r=e[o];r.getName()===t.text&&(n=r)}return n?n.getContext():"formula"}function vr(e,t,n,o,r=[]){if("function"===o.kind&&"export"===o.kindModifiers){const t=o.spans[0].start,l=e.getPositionAt(t);r.push({name:o.text,type:pr(n,o),lineNumber:l.lineNumber})}if(o.childItems)for(const l of o.childItems)vr(e,t,n,l,r);return r}function Cr(e,t,n="function",o){const r=e.spans;for(let l=0;l<r.length;l++){const i=r[l];if(i.start<=t&&t<i.start+i.length){if(e.kind===n&&(!o||e.kindModifiers===o))return e;for(const r of e.childItems||[]){const e=Cr(r,t,n,o);if(e)return e}}return null}}function br(e){return"comment"===e.kind}const wr=r.memo(r.forwardRef((e,l)=>{const{className:i,style:a,commands:s,readOnly:d=!1,onClose:c,darkMode:u,loadingPanel:g,autoFocus:h=!0,onStatusChange:m,...f}=e,p=r.useRef(null),v=t.useCallbackRef(c,[c]),C=r.useRef(!1),b=r.useMemo(()=>({contains(e){if(!p.current)return;const t=p.current.editor;return t&&t.getDomNode()?.contains(e)},focus(){if(!p.current)return;const e=p.current.editor;return e&&e.getDomNode()?.focus()}}),[]),w=r.useMemo(()=>[new t.Command("help",b,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),y=r.useMemo(()=>{let e=null;const n=()=>b;return e=s?s.createChildGroup(n,"scriptEditor",!1):new t.CommandGroup(n,"scriptEditor"),e.addCommands(w,!0),e},[s,w]),x=t.useCommands(y,["executeSelectedScript"])[0],q=x?.context(),S=t.useCallbackRef(e=>{x?.execute(e)},[x]),R=r.useRef(""),[k,M]=r.useState(!1),T=t.useCallbackRef(async()=>{if(!p.current)return null;const e=p.current,t=e.editor;if(!t)return null;const n=e.monaco,o=await(async(e,t,n="export")=>{const o=e.getModel();if(!o)return null;const r=await t.languages.typescript.getTypeScriptWorker(),l=await r(o.uri),i=await l.getNavigationTree(o.uri.toString());let a=null,s=e.getSelection();const d=s.startLineNumber===s.endLineNumber&&s.startColumn===s.endColumn?o.getLineCount():Math.min(s.endLineNumber,o.getLineCount());for(let e=s.startLineNumber;!a&&e<=d;e++){const t=Cr(i,o.getOffsetAt({lineNumber:e,column:1}),"function",n);t&&(a=t.text)}return a})(t,n);return m?.({message:(o??"").toUpperCase()}),o?{source:t.getValue(),name:o}:null},[m]);const I=t.useCallbackRef(async(e,t,n)=>{const r=await q.getScripts().createModule({source:n?.getValue(),declarationsOnly:!0}),l=r?r.getFunctions().search():o.CommonUtils.EmptyArray;r&&(async function(e,t){const n=[];for(let o=1;o<e.getLineCount()+1;o++){const r={startLineNumber:o,startColumn:1,endLineNumber:o,endColumn:e.getLineLength(o)+1},l=e.getValueInRange(r).indexOf("modelt");-1!==l&&n.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:t.MarkerSeverity.Hint,startLineNumber:r.startLineNumber,startColumn:l+1,endLineNumber:r.startLineNumber,endColumn:l+5})}t.editor.setModelMarkers(e,"owner",n)}(e,t),async function(e,t,n,o){const r=await t.languages.typescript.getTypeScriptWorker(),l=await r(e.uri),i=await l.getNavigationTree(e.uri.toString()),a=vr(e,t,o,i).map(e=>{let n=null,o=null;return"formula"===e.type?(n="formula.margin-icon",o="Formula"):"macro"===e.type?(n="macro.margin-icon",o="Macro"):"autoRun"===e.type&&(n="autorun.margin-icon",o="Auto Run"),{range:new t.Range(e.lineNumber,1,e.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:n,glyphMarginHoverMessage:o,stickiness:t.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});D.current&&D.current.clear(),D.current=n.createDecorationsCollection(a)}(e,t,n,l))},[q]),E=t.useCallbackRef(o.CommonUtils.debounce(I,580),[]),F=t.useCallbackRef(async(e=void 0)=>{if(!p.current||!q)return;const t=p.current.editor.getPosition(),n={cursor:t?t.toString():""};void 0!==e&&(n.message=e),m?.(n);const o=T();q.setSelectedFunction(o)},[q,m]);r.useEffect(()=>{if(!q)return;const e={insertSnippet:e=>{p.current?.editor&&(k?fr(p.current.editor,p.current.monaco,e):R.current=e)}};q.setEditor(e),q.setSelectedFunction(T());const t=q.addContainerListener({onBeforeSave:async()=>{if(!p.current?.editor||!q)return;const e=p.current.editor,t=q?.getScripts().getModules().getByName("scripting"),n=t?.getSource(),o=e.getValue();if(!((n?.length??0)!==o.length||n!==o))return;await q.saveSource(e.getValue());const r=(n?.length??0)!==o.length||n!==o;m?.({dirty:r})},onReadonlyChange(){},onScriptChange:async()=>{if(!p.current?.editor||!q)return;const e=p.current.editor,t=q.getScripts().getModules().search()[0]?.getSource()??"";e.setValue(t)}});return()=>{t(),q.setSelectedFunction(null),q.setEditor(null)}},[q,k]),r.useEffect(()=>()=>{if(!p.current?.editor)return;const e=p.current.editor;q?.saveSource(e.getValue())},[]);const A=t.useCallbackRef(e=>{const t=p.current;if(!t)return!1;const n=t.editor;return!!n&&(n.focus(),!0)},[]),D=r.useRef(null),z=t.useCallbackRef((e,t)=>{p.current={monaco:t,editor:e},M(!0),F("Loading Types");const n=q.getScripts().getModules().search()[0]?.getSource()??"";e.setValue(n),Promise.resolve().then(()=>require("./DL8USyvC-1ZSog-z.cjs")).then(e=>e.customEditor).then(n=>{F("");n.AutoTypings.create(e,{shareCache:!0,monaco:t,onError:e=>{"Not implemented yet"===e&&(e="Compile Errors"),console.warn("Error compiling types",e)}}).then(async n=>{const o=e.getModel();E(o,t,e)})}),e.addCommand("executeScript",function(e,...t){t?.[0]&&S({functionName:t?.[0]})},""),e.addAction({id:"executeScript",label:"Execute",keybindings:[t.KeyCode.F8],run:async e=>{const t=T();q.setSelectedFunction(t);const n=await t;S(n)}}),e.addAction({id:"saveScript",label:"Save Script",keybindings:[t.KeyMod.CtrlCmd|t.KeyCode.KeyS],run:t=>{q?.saveSource(e.getValue()).then(()=>{const t=q?.getScripts().getModules().getByName("scripting"),n=t?.getSource(),o=e.getValue(),r=(n?.length??0)!==o.length||n!==o;m?.({dirty:r})})}}),e.onMouseDown(async n=>{if(n.target.type===t.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const r=n.target.position.lineNumber,l=await t.languages.typescript.getTypeScriptWorker(),i=await l(o.uri),a=await i.getNavigationTree(o.uri.toString()),s=e?.getValue(),d=(await(q?.saveSource(s))).getFunctions().search(),c=vr(o,t,d,a).find(e=>e.lineNumber===r);if(c){const e=n.event.browserEvent.button;0===e?"macro"===c.type||"autoRun"===c.type?S({functionName:c.name}):"formula"===c.type&&q.quickInsertFunction?.(c.name):2===e&&(console.log("Context menu for function:",c.name),n.event.browserEvent.preventDefault())}}}),e.onDidChangeModelContent(()=>{const n=e.getModel();E(n,t,e)});const o=e.getModel();!function(e,t){t.languages.registerInlayHintsProvider("typescript",{provideInlayHints(e,n,o){const r=[];for(let n=1;n<e.getLineCount()+1;n++){const o={startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:e.getLineLength(n)+1},l="hint",i=e.getValueInRange(o).indexOf("hint");-1!==i&&r.push({kind:t.languages.InlayHintKind.Type,position:{lineNumber:o.startLineNumber,column:i+l.length+1},label:"[hint]"})}return{hints:r,dispose:()=>{}}}})}(0,t),o.onDidChangeContent(t=>{const n=q?.getScripts().getModules().getByName("scripting"),o=n?.getSource(),r=e.getValue(),l=(o?.length??0)!==r.length||o!==r;m?.({dirty:l})}),e.onDidChangeCursorPosition(e=>{F()})},[q,m]),N=r.useMemo(()=>k?null:g||n.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[k,g]),L=r.useMemo(()=>{const e=q?.getScripts().getModules().getByName("scripting")?.getSource()??"";return n.jsxs("div",{style:{display:"flex",flex:"1 1 100%",width:"100%",flexDirection:"row",position:"relative",boxSizing:"border-box"},children:[n.jsx(r.Suspense,{children:n.jsx(hr,{theme:u?"extended-dark":"extended",options:{...mr,fixedOverflowWidgets:!0,readOnly:d},language:"typescript",value:e,onValidate:e=>{let t=!1;for(let n=0;!t&&n<e?.length;n++)8===e[n].severity&&(t=!0)},beforeMount:e=>{e.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),e.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),e.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),e.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}});(async()=>{let t=!1;try{const n=await(async()=>{const e=await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts");return await e.text()})(),o=e.Uri.parse('inmemory://model/"sheetxl-models".d.ts'),r=e.editor.createModel(n,"typescript",o);e.editor.setModelMarkers(r,"default",[]),t=!0}catch(e){console.warn("cant load types",e)}e.languages.registerLinkProvider("*",{provideLinks:(t,n)=>{const o=[],r={links:o},l=t.getLinesContent();for(let n=1;n<=l.length;n++){const r=l[n-1],i=e.editor.tokenize(r,"typescript");for(let l=0;l<i[0].length;l++){const a=i[0]?.[l];if(a&&a.type.startsWith("string")){let s=a.offset,d=i[0]?.[l+1]?.offset??r.length,c=new e.Range(n,s+1,n,d+1),u=t.getValueInRange(c);const g=u[0];"`"!==g&&"'"!==g&&'"'!==g||(s++,u=u.substring(1));const h=u[u.length-1];"`"!==h&&"'"!==h&&'"'!==h||(s++,u=u.substring(0,u.length-1));try{q.getRanges(u)&&o.push({range:{endColumn:d,endLineNumber:n,startColumn:s,startLineNumber:n},tooltip:`Goto range '${u}'`,url:`/range/${u}`})}catch(e){console.warn(e)}}}}return r}}),e.editor.registerLinkOpener({open(e){if(e?.path?.startsWith("/range/")){try{q.getRanges(e.path.substring(7))?.select()}catch(e){console.warn("invalid range",e)}return!0}return!1}});const n=e.languages.typescript.typescriptDefaults.getCompilerOptions();e.languages.typescript.typescriptDefaults.setCompilerOptions({...n,target:e.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:e.languages.typescript.ModuleResolutionKind.Classic,baseUrl:"inmemory://model/",allowNonTsExtensions:!0}),R.current&&(await fr(p.current.editor,p.current.monaco,R.current),R.current=null),C.current&&requestAnimationFrame(async()=>{C.current&&e.editor.focus()}),e.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),M(!0)})()},onMount:z})}),N]})},[q,y,d,N,u]),O=t.useImperativeElement(l,()=>({isScriptEditorElement:()=>!0,focus:e=>{A(e)},close:()=>{v?.()},getEditor:()=>q?.getEditor()}),[q]);return r.useEffect(()=>(h&&requestAnimationFrame(()=>{A()}),()=>{p.current?.editor&&requestAnimationFrame(()=>{O.current?.contains(document.activeElement)&&A()})}),[]),n.jsx("div",{className:V("script-editor",gr,i),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...a},ref:O,...f,children:L})}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>e.LicenseManager}),exports.ChartAreaIcon=e=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),n.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"}),n.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"}),n.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),n.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),n.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),n.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),n.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),n.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"}),n.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),n.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=Je,exports.ChartLineIcon=e=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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=>n.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[n.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"}),n.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"}),n.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"}),n.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=Ze,exports.CornerTriangle=g,exports.DateUtils=s,exports.DocThemesContext=ur,exports.DocThemesProvider=e=>{const{themes:t,children:o}=e;return n.jsx(ur.Provider,{value:t,children:o})},exports.EditableLabel=tt,exports.EmptyFrame=Ne,exports.FilterButton=h,exports.FontUtils=u,exports.Item=er,exports.LogoNoPaddingIcon=e=>n.jsxs("svg",{...e,viewBox:"0 0 48 48",children:[n.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"}),n.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"}),n.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"}),n.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=U,exports.MovableArea=Fe,exports.PictureEditor=Ye,exports.Row=nr,exports.ScriptEditor=wr,exports.SheetCellEditor=C,exports.SheetCellRenderer=m,exports.SheetElement=_e,exports.SheetScrollbar=ie,exports.StaticBorderRenderer=j,exports.StyledStrokePath=w,exports.Tab=Jo,exports.TabStrip=cr,exports.createCellEditStateFromCell=b,exports.useBordersOverlay=A,exports.useDocThemes=()=>{const t=r.useContext(ur),[n]=r.useState(()=>new e.ThemeCollection);return r.useMemo(()=>t||n,[t])},exports.useModelListener=W,exports.useMovableCommands=ze,exports.useRangeListener=(e,t,n,o)=>{const l=r.useRef(n);l.current=n;const i=o?.fireOnAddressChange??!0;r.useEffect(()=>{if(!e||!t||!l.current){const e={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void l.current?.(e)}const n=e=>{l.current?.(e)},r=e.getRange(t).addListener(n,o);if(i){const o=e.getRange(t);n({getSource:()=>o,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{r?.()}},[e,t])},exports.useSheetCommands=G,exports.useSheetCopyPaste=ve,Object.keys(t).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
|
7
|
+
*/Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@sheetxl/sdk"),r=require("@sheetxl/utils-react"),c=require("react/jsx-runtime"),ue=require("@sheetxl/utils"),o=require("react"),dt=require("@sheetxl/grid-react"),Dt=require("react-dom"),cn=(e=6e4)=>new Date(Math.floor(Date.now()/e)*e),ml=Object.freeze(Object.defineProperty({__proto__:null,nowWithPrecision:cn},Symbol.toStringTag,{value:"Module"})),hr=Object.freeze([8,9,10,11,12,14,16,18,20,22,24,26,28,30,36,48,72]),ao=(e,t=!0,n=hr)=>{if(!n||n.length===0)return e;if(e===void 0)return n[0];if(t&&e>=n[n.length-1]||!t&&e<=n[0])return e;let i=ue.CommonUtils.findEqualOrGreater(n,e);return t?(n[i]===e&&(i+=1),n[i]||(i-=1),n[i]):(i-=1,n[i])},fl=Object.freeze(Object.defineProperty({__proto__:null,DefaultFontSizes:hr,findNextFontSize:ao},Symbol.toStringTag,{value:"Module"})),so=o.memo(e=>{const{anchorLocation:t=ue.AnchorLocation.TopLeft,cellWidth:n,cellHeight:i,size:a=7,inset:l=1,darkMode:d,fill:m,pathProps:p,style:g,...q}=e,h=a,f=l;let I="red",S=[],D=[];return t===ue.AnchorLocation.TopLeft?(I=d?"rgb(255, 198, 246)":"green",S.push(f),D.push(f),S.push(f+h),D.push(f),S.push(f),D.push(f+h)):t===ue.AnchorLocation.TopRight?(I=d?"rgb(0, 255, 255)":"red",S.push(n-f),D.push(f),S.push(n-(f+h)),D.push(f),S.push(n-f),D.push(f+h)):t===ue.AnchorLocation.BottomRight?(I=d?"rgb(236, 252, 211)":"purple",S.push(n-f),D.push(i-f),S.push(n-(f+h)),D.push(i-f),S.push(n-f),D.push(i-(f+h))):t===ue.AnchorLocation.BottomLeft&&(I=d?"rgb(255, 236, 183)":"blue",S.push(f),D.push(i-f),S.push(f+h),D.push(i-f),S.push(f),D.push(i-(f+h))),c.jsx("svg",{width:`${n}`,height:`${i}`,viewBox:`0 0 ${n} ${i}`,style:{position:"absolute",width:`${n}px`,height:`${i}px`,pointerEvents:"none",...g},...q,children:c.jsx("path",{d:`M ${S[0]} ${D[0]} L ${S[1]} ${D[1]} L ${S[2]} ${D[2]} L ${S[0]} ${D[0]} Z`,fill:m??I,...p})})}),mr=e=>{const{renderBounds:t,darkMode:n,zoom:i,disabled:a,filter:l,onFilterButtonMouseDown:d,style:m,...p}=e,g=o.useMemo(()=>{let I=null;const S=l.getSortField();S&&(I=S.reverse);const D=l.getField(),z=D&&D.criteria&&D.criteria.length>0;return I===!0?z?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z":"m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":I===!1?z?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z":"m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":z?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":"m 3,5.025 4.5,5 4.5,-5 z"},[l]),[q,h]=o.useState(!1),f=Math.min(Math.min(18,t.height-8),t.width);return c.jsx("div",{style:{width:`${f}px`,height:`${f}px`,right:"0px",boxShadow:`0px 0px 0px 0.5px var(${q&&!a?"--sxl-app-color-primary-light, rgba(0,0,0,.55)":"--sxl-app-color-border-button, grey"})`,backgroundColor:"var(--sxl-app-color-button-fill, white)",backgroundImage:"var(--sxl-app-image-background)",borderRadius:(f>12?1:0)+"px",marginRight:"2px",display:"flex",alignItems:"center",justifyContent:"center",cursor:a?void 0:"pointer",...m},onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onMouseDown:I=>{d?.(I,l)},...p,children:c.jsx("svg",{width:""+15*i,height:""+15*i,viewBox:"0 0 15 15",style:{fill:`var(${q&&!a?"--sxl-app-color-primary-dark":"--sxl-app-color-button-text"}, grey)`,opacity:a?.6:1},children:c.jsx("path",{d:g})})})},fr=e=>{const{value:t,coords:n,bounds:i,children:a,style:l,range:d,zoom:m=1,view:p,bodyStyle:g,normalStyle:q,showFormulas:h,showZeros:f,docTheme:I,onLinkMouseDown:S,onFilterButtonMouseDown:D,filterButtonProps:z,createFilterButton:W=mr,...K}=e,y=i.height/m,B=i.width/m,R=t,w=R.getValue(),M=t.getStyle(),O=g?.darkMode??!1;let F,A;const _=w&&w.isFormulaError,G=_&&w instanceof s.FormulaError.Parse;let P,V=h||G;if(V)if(R.isSpillOverflow())A="";else{const Ae=R.getFormulaText();Ae?A=Ae:F=R.getNumberFormat(s.NumberFormat.Type.General)}else F=R.getNumberFormat();V||(P=R.getTextOverflow());const $=P?P.colBounds.width+P.leftOffset+P.rightOffset:B,te=P?P.anchorBounds.x-P.leftOffset:0,N=P?P.anchorBounds.width:B,x=P?P.anchorBounds.x:0;let H,re=R.getRenderHorizontalAlignment();F&&(H=F?.formattedRuns,A=H?.runs[0]?.text??F.displayText);const ye=R.getCalcStatus()===s.ICell.CalcStatus.Pending;let ne=null,X=M.getFill().toCSS(O,i),ae=0,Me=0;if(!M.getBorder().isEmpty()){const Ae=M.getBorder().getRight();!Ae.isNone()&&s.IBorder.BuiltInDefinitions.get(Ae.getStyle()).width>1&&(ae=1);const k=M.getBorder().getBottom();!k.isNone()&&s.IBorder.BuiltInDefinitions.get(k.getStyle()).width>1&&(Me=1)}let Te=null;if(B!==N||ae||Me||typeof X?.backgroundPosition=="number"){const{backgroundPosition:Ae,...k}=X,oe=Ae??0,j=p?.getScrollTopLeft(),Y=oe?-(i.x+(j.left??0))%oe:0,u=oe?-(i.y+(j.top??0))%oe:0;(Ae!==void 0||ae||Me||B!==N)&&(Object.keys(k).length===1&&k.background==="none"||(X=null,Te=c.jsx("div",{className:"fill",style:{marginLeft:`${Y}px`,marginTop:`${u}px`,left:x*m,width:r.ReactUtils.boundPixel(N*m-Y+1+ae),height:r.ReactUtils.boundPixel(i.height-u+1+Me),...k}},"background")))}let fe=null;const Be=R.getComments(),pe=R.getWarnings(),Pe=R.getErrors();if(Be||_||Pe.length>0||pe.length>0){const Ae={size:7*m,darkMode:O,cellWidth:N*m+2,cellHeight:y*m+2,style:{top:-1,left:x*m-1}};fe=fe??[],(pe.length>0||Pe.length>0||_)&&fe.push(c.jsx(so,{anchorLocation:ue.AnchorLocation.TopLeft,...Ae},`indicator-${fe.length}`)),Be&&fe.push(c.jsx(so,{anchorLocation:ue.AnchorLocation.TopRight,...Ae},`indicator-${fe.length}`))}const Se=M.getFont();let ge=F?.conditionalColor;const ce=M.getAlignment(),we=ce.getHorizontal()===s.ITextFrame.HorizontalAlignment.Fill,de=ce.getHorizontal()===s.ITextFrame.HorizontalAlignment.CenterContinuous||we,be=de||V?0:ce.getRotation(),Fe=R.getInsets(),ve=Fe.top+Fe.bottom;let Ee=Fe.left,Oe=Fe.right;const He={...l,left:l.left-1,top:l.top-1,width:l.width+1+ae,height:l.height+1+Me},C=R.getColumnFilter(),Ue=C&&!C?.hasHiddenButton();let Qe=null;ye&&(Qe=c.jsxs("div",{className:"slider",children:[c.jsx("div",{className:"line"}),c.jsx("div",{className:"subline inc"})]},"pending"));const $e=!(ye||Ue||Te||a||fe||H?.runs.length>1||P||be%360!=0);X?.background==="none"&&(X=null);let J=de||!(!P||!(P.rightIndex>0||P.leftIndex>0||P.colSpan>1));if(!J){const Ae=R.getSpans();(Ae.width>1||Ae.height>1)&&(J=!0)}const Ie={...X,...He,pointerEvents:S?"auto":void 0};if(!ue.CommonUtils.isEmpty(A)||!ue.CommonUtils.isEmpty(F?.repeatPlaceholder)){const Ae=F?.canWrap??!1;let k=null,oe=null,j=null,Y=[],u=!0;f||V||w!==0||(u=!1);const T=R.getTextFrame(V);if(u&&T){let E=$-1-(Ee+Oe);if(be){k=T.layout().bounds;const Ce={x:0,y:0,width:$-1,height:y};if(H){let he=H.width;if(F.repeatPlaceholder||F.repeatChars.length>0){const me=s.GeomUtils.boundsToPoints(Ce),xe=s.GeomUtils.rotatePoints(me,-be);he=s.GeomUtils.minBoundingRect(xe).width}k={...k,width:he}}j=s.GeomUtils.clipToOuterRect({...k,width:k.width+1+Ee+Oe},Ce,be),E=j.width-1-(Ee+Oe)+.01}let b=null;Ae&&(b={width:E});let L=null,v=F?.repeatPlaceholder;const U=T.layout(b);if(k=U.bounds,V?k={...k,width:0}:H&&(k={...k,width:F.repeatPlaceholder||F.repeatChars.length>0?E:H.width}),be&&Ae){let se=null;U.visitLines({visitTextLine:(Ce,he)=>{let me=Ce.bounds;const xe=s.GeomUtils.boundsToPoints(me),Le=s.GeomUtils.rotatePoints(xe,be),De=s.GeomUtils.minBoundingRect(Le);me={...me,x:(De.width-me.width)/2,y:(De.height-me.height)/2},se=se?s.GeomUtils.unionBounds(se,me):me}}),k={...se,width:se.width+Ee+Oe}}if(!v&&R.getType()!==s.ScalarType.String&&Math.floor(k.width)>E){if(M.getNumberFormat()==="General"&&R.getType()===s.ScalarType.Number){const se=M.measureText("0"),Ce=Math.floor(E/se.width),he=w,me=ue.CommonUtils.splitNumber(he),xe=Math.min(10,Ce-(Math.max(1,me.ipLength)+1)-(he<0?1:0));if(xe>=-1){const Le=`0${xe>0?".":""}${"#".repeat(Math.max(0,xe))}`;L=R.getNumberFormat(Le).displayText,L==="0"&&he<0&&(L="-0")}else if(Math.abs(he)>=Math.pow(10,5)||Math.abs(he)<=Math.pow(10,-5)){const Le=Ce-5-(he<0?1:0);if(Le>=0){const De=`0.${"0".repeat(Math.max(0,Le-1))}E+00`;L=R.getNumberFormat(De).displayText}}}L||(v="#")}if(!v&&H?.lastRepeatIndex>=0&&H?.width>E&&(v="#"),v&&E>0){const se=M.measureText(v),Ce=Math.floor((E||1)/(se?.width||1));L=Ce>0?v.repeat(Ce):""}if(V&&(re=s.ITextFrame.HorizontalAlignment.Left),L){const se=M.measureText(L).width;se&&(k={...k,width:se})}if(oe={...k,width:k.width+Ee+Oe,height:k.height},be&&!Ae){const se=s.GeomUtils.boundsToPoints(oe),Ce=s.GeomUtils.rotatePoints(se,be),he=s.GeomUtils.minBoundingRect(Ce);oe.width=he.width,oe.height=he.height}re===s.ITextFrame.HorizontalAlignment.Center||re===s.ITextFrame.HorizontalAlignment.CenterContinuous?oe.x=($-oe.width)/2:re===s.ITextFrame.HorizontalAlignment.Right?oe.x=$-oe.width-.5:oe.x=.5,ce.getVertical()===s.ITextFrame.VerticalAlignment.Center?oe.y=(y-oe.height)/2:ce.getVertical()===s.ITextFrame.VerticalAlignment.Bottom?oe.y=y-oe.height-ve:oe.y=ve;const Z=$e?{...K}:void 0,ee={style:{left:l.left-1,top:l.top-1,width:l.width+1,height:l.height+1,transform:be?`rotate(${be}deg)`:void 0,cursor:S?"pointer":void 0,pointerEvents:S?"auto":void 0,zIndex:J?1:void 0,...X},onMouseDown:S,onDoubleClick:S?se=>{se.stopPropagation(),se.preventDefault()}:null,...Z};G&&(ee.style.textDecorationStyle="wavy",ee.style.textDecorationColor=O?"rgb(0, 255, 255)":"red",ee.style.textDecorationLine="underline");const le=Se.getSize(),ie=(se,Ce,he,me,xe,Le,De,We=null)=>{let je=le*m,Ge=he,Ne=De?.runs?De.runs:[{type:s.NumberFormat.ParseRunType.Text,text:se,width:M.measureText(se,je).width}];De&&De?.width!==k.width&&(k={...k,width:De?.width});let Xe=Ee;if(De?.lastRepeatIndex>=0&&E>De?.width){const _e=De.runs[De.lastRepeatIndex];if(_e){const rt=[...Ne],vt=Math.max(0,E-1-De.width);let yt=0,Ct="";if(vt>0){const gt=Math.floor(vt/_e.width);Ct=gt>0?_e.text.repeat(gt):"",yt=vt}rt[De.lastRepeatIndex]={type:s.NumberFormat.ParseRunType.Repeat,text:Ct,width:yt},Ne=rt,k={...k,width:De.width+yt}}}const it=(_e,rt,vt,yt,Ct,gt,lt,Tt,Lt,Zt=null)=>{let Ft,Xt=Ge.width;xe===s.ITextFrame.HorizontalAlignment.Justify?(Xt=Ct,Le||(Ft="justify")):xe===s.ITextFrame.HorizontalAlignment.Distributed&&(Xt=Ct,Ft=Le||_e.text.split(" ").length-1==0?"center":"justify");const{style:Mt,className:vn,...Cn}=Zt;let Ot=_e.text;if(xe===s.ITextFrame.HorizontalAlignment.Fill&&F?.repeatChars.length===0){const at=Math.max(1,Math.floor((Ge?.width??0)/(lt?.width??1)));Ot=Ot.repeat(at)}let kt=Ge.height;const At=Se.getVerticalAlignment(),Yt=At===s.IFont.VerticalAlignment.Sub,Hn=At===s.IFont.VerticalAlignment.Super;if(Yt||Hn){const at=Se.getSuperSubScale();je*=at,kt*=at}const nt={textAlign:Ft,textAlignLast:Ft,background:void 0,...Mt,...Se.toCSS(O,m,!0),fontSize:je*s.IFont.getDeviceScale()};ge&&(nt.color=ge.toCSS(O));const Jt=Xe+rt;let jt=Fe.top+Ge.y+0;if(Yt&&(jt+=Lt-je),gt){const at=(lt.x+Jt)*m+1,ht=(lt.y+jt)*m+1;ht<0?nt.marginTop=ht:nt.paddingTop=ht,at<0?(nt.width=(Mt?.width??0)-at,nt.left=(Mt?.left??0)+at):nt.paddingLeft=at,nt.paddingRight=Math.max(0,(Mt?.width??0)-Xt*m-at),nt.paddingBottom=Math.max(0,(Mt?.height??0)-Ge.height*m-ht),nt.height=(Mt?.height??0)+(ht<0?-ht:0),(ht<0||at<0)&&(nt.clipPath=`inset(${ht<0?-ht:0}px 0px 0px ${at<0?1-at:0}px)`)}else if(nt.left=(lt.x+Jt)*m+1,nt.top=(lt.y+jt)*m+1,nt.width=lt.width*m,nt.height=lt.height*m,be&&!Ae){nt.left=(lt.x+rt)*m+1,nt.top=(lt.y+(Ge.y+0))*m+1;const at=s.GeomUtils.centerPoint({x:Xe+rt,y:0,width:_e.width,height:Ge.height}),ht=s.GeomUtils.centerPoint({x:Xe,y:0,width:Ct,height:Ge.height}),Qt=s.GeomUtils.rotatePoints([at],be,ht),yn={x:Qt[0].x-at.x,y:Qt[0].y-at.y};nt.left=nt.left+yn.x*m,nt.top=nt.top+yn.y*m;const Bt={...Ge,x:Xe,y:Fe.top,width:Ge.width+(Ee+Oe)},Un=s.GeomUtils.boundsToPoints(Bt),en=s.GeomUtils.rotatePoints(Un,be),wn=s.GeomUtils.minBoundingRect(en);Bt.width=wn.width,Bt.height=wn.height;const Vt=s.GeomUtils.centerPoint(Bt),xn={x:Vt.x-ht.x,y:Vt.y-ht.y};nt.left=nt.left+xn.x*m,nt.top=nt.top+xn.y*m}nt.lineHeight=kt*m+"px";const bn=$e?void 0:"text-line";Y.push(c.jsx("div",{className:vn?`${vn} ${bn}`:bn,style:nt,...Cn,children:Ot},`text-${Ge.y}-${yt}-${vt}`))};if(ce.getOverflow()===s.ITextFrame.Overflow.Shrink&&E>0){let _e=k?.width??0,rt=0;for(;_e>1&&_e>E&&je>2&&rt<100;)je*=E/_e,_e=M.measureText(se,je).width,rt++;k={...k,width:_e}}let pt=Ge.x;xe===s.ITextFrame.HorizontalAlignment.Right?pt+=k.width-Ge.width:xe!==s.ITextFrame.HorizontalAlignment.Center&&xe!==s.ITextFrame.HorizontalAlignment.CenterContinuous||(pt+=(k.width-Ge.width)/2),De?.lastRepeatIndex>=0&&(pt=Ge.x);const wt=Ne.length;for(let _e=0;_e<wt;_e++){const rt=Ne[_e];(rt.type===s.NumberFormat.ParseRunType.Text||rt.type===s.NumberFormat.ParseRunType.Repeat)&&(rt.type,s.NumberFormat.ParseRunType.Repeat,it(rt,pt,_e,Ce,xe===s.ITextFrame.HorizontalAlignment.Justify||xe===s.ITextFrame.HorizontalAlignment.Distributed||De?.lastRepeatIndex>=0?E:Ge.width,$e,{x:oe.x+te,y:oe.y,width:rt.width,height:k.height},0,me,We)),pt+=rt.width}};L?ie(L,0,{x:0,y:0,...k},U.lines[0].baseline,re,!0,null,ee):U.visitLines({visitTextLine:(se,Ce,he)=>{const me=se.runs[0].text.replace(/\s+$/,""),xe=Ce===he-1;let Le=re===s.ITextFrame.HorizontalAlignment.Justify&&(xe||se.runs[0].text.endsWith(`
|
|
8
|
+
`))?s.ITextFrame.HorizontalAlignment.Left:re,De=0;Ce>0&&(ce.getVertical()===s.ITextFrame.VerticalAlignment.Distributed||ce.getVertical()===s.ITextFrame.VerticalAlignment.Justify)&&(De=Math.max(0,(y-(ve+3)-se.bounds.height*he)/(he-1)*Ce)),ce.getVertical()===s.ITextFrame.VerticalAlignment.Distributed&&be&&be%90==0&&be%180!=0&&(Le=s.ITextFrame.HorizontalAlignment.Distributed),Le!==s.ITextFrame.HorizontalAlignment.Justify&&Le!==s.ITextFrame.HorizontalAlignment.Distributed&&Le!==s.ITextFrame.HorizontalAlignment.Fill||(k={...k,width:E});const We={...se.bounds,y:se.bounds.y+De+0,width:we||F&&(F.repeatChars.length>0||F.spacingChars.length>0)?k.width:se.bounds.width};ie(me,Ce,We,T.lines[0].baseline,Le,xe,he===1?H:null,$e&&Ce>0?{...ee,style:{...ee.style,background:void 0}}:ee)}})}Y.length>0&&(ne=Y)}if($e)return ne&&ne.length>0?ne:c.jsx("div",{style:Ie,...K});let Ve=S?"auto":He.pointerEvents,ke=null;if(Ue){const Ae={x:x*m-1,y:-1,width:N*m+1,height:y*m+1};Ve="auto",ke=W({renderBounds:Ae,darkMode:O,className:"filter-button",disabled:!R.isEditAllowed(),zoom:m,filter:R.getColumnFilter(),onFilterButtonMouseDown:D,...z}),ke&&(ke=c.jsx("div",{style:{...Ae,position:"absolute",zIndex:2,display:"flex",alignItems:"end"},onDoubleClick:k=>{k.stopPropagation(),k.preventDefault()},children:ke},"filterButton"))}ye&&!ne&&(ne=c.jsx("div",{style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:"..."},"pending-ellipsis"));const ze=[Te,ne,a,fe,Qe,ke];return c.jsx("div",{style:{...X,...He,pointerEvents:Ve},...K,children:ze})},To={text:"",placeholder:""},Io=(e,t)=>{if(!e.clean().getStyle().getNumberFormat().endsWith("%"))return!1;const n=t??e.dirty??"";return n.length===0||n.endsWith("%")&&!isNaN(parseFloat(n.substring(0,n.length-1)))},pl=Object.freeze([r.KeyCodes.Delete,r.KeyCodes.Home,r.KeyCodes.End]),pr=o.memo(o.forwardRef((e,t)=>{const{editState:n,onStartEdit:i,onChangeEdit:a,onSubmitEdit:l,onCancelEdit:d,onDoneEdit:m,defaultTextStyle:p,useRichStyling:g=!0,bodyStyle:q,activeCoords:h,sheet:f,commands:I,containerBounds:S,setNaturalDimensions:D,onFocus:z,disabled:W,style:K,zoom:y=1,linesVisible:B,autoFocus:R=!1,...w}=e,{height:M=0,width:O=0}=S??{},F=q?.darkMode??!1,A=o.useRef(null),[_,G]=o.useState(!1),[P,V]=o.useState(null),[$,te]=o.useState(()=>n);o.useEffect(()=>{Me.current=!1,te(n)},[n]);const N=o.useMemo(()=>{const k=$.clean();let oe=k.getStyle();g||(oe=oe.createTemporaryStyle({font:{size:p?.fontSize}}));const j=k.getFormula(),Y=oe.getAlignment(),u=j?s.ITextFrame.HorizontalAlignment.Left:Y.getHorizontal(),T=Y.getVertical(),E=Y.getOverflow()===s.ITextFrame.Overflow.Wrap||k.getType()===s.ScalarType.String&&(u===s.ITextFrame.HorizontalAlignment.Justify||u===s.ITextFrame.HorizontalAlignment.Distributed||T===s.ITextFrame.VerticalAlignment.Justify||T===s.ITextFrame.VerticalAlignment.Distributed),b=(U=>{if(!U)return To;const Z=U.clean();if(!Z)return To;let ee=Z.getStyle()?.getQuotePrefix();if(U.dirty===void 0||U.dirty===null){let le="",ie=Z.getFormulaText();ie&&(le=ie,ee=!1),le||(le=Z.toTextUnformatted(!0)??"");let se="";if(!U.editMode&&Z.isSpillOverflow()){const Ce=Z.getSpill();if(Ce){const he=Ce.getCell(),me=he.getFormulaText();he.isEqual(Z)||(se=me)}}return ee&&(le="'"+le),{text:le,placeholder:se}}return{text:U.dirty??"",placeholder:""}})($),L=b.text,v=s.ITextFrame.toCSSHorizontalTextAlign(g&&!j?$.clean()?.getRenderHorizontalAlignment():s.ITextFrame.HorizontalAlignment.Left);return{style:oe,isWrapped:E,textValue:L,formula:j,frameVertAlign:T,placeholder:b.placeholder,insets:g?k.getInsets():ue.TypesUtils.EmptyRect,textAlign:v}},[$,p,F,y,g]),x=o.useRef(null),H=r.useImperativeElement(t,()=>({startEdit:k=>{A.current=k?.initialSelection;const oe={...n,editMode:k?.editMode??!1};k?.text!==void 0&&(oe.dirty=k.text),oe.editMode===n.editMode&&oe.dirty===n.dirty||(te(oe),ne?.(oe))},submitEdit:()=>Te(),cancelEdit(){fe()},autoFocus(){x.current.focus()},dispatchEvent:k=>x.current.dispatchEvent(k),focus(){x.current.focus()},getLineHeight:ye}),[i,n]);o.useLayoutEffect(()=>{if(!P||!_)return;const k=x.current;N.textValue,k&&k.setSelectionRange(P.start,P.end,P.direction)},[x.current,P,N.textValue]);const re=o.useMemo(()=>{const k=$?.clean(),oe=N.style.createTemporaryTextFrame(N.textValue,k?.getType()===s.ScalarType.String),j=g?k.getInsets().right+k.getInsets().left:0;let Y=null;return N.isWrapped&&(Y={width:O-j}),oe.layout(Y)},[N,O,$,g]),ye=r.useCallbackRef(()=>Math.ceil(re?.lines[0]?.bounds.height),[re]);o.useLayoutEffect(()=>{if(!re)return;const k=N.style,oe=k.getInsets()??ue.TypesUtils.EmptyRect,j=g?oe.left+oe.right:0,Y=g?.04*k.getFont().getSize():1,u=Math.round(N.isWrapped?void 0:re.bounds.width+j+Y),T=Math.round(re.bounds.height);D?.({width:u,height:T})},[re,D,N,g,$]);const ne=r.useCallbackRef(a,[a]),X=r.useCallbackRef(k=>{if($.dirty===k)return;const oe={...$};oe.dirty=k,x.current,te(oe),ne?.(oe)},[$]),ae=r.useCallbackRef(k=>{if($.editMode===k)return;const oe={...$};oe.editMode=k,te(oe),ne?.(oe)},[$]),Me=o.useRef(!1),Te=r.useCallbackRef(()=>{if(Me.current)return!1;try{l?.($),m?.(),Me.current=!0}catch{return!1}return!0},[l,$]),fe=r.useCallbackRef(()=>{Me.current=!0,te(n),d?.(),m?.()},[d,n]),Be=r.useCallbackRef(k=>{if(!x.current)return;if(k.key,k.isDefaultPrevented(),!(k.isTrusted||k.nativeEvent.ctrlKey||k.nativeEvent.metaKey||k.nativeEvent.altKey||k.nativeEvent.isComposing||dt.STANDARD_KEY_CHARS.indexOf(k.nativeEvent.key)===-1&&k.nativeEvent.key!=="Backspace")){const b={...$};let L=0;return Io(b,b.dirty)&&!isNaN(parseFloat(k.key))?(b.dirty?.endsWith("%")?b.dirty=(b.dirty.substring(0,b.dirty.length-1)??"")+k.key+"%":b.dirty=(b.dirty??"")+k.key+"%",L=b.dirty.length-1):k.nativeEvent.key==="Backspace"?(b.dirty="",L=b.dirty.length):(b.dirty=(b.dirty??"")+k.key,L=b.dirty.length),x.current.value=b?.dirty,A.current={start:L,end:L,direction:"forward"},x.current?.setSelectionRange(L,L,"forward"),te(b),ne?.(b),void k.preventDefault()}const oe=k.nativeEvent.ctrlKey,j=k.nativeEvent.shiftKey,Y=k.nativeEvent.altKey,u=k.nativeEvent.metaKey;if(oe&&k.key==="z"&&k.stopPropagation(),k.which===r.KeyCodes.Escape)return k.preventDefault(),void fe();if(k.which===r.KeyCodes.F2)return ae(!0),void k.preventDefault();const T=k.target;if(k.key==="%"&&T.selectionStart===T.selectionEnd&&T.value[T.selectionStart]==="%"&&$?.clean().getStyle().numberFormat.includes("%"))return V({start:T.selectionStart+1,end:T.selectionEnd+1,direction:T.selectionDirection}),void k.preventDefault();if(k.which===r.KeyCodes.Enter){if(k.preventDefault(),u||Y){const b=N.textValue.substring(0,T.selectionStart)+`
|
|
9
|
+
`+N.textValue.substring(T.selectionEnd);return X(b),void V({start:T.selectionStart+1,end:T.selectionStart+1,direction:T.selectionDirection})}return void(Te()&&f.getSelection().traverse(s.IRange.Orientation.Column,j))}if(k.which===r.KeyCodes.Tab)return k.preventDefault(),void(Te()&&f.getSelection().traverse(s.IRange.Orientation.Row,j));let E=null;switch(k.which){case r.KeyCodes.Left:E=s.IRange.Direction.Left;break;case r.KeyCodes.Right:E=s.IRange.Direction.Right;break;case r.KeyCodes.Up:E=s.IRange.Direction.Up;break;case r.KeyCodes.Down:E=s.IRange.Direction.Down}if(E&&!(oe||j||Y||u)&&!$.editMode)return void Te();$.editMode&&(E||pl.includes(k.which))&&k.stopPropagation()},[$,f,N]),pe=o.useCallback(()=>{x.current?.focus(),setTimeout(()=>{x.current?.select()},0)},[]),Pe=o.useCallback(()=>{x.current?.focus(),console.log("implement toggleRelativeReferences")},[]),Se=r.useCallbackRef(()=>{const k=x.current?.value;let oe="";if(h.rowIndex>0){const j=f.getRange({rowIndex:h.rowIndex-1,colIndex:h.colIndex}).getCell();j&&(oe=j.toTextUnformatted(!0))}X(k+oe)},[h,f]);o.useEffect(()=>f.getRange(h).addListener(()=>{const k={...$,clean:()=>f.getRange(h).getCell()};te(k),ne?.(k)}),[h,f]);const ge=o.useCallback(()=>{const k=$.clean().createTemporaryCell({value:cn(),style:{numberFormat:"Medium Time"}}).toText();X((x.current?.value??"")+k)},[f]),ce=o.useCallback(()=>{const k=$.clean().createTemporaryCell({value:cn(),style:{numberFormat:"Short Date"}}).toText();X((x.current?.value??"")+k)},[f]),we=o.useMemo(()=>({element:()=>x.current,doCopy:k=>{const oe=x.current.value.substring(x.current.selectionStart,x.current.selectionEnd);if(k?.isCut){const j=x.current.value.substring(0,x.current.selectionStart)+x.current.value.substring(x.current.selectionEnd,x.current.value.length);X(j)}return oe}}),[x.current]),de=o.useMemo(()=>({element:()=>x.current,doPaste:async(k,oe)=>{const j=await k.toText?.();if(!j)return!0;const Y=x.current.value.substring(0,x.current.selectionStart)+j+x.current.value.substring(x.current.selectionEnd,x.current.value.length);return X(Y),V({start:x.current.selectionStart+j.length,end:x.current.selectionStart+j.length,direction:"forward"}),!0}}),[x.current]),be=o.useMemo(()=>({contains:k=>x.current?.contains(k)||!1,focus(){x.current.focus()}}),[]),Fe=o.useMemo(()=>[new r.SimpleCommand("selectAll",be,{label:"Select All",description:"Select all of the text in cell.",shortcut:{key:"a",modifiers:[r.KeyModifiers.Ctrl]}},pe),new r.SimpleCommand("startEditValueAbove",be,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:'"',modifiers:[r.KeyModifiers.Ctrl]},{key:'"',modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},Se),new r.SimpleCommand("startEditCurrentTime",be,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},ge),new r.SimpleCommand("startEditCurrentDate",be,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl]}},ce),new r.Command("relativeReferencesToggle",be,{label:"Toggle References",description:"Toggles cell references from relative to absolute, to partially absolute, back to relative again.",shortcut:{key:"F4"}},Pe),new r.Command("toggleEditorFocus",be,{label:"Toggle Editor Focus",description:"Moves focus between editors such as formula editor and inline editor.",shortcut:{key:"F2",modifiers:[r.KeyModifiers.Ctrl]}})],[]),ve=o.useMemo(()=>{let k=null;const oe=()=>({contains:j=>x.current?.contains(j)||!1,focus(){x.current.focus()}});return k=I?I.createChildGroup(oe,"editor",!1):new r.CommandGroup(oe,"editor"),k.addCommands(Fe,!0),k},[I,Fe]),Ee=o.useMemo(()=>({notifier:null,source:we,target:de,commands:ve}),[we,de,ve]);r.useCopyPaste(Ee);const[Oe,He]=o.useState(!R);o.useEffect(()=>{He(!1)},[]);const C=r.useCallbackRef(k=>{G(!0),ve?.activate();const oe=A.current;if(oe!==!1){let j,Y;const u=x.current.value;Io($,u)&&(j=u.length-1,Y=u.length-1),j=oe?.start??j??u.length,Y=oe?.end??Y??u.length,A.current=!1,V({start:j,end:Y,direction:"forward"})}z?.(k)},[z,$]),Ue=N.insets;let Qe=Ue.left+1;const $e=Ue.left+Ue.right+2-1,J=re?.bounds.height??0;let Ie,Ve=Ue.top;N.frameVertAlign===s.ITextFrame.VerticalAlignment.Center?Ve=Math.max(0,(M-(Ue.top+Ue.bottom)-J)/2):N.frameVertAlign===s.ITextFrame.VerticalAlignment.Bottom&&(Ve=Math.max(0,M-(Ue.top+Ue.bottom)-J)),B!==void 0&&re?.lines[0]?.bounds&&(Ie=re?.lines[0]?.bounds.height*B);const ke=N.style.getFont();let ze=ke.getSize();ke.isSuperSub()&&(ze*=ke.getSuperSubScale()),ze*=s.IFont.getDeviceScale()*y;const Ae=g?ke.toCSS(F,y):null;return c.jsx("div",{className:"sheet-cell-editor",onMouseDown:k=>{x.current&&document.activeElement!==x.current&&requestAnimationFrame(()=>{x.current.focus()})},ref:H,...w,style:{display:"flex",flexGrow:1,alignSelf:"stretch",height:"100%",width:"100%",maxWidth:"100%",maxHeight:"100%",cursor:"initial",...K},children:c.jsx("div",{className:"editor-placement",style:{display:"flex",flexGrow:1,position:"relative",top:Ve*y+1,left:Qe*y,width:`calc(100% - ${$e*y}px)`,maxWidth:`calc(100% - ${$e*y}px)`,height:(Ie??J)*y,maxHeight:(Ie??J)*y},children:c.jsx("textarea",{spellCheck:"false",placeholder:N.placeholder,ref:x,value:N.textValue,disabled:Oe,readOnly:W||f.getProtection().isReadOnly(),name:"sheet-cell-editor",autoComplete:"off",autoCapitalize:"off",style:{flex:"1 1 100%",font:"inherit",...Ae,fontSize:ze?`${ze}px`:"inherit",textAlign:N.textAlign,lineHeight:(re?.lines[0]?.bounds.height??0)*y+"px",height:(re?.bounds.height??0)*y,boxSizing:"border-box",padding:"0px",margin:"0px",borderWidth:0,outline:"none",resize:"none",overflow:"hidden",background:"transparent",maxHeight:"100%",maxWidth:"100%",width:"100%",userSelect:"text",position:"absolute",whiteSpace:N.isWrapped?"normal":"pre",wordWrap:"break-word"},onFocus:C,onBlur:()=>{G(!1)},onSelect:k=>{},onChange:k=>{x.current&&!Me.current&&(A.current=!1,X(k.target.value),N.textValue,k.target.value,k.target.selectionStart,k.target.selectionEnd,k.target.selectionDirection,V({start:k.target.selectionStart,end:k.target.selectionEnd,direction:k.target.selectionDirection}))},onMouseDown:k=>{_&&ae(!0)},onKeyDown:Be})})})})),vr=(e,t)=>({clean:e,dirty:t,editMode:!1}),Cr=e=>{const{length:t=0,width:n=1,dashArray:i=null,dashArrayAdditional:a=null,isDouble:l=!1,isAngled:d=!1,offsetX:m=0,offsetY:p=0,isVertical:g=!1,...q}=e,h=K=>{let y=null;if(K&&n>0){y="";for(let B=0;B<K.length;B++)y+=K[B],B<K.length-1&&(y+=",")}return y},f=h(i);let I=f;a&&(I=h(a));let S=n,D=t,z=null;if(l){S=Math.floor(n/2);const K=S+S/2+1;let y=null;y=g?`M ${r.ReactUtils.boundPixel(m+K)} ${r.ReactUtils.boundPixel(p)} L ${r.ReactUtils.boundPixel(m+K)} ${r.ReactUtils.boundPixel(p+D)}`:`M ${r.ReactUtils.boundPixel(m)} ${r.ReactUtils.boundPixel(p+K)} L ${r.ReactUtils.boundPixel(m+D)} ${r.ReactUtils.boundPixel(p+K)}`,z=c.jsx("path",{strokeWidth:S,strokeDasharray:I,d:y,...q})}if(d){S=n/2;const K=S+S/2;let y=I,B=null;B=g?`M ${r.ReactUtils.boundPixel(m+K)} ${r.ReactUtils.boundPixel(p)} L ${r.ReactUtils.boundPixel(m+K)} ${r.ReactUtils.boundPixel(p+D)}`:`M ${r.ReactUtils.boundPixel(m)} ${r.ReactUtils.boundPixel(p+K)} L ${r.ReactUtils.boundPixel(m+D)} ${r.ReactUtils.boundPixel(p+K)}`,z=c.jsx("path",{strokeWidth:S,strokeDasharray:y,strokeDashoffset:"1",shapeRendering:"crispEdges",d:B,...q})}let W=null;return W=g?`M ${r.ReactUtils.boundPixel(m+S/2)} ${r.ReactUtils.boundPixel(p)} L ${r.ReactUtils.boundPixel(m+S/2)} ${r.ReactUtils.boundPixel(p+D)}`:`M ${r.ReactUtils.boundPixel(m)} ${r.ReactUtils.boundPixel(p+S/2)} L ${r.ReactUtils.boundPixel(m+D)} ${r.ReactUtils.boundPixel(p+S/2)}`,c.jsxs(c.Fragment,{children:[c.jsx("path",{strokeWidth:S,strokeDasharray:f,d:W,...q}),z]})};function Qn(e,t){if(typeof e=="function")return e(t);e&&(e.current=t)}var Wt=parseInt(o.version.split(".")[0],10)>=19?function(e){return t=>{const n=[];for(const i of e){const a=Qn(i,t),l=typeof a=="function";n.push(l?a:()=>Qn(i,null))}return()=>{for(const i of n)i()}}}:function(e){return t=>{for(const n of e)Qn(n,t)}},vl=function(){},br=typeof window<"u",rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Cl=br?o.useLayoutEffect:o.useEffect,Eo={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const zt=br&&window.ResizeObserver!==void 0?function(){var e=o.useState(null),t=e[0],n=e[1],i=o.useState(Eo),a=i[0],l=i[1],d=o.useMemo(function(){return new window.ResizeObserver(function(m){if(m[0]){var p=m[0].contentRect,g=p.x,q=p.y,h=p.width,f=p.height,I=p.top,S=p.left,D=p.bottom,z=p.right;l({x:g,y:q,width:h,height:f,top:I,left:S,bottom:D,right:z})}})},[]);return Cl(function(){if(t)return d.observe(t),function(){d.disconnect()}},[t]),[n,a]}:function(){return[vl,Eo]},bl=(e,t)=>e.colStart===t.colStart?e.rowStart-t.rowStart:e.colStart-t.colStart,yl=(e,t)=>e.rowStart===t.rowStart?e.colStart-t.colStart:e.rowStart-t.rowStart,wl=e=>{const{key:t,points:n,range:i,stroke:a,darkMode:l,forceThinBorder:d=!1,shiftIfWide:m=!1,isVertical:p=!1,intersections:g,layout:q}=e,h=s.IBorder.BuiltInDefinitions.get(d?s.IBorder.StrokeStyle.Thin:a.getStyle());if(!h)return null;const f=n[0],I=n[1],S=n[2],D=n[3];let z=1+(p?D-I:S-f),W=0;const K=a.getColor().toRGBA(l).toString(),y=h.description.toLowerCase().includes("double");let B,R;const w=p?"rowStart":"colStart",M=p?"rowEnd":"colEnd",O=p?I:f;if(g?.length>0){const G=g[0];if(G?.range[w]===i[w]){const V=s.IBorder.BuiltInDefinitions.get(G.stroke.getStyle());W=Math.floor(V.width/2)}if(g[g.length-1]?.range[M]===i[M]){const V=s.IBorder.BuiltInDefinitions.get(g[g.length-1].stroke.getStyle());z=Math.floor(z+(V.width===2?0:V.width/2))}if(y){const V=p?"colStart":"rowStart",$=p?"colEnd":"rowEnd",te=p?q?.getRowOffset:q?.getColOffset;let N=0,x=0;B=[],R=[];for(let H=0;H<g.length;H++){const re=g[H];if(re.stroke.getStyle()===s.IBorder.StrokeStyle.Double&&te){const ye=te(re.range[w])-(O-W);re.range[V]<i[V]&&(B.push(ye-N),N=ye,B.push(1),N++),re.range[$]>i[$]&&(R.push(ye-x),x=ye,R.push(1),x++)}}B.length>0&&N<z&&B.push(z-N),R.length>0&&x<z&&R.push(z-x)}}let F=p?-Math.floor(h.width/2):-W,A=p?-W:-Math.floor(h.width/2);const _=m&&h.width>2?-1:0;return c.jsx(Cr,{offsetX:f+F+_,offsetY:I+A+_,length:z+W,isVertical:p,stroke:K,width:h.width,dashArray:B??h.pattern,dashArrayAdditional:R,isDouble:y,isAngled:h.description.toLowerCase().includes("slant")},t)},po=({getBorderAt:e,borderRenderer:t=wl,getVisibleCells:n,darkMode:i,forceThinBorder:a=!1,defaultColor:l="black",shiftIfWide:d=!1})=>{const m=r.useCallbackRef(n,[n]);return{overlay:o.useMemo(()=>g=>{const q=g.toClipBounds(g.getRangeCoordsBounds(),-3);if(!q)return;const h=m(g);if(h.length===0)return;const f=g.getVisibleColumnOffsets(),I=g.getVisibleRowOffsets();let S=[],D=[];const z=g.getVisibleColumns(),W=g.getVisibleRows(),K=[],y=[],B=[],R=(F,A,_,G,P,V,$)=>{const te={index:G,stroke:P,visibleIndex:_,edge:V,length:$};F[A]||(F[A]=[]),F[A].length>0&&F[A][F[A].length-1]?.index===G?F[A][F[A].length-1]=te:F[A].push(te)};for(let F=0;F<h.length;F++){const A=h[F],_=A.coords;if(!_)continue;const G=A?.range??{rowStart:_.rowIndex,colStart:_.colIndex,rowEnd:_.rowIndex,colEnd:_.colIndex},P=g.getVisibleRangeCoords();if(!ue.CoordUtils.isRangesIntersect(G,P)&&!ue.CoordUtils.isRangeWithinRange(G,P))continue;const V=_.colIndex,$=_.rowIndex,te=f[V],N=I[$];if(G.rowEnd!==G.rowStart){const Be=I[G.rowStart]?.spanIndex??-1,pe=I[G.rowEnd]?.spanIndex??I[W[W.length-1]].spanIndex+1;S.push({...G,rowStart:Be,rowEnd:pe})}if(G.colEnd!==G.colStart){const Be=f[G.colStart]?.spanIndex??-1,pe=f[G.colEnd]?.spanIndex??f[z[z.length-1]].spanIndex+1;D.push({...G,colStart:Be,colEnd:pe})}const x=A.value,H=e(x,F);if(!H||H.isEmpty())continue;const re=H.getLeft(),ye=H.getTop(),ne=H.getRight(),X=H.getBottom();let ae=1,Me=1;if(!te||!N)continue;const Te=te.spanIndex,fe=N.spanIndex;re.isNone()||R(K,Te,fe,$,re,s.IBorder.Edge.Left,ae),ye.isNone()||R(y,fe,Te,V,ye,s.IBorder.Edge.Top,Me),ne.isNone()||R(K,Te+Me,fe,$,ne,s.IBorder.Edge.Right,ae),X.isNone()||R(y,fe+ae,Te,V,X,s.IBorder.Edge.Bottom,Me)}const w=(F,A,_)=>{const G=[];return F.forEach((P,V)=>{let $=null;P.sort((te,N)=>te.visibleIndex-N.visibleIndex);for(let te=0;te<P.length;te++){const N=P[te];if(!N?.stroke||A[V]===void 0&&A[V-1]===void 0)continue;let x=!1;if(_)for(let ne=0;!x&&ne<S.length;ne++){let X=S[ne];X.colStart<=N.index&&X.colEnd>=N.index&&X.rowStart<V&&X.rowEnd>=V&&(x=!0)}else for(let ne=0;!x&&ne<D.length;ne++){let X=D[ne];X.rowStart<=N.index&&X.rowEnd>=N.index&&X.colStart<V&&X.colEnd>=V&&(x=!0)}if(x)continue;const H=N.stroke?.getColor(),re=H?H.toRGBA().toString():l,ye=N.stroke.getStyle()+":"+re;(ye!==$?.key||$&&$.visibleIndex+1<N.visibleIndex)&&($&&G.push($),$={key:ye,index:A[V]??A[V-1]+1,visibleIndex:N.visibleIndex,edge:N.edge,stroke:N.stroke,from:N.index,to:N.index+N.length-1,intersections:[],length:1}),$.to=N.index+N.length-1,$.visibleIndex=N.visibleIndex}$&&G.push($)}),G};S=S.sort(yl),D=D.sort(bl);const M=w(K,z,!1),O=w(y,W,!0);if(M.length===0&&O.length===0)return null;for(let F=0;F<O.length;F++){const A=O[F];let _=ue.CommonUtils.findEqualOrGreater(M,A.from,P=>P.index),G=!1;for(;!G;){const P=M[_++];P&&P.index>=A.from&&P.index<=A.to+1&&P.from<=A.index&&P.to+1>=A.index&&(A.intersections.push({stroke:P.stroke,range:{rowStart:P.from,rowEnd:P.to+1,colStart:P.index,colEnd:P.index}}),P.intersections.push({stroke:A.stroke,range:{rowStart:A.index,rowEnd:A.index,colStart:A.from,colEnd:A.to+1}})),G=!P||P.index>A.to+1}}for(let F=0;F<O.length;F++){const A=O[F];let _=A.stroke;const G=`rBorder:${A.index}:${A.from}:${A.to}:${A.edge}`,P={rowStart:A.index,rowEnd:A.index,colStart:A.from,colEnd:A.to+1},V=g.getLayout(),$=!1,te=V.getColOffset(P.colStart),N=V.getRowOffset(P.rowStart),x=[te,N,V.getColOffset(P.colEnd),N];B.push(t({key:G,points:x,stroke:_,darkMode:i,forceThinBorder:a,shiftIfWide:d,range:P,intersections:A.intersections,layout:V,isVertical:$}))}for(let F=0;F<M.length;F++){const A=M[F];let _=A.stroke;const G=`cBorder:${A.index}:${A.from}:${A.to}:${A.edge}`,P={rowStart:A.from,rowEnd:A.to+1,colStart:A.index,colEnd:A.index},V=g.getLayout(),$=!0,te=V.getColOffset(P.colStart),N=[te,V.getRowOffset(P.rowStart),te,V.getRowOffset(P.rowEnd)];B.push(t({key:G,stroke:_,points:N,darkMode:i,forceThinBorder:a,shiftIfWide:d,range:P,intersections:A.intersections,layout:V,isVertical:$}))}return c.jsx("svg",{width:`${q.width}`,height:`${q.height}`,viewBox:`0 0 ${q.width} ${q.height}`,preserveAspectRatio:"none",shapeRendering:"crispEdges",style:{position:"absolute",left:"0px",top:"0px",width:`${q.width}px`,height:`${q.height}px`,pointerEvents:"none",transitionTimingFunction:"linear",transitionDelay:"0",transitionProperty:"left, top, width, height",willChange:"left, top, width, height, stroke-dashoffset",overflow:"visible"},children:B},"borders")},[e,i])}},Fo=ue.AnchorLocation.Center,xl=Object.freeze({horizontal:!1,vertical:!1}),Ao=ue.TypesUtils.EmptyTopLeft,ql=(e,t)=>ue.CoordUtils.EmptyCell,Sl=(e,t)=>new Promise((n,i)=>{i("StaticBorderRenderer does not support scrolling")}),Rl=o.memo(e=>{const{getBorderAt:t,width:n,height:i,style:a,rowCount:l=2,columnCount:d=2,darkMode:m,forceThinBorder:p,children:g,...q}=e,h=o.useRef(null),[f,{width:I,height:S}]=zt(),D=n??I,z=i??S,W=o.useMemo(()=>{const $=[];for(let te=0;te<l;te++)for(let N=0;N<d;N++){const x={colIndex:N,rowIndex:te};$.push({coords:x,value:x})}return $},[]),K=o.useCallback($=>W,[W]),{overlay:y}=po({getVisibleCells:K,getBorderAt:t,darkMode:m,forceThinBorder:p}),B=Math.floor(D/d),R=Math.floor(z/l),w={getColOffset:$=>Math.ceil($*B)+0,getRowOffset:$=>Math.ceil($*R)+0,getColIndex:$=>Math.floor(($-0)/B)-1,getRowIndex:$=>Math.floor(($-0)/R)-1},M={rowStart:0,colStart:0,rowEnd:l,colEnd:d},O={x:0,y:0,width:Math.max(0,D)+0,height:Math.max(0,z)+0},F=o.useMemo(()=>{const $={},te=Math.floor(D/d);for(let N=0;N<d;N++)$[N]={offset:N*te,size:te,spanIndex:N};return $},[D,z]),A=o.useMemo(()=>{const $={},te=Math.floor(z/l);for(let N=0;N<l;N++)$[N]={offset:N*te,size:te,spanIndex:N};return $},[D,z]);if(!y)return null;const _={width:D,height:z},G={width:D,height:z},P={getStage:()=>h.current,getTotalSize:()=>_,getViewportSize:()=>G,getLayout:()=>w,getCellCoordsAsRangeCoords:ue.CoordUtils.cellToRange,getVisibleRangeCoords:()=>M,getVisibleRows:()=>{const $=[];for(let te=0;te<l;te++)$.push(te);return $},getTotalRangeCoords:()=>M,getRelativePointFromClient:($,te)=>({x:$,y:te}),getVisibleColumns:()=>{const $=[];for(let te=0;te<d;te++)$.push(te);return $},toClipBounds:($,te)=>O,toViewBounds:$=>$,toAbsoluteBounds:$=>$,getBounds:()=>O,getInsets:()=>null,getRangeCoordsBounds:($,te)=>null,getVisibleColumnOffsets:()=>F,getVisibleRowOffsets:()=>A,allViews:()=>({[Fo]:P}),getAnchor:()=>Fo,getZoom:()=>1,scrollCellCoordsIntoView:Sl,getCellCoordsFromClient:ql,getScrollOrientation:()=>xl,getScrollTopLeft:()=>Ao,getFreezeTopLeft:()=>Ao},V=y(P);return c.jsxs("div",{style:{...a,position:"relative",display:"flex"},...q,children:[c.jsx("div",{ref:Wt([h,f]),style:{flex:"1 1 100%",display:"flex",maxWidth:"100%",maxHeight:"100%"},children:g}),V]})});function yr(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=yr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function bt(){for(var e,t,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=yr(e))&&(i&&(i+=" "),i+=t);return i}const kl="_sheetxl-sheet_1qeq6_5",Ml="_viewport-overlay_1qeq6_6",wr=e=>{const{style:t,...n}=e??{};return c.jsxs("svg",{style:{width:"135px",height:"37px",...t},viewBox:"0 0 135 37",...n,children:[c.jsx("path",{d:"M 1.0984,0 C 0.4978,0 0.01,0.40548 0.01,0.90302 v 19.5766 H 0 v 15.61762 c 0,0.30574 0.185,0.57535 0.466,0.73886 v 0.1426 H 0.8565 C 0.9315,36.992 1.0086,37 1.0883,37 H 13.063 25.9706 v 0 h 8.7553 c 0.08,0 0.1563,-0.008 0.2308,-0.0213 h 0.054 v -0.0141 c 0.4621,-0.10457 0.8035,-0.45175 0.8035,-0.86739 v -15.312 c 0,-0.0328 0.01,-0.0658 0.01,-0.0995 V 0.90304 C 35.8242,0.4052 35.3363,6e-5 34.7358,6e-5 H 22.5969 V 1.7e-4 H 21.0014 V 6e-5 Z",fill:"#547dbe",fillRule:"evenodd"}),c.jsx("path",{d:"M 1.4849,2.09543 V 9.06408 H 8.1947 V 2.09543 Z m 8.6592,0 V 9.06408 H 16.854 V 2.09543 Z m 8.685,0 v 6.96865 h 6.7098 V 2.09543 Z m 8.7355,0 v 6.96865 h 6.7099 V 2.09543 Z M 1.4849,11.04391 v 6.81444 h 6.7098 v -6.81444 z m 8.6592,0 v 6.81444 h 6.7099 v -6.81444 z m 8.685,0 v 6.81444 h 6.7098 v -6.81444 z m 8.7355,0 v 6.81444 h 6.7099 V 11.04391 Z M 1.4849,19.83872 v 6.68584 h 6.7098 v -6.68584 z m 8.6592,0 v 6.68584 h 6.7351 v -6.68584 z m 8.685,0 v 6.68584 h 6.7098 v -6.68584 z m 8.7355,0 v 6.68584 h 6.7099 v -6.68584 z m -26.052,8.38811 v 6.68588 h 6.7098 v -6.68588 z m 8.6592,0 v 6.68588 h 6.7355 v -6.68588 z m 8.685,0 v 6.68588 h 6.7099 v -6.68588 z m 8.7356,0 v 6.68588 h 6.7098 v -6.68588 z",fill:"#ffffff",fillRule:"evenodd"}),c.jsx("path",{d:"m 1.4785,2.09737 v 6.96865 h 6.741 V 2.09737 Z m 0,8.94851 v 6.81449 h 6.741 v -6.81449 z m 0,8.79485 v 6.6858 h 6.741 v -6.6858 z m 0.028,8.388 v 6.68588 h 6.741 v -6.68588 z",fill:"#547dbe",fillRule:"evenodd",strokeWidth:"0.4"}),c.jsx("path",{d:"M 120.9895,32.82218 V 10.13469 h 4.7986 v 18.71559 h 9.2153 v 3.9719 z m 0.4853,0 h -5.4976 l -5.275,-8.57923 -5.2751,8.57923 h -5.1481 l 7.5314,-11.69325 -7.0545,-10.99424 h 5.3067 l 4.8936,8.16618 4.7986,-8.16618 h 5.1796 l -7.118,11.24826 z M 95.9361,29.04099 c 0.5297,0 1.0381,-0.053 1.5254,-0.15888 0.4872,-0.10591 0.9745,-0.23299 1.4617,-0.3813 v 3.52703 c -0.5084,0.21183 -1.144,0.39189 -1.9066,0.54018 -0.7415,0.16946 -1.5571,0.2542 -2.4469,0.2542 -1.038,0 -1.9701,-0.16947 -2.7964,-0.5084 -0.805,-0.33894 -1.4511,-0.92148 -1.9384,-1.74763 -0.466,-0.84734 -0.6991,-2.01241 -0.6991,-3.49526 v -8.35686 h -2.2562 v -2.00181 l 2.6058,-1.58876 1.3664,-3.65411 h 3.0189 v 3.6859 h 4.8619 v 3.55878 h -4.8619 v 8.35686 c 0,0.65668 0.1906,1.15449 0.5719,1.49342 0.3814,0.31776 0.8792,0.47664 1.4935,0.47664 z M 79.1445,14.83743 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3983,1.35581 2.0972,3.29411 2.0972,5.81491 v 2.28769 H 75.7444 c 0.042,1.33475 0.4342,2.38315 1.1758,3.14596 0.7626,0.76244 1.8113,1.14385 3.1459,1.14385 1.1227,0 2.1396,-0.10609 3.0506,-0.3179 0.9109,-0.23311 1.8536,-0.58257 2.8283,-1.0484 v 3.654 c -0.8476,0.42362 -1.7479,0.73087 -2.7012,0.92139 -0.9322,0.21181 -2.0655,0.3179 -3.4001,0.3179 -1.7373,0 -3.2731,-0.3179 -4.6078,-0.95333 -1.3346,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0169,-5.05235 0.6991,-1.35578 1.6629,-2.37258 2.8917,-3.0504 1.2286,-0.67783 2.6586,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.2879,0.88967 -0.5933,0.59322 -0.9428,1.51461 -1.0487,2.76455 h 6.6415 c -0.021,-1.05904 -0.2967,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3559,-1.04855 -2.4787,-1.04855 z m -17.011,-3.36815 c 2.3939,0 4.29,0.68847 5.6882,2.06535 1.3982,1.35581 2.0973,3.29411 2.0973,5.81491 v 2.28769 H 58.7653 c 0.042,1.33475 0.4343,2.38315 1.1758,3.14596 0.7627,0.76244 1.8113,1.14385 3.1459,1.14385 1.1228,0 2.1397,-0.10609 3.0507,-0.3179 0.911,-0.23311 1.8536,-0.58257 2.8282,-1.0484 v 3.654 c -0.8475,0.42362 -1.7478,0.73087 -2.7011,0.92139 -0.9321,0.21181 -2.0655,0.3179 -3.4002,0.3179 -1.7372,0 -3.273,-0.3179 -4.6077,-0.95333 -1.3347,-0.65673 -2.3833,-1.64162 -3.1459,-2.95507 -0.7627,-1.31344 -1.144,-2.96571 -1.144,-4.9568 0,-2.03367 0.3389,-3.71788 1.0168,-5.05235 0.6991,-1.35578 1.6631,-2.37258 2.8918,-3.0504 1.2287,-0.67783 2.6587,-1.0168 4.2899,-1.0168 z m 0.032,3.36815 c -0.911,0 -1.6736,0.29653 -2.288,0.88967 -0.5931,0.59322 -0.9427,1.51461 -1.0486,2.76455 h 6.6414 c -0.021,-1.05904 -0.2965,-1.92796 -0.8262,-2.60567 -0.5297,-0.69905 -1.3558,-1.04855 -2.4786,-1.04855 z M 41.7033,13.59817 c 0,0.84739 -0.032,1.66288 -0.095,2.44668 -0.042,0.78385 -0.085,1.33456 -0.1271,1.65231 h 0.2542 c 0.5508,-0.88968 1.2605,-1.53575 2.1291,-1.93827 0.8686,-0.40251 1.8325,-0.60371 2.8917,-0.60371 1.8855,0 3.3896,0.50838 4.5124,1.52518 1.144,0.99558 1.716,2.60556 1.716,4.82998 V 32.82218 H 48.2498 V 22.68575 c 0,-2.49951 -0.9322,-3.74937 -2.7964,-3.74937 -1.4194,0 -2.4045,0.49788 -2.9553,1.49362 -0.5297,0.97424 -0.7945,2.38314 -0.7945,4.22592 v 8.16626 H 36.9688 V 8.67305 h 4.7348 z",fill:"#eb594d"}),c.jsx("path",{d:"m 23.345,4.88926 c 1.4307,0 2.8282,0.229 4.1916,0.68692 1.3636,0.45803 2.6999,1.15712 4.0084,2.09748 l -1.8344,2.50966 C 28.6222,9.40175 27.5522,8.82162 26.5004,8.44306 25.4486,8.0645 24.3968,7.87524 23.345,7.87524 c -1.9935,0 -3.5435,0.40902 -4.6503,1.22728 -1.1068,0.81819 -1.6601,1.97842 -1.6601,3.48048 v 0.0183 c 0,1.05019 0.3179,1.8502 0.9538,2.39973 0.636,0.54952 1.4615,0.95869 2.4765,1.22731 1.015,0.26862 2.0975,0.51907 3.2468,0.75111 1.003,0.20755 1.9996,0.44872 2.9905,0.7235 0.9905,0.27478 1.8922,0.66562 2.7057,1.1724 0.813,0.50679 1.4615,1.1937 1.9444,2.06075 0.4832,0.86705 0.7247,1.99672 0.7247,3.38884 v 0.0367 c 0,2.45464 -0.8561,4.35355 -2.5682,5.69703 -1.7122,1.34311 -4.1216,2.01505 -7.2278,2.01505 -1.2963,0 -2.5162,-0.12207 -3.6598,-0.36658 -1.1434,-0.24413 -2.2134,-0.61071 -3.2102,-1.09898 -0.9968,-0.48864 -1.9292,-1.09897 -2.7975,-1.83175 l 1.9628,-2.47308 c 1.0763,0.92809 2.2534,1.62428 3.5314,2.08825 1.2779,0.46431 2.669,0.69627 4.1733,0.69627 2.1158,0 3.7513,-0.40613 4.9071,-1.21827 1.1558,-0.81214 1.7335,-1.95096 1.7335,-3.4164 v -0.0183 c 0,-1.06247 -0.2872,-1.87762 -0.8622,-2.44543 -0.5746,-0.56786 -1.3267,-0.99528 -2.2563,-1.28234 -0.9292,-0.28695 -1.9383,-0.52812 -3.0267,-0.72354 -1.0397,-0.18314 -2.0822,-0.39685 -3.1278,-0.64117 -1.0457,-0.24417 -2.0026,-0.60444 -2.8709,-1.08076 -0.8683,-0.47621 -1.5685,-1.15396 -2.1005,-2.0333 -0.532,-0.87933 -0.798,-2.05162 -0.798,-3.5171 v -0.0183 c 0,-2.4792 0.8255,-4.39955 2.4766,-5.7611 1.651,-1.36167 3.9807,-2.04258 6.9892,-2.04258 z",stroke:"#eb594d",strokeWidth:"2",fill:"#f9cecb"})]})},Tl=o.memo(e=>{const{colorLicensee:t="blue",colorError:n="red",colorCredits:i="grey",credits:a="All rights reserved - Michael Ford",feature:l,style:d,...m}=e??{},[p,g]=o.useState(null);o.useEffect(()=>{(async()=>{const R=await s.LicenseManager.getDetails();g(R)})()},[]);const[q,h]=o.useState(!1),f={opacity:.65},I=o.useMemo(()=>{const R=p?.exceptions(),w=R?.length??0;if(w===0)return null;const M=[];for(let O=0;O<w;O++){const F=R[O];M.push(c.jsx("div",{style:{opacity:.8,fontSize:"16px",textAlign:"left",color:n},children:F},O))}return M},[p,n]);if(p===null||p.isValidFor(l))return null;const S=p.type(),D=!I&&S.endsWith("ity"),z=p.licensee(),W=D?1.6:1,K=135/W,y=37/W;let B=null;return!S&&z?.length>0&&(B=c.jsx("div",{style:{opacity:.7,fontWeight:"500",fontSize:"16px",textAlign:"left",color:t},children:z})),c.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",overflow:"hidden",...d},...m,children:c.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column"},children:[q?c.jsx(wr,{style:f}):c.jsx("svg",{width:K,height:y,style:f,children:c.jsx("image",{style:{width:K,height:y},href:"https://www.sheetxl.com/watermark.svg",onError:()=>h(!0)})}),c.jsxs("div",{children:[B,I,c.jsx("div",{style:{height:"0px",fontSize:"16px",textAlign:"left",width:"0px",opacity:.8,color:i},children:a})]})]})})}),tt=(e,t,n)=>{const i=o.useRef(t);i.current=t;const a=n?.fireOnModelChange??!0;o.useEffect(()=>{if(!e||!i.current)return;const l=Object.keys(i.current),d={},m=l.length;for(let g=0;g<m;g++){const q=l[g];d[q]=(h,f)=>{i.current[q]?.(h,f)}}const p=e.addListeners(d,n);if(a)for(let g=0;g<m;g++)d[l[g]](e);return()=>{p?.()}},[e])},Rn=new s.Color("transparent");function xr(e){const{sheet:t,onRepeatCommandChange:n,bodyStyle:i,commands:a,target:l,notifier:d,onStartEdit:m,getViewport:p}=e,[g,q]=o.useState(null),[h,f]=o.useState(null),I=o.useRef(null),S=r.useCallbackRef(m,[m]),D=r.useCallbackRef(p,[p]),[z,W]=o.useState(),[K,y]=o.useState(()=>t?.getStyles().parseColor(s.IColor.Scheme.Bg2)),[B,R]=o.useState(()=>t?.getStyles().getNormal().getFont().getFill()),w=r.useEditMode();o.useRef(w.getMode()).current=w.getMode();const M=r.useGlobalClipboard(),[O,F]=o.useState(ue.CommonUtils.EmptyArray),A=o.useCallback(()=>{if(I.current!==t)return;const u=t.getSelectedRanges();let T=null;O.length>0&&ue.CoordUtils.isCellWithinRange(g,O[0].getRange().getCoords())&&(T=O[0]);const E=t?.getSelectedCell(),b=E?.getCoords()??null;Dt.unstable_batchedUpdates(()=>{re(T),q(b),f(u)})},[t,O,h,g]),_=o.useCallback(ue.CommonUtils.debounce(A,210),[A]);o.useEffect(()=>{I.current=t,A()},[t]);const G=r.useCallbackRef(()=>t.getRange(g).getCell(),[t,g]),P=r.useCallbackRef(async(u,T,E=null,b=!1,L=!0)=>{const v=u?.label?.(),U=async()=>{const ie=await Promise.resolve(L&&d?.showBusy?.(v??"Busy..."));try{await t.doBatch(async()=>T(t),v),b&&w.setMode(null),ie&&ie()}catch(se){if(ie&&ie(),!se)return;d?.showError?.(se)}},Z=[];let ee=!1;const le=async()=>(Z.push(U),(async()=>{if(!ee){for(ee=!0;Z.length>0;){const ie=Z.shift();ie&&await ie()}ee=!1}})());if(n){let ie=null;if(E!==!1&&u){const se=E??v;ie=new r.SimpleCommand(u.key(),l,{label:se,description:se},le)}n(ie)}return le()},[t,n,d]),V=r.useCallbackRef((u,T,E=!1,b)=>P(u,L=>{const v=L.getSelectedRanges();E&&v.updateStyle(null,b),v.updateStyle(T,b),v.autoFit({expandOnly:s.IRange.Orientation.Column,minContent:!0,skipCustomSize:!0})}),[t]),$=r.useCallbackRef((u,T,E)=>{P(u,b=>{let L=T;(E||T?.address)&&(L=L??{},!E&&T?.address?.startsWith("#")?E=T?.address.substring(1):E&&(L.displayText=E)),b.getSelectedRange().setHyperlink(L)})},[t]),te=r.useCallbackRef((u,T)=>{P(u,E=>{E.getSelectedRange().setComments(T)})},[t]),N=r.useCallbackRef((u,T)=>{P(u,E=>{E.getSelectedRanges().clear(T)})},[t]),x=r.useCallbackRef(async(u,T,E=!1,b=!1)=>P(u,async L=>{let v=L.getSelectedRanges();E&&(T===s.IRange.Orientation.Row?v=v.getEntireRows(b):T===s.IRange.Orientation.Column&&(v=v.getEntireColumns(b)));let U=null;const Z=w.getMode()?.key;if(Z==="copy"||Z==="cut"){const ee=await M.getClipboard().readReference();ee&&ee.getItemType()==="range"&&(U=ee.getItem(),U.getCoords()||(U=null))}if(U){const ee=await v.insertFrom(U,{...U.getMarkOptions(),orientation:T,autoSelect:!0});!ee||ee.isEntireRows()||ee.isEntireColumns()||ee.autoFit({orientations:s.IRange.Orientations.Row,minContent:!0}),w.setMode(null)}else v.insert(T,{autoSelect:!0})},"Insert Cells",!1),[w]),[H,re]=o.useState(null),ye=r.useCallbackRef(u=>t.getStyles().setDefaultTableStyle(u),[t]),ne=r.useCallbackRef(u=>{t.getStyles().getTableStyle(u)?.delete()},[t]),X=r.useCallbackRef((u,T)=>{P(u,async E=>{const b=E.getSelectedRange(),L=E.getSelectedCell().getCoords();let v=null,U=0;const Z=L.rowIndex>0?E.getRange({rowIndex:L.rowIndex,colIndex:L.colIndex}).getExtended(s.IRange.Direction.Up):null;Z&&E.getRange({colStart:L.colIndex,rowStart:Z.getCoords().rowStart,colEnd:L.colIndex,rowEnd:Z.getCoords().rowStart}).isContentful()&&(v=s.IRange.Direction.Up,U=L.rowIndex-Z.getCoords().rowEnd);const ee=L.colIndex>0?E.getRange({rowIndex:L.rowIndex,colIndex:L.colIndex-1}).getExtended(s.IRange.Direction.Left):null;if(ee&&E.getRange({colStart:ee.getCoords().colStart,rowStart:L.rowIndex,colEnd:ee.getCoords().colStart,rowEnd:L.rowIndex}).isContentful()){const ie=L.colIndex-ee.getCoords().colEnd;(ie<U||!v)&&(v=s.IRange.Direction.Left,U=ie)}let le=null;if(v===s.IRange.Direction.Up){if(le={...Z.getCoords()},(le.rowEnd===L.rowIndex||!E.getRange({colIndex:L.colIndex,rowIndex:L.rowIndex-1}).isContentful())&&le.rowStart>0&&E.getRange({colIndex:L.colIndex,rowIndex:le.rowStart-1}).isContentful()){const ie=Z.getExtended(s.IRange.Direction.Up);le={colStart:L.colIndex,rowStart:ie.getCoords().rowStart,colEnd:L.colIndex,rowEnd:Z.getCoords().rowEnd}}le.rowEnd=L.rowIndex-1}else if(v===s.IRange.Direction.Left){if(le={...ee.getCoords()},(le.colEnd===L.colIndex||!E.getRange({colIndex:L.colIndex-1,rowIndex:L.rowIndex}).isContentful())&&le.colStart>0&&E.getRange({colIndex:le.colStart-1,rowIndex:L.rowIndex}).isContentful()){const ie=ee.getExtended(s.IRange.Direction.Left);le={colStart:ie.getCoords().colStart,rowStart:L.rowIndex,colEnd:ie.getCoords().colEnd,rowEnd:L.rowIndex}}le.colEnd=L.colIndex-1}if(b.size!==1&&v){const ie=b.getCoords(),se=b.startIncrementalUpdates({orientation:s.IRange.Orientation.Column}),Ce={...le},he=ie.rowStart,me=ie.rowEnd,xe=ie.colStart,Le=ie.colEnd,De=v===s.IRange.Direction.Up;for(let We=xe;We<=Le;We++){Ce.colStart=De?We:le.colStart+(We-xe),Ce.colEnd=De?We:le.colEnd+(We-xe);for(let je=he;je<=me;je++){Ce.rowStart=De?le.rowStart+(je-he):je,Ce.rowEnd=De?le.rowEnd+(je-he):je;const Ge=E.getRange(Ce).toString();se.pushAt(je,We,`=${T}(${Ge})`)}}se.apply()}else{const ie=le?E.getRange(le).toString():"",se=`=${T}(`;S?.({text:`${se}${ie})`,editMode:!0,initialSelection:{start:se.length,end:se.length+ie.length}})}},!1)},[t]),ae=r.useCallbackRef((u,T,E=!1,b=!0)=>{P(u,async L=>{let v=null;if(H)return void H.updateStyleOptions(T);{const ee=L.getSelectedRanges().getFixed(!0),le=L.getSelectedRange().getDefaultSortCriteria();let ie={ranges:ee,hasHeader:le?.options?.hasHeader??!1};v=b?new Promise((se,Ce)=>{const he={tableOptions:ie,onCancel:()=>{Ce()},onDone:me=>{se(me)},context:{getNames:()=>L.getNames()}};d.showWindow?.("tableNew",he)}):{option:"Ok",tableOptions:ie}}const U=await Promise.resolve(v);if(U?.option!=="Ok")throw null;const Z=await Promise.resolve(d?.showBusy?.(u.label()));try{await L.getTables().add(U.tableOptions.ranges.at(0),{styleName:T?.name,clearFormatting:E,hasHeader:U.tableOptions.hasHeader}).getRange().select()}catch(ee){Z(),d?.showError?.(ee)}Z()},!1,!0,!1)},[H]),Me=r.useCallbackRef(()=>i,[i]),Te=r.useCallbackRef(u=>({styles:()=>t.getStyles(),table:()=>u,bodyStyle:Me,getNames:()=>t.getNames()}),[t]),fe=r.useCallbackRef(async(u,T,E,b=!0)=>{let L=null;if(!T){let v=t.getSelectedRange();v.size===1&&(v=v.getSurrounding());let U=t.getTables().search({address:t.getSelectedRange()});U.length>0&&(T=U[0]),await v.select()}if(T){if(b){try{E&&await T.select()}catch{}L=new Promise(async(v,U)=>{u.update({context:Te(T)});const Z={command:u,commands:C,notifier:d,onDone:le=>{v(le)}},ee=await d.showWindow?.("tableDetails",Z,{disableAutoDestroy:!0});setTimeout(()=>{ee.focus()},180)})}Promise.resolve(L).then(v=>{},v=>{d?.showError?.(v)})}},[d]),Be=r.useCallbackRef(async(u,T,E=!1)=>{let b=null;if(T)T.isITable?b=T:T.getValue()&&(b=T.getValue());else{const L=t.getTables().search({address:t.getSelectedRange()});L.length>0&&(b=L[0])}if(b){if(!E){const L=b.getRange().getCoords(),v=(L.colEnd-L.colStart+1)*(L.rowEnd-L.rowStart+1);if(v>1e4&&await d?.showOptions({title:"Confirm",description:`Converting a table to range with '${v}' cells will set a large number of cell styles and may affect performance.
|
|
10
|
+
Continue?`,options:["Convert","Cancel"],defaultOption:"Convert"})!=="Convert")return}P(u,async()=>{E?b.delete():b.convertToRange()},!1,!0)}},[d]),pe=r.useCallbackRef((u,T,E)=>{P(u,async b=>{let L=b.getSelectedRanges();if(L.getCount()>1)throw new Error("Can not sort on multiple cell ranges. Please select a single range and try again.");let v=L.at(0);v.size===1&&(v=v.getSurrounding());const U=b.getSelection().getCoords().cell;let Z=v.getDefaultSortCriteria(s.IRange.Orientation.Row,U);if(!Z){if(E)throw new Error("Invalid sort selection. Sort requires a single range with data.");return}let ee=Z.options;if(E&&(ee=new Promise((ie,se)=>{const Ce={range:v,options:Z.options,cell:U,onCancel:()=>{se()},onDone:he=>{he?ie(he.options):se()}};d.showWindow?.("sort",Ce)})),ee=await Promise.resolve(ee),!ee)return;const le=await Promise.resolve(d?.showBusy?.(u.label()));try{v.doBatch(()=>{const ie={...ee,...T};v.sort(ie),v.autoFit({orientations:ie?.orientation===s.IRange.Orientation.Column?s.IRange.Orientations.Column:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},u?.label?.())}catch(ie){le(),d?.showError?.(ie)}le()},!1,!1,!1)},[d]),Pe=r.useCallbackRef(()=>{console.log("compactedSelection");const u=t.getSelection().getCoords(),T=t.getSelectedRanges().getFlattened().getCoords(),E=(v=>{const U=new Blob([v],{type:"application/javascript"}),Z=URL.createObjectURL(U),ee=new Worker(Z);return URL.revokeObjectURL(Z),ee})("console.log('hello from worker');");setTimeout(()=>{E.terminate(),console.log("Worker terminated")},5e3);let b=-1;for(let v=0;b===-1&&v<T.length;v++)ue.CoordUtils.isCellWithinRange(u.cell,T[v])&&(b=v);if(ue.CoordUtils.isEqualRangesArrays(u.ranges,T))return;const L={cell:u.cell,ranges:T,rangeIndex:b};t.getSelection().updateCoords(L)},[t]),Se=r.useCallbackRef(()=>{console.log("selectComments")},[t]),ge=r.useCallbackRef(async(u=!1,T=!1)=>{let E=null;if(T)E=t.getEntireRange();else{const b=t.getSelectedRange();if(b.isEntireRange()){const L=t.getSelection().getCoords().cell,v=t.getRange(L);E=v.getSurrounding(),E.isEntireRange()&&(E=v)}else E=b.getSurrounding({contentOnly:u})}E&&await E.select()},[t]),ce=r.useCallbackRef((u,T,E)=>{P(u,async b=>{let L=b.getSelectedRanges();E&&(T===s.IRange.Orientation.Row?L=L.getEntireRows():T===s.IRange.Orientation.Column&&(L=L.getEntireColumns())),L.delete(T)},"Delete Cells")},[t]);r.useCallbackRef(async u=>{let T=null;const E=D(),b=Math.min(E.width-8,480),L=Math.min(E.height-8,288);try{t.getSelectedRanges(),T=await t.getMovables().add({bounds:{x:E.left+(E.width-b)/2,y:E.top+(E.height-L)/2,width:b,height:L},type:"chart",json:u.template}),T.select(),w.setMode(null)}catch(v){d?.showError?.(v)}return T},[t,d]);const we=r.useCallbackRef(async(u,T,E)=>{const b=await d?.showBusy?.(u.label());try{const L=await t.getMovables().addImage(T,{autoSelect:!0,...E});return b(),w.setMode(null),L}catch(L){b();let v=L;typeof v!="string"&&(console.warn(L),v="Unable to resolve image."),d?.showMessage?.(v,{type:r.NotificationType.Error})}},[t,d]),de=r.useCallbackRef((u,T)=>{P(u,async E=>{const b=E.getSelectedRanges();b.doBatch(()=>{const L=T===s.IRange.Direction.Up||T===s.IRange.Direction.Down,v=b.getCoords().slice().sort(ue.CoordUtils.createRangeComparator(L?s.IRange.Orientation.Row:s.IRange.Orientation.Column));for(let U=0;U<v.length;U++){const Z=v[U];let ee=Z;const le=E.getRange(ee).getMerges();let ie=0,se=0;if(le.length>0){const Ce=le[0];ie=Ce.rowEnd-Ce.rowStart,se=Ce.colEnd-Ce.colStart}T===s.IRange.Direction.Left?ee={...Z,colStart:Z.colEnd+se}:T===s.IRange.Direction.Right?ee={...Z,colEnd:Z.colStart+se}:T===s.IRange.Direction.Up?ee={...Z,rowStart:Z.rowEnd+ie}:T===s.IRange.Direction.Down&&(ee={...Z,rowEnd:Z.rowStart+ie}),E.getRange(ee).autoFill(Z,{filler:s.AutoFill.Types.Copy}),E.getRange(Z).autoFit({orientations:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:u.label()})})},[d]),be=r.useCallbackRef(()=>{let u=null;const T=t.getSelectedCell().getCoords();if(T?.rowIndex>0){const E=t.getRange({rowIndex:T.rowIndex-1,colIndex:T.colIndex}).getCell();E&&(u=E.toTextUnformatted(!0))}S?.({text:u})},[t]),[Fe,ve]=o.useReducer(u=>u+1,0),[Ee,Oe]=o.useReducer(u=>u+1,0),He=o.useMemo(()=>[new r.Command("gridlinesToggle",l,{label:"Gridlines",scopedLabels:{view:"Gridlines"},description:"Toggle whether the lines between rows and columns in the sheet are displayed."}),new r.Command("sheetViewToggleGridlinesRows",l,{label:"Row Gridlines",scopedLabels:{view:"Row Gridlines",gridlines:"Rows"},description:"Toggle whether the lines between rows in the sheet are displayed."}),new r.Command("sheetViewToggleGridlinesColumns",l,{label:"Column Gridlines",scopedLabels:{view:"Columns Gridlines",gridlines:"Columns"},description:"Toggle whether the lines between columns in the sheet are displayed."}),new r.Command("sheetViewFormatGridlinesColor",l,{label:"Gridlines Color",description:"Color the rows and column gridlines."}),new r.Command("sheetViewToggleShowHeadings",l,{label:"Headings",scopedLabels:{view:"Headings"},description:"Toggle whether the row and column headings are displayed."}),new r.Command("sheetViewToggleShowHeadingRows",l,{label:"Row Headings",scopedLabels:{view:"Row Headings",headings:"Rows"},description:"Toggle whether the row headings are displayed."}),new r.Command("sheetViewToggleShowHeadingColumns",l,{label:"Column Headings",scopedLabels:{view:"Columns Headings",headings:"Columns"},description:"Toggle whether the column headings are displayed."}),new r.Command("sheetViewToggleShowHeadingsNumeric",l,{label:"Numeric Headers",description:"Toggle whether cell headings show numbers or A1 conventions.",shortcut:{key:"h",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("sheetViewToggleFormulaView",l,{label:"Show Formulas",description:"Toggle whether cells show formula or values.",shortcut:[{key:"`",modifiers:[r.KeyModifiers.Ctrl]},{key:"`",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]}),new r.Command("sheetViewToggleShowZeros",l,{label:"Show Zeros",description:"Toggle whether cell with zero value shows '0' or blank."}),new r.SimpleCommand("selectComments",l,{label:"Select Comments",description:"Select the cells with comments.",shortcut:{key:"O",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>Se()),new r.Command("selectAll",l,{label:"Select All",description:"Select the closest data or the entire sheet if no data is nearby.",shortcut:[{key:"A",modifiers:[r.KeyModifiers.Ctrl]},{key:"Space",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},(u=!1)=>ge(!1,u)),new r.SimpleCommand("selectRegion",l,{label:"Select Region",description:"Select the closest data.",shortcut:{key:"*",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>ge(!0,!1)),new r.SimpleCommand("breakSelection",l,{label:"Select Visible",description:"Break the selection based on hidden rows and columns.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}},()=>Pe()),new r.SimpleCommand("formatTextRotate0",l,{label:"No Text Rotation",description:"Remove all text rotation."}),new r.SimpleCommand("formatTextRotate45",l,{label:"Angle Clockwise",description:"Angle text 45 degrees downward."}),new r.SimpleCommand("formatTextRotate90",l,{label:"Rotate Text Down",description:"Angle your text so that it aligns with the left."}),new r.SimpleCommand("formatTextRotate270",l,{label:"Rotate Text Up",description:"Angle your text so that it aligns with the right."}),new r.SimpleCommand("formatTextRotate315",l,{label:"Angle Counterclockwise",description:"Angle text 45 degrees upward."}),new r.Command("formatTextRotateCustom",l,{label:"Custom Text Rotation",description:"Angle your text using a custom angle."}),new r.SimpleCommand("formatTextRotateVertical",l,{label:"Vertical Text",description:"Stack text vertically."}),new r.SimpleCommand("sortAscending",l,{label:"Sort Ascending",scopedLabels:{sort:"Ascending"},description:"Lowest to Highest."},function(){pe(this,{reverse:!1},!1)}),new r.SimpleCommand("sortDescending",l,{label:"Sort Descending",scopedLabels:{sort:"Descending"},description:"Highest to Lowest."},function(){pe(this,{reverse:!0},!1)}),new r.SimpleCommand("sortCustom",l,{label:"Custom Sort…",scopedLabels:{sort:"Custom…"},description:"Choose more options, such as sorting by multiple columns or rows, and case-sensitive sorts."},function(){pe(this,{},!0)}),new r.Command("protectionSheetToggle",l,{label:"Protect Sheet",scopedLabels:{sheet:"Protected"},description:`Prevent unwanted changes from others by limiting their ability to edit.
|
|
11
|
+
For example, you can prevent people from editing locked cells or making formatting changes.`}),new r.Command("formatSheetTabColor",l,{label:"Tab Color",description:"Color the tab to help differentiate for other sheets."}),new r.Command("formatCellStyle",l,{label:"Cell Styles",scopedLabels:{cellStyle:"Apply"},description:"A colorful style is a great way to make important data stand out on the sheet."},function(u){V(this,{named:u.getName()},!0)}),new r.Command("formatTableStyle",l,{label:"Format as Table",scopedLabels:{table:"Apply (Keep Styles)"},description:"Create a table or apply style to the current table."},function(u){ae(this,u)}),new r.Command("formatTableStyleClearCellStyles",l,{label:"Format as Table (Clear Styles)",scopedLabels:{table:"Apply (Clear Styles)"},description:"Create a table or apply style to the current table and clears all cell styles."},function(u){ae(this,u,!0)}),new r.Command("formatTableStyleClearTableStyle",l,{label:"Clear Table Style",scopedLabels:{table:"Clear Style"},description:"Remove all the styling that is specific for the table."},function(){ae(this,{name:null},!0)}),new r.Command("setDefaultTableStyle",l,{label:"Set Default Table Style",scopedLabels:{table:"Set As Default"},description:"Sets the default table style used when a table is inserted."},ye),new r.Command("deleteTableStyle",l,{label:"Delete Table Style",scopedLabels:{table:"Delete"},description:"Remove the current table style."},ne),new r.Command("formatBorder",l,{label:"Border",description:"Create an outline border."},function(u){V(this,{border:u})}),new r.Command("formatFillColor",l,{label:"Fill Color",description:"Color the background of the cells to make them stand out."},function(u){V(this,{fill:u})}),new r.Command("formatFontColor",l,{label:"Font Color",description:"Change the color of your text."},function(u){V(this,{font:{fill:u}})}),new r.Command("formatBoldToggle",l,{label:"Bold",description:"Toggle bold formatting of text.",shortcut:[{key:"B",modifiers:[r.KeyModifiers.Ctrl]},{key:"2",modifiers:[r.KeyModifiers.Ctrl]}]}),new r.Command("formatItalicToggle",l,{label:"Italic",description:"Toggle italic formatting of text.",shortcut:[{key:"I",modifiers:[r.KeyModifiers.Ctrl]},{key:"3",modifiers:[r.KeyModifiers.Ctrl]}]}),new r.Command("formatUnderlinedToggle",l,{label:"Underline",scopedLabels:{underline:"Single"},description:"Underline the text.",shortcut:[{key:"u",modifiers:[r.KeyModifiers.Ctrl]},{key:"4",modifiers:[r.KeyModifiers.Ctrl]}]}),new r.Command("formatUnderlinedDoubleToggle",l,{label:"Double Underline",scopedLabels:{underline:"Double"},description:"Double underline the text."}),new r.Command("formatUnderlinedAccountingToggle",l,{label:"Accounting Underline",scopedLabels:{underline:"Accounting"},description:"Use accounting underline for the text."}),new r.Command("formatUnderlinedAccountingDoubleToggle",l,{label:"Double Accounting Underline",scopedLabels:{underline:"Double Accounting"},description:"Use accounting double underline the text."}),new r.Command("formatStrikeThroughToggle",l,{label:"Strikethrough",description:"Toggle strike-through formatting of text.",shortcut:{key:"5",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("formatSuperscriptToggle",l,{label:"Superscript",description:"Format your text to be smaller and sit at the top of the line."}),new r.Command("formatSubscriptToggle",l,{label:"Subscript",description:"Format your text to be smaller and sit at the bottom of the line."}),new r.Command("formatAlignTopToggle",l,{label:"Align Top",description:"Align text to the top."}),new r.Command("formatTextOverflowVisibleToggle",l,{label:"Overflow Text",description:"Overflow text to the next cells."}),new r.Command("formatTextOverflowWrapToggle",l,{label:"Wrap Text",description:"Wrap text with the existing cell and increase the height as required."}),new r.Command("formatTextOverflowClipToggle",l,{label:"Clip Text",description:"Clip text that falls outside of the existing cell."}),new r.Command("formatTextOverflowShrinkToggle",l,{label:"Shrink Text",description:"Shrink the text font to fit within existing cell."}),new r.Command("formatTextOverflowEllipsisToggle",l,{label:"Ellipsis Text",description:"Add a trailing '…' to the text to indicate text is partially hidden."}),new r.Command("formatAlignMiddleToggle",l,{label:"Align Middle",description:"Align text so that it is centered between the top and bottom of the cell."}),new r.Command("formatAlignBottomToggle",l,{label:"Align Bottom",description:"Align text to the bottom."}),new r.Command("formatAlignJustifyVerticalToggle",l,{label:"Justify Vertically",description:"Each 'word' in each line of text inside the cell is evenly distributed across the height of the cell."}),new r.Command("formatAlignDistributedVerticalToggle",l,{label:"Distribute Vertically",description:"Justify your content vertically."}),new r.Command("formatAlignLeftToggle",l,{label:"Align Left",description:"Align your content to the left."}),new r.Command("formatAlignCenterToggle",l,{label:"Align Center",description:"Center your content."}),new r.Command("formatAlignRightToggle",l,{label:"Align Right",description:"Align your content to the right."}),new r.Command("formatAlignJustifyToggle",l,{label:"Align Justify",description:"Justify your content."}),new r.Command("formatAlignCenterContinuousToggle",l,{label:"Center Across",description:"Center your content across multiple cells."}),new r.Command("formatAlignFillToggle",l,{label:"Fill Across",description:"Repeat the value to fill the entire cell."}),new r.Command("formatAlignDistributedHorizontalToggle",l,{label:"Distribute Horizontally",description:"Each 'word' in each line of text inside the cell is evenly distributed across the width of the cell."}),new r.SimpleCommand("formatFontSizeIncrease",l,{label:"Increase Font Size",description:"Make your text a bit bigger.",shortcut:{key:">",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,u=>({font:{size:ao(u.getFont().getSize(),!0)}}))}),new r.SimpleCommand("formatFontSizeDecrease",l,{label:"Decrease Font Size",description:"Make your text a bit smaller.",shortcut:{key:"<",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,u=>({font:{size:ao(u.getFont().getSize(),!1)}}))}),new r.Command("formatFontFamily",l,{label:"Font",description:"Select the font your text."},function(u){V(this,{font:{family:u}})}),new r.Command("formatFontSize",l,{label:"Font Size",description:"Change the size of your text."},function(u){V(this,{font:{size:u}})}),new r.Command("formatNumberDialog",l,{label:"Custom Number Format",scopedLabels:{numberFormat:"Custom"},description:"Create a custom number format.",shortcut:[{key:"1",modifiers:[r.KeyModifiers.Ctrl]},{key:"1",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]},function(u,T){const E=this,b={initialValue:u??T.state(),context:T.context(),onInputOption:(L,v)=>{V(E,{numberFormat:L})}};d.showWindow?.("numberFormat",b)}),new r.Command("formatNumberFormat",l,{label:"Number Format",description:"Choose the format for your cells, such as percentage, currency, date or time."},function(u){V(this,{numberFormat:u})}),new r.Command("formatNumberFormatGeneralStyle",l,{label:"General Style",description:"Remove all specific formatting.",shortcut:{key:"Backquote",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,{numberFormat:s.NumberFormat.Type.General})}),new r.Command("formatNumberFormatNumberStyle",l,{label:"Number Style",description:"Format as number with two decimals and comma.",shortcut:{key:"1",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,{numberFormat:"#,##0.00"})}),new r.Command("formatNumberFormatTimeStyle",l,{label:"Time Style",description:"Format as time with hour and minute, and AM or PM.",shortcut:{key:"2",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,{numberFormat:"h:mm AM/PM"})}),new r.Command("formatNumberFormatDateStyle",l,{label:"Date Style",description:"Format as date with day, month, and year.",shortcut:{key:"3",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,{numberFormat:"d-mmm-yy"})}),new r.Command("formatNumberFormatAccountingStyle",l,{label:"Accounting Style",description:"Format as Dollars, Euros, or other currency.",shortcut:{key:"4",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(u){V(this,{numberFormat:u??'_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)'})}),new r.Command("formatNumberFormatPercentStyle",l,{label:"Percent Style",description:"Format as a percent with no decimal places.",shortcut:{key:"5",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,{numberFormat:"0%"})}),new r.Command("formatNumberFormatScientificStyle",l,{label:"Scientific Style",description:"Format as a scientific number with two decimal places .",shortcut:{key:"6",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){V(this,{numberFormat:"0.00E+00"})}),new r.Command("formatNumberFormatCommaStyle",l,{label:"Comma Style",description:"Format with a thousands separator.",shortcut:{key:",",modifiers:[r.KeyModifiers.Ctrl]}},function(){V(this,{numberFormat:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)'})}),new r.Command("formatNumberFormatIncreaseDecimal",l,{label:"Increase Decimal",description:"Show more decimal places for a more precise value."},function(){V(this,u=>({numberFormat:s.NumberFormat.Parser.adjustDecimalPlaces(u.getNumberFormat(),1)}))}),new r.Command("formatNumberFormatDecreaseDecimal",l,{label:"Decrease Decimal",description:"Show few decimal places."},function(){V(this,u=>({numberFormat:s.NumberFormat.Parser.adjustDecimalPlaces(u.getNumberFormat(),-1)}))}),new r.Command("displayPlaceholdersToggle",l,{label:"Display Placeholders",description:"Switch between hiding objects, displaying objects, and displaying placeholders for objects.",shortcut:{key:"6",modifiers:[r.KeyModifiers.Ctrl]}}),new r.SimpleCommand("noOp",l,{label:"Do nothing",description:"Do Nothing.",shortcut:{key:"7",modifiers:[r.KeyModifiers.Ctrl]}},function(){}),new r.Command("displayOutlineSymbolsToggle",l,{label:"Display Outline Symbols",description:"Display or hide the outline symbols.",shortcut:{key:"8",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("hideRows",l,{label:"Hide Rows",description:"Hide the rows.",shortcut:{key:"9",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("unhideRows",l,{label:"Unhide Rows",description:"Unhide the rows.",shortcut:{key:"(",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("hideColumns",l,{label:"Hide Columns",description:"Hide the columns.",shortcut:[{key:"0",modifiers:[r.KeyModifiers.Ctrl]},{key:"0",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]}),new r.Command("unhideColumns",l,{label:"Unhide Columns",description:"Unhide the columns.",shortcut:{key:")",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("quickFormulaSum",l,{label:"Quick Sum",scopedLabels:{quickFormula:"Sum"},description:"Quick sum of the cells.",shortcut:{key:"=",modifiers:[r.KeyModifiers.Alt]}},function(){X(this,"SUM")}),new r.Command("quickFormulaAverage",l,{label:"Quick Average",scopedLabels:{quickFormula:"Average"},description:"Quick average of the cells."},function(){X(this,"AVERAGE")}),new r.Command("quickFormulaCount",l,{label:"Quick Count",scopedLabels:{quickFormula:"Count Numbers"},description:"Quick count of the cells."},function(){X(this,"COUNT")}),new r.Command("quickFormulaMax",l,{label:"Quick Max",scopedLabels:{quickFormula:"Max"},description:"Quick maximum of the cells."},function(){X(this,"MAX")}),new r.Command("quickFormulaMin",l,{label:"Quick Min",scopedLabels:{quickFormula:"Min"},description:"Quick minimum of the cells."},function(){X(this,"MIN")}),new r.Command("startEditCurrentTime",l,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){S?.({text:t.createTemporaryCell({value:cn(),style:{numberFormat:"Medium Time"}}).toText()})}),new r.Command("startEditCurrentDate",l,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl]}},function(){S?.({text:t.createTemporaryCell({value:cn(),style:{numberFormat:"Short Date"}}).toText()})}),new r.SimpleCommand("sheetZoomOut",l,{label:"Zoom Out",description:"Zoom out to see less detail but more area.",shortcut:[{key:"-",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]},{key:"NumpadSubtract",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]}),new r.SimpleCommand("sheetZoomIn",l,{label:"Zoom In",description:"Zoom in to see more detail but less area.",shortcut:[{key:"=",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]},{key:"NumpadAdd",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]}),new r.SimpleCommand("sheetZoom100",l,{label:"Zoom 100%",description:"Zoom document to 100%.",shortcut:{key:"o",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}}),new r.Command("insertFunction",l,{label:"Insert Function",disabled:!0,scopedLabels:{insert:"Function",quickFormula:"More Functions..."},description:"Work with the formula in the current cell.",shortcut:{key:"F3",modifiers:[r.KeyModifiers.Shift]}},function(u,T){console.log("insertFunction")}),new r.Command("updateHyperlink",l,{label:"Link",scopedLabels:{contextMenu:"Insert Link…",insert:"Link…",hyperlink:"Edit"},description:"Create a hyperlink to either another webpage or another location within this document.",context:()=>G,shortcut:[{key:"K",modifiers:[r.KeyModifiers.Ctrl]},{key:"K",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]},async function(u,T){const E=this,b={context:T.context(),onUpdateHyperlink:(L,v)=>{$(E,L,v)}};d.showWindow?.("hyperlink",b)}),new r.Command("openHyperlink",l,{label:"Open Link",scopedLabels:{hyperlink:"Open"},shortcut:{key:"Enter",modifiers:[r.KeyModifiers.Ctrl]},description:"Open the hyperlink or goto another location within this document.",context:()=>G},async(u,T)=>{const E=T.context()();if(!E)return;const b=E.getHyperlink();if(b)try{await b.open()}catch(L){d?.showError?.(L)}}),new r.Command("deleteHyperlink",l,{label:"Delete Link",scopedLabels:{hyperlink:"Delete"},description:"Remove the hyperlink.",context:()=>G},function(u,T){$(this,null,null)}),new r.SimpleCommand("insertNote",l,{label:"Insert Note",scopedLabels:{contextMenu:"Insert Note…",insert:"Note"},shortcut:{key:"F2",modifiers:[r.KeyModifiers.Shift]},description:"Add a note to the cell."},(u,T)=>{((E,b)=>{E?.showMessage?.(c.jsxs("p",{style:{marginTop:"0px",marginBottom:"0px"},children:[b," is not yet implemented.",c.jsx("br",{}),c.jsx("br",{}),"Please see the ",c.jsx("a",{style:{whiteSpace:"nowrap"},href:"https://www.sheetxl.com/docs/introduction/roadmap",target:"_blank",rel:"noopener",children:"SheetXL Roadmap"}),"."]}))})(d,T.label())}),new r.Command("updateComments",l,{label:"Comments",scopedLabels:{contextMenu:"Insert Comments…",insert:"Comments…"},shortcut:{key:"M",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]},description:"Add a comment to the current cell.",context:()=>G},async function(u,T){const E=this,b={context:T.context(),onUpdateComments:L=>{te(E,L)}};d.showWindow?.("comments",b)}),new r.Command("deleteComments",l,{label:"Delete Comments",description:"Remove any comments.",context:()=>G},function(u,T){te(this,null)}),new r.Command("insertImageFromFile",l,{label:"Insert Image",scopedLabels:{contextMenu:"Insert Image…",insert:"Image…",insertImage:"From Device…"},description:"Insert a picture from your device."},async function(u=null){let T=null,E=null;typeof u=="string"?E=u:T=u?.file?u.file:u,(T||(T=await ue.CommonUtils.openFileDialog(E??"image/*"),T))&&await we(this,{file:T},u?.options)}),new r.Command("insertImageFromURL",l,{label:"Insert Image From Web",scopedLabels:{insert:"Image From Web",insertImage:"From the Web…"},description:"Insert a picture from the web."},async function(u){if(!u){const T=await d?.showInputOptions?.({title:"Insert Image from Web",description:"Enter the web address for the image to insert.",inputLabel:"Address",initialValue:"https://picsum.photos/360",inputProps:{style:{minWidth:"440px"}},options:["Insert"]});if(T.option!=="Insert")return;u=T.input}u&&we(this,{fetch:u})}),new r.SimpleCommand("insertTable",l,{label:"Insert Table",scopedLabels:{contextMenu:"Insert Table…",insert:"Table"},description:"Create a table. Tables enable auto formatting, sorting, filtering, and other advanced features.",shortcut:[{key:"L",modifiers:[r.KeyModifiers.Ctrl]},{key:"T",modifiers:[r.KeyModifiers.Alt,r.KeyModifiers.Ctrl]}]},function(){ae(this)}),new r.Command("editTable",l,{label:"Edit Table…",scopedLabels:{table:"Edit…",namedItem:"Edit…"},description:"Edit the table to adjust formatting, sorting, filtering, or other advanced features."},function(u){let T=null,E=!1;u.isITable?T=u:u.getValue()&&(T=u.getValue(),E=!0),fe(this,T,E)}),new r.Command("deleteTable",l,{label:"Delete Table",scopedLabels:{delete:"Table",table:"Delete",namedItem:"Delete"},description:`Remove the table.
|
|
12
|
+
|
|
13
|
+
The table and table specific styling will be removed but the values will be preserved.`},function(u){Be(this,u,!0)}),new r.Command("convertTableToRange",l,{label:"Convert To Range",description:`Convert the table into a normal range of cells.
|
|
14
|
+
|
|
15
|
+
The values and the formatting are preserved.`},function(u){Be(this,u,!1)}),new r.Command("tableTotalRowToggle",l,{label:"Toggle Table Total Row",description:"Toggle Total Row on/off.",scopedLabels:{table:"Total Row"},shortcut:{key:"T",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}},function(){const u=this.context().table();u&&u.setShowTotals(!u.getShowTotals())}),new r.Command("tableHeaderRowToggle",l,{label:"Toggle Table Header Row",description:"Toggle Header Row on/off.",scopedLabels:{table:"Header Row"}},function(){const u=this.context().table();u&&u.setShowHeaders(!u.getShowHeaders())}),new r.Command("autoFilterToggle",l,{label:"Toggle Filter",scopedLabels:{filter:"Filter"},description:"Toggle Auto Filter on/off.",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){const u=this.context().table();u&&u.setShowFilterButton(!u.getShowFilterButton())}),new r.Command("autoFilterReapply",l,{label:"Reapply Filter",scopedLabels:{filter:"Reapply"},description:"Reapply the filter and sort with the latest changes.",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}}),new r.Command("autoFilterClear",l,{label:"Clear Filter",scopedLabels:{filter:"Clear"},description:"Clear the filters criteria from the current filter.."}),new r.SimpleCommand("startEditValueAbove",l,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:"Quote",modifiers:[r.KeyModifiers.Ctrl]},{key:'"',modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},be),new r.Command("formatPainterToggle",l,{label:"Format Painter",description:"Apply style to another part of your workbook."}),new r.SimpleCommand("insertCells",l,{label:"Insert Cells",scopedLabels:{insertCells:"At Selection"},description:"Inserts cells at the current selection.",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){x(this)}),new r.SimpleCommand("insertCellsShiftRight",l,{label:"Insert Cells (Shift Right)",scopedLabels:{insertCells:"Shift Right"},description:"Insert cells to the left and shift the current cells to the right."},function(){x(this,s.IRange.Orientation.Column)}),new r.SimpleCommand("insertCellsShiftDown",l,{label:"Insert Cells (Shift Down)",scopedLabels:{insertCells:"Shift Down"},description:"Insert cells above and shift the current cells downward."},function(){return x(this,s.IRange.Orientation.Row)}),new r.SimpleCommand("insertRows",l,{label:"Insert Row(s)",scopedLabels:{insertCells:"Row(s)"},description:"Insert a row above the current position."},function(){return x(this,s.IRange.Orientation.Row,!0)}),new r.SimpleCommand("insertColumns",l,{label:"Insert Column(s)",scopedLabels:{insertCells:"Column(s)"},description:"Insert a column before the current position."},function(){return x(this,s.IRange.Orientation.Column,!0)}),new r.SimpleCommand("insertRowsAfter",l,{label:"Insert Row Below",scopedLabels:{insertCells:"Row Below"},description:"Insert a row below the current position."},function(){return x(this,s.IRange.Orientation.Row,!0,!0)}),new r.SimpleCommand("insertColumnsAfter",l,{label:"Insert Column After",scopedLabels:{insertCells:"Column After"},description:"Insert a column after the current position."},function(){return x(this,s.IRange.Orientation.Column,!0,!0)}),new r.SimpleCommand("deleteCells",l,{label:"Delete Cells",scopedLabels:{deleteCells:"At Selection"},description:"Delete the cells.",shortcut:{key:"-",modifiers:[r.KeyModifiers.Ctrl]}},function(){return ce(this)}),new r.SimpleCommand("deleteCellsShiftUp",l,{label:"Delete Cells (Shift Up)",scopedLabels:{deleteCells:"Shift up"},description:"Delete cells the current current downward."},function(){return ce(this,s.IRange.Orientation.Row)}),new r.SimpleCommand("deleteCellsShiftLeft",l,{label:"Delete Cells (Shift Left)",scopedLabels:{deleteCells:"Shift Left"},description:"Delete cells the current cells to the right."},function(){return ce(this,s.IRange.Orientation.Column)}),new r.SimpleCommand("deleteRows",l,{label:"Delete Rows",scopedLabels:{deleteCells:"Rows"},description:"Delete the rows at the current selection."},function(){return ce(this,s.IRange.Orientation.Row,!0)}),new r.SimpleCommand("deleteColumns",l,{label:"Delete Columns",scopedLabels:{deleteCells:"Columns"},description:"Delete the columns at the current selection."},function(){return ce(this,s.IRange.Orientation.Column,!0)}),new r.SimpleCommand("flashFill",l,{label:"Flash Fill",description:"Do a flash fill.",shortcut:[{key:"e",modifiers:[r.KeyModifiers.Ctrl]},{key:"e",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]}),new r.SimpleCommand("fillDown",l,{label:"Fill Down",description:"Copy the top-most value from the selection to the bottom of the selection.",shortcut:{key:"d",modifiers:[r.KeyModifiers.Ctrl]}},function(){return de(this,s.IRange.Direction.Down)}),new r.SimpleCommand("fillRight",l,{label:"Fill Right",description:"Copy the left-most value from the selection to the right of the selection.",shortcut:[{key:"r",modifiers:[r.KeyModifiers.Ctrl]}]},function(){return de(this,s.IRange.Direction.Right)}),new r.SimpleCommand("fillUp",l,{label:"Fill Up",description:"Copy the bottom-most value from the selection to the top of the selection."},function(){return de(this,s.IRange.Direction.Up)}),new r.SimpleCommand("fillLeft",l,{label:"Fill Left",description:"Copy the right-most value from the selection to the left of the selection."},function(){return de(this,s.IRange.Direction.Left)}),new r.SimpleCommand("formatBorderAddOutline",l,{label:"Add Outline Border",description:"Apply an outline border.",shortcut:{key:"7",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){return V(this,{border:{left:{style:s.IBorder.StrokeStyle.Thin,color:null},top:{style:s.IBorder.StrokeStyle.Thin,color:null},right:{style:s.IBorder.StrokeStyle.Thin,color:null},bottom:{style:s.IBorder.StrokeStyle.Thin,color:null}}})}),new r.SimpleCommand("formatBorderClearOutline",l,{label:"Remove Outline Border",description:"Remove the outline border.",shortcut:{key:"_",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){return V(this,{border:null})}),new r.SimpleCommand("formatIndentDecrease",l,{label:"Decrease Indent",description:"Move your content closer to the border."},function(){return V(this,u=>{const T=u.getAlignment().getIndent()-1;return{alignment:{indent:T>0?T:0}}})}),new r.SimpleCommand("formatIndentIncrease",l,{label:"Increase Indent",description:"Move your content further from the border."},function(){return V(this,u=>{const T={alignment:{indent:u.getAlignment().getIndent()+1}};return u.getAlignment().getHorizontal()===s.ITextFrame.HorizontalAlignment.General&&(T.alignment.horizontal=s.ITextFrame.HorizontalAlignment.Left),T})}),new r.Command("mergeToggle",l,{label:"Merge",description:"Combine and center the contents into a single cell.",shortcut:{key:"m",modifiers:[r.KeyModifiers.Ctrl]}}),new r.SimpleCommand("mergeHorizontal",l,{label:"Merge Horizontally",description:"Combine the contents into horizontal rows."}),new r.SimpleCommand("mergeVertical",l,{label:"Merge Vertically",description:"Combine the contents into vertical columns."}),new r.SimpleCommand("unmerge",l,{label:"Unmerge",description:"Split merged cells into multiple cells."}),new r.SimpleCommand("clearContents",l,{label:"Clear Contents",scopedLabels:{clear:"Contents"},description:`Clear only the contents in the cells.
|
|
16
|
+
|
|
17
|
+
The formatting is not cleared.`,shortcut:{key:"Delete"}},function(){N(this,s.ICell.Content.Values)}),new r.SimpleCommand("clearFormats",l,{label:"Clear Formats",scopedLabels:{clear:"Formats"},description:"Clear only the formatting that is applied to the cells."},function(){N(this,s.ICell.Content.Formats)}),new r.SimpleCommand("clearHyperlinks",l,{label:"Clear Hyperlinks",scopedLabels:{clear:"Hyperlinks"},description:"Clear only the hyperlinks in the cells."},function(){N(this,s.ICell.Content.Hyperlinks)}),new r.SimpleCommand("clearComments",l,{label:"Clear Comments",scopedLabels:{clear:"Comments"},description:"Clear the comments from the cells."},function(){N(this,s.ICell.Content.Comments)}),new r.SimpleCommand("clearAll",l,{label:"Clear All",scopedLabels:{clear:"All"},description:`Clears everything from the cells.
|
|
18
|
+
|
|
19
|
+
All contents and formatting are removed.`,shortcut:{key:"Delete",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){N(this)}),new r.Command("freezeToggle",l,{label:"Freeze Panes",description:"Keep rows and columns visible while the rest of the sheet scrolls (based on current selection)."}),new r.Command("freezeToggleHorizontal",l,{label:"Freeze Top Rows",description:"Keep the top rows visible while scrolling through the rest of the sheet."}),new r.Command("freezeToggleVertical",l,{label:"Freeze Left Columns",description:"Keep the left columns visible while scrolling through the rest of the sheet."}),new r.SimpleCommand("unfreeze",l,{label:"Unfreeze Panes",description:"Unfreeze both the rows and columns."}),new r.SimpleCommand("autoFitRows",l,{label:"Autofit Rows",description:"Adjust the rows to the best height."}),new r.SimpleCommand("autoFitColumns",l,{label:"Autofit Columns",description:"Adjust the columns to the best width."})],[]),C=o.useMemo(()=>{let u=null;return u=a?a.createChildGroup(l,"sheet",!1):new r.CommandGroup(l,"sheet"),u.addCommands(He,!0),u},[a,He]),[Ue,Qe]=o.useState(!1),[$e,J]=o.useState(!1);o.useEffect(()=>{if(I.current!==t||!h)return;const u=h.getCoords(),T=t.getTables().search({address:u[0]});F(U=>ue.CommonUtils.isEqualArrays(U,T)?U:T),g&&T[0]&&ue.CoordUtils.isCellWithinRange(g,T[0].getRange().getCoords())?re(T[0]??null):re(null);const E=t.getSelectedRanges(),b=E.getMerges().length>0,L=E.isOverlapping();let v=!0;for(let U=0;v&&U<u.length;U++)v=ue.CoordUtils.isSingleCell(u[U]);J(L),Qe(T.length===0&&!L&&(b||!v))},[Ee,h,t]),r.useCommands(a,null,{onChange:()=>{const u=!t.getProtection().isFormatCellsAllowed(),T=w.getMode()?.key==="formatPainter";C.getCommand("formatPainterToggle").update({disabled:u||!a?.getCommand("copy"),state:()=>T}).updateCallback(()=>T?void w.setMode(null):C.getCommand("copy").execute({editMode:{key:"formatPainter",description:"Use the mouse to apply the copied format to another selection.",cursor:`url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='black' fill='white'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`}}))}},[w,Fe,a]),tt(t.getView(),{onFreezeSplitChange:()=>{Oe()}}),tt(t.getSelection(),{onChange:()=>{_()}});const Ie=()=>{C.getCommand("sheetViewFormatGridlinesColor").update({state:()=>t.getView().getGridLineColor(),context:()=>({onColorSelect:u=>{},darkMode:i.darkMode,autoColor:t.getStyles().parseColor(i.strokeFill),schemeLookup:t.getStyles().schemeLookup(),recentColors:()=>t.getStyles().recentColors(),addRecentColor:u=>t.getStyles().addRecentColor(u),clearRecentColors:()=>t.getStyles().clearRecentColors()})}),C.getCommand("formatSheetTabColor").updateCallback(u=>{t.setTabColor(u)}).update({state:()=>t?.getTabColor()??Rn,context:()=>({onColorSelect:u=>{},darkMode:i.darkMode,autoColor:Rn,schemeLookup:t.getStyles().schemeLookup(),recentColors:()=>t.getStyles().recentColors(),addRecentColor:u=>t.getStyles().addRecentColor(u),clearRecentColors:()=>t.getStyles().clearRecentColors()})})},Ve=()=>{C.getCommand("formatBorder").update({context:()=>({onBorderSelect:u=>{W(u)},darkMode:i.darkMode,quickBorder:z,autoColor:t.getStyles().getNormal().getFont().getFill(),autoStyle:s.IBorder.StrokeStyle.Thin,createTemporaryBorder:u=>t.getStyles().getNormal().createTemporaryStyle({border:u}).getBorder(),schemeLookup:t.getStyles().schemeLookup()})})};o.useEffect(()=>{Ve()},[z]),o.useEffect(()=>{const u=!t.getProtection().isInsertHyperlinksAllowed();C.getCommand("openHyperlink").update({disabled:!G().getHyperlink()}),C.getCommand("deleteHyperlink").update({disabled:u||!G().getHyperlink()});const T=G().getHyperlink()?"Edit":"Insert",E="Link";C.getCommand("updateHyperlink").update({label:()=>(G().getHyperlink(),`${T} ${E}`),scopedLabels:{contextMenu:`${T} ${E}…`,insert:`${E}…`,hyperlink:`${T}…`},disabled:u})},[G()?.getHyperlink(),Fe]),o.useEffect(()=>{const u=G().getComments(),T=()=>u?"Edit":"Insert",E=()=>u?"Comments":"Comment";C.getCommand("updateComments").update({label:()=>`${T()} ${E()}`,scopedLabels:{contextMenu:`${T()} ${E()}…`,insert:`${E()}…`}})},[G()?.getComments(),Fe]),tt(t,{onViewChange:()=>{const u=t.getView();C.getCommand("sheetViewToggleFormulaView").update({state:u.isShowFormulas()}),C.getCommand("sheetViewToggleShowZeros").update({state:u.isShowZeros()}),C.getCommand("gridlinesToggle").update({state:u.isShowColumnGridlines()||u.isShowRowGridlines()}),C.getCommand("sheetViewToggleGridlinesColumns").update({state:u.isShowColumnGridlines()}),C.getCommand("sheetViewToggleGridlinesRows").update({state:u.isShowRowGridlines()}),C.getCommand("sheetViewToggleShowHeadings").update({state:u.isShowColumnHeaders()||u.isShowRowHeaders()}),C.getCommand("sheetViewToggleShowHeadingColumns").update({state:u.isShowColumnHeaders()}),C.getCommand("sheetViewToggleShowHeadingRows").update({state:u.isShowRowHeaders()}),C.getCommand("sheetViewToggleShowHeadingsNumeric").update({state:()=>t.getView().getColumnHeaderStyle()===s.ISheetView.HeaderTextStyle.Zero&&t.getView().getRowHeaderStyle()===s.ISheetView.HeaderTextStyle.Zero}),Ie()},onTabColorChange:()=>{Ie()},onMergesChange:()=>{Oe()},onMovablesChange:()=>{Oe()},onTablesChange:()=>{Oe()},onProtectionChange:()=>{Oe(),ve()},onStyleChange:()=>{Ie(),Ve(),Oe()}}),o.useEffect(()=>{Ie(),Ve()},[i]),o.useEffect(()=>{const u=!t.getProtection().isFormatCellsAllowed(),T=O.length>0&&!H||u,E=Te(H),b={context:E};C.getCommand("editTable").update(b),C.getCommand("deleteTable").update(b),C.getCommand("convertTableToRange").update(b);const L={context:E,disabled:T};C.getCommand("formatTableStyle").update({label:H?"Apply Table Style":"Format As Table",...L}),C.getCommand("formatTableStyleClearCellStyles").update(L),C.getCommand("deleteTableStyle").update(L),C.getCommand("convertTableToRange").update(L),C.getCommand("insertTable").update({disabled:T||O.length>0});const v={context:E,disabled:T||O.length===0};C.getCommand("tableHeaderRowToggle").update(v),C.getCommand("tableTotalRowToggle").update(v),C.getCommand("autoFilterToggle").update(v),C.getCommand("formatTableStyleClearTableStyle").update({...v,disabled:v.disabled||!H||H.getStyleOptions().name===null})},[H,O,Fe]),o.useEffect(()=>{C.getCommand("sheetZoomOut").updateCallback(()=>{t.getView().update({zoomScale:ue.CommonUtils.findNextStep(t.getView().getZoomScale(),!1)})}),C.getCommand("sheetZoomIn").updateCallback(()=>{t.getView().update({zoomScale:ue.CommonUtils.findNextStep(t.getView().getZoomScale())})}),C.getCommand("sheetZoom100").updateCallback(()=>{t.getView().update({zoomScale:100})}),C.getCommand("gridlinesToggle").updateCallback(()=>{const u=t.getView().isShowColumnGridlines()&&t.getView().isShowRowGridlines();t.getView().update({showColumnGridlines:!u,showRowGridlines:!u})}),C.getCommand("sheetViewToggleGridlinesRows").updateCallback(()=>{t.getView().update({showRowGridlines:!t.getView().isShowRowGridlines()})}),C.getCommand("sheetViewToggleGridlinesColumns").updateCallback(()=>{t.getView().update({showColumnGridlines:!t.getView().isShowColumnGridlines()})}),C.getCommand("sheetViewFormatGridlinesColor").updateCallback(u=>{t.getView().update({gridLineColor:u})}),C.getCommand("sheetViewToggleShowHeadings").updateCallback(()=>{const u=t.getView().isShowColumnHeaders()&&t.getView().isShowRowHeaders();t.getView().update({showColumnHeaders:!u,showRowHeaders:!u})}),C.getCommand("sheetViewToggleShowHeadingColumns").updateCallback(()=>{t.getView().update({showColumnHeaders:!t.getView().isShowColumnHeaders()})}),C.getCommand("sheetViewToggleShowHeadingRows").updateCallback(()=>{t.getView().update({showRowHeaders:!t.getView().isShowRowHeaders()})}),C.getCommand("sheetViewToggleShowHeadingsNumeric").updateCallback(()=>{const u=t.getView().getColumnHeaderStyle()===s.ISheetView.HeaderTextStyle.Zero&&t.getView().getRowHeaderStyle()===s.ISheetView.HeaderTextStyle.Zero;t.getView().update({columnHeaderStyle:u?s.ISheetView.HeaderTextStyle.A1:s.ISheetView.HeaderTextStyle.Zero,rowHeaderStyle:u?s.ISheetView.HeaderTextStyle.One:s.ISheetView.HeaderTextStyle.Zero})}),C.getCommand("sheetViewToggleFormulaView").updateCallback(()=>{t.getView().update({showFormulas:!t.getView().isShowFormulas()})}),C.getCommand("sheetViewToggleShowZeros").updateCallback(()=>{t.getView().update({showZeros:!t.getView().isShowZeros()})})},[t]),o.useEffect(()=>{const u=t.getView().getFreezePanes(),T=()=>u.coords.rowIndex!==0,E=()=>u.coords.colIndex!==0,b=()=>u.coords.rowIndex!==0||u.coords.colIndex!==0;C.getCommand("freezeToggle").updateCallback(()=>{b()?t.getView().setFreezePanes(null):b()?E()?t.getView().setFreezePanes({coords:{rowIndex:g.rowIndex}}):T()&&t.getView().setFreezePanes({coords:{colIndex:g.colIndex}}):t.getView().setFreezePanes({coords:g})}).update({state:b,disabled:()=>!g||!b()&&g.rowIndex===0&&g.colIndex===0}),C.getCommand("freezeToggleHorizontal").updateCallback(()=>{t.getView().setFreezePanes({coords:{rowIndex:T()?0:g.rowIndex}})}).update({state:T,disabled:()=>!g||!T()&&g.rowIndex===0}),C.getCommand("freezeToggleVertical").updateCallback(()=>{t.getView().setFreezePanes({coords:{colIndex:E()?0:g.colIndex}})}).update({state:E,disabled:()=>!g||!E()&&g.colIndex===0}),C.getCommand("unfreeze").updateCallback(()=>{t.getView().setFreezePanes(null)}).update({disabled:()=>!b()})},[Ee,g,t,i]);const ke=G().getStyle(),ze=ke.getFont(),Ae=ke.getAlignment(),k=Ae.getHorizontal(),oe=Ae.getVertical(),j=Ae.getOverflow(),Y=Ae.getRotation();return o.useEffect(()=>{C.getCommand("formatCellStyle").update({context:()=>({styles:()=>t.getStyles(),named:()=>G().getStyle(!0).getNamed(),bodyStyle:Me,createTemporaryCell:Ne=>t.createTemporaryCell(Ne)})}),C.getCommand("formatFillColor").update({state:()=>{let Ne=null;const Xe=ke.getFill();return Xe?.getType()===s.IFill.Type.Solid?Ne=Xe.getColor():Xe?.getType()===s.IFill.Type.Gradient?Ne=Xe.getStops()?.[0]?.getColor():Xe?.getType()===s.IFill.Type.Pattern&&(Ne=Xe.getBackground()),Ne},context:()=>{const Ne=t.getStyles();return{onColorSelect:Xe=>{y(Xe??Rn)},darkMode:i.darkMode,quickColor:K,autoColor:Rn,schemeLookup:Ne.schemeLookup(),recentColors:Ne.recentColors(),addRecentColor:Xe=>Ne.addRecentColor(Xe),clearRecentColors:()=>Ne.clearRecentColors()}}}),C.getCommand("formatFontColor").update({state:()=>ze.toJSON()?.fill?ze.getFill():null,context:()=>{const Ne=t.getStyles();return{onColorSelect:Xe=>{R(Xe)},darkMode:i.darkMode,quickColor:B,autoColor:Ne.getNormal().getFont().getFill(),schemeLookup:Ne.schemeLookup(),recentColors:Ne.recentColors(),addRecentColor:Xe=>Ne.addRecentColor(Xe),clearRecentColors:()=>Ne.clearRecentColors()}}}),C.getCommand("formatNumberFormat").update({state:()=>ke.getNumberFormat(),context:()=>G}),C.getCommand("formatNumberDialog").update({state:()=>ke.getNumberFormat(),context:()=>G}),C.getCommand("formatFontFamily").update({state:()=>ze.getFamily()}),C.getCommand("formatFontSize").update({state:()=>ze.getSize()});const u=function(){const Ne=ze.getWeight()||0;return!isNaN(Ne)&&Ne>500};C.getCommand("formatBoldToggle").updateCallback(function(){V(this,{font:{weight:u()?400:700}})}).update({state:u});const T=function(){return ze.getStyle()===s.IFont.Style.Italic};C.getCommand("formatItalicToggle").updateCallback(function(){V(this,{font:{style:T()?s.IFont.Style.Normal:s.IFont.Style.Italic}})}).update({state:T}),C.getCommand("formatStrikeThroughToggle").updateCallback(function(){V(this,{font:{strike:!ze.getStrike()}})}).update({state:ze.getStrike()}),C.getCommand("formatUnderlinedToggle").updateCallback(function(){V(this,{font:{underline:ze.getUnderline()!==s.IFont.UnderlineStyle.Single?s.IFont.UnderlineStyle.Single:s.IFont.UnderlineStyle.None}})}).update({state:ze.getUnderline()===s.IFont.UnderlineStyle.Single}),C.getCommand("formatUnderlinedDoubleToggle").updateCallback(function(){V(this,{font:{underline:ze.getUnderline()!==s.IFont.UnderlineStyle.Double?s.IFont.UnderlineStyle.Double:s.IFont.UnderlineStyle.None}})}).update({state:ze.getUnderline()===s.IFont.UnderlineStyle.Double}),C.getCommand("formatUnderlinedAccountingToggle").updateCallback(function(){V(this,{font:{underline:ze.getUnderline()!==s.IFont.UnderlineStyle.SingleAccounting?s.IFont.UnderlineStyle.SingleAccounting:s.IFont.UnderlineStyle.None}})}).update({state:ze.getUnderline()===s.IFont.UnderlineStyle.SingleAccounting}),C.getCommand("formatUnderlinedAccountingDoubleToggle").updateCallback(function(){V(this,{font:{underline:ze.getUnderline()!==s.IFont.UnderlineStyle.DoubleAccounting?s.IFont.UnderlineStyle.DoubleAccounting:s.IFont.UnderlineStyle.None}})}).update({state:ze.getUnderline()===s.IFont.UnderlineStyle.DoubleAccounting}),C.getCommand("formatSuperscriptToggle").updateCallback(function(){V(this,{font:{verticalAlign:ze.getVerticalAlignment()!==s.IFont.VerticalAlignment.Super?s.IFont.VerticalAlignment.Super:s.IFont.VerticalAlignment.Baseline}})}).update({state:ze.getVerticalAlignment()===s.IFont.VerticalAlignment.Super}),C.getCommand("formatSubscriptToggle").updateCallback(function(){V(this,{font:{verticalAlign:ze.getVerticalAlignment()!==s.IFont.VerticalAlignment.Sub?s.IFont.VerticalAlignment.Sub:s.IFont.VerticalAlignment.Baseline}})}).update({state:ze.getVerticalAlignment()===s.IFont.VerticalAlignment.Sub});const E=()=>j===s.ITextFrame.Overflow.Visible;C.getCommand("formatTextOverflowVisibleToggle").updateCallback(function(){V(this,{alignment:{overflow:(E(),s.ITextFrame.Overflow.Visible)}})}).update({state:E});const b=()=>j===s.ITextFrame.Overflow.Wrap;C.getCommand("formatTextOverflowWrapToggle").updateCallback(function(){V(this,{alignment:{overflow:b()?s.ITextFrame.Overflow.Visible:s.ITextFrame.Overflow.Wrap}})}).update({state:b});const L=function(){return j===s.ITextFrame.Overflow.Clip};C.getCommand("formatTextOverflowClipToggle").updateCallback(function(){V(this,{alignment:{overflow:L()?s.ITextFrame.Overflow.Visible:s.ITextFrame.Overflow.Clip}})}).update({state:L});const v=function(){return j===s.ITextFrame.Overflow.Shrink};C.getCommand("formatTextOverflowShrinkToggle").updateCallback(function(){V(this,{alignment:{overflow:v()?s.ITextFrame.Overflow.Visible:s.ITextFrame.Overflow.Shrink}})}).update({state:v});const U=function(){return j===s.ITextFrame.Overflow.Shrink};C.getCommand("formatTextOverflowEllipsisToggle").updateCallback(function(){V(this,{alignment:{overflow:U()?s.ITextFrame.Overflow.Visible:s.ITextFrame.Overflow.Ellipsis}})}).update({state:U,disabled:!0});const Z=function(){return oe===s.ITextFrame.VerticalAlignment.Top};C.getCommand("formatAlignTopToggle").updateCallback(function(){V(this,{alignment:{vertical:Z()?s.ITextFrame.VerticalAlignment.Bottom:s.ITextFrame.VerticalAlignment.Top}})}).update({state:Z});const ee=function(){return oe===s.ITextFrame.VerticalAlignment.Center};C.getCommand("formatAlignMiddleToggle").updateCallback(function(){V(this,{alignment:{vertical:ee()?s.ITextFrame.VerticalAlignment.Bottom:s.ITextFrame.VerticalAlignment.Center}})}).update({state:ee});const le=function(){return oe===s.ITextFrame.VerticalAlignment.Bottom};C.getCommand("formatAlignBottomToggle").updateCallback(function(){V(this,{alignment:{vertical:(le(),s.ITextFrame.VerticalAlignment.Bottom)}})}).update({state:le});const ie=function(){return oe===s.ITextFrame.VerticalAlignment.Justify};C.getCommand("formatAlignJustifyVerticalToggle").updateCallback(function(){V(this,{alignment:{vertical:ie()?s.ITextFrame.VerticalAlignment.Bottom:s.ITextFrame.VerticalAlignment.Justify}})}).update({state:ie});const se=function(){return oe===s.ITextFrame.VerticalAlignment.Distributed};C.getCommand("formatAlignDistributedVerticalToggle").updateCallback(function(){V(this,{alignment:{vertical:se()?s.ITextFrame.VerticalAlignment.Bottom:s.ITextFrame.VerticalAlignment.Distributed}})}).update({state:se});const Ce=function(){return k===s.ITextFrame.HorizontalAlignment.Left};C.getCommand("formatAlignLeftToggle").updateCallback(function(){V(this,{alignment:{horizontal:Ce()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.Left}})}).update({state:Ce});const he=function(){return k===s.ITextFrame.HorizontalAlignment.Center};C.getCommand("formatAlignCenterToggle").updateCallback(function(){V(this,{alignment:{horizontal:he()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.Center}})}).update({state:he});const me=function(){return k===s.ITextFrame.HorizontalAlignment.CenterContinuous};C.getCommand("formatAlignCenterContinuousToggle").updateCallback(function(){const Ne={alignment:{horizontal:me()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.CenterContinuous,rotation:null}};V(this,Ne)}).update({state:me});const xe=function(){return k===s.ITextFrame.HorizontalAlignment.Fill};C.getCommand("formatAlignFillToggle").updateCallback(function(){const Ne={alignment:{horizontal:xe()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.Fill,rotation:null}};V(this,Ne)}).update({state:xe});const Le=function(){return k===s.ITextFrame.HorizontalAlignment.Distributed};C.getCommand("formatAlignDistributedHorizontalToggle").updateCallback(function(){V(this,{alignment:{horizontal:Le()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.Distributed}})}).update({state:Le});const De=function(){return k===s.ITextFrame.HorizontalAlignment.Right};C.getCommand("formatAlignRightToggle").updateCallback(function(){V(this,{alignment:{horizontal:De()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.Right}})}).update({state:De});const We=function(){return k===s.ITextFrame.HorizontalAlignment.Justify};C.getCommand("formatAlignJustifyToggle").updateCallback(function(){V(this,{alignment:{horizontal:We()?s.ITextFrame.HorizontalAlignment.General:s.ITextFrame.HorizontalAlignment.Justify}})}).update({state:We});const je=!t.getProtection().isFormatCellsAllowed(),Ge=k===s.ITextFrame.HorizontalAlignment.CenterContinuous||k===s.ITextFrame.HorizontalAlignment.Fill;C.getCommand("formatTextRotate0").updateCallback(function(Ne){V(this,{alignment:{rotation:0}})}).update({disabled:je||Ge,state:Y===0}),C.getCommand("formatTextRotate45").updateCallback(function(Ne){V(this,{alignment:{rotation:Ne??1?45:0}})}).update({disabled:je||Ge,state:Y===45}),C.getCommand("formatTextRotate90").updateCallback(function(Ne){V(this,{alignment:{rotation:Ne??1?90:0}})}).update({disabled:je||Ge,state:Y===90}),C.getCommand("formatTextRotate270").updateCallback(function(Ne){V(this,{alignment:{rotation:Ne??1?270:0}})}).update({disabled:je||Ge,state:Y===270}),C.getCommand("formatTextRotate315").updateCallback(function(Ne){V(this,{alignment:{rotation:Ne??1?315:0}})}).update({disabled:je||Ge,state:Y===315}),C.getCommand("formatTextRotateCustom").updateCallback(function(Ne){V(this,{alignment:{rotation:Ne}})}).update({disabled:je||Ge,state:Y??0})},[ke,t,i,K,B]),o.useEffect(()=>{const u=!t.getProtection().isFormatCellsAllowed(),T=t.getSelectedRanges().getMerges().length>0,E=async(_e,rt)=>{P(rt,async vt=>{const yt=async(gt=!1)=>{const lt=await Promise.resolve(d?.showBusy?.(rt.label()));try{const Tt=vt.getSelectedRanges();if(Tt.merge({orientations:_e,discardMultipleValues:gt}),_e===s.IRange.Orientations.Both){const Lt={alignment:{horizontal:s.ITextFrame.HorizontalAlignment.Center}};Tt.updateStyle(Lt)}}catch(Tt){throw Tt}finally{lt?.()}};let Ct;try{await yt()}catch(gt){if(gt.type!=="discardMultipleValues")throw gt;Ct=!0}if(Ct&&d?.showOptions){if(await d?.showOptions({title:"Confirm",description:"Merging cells will only keep the upper-left value. Some data will be discarded. Continue?",options:["Merge","Cancel"],defaultOption:"Merge"})!=="Merge")return;await yt(!0)}},void 0,void 0,!1)},b=_e=>{P(_e,async rt=>{try{const vt=rt.getSelectedRanges();vt.unmerge();const yt={alignment:{horizontal:null}};vt.updateStyle(yt)}catch(vt){throw vt}})};C.getCommand("mergeToggle").updateCallback(function(){ue.CoordUtils.isSingleCell(t.getSelectedRange().getCoords())||(T?b(this):E(s.IRange.Orientations.Both,this))}).update({state:T,disabled:!Ue||u}),C.getCommand("mergeHorizontal").updateCallback(function(){E(s.IRange.Orientations.Column,this)}).update({disabled:!Ue||u}),C.getCommand("mergeVertical").updateCallback(function(){E(s.IRange.Orientations.Row,this)}).update({disabled:!Ue}),C.getCommand("unmerge").updateCallback(function(){b(this)}).update({disabled:!T||!Ue||u});const L={disabled:u};C.getCommand("hideRows").updateCallback(function(){P(this,_e=>{_e.getRowHeaders().setHidden(_e.getSelectedRanges().getCoords(),!0)})}).update(L),C.getCommand("hideColumns").updateCallback(function(){P(this,_e=>{_e.getColumnHeaders().setHidden(_e.getSelectedRanges().getCoords(),!0)})}).update(L),C.getCommand("unhideRows").updateCallback(function(){P(this,_e=>{_e.getRowHeaders().setHidden(_e.getSelectedRanges().getCoords(),!1)})}).update(L),C.getCommand("unhideColumns").updateCallback(function(){P(this,_e=>{_e.getColumnHeaders().setHidden(_e.getSelectedRanges().getCoords(),!1)})}).update(L),C.getCommand("autoFitRows").updateCallback(function(){P(this,_e=>{_e.getSelectedRanges().autoFit({orientations:s.IRange.Orientations.Row})})}).update(L),C.getCommand("autoFitColumns").updateCallback(function(){P(this,_e=>{_e.getSelectedRanges().autoFit({orientations:s.IRange.Orientations.Column})})}).update(L);let v=!1,U=0,Z=!1,ee=!1,le=0,ie=!1;!h||u||$e||(v=h.isEntireColumnsAny(),v&&!h.isEntireColumns()?Z=!0:U=h.getColumnCount(),ee=h.isEntireRowsAny(),ee&&!h.isEntireRows()?ie=!0:le=h.getRowCount());const se={disabled:u||h&&h.getCount()!==1};C.getCommand("sortAscending").update(se),C.getCommand("sortDescending").update(se);const Ce={disabled:v||ee||u||$e},he=v||u||$e||ie;he&&(U=1);const me=ee||u||$e||Z;me&&(le=1);let xe="",Le="",De="",We="",je="",Ge="",Ne="",Xe="",it="";U>1&&(Ge=Le=U+" ",Ne=De="s"),le>1&&(Xe=We=le+" ",it=je="s"),w.getMode()?.key==="copy"?(xe=We=Le="Copied ",De=je="s"):w.getMode()?.key==="cut"&&(xe=We=Le="Cut ",De=je="s");let pt="",wt="";if(h){const _e=h.getDefaultShiftOrientation()===s.IRange.Orientation.Column;pt=` (${_e?"Shift Right":"Shift Down"})`,wt=` (${_e?"Shift Left":"Shift up"})`,C.getCommand("deleteCells").update({label:`Delete Cells${wt}`})}C.getCommand("insertCells").update({label:`Insert ${xe}Cells${pt}`,scopedLabels:{insertCells:`${xe}At Selection`}}),C.getCommand("insertCellsShiftRight").update(Ce),C.getCommand("insertCellsShiftDown").update(Ce),C.getCommand("deleteCellsShiftUp").update(Ce),C.getCommand("deleteCellsShiftLeft").update(Ce),C.getCommand("insertRows").update({label:`Insert ${We}Row${je}`,scopedLabels:{insertCells:`${We}Row${je}`},disabled:me}),C.getCommand("insertRowsAfter").update({label:`Insert ${We}Row${je} Below`,disabled:me}),C.getCommand("insertColumns").update({label:`Insert ${Le}Column${De}`,scopedLabels:{insertCells:`${Le}Column${De}`},disabled:he}),C.getCommand("insertColumnsAfter").update({label:`Insert ${Le}Column${De} After`,disabled:he}),C.getCommand("deleteRows").update({label:`Delete ${Xe}Row${it}`,scopedLabels:{deleteCells:`${Xe}Row${it}`},disabled:me}),C.getCommand("deleteColumns").update({label:`Delete ${Ge}Column${Ne}`,scopedLabels:{deleteCells:`${Ge}Column${Ne}`},disabled:he})},[Ee,Ue,$e,h,w,d,Fe]),o.useEffect(()=>{const u=t.getProtection(),T=t.getProtection().isLocked(),E=!u.isFormatCellsAllowed(),b={disabled:E};C.getCommand("protectionSheetToggle").updateCallback(async(U,Z)=>{let ee=null;try{if(T){let le=null;if(u.hasPassword()){const ie=await d?.showInputOptions({title:"Password Required",description:"Enter a password to unprotected",options:["Unprotect","Cancel"],defaultOption:"Unprotect",inputType:"password"});if(ie.option!=="Unprotect")return;le=ie.input}ee=await Promise.resolve(d?.showBusy?.(Z.label())),await u.unlock(le)}else ee=await Promise.resolve(d?.showBusy?.(Z.label())),await u.lock();ee?.()}catch(le){ee?.(),d?.showError?.(le)}}).update({state:T,label:()=>T?"Unprotect Sheet":"Protect Sheet",scopedLabels:{sheet:T?"Unprotect":"Protect"}}),C.getCommand("deleteTable").update(b),C.getCommand("sortAscending").update(b),C.getCommand("sortDescending").update(b),C.getCommand("sortCustom")?.update(b),C.getCommand("updateComments").update(b),C.getCommand("deleteComments").update(b),C.getCommand("insertChart")?.update(b),C.getCommand("insertImageFromFile").update(b),C.getCommand("insertImageFromURL").update(b),C.getCommand("formatBorder").update(b),C.getCommand("formatFillColor").update(b),C.getCommand("formatFontColor").update(b),C.getCommand("formatBoldToggle").update(b),C.getCommand("formatItalicToggle").update(b),C.getCommand("formatUnderlinedToggle").update(b),C.getCommand("formatStrikeThroughToggle").update(b),C.getCommand("formatSuperscriptToggle").update(b),C.getCommand("formatSubscriptToggle").update(b),C.getCommand("formatAlignTopToggle").update(b),C.getCommand("formatTextOverflowVisibleToggle").update(b),C.getCommand("formatTextOverflowWrapToggle").update(b),C.getCommand("formatTextOverflowClipToggle").update(b),C.getCommand("formatTextOverflowShrinkToggle").update(b),C.getCommand("formatAlignMiddleToggle").update(b),C.getCommand("formatAlignBottomToggle").update(b),C.getCommand("formatAlignDistributedVerticalToggle").update(b),C.getCommand("formatAlignJustifyVerticalToggle").update(b),C.getCommand("formatAlignLeftToggle").update(b),C.getCommand("formatAlignCenterToggle").update(b),C.getCommand("formatAlignRightToggle").update(b),C.getCommand("formatAlignJustifyToggle").update(b),C.getCommand("formatAlignCenterContinuousToggle").update(b),C.getCommand("formatAlignDistributedHorizontalToggle").update(b),C.getCommand("formatAlignFillToggle").update(b),C.getCommand("formatFontSizeIncrease").update(b),C.getCommand("formatFontSizeDecrease").update(b),C.getCommand("formatFontFamily").update(b),C.getCommand("formatFontSize").update(b),C.getCommand("formatNumberFormat").update(b),C.getCommand("formatNumberFormatGeneralStyle").update(b),C.getCommand("formatNumberFormatNumberStyle").update(b),C.getCommand("formatNumberFormatTimeStyle").update(b),C.getCommand("formatNumberFormatDateStyle").update(b),C.getCommand("formatNumberFormatAccountingStyle").update(b),C.getCommand("formatNumberFormatPercentStyle").update(b),C.getCommand("formatNumberFormatScientificStyle").update(b),C.getCommand("formatNumberFormatCommaStyle").update(b),C.getCommand("formatNumberFormatIncreaseDecimal").update(b),C.getCommand("formatNumberFormatDecreaseDecimal").update(b),C.getCommand("hideColumns").update(b),C.getCommand("unhideColumns").update(b),C.getCommand("hideRows").update(b),C.getCommand("unhideRows").update(b),C.getCommand("quickFormulaSum").update(b),C.getCommand("quickFormulaAverage").update(b),C.getCommand("quickFormulaCount").update(b),C.getCommand("quickFormulaMax").update(b),C.getCommand("quickFormulaMin").update(b),C.getCommand("startEditCurrentTime").update(b),C.getCommand("startEditCurrentDate").update(b),C.getCommand("startEditValueAbove").update(b),C.getCommand("fillDown").update(b),C.getCommand("fillRight").update(b),C.getCommand("fillUp").update(b),C.getCommand("fillLeft").update(b),C.getCommand("formatCellStyle").update(b),C.getCommand("formatTableStyle").update(b),C.getCommand("formatPainterToggle").update(b),C.getCommand("formatBorderAddOutline").update(b),C.getCommand("formatBorderClearOutline").update(b),C.getCommand("formatIndentDecrease").update(b),C.getCommand("formatIndentIncrease").update(b),C.getCommand("clearContents").update(b),C.getCommand("clearFormats").update(b),C.getCommand("clearAll").update(b),C.getCommand("clearComments").update(b),C.getCommand("clearHyperlinks").update(b),C.getCommand("autoFilterClear").update(b),C.getCommand("autoFilterReapply").update(b);const L=k===s.ITextFrame.HorizontalAlignment.CenterContinuous||k===s.ITextFrame.HorizontalAlignment.Fill,v={disabled:E||L};C.getCommand("formatTextRotate0").update(v),C.getCommand("formatTextRotate45").update(v),C.getCommand("formatTextRotate90").update(v),C.getCommand("formatTextRotate270").update(v),C.getCommand("formatTextRotate315").update(v),C.getCommand("formatTextRotateCustom").update(v),C.getCommand("formatTextRotateVertical").update(v)},[Ee]),C}var Do,zo;(function(){if(zo)return Do;zo=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,l=typeof rn=="object"&&rn&&rn.Object===Object&&rn,d=typeof self=="object"&&self&&self.Object===Object&&self,m=l||d||Function("return this")(),p=Object.prototype.toString,g=Math.max,q=Math.min,h=function(){return m.Date.now()};function f(S){var D=typeof S;return!!S&&(D=="object"||D=="function")}function I(S){if(typeof S=="number")return S;if(function(W){return typeof W=="symbol"||function(K){return!!K&&typeof K=="object"}(W)&&p.call(W)=="[object Symbol]"}(S))return NaN;if(f(S)){var D=typeof S.valueOf=="function"?S.valueOf():S;S=f(D)?D+"":D}if(typeof S!="string")return S===0?S:+S;S=S.replace(e,"");var z=n.test(S);return z||i.test(S)?a(S.slice(2),z?2:8):t.test(S)?NaN:+S}Do=function(S,D,z){var W,K,y,B,R,w,M=0,O=!1,F=!1,A=!0;if(typeof S!="function")throw new TypeError("Expected a function");function _(te){var N=W,x=K;return W=K=void 0,M=te,B=S.apply(x,N)}function G(te){var N=te-w;return w===void 0||N>=D||N<0||F&&te-M>=y}function P(){var te=h();if(G(te))return V(te);R=setTimeout(P,function(N){var x=D-(N-w);return F?q(x,y-(N-M)):x}(te))}function V(te){return R=void 0,A&&W?_(te):(W=K=void 0,B)}function $(){var te=h(),N=G(te);if(W=arguments,K=this,w=te,N){if(R===void 0)return function(x){return M=x,R=setTimeout(P,D),O?_(x):B}(w);if(F)return R=setTimeout(P,D),_(w)}return R===void 0&&(R=setTimeout(P,D)),B}return D=I(D)||0,f(z)&&(O=!!z.leading,y=(F="maxWait"in z)?g(I(z.maxWait)||0,D):y,A="trailing"in z?!!z.trailing:A),$.cancel=function(){R!==void 0&&clearTimeout(R),M=0,W=w=K=R=void 0},$.flush=function(){return R===void 0?B:V(h())},$}})();var No,Lo,Oo={exports:{}},eo={};Lo||(Lo=1,Oo.exports=function(){if(No)return eo;No=1;var e=o,t=typeof Object.is=="function"?Object.is:function(p,g){return p===g&&(p!==0||1/p==1/g)||p!=p&&g!=g},n=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function d(p){var g=p.getSnapshot;p=p.value;try{var q=g();return!t(p,q)}catch{return!0}}var m=typeof window>"u"||window.document===void 0||window.document.createElement===void 0?function(p,g){return g()}:function(p,g){var q=g(),h=n({inst:{value:q,getSnapshot:g}}),f=h[0].inst,I=h[1];return a(function(){f.value=q,f.getSnapshot=g,d(f)&&I({inst:f})},[p,q,g]),i(function(){return d(f)&&I({inst:f}),p(function(){d(f)&&I({inst:f})})},[p]),l(q),q};return eo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,eo}()),Oo.exports;var jo,Bo,on={exports:{}},Ut={exports:{}},Il=Ut.exports;function Vo(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}(function(){if(Bo)return on.exports;Bo=1;for(var e=(jo||(jo=1,function(){var h,f,I,S,D,z;typeof performance<"u"&&performance!==null&&performance.now?Ut.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Ut.exports=function(){return(h()-D)/1e6},f=process.hrtime,S=(h=function(){var W;return 1e9*(W=f())[0]+W[1]})(),z=1e9*process.uptime(),D=S-z):Date.now?(Ut.exports=function(){return Date.now()-I},I=Date.now()):(Ut.exports=function(){return new Date().getTime()-I},I=new Date().getTime())}.call(Il)),Ut.exports),t=typeof window>"u"?rn:window,n=["moz","webkit"],i="AnimationFrame",a=t["request"+i],l=t["cancel"+i]||t["cancelRequest"+i],d=0;!a&&d<n.length;d++)a=t[n[d]+"Request"+i],l=t[n[d]+"Cancel"+i]||t[n[d]+"CancelRequest"+i];if(!a||!l){var m=0,p=0,g=[],q=1e3/60;a=function(h){if(g.length===0){var f=e(),I=Math.max(0,q-(f-m));m=I+f,setTimeout(function(){var S=g.slice(0);g.length=0;for(var D=0;D<S.length;D++)if(!S[D].cancelled)try{S[D].callback(m)}catch(z){setTimeout(function(){throw z},0)}},Math.round(I))}return g.push({handle:++p,callback:h,cancelled:!1}),p},l=function(h){for(var f=0;f<g.length;f++)g[f].handle===h&&(g[f].cancelled=!0)}}on.exports=function(h){return a.call(t,h)},on.exports.cancel=function(){l.apply(t,arguments)},on.exports.polyfill=function(h){h||(h=t),h.requestAnimationFrame=a,h.cancelAnimationFrame=l},on.exports})();const vo=o.memo(o.forwardRef((e,t)=>{const{style:n=r.ReactUtils.EmptyCssProperties,orientation:i,sheet:a,onShowTooltip:l,onCloseTooltip:d,onScrollOffset:m,showCustomScrollButtons:p=!1,offset:g=0,totalSize:q=0,viewportSize:h=0,...f}=e;if(!a)throw new Error("SheetScrollBar needs a sheet model");const[I]=zt(),S=r.useCallbackRef(l,[l]),D=r.useCallbackRef(d,[d]),z=(W=I,K=t,o.useMemo(()=>W===null&&K===null?null:X=>{Vo(W,X),Vo(K,X)},[W,K]));var W,K;const[y,B]=o.useState(()=>{const X=a.getView().getTopLeft();return i===r.ScrollbarOrientation.Vertical?X.top:X.left}),R=()=>{const X=a.getView().getFreezePanes();return i===r.ScrollbarOrientation.Vertical?X.coords.rowIndex===0?{shift:0,scroll:0}:{shift:a.getRowHeaders().findOffset(X.coords.rowIndex)-X.topLeft.top,scroll:X.topLeft.top}:X.coords.colIndex===0?{shift:0,scroll:0}:{shift:a.getColumnHeaders().findOffset(X.coords.colIndex)-X.topLeft.left,scroll:X.topLeft.left}},[w,M]=o.useState(R),[O,F]=o.useState(null),[A,_]=o.useState(!1),G=i===r.ScrollbarOrientation.Vertical?a.getRowHeaders():a.getColumnHeaders(),P=()=>{const X=a.getUsedRange()?.getCoords()??ue.CoordUtils.EmptyRange,ae=a.getSelection().getCoords().cell;return{colIndex:Math.max(X.colEnd,ae.colIndex),rowIndex:Math.max(X.rowEnd,ae.rowIndex)}},[V,$]=o.useState(P),te=V?(i===r.ScrollbarOrientation.Vertical?V.rowIndex:V.colIndex)+1:0,N=()=>{const X=P();ue.CoordUtils.isEqualCells(V,X)||$(X)};tt(a.getView(),{onFreezeSplitChange:()=>{M(R)}}),tt(a.getSelection(),{onChange:N}),tt(a,{onUsedRangeChange:N}),o.useEffect(()=>{$(P())},[a]),o.useEffect(()=>{if(!O)return A&&D?.(),void _(!1);const X=G.getTextAt(G.findIndex(y/(a.getView().getZoomScale()/100)+w.scroll+w.shift));_(!0),S?.({...O,display:(i===r.ScrollbarOrientation.Vertical?"Row":"Column")+": "+X})},[g,y,w,i,O,G,A,a]);const x=r.useCallbackRef((X,ae,Me)=>{B(X);const Te=X+w.scroll,fe=ae+w.shift,Be=Me+w.shift+w.scroll;m?.(Te,fe,Be)},[m,w]),H=g-w.scroll,re=h-w.shift,ye=q-(w.shift+w.scroll),ne=G.findOffset(te)*(a.getView().getZoomScale()/100)-(w.scroll+w.shift);return c.jsx(r.VirtualScrollbar,{ref:z,style:n,offset:H,viewportSize:re,totalSize:ye,orientation:i,showCustomScrollButtons:p,onMouseDown:X=>{F({anchor:{x:X.clientX,y:X.clientY}}),X.preventDefault()},onScrollOffset:x,onMouseOut:()=>{F(null)},onMouseUp:()=>{F(null)},minSize:ne,...f})}));vo.displayName="SheetScrollbar";const Po=(e,t,n=null)=>{const i=[];for(let a=0;a<e.length;a++)if(e[a].value.isSelectedAll){if(e[a].min===e[a].max&&e[a].min===n)continue;i.push({address:{min:e[a].min,max:e[a].max},update:t})}return i},Ho=o.memo(o.forwardRef((e,t)=>{const{sheetHeader:n,gridRef:i,sheetElement:a,commands:l,oppositeSize:d=30,containerWidth:m,containerHeight:p,headerText:g,freezeStart:q,gridStyle:h,verticalPadding:f,horizontalPadding:I,onSheetContextMenu:S,onResizeHeadersStart:D,onResizeHeaders:z,onResizeHeadersEnd:W,onResizeHeadersDown:K,onResizeHeadersUp:y,scrollPoint:B,onSelectionStart:R,onSelectionEnd:w}=e,M=o.useMemo(()=>n.getOrientation(),[n]),O=o.useRef(null),[F,A]=o.useReducer(j=>j+1,0),[_,G]=o.useReducer(j=>j+1,0),P=n?.getSheet(),V=o.useRef(!1);o.useLayoutEffect(()=>{V.current=!0},[n]);const $=o.useMemo(()=>n.getEntireRange().getCoords().max+1,[n]),te=o.useMemo(()=>{const j=M===s.IRange.Orientation.Column;return{left:j?B.left:0,top:j?0:B.top}},[B]),[N,x]=o.useState(P?.getView().getZoomScale()/100),[H,re]=o.useState(null);tt(n,{onSizesChange:j=>{x(P?.getView().getZoomScale()/100),Fe(de())}});const ye=o.useCallback(()=>{O.current?.invalidate(),G()},[]),ne=o.useCallback(ue.CommonUtils.debounce(()=>{ye()},10),[]),[X,ae]=o.useState(null);tt(n.getSheet(),{onSelectionChange(){ae(P?.getSelection().getCoords()),ne()},onProtectionChange(){ye()},onViewChange(){ne()}}),o.useLayoutEffect(()=>{Fe(de())},[M,N,d]),o.useLayoutEffect(()=>{re(null),x(n?.getSheet().getView().getZoomScale()/100),Fe(de())},[n]);const Me=o.useCallback(j=>n.at(j)?.isHidden()||n.at(j)?.getSize()===0,[n]),Te=o.useCallback((j,Y)=>n.hiddenHeadersAt(j,Y),[Me]),fe=r.useCallbackRef(j=>n.isSelected(j),[n]),Be=r.useCallbackRef(j=>n.isSelectedAll(j),[n]),pe=o.useCallback(()=>n.getMinSize(),[n]),Pe=o.useCallback(()=>n.getMaxSize(),[n]),Se=r.useCallbackRef((j,Y,u)=>{Y/=N;const T={size:Y=Math.max(pe(),Math.min(ue.CommonUtils.roundAccurately(Y,pe()),Pe())),hidden:!1},E=[];if(Y<=0&&(T.hidden=!0,T.size=u),E.push({address:{min:j,max:j},update:T}),Y<0){const b=M===s.IRange.Orientation.Column,L=b?be.getColOffset:be.getRowOffset,v=b?be.getColIndex:be.getRowIndex,U=L(j);let Z=v(U+Y);const ee=L(Z);ee===U+Y?Z--:E.push({address:{min:Z,max:Z},update:{size:U-ee+Y}}),j-Z>1&&E.push({address:{min:Z+1,max:j-1},update:{hidden:!0}})}n.updateHeaderPairs(E),z?.(j,Y,u)},[F,n,N,z]),ge=r.useCallbackRef((j,Y,u)=>{const T=M===s.IRange.Orientation.Column;let E=null,b={min:j,max:j};if(n.isSelectedAll(j)){const L=n.getSelectedRuns();L.length>1?E="Resize "+(T?"Columns":"Rows"):b=L[0];const v={hidden:Y<=0,size:(Y<=0?u:Y)/N};n.updateHeaderPairs(Po(L,v,j))}if(b){const L=b.max-b.min+1;let v;v=L===1?n.getRange(b).at(0).getDisplayText():n.getRange(b).toString(),E=`Resize ${T?"Column":"Row"}${L>1?"s":""} '${v}'`}W?.(j,Y,E)},[F,n,W]),ce=r.useCallbackRef((j,Y)=>{const u=M===s.IRange.Orientation.Column;D(j,Y,`Resize ${u?"Column":"Row"}(s)`)},[D]),we=r.useCallbackRef(j=>{let Y=!1;const u=M===s.IRange.Orientation.Column,T=n.getSheet().getEntireRange().getCoords(),E=[],b=n.getSelectedRuns(),L=v=>{let U;U=u?{colStart:v.min,rowStart:T.rowStart,colEnd:v.max,rowEnd:T.rowEnd}:{colStart:T.colStart,rowStart:v.min,colEnd:T.colEnd,rowEnd:v.max},E.push(U)};for(let v=0;v<b.length;v++){const U=b[v];U.value.isSelectedAll&&(U.min<=j&&U.max>=j&&(Y=!0),L(U))}if(Y||L({min:j,max:j}),n.getSheet().getRanges(E).autoFit({orientations:u?s.IRange.Orientations.Column:s.IRange.Orientations.Row}),Me(j)){const v={hidden:null},U=Po(b,v);Y||U.push({address:j,update:v}),n.updateHeaderPairs(U)}W?.(j,null,"Resize Column(s)")},[F,n,W,Me]),de=()=>{const j=M===s.IRange.Orientation.Column;return{getColOffset:Y=>j?n.findOffset(Y):Y===0?0:d/N,getColIndex:Y=>j?n.findIndex(Y):0,getRowOffset:Y=>j?Y===0?0:d/N:n.findOffset(Y),getRowIndex:Y=>j?0:n.findIndex(Y)}},[be,Fe]=o.useState(()=>de()),ve=o.useCallback((j,Y)=>j.nativeEvent.which!==r.MouseButtonCodes.Right||!Be(M===s.IRange.Orientation.Column?Y.colIndex:Y.rowIndex),[M,Be]),Ee=r.useCallbackRef(j=>{a.focusSheet()},[a]),Oe=r.useCallbackRef(j=>{P?.getSelection().updateCoords(j)},[P]),{...He}=dt.useSelection({gridRef:i,commands:null,layout:be,selection:X,fillHandleBorderColor:h.body.fill,selectionBackgroundColor:h.selection.fill,selectionBorderColor:h.selection.strokeFill,selectionRemoveBackgroundColor:h.selectionRemove.fill,selectionRemoveBorderColor:h.selectionRemove.strokeFill,disableTouchSelection:!0,onSelectionChange:Oe,canSelectionSpanMergedCells:j=>{const Y=P.getRange(j);return Y.isEntireColumns()||Y.isEntireRows()}}),C=r.useCallbackRef(()=>{R?.();const j=P?.getSelection();j&&j.setAdjusting(j.getCoords())},[P,R]),Ue=r.useCallbackRef(async()=>{P?.getSelection().setAdjusting(null),w?.()},[P,w]),{...Qe}=dt.useHeaderSelection({orientation:M,headerCount:$,gridRef:O,gridMainRef:i,newSelection:He?.newSelection,modifySelection:He?.modifySelection,appendSelection:He?.appendSelection,clearSelections:He?.clearSelections,pointerDownInterceptor:ve,onPointerUp:Ee,onDragStart:C,onDragEnd:Ue}),$e=h.selection?.strokeFill;o.useEffect(()=>{if(!O.current)return void re(null);const j=M===s.IRange.Orientation.Column,Y=n.getSelectedRuns(),u=n.isProtected()?null:Se,T=(b,L,v)=>{if(v)return j?c.jsx("div",{style:{position:"absolute",borderBottom:`${h.headerSelection.strokeWidth}px solid ${$e}`,pointerEvents:"none",top:`${r.ReactUtils.boundPixel(-h.headerSelection.strokeWidth/2)}px`,left:`${r.ReactUtils.boundPixel(v.x-h.headerSelection.strokeWidth)}px`,width:`${r.ReactUtils.boundPixel(v.width+h.headerSelection.strokeWidth+1,!0)}px`,height:d+h.headerSelection.strokeWidth-.5+"px"}},b):c.jsx("div",{style:{position:"absolute",borderRight:`${h.headerSelection.strokeWidth}px solid ${$e}`,pointerEvents:"none",top:`${r.ReactUtils.boundPixel(v.y-h.headerSelection.strokeWidth)}px`,left:`${r.ReactUtils.boundPixel(-h.headerSelection.strokeWidth/2)}px`,width:d+h.headerSelection.strokeWidth-.5+"px",height:`${r.ReactUtils.boundPixel(v.height+h.headerSelection.strokeWidth+1,!0)}px`}},b)},E=(b,L,v)=>{const U={x:0,y:0,width:0,height:0};if(j){const Z=v.toClipBounds(v.getRangeCoordsBounds({rowStart:0,rowEnd:0,colStart:b,colEnd:Math.min($,L)}),dt.SELECTION_CLIP_INSETS);if(!Z)return;U.x=Z.x,U.width=Z.width}else{const Z=v.toClipBounds(v.getRangeCoordsBounds({rowStart:b,rowEnd:Math.min($,L),colStart:0,colEnd:0}),dt.SELECTION_CLIP_INSETS);if(!Z)return;U.y=Z.y,U.height=Z.height}return{x:U.x,y:U.y,width:U.width,height:U.height}};re([b=>{const L=[];let v=null,U=j?b.getVisibleColumns():b.getVisibleRows();const Z=j?b.getTotalRangeCoords().colStart:b.getTotalRangeCoords().rowStart;U.length>0&&U[0]>Z&&(U=[U[0]-1,...U]);let ee=[];const le=[];for(let me=0;me<U.length;me++){const xe=U[me],Le=me<U.length-1?U[me+1]:xe+Te(xe+1,!1)+1,De=xe+1!==Le;if(!v||v.max<xe)if(Y.length>0&&Y[Y.length-1].max>=xe){const Ge=ue.CommonUtils.findEqualOrGreater(Y,xe,Ne=>Ne.max);v=Y[Ge]}else v=null;let We=!1,je=!1;if(v?.value&&(v.min<=xe||v.min<=Le&&!De)&&(We=!0,je=v.value.isSelectedAll),xe===Z){let Ge=!1,Ne=!1;v?.value&&v.min<=xe&&(Ge=!0,Ne=v.value.isSelectedAll),xe>0&&le.push({index:xe-1,isNextHidden:De,isSelected:Ge,isSelectedAll:Ne,disabledResize:!0})}if(je&&ee.push(le.length),le.push({index:xe,isHidden:me===0&&Te(xe,!1)>0,isNextHidden:De,isSelected:We,isSelectedAll:je,onDividerMouseDown:K,onDividerResizeStart:ce,onDividerResize:u,onDividerMouseUp:y,onDividerResizeEnd:ge,onDividerAutoFit:we}),De){let Ge=!1,Ne=!1;if(v&&v.min>=xe&&v.max<=Le-1&&v.value.isSelectedAll&&ee.push(le.length),!(v?.value&&v.max>=Le))if(Y.length>0&&Y[Y.length-1].max>=Le){const Xe=ue.CommonUtils.findEqualOrGreater(Y,Le,it=>it.max);v=Y[Xe]}else v=null;v?.value&&v.min<=Le&&(Ge=v.value.isSelected,Ne=v.value.isSelectedAll),Le>0&&le.push({index:Le-1,isHidden:!0,isSelected:Ge,isSelectedAll:Ne,onDividerMouseDown:K,onDividerResizeStart:ce,onDividerResize:u,onDividerMouseUp:y,onDividerResizeEnd:ge,onDividerAutoFit:we})}}if(ee.length>0){let me=ee.length-1;if(ee.length>0){const De=le[ee[me]].index;let We=null;j?(We=b.getRangeCoordsBounds({rowStart:0,rowEnd:0,colStart:De,colEnd:De}),We.x+We.width>b.getBounds().width&&(me-=1,me===0&&(me=-1))):(We=b.getRangeCoordsBounds({rowStart:De,rowEnd:De,colStart:0,colEnd:0}),We.y+We.height>b.getBounds().height&&(me-=1,me===0&&(me=-1)))}const xe=Y?.[Y.length-1],Le=b.getAnchor();if(Le==="t"||Le==="l"){const De=le[ee[Math.max(0,ee.length-1)]];De.showTouchDivider=xe&&xe.max<=De.index}else me>=0&&(le[ee[me]].showTouchDivider=!0)}const{header:ie,headerSelect:se,headerSelectAll:Ce,headerHover:he}=h??{};for(let me=0;me<le.length;me++)L.push(c.jsx(dt.HeaderDivider,{orientation:M,view:b,headerStyle:ie,headerStyleSelect:se,headerStyleSelectAll:Ce,headerStyleHover:he,disabled:n.isProtected(),...le[me]},`divider${me}`));return L},b=>{const L=[];for(let v=0;Y&&v<Y.length;v++)L.push(T(`selection:${b.getAnchor()}:${v}`,0,E(Y[v].min,Y[v].max,b)));return L}])},[_,!0,$e,h,be,$,q,F,N]),o.useEffect(()=>{O.current?.invalidate()},[F]);const J=r.useCallbackRef(j=>g?g(j):n.getTextAt(j),[g,n]),Ie=r.useCallbackRef(j=>{const{header:Y,headerSelect:u,headerSelectAll:T,headerHover:E}=h??{},{range:b,key:L,...v}=j;return c.jsx(dt.HeaderRenderer,{orientation:M,index:M===s.IRange.Orientation.Column?b.colStart:b.rowStart,isSelected:fe,isSelectedAll:Be,zoomScale:100*N,headerText:J,headerStyle:Y,headerStyleSelect:u,headerStyleSelectAll:T,headerStyleHover:E,verticalPadding:f,horizontalPadding:I,...v},L)},[F,$,h,N,n]),Ve=r.useEditMode(),ke=o.useMemo(()=>{const j="white",Y="black",u={};if(r.ReactUtils.detectIt().primaryInput!=="touch"){let T=M===s.IRange.Orientation.Column?`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 8,14.5 2.3125,8.8125 h 3.25 V 1.5 h 4.875 v 7.3125 h 3.25 z' stroke='${Y}' fill='${j}'/%3E%3C/g%3E%3C/svg%3E%0A") 8 15, pointer`:`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='${Y}' fill='${j}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`;Ve.getMode()?.key==="formatPainter"&&(T=`url("data:image/svg+xml,%3Csvg width='30' height='22' viewBox='0 0 30 22' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='M 26.737611,2.811068 V 2.0241451 c 0,-0.4328075 -0.354115,-0.7869227 -0.786923,-0.7869227 h -9.443074 c -0.432808,0 -0.786923,0.3541152 -0.786923,0.7869227 v 3.1476914 c 0,0.4328076 0.354115,0.7869235 0.786923,0.7869235 h 9.443074 c 0.432808,0 0.786923,-0.3541159 0.786923,-0.7869235 V 4.3849137 h 0.786923 v 3.1476915 h -7.869229 v 8.6561518 c 0,0.432808 0.354116,0.786923 0.786923,0.786923 h 1.573846 c 0.432807,0 0.786923,-0.354115 0.786923,-0.786923 V 9.1064513 H 29.09838 V 2.811068 Z M 10.714339,6.2116849 c -1.60877,0.0017 -3.2175361,0.00425 -4.8263048,0.00609 0.0012,1.5756989 0.00158,3.1513905 0.00244,4.7270891 -1.5978311,0.0017 -3.1956617,0.0034 -4.7934919,0.0043 0.00335,1.740011 0.00655,3.480012 0.00988,5.220023 1.5954589,0 3.1909181,0 4.7863775,0 -0.0017,1.606793 -0.00353,3.213585 -0.0051,4.820375 1.7440936,0.0016 3.4881881,0.0033 5.2322842,0.005 -0.0014,-1.608503 -0.0018,-3.217015 -0.0028,-4.825519 1.58518,0 3.17036,0 4.755543,0 0.0033,-1.741851 0.0073,-3.483705 0.01072,-5.225556 -1.58808,0 -3.176158,0 -4.764238,0 0,-1.5775391 0,-3.1550792 0,-4.7326117 -0.135065,1.3e-4 -0.270128,1.982e-4 -0.40519,4.047e-4 z' stroke='${Y}' fill='${j}'/%3E%3C/g%3E%3C/svg%3E%0A") 7 12, pointer`),u.cursor=T}return u.backgroundColor=h?.header?.fill||"transparent",u},[M,F,Ve,h]),ze=r.useImperativeElement(t,()=>({scrollTo:j=>{O.current?.scrollTo(j)},forceRender:()=>{A()},getGridElement:()=>O.current}),[]),Ae=o.useCallback(j=>{Qe.onPointerDown(j)},[Qe]),k=o.useCallback(j=>{const Y=Qe.getCellCoordsFromClient(j.clientX,j.clientY);if(!Y||!S)return;const u=M===s.IRange.Orientation.Column;S({originalEvent:j,clientX:j.clientX,clientY:j.clientY,rowIndex:u?-1:Y.rowIndex,colIndex:u?Y.colIndex:-1}),j.stopPropagation(),j.preventDefault()},[Qe,S]),oe=o.useMemo(()=>{const j=M===s.IRange.Orientation.Column;return c.jsx("div",{ref:ze,children:c.jsx(dt.Grid,{className:"sheet-header",style:ke,ref:O,scrollPoint:te,columnCount:j?$:1,rowCount:j?1:$,width:j?m:d,height:j?d:p,freezeLeft:j?q:void 0,freezeTop:j?void 0:q,hiddenColumnsAt:j?Te:void 0,hiddenRowsAt:j?void 0:Te,showGridLines:!1,layout:be,clipCells:!1,allowOverlaysOverflow:!0,enableMouseWheel:!1,onContextMenu:k,onPointerDown:Ae,zoom:N,cellRenderer:Ie,overlays:H})})},[H,be,m,p,te,ke,_]);return o.useEffect(()=>{V.current=!1,O.current?.invalidate(),G()},[n,h]),oe})),El=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,getVisibleCells:a,gridStyle:l}=e,d=r.useCallbackRef((g,q)=>g.getStyle().getBorder(),[]),{overlay:m}=po({getVisibleCells:a,getBorderAt:d,darkMode:l.body.darkMode,shiftIfWide:!0}),p=m(n);return p&&n?p:null})),Fl={key:"copy",description:"'Copy' Select destination and press ENTER or choose Paste."},Al={key:"cut",description:"'Cut' Select destination and press ENTER or choose Paste."},Dl={type:s.ICell.Content.Values},zl={fitDestination:!0,type:s.ICell.Content.Formats},Nl={fitDestination:!0,type:s.ICell.Content.Formulas},Ll={transpose:!0},Ol={fitDestination:!0,adjustCells:(e,t,n)=>({value:`=${t.getA1({$colIndex:!0,$rowIndex:!0})}`})},qr=({element:e,sheet:t,sheetView:n,commands:i,onClipboardUpdate:a,onPaste:l,selectionRenderer:d=dt.defaultSelectionRenderer,copyForegroundColor:m="rgb(33, 115, 70)",cutForegroundColor:p="rgb(33, 115, 70)",copyBackgroundColor:g="white",cutBackgroundColor:q="white",notifier:h,...f})=>{const I=r.useCallbackRef(d,[d]),S=o.useRef(null),D=r.useEditMode(),z=D.getMode(),W=o.useMemo(()=>({element:e,doCopy:w=>{const M=t.getSelectedRanges().getSnapshot(w);return new s.RangeClipboardItem(M)}}),[t,n,e]),K=o.useMemo(()=>({element:e,importFromExternal:async(w,M)=>{const O=new s.ExternalRangeClipboardItem(w,M,t.getStyles(),t.isDate1904());return await O.parse()?O:null},doPaste:async(w,M)=>{if(w?.getItemType()!=="range")return;M?.contentsOnly&&delete(M={...M,type:s.ICell.Content.Values}).contentsOnly;const O=t.getSelectedRange(),F=w.getItem(),A=F.getName();return await O.doBatch(async()=>{const _=await O.copyFrom(F,M);!_||_.isEntireRows()||_.isEntireColumns()||_.autoFit({orientations:s.IRange.Orientations.Row,minContent:!0})},{description:"Paste"+(A?` ${A}`:""),autoSelect:!0}),!0}}),[t,n,h,e]),{clipboard:y,...B}=r.useCopyPaste({...f,source:W,commands:i,target:K,notifier:h,onClipboardUpdate:w=>{const M=w?.getItemType()==="range"?w:null;if(M){const O=w.editMode?.(),F={...w?.isCut?.()?Al:Fl,...O,args:{isClipboard:!0,...O?.args},onModeChange:A=>{A?.args?.isClipboard||y.clear(!0),O?.onModeChange?.(A)}};D.setMode(F)}S.current=M,a?.(M)},onPaste:(w,M)=>{if(w?.getItemType()!=="range")return;let O=D.getMode()?.key==="cut"||w.isCut?.();if(!O&&D.getMode()?.key==="copy"){const F=w.getItem().getCoords(),A=t.getSelectedRanges().getCoords();let _=!1;if(!_&&F&&A&&w.getItem().getSource?.()===t)for(let G=0;!_&&G<A.length;G++)_=ue.CoordUtils.isRangesIntersect(F,A[G]);O=_}O&&D.setMode(null),e?.()?.focus(),l?.(w,M)}});o.useMemo(()=>{const w=e;if(!i)return;const M=[new r.Command("pasteValues",w,{label:"Paste Values",scopedLabels:{paste:"Values"},description:`Paste only the values of the selected cells.
|
|
20
|
+
|
|
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
|
+
|
|
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(M,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const w={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(M=>B.paste({...Dl,...M})).update(w),i.getCommand("pasteFormats").updateCallback((M,O)=>B.paste({...zl,description:O.label(),...M})).update(w),i.getCommand("pasteFormulas").updateCallback((M,O)=>B.paste({...Nl,description:O.label(),...M})).update(w),i.getCommand("pasteTranspose").updateCallback((M,O)=>B.paste({...Ll,description:O.label(),...M})).update(w),i.getCommand("pasteLinks").updateCallback((M,O)=>B.paste({...Ol,description:O.label(),...M})).update(w),i.getCommand("cut").update(w),i.getCommand("paste").update(w)},[t,i]);const R=o.useMemo(()=>{if(!z||!S.current)return;const w=z.key;if(w!=="copy"&&w!=="cut"&&w!=="formatPainter")return;const M=S.current.getItem();if(M.getSource()!==t)return;const O=S.current.isCut?.(),F=O?q:g,A=O?p:m,_=M.getCoords(),G=_?[_]:null;return G&&G.length!==0?P=>{const V=[];for(let $=0;$<G.length;$++){const te=G[$],N=P.toClipBounds(P.getRangeCoordsBounds(te,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);N&&(V.push(I({range:te,key:`copy-selection-background-${$}`,x:N.x,y:N.y,width:Math.max(N.width,0),height:Math.max(N.height,0),stroke:F,strokeWidth:2})),V.push(I({range:te,key:`copy-selection-foreground-${$}`,x:N.x+(N.width<=2?-1:0),y:N.y,width:Math.max(N.width,3),height:Math.max(N.height,3),stroke:A,strokeWidth:2,isAnimatedStroke:!0})))}return V}:null},[z,t,n,m,g,p,q]);return{...B,clipboard:y,overlays:R}},jl=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:q}=qr({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()]),q&&n?q(n):null})),Bl="_sheet-selection_12wyx_5",Vl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Pl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},Hl={key:"dragCopy",description:"Drag selection to copy cell contents."},Ul={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Uo=(e,t)=>t.ctrlKey&&t.shiftKey?Ul:t.ctrlKey?Hl:t.shiftKey?Pl:Vl,Kl={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:q,gridStyle:h,isActive:f,editingCoords:I,...S}=e,D=n?.getBounds(),z=r.useCallbackRef(m,[m]),W=r.useCallbackRef(p,[p]),[K,y]=o.useState(()=>g?.getSelection().getCoords()),B=r.useCallbackRef(ge=>{ue.CoordUtils.isEqualSelectionCoords(ge,K)||g&&g.getSelection().updateCoords(ge)},[g,K]),R=r.useEditMode(),w=o.useRef(null),[M,O]=o.useState(g?.getProtection().isLocked()),[F,A]=o.useState(g?.getView().getMovableSelection().length>0),_=r.ReactUtils.detectIt().primaryInput==="touch",G=!_&&f,P=I!==null||F,V=r.useCallbackRef(ge=>{const ce=ue.CoordUtils.cellToRange(ge);if(g.isClosed())return ce;const we=g.getRange(ce,{excludeHidden:!0}).getMerges();return we.length===0?ce:we[0]},[g]),$=r.useCallbackRef((ge,ce,we,de,be,Fe)=>{const ve=g.getSelectedRange().getExtended(de,ge).getCoords();switch(de){case s.IRange.Direction.Up:return ve.rowStart;case s.IRange.Direction.Down:return ve.rowEnd;case s.IRange.Direction.Left:return ve.colStart;case s.IRange.Direction.Right:return ve.colEnd}},[g]),te=r.useCallbackRef(()=>{const ge=g.getUsedRange()?.getCoords(),ce=g.getRowHeaders().getUsedRange()?.getCoords(),we=g.getColumnHeaders().getUsedRange()?.getCoords();return{...ge,colEnd:Math.max(ge?.colEnd??0,we?.max??0),rowEnd:Math.max(ge?.rowEnd??0,ce?.max??0)}},[g]),N=r.useCallbackRef((ge,ce)=>g.getRowHeaders().hiddenHeadersAt(ge,ce),[g]),x=r.useCallbackRef((ge,ce)=>g.getColumnHeaders().hiddenHeadersAt(ge,ce),[g]),H=r.useCallbackRef(ge=>g.getRange(ge,{excludeHidden:!0}).getMerges(),[g]),re=r.useCallbackRef(ge=>{g?.getSelection().setAdjusting(ge)},[g]),ye=r.useCallbackRef(async()=>{g?.getSelection().setAdjusting(null),R.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),R.setMode(null))},[R,K,g,i]),ne=o.useMemo(()=>{const ge=R.getMode();return ge?.key==="cut"||ge?.key==="copy"},[R]);tt(g?.getView(),{onMovableSelectionChange:()=>{A(g.getView().getMovableSelection().length>0)}}),tt(g?.getSelection(),{onChange(ge){const ce=g.getSelection().getCoords();y(ce)}}),tt(g,{onProtectionChange:()=>{O(g.getProtection().isLocked())}});const{body:X={}}=h||{},ae=n.getLayout(),Me=!(G&&K.ranges.length<=1&&I===null&&!M&&(!R.getMode()||ne)),{cursor:Te,overlay:fe,onPointerDown:Be}=dt.useSelection({gridRef:q,commands:i,layout:ae,getCellCoordsAsRangeCoords:V,selection:K,fillHandleBorderColor:X.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:Me,disableMoveDrag:_||!(f&&K.ranges.length<=1&&I===null&&!M),disableTouchSelection:P,onSelectionChange:B,onSelectionDragStart:re,onSelectionDragEnd:ye,onMoveDragStart:(ge,ce,we)=>{R.setMode(Uo(0,we))},onMoveDragUpdate:(ge,ce,we)=>{R.setMode(Uo(0,we))},onMoveDragEnd:(ge,ce)=>{R.setMode(null)},onMoveDragDone:async(ge,ce,we)=>{if(ue.CoordUtils.isEqualRanges(ge,ce))return;const de=g.getRange(ce);if(d?.showOptions){const Oe=de.getDifferences(ge);let He=!1;for(let C=0;!He&&C<Oe.getCount();C++)He=Oe.at(C).isContentful();if(He&&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 be=!we.ctrlKey,Fe=we.shiftKey,ve=Fe?be?"Insert Moved Cells":"Insert Copied Cells":be?"Move Cells":"Copy Cells",Ee=await d?.showBusy?.(ve);try{const Oe=g.getRange(ge);await de.doBatch(async()=>{Fe?await de.insertFrom(ge,{isCut:be,undoRange:Oe}):await de.copyFrom(ge,{isCut:be,undoRange:Oe}),Oe.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0}),de.autoFit({skipCustomSize:!0,orientations:s.IRange.Orientations.Row,minContent:!0})},{description:ve,autoSelect:!0})}catch(Oe){d?.showError?.(Oe)}finally{Ee?.()}},contentfulCellFinder:$,hiddenRowsAt:N,hiddenColumnsAt:x,mergedRanges:H,getDataCoords:te,canSelectionSpanMergedCells:ge=>{const ce=g.getRange(ge);return ce.isEntireColumns()||ce.isEntireRows()},onFill:async(ge,ce)=>{const we="Auto Fill",de=await d?.showBusy?.(we);try{await g.doBatch(()=>{g.getRange(ge).autoFill(ce),g.getRange(ce).autoFit({orientations:s.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:we,autoSelect:!0})}catch(be){d?.showError?.(be)}finally{w.current=null,de?.()}},onFillPreview:(ge,ce,we)=>{if(q.current&&z){R.setMode(Kl);try{w.current?.direction!==we&&(w.current=null,g.getRange(ge).autoFill(ce,{previewOnly:C=>{w.current={callback:C,direction:we}}}));const de=w.current?.callback?.(ce);if(!de||de.isEmpty())return;const be=de.toText();if(!be)return;const Fe=ue.CoordUtils.cellToRange(de.getCoords()),ve=n.getRelativePointFromClient(0,0);let Ee=0,Oe=0,He=r.ToolTipPlacement.Bottom;if(we===s.IRange.Direction.Down){Ee=ae.getColOffset(Fe.colEnd+1)-ve.x;const C=ae.getRowOffset(Fe.rowEnd),Ue=ae.getRowOffset(Fe.rowEnd+1);Oe=Ue-(Ue-C)/2-ve.y,He=r.ToolTipPlacement.Right}else if(we===s.IRange.Direction.Right){Oe=ae.getRowOffset(Fe.rowEnd+1)-ve.y;const C=ae.getColOffset(Fe.colEnd),Ue=ae.getColOffset(Fe.colEnd+1);Ee=Ue-(Ue-C)/2-ve.x,He=r.ToolTipPlacement.Bottom}else if(we===s.IRange.Direction.Up){Ee=ae.getColOffset(Fe.colEnd+1)-ve.x;const C=ae.getRowOffset(Fe.rowStart),Ue=ae.getRowOffset(Fe.rowStart+1);Oe=Ue-(Ue-C)/2-ve.y,He=r.ToolTipPlacement.Right}else if(we===s.IRange.Direction.Left){Oe=ae.getRowOffset(Fe.rowEnd+1)-ve.y;const C=ae.getColOffset(Fe.colStart),Ue=ae.getColOffset(Fe.colStart+1);Ee=Ue-(Ue-C)/2-ve.x,He=r.ToolTipPlacement.Bottom}z({anchor:{x:Ee,y:Oe},display:be,placement:He})}catch(de){d?.showError?.(de)}}},onFillDone:()=>{w.current=null,R.setMode(null),W?.()}}),pe=r.useCallbackRef(ge=>{Be(r.ReactUtils.createSyntheticEvent(ge))},[Be,I]);o.useEffect(()=>{const ge=n?.getStage();if(ge)return ge.addEventListener("pointerdown",pe),()=>{ge.removeEventListener("pointerdown",pe)}},[n?.getStage()]);const Pe=r.useImperativeElement(t,()=>({}),[]),Se=o.useRef(null);return c.jsx("div",{className:bt(a,"sheet-selection",Bl),style:{position:"absolute",width:D?.width,height:D?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Wt([Pe,Se]),...S,children:fe(n)})})),kn=Object.freeze({x:0,y:0,width:0,height:0}),Wl={fireOnModelChange:!1},Gl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:d,onHide:m,onShow:p,onUnFocus:g,isDragging:q,updateFrameBounds:h,dragStart:f,style:I,disabled:S,renderMovable:D,...z}=e,[W,K]=o.useState(kn),[y,B]=o.useState(null),[R,w]=o.useState(!1),M=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const F=a.getBounds();if(!F)return;const A=i.toViewBounds(F);K(A??kn),h(A??kn)},[i?.getBounds()]),tt(a,{onBoundsChange:F=>{const A=F.getBounds();if(!A)return;const _=i.toViewBounds(A);K(_??kn),h(_)},onSelectionChange:()=>{const F=ue.CommonUtils.hasFocus(M.current,!0);!R&&!F||a.isSelected()||g()}}),tt(a,{onRequestFocus:()=>ue.CommonUtils.whenFocus(M.current,!0)},Wl),o.useEffect(()=>{const F=M.current;return l(F),()=>{d(F)}},[]);const O=o.useMemo(()=>{if(!W)return null;let{width:F,height:A}=W;return D({view:i,movable:a,disabled:S,isDragging:q,style:{position:"relative",left:0,top:0,width:F,height:A},onHide:m,onShow:p})},[i,a,W.width,W.height,S,q]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Wt([M,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:W.x,top:W.y,width:W.width,height:W.height,...I},onMouseDown:async F=>{const A=F.shiftKey||F.ctrlKey,_=a.isSelected(),G=F.currentTarget;A&&_?a.unselect():(_&&!A||await a.select({addToSelection:A}),f(F.nativeEvent,G),G.focus())},onFocus:F=>{F.relatedTarget&&!y&&B(F.relatedTarget),w(!0)},onBlur:F=>{y&&!M?.current?.contains(F.relatedTarget)&&B(null),F.relatedTarget&&w(!1)},...z,children:O})})),_l="_movable-area_314c6_5",Sr=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:q=!1,disableResize:h=!1,className:f,style:I,renderDirections:S=["nw","n","ne","w","e","sw","s","se"],onFirstRender:D,...z}=e,W=n.getBounds(),K=r.useCallbackRef(D,[D]),y=r.useCallbackRef(m,[m]),B=r.useCallbackRef(p,[p]),[R,w]=o.useState([]),[M,O]=o.useState(!1),[F,A]=o.useState(!1),_=o.useRef(!0),G=o.useRef(new Map),P=o.useRef(new Map),V=o.useRef(new Map),$=o.useRef(new Map),te=o.useRef(new Map),N=o.useRef({onRequestFocus:J=>(ce(J),null)}),x=o.useRef(null),H=o.useRef(null),re=o.useRef(null),[ye,ne]=o.useReducer(J=>J+1,0);o.useLayoutEffect(()=>{ne()},[n,i]),tt(i,{onCollectionChange:()=>{const J=i.search({address:n.getVisibleRangeCoords(),excludeHidden:!0}),Ie=te.current;Ie.forEach(ke=>{ke()}),Ie.clear();const Ve=N.current;for(let ke=0;ke<J.length;ke++){const ze=J[ke];if(ze.isClosed())continue;const Ae=ze.addListeners(Ve);Ie.set(ze,Ae)}ne()},onInvalidated:()=>{ne()}}),tt(a,{onMovableSelectionChange(J){ae(),ne()}});const X=o.useCallback((J,Ie)=>{const Ve=V.current.get(J);re.current&&(re.current.getTargets().forEach(ke=>{if(ke===Ve)return ke.style.left=Ie.x+"px",ke.style.top=Ie.y+"px",ke.style.width=Ie.width+"px",void(ke.style.height=Ie.height+"px")}),re.current.updateRect())},[]),ae=()=>{const J=[],Ie=a.getMovableSelection();Ie.forEach(Ve=>{const ke=V.current.get(Ve);ke&&Ie.indexOf(Ve)!==-1&&J.push(ke)}),w(Ve=>ue.CommonUtils.isEqualArrays(Ve,J)?Ve:J)},Me=o.useRef(null),Te=o.useMemo(()=>new Promise(J=>{Me.current=J}),[]),fe=o.useRef(null),Be=r.useCallbackRef(async(J,Ie)=>{fe.current=Ie,await(async()=>!(!await Te.then()||!re.current))()&&fe.current===Ie&&re.current.dragStart(J,Ie)},[R]),[pe,Pe]=o.useState(!1),Se=o.useRef(null),ge=o.useRef(null),ce=r.useCallbackRef(async(J=null)=>{if(J||(J=a.getMovableSelection()[0]),!J)return y?.(),!1;const Ie=V.current.get(J);Ie?(await ue.CommonUtils.whenFocus(Ie),Ie.focus(),ge.current=Ie,Se.current=null):Se.current=J},[a]);o.useEffect(()=>{pe&&R.length>0&&ge.current!==R[0]&&ce(),_.current&&(K?.(),_.current=!1)},[R]);const we=o.useMemo(()=>{const J=i.search({address:n.getVisibleRangeCoords(),excludeHidden:!0});if(J.length===0&&G.current.size===0)return null;const Ie=(k,oe,j,Y=!0)=>{const u=k.isSelected(),T={tabIndex:j,view:n,movable:k,onRefLoad:E=>{Se.current===k&&(E.focus(),ge.current=E,Se.current=null),V.current.set(k,E),P.current.set(E,k),oe.rendered=!0,ae()},onRefUnload:E=>{V.current.delete(k),P.current.delete(E),oe.rendered=!1,ae()},onUnFocus:y,onHide:E=>{oe.onHide=E},onShow:E=>{oe.onShow=E},isDragging:u&&(F||M),disabled:g,renderMovable:l,updateFrameBounds:E=>{X(k,E)},dragStart:Be,onMouseUp:()=>{if(fe.current=null,H.current){O(!1),A(!1);let E=!1;$.current?.forEach(b=>{ue.CommonUtils.isEqualBounds(b.movable.getBounds(),b.startBounds)||(E=!0)}),E?be():Fe()}},style:{opacity:Y?M&&u?.7:void 0:0,zIndex:M&&u?k.getZIndex()+J.length:void 0,pointerEvents:Y?void 0:"none",cursor:F&&u?"grabbing":g||q?"initial":"move",boxShadow:!u||F&&!M?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Gl,{...T},`movable-${k.getUUID()}`)},Ve=G.current,ke=new Map,ze=[];for(let k=0;k<J.length;k++){const oe=J[k];if(oe.isClosed())continue;let j=Ve.get(oe);j||(j={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(Y,u)=>{if(!u||u.shown===!0)return;u.shown=!0;const T=++u.visibilityRequestId;requestAnimationFrame(()=>{const E=G.current.get(Y);E&&T===u.visibilityRequestId&&(u.onShow?.(Y),E.shown=!0)})},doHide:async(Y,u)=>{if(!u||u?.shown===!1)return;u.shown=!1;const T=++u.visibilityRequestId,E=await Promise.resolve(u.onHide?.(Y));T===u.visibilityRequestId&&E!==!1&&(u.shown=!1,G.current.delete(Y),ne())},visibilityRequestId:0}),j.frame=Ie(oe,j,k,!0),ze.push(j.frame),j.doShow(oe,j),Ve.delete(oe),ke.set(oe,j)}const Ae=[];return a.getMovableSelection().forEach(k=>{const oe=Ve.get(k);oe&&(oe.frame=Ie(k,oe,-1,!1),Ae.push(oe.frame),Ve.delete(k),ke.set(k,oe))}),Ve.forEach((k,oe)=>{k.frame=Ie(oe,k,-1,!1),Ae.push(k.frame),k.doHide(oe,k),Ve.delete(oe),ke.set(oe,k)}),G.current=ke,ae(),[...Ae,...ze]},[ye,n,l,g,q,h,M,F]),de=r.useCallbackRef((J,Ie)=>{const Ve=`${Ie} ${R.length===1?s.TextUtils.capitalize(P.current?.get(R[0]).getContent().getType()):"Drawings"}`;H.current&&(console.warn(`Transaction ${H.current.getDescription()} is being replaced by ${Ve}`),H.current.rollback(),H.current=null),H.current=d.beginCommit({description:Ve}),$.current.clear();for(let ke=0;ke<R.length;ke++){const ze=R[ke],Ae=P.current?.get(ze);Ae?$.current.set(ze,{movable:Ae,startBounds:n.toViewBounds(Ae.getBounds())}):console.warn("invalid element",Ae)}},[d,n,R]),be=o.useCallback(()=>{if(!H.current)return;const J=[];$.current?.forEach(Ie=>{J.push(Ie.movable)}),H.current.commit({viewAfter:{view:a,movableSelection:J}}),$.current.clear(),H.current=null},[]),Fe=o.useCallback(()=>{H.current&&(H.current.rollback(),H.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=J=>{J.preventDefault(),J.srcElement.scrollTop=0,J.srcElement.scrollLeft=0})},[ve.current]);const Ee=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ce,focus:()=>{ce()}}),[a]),[Oe,He]=o.useState(null),C=o.useRef(!1),Ue=o.useRef(!1),Qe=o.useRef(!1);o.useEffect(()=>{if(g||R.length===0||Qe.current||C.current)return;if(Ue.current)return void requestAnimationFrame(()=>{re.current&&x.current&&re.current.refTargets.length>0&&(Qe.current=!0,Me.current?.(!0)),w([...R])});C.current=!0;const J=o.lazy(async()=>{try{const Ie=await Promise.resolve().then(()=>require("./C_lMEo0Cjr7rC6jW.cjs"));return C.current=!1,Ue.current=!0,w([...R]),Ie}catch(Ie){return console.warn(Ie),Me.current?.(!1),null}});He(J)},[R,g,q,h]);const $e=o.useMemo(()=>!Oe||g?null:c.jsx(o.Suspense,{children:c.jsx(Oe,{className:bt({dragging:M||F,resizing:M,moving:F}),container:null,ref:re,target:re.current?R:[],draggable:!g&&!q,resizable:!g&&!h,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:S,onResizeStart:J=>{de(J.target,"Resize")},onResize:J=>{if(!H.current)return J.stopDrag(),void ne();O(!0);const Ie=J.direction[0]!==0&&J.direction[1]!==0;let Ve=0,ke=0;for(let ze=0;ze<R.length;ze++){const Ae=R[ze],k=$.current.get(Ae),oe=P.current.get(Ae);if(!k||!oe){console.warn("invalid element");continue}let j=J.dist[0],Y=J.dist[1],u=J.drag.dist[0],T=J.drag.dist[1],E=k.startBounds.width,b=k.startBounds.height;ze===0?(Ve=E,ke=b):(j*=E/Ve,u*=E/Ve,Y*=b/ke,T*=b/ke);const L={...k.startBounds};if(L.width=Math.max(0,E+j),L.height=Math.max(0,b+Y),J.direction[0]===-1&&(L.width=Math.max(0,Math.min(k.startBounds.x+E,E-u))),J.direction[1]===-1&&(L.height=Math.max(0,Math.min(k.startBounds.y+b,b-T))),Ie&&(oe.isLockAspectRatio()||J.inputEvent?.shiftKey)){const v=E/b,U=L.width/L.height;U>v?L.height=L.width/v:U<v&&(L.width=L.height*v)}J.direction[0]===-1&&(L.x=Math.max(0,Math.min(k.startBounds.x+E,k.startBounds.x+E-L.width))),J.direction[1]===-1&&(L.y=Math.min(k.startBounds.y+b,k.startBounds.y+b-L.height)),k.movable.setBounds(n.toAbsoluteBounds(L))}},onResizeEnd:J=>{O(!1),be()},onDragStart:J=>{de(J.target,"Move")},onDrag:J=>{if(!H.current)return J.stopDrag(),void ne();A(!0);for(let Ie=0;Ie<R.length;Ie++){const Ve=R[Ie],ke=$.current.get(Ve);ke?ke.movable.setBounds(n.toAbsoluteBounds({...ke.startBounds,x:ke.startBounds.x+J.translate[0],y:ke.startBounds.y+J.translate[1]})):console.warn("invalid element")}},onDragEnd:J=>{},onMouseUp:J=>{}})}),[ye,Oe,R,n,g,q,h,M,F]);return c.jsx("div",{className:bt(f,"movable-area",_l),style:{width:W.width,height:W.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Wt([Ee,ve]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:W.width,height:W.height},...z,children:c.jsxs("div",{ref:x,style:{position:"absolute",pointerEvents:"auto"},onFocus:J=>{B?.(),Pe(!0)},onBlur:J=>{Pe(!1)},onKeyDownCapture:J=>{if(J.isDefaultPrevented())return;const Ie=J.nativeEvent.ctrlKey,Ve=J.nativeEvent.altKey,ke=J.nativeEvent.shiftKey;if(J.which===r.KeyCodes.Escape){const j=a.getMovableSelection();let Y=[...j];return R.forEach(u=>{if(Y.length===0)return;const T=P.current.get(u);let E=Y.indexOf(T);Y.splice(E,1)}),Y.length!==j.length&&a.selectMovables(Y),Y.length===0&&y?.(),void J.preventDefault()}const ze=.1,Ae=j=>{i.updateSelected(Y=>{Y.setRotation(Y.getRotation()+j)},"Rotate")},k=(j,Y=!0)=>{i.updateSelected(u=>{const T=u.getBounds();let E=1+j;Y||(E=1/E);const b=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),L=Math.atan2(T.height,T.width),v=E*b;if(v<10)return;const U=v*Math.cos(L),Z=v*Math.sin(L),ee={x:T.x+(T.width-U)/2,y:T.y+(T.height-Z)/2,width:U,height:Z};u.setBounds(ee)},"Resize")},oe=j=>{i.updateSelected(Y=>{const u=Y.getBounds(),T={x:u.x+(j.x??0),y:u.y+(j.y??0),width:u.width+(j.width??0),height:u.height+(j.height??0)};Y.setBounds(T)},"Nudge")};if(J.which===r.KeyCodes.Delete)i.updateSelected(j=>{j.delete()},"Delete"),J.preventDefault();else if(J.key==="a"&&Ie){const j=a.getMovableSelection();a.selectMovables(i.search(),!0),a.selectMovables(j,!0),J.preventDefault()}else J.key==="ArrowLeft"?(ke?k(ze,!1):Ve?Ae(-10):oe({x:Ie?-10:-1}),J.preventDefault()):J.key==="ArrowRight"?(ke?k(ze,!0):Ve?Ae(10):oe({x:Ie?10:1}),J.preventDefault()):J.key==="ArrowUp"?(ke?k(ze,!0):oe({y:Ie?-10:-1}),J.preventDefault()):J.key==="ArrowDown"&&(ke?k(ze,!1):oe({y:Ie?10:1}),J.preventDefault())},children:[we,$e]})})})})),Ht=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}},Ko=(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],I=f.getBounds();d+=I[l],m=Math.min(I[i],m),p=Math.max(I[i]+I[l],p),n.push({bounds:I,movable:f})}const g=(p-m-d)/(e.length-1);n.sort((h,f)=>{const I=h.bounds[i],S=f.bounds[i];return I!==S?I-S:h.bounds[a]-f.bounds[a]});const q=new Map;q.set(n[0].movable,n[0].bounds);for(let h=1;h<n.length-1;h++){const f=n[h-1].bounds,I={...n[h].bounds};I[i]=f[i]+f[l]+g,n[h].bounds=I,q.set(n[h].movable,I)}return q.set(n[n.length-1].movable,n[n.length-1].bounds),q};function Rr(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,R=null,w=!0)=>{const M=async()=>{const O=await Promise.resolve(m?.showBusy?.(y.label()));try{await B();const F=R??y?.label?.();if(d){let A=null;y&&F!==!1&&(A=new r.SimpleCommand(y.key(),l,{label:F,description:F},M)),d(A)}O?.(),w&&p.setMode(null)}catch(F){O?.(),m?.showError?.(F)}};await M()},[d,m]),[q,h]=o.useReducer(y=>y+1,0),f=r.useCallbackRef((y,B,R)=>{if(!n)return;const w=n.getMovableSelection();if(w.length===0)return;let M="Drawings";if(w.length===1){const F=w[0];M=s.TextUtils.capitalize(F.getContent().getType())??"Drawing"}const O=`${y.label()} ${M}`;g(y,()=>{let F=null;i&&(F=i.beginCommit(O));const A=n.getMovableSelection();if(A.length===0)return;const _=R?.(A);for(let G=0;G<A.length;G++){const P=A[G];B(P,_)}F?.commit()})},[n,i]),[I,S]=o.useState(n.getMovableSelection()[0]??null),[D,z]=o.useState(!I||I?.isProtected()),W=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})},Ht)}),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})},Ht)}),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})},Ht)}),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})},Ht)}),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})},Ht)}),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})},Ht)}),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=>Ko(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=>Ko(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,I]);o.useEffect(()=>{},[p]);const K=o.useMemo(()=>{let y=null;return y=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),y.addCommands(W,!0),y},[a,W]);return tt(I,{onAnyChange:()=>{K.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===s.IAnchored.Type.TwoCell}),K.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===s.IAnchored.Type.OneCell}),K.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===s.IAnchored.Type.Absolute}),K.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===s.IAnchored.Type.Absolute}),K.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:y=>{z(y.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const y=n.getMovableSelection()[0]??null;S(y),z(!y||y.isProtected()),h()}}),tt(t,{onCollectionChange:()=>{h()}}),o.useEffect(()=>{const y={disabled:D};K.getCommand("formatAnchorTypeTwoCell").update(y),K.getCommand("formatAnchorTypeOneCell").update(y),K.getCommand("formatAnchorTypeAbsolute").update(y),K.getCommand("toggleLockAspectRatio").update(y);const B=t.getCount(),R=n.getMovableSelection(),w=D||B<=1||R.length===0;let M={disabled:w},O=M;if(!w&&R.length===1){const _=R[0];_.getZIndex()===0&&(M={disabled:!0}),_.getZIndex()===B-1&&(O={disabled:!0})}K.getCommand("moveToFront").update(O),K.getCommand("moveForward").update(O),K.getCommand("moveToBack").update(M),K.getCommand("moveBackward").update(M);const F={disabled:D||R.length<=1};K.getCommand("formatDrawAlignLeft").update(F),K.getCommand("formatDrawAlignCenter").update(F),K.getCommand("formatDrawAlignRight").update(F),K.getCommand("formatDrawAlignTop").update(F),K.getCommand("formatDrawAlignMiddle").update(F),K.getCommand("formatDrawAlignBottom").update(F),K.getCommand("formatDrawFlipHorz").update(F),K.getCommand("formatDrawFlipVert").update(F),K.getCommand("formatDrawGroup").update(F),K.getCommand("formatDrawUngroup").update(F),K.getCommand("formatDrawSwapShapes").update(F),K.getCommand("formatDrawSwapShapesHorz").update(F),K.getCommand("formatDrawSwapShapesVert").update(F);const A={disabled:D||R.length<=2};K.getCommand("formatDrawDistributeHorz").update(A),K.getCommand("formatDrawDistributeVert").update(A)},[q,D,q]),K}const Zl=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 q=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[h,{height:f,width:I}]=zt();return c.jsx("div",{...g,ref:Wt([q,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})})})})),Xl=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:d,target:m,notifier:p,onRepeatCommandChange:g}=e,q=Rr({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(Sr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{q.activate(),a?.onFocus?.()}},"movable-area"),[i,a,d,q]);return h&&n?h:null})),Yl=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,q=r.useEditMode(),[h,f]=o.useState(null),[I,S]=o.useState(null),[D,z]=o.useState(null),[W,K]=o.useState(null),[y,B]=o.useState(null);o.useLayoutEffect(()=>{if(D===null)return K(null),void B(null);const x=()=>{const H=i.getRange(D).getCell(),re=H.getStyle();let ye,ne=re.getFill()?.toCSS(a.body.darkMode);ne.background!=="none"&&ne.background!=="transparent"||(ne=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),ne.background!=="none"&&ne.background!=="transparent"||(ne={background:a.body.fill}),K({style:ne}),H&&!H.getFormula()&&(ye=H?.getRenderHorizontalAlignment()),B(ye??r.HorizontalAlignment.Left)};return x(),i.getRange(D).addListener(()=>{x()})},[i,D,a?.body]);const R=r.useCallbackRef(()=>{let x=I.editState.dirty??"";if(I.editState.dirty!==void 0){const H=s.TextUtils.clampString(x);try{const re=I.sheet.getRange(I.coords),ye=`Typing '${H}' into ${re.toString()}`;return re.setValue(x,{description:ye,autoFit:!0}),z(null),S(null),q.setMode(null),m(null),!0}catch(re){throw g.showError(new Error(`Unable to enter '${H}'.`,{cause:re})),re}}},[i,I,g]),w=r.useCallbackRef(x=>i.getRange(x).getCell().getExtrusions()??ue.CoordUtils.cellToRange(x),[i]),M=r.useCallbackRef(x=>{let H=s.IRange.Orientation.Row,re=!1;x!==s.IRange.Direction.Up&&x!==s.IRange.Direction.Down||(H=s.IRange.Orientation.Column),x!==s.IRange.Direction.Left&&x!==s.IRange.Direction.Up||(re=!0),i.getSelection().traverse(H,re)},[i]),O=o.useCallback((x,H)=>{if(l)return l(x,H);if(!i)return null;const{ref:re,...ye}=x;return c.jsx(pr,{ref:re,...ye,sheet:i,bodyStyle:a?.body,activeCoords:H,commands:p,onChangeEdit:ne=>{const X={sheet:i,coords:H,editState:ne};q.setMode(ae=>({...ae,description:X.editState.editMode?"Edit":"Enter",args:{...ae?.args,stateAndCoords:X}}))},editState:I.editState})},[i,W,l,I,D]),{overlay:F,startEdit:A,submitEdit:_,cancelEdit:G,onKeyboardEventNative:P,onPointerEventNative:V}=dt.useKeyboardEditorOverlay({view:n,activeCoords:h,getCellEditor:O,canEdit:()=>{const x=i.getProtection();if(x.isReadOnly())return!1;const H=x.isLocked();return H&&d(),!H},onBeforeStartEdit:x=>{const H=vr(()=>i.getRange(x).getCell()),re={sheet:i,coords:x,editState:Object.freeze(H)};q.setMode({key:"edit",args:{stateAndCoords:re}}),S(re)},onStartEdit:x=>{z(x),m(x)},onSubmitEdit:R,onCancelEdit:x=>{z(null),S(null),q.setMode(null),m(null)},onDoneEdit:x=>{q.setMode(null)},onNavigate:M,containerProps:W,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:y,getRangeCoords:w});tt(i.getSelection(),{onChange(x){f(i.getSelection().getCoords().cell)}});const $=r.useCallbackRef(x=>{V(x),D&&_()},[V,G,D]),te=o.useCallback(x=>{V(x)},[V]),N=o.useCallback(x=>{P(x)},[P]);return o.useEffect(()=>{const x=n?.getStage();if(x)return x.addEventListener("pointerdown",$),x.addEventListener("dblclick",te),x.addEventListener("keydown",N),()=>{x.removeEventListener("pointerdown",$),x.removeEventListener("dblclick",te),x.removeEventListener("keydown",N)}},[n?.getStage()]),o.useEffect(()=>{const x=q.getMode(),H=x?.key;H==="edit"||H==="enter"?I?x.args?.cancel?G():x.args?.submit?_():S(x.args?.stateAndCoords):A(x.args?.start):D&&G()},[q]),F(n,t)})),kr="white",Mr="black",Jl=`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='${Mr}' fill='${kr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,Ql=`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='${Mr}' fill='${kr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ei=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),[q,h]=o.useState(null),[f,I]=o.useState(null),S=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const R=i.getTables().search({address:n.getVisibleRangeCoords()});m(R.length>0?R:null)}else l(!1),m(null)},[i,n]),D=r.useCallbackRef(R=>{R.preventDefault(),R.stopPropagation();const w=n.getCellCoordsFromClient(R.clientX,R.clientY),M=i.getTables().search({address:w});M.length===1&&M[0].select()},[n,i]),z=r.useCallbackRef(R=>{R.preventDefault(),R.stopPropagation();const w=n.getCellCoordsFromClient(R.clientX,R.clientY),M=i.getTables().search({address:w});if(M.length===1){const O=M[0].getRange().getCoords(),F={colStart:O.colStart,rowStart:w.rowIndex,colEnd:O.colEnd,rowEnd:w.rowIndex};i.getRange(F).select()}},[n,i]),W=r.useCallbackRef(()=>{if(!a)return;const R=i.getTables().search({address:n.getVisibleRangeCoords()});m(R.length>0?R:null)},[i,a,n]);tt(i?.getSelection(),{onChange(R){g(i.getSelection().getCoords().cell)}}),tt(q,{onAnyChange(R){S(),W()}}),tt(f,{onAnyChange(R){W()}}),tt(i,{onTablesChange(R){S(),W()},onInvalidated(R){S(),W()}});const K=o.useMemo(()=>ue.CommonUtils.debounce(ue.CommonUtils.throttle(W,300),300),[]);o.useEffect(()=>{K()},[n]),o.useEffect(()=>{let R=null;if(d)for(let w=0;w<d.length&&!R;w++){const M=d[w],O=M.getRange().getCoords();s.CoordUtils.isCellWithinRange(p,O)&&(R=M)}h(R)},[p,d]);const y=r.useCallbackRef(R=>{let w=null;if(d)for(let M=0;M<d.length;M++){const O=d[M],F=O.getRange().getCoords();let A=n.getRangeCoordsBounds(F);const _=n.getRelativePointFromClient(R.clientX,R.clientY),G=_.x,P=_.y;if(G>=A.x&&G<=A.x+A.width&&P>=A.y&&P<=A.y+A.height){const V=n.getViewportSize();G<=0||P<=0||G>=V.width||P>=V.height||(w=O)}}I(w)},[n,d]);if(o.useEffect(()=>{const R=n?.getStage();if(R&&d)return R.addEventListener("mousemove",y),R.addEventListener("mouseleave",y),()=>{R.removeEventListener("mousemove",y),R.removeEventListener("mouseleave",y)}},[d,n?.getStage()]),!n||!d||d.length===0)return null;const B=[];for(let R=0;R<d.length;R++){const w=d[R];if(w.isClosed())continue;const M=w===f,O=w===q,F=w.getRange().getCoords(),A=n.getRangeCoordsBounds(F);let _;if(M||O){const G=w.getStyle().getProperties(),P=G.headerRow?.fill?.background??G.wholeTable?.border?.top?.color?.toString();if(P&&i){const V=i.getStyles().parseColor(P);V&&(_=V.toCSS())}_||(_="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}B.push(c.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,width:Math.min(16,A.width),height:A.height,pointerEvents:"all",cursor:Jl},onMouseDown:z},`table-select-row-${w.getName()}`)),B.push(c.jsx("div",{style:{position:"absolute",left:A.x,top:A.y,width:Math.min(16,A.width),height:Math.min(16,A.height),pointerEvents:"all",cursor:Ql},onMouseDown:D},`table-select-${w.getName()}`)),B.push(c.jsx(dt.Selection,{x:A.x,y:A.y,width:A.width,height:A.height,range:F,strokeWidth:O?.5:0,stroke:_??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:M?`${_} 0px 0px 1px 1px`:void 0}},`table-outline-${w.getName()}`))}return B})),ti=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),q=r.useCallbackRef(()=>{const z=i.getSelectedCell(),W=z.getSpill()?.getCoords()??null;ue.CoordUtils.isEqualRanges(W,l)||(p(W?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds(W),coords:W}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),d(W))},[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(q,80),80),[]);if(tt(i?.getSelection(),{onChange(z){h()}}),tt(i,{onSpillsChange(z){q()},onInvalidated(z){q()}}),!n||!l&&!m)return null;const f=i.getRange(l).getValue()instanceof s.FormulaError.Spill,I=[];let S=m?.bounds??n.getRangeCoordsBounds(l);if(m&&!ue.CommonUtils.isEqualBounds(m.bounds,n.getRangeCoordsBounds(m.coords))&&p(null),S=n.toClipBounds(S,-10),!S)return;const D="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(dt.Selection,{x:S.x,y:S.y,width:S.width,height:S.height,range:l,strokeWidth:1,stroke:D,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:`${D} 0px 0px 4px 0px`}},"spill-outline}")),I})),ni={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},oi={fireOnModelChange:!1},Wo={},Tr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Wo,headersStyle:a=Wo,onSheetContextMenu:l,showColumnHeaders:d,columnHeaderProps:m,showRowHeaders:p,rowHeaderProps:g,showScrollbars:q=!0,scrollPaneProps:h,onViewportChange:f,commands:I,onRepeatCommandChange:S,onMoveCell:D,overlays:z,renderMovable:W,viewportComponent:K,onElementLoad:y,getCellEditor:B,onFocus:R,onBlur:w,style:M=r.ReactUtils.EmptyCssProperties,notifier:O,onShowTooltip:F,onShowColumnTooltip:A,onShowRowTooltip:_,onCloseTooltip:G,gridProps:P,cellRenderProps:V,...$}=e;if(o.useEffect(()=>{s.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[te,N]=o.useReducer(Q=>Q+1,0),[x,{width:H,height:re}]=zt(),ye=r.useCallbackRef(F,[F]),ne=r.useCallbackRef(A,[A]),X=r.useCallbackRef(_,[_]),ae=r.useCallbackRef(G,[G]),Me=o.useRef(!1);o.useLayoutEffect(()=>{Me.current=!0},[n]);const Te=n?.getStyles(),fe=o.useMemo(()=>$o(i,Te),[i,Te]),Be=o.useMemo(()=>$o(a,Te),[a,Te]),{body:pe={},buttonSurface:Pe={}}=fe,{header:Se={},headerSelect:ge={},headerSelectAll:ce={}}=Be,we=o.useRef(null),[de,be]=o.useState(()=>n?.getView()),Fe=(de?.getZoomScale()??100)/100,ve=o.useMemo(()=>({vertical:de.isShowColumnGridlines()&&Fe>=.4,horizontal:de.isShowRowGridlines()&&Fe>=.4}),[de?.isShowColumnGridlines(),de?.isShowRowGridlines(),Fe]),Ee=o.useMemo(()=>{if(de?.getGridLineColor())return{strokeDasharray:"1,1"}},[de?.getGridLineColor(),fe]),Oe=d??de?.isShowColumnHeaders(),He=p??de?.isShowRowHeaders(),[C,Ue]=o.useState({width:0,height:0}),Qe=o.useMemo(()=>{let Q=40,qe=20;const Re=n?.getStyles().getNormal().getFont();if(C.width>0&&C.height>0){const Ke=Re?.toCSS()?.fontFamily??fe.header.text.fontFamily,Ze=Re?.getSize()??fe.header.text.fontSize,et=s.IFont.getSharedMeasurer()(""+C.height,Math.ceil(Ze*s.IFont.getDeviceScale()),Ke);Q=et.width,qe=et.lineHeight}return{width:Math.round(Q+5),height:Math.round(qe+3)}},[C,fe?.header.text,n]),$e=He?Fe*Qe.width:Se.edgeStrokeWidth,J=Oe?Fe*Qe.height:Se.edgeStrokeWidth,Ie=Math.max(H,(n?.getColumnHeaders().getDefaultSize()??Qe.width)+$e+1),Ve=Math.max(re,(n?.getRowHeaders().getDefaultSize()??Qe.height)+J+1),ke=o.useRef(new Map),ze=o.useRef(null),Ae=()=>({getColOffset:Q=>n.getColumnHeaders().findOffset(Q),getColIndex:Q=>n.getColumnHeaders().findIndex(Q),getRowOffset:Q=>n.getRowHeaders().findOffset(Q),getRowIndex:Q=>n.getRowHeaders().findIndex(Q)}),[k,oe]=o.useState(()=>Ae()),[j,Y]=o.useState(!1),[u,T]=o.useState(null),E=!0,b=fe.selection?.strokeFill,L=o.useCallback(()=>kt.current,[]),[v,U]=o.useState(),Z=r.useCallbackRef(Q=>{U(Q),n&&n.getView()&&n.getView().setTopLeft(Q?{left:Q.left,top:Q.top}:null),f?.(Q)},[n,f]),ee=o.useRef(null);o.useEffect(()=>{if(!v||!n)return;const Q=n.getRangeAtBounds({x:v.left,y:v.top,width:v.width,height:v.height});ee.current?.(),ee.current=Q.addListener(()=>{const qe=Q.getCoords();we?.current?.invalidate(qe)})},[v,n]);const[le,ie]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(Q=>{const qe=ue.CoordUtils.cellToRange(Q);if(n.isClosed())return qe;const Re=n.getRange(qe,{excludeHidden:!0}).getMerges();return Re.length===0?qe:Re[0]},[n]),Ce=Q=>{if(!Q||Q.coords.colIndex===0&&Q.coords.rowIndex===0)return null;const qe={};return Q.coords.colIndex>0&&(qe[ue.AnchorLocation.Left]={index:Q.coords.colIndex,scrollOffset:Q.topLeft.left}),Q.coords.rowIndex>0&&(qe[ue.AnchorLocation.Top]={index:Q.coords.rowIndex,scrollOffset:Q.topLeft.top}),qe},[he,me]=o.useState(()=>Ce(n.getView().getFreezePanes())),xe=r.useEditMode(),Le=o.useCallback(()=>we.current,[]),De=r.useCallbackRef(Q=>{xe.setMode(qe=>qe?.key==="edit"?{...qe,args:{...qe.args}}:{key:"edit",args:{stateAndCoords:null,start:Q}})},[]),We=r.useCallbackRef(()=>v,[v]),je=xr({sheet:n,commands:I,target:Le,onRepeatCommandChange:S,bodyStyle:pe,notifier:O,onStartEdit:De,getViewport:We}),[Ge,Ne]=o.useState(n.getSelection().isEntire()),[Xe,it]=o.useState(de?.getMovableSelection().length>0),pt=u!==null||Xe,wt=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]),yt=o.useMemo(()=>{const Q=xe.getMode();return Q?.cursor?Q.cursor:null},[wt,xe]),[Ct,gt]=o.useState(null),lt=o.useRef(!1),[Tt,Lt]=o.useState([]),Zt=o.useRef(null),[Ft,Xt]=o.useState(ue.TypesUtils.EmptyTopLeft),[Mt,vn]=o.useState(ue.TypesUtils.EmptyTopLeft);o.useEffect(()=>{Xt({left:le?.left,top:0})},[le?.left]),o.useEffect(()=>{vn({left:0,top:le?.top})},[le?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{me(Ce(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(){be(n.getView()),oe(Ae())},onLayoutChange:()=>{const Q=n.getEntireRange();Ue({height:Q.getRowCount(),width:Q.getColumnCount()}),oe(Ae())},onStyleChange:()=>{At()},onMovablesChange:()=>{},onInvalidated:()=>{At()}}),tt(n,{onRequestScrollIntoView:async(Q,qe)=>{if(!qe)return;const Re={colIndex:qe?.coords.colStart,rowIndex:qe?.coords.rowStart};return await we.current?.scrollCellCoordsIntoView(Re,qe?.scroll),!0},onRequestFocus:()=>ue.CommonUtils.whenFocus(kt.current)},oi);const Cn=o.useMemo(()=>{const Q=(Re,Ke)=>{lt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:0,rowEnd:C.height,colStart:Re,colEnd:Re})))return;const et=Ze.getLayout(),ot=Math.max(0,et.getColOffset(Re)),Je=Ze.getBounds(),st=Math.min(Je.x+Je.width,et.getColOffset(Re+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Left||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Right)){const Xn=ue.CommonUtils.roundAccurately(Ke*ue.CommonUtils.getDPI(),0),qn=ue.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ke/Fe),2).toFixed(2),Yn="Width: "+(Ke?qn+" ("+Xn+" pixels)":"Hidden"),nn=Vt.current.getGridElement().getRelativePointFromClient(0,0),Pt=0-nn.y,Sn=0-nn.y+J,Jn={x:ot-(nn.x-Je.x),y:Pt,width:st-ot,height:Sn-Pt};requestAnimationFrame(()=>{lt.current&&ne?.({anchor:Jn,display:Yn})})}const It=[0,0,0,Je.height],tn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Gn={x:ot-1,y:0,width:1,height:Je.height},_n={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Zn={x:st-1,y:0,width:1,height:Je.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Gn,...tn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Zn,..._n})]},"resize-dividers")}])};let qe=null;return{onResizeHeadersStart:(Re,Ke,Ze)=>{qe=n.beginCommit(Ze),Q(Re,Ke)},onResizeHeaders:(Re,Ke,Ze)=>{Q(Re,Ke)},onResizeHeadersDown:(Re,Ke)=>{Q(Re,Ke)},onResizeHeadersEnd:(Re,Ke,Ze)=>{qe?.commit({description:Ze}),qe=null,requestAnimationFrame(()=>ae?.()),lt.current=!1,gt(null)},onResizeHeadersUp:Re=>{requestAnimationFrame(()=>ae?.()),lt.current=!1,gt(null)},...m}},[n,m,J,Ct]),Ot=o.useMemo(()=>{const Q=(Re,Ke)=>{lt.current=!0,gt([Ze=>{if(!Ze.toClipBounds(Ze.getRangeCoordsBounds({rowStart:Re,rowEnd:Re,colStart:0,colEnd:C.width})))return;const et=Ze.getLayout(),ot=Math.max(0,et.getRowOffset(Re)),Je=Ze.getBounds(),st=Math.min(Je.y+Je.height,et.getRowOffset(Re+1)),mt=Ze.getAnchor();if(Ke!==null&&(mt===ue.AnchorLocation.Top||mt===ue.AnchorLocation.Center||mt===ue.AnchorLocation.Bottom)){const Xn=Math.floor(10*ue.CommonUtils.getDPI())/10,qn=ue.CommonUtils.roundAccurately(Ke*Xn,0),Yn=ue.CommonUtils.roundAccurately(qn/Fe/(n?.getRowHeaders().getScaleFactor()*ue.CommonUtils.getDPI()),2).toFixed(2),nn="Height: "+(Ke?Yn+" ("+qn+" pixels)":"Hidden"),Pt=en.current.getGridElement().getRelativePointFromClient(0,0),Sn=0-Pt.x,Jn=0-Pt.x+$e,hl={x:Sn,y:ot-(Pt.y-Je.y),width:Jn-Sn,height:st-ot};requestAnimationFrame(()=>{lt.current&&X?.({anchor:hl,display:nn})})}const It=[0,0,Je.width,0],tn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Gn={x:0,y:ot-1,width:Je.width,height:1},_n={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:b}},Zn={x:0,y:st-1,width:Je.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:It,bounds:Gn,...tn}),c.jsx(dt.SVGLine,{linePoints:It,bounds:Zn,..._n})]},"resize-dividers")}])};let qe=null;return{onResizeHeadersStart:(Re,Ke,Ze)=>{qe=n.beginCommit(Ze),Q(Re,Ke)},onResizeHeaders:(Re,Ke,Ze)=>{Q(Re,Ke)},onResizeHeadersDown:(Re,Ke)=>{Q(Re,Ke)},onResizeHeadersEnd:(Re,Ke,Ze)=>{qe?.commit({description:Ze}),qe=null,requestAnimationFrame(()=>ae?.()),lt.current=!1,gt(null)},onResizeHeadersUp:Re=>{requestAnimationFrame(()=>ae?.()),lt.current=!1,gt(null)},...g}},[n,g,$e]),kt=r.useImperativeElement(t,()=>{const Q=Re=>{n?.getView()&&n.getView().selectMovables([]),ze.current=null,we?.current?.focus(Re)},qe=async(Re=null)=>{if(Re||(Re=n?.getView().getMovableSelection()[0]),!Re)return!1;const Ke=Re.getAnchorCoords();if(!Ke)return!1;const Ze=we.current?.getViewFromCellCoords({colIndex:Ke.colStart,rowIndex:Ke.rowStart});if(!Ze)return!1;const et=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(Re)===-1&&n?.getView().selectMovables([Re]);let ot=ke.current?.get(et);return ot?.current?(await ot.current.focusMovable(Re),!0):(ze.current={movable:Re,anchor:et},!0)};return{getGridElement:()=>we.current,getRowHeaderElement:()=>en.current,getColumnHeaderElement:()=>Vt.current,rowHeaderHeight:()=>J,colHeaderWidth:()=>$e,startEdit:De,submitEdit:()=>{xe.setMode(Re=>Re?.key!=="edit"?Re:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{xe.setMode(Re=>Re?.key!=="edit"?Re:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:u!==null,focus:Re=>{n?.getView().getMovableSelection().length>0&&qe()||Q(Re)},focusSheet:Q,focusMovable:qe,contains:Re=>we?.current?.contains?.(Re),invalidate:At,isSheetElement:()=>!0,getSheet:()=>n}},[n]),At=o.useCallback(Q=>{Me.current||(we?.current?.invalidate(Q),N?.())},[]);o.useEffect(()=>{At()},[fe]);const Yt=Ge?ce.edgeStrokeFill:Se.fill,Hn=Ge?ge.fill:typeof fe.headerHover=="function"?fe.headerHover(Se)?.fill:Se.fill,nt=o.useMemo(()=>K?c.jsx("div",{className:bt("sheetxl-viewport-overlay",Ml),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:K}):c.jsx(c.Fragment,{}),[K]);let Jt=null;Oe&&He&&(Jt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${J}px`,width:`${$e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:Q=>{let qe=!Q.ctrlKey;je?.getCommand("selectAll")?.execute(!qe||Q.button!==0),Q.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:-1,colIndex:-1}):we.current?.focus()},children:[c.jsx("div",{style:{height:J-5+"px",width:J-5+"px",clipPath:`path('M${J-5} 0 L0 ${J-5} L${J-5} ${J-5} L${J-5} 0 Z')`,borderRight:`2px solid ${Yt}`,borderBottom:`2px solid ${Yt}`,background:`${Hn}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${J}px`,width:`${$e}px`,boxSizing:"border-box",borderRight:`solid 1px ${Se.strokeFill}`,borderBottom:`solid 1px ${Se.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const jt=r.useCallbackRef(({_left:Q,_top:qe})=>{},[]),bn=r.useCallbackRef(Q=>{if(!l)return;const qe=we.current.getViewFromClient(Q.clientX,Q.clientY)?.getCellCoordsFromClient(Q.clientX,Q.clientY);qe&&(l({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:qe.rowIndex,colIndex:qe.colIndex}),Q.stopPropagation(),Q.preventDefault())},[l]),at=r.useCallbackRef(Q=>{if(!(!Q.shiftKey&&(Q.ctrlKey||Q.metaKey)))return;const{deltaY:qe}=Q;return qe>0?je.getCommand("sheetZoomOut")?.execute():qe<0&&je.getCommand("sheetZoomIn")?.execute(),qe===0},[je]);o.useEffect(()=>{Lt(null),Zt.current=null,lt.current=!1,gt(null);const Q=n?.getView().getTopLeft();jt(Q),we.current?.scrollTo(Q),ie(Q),be(n.getView()),me(Ce(n.getView().getFreezePanes())),oe(Ae()),N()},[n?.getView()]);const ht=r.useCallbackRef(Q=>{const qe=Q.getVisibleRangeCoords();if(!qe)return null;const Re=[];return n.getRange(qe).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()||de.isShowFormulas()&&Je.getFormula()!==null)return!0;const mt=Je.getValue();return mt!==null&&!(!de.isShowZeros()&&mt===0&&Je.getType()===s.ScalarType.Number)})(ot)&&Re.push({coords:et,value:ot,range:de.isShowFormulas()?null:ot.getExtrusions()})},{excludeHidden:!0,includeMergeOverflow:!0}),Re},[n,de.isShowZeros(),de.isShowFormulas(),u]);o.useEffect(()=>{const Q=[];z&&Q.push(...z),Ct&&Q.push(...Ct),ue.CommonUtils.isEqualArrays(Q,Zt.current)||(Zt.current=Q,Lt(Q))},[z,Ct,fe]);const Qt=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[fe?.header?.edgeStrokeFill]),yn=r.useCallbackRef(Q=>{Q.isDefaultPrevented()||Q.isPropagationStopped()||(ze.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),Bt=o.useMemo(()=>{const Q=xe.getMode();return Q?.key==="cut"||Q?.key==="copy"},[xe]),Un=r.useCallbackRef(async Q=>{const qe=xe.getMode();return Q.keyCode===r.KeyCodes.Escape&&qe?(Q.preventDefault(),void xe.setMode(null)):Q.keyCode===r.KeyCodes.Enter&&Bt?(Q.preventDefault(),await je?.getCommand("paste")?.execute(),void xe.setMode(null)):void je?.dispatchToFocusedCommand(Q)},[je,xe]),en=o.useRef(null),wn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${J+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${J}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Ho,{ref:en,sheetElement:kt.current,gridRef:we,freezeStart:he?.[ue.AnchorLocation.Top],oppositeSize:$e,containerWidth:$e,containerHeight:Ve,sheetHeader:n.getRowHeaders(),gridStyle:Be,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Mt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${J+1}px`,width:`${$e+Se.edgeStrokeWidth}px`,minWidth:`${$e+Se.edgeStrokeWidth}px`,borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,height:`calc(100% - ${J}px)`,boxSizing:"border-box",zIndex:"2",...Ot?.style},...Ot})}),[$e,J,Ve,n,Mt,he?.[ue.AnchorLocation.Top],fe,E,l,Se.fill,g]),Vt=o.useRef(null),xn=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${J+Se.edgeStrokeWidth}px`,minHeight:`${J+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Ho,{ref:Vt,sheetElement:kt.current,gridRef:we,freezeStart:he?.[ue.AnchorLocation.Left],oppositeSize:J,containerWidth:Ie,containerHeight:J,sheetHeader:n.getColumnHeaders(),gridStyle:Be,scrollPoint:Ft,onSheetContextMenu:l,...Cn,style:{...Cn?.style,position:"relative",left:"0px",width:"100%",height:`${J+Se.edgeStrokeWidth}px`,minHeight:`${J+Se.edgeStrokeWidth}px`,borderBottom:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[J,Ie,n,Ft,he?.[ue.AnchorLocation.Left],fe,Se.fill,E,l,m]),al=r.useCallbackRef(Q=>{const{value:qe,key:Re,...Ke}=Q;let Ze=qe,et=u;if(!et||et.colIndex===Q.coords.colIndex&&et.rowIndex===Q.coords.rowIndex||(et=null),!Ze){const st=Q.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===Q.range.colStart&&et.rowIndex===Q.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const Je=n.getStyles();return o.createElement(fr,{...Ke,key:Re,bodyStyle:pe,docTheme:Je.getTheme(),normalStyle:Je.getNormal(),showFormulas:de.isShowFormulas(),showZeros:de.isShowZeros(),onLinkMouseDown:ot,...V,value:Ze})},[n,k,pe,u,de?.isShowFormulas(),de.isShowZeros()]),sl=o.useCallback((Q,qe)=>{const{key:Re,...Ke}=Q;return[c.jsx(El,{ref:qe,getVisibleCells:ht,sheet:n,gridStyle:fe,...Ke},`border-${Re}`),c.jsx(ei,{ref:qe,sheet:n,commands:je,...Ke},`table-${Re}`),c.jsx(ti,{ref:qe,sheet:n,...Ke},`spill-${Re}`),c.jsx($l,{ref:qe,sheet:n,commands:je,notifier:O,onShowTooltip:ye,onCloseTooltip:ae,gridStyle:fe,gridRef:we,editingCoords:u,isActive:E,...Ke},`selection-${Re}`),c.jsx(jl,{ref:qe,sheet:n,commands:je,gridStyle:fe,element:L,notifier:O,...Ke},`copy-paste-${Re}`),c.jsx(Xl,{ref:qe,sheet:n,commands:je,target:Le,notifier:O,renderMovable:W,movableProps:{onUnFocus:()=>{kt.current.focus()}},...Ke},`movable-${Re}`),c.jsx(Yl,{ref:qe,sheet:n,commands:je,notifier:O,gridStyle:fe,getCellEditor:B,showProtectedError:vt,setEditingCoords:T,...Ke},`editor-${Re}`)]},[n,we.current,fe,B,je,O]),[ko,dl]=o.useState(!1),cl=o.useMemo(()=>{if(Ie===0||Ve===0)return null;const Q=n.getStyles().getNormal(),qe=Q.getFont(),Re=Q.getFill(),Ke=Q.getBorder(),Ze=Q.getFill().getType()===s.IFill.Type.None;let et=Ee,ot=Ee;const Je=(mt,It,tn)=>tn?{stroke:Ke.getBottom().isNone()?"none":mt.getColor().toRGBA(pe.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=de?.getGridLineColor()?.toRGBA(pe.darkMode).toString()??pe.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:{...ni,...Re.toCSS(pe.darkMode),...qe.toCSS(pe.darkMode,Fe),"--sxl-app-color-background":pe.fill,"--sxl-app-color-shadow":fe.colorShadow,"--sxl-app-color-grey":fe.colorGrey,"--sxl-app-color-button-fill":Pe.fill,"--sxl-app-color-button-text":Pe.text?.fill,"--sxl-app-color-button-border":Pe.edgeStrokeFill,"--sxl-app-color-primary-dark":fe.selection.strokeFill},ref:we,zoom:Fe,...P,onFirstRender:mt=>{dl(!0),P?.onFirstRender?.(mt),je?.activate()},showGridLines:ve,gridLineColor:st,gridLineColumnsProps:et,gridLineRowsProps:ot,freezeLeft:he?.[ue.AnchorLocation.Left],freezeLeftProps:Qt,freezeTop:he?.[ue.AnchorLocation.Top],freezeTopProps:Qt,width:Ie,height:Ve,columnCount:C.width,rowCount:C.height,cursor:yt??wt??"cell",clipCells:!0,layout:k,cellRenderer:al,overlayRenderer:sl,getCellCoordsAsRangeCoords:se,getVisibleCells:ht,onWheelScroll:at,onPointerDown:yn,onKeyDown:Un,onViewportChange:Z,onImmediateScroll:jt,scrollPoint:le,stageProps:{onFocus:()=>{je?.activate()}},overlays:Tt})},[te]);o.useEffect(()=>{Me.current||N()},[k,he,Fe,je,le?.left,le?.top,pe,P,Ie,Ve,yt,Tt,E,wt]);let Kn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};q||(Kn={...Kn,...M});const ul=o.useMemo(()=>{const Q=n.getStyles().getTheme(),qe=Q.getColorScheme(),Re=Q.getFontScheme();return{"--sxl-doc-color-dk1":qe.getDk1().toCSS(pe.darkMode),"--sxl-doc-color-dk2":qe.getDk2().toCSS(pe.darkMode),"--sxl-doc-color-lt1":qe.getLt1().toCSS(pe.darkMode),"--sxl-doc-color-lt2":qe.getLt2().toCSS(pe.darkMode),"--sxl-doc-color-accent1":qe.getAccent1().toCSS(pe.darkMode),"--sxl-doc-color-accent2":qe.getAccent2().toCSS(pe.darkMode),"--sxl-doc-color-accent3":qe.getAccent3().toCSS(pe.darkMode),"--sxl-doc-color-accent4":qe.getAccent4().toCSS(pe.darkMode),"--sxl-doc-color-accent5":qe.getAccent5().toCSS(pe.darkMode),"--sxl-doc-color-accent6":qe.getAccent6().toCSS(pe.darkMode),"--sxl-doc-color-hlink":qe.getHlink().toCSS(pe.darkMode),"--sxl-doc-color-fol-hlink":qe.getFolHlink().toCSS(pe.darkMode),"--sxl-doc-font-major":Re.getMajorFont(),"--sxl-doc-font-minor":Re.getMinorFont()}},[n.getStyles().getTheme()]);let $n=c.jsx("div",{style:Kn,onTouchStart:()=>{Mo()},onFocus:Q=>{Y(!0),R?.(Q)},onBlur:Q=>{Y(!1),w?.(Q)},ref:kt,...$,children:c.jsx("div",{className:bt("sheetxl-sheet",kl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...ul},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Jt,wn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[xn,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${Se.edgeStrokeWidth}px ${Se.edgeStrokeFill}`,backgroundColor:pe.fill},ref:x,onContextMenu:bn,children:[cl,nt,c.jsx(Tl,{style:{position:"absolute",right:24,bottom:4},colorLicensee:fe?.selection?.strokeFill,colorCredits:fe?.body?.text?.fill})]})]})]})})});if(q){const Q=qe=>c.jsx(vo,{...qe,sheet:n});$n=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${Se.fill}`,minHeight:2*Qe.height,minWidth:2*Qe.width,...M},viewport:v,touchElement:we.current?.stage,disableTouch:pt,onScrollViewport:qe=>{we.current?.scrollTo(qe)},createHorizontalScrollbar:Q,createVerticalScrollbar:Q,...h,children:$n})}o.useEffect(()=>{Me.current=!1,N?.(),j&&kt.current?.focus()},[n]);const[Wn,gl]=o.useState(!1),Mo=r.useCallbackRef(()=>{Wn||gl(!0)},[Wn]);return o.useEffect(()=>{if(ko)return typeof y=="function"&&y(),r.ReactUtils.detectIt().primaryInput==="touch"&&Mo(),()=>{}},[y,ko,Wn]),$n}));Tr.displayName="SheetElement";const ri=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Go="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=",Ir=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:d,isDragging:m,view:p,onHide:g,onShow:q,onKeyDownCapture:h,onFocus:f,onBlur:I,loadingPanel:S,...D}=e,[z,W]=o.useState(!1),[K,y]=o.useState(null),[B,R]=o.useState(null),[w,M]=o.useState(null);o.useEffect(()=>{R(null),l.getDetails().then(A=>{W(!1),R(A.asUrl()),A.asSVGText?.()&&M(A.asSVGText())}).catch(A=>{console.warn(A),W(!0),R(Go),M(null)})},[l]);const O=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),F=o.useMemo(()=>{if(B||w)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:K?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:B,onLoad:()=>{y(!0)},onError:({currentTarget:A})=>{console.log("error"),A.onerror=null,R(Go),W(!0)},alt:d??`${l.getType()}`})},[K,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,...D,onKeyDownCapture:A=>{h?.(A)},ref:O,children:[K||z?void 0:S,F]})}));Ir.displayName="PictureEditor";const li=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 q=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[h,{height:f,width:I}]=zt();if(!a.isClosed())return c.jsx("div",{...g,ref:Wt([q,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()})})})})),ii="_editable-input_1bqx6_6",ai=e=>c.jsx("input",{...e}),Er=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:d,onCancel:m,createInput:p=ai,notifier:g,styleHover:q={},dragging:h,maxLength:f,disabled:I=!1,readOnly:S=!1,...D}=e,[z,W]=o.useState(!1),[K,y]=o.useState(!1),[B,R]=o.useState(a);o.useEffect(()=>{R(a)},[a]);const w=o.useRef(null),[M,O]=o.useState(null),F=o.useCallback(function(te){const N=te.message;M!==N&&(g?.showMessage?.(N,{type:r.NotificationType.Error}),O(N))},[g,M]),A=o.useCallback(te=>{let N=!1;try{N=l?.(te)??!0}catch(x){F(x)}return N?(w.current=null,y(!1),R(te),N):(setTimeout(()=>{w.current?.focus()},0),N)},[l]),_=r.useCallbackRef(()=>{R(a),w.current=null,y(!1),m?.()},[m,a]),G=o.useMemo(()=>{if(!K)return null;const te={className:bt(ii),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:f,type:"text",value:B,onFocus:N=>{w.current||(w.current=N.target,setTimeout(()=>{N.target?.select()},0))},onBlur:N=>{w.current&&A(B)},onChange:N=>{K&&R(N.target.value)},onMouseDown:N=>N.stopPropagation(),onKeyDown:N=>N.code==="Escape"?(N.preventDefault(),void _()):N.code==="Enter"?(N.preventDefault(),void A(N.target.value)):void(N.code!=="Tab"?N.stopPropagation():A(N.target.value))};return c.jsx(c.Fragment,{children:p(te)})},[K,B,A,_,p,I]),[P,V]=o.useState();o.useLayoutEffect(()=>{let te=Object.assign({},n);(h||z)&&(te=Object.assign(te,q)),V(te)},[h,z,q,n]),o.useEffect(()=>{G&&d?.(B)},[G,d,B]);const $=r.useImperativeElement(t,()=>({startEdit(){I||S||y(!0)},cancel(){_()}}),[]);return c.jsxs("div",{...D,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:()=>{I||S||y(!0)},onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:K?0:1},children:B}),G]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...q},children:B})]})})),On=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Gt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Co(e){return"nodeType"in e}function ft(e){var t,n;return e?Gt(e)?e:Co(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function bo(e){const{Document:t}=ft(e);return e instanceof t}function mn(e){return!Gt(e)&&e instanceof ft(e).HTMLElement}function Fr(e){return e instanceof ft(e).SVGElement}function $t(e){return e?Gt(e)?e.document:Co(e)?bo(e)?e:mn(e)||Fr(e)?e.ownerDocument:document:document:document}const St=On?o.useLayoutEffect:o.useEffect;function jn(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 un(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return St(()=>{n.current!==e&&(n.current=e)},t),n}function ln(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function En(e){const t=jn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Fn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let to={};function fn(e,t){return o.useMemo(()=>{if(t)return t;const n=to[e]==null?0:to[e]+1;return to[e]=n,e+"-"+n},[e,t])}function Ar(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 q=l[p];q!=null&&(l[p]=q+e*g)}return l},{...t})}}const Kt=Ar(1),gn=Ar(-1);function Bn(e){if(!e)return!1;const{KeyboardEvent:t}=ft(e.target);return t&&e instanceof t}function An(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 Nt=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[Nt.Translate.toString(e),Nt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),_o="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function si(e){return e.matches(_o)?e:e.querySelector(_o)}const di={display:"none"};function ci(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:di},n)}function ui(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 Dr=o.createContext(null),gi={draggable:`
|
|
24
|
+
To pick up a draggable item, press the space bar.
|
|
25
|
+
While dragging, use the arrow keys to move the item.
|
|
26
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
27
|
+
`},hi={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 mi(e){let{announcements:t=hi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=gi}=e;const{announce:l,announcement:d}=function(){const[h,f]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&f(I)},[]),announcement:h}}(),m=fn("DndLiveRegion"),[p,g]=o.useState(!1);if(o.useEffect(()=>{g(!0)},[]),function(h){const f=o.useContext(Dr);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:I}=h;t.onDragMove&&l(t.onDragMove({active:f,over:I}))},onDragOver(h){let{active:f,over:I}=h;l(t.onDragOver({active:f,over:I}))},onDragEnd(h){let{active:f,over:I}=h;l(t.onDragEnd({active:f,over:I}))},onDragCancel(h){let{active:f,over:I}=h;l(t.onDragCancel({active:f,over:I}))}}),[l,t])),!p)return null;const q=o.createElement(o.Fragment,null,o.createElement(ci,{id:i,value:a.draggable}),o.createElement(ui,{id:m,announcement:d}));return n?Dt.createPortal(q,n):q}var ct;function Dn(){}function no(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 zr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function fi(e,t){const n=An(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Nr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function pi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function Zo(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 Lr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Xo(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 vi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Xo(t,t.left,t.top),l=[];for(const d of i){const{id:m}=d,p=n.get(m);if(p){const g=zr(Xo(p),a);l.push({id:m,data:{droppableContainer:d,value:g}})}}return l.sort(Nr)};function Ci(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,q=d*m;return Number((q/(p+g-q)).toFixed(4))}return 0}const bi=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=Ci(m,t);p>0&&a.push({id:d,data:{droppableContainer:l,value:p}})}}return a.sort(pi)};function Yo(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Rt}function yi(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 wi=yi(1);function Or(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 xi={ignoreTransform:!1};function _t(e,t){t===void 0&&(t=xi);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:q}=ft(e).getComputedStyle(e);g&&(n=function(h,f,I){const S=Or(f);if(!S)return h;const{scaleX:D,scaleY:z,x:W,y:K}=S,y=h.left-W-(1-D)*parseFloat(I),B=h.top-K-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),R=D?h.width/D:h.width,w=z?h.height/z:h.height;return{width:R,height:w,top:B,right:y+R,bottom:B+w,left:y}}(n,g,q))}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 Jo(e){return _t(e,{ignoreTransform:!0})}function Vn(e,t){const n=[];return e?function i(a){if(t!=null&&n.length>=t||!a)return n;if(bo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!mn(a)||Fr(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 q=m[g];return typeof q=="string"&&p.test(q)})}(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 jr(e){const[t]=Vn(e,1);return t??null}function oo(e){return On&&e?Gt(e)?e:Co(e)?bo(e)||e===$t(e).scrollingElement?window:mn(e)?e:null:null:null}function Br(e){return Gt(e)?e.scrollX:e.scrollLeft}function Vr(e){return Gt(e)?e.scrollY:e.scrollTop}function co(e){return{x:Br(e),y:Vr(e)}}var ut;function Pr(e){return!(!On||!e)&&e===document.scrollingElement}function Hr(e){const t={x:0,y:0},n=Pr(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 qi={x:.2,y:.2};function Si(e,t,n,i,a){let{top:l,left:d,right:m,bottom:p}=n;i===void 0&&(i=10),a===void 0&&(a=qi);const{isTop:g,isBottom:q,isLeft:h,isRight:f}=Hr(e),I={x:0,y:0},S={x:0,y:0},D=t.height*a.y,z=t.width*a.x;return!g&&l<=t.top+D?(I.y=ut.Backward,S.y=i*Math.abs((t.top+D-l)/D)):!q&&p>=t.bottom-D&&(I.y=ut.Forward,S.y=i*Math.abs((t.bottom-D-p)/D)),!f&&m>=t.right-z?(I.x=ut.Forward,S.x=i*Math.abs((t.right-z-m)/z)):!h&&d<=t.left+z&&(I.x=ut.Backward,S.x=i*Math.abs((t.left+z-d)/z)),{direction:I,speed:S}}function Ri(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 Ur(e){return e.reduce((t,n)=>Kt(t,co(n)),Rt)}function Kr(e,t){if(t===void 0&&(t=_t),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);jr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const ki=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+Br(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Vr(n),0)}]];class uo{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=Vn(n),a=Ur(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,d,m]of ki)for(const p of d)Object.defineProperty(this,p,{get:()=>{const g=m(i),q=a[l]-g;return this.rect[p]+q},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class an{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 ro(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 Qo(e){e.preventDefault()}function Mi(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]},Ti=(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 yo{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 an($t(n)),this.windowListeners=new an(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&&Kr(i),n(Rt)}handleKeyDown(t){if(Bn(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=$r,coordinateGetter:d=Ti,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,q=g?{x:g.left,y:g.top}:Rt;this.referenceCoordinates||(this.referenceCoordinates=q);const h=d(t,{active:n,context:i.current,currentCoordinates:q});if(h){const f=gn(h,q),I={x:0,y:0},{scrollableAncestors:S}=i.current;for(const D of S){const z=t.code,{isTop:W,isRight:K,isLeft:y,isBottom:B,maxScroll:R,minScroll:w}=Hr(D),M=Ri(D),O={x:Math.min(z===Ye.Right?M.right-M.width/2:M.right,Math.max(z===Ye.Right?M.left:M.left+M.width/2,h.x)),y:Math.min(z===Ye.Down?M.bottom-M.height/2:M.bottom,Math.max(z===Ye.Down?M.top:M.top+M.height/2,h.y))},F=z===Ye.Right&&!K||z===Ye.Left&&!y,A=z===Ye.Down&&!B||z===Ye.Up&&!W;if(F&&O.x!==h.x){const _=D.scrollLeft+f.x,G=z===Ye.Right&&_<=R.x||z===Ye.Left&&_>=w.x;if(G&&!f.y)return void D.scrollTo({left:_,behavior:m});I.x=G?D.scrollLeft-_:z===Ye.Right?D.scrollLeft-R.x:D.scrollLeft-w.x,I.x&&D.scrollBy({left:-I.x,behavior:m});break}if(A&&O.y!==h.y){const _=D.scrollTop+f.y,G=z===Ye.Down&&_<=R.y||z===Ye.Up&&_>=w.y;if(G&&!f.x)return void D.scrollTo({top:_,behavior:m});I.y=G?D.scrollTop-_:z===Ye.Down?D.scrollTop-R.y:D.scrollTop-w.y,I.y&&D.scrollBy({top:-I.y,behavior:m});break}}this.handleMove(t,Kt(gn(h,this.referenceCoordinates),I))}}}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 er(e){return!!(e&&"distance"in e)}function tr(e){return!!(e&&"delay"in e)}yo.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 wo{constructor(t,n,i){var a;i===void 0&&(i=function(m){const{EventTarget:p}=ft(m);return m instanceof p?m:$t(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=$t(d),this.documentListeners=new an(this.document),this.listeners=new an(i),this.windowListeners=new an(ft(d)),this.initialCoordinates=(a=An(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,Qo),this.windowListeners.add(xt.VisibilityChange,this.handleCancel),this.windowListeners.add(xt.ContextMenu,Qo),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(tr(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(er(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,Mi,{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=An(t))!=null?n:Rt,g=gn(a,p);if(!i&&m){if(er(m)){if(m.tolerance!=null&&ro(g,m.tolerance))return this.handleCancel();if(ro(g,m.distance))return this.handleStart()}return tr(m)&&ro(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 Ii={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wr extends wo{constructor(t){const{event:n}=t,i=$t(n.target);super(t,Ii,i)}}Wr.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return!(!n.isPrimary||n.button!==0)&&(i?.({event:n}),!0)}}];const Ei={move:{name:"mousemove"},end:{name:"mouseup"}};var go;(function(e){e[e.RightClick=2]="RightClick"})(go||(go={}));class Gr extends wo{constructor(t){super(t,Ei,$t(t.event.target))}}Gr.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==go.RightClick&&(i?.({event:n}),!0)}}];const lo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class _r extends wo{constructor(t){super(t,lo)}static setup(){return window.addEventListener(lo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(lo.move.name,t)};function t(){}}}var sn,zn;function Fi(e){let{acceleration:t,activator:n=sn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:d=5,order:m=zn.TreeOrder,pointerCoordinates:p,scrollableAncestors:g,scrollableAncestorRects:q,delta:h,threshold:f}=e;const I=function(w){let{delta:M,disabled:O}=w;const F=Fn(M);return ln(A=>{if(O||!F||!A)return Ai;const _={x:Math.sign(M.x-F.x),y:Math.sign(M.y-F.y)};return{x:{[ut.Backward]:A.x[ut.Backward]||_.x===-1,[ut.Forward]:A.x[ut.Forward]||_.x===1},y:{[ut.Backward]:A.y[ut.Backward]||_.y===-1,[ut.Forward]:A.y[ut.Forward]||_.y===1}}},[O,M,F])}({delta:h,disabled:!l}),[S,D]=function(){const w=o.useRef(null);return[o.useCallback((M,O)=>{w.current=setInterval(M,O)},[]),o.useCallback(()=>{w.current!==null&&(clearInterval(w.current),w.current=null)},[])]}(),z=o.useRef({x:0,y:0}),W=o.useRef({x:0,y:0}),K=o.useMemo(()=>{switch(n){case sn.Pointer:return p?{top:p.y,bottom:p.y,left:p.x,right:p.x}:null;case sn.DraggableRect:return a}},[n,a,p]),y=o.useRef(null),B=o.useCallback(()=>{const w=y.current;if(!w)return;const M=z.current.x*W.current.x,O=z.current.y*W.current.y;w.scrollBy(M,O)},[]),R=o.useMemo(()=>m===zn.TreeOrder?[...g].reverse():g,[m,g]);o.useEffect(()=>{if(l&&g.length&&K){for(const w of R){if(i?.(w)===!1)continue;const M=g.indexOf(w),O=q[M];if(!O)continue;const{direction:F,speed:A}=Si(w,O,K,t,f);for(const _ of["x","y"])I[_][F[_]]||(A[_]=0,F[_]=0);if(A.x>0||A.y>0)return D(),y.current=w,S(B,d),z.current=A,void(W.current=F)}z.current={x:0,y:0},W.current={x:0,y:0},D()}else D()},[t,B,i,D,l,d,JSON.stringify(K),JSON.stringify(I),S,g,R,q,JSON.stringify(f)])}_r.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"}(sn||(sn={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(zn||(zn={}));const Ai={x:{[ut.Backward]:!1,[ut.Forward]:!1},y:{[ut.Backward]:!1,[ut.Forward]:!1}};var hn,ho;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(hn||(hn={})),function(e){e.Optimized="optimized"}(ho||(ho={}));const nr=new Map;function mo(e,t){return ln(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Nn(e){let{callback:t,disabled:n}=e;const i=jn(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 Di(e){return new uo(_t(e),e)}function or(e,t,n){t===void 0&&(t=Di);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 q=t(e);return JSON.stringify(p)===JSON.stringify(q)?p:q})}const d=function(p){let{callback:g,disabled:q}=p;const h=jn(g),f=o.useMemo(()=>{if(q||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(h)},[h,q]);return o.useEffect(()=>()=>f?.disconnect(),[f]),f}({callback(p){if(e)for(const g of p){const{type:q,target:h}=g;if(q==="childList"&&h instanceof HTMLElement&&h.contains(e)){l();break}}}}),m=Nn({callback:l});return St(()=>{l(),e?(m?.observe(e),d?.observe(document.body,{childList:!0,subtree:!0})):(m?.disconnect(),d?.disconnect())},[e]),i}const rr=[];function lr(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?gn(e,n.current):Rt}function ir(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 ar=[];function Zr(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}const zi=[{sensor:Wr,options:{}},{sensor:yo,options:{}}],Ni={current:{}},In={draggable:{measure:Jo},droppable:{measure:Jo,strategy:hn.WhileDragging,frequency:ho.Optimized},dragOverlay:{measure:_t}};class dn 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 Li={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new dn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Dn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:In,measureDroppableContainers:Dn,windowRect:null,measuringScheduled:!1},Xr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Dn,draggableNodes:new Map,over:null,measureDroppableContainers:Dn},pn=o.createContext(Xr),Yr=o.createContext(Li);function Oi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dn}}}function ji(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 dn(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 dn(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 dn(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Bi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(pn),l=Fn(i),d=Fn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&d!=null){if(!Bn(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 q of[p.current,g.current]){if(!q)continue;const h=si(q);if(h){h.focus();break}}})}},[i,t,a,d,l]),null}function Jr(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const Pn=o.createContext({...Rt,scaleX:1,scaleY:1});var Et;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Et||(Et={}));const Vi=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:d,autoScroll:m=!0,children:p,sensors:g=zi,collisionDetection:q=bi,measuring:h,modifiers:f,...I}=e;const S=o.useReducer(ji,void 0,Oi),[D,z]=S,[W,K]=function(){const[v]=o.useState(()=>new Set),U=o.useCallback(Z=>(v.add(Z),()=>v.delete(Z)),[v]);return[o.useCallback(Z=>{let{type:ee,event:le}=Z;v.forEach(ie=>{var se;return(se=ie[ee])==null?void 0:se.call(ie,le)})},[v]),U]}(),[y,B]=o.useState(Et.Uninitialized),R=y===Et.Initialized,{draggable:{active:w,nodes:M,translate:O},droppable:{containers:F}}=D,A=w!=null?M.get(w):null,_=o.useRef({initial:null,translated:null}),G=o.useMemo(()=>{var v;return w!=null?{id:w,data:(v=A?.data)!=null?v:Ni,rect:_}:null},[w,A]),P=o.useRef(null),[V,$]=o.useState(null),[te,N]=o.useState(null),x=un(I,Object.values(I)),H=fn("DndDescribedBy",l),re=o.useMemo(()=>F.getEnabled(),[F]),ye=(ne=h,o.useMemo(()=>({draggable:{...In.draggable,...ne?.draggable},droppable:{...In.droppable,...ne?.droppable},dragOverlay:{...In.dragOverlay,...ne?.dragOverlay}}),[ne?.draggable,ne?.droppable,ne?.dragOverlay]));var ne;const{droppableRects:X,measureDroppableContainers:ae,measuringScheduled:Me}=function(v,U){let{dragging:Z,dependencies:ee,config:le}=U;const[ie,se]=o.useState(null),{frequency:Ce,measure:he,strategy:me}=le,xe=o.useRef(v),Le=function(){switch(me){case hn.Always:return!1;case hn.BeforeDragging:return Z;default:return!Z}}(),De=un(Le),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=ln(Ne=>{if(Le&&!Z)return nr;if(!Ne||Ne===nr||xe.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,wt=pt?new uo(he(pt),pt):null;it.rect.current=wt,wt&&Xe.set(it.id,wt)}return Xe}return Ne},[v,ie,Z,Le,he]);return o.useEffect(()=>{xe.current=v},[v]),o.useEffect(()=>{Le||We()},[Z,Le]),o.useEffect(()=>{ie&&ie.length>0&&se(null)},[JSON.stringify(ie)]),o.useEffect(()=>{Le||typeof Ce!="number"||je.current!==null||(je.current=setTimeout(()=>{We(),je.current=null},Ce))},[Ce,Le,We,...ee]),{droppableRects:Ge,measureDroppableContainers:We,measuringScheduled:ie!=null}}(re,{dragging:R,dependencies:[O.x,O.y],config:ye.droppable}),Te=function(v,U){const Z=U!=null?v.get(U):void 0,ee=Z?Z.node.current:null;return ln(le=>{var ie;return U==null?null:(ie=ee??le)!=null?ie:null},[ee,U])}(M,w),fe=o.useMemo(()=>te?An(te):null,[te]),Be=function(){const v=V?.autoScrollEnabled===!1,U=typeof m=="object"?m.enabled===!1:m===!1,Z=R&&!v&&!U;return typeof m=="object"?{...m,enabled:Z}:{enabled:Z}}(),pe=function(v,U){return mo(v,U)}(Te,ye.draggable.measure);(function(v){let{activeNode:U,measure:Z,initialRect:ee,config:le=!0}=v;const ie=o.useRef(!1),{x:se,y:Ce}=typeof le=="boolean"?{x:le,y:le}:le;St(()=>{if(!se&&!Ce||!U)return void(ie.current=!1);if(ie.current||!ee)return;const he=U?.node.current;if(!he||he.isConnected===!1)return;const me=Yo(Z(he),ee);if(se||(me.x=0),Ce||(me.y=0),ie.current=!0,Math.abs(me.x)>0||Math.abs(me.y)>0){const xe=jr(he);xe&&xe.scrollBy({top:me.y,left:me.x})}},[U,se,Ce,ee,Z])})({activeNode:w!=null?M.get(w):null,config:Be.layoutShiftCompensation,initialRect:pe,measure:ye.draggable.measure});const Pe=or(Te,ye.draggable.measure,pe),Se=or(Te?Te.parentElement:null),ge=o.useRef({activatorEvent:null,active:null,activeNode:Te,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ce=F.getNodeFor((t=ge.current.over)==null?void 0:t.id),we=function(v){let{measure:U}=v;const[Z,ee]=o.useState(null),le=Nn({callback:o.useCallback(he=>{for(const{target:me}of he)if(mn(me)){ee(xe=>{const Le=U(me);return xe?{...xe,width:Le.width,height:Le.height}:Le});break}},[U])}),ie=o.useCallback(he=>{const me=Zr(he);le?.disconnect(),me&&le?.observe(me),ee(me?U(me):null)},[U,le]),[se,Ce]=En(ie);return o.useMemo(()=>({nodeRef:se,rect:Z,setRef:Ce}),[Z,se,Ce])}({measure:ye.dragOverlay.measure}),de=(n=we.nodeRef.current)!=null?n:Te,be=R?(i=we.rect)!=null?i:Pe:null,Fe=!!(we.nodeRef.current&&we.rect),ve=Yo(Ee=Fe?null:Pe,mo(Ee));var Ee;const Oe=ir(de?ft(de):null),He=function(v){const U=o.useRef(v),Z=ln(ee=>v?ee&&ee!==rr&&v&&U.current&&v.parentNode===U.current.parentNode?ee:Vn(v):rr,[v]);return o.useEffect(()=>{U.current=v},[v]),Z}(R?ce??Te:null),C=function(v,U){U===void 0&&(U=_t);const[Z]=v,ee=ir(Z?ft(Z):null),[le,ie]=o.useState(ar);function se(){ie(()=>v.length?v.map(he=>Pr(he)?ee:new uo(U(he),he)):ar)}const Ce=Nn({callback:se});return St(()=>{Ce?.disconnect(),se(),v.forEach(he=>Ce?.observe(he))},[v]),le}(He),Ue=Jr(f,{transform:{x:O.x-ve.x,y:O.y-ve.y,scaleX:1,scaleY:1},activatorEvent:te,active:G,activeNodeRect:Pe,containerNodeRect:Se,draggingNodeRect:be,over:ge.current.over,overlayNodeRect:we.rect,scrollableAncestors:He,scrollableAncestorRects:C,windowRect:Oe}),Qe=fe?Kt(fe,O):null,$e=function(v){const[U,Z]=o.useState(null),ee=o.useRef(v),le=o.useCallback(ie=>{const se=oo(ie.target);se&&Z(Ce=>Ce?(Ce.set(se,co(se)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const ie=ee.current;if(v!==ie){se(ie);const Ce=v.map(he=>{const me=oo(he);return me?(me.addEventListener("scroll",le,{passive:!0}),[me,co(me)]):null}).filter(he=>he!=null);Z(Ce.length?new Map(Ce):null),ee.current=v}return()=>{se(v),se(ie)};function se(Ce){Ce.forEach(he=>{const me=oo(he);me?.removeEventListener("scroll",le)})}},[le,v]),o.useMemo(()=>v.length?U?Array.from(U.values()).reduce((ie,se)=>Kt(ie,se),Rt):Ur(v):Rt,[v,U])}(He),J=lr($e),Ie=lr($e,[Pe]),Ve=Kt(Ue,J),ke=be?wi(be,Ue):null,ze=G&&ke?q({active:G,collisionRect:ke,droppableRects:X,droppableContainers:re,pointerCoordinates:Qe}):null,Ae=Lr(ze,"id"),[k,oe]=o.useState(null),j=function(v,U,Z){return{...v,scaleX:U&&Z?U.width/Z.width:1,scaleY:U&&Z?U.height/Z.height:1}}(Fe?Ue:Kt(Ue,Ie),(a=k?.rect)!=null?a:null,Pe),Y=o.useRef(null),u=o.useCallback((v,U)=>{let{sensor:Z,options:ee}=U;if(P.current==null)return;const le=M.get(P.current);if(!le)return;const ie=v.nativeEvent,se=new Z({active:P.current,activeNode:le,event:ie,options:ee,context:ge,onAbort(he){if(!M.get(he))return;const{onDragAbort:me}=x.current,xe={id:he};me?.(xe),W({type:"onDragAbort",event:xe})},onPending(he,me,xe,Le){if(!M.get(he))return;const{onDragPending:De}=x.current,We={id:he,constraint:me,initialCoordinates:xe,offset:Le};De?.(We),W({type:"onDragPending",event:We})},onStart(he){const me=P.current;if(me==null)return;const xe=M.get(me);if(!xe)return;const{onDragStart:Le}=x.current,De={activatorEvent:ie,active:{id:me,data:xe.data,rect:_}};Dt.unstable_batchedUpdates(()=>{Le?.(De),B(Et.Initializing),z({type:ct.DragStart,initialCoordinates:he,active:me}),W({type:"onDragStart",event:De}),$(Y.current),N(ie)})},onMove(he){z({type:ct.DragMove,coordinates:he})},onEnd:Ce(ct.DragEnd),onCancel:Ce(ct.DragCancel)});function Ce(he){return async function(){const{active:me,collisions:xe,over:Le,scrollAdjustedTranslate:De}=ge.current;let We=null;if(me&&De){const{cancelDrop:je}=x.current;We={activatorEvent:ie,active:me,collisions:xe,delta:De,over:Le},he===ct.DragEnd&&typeof je=="function"&&await Promise.resolve(je(We))&&(he=ct.DragCancel)}P.current=null,Dt.unstable_batchedUpdates(()=>{z({type:he}),B(Et.Uninitialized),oe(null),$(null),N(null),Y.current=null;const je=he===ct.DragEnd?"onDragEnd":"onDragCancel";if(We){const Ge=x.current[je];Ge?.(We),W({type:je,event:We})}})}}Y.current=se},[M]),T=o.useCallback((v,U)=>(Z,ee)=>{const le=Z.nativeEvent,ie=M.get(ee);if(P.current!==null||!ie||le.dndKit||le.defaultPrevented)return;const se={active:ie};v(Z,U.options,se)===!0&&(le.dndKit={capturedBy:U.sensor},P.current=ee,u(Z,U))},[M,u]),E=function(v,U){return o.useMemo(()=>v.reduce((Z,ee)=>{const{sensor:le}=ee;return[...Z,...le.activators.map(ie=>({eventName:ie.eventName,handler:U(ie.handler,ee)}))]},[]),[v,U])}(g,T);(function(v){o.useEffect(()=>{if(!On)return;const U=v.map(Z=>{let{sensor:ee}=Z;return ee.setup==null?void 0:ee.setup()});return()=>{for(const Z of U)Z?.()}},v.map(U=>{let{sensor:Z}=U;return Z}))})(g),St(()=>{Pe&&y===Et.Initializing&&B(Et.Initialized)},[Pe,y]),o.useEffect(()=>{const{onDragMove:v}=x.current,{active:U,activatorEvent:Z,collisions:ee,over:le}=ge.current;if(!U||!Z)return;const ie={active:U,activatorEvent:Z,collisions:ee,delta:{x:Ve.x,y:Ve.y},over:le};Dt.unstable_batchedUpdates(()=>{v?.(ie),W({type:"onDragMove",event:ie})})},[Ve.x,Ve.y]),o.useEffect(()=>{const{active:v,activatorEvent:U,collisions:Z,droppableContainers:ee,scrollAdjustedTranslate:le}=ge.current;if(!v||P.current==null||!U||!le)return;const{onDragOver:ie}=x.current,se=ee.get(Ae),Ce=se&&se.rect.current?{id:se.id,rect:se.rect.current,data:se.data,disabled:se.disabled}:null,he={active:v,activatorEvent:U,collisions:Z,delta:{x:le.x,y:le.y},over:Ce};Dt.unstable_batchedUpdates(()=>{oe(Ce),ie?.(he),W({type:"onDragOver",event:he})})},[Ae]),St(()=>{ge.current={activatorEvent:te,active:G,activeNode:Te,collisionRect:ke,collisions:ze,droppableRects:X,draggableNodes:M,draggingNode:de,draggingNodeRect:be,droppableContainers:F,over:k,scrollableAncestors:He,scrollAdjustedTranslate:Ve},_.current={initial:be,translated:ke}},[G,Te,ze,ke,M,de,be,X,F,k,He,Ve]),Fi({...Be,delta:O,draggingRect:ke,pointerCoordinates:Qe,scrollableAncestors:He,scrollableAncestorRects:C});const b=o.useMemo(()=>({active:G,activeNode:Te,activeNodeRect:Pe,activatorEvent:te,collisions:ze,containerNodeRect:Se,dragOverlay:we,draggableNodes:M,droppableContainers:F,droppableRects:X,over:k,measureDroppableContainers:ae,scrollableAncestors:He,scrollableAncestorRects:C,measuringConfiguration:ye,measuringScheduled:Me,windowRect:Oe}),[G,Te,Pe,te,ze,Se,we,M,F,X,k,ae,He,C,ye,Me,Oe]),L=o.useMemo(()=>({activatorEvent:te,activators:E,active:G,activeNodeRect:Pe,ariaDescribedById:{draggable:H},dispatch:z,draggableNodes:M,over:k,measureDroppableContainers:ae}),[te,E,G,Pe,z,H,M,k,ae]);return o.createElement(Dr.Provider,{value:K},o.createElement(pn.Provider,{value:L},o.createElement(Yr.Provider,{value:b},o.createElement(Pn.Provider,{value:j},p)),o.createElement(Bi,{disabled:d?.restoreFocus===!1})),o.createElement(mi,{...d,hiddenTextDescribedById:H}))}),Pi=o.createContext(null),sr="button";function Hi(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=fn("Draggable"),{activators:d,activatorEvent:m,active:p,activeNodeRect:g,ariaDescribedById:q,draggableNodes:h,over:f}=o.useContext(pn),{role:I=sr,roleDescription:S="draggable",tabIndex:D=0}=a??{},z=p?.id===t,W=o.useContext(z?Pn:Pi),[K,y]=En(),[B,R]=En(),w=function(O,F){return o.useMemo(()=>O.reduce((A,_)=>{let{eventName:G,handler:P}=_;return A[G]=V=>{P(V,F)},A},{}),[O,F])}(d,t),M=un(n);return St(()=>(h.set(t,{id:t,key:l,node:K,activatorNode:B,data:M}),()=>{const O=h.get(t);O&&O.key===l&&h.delete(t)}),[h,t]),{active:p,activatorEvent:m,activeNodeRect:g,attributes:o.useMemo(()=>({role:I,tabIndex:D,"aria-disabled":i,"aria-pressed":!(!z||I!==sr)||void 0,"aria-roledescription":S,"aria-describedby":q.draggable}),[i,I,D,z,S,q.draggable]),isDragging:z,listeners:i?void 0:w,node:K,over:f,setNodeRef:y,setActivatorNodeRef:R,transform:W}}function Qr(){return o.useContext(Yr)}const Ui={timeout:25};function Ki(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,d]=o.useState(null),m=Fn(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 Wi(e){let{children:t}=e;return o.createElement(pn.Provider,{value:Xr},o.createElement(Pn.Provider,{value:$i},t))}const Gi={position:"fixed",touchAction:"none"},_i=e=>Bn(e)?"transform 250ms ease":void 0,Zi=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:d,rect:m,style:p,transform:g,transition:q=_i}=e;if(!m)return null;const h=a?g:{...g,scaleX:1,scaleY:1},f={...Gi,width:m.width,height:m.height,top:m.top,left:m.left,transform:Nt.Transform.toString(h),transformOrigin:a&&i?fi(i,m):void 0,transition:typeof q=="function"?q(i):q,...p};return o.createElement(n,{className:d,style:f,ref:t},l)}),Xi=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)}},el={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Nt.Transform.toString(t)},{transform:Nt.Transform.toString(n)}]},sideEffects:Xi({styles:{active:{opacity:"0"}}})};function Yi(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return jn((l,d)=>{if(t===null)return;const m=n.get(l);if(!m)return;const p=m.node.current;if(!p)return;const g=Zr(d);if(!g)return;const{transform:q}=ft(d).getComputedStyle(d),h=Or(q);if(!h)return;const f=typeof t=="function"?t:function(I){const{duration:S,easing:D,sideEffects:z,keyframes:W}={...el,...I};return K=>{let{active:y,dragOverlay:B,transform:R,...w}=K;if(!S)return;const M={x:B.rect.left-y.rect.left,y:B.rect.top-y.rect.top},O={scaleX:R.scaleX!==1?y.rect.width*R.scaleX/B.rect.width:1,scaleY:R.scaleY!==1?y.rect.height*R.scaleY/B.rect.height:1},F={x:R.x-M.x,y:R.y-M.y,...O},A=W({...w,active:y,dragOverlay:B,transform:{initial:R,final:F}}),[_]=A,G=A[A.length-1];if(JSON.stringify(_)===JSON.stringify(G))return;const P=z?.({active:y,dragOverlay:B,...w}),V=B.node.animate(A,{duration:S,easing:D,fill:"forwards"});return new Promise($=>{V.onfinish=()=>{P?.(),$()}})}}(t);return Kr(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 dr=0;function Ji(e){return o.useMemo(()=>{if(e!=null)return dr++,dr},[e])}const Qi=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:q,active:h,activeNodeRect:f,containerNodeRect:I,draggableNodes:S,droppableContainers:D,dragOverlay:z,over:W,measuringConfiguration:K,scrollableAncestors:y,scrollableAncestorRects:B,windowRect:R}=Qr(),w=o.useContext(Pn),M=Ji(h?.id),O=Jr(d,{activatorEvent:q,active:h,activeNodeRect:f,containerNodeRect:I,draggingNodeRect:z.rect,over:W,overlayNodeRect:z.rect,scrollableAncestors:y,scrollableAncestorRects:B,transform:w,windowRect:R}),F=mo(f),A=Yi({config:i,draggableNodes:S,droppableContainers:D,measuringConfiguration:K}),_=F?z.setRef:void 0;return o.createElement(Wi,null,o.createElement(Ki,{animation:A},h&&M?o.createElement(Zi,{key:M,id:h.id,ref:_,as:m,activatorEvent:q,adjustScale:t,className:p,transition:l,rect:F,style:{zIndex:g,...a},transform:O},n):null))});function xo(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function ea(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function Mn(e){return e!==null&&e>=0}const Tn={scaleX:1,scaleY:1},ta=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,q,h){const f=g[q],I=g[q-1],S=g[q+1];return!f||!I&&!S?0:h<q?I?f.left-(I.left+I.width):S.left-(f.left+f.width):S?S.left-(f.left+f.width):f.left-(I.left+I.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,...Tn}:null}return d>a&&d<=l?{x:-m.width-p,y:0,...Tn}:d<a&&d>=l?{x:m.width+p,y:0,...Tn}:{x:0,y:0,...Tn}},qo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=xo(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},tl="Sortable",nl=o.createContext({activeIndex:-1,containerId:tl,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:qo,disabled:{draggable:!1,droppable:!1}});function na(e){let{children:t,id:n,items:i,strategy:a=qo,disabled:l=!1}=e;const{active:d,dragOverlay:m,droppableRects:p,over:g,measureDroppableContainers:q}=Qr(),h=fn(tl,n),f=m.rect!==null,I=o.useMemo(()=>i.map(w=>typeof w=="object"&&"id"in w?w.id:w),[i]),S=d!=null,D=d?I.indexOf(d.id):-1,z=g?I.indexOf(g.id):-1,W=o.useRef(I),K=!function(w,M){if(w===M)return!0;if(w.length!==M.length)return!1;for(let O=0;O<w.length;O++)if(w[O]!==M[O])return!1;return!0}(I,W.current),y=z!==-1&&D===-1||K,B=function(w){return typeof w=="boolean"?{draggable:w,droppable:w}:w}(l);St(()=>{K&&S&&q(I)},[K,I,S,q]),o.useEffect(()=>{W.current=I},[I]);const R=o.useMemo(()=>({activeIndex:D,containerId:h,disabled:B,disableTransforms:y,items:I,overIndex:z,useDragOverlay:f,sortedRects:ea(I,p),strategy:a}),[D,h,B.draggable,B.droppable,y,I,z,p,f,a]);return o.createElement(nl.Provider,{value:R},t)}const oa=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return xo(n,i,a).indexOf(t)},ra=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)},la={duration:200,easing:"ease"},ol="transform",ia=Nt.Transition.toString({property:ol,duration:0,easing:"linear"}),aa={roleDescription:"sortable"};function sa(e){let{animateLayoutChanges:t=ra,attributes:n,disabled:i,data:a,getNewIndex:l=oa,id:d,strategy:m,resizeObserverConfig:p,transition:g=la}=e;const{items:q,containerId:h,activeIndex:f,disabled:I,disableTransforms:S,sortedRects:D,overIndex:z,useDragOverlay:W,strategy:K}=o.useContext(nl),y=function(ce,we){var de,be;return typeof ce=="boolean"?{draggable:ce,droppable:!1}:{draggable:(de=ce?.draggable)!=null?de:we.draggable,droppable:(be=ce?.droppable)!=null?be:we.droppable}}(i,I),B=q.indexOf(d),R=o.useMemo(()=>({sortable:{containerId:h,index:B,items:q},...a}),[h,a,B,q]),w=o.useMemo(()=>q.slice(q.indexOf(d)),[q,d]),{rect:M,node:O,isOver:F,setNodeRef:A}=function(ce){let{data:we,disabled:de=!1,id:be,resizeObserverConfig:Fe}=ce;const ve=fn("Droppable"),{active:Ee,dispatch:Oe,over:He,measureDroppableContainers:C}=o.useContext(pn),Ue=o.useRef({disabled:de}),Qe=o.useRef(!1),$e=o.useRef(null),J=o.useRef(null),{disabled:Ie,updateMeasurementsFor:Ve,timeout:ke}={...Ui,...Fe},ze=un(Ve??be),Ae=Nn({callback:o.useCallback(()=>{Qe.current?(J.current!=null&&clearTimeout(J.current),J.current=setTimeout(()=>{C(Array.isArray(ze.current)?ze.current:[ze.current]),J.current=null},ke)):Qe.current=!0},[ke]),disabled:Ie||!Ee}),k=o.useCallback((u,T)=>{Ae&&(T&&(Ae.unobserve(T),Qe.current=!1),u&&Ae.observe(u))},[Ae]),[oe,j]=En(k),Y=un(we);return o.useEffect(()=>{Ae&&oe.current&&(Ae.disconnect(),Qe.current=!1,Ae.observe(oe.current))},[oe,Ae]),o.useEffect(()=>(Oe({type:ct.RegisterDroppable,element:{id:be,key:ve,disabled:de,node:oe,rect:$e,data:Y}}),()=>Oe({type:ct.UnregisterDroppable,key:ve,id:be})),[be]),o.useEffect(()=>{de!==Ue.current.disabled&&(Oe({type:ct.SetDroppableDisabled,id:be,key:ve,disabled:de}),Ue.current.disabled=de)},[be,ve,de,Oe]),{active:Ee,rect:$e,isOver:He?.id===be,node:oe,over:He,setNodeRef:j}}({id:d,data:R,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:w,...p}}),{active:_,activatorEvent:G,activeNodeRect:P,attributes:V,setNodeRef:$,listeners:te,isDragging:N,over:x,setActivatorNodeRef:H,transform:re}=Hi({id:d,data:R,attributes:{...aa,...n},disabled:y.draggable}),ye=function(){for(var ce=arguments.length,we=new Array(ce),de=0;de<ce;de++)we[de]=arguments[de];return o.useMemo(()=>be=>{we.forEach(Fe=>Fe(be))},we)}(A,$),ne=!!_,X=ne&&!S&&Mn(f)&&Mn(z),ae=!W&&N,Me=ae&&X?re:null,Te=X?Me??(m??K)({rects:D,activeNodeRect:P,activeIndex:f,overIndex:z,index:B}):null,fe=Mn(f)&&Mn(z)?l({id:d,items:q,activeIndex:f,overIndex:z}):B,Be=_?.id,pe=o.useRef({activeId:Be,items:q,newIndex:fe,containerId:h}),Pe=q!==pe.current.items,Se=t({active:_,containerId:h,isDragging:N,isSorting:ne,id:d,index:B,items:q,newIndex:pe.current.newIndex,previousItems:pe.current.items,previousContainerId:pe.current.containerId,transition:g,wasDragging:pe.current.activeId!=null}),ge=function(ce){let{disabled:we,index:de,node:be,rect:Fe}=ce;const[ve,Ee]=o.useState(null),Oe=o.useRef(de);return St(()=>{if(!we&&de!==Oe.current&&be.current){const He=Fe.current;if(He){const C=_t(be.current,{ignoreTransform:!0}),Ue={x:He.left-C.left,y:He.top-C.top,scaleX:He.width/C.width,scaleY:He.height/C.height};(Ue.x||Ue.y)&&Ee(Ue)}}de!==Oe.current&&(Oe.current=de)},[we,de,be,Fe]),o.useEffect(()=>{ve&&Ee(null)},[ve]),ve}({disabled:!Se,index:B,node:O,rect:M});return o.useEffect(()=>{ne&&pe.current.newIndex!==fe&&(pe.current.newIndex=fe),h!==pe.current.containerId&&(pe.current.containerId=h),q!==pe.current.items&&(pe.current.items=q)},[ne,fe,h,q]),o.useEffect(()=>{if(Be===pe.current.activeId)return;if(Be!=null&&pe.current.activeId==null)return void(pe.current.activeId=Be);const ce=setTimeout(()=>{pe.current.activeId=Be},50);return()=>clearTimeout(ce)},[Be]),{active:_,activeIndex:f,attributes:V,data:R,rect:M,index:B,newIndex:fe,items:q,isOver:F,isSorting:ne,isDragging:N,listeners:te,node:O,overIndex:z,over:x,setNodeRef:ye,setActivatorNodeRef:H,setDroppableNodeRef:A,setDraggableNodeRef:$,transform:ge??Te,transition:function(){if(ge||Pe&&pe.current.newIndex===B)return ia;if(!(ae&&!Bn(G)||!g)&&(ne||Se))return Nt.Transition.toString({...g,property:ol})}()}}function Ln(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 da=[Ye.Down,Ye.Right,Ye.Up,Ye.Left],ca=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:d,scrollableAncestors:m}}=t;if(da.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:I,droppableContainers:S}=h;const D=Zo(f),z=[];for(const W of S){const{id:K}=W,y=I.get(K);if(y){const B=Zo(y),R=D.reduce((M,O,F)=>M+zr(B[F],O),0),w=Number((R/4).toFixed(4));z.push({id:K,data:{droppableContainer:W,value:w}})}}return z.sort(Nr)})({collisionRect:i,droppableRects:a,droppableContainers:p});let q=Lr(g,"id");if(q===d?.id&&g.length>1&&(q=g[1].id),q!=null){const h=l.get(n.id),f=l.get(q),I=f?a.get(f.id):null,S=f?.node.current;if(S&&I&&h&&f){const D=Vn(S).some((B,R)=>m[R]!==B),z=cr(h,f),W=function(B,R){return!Ln(B)||!Ln(R)||!cr(B,R)?!1:B.data.current.sortable.index<R.data.current.sortable.index}(h,f),K=D||!z?{x:0,y:0}:{x:W?i.width-I.width:0,y:W?i.height-I.height:0},y={x:I.left,y:I.top};return K.x&&K.y?y:gn(y,K)}}}};function cr(e,t){return!(!Ln(e)||!Ln(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ua=e=>{let{transform:t}=e;return{...t,y:0}},rl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:d,editable:m,selectedIndex:p,background:g,activeColor:q,borderColor:h,borderWidth:f,dragging:I,...S}=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"},...S,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&&q?q?.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"},So=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:q,sorting:h,style:f,transition:I,transform:S,value:D,wrapperStyle:z,...W},K)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const y=q?q({dragOverlay:!!t,dragging:!!n,sorting:!!h,index:m,fadeIn:!!a,listeners:p,ref:K,style:f,transform:S,transition:I,value:D}):c.jsx(c.Fragment,{children:D});return c.jsx("div",{className:bt("tab-item",qt.Wrapper,a&&qt.fadeIn,h&&qt.sorting,t&&qt.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":S?`${Math.round(S.x)}px`:void 0,"--translate-y":S?`${Math.round(S.y)}px`:void 0,"--scale-x":S?.scaleX?`${S.scaleX}`:void 0,"--scale-y":S?.scaleY?`${S.scaleY}`:void 0,"--index":m},ref:K,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,...W,tabIndex:l?void 0:-1,children:y})})})),ur={Row:"_Row_1kr10_1"},ll=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:bt(ur.Row,t&&ur.horizontal),children:e}))),ga={...el},ha=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:d=vi,coordinateGetter:m=ca,dropAnimation:p=ga,getItemStyles:g=()=>({}),getNewIndex:q,handle:h=!1,items:f,onMove:I,isDisabled:S=()=>!1,measuring:D,modifiers:z,renderItem:W,renderDivider:K,reorderItems:y=xo,strategy:B=qo,style:R,useDragOverlay:w=!0,onDragStart:M,wrapperStyle:O=()=>({})}=e,[F,A]=o.useState(()=>f);o.useEffect(()=>{A(f)},[f]);const[_,G]=o.useState(null),P=function(){for(var x=arguments.length,H=new Array(x),re=0;re<x;re++)H[re]=arguments[re];return o.useMemo(()=>[...H].filter(ye=>ye!=null),[...H])}(no(Gr,{activationConstraint:i}),no(_r,{activationConstraint:i}),no(yo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:m})),V=F.indexOf.bind(F),$=_?V(_):-1,te=[];F.map((x,H)=>{te.push(c.jsx(ma,{id:x,handle:h,index:H,style:g,wrapperStyle:O,disabled:S(x),renderItem:W,animateLayoutChanges:a,useDragOverlay:w,getNewIndex:q},x+"-"+H));const re=K?.({key:"divider-"+H});re&&te.push(re)});const{getPortalContainer:N}=r.useFullscreenPortal();return c.jsxs(Vi,{sensors:P,collisionDetection:d,onDragStart:x=>{const{active:H}=x;H&&(M?.(x),G(H.id))},autoScroll:{canScroll:x=>!0},onDragEnd:x=>{if(G(null),x.over){const H=V(x.over.id);$!==H&&(A(re=>y(re,$,H)),I?.($,H))}},onDragCancel:()=>{G(null)},measuring:D,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...R},className:bt(n,qt.Wrapper),children:c.jsx(na,{items:F,strategy:B,children:c.jsx(ll,{ref:t,children:te})})}),w?Dt.createPortal(c.jsx(Qi,{adjustScale:l,dropAnimation:p,children:_?c.jsx(So,{value:F[$],handle:h,renderItem:W,wrapperStyle:O({index:$,isDragging:!0,id:F[$]}),index:$,dragging:!0,style:g({id:F[$],index:$,isSorting:_!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),N()):null]})}));function ma({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:d,style:m,renderItem:p,useDragOverlay:g,wrapperStyle:q}){const{attributes:h,isDragging:f,isSorting:I,listeners:S,overIndex:D,setNodeRef:z,transform:W,transition:K}=sa({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(So,{ref:z,value:a,disabled:e,dragging:f,sorting:I,handle:i,renderItem:p,index:l,style:m({index:l,id:a,isDragging:f,isSorting:I,overIndex:D}),onRemove:d?()=>d(a):void 0,transform:W,transition:K,wrapperStyle:q({index:l,isDragging:f,id:a}),listeners:S,"data-index":l,"data-id":a,dragOverlay:!g&&f,...h})}const fa="_TabStrip_3x0dp_1",pa=new s.Color("rgb(33, 115, 70)"),va="#eee",Ca=e=>c.jsx(rl,{...e}),il=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:q=r.defaultCreateScrollStartButton,createScrollEndButton:h=r.defaultCreateScrollEndButton,createScrollEdgeButton:f=r.defaultCreateScrollEdgeButton,createTabButton:I=Ca,createTabDivider:S,editLabelProps:D,disabled:z=!1,disableDrag:W=!1,background:K="white",activeColor:y=pa,borderColor:B=va,borderWidth:R=1}=e,[w,M]=o.useState(l),[O,F]=o.useState(d),A=o.useCallback(ve=>{const Ee=N.current?.[ve]?.closest(".tab-item")??N.current?.[ve];Ee&&ae.current?.scrollTo({top:Ee.offsetTop,left:Ee.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{A(l)},[l]);const _=o.useCallback((ve,Ee)=>{Ee!==w&&(M(Ee),m?.(Ee)),A(Ee)},[m,w]),G=o.useCallback((ve,Ee)=>{g?.(ve,Ee)},[g]),P=o.useRef(null),[V,$]=o.useState(-1),te=o.useCallback((ve,Ee)=>{p?.(ve,Ee)},[p]);o.useLayoutEffect(()=>{M(l)},[l]),o.useLayoutEffect(()=>{F(d)},[d]);const N=o.useRef([]),x=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ve){N.current?.[ve]?.startEdit()},cancel(ve){N.current?.[ve]?.cancel()}},x.current),[w,V]);const H=o.useCallback(({value:ve,index:Ee,dragging:Oe})=>{const{style:He,maxLength:C,...Ue}=D||{},Qe=c.jsx(Er,{ref:$e=>{N.current[Ee]=$e},value:ve,disabled:z,maxLength:C,style:{color:w===Ee&&y?y?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...He},styleHover:{},onSubmit:$e=>(P.current=!1,$(-1),te(Ee,$e)),onCancel:()=>{P.current=!1,$(-1)},onChange:$e=>{P.current=!0,$(Ee)},...Ue});return I({onClick:$e=>_($e,Ee),value:ve,index:Ee,editing:V===Ee&&P.current,editable:!0,disabled:z,selectedIndex:w,background:K,activeColor:y,borderColor:B,borderWidth:R,dragging:Oe,children:Qe})},[w,te,_,D,z,V,I]),[re,{width:ye}]=zt(),[ne,{width:X}]=zt(),ae=o.useRef(null),[Me,Te]=o.useState({left:0,top:0,width:0,height:0}),[fe,Be]=o.useState(null);o.useEffect(()=>{fe!==null&&ae.current&&ae.current.scrollTo({left:fe,behavior:"smooth"})},[fe]);const pe=o.useCallback((ve,Ee=!1)=>{if(!ae.current)return 0;let Oe=ae.current.firstChild.getBoundingClientRect(),He=ae.current.firstChild.firstChild.children,C=0;return C=Ee?0:r.ScrollUtils.getScrollTo(ve,Oe.left,He,!0,Math.max(0,ve-200)),Be(C),Math.max(0,C)},[]),Pe=o.useCallback((ve,Ee=!1)=>{if(!ae.current)return 0;let Oe=ae.current.firstChild.getBoundingClientRect(),He=ae.current.firstChild.firstChild.children,C=0;const Ue=Math.ceil(X-ye);return C=Ee?Ue:r.ScrollUtils.getScrollTo(ve,Oe.left,He,!1,Math.max(0,ve+200)),Be(C),Math.min(Ue,C)},[X,ye]),Se=o.useRef(null),ge=o.useRef(null),ce=o.useCallback(()=>{ge.current&&(clearTimeout(ge.current),ge.current=null,Se.current=null)},[]),we=o.useCallback((ve,Ee,Oe=260)=>{Se.current=ve,ge.current=setTimeout(()=>{const He=Ee?pe(Se.current||ve):Pe(Se.current||ve);He!==Se.current?we(He,Ee,120):ce()},Oe)},[pe,Pe,ce]);o.useEffect(()=>()=>ce(),[ce]);const de=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(Me.left)<=0||Math.floor(X-ye)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:ce,onMouseLeave:ce,onMouseDown:()=>we(ae.current.scrollLeft,!0),onClick:ve=>pe(Math.min(ae.current.scrollLeft,fe??Number.MAX_SAFE_INTEGER),ve.ctrlKey)}),[Me,fe,X,ye]),be=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(X-ye)<=Math.ceil(Me.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:ce,onMouseLeave:ce,onMouseDown:()=>we(ae.current.scrollLeft,!1),onClick:ve=>Pe(Math.max(ae.current.scrollLeft,fe??0),ve.ctrlKey)}),[Me,fe,X,ye]),Fe=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,f?.(de)]}),[de,be,q,h,n,f]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:bt(fa,a),ref:x,children:[c.jsx("div",{style:{borderTop:`solid ${B} ${R}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Fe}),c.jsx("div",{className:"Tabs",ref:re,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:ae,onScroll:ve=>{Te({left:ve.target.scrollLeft,top:ve.target.scrollTop,width:ve.target.scrollWidth,height:ve.target.scrollHeight})},children:c.jsx(ha,{isDisabled:ve=>z||W,items:O,strategy:ta,modifiers:[ua],ref:ne,renderItem:H,renderDivider:S,onMove:G,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:f(be)})]})}));il.displayName="TabStrip";const io=o.createContext(null),ba="_script-editor_iy654_5",ya=o.lazy(()=>Promise.resolve().then(()=>require("./B4TwkpKRQsSXODnS.cjs"))),wa={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"},gr=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 D=m.lineNumber;D>=1;D--)if(i.getLineContent(D).trim()===""){const z=Ro(d,i.getOffsetAt({lineNumber:D,column:1}),"function");if(!z||qa(z)){g=!0,p.lineNumber=D+1;break}{const W=z.spans[0].start;D=i.getPositionAt(W).lineNumber,p.lineNumber=D}}let q=n,h=!1;!g&&!q.startsWith(`
|
|
28
|
+
`)&&p.lineNumber>1&&(q=`
|
|
29
|
+
`+q,h=!0);let f=!1;i.getLineCount()>1&&(q.endsWith(`
|
|
30
|
+
|
|
31
|
+
`)||(q+=`
|
|
32
|
+
|
|
33
|
+
`,f=!0));const I=[{range:new t.Range(p.lineNumber,p.column,p.lineNumber,p.column),text:`${q}`}];let S=null;i.pushEditOperations([],I,D=>(S=D[0].range,h&&S.startLineNumber++,f&&S.endLineNumber--,[new t.Selection(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn)])),e.setSelection({startLineNumber:S.endLineNumber,startColumn:S.endColumn,endLineNumber:S.startLineNumber,endColumn:S.startColumn})};function xa(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 fo(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:xa(n,i),lineNumber:d.lineNumber})}if(i.childItems)for(const l of i.childItems)fo(e,t,n,l,a);return a}function Ro(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=Ro(m,t,n,i);if(p)return p}}return null}}function qa(e){return e.kind==="comment"}const Sa=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:q,...h}=e,f=o.useRef(null),I=r.useCallbackRef(d,[d]),S=o.useRef(!1),D=o.useMemo(()=>({contains(x){if(!f.current)return;const H=f.current.editor;return H&&H.getDomNode()?.contains(x)},focus(){if(!f.current)return;const x=f.current.editor;return x&&x.getDomNode()?.focus()}}),[]),z=o.useMemo(()=>[new r.Command("help",D,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),W=o.useMemo(()=>{let x=null;const H=()=>D;return x=a?a.createChildGroup(H,"scriptEditor",!1):new r.CommandGroup(H,"scriptEditor"),x.addCommands(z,!0),x},[a,z]),K=r.useCommands(W,["executeSelectedScript"])[0],y=K?.context(),B=r.useCallbackRef(x=>{K?.execute(x)},[K]),R=o.useRef(""),[w,M]=o.useState(!1),O=r.useCallbackRef(async()=>{if(!f.current)return null;const x=f.current,H=x.editor;if(!H)return null;const re=x.monaco,ye=await(async(ne,X,ae="export")=>{const Me=ne.getModel();if(!Me)return null;const Te=await X.languages.typescript.getTypeScriptWorker(),fe=await Te(Me.uri),Be=await fe.getNavigationTree(Me.uri.toString());let pe=null,Pe=ne.getSelection();const Se=Pe.startLineNumber===Pe.endLineNumber&&Pe.startColumn===Pe.endColumn?Me.getLineCount():Math.min(Pe.endLineNumber,Me.getLineCount());for(let ge=Pe.startLineNumber;!pe&&ge<=Se;ge++){const ce=Ro(Be,Me.getOffsetAt({lineNumber:ge,column:1}),"function",ae);ce&&(pe=ce.text)}return pe})(H,re);return q?.({message:(ye??"").toUpperCase()}),ye?{source:H.getValue(),name:ye}:null},[q]),F=r.useCallbackRef(async(x,H,re)=>{const ye=await y.getScripts().createModule({source:re?.getValue(),declarationsOnly:!0}),ne=ye?ye.getFunctions().search():ue.CommonUtils.EmptyArray;ye&&(async function(X,ae){const Me=[];for(let Te=1;Te<X.getLineCount()+1;Te++){const fe={startLineNumber:Te,startColumn:1,endLineNumber:Te,endColumn:X.getLineLength(Te)+1},Be=X.getValueInRange(fe).indexOf("modelt");Be!==-1&&Me.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:ae.MarkerSeverity.Hint,startLineNumber:fe.startLineNumber,startColumn:Be+1,endLineNumber:fe.startLineNumber,endColumn:Be+5})}ae.editor.setModelMarkers(X,"owner",Me)}(x,H),async function(X,ae,Me,Te){const fe=await ae.languages.typescript.getTypeScriptWorker(),Be=await fe(X.uri),pe=await Be.getNavigationTree(X.uri.toString()),Pe=fo(X,ae,Te,pe).map(Se=>{let ge=null,ce=null;return Se.type==="formula"?(ge="formula.margin-icon",ce="Formula"):Se.type==="macro"?(ge="macro.margin-icon",ce="Macro"):Se.type==="autoRun"&&(ge="autorun.margin-icon",ce="Auto Run"),{range:new ae.Range(Se.lineNumber,1,Se.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:ge,glyphMarginHoverMessage:ce,stickiness:ae.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});P.current&&P.current.clear(),P.current=Me.createDecorationsCollection(Pe)}(x,H,re,ne))},[y]),A=r.useCallbackRef(ue.CommonUtils.debounce(F,580),[]),_=r.useCallbackRef(async(x=void 0)=>{if(!f.current||!y)return;const H=f.current.editor.getPosition(),re={cursor:H?H.toString():""};x!==void 0&&(re.message=x),q?.(re);const ye=O();y.setSelectedFunction(ye)},[y,q]);o.useEffect(()=>{if(!y)return;const x={insertSnippet:re=>{f.current?.editor&&(w?gr(f.current.editor,f.current.monaco,re):R.current=re)}};y.setEditor(x),y.setSelectedFunction(O());const H=y.addContainerListener({onBeforeSave:async()=>{if(!f.current?.editor||!y)return;const re=f.current.editor,ye=y?.getScripts().getModules().getByName("scripting"),ne=ye?.getSource(),X=re.getValue();if(!((ne?.length??0)!==X.length||ne!==X))return;await y.saveSource(re.getValue());const ae=(ne?.length??0)!==X.length||ne!==X;q?.({dirty:ae})},onReadonlyChange(){},onScriptChange:async()=>{if(!f.current?.editor||!y)return;const re=f.current.editor,ye=y.getScripts().getModules().search()[0]?.getSource()??"";re.setValue(ye)}});return()=>{H(),y.setSelectedFunction(null),y.setEditor(null)}},[y,w]),o.useEffect(()=>()=>{if(!f.current?.editor)return;const x=f.current.editor;y?.saveSource(x.getValue())},[]);const G=r.useCallbackRef(x=>{const H=f.current;if(!H)return!1;const re=H.editor;return!!re&&(re.focus(),!0)},[]),P=o.useRef(null),V=r.useCallbackRef((x,H)=>{f.current={monaco:H,editor:x},M(!0),_("Loading Types");const re=y.getScripts().getModules().search()[0]?.getSource()??"";x.setValue(re),Promise.resolve().then(()=>require("./BM-anvzow9Dh4y3e.cjs")).then(ne=>ne.customEditor).then(ne=>{_(""),ne.AutoTypings.create(x,{shareCache:!0,monaco:H,onError:X=>{X==="Not implemented yet"&&(X="Compile Errors"),console.warn("Error compiling types",X)}}).then(async X=>{const ae=x.getModel();A(ae,H,x)})}),x.addCommand("executeScript",function(ne,...X){X?.[0]&&B({functionName:X?.[0]})},""),x.addAction({id:"executeScript",label:"Execute",keybindings:[H.KeyCode.F8],run:async ne=>{const X=O();y.setSelectedFunction(X);const ae=await X;B(ae)}}),x.addAction({id:"saveScript",label:"Save Script",keybindings:[H.KeyMod.CtrlCmd|H.KeyCode.KeyS],run:ne=>{y?.saveSource(x.getValue()).then(()=>{const X=y?.getScripts().getModules().getByName("scripting"),ae=X?.getSource(),Me=x.getValue(),Te=(ae?.length??0)!==Me.length||ae!==Me;q?.({dirty:Te})})}}),x.onMouseDown(async ne=>{if(ne.target.type===H.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const X=ne.target.position.lineNumber,ae=await H.languages.typescript.getTypeScriptWorker(),Me=await ae(ye.uri),Te=await Me.getNavigationTree(ye.uri.toString()),fe=x?.getValue(),Be=(await y?.saveSource(fe)).getFunctions().search(),pe=fo(ye,H,Be,Te).find(Pe=>Pe.lineNumber===X);if(pe){const Pe=ne.event.browserEvent.button;Pe===0?pe.type==="macro"||pe.type==="autoRun"?B({functionName:pe.name}):pe.type==="formula"&&y.quickInsertFunction?.(pe.name):Pe===2&&(console.log("Context menu for function:",pe.name),ne.event.browserEvent.preventDefault())}}}),x.onDidChangeModelContent(()=>{const ne=x.getModel();A(ne,H,x)});const ye=x.getModel();(function(ne,X){X.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ae,Me,Te){const fe=[];for(let Be=1;Be<ae.getLineCount()+1;Be++){const pe={startLineNumber:Be,startColumn:1,endLineNumber:Be,endColumn:ae.getLineLength(Be)+1},Pe="hint",Se=ae.getValueInRange(pe).indexOf("hint");Se!==-1&&fe.push({kind:X.languages.InlayHintKind.Type,position:{lineNumber:pe.startLineNumber,column:Se+Pe.length+1},label:"[hint]"})}return{hints:fe,dispose:()=>{}}}})})(0,H),ye.onDidChangeContent(ne=>{const X=y?.getScripts().getModules().getByName("scripting"),ae=X?.getSource(),Me=x.getValue(),Te=(ae?.length??0)!==Me.length||ae!==Me;q?.({dirty:Te})}),x.onDidChangeCursorPosition(ne=>{_()})},[y,q]),$=o.useMemo(()=>w?null:p||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[w,p]),te=o.useMemo(()=>{const x=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(ya,{theme:m?"extended-dark":"extended",options:{...wa,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:x,onValidate:H=>{let re=!1;for(let ye=0;!re&&ye<H?.length;ye++)H[ye].severity===8&&(re=!0)},beforeMount:H=>{H.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),H.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),H.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),H.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let re=!1;try{const ne=await(async()=>await(await fetch("https://cdn.jsdelivr.net/npm/@sheetxl/sdk/types/scripting.d.ts")).text())(),X=H.Uri.parse('inmemory://model/"sheetxl-models".d.ts'),ae=H.editor.createModel(ne,"typescript",X);H.editor.setModelMarkers(ae,"default",[]),re=!0}catch(ne){console.warn("cant load types",ne)}H.languages.registerLinkProvider("*",{provideLinks:(ne,X)=>{const ae=[],Me={links:ae},Te=ne.getLinesContent();for(let fe=1;fe<=Te.length;fe++){const Be=Te[fe-1],pe=H.editor.tokenize(Be,"typescript");for(let Pe=0;Pe<pe[0].length;Pe++){const Se=pe[0]?.[Pe];if(Se&&Se.type.startsWith("string")){let ge=Se.offset,ce=pe[0]?.[Pe+1]?.offset??Be.length,we=new H.Range(fe,ge+1,fe,ce+1),de=ne.getValueInRange(we);const be=de[0];be!=="`"&&be!=="'"&&be!=='"'||(ge++,de=de.substring(1));const Fe=de[de.length-1];Fe!=="`"&&Fe!=="'"&&Fe!=='"'||(ge++,de=de.substring(0,de.length-1));try{y.getRanges(de)&&ae.push({range:{endColumn:ce,endLineNumber:fe,startColumn:ge,startLineNumber:fe},tooltip:`Goto range '${de}'`,url:`/range/${de}`})}catch(ve){console.warn(ve)}}}}return Me}}),H.editor.registerLinkOpener({open(ne){if(ne?.path?.startsWith("/range/")){try{y.getRanges(ne.path.substring(7))?.select()}catch(X){console.warn("invalid range",X)}return!0}return!1}});const ye=H.languages.typescript.typescriptDefaults.getCompilerOptions();H.languages.typescript.typescriptDefaults.setCompilerOptions({...ye,target:H.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:H.languages.typescript.ModuleResolutionKind.Classic,baseUrl:"inmemory://model/",allowNonTsExtensions:!0}),R.current&&(await gr(f.current.editor,f.current.monaco,R.current),R.current=null),S.current&&requestAnimationFrame(async()=>{S.current&&H.editor.focus()}),H.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1}),M(!0)})()},onMount:V})}),$]})},[y,W,l,$,m]),N=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:x=>{G(x)},close:()=>{I?.()},getEditor:()=>y?.getEditor()}),[y]);return o.useEffect(()=>(g&&requestAnimationFrame(()=>{G()}),()=>{f.current?.editor&&requestAnimationFrame(()=>{N.current?.contains(document.activeElement)&&G()})}),[]),c.jsx("div",{className:bt("script-editor",ba,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:N,...h,children:te})}));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=li,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=ri,exports.CornerTriangle=so,exports.DateUtils=ml,exports.DocThemesContext=io,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(io.Provider,{value:t,children:n})},exports.EditableLabel=Er,exports.EmptyFrame=Zl,exports.FilterButton=mr,exports.FontUtils=fl,exports.Item=So,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=wr,exports.MovableArea=Sr,exports.PictureEditor=Ir,exports.Row=ll,exports.ScriptEditor=Sa,exports.SheetCellEditor=pr,exports.SheetCellRenderer=fr,exports.SheetElement=Tr,exports.SheetScrollbar=vo,exports.StaticBorderRenderer=Rl,exports.StyledStrokePath=Cr,exports.Tab=rl,exports.TabStrip=il,exports.createCellEditStateFromCell=vr,exports.useBordersOverlay=po,exports.useDocThemes=()=>{const e=o.useContext(io),[t]=o.useState(()=>new s.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=Rr,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=xr,exports.useSheetCopyPaste=qr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
|