@sheetxl/react 0.7.16 → 0.7.17

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.
@@ -1,18 +1,18 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6{pointer-events:none}._sheetxl-sheet_1qeq6_5 ._viewport-overlay_1qeq6_6 *{pointer-events:initial}._sheetxl-sheet_1qeq6_5 .cell-container>*{overflow:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .text-box{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .text-line{text-rendering:optimizespeed;position:absolute;vertical-align:baseline;white-space:pre}._sheetxl-sheet_1qeq6_5 .cell-container .filter-button{position:absolute;display:flex;align-items:center;justify-content:center;flex-direction:row;margin-bottom:4px}._sheetxl-sheet_1qeq6_5 .cell-container .text-debug-bounds{position:absolute;background:green;pointer-events:none;opacity:.2}._sheetxl-sheet_1qeq6_5 .cell-container .fill{position:absolute}._sheetxl-sheet_1qeq6_5 .cell-container .pending{width:6px;height:6px;top:5px;left:4px;position:absolute;border:var(--sxl-app-color-primary-dark, grey) .5px;border-style:double;border-radius:50%;background-color:var(--sxl-app-color-button-surface, grey);opacity:1;animation:_pulse_1qeq6_1 1.5s infinite alternate}@keyframes _pulse_1qeq6_1{0%{transform:scale(1);opacity:1}50%{transform:scale(1.2);opacity:.8}to{transform:scale(1);opacity:1}}._sheetxl-sheet_1qeq6_5 .cell-container .slider{position:absolute;width:130%;height:2px;bottom:1px;opacity:0;animation:_fadeIn_1qeq6_1 0s .5s forwards;overflow-x:hidden}._sheetxl-sheet_1qeq6_5 .cell-container .line{position:absolute;opacity:.3;background:var(--sxl-app-color-primary-light, rgb(173, 173, 173)) .5px;width:100%;height:2px}._sheetxl-sheet_1qeq6_5 .cell-container .subline{position:absolute;background:var(--sxl-app-color-primary, rgb(77, 77, 77)) .5px;opacity:.9;height:3px}._sheetxl-sheet_1qeq6_5 .cell-container .inc{animation-delay:0s;animation:_increase_1qeq6_1 3s infinite}@keyframes _fadeIn_1qeq6_1{0%{opacity:0;height:0px}to{opacity:1;height:2px}}@keyframes _increase_1qeq6_1{0%{left:-150%;width:30%;animation-timing-function:ease}to{left:100%;width:30%}}._TaskPaneArea_6dmgk_5{position:absolute;height:100%;width:100%;display:flex;flex-direction:row}._TaskPaneTitle_6dmgk_13{display:flex;box-sizing:border-box;flex:1 1 0;flex-direction:row;align-items:center;font-size:1.25rem;height:100%;width:100%;padding:8px 16px;border-bottom:solid rgba(0,0,0,.2) 1px}._TaskPaneTitle_6dmgk_13 .title{opacity:.87}._TaskPaneTitle_6dmgk_13.focused .title{opacity:1}._TaskPaneFrame_6dmgk_36{display:flex;position:relative;flex-direction:column;width:100%;box-sizing:border-box;flex:1 1 0;min-height:0;align-items:stretch;justify-content:stretch;margin-bottom:4px;border-radius:4px;overflow:hidden}._TaskPaneStrip_6dmgk_52{display:flex;flex-direction:column;gap:4px;margin-top:4px;margin-left:2px}._TaskPaneStripItem_6dmgk_60{display:flex;flex-direction:row;align-items:center;padding:4px;border-radius:4px;border:grey solid 1px}._TaskPaneStripItem_6dmgk_60.selected{font-weight:700}._sheet-scrollbar_104cg_1{margin-left:2px;margin-bottom:1px;align-items:center}._sheet-selection_12wyx_5 .fill-handle .dragging,._movable-area_314c6_5 .moveable-control-box .dragging{opacity:0}._movable-area_314c6_5 .moveable-control-box .moveable-control{width:11px;height:11px;margin-top:-5.5px;margin-left:-5.5px;background-color:var(--sxl-app-color-background, white);background-image:var(--sxl-app-image-background);border:2px solid var(--sxl-app-color-primary-dark, grey)}._movable-area_314c6_5 .moveable-control-box .moveable-line{background:var(--sxl-app-color-grey, grey)}@media (pointer: coarse){._movable-area_314c6_5 .moveable-control-box .moveable-control{width:22px;height:22px;margin-top:-11px;margin-left:-11px}}._editable-input_1bqx6_6{position:absolute;left:0;top:0;width:100%;min-height:calc(100% + 1px);border:none;padding:0;outline:none;color:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:1.2;letter-spacing:inherit;text-transform:inherit;background:transparent}@keyframes _pop_1wyun_1{0%{transform:scale(1)}to{transform:scale(var(--scale))}}@keyframes _fadeIn_1wyun_33{0%{opacity:0}to{opacity:1}}._Wrapper_1wyun_25{display:flex;box-sizing:border-box;transform:translate3d(var(--translate-x, 0),var(--translate-y, 0),0) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1));transform-origin:0 0;touch-action:manipulation}._Wrapper_1wyun_25._dragOverlay_1wyun_37{z-index:999}._Item_1wyun_47{position:relative;display:flex;align-items:center;outline:none;box-sizing:border-box;transform-origin:50% 50%;-webkit-tap-highlight-color:transparent;transform:scale(var(--scale, 1))}._Item_1wyun_47:not(._withHandle_1wyun_61){touch-action:manipulation}._Item_1wyun_47._dragging_1wyun_66:not(._dragOverlay_1wyun_37){z-index:999}._Item_1wyun_47._dragOverlay_1wyun_37{cursor:inherit;animation:_pop_1wyun_1 .2s cubic-bezier(.18,.67,.6,1.22);transform:scale(var(--scale));opacity:1}._Row_1kr10_1{display:flex;box-sizing:border-box}._TabStrip_3x0dp_1::-webkit-scrollbar{display:none;height:0px}._TabStrip_3x0dp_1{overflow-y:auto;overflow-x:hidden;position:relative}._script-editor_iy654_5 .monaco-editor{position:absolute}._script-editor_iy654_5 .monaco-editor .margin-icon{display:block;width:16px;height:16px;background-size:16px;background-repeat:no-repeat;background-position:center;background-size:contain}._script-editor_iy654_5 .monaco-editor .formula{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="m 12.106007,8.1692949 c 0.124174,-0.1578352 0.181773,-0.3565642 0.283755,-0.5271169 0.10273,-0.1715492 0.04413,-0.2027176 -0.129161,-0.2014713 -0.685452,0.00576 -1.371152,-0.00277 -2.056604,0.00501 C 10.021228,7.4479573 9.9586414,7.407817 9.9935503,7.2080883 10.145401,6.3413623 10.291269,5.4736396 10.51219,4.6213758 10.642847,4.1167002 10.782479,3.6117747 11.061498,3.1622046 11.339518,2.7138809 11.726751,2.5974365 12.2035,2.829328 c 0.398455,0.1934923 0.722604,0.4827333 0.990152,0.8340617 0.116944,0.1535968 0.27079,0.2740306 0.449073,0.1715499 0.343348,-0.1974819 0.644807,-0.4383502 0.819599,-0.826332 0.100985,-0.2244112 0.157836,-0.476001 0.04039,-0.7058977 C 14.339646,1.9840253 14.038187,1.7618584 13.707056,1.6394296 13.156999,1.4362128 12.562559,1.4840872 12.017239,1.6758341 11.38789,1.8970037 10.783727,2.2625445 10.259602,2.6724688 10.066109,2.8238217 9.8783519,2.9839017 9.7013165,3.1547035 9.0502751,3.7823067 8.5657962,4.529097 8.2246919,5.3651534 7.9823276,5.9595939 7.7888351,6.5660026 7.6913412,7.2015842 7.673637,7.318528 7.6357391,7.423253 7.5065759,7.4432009 7.3472438,7.4678879 7.1592376,7.4436995 6.9974121,7.4441728 6.6351128,7.4451447 6.2598478,7.3676233 5.9915515,7.6815496 5.8721151,7.8211835 5.7461952,7.9840062 5.6439635,8.1371045 c -0.1009847,0.1518511 -0.093255,0.3002122 0.085027,0.367535 0.1957362,0.073561 0.4528118,0.026182 0.6530361,0.0197 0.2645558,-0.00847 0.5291116,0.00501 0.7936674,-7.476e-4 0.1820229,-0.00374 0.2413669,0.030421 0.2064588,0.2358807 C 7.3487406,8.9587006 7.3095941,9.1492003 7.2804197,9.3464333 7.1804317,10.024404 7.0667304,10.700629 6.9525298,11.376606 6.7936963,12.314146 6.6371075,13.252434 6.4655575,14.188478 6.3017374,15.082631 6.1855427,15.985013 5.983074,16.873433 5.8249883,17.568607 5.7240037,18.277248 5.5556954,18.969682 5.4145655,19.550158 5.293882,20.143601 4.9722259,20.665731 4.7380909,21.045734 4.3959882,21.206312 3.9663652,21.104829 3.5778849,21.012322 3.2115961,20.866205 2.8951763,20.608631 2.6862246,20.438328 2.4473513,20.31141 2.1920214,20.458026 1.9519014,20.595915 1.7791048,20.851743 1.646453,21.088123 1.2205704,21.847879 1.915497,22.569984 2.6655289,22.684434 3.1692071,22.760986 3.666153,22.580208 4.1087416,22.356046 4.6996913,22.056582 5.2103511,21.635437 5.6387269,21.13874 5.9898058,20.731558 6.3575906,20.343327 6.6500737,19.890016 6.8450616,19.58756 7.0238427,19.274881 7.1866655,18.954471 7.7639005,17.817206 8.1227091,16.589926 8.4189318,15.354418 8.5613081,14.760227 8.716401,14.169777 8.8478064,13.572843 9.0268365,12.760724 9.1741996,11.934891 9.3083481,11.114294 9.3749255,10.707112 9.4310263,10.300679 9.5160532,9.8967389 9.5861222,9.5636133 9.6442168,9.2185186 9.6890985,8.8814035 9.7414633,8.4891827 9.990308,8.5136187 10.329668,8.4762164 c 0.286249,-0.03167 0.574492,-0.046376 0.861739,-0.067571 0.230395,-0.016703 0.494951,0.00396 0.711881,-0.088019 0.07754,-0.032911 0.147613,-0.080788 0.202719,-0.1513533 z"/><path d="M 22.473802,7.8481382 C 22.426924,7.6912996 22.341898,7.5501696 22.231437,7.4294861 22.130452,7.3192756 21.987827,7.1749046 21.851933,7.1098255 21.411589,6.8988785 20.817398,7.0838898 20.436149,7.3422154 20.23343,7.479854 20.052405,7.6519026 19.871131,7.8167201 19.691352,7.9802913 19.517061,8.1488492 19.35723,8.3321177 19.025101,8.7128687 18.724639,9.1210479 18.436396,9.5354601 18.296263,9.7374301 17.901549,10.472252 17.781115,10.399942 17.654198,10.323892 17.495365,9.5905657 17.435023,9.3843566 17.351243,9.0978583 17.29539,8.8016361 17.161741,8.5323425 16.97922,8.1643081 16.865268,7.7623629 16.608941,7.4307332 16.325934,7.0639457 16.001036,6.9584722 15.558946,7.092371 c -0.43436,0.1314054 -0.78469,0.4049374 -1.128539,0.6819608 -0.503927,0.4056851 -0.879442,0.926319 -1.256951,1.4439609 -0.28226,0.387483 -0.284753,0.3857373 0.04488,0.7380631 0.206458,0.2211702 0.202718,0.2184272 0.389229,-0.00847 0.2663,-0.3251469 0.524872,-0.6595196 0.882433,-0.8934057 0.261315,-0.1713009 0.417904,-0.1368908 0.57948,0.1326518 0.07929,0.1326517 0.146866,0.2752777 0.200225,0.4208957 0.335619,0.9141014 0.590201,1.8541344 0.89191,2.7784594 0.03815,0.117691 -0.01122,0.193991 -0.06707,0.278519 -0.356565,0.538837 -0.719363,1.074182 -1.123054,1.578607 -0.320409,0.401198 -0.643312,0.803891 -1.073932,1.097621 -0.187757,0.128912 -0.40768,0.217679 -0.635831,0.156839 -0.233887,-0.06283 -0.37377,-0.27478 -0.587459,-0.373521 -0.006,-0.003 -0.01272,-0.0052 -0.01895,-0.0079 -0.09974,-0.04064 -0.249845,-0.0389 -0.353074,-0.01571 -0.454059,0.102482 -0.697669,0.614139 -0.790177,1.023813 -0.08379,0.371776 -0.0013,0.778209 0.261315,1.062463 0.228899,0.24785 0.572248,0.351327 0.901634,0.356315 0.189003,0.0028 0.39995,-0.04663 0.57549,-0.11445 0.670241,-0.262062 1.181649,-0.887172 1.605038,-1.441717 0.285501,-0.374517 0.550555,-0.763994 0.829573,-1.143499 0.230645,-0.313677 0.68595,-1.247726 0.81586,-1.250718 0.07854,-0.0017 0.09924,0.185762 0.114199,0.241117 0.03341,0.123675 0.06658,0.247351 0.102232,0.370279 0.167561,0.578481 0.343848,1.156464 0.525122,1.730458 0.120934,0.384242 0.315921,0.782697 0.560779,1.103356 0.07431,0.09749 0.167311,0.190749 0.26306,0.266799 0.371276,0.296972 0.838799,0.27453 1.266177,0.123177 0.191498,-0.06757 0.370029,-0.163071 0.539335,-0.275527 0.781948,-0.519886 1.340732,-1.244235 1.868598,-2.002495 0.124423,-0.178781 0.107467,-0.278769 -0.03441,-0.428127 -0.367286,-0.386237 -0.357062,-0.389727 -0.705149,0.01995 -0.261066,0.306446 -0.527117,0.612643 -0.879442,0.818851 -0.245855,0.144621 -0.413416,0.103229 -0.592696,-0.118439 -0.14861,-0.183518 -0.246353,-0.396709 -0.33138,-0.614886 -0.349831,-0.901136 -0.588954,-1.838675 -0.885177,-2.757515 -0.21743,-0.674231 -0.223414,-0.680464 0.20945,-1.248723 0.447575,-0.587708 0.875703,-1.1968602 1.462163,-1.6613914 0.431119,-0.3416031 0.73183,-0.3226534 1.129037,0.059094 0.0788,0.075801 0.207456,0.1388856 0.316919,0.1476127 0.369781,0.029674 0.691187,-0.3024566 0.880939,-0.5792304 0.188006,-0.2727835 0.259319,-0.6183768 0.163072,-0.9392845 z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .macro{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M 5.1933594,1.4433594 6.3417969,2.5234375 6.2109375,2.6621094 c -3.466072,3.6769426 -3.467641,9.6565186 0,13.3339846 l 0.1308594,0.136718 -1.1484375,1.082032 -0.1328125,-0.140625 c -4.0371886,-4.28224 -4.0373752,-11.2077961 0,-15.4902346 z m 14.4726566,0 0.132812,0.140625 c 4.03717,4.2822197 4.037356,11.2058636 0,15.4882816 l -0.132812,0.140625 -1.148438,-1.080079 0.130859,-0.138671 c 3.465532,-3.675243 3.466902,-9.6542123 0,-13.3320316 L 18.517578,2.5234375 Z M 7.7597656,4.4335937 8.8769531,5.5488281 8.7421875,5.6816406 c -2.0366665,2.0366662 -2.037411,5.3404354 0,7.3769534 L 8.8769531,13.191406 7.7597656,14.310547 7.625,14.173828 C 4.9718615,11.520692 4.9723209,7.222936 7.6269531,4.5683594 Z m 9.3398434,0 0.132813,0.1347657 c 2.653779,2.6537788 2.65545,6.9500666 0,9.6054686 l -0.132813,0.136719 -1.117187,-1.119141 0.134765,-0.132812 c 2.036637,-2.035554 2.037534,-5.3391996 0,-7.3769534 L 15.982422,5.5488281 Z m -4.669921,1.7011719 c 0.811773,0 1.627703,0.304374 2.25,0.90625 1.260638,1.2198223 1.260413,3.1986104 0,4.4179684 -0.355144,0.343115 -0.779063,0.585007 -1.226563,0.732422 l -0.234375,0.07617 v 3.386719 h 0.002 v 6.048828 c 0,0.436615 -0.351565,0.791016 -0.789062,0.791016 -0.43763,0 -0.791016,-0.354618 -0.791016,-0.791016 v -3.308594 -6.126953 l -0.234375,-0.07617 c -0.448339,-0.147699 -0.871819,-0.38969 -1.226562,-0.732422 -1.2608671,-1.22004 -1.2605877,-3.1984433 0,-4.4179684 0.62227,-0.6019293 1.438264,-0.90625 2.25,-0.90625 z m 0,1.5820313 c -0.417461,0 -0.829931,0.1510762 -1.146485,0.4570312 -0.615751,0.5967629 -0.616877,1.5583713 0,2.1562499 0.314469,0.303373 0.726552,0.455078 1.146485,0.455078 0.421182,0 0.833304,-0.153008 1.148437,-0.457031 0.61548,-0.5965047 0.616739,-1.5585025 0,-2.15625 C 13.261859,7.8661993 12.846121,7.7167969 12.429688,7.7167969 Z"/></svg>');cursor:pointer}._script-editor_iy654_5 .monaco-editor .autorun{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="grey"><path d="M10 15h5.88c.27-.31.67-.5 1.12-.5.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5c-.44 0-.84-.19-1.12-.5H11.9c-.46 2.28-2.48 4-4.9 4-2.76 0-5-2.24-5-5 0-2.42 1.72-4.44 4-4.9v2.07c-1.16.41-2 1.53-2 2.83 0 1.65 1.35 3 3 3s3-1.35 3-3zm2.5-11c1.65 0 3 1.35 3 3h2c0-2.76-2.24-5-5-5s-5 2.24-5 5c0 1.43.6 2.71 1.55 3.62l-2.35 3.9c-.68.14-1.2.75-1.2 1.48 0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5c0-.16-.02-.31-.07-.45l3.38-5.63C10.49 9.61 9.5 8.42 9.5 7c0-1.65 1.35-3 3-3m4.5 9c-.64 0-1.23.2-1.72.54l-3.05-5.07C11.53 8.35 11 7.74 11 7c0-.83.67-1.5 1.5-1.5S14 6.17 14 7c0 .15-.02.29-.06.43l2.19 3.65c.28-.05.57-.08.87-.08 2.76 0 5 2.24 5 5s-2.24 5-5 5c-1.85 0-3.47-1.01-4.33-2.5h2.67c.48.32 1.05.5 1.66.5 1.65 0 3-1.35 3-3s-1.35-3-3-3"/></svg>');cursor:pointer}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  "use strict";/**
3
- * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.16
3
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.17
4
4
  *
5
5
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
6
6
  * License: The license can be found at https://www.sheetxl.com/license.
7
7
  */Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@sheetxl/sdk"),r=require("@sheetxl/utils-react"),c=require("react/jsx-runtime"),he=require("@sheetxl/utils"),o=require("react"),ht=require("@sheetxl/grid-react"),Ht=require("react-dom"),uo=o.memo(e=>{const{anchorLocation:t=he.AnchorLocation.TopLeft,cellWidth:n,cellHeight:i,size:a=7,inset:l=1,darkMode:f,fill:h,pathProps:s,style:y,...b}=e,w=a,m=l;let M="red",T=[],N=[];return t===he.AnchorLocation.TopLeft?(M=f?"rgb(255, 198, 246)":"green",T.push(m),N.push(m),T.push(m+w),N.push(m),T.push(m),N.push(m+w)):t===he.AnchorLocation.TopRight?(M=f?"rgb(0, 255, 255)":"red",T.push(n-m),N.push(m),T.push(n-(m+w)),N.push(m),T.push(n-m),N.push(m+w)):t===he.AnchorLocation.BottomRight?(M=f?"rgb(236, 252, 211)":"purple",T.push(n-m),N.push(i-m),T.push(n-(m+w)),N.push(i-m),T.push(n-m),N.push(i-(m+w))):t===he.AnchorLocation.BottomLeft&&(M=f?"rgb(255, 236, 183)":"blue",T.push(m),N.push(i-m),T.push(m+w),N.push(i-m),T.push(m),N.push(i-(m+w))),c.jsx("svg",{width:`${n}`,height:`${i}`,viewBox:`0 0 ${n} ${i}`,style:{position:"absolute",width:`${n}px`,height:`${i}px`,pointerEvents:"none",...y},...b,children:c.jsx("path",{d:`M ${T[0]} ${N[0]} L ${T[1]} ${N[1]} L ${T[2]} ${N[2]} L ${T[0]} ${N[0]} Z`,fill:h??M,...s})})}),ur=e=>{const{renderBounds:t,darkMode:n,zoom:i,disabled:a,filter:l,onFilterButtonMouseDown:f,style:h,...s}=e,y=o.useMemo(()=>{let M=null;const T=l.getSortField();T&&(M=T.reverse);const N=l.getField(),P=N&&N.criteria&&N.criteria.length>0;return M===!0?P?"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":M===!1?P?"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":P?"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 7.4530672,10.134098 2.6725085,5.2978998 3.370275,4.5911648 7.4530672,8.7264777 11.530095,4.5911648 l 0.697764,0.706735M 7.4529247,10.134098 2.9086709,5.2978998 3.5719465,4.5911648 7.4529247,8.7264777 11.328423,4.5911648 l 0.663274,0.70673"},[l]),[b,w]=o.useState(!1),m=Math.min(Math.min(18,t.height-8),t.width);return c.jsx("div",{style:{width:`${m}px`,height:`${m}px`,right:"0px",boxShadow:`0px 0px 0px 0.5px var(${b&&!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:(m>12?1:0)+"px",marginRight:"2px",display:"flex",alignItems:"center",justifyContent:"center",cursor:a?void 0:"pointer",...h},onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),onMouseDown:M=>{f?.(M,l),M.preventDefault()},...s,children:c.jsx("svg",{width:""+15*i,height:""+15*i,viewBox:"0 0 15 15",style:{fill:`var(${b&&!a?"--sxl-app-color-primary-dark":"--sxl-app-color-button-text"}, grey)`,opacity:a?.6:1},children:c.jsx("path",{d:y})})})},gr=e=>{const{value:t,coords:n,bounds:i,children:a,style:l,range:f,zoom:h=1,view:s,bodyStyle:y,normalStyle:b,showFormulas:w,showZeros:m,docTheme:M,onLinkMouseDown:T,onFilterButtonMouseDown:N,filterButtonProps:P,createFilterButton:$=ur,...V}=e,S=i.height/h,j=i.width/h,v=t,A=v.getValue(),q=t.getStyle(),K=y?.darkMode??!1;let D,O;const W=A&&A.isFormulaError,ge=W&&A instanceof d.FormulaError.Parse;let _,U=w||ge;if(U)if(v.isSpillOverflow())O="";else{const Ee=v.getFormulaText();Ee?O=Ee:D=v.getNumberFormat(d.NumberFormat.Type.General)}else D=v.getNumberFormat();U||(_=v.getTextOverflow());const z=_?_.colBounds.width+_.leftOffset+_.rightOffset:j,F=_?_.anchorBounds.x-_.leftOffset:0,k=_?_.anchorBounds.width:j,B=_?_.anchorBounds.x:0;let Q,oe=v.getRenderHorizontalAlignment();D&&(Q=D?.formattedRuns,O=Q?.runs[0]?.text??D.displayText);const be=v.getCalcStatus()===d.ICell.CalcStatus.Pending;let me=null,ze=q.getFill().toCSS(K,i),je=0,De=0;if(!q.getBorder().isEmpty()){const Ee=q.getBorder().getRight();!Ee.isNone()&&d.IBorder.BuiltInDefinitions.get(Ee.getStyle()).width>1&&(je=1);const I=q.getBorder().getBottom();!I.isNone()&&d.IBorder.BuiltInDefinitions.get(I.getStyle()).width>1&&(De=1)}let fe=null;if(j!==k||je||De||typeof ze?.backgroundPosition=="number"){const{backgroundPosition:Ee,...I}=ze,J=Ee??0,L=s?.getScrollTopLeft(),G=J?-(i.x+(L.left??0))%J:0,qe=J?-(i.y+(L.top??0))%J:0;(Ee!==void 0||je||De||j!==k)&&(Object.keys(I).length===1&&I.background==="none"||(ze=null,fe=c.jsx("div",{className:"fill",style:{marginLeft:`${G}px`,marginTop:`${qe}px`,left:B*h,width:r.ReactUtils.boundPixel(k*h-G+1+je),height:r.ReactUtils.boundPixel(i.height-qe+1+De),...I}},"background")))}let Ve=null;const Y=v.getComments(),Z=v.getWarnings(),de=v.getErrors();if(Y||W||de.length>0||Z.length>0){const Ee={size:7*h,darkMode:K,cellWidth:k*h+2,cellHeight:S*h+2,style:{top:-1,left:B*h-1}};Ve=Ve??[],(Z.length>0||de.length>0||W)&&Ve.push(c.jsx(uo,{anchorLocation:he.AnchorLocation.TopLeft,...Ee},`indicator-${Ve.length}`)),Y&&Ve.push(c.jsx(uo,{anchorLocation:he.AnchorLocation.TopRight,...Ee},`indicator-${Ve.length}`))}const ke=q.getFont();let Ce=D?.conditionalColor;const H=q.getAlignment(),ee=H.getHorizontal()===d.ITextFrame.HorizontalAlignment.Fill,ce=H.getHorizontal()===d.ITextFrame.HorizontalAlignment.CenterContinuous||ee,le=ce||U?0:H.getRotation(),Re=v.getInsets(),ie=Re.top+Re.bottom;let ve=Re.left,Ae=Re.right;const xe={...l,left:l.left-1,top:l.top-1,width:l.width+1+je,height:l.height+1+De},Oe=v.getColumnFilter(),Be=Oe&&!Oe?.hasHiddenButton();let p=null;be&&(p=c.jsxs("div",{className:"slider",children:[c.jsx("div",{className:"line"}),c.jsx("div",{className:"subline inc"})]},"pending"));const Pe=!(be||Be||fe||a||Ve||Q?.runs.length>1||_||le%360!=0);ze?.background==="none"&&(ze=null);let tt=ce||!(!_||!(_.rightIndex>0||_.leftIndex>0||_.colSpan>1));if(!tt){const Ee=v.getSpans();(Ee.width>1||Ee.height>1)&&(tt=!0)}const te={...ze,...xe,pointerEvents:T?"auto":void 0};if(!he.CommonUtils.isEmpty(O)||!he.CommonUtils.isEmpty(D?.repeatPlaceholder)){const Ee=D?.canWrap??!1;let I=null,J=null,L=null,G=[],qe=!0;m||U||A!==0||(qe=!1);const ye=v.getTextFrame(U);if(qe&&ye){let g=z-1-(ve+Ae);if(le){I=ye.layout().bounds;const ae={x:0,y:0,width:z-1,height:S};if(Q){let ue=Q.width;if(D.repeatPlaceholder||D.repeatChars.length>0){const we=d.GeomUtils.boundsToPoints(ae),He=d.GeomUtils.rotatePoints(we,-le);ue=d.GeomUtils.minBoundingRect(He).width}I={...I,width:ue}}L=d.GeomUtils.clipToOuterRect({...I,width:I.width+1+ve+Ae},ae,le),g=L.width-1-(ve+Ae)+.01}let C=null;Ee&&(C={width:g});let R=null,u=D?.repeatPlaceholder;const x=ye.layout(C);if(I=x.bounds,U?I={...I,width:0}:Q&&(I={...I,width:D.repeatPlaceholder||D.repeatChars.length>0?g:Q.width}),le&&Ee){let ne=null;x.visitLines({visitTextLine:(ae,ue)=>{let we=ae.bounds;const He=d.GeomUtils.boundsToPoints(we),Te=d.GeomUtils.rotatePoints(He,le),Ie=d.GeomUtils.minBoundingRect(Te);we={...we,x:(Ie.width-we.width)/2,y:(Ie.height-we.height)/2},ne=ne?d.GeomUtils.unionBounds(ne,we):we}}),I={...ne,width:ne.width+ve+Ae}}if(!u&&v.getType()!==d.ScalarType.String&&Math.floor(I.width)>g){if(q.getNumberFormat()==="General"&&v.getType()===d.ScalarType.Number){const ne=q.measureText("0"),ae=Math.floor(g/ne.width),ue=A,we=he.CommonUtils.splitNumber(ue),He=Math.min(10,ae-(Math.max(1,we.ipLength)+1)-(ue<0?1:0));if(He>=-1){const Te=`0${He>0?".":""}${"#".repeat(Math.max(0,He))}`;R=v.getNumberFormat(Te).displayText,R==="0"&&ue<0&&(R="-0")}else if(Math.abs(ue)>=Math.pow(10,5)||Math.abs(ue)<=Math.pow(10,-5)){const Te=ae-5-(ue<0?1:0);if(Te>=0){const Ie=`0.${"0".repeat(Math.max(0,Te-1))}E+00`;R=v.getNumberFormat(Ie).displayText}}}R||(u="#")}if(!u&&Q?.lastRepeatIndex>=0&&Q?.width>g&&(u="#"),u&&g>0){const ne=q.measureText(u),ae=Math.floor((g||1)/(ne?.width||1));R=ae>0?u.repeat(ae):"",oe=d.ITextFrame.HorizontalAlignment.Center}if(U&&(oe=d.ITextFrame.HorizontalAlignment.Left),R){const ne=q.measureText(R).width;ne&&(I={...I,width:ne})}if(J={...I,width:I.width+ve+Ae,height:I.height},le&&!Ee){const ne=d.GeomUtils.boundsToPoints(J),ae=d.GeomUtils.rotatePoints(ne,le),ue=d.GeomUtils.minBoundingRect(ae);J.width=ue.width,J.height=ue.height}oe===d.ITextFrame.HorizontalAlignment.Center||oe===d.ITextFrame.HorizontalAlignment.CenterContinuous?J.x=(z-J.width)/2:oe===d.ITextFrame.HorizontalAlignment.Right?J.x=z-J.width-.5:J.x=.5,H.getVertical()===d.ITextFrame.VerticalAlignment.Center?J.y=(S-J.height)/2:H.getVertical()===d.ITextFrame.VerticalAlignment.Bottom?J.y=S-J.height-ie:J.y=ie;const E=Pe?{...V}:void 0,re={style:{left:l.left-1,top:l.top-1,width:l.width+1,height:l.height+1,transform:le?`rotate(${le}deg)`:void 0,cursor:T?"pointer":void 0,pointerEvents:T?"auto":void 0,zIndex:tt?1:void 0,...ze},onMouseDown:T,onDoubleClick:T?ne=>{ne.stopPropagation(),ne.preventDefault()}:null,...E};ge&&(re.style.textDecorationStyle="wavy",re.style.textDecorationColor=K?"rgb(0, 255, 255)":"red",re.style.textDecorationLine="underline");const pe=ke.getSize(),se=(ne,ae,ue,we,He,Te,Ie,Ke=null)=>{let _e=pe*h,$e=ue,Ye=Ie?.runs?Ie.runs:[{type:d.NumberFormat.ParseRunType.Text,text:ne,width:q.measureText(ne,_e).width}];Ie&&Ie?.width!==I.width&&(I={...I,width:Ie?.width});let Je=ve;if(Ie?.lastRepeatIndex>=0&&g>Ie?.width){const nt=Ie.runs[Ie.lastRepeatIndex];if(nt){const at=[...Ye],Tt=Math.max(0,g-1-Ie.width);let kt=0,yt="";if(Tt>0){const wt=Math.floor(Tt/nt.width);yt=wt>0?nt.text.repeat(wt):"",kt=Tt}at[Ie.lastRepeatIndex]={type:d.NumberFormat.ParseRunType.Repeat,text:yt,width:kt},Ye=at,I={...I,width:Ie.width+kt}}}const Le=(nt,at,Tt,kt,yt,wt,ct,rt,Rt,ft=null)=>{let Ct,zt=$e.width;He===d.ITextFrame.HorizontalAlignment.Justify?(zt=yt,Te||(Ct="justify")):He===d.ITextFrame.HorizontalAlignment.Distributed&&(zt=yt,Ct=Te||nt.text.split(" ").length-1==0?"center":"justify");const{style:qt,className:Kt,...ut}=ft;let Nt=nt.text;if(He===d.ITextFrame.HorizontalAlignment.Fill&&D?.repeatChars.length===0){const gt=Math.max(1,Math.floor(($e?.width??0)/(ct?.width??1)));Nt=Nt.repeat(gt)}let tn=$e.height;const At=ke.getVerticalAlignment(),jt=At===d.IFont.VerticalAlignment.Sub,vn=At===d.IFont.VerticalAlignment.Super;if(jt||vn){const gt=ke.getSuperSubScale();_e*=gt,tn*=gt}const ot={textAlign:Ct,textAlignLast:Ct,...qt,...ke.toCSS(K,h,!0),fontSize:_e*d.IFont.getDeviceScale()};Pe||(ot.background=void 0),Ce&&(ot.color=Ce.toCSS(K));const Cn=Je+at;let Wt=Re.top+$e.y+0;if(jt&&(Wt+=Rt-_e),wt){const gt=(ct.x+Cn)*h+1,bt=(ct.y+Wt)*h+1;bt<0?ot.marginTop=bt:ot.paddingTop=bt,gt<0?(ot.width=(qt?.width??0)-gt,ot.left=(qt?.left??0)+gt):ot.paddingLeft=gt,ot.paddingRight=Math.max(0,(qt?.width??0)-zt*h-gt),ot.paddingBottom=Math.max(0,(qt?.height??0)-$e.height*h-bt),ot.height=(qt?.height??0)+(bt<0?-bt:0),(bt<0||gt<0)&&(ot.clipPath=`inset(${bt<0?-bt:0}px 0px 0px ${gt<0?1-gt:0}px)`)}else if(ot.left=(ct.x+Cn)*h+1,ot.top=(ct.y+Wt)*h+1,ot.width=ct.width*h,ot.height=ct.height*h,le&&!Ee){ot.left=(ct.x+at)*h+1,ot.top=(ct.y+($e.y+0))*h+1;const gt=d.GeomUtils.centerPoint({x:Je+at,y:0,width:nt.width,height:$e.height}),bt=d.GeomUtils.centerPoint({x:Je,y:0,width:yt,height:$e.height}),yn=d.GeomUtils.rotatePoints([gt],le,bt),wn={x:yn[0].x-gt.x,y:yn[0].y-gt.y};ot.left=ot.left+wn.x*h,ot.top=ot.top+wn.y*h;const Ot={...$e,x:Je,y:Re.top,width:$e.width+(ve+Ae)},bn=d.GeomUtils.boundsToPoints(Ot),$n=d.GeomUtils.rotatePoints(bn,le),xn=d.GeomUtils.minBoundingRect($n);Ot.width=xn.width,Ot.height=xn.height;const qn=d.GeomUtils.centerPoint(Ot),$t={x:qn.x-bt.x,y:qn.y-bt.y};ot.left=ot.left+$t.x*h,ot.top=ot.top+$t.y*h}ot.lineHeight=tn*h+"px";const nn=Pe?void 0:"text-line";G.push(c.jsx("div",{className:Kt?`${Kt} ${nn}`:nn,style:ot,...ut,children:Nt},`text-${$e.y}-${kt}-${Tt}`))};if(H.getOverflow()===d.ITextFrame.Overflow.Shrink&&g>0){let nt=I?.width??0,at=0;for(;nt>1&&nt>g&&_e>2&&at<100;)_e*=g/nt,nt=q.measureText(ne,_e).width,at++;I={...I,width:nt}}let Xe=$e.x;He===d.ITextFrame.HorizontalAlignment.Right?Xe+=I.width-$e.width:He!==d.ITextFrame.HorizontalAlignment.Center&&He!==d.ITextFrame.HorizontalAlignment.CenterContinuous||(Xe+=(I.width-$e.width)/2),Ie?.lastRepeatIndex>=0&&(Xe=$e.x);const vt=Ye.length;for(let nt=0;nt<vt;nt++){const at=Ye[nt];(at.type===d.NumberFormat.ParseRunType.Text||at.type===d.NumberFormat.ParseRunType.Repeat)&&(at.type,d.NumberFormat.ParseRunType.Repeat,Le(at,Xe,nt,ae,He===d.ITextFrame.HorizontalAlignment.Justify||He===d.ITextFrame.HorizontalAlignment.Distributed||Ie?.lastRepeatIndex>=0?g:$e.width,Pe,{x:J.x+F,y:J.y,width:at.width,height:I.height},0,we,Ke)),Xe+=at.width}};R?se(R,0,{x:0,y:0,...I},x.lines[0].baseline,oe,!0,null,re):x.visitLines({visitTextLine:(ne,ae,ue)=>{const we=ne.runs[0].text.replace(/\s+$/,""),He=ae===ue-1;let Te=oe===d.ITextFrame.HorizontalAlignment.Justify&&(He||ne.runs[0].text.endsWith(`
8
8
  `))?d.ITextFrame.HorizontalAlignment.Left:oe,Ie=0;ae>0&&(H.getVertical()===d.ITextFrame.VerticalAlignment.Distributed||H.getVertical()===d.ITextFrame.VerticalAlignment.Justify)&&(Ie=Math.max(0,(S-(ie+3)-ne.bounds.height*ue)/(ue-1)*ae)),H.getVertical()===d.ITextFrame.VerticalAlignment.Distributed&&le&&le%90==0&&le%180!=0&&(Te=d.ITextFrame.HorizontalAlignment.Distributed),Te!==d.ITextFrame.HorizontalAlignment.Justify&&Te!==d.ITextFrame.HorizontalAlignment.Distributed&&Te!==d.ITextFrame.HorizontalAlignment.Fill||(I={...I,width:g});let Ke=ee||D&&(D.repeatChars.length>0||D.spacingChars.length>0)?I.width:ne.bounds.width;const _e={...ne.bounds,y:ne.bounds.y+Ie+0,width:Ke};se(we,ae,_e,ye.lines[0].baseline,Te,He,ue===1?Q:null,Pe&&ae>0?{...re,style:{...re.style,background:void 0}}:re)}})}G.length>0&&(me=G)}if(Pe)return me&&me.length>0?me:c.jsx("div",{style:te,...V});let Me=T?"auto":xe.pointerEvents,Ne=null;if(Be){const Ee={x:B*h-1,y:-1,width:k*h+1,height:S*h+1};Me="auto",Ne=$({renderBounds:Ee,darkMode:K,className:"filter-button",disabled:!v.isEditAllowed(),zoom:h,filter:v.getColumnFilter(),onFilterButtonMouseDown:N,...P}),Ne&&(Ne=c.jsx("div",{style:{...Ee,position:"absolute",zIndex:2,display:"flex",alignItems:"end"},onDoubleClick:I=>{I.stopPropagation(),I.preventDefault()},children:Ne},"filterButton"))}be&&!me&&(me=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 Fe=[fe,me,a,Ve,p,Ne];return c.jsx("div",{style:{...ze,...xe,pointerEvents:Me},...V,children:Fe})},Do={text:"",placeholder:""},zo=(e,t)=>{if(e.clean().getStyle().getNumberFormat().indexOf("%")===-1)return!1;const n=t??e.dirty??"";return n.length===0||n.endsWith("%")&&!isNaN(parseFloat(n.substring(0,n.length-1)))},fl=Object.freeze([r.KeyCodes.Delete,r.KeyCodes.Home,r.KeyCodes.End]),hr=o.memo(o.forwardRef((e,t)=>{const{editState:n,onStartEdit:i,onChangeEdit:a,onSubmitEdit:l,onCancelEdit:f,onDoneEdit:h,defaultTextStyle:s,useRichStyling:y=!0,bodyStyle:b,activeCoords:w,sheet:m,commands:M,containerBounds:T,setNaturalSize:N,onFocus:P,disabled:$,style:V,zoom:S=1,linesVisible:j,autoFocus:v=!1,...A}=e,{height:q=0,width:K=0}=T??{},D=b?.darkMode??!1,O=o.useRef(null),[W,ge]=o.useState(!1),[_,U]=o.useState(null),[z,F]=o.useState(()=>n);o.useEffect(()=>{De.current=!1,F(n)},[n]);const k=o.useMemo(()=>{const I=z.clean();let J=I.getStyle();y||(J=J.createTemporaryStyle({font:{size:s?.fontSize}}));const L=I.getFormula(),G=J.getAlignment(),qe=L?d.ITextFrame.HorizontalAlignment.Left:G.getHorizontal(),ye=G.getVertical(),g=G.getOverflow()===d.ITextFrame.Overflow.Wrap||I.getType()===d.ScalarType.String&&(qe===d.ITextFrame.HorizontalAlignment.Justify||qe===d.ITextFrame.HorizontalAlignment.Distributed||ye===d.ITextFrame.VerticalAlignment.Justify||ye===d.ITextFrame.VerticalAlignment.Distributed),C=(x=>{if(!x)return Do;const E=x.clean();if(!E)return Do;let re=E.getStyle()?.getQuotePrefix();if(x.dirty===void 0||x.dirty===null){let pe="",se=E.getFormulaText();se&&(pe=se,re=!1),pe||(pe=E.toTextUnformatted(!0)??"");let ne="";if(!x.editMode&&E.isSpillOverflow()){const ae=E.getSpill();if(ae){const ue=ae.getCell(),we=ue.getFormulaText();ue.isEqual(E)||(ne=we)}}return re&&(pe="'"+pe),{text:pe,placeholder:ne}}return{text:x.dirty??"",placeholder:""}})(z),R=C.text,u=d.ITextFrame.toCSSHorizontalTextAlign(y&&!L?z.clean()?.getRenderHorizontalAlignment():d.ITextFrame.HorizontalAlignment.Left);return{style:J,isWrapped:g,textValue:R,formula:L,frameVertAlign:ye,placeholder:C.placeholder,insets:y?I.getInsets():he.TypesUtils.EmptyRect,textAlign:u}},[z,s,D,S,y]),B=o.useRef(null),Q=r.useImperativeElement(t,()=>({startEdit:I=>{O.current=I?.initialSelection;const J={...n,editMode:I?.editMode??!1};I?.text!==void 0&&(J.dirty=I.text),J.editMode===n.editMode&&J.dirty===n.dirty||(F(J),me?.(J))},submitEdit:()=>fe(),cancelEdit(){Ve()},autoFocus(){B.current.focus()},dispatchEvent:I=>B.current.dispatchEvent(I),focus(){B.current.focus()},getLineHeight:be}),[i,n]);o.useLayoutEffect(()=>{if(!_||!W)return;const I=B.current;k.textValue,I&&I.setSelectionRange(_.start,_.end,_.direction)},[B.current,_,k.textValue]);const oe=o.useMemo(()=>{const I=z?.clean(),J=k.style.createTemporaryTextFrame(k.textValue,I?.getType()===d.ScalarType.String),L=y?I.getInsets().right+I.getInsets().left:0;let G=null;return k.isWrapped&&(G={width:K-L}),J.layout(G)},[k,K,z,y]),be=r.useCallbackRef(()=>Math.ceil(oe?.lines[0]?.bounds.height),[oe]);o.useLayoutEffect(()=>{if(!oe)return;const I=k.style,J=I.getInsets()??he.TypesUtils.EmptyRect,L=y?J.left+J.right:0,G=y?.04*I.getFont().getSize():1,qe=Math.round(k.isWrapped?void 0:oe.bounds.width+L+G),ye=Math.round(oe.bounds.height);N?.({width:qe,height:ye})},[oe,N,k,y,z]);const me=r.useCallbackRef(a,[a]),ze=r.useCallbackRef(I=>{if(z.dirty===I)return;const J={...z};J.dirty=I,B.current,F(J),me?.(J)},[z]),je=r.useCallbackRef(I=>{if(z.editMode===I)return;const J={...z};J.editMode=I,F(J),me?.(J)},[z]),De=o.useRef(!1),fe=r.useCallbackRef(()=>{if(De.current)return!1;try{l?.(z),h?.(),De.current=!0}catch{return!1}return!0},[l,z]),Ve=r.useCallbackRef(()=>{De.current=!0,F(n),f?.(),h?.()},[f,n]),Y=r.useCallbackRef(I=>{if(!B.current)return;if(I.key,I.isDefaultPrevented(),!(I.isTrusted||I.nativeEvent.ctrlKey||I.nativeEvent.metaKey||I.nativeEvent.altKey||I.nativeEvent.isComposing||ht.STANDARD_KEY_CHARS.indexOf(I.nativeEvent.key)===-1&&I.nativeEvent.key!=="Backspace")){const C={...z};let R=0;return zo(C,C.dirty)&&!isNaN(parseFloat(I.key))?(C.dirty?.endsWith("%")?C.dirty=(C.dirty.substring(0,C.dirty.length-1)??"")+I.key+"%":C.dirty=(C.dirty??"")+I.key+"%",R=C.dirty.length-1):I.nativeEvent.key==="Backspace"?(C.dirty="",R=C.dirty.length):(C.dirty=(C.dirty??"")+I.key,R=C.dirty.length),B.current.value=C?.dirty,O.current={start:R,end:R,direction:"forward"},B.current?.setSelectionRange(R,R,"forward"),F(C),me?.(C),void I.preventDefault()}const J=I.nativeEvent.ctrlKey,L=I.nativeEvent.shiftKey,G=I.nativeEvent.altKey,qe=I.nativeEvent.metaKey;if(J&&I.key==="z"&&I.stopPropagation(),I.which===r.KeyCodes.Escape)return I.preventDefault(),void Ve();if(I.which===r.KeyCodes.F2)return je(!0),void I.preventDefault();const ye=I.target;if(I.key==="%"&&ye.selectionStart===ye.selectionEnd&&ye.value[ye.selectionStart]==="%"&&z?.clean().getStyle().numberFormat.includes("%"))return U({start:ye.selectionStart+1,end:ye.selectionEnd+1,direction:ye.selectionDirection}),void I.preventDefault();if(I.which===r.KeyCodes.Enter){if(I.preventDefault(),qe||G){const C=k.textValue.substring(0,ye.selectionStart)+`
9
9
  `+k.textValue.substring(ye.selectionEnd);return ze(C),void U({start:ye.selectionStart+1,end:ye.selectionStart+1,direction:ye.selectionDirection})}return void(fe()&&m.getSelection().traverse(d.IRange.Orientation.Column,L))}if(I.which===r.KeyCodes.Tab)return I.preventDefault(),void(fe()&&m.getSelection().traverse(d.IRange.Orientation.Row,L));let g=null;switch(I.which){case r.KeyCodes.Left:g=d.IRange.Direction.Left;break;case r.KeyCodes.Right:g=d.IRange.Direction.Right;break;case r.KeyCodes.Up:g=d.IRange.Direction.Up;break;case r.KeyCodes.Down:g=d.IRange.Direction.Down}if(g&&!(J||L||G||qe)&&!z.editMode)return void fe();z.editMode&&(g||fl.includes(I.which))&&I.stopPropagation()},[z,m,k]),Z=o.useCallback(()=>{B.current?.focus(),setTimeout(()=>{B.current?.select()},0)},[]),de=o.useCallback(()=>{B.current?.focus(),console.log("implement toggleRelativeReferences")},[]),ke=r.useCallbackRef(()=>{const I=B.current?.value;let J="";if(w.rowIndex>0){const L=m.getRange({rowIndex:w.rowIndex-1,colIndex:w.colIndex}).getCell();L&&(J=L.toTextUnformatted(!0))}ze(I+J)},[w,m]);o.useEffect(()=>m.getRange(w).addListener(()=>{const I={...z,clean:()=>m.getRange(w).getCell()};F(I),me?.(I)}),[w,m,z]);const Ce=o.useCallback(()=>{const I=z.clean().createTemporaryCell({value:d.DateUtils.nowWithPrecision(),style:{numberFormat:"Medium Time"}}).toText();ze((B.current?.value??"")+I)},[m]),H=o.useCallback(()=>{const I=z.clean().createTemporaryCell({value:d.DateUtils.nowWithPrecision(),style:{numberFormat:"Short Date"}}).toText();ze((B.current?.value??"")+I)},[m]),ee=o.useMemo(()=>({element:()=>B.current,doCopy:I=>{const J=B.current.value.substring(B.current.selectionStart,B.current.selectionEnd);if(I?.isCut){const L=B.current.value.substring(0,B.current.selectionStart)+B.current.value.substring(B.current.selectionEnd,B.current.value.length);ze(L)}return J}}),[B.current]),ce=o.useMemo(()=>({element:()=>B.current,doPaste:async(I,J)=>{const L=await I.toText?.();if(!L)return!0;const G=B.current.value.substring(0,B.current.selectionStart)+L+B.current.value.substring(B.current.selectionEnd,B.current.value.length);return ze(G),U({start:B.current.selectionStart+L.length,end:B.current.selectionStart+L.length,direction:"forward"}),!0}}),[B.current]),le=o.useMemo(()=>({contains:I=>B.current?.contains(I)||!1,focus(){B.current.focus()}}),[]),Re=o.useMemo(()=>[new r.SimpleCommand("selectAll",le,{label:"Select All",description:"Select all of the text in cell.",shortcut:{key:"a",modifiers:[r.KeyModifiers.Ctrl]}},Z),new r.SimpleCommand("startEditValueAbove",le,{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]}]},ke),new r.SimpleCommand("startEditCurrentTime",le,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},Ce),new r.SimpleCommand("startEditCurrentDate",le,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl]}},H),new r.Command("relativeReferencesToggle",le,{label:"Toggle References",description:"Toggles cell references from relative to absolute, to partially absolute, back to relative again.",shortcut:{key:"F4"}},de),new r.Command("toggleEditorFocus",le,{label:"Toggle Editor Focus",description:"Moves focus between editors such as formula editor and inline editor.",shortcut:{key:"F2",modifiers:[r.KeyModifiers.Ctrl]}})],[]),ie=o.useMemo(()=>{let I=null;const J=()=>({contains:L=>B.current?.contains(L)||!1,focus(){B.current.focus()}});return I=M?M.createChildGroup(J,"editor",!1):new r.CommandGroup(J,"editor"),I.addCommands(Re,!0),I},[M,Re]),ve=o.useMemo(()=>({notifier:null,source:ee,target:ce,commands:ie}),[ee,ce,ie]);r.useCopyPaste(ve);const[Ae,xe]=o.useState(!v);o.useEffect(()=>{xe(!1)},[]);const Oe=r.useCallbackRef(I=>{ge(!0),ie?.activate();const J=O.current;if(J!==!1){let L,G;const qe=B.current.value;zo(z,qe)&&(L=qe.length-1,G=qe.length-1),L=J?.start??L??qe.length,G=J?.end??G??qe.length,O.current=!1,U({start:L,end:G,direction:"forward"})}P?.(I)},[P,z]),Be=k.insets;let p=Be.left+1;const Pe=Be.left+Be.right+2-1,tt=oe?.bounds.height??0;let te,Me=Be.top;k.frameVertAlign===d.ITextFrame.VerticalAlignment.Center?Me=Math.max(0,(q-(Be.top+Be.bottom)-tt)/2):k.frameVertAlign===d.ITextFrame.VerticalAlignment.Bottom&&(Me=Math.max(0,q-(Be.top+Be.bottom)-tt)),j!==void 0&&oe?.lines[0]?.bounds&&(te=oe?.lines[0]?.bounds.height*j);const Ne=k.style.getFont();let Fe=Ne.getSize();Ne.isSuperSub()&&(Fe*=Ne.getSuperSubScale()),Fe*=d.IFont.getDeviceScale()*S;const Ee=y?Ne.toCSS(D,S):null;return c.jsx("div",{className:"sheet-cell-editor",onMouseDown:I=>{B.current&&document.activeElement!==B.current&&requestAnimationFrame(()=>{B.current.focus()})},ref:Q,...A,style:{display:"flex",flexGrow:1,alignSelf:"stretch",height:"100%",width:"100%",maxWidth:"100%",maxHeight:"100%",cursor:"initial",...V},children:c.jsx("div",{className:"editor-placement",style:{display:"flex",flexGrow:1,position:"relative",top:Me*S,left:p*S,width:`calc(100% - ${Pe*S}px)`,maxWidth:`calc(100% - ${Pe*S}px)`,height:(te??tt)*S,maxHeight:(te??tt)*S},children:c.jsx("textarea",{spellCheck:"false",placeholder:k.placeholder,ref:B,value:k.textValue,disabled:Ae,readOnly:$||m.getProtection().isReadOnly(),name:"sheet-cell-editor",autoComplete:"off",autoCapitalize:"off",style:{flex:"1 1 100%",font:"inherit",...Ee,fontSize:Fe?`${Fe}px`:"inherit",textAlign:k.textAlign,lineHeight:(oe?.lines[0]?.bounds.height??0)*S+"px",height:(oe?.bounds.height??0)*S,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:k.isWrapped?"normal":"pre",wordWrap:"break-word"},onFocus:Oe,onBlur:()=>{ge(!1)},onSelect:I=>{},onChange:I=>{B.current&&!De.current&&(O.current=!1,ze(I.target.value),k.textValue,I.target.value,I.target.selectionStart,I.target.selectionEnd,I.target.selectionDirection,U({start:I.target.selectionStart,end:I.target.selectionEnd,direction:I.target.selectionDirection}))},onMouseDown:I=>{W&&je(!0)},onKeyDown:Y})})})})),mr=(e,t)=>({clean:e,dirty:t,editMode:!1}),fr=e=>{const{length:t=0,width:n=1,dashArray:i=null,dashArrayAdditional:a=null,isDouble:l=!1,isAngled:f=!1,offsetX:h=0,offsetY:s=0,isVertical:y=!1,...b}=e,w=V=>{let S=null;if(V&&n>0){S="";for(let j=0;j<V.length;j++)S+=V[j],j<V.length-1&&(S+=",")}return S},m=w(i);let M=m;a&&(M=w(a));let T=n,N=t,P=null;if(l){T=Math.floor(n/2);const V=T+T/2+1;let S=null;S=y?`M ${r.ReactUtils.boundPixel(h+V)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+V)} ${r.ReactUtils.boundPixel(s+N)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+V)} L ${r.ReactUtils.boundPixel(h+N)} ${r.ReactUtils.boundPixel(s+V)}`,P=c.jsx("path",{strokeWidth:T,strokeDasharray:M,d:S,...b})}if(f){T=n/2;const V=T+T/2;let S=M,j=null;j=y?`M ${r.ReactUtils.boundPixel(h+V)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+V)} ${r.ReactUtils.boundPixel(s+N)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+V)} L ${r.ReactUtils.boundPixel(h+N)} ${r.ReactUtils.boundPixel(s+V)}`,P=c.jsx("path",{strokeWidth:T,strokeDasharray:S,strokeDashoffset:"1",shapeRendering:"crispEdges",d:j,...b})}let $=null;return $=y?`M ${r.ReactUtils.boundPixel(h+T/2)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+T/2)} ${r.ReactUtils.boundPixel(s+N)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+T/2)} L ${r.ReactUtils.boundPixel(h+N)} ${r.ReactUtils.boundPixel(s+T/2)}`,c.jsxs(c.Fragment,{children:[c.jsx("path",{strokeWidth:T,strokeDasharray:m,d:$,...b}),P]})};function ro(e,t){if(typeof e=="function")return e(t);e&&(e.current=t)}var Ut=parseInt(o.version.split(".")[0],10)>=19?function(e){return t=>{const n=[];for(const i of e){const a=ro(i,t),l=typeof a=="function";n.push(l?a:()=>ro(i,null))}return()=>{for(const i of n)i()}}}:function(e){return t=>{for(const n of e)ro(n,t)}},pl=function(){},pr=typeof window<"u",vl=pr?o.useLayoutEffect:o.useEffect,No={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const Xt=pr&&window.ResizeObserver!==void 0?function(){var e=o.useState(null),t=e[0],n=e[1],i=o.useState(No),a=i[0],l=i[1],f=o.useMemo(function(){return new window.ResizeObserver(function(h){if(h[0]){var s=h[0].contentRect,y=s.x,b=s.y,w=s.width,m=s.height,M=s.top,T=s.left,N=s.bottom,P=s.right;l({x:y,y:b,width:w,height:m,top:M,left:T,bottom:N,right:P})}})},[]);return vl(function(){if(t)return f.observe(t),function(){f.disconnect()}},[t]),[n,a]}:function(){return[pl,No]},Cl=(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:f=!1,shiftIfWide:h=!1,isVertical:s=!1,intersections:y,layout:b}=e,w=d.IBorder.BuiltInDefinitions.get(f?d.IBorder.StrokeStyle.Thin:a.getStyle());if(!w)return null;const m=n[0],M=n[1],T=n[2],N=n[3];let P=1+(s?N-M:T-m),$=0;const V=a.getColor().toRGBA(l).toString(),S=w.description.toLowerCase().includes("double");let j,v;const A=s?"rowStart":"colStart",q=s?"rowEnd":"colEnd",K=s?M:m;if(y?.length>0){const ge=y[0];if(ge?.range[A]===i[A]){const U=d.IBorder.BuiltInDefinitions.get(ge.stroke.getStyle());$=Math.floor(U.width/2)}if(y[y.length-1]?.range[q]===i[q]){const U=d.IBorder.BuiltInDefinitions.get(y[y.length-1].stroke.getStyle());P=Math.floor(P+(U.width===2?0:U.width/2))}if(S){const U=s?"colStart":"rowStart",z=s?"colEnd":"rowEnd",F=s?b?.getRowOffset:b?.getColOffset;let k=0,B=0;j=[],v=[];const Q=y.length;for(let oe=0;oe<Q;oe++){const be=y[oe];if(be.stroke.getStyle()===d.IBorder.StrokeStyle.Double&&F){const me=F(be.range[A])-(K-$);be.range[U]<i[U]&&(j.push(me-k),k=me,j.push(1),k++),be.range[z]>i[z]&&(v.push(me-B),B=me,v.push(1),B++)}}j.length>0&&k<P&&j.push(P-k),v.length>0&&B<P&&v.push(P-B)}}let D=s?-Math.floor(w.width/2):-$,O=s?-$:-Math.floor(w.width/2);const W=h&&w.width>2?-1:0;return c.jsx(fr,{offsetX:m+D+W,offsetY:M+O+W,length:P+$,isVertical:s,stroke:V,width:w.width,dashArray:j??w.pattern,dashArrayAdditional:v,isDouble:S,isAngled:w.description.toLowerCase().includes("slant")},t)},Co=({getBorderAt:e,borderRenderer:t=wl,getVisibleCells:n,darkMode:i,forceThinBorder:a=!1,defaultColor:l="black",shiftIfWide:f=!1})=>{const h=r.useCallbackRef(n,[n]);return{overlay:o.useMemo(()=>y=>{const b=y.toClipBounds(y.getRangeCoordsBounds(),-3);if(!b)return;const w=h(y);if(w.length===0)return;const m=y.getVisibleColumnOffsets(),M=y.getVisibleRowOffsets();let T=[],N=[];const P=y.getVisibleColumns(),$=y.getVisibleRows(),V=[],S=[],j=[],v=(_,U,z,F,k,B,Q)=>{const oe={index:F,stroke:k,visibleIndex:z,edge:B,length:Q};_[U]||(_[U]=[]),_[U].length>0&&_[U][_[U].length-1]?.index===F?_[U][_[U].length-1]=oe:_[U].push(oe)},A=y.getVisibleRangeCoords(),q=w.length;for(let _=0;_<q;_++){const U=w[_],z=U.coords;if(!z)continue;const F=U?.range??{rowStart:z.rowIndex,colStart:z.colIndex,rowEnd:z.rowIndex,colEnd:z.colIndex};if(!he.CoordUtils.isRangesIntersect(F,A)&&!he.CoordUtils.isRangeWithinRange(F,A))continue;const k=z.colIndex,B=z.rowIndex,Q=m[k],oe=M[B];if(F.rowEnd!==F.rowStart){const ke=M[F.rowStart]?.spanIndex??-1,Ce=M[F.rowEnd]?.spanIndex??M[$[$.length-1]].spanIndex+1;T.push({...F,rowStart:ke,rowEnd:Ce})}if(F.colEnd!==F.colStart){const ke=m[F.colStart]?.spanIndex??-1,Ce=m[F.colEnd]?.spanIndex??m[P[P.length-1]].spanIndex+1;N.push({...F,colStart:ke,colEnd:Ce})}const be=U.value,me=e(be,_);if(!me||me.isEmpty())continue;const ze=me.getLeft(),je=me.getTop(),De=me.getRight(),fe=me.getBottom();let Ve=1,Y=1;if(!Q||!oe)continue;const Z=Q.spanIndex,de=oe.spanIndex;ze.isNone()||v(V,Z,de,B,ze,d.IBorder.Edge.Left,Ve),je.isNone()||v(S,de,Z,k,je,d.IBorder.Edge.Top,Y),De.isNone()||v(V,Z+Y,de,B,De,d.IBorder.Edge.Right,Ve),fe.isNone()||v(S,de+Ve,Z,k,fe,d.IBorder.Edge.Bottom,Y)}const K=(_,U,z)=>{const F=[];return _.forEach((k,B)=>{let Q=null;k.sort((be,me)=>be.visibleIndex-me.visibleIndex);const oe=k.length;for(let be=0;be<oe;be++){const me=k[be];if(!me?.stroke||U[B]===void 0&&U[B-1]===void 0)continue;let ze=!1;if(z){const Ve=T.length;for(let Y=0;!ze&&Y<Ve;Y++){let Z=T[Y];Z.colStart<=me.index&&Z.colEnd>=me.index&&Z.rowStart<B&&Z.rowEnd>=B&&(ze=!0)}}else{const Ve=N.length;for(let Y=0;!ze&&Y<Ve;Y++){let Z=N[Y];Z.rowStart<=me.index&&Z.rowEnd>=me.index&&Z.colStart<B&&Z.colEnd>=B&&(ze=!0)}}if(ze)continue;const je=me.stroke?.getColor(),De=je?je.toRGBA().toString():l,fe=me.stroke.getStyle()+":"+De;(fe!==Q?.key||Q&&Q.visibleIndex+1<me.visibleIndex)&&(Q&&F.push(Q),Q={key:fe,index:U[B]??U[B-1]+1,visibleIndex:me.visibleIndex,edge:me.edge,stroke:me.stroke,from:me.index,to:me.index+me.length-1,intersections:[],length:1}),Q.to=me.index+me.length-1,Q.visibleIndex=me.visibleIndex}Q&&F.push(Q)}),F};T=T.sort(yl),N=N.sort(Cl);const D=K(V,P,!1),O=K(S,$,!0);if(D.length===0&&O.length===0)return null;const W=O.length;for(let _=0;_<W;_++){const U=O[_];let z=he.CommonUtils.findEqualOrGreater(D,U.from,k=>k.index),F=!1;for(;!F;){const k=D[z++];k&&k.index>=U.from&&k.index<=U.to+1&&k.from<=U.index&&k.to+1>=U.index&&(U.intersections.push({stroke:k.stroke,range:{rowStart:k.from,rowEnd:k.to+1,colStart:k.index,colEnd:k.index}}),k.intersections.push({stroke:U.stroke,range:{rowStart:U.index,rowEnd:U.index,colStart:U.from,colEnd:U.to+1}})),F=!k||k.index>U.to+1}}for(let _=0;_<W;_++){const U=O[_];let z=U.stroke;const F=`rBorder:${U.index}:${U.from}:${U.to}:${U.edge}`,k={rowStart:U.index,rowEnd:U.index,colStart:U.from,colEnd:U.to+1},B=y.getLayout(),Q=!1,oe=B.getColOffset(k.colStart),be=B.getRowOffset(k.rowStart),me=[oe,be,B.getColOffset(k.colEnd),be];j.push(t({key:F,points:me,stroke:z,darkMode:i,forceThinBorder:a,shiftIfWide:f,range:k,intersections:U.intersections,layout:B,isVertical:Q}))}const ge=D.length;for(let _=0;_<ge;_++){const U=D[_];let z=U.stroke;const F=`cBorder:${U.index}:${U.from}:${U.to}:${U.edge}`,k={rowStart:U.from,rowEnd:U.to+1,colStart:U.index,colEnd:U.index},B=y.getLayout(),Q=!0,oe=B.getColOffset(k.colStart),be=[oe,B.getRowOffset(k.rowStart),oe,B.getRowOffset(k.rowEnd)];j.push(t({key:F,stroke:z,points:be,darkMode:i,forceThinBorder:a,shiftIfWide:f,range:k,intersections:U.intersections,layout:B,isVertical:Q}))}return c.jsx("svg",{width:`${b.width}`,height:`${b.height}`,viewBox:`0 0 ${b.width} ${b.height}`,preserveAspectRatio:"none",shapeRendering:"crispEdges",style:{position:"absolute",left:"0px",top:"0px",width:`${b.width}px`,height:`${b.height}px`,pointerEvents:"none",transitionTimingFunction:"linear",transitionDelay:"0",transitionProperty:"left, top, width, height",willChange:"left, top, width, height, stroke-dashoffset",overflow:"visible"},children:j},"borders")},[e,i])}},Lo=he.AnchorLocation.Center,bl=Object.freeze({horizontal:!1,vertical:!1}),Po=he.TypesUtils.EmptyTopLeft,xl=(e,t)=>he.CoordUtils.EmptyCell,ql=(e,t)=>new Promise((n,i)=>{i("StaticBorderRenderer does not support scrolling")}),Sl=o.memo(e=>{const{getBorderAt:t,width:n,height:i,style:a,rowCount:l=2,columnCount:f=2,darkMode:h,forceThinBorder:s,children:y,...b}=e,w=o.useRef(null),[m,{width:M,height:T}]=Xt(),N=n??M,P=i??T,$=o.useMemo(()=>{const z=[];for(let F=0;F<l;F++)for(let k=0;k<f;k++){const B={colIndex:k,rowIndex:F};z.push({coords:B,value:B})}return z},[]),V=o.useCallback(z=>$,[$]),{overlay:S}=Co({getVisibleCells:V,getBorderAt:t,darkMode:h,forceThinBorder:s}),j=Math.floor(N/f),v=Math.floor(P/l),A={getColOffset:z=>Math.ceil(z*j)+0,getRowOffset:z=>Math.ceil(z*v)+0,getColIndex:z=>Math.floor((z-0)/j)-1,getRowIndex:z=>Math.floor((z-0)/v)-1},q={rowStart:0,colStart:0,rowEnd:l,colEnd:f},K={x:0,y:0,width:Math.max(0,N)+0,height:Math.max(0,P)+0},D=o.useMemo(()=>{const z={},F=Math.floor(N/f);for(let k=0;k<f;k++)z[k]={offset:k*F,size:F,spanIndex:k};return z},[N,P]),O=o.useMemo(()=>{const z={},F=Math.floor(P/l);for(let k=0;k<l;k++)z[k]={offset:k*F,size:F,spanIndex:k};return z},[N,P]);if(!S)return null;const W={width:N,height:P},ge={width:N,height:P},_={getStage:()=>w.current,getTotalSize:()=>W,getViewportSize:()=>ge,getLayout:()=>A,getCellCoordsAsRangeCoords:he.CoordUtils.cellToRange,getVisibleRangeCoords:()=>q,getVisibleRows:()=>{const z=[];for(let F=0;F<l;F++)z.push(F);return z},getTotalRangeCoords:()=>q,getRelativePointFromClient:(z,F)=>({x:z,y:F}),getVisibleColumns:()=>{const z=[];for(let F=0;F<f;F++)z.push(F);return z},toClipBounds:(z,F)=>K,toViewBounds:z=>z,toAbsoluteBounds:z=>z,getBounds:()=>K,getInsets:()=>null,getRangeCoordsBounds:(z,F)=>null,getVisibleColumnOffsets:()=>D,getVisibleRowOffsets:()=>O,allViews:()=>({[Lo]:_}),getAnchor:()=>Lo,getZoom:()=>1,scrollCellCoordsIntoView:ql,getCellCoordsFromClient:xl,getScrollOrientation:()=>bl,getScrollTopLeft:()=>Po,getFreezeTopLeft:()=>Po},U=S(_);return c.jsxs("div",{style:{...a,position:"relative",display:"flex"},...b,children:[c.jsx("div",{ref:Ut([w,m]),style:{flex:"1 1 100%",display:"flex",maxWidth:"100%",maxHeight:"100%"},children:y}),U]})});function vr(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=vr(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function dt(){for(var e,t,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=vr(e))&&(i&&(i+=" "),i+=t);return i}const Rl="_sheetxl-sheet_1qeq6_5",kl="_viewport-overlay_1qeq6_6",Cr=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"})]})},Ml=o.memo(e=>{const{colorLicensee:t="blue",colorError:n="red",colorCredits:i="grey",credits:a="All rights reserved - Michael Ford",feature:l,style:f,...h}=e??{},[s,y]=o.useState(null);o.useEffect(()=>{(async()=>{const v=await d.LicenseManager.getDetails();y(v)})()},[]);const[b,w]=o.useState(!1),m={opacity:.65},M=o.useMemo(()=>{const v=s?.getExceptions(),A=v?.length??0;if(A===0)return null;const q=[];for(let K=0;K<A;K++){const D=v[K];q.push(c.jsx("div",{style:{opacity:.8,fontSize:"16px",textAlign:"left",color:n},children:D},K))}return q},[s,n]);if(s===null||s.isValidFor(l))return null;const T=s.getType(),N=!M&&T.endsWith("ity"),P=s.getLicensee(),$=N?1.6:1,V=135/$,S=37/$;let j=null;return!T&&P?.length>0&&(j=c.jsx("div",{style:{opacity:.7,fontWeight:"500",fontSize:"16px",textAlign:"left",color:t},children:P})),c.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",overflow:"hidden",...f},...h,children:c.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column"},children:[b?c.jsx(Cr,{style:m}):c.jsx("svg",{width:V,height:S,style:m,children:c.jsx("image",{style:{width:V,height:S},href:"https://www.sheetxl.com/watermark.svg",onError:()=>w(!0)})}),c.jsxs("div",{children:[j,M,c.jsx("div",{style:{height:"0px",fontSize:"16px",textAlign:"left",width:"0px",opacity:.8,color:i},children:a})]})]})})}),et=(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),f={},h=l.length;for(let y=0;y<h;y++){const b=l[y];f[b]=(w,m)=>{i.current[b]?.(w,m)}}const s=e.addListeners(f,n);if(a)for(let y=0;y<h;y++)f[l[y]](e);return()=>{s?.()}},[e])},Dn=new class{constructor(){this._taskPanes=new Map}registerTaskPane(e,t=!1){const n=e.key.toLowerCase();if(!t&&this._taskPanes.has(n))throw new Error(`Task pane with key '${n}' is already registered.`);this._taskPanes.set(n,e)}unregisterTaskPane(e){if(e=e.toLowerCase(),!this._taskPanes.has(e))throw new Error(`Task pane with key '${e}' is not registered.`);this._taskPanes.delete(e)}getRegisteredTaskPane(e){return e=e.toLowerCase(),this._taskPanes.get(e)??null}findContributions(e){if(!e)return he.CommonUtils.EmptyArray;const t=[];e=(e=e.toLowerCase()).replace(/\/+$/g,"");for(const n of this._taskPanes.values()){const i=n.contributionPoints;if(i&&i.length!==0)for(let a of i)a.startsWith(e)&&t.push(n)}return t}},yr=o.createContext(void 0),Tl={activateTaskPane(e,t){console.warn("No TaskPaneArea available to activate task pane",e,t)}},wr=()=>o.useContext(yr)||Tl,Yt={TaskPaneArea:"_TaskPaneArea_6dmgk_5",TaskPaneTitle:"_TaskPaneTitle_6dmgk_13",TaskPaneFrame:"_TaskPaneFrame_6dmgk_36",TaskPaneStrip:"_TaskPaneStrip_6dmgk_52",TaskPaneStripItem:"_TaskPaneStripItem_6dmgk_60"},yo=o.memo(o.forwardRef((e,t)=>{const{children:n,title:i,icon:a,onClose:l,readOnly:f,focused:h,style:s,className:y,...b}=e,w=o.useMemo(()=>dt("taskpane-title",y,Yt.TaskPaneTitle,{focused:h}),[y,h]);return c.jsxs("div",{ref:t,className:w,style:s,...b,children:[c.jsx("div",{className:"title",style:{flex:"1 1 100%"},children:i}),c.jsx("div",{"aria-label":"close",role:"button",style:{width:24,height:24,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onPointerDown:m=>{m.stopPropagation()},onPointerUp:()=>{l()},children:c.jsx("div",{style:{fontSize:"0.7em"},children:"✕"})})]})}));yo.displayName="TaskPaneTitle";const Il=(e,t)=>c.jsx(yo,{...e,ref:t}),El=o.memo(o.forwardRef((e,t)=>{const{children:n,entry:i,close:a,listenerContainer:l,model:f,commands:h,onMounted:s,onUnmounted:y,paneWrapper:b,paneProps:w,renderTaskPanelTitle:m=Il,style:M,className:T,...N}=e,[P,$]=o.useState(null),[V,S]=o.useState(!1),j=r.useCallbackRef(a,[a]),v=o.useRef(null),A=o.useRef(null);o.useEffect(()=>(s?.(i),()=>{y?.(i)}),[i]);const q=o.useRef([]),K=o.useMemo(()=>({addListener:W=>{const ge=l(W);return q.current.push(ge),ge},close:()=>{j?.()},focus:W=>{v.current?.focus(W)}}),[l]);o.useEffect(()=>()=>{for(const W of q.current)W();q.current=[]},[]);const D=o.useMemo(()=>(i.renderTaskPanelTitle??m)({title:i.getTitle(),icon:null,readOnly:!1,focused:V,onClose:j,onPointerDown:W=>{}},A),[i,V]),O=o.useMemo(()=>{let W=i.renderTaskPane({entryKey:i.key,model:f,commands:h,frame:K,...w},t);return b&&(W=b(W)),W},[i,f,h,t]);return c.jsxs("div",{className:dt("taskpane-frame",T,Yt.TaskPaneFrame),tabIndex:0,ref:v,style:M,onPointerDown:async W=>{W.currentTarget.focus()},onFocus:W=>{W.relatedTarget&&!P&&$(W.relatedTarget),S(!0)},onBlur:W=>{P&&!v?.current?.contains(W.relatedTarget)&&$(null),W.relatedTarget&&S(!1)},...N,children:[c.jsx("div",{style:{flex:"0 0 auto",display:"flex",flexDirection:"column",width:"100%",alignItems:"stretch",justifyContent:"stretch"},children:D}),c.jsx("div",{className:"taskpane-frame-content",style:{flex:"1 1 auto",minHeight:0,width:"100%",overflow:"auto",height:"100%",display:"flex"},children:O})]})})),wo=o.memo(o.forwardRef((e,t)=>{const{children:n,title:i,taskPanes:a,onSelect:l,selected:f,registry:h=Dn,style:s,className:y,...b}=e,w=o.useMemo(()=>a.map(T=>{const N=h.getRegisteredTaskPane(T);if(!N)return null;let P=N.getIcon?.();P&&(typeof P=="string"&&(P=c.jsx(r.DynamicIcon,{iconKey:P})),P=c.jsx("span",{style:{display:"inline-block",transform:"rotate(90deg)",transformOrigin:"center"},children:P}));const $=T===f;return c.jsxs("div",{style:{writingMode:"vertical-rl",textOrientation:"mixed",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4px",minWidth:"0px"},className:dt("taskpane-strip-item",Yt.TaskPaneStripItem,{selected:$}),onClick:()=>e.onSelect(T),children:[P,N.getTitle()]},T)}),[a,f,l,h]),m=r.useImperativeElement(t,()=>({isTaskPaneStrip:()=>!0}),[]),M=o.useMemo(()=>dt("taskpane-strip",y,Yt.TaskPaneStrip),[y]);return c.jsx("div",{ref:m,className:M,style:s,...b,children:w})}));wo.displayName="TaskPaneStrip";const Fl=(e,t)=>c.jsx(wo,{ref:t,...e}),Al=o.memo(o.forwardRef((e,t)=>{const{className:n="",registry:i=Dn,model:a,commands:l,onOpen:f,onClose:h,paneWrapper:s,paneProps:y,frameWrapper:b,frameProps:w,renderTaskPanelTitle:m,renderTaskPaneStrip:M=Fl,alwaysShowStrip:T,style:N}=e,P=r.useCallbackRef(f,[f]),$=r.useCallbackRef(h,[h]),[V,S]=o.useState(null),j=o.useRef(null),[v,A]=o.useState([]),q=o.useRef(new Set),K=r.useCallbackRef(async(z,F=!1)=>{const k=Array.from(q.current),B=k.length;let Q=!0;for(let oe=0;Q&&oe<B;oe++){const be=k[oe];if(be.onBeforeHide)try{await Promise.resolve(be.onBeforeHide())===!1&&(Q=!1)}catch{Q=!1}}return Q},[]),D=r.useCallbackRef(z=>{const F=Array.from(q.current),k=F.length;A(B=>{const Q=B.findIndex(be=>be.key===z);if(Q===-1)return B;const oe=[...B];return oe.splice(Q,1),oe.length===0?(S(null),$?.(),oe):(O(oe[Math.max(oe.length-1,Q-1)].key),oe)});for(let B=0;B<k;B++){const Q=F[B];try{Q.onHide?.()}catch{}}},[$]),O=r.useCallbackRef(async z=>{const F=i.getRegisteredTaskPane(z);if(!F)return void console.warn(`Invalid taskpane '${z}'`);if(j.current===z||V&&!await K(V.key))return;const k=o.createRef();let B=c.jsx(El,{ref:()=>{j.current=null},entry:F,model:a,commands:l,close:async()=>{await K(z)&&D(z)},paneWrapper:s,paneProps:y,renderTaskPanelTitle:m,listenerContainer:oe=>(q.current.add(oe),()=>{q.current.delete(oe)}),onMounted:oe=>{oe.key===z&&(j.current=null),P?.()},onUnmounted:oe=>{},...w});b&&(B=b(B));const Q={key:z,elem:B,ref:k};A(oe=>{if(oe.findIndex(me=>me.key===z)!==-1)return oe;const be=[...oe];return be.push(Q),be}),S(Q),j.current=z},[V,b,s,m]);o.useEffect(()=>{V&&!j.current&&O(V.key)},[w,a]);const W=r.useImperativeElement(t,()=>({activateTaskPane:O}),[i,y,a,l]),ge=o.useMemo(()=>v.map(z=>z.key),[v]),_=o.useMemo(()=>{if(ge.length<=1&&!T)return null;const z={className:Yt.TaskPaneAreaStrip,taskPanes:ge,selected:V?.key,onSelect:F=>{O(F)},registry:i};return M(z,null)},[ge,V,i,T]),U=V?.elem;return c.jsxs("div",{ref:W,className:dt("taskpane-area",n,Yt.TaskPaneArea),style:N,children:[U,_]})})),kn=new d.Color("transparent");function br(e){const{sheet:t,onRepeatCommandChange:n,bodyStyle:i,commands:a,target:l,onStartEdit:f,getViewport:h}=e,s=r.useNotifier(),y=wr(),[b,w]=o.useState(null),[m,M]=o.useState(null),T=o.useRef(null),N=r.useCallbackRef(f,[f]),P=r.useCallbackRef(h,[h]),$=o.useMemo(()=>({serializer:{parse:g=>g?t?.getStyles().parseColor(g):null,stringify:g=>g?g.toString():null}}),[t]),[V,S]=r.usePersistenceState("sheet.lastBorder",null),[j,v]=r.usePersistenceState("sheet.lastFillColor",t?.getStyles().parseColor(d.IColor.Scheme.Bg2),$),[A,q]=r.usePersistenceState("sheet.lastFontColor",t?.getStyles().parseColor(t?.getStyles().getNormal().getFont().getFill()),$),K=r.useEditMode();o.useRef(K.getMode()).current=K.getMode();const D=r.useGlobalClipboard(),[O,W]=o.useState(he.CommonUtils.EmptyArray),ge=o.useCallback(()=>{if(T.current!==t)return;const g=t.getSelectedRanges();let C=null;O.length>0&&he.CoordUtils.isCellWithinRange(b,O[0].getRange().getCoords())&&(C=O[0]);const R=t?.getSelectedCell(),u=R?.getCoords()??null;Ht.unstable_batchedUpdates(()=>{me(C),w(u),M(g)})},[t,O,m,b]),_=o.useCallback(he.CommonUtils.debounce(ge,210),[ge]);o.useEffect(()=>{T.current=t,ge()},[t]);const U=r.useCallbackRef(()=>t.getRange(b).getCell(),[t,b]),z=r.useCallbackRef(async(g,C,R=null,u=!1,x=!0)=>{const E=g?.label?.(),re=async()=>{const ae=await Promise.resolve(x&&s.showBusy(E??"Busy..."));try{await t.doBatch(async()=>C(t),E),u&&K.setMode(null),ae&&ae()}catch(ue){if(ae&&ae(),!ue)return;s.showError(ue)}},pe=[];let se=!1;const ne=async()=>(pe.push(re),(async()=>{if(!se){for(se=!0;pe.length>0;){const ae=pe.shift();ae&&await ae()}se=!1}})());if(n){let ae=null;if(R!==!1&&g){const ue=R??E;ae=new r.SimpleCommand(g.key(),l,{label:ue,description:ue},ne)}n(ae)}return ne()},[t,n,s]),F=r.useCallbackRef((g,C,R=!1,u)=>(u||(u={autoSelect:!0,autoFit:!0}),z(g,x=>{const E=x.getSelectedRanges();R&&E.getStyle().update(null,u),E.getStyle().update(C,u)})),[t]),k=r.useCallbackRef((g,C)=>{z(g,R=>{R.getSelectedRange().setHyperlink(C)})},[t]),B=r.useCallbackRef((g,C)=>{z(g,R=>{R.getSelectedRange().setComments(C)})},[t]),Q=r.useCallbackRef((g,C)=>{z(g,R=>{R.getSelectedRanges().clear(C)})},[t]),oe=r.useCallbackRef(async(g,C,R=!1,u=!1)=>z(g,async x=>{let E=x.getSelectedRanges();R&&(C===d.IRange.Orientation.Row?E=E.getEntireRows(u):C===d.IRange.Orientation.Column&&(E=E.getEntireColumns(u)));let re=null;const pe=K.getMode()?.key;if(pe==="copy"||pe==="cut"){const se=await D.getClipboard().readReference();se&&se.getItemType()==="range"&&(re=se.getItem(),re.getCoords()||(re=null))}if(re){const se=await E.insertFrom(re,{...re.getMarkOptions(),orientation:C,autoSelect:!0});!se||se.isEntireRows()||se.isEntireColumns()||se.autoFit({orientations:d.IRange.Orientations.Row,minContent:!0}),K.setMode(null)}else E.insert({orientation:C,autoSelect:!0})},"Insert Cells",!1),[K]),[be,me]=o.useState(null),ze=r.useCallbackRef(g=>t.getStyles().setDefaultTableStyle(g),[t]),je=r.useCallbackRef(g=>{t.getStyles().getTableStyle(g)?.delete()},[t]),De=r.useCallbackRef((g,C)=>{z(g,async R=>{const u=R.getSelectedRange(),x=R.getSelectedCell().getCoords();let E=null,re=0;const pe=x.rowIndex>0?R.getRange({rowIndex:x.rowIndex,colIndex:x.colIndex}).getExtended(d.IRange.Direction.Up):null;pe&&R.getRange({colStart:x.colIndex,rowStart:pe.getCoords().rowStart,colEnd:x.colIndex,rowEnd:pe.getCoords().rowStart}).isContentful()&&(E=d.IRange.Direction.Up,re=x.rowIndex-pe.getCoords().rowEnd);const se=x.colIndex>0?R.getRange({rowIndex:x.rowIndex,colIndex:x.colIndex-1}).getExtended(d.IRange.Direction.Left):null;if(se&&R.getRange({colStart:se.getCoords().colStart,rowStart:x.rowIndex,colEnd:se.getCoords().colStart,rowEnd:x.rowIndex}).isContentful()){const ae=x.colIndex-se.getCoords().colEnd;(ae<re||!E)&&(E=d.IRange.Direction.Left,re=ae)}let ne=null;if(E===d.IRange.Direction.Up){if(ne={...pe.getCoords()},(ne.rowEnd===x.rowIndex||!R.getRange({colIndex:x.colIndex,rowIndex:x.rowIndex-1}).isContentful())&&ne.rowStart>0&&R.getRange({colIndex:x.colIndex,rowIndex:ne.rowStart-1}).isContentful()){const ae=pe.getExtended(d.IRange.Direction.Up);ne={colStart:x.colIndex,rowStart:ae.getCoords().rowStart,colEnd:x.colIndex,rowEnd:pe.getCoords().rowEnd}}ne.rowEnd=x.rowIndex-1}else if(E===d.IRange.Direction.Left){if(ne={...se.getCoords()},(ne.colEnd===x.colIndex||!R.getRange({colIndex:x.colIndex-1,rowIndex:x.rowIndex}).isContentful())&&ne.colStart>0&&R.getRange({colIndex:ne.colStart-1,rowIndex:x.rowIndex}).isContentful()){const ae=se.getExtended(d.IRange.Direction.Left);ne={colStart:ae.getCoords().colStart,rowStart:x.rowIndex,colEnd:ae.getCoords().colEnd,rowEnd:x.rowIndex}}ne.colEnd=x.colIndex-1}if(u.size!==1&&E){const ae=u.getCoords(),ue=u.startIncrementalUpdates({orientation:d.IRange.Orientation.Column}),we={...ne},He=ae.rowStart,Te=ae.rowEnd,Ie=ae.colStart,Ke=ae.colEnd,_e=E===d.IRange.Direction.Up;for(let $e=Ie;$e<=Ke;$e++){we.colStart=_e?$e:ne.colStart+($e-Ie),we.colEnd=_e?$e:ne.colEnd+($e-Ie);for(let Ye=He;Ye<=Te;Ye++){we.rowStart=_e?ne.rowStart+(Ye-He):Ye,we.rowEnd=_e?ne.rowEnd+(Ye-He):Ye;const Je=R.getRange(we).toString();ue.pushAt(Ye,$e,`=${C}(${Je})`)}}ue.apply()}else{const ae=ne?R.getRange(ne).toString():"",ue=`=${C}(`;N?.({text:`${ue}${ae})`,editMode:!0,initialSelection:{start:ue.length,end:ue.length+ae.length}})}},!1)},[t]),fe=r.useCallbackRef((g,C,R=!1,u=!0)=>{z(g,async x=>{if(be)return void be.updateStyleOptions(C);const E=x.getSelectedRanges().getFixed(!0),re=x.getSelectedRange().getDefaultSortCriteria(),pe={getNames:()=>x.getNames(),table:()=>null,styles:()=>null,bodyStyle:()=>null},se={ranges:E,hasHeader:re?.options?.hasHeader??!1},ne=async ue=>{if(!(ue=await Promise.resolve(ue)))return null;const we=await Promise.resolve(s.showBusy(g.label()));try{await x.getTables().add(ue.ranges.at(0),{styleName:C?.name,clearFormatting:R,hasHeader:ue.hasHeader}).getRange().select(),we()}catch(He){we(),s.showError(He)}};if(!u)return void await ne(se);const ae={initialValue:se,context:()=>pe,onInput:ue=>{ne(ue)}};s.showWindow("tableNew",ae)},!1,!0,!1)},[be]),Ve=r.useCallbackRef(()=>i,[i]),Y=r.useCallbackRef(g=>({styles:()=>t.getStyles(),table:()=>g,bodyStyle:Ve,getNames:()=>t.getNames()}),[t]),Z=r.useCallbackRef(async(g,C,R,u=!0)=>{if(!C){let E=t.getSelectedRange();E.size===1&&(E=E.getSurrounding());let re=t.getTables().getItems({address:t.getSelectedRange()});re.length>0&&(C=re[0]),await E.select()}if(!C)return;try{R&&await C.select()}catch{}if(!u)return;const x=new Promise(async(E,re)=>{g.update({context:Y(C)}),y.activateTaskPane("tableDetails",{}),E(!0)});try{if(!await x)return}catch(E){s.showError(E)}},[s]),de=r.useCallbackRef(async(g,C,R=!1)=>{let u=null;if(C)C.isITable?u=C:C.getValue()&&(u=C.getValue());else{const x=t.getTables().getItems({address:t.getSelectedRange()});x.length>0&&(u=x[0])}if(u){if(!R){const x=u.getRange().getCoords(),E=(x.colEnd-x.colStart+1)*(x.rowEnd-x.rowStart+1);if(E>1e4&&await s.showOptions({title:"Confirm",description:`Converting a table to range with '${E}' cells will set a large number of cell styles and may affect performance.
10
- Continue?`,options:["Convert","Cancel"],defaultOption:"Convert"})!=="Convert")return}z(g,async()=>{R?u.delete():u.convertToRange()},!1,!0)}},[s]),ke=r.useCallbackRef((g,C,R)=>{z(g,async u=>{const x=u.getSelectedRanges();if(x.getCount()>1)throw new Error("Can not sort on multiple cell ranges. Please select a single range and try again.");let E=x.at(0);E.size===1&&(E=E.getSurrounding());const re=u.getSelection().getCoords().cell;let pe=E.getDefaultSortCriteria(d.IRange.Orientation.Row,re);if(!pe){if(R)throw new Error("Invalid sort selection. Sort requires a single range with data.");return}const se=async He=>{if(!(He=await Promise.resolve(He)))return;const Te=await Promise.resolve(s.showBusy(g.label()));try{E.doBatch(()=>{const Ie={...He,...C};E.sort(Ie),E.autoFit({orientations:Ie?.orientation===d.IRange.Orientation.Column?d.IRange.Orientations.Column:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},g?.label?.())}catch(Ie){Te(),s.showError(Ie)}Te()};let ne=pe.options;if(!R)return void await se(ne);let ae=E;ne.hasHeader&&(ae=E.getIntersect(pe.sortCoords)),ae.select();const ue={range:E,cell:re},we={initialValue:ne,context:()=>ue,onInput:He=>{se(He)}};s.showWindow("sort",we)},!1,!1,!1)},[s]),Ce=r.useCallbackRef(()=>{console.log("compactedSelection");const g=t.getSelection().getCoords(),C=t.getSelectedRanges().getFlattened().getCoords(),R=(E=>{const re=new Blob([E],{type:"application/javascript"}),pe=URL.createObjectURL(re),se=new Worker(pe);return URL.revokeObjectURL(pe),se})("console.log('hello from worker');");setTimeout(()=>{R.terminate(),console.log("Worker terminated")},5e3);let u=-1;for(let E=0;u===-1&&E<C.length;E++)he.CoordUtils.isCellWithinRange(g.cell,C[E])&&(u=E);if(he.CoordUtils.isEqualRangesArrays(g.ranges,C))return;const x={cell:g.cell,ranges:C,rangeIndex:u};t.getSelection().updateCoords(x)},[t]),H=r.useCallbackRef(()=>{console.log("selectComments")},[t]),ee=r.useCallbackRef(async(g=!1,C=!1)=>{let R=null;if(C)R=t.getEntireRange();else{const u=t.getSelectedRange();if(u.isEntireRange()){const x=t.getSelection().getCoords().cell,E=t.getRange(x);R=E.getSurrounding(),R.isEntireRange()&&(R=E)}else R=u.getSurrounding({contentOnly:g})}R&&await R.select()},[t]),ce=r.useCallbackRef((g,C,R)=>{z(g,async u=>{let x=u.getSelectedRanges();R&&(C===d.IRange.Orientation.Row?x=x.getEntireRows():C===d.IRange.Orientation.Column&&(x=x.getEntireColumns())),x.delete(C)},"Delete Cells")},[t]);r.useCallbackRef(async g=>{let C=null;const R=P(),u=Math.min(R.width-8,480),x=Math.min(R.height-8,288);try{t.getSelectedRanges(),C=await t.getMovables().add({bounds:{x:R.left+(R.width-u)/2,y:R.top+(R.height-x)/2,width:u,height:x},type:"chart",json:g.template}),C.select(),K.setMode(null)}catch(E){s.showError(E)}return C},[t,s]);const le=r.useCallbackRef(async(g,C,R)=>{const u=await s.showBusy(g.label());try{const x=await t.getMovables().addImage(C,{autoSelect:!0,...R});return u(),K.setMode(null),x}catch(x){u();let E=x;typeof E!="string"&&(console.warn(x),E="Unable to resolve image."),s.showMessage(E,{type:r.NotifierType.Error})}},[t,s]),Re=r.useCallbackRef((g,C)=>{z(g,async R=>{const u=R.getSelectedRanges();u.doBatch(()=>{const x=C===d.IRange.Direction.Up||C===d.IRange.Direction.Down,E=u.getCoords().slice().sort(he.CoordUtils.createRangeComparator(x?d.IRange.Orientation.Row:d.IRange.Orientation.Column));for(let re=0;re<E.length;re++){const pe=E[re];let se=pe;const ne=R.getRange(se).getMerges();let ae=0,ue=0;if(ne.length>0){const we=ne[0];ae=we.rowEnd-we.rowStart,ue=we.colEnd-we.colStart}C===d.IRange.Direction.Left?se={...pe,colStart:pe.colEnd+ue}:C===d.IRange.Direction.Right?se={...pe,colEnd:pe.colStart+ue}:C===d.IRange.Direction.Up?se={...pe,rowStart:pe.rowEnd+ae}:C===d.IRange.Direction.Down&&(se={...pe,rowEnd:pe.rowStart+ae}),R.getRange(se).autoFill(pe,{filler:d.AutoFill.Types.Copy}),R.getRange(pe).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:g.label()})})},[s]),ie=r.useCallbackRef(()=>{let g=null;const C=t.getSelectedCell().getCoords();if(C?.rowIndex>0){const R=t.getRange({rowIndex:C.rowIndex-1,colIndex:C.colIndex}).getCell();R&&(g=R.toTextUnformatted(!0))}N?.({text:g})},[t]),[ve,Ae]=o.useReducer(g=>g+1,0),[xe,Oe]=o.useReducer(g=>g+1,0),Be=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.",icon:"FormulaView",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.",icon:"ViewZero"}),new r.SimpleCommand("selectComments",l,{label:"Select Comments",description:"Select the cells with comments.",shortcut:{key:"O",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>H()),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]}]},(g=!1)=>ee(!1,g)),new r.SimpleCommand("selectRegion",l,{label:"Select Region",description:"Select the closest data.",shortcut:{key:"*",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>ee(!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]}},()=>Ce()),new r.SimpleCommand("formatTextRotate0",l,{label:"No Text Rotation",description:"Remove all text rotation.",icon:"TextRotation315"}),new r.SimpleCommand("formatTextRotate45",l,{label:"Angle Clockwise",description:"Angle text 45 degrees downward.",icon:"TextRotation45"}),new r.SimpleCommand("formatTextRotate90",l,{label:"Rotate Text Down",description:"Angle your text so that it aligns with the left.",icon:"TextRotation90"}),new r.SimpleCommand("formatTextRotate270",l,{label:"Rotate Text Up",description:"Angle your text so that it aligns with the right.",icon:"TextRotation2702"}),new r.SimpleCommand("formatTextRotate315",l,{label:"Angle Counterclockwise",description:"Angle text 45 degrees upward.",icon:"TextRotation315"}),new r.Command("formatTextRotateCustom",l,{label:"Custom Text Rotation",description:"Angle your text using a custom angle.",icon:"TextRotationCustom"}),new r.SimpleCommand("formatTextRotateVertical",l,{label:"Vertical Text",description:"Stack text vertically.",icon:"TextRotationVertical"}),new r.SimpleCommand("sortAscending",l,{label:"Sort Ascending",scopedLabels:{sort:"Ascending"},description:"Lowest to Highest.",icon:"SortIncrease"},function(){ke(this,{reverse:!1},!1)}),new r.SimpleCommand("sortDescending",l,{label:"Sort Descending",scopedLabels:{sort:"Descending"},description:"Highest to Lowest.",icon:"SortDecrease"},function(){ke(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.",icon:"SortCustom"},function(){ke(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.
10
+ Continue?`,options:["Convert","Cancel"],defaultOption:"Convert"})!=="Convert")return}z(g,async()=>{R?u.delete():u.convertToRange()},!1,!0)}},[s]),ke=r.useCallbackRef((g,C,R)=>{z(g,async u=>{const x=u.getSelectedRanges();if(x.getCount()>1)throw new Error("Can not sort on multiple cell ranges. Please select a single range and try again.");let E=x.at(0);E.size===1&&(E=E.getSurrounding());const re=u.getSelection().getCoords().cell;let pe=E.getDefaultSortCriteria(d.IRange.Orientation.Row,re);if(!pe){if(R)throw new Error("Invalid sort selection. Sort requires a single range with data.");return}const se=async He=>{if(!(He=await Promise.resolve(He)))return;const Te=await Promise.resolve(s.showBusy(g.label()));try{E.doBatch(()=>{const Ie={...He,...C};E.sort(Ie),E.autoFit({orientations:Ie?.orientation===d.IRange.Orientation.Column?d.IRange.Orientations.Column:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},g?.label?.())}catch(Ie){Te(),s.showError(Ie)}Te()};let ne=pe.options;if(!R)return void await se(ne);let ae=E;ne.hasHeader&&(ae=E.getIntersect(pe.sortCoords)),ae.select();const ue={range:E,cell:re},we={initialValue:ne,context:()=>ue,onInput:He=>{se(He)}};s.showWindow("sort",we)},!1,!1,!1)},[s]),Ce=r.useCallbackRef(()=>{console.log("compactedSelection");const g=t.getSelection().getCoords(),C=t.getSelectedRanges().getFlattened().getCoords(),R=(E=>{const re=new Blob([E],{type:"application/javascript"}),pe=URL.createObjectURL(re),se=new Worker(pe);return URL.revokeObjectURL(pe),se})("console.log('hello from worker');");setTimeout(()=>{R.terminate(),console.log("Worker terminated")},5e3);let u=-1;for(let E=0;u===-1&&E<C.length;E++)he.CoordUtils.isCellWithinRange(g.cell,C[E])&&(u=E);if(he.CoordUtils.isEqualRangesArrays(g.ranges,C))return;const x={cell:g.cell,ranges:C,rangeIndex:u};t.getSelection().updateCoords(x)},[t]),H=r.useCallbackRef(()=>{console.log("selectComments")},[t]),ee=r.useCallbackRef(async(g=!1,C=!1)=>{let R=null;if(C)R=t.getEntireRange();else{const u=t.getSelectedRange();if(u.isEntireRange()){const x=t.getSelection().getCoords().cell,E=t.getRange(x);R=E.getSurrounding(),R.isEntireRange()&&(R=E)}else R=u.getSurrounding({contentOnly:g})}R&&await R.select()},[t]),ce=r.useCallbackRef((g,C,R)=>{z(g,async u=>{let x=u.getSelectedRanges();R&&(C===d.IRange.Orientation.Row?x=x.getEntireRows():C===d.IRange.Orientation.Column&&(x=x.getEntireColumns())),x.delete(C)},"Delete Cells")},[t]);r.useCallbackRef(async g=>{let C=null;const R=P(),u=Math.min(R.width-8,480),x=Math.min(R.height-8,288);try{t.getSelectedRanges(),C=await t.getMovables().add({bounds:{x:R.left+(R.width-u)/2,y:R.top+(R.height-x)/2,width:u,height:x},type:"chart",json:g.template}),C.select(),K.setMode(null)}catch(E){s.showError(E)}return C},[t,s]);const le=r.useCallbackRef(async(g,C,R)=>{const u=await s.showBusy(g.label());try{const x=await t.getMovables().addImage(C,{autoSelect:!0,...R});return u(),K.setMode(null),x}catch(x){u();let E=x;typeof E!="string"&&(console.warn(x),E="Unable to resolve image."),s.showMessage(E,{type:r.NotifierType.Error})}},[t,s]),Re=r.useCallbackRef((g,C)=>{z(g,async R=>{const u=R.getSelectedRanges();u.doBatch(()=>{const x=C===d.IRange.Direction.Up||C===d.IRange.Direction.Down,E=u.getCoords().slice().sort(he.CoordUtils.createRangeComparator(x?d.IRange.Orientation.Row:d.IRange.Orientation.Column));for(let re=0;re<E.length;re++){const pe=E[re];let se=pe;const ne=R.getRange(se).getMerges();let ae=0,ue=0;if(ne.length>0){const we=ne[0];ae=we.rowEnd-we.rowStart,ue=we.colEnd-we.colStart}C===d.IRange.Direction.Left?se={...pe,colStart:pe.colEnd+ue}:C===d.IRange.Direction.Right?se={...pe,colEnd:pe.colStart+ue}:C===d.IRange.Direction.Up?se={...pe,rowStart:pe.rowEnd+ae}:C===d.IRange.Direction.Down&&(se={...pe,rowEnd:pe.rowStart+ae}),R.getRange(se).autoFill(pe,{filler:d.AutoFill.Types.Copy}),R.getRange(pe).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:g.label()})})},[s]),ie=r.useCallbackRef(()=>{let g=null;const C=t.getSelectedCell().getCoords();if(C?.rowIndex>0){const R=t.getRange({rowIndex:C.rowIndex-1,colIndex:C.colIndex}).getCell();R&&(g=R.toTextUnformatted(!0))}N?.({text:g})},[t]),[ve,Ae]=o.useReducer(g=>g+1,0),[xe,Oe]=o.useReducer(g=>g+1,0),Be=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.",icon:"FormulaView",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.",icon:"ViewZero"}),new r.SimpleCommand("selectComments",l,{label:"Select Comments",description:"Select the cells with comments.",shortcut:{key:"O",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>H()),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]}]},(g=!1)=>ee(!1,g)),new r.SimpleCommand("selectRegion",l,{label:"Select Region",description:"Select the closest data.",shortcut:{key:"*",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>ee(!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]}},()=>Ce()),new r.SimpleCommand("formatTextRotate0",l,{label:"No Text Rotation",description:"Remove all text rotation.",icon:"TextRotation315"}),new r.SimpleCommand("formatTextRotate45",l,{label:"Angle Clockwise",description:"Angle text 45 degrees downward.",icon:"TextRotation45"}),new r.SimpleCommand("formatTextRotate90",l,{label:"Rotate Text Down",description:"Angle your text so that it aligns with the left.",icon:"TextRotation90"}),new r.SimpleCommand("formatTextRotate270",l,{label:"Rotate Text Up",description:"Angle your text so that it aligns with the right.",icon:"TextRotation2702"}),new r.SimpleCommand("formatTextRotate315",l,{label:"Angle Counterclockwise",description:"Angle text 45 degrees upward.",icon:"TextRotation315"}),new r.Command("formatTextRotateCustom",l,{label:"Custom Text Rotation",description:"Angle your text using a custom angle.",icon:"TextRotationCustom"}),new r.SimpleCommand("formatTextRotateVertical",l,{label:"Vertical Text",description:"Stack text vertically.",icon:"TextRotationVertical"}),new r.SimpleCommand("sortAscending",l,{label:"Sort Ascending",scopedLabels:{sort:"Ascending",sortFilter:"Ascending"},description:"Lowest to Highest.",icon:"SortIncrease"},function(){ke(this,{reverse:!1},!1)}),new r.SimpleCommand("sortDescending",l,{label:"Sort Descending",scopedLabels:{sort:"Descending",sortFilter:"Descending"},description:"Highest to Lowest.",icon:"SortDecrease"},function(){ke(this,{reverse:!0},!1)}),new r.SimpleCommand("sortCustom",l,{label:"Custom Sort…",scopedLabels:{sort:"Custom…",sortFilter:"Custom…"},description:"Choose more options, such as sorting by multiple columns or rows, and case-sensitive sorts.",icon:"SortCustom"},function(){ke(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
11
  For example, you can prevent people from editing locked cells or making formatting changes.`,icon:"Lock"}),new r.Command("formatSheetTabColor",l,{label:"Tab Color",description:"Color the tab to help differentiate for other sheets.",icon:"stroke.colored"}),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.",icon:"PresetStyles"},function(g){F(this,{named:g.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.",icon:"PresetStyles"},function(g){fe(this,g)}),new r.Command("formatTableStyleClearCellStyles",l,{label:"Format as Table (Clear Styles)",scopedLabels:{table:"Apply (Clear Styles)"},icon:"PresetStyles",description:"Create a table or apply style to the current table and clears all cell styles."},function(g){fe(this,g,!0)}),new r.Command("formatTableStyleClearTableStyle",l,{label:"Clear Table Style",scopedLabels:{table:"Clear Style"},icon:"ClearFormats",description:"Remove all the styling that is specific for the table."},function(){fe(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."},ze),new r.Command("deleteTableStyle",l,{label:"Delete Table Style",scopedLabels:{table:"Delete"},description:"Remove the current table style."},je),new r.Command("formatBorder",l,{label:"Border",description:"Create an outline border."},function(g){F(this,{border:g})}),new r.Command("formatFillColor",l,{label:"Fill Color",description:"Color the background of the cells to make them stand out."},function(g){F(this,{fill:g})}),new r.Command("formatFontColor",l,{label:"Font Color",description:"Change the color of your text."},function(g){F(this,{font:{fill:g}})}),new r.Command("formatBoldToggle",l,{label:"Bold",description:"Toggle bold formatting of text.",icon:"TextBold",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.",icon:"TextItalic",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.",icon:"TextUnderline",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.",icon:"TextUnderlineDouble"}),new r.Command("formatUnderlinedAccountingToggle",l,{label:"Accounting Underline",scopedLabels:{underline:"Accounting"},description:"Use accounting underline for the text.",icon:"TextUnderlineAccounting"}),new r.Command("formatUnderlinedAccountingDoubleToggle",l,{label:"Double Accounting Underline",scopedLabels:{underline:"Double Accounting"},description:"Use accounting double underline the text.",icon:"TextUnderlineAccountingDouble"}),new r.Command("formatStrikeThroughToggle",l,{label:"Strikethrough",description:"Toggle strike-through formatting of text.",icon:"TextStrike",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.",icon:"TextSuperscript"}),new r.Command("formatSubscriptToggle",l,{label:"Subscript",description:"Format your text to be smaller and sit at the bottom of the line.",icon:"TextSubscript"}),new r.Command("formatAlignTopToggle",l,{label:"Align Top",description:"Align text to the top.",icon:"TextVerticalTop"}),new r.Command("formatTextOverflowVisibleToggle",l,{label:"Overflow Text",description:"Overflow text to the next cells.",icon:"TextHorizontalOverflow"}),new r.Command("formatTextOverflowWrapToggle",l,{label:"Wrap Text",description:"Wrap text with the existing cell and increase the height as required.",icon:"TextHorizontalWrap"}),new r.Command("formatTextOverflowClipToggle",l,{label:"Clip Text",description:"Clip text that falls outside of the existing cell.",icon:"TextHorizontalClip"}),new r.Command("formatTextOverflowShrinkToggle",l,{label:"Shrink Text",description:"Shrink the text font to fit within existing cell.",icon:"TextHorizontalShrink"}),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.",icon:"TextVerticalCenter"}),new r.Command("formatAlignBottomToggle",l,{label:"Align Bottom",description:"Align text to the bottom.",icon:"TextVerticalBottom"}),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.",icon:"FormatAlignJustify"}),new r.Command("formatAlignDistributedVerticalToggle",l,{label:"Distribute Vertically",description:"Justify your content vertically.",icon:"FormatAlignJustify"}),new r.Command("formatAlignLeftToggle",l,{label:"Align Left",description:"Align your content to the left.",icon:"FormatAlignLeft"}),new r.Command("formatAlignCenterToggle",l,{label:"Align Center",description:"Center your content.",icon:"FormatAlignCenter"}),new r.Command("formatAlignRightToggle",l,{label:"Align Right",description:"Align your content to the right.",icon:"FormatAlignRight"}),new r.Command("formatAlignJustifyToggle",l,{label:"Align Justify",description:"Justify your content.",icon:"FormatAlignJustify"}),new r.Command("formatAlignCenterContinuousToggle",l,{label:"Center Across",description:"Center your content across multiple cells.",icon:"FormatAlignCenter"}),new r.Command("formatAlignFillToggle",l,{label:"Fill Across",description:"Repeat the value to fill the entire cell.",icon:"FormatAlignJustify"}),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.",icon:"FormatAlignJustify"}),new r.SimpleCommand("formatFontSizeIncrease",l,{label:"Increase Font Size",description:"Make your text a bit bigger.",icon:"TextSizeIncrease",shortcut:{key:">",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){F(this,g=>({font:{size:d.FontUtils.findNextFontSize(g.getFont().getSize(),!0)}}))}),new r.SimpleCommand("formatFontSizeDecrease",l,{label:"Decrease Font Size",description:"Make your text a bit smaller.",icon:"TextSizeDecrease",shortcut:{key:"<",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){F(this,g=>({font:{size:d.FontUtils.findNextFontSize(g.getFont().getSize(),!1)}}))}),new r.Command("formatFontFamily",l,{label:"Font",description:"Select the font your text."},function(g){F(this,{font:{family:g}})}),new r.Command("formatFontSize",l,{label:"Font Size",description:"Change the size of your text."},function(g){F(this,{font:{size:g}})}),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(g,C){const R=this,u={initialValue:g??C.state(),context:()=>C.context(),onInput:(x,E)=>{F(R,{numberFormat:x})}};s.showWindow("numberFormat",u)}),new r.Command("formatNumberFormat",l,{label:"Number Format",description:"Choose the format for your cells, such as percentage, currency, date or time."},function(g){F(this,{numberFormat:g})}),new r.Command("formatNumberFormatGeneralStyle",l,{label:"General Style",description:"Remove all specific formatting.",shortcut:{key:"Backquote",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){F(this,{numberFormat:d.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(){F(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(){F(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(){F(this,{numberFormat:"d-mmm-yy"})}),new r.Command("formatNumberFormatAccountingStyle",l,{label:"Accounting Style",description:"Format as Dollars, Euros, or other currency.",icon:"CurrencyDollar",shortcut:{key:"4",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(g){F(this,{numberFormat:g??'_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)'})}),new r.Command("formatNumberFormatPercentStyle",l,{label:"Percent Style",description:"Format as a percent with no decimal places.",icon:"Percent",shortcut:{key:"5",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){F(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(){F(this,{numberFormat:"0.00E+00"})}),new r.Command("formatNumberFormatCommaStyle",l,{label:"Comma Style",description:"Format with a thousands separator.",icon:"Comma",shortcut:{key:",",modifiers:[r.KeyModifiers.Ctrl]}},function(){F(this,{numberFormat:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)'})}),new r.Command("formatNumberFormatIncreaseDecimal",l,{label:"Increase Decimal",description:"Show more decimal places for a more precise value.",icon:"IncreaseDecimal2"},function(){F(this,g=>({numberFormat:d.NumberFormat.Parser.adjustDecimalPlaces(g.getNumberFormat(),1)}))}),new r.Command("formatNumberFormatDecreaseDecimal",l,{label:"Decrease Decimal",description:"Show few decimal places.",icon:"DecreaseDecimal2"},function(){F(this,g=>({numberFormat:d.NumberFormat.Parser.adjustDecimalPlaces(g.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.",icon:"HideRow",shortcut:{key:"9",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("unhideRows",l,{label:"Unhide Rows",description:"Unhide the rows.",icon:"ShowRow",shortcut:{key:"(",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("hideColumns",l,{label:"Hide Columns",description:"Hide the columns.",icon:"HideColumn",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.",icon:"ShowColumn",shortcut:{key:")",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.SimpleCommand("calculate",l,{label:"Calculate Sheet",description:"Recalculate the formulas on the current sheet.",icon:"CalculateSheet",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("insertFunction",l,{label:"Insert Function",disabled:!0,scopedLabels:{insert:"Function",insertFunction:"More Functions..."},description:"Work with the function in the current cell.",icon:"FunctionThin",shortcut:{key:"F3",modifiers:[r.KeyModifiers.Shift]}},function(g){g&&De(this,g.getName())}),new r.Command("insertFunctionSum",l,{label:"Quick Sum",scopedLabels:{insertFunction:"Sum"},description:"Quick sum of the cells.",icon:"FunctionSum",shortcut:{key:"=",modifiers:[r.KeyModifiers.Alt]}},function(){De(this,"SUM")}),new r.Command("insertFunctionAverage",l,{label:"Quick Average",scopedLabels:{insertFunction:"Average"},description:"Quick average of the cells."},function(){De(this,"AVERAGE")}),new r.Command("insertFunctionCount",l,{label:"Quick Count",scopedLabels:{insertFunction:"Count Numbers"},description:"Quick count of the cells."},function(){De(this,"COUNT")}),new r.Command("insertFunctionMax",l,{label:"Quick Max",scopedLabels:{insertFunction:"Max"},description:"Quick maximum of the cells."},function(){De(this,"MAX")}),new r.Command("insertFunctionMin",l,{label:"Quick Min",scopedLabels:{insertFunction:"Min"},description:"Quick minimum of the cells."},function(){De(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(){N?.({text:t.createTemporaryCell({value:d.DateUtils.nowWithPrecision(),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(){N?.({text:t.createTemporaryCell({value:d.DateUtils.nowWithPrecision(),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("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.",icon:"HyperlinkInset",context:()=>U,shortcut:[{key:"K",modifiers:[r.KeyModifiers.Ctrl]},{key:"K",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]},async function(g,C){const R=this,u={context:C.context(),onInput:x=>{k(R,x)}};s.showWindow("hyperlink",u)}),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.",icon:"HyperlinkGoto",context:()=>U},async(g,C)=>{const R=C.context()();if(!R)return;const u=R.getHyperlink();if(u)try{await u.open()}catch(x){s.showError(x)}}),new r.Command("deleteHyperlink",l,{label:"Delete Link",scopedLabels:{hyperlink:"Delete"},icon:"HyperlinkDelete",description:"Remove the hyperlink.",context:()=>U},function(g,C){k(this,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."},(g,C)=>{((R,u)=>{R?.showMessage?.(c.jsxs("p",{style:{marginTop:"0px",marginBottom:"0px"},children:[u," 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/guides/introduction/roadmap",target:"_blank",rel:"noopener",children:"SheetXL Roadmap"}),"."]}))})(s,C.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.",icon:"CommentInsert",context:()=>U},async function(g,C){const R=this,u={context:C.context(),onInput:x=>{B(R,x)}};s.showWindow("comments",u)}),new r.Command("deleteComments",l,{label:"Delete Comments",description:"Remove any comments.",icon:"CommentDelete",context:()=>U},function(g,C){B(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.",icon:"InsertImage"},async function(g=null){let C=null,R=null;typeof g=="string"?R=g:C=g?.file?g.file:g,(C||(C=await he.CommonUtils.openFileDialog(R??"image/*"),C))&&await le(this,{file:C},g?.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.",icon:"InsertImage"},async function(g){if(!g){const C=await s.showInput({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(C.option!=="Insert")return;g=C.input}g&&le(this,{fetch:g})}),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.",icon:"InsertTable",shortcut:[{key:"L",modifiers:[r.KeyModifiers.Ctrl]},{key:"T",modifiers:[r.KeyModifiers.Alt,r.KeyModifiers.Ctrl]}]},function(){fe(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.",icon:"InsertTable"},function(g){let C=null,R=!1;g.isITable?C=g:g.getValue()&&(C=g.getValue(),R=!0),Z(this,C,R)}),new r.Command("deleteTable",l,{label:"Delete Table",scopedLabels:{delete:"Table",table:"Delete",namedItem:"Delete"},description:`Remove the table.
12
12
 
13
13
  The table and table specific styling will be removed but the values will be preserved.`,icon:"InsertTable"},function(g){de(this,g,!0)}),new r.Command("convertTableToRange",l,{label:"Convert To Range",description:`Convert the table into a normal range of cells.
14
14
 
15
- The values and the formatting are preserved.`,icon:"InsertTable"},function(g){de(this,g,!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 g=this.context().table();g&&g.setShowTotals(!g.getShowTotals())}),new r.Command("tableHeaderRowToggle",l,{label:"Toggle Table Header Row",description:"Toggle Header Row on/off.",scopedLabels:{table:"Header Row"}},function(){const g=this.context().table();g&&g.setShowHeaders(!g.getShowHeaders())}),new r.Command("autoFilterToggle",l,{label:"Toggle Filter",scopedLabels:{filter:"Filter"},description:"Toggle Auto Filter on/off.",icon:"FilterToggle",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){const g=this.context().table();g&&g.setShowFilterButton(!g.getShowFilterButton())}),new r.Command("autoFilterReapply",l,{label:"Reapply Filter",scopedLabels:{filter:"Reapply"},description:"Reapply the filter and sort with the latest changes.",icon:"FilterReapply",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..",icon:"FilterClear"}),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]}]},ie),new r.Command("formatPainterToggle",l,{label:"Format Painter",description:"Apply style to another part of your workbook.",icon:"FormatPaint.yellow"}),new r.SimpleCommand("insertCells",l,{label:"Insert Cells",scopedLabels:{insertCells:"At Selection"},description:"Inserts cells at the current selection.",icon:"InsertCells",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){oe(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.",icon:"InsertCellsRight"},function(){oe(this,d.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.",icon:"InsertCellsDown"},function(){return oe(this,d.IRange.Orientation.Row)}),new r.SimpleCommand("insertRows",l,{label:"Insert Row(s)",scopedLabels:{insertCells:"Row(s)"},description:"Insert a row above the current position.",icon:"InsertRow"},function(){return oe(this,d.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.",icon:"InsertColumn2"},function(){return oe(this,d.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 oe(this,d.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 oe(this,d.IRange.Orientation.Column,!0,!0)}),new r.SimpleCommand("deleteCells",l,{label:"Delete Cells",scopedLabels:{deleteCells:"At Selection"},description:"Delete the cells.",icon:"DeleteCells",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.",icon:"DeleteCellsUp"},function(){return ce(this,d.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.",icon:"DeleteCellsLeft"},function(){return ce(this,d.IRange.Orientation.Column)}),new r.SimpleCommand("deleteRows",l,{label:"Delete Rows",scopedLabels:{deleteCells:"Rows"},description:"Delete the rows at the current selection.",icon:"DeleteRows"},function(){return ce(this,d.IRange.Orientation.Row,!0)}),new r.SimpleCommand("deleteColumns",l,{label:"Delete Columns",scopedLabels:{deleteCells:"Columns"},description:"Delete the columns at the current selection.",icon:"DeleteColumns"},function(){return ce(this,d.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.",icon:"FillDown",shortcut:{key:"d",modifiers:[r.KeyModifiers.Ctrl]}},function(){return Re(this,d.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.",icon:"FillRight",shortcut:[{key:"r",modifiers:[r.KeyModifiers.Ctrl]}]},function(){return Re(this,d.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.",icon:"FillUp"},function(){return Re(this,d.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.",icon:"FillLeft"},function(){return Re(this,d.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 F(this,{border:{left:{style:d.IBorder.StrokeStyle.Thin,color:null},top:{style:d.IBorder.StrokeStyle.Thin,color:null},right:{style:d.IBorder.StrokeStyle.Thin,color:null},bottom:{style:d.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 F(this,{border:null})}),new r.SimpleCommand("formatIndentDecrease",l,{label:"Decrease Indent",description:"Move your content closer to the border.",icon:"FormatIndentDecrease"},function(){return F(this,g=>{const C=g.getAlignment().getIndent()-1;return{alignment:{indent:C>0?C:0}}})}),new r.SimpleCommand("formatIndentIncrease",l,{label:"Increase Indent",description:"Move your content further from the border.",icon:"FormatIndentIncrease"},function(){return F(this,g=>{const C={alignment:{indent:g.getAlignment().getIndent()+1}};return g.getAlignment().getHorizontal()===d.ITextFrame.HorizontalAlignment.General&&(C.alignment.horizontal=d.ITextFrame.HorizontalAlignment.Left),C})}),new r.Command("mergeToggle",l,{label:"Merge",description:"Combine and center the contents into a single cell.",icon:"MergeAll",shortcut:{key:"m",modifiers:[r.KeyModifiers.Ctrl]}}),new r.SimpleCommand("mergeHorizontal",l,{label:"Merge Horizontally",description:"Combine the contents into horizontal rows.",icon:"MergeHorizontal"}),new r.SimpleCommand("mergeVertical",l,{label:"Merge Vertically",description:"Combine the contents into vertical columns.",icon:"MergeVertical"}),new r.SimpleCommand("unmerge",l,{label:"Unmerge",description:"Split merged cells into multiple cells.",icon:"MergeUnMerge"}),new r.SimpleCommand("clearContents",l,{label:"Clear Contents",scopedLabels:{clear:"Contents"},icon:"ClearContents",description:`Clear only the contents in the cells.
15
+ The values and the formatting are preserved.`,icon:"InsertTable"},function(g){de(this,g,!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 g=this.context().table();g&&g.setShowTotals(!g.getShowTotals())}),new r.Command("tableHeaderRowToggle",l,{label:"Toggle Table Header Row",description:"Toggle Header Row on/off.",scopedLabels:{table:"Header Row"}},function(){const g=this.context().table();g&&g.setShowHeaders(!g.getShowHeaders())}),new r.Command("autoFilterToggle",l,{label:"Toggle Filter",scopedLabels:{filter:"Filter",sortFilter:"Filter"},description:"Toggle Auto Filter on/off.",icon:"FilterToggle",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){const g=this.context().table();g&&g.setShowFilterButton(!g.getShowFilterButton())}),new r.Command("autoFilterReapply",l,{label:"Reapply Filter",scopedLabels:{filter:"Reapply",sortFilter:"Reapply"},description:"Reapply the filter and sort with the latest changes.",icon:"FilterReapply",shortcut:{key:"L",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}}),new r.Command("autoFilterClear",l,{label:"Clear Filter",scopedLabels:{filter:"Clear",sortFilter:"Clear"},description:"Clear the filters criteria from the current filter..",icon:"FilterClear"}),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]}]},ie),new r.Command("formatPainterToggle",l,{label:"Format Painter",description:"Apply style to another part of your workbook.",icon:"FormatPaint.yellow"}),new r.SimpleCommand("insertCells",l,{label:"Insert Cells",scopedLabels:{insertCells:"At Selection"},description:"Inserts cells at the current selection.",icon:"InsertCells",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){oe(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.",icon:"InsertCellsRight"},function(){oe(this,d.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.",icon:"InsertCellsDown"},function(){return oe(this,d.IRange.Orientation.Row)}),new r.SimpleCommand("insertRows",l,{label:"Insert Row(s)",scopedLabels:{insertCells:"Row(s)"},description:"Insert a row above the current position.",icon:"InsertRow"},function(){return oe(this,d.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.",icon:"InsertColumn2"},function(){return oe(this,d.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 oe(this,d.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 oe(this,d.IRange.Orientation.Column,!0,!0)}),new r.SimpleCommand("deleteCells",l,{label:"Delete Cells",scopedLabels:{deleteCells:"At Selection"},description:"Delete the cells.",icon:"DeleteCells",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.",icon:"DeleteCellsUp"},function(){return ce(this,d.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.",icon:"DeleteCellsLeft"},function(){return ce(this,d.IRange.Orientation.Column)}),new r.SimpleCommand("deleteRows",l,{label:"Delete Rows",scopedLabels:{deleteCells:"Rows"},description:"Delete the rows at the current selection.",icon:"DeleteRows"},function(){return ce(this,d.IRange.Orientation.Row,!0)}),new r.SimpleCommand("deleteColumns",l,{label:"Delete Columns",scopedLabels:{deleteCells:"Columns"},description:"Delete the columns at the current selection.",icon:"DeleteColumns"},function(){return ce(this,d.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.",icon:"FillDown",shortcut:{key:"d",modifiers:[r.KeyModifiers.Ctrl]}},function(){return Re(this,d.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.",icon:"FillRight",shortcut:[{key:"r",modifiers:[r.KeyModifiers.Ctrl]}]},function(){return Re(this,d.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.",icon:"FillUp"},function(){return Re(this,d.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.",icon:"FillLeft"},function(){return Re(this,d.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 F(this,{border:{left:{style:d.IBorder.StrokeStyle.Thin,color:null},top:{style:d.IBorder.StrokeStyle.Thin,color:null},right:{style:d.IBorder.StrokeStyle.Thin,color:null},bottom:{style:d.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 F(this,{border:null})}),new r.SimpleCommand("formatIndentDecrease",l,{label:"Decrease Indent",description:"Move your content closer to the border.",icon:"FormatIndentDecrease"},function(){return F(this,g=>{const C=g.getAlignment().getIndent()-1;return{alignment:{indent:C>0?C:0}}})}),new r.SimpleCommand("formatIndentIncrease",l,{label:"Increase Indent",description:"Move your content further from the border.",icon:"FormatIndentIncrease"},function(){return F(this,g=>{const C={alignment:{indent:g.getAlignment().getIndent()+1}};return g.getAlignment().getHorizontal()===d.ITextFrame.HorizontalAlignment.General&&(C.alignment.horizontal=d.ITextFrame.HorizontalAlignment.Left),C})}),new r.Command("mergeToggle",l,{label:"Merge",description:"Combine and center the contents into a single cell.",icon:"MergeAll",shortcut:{key:"m",modifiers:[r.KeyModifiers.Ctrl]}}),new r.SimpleCommand("mergeHorizontal",l,{label:"Merge Horizontally",description:"Combine the contents into horizontal rows.",icon:"MergeHorizontal"}),new r.SimpleCommand("mergeVertical",l,{label:"Merge Vertically",description:"Combine the contents into vertical columns.",icon:"MergeVertical"}),new r.SimpleCommand("unmerge",l,{label:"Unmerge",description:"Split merged cells into multiple cells.",icon:"MergeUnMerge"}),new r.SimpleCommand("clearContents",l,{label:"Clear Contents",scopedLabels:{clear:"Contents"},icon:"ClearContents",description:`Clear only the contents in the cells.
16
16
 
17
17
  The formatting is not cleared.`,shortcut:{key:"Delete"}},function(){Q(this,d.ICell.Content.Values)}),new r.SimpleCommand("clearFormats",l,{label:"Clear Formats",scopedLabels:{clear:"Formats"},icon:"ClearFormats",description:"Clear only the formatting that is applied to the cells."},function(){Q(this,d.ICell.Content.Formats)}),new r.SimpleCommand("clearHyperlinks",l,{label:"Clear Hyperlinks",scopedLabels:{clear:"Hyperlinks"},description:"Clear only the hyperlinks in the cells."},function(){Q(this,d.ICell.Content.Hyperlinks)}),new r.SimpleCommand("clearComments",l,{label:"Clear Comments",scopedLabels:{clear:"Comments"},description:"Clear the comments from the cells."},function(){Q(this,d.ICell.Content.Comments)}),new r.SimpleCommand("clearAll",l,{label:"Clear All",scopedLabels:{clear:"All"},icon:"ClearAll",description:`Clears everything from the cells.
18
18
 
@@ -20,14 +20,14 @@ All contents and formatting are removed.`,shortcut:{key:"Delete",modifiers:[r.Ke
20
20
 
21
21
  The formatting is not applied.`,icon:"PasteValues",shortcut:{key:"V",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("pasteFormats",v,{label:"Paste Formatting",scopedLabels:{paste:"Formatting"},description:`Paste only the formats of the selected cells.
22
22
 
23
- The content is not applied.`,icon:"PasteFormats"}),new r.Command("pasteFormulas",v,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied.",icon:"PasteFormulas"}),new r.Command("pasteTranspose",v,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped.",icon:"PasteTranspose"}),new r.Command("pasteLinks",v,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells.",icon:"PasteLinks"})];i.addCommands(A,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const v={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(A=>S.paste({...Pl,...A})).update(v),i.getCommand("pasteFormats").updateCallback((A,q)=>S.paste({...jl,description:q.label(),...A})).update(v),i.getCommand("pasteFormulas").updateCallback((A,q)=>S.paste({...Ol,description:q.label(),...A})).update(v),i.getCommand("pasteTranspose").updateCallback((A,q)=>S.paste({...Bl,description:q.label(),...A})).update(v),i.getCommand("pasteLinks").updateCallback((A,q)=>S.paste({...Hl,description:q.label(),...A})).update(v),i.getCommand("cut").update(v),i.getCommand("paste").update(v)},[t,i]);const j=o.useMemo(()=>{if(!N||!M.current)return;const v=N.key;if(v!=="copy"&&v!=="cut"&&v!=="formatPainter")return;const A=M.current.getItem();if(A.getSource()!==t)return;const q=M.current.isCut?.(),K=q?b:y,D=q?s:h,O=A.getCoords(),W=O?[O]:null;return W&&W.length!==0?ge=>{const _=[];for(let U=0;U<W.length;U++){const z=W[U],F=ge.toClipBounds(ge.getRangeCoordsBounds(z,{top:0,left:0,right:1,bottom:1}),ht.SELECTION_CLIP_INSETS);F&&(_.push(m({range:z,key:`copy-selection-background-${U}`,x:F.x,y:F.y,width:Math.max(F.width,0),height:Math.max(F.height,0),stroke:K,strokeWidth:2})),_.push(m({range:z,key:`copy-selection-foreground-${U}`,x:F.x+(F.width<=2?-1:0),y:F.y,width:Math.max(F.width,3),height:Math.max(F.height,3),stroke:D,strokeWidth:2,isAnimatedStroke:!0})))}return _}:null},[N,t,n,h,y,s,b]);return{...S,clipboard:V,overlays:j}},Vl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:f}=e,h=l.body??{},s=a.getView(),{overlays:y}=xr({element:i,sheet:a,sheetView:s,commands:f,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:h.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:h.fill});return et(a?.getSelection(),{onChange(b){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),y&&n?y(n):null})),Ul="_sheet-selection_12wyx_5",Kl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Wl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},$l={key:"dragCopy",description:"Drag selection to copy cell contents."},Gl={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Bo=(e,t)=>t.ctrlKey&&t.shiftKey?Gl:t.ctrlKey?$l:t.shiftKey?Wl:Kl,_l={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},Zl=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,onShowTooltip:f,onCloseTooltip:h,sheet:s,gridRef:y,gridStyle:b,isActive:w,editingCoords:m,...M}=e,T=n?.getBounds(),N=r.useCallbackRef(f,[f]),P=r.useCallbackRef(h,[h]),[$,V]=o.useState(()=>s?.getSelection().getCoords()),S=r.useCallbackRef(H=>{he.CoordUtils.isEqualSelectionCoords(H,$)||s&&s.getSelection().updateCoords(H)},[s,$]),j=r.useEditMode(),v=o.useRef(null),[A,q]=o.useState(s?.getProtection().isLocked()),[K,D]=o.useState(s?.getView().getMovableSelection().length>0),O=r.ReactUtils.detectIt().primaryInput==="touch",W=!O&&w,ge=m??j.getMode()?.args?.stateAndCoords?.coords??null,_=ge!==null||K,U=r.useCallbackRef(H=>{const ee=he.CoordUtils.cellToRange(H);if(s.isClosed())return ee;const ce=s.getRange(ee,{ignoreHidden:!0}).getMerges();return ce.length===0?ee:ce[0]},[s]),z=r.useCallbackRef((H,ee,ce,le,Re,ie)=>{const ve=s.getSelectedRange().getExtended(le,H).getCoords();switch(le){case d.IRange.Direction.Up:return ve.rowStart;case d.IRange.Direction.Down:return ve.rowEnd;case d.IRange.Direction.Left:return ve.colStart;case d.IRange.Direction.Right:return ve.colEnd}},[s]),F=r.useCallbackRef(()=>{const H=s.getUsedRange()?.getCoords(),ee=s.getRowHeaders().getUsedRange()?.getCoords(),ce=s.getColumnHeaders().getUsedRange()?.getCoords();return{...H,colEnd:Math.max(H?.colEnd??0,ce?.max??0),rowEnd:Math.max(H?.rowEnd??0,ee?.max??0)}},[s]),k=r.useCallbackRef((H,ee)=>s.getRowHeaders().hiddenHeadersAt(H,ee),[s]),B=r.useCallbackRef((H,ee)=>s.getColumnHeaders().hiddenHeadersAt(H,ee),[s]),Q=r.useCallbackRef(H=>s.getRange(H,{ignoreHidden:!0}).getMerges(),[s]),oe=r.useCallbackRef(H=>{s?.getSelection().setAdjusting(H)},[s]),be=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),j.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),j.setMode(null))},[j,$,s,i]),me=o.useMemo(()=>{const H=j.getMode();return H?.key==="cut"||H?.key==="copy"},[j]);et(s?.getView(),{onMovableSelectionChange:()=>{D(s.getView().getMovableSelection().length>0)}}),et(s?.getSelection(),{onChange(H){const ee=s.getSelection().getCoords();V(ee)}}),et(s,{onProtectionChange:()=>{q(s.getProtection().isLocked())}});const{body:ze={}}=b||{},je=r.useNotifier(),De=n.getLayout(),fe=!(W&&$.ranges.length<=1&&ge===null&&!A&&(!j.getMode()||me)),{cursor:Ve,overlay:Y,onPointerDown:Z}=ht.useSelection({gridRef:y,commands:i,layout:De,getCellCoordsAsRangeCoords:U,selection:$,fillHandleBorderColor:ze.fill,selectionBackgroundColor:w?b.selection.fill:b.selectionInactive.fill,selectionBorderColor:w?b.selection.strokeFill:b.selectionInactive.strokeFill,selectionRemoveBackgroundColor:w?b.selectionRemove.fill:b.selectionInactive.fill,selectionRemoveBorderColor:w?b.selectionRemove.strokeFill:b.selectionInactive.strokeFill,disableFillDrag:fe,disableMoveDrag:O||!(w&&$.ranges.length<=1&&ge===null&&!A),disableTouchSelection:_,onSelectionChange:S,onSelectionDragStart:oe,onSelectionDragEnd:be,onMoveDragStart:(H,ee,ce)=>{j.setMode(Bo(0,ce))},onMoveDragUpdate:(H,ee,ce)=>{j.setMode(Bo(0,ce))},onMoveDragEnd:(H,ee)=>{j.setMode(null)},onMoveDragDone:async(H,ee,ce)=>{if(he.CoordUtils.isEqualRanges(H,ee))return;const le=s.getRange(ee);if(je?.showOptions){const xe=le.getDifferences(H);let Oe=!1;const Be=xe.getCount();for(let p=0;!Oe&&p<Be;p++)Oe=xe.at(p).isContentful();if(Oe&&await je?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const Re=!ce.ctrlKey,ie=ce.shiftKey,ve=ie?Re?"Insert Moved Cells":"Insert Copied Cells":Re?"Move Cells":"Copy Cells",Ae=await je?.showBusy?.(ve);try{const xe=s.getRange(H);await le.doBatch(async()=>{ie?await le.insertFrom(H,{isCut:Re,undoRange:xe}):await le.copyFrom(H,{isCut:Re,undoRange:xe}),xe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),le.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:ve,autoSelect:!0})}catch(xe){je?.showError?.(xe)}finally{Ae?.()}},contentfulCellFinder:z,hiddenRowsAt:k,hiddenColumnsAt:B,mergedRanges:Q,getDataCoords:F,canSelectionSpanMergedCells:H=>{const ee=s.getRange(H);return ee.isEntireColumns()||ee.isEntireRows()},onFill:async(H,ee)=>{const ce="Auto Fill",le=await je?.showBusy?.(ce);try{await s.doBatch(()=>{s.getRange(H).autoFill(ee),s.getRange(ee).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:ce,autoSelect:!0})}catch(Re){je?.showError?.(Re)}finally{v.current=null,le?.()}},onFillPreview:(H,ee,ce)=>{if(y.current&&N){j.setMode(_l);try{v.current?.direction!==ce&&(v.current=null,s.getRange(H).autoFill(ee,{previewOnly:Be=>{v.current={callback:Be,direction:ce}}}));const le=v.current?.callback?.(ee);if(!le||le.isEmpty())return;const Re=le.toText();if(!Re)return;const ie=he.CoordUtils.cellToRange(le.getCoords()),ve=n.getRelativePointFromClient(0,0);let Ae=0,xe=0,Oe=r.ToolTipPlacement.Bottom;if(ce===d.IRange.Direction.Down){Ae=De.getColOffset(ie.colEnd+1)-ve.x;const Be=De.getRowOffset(ie.rowEnd),p=De.getRowOffset(ie.rowEnd+1);xe=p-(p-Be)/2-ve.y,Oe=r.ToolTipPlacement.Right}else if(ce===d.IRange.Direction.Right){xe=De.getRowOffset(ie.rowEnd+1)-ve.y;const Be=De.getColOffset(ie.colEnd),p=De.getColOffset(ie.colEnd+1);Ae=p-(p-Be)/2-ve.x,Oe=r.ToolTipPlacement.Bottom}else if(ce===d.IRange.Direction.Up){Ae=De.getColOffset(ie.colEnd+1)-ve.x;const Be=De.getRowOffset(ie.rowStart),p=De.getRowOffset(ie.rowStart+1);xe=p-(p-Be)/2-ve.y,Oe=r.ToolTipPlacement.Right}else if(ce===d.IRange.Direction.Left){xe=De.getRowOffset(ie.rowEnd+1)-ve.y;const Be=De.getColOffset(ie.colStart),p=De.getColOffset(ie.colStart+1);Ae=p-(p-Be)/2-ve.x,Oe=r.ToolTipPlacement.Bottom}N({anchor:{x:Ae,y:xe},display:Re,placement:Oe})}catch(le){je?.showError?.(le)}}},onFillDone:()=>{v.current=null,j.setMode(null),P?.()}}),de=r.useCallbackRef(H=>{Z(r.ReactUtils.createSyntheticEvent(H))},[Z,ge]);o.useEffect(()=>{const H=n?.getStage();if(H)return H.addEventListener("pointerdown",de),()=>{H.removeEventListener("pointerdown",de)}},[n?.getStage()]);const ke=r.useImperativeElement(t,()=>({}),[]),Ce=o.useRef(null);return c.jsx("div",{className:dt(a,"sheet-selection",Ul),style:{position:"absolute",width:T?.width,height:T?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Ut([ke,Ce]),...M,children:Y(n)})})),Mn=Object.freeze({x:0,y:0,width:0,height:0}),Xl={fireOnModelChange:!1},Yl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:f,onHide:h,onShow:s,onUnFocus:y,isDragging:b,updateFrameBounds:w,dragStart:m,style:M,disabled:T,renderMovable:N,...P}=e,[$,V]=o.useState(Mn),[S,j]=o.useState(null),[v,A]=o.useState(!1),q=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const D=a.getBounds();if(!D)return;const O=i.toViewBounds(D);V(O??Mn),w(O??Mn)},[i?.getBounds()]),et(a,{onBoundsChange:D=>{const O=D.getBounds();if(!O)return;const W=i.toViewBounds(O);V(W??Mn),w(W)},onSelectionChange:()=>{const D=he.CommonUtils.hasFocus(q.current,!0);!v&&!D||a.isSelected()||y()}}),et(a,{onRequestFocus:()=>he.CommonUtils.whenFocus(q.current,!0)},Xl),o.useEffect(()=>{const D=q.current;return l(D),()=>{f(D)}},[]);const K=o.useMemo(()=>{if(!$)return null;let{width:D,height:O}=$;return N({view:i,movable:a,disabled:T,isDragging:b,style:{position:"relative",left:0,top:0,width:D,height:O},onHide:h,onShow:s})},[i,a,$.width,$.height,T,b]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Ut([q,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:$.x,top:$.y,width:$.width,height:$.height,...M},onMouseDown:async D=>{const O=D.shiftKey||D.ctrlKey,W=a.isSelected(),ge=D.currentTarget;O&&W?a.unselect():(W&&!O||await a.select({addToSelection:O}),m(D.nativeEvent,ge),ge.focus())},onFocus:D=>{D.relatedTarget&&!S&&j(D.relatedTarget),A(!0)},onBlur:D=>{S&&!q?.current?.contains(D.relatedTarget)&&j(null),D.relatedTarget&&A(!1)},...P,children:K})})),Jl="_movable-area_314c6_5",qr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:f,onUnFocus:h,onFocus:s,disabled:y=!1,disableDrag:b=!1,disableResize:w=!1,className:m,style:M,renderDirections:T=["nw","n","ne","w","e","sw","s","se"],onFirstRender:N,...P}=e,$=n.getBounds(),V=r.useCallbackRef(N,[N]),S=r.useCallbackRef(h,[h]),j=r.useCallbackRef(s,[s]),[v,A]=o.useState([]),[q,K]=o.useState(!1),[D,O]=o.useState(!1),W=o.useRef(!0),ge=o.useRef(new Map),_=o.useRef(new Map),U=o.useRef(new Map),z=o.useRef(new Map),F=o.useRef(new Map),k=o.useRef({onRequestFocus:te=>(ee(te),null)}),B=o.useRef(null),Q=o.useRef(null),oe=o.useRef(null),[be,me]=o.useReducer(te=>te+1,0);o.useLayoutEffect(()=>{me()},[n,i]),et(i,{onCollectionChange:()=>{const te=i.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0}),Me=F.current;Me.forEach(Fe=>{Fe()}),Me.clear();const Ne=k.current;for(let Fe=0;Fe<te.length;Fe++){const Ee=te[Fe];if(Ee.isClosed())continue;const I=Ee.addListeners(Ne);Me.set(Ee,I)}me()},onInvalidated:()=>{me()}}),et(a,{onMovableSelectionChange(te){je(),me()}});const ze=o.useCallback((te,Me)=>{const Ne=U.current.get(te);oe.current&&(oe.current.getTargets().forEach(Fe=>{if(Fe===Ne)return Fe.style.left=Me.x+"px",Fe.style.top=Me.y+"px",Fe.style.width=Me.width+"px",void(Fe.style.height=Me.height+"px")}),oe.current.updateRect())},[]),je=()=>{const te=[],Me=a.getMovableSelection();Me.forEach(Ne=>{const Fe=U.current.get(Ne);Fe&&Me.indexOf(Ne)!==-1&&te.push(Fe)}),A(Ne=>he.CommonUtils.isEqualArrays(Ne,te)?Ne:te)},De=o.useRef(null),fe=o.useRef(null),Ve=o.useMemo(()=>(fe.current||(fe.current=new Promise(te=>{De.current=te})),fe.current),[]),Y=o.useRef(null),Z=r.useCallbackRef(async(te,Me)=>{Y.current=Me,await(async()=>!(!await Ve.then()||!oe.current))()&&Y.current===Me&&oe.current.dragStart(te,Me)},[v]),[de,ke]=o.useState(!1),Ce=o.useRef(null),H=o.useRef(null),ee=r.useCallbackRef(async(te=null)=>{if(te||(te=a.getMovableSelection()[0]),!te)return S?.(),!1;const Me=U.current.get(te);Me?(await he.CommonUtils.whenFocus(Me),Me.focus(),H.current=Me,Ce.current=null):Ce.current=te},[a]);o.useEffect(()=>{de&&v.length>0&&H.current!==v[0]&&ee(),W.current&&(V?.(),W.current=!1)},[v]);const ce=o.useMemo(()=>{const te=i.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0});if(te.length===0&&ge.current.size===0)return null;const Me=(J,L,G,qe=!0)=>{const ye=J.isSelected(),g={tabIndex:G,view:n,movable:J,onRefLoad:C=>{Ce.current===J&&(C.focus(),H.current=C,Ce.current=null),U.current.set(J,C),_.current.set(C,J),L.rendered=!0,je()},onRefUnload:C=>{U.current.delete(J),_.current.delete(C),L.rendered=!1,je()},onUnFocus:S,onHide:C=>{L.onHide=C},onShow:C=>{L.onShow=C},isDragging:ye&&(D||q),disabled:y,renderMovable:l,updateFrameBounds:C=>{ze(J,C)},dragStart:Z,onMouseUp:()=>{if(Y.current=null,Q.current){K(!1),O(!1);let C=!1;z.current?.forEach(R=>{he.CommonUtils.isEqualBounds(R.movable.getBounds(),R.startBounds)||(C=!0)}),C?Re():ie()}},style:{opacity:qe?q&&ye?.7:void 0:0,zIndex:q&&ye?J.getZIndex()+te.length:void 0,pointerEvents:qe?void 0:"none",cursor:D&&ye?"grabbing":y||b?"initial":"move",boxShadow:!ye||D&&!q?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Yl,{...g},`movable-${J.getUUID()}`)},Ne=ge.current,Fe=new Map,Ee=[];for(let J=0;J<te.length;J++){const L=te[J];if(L.isClosed())continue;let G=Ne.get(L);G||(G={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(qe,ye)=>{if(!ye||ye.shown===!0)return;ye.shown=!0;const g=++ye.visibilityRequestId;requestAnimationFrame(()=>{const C=ge.current.get(qe);C&&g===ye.visibilityRequestId&&(ye.onShow?.(qe),C.shown=!0)})},doHide:async(qe,ye)=>{if(!ye||ye?.shown===!1)return;ye.shown=!1;const g=++ye.visibilityRequestId,C=await Promise.resolve(ye.onHide?.(qe));g===ye.visibilityRequestId&&C!==!1&&(ye.shown=!1,ge.current.delete(qe),me())},visibilityRequestId:0}),G.frame=Me(L,G,J,!0),Ee.push(G.frame),G.doShow(L,G),Ne.delete(L),Fe.set(L,G)}const I=[];return a.getMovableSelection().forEach(J=>{const L=Ne.get(J);L&&(L.frame=Me(J,L,-1,!1),I.push(L.frame),Ne.delete(J),Fe.set(J,L))}),Ne.forEach((J,L)=>{J.frame=Me(L,J,-1,!1),I.push(J.frame),J.doHide(L,J),Ne.delete(L),Fe.set(L,J)}),ge.current=Fe,je(),[...I,...Ee]},[be,n,l,y,b,w,q,D]),le=r.useCallbackRef((te,Me)=>{const Ne=`${Me} ${v.length===1?d.TextUtils.capitalize(_.current?.get(v[0]).getContent().getType()):"Drawings"}`;Q.current&&(console.warn(`Transaction ${Q.current.getDescription()} is being replaced by ${Ne}`),Q.current.rollback(),Q.current=null),Q.current=f.beginCommit({description:Ne}),z.current.clear();for(let Fe=0;Fe<v.length;Fe++){const Ee=v[Fe],I=_.current?.get(Ee);I?z.current.set(Ee,{movable:I,startBounds:n.toViewBounds(I.getBounds())}):console.warn("invalid element",I)}},[f,n,v]),Re=o.useCallback(()=>{if(!Q.current)return;const te=[];z.current?.forEach(Me=>{te.push(Me.movable)}),Q.current.commit({viewAfter:{view:a,movableSelection:te}}),z.current.clear(),Q.current=null},[]),ie=o.useCallback(()=>{Q.current&&(Q.current.rollback(),Q.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=te=>{te.preventDefault(),te.srcElement.scrollTop=0,te.srcElement.scrollLeft=0})},[ve.current]);const Ae=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ee,focus:()=>{ee()}}),[a]),[xe,Oe]=o.useState(null),Be=o.useRef(!1),p=o.useRef(!1),Pe=o.useRef(!1);o.useEffect(()=>{if(y||v.length===0||Pe.current||Be.current)return;if(p.current)return void requestAnimationFrame(()=>{oe.current&&B.current&&oe.current.refTargets.length>0&&(Pe.current=!0,De.current?.(!0)),A([...v])});Be.current=!0;const te=o.lazy(async()=>{try{const Me=await Promise.resolve().then(()=>require("./CDiwsajHd681HUPv.cjs"));return Be.current=!1,p.current=!0,A([...v]),Me}catch(Me){return console.warn(Me),De.current?.(!1),null}});Oe(te)},[v,y,b,w]);const tt=o.useMemo(()=>!xe||y?null:c.jsx(o.Suspense,{children:c.jsx(xe,{className:dt({dragging:q||D,resizing:q,moving:D}),container:null,ref:oe,target:oe.current?v:[],draggable:!y&&!b,resizable:!y&&!w,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:T,onResizeStart:te=>{le(te.target,"Resize")},onResize:te=>{if(!Q.current)return te.stopDrag(),void me();K(!0);const Me=te.direction[0]!==0&&te.direction[1]!==0;let Ne=0,Fe=0;for(let Ee=0;Ee<v.length;Ee++){const I=v[Ee],J=z.current.get(I),L=_.current.get(I);if(!J||!L){console.warn("invalid element");continue}let G=te.dist[0],qe=te.dist[1],ye=te.drag.dist[0],g=te.drag.dist[1],C=J.startBounds.width,R=J.startBounds.height;Ee===0?(Ne=C,Fe=R):(G*=C/Ne,ye*=C/Ne,qe*=R/Fe,g*=R/Fe);const u={...J.startBounds};if(u.width=Math.max(0,C+G),u.height=Math.max(0,R+qe),te.direction[0]===-1&&(u.width=Math.max(0,Math.min(J.startBounds.x+C,C-ye))),te.direction[1]===-1&&(u.height=Math.max(0,Math.min(J.startBounds.y+R,R-g))),Me&&(L.isLockAspectRatio()||te.inputEvent?.shiftKey)){const x=C/R,E=u.width/u.height;E>x?u.height=u.width/x:E<x&&(u.width=u.height*x)}te.direction[0]===-1&&(u.x=Math.max(0,Math.min(J.startBounds.x+C,J.startBounds.x+C-u.width))),te.direction[1]===-1&&(u.y=Math.min(J.startBounds.y+R,J.startBounds.y+R-u.height)),J.movable.setBounds(n.toAbsoluteBounds(u))}},onResizeEnd:te=>{K(!1),Re()},onDragStart:te=>{le(te.target,"Move")},onDrag:te=>{if(!Q.current)return te.stopDrag(),void me();O(!0);for(let Me=0;Me<v.length;Me++){const Ne=v[Me],Fe=z.current.get(Ne);Fe?Fe.movable.setBounds(n.toAbsoluteBounds({...Fe.startBounds,x:Fe.startBounds.x+te.translate[0],y:Fe.startBounds.y+te.translate[1]})):console.warn("invalid element")}},onDragEnd:te=>{},onMouseUp:te=>{}})}),[be,xe,v,n,y,b,w,q,D]);return c.jsx("div",{className:dt(m,"movable-area",Jl),style:{width:$.width,height:$.height,...M,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Ut([Ae,ve]),...P,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:$.width,height:$.height},...P,children:c.jsxs("div",{ref:B,style:{position:"absolute",pointerEvents:"auto"},onFocus:te=>{j?.(),ke(!0)},onBlur:te=>{ke(!1)},onKeyDownCapture:te=>{if(te.isDefaultPrevented())return;const Me=te.nativeEvent.ctrlKey,Ne=te.nativeEvent.altKey,Fe=te.nativeEvent.shiftKey;if(te.which===r.KeyCodes.Escape){const G=a.getMovableSelection();let qe=[...G];return v.forEach(ye=>{if(qe.length===0)return;const g=_.current.get(ye);let C=qe.indexOf(g);qe.splice(C,1)}),qe.length!==G.length&&a.selectMovables(qe),qe.length===0&&S?.(),void te.preventDefault()}const Ee=.1,I=G=>{i.updateSelected(qe=>{qe.setRotation(qe.getRotation()+G)},"Rotate")},J=(G,qe=!0)=>{i.updateSelected(ye=>{const g=ye.getBounds();let C=1+G;qe||(C=1/C);const R=Math.sqrt(Math.pow(g.width,2)+Math.pow(g.height,2)),u=Math.atan2(g.height,g.width),x=C*R;if(x<10)return;const E=x*Math.cos(u),re=x*Math.sin(u),pe={x:g.x+(g.width-E)/2,y:g.y+(g.height-re)/2,width:E,height:re};ye.setBounds(pe)},"Resize")},L=G=>{i.updateSelected(qe=>{const ye=qe.getBounds(),g={x:ye.x+(G.x??0),y:ye.y+(G.y??0),width:ye.width+(G.width??0),height:ye.height+(G.height??0)};qe.setBounds(g)},"Nudge")};if(te.which===r.KeyCodes.Delete)i.updateSelected(G=>{G.delete()},"Delete"),te.preventDefault();else if(te.key==="a"&&Me){const G=a.getMovableSelection();a.selectMovables(i.getItems(),!0),a.selectMovables(G,!0),te.preventDefault()}else te.key==="ArrowLeft"?(Fe?J(Ee,!1):Ne?I(-10):L({x:Me?-10:-1}),te.preventDefault()):te.key==="ArrowRight"?(Fe?J(Ee,!0):Ne?I(10):L({x:Me?10:1}),te.preventDefault()):te.key==="ArrowUp"?(Fe?J(Ee,!0):L({y:Me?-10:-1}),te.preventDefault()):te.key==="ArrowDown"&&(Fe?J(Ee,!1):L({y:Me?10:1}),te.preventDefault())},children:[ce,tt]})})})})),_t=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 f=e[l].getBounds();t=Math.min(f.x,t),n=Math.min(f.y,n),i=Math.max(f.x+f.width,i),a=Math.max(f.y+f.height,a)}return{x:t,y:n,width:i-t,height:a-n}},Ho=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let f=0,h=Number.MAX_SAFE_INTEGER,s=0;for(let w=0;w<e.length;w++){const m=e[w],M=m.getBounds();f+=M[l],h=Math.min(M[i],h),s=Math.max(M[i]+M[l],s),n.push({bounds:M,movable:m})}const y=(s-h-f)/(e.length-1);n.sort((w,m)=>{const M=w.bounds[i],T=m.bounds[i];return M!==T?M-T:w.bounds[a]-m.bounds[a]});const b=new Map;b.set(n[0].movable,n[0].bounds);for(let w=1;w<n.length-1;w++){const m=n[w-1].bounds,M={...n[w].bounds};M[i]=m[i]+m[l]+y,n[w].bounds=M,b.set(n[w].movable,M)}return b.set(n[n.length-1].movable,n[n.length-1].bounds),b},Sr=e=>{const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:f}=e,h=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const y=r.useCallbackRef(async(S,j,v=null,A=!0)=>{const q=async()=>{const K=await Promise.resolve(h?.showBusy?.(S.label()));try{await j();const D=v??S?.label?.();if(f){let O=null;S&&D!==!1&&(O=new r.SimpleCommand(S.key(),l,{label:D,description:D},q)),f(O)}K?.(),A&&s.setMode(null)}catch(D){K?.(),h?.showError?.(D)}};await q()},[f,h]),[b,w]=o.useReducer(S=>S+1,0),m=r.useCallbackRef((S,j,v)=>{if(!n)return;const A=n.getMovableSelection();if(A.length===0)return;let q="Drawings";if(A.length===1){const D=A[0];q=d.TextUtils.capitalize(D.getContent().getType())??"Drawing"}const K=`${S.label()} ${q}`;y(S,()=>{let D=null;i&&(D=i.beginCommit(K));const O=n.getMovableSelection();if(O.length===0)return;const W=v?.(O);for(let ge=0;ge<O.length;ge++){const _=O[ge];j(_,W)}D?.commit()})},[n,i]),[M,T]=o.useState(n.getMovableSelection()[0]??null),[N,P]=o.useState(!M||M?.isProtected()),$=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",icon:"DrawToFront",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){m(this,S=>{S.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",icon:"DrawMoveForward",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){m(this,S=>{S.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",icon:"DrawToBack",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){m(this,S=>{S.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",icon:"DrawMoveBackward",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){m(this,S=>{S.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners.",icon:"DrawAspect"},function(){m(this,S=>{S.setLockAspectRatio(!S.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes.",icon:"DrawResize"},function(){m(this,S=>{S.setAnchorType(d.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.",icon:"DrawResize"},function(){m(this,S=>{S.setAnchorType(d.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.",icon:"DrawResize"},function(){m(this,S=>{S.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left.",icon:"DrawAlignLeft"},function(){m(this,(S,j)=>{S.setBounds({x:j.x})},_t)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other.",icon:"DrawAlignCenter"},function(){m(this,(S,j)=>{S.setBounds({x:(j.width-S.getBounds().width)/2+j.x})},_t)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right.",icon:"DrawAlignRight"},function(){m(this,(S,j)=>{S.setBounds({x:j.width-S.getBounds().width+j.x})},_t)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top.",icon:"DrawAlignTop"},function(){m(this,(S,j)=>{S.setBounds({y:j.y})},_t)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other.",icon:"DrawAlignMiddle"},function(){m(this,(S,j)=>{S.setBounds({y:(j.height-S.getBounds().height)/2+j.y})},_t)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom.",icon:"DrawAlignBottom"},function(){m(this,(S,j)=>{S.setBounds({y:j.height-S.getBounds().height+j.y})},_t)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each.",icon:"DrawDistributeHorz"},function(){m(this,(S,j)=>{S.setBounds(j.get(S))},S=>Ho(S))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each.",icon:"DrawDistributeVert"},function(){m(this,(S,j)=>{S.setBounds(j.get(S))},S=>Ho(S,!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.",icon:"DrawGroup"}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings.",icon:"DrawUngroup"}),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,M]);o.useEffect(()=>{},[s]);const V=o.useMemo(()=>{let S=null;return S=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),S.addCommands($,!0),S},[a,$]);return et(M,{onAnyChange:()=>{V.getCommand("formatAnchorTypeTwoCell").update({state:M?.getAnchorType()===d.IAnchored.Type.TwoCell}),V.getCommand("formatAnchorTypeOneCell").update({state:M?.getAnchorType()===d.IAnchored.Type.OneCell}),V.getCommand("formatAnchorTypeAbsolute").update({state:M?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("formatAnchorTypeAbsolute").update({state:M?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("toggleLockAspectRatio").update({state:M?.isLockAspectRatio()})},onProtectedChange:S=>{P(S.isProtected())},onDelete:()=>{}}),et(n,{onMovableSelectionChange:()=>{const S=n.getMovableSelection()[0]??null;T(S),P(!S||S.isProtected()),w()}}),et(t,{onCollectionChange:()=>{w()}}),o.useEffect(()=>{const S={disabled:N};V.getCommand("formatAnchorTypeTwoCell").update(S),V.getCommand("formatAnchorTypeOneCell").update(S),V.getCommand("formatAnchorTypeAbsolute").update(S),V.getCommand("toggleLockAspectRatio").update(S);const j=t.getCount(),v=n.getMovableSelection(),A=N||j<=1||v.length===0;let q={disabled:A},K=q;if(!A&&v.length===1){const W=v[0];W.getZIndex()===0&&(q={disabled:!0}),W.getZIndex()===j-1&&(K={disabled:!0})}V.getCommand("moveToFront").update(K),V.getCommand("moveForward").update(K),V.getCommand("moveToBack").update(q),V.getCommand("moveBackward").update(q);const D={disabled:N||v.length<=1};V.getCommand("formatDrawAlignLeft").update(D),V.getCommand("formatDrawAlignCenter").update(D),V.getCommand("formatDrawAlignRight").update(D),V.getCommand("formatDrawAlignTop").update(D),V.getCommand("formatDrawAlignMiddle").update(D),V.getCommand("formatDrawAlignBottom").update(D),V.getCommand("formatDrawFlipHorz").update(D),V.getCommand("formatDrawFlipVert").update(D),V.getCommand("formatDrawGroup").update(D),V.getCommand("formatDrawUngroup").update(D),V.getCommand("formatDrawSwapShapes").update(D),V.getCommand("formatDrawSwapShapesHorz").update(D),V.getCommand("formatDrawSwapShapesVert").update(D);const O={disabled:N||v.length<=2};V.getCommand("formatDrawDistributeHorz").update(O),V.getCommand("formatDrawDistributeVert").update(O)},[b,N,b]),V},Ql=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:f,onHide:h,onShow:s,...y}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[w,{height:m,width:M}]=Xt();return c.jsx("div",{...y,ref:Ut([b,w]),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:f?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),ei=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:f,target:h,onRepeatCommandChange:s}=e,y=Sr({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:s,commands:f,target:h});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const b=o.useMemo(()=>c.jsx(qr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{y.activate(),a?.onFocus?.()}},"movable-area"),[i,a,f,y]);return b&&n?b:null})),ti=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:f,setEditingCoords:h,commands:s}=e,y=r.useEditMode(),[b,w]=o.useState(null),[m,M]=o.useState(null),[T,N]=o.useState(null),[P,$]=o.useState(null),[V,S]=o.useState(null);o.useLayoutEffect(()=>{if(T===null)return $(null),void S(null);const k=()=>{const B=i.getRange(T).getCell(),Q=B.getStyle();let oe,be=Q.getFill()?.toCSS(a.body.darkMode);be.background!=="none"&&be.background!=="transparent"||(be=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),be.background!=="none"&&be.background!=="transparent"||(be={background:a.body.fill}),$({style:be}),B&&!B.getFormula()&&(oe=B?.getRenderHorizontalAlignment()),S(oe??r.HorizontalAlignment.Left)};return k(),i.getRange(T).addListener(()=>{k()})},[i,T,a?.body]);const j=r.useCallbackRef(()=>{let k=m.editState.dirty??"";if(m.editState.dirty!==void 0){const B=d.TextUtils.clampString(k);try{const Q=m.sheet.getRange(m.coords),oe=`Typing '${B}' into ${Q.toString()}`;return Q.setValue(k,{description:oe,autoFit:!0}),N(null),M(null),y.setMode(null),h(null),!0}catch(Q){throw he.Notifier.error(new Error(`Unable to enter '${B}'.`,{cause:Q})),Q}}},[i,m]),v=r.useCallbackRef(k=>i.getRange(k).getCell().getExtrusions()??he.CoordUtils.cellToRange(k),[i]),A=r.useCallbackRef(k=>{let B=d.IRange.Orientation.Row,Q=!1;k!==d.IRange.Direction.Up&&k!==d.IRange.Direction.Down||(B=d.IRange.Orientation.Column),k!==d.IRange.Direction.Left&&k!==d.IRange.Direction.Up||(Q=!0),i.getSelection().traverse(B,Q)},[i]),q=o.useCallback((k,B)=>{if(l)return l(k,B);if(!i)return null;const{ref:Q,...oe}=k;return c.jsx(hr,{ref:Q,...oe,sheet:i,bodyStyle:a?.body,activeCoords:B,commands:s,onChangeEdit:be=>{const me={sheet:i,coords:B,editState:be};y.setMode(ze=>({...ze,description:me.editState.editMode?"Edit":"Enter",args:{...ze?.args,stateAndCoords:me}}))},editState:m.editState})},[i,P,l,m,T]),{overlay:K,startEdit:D,submitEdit:O,cancelEdit:W,onKeyboardEventNative:ge,onPointerEventNative:_}=ht.useKeyboardEditorOverlay({view:n,activeCoords:b,getCellEditor:q,canEdit:()=>{const k=i.getProtection();if(k.isReadOnly())return!1;const B=k.isLocked();return B&&f(),!B},onBeforeStartEdit:k=>{const B=mr(()=>i.getRange(k).getCell()),Q={sheet:i,coords:k,editState:Object.freeze(B)};y.setMode({key:"edit",args:{stateAndCoords:Q}}),M(Q)},onStartEdit:k=>{N(k),h(k)},onSubmitEdit:j,onCancelEdit:k=>{N(null),M(null),y.setMode(null),h(null)},onDoneEdit:k=>{y.setMode(null)},onNavigate:A,containerProps:P,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:V,getRangeCoords:v});et(i.getSelection(),{onChange(k){w(i.getSelection().getCoords().cell)}});const U=r.useCallbackRef(k=>{_(k),T&&O()},[_,W,T]),z=o.useCallback(k=>{_(k)},[_]),F=o.useCallback(k=>{ge(k)},[ge]);return o.useEffect(()=>{const k=n?.getStage();if(k)return k.addEventListener("pointerdown",U),k.addEventListener("dblclick",z),k.addEventListener("keydown",F),()=>{k.removeEventListener("pointerdown",U),k.removeEventListener("dblclick",z),k.removeEventListener("keydown",F)}},[n?.getStage()]),o.useEffect(()=>{const k=y.getMode(),B=k?.key;B==="edit"||B==="enter"?m?k.args?.cancel?W():k.args?.submit?O():M(k.args?.stateAndCoords):D(k.args?.start):T&&W()},[y]),K(n,t)})),Rr="white",kr="black",ni=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${kr}' fill='${Rr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,oi=`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='${kr}' fill='${Rr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ri=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[f,h]=o.useState(null),[s,y]=o.useState(null),[b,w]=o.useState(null),[m,M]=o.useState(null),T=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const v=i.getTables().getItems({address:n.getVisibleRangeCoords()});h(v.length>0?v:null)}else l(!1),h(null)},[i,n]),N=r.useCallbackRef(v=>{v.preventDefault(),v.stopPropagation();const A=n.getCellCoordsFromClient(v.clientX,v.clientY),q=i.getTables().getItems({address:A});q.length===1&&q[0].select()},[n,i]),P=r.useCallbackRef(v=>{v.preventDefault(),v.stopPropagation();const A=n.getCellCoordsFromClient(v.clientX,v.clientY),q=i.getTables().getItems({address:A});if(q.length===1){const K=q[0].getRange().getCoords(),D={colStart:K.colStart,rowStart:A.rowIndex,colEnd:K.colEnd,rowEnd:A.rowIndex};i.getRange(D).select()}},[n,i]),$=r.useCallbackRef(()=>{if(!a)return;const v=i.getTables().getItems({address:n.getVisibleRangeCoords()});h(v.length>0?v:null)},[i,a,n]);et(i?.getSelection(),{onChange(v){y(i.getSelection().getCoords().cell)}}),et(b,{onAnyChange(v){T(),$()}}),et(m,{onAnyChange(v){$()}}),et(i,{onTablesChange(v){T(),$()},onInvalidated(v){T(),$()}});const V=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle($,300),300),[]);o.useEffect(()=>{V()},[n]),o.useEffect(()=>{let v=null;if(f)for(let A=0;A<f.length&&!v;A++){const q=f[A],K=q.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,K)&&(v=q)}w(v)},[s,f]);const S=r.useCallbackRef(v=>{let A=null;if(f)for(let q=0;q<f.length;q++){const K=f[q],D=K.getRange().getCoords();let O=n.getRangeCoordsBounds(D);const W=n.getRelativePointFromClient(v.clientX,v.clientY),ge=W.x,_=W.y;if(ge>=O.x&&ge<=O.x+O.width&&_>=O.y&&_<=O.y+O.height){const U=n.getViewportSize();ge<=0||_<=0||ge>=U.width||_>=U.height||(A=K)}}M(A)},[n,f]);if(o.useEffect(()=>{const v=n?.getStage();if(v&&f)return v.addEventListener("mousemove",S),v.addEventListener("mouseleave",S),()=>{v.removeEventListener("mousemove",S),v.removeEventListener("mouseleave",S)}},[f,n?.getStage()]),!n||!f||f.length===0)return null;const j=[];for(let v=0;v<f.length;v++){const A=f[v];if(A.isClosed())continue;const q=A===m,K=A===b,D=A.getRange().getCoords(),O=n.getRangeCoordsBounds(D);let W;if(q||K){const ge=A.getStyle().getProperties(),_=ge.headerRow?.fill?.background??ge.wholeTable?.border?.top?.color?.toString();if(_&&i){const U=i.getStyles().parseColor(_);U&&(W=U.toCSS())}W||(W="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}j.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:O.height,pointerEvents:"all",cursor:ni},onMouseDown:P},`table-select-row-${A.getName()}`)),j.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:Math.min(16,O.height),pointerEvents:"all",cursor:oi},onMouseDown:N},`table-select-${A.getName()}`)),j.push(c.jsx(ht.Selection,{x:O.x,y:O.y,width:O.width,height:O.height,range:D,strokeWidth:K?.5:0,stroke:W??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:q?`${W} 0px 0px 1px 1px`:void 0}},`table-outline-${A.getName()}`))}return j})),li=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,f]=o.useState(null),[h,s]=o.useState(null),y=o.useRef(null),b=r.useCallbackRef(()=>{const P=i.getSelectedCell(),$=P.getSpill()?.getCoords()??null;he.CoordUtils.isEqualRanges($,l)||(s($?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds($),coords:$}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),f($))},[i,n,l]);o.useEffect(()=>(y.current&&(clearTimeout(y.current),y.current=null),h&&(y.current=setTimeout(()=>{s(null),y.current=null},a)),()=>{y.current&&(clearTimeout(y.current),y.current=null)}),[h,a]);const w=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle(b,80),80),[]);if(et(i?.getSelection(),{onChange(P){w()}}),et(i,{onSpillsChange(P){b()},onInvalidated(P){b()}}),!n||!l&&!h)return null;const m=i.getRange(l).getValue()instanceof d.FormulaError.Spill,M=[];let T=h?.bounds??n.getRangeCoordsBounds(l);if(h&&!he.CommonUtils.isEqualBounds(h.bounds,n.getRangeCoordsBounds(h.coords))&&s(null),T=n.toClipBounds(T,-10),!T)return;const N="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return M.push(c.jsx(ht.Selection,{x:T.x,y:T.y,width:T.width,height:T.height,range:l,strokeWidth:1,stroke:N,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:m?"6 3":void 0,opacity:h?.transition==="out"?0:1,transition:h?.transition?h.transition==="in"||h.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:`${N} 0px 0px 4px 0px`}},"spill-outline}")),M})),ii={position:"absolute",top:0,left:0,bottom:0,right:0},Vo=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},f=n.body=he.CommonUtils.mergeContentful(e.body,l);return n.body=he.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},f),n.buttonSurface=he.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=he.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=he.CommonUtils.mergeContentful(n.header,l),n.headerSelect=he.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=he.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelectAll,l),n},ai={fireOnModelChange:!1},Uo={},Mr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Uo,headersStyle:a=Uo,onSheetContextMenu:l,showColumnHeaders:f,columnHeaderProps:h,showRowHeaders:s,rowHeaderProps:y,showScrollbars:b=!0,scrollPaneProps:w,onViewportChange:m,commands:M,onRepeatCommandChange:T,onMoveCell:N,overlays:P,renderMovable:$,viewportComponent:V,onElementLoad:S,getCellEditor:j,onFocus:v,onBlur:A,style:q=r.ReactUtils.EmptyCssProperties,onShowTooltip:K,onShowColumnTooltip:D,onShowRowTooltip:O,onCloseTooltip:W,gridProps:ge,cellRenderProps:_,...U}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[z,F]=o.useReducer(X=>X+1,0),[k,{width:B,height:Q}]=Xt(),oe=r.useCallbackRef(K,[K]),be=r.useCallbackRef(D,[D]),me=r.useCallbackRef(O,[O]),ze=r.useCallbackRef(W,[W]),je=o.useRef(!1);o.useLayoutEffect(()=>{je.current=!0},[n]);const De=n?.getStyles(),fe=o.useMemo(()=>Vo(i,De),[i,De]),Ve=o.useMemo(()=>Vo(a,De),[a,De]),{body:Y={},buttonSurface:Z={}}=fe,{header:de={},headerSelect:ke={},headerSelectAll:Ce={}}=Ve,H=o.useRef(null),[ee,ce]=o.useState(()=>n?.getView()),le=(ee?.getZoomScale()??100)/100,Re=o.useMemo(()=>({vertical:ee.isShowColumnGridlines()&&le>=.4,horizontal:ee.isShowRowGridlines()&&le>=.4}),[ee?.isShowColumnGridlines(),ee?.isShowRowGridlines(),le]),ie=o.useMemo(()=>{if(ee?.getGridLineColor())return{strokeDasharray:"1,1"}},[ee?.getGridLineColor(),fe]),ve=f??ee?.isShowColumnHeaders(),Ae=s??ee?.isShowRowHeaders(),[xe,Oe]=o.useState({width:0,height:0}),Be=o.useMemo(()=>{let X=40,Se=20;const We=n?.getStyles().getNormal().getFont();if(xe.width>0&&xe.height>0){const Ue=We?.toCSS()?.fontFamily??fe.header.text.fontFamily,Ze=We?.getSize()??fe.header.text.fontSize,Ge=d.IFont.getSharedMeasurer()(""+xe.height,Math.ceil(Ze*d.IFont.getDeviceScale()),Ue);X=Ge.width,Se=Ge.lineHeight}return{width:Math.round(X+5),height:Math.round(Se+3)}},[xe,fe?.header.text,n]),p=Ae?le*Be.width:de.edgeStrokeWidth,Pe=ve?le*Be.height:de.edgeStrokeWidth,tt=Math.max(B,(n?.getColumnHeaders().getDefaultSize()??Be.width)+p+1),te=Math.max(Q,(n?.getRowHeaders().getDefaultSize()??Be.height)+Pe+1),Me=o.useRef(new Map),Ne=o.useRef(null),Fe=()=>({getColOffset:X=>n.getColumnHeaders().findOffset(X),getColIndex:X=>n.getColumnHeaders().findIndex(X),getRowOffset:X=>n.getRowHeaders().findOffset(X),getRowIndex:X=>n.getRowHeaders().findIndex(X)}),[Ee,I]=o.useState(()=>Fe()),[J,L]=o.useState(!1),[G,qe]=o.useState(null),ye=!0,g=fe.selection?.strokeFill,C=o.useCallback(()=>At.current,[]),[R,u]=o.useState(),x=r.useCallbackRef(X=>{u(X);const Se=n?n.getView():null;Se&&Se.setTopLeft(X?{left:X.left,top:X.top}:null),m?.(X)},[n,m]),E=o.useRef(null);o.useEffect(()=>{if(!R||!n)return;const X=n.getRangeAtBounds({x:R.left,y:R.top,width:R.width,height:R.height});E.current?.(),E.current=X.addListener(()=>{const Se=X.getCoords();H?.current?.invalidate(Se)})},[R,n]);const[re,pe]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(X=>{const Se=he.CoordUtils.cellToRange(X);if(n.isClosed())return Se;const We=n.getRange(Se,{ignoreHidden:!0}).getMerges();return We.length===0?Se:We[0]},[n]),ne=X=>{if(!X||X.coords.colIndex===0&&X.coords.rowIndex===0)return null;const Se={};return X.coords.colIndex>0&&(Se[he.AnchorLocation.Left]={index:X.coords.colIndex,scrollOffset:X.topLeft.left}),X.coords.rowIndex>0&&(Se[he.AnchorLocation.Top]={index:X.coords.rowIndex,scrollOffset:X.topLeft.top}),Se},[ae,ue]=o.useState(()=>ne(n.getView().getFreezePanes())),we=r.useEditMode(),He=o.useCallback(()=>H.current,[]),Te=r.useCallbackRef(X=>{we.setMode(Se=>Se?.key==="edit"?{...Se,args:{...Se.args}}:{key:"edit",args:{stateAndCoords:null,start:X}})},[]),Ie=r.useCallbackRef(()=>R,[R]),Ke=br({sheet:n,commands:M,target:He,onRepeatCommandChange:T,bodyStyle:Y,onStartEdit:Te,getViewport:Ie}),[_e,$e]=o.useState(n.getSelection().isEntire()),[Ye,Je]=o.useState(ee?.getMovableSelection().length>0),Le=G!==null||Ye,Xe=null,[vt,nt]=o.useState(!1);o.useEffect(()=>{nt(!1)},[n.getProtection()]);const at=r.useNotifier(),Tt=r.useCallbackRef(()=>{vt||(nt(!0),at.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.NotifierType.Error}))},[at,vt]),kt=o.useMemo(()=>{const X=we.getMode();return X?.cursor?X.cursor:null},[Xe,we]),[yt,wt]=o.useState(null),ct=o.useRef(!1),[rt,Rt]=o.useState([]),ft=o.useRef(null),[Ct,zt]=o.useState(he.TypesUtils.EmptyTopLeft),[qt,Kt]=o.useState(he.TypesUtils.EmptyTopLeft);o.useEffect(()=>{zt({left:re?.left,top:0})},[re?.left]),o.useEffect(()=>{Kt({left:0,top:re?.top})},[re?.top]),et(n?.getView(),{onFreezeSplitChange:()=>{ue(ne(n.getView().getFreezePanes()))},onTopLeftChange:()=>{pe(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Je(n.getView().getMovableSelection().length>0)}}),et(n?.getSelection(),{onChange:()=>{$e(n.getSelection().isEntire())}}),et(n,{onViewChange(){ce(n.getView()),I(Fe())},onLayoutChange:()=>{const X=n.getEntireRange();Oe({height:X.getRowCount(),width:X.getColumnCount()}),I(Fe())},onStyleChange:()=>{jt()},onMovablesChange:()=>{},onInvalidated:()=>{jt()}}),et(n,{onRequestScrollIntoView:async(X,Se)=>{if(!Se)return;const We={colIndex:Se?.coords?.colStart,rowIndex:Se?.coords?.rowStart};return await H.current?.scrollCellCoordsIntoView(We,Se?.scroll),!0},onRequestFocus:()=>he.CommonUtils.whenFocus(At.current)},ai);const ut=o.useRef(!1),Nt=o.useMemo(()=>{const X=he.CommonUtils.debounce(Ue=>{requestAnimationFrame(()=>{ct.current&&be?.(Ue)})},32),Se=(Ue,Ze)=>{ct.current=!0,wt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:0,rowEnd:xe.height,colStart:Ue,colEnd:Ue})))return;const st=Ge.getLayout(),it=Math.max(0,st.getColOffset(Ue)),lt=Ge.getBounds(),St=Math.min(lt.x+lt.width,st.getColOffset(Ue+1)),Dt=Ge.getAnchor();if(Ze!==null&&(Dt===he.AnchorLocation.Left||Dt===he.AnchorLocation.Center||Dt===he.AnchorLocation.Right)){const to=he.CommonUtils.roundAccurately(Ze*he.CommonUtils.getDPI(),0),Sn=he.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ze/le),2).toFixed(2),no="Width: "+(Ze?Sn+" ("+to+" pixels)":"Hidden"),on=Gn.current.getGridElement().getRelativePointFromClient(0,0),Gt=0-on.y,Rn=0-on.y+Pe,oo=on.x-lt.x;X({anchor:{x:it-oo,y:Gt,width:St-it,height:Rn-Gt},display:no})}const Bt=[0,0,0,lt.height],Yn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},Jn={x:it-1,y:0,width:1,height:lt.height},Qn={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},eo={x:St-1,y:0,width:1,height:lt.height};return c.jsxs(o.Fragment,{children:[c.jsx(ht.SVGLine,{linePoints:Bt,bounds:Jn,...Yn}),c.jsx(ht.SVGLine,{linePoints:Bt,bounds:eo,...Qn})]},"resize-dividers")}])};let We=null;return{onResizeHeadersStart:(Ue,Ze,Ge)=>{We=n.beginCommit(Ge),ut.current=!1,Se(Ue,Ze)},onResizeHeaders:(Ue,Ze,Ge)=>{ut.current=!1,Se(Ue,Ze)},onResizeHeadersDown:(Ue,Ze)=>{ut.current=!0,setTimeout(()=>{ut.current&&Se(Ue,Ze)},360)},onResizeHeadersEnd:(Ue,Ze,Ge)=>{We?.commit({description:Ge}),We=null,ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},onResizeHeadersUp:Ue=>{ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},...h}},[n,h,Pe,yt]),tn=o.useMemo(()=>{const X=he.CommonUtils.debounce(Ue=>{requestAnimationFrame(()=>{ct.current&&me?.(Ue)})},32),Se=(Ue,Ze)=>{ct.current=!0,wt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:Ue,rowEnd:Ue,colStart:0,colEnd:xe.width})))return;const st=Ge.getLayout(),it=Math.max(0,st.getRowOffset(Ue)),lt=Ge.getBounds(),St=Math.min(lt.y+lt.height,st.getRowOffset(Ue+1)),Dt=Ge.getAnchor();if(Ze!==null&&(Dt===he.AnchorLocation.Top||Dt===he.AnchorLocation.Center||Dt===he.AnchorLocation.Bottom)){const to=Math.floor(10*he.CommonUtils.getDPI())/10,Sn=he.CommonUtils.roundAccurately(Ze*to,0),no=he.CommonUtils.roundAccurately(Sn/le/(n?.getRowHeaders().getScaleFactor()*he.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ze?no+" ("+Sn+" pixels)":"Hidden"),Gt=$t.current.getGridElement().getRelativePointFromClient(0,0),Rn=0-Gt.x,oo=0-Gt.x+p,ml=Gt.y-lt.y;X({anchor:{x:Rn,y:it-ml,width:oo-Rn,height:St-it},display:on})}const Bt=[0,0,lt.width,0],Yn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},Jn={x:0,y:it-1,width:lt.width,height:1},Qn={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},eo={x:0,y:St-1,width:lt.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(ht.SVGLine,{linePoints:Bt,bounds:Jn,...Yn}),c.jsx(ht.SVGLine,{linePoints:Bt,bounds:eo,...Qn})]},"resize-dividers")}])};let We=null;return{onResizeHeadersStart:(Ue,Ze,Ge)=>{We=n.beginCommit(Ge),ut.current=!1,Se(Ue,Ze)},onResizeHeaders:(Ue,Ze,Ge)=>{ut.current=!1,Se(Ue,Ze)},onResizeHeadersDown:(Ue,Ze)=>{ut.current=!0,setTimeout(()=>{ut.current&&Se(Ue,Ze)},360)},onResizeHeadersEnd:(Ue,Ze,Ge)=>{We?.commit({description:Ge}),We=null,ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},onResizeHeadersUp:Ue=>{ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},...y}},[n,y,p]),At=r.useImperativeElement(t,()=>{const X=We=>{n?.getView()&&n.getView().selectMovables([]),Ne.current=null,H?.current?.focus(We)},Se=async(We=null)=>{if(We||(We=n?.getView().getMovableSelection()[0]),!We)return!1;const Ue=We.getAnchorCoords();if(!Ue)return!1;const Ze=H.current?.getViewFromCellCoords({colIndex:Ue.colStart,rowIndex:Ue.rowStart});if(!Ze)return!1;const Ge=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(We)===-1&&n?.getView().selectMovables([We]);let st=Me.current?.get(Ge);return st?.current?(await st.current.focusMovable(We),!0):(Ne.current={movable:We,anchor:Ge},!0)};return{getGridElement:()=>H.current,getRowHeaderElement:()=>$t.current,getColumnHeaderElement:()=>Gn.current,rowHeaderHeight:()=>Pe,colHeaderWidth:()=>p,startEdit:Te,submitEdit:()=>{we.setMode(We=>We?.key!=="edit"?We:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{we.setMode(We=>We?.key!=="edit"?We:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:G!==null,focus:We=>{n?.getView().getMovableSelection().length>0&&Se()||X(We)},focusSheet:X,focusMovable:Se,contains:We=>H?.current?.contains?.(We),invalidate:jt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),jt=o.useCallback(X=>{je.current||(H?.current?.invalidate(X),F?.())},[]);o.useEffect(()=>{jt()},[fe]);const vn=_e?Ce.edgeStrokeFill:de.fill,ot=_e?ke.fill:typeof fe.headerHover=="function"?fe.headerHover(de)?.fill:de.fill,Cn=o.useMemo(()=>V?c.jsx("div",{className:dt("sheetxl-viewport-overlay",kl),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:V}):c.jsx(c.Fragment,{}),[V]);let Wt=null;ve&&Ae&&(Wt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Pe}px`,width:`${p}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:X=>{let Se=!X.ctrlKey;Ke?.getCommand("selectAll")?.execute(!Se||X.button!==0),X.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:X,clientX:X.clientX,clientY:X.clientY,rowIndex:-1,colIndex:-1}):H.current?.focus()},children:[c.jsx("div",{style:{height:Pe-5+"px",width:Pe-5+"px",clipPath:`path('M${Pe-5} 0 L0 ${Pe-5} L${Pe-5} ${Pe-5} L${Pe-5} 0 Z')`,borderRight:`2px solid ${vn}`,borderBottom:`2px solid ${vn}`,background:`${ot}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${Pe}px`,width:`${p}px`,boxSizing:"border-box",borderRight:`solid 1px ${de.strokeFill}`,borderBottom:`solid 1px ${de.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:X,_top:Se})=>{},[]),gt=r.useCallbackRef(X=>{if(!l)return;const Se=H.current.getViewFromClient(X.clientX,X.clientY)?.getCellCoordsFromClient(X.clientX,X.clientY);Se&&(l({originalEvent:X,clientX:X.clientX,clientY:X.clientY,rowIndex:Se.rowIndex,colIndex:Se.colIndex}),X.stopPropagation(),X.preventDefault())},[l]),bt=r.useCallbackRef(X=>{if(!(!X.shiftKey&&(X.ctrlKey||X.metaKey)))return;const{deltaY:Se}=X;return Se>0?Ke.getCommand("sheetZoomOut")?.execute():Se<0&&Ke.getCommand("sheetZoomIn")?.execute(),Se===0},[Ke]);o.useEffect(()=>{Rt(null),ft.current=null,ct.current=!1,wt(null);const X=n?.getView().getTopLeft();nn(X),H.current?.scrollTo(X),pe(X),ce(n.getView()),ue(ne(n.getView().getFreezePanes())),I(Fe()),F()},[n?.getView()]);const yn=o.useCallback((X,Se)=>n.getRowHeaders().hiddenHeadersAt(X,Se),[n]),wn=o.useCallback((X,Se)=>n.getColumnHeaders().hiddenHeadersAt(X,Se),[n]),Ot=r.useCallbackRef(X=>{const Se=X.getVisibleRangeCoords();if(!Se)return null;const We=[];return n.getRange(Se).forEach((Ue,Ze)=>{const Ge=Ze.getCoords(),st=Ze.getCell();(it=>{if(it.isEmpty())return!1;const lt=it.getSpans();if(lt.width>1||lt.height>1||it.getStyle().hasVisibleStyling()||ee.isShowFormulas()&&it.getFormula()!==null)return!0;const St=it.getValue();return St!==null&&!(!ee.isShowZeros()&&St===0&&it.getType()===d.ScalarType.Number)})(st)&&We.push({coords:Ge,value:st,range:ee.isShowFormulas()?null:st.getExtrusions()})},{ignoreHidden:!0,includeMergeOverflow:!0}),We},[n,ee.isShowZeros(),ee.isShowFormulas(),G]);o.useEffect(()=>{const X=[];P&&X.push(...P),yt&&X.push(...yt),he.CommonUtils.isEqualArrays(X,ft.current)||(ft.current=X,Rt(X))},[P,yt,fe]);const bn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[fe?.header?.edgeStrokeFill]),$n=r.useCallbackRef(X=>{X.isDefaultPrevented()||X.isPropagationStopped()||(Ne.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),xn=o.useMemo(()=>{const X=we.getMode();return X?.key==="cut"||X?.key==="copy"},[we]),qn=r.useCallbackRef(async X=>{const Se=we.getMode();return X.keyCode===r.KeyCodes.Escape&&Se?(X.preventDefault(),void we.setMode(null)):X.keyCode===r.KeyCodes.Enter&&xn?(X.preventDefault(),await Ke?.getCommand("paste")?.execute(),void we.setMode(null)):void Ke?.dispatchToFocusedCommand(X)},[Ke,we]),$t=o.useRef(null),il=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Pe+1}px`,width:`${p+de.edgeStrokeWidth}px`,minWidth:`${p+de.edgeStrokeWidth}px`,borderRight:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,height:`calc(100% - ${Pe}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Oo,{ref:$t,sheetElement:At.current,gridRef:H,freezeStart:ae?.[he.AnchorLocation.Top],oppositeSize:p,containerWidth:p,containerHeight:te,sheetHeader:n.getRowHeaders(),gridStyle:Ve,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:qt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Pe+1}px`,width:`${p+de.edgeStrokeWidth}px`,minWidth:`${p+de.edgeStrokeWidth}px`,borderRight:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,height:`calc(100% - ${Pe}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[p,Pe,te,n,qt,ae?.[he.AnchorLocation.Top],fe,ye,l,de.fill,y]),Gn=o.useRef(null),al=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Pe+de.edgeStrokeWidth}px`,minHeight:`${Pe+de.edgeStrokeWidth}px`,borderBottom:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Oo,{ref:Gn,sheetElement:At.current,gridRef:H,freezeStart:ae?.[he.AnchorLocation.Left],oppositeSize:Pe,containerWidth:tt,containerHeight:Pe,sheetHeader:n.getColumnHeaders(),gridStyle:Ve,scrollPoint:Ct,onSheetContextMenu:l,...Nt,style:{...Nt?.style,position:"relative",left:"0px",width:"100%",height:`${Pe+de.edgeStrokeWidth}px`,minHeight:`${Pe+de.edgeStrokeWidth}px`,borderBottom:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Pe,tt,n,Ct,ae?.[he.AnchorLocation.Left],fe,de.fill,ye,l,h]),sl=r.useCallbackRef(X=>{const{value:Se,key:We,...Ue}=X;let Ze=Se,Ge=G;if(!Ge||Ge.colIndex===X.coords.colIndex&&Ge.rowIndex===X.coords.rowIndex||(Ge=null),!Ze){const lt=X.range;if(Ze=n.getRange({rowIndex:lt.rowStart,colIndex:lt.colStart}).getCell(),Ze.isEmpty())return null}let st=null;Ze.getHyperlink()&&(st=async lt=>{if(_?.onLinkMouseDown?.(lt),lt.button===0&&!lt.isDefaultPrevented()){lt.stopPropagation(),lt.preventDefault();try{await Ze.getHyperlink()?.open()}catch(St){at.showError?.(St)}}}),Ge&&Ge.colIndex===X.range.colStart&&Ge.rowIndex===X.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const it=n.getStyles();return o.createElement(gr,{...Ue,key:We,bodyStyle:Y,docTheme:it.getTheme(),normalStyle:it.getNormal(),showFormulas:ee.isShowFormulas(),showZeros:ee.isShowZeros(),onLinkMouseDown:st,..._,value:Ze})},[n,Ee,Y,G,ee?.isShowFormulas(),ee.isShowZeros()]),cl=o.useCallback((X,Se)=>{const{key:We,...Ue}=X;return[c.jsx(zl,{ref:Se,getVisibleCells:Ot,sheet:n,gridStyle:fe,...Ue},`border-${We}`),c.jsx(ri,{ref:Se,sheet:n,commands:Ke,...Ue},`table-${We}`),c.jsx(li,{ref:Se,sheet:n,...Ue},`spill-${We}`),c.jsx(Zl,{ref:Se,sheet:n,commands:Ke,onShowTooltip:oe,onCloseTooltip:ze,gridStyle:fe,gridRef:H,editingCoords:G,isActive:ye,...Ue},`selection-${We}`),c.jsx(Vl,{ref:Se,sheet:n,commands:Ke,gridStyle:fe,element:C,...Ue},`copy-paste-${We}`),c.jsx(ei,{ref:Se,sheet:n,commands:Ke,target:He,renderMovable:$,movableProps:{onUnFocus:()=>{At.current.focus()}},...Ue},`movable-${We}`),c.jsx(ti,{ref:Se,sheet:n,commands:Ke,gridStyle:fe,getCellEditor:j,showProtectedError:Tt,setEditingCoords:qe,...Ue},`editor-${We}`)]},[n,H.current,fe,j,Ke,at]),[Eo,dl]=o.useState(!1),ul=o.useMemo(()=>{if(tt===0||te===0)return null;const X=n.getStyles().getNormal(),Se=X.getFont(),We=X.getFill(),Ue=X.getBorder(),Ze=X.getFill().getType()===d.IFill.Type.None;let Ge=ie,st=ie;const it=(St,Dt,Bt)=>Bt?{stroke:Ue.getBottom().isNone()?"none":St.getColor().toRGBA(Y.darkMode).toString(),...Dt}:Dt;st=it(Ue.getBottom(),st,!Ue.getBottom().isNone()),st=it(Ue.getTop(),st,!Ue.getTop().isNone()),Ge=it(Ue.getRight(),Ge,!Ue.getRight().isNone()),Ge=it(Ue.getLeft(),Ge,!Ue.getLeft().isNone());let lt=ee?.getGridLineColor()?.toRGBA(Y.darkMode).toString()??Y.strokeFill;return Ze||(st=it(Ue.getBottom(),st,!0),st=it(Ue.getTop(),st,!0),Ge=it(Ue.getRight(),Ge,!0),Ge=it(Ue.getLeft(),Ge,!0)),c.jsx(ht.Grid,{className:"sheetxl-sheet-primary",style:{...ii,...We.toCSS(Y.darkMode),...Se.toCSS(Y.darkMode,le),"--sxl-app-color-background":Y.fill,"--sxl-app-color-shadow":fe.colorShadow,"--sxl-app-color-grey":fe.colorGrey,"--sxl-app-color-button-fill":Z.fill,"--sxl-app-color-button-text":Z.text?.fill,"--sxl-app-color-button-border":Z.edgeStrokeFill,"--sxl-app-color-primary-dark":fe.selection.strokeFill},ref:H,zoom:le,...ge,onFirstRender:St=>{dl(!0),ge?.onFirstRender?.(St),Ke?.activate()},showGridLines:Re,gridLineColor:lt,gridLineColumnsProps:Ge,gridLineRowsProps:st,freezeLeft:ae?.[he.AnchorLocation.Left],freezeLeftProps:bn,freezeTop:ae?.[he.AnchorLocation.Top],freezeTopProps:bn,width:tt,height:te,columnCount:xe.width,rowCount:xe.height,cursor:kt??Xe??"cell",clipCells:!0,layout:Ee,cellRenderer:sl,overlayRenderer:cl,getCellCoordsAsRangeCoords:se,hiddenRowsAt:yn,hiddenColumnsAt:wn,getVisibleCells:Ot,onWheelScroll:bt,onPointerDown:$n,onKeyDown:qn,onViewportChange:x,onImmediateScroll:nn,scrollPoint:re,stageProps:{onFocus:()=>{Ke?.activate()}},overlays:rt})},[z]);o.useEffect(()=>{je.current||F()},[Ee,ae,le,Ke,re?.left,re?.top,Y,ge,tt,te,kt,rt,ye,Xe]);let _n={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};b||(_n={..._n,...q});const gl=o.useMemo(()=>{const X=n.getStyles().getTheme(),Se=X.getColorScheme(),We=X.getFontScheme();return{"--sxl-doc-color-dk1":Se.getDk1().toCSS(Y.darkMode),"--sxl-doc-color-dk2":Se.getDk2().toCSS(Y.darkMode),"--sxl-doc-color-lt1":Se.getLt1().toCSS(Y.darkMode),"--sxl-doc-color-lt2":Se.getLt2().toCSS(Y.darkMode),"--sxl-doc-color-accent1":Se.getAccent1().toCSS(Y.darkMode),"--sxl-doc-color-accent2":Se.getAccent2().toCSS(Y.darkMode),"--sxl-doc-color-accent3":Se.getAccent3().toCSS(Y.darkMode),"--sxl-doc-color-accent4":Se.getAccent4().toCSS(Y.darkMode),"--sxl-doc-color-accent5":Se.getAccent5().toCSS(Y.darkMode),"--sxl-doc-color-accent6":Se.getAccent6().toCSS(Y.darkMode),"--sxl-doc-color-hlink":Se.getHlink().toCSS(Y.darkMode),"--sxl-doc-color-fol-hlink":Se.getFolHlink().toCSS(Y.darkMode),"--sxl-doc-font-major":We.getMajorFont(),"--sxl-doc-font-minor":We.getMinorFont()}},[n.getStyles().getTheme()]),Fo=r.useCallbackRef(X=>{const{style:Se,...We}=X;return c.jsx(bo,{...We,style:{paddingLeft:"4px",paddingRight:"4px",...Se},sheet:n})},[n]);let Zn=c.jsx("div",{style:_n,onTouchStart:()=>{Ao()},onFocus:X=>{L(!0),v?.(X)},onBlur:X=>{L(!1),A?.(X)},ref:At,...U,children:c.jsx("div",{className:dt("sheetxl-sheet",Rl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...gl},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Wt,il,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[al,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,backgroundColor:Y.fill},ref:k,onContextMenu:gt,children:[ul,Cn,c.jsx(Ml,{style:{position:"absolute",right:24,bottom:4},colorLicensee:fe?.selection?.strokeFill,colorCredits:fe?.body?.text?.fill})]})]})]})})});b&&(Zn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${de.fill}`,minHeight:2*Be.height,minWidth:2*Be.width,...q},viewport:R,touchElement:H.current?.stage,disableTouch:Le,onScrollViewport:X=>{H.current?.scrollTo(X)},createHorizontalScrollbar:Fo,createVerticalScrollbar:Fo,...w,children:Zn})),o.useEffect(()=>{je.current=!1,F?.(),J&&At.current?.focus()},[n]);const[Xn,hl]=o.useState(!1),Ao=r.useCallbackRef(()=>{Xn||hl(!0)},[Xn]);return o.useEffect(()=>{if(Eo)return typeof S=="function"&&S(),r.ReactUtils.detectIt().primaryInput==="touch"&&Ao(),()=>{}},[S,Eo,Xn]),Zn}));Mr.displayName="SheetElement";const Ko="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=",Tr=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:f,isDragging:h,view:s,onHide:y,onShow:b,onKeyDownCapture:w,onFocus:m,onBlur:M,loadingPanel:T,...N}=e,[P,$]=o.useState(!1),[V,S]=o.useState(null),[j,v]=o.useState(null),[A,q]=o.useState(null);o.useEffect(()=>{v(null),l.getDetails().then(O=>{$(!1),v(O.asUrl()),O.asSVGText?.()&&q(O.asSVGText())}).catch(O=>{console.warn(O),$(!0),v(Ko),q(null)})},[l]);const K=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),D=o.useMemo(()=>{if(j||A)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:P?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:P?"var(--sxl-app-color-background, white)":void 0,boxShadow:P?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:P?"contain":void 0,opacity:V?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:j,onLoad:()=>{S(!0)},onError:({currentTarget:O})=>{console.log("error"),O.onerror=null,v(Ko),$(!0)},alt:f??`${l.getType()}`})},[V,l,j,A,h]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:h?"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,...N,onKeyDownCapture:O=>{w?.(O)},ref:K,children:[V||P?void 0:T,D]})}));Tr.displayName="PictureEditor";const si=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:f,onHide:h,onShow:s,...y}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[w,{height:m,width:M}]=Xt();if(!a.isClosed())return c.jsx("div",{...y,ref:Ut([b,w]),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:f?"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()})})})})),ci="_editable-input_1bqx6_6",di=e=>c.jsx("input",{...e}),Ir=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:f,onCancel:h,createInput:s=di,styleHover:y={},dragging:b,maxLength:w,disabled:m=!1,readOnly:M=!1,...T}=e,[N,P]=o.useState(!1),[$,V]=o.useState(!1),[S,j]=o.useState(a);o.useEffect(()=>{j(a)},[a]);const v=o.useRef(null),[A,q]=o.useState(null),K=r.useNotifier(),D=o.useCallback(function(F){const k=F.message;A!==k&&(K?.showMessage?.(k,{type:r.NotifierType.Error}),q(k))},[K,A]),O=o.useCallback(F=>{let k=!1;try{k=l?.(F)??!0}catch(B){D(B)}return k?(v.current=null,V(!1),j(F),k):(setTimeout(()=>{v.current?.focus()},0),k)},[l]),W=r.useCallbackRef(()=>{j(a),v.current=null,V(!1),h?.()},[h,a]),ge=o.useMemo(()=>{if(!$)return null;const F={className:dt(ci),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:w,type:"text",value:S,onFocus:k=>{v.current||(v.current=k.target,setTimeout(()=>{k.target?.select()},0))},onBlur:k=>{v.current&&O(S)},onChange:k=>{$&&j(k.target.value)},onMouseDown:k=>k.stopPropagation(),onKeyDown:k=>k.code==="Escape"?(k.preventDefault(),void W()):k.code==="Enter"?(k.preventDefault(),void O(k.target.value)):void(k.code!=="Tab"?k.stopPropagation():O(k.target.value))};return c.jsx(c.Fragment,{children:s(F)})},[$,S,O,W,s,m]),[_,U]=o.useState();o.useLayoutEffect(()=>{let F=Object.assign({},n);(b||N)&&(F=Object.assign(F,y)),U(F)},[b,N,y,n]),o.useEffect(()=>{ge&&f?.(S)},[ge,f,S]);const z=r.useImperativeElement(t,()=>({startEdit(){m||M||V(!0)},cancel(){W()}}),[]);return c.jsxs("div",{...T,ref:z,style:{flexDirection:"column",display:"flex",..._},className:dt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{m||M||V(!0)},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:$?0:1},children:S}),ge]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...y},children:S})]})})),Hn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Qt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function xo(e){return"nodeType"in e}function xt(e){var t,n;return e?Qt(e)?e:xo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function qo(e){const{Document:t}=xt(e);return e instanceof t}function mn(e){return!Qt(e)&&e instanceof xt(e).HTMLElement}function Er(e){return e instanceof xt(e).SVGElement}function Jt(e){return e?Qt(e)?e.document:xo(e)?qo(e)?e:mn(e)||Er(e)?e.ownerDocument:document:document:document}const Et=Hn?o.useLayoutEffect:o.useEffect;function Vn(e){const t=o.useRef(e);return Et(()=>{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 Et(()=>{n.current!==e&&(n.current=e)},t),n}function an(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function zn(e){const t=Vn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Nn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let lo={};function fn(e,t){return o.useMemo(()=>{if(t)return t;const n=lo[e]==null?0:lo[e]+1;return lo[e]=n,e+"-"+n},[e,t])}function Fr(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,f)=>{const h=Object.entries(f);for(const[s,y]of h){const b=l[s];b!=null&&(l[s]=b+e*y)}return l},{...t})}}const Zt=Fr(1),gn=Fr(-1);function Un(e){if(!e)return!1;const{KeyboardEvent:t}=xt(e.target);return t&&e instanceof t}function Ln(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=xt(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 Vt=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[Vt.Translate.toString(e),Vt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),Wo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ui(e){return e.matches(Wo)?e:e.querySelector(Wo)}const gi={display:"none"};function hi(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:gi},n)}function mi(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Ar=o.createContext(null),fi={draggable:`
23
+ The content is not applied.`,icon:"PasteFormats"}),new r.Command("pasteFormulas",v,{label:"Paste Formulas",scopedLabels:{paste:"Formulas"},description:"Paste only the formulas of the selected cells. The values and formatting is not applied.",icon:"PasteFormulas"}),new r.Command("pasteTranspose",v,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped.",icon:"PasteTranspose"}),new r.Command("pasteLinks",v,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells.",icon:"PasteLinks"})];i.addCommands(A,!0)},[i,e]),o.useEffect(()=>{if(!i)return;const v={disabled:!t.getProtection().isFormatCellsAllowed()};i.getCommand("pasteValues").updateCallback(A=>S.paste({...Pl,...A})).update(v),i.getCommand("pasteFormats").updateCallback((A,q)=>S.paste({...jl,description:q.label(),...A})).update(v),i.getCommand("pasteFormulas").updateCallback((A,q)=>S.paste({...Ol,description:q.label(),...A})).update(v),i.getCommand("pasteTranspose").updateCallback((A,q)=>S.paste({...Bl,description:q.label(),...A})).update(v),i.getCommand("pasteLinks").updateCallback((A,q)=>S.paste({...Hl,description:q.label(),...A})).update(v),i.getCommand("cut").update(v),i.getCommand("paste").update(v)},[t,i]);const j=o.useMemo(()=>{if(!N||!M.current)return;const v=N.key;if(v!=="copy"&&v!=="cut"&&v!=="formatPainter")return;const A=M.current.getItem();if(A.getSource()!==t)return;const q=M.current.isCut?.(),K=q?b:y,D=q?s:h,O=A.getCoords(),W=O?[O]:null;return W&&W.length!==0?ge=>{const _=[];for(let U=0;U<W.length;U++){const z=W[U],F=ge.toClipBounds(ge.getRangeCoordsBounds(z,{top:0,left:0,right:1,bottom:1}),ht.SELECTION_CLIP_INSETS);F&&(_.push(m({range:z,key:`copy-selection-background-${U}`,x:F.x,y:F.y,width:Math.max(F.width,0),height:Math.max(F.height,0),stroke:K,strokeWidth:2})),_.push(m({range:z,key:`copy-selection-foreground-${U}`,x:F.x+(F.width<=2?-1:0),y:F.y,width:Math.max(F.width,3),height:Math.max(F.height,3),stroke:D,strokeWidth:2,isAnimatedStroke:!0})))}return _}:null},[N,t,n,h,y,s,b]);return{...S,clipboard:V,overlays:j}},Vl=o.memo(o.forwardRef((e,t)=>{const{view:n,element:i,sheet:a,gridStyle:l,commands:f}=e,h=l.body??{},s=a.getView(),{overlays:y}=xr({element:i,sheet:a,sheetView:s,commands:f,copyForegroundColor:l.selection.strokeFill,copyBackgroundColor:h.fill,cutForegroundColor:l.selectionRemove.strokeFill,cutBackgroundColor:h.fill});return et(a?.getSelection(),{onChange(b){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),y&&n?y(n):null})),Ul="_sheet-selection_12wyx_5",Kl={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},Wl={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},$l={key:"dragCopy",description:"Drag selection to copy cell contents."},Gl={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Bo=(e,t)=>t.ctrlKey&&t.shiftKey?Gl:t.ctrlKey?$l:t.shiftKey?Wl:Kl,_l={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},Zl=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:i,className:a,onFirstRender:l,onShowTooltip:f,onCloseTooltip:h,sheet:s,gridRef:y,gridStyle:b,isActive:w,editingCoords:m,...M}=e,T=n?.getBounds(),N=r.useCallbackRef(f,[f]),P=r.useCallbackRef(h,[h]),[$,V]=o.useState(()=>s?.getSelection().getCoords()),S=r.useCallbackRef(H=>{he.CoordUtils.isEqualSelectionCoords(H,$)||s&&s.getSelection().updateCoords(H)},[s,$]),j=r.useEditMode(),v=o.useRef(null),[A,q]=o.useState(s?.getProtection().isLocked()),[K,D]=o.useState(s?.getView().getMovableSelection().length>0),O=r.ReactUtils.detectIt().primaryInput==="touch",W=!O&&w,ge=m??j.getMode()?.args?.stateAndCoords?.coords??null,_=ge!==null||K,U=r.useCallbackRef(H=>{const ee=he.CoordUtils.cellToRange(H);if(s.isClosed())return ee;const ce=s.getRange(ee,{ignoreHidden:!0}).getMerges();return ce.length===0?ee:ce[0]},[s]),z=r.useCallbackRef((H,ee,ce,le,Re,ie)=>{const ve=s.getSelectedRange().getExtended(le,H).getCoords();switch(le){case d.IRange.Direction.Up:return ve.rowStart;case d.IRange.Direction.Down:return ve.rowEnd;case d.IRange.Direction.Left:return ve.colStart;case d.IRange.Direction.Right:return ve.colEnd}},[s]),F=r.useCallbackRef(()=>{const H=s.getUsedRange()?.getCoords(),ee=s.getRowHeaders().getUsedRange()?.getCoords(),ce=s.getColumnHeaders().getUsedRange()?.getCoords();return{...H,colEnd:Math.max(H?.colEnd??0,ce?.max??0),rowEnd:Math.max(H?.rowEnd??0,ee?.max??0)}},[s]),k=r.useCallbackRef((H,ee)=>s.getRowHeaders().hiddenHeadersAt(H,ee),[s]),B=r.useCallbackRef((H,ee)=>s.getColumnHeaders().hiddenHeadersAt(H,ee),[s]),Q=r.useCallbackRef(H=>s.getRange(H,{ignoreHidden:!0}).getMerges(),[s]),oe=r.useCallbackRef(H=>{s?.getSelection().setAdjusting(H)},[s]),be=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),j.getMode()?.key==="formatPainter"&&(await i?.getCommand("pasteFormats")?.execute({}),j.setMode(null))},[j,$,s,i]),me=o.useMemo(()=>{const H=j.getMode();return H?.key==="cut"||H?.key==="copy"},[j]);et(s?.getView(),{onMovableSelectionChange:()=>{D(s.getView().getMovableSelection().length>0)}}),et(s?.getSelection(),{onChange(H){const ee=s.getSelection().getCoords();V(ee)}}),et(s,{onProtectionChange:()=>{q(s.getProtection().isLocked())}});const{body:ze={}}=b||{},je=r.useNotifier(),De=n.getLayout(),fe=!(W&&$.ranges.length<=1&&ge===null&&!A&&(!j.getMode()||me)),{cursor:Ve,overlay:Y,onPointerDown:Z}=ht.useSelection({gridRef:y,commands:i,layout:De,getCellCoordsAsRangeCoords:U,selection:$,fillHandleBorderColor:ze.fill,selectionBackgroundColor:w?b.selection.fill:b.selectionInactive.fill,selectionBorderColor:w?b.selection.strokeFill:b.selectionInactive.strokeFill,selectionRemoveBackgroundColor:w?b.selectionRemove.fill:b.selectionInactive.fill,selectionRemoveBorderColor:w?b.selectionRemove.strokeFill:b.selectionInactive.strokeFill,disableFillDrag:fe,disableMoveDrag:O||!(w&&$.ranges.length<=1&&ge===null&&!A),disableTouchSelection:_,onSelectionChange:S,onSelectionDragStart:oe,onSelectionDragEnd:be,onMoveDragStart:(H,ee,ce)=>{j.setMode(Bo(0,ce))},onMoveDragUpdate:(H,ee,ce)=>{j.setMode(Bo(0,ce))},onMoveDragEnd:(H,ee)=>{j.setMode(null)},onMoveDragDone:async(H,ee,ce)=>{if(he.CoordUtils.isEqualRanges(H,ee))return;const le=s.getRange(ee);if(je?.showOptions){const xe=le.getDifferences(H);let Oe=!1;const Be=xe.getCount();for(let p=0;!Oe&&p<Be;p++)Oe=xe.at(p).isContentful();if(Oe&&await je?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const Re=!ce.ctrlKey,ie=ce.shiftKey,ve=ie?Re?"Insert Moved Cells":"Insert Copied Cells":Re?"Move Cells":"Copy Cells",Ae=await je?.showBusy?.(ve);try{const xe=s.getRange(H);await le.doBatch(async()=>{ie?await le.insertFrom(H,{isCut:Re,undoRange:xe}):await le.copyFrom(H,{isCut:Re,undoRange:xe}),xe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),le.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:ve,autoSelect:!0})}catch(xe){je?.showError?.(xe)}finally{Ae?.()}},contentfulCellFinder:z,hiddenRowsAt:k,hiddenColumnsAt:B,mergedRanges:Q,getDataCoords:F,canSelectionSpanMergedCells:H=>{const ee=s.getRange(H);return ee.isEntireColumns()||ee.isEntireRows()},onFill:async(H,ee)=>{const ce="Auto Fill",le=await je?.showBusy?.(ce);try{await s.doBatch(()=>{s.getRange(H).autoFill(ee),s.getRange(ee).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:ce,autoSelect:!0})}catch(Re){je?.showError?.(Re)}finally{v.current=null,le?.()}},onFillPreview:(H,ee,ce)=>{if(y.current&&N){j.setMode(_l);try{v.current?.direction!==ce&&(v.current=null,s.getRange(H).autoFill(ee,{previewOnly:Be=>{v.current={callback:Be,direction:ce}}}));const le=v.current?.callback?.(ee);if(!le||le.isEmpty())return;const Re=le.toText();if(!Re)return;const ie=he.CoordUtils.cellToRange(le.getCoords()),ve=n.getRelativePointFromClient(0,0);let Ae=0,xe=0,Oe=r.ToolTipPlacement.Bottom;if(ce===d.IRange.Direction.Down){Ae=De.getColOffset(ie.colEnd+1)-ve.x;const Be=De.getRowOffset(ie.rowEnd),p=De.getRowOffset(ie.rowEnd+1);xe=p-(p-Be)/2-ve.y,Oe=r.ToolTipPlacement.Right}else if(ce===d.IRange.Direction.Right){xe=De.getRowOffset(ie.rowEnd+1)-ve.y;const Be=De.getColOffset(ie.colEnd),p=De.getColOffset(ie.colEnd+1);Ae=p-(p-Be)/2-ve.x,Oe=r.ToolTipPlacement.Bottom}else if(ce===d.IRange.Direction.Up){Ae=De.getColOffset(ie.colEnd+1)-ve.x;const Be=De.getRowOffset(ie.rowStart),p=De.getRowOffset(ie.rowStart+1);xe=p-(p-Be)/2-ve.y,Oe=r.ToolTipPlacement.Right}else if(ce===d.IRange.Direction.Left){xe=De.getRowOffset(ie.rowEnd+1)-ve.y;const Be=De.getColOffset(ie.colStart),p=De.getColOffset(ie.colStart+1);Ae=p-(p-Be)/2-ve.x,Oe=r.ToolTipPlacement.Bottom}N({anchor:{x:Ae,y:xe},display:Re,placement:Oe})}catch(le){je?.showError?.(le)}}},onFillDone:()=>{v.current=null,j.setMode(null),P?.()}}),de=r.useCallbackRef(H=>{Z(r.ReactUtils.createSyntheticEvent(H))},[Z,ge]);o.useEffect(()=>{const H=n?.getStage();if(H)return H.addEventListener("pointerdown",de),()=>{H.removeEventListener("pointerdown",de)}},[n?.getStage()]);const ke=r.useImperativeElement(t,()=>({}),[]),Ce=o.useRef(null);return c.jsx("div",{className:dt(a,"sheet-selection",Ul),style:{position:"absolute",width:T?.width,height:T?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Ut([ke,Ce]),...M,children:Y(n)})})),Mn=Object.freeze({x:0,y:0,width:0,height:0}),Xl={fireOnModelChange:!1},Yl=o.memo(o.forwardRef((e,t)=>{const{children:n,view:i,movable:a,onRefLoad:l,onRefUnload:f,onHide:h,onShow:s,onUnFocus:y,isDragging:b,updateFrameBounds:w,dragStart:m,style:M,disabled:T,renderMovable:N,...P}=e,[$,V]=o.useState(Mn),[S,j]=o.useState(null),[v,A]=o.useState(!1),q=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const D=a.getBounds();if(!D)return;const O=i.toViewBounds(D);V(O??Mn),w(O??Mn)},[i?.getBounds()]),et(a,{onBoundsChange:D=>{const O=D.getBounds();if(!O)return;const W=i.toViewBounds(O);V(W??Mn),w(W)},onSelectionChange:()=>{const D=he.CommonUtils.hasFocus(q.current,!0);!v&&!D||a.isSelected()||y()}}),et(a,{onRequestFocus:()=>he.CommonUtils.whenFocus(q.current,!0)},Xl),o.useEffect(()=>{const D=q.current;return l(D),()=>{f(D)}},[]);const K=o.useMemo(()=>{if(!$)return null;let{width:D,height:O}=$;return N({view:i,movable:a,disabled:T,isDragging:b,style:{position:"relative",left:0,top:0,width:D,height:O},onHide:h,onShow:s})},[i,a,$.width,$.height,T,b]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Ut([q,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:$.x,top:$.y,width:$.width,height:$.height,...M},onMouseDown:async D=>{const O=D.shiftKey||D.ctrlKey,W=a.isSelected(),ge=D.currentTarget;O&&W?a.unselect():(W&&!O||await a.select({addToSelection:O}),m(D.nativeEvent,ge),ge.focus())},onFocus:D=>{D.relatedTarget&&!S&&j(D.relatedTarget),A(!0)},onBlur:D=>{S&&!q?.current?.contains(D.relatedTarget)&&j(null),D.relatedTarget&&A(!1)},...P,children:K})})),Jl="_movable-area_314c6_5",qr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:i,movablesView:a,renderMovable:l,transactional:f,onUnFocus:h,onFocus:s,disabled:y=!1,disableDrag:b=!1,disableResize:w=!1,className:m,style:M,renderDirections:T=["nw","n","ne","w","e","sw","s","se"],onFirstRender:N,...P}=e,$=n.getBounds(),V=r.useCallbackRef(N,[N]),S=r.useCallbackRef(h,[h]),j=r.useCallbackRef(s,[s]),[v,A]=o.useState([]),[q,K]=o.useState(!1),[D,O]=o.useState(!1),W=o.useRef(!0),ge=o.useRef(new Map),_=o.useRef(new Map),U=o.useRef(new Map),z=o.useRef(new Map),F=o.useRef(new Map),k=o.useRef({onRequestFocus:te=>(ee(te),null)}),B=o.useRef(null),Q=o.useRef(null),oe=o.useRef(null),[be,me]=o.useReducer(te=>te+1,0);o.useLayoutEffect(()=>{me()},[n,i]),et(i,{onCollectionChange:()=>{const te=i.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0}),Me=F.current;Me.forEach(Fe=>{Fe()}),Me.clear();const Ne=k.current;for(let Fe=0;Fe<te.length;Fe++){const Ee=te[Fe];if(Ee.isClosed())continue;const I=Ee.addListeners(Ne);Me.set(Ee,I)}me()},onInvalidated:()=>{me()}}),et(a,{onMovableSelectionChange(te){je(),me()}});const ze=o.useCallback((te,Me)=>{const Ne=U.current.get(te);oe.current&&(oe.current.getTargets().forEach(Fe=>{if(Fe===Ne)return Fe.style.left=Me.x+"px",Fe.style.top=Me.y+"px",Fe.style.width=Me.width+"px",void(Fe.style.height=Me.height+"px")}),oe.current.updateRect())},[]),je=()=>{const te=[],Me=a.getMovableSelection();Me.forEach(Ne=>{const Fe=U.current.get(Ne);Fe&&Me.indexOf(Ne)!==-1&&te.push(Fe)}),A(Ne=>he.CommonUtils.isEqualArrays(Ne,te)?Ne:te)},De=o.useRef(null),fe=o.useRef(null),Ve=o.useMemo(()=>(fe.current||(fe.current=new Promise(te=>{De.current=te})),fe.current),[]),Y=o.useRef(null),Z=r.useCallbackRef(async(te,Me)=>{Y.current=Me,await(async()=>!(!await Ve.then()||!oe.current))()&&Y.current===Me&&oe.current.dragStart(te,Me)},[v]),[de,ke]=o.useState(!1),Ce=o.useRef(null),H=o.useRef(null),ee=r.useCallbackRef(async(te=null)=>{if(te||(te=a.getMovableSelection()[0]),!te)return S?.(),!1;const Me=U.current.get(te);Me?(await he.CommonUtils.whenFocus(Me),Me.focus(),H.current=Me,Ce.current=null):Ce.current=te},[a]);o.useEffect(()=>{de&&v.length>0&&H.current!==v[0]&&ee(),W.current&&(V?.(),W.current=!1)},[v]);const ce=o.useMemo(()=>{const te=i.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0});if(te.length===0&&ge.current.size===0)return null;const Me=(J,L,G,qe=!0)=>{const ye=J.isSelected(),g={tabIndex:G,view:n,movable:J,onRefLoad:C=>{Ce.current===J&&(C.focus(),H.current=C,Ce.current=null),U.current.set(J,C),_.current.set(C,J),L.rendered=!0,je()},onRefUnload:C=>{U.current.delete(J),_.current.delete(C),L.rendered=!1,je()},onUnFocus:S,onHide:C=>{L.onHide=C},onShow:C=>{L.onShow=C},isDragging:ye&&(D||q),disabled:y,renderMovable:l,updateFrameBounds:C=>{ze(J,C)},dragStart:Z,onMouseUp:()=>{if(Y.current=null,Q.current){K(!1),O(!1);let C=!1;z.current?.forEach(R=>{he.CommonUtils.isEqualBounds(R.movable.getBounds(),R.startBounds)||(C=!0)}),C?Re():ie()}},style:{opacity:qe?q&&ye?.7:void 0:0,zIndex:q&&ye?J.getZIndex()+te.length:void 0,pointerEvents:qe?void 0:"none",cursor:D&&ye?"grabbing":y||b?"initial":"move",boxShadow:!ye||D&&!q?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(Yl,{...g},`movable-${J.getUUID()}`)},Ne=ge.current,Fe=new Map,Ee=[];for(let J=0;J<te.length;J++){const L=te[J];if(L.isClosed())continue;let G=Ne.get(L);G||(G={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(qe,ye)=>{if(!ye||ye.shown===!0)return;ye.shown=!0;const g=++ye.visibilityRequestId;requestAnimationFrame(()=>{const C=ge.current.get(qe);C&&g===ye.visibilityRequestId&&(ye.onShow?.(qe),C.shown=!0)})},doHide:async(qe,ye)=>{if(!ye||ye?.shown===!1)return;ye.shown=!1;const g=++ye.visibilityRequestId,C=await Promise.resolve(ye.onHide?.(qe));g===ye.visibilityRequestId&&C!==!1&&(ye.shown=!1,ge.current.delete(qe),me())},visibilityRequestId:0}),G.frame=Me(L,G,J,!0),Ee.push(G.frame),G.doShow(L,G),Ne.delete(L),Fe.set(L,G)}const I=[];return a.getMovableSelection().forEach(J=>{const L=Ne.get(J);L&&(L.frame=Me(J,L,-1,!1),I.push(L.frame),Ne.delete(J),Fe.set(J,L))}),Ne.forEach((J,L)=>{J.frame=Me(L,J,-1,!1),I.push(J.frame),J.doHide(L,J),Ne.delete(L),Fe.set(L,J)}),ge.current=Fe,je(),[...I,...Ee]},[be,n,l,y,b,w,q,D]),le=r.useCallbackRef((te,Me)=>{const Ne=`${Me} ${v.length===1?d.TextUtils.capitalize(_.current?.get(v[0]).getContent().getType()):"Drawings"}`;Q.current&&(console.warn(`Transaction ${Q.current.getDescription()} is being replaced by ${Ne}`),Q.current.rollback(),Q.current=null),Q.current=f.beginCommit({description:Ne}),z.current.clear();for(let Fe=0;Fe<v.length;Fe++){const Ee=v[Fe],I=_.current?.get(Ee);I?z.current.set(Ee,{movable:I,startBounds:n.toViewBounds(I.getBounds())}):console.warn("invalid element",I)}},[f,n,v]),Re=o.useCallback(()=>{if(!Q.current)return;const te=[];z.current?.forEach(Me=>{te.push(Me.movable)}),Q.current.commit({viewAfter:{view:a,movableSelection:te}}),z.current.clear(),Q.current=null},[]),ie=o.useCallback(()=>{Q.current&&(Q.current.rollback(),Q.current=null)},[]),ve=o.useRef(null);o.useEffect(()=>{ve.current&&(ve.current.onscroll=te=>{te.preventDefault(),te.srcElement.scrollTop=0,te.srcElement.scrollLeft=0})},[ve.current]);const Ae=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:ee,focus:()=>{ee()}}),[a]),[xe,Oe]=o.useState(null),Be=o.useRef(!1),p=o.useRef(!1),Pe=o.useRef(!1);o.useEffect(()=>{if(y||v.length===0||Pe.current||Be.current)return;if(p.current)return void requestAnimationFrame(()=>{oe.current&&B.current&&oe.current.refTargets.length>0&&(Pe.current=!0,De.current?.(!0)),A([...v])});Be.current=!0;const te=o.lazy(async()=>{try{const Me=await Promise.resolve().then(()=>require("./i0k8zvJbIBMgaJYz.cjs"));return Be.current=!1,p.current=!0,A([...v]),Me}catch(Me){return console.warn(Me),De.current?.(!1),null}});Oe(te)},[v,y,b,w]);const tt=o.useMemo(()=>!xe||y?null:c.jsx(o.Suspense,{children:c.jsx(xe,{className:dt({dragging:q||D,resizing:q,moving:D}),container:null,ref:oe,target:oe.current?v:[],draggable:!y&&!b,resizable:!y&&!w,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:T,onResizeStart:te=>{le(te.target,"Resize")},onResize:te=>{if(!Q.current)return te.stopDrag(),void me();K(!0);const Me=te.direction[0]!==0&&te.direction[1]!==0;let Ne=0,Fe=0;for(let Ee=0;Ee<v.length;Ee++){const I=v[Ee],J=z.current.get(I),L=_.current.get(I);if(!J||!L){console.warn("invalid element");continue}let G=te.dist[0],qe=te.dist[1],ye=te.drag.dist[0],g=te.drag.dist[1],C=J.startBounds.width,R=J.startBounds.height;Ee===0?(Ne=C,Fe=R):(G*=C/Ne,ye*=C/Ne,qe*=R/Fe,g*=R/Fe);const u={...J.startBounds};if(u.width=Math.max(0,C+G),u.height=Math.max(0,R+qe),te.direction[0]===-1&&(u.width=Math.max(0,Math.min(J.startBounds.x+C,C-ye))),te.direction[1]===-1&&(u.height=Math.max(0,Math.min(J.startBounds.y+R,R-g))),Me&&(L.isLockAspectRatio()||te.inputEvent?.shiftKey)){const x=C/R,E=u.width/u.height;E>x?u.height=u.width/x:E<x&&(u.width=u.height*x)}te.direction[0]===-1&&(u.x=Math.max(0,Math.min(J.startBounds.x+C,J.startBounds.x+C-u.width))),te.direction[1]===-1&&(u.y=Math.min(J.startBounds.y+R,J.startBounds.y+R-u.height)),J.movable.setBounds(n.toAbsoluteBounds(u))}},onResizeEnd:te=>{K(!1),Re()},onDragStart:te=>{le(te.target,"Move")},onDrag:te=>{if(!Q.current)return te.stopDrag(),void me();O(!0);for(let Me=0;Me<v.length;Me++){const Ne=v[Me],Fe=z.current.get(Ne);Fe?Fe.movable.setBounds(n.toAbsoluteBounds({...Fe.startBounds,x:Fe.startBounds.x+te.translate[0],y:Fe.startBounds.y+te.translate[1]})):console.warn("invalid element")}},onDragEnd:te=>{},onMouseUp:te=>{}})}),[be,xe,v,n,y,b,w,q,D]);return c.jsx("div",{className:dt(m,"movable-area",Jl),style:{width:$.width,height:$.height,...M,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Ut([Ae,ve]),...P,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:$.width,height:$.height},...P,children:c.jsxs("div",{ref:B,style:{position:"absolute",pointerEvents:"auto"},onFocus:te=>{j?.(),ke(!0)},onBlur:te=>{ke(!1)},onKeyDownCapture:te=>{if(te.isDefaultPrevented())return;const Me=te.nativeEvent.ctrlKey,Ne=te.nativeEvent.altKey,Fe=te.nativeEvent.shiftKey;if(te.which===r.KeyCodes.Escape){const G=a.getMovableSelection();let qe=[...G];return v.forEach(ye=>{if(qe.length===0)return;const g=_.current.get(ye);let C=qe.indexOf(g);qe.splice(C,1)}),qe.length!==G.length&&a.selectMovables(qe),qe.length===0&&S?.(),void te.preventDefault()}const Ee=.1,I=G=>{i.updateSelected(qe=>{qe.setRotation(qe.getRotation()+G)},"Rotate")},J=(G,qe=!0)=>{i.updateSelected(ye=>{const g=ye.getBounds();let C=1+G;qe||(C=1/C);const R=Math.sqrt(Math.pow(g.width,2)+Math.pow(g.height,2)),u=Math.atan2(g.height,g.width),x=C*R;if(x<10)return;const E=x*Math.cos(u),re=x*Math.sin(u),pe={x:g.x+(g.width-E)/2,y:g.y+(g.height-re)/2,width:E,height:re};ye.setBounds(pe)},"Resize")},L=G=>{i.updateSelected(qe=>{const ye=qe.getBounds(),g={x:ye.x+(G.x??0),y:ye.y+(G.y??0),width:ye.width+(G.width??0),height:ye.height+(G.height??0)};qe.setBounds(g)},"Nudge")};if(te.which===r.KeyCodes.Delete)i.updateSelected(G=>{G.delete()},"Delete"),te.preventDefault();else if(te.key==="a"&&Me){const G=a.getMovableSelection();a.selectMovables(i.getItems(),!0),a.selectMovables(G,!0),te.preventDefault()}else te.key==="ArrowLeft"?(Fe?J(Ee,!1):Ne?I(-10):L({x:Me?-10:-1}),te.preventDefault()):te.key==="ArrowRight"?(Fe?J(Ee,!0):Ne?I(10):L({x:Me?10:1}),te.preventDefault()):te.key==="ArrowUp"?(Fe?J(Ee,!0):L({y:Me?-10:-1}),te.preventDefault()):te.key==="ArrowDown"&&(Fe?J(Ee,!1):L({y:Me?10:1}),te.preventDefault())},children:[ce,tt]})})})})),_t=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 f=e[l].getBounds();t=Math.min(f.x,t),n=Math.min(f.y,n),i=Math.max(f.x+f.width,i),a=Math.max(f.y+f.height,a)}return{x:t,y:n,width:i-t,height:a-n}},Ho=(e,t=!0)=>{const n=[],i=t?"x":"y",a=t?"y":"x",l=t?"width":"height";let f=0,h=Number.MAX_SAFE_INTEGER,s=0;for(let w=0;w<e.length;w++){const m=e[w],M=m.getBounds();f+=M[l],h=Math.min(M[i],h),s=Math.max(M[i]+M[l],s),n.push({bounds:M,movable:m})}const y=(s-h-f)/(e.length-1);n.sort((w,m)=>{const M=w.bounds[i],T=m.bounds[i];return M!==T?M-T:w.bounds[a]-m.bounds[a]});const b=new Map;b.set(n[0].movable,n[0].bounds);for(let w=1;w<n.length-1;w++){const m=n[w-1].bounds,M={...n[w].bounds};M[i]=m[i]+m[l]+y,n[w].bounds=M,b.set(n[w].movable,M)}return b.set(n[n.length-1].movable,n[n.length-1].bounds),b},Sr=e=>{const{movables:t,movablesView:n,transactional:i,commands:a,target:l,onRepeatCommandChange:f}=e,h=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const y=r.useCallbackRef(async(S,j,v=null,A=!0)=>{const q=async()=>{const K=await Promise.resolve(h?.showBusy?.(S.label()));try{await j();const D=v??S?.label?.();if(f){let O=null;S&&D!==!1&&(O=new r.SimpleCommand(S.key(),l,{label:D,description:D},q)),f(O)}K?.(),A&&s.setMode(null)}catch(D){K?.(),h?.showError?.(D)}};await q()},[f,h]),[b,w]=o.useReducer(S=>S+1,0),m=r.useCallbackRef((S,j,v)=>{if(!n)return;const A=n.getMovableSelection();if(A.length===0)return;let q="Drawings";if(A.length===1){const D=A[0];q=d.TextUtils.capitalize(D.getContent().getType())??"Drawing"}const K=`${S.label()} ${q}`;y(S,()=>{let D=null;i&&(D=i.beginCommit(K));const O=n.getMovableSelection();if(O.length===0)return;const W=v?.(O);for(let ge=0;ge<O.length;ge++){const _=O[ge];j(_,W)}D?.commit()})},[n,i]),[M,T]=o.useState(n.getMovableSelection()[0]??null),[N,P]=o.useState(!M||M?.isProtected()),$=o.useMemo(()=>[new r.Command("moveToFront",l,{label:"Bring to Front",description:"Move to the front of all of the other drawings.",icon:"DrawToFront",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){m(this,S=>{S.moveToFront()})}),new r.Command("moveForward",l,{label:"Bring Forward",description:"Move forward one layer in the z order.",icon:"DrawMoveForward",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){m(this,S=>{S.moveForward()})}),new r.Command("moveToBack",l,{label:"Send to Back",description:"Move to the back of all of the other drawings.",icon:"DrawToBack",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){m(this,S=>{S.moveToBack()})}),new r.Command("moveBackward",l,{label:"Send Backward",description:"Move backwards one layer in the z order.",icon:"DrawMoveBackward",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){m(this,S=>{S.moveBackward()})}),new r.Command("toggleLockAspectRatio",l,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners.",icon:"DrawAspect"},function(){m(this,S=>{S.setLockAspectRatio(!S.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",l,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes.",icon:"DrawResize"},function(){m(this,S=>{S.setAnchorType(d.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.",icon:"DrawResize"},function(){m(this,S=>{S.setAnchorType(d.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.",icon:"DrawResize"},function(){m(this,S=>{S.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",l,{label:"Align Left",description:"Align the selected drawings to the left.",icon:"DrawAlignLeft"},function(){m(this,(S,j)=>{S.setBounds({x:j.x})},_t)}),new r.Command("formatDrawAlignCenter",l,{label:"Align Center",description:"Align the selected drawings vertically relative to each other.",icon:"DrawAlignCenter"},function(){m(this,(S,j)=>{S.setBounds({x:(j.width-S.getBounds().width)/2+j.x})},_t)}),new r.Command("formatDrawAlignRight",l,{label:"Align Right",description:"Align the selected drawings to the right.",icon:"DrawAlignRight"},function(){m(this,(S,j)=>{S.setBounds({x:j.width-S.getBounds().width+j.x})},_t)}),new r.Command("formatDrawAlignTop",l,{label:"Align Top",description:"Align the selected drawings to the top.",icon:"DrawAlignTop"},function(){m(this,(S,j)=>{S.setBounds({y:j.y})},_t)}),new r.Command("formatDrawAlignMiddle",l,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other.",icon:"DrawAlignMiddle"},function(){m(this,(S,j)=>{S.setBounds({y:(j.height-S.getBounds().height)/2+j.y})},_t)}),new r.Command("formatDrawAlignBottom",l,{label:"Align Bottom",description:"Align the selected drawings to the bottom.",icon:"DrawAlignBottom"},function(){m(this,(S,j)=>{S.setBounds({y:j.height-S.getBounds().height+j.y})},_t)}),new r.Command("formatDrawDistributeHorz",l,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each.",icon:"DrawDistributeHorz"},function(){m(this,(S,j)=>{S.setBounds(j.get(S))},S=>Ho(S))}),new r.Command("formatDrawDistributeVert",l,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each.",icon:"DrawDistributeVert"},function(){m(this,(S,j)=>{S.setBounds(j.get(S))},S=>Ho(S,!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.",icon:"DrawGroup"}),new r.Command("formatDrawUngroup",l,{label:"Ungroup",description:"Break the group of a drawing into individual drawings.",icon:"DrawUngroup"}),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,M]);o.useEffect(()=>{},[s]);const V=o.useMemo(()=>{let S=null;return S=a?a.createChildGroup(l,"movable",!1):new r.CommandGroup(l,"movable"),S.addCommands($,!0),S},[a,$]);return et(M,{onAnyChange:()=>{V.getCommand("formatAnchorTypeTwoCell").update({state:M?.getAnchorType()===d.IAnchored.Type.TwoCell}),V.getCommand("formatAnchorTypeOneCell").update({state:M?.getAnchorType()===d.IAnchored.Type.OneCell}),V.getCommand("formatAnchorTypeAbsolute").update({state:M?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("formatAnchorTypeAbsolute").update({state:M?.getAnchorType()===d.IAnchored.Type.Absolute}),V.getCommand("toggleLockAspectRatio").update({state:M?.isLockAspectRatio()})},onProtectedChange:S=>{P(S.isProtected())},onDelete:()=>{}}),et(n,{onMovableSelectionChange:()=>{const S=n.getMovableSelection()[0]??null;T(S),P(!S||S.isProtected()),w()}}),et(t,{onCollectionChange:()=>{w()}}),o.useEffect(()=>{const S={disabled:N};V.getCommand("formatAnchorTypeTwoCell").update(S),V.getCommand("formatAnchorTypeOneCell").update(S),V.getCommand("formatAnchorTypeAbsolute").update(S),V.getCommand("toggleLockAspectRatio").update(S);const j=t.getCount(),v=n.getMovableSelection(),A=N||j<=1||v.length===0;let q={disabled:A},K=q;if(!A&&v.length===1){const W=v[0];W.getZIndex()===0&&(q={disabled:!0}),W.getZIndex()===j-1&&(K={disabled:!0})}V.getCommand("moveToFront").update(K),V.getCommand("moveForward").update(K),V.getCommand("moveToBack").update(q),V.getCommand("moveBackward").update(q);const D={disabled:N||v.length<=1};V.getCommand("formatDrawAlignLeft").update(D),V.getCommand("formatDrawAlignCenter").update(D),V.getCommand("formatDrawAlignRight").update(D),V.getCommand("formatDrawAlignTop").update(D),V.getCommand("formatDrawAlignMiddle").update(D),V.getCommand("formatDrawAlignBottom").update(D),V.getCommand("formatDrawFlipHorz").update(D),V.getCommand("formatDrawFlipVert").update(D),V.getCommand("formatDrawGroup").update(D),V.getCommand("formatDrawUngroup").update(D),V.getCommand("formatDrawSwapShapes").update(D),V.getCommand("formatDrawSwapShapesHorz").update(D),V.getCommand("formatDrawSwapShapesVert").update(D);const O={disabled:N||v.length<=2};V.getCommand("formatDrawDistributeHorz").update(O),V.getCommand("formatDrawDistributeVert").update(O)},[b,N,b]),V},Ql=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,description:a,view:l,isDragging:f,onHide:h,onShow:s,...y}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[w,{height:m,width:M}]=Xt();return c.jsx("div",{...y,ref:Ut([b,w]),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:f?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),ei=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,movableProps:a,renderMovable:l,commands:f,target:h,onRepeatCommandChange:s}=e,y=Sr({movables:i.getMovables(),movablesView:i?.getView(),transactional:i,onRepeatCommandChange:s,commands:f,target:h});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const b=o.useMemo(()=>c.jsx(qr,{ref:t,view:n,movables:i.getMovables(),disableResize:!i.getProtection().isObjectsAllowed(),disableDrag:!i.getProtection().isObjectsAllowed(),movablesView:i.getView(),transactional:i,renderMovable:l,...a,onFocus:()=>{y.activate(),a?.onFocus?.()}},"movable-area"),[i,a,f,y]);return b&&n?b:null})),ti=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,gridStyle:a,getCellEditor:l,showProtectedError:f,setEditingCoords:h,commands:s}=e,y=r.useEditMode(),[b,w]=o.useState(null),[m,M]=o.useState(null),[T,N]=o.useState(null),[P,$]=o.useState(null),[V,S]=o.useState(null);o.useLayoutEffect(()=>{if(T===null)return $(null),void S(null);const k=()=>{const B=i.getRange(T).getCell(),Q=B.getStyle();let oe,be=Q.getFill()?.toCSS(a.body.darkMode);be.background!=="none"&&be.background!=="transparent"||(be=i.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),be.background!=="none"&&be.background!=="transparent"||(be={background:a.body.fill}),$({style:be}),B&&!B.getFormula()&&(oe=B?.getRenderHorizontalAlignment()),S(oe??r.HorizontalAlignment.Left)};return k(),i.getRange(T).addListener(()=>{k()})},[i,T,a?.body]);const j=r.useCallbackRef(()=>{let k=m.editState.dirty??"";if(m.editState.dirty!==void 0){const B=d.TextUtils.clampString(k);try{const Q=m.sheet.getRange(m.coords),oe=`Typing '${B}' into ${Q.toString()}`;return Q.setValue(k,{description:oe,autoFit:!0}),N(null),M(null),y.setMode(null),h(null),!0}catch(Q){throw he.Notifier.error(new Error(`Unable to enter '${B}'.`,{cause:Q})),Q}}},[i,m]),v=r.useCallbackRef(k=>i.getRange(k).getCell().getExtrusions()??he.CoordUtils.cellToRange(k),[i]),A=r.useCallbackRef(k=>{let B=d.IRange.Orientation.Row,Q=!1;k!==d.IRange.Direction.Up&&k!==d.IRange.Direction.Down||(B=d.IRange.Orientation.Column),k!==d.IRange.Direction.Left&&k!==d.IRange.Direction.Up||(Q=!0),i.getSelection().traverse(B,Q)},[i]),q=o.useCallback((k,B)=>{if(l)return l(k,B);if(!i)return null;const{ref:Q,...oe}=k;return c.jsx(hr,{ref:Q,...oe,sheet:i,bodyStyle:a?.body,activeCoords:B,commands:s,onChangeEdit:be=>{const me={sheet:i,coords:B,editState:be};y.setMode(ze=>({...ze,description:me.editState.editMode?"Edit":"Enter",args:{...ze?.args,stateAndCoords:me}}))},editState:m.editState})},[i,P,l,m,T]),{overlay:K,startEdit:D,submitEdit:O,cancelEdit:W,onKeyboardEventNative:ge,onPointerEventNative:_}=ht.useKeyboardEditorOverlay({view:n,activeCoords:b,getCellEditor:q,canEdit:()=>{const k=i.getProtection();if(k.isReadOnly())return!1;const B=k.isLocked();return B&&f(),!B},onBeforeStartEdit:k=>{const B=mr(()=>i.getRange(k).getCell()),Q={sheet:i,coords:k,editState:Object.freeze(B)};y.setMode({key:"edit",args:{stateAndCoords:Q}}),M(Q)},onStartEdit:k=>{N(k),h(k)},onSubmitEdit:j,onCancelEdit:k=>{N(null),M(null),y.setMode(null),h(null)},onDoneEdit:k=>{y.setMode(null)},onNavigate:A,containerProps:P,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:i?.getSelection().getCoords().ranges?.length>1?1:2,alignment:V,getRangeCoords:v});et(i.getSelection(),{onChange(k){w(i.getSelection().getCoords().cell)}});const U=r.useCallbackRef(k=>{_(k),T&&O()},[_,W,T]),z=o.useCallback(k=>{_(k)},[_]),F=o.useCallback(k=>{ge(k)},[ge]);return o.useEffect(()=>{const k=n?.getStage();if(k)return k.addEventListener("pointerdown",U),k.addEventListener("dblclick",z),k.addEventListener("keydown",F),()=>{k.removeEventListener("pointerdown",U),k.removeEventListener("dblclick",z),k.removeEventListener("keydown",F)}},[n?.getStage()]),o.useEffect(()=>{const k=y.getMode(),B=k?.key;B==="edit"||B==="enter"?m?k.args?.cancel?W():k.args?.submit?O():M(k.args?.stateAndCoords):D(k.args?.start):T&&W()},[y]),K(n,t)})),Rr="white",kr="black",ni=`url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg' %3E%3Cg%3E%3Cpath d='m 14.5,8 -5.6875,5.6875 v -3.25 H 1.5 v -4.875 h 7.3125 v -3.25 z' stroke='${kr}' fill='${Rr}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,oi=`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='${kr}' fill='${Rr}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,ri=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i}=e,[a,l]=o.useState(i.getTables().getCount()>0),[f,h]=o.useState(null),[s,y]=o.useState(null),[b,w]=o.useState(null),[m,M]=o.useState(null),T=r.useCallbackRef(()=>{if(i.getTables().getCount()>0){l(!0);const v=i.getTables().getItems({address:n.getVisibleRangeCoords()});h(v.length>0?v:null)}else l(!1),h(null)},[i,n]),N=r.useCallbackRef(v=>{v.preventDefault(),v.stopPropagation();const A=n.getCellCoordsFromClient(v.clientX,v.clientY),q=i.getTables().getItems({address:A});q.length===1&&q[0].select()},[n,i]),P=r.useCallbackRef(v=>{v.preventDefault(),v.stopPropagation();const A=n.getCellCoordsFromClient(v.clientX,v.clientY),q=i.getTables().getItems({address:A});if(q.length===1){const K=q[0].getRange().getCoords(),D={colStart:K.colStart,rowStart:A.rowIndex,colEnd:K.colEnd,rowEnd:A.rowIndex};i.getRange(D).select()}},[n,i]),$=r.useCallbackRef(()=>{if(!a)return;const v=i.getTables().getItems({address:n.getVisibleRangeCoords()});h(v.length>0?v:null)},[i,a,n]);et(i?.getSelection(),{onChange(v){y(i.getSelection().getCoords().cell)}}),et(b,{onAnyChange(v){T(),$()}}),et(m,{onAnyChange(v){$()}}),et(i,{onTablesChange(v){T(),$()},onInvalidated(v){T(),$()}});const V=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle($,300),300),[]);o.useEffect(()=>{V()},[n]),o.useEffect(()=>{let v=null;if(f)for(let A=0;A<f.length&&!v;A++){const q=f[A],K=q.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,K)&&(v=q)}w(v)},[s,f]);const S=r.useCallbackRef(v=>{let A=null;if(f)for(let q=0;q<f.length;q++){const K=f[q],D=K.getRange().getCoords();let O=n.getRangeCoordsBounds(D);const W=n.getRelativePointFromClient(v.clientX,v.clientY),ge=W.x,_=W.y;if(ge>=O.x&&ge<=O.x+O.width&&_>=O.y&&_<=O.y+O.height){const U=n.getViewportSize();ge<=0||_<=0||ge>=U.width||_>=U.height||(A=K)}}M(A)},[n,f]);if(o.useEffect(()=>{const v=n?.getStage();if(v&&f)return v.addEventListener("mousemove",S),v.addEventListener("mouseleave",S),()=>{v.removeEventListener("mousemove",S),v.removeEventListener("mouseleave",S)}},[f,n?.getStage()]),!n||!f||f.length===0)return null;const j=[];for(let v=0;v<f.length;v++){const A=f[v];if(A.isClosed())continue;const q=A===m,K=A===b,D=A.getRange().getCoords(),O=n.getRangeCoordsBounds(D);let W;if(q||K){const ge=A.getStyle().getProperties(),_=ge.headerRow?.fill?.background??ge.wholeTable?.border?.top?.color?.toString();if(_&&i){const U=i.getStyles().parseColor(_);U&&(W=U.toCSS())}W||(W="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}j.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:O.height,pointerEvents:"all",cursor:ni},onMouseDown:P},`table-select-row-${A.getName()}`)),j.push(c.jsx("div",{style:{position:"absolute",left:O.x,top:O.y,width:Math.min(16,O.width),height:Math.min(16,O.height),pointerEvents:"all",cursor:oi},onMouseDown:N},`table-select-${A.getName()}`)),j.push(c.jsx(ht.Selection,{x:O.x,y:O.y,width:O.width,height:O.height,range:D,strokeWidth:K?.5:0,stroke:W??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:q?`${W} 0px 0px 1px 1px`:void 0}},`table-outline-${A.getName()}`))}return j})),li=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:i,animationTime:a=60}=e,[l,f]=o.useState(null),[h,s]=o.useState(null),y=o.useRef(null),b=r.useCallbackRef(()=>{const P=i.getSelectedCell(),$=P.getSpill()?.getCoords()??null;he.CoordUtils.isEqualRanges($,l)||(s($?{transition:l?"move":"in",bounds:n.getRangeCoordsBounds($),coords:$}:{transition:"out",bounds:n.getRangeCoordsBounds(l),coords:l}),f($))},[i,n,l]);o.useEffect(()=>(y.current&&(clearTimeout(y.current),y.current=null),h&&(y.current=setTimeout(()=>{s(null),y.current=null},a)),()=>{y.current&&(clearTimeout(y.current),y.current=null)}),[h,a]);const w=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle(b,80),80),[]);if(et(i?.getSelection(),{onChange(P){w()}}),et(i,{onSpillsChange(P){b()},onInvalidated(P){b()}}),!n||!l&&!h)return null;const m=i.getRange(l).getValue()instanceof d.FormulaError.Spill,M=[];let T=h?.bounds??n.getRangeCoordsBounds(l);if(h&&!he.CommonUtils.isEqualBounds(h.bounds,n.getRangeCoordsBounds(h.coords))&&s(null),T=n.toClipBounds(T,-10),!T)return;const N="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return M.push(c.jsx(ht.Selection,{x:T.x,y:T.y,width:T.width,height:T.height,range:l,strokeWidth:1,stroke:N,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:m?"6 3":void 0,opacity:h?.transition==="out"?0:1,transition:h?.transition?h.transition==="in"||h.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:`${N} 0px 0px 4px 0px`}},"spill-outline}")),M})),ii={position:"absolute",top:0,left:0,bottom:0,right:0},Vo=(e,t)=>{const n={...e},i=t?.getNormal().getFont(),a=i?.toCSS(),l={text:{fontFamily:a?.fontFamily,fontSize:i?.getSize()}},f=n.body=he.CommonUtils.mergeContentful(e.body,l);return n.body=he.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},f),n.buttonSurface=he.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=he.CommonUtils.mergeContentful(n.body,{edgeStrokeFill:"rgb(171, 171, 171)",fill:"#f0f0f0",strokeShadow:void 0,edgeStrokeWidth:1},e.header),n.header=he.CommonUtils.mergeContentful(n.header,l),n.headerSelect=he.CommonUtils.mergeContentful(n.header,{fill:"rgba(16, 124, 65, 0.1)",text:{fill:n.headerSelection.strokeFill,fontWeight:"700"}},e.headerSelect),n.headerSelect=he.CommonUtils.mergeContentful(n.headerSelect,l),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelectAll,l),n},ai={fireOnModelChange:!1},Uo={},Mr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:i=Uo,headersStyle:a=Uo,onSheetContextMenu:l,showColumnHeaders:f,columnHeaderProps:h,showRowHeaders:s,rowHeaderProps:y,showScrollbars:b=!0,scrollPaneProps:w,onViewportChange:m,commands:M,onRepeatCommandChange:T,onMoveCell:N,overlays:P,renderMovable:$,viewportComponent:V,onElementLoad:S,getCellEditor:j,onFocus:v,onBlur:A,style:q=r.ReactUtils.EmptyCssProperties,onShowTooltip:K,onShowColumnTooltip:D,onShowRowTooltip:O,onCloseTooltip:W,gridProps:ge,cellRenderProps:_,...U}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[z,F]=o.useReducer(X=>X+1,0),[k,{width:B,height:Q}]=Xt(),oe=r.useCallbackRef(K,[K]),be=r.useCallbackRef(D,[D]),me=r.useCallbackRef(O,[O]),ze=r.useCallbackRef(W,[W]),je=o.useRef(!1);o.useLayoutEffect(()=>{je.current=!0},[n]);const De=n?.getStyles(),fe=o.useMemo(()=>Vo(i,De),[i,De]),Ve=o.useMemo(()=>Vo(a,De),[a,De]),{body:Y={},buttonSurface:Z={}}=fe,{header:de={},headerSelect:ke={},headerSelectAll:Ce={}}=Ve,H=o.useRef(null),[ee,ce]=o.useState(()=>n?.getView()),le=(ee?.getZoomScale()??100)/100,Re=o.useMemo(()=>({vertical:ee.isShowColumnGridlines()&&le>=.4,horizontal:ee.isShowRowGridlines()&&le>=.4}),[ee?.isShowColumnGridlines(),ee?.isShowRowGridlines(),le]),ie=o.useMemo(()=>{if(ee?.getGridLineColor())return{strokeDasharray:"1,1"}},[ee?.getGridLineColor(),fe]),ve=f??ee?.isShowColumnHeaders(),Ae=s??ee?.isShowRowHeaders(),[xe,Oe]=o.useState({width:0,height:0}),Be=o.useMemo(()=>{let X=40,Se=20;const We=n?.getStyles().getNormal().getFont();if(xe.width>0&&xe.height>0){const Ue=We?.toCSS()?.fontFamily??fe.header.text.fontFamily,Ze=We?.getSize()??fe.header.text.fontSize,Ge=d.IFont.getSharedMeasurer()(""+xe.height,Math.ceil(Ze*d.IFont.getDeviceScale()),Ue);X=Ge.width,Se=Ge.lineHeight}return{width:Math.round(X+5),height:Math.round(Se+3)}},[xe,fe?.header.text,n]),p=Ae?le*Be.width:de.edgeStrokeWidth,Pe=ve?le*Be.height:de.edgeStrokeWidth,tt=Math.max(B,(n?.getColumnHeaders().getDefaultSize()??Be.width)+p+1),te=Math.max(Q,(n?.getRowHeaders().getDefaultSize()??Be.height)+Pe+1),Me=o.useRef(new Map),Ne=o.useRef(null),Fe=()=>({getColOffset:X=>n.getColumnHeaders().findOffset(X),getColIndex:X=>n.getColumnHeaders().findIndex(X),getRowOffset:X=>n.getRowHeaders().findOffset(X),getRowIndex:X=>n.getRowHeaders().findIndex(X)}),[Ee,I]=o.useState(()=>Fe()),[J,L]=o.useState(!1),[G,qe]=o.useState(null),ye=!0,g=fe.selection?.strokeFill,C=o.useCallback(()=>At.current,[]),[R,u]=o.useState(),x=r.useCallbackRef(X=>{u(X);const Se=n?n.getView():null;Se&&Se.setTopLeft(X?{left:X.left,top:X.top}:null),m?.(X)},[n,m]),E=o.useRef(null);o.useEffect(()=>{if(!R||!n)return;const X=n.getRangeAtBounds({x:R.left,y:R.top,width:R.width,height:R.height});E.current?.(),E.current=X.addListener(()=>{const Se=X.getCoords();H?.current?.invalidate(Se)})},[R,n]);const[re,pe]=o.useState(()=>n?.getView().getTopLeft()),se=r.useCallbackRef(X=>{const Se=he.CoordUtils.cellToRange(X);if(n.isClosed())return Se;const We=n.getRange(Se,{ignoreHidden:!0}).getMerges();return We.length===0?Se:We[0]},[n]),ne=X=>{if(!X||X.coords.colIndex===0&&X.coords.rowIndex===0)return null;const Se={};return X.coords.colIndex>0&&(Se[he.AnchorLocation.Left]={index:X.coords.colIndex,scrollOffset:X.topLeft.left}),X.coords.rowIndex>0&&(Se[he.AnchorLocation.Top]={index:X.coords.rowIndex,scrollOffset:X.topLeft.top}),Se},[ae,ue]=o.useState(()=>ne(n.getView().getFreezePanes())),we=r.useEditMode(),He=o.useCallback(()=>H.current,[]),Te=r.useCallbackRef(X=>{we.setMode(Se=>Se?.key==="edit"?{...Se,args:{...Se.args}}:{key:"edit",args:{stateAndCoords:null,start:X}})},[]),Ie=r.useCallbackRef(()=>R,[R]),Ke=br({sheet:n,commands:M,target:He,onRepeatCommandChange:T,bodyStyle:Y,onStartEdit:Te,getViewport:Ie}),[_e,$e]=o.useState(n.getSelection().isEntire()),[Ye,Je]=o.useState(ee?.getMovableSelection().length>0),Le=G!==null||Ye,Xe=null,[vt,nt]=o.useState(!1);o.useEffect(()=>{nt(!1)},[n.getProtection()]);const at=r.useNotifier(),Tt=r.useCallbackRef(()=>{vt||(nt(!0),at.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.NotifierType.Error}))},[at,vt]),kt=o.useMemo(()=>{const X=we.getMode();return X?.cursor?X.cursor:null},[Xe,we]),[yt,wt]=o.useState(null),ct=o.useRef(!1),[rt,Rt]=o.useState([]),ft=o.useRef(null),[Ct,zt]=o.useState(he.TypesUtils.EmptyTopLeft),[qt,Kt]=o.useState(he.TypesUtils.EmptyTopLeft);o.useEffect(()=>{zt({left:re?.left,top:0})},[re?.left]),o.useEffect(()=>{Kt({left:0,top:re?.top})},[re?.top]),et(n?.getView(),{onFreezeSplitChange:()=>{ue(ne(n.getView().getFreezePanes()))},onTopLeftChange:()=>{pe(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Je(n.getView().getMovableSelection().length>0)}}),et(n?.getSelection(),{onChange:()=>{$e(n.getSelection().isEntire())}}),et(n,{onViewChange(){ce(n.getView()),I(Fe())},onLayoutChange:()=>{const X=n.getEntireRange();Oe({height:X.getRowCount(),width:X.getColumnCount()}),I(Fe())},onStyleChange:()=>{jt()},onMovablesChange:()=>{},onInvalidated:()=>{jt()}}),et(n,{onRequestScrollIntoView:async(X,Se)=>{if(!Se)return;const We={colIndex:Se?.coords?.colStart,rowIndex:Se?.coords?.rowStart};return await H.current?.scrollCellCoordsIntoView(We,Se?.scroll),!0},onRequestFocus:()=>he.CommonUtils.whenFocus(At.current)},ai);const ut=o.useRef(!1),Nt=o.useMemo(()=>{const X=he.CommonUtils.debounce(Ue=>{requestAnimationFrame(()=>{ct.current&&be?.(Ue)})},32),Se=(Ue,Ze)=>{ct.current=!0,wt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:0,rowEnd:xe.height,colStart:Ue,colEnd:Ue})))return;const st=Ge.getLayout(),it=Math.max(0,st.getColOffset(Ue)),lt=Ge.getBounds(),St=Math.min(lt.x+lt.width,st.getColOffset(Ue+1)),Dt=Ge.getAnchor();if(Ze!==null&&(Dt===he.AnchorLocation.Left||Dt===he.AnchorLocation.Center||Dt===he.AnchorLocation.Right)){const to=he.CommonUtils.roundAccurately(Ze*he.CommonUtils.getDPI(),0),Sn=he.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ze/le),2).toFixed(2),no="Width: "+(Ze?Sn+" ("+to+" pixels)":"Hidden"),on=Gn.current.getGridElement().getRelativePointFromClient(0,0),Gt=0-on.y,Rn=0-on.y+Pe,oo=on.x-lt.x;X({anchor:{x:it-oo,y:Gt,width:St-it,height:Rn-Gt},display:no})}const Bt=[0,0,0,lt.height],Yn={style:{boxShadow:`0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},Jn={x:it-1,y:0,width:1,height:lt.height},Qn={style:{boxShadow:`-0.5px 0px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},eo={x:St-1,y:0,width:1,height:lt.height};return c.jsxs(o.Fragment,{children:[c.jsx(ht.SVGLine,{linePoints:Bt,bounds:Jn,...Yn}),c.jsx(ht.SVGLine,{linePoints:Bt,bounds:eo,...Qn})]},"resize-dividers")}])};let We=null;return{onResizeHeadersStart:(Ue,Ze,Ge)=>{We=n.beginCommit(Ge),ut.current=!1,Se(Ue,Ze)},onResizeHeaders:(Ue,Ze,Ge)=>{ut.current=!1,Se(Ue,Ze)},onResizeHeadersDown:(Ue,Ze)=>{ut.current=!0,setTimeout(()=>{ut.current&&Se(Ue,Ze)},360)},onResizeHeadersEnd:(Ue,Ze,Ge)=>{We?.commit({description:Ge}),We=null,ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},onResizeHeadersUp:Ue=>{ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},...h}},[n,h,Pe,yt]),tn=o.useMemo(()=>{const X=he.CommonUtils.debounce(Ue=>{requestAnimationFrame(()=>{ct.current&&me?.(Ue)})},32),Se=(Ue,Ze)=>{ct.current=!0,wt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:Ue,rowEnd:Ue,colStart:0,colEnd:xe.width})))return;const st=Ge.getLayout(),it=Math.max(0,st.getRowOffset(Ue)),lt=Ge.getBounds(),St=Math.min(lt.y+lt.height,st.getRowOffset(Ue+1)),Dt=Ge.getAnchor();if(Ze!==null&&(Dt===he.AnchorLocation.Top||Dt===he.AnchorLocation.Center||Dt===he.AnchorLocation.Bottom)){const to=Math.floor(10*he.CommonUtils.getDPI())/10,Sn=he.CommonUtils.roundAccurately(Ze*to,0),no=he.CommonUtils.roundAccurately(Sn/le/(n?.getRowHeaders().getScaleFactor()*he.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ze?no+" ("+Sn+" pixels)":"Hidden"),Gt=$t.current.getGridElement().getRelativePointFromClient(0,0),Rn=0-Gt.x,oo=0-Gt.x+p,ml=Gt.y-lt.y;X({anchor:{x:Rn,y:it-ml,width:oo-Rn,height:St-it},display:on})}const Bt=[0,0,lt.width,0],Yn={style:{boxShadow:`0px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},Jn={x:0,y:it-1,width:lt.width,height:1},Qn={style:{boxShadow:`0px -0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:g}},eo={x:0,y:St-1,width:lt.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(ht.SVGLine,{linePoints:Bt,bounds:Jn,...Yn}),c.jsx(ht.SVGLine,{linePoints:Bt,bounds:eo,...Qn})]},"resize-dividers")}])};let We=null;return{onResizeHeadersStart:(Ue,Ze,Ge)=>{We=n.beginCommit(Ge),ut.current=!1,Se(Ue,Ze)},onResizeHeaders:(Ue,Ze,Ge)=>{ut.current=!1,Se(Ue,Ze)},onResizeHeadersDown:(Ue,Ze)=>{ut.current=!0,setTimeout(()=>{ut.current&&Se(Ue,Ze)},360)},onResizeHeadersEnd:(Ue,Ze,Ge)=>{We?.commit({description:Ge}),We=null,ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},onResizeHeadersUp:Ue=>{ut.current=!1,requestAnimationFrame(()=>ze?.()),ct.current=!1,wt(null)},...y}},[n,y,p]),At=r.useImperativeElement(t,()=>{const X=We=>{n?.getView()&&n.getView().selectMovables([]),Ne.current=null,H?.current?.focus(We)},Se=async(We=null)=>{if(We||(We=n?.getView().getMovableSelection()[0]),!We)return!1;const Ue=We.getAnchorCoords();if(!Ue)return!1;const Ze=H.current?.getViewFromCellCoords({colIndex:Ue.colStart,rowIndex:Ue.rowStart});if(!Ze)return!1;const Ge=Ze.getAnchor();n?.getView().getMovableSelection().indexOf(We)===-1&&n?.getView().selectMovables([We]);let st=Me.current?.get(Ge);return st?.current?(await st.current.focusMovable(We),!0):(Ne.current={movable:We,anchor:Ge},!0)};return{getGridElement:()=>H.current,getRowHeaderElement:()=>$t.current,getColumnHeaderElement:()=>Gn.current,rowHeaderHeight:()=>Pe,colHeaderWidth:()=>p,startEdit:Te,submitEdit:()=>{we.setMode(We=>We?.key!=="edit"?We:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{we.setMode(We=>We?.key!=="edit"?We:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:G!==null,focus:We=>{n?.getView().getMovableSelection().length>0&&Se()||X(We)},focusSheet:X,focusMovable:Se,contains:We=>H?.current?.contains?.(We),invalidate:jt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),jt=o.useCallback(X=>{je.current||(H?.current?.invalidate(X),F?.())},[]);o.useEffect(()=>{jt()},[fe]);const vn=_e?Ce.edgeStrokeFill:de.fill,ot=_e?ke.fill:typeof fe.headerHover=="function"?fe.headerHover(de)?.fill:de.fill,Cn=o.useMemo(()=>V?c.jsx("div",{className:dt("sheetxl-viewport-overlay",kl),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:V}):c.jsx(c.Fragment,{}),[V]);let Wt=null;ve&&Ae&&(Wt=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Pe}px`,width:`${p}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:X=>{let Se=!X.ctrlKey;Ke?.getCommand("selectAll")?.execute(!Se||X.button!==0),X.nativeEvent.which===r.MouseButtonCodes.Right?l?.({originalEvent:X,clientX:X.clientX,clientY:X.clientY,rowIndex:-1,colIndex:-1}):H.current?.focus()},children:[c.jsx("div",{style:{height:Pe-5+"px",width:Pe-5+"px",clipPath:`path('M${Pe-5} 0 L0 ${Pe-5} L${Pe-5} ${Pe-5} L${Pe-5} 0 Z')`,borderRight:`2px solid ${vn}`,borderBottom:`2px solid ${vn}`,background:`${ot}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${Pe}px`,width:`${p}px`,boxSizing:"border-box",borderRight:`solid 1px ${de.strokeFill}`,borderBottom:`solid 1px ${de.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:X,_top:Se})=>{},[]),gt=r.useCallbackRef(X=>{if(!l)return;const Se=H.current.getViewFromClient(X.clientX,X.clientY)?.getCellCoordsFromClient(X.clientX,X.clientY);Se&&(l({originalEvent:X,clientX:X.clientX,clientY:X.clientY,rowIndex:Se.rowIndex,colIndex:Se.colIndex}),X.stopPropagation(),X.preventDefault())},[l]),bt=r.useCallbackRef(X=>{if(!(!X.shiftKey&&(X.ctrlKey||X.metaKey)))return;const{deltaY:Se}=X;return Se>0?Ke.getCommand("sheetZoomOut")?.execute():Se<0&&Ke.getCommand("sheetZoomIn")?.execute(),Se===0},[Ke]);o.useEffect(()=>{Rt(null),ft.current=null,ct.current=!1,wt(null);const X=n?.getView().getTopLeft();nn(X),H.current?.scrollTo(X),pe(X),ce(n.getView()),ue(ne(n.getView().getFreezePanes())),I(Fe()),F()},[n?.getView()]);const yn=o.useCallback((X,Se)=>n.getRowHeaders().hiddenHeadersAt(X,Se),[n]),wn=o.useCallback((X,Se)=>n.getColumnHeaders().hiddenHeadersAt(X,Se),[n]),Ot=r.useCallbackRef(X=>{const Se=X.getVisibleRangeCoords();if(!Se)return null;const We=[];return n.getRange(Se).forEach((Ue,Ze)=>{const Ge=Ze.getCoords(),st=Ze.getCell();(it=>{if(it.isEmpty())return!1;const lt=it.getSpans();if(lt.width>1||lt.height>1||it.getStyle().hasVisibleStyling()||ee.isShowFormulas()&&it.getFormula()!==null)return!0;const St=it.getValue();return St!==null&&!(!ee.isShowZeros()&&St===0&&it.getType()===d.ScalarType.Number)})(st)&&We.push({coords:Ge,value:st,range:ee.isShowFormulas()?null:st.getExtrusions()})},{ignoreHidden:!0,includeMergeOverflow:!0}),We},[n,ee.isShowZeros(),ee.isShowFormulas(),G]);o.useEffect(()=>{const X=[];P&&X.push(...P),yt&&X.push(...yt),he.CommonUtils.isEqualArrays(X,ft.current)||(ft.current=X,Rt(X))},[P,yt,fe]);const bn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${i?.body?.fill}`},pathProps:{stroke:i?.body?.text?.fill??"black"}}),[fe?.header?.edgeStrokeFill]),$n=r.useCallbackRef(X=>{X.isDefaultPrevented()||X.isPropagationStopped()||(Ne.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),xn=o.useMemo(()=>{const X=we.getMode();return X?.key==="cut"||X?.key==="copy"},[we]),qn=r.useCallbackRef(async X=>{const Se=we.getMode();return X.keyCode===r.KeyCodes.Escape&&Se?(X.preventDefault(),void we.setMode(null)):X.keyCode===r.KeyCodes.Enter&&xn?(X.preventDefault(),await Ke?.getCommand("paste")?.execute(),void we.setMode(null)):void Ke?.dispatchToFocusedCommand(X)},[Ke,we]),$t=o.useRef(null),il=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Pe+1}px`,width:`${p+de.edgeStrokeWidth}px`,minWidth:`${p+de.edgeStrokeWidth}px`,borderRight:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,height:`calc(100% - ${Pe}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Oo,{ref:$t,sheetElement:At.current,gridRef:H,freezeStart:ae?.[he.AnchorLocation.Top],oppositeSize:p,containerWidth:p,containerHeight:te,sheetHeader:n.getRowHeaders(),gridStyle:Ve,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:qt,onSheetContextMenu:l,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Pe+1}px`,width:`${p+de.edgeStrokeWidth}px`,minWidth:`${p+de.edgeStrokeWidth}px`,borderRight:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,height:`calc(100% - ${Pe}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[p,Pe,te,n,qt,ae?.[he.AnchorLocation.Top],fe,ye,l,de.fill,y]),Gn=o.useRef(null),al=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Pe+de.edgeStrokeWidth}px`,minHeight:`${Pe+de.edgeStrokeWidth}px`,borderBottom:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Oo,{ref:Gn,sheetElement:At.current,gridRef:H,freezeStart:ae?.[he.AnchorLocation.Left],oppositeSize:Pe,containerWidth:tt,containerHeight:Pe,sheetHeader:n.getColumnHeaders(),gridStyle:Ve,scrollPoint:Ct,onSheetContextMenu:l,...Nt,style:{...Nt?.style,position:"relative",left:"0px",width:"100%",height:`${Pe+de.edgeStrokeWidth}px`,minHeight:`${Pe+de.edgeStrokeWidth}px`,borderBottom:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Pe,tt,n,Ct,ae?.[he.AnchorLocation.Left],fe,de.fill,ye,l,h]),sl=r.useCallbackRef(X=>{const{value:Se,key:We,...Ue}=X;let Ze=Se,Ge=G;if(!Ge||Ge.colIndex===X.coords.colIndex&&Ge.rowIndex===X.coords.rowIndex||(Ge=null),!Ze){const lt=X.range;if(Ze=n.getRange({rowIndex:lt.rowStart,colIndex:lt.colStart}).getCell(),Ze.isEmpty())return null}let st=null;Ze.getHyperlink()&&(st=async lt=>{if(_?.onLinkMouseDown?.(lt),lt.button===0&&!lt.isDefaultPrevented()){lt.stopPropagation(),lt.preventDefault();try{await Ze.getHyperlink()?.open()}catch(St){at.showError?.(St)}}}),Ge&&Ge.colIndex===X.range.colStart&&Ge.rowIndex===X.range.rowStart&&(Ze=Ze.createTemporaryCell({value:null}));const it=n.getStyles();return o.createElement(gr,{...Ue,key:We,bodyStyle:Y,docTheme:it.getTheme(),normalStyle:it.getNormal(),showFormulas:ee.isShowFormulas(),showZeros:ee.isShowZeros(),onLinkMouseDown:st,..._,value:Ze})},[n,Ee,Y,G,ee?.isShowFormulas(),ee.isShowZeros()]),cl=o.useCallback((X,Se)=>{const{key:We,...Ue}=X;return[c.jsx(zl,{ref:Se,getVisibleCells:Ot,sheet:n,gridStyle:fe,...Ue},`border-${We}`),c.jsx(ri,{ref:Se,sheet:n,commands:Ke,...Ue},`table-${We}`),c.jsx(li,{ref:Se,sheet:n,...Ue},`spill-${We}`),c.jsx(Zl,{ref:Se,sheet:n,commands:Ke,onShowTooltip:oe,onCloseTooltip:ze,gridStyle:fe,gridRef:H,editingCoords:G,isActive:ye,...Ue},`selection-${We}`),c.jsx(Vl,{ref:Se,sheet:n,commands:Ke,gridStyle:fe,element:C,...Ue},`copy-paste-${We}`),c.jsx(ei,{ref:Se,sheet:n,commands:Ke,target:He,renderMovable:$,movableProps:{onUnFocus:()=>{At.current.focus()}},...Ue},`movable-${We}`),c.jsx(ti,{ref:Se,sheet:n,commands:Ke,gridStyle:fe,getCellEditor:j,showProtectedError:Tt,setEditingCoords:qe,...Ue},`editor-${We}`)]},[n,H.current,fe,j,Ke,at]),[Eo,dl]=o.useState(!1),ul=o.useMemo(()=>{if(tt===0||te===0)return null;const X=n.getStyles().getNormal(),Se=X.getFont(),We=X.getFill(),Ue=X.getBorder(),Ze=X.getFill().getType()===d.IFill.Type.None;let Ge=ie,st=ie;const it=(St,Dt,Bt)=>Bt?{stroke:Ue.getBottom().isNone()?"none":St.getColor().toRGBA(Y.darkMode).toString(),...Dt}:Dt;st=it(Ue.getBottom(),st,!Ue.getBottom().isNone()),st=it(Ue.getTop(),st,!Ue.getTop().isNone()),Ge=it(Ue.getRight(),Ge,!Ue.getRight().isNone()),Ge=it(Ue.getLeft(),Ge,!Ue.getLeft().isNone());let lt=ee?.getGridLineColor()?.toRGBA(Y.darkMode).toString()??Y.strokeFill;return Ze||(st=it(Ue.getBottom(),st,!0),st=it(Ue.getTop(),st,!0),Ge=it(Ue.getRight(),Ge,!0),Ge=it(Ue.getLeft(),Ge,!0)),c.jsx(ht.Grid,{className:"sheetxl-sheet-primary",style:{...ii,...We.toCSS(Y.darkMode),...Se.toCSS(Y.darkMode,le),"--sxl-app-color-background":Y.fill,"--sxl-app-color-shadow":fe.colorShadow,"--sxl-app-color-grey":fe.colorGrey,"--sxl-app-color-button-fill":Z.fill,"--sxl-app-color-button-text":Z.text?.fill,"--sxl-app-color-button-border":Z.edgeStrokeFill,"--sxl-app-color-primary-dark":fe.selection.strokeFill},ref:H,zoom:le,...ge,onFirstRender:St=>{dl(!0),ge?.onFirstRender?.(St),Ke?.activate()},showGridLines:Re,gridLineColor:lt,gridLineColumnsProps:Ge,gridLineRowsProps:st,freezeLeft:ae?.[he.AnchorLocation.Left],freezeLeftProps:bn,freezeTop:ae?.[he.AnchorLocation.Top],freezeTopProps:bn,width:tt,height:te,columnCount:xe.width,rowCount:xe.height,cursor:kt??Xe??"cell",clipCells:!0,layout:Ee,cellRenderer:sl,overlayRenderer:cl,getCellCoordsAsRangeCoords:se,hiddenRowsAt:yn,hiddenColumnsAt:wn,getVisibleCells:Ot,onWheelScroll:bt,onPointerDown:$n,onKeyDown:qn,onViewportChange:x,onImmediateScroll:nn,scrollPoint:re,stageProps:{onFocus:()=>{Ke?.activate()}},overlays:rt})},[z]);o.useEffect(()=>{je.current||F()},[Ee,ae,le,Ke,re?.left,re?.top,Y,ge,tt,te,kt,rt,ye,Xe]);let _n={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};b||(_n={..._n,...q});const gl=o.useMemo(()=>{const X=n.getStyles().getTheme(),Se=X.getColorScheme(),We=X.getFontScheme();return{"--sxl-doc-color-dk1":Se.getDk1().toCSS(Y.darkMode),"--sxl-doc-color-dk2":Se.getDk2().toCSS(Y.darkMode),"--sxl-doc-color-lt1":Se.getLt1().toCSS(Y.darkMode),"--sxl-doc-color-lt2":Se.getLt2().toCSS(Y.darkMode),"--sxl-doc-color-accent1":Se.getAccent1().toCSS(Y.darkMode),"--sxl-doc-color-accent2":Se.getAccent2().toCSS(Y.darkMode),"--sxl-doc-color-accent3":Se.getAccent3().toCSS(Y.darkMode),"--sxl-doc-color-accent4":Se.getAccent4().toCSS(Y.darkMode),"--sxl-doc-color-accent5":Se.getAccent5().toCSS(Y.darkMode),"--sxl-doc-color-accent6":Se.getAccent6().toCSS(Y.darkMode),"--sxl-doc-color-hlink":Se.getHlink().toCSS(Y.darkMode),"--sxl-doc-color-fol-hlink":Se.getFolHlink().toCSS(Y.darkMode),"--sxl-doc-font-major":We.getMajorFont(),"--sxl-doc-font-minor":We.getMinorFont()}},[n.getStyles().getTheme()]),Fo=r.useCallbackRef(X=>{const{style:Se,...We}=X;return c.jsx(bo,{...We,style:{paddingLeft:"4px",paddingRight:"4px",...Se},sheet:n})},[n]);let Zn=c.jsx("div",{style:_n,onTouchStart:()=>{Ao()},onFocus:X=>{L(!0),v?.(X)},onBlur:X=>{L(!1),A?.(X)},ref:At,...U,children:c.jsx("div",{className:dt("sheetxl-sheet",Rl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...gl},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Wt,il,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[al,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${de.edgeStrokeWidth}px ${de.edgeStrokeFill}`,backgroundColor:Y.fill},ref:k,onContextMenu:gt,children:[ul,Cn,c.jsx(Ml,{style:{position:"absolute",right:24,bottom:4},colorLicensee:fe?.selection?.strokeFill,colorCredits:fe?.body?.text?.fill})]})]})]})})});b&&(Zn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${de.fill}`,minHeight:2*Be.height,minWidth:2*Be.width,...q},viewport:R,touchElement:H.current?.stage,disableTouch:Le,onScrollViewport:X=>{H.current?.scrollTo(X)},createHorizontalScrollbar:Fo,createVerticalScrollbar:Fo,...w,children:Zn})),o.useEffect(()=>{je.current=!1,F?.(),J&&At.current?.focus()},[n]);const[Xn,hl]=o.useState(!1),Ao=r.useCallbackRef(()=>{Xn||hl(!0)},[Xn]);return o.useEffect(()=>{if(Eo)return typeof S=="function"&&S(),r.ReactUtils.detectIt().primaryInput==="touch"&&Ao(),()=>{}},[S,Eo,Xn]),Zn}));Mr.displayName="SheetElement";const Ko="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=",Tr=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,style:a,picture:l,description:f,isDragging:h,view:s,onHide:y,onShow:b,onKeyDownCapture:w,onFocus:m,onBlur:M,loadingPanel:T,...N}=e,[P,$]=o.useState(!1),[V,S]=o.useState(null),[j,v]=o.useState(null),[A,q]=o.useState(null);o.useEffect(()=>{v(null),l.getDetails().then(O=>{$(!1),v(O.asUrl()),O.asSVGText?.()&&q(O.asSVGText())}).catch(O=>{console.warn(O),$(!0),v(Ko),q(null)})},[l]);const K=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),D=o.useMemo(()=>{if(j||A)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:P?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:P?"var(--sxl-app-color-background, white)":void 0,boxShadow:P?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:P?"contain":void 0,opacity:V?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:j,onLoad:()=>{S(!0)},onError:({currentTarget:O})=>{console.log("error"),O.onerror=null,v(Ko),$(!0)},alt:f??`${l.getType()}`})},[V,l,j,A,h]);if(!l.isClosed())return c.jsxs("div",{className:"picture-editor",style:{position:"relative",display:"flex",flex:"1 1 100%",filter:h?"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,...N,onKeyDownCapture:O=>{w?.(O)},ref:K,children:[V||P?void 0:T,D]})}));Tr.displayName="PictureEditor";const si=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:i,chart:a,view:l,isDragging:f,onHide:h,onShow:s,...y}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[w,{height:m,width:M}]=Xt();if(!a.isClosed())return c.jsx("div",{...y,ref:Ut([b,w]),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:f?"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()})})})})),ci="_editable-input_1bqx6_6",di=e=>c.jsx("input",{...e}),Ir=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:i,value:a="",onSubmit:l,onChange:f,onCancel:h,createInput:s=di,styleHover:y={},dragging:b,maxLength:w,disabled:m=!1,readOnly:M=!1,...T}=e,[N,P]=o.useState(!1),[$,V]=o.useState(!1),[S,j]=o.useState(a);o.useEffect(()=>{j(a)},[a]);const v=o.useRef(null),[A,q]=o.useState(null),K=r.useNotifier(),D=o.useCallback(function(F){const k=F.message;A!==k&&(K?.showMessage?.(k,{type:r.NotifierType.Error}),q(k))},[K,A]),O=o.useCallback(F=>{let k=!1;try{k=l?.(F)??!0}catch(B){D(B)}return k?(v.current=null,V(!1),j(F),k):(setTimeout(()=>{v.current?.focus()},0),k)},[l]),W=r.useCallbackRef(()=>{j(a),v.current=null,V(!1),h?.()},[h,a]),ge=o.useMemo(()=>{if(!$)return null;const F={className:dt(ci),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:w,type:"text",value:S,onFocus:k=>{v.current||(v.current=k.target,setTimeout(()=>{k.target?.select()},0))},onBlur:k=>{v.current&&O(S)},onChange:k=>{$&&j(k.target.value)},onMouseDown:k=>k.stopPropagation(),onKeyDown:k=>k.code==="Escape"?(k.preventDefault(),void W()):k.code==="Enter"?(k.preventDefault(),void O(k.target.value)):void(k.code!=="Tab"?k.stopPropagation():O(k.target.value))};return c.jsx(c.Fragment,{children:s(F)})},[$,S,O,W,s,m]),[_,U]=o.useState();o.useLayoutEffect(()=>{let F=Object.assign({},n);(b||N)&&(F=Object.assign(F,y)),U(F)},[b,N,y,n]),o.useEffect(()=>{ge&&f?.(S)},[ge,f,S]);const z=r.useImperativeElement(t,()=>({startEdit(){m||M||V(!0)},cancel(){W()}}),[]);return c.jsxs("div",{...T,ref:z,style:{flexDirection:"column",display:"flex",..._},className:dt(i),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{m||M||V(!0)},onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:$?0:1},children:S}),ge]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...y},children:S})]})})),Hn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Qt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function xo(e){return"nodeType"in e}function xt(e){var t,n;return e?Qt(e)?e:xo(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function qo(e){const{Document:t}=xt(e);return e instanceof t}function mn(e){return!Qt(e)&&e instanceof xt(e).HTMLElement}function Er(e){return e instanceof xt(e).SVGElement}function Jt(e){return e?Qt(e)?e.document:xo(e)?qo(e)?e:mn(e)||Er(e)?e.ownerDocument:document:document:document}const Et=Hn?o.useLayoutEffect:o.useEffect;function Vn(e){const t=o.useRef(e);return Et(()=>{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 Et(()=>{n.current!==e&&(n.current=e)},t),n}function an(e,t){const n=o.useRef();return o.useMemo(()=>{const i=e(n.current);return n.current=i,i},[...t])}function zn(e){const t=Vn(e),n=o.useRef(null),i=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,i]}function Nn(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let lo={};function fn(e,t){return o.useMemo(()=>{if(t)return t;const n=lo[e]==null?0:lo[e]+1;return lo[e]=n,e+"-"+n},[e,t])}function Fr(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,f)=>{const h=Object.entries(f);for(const[s,y]of h){const b=l[s];b!=null&&(l[s]=b+e*y)}return l},{...t})}}const Zt=Fr(1),gn=Fr(-1);function Un(e){if(!e)return!1;const{KeyboardEvent:t}=xt(e.target);return t&&e instanceof t}function Ln(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=xt(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 Vt=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[Vt.Translate.toString(e),Vt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:i}=e;return t+" "+n+"ms "+i}}}),Wo="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function ui(e){return e.matches(Wo)?e:e.querySelector(Wo)}const gi={display:"none"};function hi(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:gi},n)}function mi(e){let{id:t,announcement:n,ariaLiveType:i="assertive"}=e;return o.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":i,"aria-atomic":!0},n)}const Ar=o.createContext(null),fi={draggable:`
24
24
  To pick up a draggable item, press the space bar.
25
25
  While dragging, use the arrow keys to move the item.
26
26
  Press space again to drop the item in its new position, or press escape to cancel.
27
- `},pi={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vi(e){let{announcements:t=pi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=fi}=e;const{announce:l,announcement:f}=(function(){const[w,m]=o.useState("");return{announce:o.useCallback(M=>{M!=null&&m(M)},[]),announcement:w}})(),h=fn("DndLiveRegion"),[s,y]=o.useState(!1);if(o.useEffect(()=>{y(!0)},[]),(function(w){const m=o.useContext(Ar);o.useEffect(()=>{if(!m)throw new Error("useDndMonitor must be used within a children of <DndContext>");return m(w)},[w,m])})(o.useMemo(()=>({onDragStart(w){let{active:m}=w;l(t.onDragStart({active:m}))},onDragMove(w){let{active:m,over:M}=w;t.onDragMove&&l(t.onDragMove({active:m,over:M}))},onDragOver(w){let{active:m,over:M}=w;l(t.onDragOver({active:m,over:M}))},onDragEnd(w){let{active:m,over:M}=w;l(t.onDragEnd({active:m,over:M}))},onDragCancel(w){let{active:m,over:M}=w;l(t.onDragCancel({active:m,over:M}))}}),[l,t])),!s)return null;const b=o.createElement(o.Fragment,null,o.createElement(hi,{id:i,value:a.draggable}),o.createElement(mi,{id:h,announcement:f}));return n?Ht.createPortal(b,n):b}var mt;function Pn(){}function io(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(mt||(mt={}));const Ft=Object.freeze({x:0,y:0});function Dr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ci(e,t){const n=Ln(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function zr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function yi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function $o(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 Nr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Go(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const wi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Go(t,t.left,t.top),l=[];for(const f of i){const{id:h}=f,s=n.get(h);if(s){const y=Dr(Go(s),a);l.push({id:h,data:{droppableContainer:f,value:y}})}}return l.sort(zr)};function bi(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),f=a-i,h=l-n;if(i<a&&n<l){const s=t.width*t.height,y=e.width*e.height,b=f*h;return Number((b/(s+y-b)).toFixed(4))}return 0}const xi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:f}=l,h=n.get(f);if(h){const s=bi(h,t);s>0&&a.push({id:f,data:{droppableContainer:l,value:s}})}}return a.sort(yi)};function _o(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ft}function qi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,f)=>({...l,top:l.top+e*f.y,bottom:l.bottom+e*f.y,left:l.left+e*f.x,right:l.right+e*f.x}),{...t})}}const Si=qi(1);function Lr(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Ri={ignoreTransform:!1};function en(e,t){t===void 0&&(t=Ri);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:y,transformOrigin:b}=xt(e).getComputedStyle(e);y&&(n=(function(w,m,M){const T=Lr(m);if(!T)return w;const{scaleX:N,scaleY:P,x:$,y:V}=T,S=w.left-$-(1-N)*parseFloat(M),j=w.top-V-(1-P)*parseFloat(M.slice(M.indexOf(" ")+1)),v=N?w.width/N:w.width,A=P?w.height/P:w.height;return{width:v,height:A,top:j,right:S+v,bottom:j+A,left:S}})(n,y,b))}const{top:i,left:a,width:l,height:f,bottom:h,right:s}=n;return{top:i,left:a,width:l,height:f,bottom:h,right:s}}function Zo(e){return en(e,{ignoreTransform:!0})}function Kn(e,t){const n=[];return e?(function i(a){if(t!=null&&n.length>=t||!a)return n;if(qo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!mn(a)||Er(a)||n.includes(a))return n;const l=xt(e).getComputedStyle(a);return a!==e&&(function(f,h){h===void 0&&(h=xt(f).getComputedStyle(f));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(y=>{const b=h[y];return typeof b=="string"&&s.test(b)})})(a,l)&&n.push(a),(function(f,h){return h===void 0&&(h=xt(f).getComputedStyle(f)),h.position==="fixed"})(a,l)?n:i(a.parentNode)})(e):n}function Pr(e){const[t]=Kn(e,1);return t??null}function ao(e){return Hn&&e?Qt(e)?e:xo(e)?qo(e)||e===Jt(e).scrollingElement?window:mn(e)?e:null:null:null}function jr(e){return Qt(e)?e.scrollX:e.scrollLeft}function Or(e){return Qt(e)?e.scrollY:e.scrollTop}function go(e){return{x:jr(e),y:Or(e)}}var pt;function Br(e){return!(!Hn||!e)&&e===document.scrollingElement}function Hr(e){const t={x:0,y:0},n=Br(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"})(pt||(pt={}));const ki={x:.2,y:.2};function Mi(e,t,n,i,a){let{top:l,left:f,right:h,bottom:s}=n;i===void 0&&(i=10),a===void 0&&(a=ki);const{isTop:y,isBottom:b,isLeft:w,isRight:m}=Hr(e),M={x:0,y:0},T={x:0,y:0},N=t.height*a.y,P=t.width*a.x;return!y&&l<=t.top+N?(M.y=pt.Backward,T.y=i*Math.abs((t.top+N-l)/N)):!b&&s>=t.bottom-N&&(M.y=pt.Forward,T.y=i*Math.abs((t.bottom-N-s)/N)),!m&&h>=t.right-P?(M.x=pt.Forward,T.x=i*Math.abs((t.right-P-h)/P)):!w&&f<=t.left+P&&(M.x=pt.Backward,T.x=i*Math.abs((t.left+P-f)/P)),{direction:M,speed:T}}function Ti(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:f}=window;return{top:0,left:0,right:l,bottom:f,width:l,height:f}}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 Vr(e){return e.reduce((t,n)=>Zt(t,go(n)),Ft)}function Ur(e,t){if(t===void 0&&(t=en),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);Pr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ii=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+jr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Or(n),0)}]];class ho{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Kn(n),a=Vr(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,f,h]of Ii)for(const s of f)Object.defineProperty(this,s,{get:()=>{const y=h(i),b=a[l]-y;return this.rect[s]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class sn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function so(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var Mt,Qe;function Xo(e){e.preventDefault()}function Ei(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Mt||(Mt={})),(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"})(Qe||(Qe={}));const Kr={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter,Qe.Tab]},Fi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class So{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 sn(Jt(n)),this.windowListeners=new sn(xt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Mt.Resize,this.handleCancel),this.windowListeners.add(Mt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Mt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Ur(i),n(Ft)}handleKeyDown(t){if(Un(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=Kr,coordinateGetter:f=Fi,scrollBehavior:h="smooth"}=a,{code:s}=t;if(l.end.includes(s))return void this.handleEnd(t);if(l.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:y}=i.current,b=y?{x:y.left,y:y.top}:Ft;this.referenceCoordinates||(this.referenceCoordinates=b);const w=f(t,{active:n,context:i.current,currentCoordinates:b});if(w){const m=gn(w,b),M={x:0,y:0},{scrollableAncestors:T}=i.current;for(const N of T){const P=t.code,{isTop:$,isRight:V,isLeft:S,isBottom:j,maxScroll:v,minScroll:A}=Hr(N),q=Ti(N),K={x:Math.min(P===Qe.Right?q.right-q.width/2:q.right,Math.max(P===Qe.Right?q.left:q.left+q.width/2,w.x)),y:Math.min(P===Qe.Down?q.bottom-q.height/2:q.bottom,Math.max(P===Qe.Down?q.top:q.top+q.height/2,w.y))},D=P===Qe.Right&&!V||P===Qe.Left&&!S,O=P===Qe.Down&&!j||P===Qe.Up&&!$;if(D&&K.x!==w.x){const W=N.scrollLeft+m.x,ge=P===Qe.Right&&W<=v.x||P===Qe.Left&&W>=A.x;if(ge&&!m.y)return void N.scrollTo({left:W,behavior:h});M.x=ge?N.scrollLeft-W:P===Qe.Right?N.scrollLeft-v.x:N.scrollLeft-A.x,M.x&&N.scrollBy({left:-M.x,behavior:h});break}if(O&&K.y!==w.y){const W=N.scrollTop+m.y,ge=P===Qe.Down&&W<=v.y||P===Qe.Up&&W>=A.y;if(ge&&!m.x)return void N.scrollTo({top:W,behavior:h});M.y=ge?N.scrollTop-W:P===Qe.Down?N.scrollTop-v.y:N.scrollTop-A.y,M.y&&N.scrollBy({top:-M.y,behavior:h});break}}this.handleMove(t,Zt(gn(w,this.referenceCoordinates),M))}}}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 Yo(e){return!!(e&&"distance"in e)}function Jo(e){return!!(e&&"delay"in e)}So.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Kr,onActivation:a}=t,{active:l}=n;const{code:f}=e.nativeEvent;if(i.start.includes(f)){const h=l.activatorNode.current;return(!h||e.target===h)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Ro{constructor(t,n,i){var a;i===void 0&&(i=(function(h){const{EventTarget:s}=xt(h);return h instanceof s?h:Jt(h)})(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:f}=l;this.props=t,this.events=n,this.document=Jt(f),this.documentListeners=new sn(this.document),this.listeners=new sn(i),this.windowListeners=new sn(xt(f)),this.initialCoordinates=(a=Ln(l))!=null?a:Ft,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(Mt.Resize,this.handleCancel),this.windowListeners.add(Mt.DragStart,Xo),this.windowListeners.add(Mt.VisibilityChange,this.handleCancel),this.windowListeners.add(Mt.ContextMenu,Xo),this.documentListeners.add(Mt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Jo(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(Yo(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(Mt.Click,Ei,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Mt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:f,options:{activationConstraint:h}}=l;if(!a)return;const s=(n=Ln(t))!=null?n:Ft,y=gn(a,s);if(!i&&h){if(Yo(h)){if(h.tolerance!=null&&so(y,h.tolerance))return this.handleCancel();if(so(y,h.distance))return this.handleStart()}return Jo(h)&&so(y,h.tolerance)?this.handleCancel():void this.handlePending(h,y)}t.cancelable&&t.preventDefault(),f(s)}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===Qe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ai={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wr extends Ro{constructor(t){const{event:n}=t,i=Jt(n.target);super(t,Ai,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 Di={move:{name:"mousemove"},end:{name:"mouseup"}};var mo;(function(e){e[e.RightClick=2]="RightClick"})(mo||(mo={}));class $r extends Ro{constructor(t){super(t,Di,Jt(t.event.target))}}$r.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==mo.RightClick&&(i?.({event:n}),!0)}}];const co={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Gr extends Ro{constructor(t){super(t,co)}static setup(){return window.addEventListener(co.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(co.move.name,t)};function t(){}}}var cn,jn;function zi(e){let{acceleration:t,activator:n=cn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:f=5,order:h=jn.TreeOrder,pointerCoordinates:s,scrollableAncestors:y,scrollableAncestorRects:b,delta:w,threshold:m}=e;const M=(function(A){let{delta:q,disabled:K}=A;const D=Nn(q);return an(O=>{if(K||!D||!O)return Ni;const W={x:Math.sign(q.x-D.x),y:Math.sign(q.y-D.y)};return{x:{[pt.Backward]:O.x[pt.Backward]||W.x===-1,[pt.Forward]:O.x[pt.Forward]||W.x===1},y:{[pt.Backward]:O.y[pt.Backward]||W.y===-1,[pt.Forward]:O.y[pt.Forward]||W.y===1}}},[K,q,D])})({delta:w,disabled:!l}),[T,N]=(function(){const A=o.useRef(null);return[o.useCallback((q,K)=>{A.current=setInterval(q,K)},[]),o.useCallback(()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[])]})(),P=o.useRef({x:0,y:0}),$=o.useRef({x:0,y:0}),V=o.useMemo(()=>{switch(n){case cn.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case cn.DraggableRect:return a}},[n,a,s]),S=o.useRef(null),j=o.useCallback(()=>{const A=S.current;if(!A)return;const q=P.current.x*$.current.x,K=P.current.y*$.current.y;A.scrollBy(q,K)},[]),v=o.useMemo(()=>h===jn.TreeOrder?[...y].reverse():y,[h,y]);o.useEffect(()=>{if(l&&y.length&&V){for(const A of v){if(i?.(A)===!1)continue;const q=y.indexOf(A),K=b[q];if(!K)continue;const{direction:D,speed:O}=Mi(A,K,V,t,m);for(const W of["x","y"])M[W][D[W]]||(O[W]=0,D[W]=0);if(O.x>0||O.y>0)return N(),S.current=A,T(j,f),P.current=O,void($.current=D)}P.current={x:0,y:0},$.current={x:0,y:0},N()}else N()},[t,j,i,N,l,f,JSON.stringify(V),JSON.stringify(M),T,y,v,b,JSON.stringify(m)])}Gr.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"})(cn||(cn={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jn||(jn={}));const Ni={x:{[pt.Backward]:!1,[pt.Forward]:!1},y:{[pt.Backward]:!1,[pt.Forward]:!1}};var hn,fo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(hn||(hn={})),(function(e){e.Optimized="optimized"})(fo||(fo={}));const Qo=new Map;function po(e,t){return an(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function On(e){let{callback:t,disabled:n}=e;const i=Vn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Li(e){return new ho(en(e),e)}function er(e,t,n){t===void 0&&(t=Li);const[i,a]=o.useState(null);function l(){a(s=>{if(!e)return null;var y;if(e.isConnected===!1)return(y=s??n)!=null?y:null;const b=t(e);return JSON.stringify(s)===JSON.stringify(b)?s:b})}const f=(function(s){let{callback:y,disabled:b}=s;const w=Vn(y),m=o.useMemo(()=>{if(b||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:M}=window;return new M(w)},[w,b]);return o.useEffect(()=>()=>m?.disconnect(),[m]),m})({callback(s){if(e)for(const y of s){const{type:b,target:w}=y;if(b==="childList"&&w instanceof HTMLElement&&w.contains(e)){l();break}}}}),h=On({callback:l});return Et(()=>{l(),e?(h?.observe(e),f?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),f?.disconnect())},[e]),i}const tr=[];function nr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==Ft;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?gn(e,n.current):Ft}function or(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 rr=[];function _r(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}const Pi=[{sensor:Wr,options:{}},{sensor:So,options:{}}],ji={current:{}},En={draggable:{measure:Zo},droppable:{measure:Zo,strategy:hn.WhileDragging,frequency:fo.Optimized},dragOverlay:{measure:en}};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 Oi={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:Pn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:En,measureDroppableContainers:Pn,windowRect:null,measuringScheduled:!1},Zr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Pn,draggableNodes:new Map,over:null,measureDroppableContainers:Pn},pn=o.createContext(Zr),Xr=o.createContext(Oi);function Bi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dn}}}function Hi(e,t){switch(t.type){case mt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case mt.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 mt.DragEnd:case mt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case mt.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 mt.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const f=new dn(e.droppable.containers);return f.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:f}}}case mt.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 Vi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(pn),l=Nn(i),f=Nn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&f!=null){if(!Un(l)||document.activeElement===l.target)return;const h=a.get(f);if(!h)return;const{activatorNode:s,node:y}=h;if(!s.current&&!y.current)return;requestAnimationFrame(()=>{for(const b of[s.current,y.current]){if(!b)continue;const w=ui(b);if(w){w.focus();break}}})}},[i,t,a,f,l]),null}function Yr(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const Wn=o.createContext({...Ft,scaleX:1,scaleY:1});var Pt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Pt||(Pt={}));const Ui=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:f,autoScroll:h=!0,children:s,sensors:y=Pi,collisionDetection:b=xi,measuring:w,modifiers:m,...M}=e;const T=o.useReducer(Hi,void 0,Bi),[N,P]=T,[$,V]=(function(){const[u]=o.useState(()=>new Set),x=o.useCallback(E=>(u.add(E),()=>u.delete(E)),[u]);return[o.useCallback(E=>{let{type:re,event:pe}=E;u.forEach(se=>{var ne;return(ne=se[re])==null?void 0:ne.call(se,pe)})},[u]),x]})(),[S,j]=o.useState(Pt.Uninitialized),v=S===Pt.Initialized,{draggable:{active:A,nodes:q,translate:K},droppable:{containers:D}}=N,O=A!=null?q.get(A):null,W=o.useRef({initial:null,translated:null}),ge=o.useMemo(()=>{var u;return A!=null?{id:A,data:(u=O?.data)!=null?u:ji,rect:W}:null},[A,O]),_=o.useRef(null),[U,z]=o.useState(null),[F,k]=o.useState(null),B=un(M,Object.values(M)),Q=fn("DndDescribedBy",l),oe=o.useMemo(()=>D.getEnabled(),[D]),be=(me=w,o.useMemo(()=>({draggable:{...En.draggable,...me?.draggable},droppable:{...En.droppable,...me?.droppable},dragOverlay:{...En.dragOverlay,...me?.dragOverlay}}),[me?.draggable,me?.droppable,me?.dragOverlay]));var me;const{droppableRects:ze,measureDroppableContainers:je,measuringScheduled:De}=(function(u,x){let{dragging:E,dependencies:re,config:pe}=x;const[se,ne]=o.useState(null),{frequency:ae,measure:ue,strategy:we}=pe,He=o.useRef(u),Te=(function(){switch(we){case hn.Always:return!1;case hn.BeforeDragging:return E;default:return!E}})(),Ie=un(Te),Ke=o.useCallback(function(Ye){Ye===void 0&&(Ye=[]),Ie.current||ne(Je=>Je===null?Ye:Je.concat(Ye.filter(Le=>!Je.includes(Le))))},[Ie]),_e=o.useRef(null),$e=an(Ye=>{if(Te&&!E)return Qo;if(!Ye||Ye===Qo||He.current!==u||se!=null){const Je=new Map;for(let Le of u){if(!Le)continue;if(se&&se.length>0&&!se.includes(Le.id)&&Le.rect.current){Je.set(Le.id,Le.rect.current);continue}const Xe=Le.node.current,vt=Xe?new ho(ue(Xe),Xe):null;Le.rect.current=vt,vt&&Je.set(Le.id,vt)}return Je}return Ye},[u,se,E,Te,ue]);return o.useEffect(()=>{He.current=u},[u]),o.useEffect(()=>{Te||Ke()},[E,Te]),o.useEffect(()=>{se&&se.length>0&&ne(null)},[JSON.stringify(se)]),o.useEffect(()=>{Te||typeof ae!="number"||_e.current!==null||(_e.current=setTimeout(()=>{Ke(),_e.current=null},ae))},[ae,Te,Ke,...re]),{droppableRects:$e,measureDroppableContainers:Ke,measuringScheduled:se!=null}})(oe,{dragging:v,dependencies:[K.x,K.y],config:be.droppable}),fe=(function(u,x){const E=x!=null?u.get(x):void 0,re=E?E.node.current:null;return an(pe=>{var se;return x==null?null:(se=re??pe)!=null?se:null},[re,x])})(q,A),Ve=o.useMemo(()=>F?Ln(F):null,[F]),Y=(function(){const u=U?.autoScrollEnabled===!1,x=typeof h=="object"?h.enabled===!1:h===!1,E=v&&!u&&!x;return typeof h=="object"?{...h,enabled:E}:{enabled:E}})(),Z=(function(u,x){return po(u,x)})(fe,be.draggable.measure);(function(u){let{activeNode:x,measure:E,initialRect:re,config:pe=!0}=u;const se=o.useRef(!1),{x:ne,y:ae}=typeof pe=="boolean"?{x:pe,y:pe}:pe;Et(()=>{if(!ne&&!ae||!x)return void(se.current=!1);if(se.current||!re)return;const ue=x?.node.current;if(!ue||ue.isConnected===!1)return;const we=_o(E(ue),re);if(ne||(we.x=0),ae||(we.y=0),se.current=!0,Math.abs(we.x)>0||Math.abs(we.y)>0){const He=Pr(ue);He&&He.scrollBy({top:we.y,left:we.x})}},[x,ne,ae,re,E])})({activeNode:A!=null?q.get(A):null,config:Y.layoutShiftCompensation,initialRect:Z,measure:be.draggable.measure});const de=er(fe,be.draggable.measure,Z),ke=er(fe?fe.parentElement:null),Ce=o.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:ze,draggableNodes:q,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),H=D.getNodeFor((t=Ce.current.over)==null?void 0:t.id),ee=(function(u){let{measure:x}=u;const[E,re]=o.useState(null),pe=On({callback:o.useCallback(ue=>{for(const{target:we}of ue)if(mn(we)){re(He=>{const Te=x(we);return He?{...He,width:Te.width,height:Te.height}:Te});break}},[x])}),se=o.useCallback(ue=>{const we=_r(ue);pe?.disconnect(),we&&pe?.observe(we),re(we?x(we):null)},[x,pe]),[ne,ae]=zn(se);return o.useMemo(()=>({nodeRef:ne,rect:E,setRef:ae}),[E,ne,ae])})({measure:be.dragOverlay.measure}),ce=(n=ee.nodeRef.current)!=null?n:fe,le=v?(i=ee.rect)!=null?i:de:null,Re=!!(ee.nodeRef.current&&ee.rect),ie=_o(ve=Re?null:de,po(ve));var ve;const Ae=or(ce?xt(ce):null),xe=(function(u){const x=o.useRef(u),E=an(re=>u?re&&re!==tr&&u&&x.current&&u.parentNode===x.current.parentNode?re:Kn(u):tr,[u]);return o.useEffect(()=>{x.current=u},[u]),E})(v?H??fe:null),Oe=(function(u,x){x===void 0&&(x=en);const[E]=u,re=or(E?xt(E):null),[pe,se]=o.useState(rr);function ne(){se(()=>u.length?u.map(ue=>Br(ue)?re:new ho(x(ue),ue)):rr)}const ae=On({callback:ne});return Et(()=>{ae?.disconnect(),ne(),u.forEach(ue=>ae?.observe(ue))},[u]),pe})(xe),Be=Yr(m,{transform:{x:K.x-ie.x,y:K.y-ie.y,scaleX:1,scaleY:1},activatorEvent:F,active:ge,activeNodeRect:de,containerNodeRect:ke,draggingNodeRect:le,over:Ce.current.over,overlayNodeRect:ee.rect,scrollableAncestors:xe,scrollableAncestorRects:Oe,windowRect:Ae}),p=Ve?Zt(Ve,K):null,Pe=(function(u){const[x,E]=o.useState(null),re=o.useRef(u),pe=o.useCallback(se=>{const ne=ao(se.target);ne&&E(ae=>ae?(ae.set(ne,go(ne)),new Map(ae)):null)},[]);return o.useEffect(()=>{const se=re.current;if(u!==se){ne(se);const ae=u.map(ue=>{const we=ao(ue);return we?(we.addEventListener("scroll",pe,{passive:!0}),[we,go(we)]):null}).filter(ue=>ue!=null);E(ae.length?new Map(ae):null),re.current=u}return()=>{ne(u),ne(se)};function ne(ae){ae.forEach(ue=>{const we=ao(ue);we?.removeEventListener("scroll",pe)})}},[pe,u]),o.useMemo(()=>u.length?x?Array.from(x.values()).reduce((se,ne)=>Zt(se,ne),Ft):Vr(u):Ft,[u,x])})(xe),tt=nr(Pe),te=nr(Pe,[de]),Me=Zt(Be,tt),Ne=le?Si(le,Be):null,Fe=ge&&Ne?b({active:ge,collisionRect:Ne,droppableRects:ze,droppableContainers:oe,pointerCoordinates:p}):null,Ee=Nr(Fe,"id"),[I,J]=o.useState(null),L=(function(u,x,E){return{...u,scaleX:x&&E?x.width/E.width:1,scaleY:x&&E?x.height/E.height:1}})(Re?Be:Zt(Be,te),(a=I?.rect)!=null?a:null,de),G=o.useRef(null),qe=o.useCallback((u,x)=>{let{sensor:E,options:re}=x;if(_.current==null)return;const pe=q.get(_.current);if(!pe)return;const se=u.nativeEvent,ne=new E({active:_.current,activeNode:pe,event:se,options:re,context:Ce,onAbort(ue){if(!q.get(ue))return;const{onDragAbort:we}=B.current,He={id:ue};we?.(He),$({type:"onDragAbort",event:He})},onPending(ue,we,He,Te){if(!q.get(ue))return;const{onDragPending:Ie}=B.current,Ke={id:ue,constraint:we,initialCoordinates:He,offset:Te};Ie?.(Ke),$({type:"onDragPending",event:Ke})},onStart(ue){const we=_.current;if(we==null)return;const He=q.get(we);if(!He)return;const{onDragStart:Te}=B.current,Ie={activatorEvent:se,active:{id:we,data:He.data,rect:W}};Ht.unstable_batchedUpdates(()=>{Te?.(Ie),j(Pt.Initializing),P({type:mt.DragStart,initialCoordinates:ue,active:we}),$({type:"onDragStart",event:Ie}),z(G.current),k(se)})},onMove(ue){P({type:mt.DragMove,coordinates:ue})},onEnd:ae(mt.DragEnd),onCancel:ae(mt.DragCancel)});function ae(ue){return async function(){const{active:we,collisions:He,over:Te,scrollAdjustedTranslate:Ie}=Ce.current;let Ke=null;if(we&&Ie){const{cancelDrop:_e}=B.current;Ke={activatorEvent:se,active:we,collisions:He,delta:Ie,over:Te},ue===mt.DragEnd&&typeof _e=="function"&&await Promise.resolve(_e(Ke))&&(ue=mt.DragCancel)}_.current=null,Ht.unstable_batchedUpdates(()=>{P({type:ue}),j(Pt.Uninitialized),J(null),z(null),k(null),G.current=null;const _e=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(Ke){const $e=B.current[_e];$e?.(Ke),$({type:_e,event:Ke})}})}}G.current=ne},[q]),ye=o.useCallback((u,x)=>(E,re)=>{const pe=E.nativeEvent,se=q.get(re);if(_.current!==null||!se||pe.dndKit||pe.defaultPrevented)return;const ne={active:se};u(E,x.options,ne)===!0&&(pe.dndKit={capturedBy:x.sensor},_.current=re,qe(E,x))},[q,qe]),g=(function(u,x){return o.useMemo(()=>u.reduce((E,re)=>{const{sensor:pe}=re;return[...E,...pe.activators.map(se=>({eventName:se.eventName,handler:x(se.handler,re)}))]},[]),[u,x])})(y,ye);(function(u){o.useEffect(()=>{if(!Hn)return;const x=u.map(E=>{let{sensor:re}=E;return re.setup==null?void 0:re.setup()});return()=>{for(const E of x)E?.()}},u.map(x=>{let{sensor:E}=x;return E}))})(y),Et(()=>{de&&S===Pt.Initializing&&j(Pt.Initialized)},[de,S]),o.useEffect(()=>{const{onDragMove:u}=B.current,{active:x,activatorEvent:E,collisions:re,over:pe}=Ce.current;if(!x||!E)return;const se={active:x,activatorEvent:E,collisions:re,delta:{x:Me.x,y:Me.y},over:pe};Ht.unstable_batchedUpdates(()=>{u?.(se),$({type:"onDragMove",event:se})})},[Me.x,Me.y]),o.useEffect(()=>{const{active:u,activatorEvent:x,collisions:E,droppableContainers:re,scrollAdjustedTranslate:pe}=Ce.current;if(!u||_.current==null||!x||!pe)return;const{onDragOver:se}=B.current,ne=re.get(Ee),ae=ne&&ne.rect.current?{id:ne.id,rect:ne.rect.current,data:ne.data,disabled:ne.disabled}:null,ue={active:u,activatorEvent:x,collisions:E,delta:{x:pe.x,y:pe.y},over:ae};Ht.unstable_batchedUpdates(()=>{J(ae),se?.(ue),$({type:"onDragOver",event:ue})})},[Ee]),Et(()=>{Ce.current={activatorEvent:F,active:ge,activeNode:fe,collisionRect:Ne,collisions:Fe,droppableRects:ze,draggableNodes:q,draggingNode:ce,draggingNodeRect:le,droppableContainers:D,over:I,scrollableAncestors:xe,scrollAdjustedTranslate:Me},W.current={initial:le,translated:Ne}},[ge,fe,Fe,Ne,q,ce,le,ze,D,I,xe,Me]),zi({...Y,delta:K,draggingRect:Ne,pointerCoordinates:p,scrollableAncestors:xe,scrollableAncestorRects:Oe});const C=o.useMemo(()=>({active:ge,activeNode:fe,activeNodeRect:de,activatorEvent:F,collisions:Fe,containerNodeRect:ke,dragOverlay:ee,draggableNodes:q,droppableContainers:D,droppableRects:ze,over:I,measureDroppableContainers:je,scrollableAncestors:xe,scrollableAncestorRects:Oe,measuringConfiguration:be,measuringScheduled:De,windowRect:Ae}),[ge,fe,de,F,Fe,ke,ee,q,D,ze,I,je,xe,Oe,be,De,Ae]),R=o.useMemo(()=>({activatorEvent:F,activators:g,active:ge,activeNodeRect:de,ariaDescribedById:{draggable:Q},dispatch:P,draggableNodes:q,over:I,measureDroppableContainers:je}),[F,g,ge,de,P,Q,q,I,je]);return o.createElement(Ar.Provider,{value:V},o.createElement(pn.Provider,{value:R},o.createElement(Xr.Provider,{value:C},o.createElement(Wn.Provider,{value:L},s)),o.createElement(Vi,{disabled:f?.restoreFocus===!1})),o.createElement(vi,{...f,hiddenTextDescribedById:Q}))}),Ki=o.createContext(null),lr="button";function Wi(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=fn("Draggable"),{activators:f,activatorEvent:h,active:s,activeNodeRect:y,ariaDescribedById:b,draggableNodes:w,over:m}=o.useContext(pn),{role:M=lr,roleDescription:T="draggable",tabIndex:N=0}=a??{},P=s?.id===t,$=o.useContext(P?Wn:Ki),[V,S]=zn(),[j,v]=zn(),A=(function(K,D){return o.useMemo(()=>K.reduce((O,W)=>{let{eventName:ge,handler:_}=W;return O[ge]=U=>{_(U,D)},O},{}),[K,D])})(f,t),q=un(n);return Et(()=>(w.set(t,{id:t,key:l,node:V,activatorNode:j,data:q}),()=>{const K=w.get(t);K&&K.key===l&&w.delete(t)}),[w,t]),{active:s,activatorEvent:h,activeNodeRect:y,attributes:o.useMemo(()=>({role:M,tabIndex:N,"aria-disabled":i,"aria-pressed":!(!P||M!==lr)||void 0,"aria-roledescription":T,"aria-describedby":b.draggable}),[i,M,N,P,T,b.draggable]),isDragging:P,listeners:i?void 0:A,node:V,over:m,setNodeRef:S,setActivatorNodeRef:v,transform:$}}function Jr(){return o.useContext(Xr)}const $i={timeout:25};function Gi(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,f]=o.useState(null),h=Nn(n);return n||i||!h||a(h),Et(()=>{if(!l)return;const s=i?.key,y=i?.props.id;s!=null&&y!=null?Promise.resolve(t(y,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:f}):null)}const _i={x:0,y:0,scaleX:1,scaleY:1};function Zi(e){let{children:t}=e;return o.createElement(pn.Provider,{value:Zr},o.createElement(Wn.Provider,{value:_i},t))}const Xi={position:"fixed",touchAction:"none"},Yi=e=>Un(e)?"transform 250ms ease":void 0,Ji=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:f,rect:h,style:s,transform:y,transition:b=Yi}=e;if(!h)return null;const w=a?y:{...y,scaleX:1,scaleY:1},m={...Xi,width:h.width,height:h.height,top:h.top,left:h.left,transform:Vt.Transform.toString(w),transformOrigin:a&&i?Ci(i,h):void 0,transition:typeof b=="function"?b(i):b,...s};return o.createElement(n,{className:f,style:m,ref:t},l)}),Qi=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:f}=e;if(l!=null&&l.active)for(const[h,s]of Object.entries(l.active))s!==void 0&&(a[h]=n.node.style.getPropertyValue(h),n.node.style.setProperty(h,s));if(l!=null&&l.dragOverlay)for(const[h,s]of Object.entries(l.dragOverlay))s!==void 0&&i.node.style.setProperty(h,s);return f!=null&&f.active&&n.node.classList.add(f.active),f!=null&&f.dragOverlay&&i.node.classList.add(f.dragOverlay),function(){for(const[h,s]of Object.entries(a))n.node.style.setProperty(h,s);f!=null&&f.active&&n.node.classList.remove(f.active)}},Qr={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Vt.Transform.toString(t)},{transform:Vt.Transform.toString(n)}]},sideEffects:Qi({styles:{active:{opacity:"0"}}})};function ea(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return Vn((l,f)=>{if(t===null)return;const h=n.get(l);if(!h)return;const s=h.node.current;if(!s)return;const y=_r(f);if(!y)return;const{transform:b}=xt(f).getComputedStyle(f),w=Lr(b);if(!w)return;const m=typeof t=="function"?t:(function(M){const{duration:T,easing:N,sideEffects:P,keyframes:$}={...Qr,...M};return V=>{let{active:S,dragOverlay:j,transform:v,...A}=V;if(!T)return;const q={x:j.rect.left-S.rect.left,y:j.rect.top-S.rect.top},K={scaleX:v.scaleX!==1?S.rect.width*v.scaleX/j.rect.width:1,scaleY:v.scaleY!==1?S.rect.height*v.scaleY/j.rect.height:1},D={x:v.x-q.x,y:v.y-q.y,...K},O=$({...A,active:S,dragOverlay:j,transform:{initial:v,final:D}}),[W]=O,ge=O[O.length-1];if(JSON.stringify(W)===JSON.stringify(ge))return;const _=P?.({active:S,dragOverlay:j,...A}),U=j.node.animate(O,{duration:T,easing:N,fill:"forwards"});return new Promise(z=>{U.onfinish=()=>{_?.(),z()}})}})(t);return Ur(s,a.draggable.measure),m({active:{id:l,data:h.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:f,rect:a.dragOverlay.measure(y)},droppableContainers:i,measuringConfiguration:a,transform:w})})}let ir=0;function ta(e){return o.useMemo(()=>{if(e!=null)return ir++,ir},[e])}const na=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:f,wrapperElement:h="div",className:s,zIndex:y=999}=e;const{activatorEvent:b,active:w,activeNodeRect:m,containerNodeRect:M,draggableNodes:T,droppableContainers:N,dragOverlay:P,over:$,measuringConfiguration:V,scrollableAncestors:S,scrollableAncestorRects:j,windowRect:v}=Jr(),A=o.useContext(Wn),q=ta(w?.id),K=Yr(f,{activatorEvent:b,active:w,activeNodeRect:m,containerNodeRect:M,draggingNodeRect:P.rect,over:$,overlayNodeRect:P.rect,scrollableAncestors:S,scrollableAncestorRects:j,transform:A,windowRect:v}),D=po(m),O=ea({config:i,draggableNodes:T,droppableContainers:N,measuringConfiguration:V}),W=D?P.setRef:void 0;return o.createElement(Zi,null,o.createElement(Gi,{animation:O},w&&q?o.createElement(Ji,{key:q,id:w.id,ref:W,as:h,activatorEvent:b,adjustScale:t,className:s,transition:l,rect:D,style:{zIndex:y,...a},transform:K},n):null))});function ko(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function oa(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function Tn(e){return e!==null&&e>=0}const In={scaleX:1,scaleY:1},ra=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:f}=e;const h=(t=n[a])!=null?t:i;if(!h)return null;const s=(function(y,b,w){const m=y[b],M=y[b-1],T=y[b+1];return!m||!M&&!T?0:w<b?M?m.left-(M.left+M.width):T.left-(m.left+m.width):T?T.left-(m.left+m.width):m.left-(M.left+M.width)})(n,f,a);if(f===a){const y=n[l];return y?{x:a<l?y.left+y.width-(h.left+h.width):y.left-h.left,y:0,...In}:null}return f>a&&f<=l?{x:-h.width-s,y:0,...In}:f<a&&f>=l?{x:h.width+s,y:0,...In}:{x:0,y:0,...In}},Mo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=ko(t,i,n),f=t[a],h=l[a];return h&&f?{x:h.left-f.left,y:h.top-f.top,scaleX:h.width/f.width,scaleY:h.height/f.height}:null},el="Sortable",tl=o.createContext({activeIndex:-1,containerId:el,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Mo,disabled:{draggable:!1,droppable:!1}});function la(e){let{children:t,id:n,items:i,strategy:a=Mo,disabled:l=!1}=e;const{active:f,dragOverlay:h,droppableRects:s,over:y,measureDroppableContainers:b}=Jr(),w=fn(el,n),m=h.rect!==null,M=o.useMemo(()=>i.map(A=>typeof A=="object"&&"id"in A?A.id:A),[i]),T=f!=null,N=f?M.indexOf(f.id):-1,P=y?M.indexOf(y.id):-1,$=o.useRef(M),V=!(function(A,q){if(A===q)return!0;if(A.length!==q.length)return!1;for(let K=0;K<A.length;K++)if(A[K]!==q[K])return!1;return!0})(M,$.current),S=P!==-1&&N===-1||V,j=(function(A){return typeof A=="boolean"?{draggable:A,droppable:A}:A})(l);Et(()=>{V&&T&&b(M)},[V,M,T,b]),o.useEffect(()=>{$.current=M},[M]);const v=o.useMemo(()=>({activeIndex:N,containerId:w,disabled:j,disableTransforms:S,items:M,overIndex:P,useDragOverlay:m,sortedRects:oa(M,s),strategy:a}),[N,w,j.draggable,j.droppable,S,M,P,s,m,a]);return o.createElement(tl.Provider,{value:v},t)}const ia=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return ko(n,i,a).indexOf(t)},aa=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:f,previousItems:h,previousContainerId:s,transition:y}=e;return!(!y||!i)&&(h===l||a!==f)&&(!!n||f!==a&&t===s)},sa={duration:200,easing:"ease"},nl="transform",ca=Vt.Transition.toString({property:nl,duration:0,easing:"linear"}),da={roleDescription:"sortable"};function ua(e){let{animateLayoutChanges:t=aa,attributes:n,disabled:i,data:a,getNewIndex:l=ia,id:f,strategy:h,resizeObserverConfig:s,transition:y=sa}=e;const{items:b,containerId:w,activeIndex:m,disabled:M,disableTransforms:T,sortedRects:N,overIndex:P,useDragOverlay:$,strategy:V}=o.useContext(tl),S=(function(H,ee){var ce,le;return typeof H=="boolean"?{draggable:H,droppable:!1}:{draggable:(ce=H?.draggable)!=null?ce:ee.draggable,droppable:(le=H?.droppable)!=null?le:ee.droppable}})(i,M),j=b.indexOf(f),v=o.useMemo(()=>({sortable:{containerId:w,index:j,items:b},...a}),[w,a,j,b]),A=o.useMemo(()=>b.slice(b.indexOf(f)),[b,f]),{rect:q,node:K,isOver:D,setNodeRef:O}=(function(H){let{data:ee,disabled:ce=!1,id:le,resizeObserverConfig:Re}=H;const ie=fn("Droppable"),{active:ve,dispatch:Ae,over:xe,measureDroppableContainers:Oe}=o.useContext(pn),Be=o.useRef({disabled:ce}),p=o.useRef(!1),Pe=o.useRef(null),tt=o.useRef(null),{disabled:te,updateMeasurementsFor:Me,timeout:Ne}={...$i,...Re},Fe=un(Me??le),Ee=On({callback:o.useCallback(()=>{p.current?(tt.current!=null&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Oe(Array.isArray(Fe.current)?Fe.current:[Fe.current]),tt.current=null},Ne)):p.current=!0},[Ne]),disabled:te||!ve}),I=o.useCallback((qe,ye)=>{Ee&&(ye&&(Ee.unobserve(ye),p.current=!1),qe&&Ee.observe(qe))},[Ee]),[J,L]=zn(I),G=un(ee);return o.useEffect(()=>{Ee&&J.current&&(Ee.disconnect(),p.current=!1,Ee.observe(J.current))},[J,Ee]),o.useEffect(()=>(Ae({type:mt.RegisterDroppable,element:{id:le,key:ie,disabled:ce,node:J,rect:Pe,data:G}}),()=>Ae({type:mt.UnregisterDroppable,key:ie,id:le})),[le]),o.useEffect(()=>{ce!==Be.current.disabled&&(Ae({type:mt.SetDroppableDisabled,id:le,key:ie,disabled:ce}),Be.current.disabled=ce)},[le,ie,ce,Ae]),{active:ve,rect:Pe,isOver:xe?.id===le,node:J,over:xe,setNodeRef:L}})({id:f,data:v,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...s}}),{active:W,activatorEvent:ge,activeNodeRect:_,attributes:U,setNodeRef:z,listeners:F,isDragging:k,over:B,setActivatorNodeRef:Q,transform:oe}=Wi({id:f,data:v,attributes:{...da,...n},disabled:S.draggable}),be=(function(){for(var H=arguments.length,ee=new Array(H),ce=0;ce<H;ce++)ee[ce]=arguments[ce];return o.useMemo(()=>le=>{ee.forEach(Re=>Re(le))},ee)})(O,z),me=!!W,ze=me&&!T&&Tn(m)&&Tn(P),je=!$&&k,De=je&&ze?oe:null,fe=ze?De??(h??V)({rects:N,activeNodeRect:_,activeIndex:m,overIndex:P,index:j}):null,Ve=Tn(m)&&Tn(P)?l({id:f,items:b,activeIndex:m,overIndex:P}):j,Y=W?.id,Z=o.useRef({activeId:Y,items:b,newIndex:Ve,containerId:w}),de=b!==Z.current.items,ke=t({active:W,containerId:w,isDragging:k,isSorting:me,id:f,index:j,items:b,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:y,wasDragging:Z.current.activeId!=null}),Ce=(function(H){let{disabled:ee,index:ce,node:le,rect:Re}=H;const[ie,ve]=o.useState(null),Ae=o.useRef(ce);return Et(()=>{if(!ee&&ce!==Ae.current&&le.current){const xe=Re.current;if(xe){const Oe=en(le.current,{ignoreTransform:!0}),Be={x:xe.left-Oe.left,y:xe.top-Oe.top,scaleX:xe.width/Oe.width,scaleY:xe.height/Oe.height};(Be.x||Be.y)&&ve(Be)}}ce!==Ae.current&&(Ae.current=ce)},[ee,ce,le,Re]),o.useEffect(()=>{ie&&ve(null)},[ie]),ie})({disabled:!ke,index:j,node:K,rect:q});return o.useEffect(()=>{me&&Z.current.newIndex!==Ve&&(Z.current.newIndex=Ve),w!==Z.current.containerId&&(Z.current.containerId=w),b!==Z.current.items&&(Z.current.items=b)},[me,Ve,w,b]),o.useEffect(()=>{if(Y===Z.current.activeId)return;if(Y!=null&&Z.current.activeId==null)return void(Z.current.activeId=Y);const H=setTimeout(()=>{Z.current.activeId=Y},50);return()=>clearTimeout(H)},[Y]),{active:W,activeIndex:m,attributes:U,data:v,rect:q,index:j,newIndex:Ve,items:b,isOver:D,isSorting:me,isDragging:k,listeners:F,node:K,overIndex:P,over:B,setNodeRef:be,setActivatorNodeRef:Q,setDroppableNodeRef:O,setDraggableNodeRef:z,transform:Ce??fe,transition:(function(){if(Ce||de&&Z.current.newIndex===j)return ca;if(!(je&&!Un(ge)||!y)&&(me||ke))return Vt.Transition.toString({...y,property:nl})})()}}function Bn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ga=[Qe.Down,Qe.Right,Qe.Up,Qe.Left],ha=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:f,scrollableAncestors:h}}=t;if(ga.includes(e.code)){if(e.preventDefault(),!n||!i)return;const s=[];l.getEnabled().forEach(w=>{if(!w||w!=null&&w.disabled)return;const m=a.get(w.id);if(m)switch(e.code){case Qe.Down:i.top<m.top&&s.push(w);break;case Qe.Up:i.top>m.top&&s.push(w);break;case Qe.Left:i.left>m.left&&s.push(w);break;case Qe.Right:i.left<m.left&&s.push(w)}});const y=(w=>{let{collisionRect:m,droppableRects:M,droppableContainers:T}=w;const N=$o(m),P=[];for(const $ of T){const{id:V}=$,S=M.get(V);if(S){const j=$o(S),v=N.reduce((q,K,D)=>q+Dr(j[D],K),0),A=Number((v/4).toFixed(4));P.push({id:V,data:{droppableContainer:$,value:A}})}}return P.sort(zr)})({collisionRect:i,droppableRects:a,droppableContainers:s});let b=Nr(y,"id");if(b===f?.id&&y.length>1&&(b=y[1].id),b!=null){const w=l.get(n.id),m=l.get(b),M=m?a.get(m.id):null,T=m?.node.current;if(T&&M&&w&&m){const N=Kn(T).some((j,v)=>h[v]!==j),P=ar(w,m),$=(function(j,v){return!Bn(j)||!Bn(v)||!ar(j,v)?!1:j.data.current.sortable.index<v.data.current.sortable.index})(w,m),V=N||!P?{x:0,y:0}:{x:$?i.width-M.width:0,y:$?i.height-M.height:0},S={x:M.left,y:M.top};return V.x&&V.y?S:gn(S,V)}}}};function ar(e,t){return!(!Bn(e)||!Bn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ma=e=>{let{transform:t}=e;return{...t,y:0}},ol=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:f,editable:h,selectedIndex:s,background:y,activeColor:b,borderColor:w,borderWidth:m,dragging:M,...T}=e;return c.jsxs("div",{ref:t,className:dt(a),style:{...i,display:"flex",flexDirection:"column",background:s===l?"white":y,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===l?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...T,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:s===l?"0px":"-1px",marginTop:s===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===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:s===l&&b?b?.toCSS():"none",minHeight:"2px"}})]})})),It={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"},To=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:f,index:h,listeners:s,onRemove:y,renderItem:b,sorting:w,style:m,transition:M,transform:T,value:N,wrapperStyle:P,...$},V)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const S=b?b({dragOverlay:!!t,dragging:!!n,sorting:!!w,index:h,fadeIn:!!a,listeners:s,ref:V,style:m,transform:T,transition:M,value:N}):c.jsx(c.Fragment,{children:N});return c.jsx("div",{className:dt("tab-item",It.Wrapper,a&&It.fadeIn,w&&It.sorting,t&&It.dragOverlay),style:{...P,transition:[M,P?.transition].filter(Boolean).join(", "),"--translate-x":T?`${Math.round(T.x)}px`:void 0,"--translate-y":T?`${Math.round(T.y)}px`:void 0,"--scale-x":T?.scaleX?`${T.scaleX}`:void 0,"--scale-y":T?.scaleY?`${T.scaleY}`:void 0,"--index":h},ref:V,children:c.jsx("div",{className:dt(It.Item,n&&It.dragging,l&&It.withHandle,t&&It.dragOverlay,i&&It.disabled,e&&It.color,"dragging"),style:m,"data-cypress":"draggable-item",...l?void 0:s,...$,tabIndex:l?void 0:-1,children:S})})})),sr={Row:"_Row_1kr10_1"},rl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:dt(sr.Row,t&&sr.horizontal),children:e}))),fa={...Qr},pa=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:f=wi,coordinateGetter:h=ha,dropAnimation:s=fa,getItemStyles:y=()=>({}),getNewIndex:b,handle:w=!1,items:m,onMove:M,isDisabled:T=()=>!1,measuring:N,modifiers:P,renderItem:$,renderDivider:V,reorderItems:S=ko,strategy:j=Mo,style:v,useDragOverlay:A=!0,onDragStart:q,wrapperStyle:K=()=>({})}=e,[D,O]=o.useState(()=>m);o.useEffect(()=>{O(m)},[m]);const[W,ge]=o.useState(null),_=(function(){for(var B=arguments.length,Q=new Array(B),oe=0;oe<B;oe++)Q[oe]=arguments[oe];return o.useMemo(()=>[...Q].filter(be=>be!=null),[...Q])})(io($r,{activationConstraint:i}),io(Gr,{activationConstraint:i}),io(So,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:h})),U=D.indexOf.bind(D),z=W?U(W):-1,F=[];D.map((B,Q)=>{F.push(c.jsx(va,{id:B,handle:w,index:Q,style:y,wrapperStyle:K,disabled:T(B),renderItem:$,animateLayoutChanges:a,useDragOverlay:A,getNewIndex:b},B+"-"+Q));const oe=V?.({key:"divider-"+Q});oe&&F.push(oe)});const{getPortalContainer:k}=r.useFullscreenPortal();return c.jsxs(Ui,{sensors:_,collisionDetection:f,onDragStart:B=>{const{active:Q}=B;Q&&(q?.(B),ge(Q.id))},autoScroll:{canScroll:B=>!0},onDragEnd:B=>{if(ge(null),B.over){const Q=U(B.over.id);z!==Q&&(O(oe=>S(oe,z,Q)),M?.(z,Q))}},onDragCancel:()=>{ge(null)},measuring:N,modifiers:P,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...v},className:dt(n,It.Wrapper),children:c.jsx(la,{items:D,strategy:j,children:c.jsx(rl,{ref:t,children:F})})}),A?Ht.createPortal(c.jsx(na,{adjustScale:l,dropAnimation:s,children:W?c.jsx(To,{value:D[z],handle:w,renderItem:$,wrapperStyle:K({index:z,isDragging:!0,id:D[z]}),index:z,dragging:!0,style:y({id:D[z],index:z,isSorting:W!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),k()):null]})}));function va({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:f,style:h,renderItem:s,useDragOverlay:y,wrapperStyle:b}){const{attributes:w,isDragging:m,isSorting:M,listeners:T,overIndex:N,setNodeRef:P,transform:$,transition:V}=ua({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(To,{ref:P,value:a,disabled:e,dragging:m,sorting:M,handle:i,renderItem:s,index:l,style:h({index:l,id:a,isDragging:m,isSorting:M,overIndex:N}),onRemove:f?()=>f(a):void 0,transform:$,transition:V,wrapperStyle:b({index:l,isDragging:m,id:a}),listeners:T,"data-index":l,"data-id":a,dragOverlay:!y&&m,...w})}const Ca="_TabStrip_3x0dp_1",ya=new d.Color("rgb(33, 115, 70)"),wa="#eee",ba=e=>c.jsx(ol,{...e}),ll=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:f=[],onSelectedTabIndexChange:h,onTabNameChange:s,onTabMove:y,createScrollStartButton:b=r.defaultCreateScrollStartButton,createScrollEndButton:w=r.defaultCreateScrollEndButton,createScrollEdgeButton:m=r.defaultCreateScrollEdgeButton,createTabButton:M=ba,createTabDivider:T,editLabelProps:N,disabled:P=!1,disableDrag:$=!1,background:V="white",activeColor:S=ya,borderColor:j=wa,borderWidth:v=1}=e,[A,q]=o.useState(l),[K,D]=o.useState(f),O=o.useCallback(ie=>{const ve=k.current?.[ie]?.closest(".tab-item")??k.current?.[ie];ve&&je.current?.scrollTo({top:ve.offsetTop,left:ve.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{O(l)},[l]);const W=o.useCallback((ie,ve)=>{ve!==A&&(q(ve),h?.(ve)),O(ve)},[h,A]),ge=o.useCallback((ie,ve)=>{y?.(ie,ve)},[y]),_=o.useRef(null),[U,z]=o.useState(-1),F=o.useCallback((ie,ve)=>{s?.(ie,ve)},[s]);o.useLayoutEffect(()=>{q(l)},[l]),o.useLayoutEffect(()=>{D(f)},[f]);const k=o.useRef([]),B=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ie){k.current?.[ie]?.startEdit()},cancel(ie){k.current?.[ie]?.cancel()}},B.current),[A,U]);const Q=o.useCallback(({value:ie,index:ve,dragging:Ae})=>{const{style:xe,maxLength:Oe,...Be}=N||{},p=c.jsx(Ir,{ref:Pe=>{k.current[ve]=Pe},value:ie,disabled:P,maxLength:Oe,style:{color:A===ve&&S?S?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...xe},styleHover:{},onSubmit:Pe=>(_.current=!1,z(-1),F(ve,Pe)),onCancel:()=>{_.current=!1,z(-1)},onChange:Pe=>{_.current=!0,z(ve)},...Be});return M({onClick:Pe=>W(Pe,ve),value:ie,index:ve,editing:U===ve&&_.current,editable:!0,disabled:P,selectedIndex:A,background:V,activeColor:S,borderColor:j,borderWidth:v,dragging:Ae,children:p})},[A,F,W,N,P,U,M]),[oe,{width:be}]=Xt(),[me,{width:ze}]=Xt(),je=o.useRef(null),[De,fe]=o.useState({left:0,top:0,width:0,height:0}),[Ve,Y]=o.useState(null);o.useEffect(()=>{Ve!==null&&je.current&&je.current.scrollTo({left:Ve,behavior:"smooth"})},[Ve]);const Z=o.useCallback((ie,ve=!1)=>{if(!je.current)return 0;let Ae=je.current.firstChild.getBoundingClientRect(),xe=je.current.firstChild.firstChild.children,Oe=0;return Oe=ve?0:r.ScrollUtils.getScrollTo(ie,Ae.left,xe,!0,Math.max(0,ie-200)),Y(Oe),Math.max(0,Oe)},[]),de=o.useCallback((ie,ve=!1)=>{if(!je.current)return 0;let Ae=je.current.firstChild.getBoundingClientRect(),xe=je.current.firstChild.firstChild.children,Oe=0;const Be=Math.ceil(ze-be);return Oe=ve?Be:r.ScrollUtils.getScrollTo(ie,Ae.left,xe,!1,Math.max(0,ie+200)),Y(Oe),Math.min(Be,Oe)},[ze,be]),ke=o.useRef(null),Ce=o.useRef(null),H=o.useCallback(()=>{Ce.current&&(clearTimeout(Ce.current),Ce.current=null,ke.current=null)},[]),ee=o.useCallback((ie,ve,Ae=260)=>{ke.current=ie,Ce.current=setTimeout(()=>{const xe=ve?Z(ke.current||ie):de(ke.current||ie);xe!==ke.current?ee(xe,ve,120):H()},Ae)},[Z,de,H]);o.useEffect(()=>()=>H(),[H]);const ce=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(De.left)<=0||Math.floor(ze-be)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:H,onMouseLeave:H,onMouseDown:()=>ee(je.current.scrollLeft,!0),onClick:ie=>Z(Math.min(je.current.scrollLeft,Ve??Number.MAX_SAFE_INTEGER),ie.ctrlKey)}),[De,Ve,ze,be]),le=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(ze-be)<=Math.ceil(De.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:H,onMouseLeave:H,onMouseDown:()=>ee(je.current.scrollLeft,!1),onClick:ie=>de(Math.max(je.current.scrollLeft,Ve??0),ie.ctrlKey)}),[De,Ve,ze,be]),Re=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,m?.(ce)]}),[ce,le,b,w,n,m]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:dt(Ca,a),ref:B,children:[c.jsx("div",{style:{borderTop:`solid ${j} ${v}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Re}),c.jsx("div",{className:"Tabs",ref:oe,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:je,onScroll:ie=>{fe({left:ie.target.scrollLeft,top:ie.target.scrollTop,width:ie.target.scrollWidth,height:ie.target.scrollHeight})},children:c.jsx(pa,{isDisabled:ie=>P||$,items:K,strategy:ra,modifiers:[ma],ref:me,renderItem:Q,renderDivider:T,onMove:ge,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:m(le)})]})}));ll.displayName="TabStrip";const Fn=o.createContext(null);Fn.displayName="DocThemesContext";const xa="_script-editor_iy654_5",qa={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"},Sa=o.lazy(()=>Promise.resolve().then(()=>require("./CSlTIOYNouZYe76z.cjs")));let rn,ln,Lt=["define","require"],cr=!1,An="@0.7.16";An!=="@local"&&An!=="@0.0.0"||(An="");const Ra=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${An}/types/scripting.d.ts`,dr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),f=await l.getNavigationTree(i.uri.toString()),h=e.getPosition();let s={...h};s.lineNumber=1,s.column=1;let y=!1;for(let N=h.lineNumber;N>=1;N--)if(i.getLineContent(N).trim()===""){const P=Io(f,i.getOffsetAt({lineNumber:N,column:1}),"function");if(!P||Ma(P)){y=!0,s.lineNumber=N+1;break}{const $=P.spans[0].start;N=i.getPositionAt($).lineNumber,s.lineNumber=N}}let b=n,w=!1;!y&&!b.startsWith(`
27
+ `},pi={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function vi(e){let{announcements:t=pi,container:n,hiddenTextDescribedById:i,screenReaderInstructions:a=fi}=e;const{announce:l,announcement:f}=(function(){const[w,m]=o.useState("");return{announce:o.useCallback(M=>{M!=null&&m(M)},[]),announcement:w}})(),h=fn("DndLiveRegion"),[s,y]=o.useState(!1);if(o.useEffect(()=>{y(!0)},[]),(function(w){const m=o.useContext(Ar);o.useEffect(()=>{if(!m)throw new Error("useDndMonitor must be used within a children of <DndContext>");return m(w)},[w,m])})(o.useMemo(()=>({onDragStart(w){let{active:m}=w;l(t.onDragStart({active:m}))},onDragMove(w){let{active:m,over:M}=w;t.onDragMove&&l(t.onDragMove({active:m,over:M}))},onDragOver(w){let{active:m,over:M}=w;l(t.onDragOver({active:m,over:M}))},onDragEnd(w){let{active:m,over:M}=w;l(t.onDragEnd({active:m,over:M}))},onDragCancel(w){let{active:m,over:M}=w;l(t.onDragCancel({active:m,over:M}))}}),[l,t])),!s)return null;const b=o.createElement(o.Fragment,null,o.createElement(hi,{id:i,value:a.draggable}),o.createElement(mi,{id:h,announcement:f}));return n?Ht.createPortal(b,n):b}var mt;function Pn(){}function io(e,t){return o.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(mt||(mt={}));const Ft=Object.freeze({x:0,y:0});function Dr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ci(e,t){const n=Ln(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function zr(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return n-i}function yi(e,t){let{data:{value:n}}=e,{data:{value:i}}=t;return i-n}function $o(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 Nr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Go(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const wi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=Go(t,t.left,t.top),l=[];for(const f of i){const{id:h}=f,s=n.get(h);if(s){const y=Dr(Go(s),a);l.push({id:h,data:{droppableContainer:f,value:y}})}}return l.sort(zr)};function bi(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),f=a-i,h=l-n;if(i<a&&n<l){const s=t.width*t.height,y=e.width*e.height,b=f*h;return Number((b/(s+y-b)).toFixed(4))}return 0}const xi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:i}=e;const a=[];for(const l of i){const{id:f}=l,h=n.get(f);if(h){const s=bi(h,t);s>0&&a.push({id:f,data:{droppableContainer:l,value:s}})}}return a.sort(yi)};function _o(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Ft}function qi(e){return function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];return i.reduce((l,f)=>({...l,top:l.top+e*f.y,bottom:l.bottom+e*f.y,left:l.left+e*f.x,right:l.right+e*f.x}),{...t})}}const Si=qi(1);function Lr(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const Ri={ignoreTransform:!1};function en(e,t){t===void 0&&(t=Ri);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:y,transformOrigin:b}=xt(e).getComputedStyle(e);y&&(n=(function(w,m,M){const T=Lr(m);if(!T)return w;const{scaleX:N,scaleY:P,x:$,y:V}=T,S=w.left-$-(1-N)*parseFloat(M),j=w.top-V-(1-P)*parseFloat(M.slice(M.indexOf(" ")+1)),v=N?w.width/N:w.width,A=P?w.height/P:w.height;return{width:v,height:A,top:j,right:S+v,bottom:j+A,left:S}})(n,y,b))}const{top:i,left:a,width:l,height:f,bottom:h,right:s}=n;return{top:i,left:a,width:l,height:f,bottom:h,right:s}}function Zo(e){return en(e,{ignoreTransform:!0})}function Kn(e,t){const n=[];return e?(function i(a){if(t!=null&&n.length>=t||!a)return n;if(qo(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!mn(a)||Er(a)||n.includes(a))return n;const l=xt(e).getComputedStyle(a);return a!==e&&(function(f,h){h===void 0&&(h=xt(f).getComputedStyle(f));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(y=>{const b=h[y];return typeof b=="string"&&s.test(b)})})(a,l)&&n.push(a),(function(f,h){return h===void 0&&(h=xt(f).getComputedStyle(f)),h.position==="fixed"})(a,l)?n:i(a.parentNode)})(e):n}function Pr(e){const[t]=Kn(e,1);return t??null}function ao(e){return Hn&&e?Qt(e)?e:xo(e)?qo(e)||e===Jt(e).scrollingElement?window:mn(e)?e:null:null:null}function jr(e){return Qt(e)?e.scrollX:e.scrollLeft}function Or(e){return Qt(e)?e.scrollY:e.scrollTop}function go(e){return{x:jr(e),y:Or(e)}}var pt;function Br(e){return!(!Hn||!e)&&e===document.scrollingElement}function Hr(e){const t={x:0,y:0},n=Br(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"})(pt||(pt={}));const ki={x:.2,y:.2};function Mi(e,t,n,i,a){let{top:l,left:f,right:h,bottom:s}=n;i===void 0&&(i=10),a===void 0&&(a=ki);const{isTop:y,isBottom:b,isLeft:w,isRight:m}=Hr(e),M={x:0,y:0},T={x:0,y:0},N=t.height*a.y,P=t.width*a.x;return!y&&l<=t.top+N?(M.y=pt.Backward,T.y=i*Math.abs((t.top+N-l)/N)):!b&&s>=t.bottom-N&&(M.y=pt.Forward,T.y=i*Math.abs((t.bottom-N-s)/N)),!m&&h>=t.right-P?(M.x=pt.Forward,T.x=i*Math.abs((t.right-P-h)/P)):!w&&f<=t.left+P&&(M.x=pt.Backward,T.x=i*Math.abs((t.left+P-f)/P)),{direction:M,speed:T}}function Ti(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:f}=window;return{top:0,left:0,right:l,bottom:f,width:l,height:f}}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 Vr(e){return e.reduce((t,n)=>Zt(t,go(n)),Ft)}function Ur(e,t){if(t===void 0&&(t=en),!e)return;const{top:n,left:i,bottom:a,right:l}=t(e);Pr(e)&&(a<=0||l<=0||n>=window.innerHeight||i>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ii=[["x",["left","right"],function(e){return e.reduce((t,n)=>t+jr(n),0)}],["y",["top","bottom"],function(e){return e.reduce((t,n)=>t+Or(n),0)}]];class ho{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Kn(n),a=Vr(i);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,f,h]of Ii)for(const s of f)Object.defineProperty(this,s,{get:()=>{const y=h(i),b=a[l]-y;return this.rect[s]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class sn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...n)})},this.target=t}add(t,n,i){var a;(a=this.target)==null||a.addEventListener(t,n,i),this.listeners.push([t,n,i])}}function so(e,t){const n=Math.abs(e.x),i=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+i**2)>t:"x"in t&&"y"in t?n>t.x&&i>t.y:"x"in t?n>t.x:"y"in t&&i>t.y}var Mt,Qe;function Xo(e){e.preventDefault()}function Ei(e){e.stopPropagation()}(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Mt||(Mt={})),(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"})(Qe||(Qe={}));const Kr={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter,Qe.Tab]},Fi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class So{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 sn(Jt(n)),this.windowListeners=new sn(xt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Mt.Resize,this.handleCancel),this.windowListeners.add(Mt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Mt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,i=t.node.current;i&&Ur(i),n(Ft)}handleKeyDown(t){if(Un(t)){const{active:n,context:i,options:a}=this.props,{keyboardCodes:l=Kr,coordinateGetter:f=Fi,scrollBehavior:h="smooth"}=a,{code:s}=t;if(l.end.includes(s))return void this.handleEnd(t);if(l.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:y}=i.current,b=y?{x:y.left,y:y.top}:Ft;this.referenceCoordinates||(this.referenceCoordinates=b);const w=f(t,{active:n,context:i.current,currentCoordinates:b});if(w){const m=gn(w,b),M={x:0,y:0},{scrollableAncestors:T}=i.current;for(const N of T){const P=t.code,{isTop:$,isRight:V,isLeft:S,isBottom:j,maxScroll:v,minScroll:A}=Hr(N),q=Ti(N),K={x:Math.min(P===Qe.Right?q.right-q.width/2:q.right,Math.max(P===Qe.Right?q.left:q.left+q.width/2,w.x)),y:Math.min(P===Qe.Down?q.bottom-q.height/2:q.bottom,Math.max(P===Qe.Down?q.top:q.top+q.height/2,w.y))},D=P===Qe.Right&&!V||P===Qe.Left&&!S,O=P===Qe.Down&&!j||P===Qe.Up&&!$;if(D&&K.x!==w.x){const W=N.scrollLeft+m.x,ge=P===Qe.Right&&W<=v.x||P===Qe.Left&&W>=A.x;if(ge&&!m.y)return void N.scrollTo({left:W,behavior:h});M.x=ge?N.scrollLeft-W:P===Qe.Right?N.scrollLeft-v.x:N.scrollLeft-A.x,M.x&&N.scrollBy({left:-M.x,behavior:h});break}if(O&&K.y!==w.y){const W=N.scrollTop+m.y,ge=P===Qe.Down&&W<=v.y||P===Qe.Up&&W>=A.y;if(ge&&!m.x)return void N.scrollTo({top:W,behavior:h});M.y=ge?N.scrollTop-W:P===Qe.Down?N.scrollTop-v.y:N.scrollTop-A.y,M.y&&N.scrollBy({top:-M.y,behavior:h});break}}this.handleMove(t,Zt(gn(w,this.referenceCoordinates),M))}}}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 Yo(e){return!!(e&&"distance"in e)}function Jo(e){return!!(e&&"delay"in e)}So.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:i=Kr,onActivation:a}=t,{active:l}=n;const{code:f}=e.nativeEvent;if(i.start.includes(f)){const h=l.activatorNode.current;return(!h||e.target===h)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Ro{constructor(t,n,i){var a;i===void 0&&(i=(function(h){const{EventTarget:s}=xt(h);return h instanceof s?h:Jt(h)})(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:f}=l;this.props=t,this.events=n,this.document=Jt(f),this.documentListeners=new sn(this.document),this.listeners=new sn(i),this.windowListeners=new sn(xt(f)),this.initialCoordinates=(a=Ln(l))!=null?a:Ft,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(Mt.Resize,this.handleCancel),this.windowListeners.add(Mt.DragStart,Xo),this.windowListeners.add(Mt.VisibilityChange,this.handleCancel),this.windowListeners.add(Mt.ContextMenu,Xo),this.documentListeners.add(Mt.Keydown,this.handleKeydown),n){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Jo(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(Yo(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(Mt.Click,Ei,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Mt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:i,initialCoordinates:a,props:l}=this,{onMove:f,options:{activationConstraint:h}}=l;if(!a)return;const s=(n=Ln(t))!=null?n:Ft,y=gn(a,s);if(!i&&h){if(Yo(h)){if(h.tolerance!=null&&so(y,h.tolerance))return this.handleCancel();if(so(y,h.distance))return this.handleStart()}return Jo(h)&&so(y,h.tolerance)?this.handleCancel():void this.handlePending(h,y)}t.cancelable&&t.preventDefault(),f(s)}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===Qe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Ai={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Wr extends Ro{constructor(t){const{event:n}=t,i=Jt(n.target);super(t,Ai,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 Di={move:{name:"mousemove"},end:{name:"mouseup"}};var mo;(function(e){e[e.RightClick=2]="RightClick"})(mo||(mo={}));class $r extends Ro{constructor(t){super(t,Di,Jt(t.event.target))}}$r.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:i}=t;return n.button!==mo.RightClick&&(i?.({event:n}),!0)}}];const co={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Gr extends Ro{constructor(t){super(t,co)}static setup(){return window.addEventListener(co.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(co.move.name,t)};function t(){}}}var cn,jn;function zi(e){let{acceleration:t,activator:n=cn.Pointer,canScroll:i,draggingRect:a,enabled:l,interval:f=5,order:h=jn.TreeOrder,pointerCoordinates:s,scrollableAncestors:y,scrollableAncestorRects:b,delta:w,threshold:m}=e;const M=(function(A){let{delta:q,disabled:K}=A;const D=Nn(q);return an(O=>{if(K||!D||!O)return Ni;const W={x:Math.sign(q.x-D.x),y:Math.sign(q.y-D.y)};return{x:{[pt.Backward]:O.x[pt.Backward]||W.x===-1,[pt.Forward]:O.x[pt.Forward]||W.x===1},y:{[pt.Backward]:O.y[pt.Backward]||W.y===-1,[pt.Forward]:O.y[pt.Forward]||W.y===1}}},[K,q,D])})({delta:w,disabled:!l}),[T,N]=(function(){const A=o.useRef(null);return[o.useCallback((q,K)=>{A.current=setInterval(q,K)},[]),o.useCallback(()=>{A.current!==null&&(clearInterval(A.current),A.current=null)},[])]})(),P=o.useRef({x:0,y:0}),$=o.useRef({x:0,y:0}),V=o.useMemo(()=>{switch(n){case cn.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case cn.DraggableRect:return a}},[n,a,s]),S=o.useRef(null),j=o.useCallback(()=>{const A=S.current;if(!A)return;const q=P.current.x*$.current.x,K=P.current.y*$.current.y;A.scrollBy(q,K)},[]),v=o.useMemo(()=>h===jn.TreeOrder?[...y].reverse():y,[h,y]);o.useEffect(()=>{if(l&&y.length&&V){for(const A of v){if(i?.(A)===!1)continue;const q=y.indexOf(A),K=b[q];if(!K)continue;const{direction:D,speed:O}=Mi(A,K,V,t,m);for(const W of["x","y"])M[W][D[W]]||(O[W]=0,D[W]=0);if(O.x>0||O.y>0)return N(),S.current=A,T(j,f),P.current=O,void($.current=D)}P.current={x:0,y:0},$.current={x:0,y:0},N()}else N()},[t,j,i,N,l,f,JSON.stringify(V),JSON.stringify(M),T,y,v,b,JSON.stringify(m)])}Gr.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"})(cn||(cn={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(jn||(jn={}));const Ni={x:{[pt.Backward]:!1,[pt.Forward]:!1},y:{[pt.Backward]:!1,[pt.Forward]:!1}};var hn,fo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(hn||(hn={})),(function(e){e.Optimized="optimized"})(fo||(fo={}));const Qo=new Map;function po(e,t){return an(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function On(e){let{callback:t,disabled:n}=e;const i=Vn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:l}=window;return new l(i)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Li(e){return new ho(en(e),e)}function er(e,t,n){t===void 0&&(t=Li);const[i,a]=o.useState(null);function l(){a(s=>{if(!e)return null;var y;if(e.isConnected===!1)return(y=s??n)!=null?y:null;const b=t(e);return JSON.stringify(s)===JSON.stringify(b)?s:b})}const f=(function(s){let{callback:y,disabled:b}=s;const w=Vn(y),m=o.useMemo(()=>{if(b||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:M}=window;return new M(w)},[w,b]);return o.useEffect(()=>()=>m?.disconnect(),[m]),m})({callback(s){if(e)for(const y of s){const{type:b,target:w}=y;if(b==="childList"&&w instanceof HTMLElement&&w.contains(e)){l();break}}}}),h=On({callback:l});return Et(()=>{l(),e?(h?.observe(e),f?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),f?.disconnect())},[e]),i}const tr=[];function nr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const i=e!==Ft;i&&!n.current&&(n.current=e),!i&&n.current&&(n.current=null)},[e]),n.current?gn(e,n.current):Ft}function or(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 rr=[];function _r(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return mn(t)?t:e}const Pi=[{sensor:Wr,options:{}},{sensor:So,options:{}}],ji={current:{}},En={draggable:{measure:Zo},droppable:{measure:Zo,strategy:hn.WhileDragging,frequency:fo.Optimized},dragOverlay:{measure:en}};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 Oi={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:Pn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:En,measureDroppableContainers:Pn,windowRect:null,measuringScheduled:!1},Zr={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Pn,draggableNodes:new Map,over:null,measureDroppableContainers:Pn},pn=o.createContext(Zr),Xr=o.createContext(Oi);function Bi(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new dn}}}function Hi(e,t){switch(t.type){case mt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case mt.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 mt.DragEnd:case mt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case mt.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 mt.SetDroppableDisabled:{const{id:n,key:i,disabled:a}=t,l=e.droppable.containers.get(n);if(!l||i!==l.key)return e;const f=new dn(e.droppable.containers);return f.set(n,{...l,disabled:a}),{...e,droppable:{...e.droppable,containers:f}}}case mt.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 Vi(e){let{disabled:t}=e;const{active:n,activatorEvent:i,draggableNodes:a}=o.useContext(pn),l=Nn(i),f=Nn(n?.id);return o.useEffect(()=>{if(!t&&!i&&l&&f!=null){if(!Un(l)||document.activeElement===l.target)return;const h=a.get(f);if(!h)return;const{activatorNode:s,node:y}=h;if(!s.current&&!y.current)return;requestAnimationFrame(()=>{for(const b of[s.current,y.current]){if(!b)continue;const w=ui(b);if(w){w.focus();break}}})}},[i,t,a,f,l]),null}function Yr(e,t){let{transform:n,...i}=t;return e!=null&&e.length?e.reduce((a,l)=>l({transform:a,...i}),n):n}const Wn=o.createContext({...Ft,scaleX:1,scaleY:1});var Pt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Pt||(Pt={}));const Ui=o.memo(function(e){var t,n,i,a;let{id:l,accessibility:f,autoScroll:h=!0,children:s,sensors:y=Pi,collisionDetection:b=xi,measuring:w,modifiers:m,...M}=e;const T=o.useReducer(Hi,void 0,Bi),[N,P]=T,[$,V]=(function(){const[u]=o.useState(()=>new Set),x=o.useCallback(E=>(u.add(E),()=>u.delete(E)),[u]);return[o.useCallback(E=>{let{type:re,event:pe}=E;u.forEach(se=>{var ne;return(ne=se[re])==null?void 0:ne.call(se,pe)})},[u]),x]})(),[S,j]=o.useState(Pt.Uninitialized),v=S===Pt.Initialized,{draggable:{active:A,nodes:q,translate:K},droppable:{containers:D}}=N,O=A!=null?q.get(A):null,W=o.useRef({initial:null,translated:null}),ge=o.useMemo(()=>{var u;return A!=null?{id:A,data:(u=O?.data)!=null?u:ji,rect:W}:null},[A,O]),_=o.useRef(null),[U,z]=o.useState(null),[F,k]=o.useState(null),B=un(M,Object.values(M)),Q=fn("DndDescribedBy",l),oe=o.useMemo(()=>D.getEnabled(),[D]),be=(me=w,o.useMemo(()=>({draggable:{...En.draggable,...me?.draggable},droppable:{...En.droppable,...me?.droppable},dragOverlay:{...En.dragOverlay,...me?.dragOverlay}}),[me?.draggable,me?.droppable,me?.dragOverlay]));var me;const{droppableRects:ze,measureDroppableContainers:je,measuringScheduled:De}=(function(u,x){let{dragging:E,dependencies:re,config:pe}=x;const[se,ne]=o.useState(null),{frequency:ae,measure:ue,strategy:we}=pe,He=o.useRef(u),Te=(function(){switch(we){case hn.Always:return!1;case hn.BeforeDragging:return E;default:return!E}})(),Ie=un(Te),Ke=o.useCallback(function(Ye){Ye===void 0&&(Ye=[]),Ie.current||ne(Je=>Je===null?Ye:Je.concat(Ye.filter(Le=>!Je.includes(Le))))},[Ie]),_e=o.useRef(null),$e=an(Ye=>{if(Te&&!E)return Qo;if(!Ye||Ye===Qo||He.current!==u||se!=null){const Je=new Map;for(let Le of u){if(!Le)continue;if(se&&se.length>0&&!se.includes(Le.id)&&Le.rect.current){Je.set(Le.id,Le.rect.current);continue}const Xe=Le.node.current,vt=Xe?new ho(ue(Xe),Xe):null;Le.rect.current=vt,vt&&Je.set(Le.id,vt)}return Je}return Ye},[u,se,E,Te,ue]);return o.useEffect(()=>{He.current=u},[u]),o.useEffect(()=>{Te||Ke()},[E,Te]),o.useEffect(()=>{se&&se.length>0&&ne(null)},[JSON.stringify(se)]),o.useEffect(()=>{Te||typeof ae!="number"||_e.current!==null||(_e.current=setTimeout(()=>{Ke(),_e.current=null},ae))},[ae,Te,Ke,...re]),{droppableRects:$e,measureDroppableContainers:Ke,measuringScheduled:se!=null}})(oe,{dragging:v,dependencies:[K.x,K.y],config:be.droppable}),fe=(function(u,x){const E=x!=null?u.get(x):void 0,re=E?E.node.current:null;return an(pe=>{var se;return x==null?null:(se=re??pe)!=null?se:null},[re,x])})(q,A),Ve=o.useMemo(()=>F?Ln(F):null,[F]),Y=(function(){const u=U?.autoScrollEnabled===!1,x=typeof h=="object"?h.enabled===!1:h===!1,E=v&&!u&&!x;return typeof h=="object"?{...h,enabled:E}:{enabled:E}})(),Z=(function(u,x){return po(u,x)})(fe,be.draggable.measure);(function(u){let{activeNode:x,measure:E,initialRect:re,config:pe=!0}=u;const se=o.useRef(!1),{x:ne,y:ae}=typeof pe=="boolean"?{x:pe,y:pe}:pe;Et(()=>{if(!ne&&!ae||!x)return void(se.current=!1);if(se.current||!re)return;const ue=x?.node.current;if(!ue||ue.isConnected===!1)return;const we=_o(E(ue),re);if(ne||(we.x=0),ae||(we.y=0),se.current=!0,Math.abs(we.x)>0||Math.abs(we.y)>0){const He=Pr(ue);He&&He.scrollBy({top:we.y,left:we.x})}},[x,ne,ae,re,E])})({activeNode:A!=null?q.get(A):null,config:Y.layoutShiftCompensation,initialRect:Z,measure:be.draggable.measure});const de=er(fe,be.draggable.measure,Z),ke=er(fe?fe.parentElement:null),Ce=o.useRef({activatorEvent:null,active:null,activeNode:fe,collisionRect:null,collisions:null,droppableRects:ze,draggableNodes:q,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),H=D.getNodeFor((t=Ce.current.over)==null?void 0:t.id),ee=(function(u){let{measure:x}=u;const[E,re]=o.useState(null),pe=On({callback:o.useCallback(ue=>{for(const{target:we}of ue)if(mn(we)){re(He=>{const Te=x(we);return He?{...He,width:Te.width,height:Te.height}:Te});break}},[x])}),se=o.useCallback(ue=>{const we=_r(ue);pe?.disconnect(),we&&pe?.observe(we),re(we?x(we):null)},[x,pe]),[ne,ae]=zn(se);return o.useMemo(()=>({nodeRef:ne,rect:E,setRef:ae}),[E,ne,ae])})({measure:be.dragOverlay.measure}),ce=(n=ee.nodeRef.current)!=null?n:fe,le=v?(i=ee.rect)!=null?i:de:null,Re=!!(ee.nodeRef.current&&ee.rect),ie=_o(ve=Re?null:de,po(ve));var ve;const Ae=or(ce?xt(ce):null),xe=(function(u){const x=o.useRef(u),E=an(re=>u?re&&re!==tr&&u&&x.current&&u.parentNode===x.current.parentNode?re:Kn(u):tr,[u]);return o.useEffect(()=>{x.current=u},[u]),E})(v?H??fe:null),Oe=(function(u,x){x===void 0&&(x=en);const[E]=u,re=or(E?xt(E):null),[pe,se]=o.useState(rr);function ne(){se(()=>u.length?u.map(ue=>Br(ue)?re:new ho(x(ue),ue)):rr)}const ae=On({callback:ne});return Et(()=>{ae?.disconnect(),ne(),u.forEach(ue=>ae?.observe(ue))},[u]),pe})(xe),Be=Yr(m,{transform:{x:K.x-ie.x,y:K.y-ie.y,scaleX:1,scaleY:1},activatorEvent:F,active:ge,activeNodeRect:de,containerNodeRect:ke,draggingNodeRect:le,over:Ce.current.over,overlayNodeRect:ee.rect,scrollableAncestors:xe,scrollableAncestorRects:Oe,windowRect:Ae}),p=Ve?Zt(Ve,K):null,Pe=(function(u){const[x,E]=o.useState(null),re=o.useRef(u),pe=o.useCallback(se=>{const ne=ao(se.target);ne&&E(ae=>ae?(ae.set(ne,go(ne)),new Map(ae)):null)},[]);return o.useEffect(()=>{const se=re.current;if(u!==se){ne(se);const ae=u.map(ue=>{const we=ao(ue);return we?(we.addEventListener("scroll",pe,{passive:!0}),[we,go(we)]):null}).filter(ue=>ue!=null);E(ae.length?new Map(ae):null),re.current=u}return()=>{ne(u),ne(se)};function ne(ae){ae.forEach(ue=>{const we=ao(ue);we?.removeEventListener("scroll",pe)})}},[pe,u]),o.useMemo(()=>u.length?x?Array.from(x.values()).reduce((se,ne)=>Zt(se,ne),Ft):Vr(u):Ft,[u,x])})(xe),tt=nr(Pe),te=nr(Pe,[de]),Me=Zt(Be,tt),Ne=le?Si(le,Be):null,Fe=ge&&Ne?b({active:ge,collisionRect:Ne,droppableRects:ze,droppableContainers:oe,pointerCoordinates:p}):null,Ee=Nr(Fe,"id"),[I,J]=o.useState(null),L=(function(u,x,E){return{...u,scaleX:x&&E?x.width/E.width:1,scaleY:x&&E?x.height/E.height:1}})(Re?Be:Zt(Be,te),(a=I?.rect)!=null?a:null,de),G=o.useRef(null),qe=o.useCallback((u,x)=>{let{sensor:E,options:re}=x;if(_.current==null)return;const pe=q.get(_.current);if(!pe)return;const se=u.nativeEvent,ne=new E({active:_.current,activeNode:pe,event:se,options:re,context:Ce,onAbort(ue){if(!q.get(ue))return;const{onDragAbort:we}=B.current,He={id:ue};we?.(He),$({type:"onDragAbort",event:He})},onPending(ue,we,He,Te){if(!q.get(ue))return;const{onDragPending:Ie}=B.current,Ke={id:ue,constraint:we,initialCoordinates:He,offset:Te};Ie?.(Ke),$({type:"onDragPending",event:Ke})},onStart(ue){const we=_.current;if(we==null)return;const He=q.get(we);if(!He)return;const{onDragStart:Te}=B.current,Ie={activatorEvent:se,active:{id:we,data:He.data,rect:W}};Ht.unstable_batchedUpdates(()=>{Te?.(Ie),j(Pt.Initializing),P({type:mt.DragStart,initialCoordinates:ue,active:we}),$({type:"onDragStart",event:Ie}),z(G.current),k(se)})},onMove(ue){P({type:mt.DragMove,coordinates:ue})},onEnd:ae(mt.DragEnd),onCancel:ae(mt.DragCancel)});function ae(ue){return async function(){const{active:we,collisions:He,over:Te,scrollAdjustedTranslate:Ie}=Ce.current;let Ke=null;if(we&&Ie){const{cancelDrop:_e}=B.current;Ke={activatorEvent:se,active:we,collisions:He,delta:Ie,over:Te},ue===mt.DragEnd&&typeof _e=="function"&&await Promise.resolve(_e(Ke))&&(ue=mt.DragCancel)}_.current=null,Ht.unstable_batchedUpdates(()=>{P({type:ue}),j(Pt.Uninitialized),J(null),z(null),k(null),G.current=null;const _e=ue===mt.DragEnd?"onDragEnd":"onDragCancel";if(Ke){const $e=B.current[_e];$e?.(Ke),$({type:_e,event:Ke})}})}}G.current=ne},[q]),ye=o.useCallback((u,x)=>(E,re)=>{const pe=E.nativeEvent,se=q.get(re);if(_.current!==null||!se||pe.dndKit||pe.defaultPrevented)return;const ne={active:se};u(E,x.options,ne)===!0&&(pe.dndKit={capturedBy:x.sensor},_.current=re,qe(E,x))},[q,qe]),g=(function(u,x){return o.useMemo(()=>u.reduce((E,re)=>{const{sensor:pe}=re;return[...E,...pe.activators.map(se=>({eventName:se.eventName,handler:x(se.handler,re)}))]},[]),[u,x])})(y,ye);(function(u){o.useEffect(()=>{if(!Hn)return;const x=u.map(E=>{let{sensor:re}=E;return re.setup==null?void 0:re.setup()});return()=>{for(const E of x)E?.()}},u.map(x=>{let{sensor:E}=x;return E}))})(y),Et(()=>{de&&S===Pt.Initializing&&j(Pt.Initialized)},[de,S]),o.useEffect(()=>{const{onDragMove:u}=B.current,{active:x,activatorEvent:E,collisions:re,over:pe}=Ce.current;if(!x||!E)return;const se={active:x,activatorEvent:E,collisions:re,delta:{x:Me.x,y:Me.y},over:pe};Ht.unstable_batchedUpdates(()=>{u?.(se),$({type:"onDragMove",event:se})})},[Me.x,Me.y]),o.useEffect(()=>{const{active:u,activatorEvent:x,collisions:E,droppableContainers:re,scrollAdjustedTranslate:pe}=Ce.current;if(!u||_.current==null||!x||!pe)return;const{onDragOver:se}=B.current,ne=re.get(Ee),ae=ne&&ne.rect.current?{id:ne.id,rect:ne.rect.current,data:ne.data,disabled:ne.disabled}:null,ue={active:u,activatorEvent:x,collisions:E,delta:{x:pe.x,y:pe.y},over:ae};Ht.unstable_batchedUpdates(()=>{J(ae),se?.(ue),$({type:"onDragOver",event:ue})})},[Ee]),Et(()=>{Ce.current={activatorEvent:F,active:ge,activeNode:fe,collisionRect:Ne,collisions:Fe,droppableRects:ze,draggableNodes:q,draggingNode:ce,draggingNodeRect:le,droppableContainers:D,over:I,scrollableAncestors:xe,scrollAdjustedTranslate:Me},W.current={initial:le,translated:Ne}},[ge,fe,Fe,Ne,q,ce,le,ze,D,I,xe,Me]),zi({...Y,delta:K,draggingRect:Ne,pointerCoordinates:p,scrollableAncestors:xe,scrollableAncestorRects:Oe});const C=o.useMemo(()=>({active:ge,activeNode:fe,activeNodeRect:de,activatorEvent:F,collisions:Fe,containerNodeRect:ke,dragOverlay:ee,draggableNodes:q,droppableContainers:D,droppableRects:ze,over:I,measureDroppableContainers:je,scrollableAncestors:xe,scrollableAncestorRects:Oe,measuringConfiguration:be,measuringScheduled:De,windowRect:Ae}),[ge,fe,de,F,Fe,ke,ee,q,D,ze,I,je,xe,Oe,be,De,Ae]),R=o.useMemo(()=>({activatorEvent:F,activators:g,active:ge,activeNodeRect:de,ariaDescribedById:{draggable:Q},dispatch:P,draggableNodes:q,over:I,measureDroppableContainers:je}),[F,g,ge,de,P,Q,q,I,je]);return o.createElement(Ar.Provider,{value:V},o.createElement(pn.Provider,{value:R},o.createElement(Xr.Provider,{value:C},o.createElement(Wn.Provider,{value:L},s)),o.createElement(Vi,{disabled:f?.restoreFocus===!1})),o.createElement(vi,{...f,hiddenTextDescribedById:Q}))}),Ki=o.createContext(null),lr="button";function Wi(e){let{id:t,data:n,disabled:i=!1,attributes:a}=e;const l=fn("Draggable"),{activators:f,activatorEvent:h,active:s,activeNodeRect:y,ariaDescribedById:b,draggableNodes:w,over:m}=o.useContext(pn),{role:M=lr,roleDescription:T="draggable",tabIndex:N=0}=a??{},P=s?.id===t,$=o.useContext(P?Wn:Ki),[V,S]=zn(),[j,v]=zn(),A=(function(K,D){return o.useMemo(()=>K.reduce((O,W)=>{let{eventName:ge,handler:_}=W;return O[ge]=U=>{_(U,D)},O},{}),[K,D])})(f,t),q=un(n);return Et(()=>(w.set(t,{id:t,key:l,node:V,activatorNode:j,data:q}),()=>{const K=w.get(t);K&&K.key===l&&w.delete(t)}),[w,t]),{active:s,activatorEvent:h,activeNodeRect:y,attributes:o.useMemo(()=>({role:M,tabIndex:N,"aria-disabled":i,"aria-pressed":!(!P||M!==lr)||void 0,"aria-roledescription":T,"aria-describedby":b.draggable}),[i,M,N,P,T,b.draggable]),isDragging:P,listeners:i?void 0:A,node:V,over:m,setNodeRef:S,setActivatorNodeRef:v,transform:$}}function Jr(){return o.useContext(Xr)}const $i={timeout:25};function Gi(e){let{animation:t,children:n}=e;const[i,a]=o.useState(null),[l,f]=o.useState(null),h=Nn(n);return n||i||!h||a(h),Et(()=>{if(!l)return;const s=i?.key,y=i?.props.id;s!=null&&y!=null?Promise.resolve(t(y,l)).then(()=>{a(null)}):a(null)},[t,i,l]),o.createElement(o.Fragment,null,n,i?o.cloneElement(i,{ref:f}):null)}const _i={x:0,y:0,scaleX:1,scaleY:1};function Zi(e){let{children:t}=e;return o.createElement(pn.Provider,{value:Zr},o.createElement(Wn.Provider,{value:_i},t))}const Xi={position:"fixed",touchAction:"none"},Yi=e=>Un(e)?"transform 250ms ease":void 0,Ji=o.forwardRef((e,t)=>{let{as:n,activatorEvent:i,adjustScale:a,children:l,className:f,rect:h,style:s,transform:y,transition:b=Yi}=e;if(!h)return null;const w=a?y:{...y,scaleX:1,scaleY:1},m={...Xi,width:h.width,height:h.height,top:h.top,left:h.left,transform:Vt.Transform.toString(w),transformOrigin:a&&i?Ci(i,h):void 0,transition:typeof b=="function"?b(i):b,...s};return o.createElement(n,{className:f,style:m,ref:t},l)}),Qi=e=>t=>{let{active:n,dragOverlay:i}=t;const a={},{styles:l,className:f}=e;if(l!=null&&l.active)for(const[h,s]of Object.entries(l.active))s!==void 0&&(a[h]=n.node.style.getPropertyValue(h),n.node.style.setProperty(h,s));if(l!=null&&l.dragOverlay)for(const[h,s]of Object.entries(l.dragOverlay))s!==void 0&&i.node.style.setProperty(h,s);return f!=null&&f.active&&n.node.classList.add(f.active),f!=null&&f.dragOverlay&&i.node.classList.add(f.dragOverlay),function(){for(const[h,s]of Object.entries(a))n.node.style.setProperty(h,s);f!=null&&f.active&&n.node.classList.remove(f.active)}},Qr={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Vt.Transform.toString(t)},{transform:Vt.Transform.toString(n)}]},sideEffects:Qi({styles:{active:{opacity:"0"}}})};function ea(e){let{config:t,draggableNodes:n,droppableContainers:i,measuringConfiguration:a}=e;return Vn((l,f)=>{if(t===null)return;const h=n.get(l);if(!h)return;const s=h.node.current;if(!s)return;const y=_r(f);if(!y)return;const{transform:b}=xt(f).getComputedStyle(f),w=Lr(b);if(!w)return;const m=typeof t=="function"?t:(function(M){const{duration:T,easing:N,sideEffects:P,keyframes:$}={...Qr,...M};return V=>{let{active:S,dragOverlay:j,transform:v,...A}=V;if(!T)return;const q={x:j.rect.left-S.rect.left,y:j.rect.top-S.rect.top},K={scaleX:v.scaleX!==1?S.rect.width*v.scaleX/j.rect.width:1,scaleY:v.scaleY!==1?S.rect.height*v.scaleY/j.rect.height:1},D={x:v.x-q.x,y:v.y-q.y,...K},O=$({...A,active:S,dragOverlay:j,transform:{initial:v,final:D}}),[W]=O,ge=O[O.length-1];if(JSON.stringify(W)===JSON.stringify(ge))return;const _=P?.({active:S,dragOverlay:j,...A}),U=j.node.animate(O,{duration:T,easing:N,fill:"forwards"});return new Promise(z=>{U.onfinish=()=>{_?.(),z()}})}})(t);return Ur(s,a.draggable.measure),m({active:{id:l,data:h.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:f,rect:a.dragOverlay.measure(y)},droppableContainers:i,measuringConfiguration:a,transform:w})})}let ir=0;function ta(e){return o.useMemo(()=>{if(e!=null)return ir++,ir},[e])}const na=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:i,style:a,transition:l,modifiers:f,wrapperElement:h="div",className:s,zIndex:y=999}=e;const{activatorEvent:b,active:w,activeNodeRect:m,containerNodeRect:M,draggableNodes:T,droppableContainers:N,dragOverlay:P,over:$,measuringConfiguration:V,scrollableAncestors:S,scrollableAncestorRects:j,windowRect:v}=Jr(),A=o.useContext(Wn),q=ta(w?.id),K=Yr(f,{activatorEvent:b,active:w,activeNodeRect:m,containerNodeRect:M,draggingNodeRect:P.rect,over:$,overlayNodeRect:P.rect,scrollableAncestors:S,scrollableAncestorRects:j,transform:A,windowRect:v}),D=po(m),O=ea({config:i,draggableNodes:T,droppableContainers:N,measuringConfiguration:V}),W=D?P.setRef:void 0;return o.createElement(Zi,null,o.createElement(Gi,{animation:O},w&&q?o.createElement(Ji,{key:q,id:w.id,ref:W,as:h,activatorEvent:b,adjustScale:t,className:s,transition:l,rect:D,style:{zIndex:y,...a},transform:K},n):null))});function ko(e,t,n){const i=e.slice();return i.splice(n<0?i.length+n:n,0,i.splice(t,1)[0]),i}function oa(e,t){return e.reduce((n,i,a)=>{const l=t.get(i);return l&&(n[a]=l),n},Array(e.length))}function Tn(e){return e!==null&&e>=0}const In={scaleX:1,scaleY:1},ra=e=>{var t;let{rects:n,activeNodeRect:i,activeIndex:a,overIndex:l,index:f}=e;const h=(t=n[a])!=null?t:i;if(!h)return null;const s=(function(y,b,w){const m=y[b],M=y[b-1],T=y[b+1];return!m||!M&&!T?0:w<b?M?m.left-(M.left+M.width):T.left-(m.left+m.width):T?T.left-(m.left+m.width):m.left-(M.left+M.width)})(n,f,a);if(f===a){const y=n[l];return y?{x:a<l?y.left+y.width-(h.left+h.width):y.left-h.left,y:0,...In}:null}return f>a&&f<=l?{x:-h.width-s,y:0,...In}:f<a&&f>=l?{x:h.width+s,y:0,...In}:{x:0,y:0,...In}},Mo=e=>{let{rects:t,activeIndex:n,overIndex:i,index:a}=e;const l=ko(t,i,n),f=t[a],h=l[a];return h&&f?{x:h.left-f.left,y:h.top-f.top,scaleX:h.width/f.width,scaleY:h.height/f.height}:null},el="Sortable",tl=o.createContext({activeIndex:-1,containerId:el,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Mo,disabled:{draggable:!1,droppable:!1}});function la(e){let{children:t,id:n,items:i,strategy:a=Mo,disabled:l=!1}=e;const{active:f,dragOverlay:h,droppableRects:s,over:y,measureDroppableContainers:b}=Jr(),w=fn(el,n),m=h.rect!==null,M=o.useMemo(()=>i.map(A=>typeof A=="object"&&"id"in A?A.id:A),[i]),T=f!=null,N=f?M.indexOf(f.id):-1,P=y?M.indexOf(y.id):-1,$=o.useRef(M),V=!(function(A,q){if(A===q)return!0;if(A.length!==q.length)return!1;for(let K=0;K<A.length;K++)if(A[K]!==q[K])return!1;return!0})(M,$.current),S=P!==-1&&N===-1||V,j=(function(A){return typeof A=="boolean"?{draggable:A,droppable:A}:A})(l);Et(()=>{V&&T&&b(M)},[V,M,T,b]),o.useEffect(()=>{$.current=M},[M]);const v=o.useMemo(()=>({activeIndex:N,containerId:w,disabled:j,disableTransforms:S,items:M,overIndex:P,useDragOverlay:m,sortedRects:oa(M,s),strategy:a}),[N,w,j.draggable,j.droppable,S,M,P,s,m,a]);return o.createElement(tl.Provider,{value:v},t)}const ia=e=>{let{id:t,items:n,activeIndex:i,overIndex:a}=e;return ko(n,i,a).indexOf(t)},aa=e=>{let{containerId:t,isSorting:n,wasDragging:i,index:a,items:l,newIndex:f,previousItems:h,previousContainerId:s,transition:y}=e;return!(!y||!i)&&(h===l||a!==f)&&(!!n||f!==a&&t===s)},sa={duration:200,easing:"ease"},nl="transform",ca=Vt.Transition.toString({property:nl,duration:0,easing:"linear"}),da={roleDescription:"sortable"};function ua(e){let{animateLayoutChanges:t=aa,attributes:n,disabled:i,data:a,getNewIndex:l=ia,id:f,strategy:h,resizeObserverConfig:s,transition:y=sa}=e;const{items:b,containerId:w,activeIndex:m,disabled:M,disableTransforms:T,sortedRects:N,overIndex:P,useDragOverlay:$,strategy:V}=o.useContext(tl),S=(function(H,ee){var ce,le;return typeof H=="boolean"?{draggable:H,droppable:!1}:{draggable:(ce=H?.draggable)!=null?ce:ee.draggable,droppable:(le=H?.droppable)!=null?le:ee.droppable}})(i,M),j=b.indexOf(f),v=o.useMemo(()=>({sortable:{containerId:w,index:j,items:b},...a}),[w,a,j,b]),A=o.useMemo(()=>b.slice(b.indexOf(f)),[b,f]),{rect:q,node:K,isOver:D,setNodeRef:O}=(function(H){let{data:ee,disabled:ce=!1,id:le,resizeObserverConfig:Re}=H;const ie=fn("Droppable"),{active:ve,dispatch:Ae,over:xe,measureDroppableContainers:Oe}=o.useContext(pn),Be=o.useRef({disabled:ce}),p=o.useRef(!1),Pe=o.useRef(null),tt=o.useRef(null),{disabled:te,updateMeasurementsFor:Me,timeout:Ne}={...$i,...Re},Fe=un(Me??le),Ee=On({callback:o.useCallback(()=>{p.current?(tt.current!=null&&clearTimeout(tt.current),tt.current=setTimeout(()=>{Oe(Array.isArray(Fe.current)?Fe.current:[Fe.current]),tt.current=null},Ne)):p.current=!0},[Ne]),disabled:te||!ve}),I=o.useCallback((qe,ye)=>{Ee&&(ye&&(Ee.unobserve(ye),p.current=!1),qe&&Ee.observe(qe))},[Ee]),[J,L]=zn(I),G=un(ee);return o.useEffect(()=>{Ee&&J.current&&(Ee.disconnect(),p.current=!1,Ee.observe(J.current))},[J,Ee]),o.useEffect(()=>(Ae({type:mt.RegisterDroppable,element:{id:le,key:ie,disabled:ce,node:J,rect:Pe,data:G}}),()=>Ae({type:mt.UnregisterDroppable,key:ie,id:le})),[le]),o.useEffect(()=>{ce!==Be.current.disabled&&(Ae({type:mt.SetDroppableDisabled,id:le,key:ie,disabled:ce}),Be.current.disabled=ce)},[le,ie,ce,Ae]),{active:ve,rect:Pe,isOver:xe?.id===le,node:J,over:xe,setNodeRef:L}})({id:f,data:v,disabled:S.droppable,resizeObserverConfig:{updateMeasurementsFor:A,...s}}),{active:W,activatorEvent:ge,activeNodeRect:_,attributes:U,setNodeRef:z,listeners:F,isDragging:k,over:B,setActivatorNodeRef:Q,transform:oe}=Wi({id:f,data:v,attributes:{...da,...n},disabled:S.draggable}),be=(function(){for(var H=arguments.length,ee=new Array(H),ce=0;ce<H;ce++)ee[ce]=arguments[ce];return o.useMemo(()=>le=>{ee.forEach(Re=>Re(le))},ee)})(O,z),me=!!W,ze=me&&!T&&Tn(m)&&Tn(P),je=!$&&k,De=je&&ze?oe:null,fe=ze?De??(h??V)({rects:N,activeNodeRect:_,activeIndex:m,overIndex:P,index:j}):null,Ve=Tn(m)&&Tn(P)?l({id:f,items:b,activeIndex:m,overIndex:P}):j,Y=W?.id,Z=o.useRef({activeId:Y,items:b,newIndex:Ve,containerId:w}),de=b!==Z.current.items,ke=t({active:W,containerId:w,isDragging:k,isSorting:me,id:f,index:j,items:b,newIndex:Z.current.newIndex,previousItems:Z.current.items,previousContainerId:Z.current.containerId,transition:y,wasDragging:Z.current.activeId!=null}),Ce=(function(H){let{disabled:ee,index:ce,node:le,rect:Re}=H;const[ie,ve]=o.useState(null),Ae=o.useRef(ce);return Et(()=>{if(!ee&&ce!==Ae.current&&le.current){const xe=Re.current;if(xe){const Oe=en(le.current,{ignoreTransform:!0}),Be={x:xe.left-Oe.left,y:xe.top-Oe.top,scaleX:xe.width/Oe.width,scaleY:xe.height/Oe.height};(Be.x||Be.y)&&ve(Be)}}ce!==Ae.current&&(Ae.current=ce)},[ee,ce,le,Re]),o.useEffect(()=>{ie&&ve(null)},[ie]),ie})({disabled:!ke,index:j,node:K,rect:q});return o.useEffect(()=>{me&&Z.current.newIndex!==Ve&&(Z.current.newIndex=Ve),w!==Z.current.containerId&&(Z.current.containerId=w),b!==Z.current.items&&(Z.current.items=b)},[me,Ve,w,b]),o.useEffect(()=>{if(Y===Z.current.activeId)return;if(Y!=null&&Z.current.activeId==null)return void(Z.current.activeId=Y);const H=setTimeout(()=>{Z.current.activeId=Y},50);return()=>clearTimeout(H)},[Y]),{active:W,activeIndex:m,attributes:U,data:v,rect:q,index:j,newIndex:Ve,items:b,isOver:D,isSorting:me,isDragging:k,listeners:F,node:K,overIndex:P,over:B,setNodeRef:be,setActivatorNodeRef:Q,setDroppableNodeRef:O,setDraggableNodeRef:z,transform:Ce??fe,transition:(function(){if(Ce||de&&Z.current.newIndex===j)return ca;if(!(je&&!Un(ge)||!y)&&(me||ke))return Vt.Transition.toString({...y,property:nl})})()}}function Bn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ga=[Qe.Down,Qe.Right,Qe.Up,Qe.Left],ha=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:a,droppableContainers:l,over:f,scrollableAncestors:h}}=t;if(ga.includes(e.code)){if(e.preventDefault(),!n||!i)return;const s=[];l.getEnabled().forEach(w=>{if(!w||w!=null&&w.disabled)return;const m=a.get(w.id);if(m)switch(e.code){case Qe.Down:i.top<m.top&&s.push(w);break;case Qe.Up:i.top>m.top&&s.push(w);break;case Qe.Left:i.left>m.left&&s.push(w);break;case Qe.Right:i.left<m.left&&s.push(w)}});const y=(w=>{let{collisionRect:m,droppableRects:M,droppableContainers:T}=w;const N=$o(m),P=[];for(const $ of T){const{id:V}=$,S=M.get(V);if(S){const j=$o(S),v=N.reduce((q,K,D)=>q+Dr(j[D],K),0),A=Number((v/4).toFixed(4));P.push({id:V,data:{droppableContainer:$,value:A}})}}return P.sort(zr)})({collisionRect:i,droppableRects:a,droppableContainers:s});let b=Nr(y,"id");if(b===f?.id&&y.length>1&&(b=y[1].id),b!=null){const w=l.get(n.id),m=l.get(b),M=m?a.get(m.id):null,T=m?.node.current;if(T&&M&&w&&m){const N=Kn(T).some((j,v)=>h[v]!==j),P=ar(w,m),$=(function(j,v){return!Bn(j)||!Bn(v)||!ar(j,v)?!1:j.data.current.sortable.index<v.data.current.sortable.index})(w,m),V=N||!P?{x:0,y:0}:{x:$?i.width-M.width:0,y:$?i.height-M.height:0},S={x:M.left,y:M.top};return V.x&&V.y?S:gn(S,V)}}}};function ar(e,t){return!(!Bn(e)||!Bn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const ma=e=>{let{transform:t}=e;return{...t,y:0}},ol=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,index:l,editing:f,editable:h,selectedIndex:s,background:y,activeColor:b,borderColor:w,borderWidth:m,dragging:M,...T}=e;return c.jsxs("div",{ref:t,className:dt(a),style:{...i,display:"flex",flexDirection:"column",background:s===l?"white":y,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===l?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...T,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:s===l?"0px":"-1px",marginTop:s===l?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===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:s===l&&b?b?.toCSS():"none",minHeight:"2px"}})]})})),It={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"},To=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:i,fadeIn:a,handle:l,height:f,index:h,listeners:s,onRemove:y,renderItem:b,sorting:w,style:m,transition:M,transform:T,value:N,wrapperStyle:P,...$},V)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const S=b?b({dragOverlay:!!t,dragging:!!n,sorting:!!w,index:h,fadeIn:!!a,listeners:s,ref:V,style:m,transform:T,transition:M,value:N}):c.jsx(c.Fragment,{children:N});return c.jsx("div",{className:dt("tab-item",It.Wrapper,a&&It.fadeIn,w&&It.sorting,t&&It.dragOverlay),style:{...P,transition:[M,P?.transition].filter(Boolean).join(", "),"--translate-x":T?`${Math.round(T.x)}px`:void 0,"--translate-y":T?`${Math.round(T.y)}px`:void 0,"--scale-x":T?.scaleX?`${T.scaleX}`:void 0,"--scale-y":T?.scaleY?`${T.scaleY}`:void 0,"--index":h},ref:V,children:c.jsx("div",{className:dt(It.Item,n&&It.dragging,l&&It.withHandle,t&&It.dragOverlay,i&&It.disabled,e&&It.color,"dragging"),style:m,"data-cypress":"draggable-item",...l?void 0:s,...$,tabIndex:l?void 0:-1,children:S})})})),sr={Row:"_Row_1kr10_1"},rl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},i)=>c.jsx("div",{ref:i,style:{...n},className:dt(sr.Row,t&&sr.horizontal),children:e}))),fa={...Qr},pa=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:i,animateLayoutChanges:a,adjustScale:l=!1,collisionDetection:f=wi,coordinateGetter:h=ha,dropAnimation:s=fa,getItemStyles:y=()=>({}),getNewIndex:b,handle:w=!1,items:m,onMove:M,isDisabled:T=()=>!1,measuring:N,modifiers:P,renderItem:$,renderDivider:V,reorderItems:S=ko,strategy:j=Mo,style:v,useDragOverlay:A=!0,onDragStart:q,wrapperStyle:K=()=>({})}=e,[D,O]=o.useState(()=>m);o.useEffect(()=>{O(m)},[m]);const[W,ge]=o.useState(null),_=(function(){for(var B=arguments.length,Q=new Array(B),oe=0;oe<B;oe++)Q[oe]=arguments[oe];return o.useMemo(()=>[...Q].filter(be=>be!=null),[...Q])})(io($r,{activationConstraint:i}),io(Gr,{activationConstraint:i}),io(So,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:h})),U=D.indexOf.bind(D),z=W?U(W):-1,F=[];D.map((B,Q)=>{F.push(c.jsx(va,{id:B,handle:w,index:Q,style:y,wrapperStyle:K,disabled:T(B),renderItem:$,animateLayoutChanges:a,useDragOverlay:A,getNewIndex:b},B+"-"+Q));const oe=V?.({key:"divider-"+Q});oe&&F.push(oe)});const{getPortalContainer:k}=r.useFullscreenPortal();return c.jsxs(Ui,{sensors:_,collisionDetection:f,onDragStart:B=>{const{active:Q}=B;Q&&(q?.(B),ge(Q.id))},autoScroll:{canScroll:B=>!0},onDragEnd:B=>{if(ge(null),B.over){const Q=U(B.over.id);z!==Q&&(O(oe=>S(oe,z,Q)),M?.(z,Q))}},onDragCancel:()=>{ge(null)},measuring:N,modifiers:P,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...v},className:dt(n,It.Wrapper),children:c.jsx(la,{items:D,strategy:j,children:c.jsx(rl,{ref:t,children:F})})}),A?Ht.createPortal(c.jsx(na,{adjustScale:l,dropAnimation:s,children:W?c.jsx(To,{value:D[z],handle:w,renderItem:$,wrapperStyle:K({index:z,isDragging:!0,id:D[z]}),index:z,dragging:!0,style:y({id:D[z],index:z,isSorting:W!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),k()):null]})}));function va({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:i,id:a,index:l,onRemove:f,style:h,renderItem:s,useDragOverlay:y,wrapperStyle:b}){const{attributes:w,isDragging:m,isSorting:M,listeners:T,overIndex:N,setNodeRef:P,transform:$,transition:V}=ua({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(To,{ref:P,value:a,disabled:e,dragging:m,sorting:M,handle:i,renderItem:s,index:l,style:h({index:l,id:a,isDragging:m,isSorting:M,overIndex:N}),onRemove:f?()=>f(a):void 0,transform:$,transition:V,wrapperStyle:b({index:l,isDragging:m,id:a}),listeners:T,"data-index":l,"data-id":a,dragOverlay:!y&&m,...w})}const Ca="_TabStrip_3x0dp_1",ya=new d.Color("rgb(33, 115, 70)"),wa="#eee",ba=e=>c.jsx(ol,{...e}),ll=o.memo(o.forwardRef((e,t)=>{const{children:n,style:i,className:a,selectedTabIndex:l=0,tabNames:f=[],onSelectedTabIndexChange:h,onTabNameChange:s,onTabMove:y,createScrollStartButton:b=r.defaultCreateScrollStartButton,createScrollEndButton:w=r.defaultCreateScrollEndButton,createScrollEdgeButton:m=r.defaultCreateScrollEdgeButton,createTabButton:M=ba,createTabDivider:T,editLabelProps:N,disabled:P=!1,disableDrag:$=!1,background:V="white",activeColor:S=ya,borderColor:j=wa,borderWidth:v=1}=e,[A,q]=o.useState(l),[K,D]=o.useState(f),O=o.useCallback(ie=>{const ve=k.current?.[ie]?.closest(".tab-item")??k.current?.[ie];ve&&je.current?.scrollTo({top:ve.offsetTop,left:ve.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{O(l)},[l]);const W=o.useCallback((ie,ve)=>{ve!==A&&(q(ve),h?.(ve)),O(ve)},[h,A]),ge=o.useCallback((ie,ve)=>{y?.(ie,ve)},[y]),_=o.useRef(null),[U,z]=o.useState(-1),F=o.useCallback((ie,ve)=>{s?.(ie,ve)},[s]);o.useLayoutEffect(()=>{q(l)},[l]),o.useLayoutEffect(()=>{D(f)},[f]);const k=o.useRef([]),B=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ie){k.current?.[ie]?.startEdit()},cancel(ie){k.current?.[ie]?.cancel()}},B.current),[A,U]);const Q=o.useCallback(({value:ie,index:ve,dragging:Ae})=>{const{style:xe,maxLength:Oe,...Be}=N||{},p=c.jsx(Ir,{ref:Pe=>{k.current[ve]=Pe},value:ie,disabled:P,maxLength:Oe,style:{color:A===ve&&S?S?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...xe},styleHover:{},onSubmit:Pe=>(_.current=!1,z(-1),F(ve,Pe)),onCancel:()=>{_.current=!1,z(-1)},onChange:Pe=>{_.current=!0,z(ve)},...Be});return M({onClick:Pe=>W(Pe,ve),value:ie,index:ve,editing:U===ve&&_.current,editable:!0,disabled:P,selectedIndex:A,background:V,activeColor:S,borderColor:j,borderWidth:v,dragging:Ae,children:p})},[A,F,W,N,P,U,M]),[oe,{width:be}]=Xt(),[me,{width:ze}]=Xt(),je=o.useRef(null),[De,fe]=o.useState({left:0,top:0,width:0,height:0}),[Ve,Y]=o.useState(null);o.useEffect(()=>{Ve!==null&&je.current&&je.current.scrollTo({left:Ve,behavior:"smooth"})},[Ve]);const Z=o.useCallback((ie,ve=!1)=>{if(!je.current)return 0;let Ae=je.current.firstChild.getBoundingClientRect(),xe=je.current.firstChild.firstChild.children,Oe=0;return Oe=ve?0:r.ScrollUtils.getScrollTo(ie,Ae.left,xe,!0,Math.max(0,ie-200)),Y(Oe),Math.max(0,Oe)},[]),de=o.useCallback((ie,ve=!1)=>{if(!je.current)return 0;let Ae=je.current.firstChild.getBoundingClientRect(),xe=je.current.firstChild.firstChild.children,Oe=0;const Be=Math.ceil(ze-be);return Oe=ve?Be:r.ScrollUtils.getScrollTo(ie,Ae.left,xe,!1,Math.max(0,ie+200)),Y(Oe),Math.min(Be,Oe)},[ze,be]),ke=o.useRef(null),Ce=o.useRef(null),H=o.useCallback(()=>{Ce.current&&(clearTimeout(Ce.current),Ce.current=null,ke.current=null)},[]),ee=o.useCallback((ie,ve,Ae=260)=>{ke.current=ie,Ce.current=setTimeout(()=>{const xe=ve?Z(ke.current||ie):de(ke.current||ie);xe!==ke.current?ee(xe,ve,120):H()},Ae)},[Z,de,H]);o.useEffect(()=>()=>H(),[H]);const ce=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(De.left)<=0||Math.floor(ze-be)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:H,onMouseLeave:H,onMouseDown:()=>ee(je.current.scrollLeft,!0),onClick:ie=>Z(Math.min(je.current.scrollLeft,Ve??Number.MAX_SAFE_INTEGER),ie.ctrlKey)}),[De,Ve,ze,be]),le=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(ze-be)<=Math.ceil(De.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:H,onMouseLeave:H,onMouseDown:()=>ee(je.current.scrollLeft,!1),onClick:ie=>de(Math.max(je.current.scrollLeft,Ve??0),ie.ctrlKey)}),[De,Ve,ze,be]),Re=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,m?.(ce)]}),[ce,le,b,w,n,m]);return c.jsxs("div",{style:{...i,display:"flex",alignItems:"stretch"},className:dt(Ca,a),ref:B,children:[c.jsx("div",{style:{borderTop:`solid ${j} ${v}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Re}),c.jsx("div",{className:"Tabs",ref:oe,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:je,onScroll:ie=>{fe({left:ie.target.scrollLeft,top:ie.target.scrollTop,width:ie.target.scrollWidth,height:ie.target.scrollHeight})},children:c.jsx(pa,{isDisabled:ie=>P||$,items:K,strategy:ra,modifiers:[ma],ref:me,renderItem:Q,renderDivider:T,onMove:ge,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:m(le)})]})}));ll.displayName="TabStrip";const Fn=o.createContext(null);Fn.displayName="DocThemesContext";const xa="_script-editor_iy654_5",qa={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"},Sa=o.lazy(()=>Promise.resolve().then(()=>require("./D6qYJvKLWYvX5sRZ.cjs")));let rn,ln,Lt=["define","require"],cr=!1,An="@0.7.17";An!=="@local"&&An!=="@0.0.0"||(An="");const Ra=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${An}/types/scripting.d.ts`,dr=async(e,t,n)=>{const i=e.getModel();if(!i)return;const a=await t.languages.typescript.getTypeScriptWorker(),l=await a(i.uri),f=await l.getNavigationTree(i.uri.toString()),h=e.getPosition();let s={...h};s.lineNumber=1,s.column=1;let y=!1;for(let N=h.lineNumber;N>=1;N--)if(i.getLineContent(N).trim()===""){const P=Io(f,i.getOffsetAt({lineNumber:N,column:1}),"function");if(!P||Ma(P)){y=!0,s.lineNumber=N+1;break}{const $=P.spans[0].start;N=i.getPositionAt($).lineNumber,s.lineNumber=N}}let b=n,w=!1;!y&&!b.startsWith(`
28
28
  `)&&s.lineNumber>1&&(b=`
29
29
  `+b,w=!0);let m=!1;i.getLineCount()>1&&(b.endsWith(`
30
30
 
31
31
  `)||(b+=`
32
32
 
33
- `,m=!0));const M=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${b}`}];let T=null;i.pushEditOperations([],M,N=>(T=N[0].range,w&&T.startLineNumber++,m&&T.endLineNumber--,[new t.Selection(T.startLineNumber,T.startColumn,T.endLineNumber,T.endColumn)])),e.setSelection({startLineNumber:T.endLineNumber,startColumn:T.endColumn,endLineNumber:T.startLineNumber,endColumn:T.startColumn})};function ka(e,t){let n=null;const i=e.length;for(let a=0;!n&&a<i;a++){const l=e[a];l.getName()===t.text&&(n=l)}return n?n.getContext():"formula"}function vo(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,f=e.getPositionAt(l);a.push({name:i.text,type:ka(n,i),lineNumber:f.lineNumber})}if(i.childItems)for(const l of i.childItems)vo(e,t,n,l,a);return a}function Io(e,t,n="function",i){const a=e.spans,l=a.length;for(let f=0;f<l;f++){const h=a[f];if(h.start<=t&&t<h.start+h.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const s of e.childItems||[]){const y=Io(s,t,n,i);if(y)return y}}return null}}function Ma(e){return e.kind==="comment"}const Ta=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,darkMode:f,loadingPanel:h,autoFocus:s=!0,frame:y,onStatusChange:b,...w}=e,m=o.useRef(null),M=o.useRef(!1),T=o.useMemo(()=>({contains(Y){if(!m.current)return;const Z=m.current.editor;return Z&&Z.getDomNode()?.contains(Y)},focus(){if(!m.current)return;const Y=m.current.editor;return Y&&Y.getDomNode()?.focus()}}),[]),N=o.useMemo(()=>[new r.Command("help",T,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),P=o.useMemo(()=>{let Y=null;const Z=()=>T;return Y=a?a.createChildGroup(Z,"scriptEditor",!1):new r.CommandGroup(Z,"scriptEditor"),Y.addCommands(N,!0),Y},[a,N]),$=a.getGroup("workbook"),V=r.useCommands($,["executeSelectedScript","saveScripts"]),S=V[0],j=V[1],v=S?.context(),[A,q]=o.useState({message:"Loading",cursor:"",dirty:!1}),[K,D]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),O=r.useCallbackRef(Y=>{q(Z=>{const de={...Z,...Y};return he.CommonUtils.deepEqual(de,Z)?Z:(j.update({disabled:!de.dirty}).updateCallback(async()=>{await W()}),de)})},[b,j]);o.useEffect(()=>{b?.(A)},[b,A]);const W=r.useCallbackRef(async()=>{if(!m.current)return;const Y=m.current.editor;let Z;if(A.dirty){const de=Y.getValue();await v?.saveSource(de),Z=v?.getScripts().getModules().getByName("scripts");const ke=Z?.getSource(),Ce=Y.getValue(),H=(ke?.length??0)!==de.length||ke!==Ce;O({dirty:H})}else Z=v?.getScripts().getModules().getByName("scripts");return Z},[A]);o.useEffect(()=>{const Y=y?.addListener({onBeforeHide:async()=>(await W(),!0)});return()=>{Y?.()}},[y]),o.useEffect(()=>{const Y=v?.getScripts();if(Y)return Y.addListeners({onBeforeSearch:()=>W()})},[v]);const ge=r.useCallbackRef(Y=>{S?.execute(Y)},[S]),_=o.useRef(""),[U,z]=o.useState(!1),F=r.useCallbackRef(async()=>{if(!m.current)return null;const Y=m.current,Z=Y.editor;if(!Z)return null;const de=Y.monaco,ke=await(async(Ce,H,ee="export")=>{const ce=Ce.getModel();if(!ce)return null;const le=await H.languages.typescript.getTypeScriptWorker(),Re=await le(ce.uri),ie=await Re.getNavigationTree(ce.uri.toString());let ve=null,Ae=Ce.getSelection();if(!Ae)return null;const xe=Ae.startLineNumber===Ae.endLineNumber&&Ae.startColumn===Ae.endColumn?ce.getLineCount():Math.min(Ae.endLineNumber,ce.getLineCount());for(let Oe=Ae.startLineNumber;!ve&&Oe<=xe;Oe++){const Be=Io(ie,ce.getOffsetAt({lineNumber:Oe,column:1}),"function",ee);Be&&(ve=Be.text)}return ve})(Z,de);return O({message:(ke??"").toUpperCase()}),ke?{source:Z.getValue(),name:ke}:null},[]);r.useCallbackRef(he.CommonUtils.debounce(W,200),[]);const k=r.useCallbackRef(async(Y,Z,de)=>{D(Ce=>({...Ce,compiling:!0}));const ke=await v?.getScripts().createModule({source:de?.getValue(),declarationsOnly:!0});ke&&((async function(Ce,H){const ee=[];for(let ce=1;ce<Ce.getLineCount()+1;ce++){const le={startLineNumber:ce,startColumn:1,endLineNumber:ce,endColumn:Ce.getLineLength(ce)+1},Re=Ce.getValueInRange(le).indexOf("modelt");Re!==-1&&ee.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:H.MarkerSeverity.Hint,startLineNumber:le.startLineNumber,startColumn:Re+1,endLineNumber:le.startLineNumber,endColumn:Re+5})}H.editor.setModelMarkers(Ce,"owner",ee)})(Y,Z),(async function(Ce,H,ee,ce){const le=await H.languages.typescript.getTypeScriptWorker(),Re=await le(Ce.uri),ie=await Re.getNavigationTree(Ce.uri.toString()),ve=vo(Ce,H,ce,ie).map(Ae=>{let xe=null,Oe=null;return Ae.type==="formula"?(xe="formula.margin-icon",Oe="Formula"):Ae.type==="macro"?(xe="macro.margin-icon",Oe="Macro"):Ae.type==="autoRun"&&(xe="autorun.margin-icon",Oe="Auto Run"),{range:new H.Range(Ae.lineNumber,1,Ae.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:xe,glyphMarginHoverMessage:{value:Oe},stickiness:H.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});ze.current&&ze.current.clear(),ze.current=ee.createDecorationsCollection(ve)})(Y,Z,de,ke?ke.getFunctions().getItems():he.CommonUtils.EmptyArray),D(Ce=>({...Ce,compiling:!1})))},[v]),B=r.useCallbackRef(he.CommonUtils.debounce(k,580),[]),Q=r.useCallbackRef(async(Y=void 0)=>{if(!m.current||!v)return;const Z=m.current.editor.getPosition(),de={cursor:Z?Z.toString():""};Y!==void 0&&(de.message=Y),O(de);const ke=F();v.setSelectedFunction(ke)},[v]);o.useEffect(()=>{},[K]);const oe=o.useRef(null),be=r.useCallbackRef(async()=>{await W(),y?.close()},[y]);o.useEffect(()=>{if(!v)return;const Y={insertSnippet:de=>{m.current?.editor&&dr(m.current.editor,m.current.monaco,de)},close:()=>be()};v.setEditor(Y),v.setSelectedFunction(F());const Z=v.addContainerListener({onBeforeSave:async()=>{W()},onReadonlyChange(){},onScriptChange:async()=>{if(!m.current?.editor||!v)return;const de=m.current.editor,ke=v.getScripts().getModules().getItems()[0]?.getSource()??"";de.setValue(ke)}});return()=>{v.setEditor(null),Z()}},[v]),o.useEffect(()=>()=>{const Y=oe.current;if(Y){Y.dispose();const Z=Y.debounceTimer;Z!==void 0&&clearTimeout(Z),oe.current=null}},[U]);const me=r.useCallbackRef(Y=>{const Z=m.current?.editor;return!!Z&&(Z.focus(Y),!0)},[A]),ze=o.useRef(null),je=r.useCallbackRef((Y,Z)=>{m.current={monaco:Z,editor:Y},z(!0),Q("Loading Types");const de=v?.getScripts().getModules().getItems()[0]?.getSource()??"";Y.setValue(de),Promise.resolve().then(()=>require("./CPDQldwfKp7NrmAa.cjs")).then(Ce=>Ce.customEditor).then(async Ce=>{Q(""),Ce.AutoTypings.create(Y,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:Z,onUpdate:(H,ee)=>{if(H.type==="LookedUpPackage"&&H.success!==void 0){const ce=Z.languages.typescript.typescriptDefaults.getDiagnosticsOptions();Z.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...ce,diagnosticCodesToIgnore:[]})}},onError:H=>{H==="Not implemented yet"&&(H="Compile Errors"),console.warn("Error compiling types",H)}}).then(H=>{oe.current=H;const ee=Y.getModel();B(ee,Z,Y),(()=>{if(cr)return;const ce=(Re,ie)=>{try{if(ie===void 0)try{delete globalThis[Re]}catch{try{globalThis[Re]=void 0}catch{}}else globalThis[Re]=ie}catch{}},le=Lt.length;for(let Re=0;Re<le;Re++){const ie=Lt[Re];ce(ie,rn[ie])}rn=void 0,cr=!0})()})}),Y.addCommand("executeScript",function(Ce,...H){H?.[0]&&ge({functionName:H?.[0]})},""),Y.addAction({id:"executeScript",label:"Execute",keybindings:[Z.KeyCode.F8],run:async Ce=>{const H=F();v?.setSelectedFunction(H);const ee=await H;ge(ee)}}),Y.addAction({id:"saveScript",label:"Save Script",keybindings:[Z.KeyMod.CtrlCmd|Z.KeyCode.KeyS],run:Ce=>{W()}}),Y.onMouseDown(async Ce=>{if(Ce.target.type===Z.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const H=Ce.target.position.lineNumber,ee=await Z.languages.typescript.getTypeScriptWorker(),ce=await ee(ke.uri),le=await ce.getNavigationTree(ke.uri.toString()),Re=(await W()).getFunctions().getItems(),ie=vo(ke,Z,Re,le).find(ve=>ve.lineNumber===H);if(ie){const ve=Ce.event.browserEvent.button;ve===0?ie.type==="macro"||ie.type==="autoRun"?ge({functionName:ie.name}):ie.type==="formula"&&v?.quickInsertFunction?.(ie.name):ve===2&&(console.log("Context menu for function:",ie.name),Ce.event.browserEvent.preventDefault())}}}),Y.onDidChangeModelContent(()=>{O({dirty:!0}),B(ke,Z,Y)}),Z.editor.onDidChangeMarkers(Ce=>{Ce.some(H=>H.toString()===ke.uri.toString())});const ke=Y.getModel();(function(Ce,H){H.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ee,ce,le){const Re=[];for(let ie=1;ie<ee.getLineCount()+1;ie++){const ve={startLineNumber:ie,startColumn:1,endLineNumber:ie,endColumn:ee.getLineLength(ie)+1},Ae="hint",xe=ee.getValueInRange(ve).indexOf("hint");xe!==-1&&Re.push({kind:H.languages.InlayHintKind.Type,position:{lineNumber:ve.startLineNumber,column:xe+Ae.length+1},label:"[hint]"})}return{hints:Re,dispose:()=>{}}}})})(0,Z),ke.onDidChangeContent(Ce=>{const H=v?.getScripts().getModules().getByName("scripts"),ee=H?.getSource(),ce=Y.getValue(),le=(ee?.length??0)!==ce.length||ee!==ce;O({dirty:le})}),Y.onDidChangeCursorPosition(Ce=>{Q()})},[v]),De=o.useMemo(()=>U?null:h||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[U,h]),fe=o.useMemo(()=>{if(!U){if(!rn){rn={};const Z=Lt.length;for(let de=0;de<Z;de++){const ke=Lt[de];rn[ke]=globalThis[ke]}}if(ln){const Z=Lt.length;for(let de=0;de<Z;de++){const ke=Lt[de];globalThis[ke]=ln[ke]}}}const Y=v?.getScripts().getModules().getByName("scripts")?.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(Sa,{theme:f?"extended-dark":"extended",options:{...qa,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:Y,onValidate:Z=>{let de=!1;const ke=Z?Z.length:0;for(let Ce=0;!de&&Ce<ke;Ce++)Z[Ce].severity===8&&(de=!0)},beforeMount:Z=>{Z.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),Z.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),Z.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),Z.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let de=!1,ke=!1;try{const Ce=await(async()=>await(await fetch(Ra)).text())(),H=Z.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let ee=Z.editor.getModel(H);ee?ke=!0:ee=Z.editor.createModel(Ce,"typescript",H),Z.editor.setModelMarkers(ee,"default",[]),de=!0}catch(Ce){console.warn("cant load types",Ce)}if(Z.languages.registerLinkProvider("*",{provideLinks:(Ce,H)=>{const ee=[],ce={links:ee},le=Ce.getLinesContent(),Re=le.length;for(let ie=1;ie<=Re;ie++){const ve=le[ie-1],Ae=Z.editor.tokenize(ve,"typescript"),xe=Ae[0].length;for(let Oe=0;Oe<xe;Oe++){const Be=Ae[0]?.[Oe];if(Be&&Be.type.startsWith("string")){let p=Be.offset,Pe=Ae[0]?.[Oe+1]?.offset??ve.length,tt=new Z.Range(ie,p+1,ie,Pe+1),te=Ce.getValueInRange(tt);const Me=te[0];Me!=="`"&&Me!=="'"&&Me!=='"'||(p++,te=te.substring(1));const Ne=te[te.length-1];Ne!=="`"&&Ne!=="'"&&Ne!=='"'||(p++,te=te.substring(0,te.length-1));try{v.getRanges(te)&&ee.push({range:{endColumn:Pe,endLineNumber:ie,startColumn:p,startLineNumber:ie},tooltip:`Goto range '${te}'`,url:`/range/${te}`})}catch(Fe){console.warn(Fe)}}}}return ce}}),Z.editor.registerLinkOpener({open(Ce){if(Ce?.path?.startsWith("/range/")){try{v.getRanges(Ce.path.substring(7))?.select()}catch(H){console.warn("invalid range",H)}return!0}return!1}}),!ke){const Ce=Z.languages.typescript.typescriptDefaults.getCompilerOptions();Z.languages.typescript.typescriptDefaults.setCompilerOptions({...Ce,target:Z.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:Z.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(_.current&&(await dr(m.current.editor,m.current.monaco,_.current),_.current=null),M.current&&requestAnimationFrame(async()=>{M.current&&Z.editor.focus()}),!ln){ln={};const Ce=Lt.length;for(let H=0;H<Ce;H++){const ee=Lt[H];ln[ee]=globalThis[ee]}}})()},onMount:je})}),De]})},[v,P,l,De,f]),Ve=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:Y=>{me(Y)},close:()=>be(),getEditor:()=>v?.getEditor()}),[v]);return o.useEffect(()=>(s&&requestAnimationFrame(()=>{Ve.current?.focus()}),()=>{m.current?.editor&&requestAnimationFrame(()=>{Ve.current?.contains(document.activeElement)&&Ve.current?.focus()})}),[]),c.jsx("div",{className:dt("script-editor",xa,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:Ve,...w,children:fe})})),Ia=Object.freeze(Object.defineProperty({__proto__:null,FindScopeOptions:{Workbook:"workbook",Sheet:"sheet"}},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>d.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),c.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),c.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),c.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=si,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),c.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),c.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),c.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),c.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),c.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),c.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),c.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),c.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),c.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),c.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),c.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),c.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),c.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),c.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),c.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),c.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.CommandContext=Ia,exports.CornerTriangle=uo,exports.DefaultTaskPaneRegistry=Dn,exports.DocThemesContext=Fn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Fn.Provider,{value:t,children:n})},exports.EditableLabel=Ir,exports.EmptyFrame=Ql,exports.FilterButton=ur,exports.Item=To,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=Cr,exports.MovableArea=qr,exports.PictureEditor=Tr,exports.Row=rl,exports.ScriptEditor=Ta,exports.SheetCellEditor=hr,exports.SheetCellRenderer=gr,exports.SheetElement=Mr,exports.SheetScrollbar=bo,exports.StaticBorderRenderer=Sl,exports.StyledStrokePath=fr,exports.Tab=ol,exports.TabStrip=ll,exports.TaskPaneArea=Al,exports.TaskPaneProvider=({children:e,createArea:t,onUpdateArea:n,registry:i=Dn})=>{const a=o.useRef(null),l=o.useRef(null),[f,h]=o.useState(null),[s,y]=o.useState(null),b=o.useMemo(()=>({activateTaskPane(m,M){l.current!==m&&(a.current?a.current.activateTaskPane(m,M):(h(m),w(m)))}}),[]),w=r.useCallbackRef(m=>{const M=t({registry:i,onClose:()=>{y(null),n?.(null)}},T=>{T&&y(T)});return n?.(M),M},[t,i,f]);return o.useEffect(()=>{s&&f&&(s.activateTaskPane(f,{autoFocus:!0}),h(null))},[f,s]),o.createElement(yr.Provider,{value:s??b},e)},exports.TaskPaneStrip=wo,exports.TaskPaneTitle=yo,exports.createCellEditStateFromCell=mr,exports.useBordersOverlay=Co,exports.useDocThemes=()=>{const e=o.useContext(Fn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=et,exports.useMovableCommands=Sr,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 s={getSource:()=>null,getFrom:()=>null,getTo:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(s)}const f=s=>{a.current?.(s)},h=e.getRange(t).addListener(f,i);if(l){const s=e.getRange(t);f({getSource:()=>s,getFrom:()=>null,getTo:()=>null,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{h?.()}},[e,t])},exports.useSheetCommands=br,exports.useSheetCopyPaste=xr,exports.useTaskPaneArea=wr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
33
+ `,m=!0));const M=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${b}`}];let T=null;i.pushEditOperations([],M,N=>(T=N[0].range,w&&T.startLineNumber++,m&&T.endLineNumber--,[new t.Selection(T.startLineNumber,T.startColumn,T.endLineNumber,T.endColumn)])),e.setSelection({startLineNumber:T.endLineNumber,startColumn:T.endColumn,endLineNumber:T.startLineNumber,endColumn:T.startColumn})};function ka(e,t){let n=null;const i=e.length;for(let a=0;!n&&a<i;a++){const l=e[a];l.getName()===t.text&&(n=l)}return n?n.getContext():"formula"}function vo(e,t,n,i,a=[]){if(i.kind==="function"&&i.kindModifiers==="export"){const l=i.spans[0].start,f=e.getPositionAt(l);a.push({name:i.text,type:ka(n,i),lineNumber:f.lineNumber})}if(i.childItems)for(const l of i.childItems)vo(e,t,n,l,a);return a}function Io(e,t,n="function",i){const a=e.spans,l=a.length;for(let f=0;f<l;f++){const h=a[f];if(h.start<=t&&t<h.start+h.length){if(e.kind===n&&(!i||e.kindModifiers===i))return e;for(const s of e.childItems||[]){const y=Io(s,t,n,i);if(y)return y}}return null}}function Ma(e){return e.kind==="comment"}const Ta=o.memo(o.forwardRef((e,t)=>{const{className:n,style:i,commands:a,readOnly:l=!1,darkMode:f,loadingPanel:h,autoFocus:s=!0,frame:y,onStatusChange:b,...w}=e,m=o.useRef(null),M=o.useRef(!1),T=o.useMemo(()=>({contains(Y){if(!m.current)return;const Z=m.current.editor;return Z&&Z.getDomNode()?.contains(Y)},focus(){if(!m.current)return;const Y=m.current.editor;return Y&&Y.getDomNode()?.focus()}}),[]),N=o.useMemo(()=>[new r.Command("help",T,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),P=o.useMemo(()=>{let Y=null;const Z=()=>T;return Y=a?a.createChildGroup(Z,"scriptEditor",!1):new r.CommandGroup(Z,"scriptEditor"),Y.addCommands(N,!0),Y},[a,N]),$=a.getGroup("workbook"),V=r.useCommands($,["executeSelectedScript","saveScripts"]),S=V[0],j=V[1],v=S?.context(),[A,q]=o.useState({message:"Loading",cursor:"",dirty:!1}),[K,D]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),O=r.useCallbackRef(Y=>{q(Z=>{const de={...Z,...Y};return he.CommonUtils.deepEqual(de,Z)?Z:(j.update({disabled:!de.dirty}).updateCallback(async()=>{await W()}),de)})},[b,j]);o.useEffect(()=>{b?.(A)},[b,A]);const W=r.useCallbackRef(async()=>{if(!m.current)return;const Y=m.current.editor;let Z;if(A.dirty){const de=Y.getValue();await v?.saveSource(de),Z=v?.getScripts().getModules().getByName("scripts");const ke=Z?.getSource(),Ce=Y.getValue(),H=(ke?.length??0)!==de.length||ke!==Ce;O({dirty:H})}else Z=v?.getScripts().getModules().getByName("scripts");return Z},[A]);o.useEffect(()=>{const Y=y?.addListener({onBeforeHide:async()=>(await W(),!0)});return()=>{Y?.()}},[y]),o.useEffect(()=>{const Y=v?.getScripts();if(Y)return Y.addListeners({onBeforeSearch:()=>W()})},[v]);const ge=r.useCallbackRef(Y=>{S?.execute(Y)},[S]),_=o.useRef(""),[U,z]=o.useState(!1),F=r.useCallbackRef(async()=>{if(!m.current)return null;const Y=m.current,Z=Y.editor;if(!Z)return null;const de=Y.monaco,ke=await(async(Ce,H,ee="export")=>{const ce=Ce.getModel();if(!ce)return null;const le=await H.languages.typescript.getTypeScriptWorker(),Re=await le(ce.uri),ie=await Re.getNavigationTree(ce.uri.toString());let ve=null,Ae=Ce.getSelection();if(!Ae)return null;const xe=Ae.startLineNumber===Ae.endLineNumber&&Ae.startColumn===Ae.endColumn?ce.getLineCount():Math.min(Ae.endLineNumber,ce.getLineCount());for(let Oe=Ae.startLineNumber;!ve&&Oe<=xe;Oe++){const Be=Io(ie,ce.getOffsetAt({lineNumber:Oe,column:1}),"function",ee);Be&&(ve=Be.text)}return ve})(Z,de);return O({message:(ke??"").toUpperCase()}),ke?{source:Z.getValue(),name:ke}:null},[]);r.useCallbackRef(he.CommonUtils.debounce(W,200),[]);const k=r.useCallbackRef(async(Y,Z,de)=>{D(Ce=>({...Ce,compiling:!0}));const ke=await v?.getScripts().createModule({source:de?.getValue(),declarationsOnly:!0});ke&&((async function(Ce,H){const ee=[];for(let ce=1;ce<Ce.getLineCount()+1;ce++){const le={startLineNumber:ce,startColumn:1,endLineNumber:ce,endColumn:Ce.getLineLength(ce)+1},Re=Ce.getValueInRange(le).indexOf("modelt");Re!==-1&&ee.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:H.MarkerSeverity.Hint,startLineNumber:le.startLineNumber,startColumn:Re+1,endLineNumber:le.startLineNumber,endColumn:Re+5})}H.editor.setModelMarkers(Ce,"owner",ee)})(Y,Z),(async function(Ce,H,ee,ce){const le=await H.languages.typescript.getTypeScriptWorker(),Re=await le(Ce.uri),ie=await Re.getNavigationTree(Ce.uri.toString()),ve=vo(Ce,H,ce,ie).map(Ae=>{let xe=null,Oe=null;return Ae.type==="formula"?(xe="formula.margin-icon",Oe="Formula"):Ae.type==="macro"?(xe="macro.margin-icon",Oe="Macro"):Ae.type==="autoRun"&&(xe="autorun.margin-icon",Oe="Auto Run"),{range:new H.Range(Ae.lineNumber,1,Ae.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:xe,glyphMarginHoverMessage:{value:Oe},stickiness:H.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});ze.current&&ze.current.clear(),ze.current=ee.createDecorationsCollection(ve)})(Y,Z,de,ke?ke.getFunctions().getItems():he.CommonUtils.EmptyArray),D(Ce=>({...Ce,compiling:!1})))},[v]),B=r.useCallbackRef(he.CommonUtils.debounce(k,580),[]),Q=r.useCallbackRef(async(Y=void 0)=>{if(!m.current||!v)return;const Z=m.current.editor.getPosition(),de={cursor:Z?Z.toString():""};Y!==void 0&&(de.message=Y),O(de);const ke=F();v.setSelectedFunction(ke)},[v]);o.useEffect(()=>{},[K]);const oe=o.useRef(null),be=r.useCallbackRef(async()=>{await W(),y?.close()},[y]);o.useEffect(()=>{if(!v)return;const Y={insertSnippet:de=>{m.current?.editor&&dr(m.current.editor,m.current.monaco,de)},close:()=>be()};v.setEditor(Y),v.setSelectedFunction(F());const Z=v.addContainerListener({onBeforeSave:async()=>{W()},onReadonlyChange(){},onScriptChange:async()=>{if(!m.current?.editor||!v)return;const de=m.current.editor,ke=v.getScripts().getModules().getItems()[0]?.getSource()??"";de.setValue(ke)}});return()=>{v.setEditor(null),Z()}},[v]),o.useEffect(()=>()=>{const Y=oe.current;if(Y){Y.dispose();const Z=Y.debounceTimer;Z!==void 0&&clearTimeout(Z),oe.current=null}},[U]);const me=r.useCallbackRef(Y=>{const Z=m.current?.editor;return!!Z&&(Z.focus(Y),!0)},[A]),ze=o.useRef(null),je=r.useCallbackRef((Y,Z)=>{m.current={monaco:Z,editor:Y},z(!0),Q("Loading Types");const de=v?.getScripts().getModules().getItems()[0]?.getSource()??"";Y.setValue(de),Promise.resolve().then(()=>require("./B6a66zmwCW4-eGDt.cjs")).then(Ce=>Ce.customEditor).then(async Ce=>{Q(""),Ce.AutoTypings.create(Y,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:Z,onUpdate:(H,ee)=>{if(H.type==="LookedUpPackage"&&H.success!==void 0){const ce=Z.languages.typescript.typescriptDefaults.getDiagnosticsOptions();Z.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...ce,diagnosticCodesToIgnore:[]})}},onError:H=>{H==="Not implemented yet"&&(H="Compile Errors"),console.warn("Error compiling types",H)}}).then(H=>{oe.current=H;const ee=Y.getModel();B(ee,Z,Y),(()=>{if(cr)return;const ce=(Re,ie)=>{try{if(ie===void 0)try{delete globalThis[Re]}catch{try{globalThis[Re]=void 0}catch{}}else globalThis[Re]=ie}catch{}},le=Lt.length;for(let Re=0;Re<le;Re++){const ie=Lt[Re];ce(ie,rn[ie])}rn=void 0,cr=!0})()})}),Y.addCommand("executeScript",function(Ce,...H){H?.[0]&&ge({functionName:H?.[0]})},""),Y.addAction({id:"executeScript",label:"Execute",keybindings:[Z.KeyCode.F8],run:async Ce=>{const H=F();v?.setSelectedFunction(H);const ee=await H;ge(ee)}}),Y.addAction({id:"saveScript",label:"Save Script",keybindings:[Z.KeyMod.CtrlCmd|Z.KeyCode.KeyS],run:Ce=>{W()}}),Y.onMouseDown(async Ce=>{if(Ce.target.type===Z.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const H=Ce.target.position.lineNumber,ee=await Z.languages.typescript.getTypeScriptWorker(),ce=await ee(ke.uri),le=await ce.getNavigationTree(ke.uri.toString()),Re=(await W()).getFunctions().getItems(),ie=vo(ke,Z,Re,le).find(ve=>ve.lineNumber===H);if(ie){const ve=Ce.event.browserEvent.button;ve===0?ie.type==="macro"||ie.type==="autoRun"?ge({functionName:ie.name}):ie.type==="formula"&&v?.quickInsertFunction?.(ie.name):ve===2&&(console.log("Context menu for function:",ie.name),Ce.event.browserEvent.preventDefault())}}}),Y.onDidChangeModelContent(()=>{O({dirty:!0}),B(ke,Z,Y)}),Z.editor.onDidChangeMarkers(Ce=>{Ce.some(H=>H.toString()===ke.uri.toString())});const ke=Y.getModel();(function(Ce,H){H.languages.registerInlayHintsProvider("typescript",{provideInlayHints(ee,ce,le){const Re=[];for(let ie=1;ie<ee.getLineCount()+1;ie++){const ve={startLineNumber:ie,startColumn:1,endLineNumber:ie,endColumn:ee.getLineLength(ie)+1},Ae="hint",xe=ee.getValueInRange(ve).indexOf("hint");xe!==-1&&Re.push({kind:H.languages.InlayHintKind.Type,position:{lineNumber:ve.startLineNumber,column:xe+Ae.length+1},label:"[hint]"})}return{hints:Re,dispose:()=>{}}}})})(0,Z),ke.onDidChangeContent(Ce=>{const H=v?.getScripts().getModules().getByName("scripts"),ee=H?.getSource(),ce=Y.getValue(),le=(ee?.length??0)!==ce.length||ee!==ce;O({dirty:le})}),Y.onDidChangeCursorPosition(Ce=>{Q()})},[v]),De=o.useMemo(()=>U?null:h||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[U,h]),fe=o.useMemo(()=>{if(!U){if(!rn){rn={};const Z=Lt.length;for(let de=0;de<Z;de++){const ke=Lt[de];rn[ke]=globalThis[ke]}}if(ln){const Z=Lt.length;for(let de=0;de<Z;de++){const ke=Lt[de];globalThis[ke]=ln[ke]}}}const Y=v?.getScripts().getModules().getByName("scripts")?.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(Sa,{theme:f?"extended-dark":"extended",options:{...qa,fixedOverflowWidgets:!0,readOnly:l},language:"typescript",value:Y,onValidate:Z=>{let de=!1;const ke=Z?Z.length:0;for(let Ce=0;!de&&Ce<ke;Ce++)Z[Ce].severity===8&&(de=!0)},beforeMount:Z=>{Z.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),Z.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),Z.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),Z.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let de=!1,ke=!1;try{const Ce=await(async()=>await(await fetch(Ra)).text())(),H=Z.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let ee=Z.editor.getModel(H);ee?ke=!0:ee=Z.editor.createModel(Ce,"typescript",H),Z.editor.setModelMarkers(ee,"default",[]),de=!0}catch(Ce){console.warn("cant load types",Ce)}if(Z.languages.registerLinkProvider("*",{provideLinks:(Ce,H)=>{const ee=[],ce={links:ee},le=Ce.getLinesContent(),Re=le.length;for(let ie=1;ie<=Re;ie++){const ve=le[ie-1],Ae=Z.editor.tokenize(ve,"typescript"),xe=Ae[0].length;for(let Oe=0;Oe<xe;Oe++){const Be=Ae[0]?.[Oe];if(Be&&Be.type.startsWith("string")){let p=Be.offset,Pe=Ae[0]?.[Oe+1]?.offset??ve.length,tt=new Z.Range(ie,p+1,ie,Pe+1),te=Ce.getValueInRange(tt);const Me=te[0];Me!=="`"&&Me!=="'"&&Me!=='"'||(p++,te=te.substring(1));const Ne=te[te.length-1];Ne!=="`"&&Ne!=="'"&&Ne!=='"'||(p++,te=te.substring(0,te.length-1));try{v.getRanges(te)&&ee.push({range:{endColumn:Pe,endLineNumber:ie,startColumn:p,startLineNumber:ie},tooltip:`Goto range '${te}'`,url:`/range/${te}`})}catch(Fe){console.warn(Fe)}}}}return ce}}),Z.editor.registerLinkOpener({open(Ce){if(Ce?.path?.startsWith("/range/")){try{v.getRanges(Ce.path.substring(7))?.select()}catch(H){console.warn("invalid range",H)}return!0}return!1}}),!ke){const Ce=Z.languages.typescript.typescriptDefaults.getCompilerOptions();Z.languages.typescript.typescriptDefaults.setCompilerOptions({...Ce,target:Z.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:Z.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(_.current&&(await dr(m.current.editor,m.current.monaco,_.current),_.current=null),M.current&&requestAnimationFrame(async()=>{M.current&&Z.editor.focus()}),!ln){ln={};const Ce=Lt.length;for(let H=0;H<Ce;H++){const ee=Lt[H];ln[ee]=globalThis[ee]}}})()},onMount:je})}),De]})},[v,P,l,De,f]),Ve=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:Y=>{me(Y)},close:()=>be(),getEditor:()=>v?.getEditor()}),[v]);return o.useEffect(()=>(s&&requestAnimationFrame(()=>{Ve.current?.focus()}),()=>{m.current?.editor&&requestAnimationFrame(()=>{Ve.current?.contains(document.activeElement)&&Ve.current?.focus()})}),[]),c.jsx("div",{className:dt("script-editor",xa,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...i},ref:Ve,...w,children:fe})})),Ia=Object.freeze(Object.defineProperty({__proto__:null,FindScopeOptions:{Workbook:"workbook",Sheet:"sheet"}},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(exports,"LicenseManager",{enumerable:!0,get:()=>d.LicenseManager}),exports.ChartAreaIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 253 256 l 544 -345 l 74 -91 l 644 466 l 277 -464 m 0 718 l -913 -662 l -476 591 l -403 -408 v 785 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 530 1511 l 473 -588 l 914 656 l 24 53 v 304 h -1834 l 2 -864 z"}),c.jsx("path",{className:"styled info_light",d:"M 1939 923 v 658 l -288 -192 m -1272 -40 l 525 -312 l -374 474 z"}),c.jsx("path",{className:"styled info_dark",d:"M 361 1342 l 572 -362 l 22 36 l -571 362 m 1248 1 l 287 -483 l 37 22 l -287 482 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 896 v 1067 h -1878 v -1878 h 43 v 989 l 400 405 l 471 -585 l 921 667 v -665 m 0 1024 v -306 l -913 -662 l -476 591 l -403 -408 v 785 z"})]}),exports.ChartAreaStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 640 v 926 l -641 -554 l -618 703 l -576 -575 v 780 h 1835 v 43 h -1878 v -1878 h 43 v 353 l 576 577 l 661 -704 l 276 329 z"}),c.jsx("path",{className:"styled background",d:"M 1963 1941 h -1856 v -853 l 597 597 l 618 -704 l 641 555 z"}),c.jsx("path",{className:"styled info_light",d:"M 1963 1536 l -641 -555 l -618 704 l -597 -597 v -640 l 597 597 l 661 -704 l 269 319 h 329 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 640 v 43 h -342 l -258 -310 l -659 702 l -597 -598 v -60 l 597 598 l 661 -704 l 276 329 m 322 866 v 60 l -641 -554 l -618 703 l -597 -597 v -62 l 597 599 l 618 -704 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartAreaStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 1524 l -788 -746 l -576 662 l -428 -428 v 823 h 1792 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1941 h -1834 v -1834 h 1834 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 85 v 1878 h -1878 v -1878 m 1835 43 h -1792 v 1792 h 1792 z"}),c.jsx("path",{className:"styled info_light",d:"M 1941 107 v 1493 l -810 -768 l -576 661 l -448 -448 v -938 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1963 1649 l -831 -786 l -576 662 l -471 -467 v -973 h 1878 m -43 1465 v -1422 h -1792 v 908 l 426 426 l 575 -661 z"})]}),exports.ChartBarIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1707 v 341 h -640 v 299 h -1067 v 171 h 811 v 298 h 512 v 342 h -1323 v 213 m 0 -1067 h 1024 v -256 h -1024 m 0 1067 h 1280 v -256 h -1280 z"}),c.jsx("path",{className:"styled background",d:"M 1429 1387 v 298 h -1322 v -298 m 1066 -811 v 299 h -1066 v -299 z"}),c.jsx("path",{className:"styled info_light",d:"M 1813 277 v 299 h -1706 v -299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 101 597 v -42 h 1691 v -256 h -1691 v -43 h 1734 v 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1088 v 299 h -810 v -299 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 896 1109 h -795 v -42 h 838 v 322 h -43 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 768 h 1024 v -256 h 43 v 299 h -1067 v 469 h 1323 v 342 h -1323 v 213 m 0 -512 v 256 h 1280 v -256 z"})]}),exports.ChartBarStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1237 v 512 h -1237 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 555 v -427 h -555 m 0 1195 h 768 v -427 h -768 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 597 v 469 m -597 768 v -469 h 810 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 597 v 512 h -597 v 256 h 811 v 512 h -811 v 299 m 0 -768 v 427 h 768 v -427 m -768 -768 v 427 h 555 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 704 832 v -469 h 640 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1365 341 v 512 h -682 v -512 m 640 43 h -598 v 427 h 598 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 917 1600 v -469 h 811 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -853 v -512 m 811 43 h -768 v 427 h 768 z"})]}),exports.ChartBarStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 1621 v 512 h -1621 v 256 h 1621 v 512 h -1621 v 299 m 0 -1109 h 384 v -427 h -384 m 0 1195 h 1024 v -427 h -1024 z"}),c.jsx("path",{className:"styled background",d:"M 107 832 v -469 h 426 v 469 m -426 768 v -469 h 1066 v 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 256 h 427 v 512 h -427 v 256 h 1067 v 512 h -1067 v 299 m 0 -768 v 427 h 1024 v -427 m -1024 -768 v 427 h 384 v -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 533 832 v -469 h 1195 v 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1749 341 v 512 h -1237 v -512 m 1195 43 h -1152 v 427 h 1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1173 1600 v -469 h 555 v 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1749 1109 v 512 h -597 v -512 m 555 43 h -512 v 427 h 512 z"})]}),exports.ChartBubble3DIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartBubbleIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 171 v -1323 h 341 v 512 h 299 v 811 h 170 v -1067 h 299 v -640 h 341 v 1707 m -853 0 v -768 h -256 v 768 m 1067 0 v -1664 h -256 v 1664 z"}),c.jsx("path",{className:"styled background",d:"M 1728 1941 h -299 v -1706 h 299 m -811 1706 h -298 v -810 h 298 z"}),c.jsx("path",{className:"styled info_light",d:"M 619 1941 h -299 v -1322 h 299 z"}),c.jsx("path",{className:"styled info_dark",d:"M 640 1941 h -43 v -1301 h -256 v 1301 h -42 v -1344 h 341 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1429 1941 h -298 v -1066 h 298 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1432 896 h -280 v 1050 h -43 v -1093 h 323 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 768 v -768 h -256 v -43 h 299 v 811 h 469 v -1707 h 341 v 1707 m -42 0 v -1664 h -256 v 1664 z"})]}),exports.ChartColumnStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1195 h 512 v 1195 h 256 v -1621 h 512 v 1621 m -810 -512 h -427 v 512 h 427 m 768 -768 h -427 v 768 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -554 h 469 m 768 554 h -469 v -810 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -555 h 512 v 555 h 256 v -811 h 512 v 811 m -469 0 h 427 v -768 h -427 m -768 768 h 427 v -512 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1387 h -469 v -640 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 725 h 512 v 683 h -512 m 43 -640 v 597 h 427 v -597 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 1131 h -469 v -811 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 853 h -512 m 43 -811 v 768 h 427 v -768 z"})]}),exports.ChartColumnStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -1621 h 512 v 1621 h 256 v -1621 h 512 v 1621 m -810 -384 h -427 v 384 h 427 m 768 -1024 h -427 v 1024 h 427 z"}),c.jsx("path",{className:"styled background",d:"M 832 1941 h -469 v -426 h 469 m 768 426 h -469 v -1066 h 469 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 h 213 v -427 h 512 v 427 h 256 v -1067 h 512 v 1067 m -469 0 h 427 v -1024 h -427 m -768 1024 h 427 v -384 h -427 z"}),c.jsx("path",{className:"styled info_light",d:"M 832 1515 h -469 v -1195 h 469 z"}),c.jsx("path",{className:"styled info_dark",d:"M 341 299 h 512 v 1237 h -512 m 43 -1195 v 1152 h 427 v -1152 z"}),c.jsx("path",{className:"styled secondary_light",d:"M 1600 875 h -469 v -555 h 469 z"}),c.jsx("path",{className:"styled secondary_dark",d:"M 1109 299 h 512 v 597 h -512 m 43 -555 v 512 h 427 v -512 z"})]}),exports.ChartEditor=si,exports.ChartLineIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 197 144 l 402 -402 l 361 360 l 263 -301 l 32 28 l -265 303 l 264 265 l -30 30 l -262 -263 l -317 362 l -444 -326 l -775 776 v 268 m 806 -1074 l 407 299 l 292 -335 l -332 -332 m -1173 832 v 281 l 740 -740 l -162 -119 z"}),c.jsx("path",{className:"styled info",d:"M 122 1658 l -30 -30 l 1209 -1210 l 655 655 l -30 30 l -625 -625 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1165 l 574 -574 l 639 469 l 584 -668 l 32 28 l -610 697 l -641 -470 l -578 578 v 610 z"})]}),exports.ChartLineMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 99 73 l 175 -190 h -18 v -170 h 170 v 140 l 233 233 l 280 -373 v -171 h 170 v 171 h -118 l -302 402 l 194 195 h 98 v 171 h -171 v -171 h 13 l -160 -160 l -109 144 v 144 h -170 v -104 l -279 -205 l -703 759 v 147 h -85 m 1015 -1152 l -199 215 l 251 184 v -15 h 139 l 110 -147 l -237 -237 m -1079 726 v 256 h 48 l 705 -761 l -70 -52 v 2 h -171 v -12 l -427 426 v 141 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -640 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 416 -554 v -171 h 170 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 z"}),c.jsx("path",{className:"styled info",d:"M 1694 1024 h 98 v 171 h -171 v -171 h 13 l -427 -427 h -64 l -930 1005 v 147 h -170 v -170 h 133 l 909 -982 h -18 v -170 h 170 v 140 z"})]}),exports.ChartLineStackedIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1037 l 571 -570 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 l -581 582 v 452 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 121 1189 l -29 -31 l 607 -606 l 535 259 l 651 -550 l 27 33 l -669 565 l -534 -259 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -256 h -42 v -171 h 42 v -1067 h 43 v 1067 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 h -118 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -85 v 256 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1802 427 l -437 581 v 144 h -170 v -104 l -384 -282 v 2 h -171 v -12 l -427 426 v 141 h -170 v -171 h 140 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -554 v -171 h 171 v 171 z"})]}),exports.ChartLineStackedPercentIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 171 h 1749 v 43 h -1749 v 1335 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"}),c.jsx("path",{className:"styled info",d:"M 1877 299 h -1770 v -43 h 1770 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1549 l 573 -574 l 576 424 l 563 -751 l 32 27 l -587 781 l -578 -425 l -579 578 v 226 z"})]}),exports.ChartLineStackedPercentMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1195 h -42 v -171 h 42 v -128 h 43 v 128 h 85 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 h 171 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -85 v 1195 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -214 h -42 v -170 h 42 v -1494 h 43 v 1494 h 55 l 457 -457 v -98 h 171 v 117 l 384 282 v -15 h 139 l 415 -555 v -170 h 171 v 170 h -118 l -437 582 v 144 h -170 v -104 l -384 -283 v 3 h -171 v -13 l -427 427 v 140 h -85 v 171 z"}),c.jsx("path",{className:"styled info",d:"M 1920 213 v 171 h -171 v -85 h -384 v 85 h -170 v -85 h -427 v 85 h -171 v -85 h -384 v 85 h -170 v -171 h 170 v 43 h 384 v -43 h 171 v 43 h 427 v -43 h 170 v 43 h 384 v -43 z"})]}),exports.ChartPieDoughnutIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 187 q -41 89 -98 168 q -58 78 -130 142 q -125 112 -284 176 q -160 64 -342 64 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 33 -244 q 33 -118 93 -221 q 59 -104 144 -190 q 84 -86 187 -148 q 102 -62 221 -97 q 118 -36 247 -39 m 307 1305 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 q -90 8 -167 48 q -78 39 -135 102 q -58 62 -91 144 q -33 81 -33 173 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 84 0 159 -27 q 74 -28 134 -76 m -293 530 q 173 0 325 -60 q 151 -61 270 -168 l -272 -272 q -66 54 -148 85 q -82 31 -175 31 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -100 37 -189 q 36 -90 100 -158 q 63 -69 149 -112 q 85 -43 183 -51 v -384 q -119 6 -228 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -56 97 -86 209 q -30 111 -30 231 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 z"}),c.jsx("path",{className:"styled background",d:"M 1658 1692 q -125 119 -286 187 q -162 68 -348 68 q -127 0 -244 -33 q -118 -33 -220 -93 q -103 -60 -186 -143 q -84 -84 -144 -186 q -60 -103 -93 -220 q -33 -118 -33 -245 q 0 -125 32 -241 q 32 -116 90 -217 q 58 -101 140 -184 q 81 -84 181 -144 q 99 -61 214 -95 q 115 -35 239 -38 v 429 q -97 5 -181 45 q -85 40 -148 106 q -63 65 -99 152 q -36 86 -36 184 q 0 101 39 190 q 38 89 104 155 q 66 66 155 105 q 89 38 190 38 q 91 0 171 -30 q 80 -31 144 -85 z"}),c.jsx("path",{className:"styled current_color",d:"M 1364 1406 q -69 61 -155 96 q -86 34 -185 34 q -106 0 -199 -40 q -94 -40 -163 -109 q -70 -70 -110 -163 q -40 -94 -40 -200 q 0 -103 39 -194 q 38 -92 105 -161 q 66 -69 156 -110 q 89 -42 191 -46 v 42 q -94 4 -175 43 q -82 38 -142 101 q -61 63 -96 147 q -35 84 -35 178 q 0 97 37 183 q 37 85 101 149 q 63 63 149 100 q 85 37 182 37 q 90 0 169 -31 q 79 -31 141 -86 m 332 333 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -98 58 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 239 q 32 114 91 214 q 58 99 140 181 q 81 81 181 140 q 99 58 214 90 q 114 32 238 32 q 179 0 335 -64 q 155 -65 276 -178 z"}),c.jsx("path",{className:"styled info_light",d:"M 1515 1024 q 0 -102 -38 -191 q -39 -89 -106 -156 q -67 -67 -156 -105 q -89 -39 -191 -39 q -5 0 -10 1 q -6 0 -11 0 v -426 q 5 0 11 0 q 5 -1 10 -1 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -302 -301 q 77 -68 122 -162 q 45 -95 45 -206 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -63 188 q -41 89 -98 168 q -58 78 -130 142 l -333 -334 q 81 -65 129 -159 q 47 -95 47 -207 q 0 -97 -37 -182 q -37 -86 -100 -149 q -64 -64 -149 -101 q -86 -37 -183 -37 q -11 0 -21 1 q -11 0 -22 1 v -471 q 11 0 22 0 q 10 -1 21 -1 m 627 1579 q 62 -61 112 -133 q 50 -73 85 -154 q 35 -81 54 -170 q 18 -89 18 -183 q 0 -124 -32 -238 q -32 -115 -90 -214 q -59 -100 -140 -181 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -239 -32 v 384 q 106 0 200 40 q 93 40 163 110 q 69 69 109 163 q 40 93 40 199 q 0 109 -42 204 q -42 94 -114 164 z"})]}),exports.ChartPieIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 130 -33 250 q -34 119 -95 224 q -62 104 -147 190 q -86 86 -190 147 q -105 61 -225 95 q -120 33 -249 33 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -126 32 -243 q 31 -117 89 -219 q 58 -102 140 -187 q 82 -86 182 -148 q 100 -62 217 -99 q 116 -37 243 -43 m -862 939 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 173 0 325 -61 q 151 -61 272 -167 l -638 -638 v -924 q -121 6 -230 41 q -109 35 -204 94 q -95 59 -172 140 q -78 81 -133 179 q -55 97 -85 209 q -31 111 -31 231 z"}),c.jsx("path",{className:"styled background",d:"M 1941 1024 q 0 127 -32 244 q -33 117 -93 219 q -60 102 -143 186 q -84 83 -186 143 q -102 60 -219 93 q -117 32 -244 32 q -127 0 -244 -32 q -117 -33 -219 -93 q -102 -60 -185 -143 q -84 -84 -144 -186 q -60 -102 -92 -219 q -33 -117 -33 -244 q 0 -127 33 -244 q 32 -117 92 -219 q 60 -102 144 -185 q 83 -84 185 -144 q 102 -60 219 -92 q 117 -33 244 -33 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 z"}),c.jsx("path",{className:"styled current_color",d:"M 1666 1709 q -127 118 -291 186 q -164 68 -351 68 q -130 0 -249 -33 q -120 -34 -224 -95 q -105 -62 -191 -147 q -86 -86 -147 -190 q -61 -105 -94 -225 q -34 -120 -34 -249 q 0 -128 33 -246 q 32 -119 92 -222 q 59 -103 143 -188 q 84 -86 186 -147 q 102 -62 220 -97 q 117 -35 244 -38 v 43 q -121 3 -233 37 q -112 33 -209 92 q -97 59 -177 140 q -80 81 -137 180 q -57 98 -88 211 q -31 113 -31 235 q 0 124 32 238 q 32 114 91 214 q 58 99 140 181 q 82 82 182 141 q 99 58 214 90 q 114 32 237 32 q 178 0 334 -65 q 156 -65 277 -177 z"}),c.jsx("path",{className:"styled info_light",d:"M 1024 107 q 127 0 244 33 q 117 32 219 92 q 102 60 186 144 q 83 83 143 185 q 60 102 93 219 q 32 117 32 244 q 0 99 -20 193 q -21 93 -58 178 q -38 85 -92 160 q -54 75 -121 138 l -647 -648 v -937 q 5 0 11 0 q 5 -1 10 -1 z"}),c.jsx("path",{className:"styled info_dark",d:"M 1024 85 q 129 0 249 34 q 120 33 225 95 q 104 61 190 147 q 85 85 147 190 q 61 104 95 224 q 33 120 33 249 q 0 104 -22 202 q -22 98 -62 187 q -41 89 -99 168 q -58 78 -130 142 q -9 -8 -15 -15 q -6 -6 -10 -10 q -5 -5 -5 -6 l -639 -638 v -969 m 670 1578 q 62 -61 112 -133 q 50 -72 85 -153 q 35 -82 54 -170 q 18 -89 18 -183 q 0 -123 -32 -237 q -32 -115 -90 -214 q -59 -100 -141 -182 q -82 -82 -181 -140 q -100 -59 -214 -91 q -115 -32 -238 -32 v 908 z"})]}),exports.ChartScatterLinesIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1503 1457 l -10 61 l -42 -6 l 16 -96 l -334 -380 l -309 389 l -72 -147 l -248 421 l -37 -21 l 262 -446 l -463 -951 l 39 -18 l 451 925 l 227 -387 l 149 168 l 564 -710 l -184 1143 l 263 299 l -68 -525 l 42 -5 l 83 661 m -728 -828 l -114 -130 l -212 360 l 54 112 m 644 14 l 155 -951 l -471 593 m 803 918 v 43 h -1878 v -1878 h 43 v 1835 z"}),c.jsx("path",{className:"styled info",d:"M 1493 1518 l -42 -6 l 180 -1103 l -807 1016 l -558 -1144 l 39 -18 l 527 1083 l 864 -1087 z"}),c.jsx("path",{className:"styled current_color",d:"M 1832 1832 l -842 -958 l -486 825 l -37 -21 l 516 -877 l 792 900 l -68 -525 l 42 -5 m 214 749 v 43 h -1878 v -1878 h 43 v 1835 z"})]}),exports.ChartScatterLinesMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 213 342 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 361 762 l 165 -282 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 78 89 l 449 -570 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -258 814 l 410 467 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 l 70 565 l -482 -549 l -46 145 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 53 -166 l -189 -214 l -295 375 l -69 -146 l -147 251 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 166 -283 l -375 -789 q -14 3 -28 3 m 982 1109 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1323 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 m -105 275 l -401 509 l 176 200 m -355 -301 l -187 301 l 52 129 l 258 -327 l -93 -106 q -15 3 -30 3 m -638 -683 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 z"}),c.jsx("path",{className:"styled background",d:"M 1771 296 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -35 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 m -1320 7 q 0 22 -8 42 q -9 19 -23 34 q -15 15 -34 24 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -35 -24 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 15 -15 35 -23 q 19 -9 41 -9 q 22 0 42 9 q 19 8 34 23 q 14 14 23 34 q 8 19 8 41 m 902 1232 q 0 23 -8 43 q -9 19 -23 34 q -15 14 -35 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -43 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 q 22 0 42 9 q 20 8 35 23 q 14 14 23 34 q 8 19 8 41 z"}),c.jsx("path",{className:"styled info",d:"M 1664 171 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -11 0 -20 -2 q -10 -2 -19 -5 l -319 1008 q 26 17 43 45 q 16 28 16 63 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 15 0 29 3 l 293 -923 l -724 918 l -466 -982 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 63 q -17 28 -44 45 l 435 919 l 734 -932 q -20 -18 -31 -42 q -11 -25 -11 -53 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m -1323 213 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 m 982 1152 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 m 341 -1152 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -18 27 q -7 15 -7 33 q 0 35 25 60 q 25 25 60 25 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1636 1182 l 70 565 l -825 -939 q -15 3 -30 3 l -360 615 q 29 17 47 46 q 17 29 17 64 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 q 11 0 23 3 l 357 -609 q -36 -14 -59 -46 q -23 -32 -23 -73 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 34 -16 62 q -16 28 -42 45 l 726 826 l -54 -422 q -5 1 -8 1 q -4 0 -8 0 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 38 -19 69 q -20 30 -52 46 z"})]}),exports.ChartScatterLinesMarkersSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 l -7 2 q -26 93 -66 161 q -40 68 -88 116 q -48 47 -101 76 q -54 29 -108 44 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -115 -15 -221 -84 q -107 -69 -207 -190 q -36 91 -59 176 q -24 85 -38 152 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 15 -73 42 -167 q 26 -95 69 -195 q -48 -62 -94 -141 q -47 -80 -89 -168 q -43 -88 -80 -178 q -37 -91 -64 -176 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 19 59 48 135 q 29 75 67 158 q 37 82 84 167 q 47 85 103 163 q 33 -72 76 -141 q 42 -70 96 -131 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 5 0 9 1 q 3 0 7 0 q 1 -20 2 -40 q 0 -21 0 -43 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 q 18 113 27 215 q 8 102 8 193 q 0 25 0 48 q 0 23 -2 46 q 32 16 51 46 q 19 30 19 68 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 m -171 -1206 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 q 0 35 25 60 q 25 25 60 25 m -1408 86 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 354 -278 q 59 -80 92 -194 q -23 -4 -42 -15 q -19 -12 -33 -28 q -14 -17 -22 -38 q -8 -21 -8 -45 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -57 63 -101 136 q -44 73 -77 150 q 41 53 87 99 q 45 46 96 82 q 50 36 106 60 q 55 23 115 32 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 z"}),c.jsx("path",{className:"styled background",d:"M 1305 1497 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 m -890 -1072 q 0 23 -9 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -42 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 22 0 42 9 q 20 8 35 23 q 15 15 24 35 q 9 20 9 43 m 1317 -167 q 0 23 -8 43 q -9 20 -24 35 q -15 15 -35 24 q -20 8 -43 8 q -23 0 -43 -8 q -20 -9 -35 -24 q -15 -15 -23 -35 q -9 -20 -9 -43 q 0 -23 9 -43 q 8 -20 23 -35 q 15 -15 35 -23 q 20 -9 43 -9 q 23 0 43 9 q 20 8 35 23 q 15 15 24 35 q 8 20 8 43 z"}),c.jsx("path",{className:"styled info",d:"M 1689 365 q 18 112 27 213 q 8 101 8 193 q 0 183 -35 322 q -35 138 -106 234 q -29 38 -60 67 q -32 29 -65 51 q -34 21 -68 36 q -35 14 -68 24 q -2 24 -13 46 q -11 21 -28 37 q -17 15 -39 24 q -22 9 -47 9 q -45 0 -78 -26 q -34 -26 -45 -66 q -114 -15 -224 -87 q -110 -72 -211 -196 q -101 -125 -189 -299 q -89 -174 -160 -393 q -25 -2 -46 -12 q -22 -11 -37 -28 q -16 -17 -25 -39 q -9 -23 -9 -48 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 45 -26 79 q -27 33 -69 44 q 23 69 59 161 q 35 92 83 191 q 48 99 109 197 q 61 98 136 179 q 74 81 161 137 q 87 55 187 70 q 1 -25 12 -47 q 11 -22 28 -38 q 17 -16 40 -25 q 22 -10 48 -10 q 45 0 79 28 q 34 27 45 69 q 61 -19 120 -56 q 59 -37 110 -105 q 133 -178 133 -530 q 0 -174 -33 -390 q -14 3 -28 3 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 35 -16 64 q -17 28 -44 45 m -1476 62 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 m 982 1152 q 35 0 60 -25 q 25 -25 25 -61 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 12 27 19 q 15 6 33 6 m 341 -1323 q 0 35 25 60 q 25 25 60 25 q 18 0 34 -6 q 15 -7 27 -18 q 11 -12 18 -27 q 7 -16 7 -34 q 0 -18 -7 -33 q -7 -16 -18 -27 q -12 -12 -27 -18 q -16 -7 -34 -7 q -35 0 -60 25 q -25 25 -25 60 z"}),c.jsx("path",{className:"styled current_color",d:"M 128 1920 h 1835 v 43 h -1878 v -1878 h 43 m 1664 1501 q 37 13 61 46 q 24 33 24 75 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 v -34 q 0 -140 -15 -248 q -16 -108 -42 -191 q -14 3 -28 3 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -29 13 -54 q 12 -26 32 -43 q -45 -61 -95 -94 q -51 -34 -93 -49 q -43 -15 -71 -17 q -29 -3 -31 -3 q -78 0 -144 16 q -67 15 -126 46 q 3 14 3 28 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -29 0 -55 -13 q -66 73 -115 161 q -49 87 -84 176 q -35 88 -58 172 q -24 83 -37 148 q 41 12 67 46 q 26 33 26 78 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -26 10 -48 q 9 -23 25 -40 q 16 -18 38 -28 q 22 -10 47 -12 q 14 -67 38 -152 q 23 -86 59 -177 q 36 -92 87 -182 q 50 -90 118 -167 q -38 -36 -38 -90 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 35 0 64 17 q 28 16 45 43 q 63 -32 133 -48 q 70 -17 154 -17 q 6 0 39 4 q 32 3 79 21 q 47 17 102 54 q 55 37 107 105 q 21 -9 45 -9 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 35 -16 63 q -17 28 -43 45 q 30 96 45 210 q 14 114 14 248 z"})]}),exports.ChartScatterLinesSmoothIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1577 -902 q 93 215 93 547 q 0 88 -6 184 l -43 -3 q 3 -47 5 -92 q 2 -45 2 -88 q 0 -277 -68 -470 q -25 97 -65 167 q -40 70 -89 119 q -49 48 -104 78 q -55 29 -108 46 q -54 16 -103 22 q -49 5 -87 5 q -74 0 -141 -21 q -68 -21 -129 -58 q -62 -37 -116 -88 q -55 -51 -104 -111 q -39 93 -64 181 q -25 88 -40 157 q -15 69 -21 112 q -6 42 -6 44 l -42 -4 q 0 -2 7 -48 q 6 -46 23 -120 q 16 -74 44 -168 q 27 -94 70 -192 q -60 -79 -109 -167 q -50 -88 -90 -174 q -40 -86 -70 -164 q -30 -79 -50 -141 q -21 -62 -32 -102 q -11 -40 -13 -47 l 42 -11 q 0 2 10 37 q 10 35 29 93 q 19 58 48 135 q 28 76 66 160 q 38 83 86 170 q 47 86 104 165 q 45 -96 106 -184 q 61 -89 142 -156 q 80 -68 181 -108 q 101 -40 227 -40 q 3 0 22 2 q 19 1 49 9 q 30 8 68 25 q 38 16 80 46 q 41 29 83 75 q 42 46 80 112 q 5 -42 8 -87 q 2 -45 2 -93 q 0 -243 -64 -562 l 42 -8 q 65 325 65 569 q 0 68 -5 130 q -5 61 -15 117 m -156 283 q 79 -106 111 -275 q -33 -74 -72 -125 q -40 -51 -81 -84 q -41 -34 -80 -52 q -39 -19 -69 -27 q -31 -9 -49 -11 q -19 -2 -20 -2 q -121 0 -218 41 q -97 40 -173 107 q -77 67 -135 155 q -58 87 -101 181 q 47 60 100 112 q 53 51 112 89 q 58 37 123 59 q 65 21 136 21 q 45 0 99 -7 q 54 -7 110 -27 q 55 -21 109 -58 q 54 -37 98 -97 z"}),c.jsx("path",{className:"styled info",d:"M 1792 1749 l -43 -3 q 6 -93 6 -178 q 0 -244 -51 -422 q -51 -179 -152 -287 q -47 -49 -93 -76 q -46 -28 -83 -40 q -38 -13 -62 -15 q -24 -3 -25 -3 q -124 0 -223 44 q -99 43 -177 114 q -78 71 -136 162 q -58 90 -100 186 q -42 95 -69 187 q -28 91 -44 164 q -16 72 -22 118 q -7 46 -7 49 l -42 -4 q 0 -3 5 -34 q 4 -32 14 -84 q 10 -52 27 -120 q 17 -68 43 -144 q 25 -76 60 -156 q 35 -80 82 -155 q 46 -76 105 -143 q 58 -67 131 -117 q 73 -51 161 -80 q 88 -29 193 -29 q 3 0 30 3 q 27 2 69 16 q 41 14 92 44 q 51 30 102 84 q 216 231 216 735 q 0 45 -2 91 q -2 45 -5 93 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1004 -387 q -111 0 -207 -46 q -97 -46 -179 -121 q -83 -75 -151 -172 q -68 -97 -122 -199 q -55 -102 -96 -201 q -41 -99 -68 -178 q -28 -80 -43 -132 q -15 -53 -17 -62 l 42 -11 q 1 2 14 50 q 13 47 40 124 q 26 76 66 173 q 39 96 91 197 q 52 101 118 197 q 65 96 144 171 q 79 75 171 121 q 92 46 197 46 q 45 0 99 -7 q 54 -7 110 -27 q 56 -21 110 -58 q 54 -37 98 -97 q 133 -180 133 -528 q 0 -121 -16 -261 q -16 -141 -48 -302 l 42 -8 q 65 325 65 569 q 0 364 -142 556 q -50 67 -111 108 q -62 40 -123 62 q -62 22 -119 29 q -57 7 -98 7 z"})]}),exports.ChartScatterMarkersIcon=e=>c.jsxs("svg",{viewBox:"0,0,2048,2048",...e,children:[c.jsx("path",{className:"styled high_contrast",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 m 768 384 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"}),c.jsx("path",{className:"styled background",d:"M 1195 1344 q 22 0 42 9 q 19 8 33 23 q 14 14 23 34 q 8 19 8 41 q 0 45 -30 76 q -31 30 -76 30 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -14 -23 -33 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -15 34 -23 q 19 -9 41 -9 m -427 -341 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m 939 -512 q 45 0 76 31 q 30 30 30 75 q 0 22 -8 42 q -9 19 -23 34 q -14 14 -33 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 m -1323 -256 q 22 0 42 9 q 19 8 34 22 q 14 14 23 34 q 8 19 8 41 q 0 22 -8 42 q -9 19 -23 34 q -15 14 -34 23 q -20 8 -42 8 q -22 0 -41 -8 q -20 -9 -34 -23 q -15 -15 -23 -34 q -9 -20 -9 -42 q 0 -22 9 -41 q 8 -20 23 -34 q 14 -14 34 -22 q 19 -9 41 -9 z"}),c.jsx("path",{className:"styled info",d:"M 384 213 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 1323 42 q 26 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -18 0 -33 7 q -16 6 -27 18 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 7 33 7 m -939 298 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 40 -28 q 23 -10 50 -10 m 0 214 q 18 0 34 -7 q 15 -7 27 -18 q 11 -12 18 -27 q 6 -16 6 -34 q 0 -35 -25 -60 q -25 -25 -60 -25 q -35 0 -60 25 q -25 25 -25 60 q 0 18 7 34 q 6 15 18 27 q 11 11 27 18 q 15 7 33 7 m 427 128 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 m 0 213 q 35 0 60 -25 q 25 -25 25 -60 q 0 -18 -6 -33 q -7 -16 -18 -27 q -12 -12 -27 -19 q -16 -7 -34 -7 q -18 0 -33 7 q -16 7 -27 19 q -12 11 -19 27 q -7 15 -7 33 q 0 18 7 34 q 7 15 19 27 q 11 11 27 18 q 15 6 33 6 z"}),c.jsx("path",{className:"styled current_color",d:"M 1963 1920 v 43 h -1878 v -1878 h 43 v 1835 m 1579 -213 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 26 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -24 10 -50 10 m -854 -982 q -26 0 -49 -10 q -24 -10 -41 -27 q -18 -18 -28 -41 q -10 -23 -10 -50 q 0 -26 10 -49 q 10 -24 28 -41 q 17 -18 41 -28 q 23 -10 49 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 41 q 10 23 10 49 q 0 27 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m -469 982 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 m 1024 -640 q -27 0 -50 -10 q -23 -10 -40 -27 q -18 -18 -28 -41 q -10 -24 -10 -50 q 0 -27 10 -50 q 10 -23 28 -40 q 17 -18 40 -28 q 23 -10 50 -10 q 27 0 50 10 q 23 10 41 28 q 17 17 27 40 q 10 23 10 50 q 0 26 -10 50 q -10 23 -27 41 q -18 17 -41 27 q -23 10 -50 10 z"})]}),exports.CommandContext=Ia,exports.CornerTriangle=uo,exports.DefaultTaskPaneRegistry=Dn,exports.DocThemesContext=Fn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Fn.Provider,{value:t,children:n})},exports.EditableLabel=Ir,exports.EmptyFrame=Ql,exports.FilterButton=ur,exports.Item=To,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=Cr,exports.MovableArea=qr,exports.PictureEditor=Tr,exports.Row=rl,exports.ScriptEditor=Ta,exports.SheetCellEditor=hr,exports.SheetCellRenderer=gr,exports.SheetElement=Mr,exports.SheetScrollbar=bo,exports.StaticBorderRenderer=Sl,exports.StyledStrokePath=fr,exports.Tab=ol,exports.TabStrip=ll,exports.TaskPaneArea=Al,exports.TaskPaneProvider=({children:e,createArea:t,onUpdateArea:n,registry:i=Dn})=>{const a=o.useRef(null),l=o.useRef(null),[f,h]=o.useState(null),[s,y]=o.useState(null),b=o.useMemo(()=>({activateTaskPane(m,M){l.current!==m&&(a.current?a.current.activateTaskPane(m,M):(h(m),w(m)))}}),[]),w=r.useCallbackRef(m=>{const M=t({registry:i,onClose:()=>{y(null),n?.(null)}},T=>{T&&y(T)});return n?.(M),M},[t,i,f]);return o.useEffect(()=>{s&&f&&(s.activateTaskPane(f,{autoFocus:!0}),h(null))},[f,s]),o.createElement(yr.Provider,{value:s??b},e)},exports.TaskPaneStrip=wo,exports.TaskPaneTitle=yo,exports.createCellEditStateFromCell=mr,exports.useBordersOverlay=Co,exports.useDocThemes=()=>{const e=o.useContext(Fn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=et,exports.useMovableCommands=Sr,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 s={getSource:()=>null,getFrom:()=>null,getTo:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(s)}const f=s=>{a.current?.(s)},h=e.getRange(t).addListener(f,i);if(l){const s=e.getRange(t);f({getSource:()=>s,getFrom:()=>null,getTo:()=>null,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{h?.()}},[e,t])},exports.useSheetCommands=br,exports.useSheetCopyPaste=xr,exports.useTaskPaneArea=wr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});