@sheetxl/react 0.7.7 → 0.7.8

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,12 +1,12 @@
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-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.7
3
+ * @license @sheetxl/react - React - React components needed to build advanced grid and spreadsheet UIs. - v0.7.8
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"),dt=require("@sheetxl/grid-react"),jt=require("react-dom"),hn=(e=6e4)=>new Date(Math.floor(Date.now()/e)*e),Il=Object.freeze(Object.defineProperty({__proto__:null,nowWithPrecision:hn},Symbol.toStringTag,{value:"Module"})),Sr=Object.freeze([8,9,10,11,12,14,16,18,20,22,24,26,28,30,36,48,72]),po=(e,t=!0,n=Sr)=>{if(!n||n.length===0)return e;if(e===void 0)return n[0];if(t&&e>=n[n.length-1]||!t&&e<=n[0])return e;let l=he.CommonUtils.findEqualOrGreater(n,e);return t?(n[l]===e&&(l+=1),n[l]||(l-=1),n[l]):(l-=1,n[l])},El=Object.freeze(Object.defineProperty({__proto__:null,DefaultFontSizes:Sr,findNextFontSize:po},Symbol.toStringTag,{value:"Module"})),vo=o.memo(e=>{const{anchorLocation:t=he.AnchorLocation.TopLeft,cellWidth:n,cellHeight:l,size:a=7,inset:i=1,darkMode:m,fill:h,pathProps:s,style:p,...b}=e,C=a,u=i;let I="red",x=[],A=[];return t===he.AnchorLocation.TopLeft?(I=m?"rgb(255, 198, 246)":"green",x.push(u),A.push(u),x.push(u+C),A.push(u),x.push(u),A.push(u+C)):t===he.AnchorLocation.TopRight?(I=m?"rgb(0, 255, 255)":"red",x.push(n-u),A.push(u),x.push(n-(u+C)),A.push(u),x.push(n-u),A.push(u+C)):t===he.AnchorLocation.BottomRight?(I=m?"rgb(236, 252, 211)":"purple",x.push(n-u),A.push(l-u),x.push(n-(u+C)),A.push(l-u),x.push(n-u),A.push(l-(u+C))):t===he.AnchorLocation.BottomLeft&&(I=m?"rgb(255, 236, 183)":"blue",x.push(u),A.push(l-u),x.push(u+C),A.push(l-u),x.push(u),A.push(l-(u+C))),c.jsx("svg",{width:`${n}`,height:`${l}`,viewBox:`0 0 ${n} ${l}`,style:{position:"absolute",width:`${n}px`,height:`${l}px`,pointerEvents:"none",...p},...b,children:c.jsx("path",{d:`M ${x[0]} ${A[0]} L ${x[1]} ${A[1]} L ${x[2]} ${A[2]} L ${x[0]} ${A[0]} Z`,fill:h??I,...s})})}),Rr=e=>{const{renderBounds:t,darkMode:n,zoom:l,disabled:a,filter:i,onFilterButtonMouseDown:m,style:h,...s}=e,p=o.useMemo(()=>{let I=null;const x=i.getSortField();x&&(I=x.reverse);const A=i.getField(),z=A&&A.criteria&&A.criteria.length>0;return I===!0?z?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,9.452298 H 4.24187 V 2.0761788 H 3.170122 V 9.452298 H 1.5625 l 2.143496,2.950446 z":"m 13.109228,9.865914 h -1.607622 v -7.37612 h -1.071748 v 7.37612 H 8.822236 l 2.143496,2.950446 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":I===!1?z?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 5.849492,5.0266248 H 4.24187 V 12.402744 H 3.170122 V 5.0266248 H 1.5625 l 2.143496,-2.950446 z":"m 13.109228,5.44024 h -1.607622 v 7.37612 H 10.429858 V 5.44024 H 8.822236 L 10.965732,2.489794 Z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":z?"m 9.429858,10.25386 2,-1 v -3 l 3,-4 h -8 l 3,4 z M 0.75000004,9.15 4.3000002,13.094444 7.8500003,9.15 Z":"M 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"},[i]),[b,C]=o.useState(!1),u=Math.min(Math.min(18,t.height-8),t.width);return c.jsx("div",{style:{width:`${u}px`,height:`${u}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:(u>12?1:0)+"px",marginRight:"2px",display:"flex",alignItems:"center",justifyContent:"center",cursor:a?void 0:"pointer",...h},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),onMouseDown:I=>{m?.(I,i),I.preventDefault()},...s,children:c.jsx("svg",{width:""+15*l,height:""+15*l,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:p})})})},kr=e=>{const{value:t,coords:n,bounds:l,children:a,style:i,range:m,zoom:h=1,view:s,bodyStyle:p,normalStyle:b,showFormulas:C,showZeros:u,docTheme:I,onLinkMouseDown:x,onFilterButtonMouseDown:A,filterButtonProps:z,createFilterButton:H=Rr,...B}=e,M=l.height/h,P=l.width/h,f=t,F=f.getValue(),S=t.getStyle(),G=p?.darkMode??!1;let D,O;const $=F&&F.isFormulaError,ue=$&&F instanceof d.FormulaError.Parse;let U,V=C||ue;if(V)if(f.isSpillOverflow())O="";else{const xe=f.getFormulaText();xe?O=xe:D=f.getNumberFormat(d.NumberFormat.Type.General)}else D=f.getNumberFormat();V||(U=f.getTextOverflow());const R=U?U.colBounds.width+U.leftOffset+U.rightOffset:P,K=U?U.anchorBounds.x-U.leftOffset:0,k=U?U.anchorBounds.width:P,L=U?U.anchorBounds.x:0;let ne,le=f.getRenderHorizontalAlignment();D&&(ne=D?.formattedRuns,O=ne?.runs[0]?.text??D.displayText);const Re=f.getCalcStatus()===d.ICell.CalcStatus.Pending;let fe=null,me=S.getFill().toCSS(G,l),ke=0,We=0;if(!S.getBorder().isEmpty()){const xe=S.getBorder().getRight();!xe.isNone()&&d.IBorder.BuiltInDefinitions.get(xe.getStyle()).width>1&&(ke=1);const N=S.getBorder().getBottom();!N.isNone()&&d.IBorder.BuiltInDefinitions.get(N.getStyle()).width>1&&(We=1)}let Fe=null;if(P!==k||ke||We||typeof me?.backgroundPosition=="number"){const{backgroundPosition:xe,...N}=me,J=xe??0,j=s?.getScrollTopLeft(),Z=J?-(l.x+(j.left??0))%J:0,qe=J?-(l.y+(j.top??0))%J:0;(xe!==void 0||ke||We||P!==k)&&(Object.keys(N).length===1&&N.background==="none"||(me=null,Fe=c.jsx("div",{className:"fill",style:{marginLeft:`${Z}px`,marginTop:`${qe}px`,left:L*h,width:r.ReactUtils.boundPixel(k*h-Z+1+ke),height:r.ReactUtils.boundPixel(l.height-qe+1+We),...N}},"background")))}let Ve=null;const ee=f.getComments(),Y=f.getWarnings(),ge=f.getErrors();if(ee||$||ge.length>0||Y.length>0){const xe={size:7*h,darkMode:G,cellWidth:k*h+2,cellHeight:M*h+2,style:{top:-1,left:L*h-1}};Ve=Ve??[],(Y.length>0||ge.length>0||$)&&Ve.push(c.jsx(vo,{anchorLocation:he.AnchorLocation.TopLeft,...xe},`indicator-${Ve.length}`)),ee&&Ve.push(c.jsx(vo,{anchorLocation:he.AnchorLocation.TopRight,...xe},`indicator-${Ve.length}`))}const De=S.getFont();let X=D?.conditionalColor;const _=S.getAlignment(),re=_.getHorizontal()===d.ITextFrame.HorizontalAlignment.Fill,pe=_.getHorizontal()===d.ITextFrame.HorizontalAlignment.CenterContinuous||re,se=pe||V?0:_.getRotation(),Ie=f.getInsets(),ie=Ie.top+Ie.bottom;let we=Ie.left,Me=Ie.right;const Se={...i,left:i.left-1,top:i.top-1,width:i.width+1+ke,height:i.height+1+We},je=f.getColumnFilter(),v=je&&!je?.hasHiddenButton();let _e=null;Re&&(_e=c.jsxs("div",{className:"slider",children:[c.jsx("div",{className:"line"}),c.jsx("div",{className:"subline inc"})]},"pending"));const Oe=!(Re||v||Fe||a||Ve||ne?.runs.length>1||U||se%360!=0);me?.background==="none"&&(me=null);let Qe=pe||!(!U||!(U.rightIndex>0||U.leftIndex>0||U.colSpan>1));if(!Qe){const xe=f.getSpans();(xe.width>1||xe.height>1)&&(Qe=!0)}const ae={...me,...Se,pointerEvents:x?"auto":void 0};if(!he.CommonUtils.isEmpty(O)||!he.CommonUtils.isEmpty(D?.repeatPlaceholder)){const xe=D?.canWrap??!1;let N=null,J=null,j=null,Z=[],qe=!0;u||V||F!==0||(qe=!1);const g=f.getTextFrame(V);if(qe&&g){let T=R-1-(we+Me);if(se){N=g.layout().bounds;const Ce={x:0,y:0,width:R-1,height:M};if(ne){let ve=ne.width;if(D.repeatPlaceholder||D.repeatChars.length>0){const ye=d.GeomUtils.boundsToPoints(Ce),He=d.GeomUtils.rotatePoints(ye,-se);ve=d.GeomUtils.minBoundingRect(He).width}N={...N,width:ve}}j=d.GeomUtils.clipToOuterRect({...N,width:N.width+1+we+Me},Ce,se),T=j.width-1-(we+Me)+.01}let q=null;xe&&(q={width:T});let y=null,w=D?.repeatPlaceholder;const E=g.layout(q);if(N=E.bounds,V?N={...N,width:0}:ne&&(N={...N,width:D.repeatPlaceholder||D.repeatChars.length>0?T:ne.width}),se&&xe){let te=null;E.visitLines({visitTextLine:(Ce,ve)=>{let ye=Ce.bounds;const He=d.GeomUtils.boundsToPoints(ye),Ee=d.GeomUtils.rotatePoints(He,se),ze=d.GeomUtils.minBoundingRect(Ee);ye={...ye,x:(ze.width-ye.width)/2,y:(ze.height-ye.height)/2},te=te?d.GeomUtils.unionBounds(te,ye):ye}}),N={...te,width:te.width+we+Me}}if(!w&&f.getType()!==d.ScalarType.String&&Math.floor(N.width)>T){if(S.getNumberFormat()==="General"&&f.getType()===d.ScalarType.Number){const te=S.measureText("0"),Ce=Math.floor(T/te.width),ve=F,ye=he.CommonUtils.splitNumber(ve),He=Math.min(10,Ce-(Math.max(1,ye.ipLength)+1)-(ve<0?1:0));if(He>=-1){const Ee=`0${He>0?".":""}${"#".repeat(Math.max(0,He))}`;y=f.getNumberFormat(Ee).displayText,y==="0"&&ve<0&&(y="-0")}else if(Math.abs(ve)>=Math.pow(10,5)||Math.abs(ve)<=Math.pow(10,-5)){const Ee=Ce-5-(ve<0?1:0);if(Ee>=0){const ze=`0.${"0".repeat(Math.max(0,Ee-1))}E+00`;y=f.getNumberFormat(ze).displayText}}}y||(w="#")}if(!w&&ne?.lastRepeatIndex>=0&&ne?.width>T&&(w="#"),w&&T>0){const te=S.measureText(w),Ce=Math.floor((T||1)/(te?.width||1));y=Ce>0?w.repeat(Ce):"",le=d.ITextFrame.HorizontalAlignment.Center}if(V&&(le=d.ITextFrame.HorizontalAlignment.Left),y){const te=S.measureText(y).width;te&&(N={...N,width:te})}if(J={...N,width:N.width+we+Me,height:N.height},se&&!xe){const te=d.GeomUtils.boundsToPoints(J),Ce=d.GeomUtils.rotatePoints(te,se),ve=d.GeomUtils.minBoundingRect(Ce);J.width=ve.width,J.height=ve.height}le===d.ITextFrame.HorizontalAlignment.Center||le===d.ITextFrame.HorizontalAlignment.CenterContinuous?J.x=(R-J.width)/2:le===d.ITextFrame.HorizontalAlignment.Right?J.x=R-J.width-.5:J.x=.5,_.getVertical()===d.ITextFrame.VerticalAlignment.Center?J.y=(M-J.height)/2:_.getVertical()===d.ITextFrame.VerticalAlignment.Bottom?J.y=M-J.height-ie:J.y=ie;const W=Oe?{...B}:void 0,oe={style:{left:i.left-1,top:i.top-1,width:i.width+1,height:i.height+1,transform:se?`rotate(${se}deg)`:void 0,cursor:x?"pointer":void 0,pointerEvents:x?"auto":void 0,zIndex:Qe?1:void 0,...me},onMouseDown:x,onDoubleClick:x?te=>{te.stopPropagation(),te.preventDefault()}:null,...W};ue&&(oe.style.textDecorationStyle="wavy",oe.style.textDecorationColor=G?"rgb(0, 255, 255)":"red",oe.style.textDecorationLine="underline");const ce=De.getSize(),de=(te,Ce,ve,ye,He,Ee,ze,Le=null)=>{let $e=ce*h,Ue=ve,et=ze?.runs?ze.runs:[{type:d.NumberFormat.ParseRunType.Text,text:te,width:S.measureText(te,$e).width}];ze&&ze?.width!==N.width&&(N={...N,width:ze?.width});let Pe=we;if(ze?.lastRepeatIndex>=0&&T>ze?.width){const it=ze.runs[ze.lastRepeatIndex];if(it){const Ze=[...et],xt=Math.max(0,T-1-ze.width);let ft=0,mt="";if(xt>0){const pt=Math.floor(xt/it.width);mt=pt>0?it.text.repeat(pt):"",ft=xt}Ze[ze.lastRepeatIndex]={type:d.NumberFormat.ParseRunType.Repeat,text:mt,width:ft},et=Ze,N={...N,width:ze.width+ft}}}const Xe=(it,Ze,xt,ft,mt,pt,at,Qt,It,Dt=null)=>{let zt,en=Ue.width;He===d.ITextFrame.HorizontalAlignment.Justify?(en=mt,Ee||(zt="justify")):He===d.ITextFrame.HorizontalAlignment.Distributed&&(en=mt,zt=Ee||it.text.split(" ").length-1==0?"center":"justify");const{style:Et,className:wn,...yt}=Dt;let Vt=it.text;if(He===d.ITextFrame.HorizontalAlignment.Fill&&D?.repeatChars.length===0){const ct=Math.max(1,Math.floor((Ue?.width??0)/(at?.width??1)));Vt=Vt.repeat(ct)}let tn=Ue.height;const Mt=De.getVerticalAlignment(),Nt=Mt===d.IFont.VerticalAlignment.Sub,bn=Mt===d.IFont.VerticalAlignment.Super;if(Nt||bn){const ct=De.getSuperSubScale();$e*=ct,tn*=ct}const nt={textAlign:zt,textAlignLast:zt,...Et,...De.toCSS(G,h,!0),fontSize:$e*d.IFont.getDeviceScale()};Oe||(nt.background=void 0),X&&(nt.color=X.toCSS(G));const xn=Pe+Ze;let Ht=Ie.top+Ue.y+0;if(Nt&&(Ht+=It-$e),pt){const ct=(at.x+xn)*h+1,vt=(at.y+Ht)*h+1;vt<0?nt.marginTop=vt:nt.paddingTop=vt,ct<0?(nt.width=(Et?.width??0)-ct,nt.left=(Et?.left??0)+ct):nt.paddingLeft=ct,nt.paddingRight=Math.max(0,(Et?.width??0)-en*h-ct),nt.paddingBottom=Math.max(0,(Et?.height??0)-Ue.height*h-vt),nt.height=(Et?.height??0)+(vt<0?-vt:0),(vt<0||ct<0)&&(nt.clipPath=`inset(${vt<0?-vt:0}px 0px 0px ${ct<0?1-ct:0}px)`)}else if(nt.left=(at.x+xn)*h+1,nt.top=(at.y+Ht)*h+1,nt.width=at.width*h,nt.height=at.height*h,se&&!xe){nt.left=(at.x+Ze)*h+1,nt.top=(at.y+(Ue.y+0))*h+1;const ct=d.GeomUtils.centerPoint({x:Pe+Ze,y:0,width:it.width,height:Ue.height}),vt=d.GeomUtils.centerPoint({x:Pe,y:0,width:mt,height:Ue.height}),qn=d.GeomUtils.rotatePoints([ct],se,vt),Sn={x:qn[0].x-ct.x,y:qn[0].y-ct.y};nt.left=nt.left+Sn.x*h,nt.top=nt.top+Sn.y*h;const Lt={...Ue,x:Pe,y:Ie.top,width:Ue.width+(we+Me)},Rn=d.GeomUtils.boundsToPoints(Lt),Xn=d.GeomUtils.rotatePoints(Rn,se),kn=d.GeomUtils.minBoundingRect(Xn);Lt.width=kn.width,Lt.height=kn.height;const Mn=d.GeomUtils.centerPoint(Lt),Ut={x:Mn.x-vt.x,y:Mn.y-vt.y};nt.left=nt.left+Ut.x*h,nt.top=nt.top+Ut.y*h}nt.lineHeight=tn*h+"px";const nn=Oe?void 0:"text-line";Z.push(c.jsx("div",{className:wn?`${wn} ${nn}`:nn,style:nt,...yt,children:Vt},`text-${Ue.y}-${ft}-${xt}`))};if(_.getOverflow()===d.ITextFrame.Overflow.Shrink&&T>0){let it=N?.width??0,Ze=0;for(;it>1&&it>T&&$e>2&&Ze<100;)$e*=T/it,it=S.measureText(te,$e).width,Ze++;N={...N,width:it}}let st=Ue.x;He===d.ITextFrame.HorizontalAlignment.Right?st+=N.width-Ue.width:He!==d.ITextFrame.HorizontalAlignment.Center&&He!==d.ITextFrame.HorizontalAlignment.CenterContinuous||(st+=(N.width-Ue.width)/2),ze?.lastRepeatIndex>=0&&(st=Ue.x);const bt=et.length;for(let it=0;it<bt;it++){const Ze=et[it];(Ze.type===d.NumberFormat.ParseRunType.Text||Ze.type===d.NumberFormat.ParseRunType.Repeat)&&(Ze.type,d.NumberFormat.ParseRunType.Repeat,Xe(Ze,st,it,Ce,He===d.ITextFrame.HorizontalAlignment.Justify||He===d.ITextFrame.HorizontalAlignment.Distributed||ze?.lastRepeatIndex>=0?T:Ue.width,Oe,{x:J.x+K,y:J.y,width:Ze.width,height:N.height},0,ye,Le)),st+=Ze.width}};y?de(y,0,{x:0,y:0,...N},E.lines[0].baseline,le,!0,null,oe):E.visitLines({visitTextLine:(te,Ce,ve)=>{const ye=te.runs[0].text.replace(/\s+$/,""),He=Ce===ve-1;let Ee=le===d.ITextFrame.HorizontalAlignment.Justify&&(He||te.runs[0].text.endsWith(`
8
8
  `))?d.ITextFrame.HorizontalAlignment.Left:le,ze=0;Ce>0&&(_.getVertical()===d.ITextFrame.VerticalAlignment.Distributed||_.getVertical()===d.ITextFrame.VerticalAlignment.Justify)&&(ze=Math.max(0,(M-(ie+3)-te.bounds.height*ve)/(ve-1)*Ce)),_.getVertical()===d.ITextFrame.VerticalAlignment.Distributed&&se&&se%90==0&&se%180!=0&&(Ee=d.ITextFrame.HorizontalAlignment.Distributed),Ee!==d.ITextFrame.HorizontalAlignment.Justify&&Ee!==d.ITextFrame.HorizontalAlignment.Distributed&&Ee!==d.ITextFrame.HorizontalAlignment.Fill||(N={...N,width:T});let Le=re||D&&(D.repeatChars.length>0||D.spacingChars.length>0)?N.width:te.bounds.width;const $e={...te.bounds,y:te.bounds.y+ze+0,width:Le};de(ye,Ce,$e,g.lines[0].baseline,Ee,He,ve===1?ne:null,Oe&&Ce>0?{...oe,style:{...oe.style,background:void 0}}:oe)}})}Z.length>0&&(fe=Z)}if(Oe)return fe&&fe.length>0?fe:c.jsx("div",{style:ae,...B});let Te=x?"auto":Se.pointerEvents,Ne=null;if(v){const xe={x:L*h-1,y:-1,width:k*h+1,height:M*h+1};Te="auto",Ne=H({renderBounds:xe,darkMode:G,className:"filter-button",disabled:!f.isEditAllowed(),zoom:h,filter:f.getColumnFilter(),onFilterButtonMouseDown:A,...z}),Ne&&(Ne=c.jsx("div",{style:{...xe,position:"absolute",zIndex:2,display:"flex",alignItems:"end"},onDoubleClick:N=>{N.stopPropagation(),N.preventDefault()},children:Ne},"filterButton"))}Re&&!fe&&(fe=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 Ae=[Fe,fe,a,Ve,_e,Ne];return c.jsx("div",{style:{...me,...Se,pointerEvents:Te},...B,children:Ae})},jo={text:"",placeholder:""},Oo=(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]),Mr=o.memo(o.forwardRef((e,t)=>{const{editState:n,onStartEdit:l,onChangeEdit:a,onSubmitEdit:i,onCancelEdit:m,onDoneEdit:h,defaultTextStyle:s,useRichStyling:p=!0,bodyStyle:b,activeCoords:C,sheet:u,commands:I,containerBounds:x,setNaturalSize:A,onFocus:z,disabled:H,style:B,zoom:M=1,linesVisible:P,autoFocus:f=!1,...F}=e,{height:S=0,width:G=0}=x??{},D=b?.darkMode??!1,O=o.useRef(null),[$,ue]=o.useState(!1),[U,V]=o.useState(null),[R,K]=o.useState(()=>n);o.useEffect(()=>{We.current=!1,K(n)},[n]);const k=o.useMemo(()=>{const N=R.clean();let J=N.getStyle();p||(J=J.createTemporaryStyle({font:{size:s?.fontSize}}));const j=N.getFormula(),Z=J.getAlignment(),qe=j?d.ITextFrame.HorizontalAlignment.Left:Z.getHorizontal(),g=Z.getVertical(),T=Z.getOverflow()===d.ITextFrame.Overflow.Wrap||N.getType()===d.ScalarType.String&&(qe===d.ITextFrame.HorizontalAlignment.Justify||qe===d.ITextFrame.HorizontalAlignment.Distributed||g===d.ITextFrame.VerticalAlignment.Justify||g===d.ITextFrame.VerticalAlignment.Distributed),q=(E=>{if(!E)return jo;const W=E.clean();if(!W)return jo;let oe=W.getStyle()?.getQuotePrefix();if(E.dirty===void 0||E.dirty===null){let ce="",de=W.getFormulaText();de&&(ce=de,oe=!1),ce||(ce=W.toTextUnformatted(!0)??"");let te="";if(!E.editMode&&W.isSpillOverflow()){const Ce=W.getSpill();if(Ce){const ve=Ce.getCell(),ye=ve.getFormulaText();ve.isEqual(W)||(te=ye)}}return oe&&(ce="'"+ce),{text:ce,placeholder:te}}return{text:E.dirty??"",placeholder:""}})(R),y=q.text,w=d.ITextFrame.toCSSHorizontalTextAlign(p&&!j?R.clean()?.getRenderHorizontalAlignment():d.ITextFrame.HorizontalAlignment.Left);return{style:J,isWrapped:T,textValue:y,formula:j,frameVertAlign:g,placeholder:q.placeholder,insets:p?N.getInsets():he.TypesUtils.EmptyRect,textAlign:w}},[R,s,D,M,p]),L=o.useRef(null),ne=r.useImperativeElement(t,()=>({startEdit:N=>{O.current=N?.initialSelection;const J={...n,editMode:N?.editMode??!1};N?.text!==void 0&&(J.dirty=N.text),J.editMode===n.editMode&&J.dirty===n.dirty||(K(J),fe?.(J))},submitEdit:()=>Fe(),cancelEdit(){Ve()},autoFocus(){L.current.focus()},dispatchEvent:N=>L.current.dispatchEvent(N),focus(){L.current.focus()},getLineHeight:Re}),[l,n]);o.useLayoutEffect(()=>{if(!U||!$)return;const N=L.current;k.textValue,N&&N.setSelectionRange(U.start,U.end,U.direction)},[L.current,U,k.textValue]);const le=o.useMemo(()=>{const N=R?.clean(),J=k.style.createTemporaryTextFrame(k.textValue,N?.getType()===d.ScalarType.String),j=p?N.getInsets().right+N.getInsets().left:0;let Z=null;return k.isWrapped&&(Z={width:G-j}),J.layout(Z)},[k,G,R,p]),Re=r.useCallbackRef(()=>Math.ceil(le?.lines[0]?.bounds.height),[le]);o.useLayoutEffect(()=>{if(!le)return;const N=k.style,J=N.getInsets()??he.TypesUtils.EmptyRect,j=p?J.left+J.right:0,Z=p?.04*N.getFont().getSize():1,qe=Math.round(k.isWrapped?void 0:le.bounds.width+j+Z),g=Math.round(le.bounds.height);A?.({width:qe,height:g})},[le,A,k,p,R]);const fe=r.useCallbackRef(a,[a]),me=r.useCallbackRef(N=>{if(R.dirty===N)return;const J={...R};J.dirty=N,L.current,K(J),fe?.(J)},[R]),ke=r.useCallbackRef(N=>{if(R.editMode===N)return;const J={...R};J.editMode=N,K(J),fe?.(J)},[R]),We=o.useRef(!1),Fe=r.useCallbackRef(()=>{if(We.current)return!1;try{i?.(R),h?.(),We.current=!0}catch{return!1}return!0},[i,R]),Ve=r.useCallbackRef(()=>{We.current=!0,K(n),m?.(),h?.()},[m,n]),ee=r.useCallbackRef(N=>{if(!L.current)return;if(N.key,N.isDefaultPrevented(),!(N.isTrusted||N.nativeEvent.ctrlKey||N.nativeEvent.metaKey||N.nativeEvent.altKey||N.nativeEvent.isComposing||dt.STANDARD_KEY_CHARS.indexOf(N.nativeEvent.key)===-1&&N.nativeEvent.key!=="Backspace")){const q={...R};let y=0;return Oo(q,q.dirty)&&!isNaN(parseFloat(N.key))?(q.dirty?.endsWith("%")?q.dirty=(q.dirty.substring(0,q.dirty.length-1)??"")+N.key+"%":q.dirty=(q.dirty??"")+N.key+"%",y=q.dirty.length-1):N.nativeEvent.key==="Backspace"?(q.dirty="",y=q.dirty.length):(q.dirty=(q.dirty??"")+N.key,y=q.dirty.length),L.current.value=q?.dirty,O.current={start:y,end:y,direction:"forward"},L.current?.setSelectionRange(y,y,"forward"),K(q),fe?.(q),void N.preventDefault()}const J=N.nativeEvent.ctrlKey,j=N.nativeEvent.shiftKey,Z=N.nativeEvent.altKey,qe=N.nativeEvent.metaKey;if(J&&N.key==="z"&&N.stopPropagation(),N.which===r.KeyCodes.Escape)return N.preventDefault(),void Ve();if(N.which===r.KeyCodes.F2)return ke(!0),void N.preventDefault();const g=N.target;if(N.key==="%"&&g.selectionStart===g.selectionEnd&&g.value[g.selectionStart]==="%"&&R?.clean().getStyle().numberFormat.includes("%"))return V({start:g.selectionStart+1,end:g.selectionEnd+1,direction:g.selectionDirection}),void N.preventDefault();if(N.which===r.KeyCodes.Enter){if(N.preventDefault(),qe||Z){const q=k.textValue.substring(0,g.selectionStart)+`
9
- `+k.textValue.substring(g.selectionEnd);return me(q),void V({start:g.selectionStart+1,end:g.selectionStart+1,direction:g.selectionDirection})}return void(Fe()&&u.getSelection().traverse(d.IRange.Orientation.Column,j))}if(N.which===r.KeyCodes.Tab)return N.preventDefault(),void(Fe()&&u.getSelection().traverse(d.IRange.Orientation.Row,j));let T=null;switch(N.which){case r.KeyCodes.Left:T=d.IRange.Direction.Left;break;case r.KeyCodes.Right:T=d.IRange.Direction.Right;break;case r.KeyCodes.Up:T=d.IRange.Direction.Up;break;case r.KeyCodes.Down:T=d.IRange.Direction.Down}if(T&&!(J||j||Z||qe)&&!R.editMode)return void Fe();R.editMode&&(T||Fl.includes(N.which))&&N.stopPropagation()},[R,u,k]),Y=o.useCallback(()=>{L.current?.focus(),setTimeout(()=>{L.current?.select()},0)},[]),ge=o.useCallback(()=>{L.current?.focus(),console.log("implement toggleRelativeReferences")},[]),De=r.useCallbackRef(()=>{const N=L.current?.value;let J="";if(C.rowIndex>0){const j=u.getRange({rowIndex:C.rowIndex-1,colIndex:C.colIndex}).getCell();j&&(J=j.toTextUnformatted(!0))}me(N+J)},[C,u]);o.useEffect(()=>u.getRange(C).addListener(()=>{const N={...R,clean:()=>u.getRange(C).getCell()};K(N),fe?.(N)}),[C,u,R]);const X=o.useCallback(()=>{const N=R.clean().createTemporaryCell({value:hn(),style:{numberFormat:"Medium Time"}}).toText();me((L.current?.value??"")+N)},[u]),_=o.useCallback(()=>{const N=R.clean().createTemporaryCell({value:hn(),style:{numberFormat:"Short Date"}}).toText();me((L.current?.value??"")+N)},[u]),re=o.useMemo(()=>({element:()=>L.current,doCopy:N=>{const J=L.current.value.substring(L.current.selectionStart,L.current.selectionEnd);if(N?.isCut){const j=L.current.value.substring(0,L.current.selectionStart)+L.current.value.substring(L.current.selectionEnd,L.current.value.length);me(j)}return J}}),[L.current]),pe=o.useMemo(()=>({element:()=>L.current,doPaste:async(N,J)=>{const j=await N.toText?.();if(!j)return!0;const Z=L.current.value.substring(0,L.current.selectionStart)+j+L.current.value.substring(L.current.selectionEnd,L.current.value.length);return me(Z),V({start:L.current.selectionStart+j.length,end:L.current.selectionStart+j.length,direction:"forward"}),!0}}),[L.current]),se=o.useMemo(()=>({contains:N=>L.current?.contains(N)||!1,focus(){L.current.focus()}}),[]),Ie=o.useMemo(()=>[new r.SimpleCommand("selectAll",se,{label:"Select All",description:"Select all of the text in cell.",shortcut:{key:"a",modifiers:[r.KeyModifiers.Ctrl]}},Y),new r.SimpleCommand("startEditValueAbove",se,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:'"',modifiers:[r.KeyModifiers.Ctrl]},{key:'"',modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},De),new r.SimpleCommand("startEditCurrentTime",se,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},X),new r.SimpleCommand("startEditCurrentDate",se,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl]}},_),new r.Command("relativeReferencesToggle",se,{label:"Toggle References",description:"Toggles cell references from relative to absolute, to partially absolute, back to relative again.",shortcut:{key:"F4"}},ge),new r.Command("toggleEditorFocus",se,{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 N=null;const J=()=>({contains:j=>L.current?.contains(j)||!1,focus(){L.current.focus()}});return N=I?I.createChildGroup(J,"editor",!1):new r.CommandGroup(J,"editor"),N.addCommands(Ie,!0),N},[I,Ie]),we=o.useMemo(()=>({notifier:null,source:re,target:pe,commands:ie}),[re,pe,ie]);r.useCopyPaste(we);const[Me,Se]=o.useState(!f);o.useEffect(()=>{Se(!1)},[]);const je=r.useCallbackRef(N=>{ue(!0),ie?.activate();const J=O.current;if(J!==!1){let j,Z;const qe=L.current.value;Oo(R,qe)&&(j=qe.length-1,Z=qe.length-1),j=J?.start??j??qe.length,Z=J?.end??Z??qe.length,O.current=!1,V({start:j,end:Z,direction:"forward"})}z?.(N)},[z,R]),v=k.insets;let _e=v.left+1;const Oe=v.left+v.right+2-1,Qe=le?.bounds.height??0;let ae,Te=v.top;k.frameVertAlign===d.ITextFrame.VerticalAlignment.Center?Te=Math.max(0,(S-(v.top+v.bottom)-Qe)/2):k.frameVertAlign===d.ITextFrame.VerticalAlignment.Bottom&&(Te=Math.max(0,S-(v.top+v.bottom)-Qe)),P!==void 0&&le?.lines[0]?.bounds&&(ae=le?.lines[0]?.bounds.height*P);const Ne=k.style.getFont();let Ae=Ne.getSize();Ne.isSuperSub()&&(Ae*=Ne.getSuperSubScale()),Ae*=d.IFont.getDeviceScale()*M;const xe=p?Ne.toCSS(D,M):null;return c.jsx("div",{className:"sheet-cell-editor",onMouseDown:N=>{L.current&&document.activeElement!==L.current&&requestAnimationFrame(()=>{L.current.focus()})},ref:ne,...F,style:{display:"flex",flexGrow:1,alignSelf:"stretch",height:"100%",width:"100%",maxWidth:"100%",maxHeight:"100%",cursor:"initial",...B},children:c.jsx("div",{className:"editor-placement",style:{display:"flex",flexGrow:1,position:"relative",top:Te*M+1,left:_e*M,width:`calc(100% - ${Oe*M}px)`,maxWidth:`calc(100% - ${Oe*M}px)`,height:(ae??Qe)*M,maxHeight:(ae??Qe)*M},children:c.jsx("textarea",{spellCheck:"false",placeholder:k.placeholder,ref:L,value:k.textValue,disabled:Me,readOnly:H||u.getProtection().isReadOnly(),name:"sheet-cell-editor",autoComplete:"off",autoCapitalize:"off",style:{flex:"1 1 100%",font:"inherit",...xe,fontSize:Ae?`${Ae}px`:"inherit",textAlign:k.textAlign,lineHeight:(le?.lines[0]?.bounds.height??0)*M+"px",height:(le?.bounds.height??0)*M,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:je,onBlur:()=>{ue(!1)},onSelect:N=>{},onChange:N=>{L.current&&!We.current&&(O.current=!1,me(N.target.value),k.textValue,N.target.value,N.target.selectionStart,N.target.selectionEnd,N.target.selectionDirection,V({start:N.target.selectionStart,end:N.target.selectionEnd,direction:N.target.selectionDirection}))},onMouseDown:N=>{$&&ke(!0)},onKeyDown:ee})})})})),Tr=(e,t)=>({clean:e,dirty:t,editMode:!1}),Ir=e=>{const{length:t=0,width:n=1,dashArray:l=null,dashArrayAdditional:a=null,isDouble:i=!1,isAngled:m=!1,offsetX:h=0,offsetY:s=0,isVertical:p=!1,...b}=e,C=B=>{let M=null;if(B&&n>0){M="";for(let P=0;P<B.length;P++)M+=B[P],P<B.length-1&&(M+=",")}return M},u=C(l);let I=u;a&&(I=C(a));let x=n,A=t,z=null;if(i){x=Math.floor(n/2);const B=x+x/2+1;let M=null;M=p?`M ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s+A)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+B)} L ${r.ReactUtils.boundPixel(h+A)} ${r.ReactUtils.boundPixel(s+B)}`,z=c.jsx("path",{strokeWidth:x,strokeDasharray:I,d:M,...b})}if(m){x=n/2;const B=x+x/2;let M=I,P=null;P=p?`M ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s+A)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+B)} L ${r.ReactUtils.boundPixel(h+A)} ${r.ReactUtils.boundPixel(s+B)}`,z=c.jsx("path",{strokeWidth:x,strokeDasharray:M,strokeDashoffset:"1",shapeRendering:"crispEdges",d:P,...b})}let H=null;return H=p?`M ${r.ReactUtils.boundPixel(h+x/2)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+x/2)} ${r.ReactUtils.boundPixel(s+A)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+x/2)} L ${r.ReactUtils.boundPixel(h+A)} ${r.ReactUtils.boundPixel(s+x/2)}`,c.jsxs(c.Fragment,{children:[c.jsx("path",{strokeWidth:x,strokeDasharray:u,d:H,...b}),z]})};function so(e,t){if(typeof e=="function")return e(t);e&&(e.current=t)}var Xt=parseInt(o.version.split(".")[0],10)>=19?function(e){return t=>{const n=[];for(const l of e){const a=so(l,t),i=typeof a=="function";n.push(i?a:()=>so(l,null))}return()=>{for(const l of n)l()}}}:function(e){return t=>{for(const n of e)so(n,t)}},Al=function(){},Er=typeof window<"u",sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dl=Er?o.useLayoutEffect:o.useEffect,Bo={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const Ot=Er&&window.ResizeObserver!==void 0?function(){var e=o.useState(null),t=e[0],n=e[1],l=o.useState(Bo),a=l[0],i=l[1],m=o.useMemo(function(){return new window.ResizeObserver(function(h){if(h[0]){var s=h[0].contentRect,p=s.x,b=s.y,C=s.width,u=s.height,I=s.top,x=s.left,A=s.bottom,z=s.right;i({x:p,y:b,width:C,height:u,top:I,left:x,bottom:A,right:z})}})},[]);return Dl(function(){if(t)return m.observe(t),function(){m.disconnect()}},[t]),[n,a]}:function(){return[Al,Bo]},zl=(e,t)=>e.colStart===t.colStart?e.rowStart-t.rowStart:e.colStart-t.colStart,Nl=(e,t)=>e.rowStart===t.rowStart?e.colStart-t.colStart:e.rowStart-t.rowStart,Ll=e=>{const{key:t,points:n,range:l,stroke:a,darkMode:i,forceThinBorder:m=!1,shiftIfWide:h=!1,isVertical:s=!1,intersections:p,layout:b}=e,C=d.IBorder.BuiltInDefinitions.get(m?d.IBorder.StrokeStyle.Thin:a.getStyle());if(!C)return null;const u=n[0],I=n[1],x=n[2],A=n[3];let z=1+(s?A-I:x-u),H=0;const B=a.getColor().toRGBA(i).toString(),M=C.description.toLowerCase().includes("double");let P,f;const F=s?"rowStart":"colStart",S=s?"rowEnd":"colEnd",G=s?I:u;if(p?.length>0){const ue=p[0];if(ue?.range[F]===l[F]){const V=d.IBorder.BuiltInDefinitions.get(ue.stroke.getStyle());H=Math.floor(V.width/2)}if(p[p.length-1]?.range[S]===l[S]){const V=d.IBorder.BuiltInDefinitions.get(p[p.length-1].stroke.getStyle());z=Math.floor(z+(V.width===2?0:V.width/2))}if(M){const V=s?"colStart":"rowStart",R=s?"colEnd":"rowEnd",K=s?b?.getRowOffset:b?.getColOffset;let k=0,L=0;P=[],f=[];const ne=p.length;for(let le=0;le<ne;le++){const Re=p[le];if(Re.stroke.getStyle()===d.IBorder.StrokeStyle.Double&&K){const fe=K(Re.range[F])-(G-H);Re.range[V]<l[V]&&(P.push(fe-k),k=fe,P.push(1),k++),Re.range[R]>l[R]&&(f.push(fe-L),L=fe,f.push(1),L++)}}P.length>0&&k<z&&P.push(z-k),f.length>0&&L<z&&f.push(z-L)}}let D=s?-Math.floor(C.width/2):-H,O=s?-H:-Math.floor(C.width/2);const $=h&&C.width>2?-1:0;return c.jsx(Ir,{offsetX:u+D+$,offsetY:I+O+$,length:z+H,isVertical:s,stroke:B,width:C.width,dashArray:P??C.pattern,dashArrayAdditional:f,isDouble:M,isAngled:C.description.toLowerCase().includes("slant")},t)},So=({getBorderAt:e,borderRenderer:t=Ll,getVisibleCells:n,darkMode:l,forceThinBorder:a=!1,defaultColor:i="black",shiftIfWide:m=!1})=>{const h=r.useCallbackRef(n,[n]);return{overlay:o.useMemo(()=>p=>{const b=p.toClipBounds(p.getRangeCoordsBounds(),-3);if(!b)return;const C=h(p);if(C.length===0)return;const u=p.getVisibleColumnOffsets(),I=p.getVisibleRowOffsets();let x=[],A=[];const z=p.getVisibleColumns(),H=p.getVisibleRows(),B=[],M=[],P=[],f=(U,V,R,K,k,L,ne)=>{const le={index:K,stroke:k,visibleIndex:R,edge:L,length:ne};U[V]||(U[V]=[]),U[V].length>0&&U[V][U[V].length-1]?.index===K?U[V][U[V].length-1]=le:U[V].push(le)},F=p.getVisibleRangeCoords(),S=C.length;for(let U=0;U<S;U++){const V=C[U],R=V.coords;if(!R)continue;const K=V?.range??{rowStart:R.rowIndex,colStart:R.colIndex,rowEnd:R.rowIndex,colEnd:R.colIndex};if(!he.CoordUtils.isRangesIntersect(K,F)&&!he.CoordUtils.isRangeWithinRange(K,F))continue;const k=R.colIndex,L=R.rowIndex,ne=u[k],le=I[L];if(K.rowEnd!==K.rowStart){const De=I[K.rowStart]?.spanIndex??-1,X=I[K.rowEnd]?.spanIndex??I[H[H.length-1]].spanIndex+1;x.push({...K,rowStart:De,rowEnd:X})}if(K.colEnd!==K.colStart){const De=u[K.colStart]?.spanIndex??-1,X=u[K.colEnd]?.spanIndex??u[z[z.length-1]].spanIndex+1;A.push({...K,colStart:De,colEnd:X})}const Re=V.value,fe=e(Re,U);if(!fe||fe.isEmpty())continue;const me=fe.getLeft(),ke=fe.getTop(),We=fe.getRight(),Fe=fe.getBottom();let Ve=1,ee=1;if(!ne||!le)continue;const Y=ne.spanIndex,ge=le.spanIndex;me.isNone()||f(B,Y,ge,L,me,d.IBorder.Edge.Left,Ve),ke.isNone()||f(M,ge,Y,k,ke,d.IBorder.Edge.Top,ee),We.isNone()||f(B,Y+ee,ge,L,We,d.IBorder.Edge.Right,Ve),Fe.isNone()||f(M,ge+Ve,Y,k,Fe,d.IBorder.Edge.Bottom,ee)}const G=(U,V,R)=>{const K=[];return U.forEach((k,L)=>{let ne=null;k.sort((Re,fe)=>Re.visibleIndex-fe.visibleIndex);const le=k.length;for(let Re=0;Re<le;Re++){const fe=k[Re];if(!fe?.stroke||V[L]===void 0&&V[L-1]===void 0)continue;let me=!1;if(R){const Ve=x.length;for(let ee=0;!me&&ee<Ve;ee++){let Y=x[ee];Y.colStart<=fe.index&&Y.colEnd>=fe.index&&Y.rowStart<L&&Y.rowEnd>=L&&(me=!0)}}else{const Ve=A.length;for(let ee=0;!me&&ee<Ve;ee++){let Y=A[ee];Y.rowStart<=fe.index&&Y.rowEnd>=fe.index&&Y.colStart<L&&Y.colEnd>=L&&(me=!0)}}if(me)continue;const ke=fe.stroke?.getColor(),We=ke?ke.toRGBA().toString():i,Fe=fe.stroke.getStyle()+":"+We;(Fe!==ne?.key||ne&&ne.visibleIndex+1<fe.visibleIndex)&&(ne&&K.push(ne),ne={key:Fe,index:V[L]??V[L-1]+1,visibleIndex:fe.visibleIndex,edge:fe.edge,stroke:fe.stroke,from:fe.index,to:fe.index+fe.length-1,intersections:[],length:1}),ne.to=fe.index+fe.length-1,ne.visibleIndex=fe.visibleIndex}ne&&K.push(ne)}),K};x=x.sort(Nl),A=A.sort(zl);const D=G(B,z,!1),O=G(M,H,!0);if(D.length===0&&O.length===0)return null;const $=O.length;for(let U=0;U<$;U++){const V=O[U];let R=he.CommonUtils.findEqualOrGreater(D,V.from,k=>k.index),K=!1;for(;!K;){const k=D[R++];k&&k.index>=V.from&&k.index<=V.to+1&&k.from<=V.index&&k.to+1>=V.index&&(V.intersections.push({stroke:k.stroke,range:{rowStart:k.from,rowEnd:k.to+1,colStart:k.index,colEnd:k.index}}),k.intersections.push({stroke:V.stroke,range:{rowStart:V.index,rowEnd:V.index,colStart:V.from,colEnd:V.to+1}})),K=!k||k.index>V.to+1}}for(let U=0;U<$;U++){const V=O[U];let R=V.stroke;const K=`rBorder:${V.index}:${V.from}:${V.to}:${V.edge}`,k={rowStart:V.index,rowEnd:V.index,colStart:V.from,colEnd:V.to+1},L=p.getLayout(),ne=!1,le=L.getColOffset(k.colStart),Re=L.getRowOffset(k.rowStart),fe=[le,Re,L.getColOffset(k.colEnd),Re];P.push(t({key:K,points:fe,stroke:R,darkMode:l,forceThinBorder:a,shiftIfWide:m,range:k,intersections:V.intersections,layout:L,isVertical:ne}))}const ue=D.length;for(let U=0;U<ue;U++){const V=D[U];let R=V.stroke;const K=`cBorder:${V.index}:${V.from}:${V.to}:${V.edge}`,k={rowStart:V.from,rowEnd:V.to+1,colStart:V.index,colEnd:V.index},L=p.getLayout(),ne=!0,le=L.getColOffset(k.colStart),Re=[le,L.getRowOffset(k.rowStart),le,L.getRowOffset(k.rowEnd)];P.push(t({key:K,stroke:R,points:Re,darkMode:l,forceThinBorder:a,shiftIfWide:m,range:k,intersections:V.intersections,layout:L,isVertical:ne}))}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:P},"borders")},[e,l])}},Vo=he.AnchorLocation.Center,Pl=Object.freeze({horizontal:!1,vertical:!1}),Ho=he.TypesUtils.EmptyTopLeft,jl=(e,t)=>he.CoordUtils.EmptyCell,Ol=(e,t)=>new Promise((n,l)=>{l("StaticBorderRenderer does not support scrolling")}),Bl=o.memo(e=>{const{getBorderAt:t,width:n,height:l,style:a,rowCount:i=2,columnCount:m=2,darkMode:h,forceThinBorder:s,children:p,...b}=e,C=o.useRef(null),[u,{width:I,height:x}]=Ot(),A=n??I,z=l??x,H=o.useMemo(()=>{const R=[];for(let K=0;K<i;K++)for(let k=0;k<m;k++){const L={colIndex:k,rowIndex:K};R.push({coords:L,value:L})}return R},[]),B=o.useCallback(R=>H,[H]),{overlay:M}=So({getVisibleCells:B,getBorderAt:t,darkMode:h,forceThinBorder:s}),P=Math.floor(A/m),f=Math.floor(z/i),F={getColOffset:R=>Math.ceil(R*P)+0,getRowOffset:R=>Math.ceil(R*f)+0,getColIndex:R=>Math.floor((R-0)/P)-1,getRowIndex:R=>Math.floor((R-0)/f)-1},S={rowStart:0,colStart:0,rowEnd:i,colEnd:m},G={x:0,y:0,width:Math.max(0,A)+0,height:Math.max(0,z)+0},D=o.useMemo(()=>{const R={},K=Math.floor(A/m);for(let k=0;k<m;k++)R[k]={offset:k*K,size:K,spanIndex:k};return R},[A,z]),O=o.useMemo(()=>{const R={},K=Math.floor(z/i);for(let k=0;k<i;k++)R[k]={offset:k*K,size:K,spanIndex:k};return R},[A,z]);if(!M)return null;const $={width:A,height:z},ue={width:A,height:z},U={getStage:()=>C.current,getTotalSize:()=>$,getViewportSize:()=>ue,getLayout:()=>F,getCellCoordsAsRangeCoords:he.CoordUtils.cellToRange,getVisibleRangeCoords:()=>S,getVisibleRows:()=>{const R=[];for(let K=0;K<i;K++)R.push(K);return R},getTotalRangeCoords:()=>S,getRelativePointFromClient:(R,K)=>({x:R,y:K}),getVisibleColumns:()=>{const R=[];for(let K=0;K<m;K++)R.push(K);return R},toClipBounds:(R,K)=>G,toViewBounds:R=>R,toAbsoluteBounds:R=>R,getBounds:()=>G,getInsets:()=>null,getRangeCoordsBounds:(R,K)=>null,getVisibleColumnOffsets:()=>D,getVisibleRowOffsets:()=>O,allViews:()=>({[Vo]:U}),getAnchor:()=>Vo,getZoom:()=>1,scrollCellCoordsIntoView:Ol,getCellCoordsFromClient:jl,getScrollOrientation:()=>Pl,getScrollTopLeft:()=>Ho,getFreezeTopLeft:()=>Ho},V=M(U);return c.jsxs("div",{style:{...a,position:"relative",display:"flex"},...b,children:[c.jsx("div",{ref:Xt([C,u]),style:{flex:"1 1 100%",display:"flex",maxWidth:"100%",maxHeight:"100%"},children:p}),V]})});function Fr(e){var t,n,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Fr(e[t]))&&(l&&(l+=" "),l+=n)}else for(n in e)e[n]&&(l&&(l+=" "),l+=n);return l}function gt(){for(var e,t,n=0,l="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Fr(e))&&(l&&(l+=" "),l+=t);return l}const Vl="_sheetxl-sheet_1qeq6_5",Hl="_viewport-overlay_1qeq6_6",Ar=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"})]})},Ul=o.memo(e=>{const{colorLicensee:t="blue",colorError:n="red",colorCredits:l="grey",credits:a="All rights reserved - Michael Ford",feature:i,style:m,...h}=e??{},[s,p]=o.useState(null);o.useEffect(()=>{(async()=>{const f=await d.LicenseManager.getDetails();p(f)})()},[]);const[b,C]=o.useState(!1),u={opacity:.65},I=o.useMemo(()=>{const f=s?.getExceptions(),F=f?.length??0;if(F===0)return null;const S=[];for(let G=0;G<F;G++){const D=f[G];S.push(c.jsx("div",{style:{opacity:.8,fontSize:"16px",textAlign:"left",color:n},children:D},G))}return S},[s,n]);if(s===null||s.isValidFor(i))return null;const x=s.getType(),A=!I&&x.endsWith("ity"),z=s.getLicensee(),H=A?1.6:1,B=135/H,M=37/H;let P=null;return!x&&z?.length>0&&(P=c.jsx("div",{style:{opacity:.7,fontWeight:"500",fontSize:"16px",textAlign:"left",color:t},children:z})),c.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",overflow:"hidden",...m},...h,children:c.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column"},children:[b?c.jsx(Ar,{style:u}):c.jsx("svg",{width:B,height:M,style:u,children:c.jsx("image",{style:{width:B,height:M},href:"https://www.sheetxl.com/watermark.svg",onError:()=>C(!0)})}),c.jsxs("div",{children:[P,I,c.jsx("div",{style:{height:"0px",fontSize:"16px",textAlign:"left",width:"0px",opacity:.8,color:l},children:a})]})]})})}),tt=(e,t,n)=>{const l=o.useRef(t);l.current=t;const a=n?.fireOnModelChange??!0;o.useEffect(()=>{if(!e||!l.current)return;const i=Object.keys(l.current),m={},h=i.length;for(let p=0;p<h;p++){const b=i[p];m[b]=(C,u)=>{l.current[b]?.(C,u)}}const s=e.addListeners(m,n);if(a)for(let p=0;p<h;p++)m[i[p]](e);return()=>{s?.()}},[e])},Pn=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 l=n.contributionPoints;if(l&&l.length!==0)for(let a of l)a.startsWith(e)&&t.push(n)}return t}},Dr=o.createContext(void 0),Kl={activateTaskPane(e,t){console.warn("No TaskPaneArea available to activate task pane",e,t)}},zr=()=>o.useContext(Dr)||Kl,Gt={TaskPaneArea:"_TaskPaneArea_6dmgk_5",TaskPaneTitle:"_TaskPaneTitle_6dmgk_13",TaskPaneFrame:"_TaskPaneFrame_6dmgk_36",TaskPaneStrip:"_TaskPaneStrip_6dmgk_52",TaskPaneStripItem:"_TaskPaneStripItem_6dmgk_60"},Ro=o.memo(o.forwardRef((e,t)=>{const{children:n,title:l,icon:a,onClose:i,readOnly:m,focused:h,style:s,className:p,...b}=e,C=o.useMemo(()=>gt("taskpane-title",p,Gt.TaskPaneTitle,{focused:h}),[p,h]);return c.jsxs("div",{ref:t,className:C,style:s,...b,children:[c.jsx("div",{className:"title",style:{flex:"1 1 100%"},children:l}),c.jsx("div",{"aria-label":"close",role:"button",style:{width:24,height:24,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onPointerDown:u=>{u.stopPropagation()},onPointerUp:()=>{i()},children:c.jsx("div",{style:{fontSize:"0.7em"},children:"✕"})})]})}));Ro.displayName="TaskPaneTitle";const $l=(e,t)=>c.jsx(Ro,{...e,ref:t}),Wl=o.memo(o.forwardRef((e,t)=>{const{children:n,entry:l,close:a,listenerContainer:i,model:m,commands:h,onMounted:s,onUnmounted:p,paneWrapper:b,paneProps:C,renderTaskPanelTitle:u=$l,style:I,className:x,...A}=e,[z,H]=o.useState(null),[B,M]=o.useState(!1),P=r.useCallbackRef(a,[a]),f=o.useRef(null),F=o.useRef(null);o.useEffect(()=>(s?.(l),()=>{p?.(l)}),[l]);const S=o.useRef([]),G=o.useMemo(()=>({addListener:$=>{const ue=i($);return S.current.push(ue),ue},close:()=>{P?.()}}),[i]);o.useEffect(()=>()=>{for(const $ of S.current)$();S.current=[]},[]);const D=o.useMemo(()=>(l.renderTaskPanelTitle??u)({title:l.getTitle(),icon:null,readOnly:!1,focused:B,onClose:P,onPointerDown:$=>{}},F),[l,B]),O=o.useMemo(()=>{let $=l.renderTaskPane({entryKey:l.key,model:m,commands:h,frame:G,...C},t);return b&&($=b($)),$},[l,m,h,t]);return c.jsxs("div",{className:gt("taskpane-frame",x,Gt.TaskPaneFrame),tabIndex:0,ref:f,style:I,onPointerDown:async $=>{$.currentTarget.focus()},onFocus:$=>{$.relatedTarget&&!z&&H($.relatedTarget),M(!0)},onBlur:$=>{z&&!f?.current?.contains($.relatedTarget)&&H(null),$.relatedTarget&&M(!1)},...A,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})]})})),ko=o.memo(o.forwardRef((e,t)=>{const{children:n,title:l,taskPanes:a,onSelect:i,selected:m,registry:h=Pn,style:s,className:p,...b}=e,C=o.useMemo(()=>a.map(x=>{const A=h.getRegisteredTaskPane(x);if(!A)return null;let z=A.getIcon?.();z&&(typeof z=="string"&&(z=c.jsx(r.DynamicIcon,{iconKey:z})),z=c.jsx("span",{style:{display:"inline-block",transform:"rotate(90deg)",transformOrigin:"center"},children:z}));const H=x===m;return c.jsxs("div",{style:{writingMode:"vertical-rl",textOrientation:"mixed",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4px",minWidth:"0px"},className:gt("taskpane-strip-item",Gt.TaskPaneStripItem,{selected:H}),onClick:()=>e.onSelect(x),children:[z,A.getTitle()]},x)}),[a,m,i,h]),u=r.useImperativeElement(t,()=>({isTaskPaneStrip:()=>!0}),[]),I=o.useMemo(()=>gt("taskpane-strip",p,Gt.TaskPaneStrip),[p]);return c.jsx("div",{ref:u,className:I,style:s,...b,children:C})}));ko.displayName="TaskPaneStrip";const _l=(e,t)=>c.jsx(ko,{ref:t,...e}),Gl=o.memo(o.forwardRef((e,t)=>{const{className:n="",registry:l=Pn,model:a,commands:i,onOpen:m,onClose:h,paneWrapper:s,paneProps:p,frameWrapper:b,frameProps:C,renderTaskPanelTitle:u,renderTaskPaneStrip:I=_l,alwaysShowStrip:x,style:A}=e,z=r.useCallbackRef(m,[m]),H=r.useCallbackRef(h,[h]),[B,M]=o.useState(null),P=o.useRef(null),[f,F]=o.useState([]),S=o.useRef(new Set),G=r.useCallbackRef(async(R,K=!1)=>{const k=Array.from(S.current),L=k.length;let ne=!0;for(let le=0;ne&&le<L;le++){const Re=k[le];if(Re.onBeforeHide)try{await Promise.resolve(Re.onBeforeHide())===!1&&(ne=!1)}catch{ne=!1}}return ne},[]),D=r.useCallbackRef(R=>{const K=Array.from(S.current),k=K.length;F(L=>{const ne=L.findIndex(Re=>Re.key===R);if(ne===-1)return L;const le=[...L];return le.splice(ne,1),le.length===0?(M(null),H?.(),le):(O(le[Math.max(le.length-1,ne-1)].key),le)});for(let L=0;L<k;L++){const ne=K[L];try{ne.onHide?.()}catch{}}},[H]),O=r.useCallbackRef(async R=>{const K=l.getRegisteredTaskPane(R);if(!K)return void console.warn(`Invalid taskpane '${R}'`);if(P.current===R||B&&!await G(B.key))return;const k=o.createRef();let L=c.jsx(Wl,{ref:()=>{P.current=null},entry:K,model:a,commands:i,close:async()=>{await G(R)&&D(R)},paneWrapper:s,paneProps:p,renderTaskPanelTitle:u,listenerContainer:le=>(S.current.add(le),()=>{S.current.delete(le)}),onMounted:le=>{le.key===R&&(P.current=null),z?.()},onUnmounted:le=>{},...C});b&&(L=b(L));const ne={key:R,elem:L,ref:k};F(le=>{if(le.findIndex(fe=>fe.key===R)!==-1)return le;const Re=[...le];return Re.push(ne),Re}),M(ne),P.current=R},[B,b,s,u]);o.useEffect(()=>{B&&!P.current&&O(B.key)},[C,a]);const $=r.useImperativeElement(t,()=>({activateTaskPane:O}),[l,p,a,i]),ue=o.useMemo(()=>f.map(R=>R.key),[f]),U=o.useMemo(()=>{if(ue.length<=1&&!x)return null;const R={className:Gt.TaskPaneAreaStrip,taskPanes:ue,selected:B?.key,onSelect:K=>{O(K)},registry:l};return I(R,null)},[ue,B,l,x]),V=B?.elem;return c.jsxs("div",{ref:$,className:gt("taskpane-area",n,Gt.TaskPaneArea),style:A,children:[V,U]})})),En=new d.Color("transparent");function Nr(e){const{sheet:t,onRepeatCommandChange:n,bodyStyle:l,commands:a,target:i,onStartEdit:m,getViewport:h}=e,s=r.useNotifier(),p=zr(),[b,C]=o.useState(null),[u,I]=o.useState(null),x=o.useRef(null),A=r.useCallbackRef(m,[m]),z=r.useCallbackRef(h,[h]),[H,B]=o.useState(),[M,P]=o.useState(()=>t?.getStyles().parseColor(d.IColor.Scheme.Bg2)),[f,F]=o.useState(()=>t?.getStyles().getNormal().getFont().getFill()),S=r.useEditMode();o.useRef(S.getMode()).current=S.getMode();const G=r.useGlobalClipboard(),[D,O]=o.useState(he.CommonUtils.EmptyArray),$=o.useCallback(()=>{if(x.current!==t)return;const g=t.getSelectedRanges();let T=null;D.length>0&&he.CoordUtils.isCellWithinRange(b,D[0].getRange().getCoords())&&(T=D[0]);const q=t?.getSelectedCell(),y=q?.getCoords()??null;jt.unstable_batchedUpdates(()=>{Re(T),C(y),I(g)})},[t,D,u,b]),ue=o.useCallback(he.CommonUtils.debounce($,210),[$]);o.useEffect(()=>{x.current=t,$()},[t]);const U=r.useCallbackRef(()=>t.getRange(b).getCell(),[t,b]),V=r.useCallbackRef(async(g,T,q=null,y=!1,w=!0)=>{const E=g?.label?.(),W=async()=>{const te=await Promise.resolve(w&&s.showBusy(E??"Busy..."));try{await t.doBatch(async()=>T(t),E),y&&S.setMode(null),te&&te()}catch(Ce){if(te&&te(),!Ce)return;s.showError(Ce)}},oe=[];let ce=!1;const de=async()=>(oe.push(W),(async()=>{if(!ce){for(ce=!0;oe.length>0;){const te=oe.shift();te&&await te()}ce=!1}})());if(n){let te=null;if(q!==!1&&g){const Ce=q??E;te=new r.SimpleCommand(g.key(),i,{label:Ce,description:Ce},de)}n(te)}return de()},[t,n,s]),R=r.useCallbackRef((g,T,q=!1,y)=>(y||(y={autoSelect:!0,autoFit:!0}),V(g,w=>{const E=w.getSelectedRanges();q&&E.getStyle().update(null,y),E.getStyle().update(T,y)})),[t]),K=r.useCallbackRef((g,T,q)=>{V(g,y=>{let w=T;(q||T?.address)&&(w=w??{},!q&&T?.address?.startsWith("#")?q=T?.address.substring(1):q&&(w.displayText=q)),y.getSelectedRange().setHyperlink(w)})},[t]),k=r.useCallbackRef((g,T)=>{V(g,q=>{q.getSelectedRange().setComments(T)})},[t]),L=r.useCallbackRef((g,T)=>{V(g,q=>{q.getSelectedRanges().clear(T)})},[t]),ne=r.useCallbackRef(async(g,T,q=!1,y=!1)=>V(g,async w=>{let E=w.getSelectedRanges();q&&(T===d.IRange.Orientation.Row?E=E.getEntireRows(y):T===d.IRange.Orientation.Column&&(E=E.getEntireColumns(y)));let W=null;const oe=S.getMode()?.key;if(oe==="copy"||oe==="cut"){const ce=await G.getClipboard().readReference();ce&&ce.getItemType()==="range"&&(W=ce.getItem(),W.getCoords()||(W=null))}if(W){const ce=await E.insertFrom(W,{...W.getMarkOptions(),orientation:T,autoSelect:!0});!ce||ce.isEntireRows()||ce.isEntireColumns()||ce.autoFit({orientations:d.IRange.Orientations.Row,minContent:!0}),S.setMode(null)}else E.insert({orientation:T,autoSelect:!0})},"Insert Cells",!1),[S]),[le,Re]=o.useState(null),fe=r.useCallbackRef(g=>t.getStyles().setDefaultTableStyle(g),[t]),me=r.useCallbackRef(g=>{t.getStyles().getTableStyle(g)?.delete()},[t]),ke=r.useCallbackRef((g,T)=>{V(g,async q=>{const y=q.getSelectedRange(),w=q.getSelectedCell().getCoords();let E=null,W=0;const oe=w.rowIndex>0?q.getRange({rowIndex:w.rowIndex,colIndex:w.colIndex}).getExtended(d.IRange.Direction.Up):null;oe&&q.getRange({colStart:w.colIndex,rowStart:oe.getCoords().rowStart,colEnd:w.colIndex,rowEnd:oe.getCoords().rowStart}).isContentful()&&(E=d.IRange.Direction.Up,W=w.rowIndex-oe.getCoords().rowEnd);const ce=w.colIndex>0?q.getRange({rowIndex:w.rowIndex,colIndex:w.colIndex-1}).getExtended(d.IRange.Direction.Left):null;if(ce&&q.getRange({colStart:ce.getCoords().colStart,rowStart:w.rowIndex,colEnd:ce.getCoords().colStart,rowEnd:w.rowIndex}).isContentful()){const te=w.colIndex-ce.getCoords().colEnd;(te<W||!E)&&(E=d.IRange.Direction.Left,W=te)}let de=null;if(E===d.IRange.Direction.Up){if(de={...oe.getCoords()},(de.rowEnd===w.rowIndex||!q.getRange({colIndex:w.colIndex,rowIndex:w.rowIndex-1}).isContentful())&&de.rowStart>0&&q.getRange({colIndex:w.colIndex,rowIndex:de.rowStart-1}).isContentful()){const te=oe.getExtended(d.IRange.Direction.Up);de={colStart:w.colIndex,rowStart:te.getCoords().rowStart,colEnd:w.colIndex,rowEnd:oe.getCoords().rowEnd}}de.rowEnd=w.rowIndex-1}else if(E===d.IRange.Direction.Left){if(de={...ce.getCoords()},(de.colEnd===w.colIndex||!q.getRange({colIndex:w.colIndex-1,rowIndex:w.rowIndex}).isContentful())&&de.colStart>0&&q.getRange({colIndex:de.colStart-1,rowIndex:w.rowIndex}).isContentful()){const te=ce.getExtended(d.IRange.Direction.Left);de={colStart:te.getCoords().colStart,rowStart:w.rowIndex,colEnd:te.getCoords().colEnd,rowEnd:w.rowIndex}}de.colEnd=w.colIndex-1}if(y.size!==1&&E){const te=y.getCoords(),Ce=y.startIncrementalUpdates({orientation:d.IRange.Orientation.Column}),ve={...de},ye=te.rowStart,He=te.rowEnd,Ee=te.colStart,ze=te.colEnd,Le=E===d.IRange.Direction.Up;for(let $e=Ee;$e<=ze;$e++){ve.colStart=Le?$e:de.colStart+($e-Ee),ve.colEnd=Le?$e:de.colEnd+($e-Ee);for(let Ue=ye;Ue<=He;Ue++){ve.rowStart=Le?de.rowStart+(Ue-ye):Ue,ve.rowEnd=Le?de.rowEnd+(Ue-ye):Ue;const et=q.getRange(ve).toString();Ce.pushAt(Ue,$e,`=${T}(${et})`)}}Ce.apply()}else{const te=de?q.getRange(de).toString():"",Ce=`=${T}(`;A?.({text:`${Ce}${te})`,editMode:!0,initialSelection:{start:Ce.length,end:Ce.length+te.length}})}},!1)},[t]),We=r.useCallbackRef((g,T,q=!1,y=!0)=>{V(g,async w=>{let E=null;if(le)return void le.updateStyleOptions(T);{const ce=w.getSelectedRanges().getFixed(!0),de=w.getSelectedRange().getDefaultSortCriteria();let te={ranges:ce,hasHeader:de?.options?.hasHeader??!1};E=y?new Promise((Ce,ve)=>{const ye={tableOptions:te,onCancel:()=>{ve()},onDone:He=>{Ce(He)},context:{getNames:()=>w.getNames()}};s.showWindow?.("tableNew",ye)}):{option:"Ok",tableOptions:te}}const W=await Promise.resolve(E);if(W?.option!=="Ok")throw null;const oe=await Promise.resolve(s.showBusy(g.label()));try{await w.getTables().add(W.tableOptions.ranges.at(0),{styleName:T?.name,clearFormatting:q,hasHeader:W.tableOptions.hasHeader}).getRange().select()}catch(ce){oe(),s.showError(ce)}oe()},!1,!0,!1)},[le]),Fe=r.useCallbackRef(()=>l,[l]),Ve=r.useCallbackRef(g=>({styles:()=>t.getStyles(),table:()=>g,bodyStyle:Fe,getNames:()=>t.getNames()}),[t]),ee=r.useCallbackRef(async(g,T,q,y=!0)=>{if(!T){let E=t.getSelectedRange();E.size===1&&(E=E.getSurrounding());let W=t.getTables().getItems({address:t.getSelectedRange()});W.length>0&&(T=W[0]),await E.select()}if(!T)return;try{q&&await T.select()}catch{}if(!y)return;const w=new Promise(async(E,W)=>{g.update({context:Ve(T)}),p.activateTaskPane("tableDetails",{}),E(!0)});try{if(!await w)return}catch(E){s.showError(E)}},[s]),Y=r.useCallbackRef(async(g,T,q=!1)=>{let y=null;if(T)T.isITable?y=T:T.getValue()&&(y=T.getValue());else{const w=t.getTables().getItems({address:t.getSelectedRange()});w.length>0&&(y=w[0])}if(y){if(!q){const w=y.getRange().getCoords(),E=(w.colEnd-w.colStart+1)*(w.rowEnd-w.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.
9
+ `+k.textValue.substring(g.selectionEnd);return me(q),void V({start:g.selectionStart+1,end:g.selectionStart+1,direction:g.selectionDirection})}return void(Fe()&&u.getSelection().traverse(d.IRange.Orientation.Column,j))}if(N.which===r.KeyCodes.Tab)return N.preventDefault(),void(Fe()&&u.getSelection().traverse(d.IRange.Orientation.Row,j));let T=null;switch(N.which){case r.KeyCodes.Left:T=d.IRange.Direction.Left;break;case r.KeyCodes.Right:T=d.IRange.Direction.Right;break;case r.KeyCodes.Up:T=d.IRange.Direction.Up;break;case r.KeyCodes.Down:T=d.IRange.Direction.Down}if(T&&!(J||j||Z||qe)&&!R.editMode)return void Fe();R.editMode&&(T||Fl.includes(N.which))&&N.stopPropagation()},[R,u,k]),Y=o.useCallback(()=>{L.current?.focus(),setTimeout(()=>{L.current?.select()},0)},[]),ge=o.useCallback(()=>{L.current?.focus(),console.log("implement toggleRelativeReferences")},[]),De=r.useCallbackRef(()=>{const N=L.current?.value;let J="";if(C.rowIndex>0){const j=u.getRange({rowIndex:C.rowIndex-1,colIndex:C.colIndex}).getCell();j&&(J=j.toTextUnformatted(!0))}me(N+J)},[C,u]);o.useEffect(()=>u.getRange(C).addListener(()=>{const N={...R,clean:()=>u.getRange(C).getCell()};K(N),fe?.(N)}),[C,u,R]);const X=o.useCallback(()=>{const N=R.clean().createTemporaryCell({value:hn(),style:{numberFormat:"Medium Time"}}).toText();me((L.current?.value??"")+N)},[u]),_=o.useCallback(()=>{const N=R.clean().createTemporaryCell({value:hn(),style:{numberFormat:"Short Date"}}).toText();me((L.current?.value??"")+N)},[u]),re=o.useMemo(()=>({element:()=>L.current,doCopy:N=>{const J=L.current.value.substring(L.current.selectionStart,L.current.selectionEnd);if(N?.isCut){const j=L.current.value.substring(0,L.current.selectionStart)+L.current.value.substring(L.current.selectionEnd,L.current.value.length);me(j)}return J}}),[L.current]),pe=o.useMemo(()=>({element:()=>L.current,doPaste:async(N,J)=>{const j=await N.toText?.();if(!j)return!0;const Z=L.current.value.substring(0,L.current.selectionStart)+j+L.current.value.substring(L.current.selectionEnd,L.current.value.length);return me(Z),V({start:L.current.selectionStart+j.length,end:L.current.selectionStart+j.length,direction:"forward"}),!0}}),[L.current]),se=o.useMemo(()=>({contains:N=>L.current?.contains(N)||!1,focus(){L.current.focus()}}),[]),Ie=o.useMemo(()=>[new r.SimpleCommand("selectAll",se,{label:"Select All",description:"Select all of the text in cell.",shortcut:{key:"a",modifiers:[r.KeyModifiers.Ctrl]}},Y),new r.SimpleCommand("startEditValueAbove",se,{label:"Copy From Above",description:"Copy the value from the cell above the active cell into the cell or the formula bar.",shortcut:[{key:'"',modifiers:[r.KeyModifiers.Ctrl]},{key:'"',modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}]},De),new r.SimpleCommand("startEditCurrentTime",se,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},X),new r.SimpleCommand("startEditCurrentDate",se,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl]}},_),new r.Command("relativeReferencesToggle",se,{label:"Toggle References",description:"Toggles cell references from relative to absolute, to partially absolute, back to relative again.",shortcut:{key:"F4"}},ge),new r.Command("toggleEditorFocus",se,{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 N=null;const J=()=>({contains:j=>L.current?.contains(j)||!1,focus(){L.current.focus()}});return N=I?I.createChildGroup(J,"editor",!1):new r.CommandGroup(J,"editor"),N.addCommands(Ie,!0),N},[I,Ie]),we=o.useMemo(()=>({notifier:null,source:re,target:pe,commands:ie}),[re,pe,ie]);r.useCopyPaste(we);const[Me,Se]=o.useState(!f);o.useEffect(()=>{Se(!1)},[]);const je=r.useCallbackRef(N=>{ue(!0),ie?.activate();const J=O.current;if(J!==!1){let j,Z;const qe=L.current.value;Oo(R,qe)&&(j=qe.length-1,Z=qe.length-1),j=J?.start??j??qe.length,Z=J?.end??Z??qe.length,O.current=!1,V({start:j,end:Z,direction:"forward"})}z?.(N)},[z,R]),v=k.insets;let _e=v.left+1;const Oe=v.left+v.right+2-1,Qe=le?.bounds.height??0;let ae,Te=v.top;k.frameVertAlign===d.ITextFrame.VerticalAlignment.Center?Te=Math.max(0,(S-(v.top+v.bottom)-Qe)/2):k.frameVertAlign===d.ITextFrame.VerticalAlignment.Bottom&&(Te=Math.max(0,S-(v.top+v.bottom)-Qe)),P!==void 0&&le?.lines[0]?.bounds&&(ae=le?.lines[0]?.bounds.height*P);const Ne=k.style.getFont();let Ae=Ne.getSize();Ne.isSuperSub()&&(Ae*=Ne.getSuperSubScale()),Ae*=d.IFont.getDeviceScale()*M;const xe=p?Ne.toCSS(D,M):null;return c.jsx("div",{className:"sheet-cell-editor",onMouseDown:N=>{L.current&&document.activeElement!==L.current&&requestAnimationFrame(()=>{L.current.focus()})},ref:ne,...F,style:{display:"flex",flexGrow:1,alignSelf:"stretch",height:"100%",width:"100%",maxWidth:"100%",maxHeight:"100%",cursor:"initial",...B},children:c.jsx("div",{className:"editor-placement",style:{display:"flex",flexGrow:1,position:"relative",top:Te*M,left:_e*M,width:`calc(100% - ${Oe*M}px)`,maxWidth:`calc(100% - ${Oe*M}px)`,height:(ae??Qe)*M,maxHeight:(ae??Qe)*M},children:c.jsx("textarea",{spellCheck:"false",placeholder:k.placeholder,ref:L,value:k.textValue,disabled:Me,readOnly:H||u.getProtection().isReadOnly(),name:"sheet-cell-editor",autoComplete:"off",autoCapitalize:"off",style:{flex:"1 1 100%",font:"inherit",...xe,fontSize:Ae?`${Ae}px`:"inherit",textAlign:k.textAlign,lineHeight:(le?.lines[0]?.bounds.height??0)*M+"px",height:(le?.bounds.height??0)*M,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:je,onBlur:()=>{ue(!1)},onSelect:N=>{},onChange:N=>{L.current&&!We.current&&(O.current=!1,me(N.target.value),k.textValue,N.target.value,N.target.selectionStart,N.target.selectionEnd,N.target.selectionDirection,V({start:N.target.selectionStart,end:N.target.selectionEnd,direction:N.target.selectionDirection}))},onMouseDown:N=>{$&&ke(!0)},onKeyDown:ee})})})})),Tr=(e,t)=>({clean:e,dirty:t,editMode:!1}),Ir=e=>{const{length:t=0,width:n=1,dashArray:l=null,dashArrayAdditional:a=null,isDouble:i=!1,isAngled:m=!1,offsetX:h=0,offsetY:s=0,isVertical:p=!1,...b}=e,C=B=>{let M=null;if(B&&n>0){M="";for(let P=0;P<B.length;P++)M+=B[P],P<B.length-1&&(M+=",")}return M},u=C(l);let I=u;a&&(I=C(a));let x=n,A=t,z=null;if(i){x=Math.floor(n/2);const B=x+x/2+1;let M=null;M=p?`M ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s+A)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+B)} L ${r.ReactUtils.boundPixel(h+A)} ${r.ReactUtils.boundPixel(s+B)}`,z=c.jsx("path",{strokeWidth:x,strokeDasharray:I,d:M,...b})}if(m){x=n/2;const B=x+x/2;let M=I,P=null;P=p?`M ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+B)} ${r.ReactUtils.boundPixel(s+A)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+B)} L ${r.ReactUtils.boundPixel(h+A)} ${r.ReactUtils.boundPixel(s+B)}`,z=c.jsx("path",{strokeWidth:x,strokeDasharray:M,strokeDashoffset:"1",shapeRendering:"crispEdges",d:P,...b})}let H=null;return H=p?`M ${r.ReactUtils.boundPixel(h+x/2)} ${r.ReactUtils.boundPixel(s)} L ${r.ReactUtils.boundPixel(h+x/2)} ${r.ReactUtils.boundPixel(s+A)}`:`M ${r.ReactUtils.boundPixel(h)} ${r.ReactUtils.boundPixel(s+x/2)} L ${r.ReactUtils.boundPixel(h+A)} ${r.ReactUtils.boundPixel(s+x/2)}`,c.jsxs(c.Fragment,{children:[c.jsx("path",{strokeWidth:x,strokeDasharray:u,d:H,...b}),z]})};function so(e,t){if(typeof e=="function")return e(t);e&&(e.current=t)}var Xt=parseInt(o.version.split(".")[0],10)>=19?function(e){return t=>{const n=[];for(const l of e){const a=so(l,t),i=typeof a=="function";n.push(i?a:()=>so(l,null))}return()=>{for(const l of n)l()}}}:function(e){return t=>{for(const n of e)so(n,t)}},Al=function(){},Er=typeof window<"u",sn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dl=Er?o.useLayoutEffect:o.useEffect,Bo={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const Ot=Er&&window.ResizeObserver!==void 0?function(){var e=o.useState(null),t=e[0],n=e[1],l=o.useState(Bo),a=l[0],i=l[1],m=o.useMemo(function(){return new window.ResizeObserver(function(h){if(h[0]){var s=h[0].contentRect,p=s.x,b=s.y,C=s.width,u=s.height,I=s.top,x=s.left,A=s.bottom,z=s.right;i({x:p,y:b,width:C,height:u,top:I,left:x,bottom:A,right:z})}})},[]);return Dl(function(){if(t)return m.observe(t),function(){m.disconnect()}},[t]),[n,a]}:function(){return[Al,Bo]},zl=(e,t)=>e.colStart===t.colStart?e.rowStart-t.rowStart:e.colStart-t.colStart,Nl=(e,t)=>e.rowStart===t.rowStart?e.colStart-t.colStart:e.rowStart-t.rowStart,Ll=e=>{const{key:t,points:n,range:l,stroke:a,darkMode:i,forceThinBorder:m=!1,shiftIfWide:h=!1,isVertical:s=!1,intersections:p,layout:b}=e,C=d.IBorder.BuiltInDefinitions.get(m?d.IBorder.StrokeStyle.Thin:a.getStyle());if(!C)return null;const u=n[0],I=n[1],x=n[2],A=n[3];let z=1+(s?A-I:x-u),H=0;const B=a.getColor().toRGBA(i).toString(),M=C.description.toLowerCase().includes("double");let P,f;const F=s?"rowStart":"colStart",S=s?"rowEnd":"colEnd",G=s?I:u;if(p?.length>0){const ue=p[0];if(ue?.range[F]===l[F]){const V=d.IBorder.BuiltInDefinitions.get(ue.stroke.getStyle());H=Math.floor(V.width/2)}if(p[p.length-1]?.range[S]===l[S]){const V=d.IBorder.BuiltInDefinitions.get(p[p.length-1].stroke.getStyle());z=Math.floor(z+(V.width===2?0:V.width/2))}if(M){const V=s?"colStart":"rowStart",R=s?"colEnd":"rowEnd",K=s?b?.getRowOffset:b?.getColOffset;let k=0,L=0;P=[],f=[];const ne=p.length;for(let le=0;le<ne;le++){const Re=p[le];if(Re.stroke.getStyle()===d.IBorder.StrokeStyle.Double&&K){const fe=K(Re.range[F])-(G-H);Re.range[V]<l[V]&&(P.push(fe-k),k=fe,P.push(1),k++),Re.range[R]>l[R]&&(f.push(fe-L),L=fe,f.push(1),L++)}}P.length>0&&k<z&&P.push(z-k),f.length>0&&L<z&&f.push(z-L)}}let D=s?-Math.floor(C.width/2):-H,O=s?-H:-Math.floor(C.width/2);const $=h&&C.width>2?-1:0;return c.jsx(Ir,{offsetX:u+D+$,offsetY:I+O+$,length:z+H,isVertical:s,stroke:B,width:C.width,dashArray:P??C.pattern,dashArrayAdditional:f,isDouble:M,isAngled:C.description.toLowerCase().includes("slant")},t)},So=({getBorderAt:e,borderRenderer:t=Ll,getVisibleCells:n,darkMode:l,forceThinBorder:a=!1,defaultColor:i="black",shiftIfWide:m=!1})=>{const h=r.useCallbackRef(n,[n]);return{overlay:o.useMemo(()=>p=>{const b=p.toClipBounds(p.getRangeCoordsBounds(),-3);if(!b)return;const C=h(p);if(C.length===0)return;const u=p.getVisibleColumnOffsets(),I=p.getVisibleRowOffsets();let x=[],A=[];const z=p.getVisibleColumns(),H=p.getVisibleRows(),B=[],M=[],P=[],f=(U,V,R,K,k,L,ne)=>{const le={index:K,stroke:k,visibleIndex:R,edge:L,length:ne};U[V]||(U[V]=[]),U[V].length>0&&U[V][U[V].length-1]?.index===K?U[V][U[V].length-1]=le:U[V].push(le)},F=p.getVisibleRangeCoords(),S=C.length;for(let U=0;U<S;U++){const V=C[U],R=V.coords;if(!R)continue;const K=V?.range??{rowStart:R.rowIndex,colStart:R.colIndex,rowEnd:R.rowIndex,colEnd:R.colIndex};if(!he.CoordUtils.isRangesIntersect(K,F)&&!he.CoordUtils.isRangeWithinRange(K,F))continue;const k=R.colIndex,L=R.rowIndex,ne=u[k],le=I[L];if(K.rowEnd!==K.rowStart){const De=I[K.rowStart]?.spanIndex??-1,X=I[K.rowEnd]?.spanIndex??I[H[H.length-1]].spanIndex+1;x.push({...K,rowStart:De,rowEnd:X})}if(K.colEnd!==K.colStart){const De=u[K.colStart]?.spanIndex??-1,X=u[K.colEnd]?.spanIndex??u[z[z.length-1]].spanIndex+1;A.push({...K,colStart:De,colEnd:X})}const Re=V.value,fe=e(Re,U);if(!fe||fe.isEmpty())continue;const me=fe.getLeft(),ke=fe.getTop(),We=fe.getRight(),Fe=fe.getBottom();let Ve=1,ee=1;if(!ne||!le)continue;const Y=ne.spanIndex,ge=le.spanIndex;me.isNone()||f(B,Y,ge,L,me,d.IBorder.Edge.Left,Ve),ke.isNone()||f(M,ge,Y,k,ke,d.IBorder.Edge.Top,ee),We.isNone()||f(B,Y+ee,ge,L,We,d.IBorder.Edge.Right,Ve),Fe.isNone()||f(M,ge+Ve,Y,k,Fe,d.IBorder.Edge.Bottom,ee)}const G=(U,V,R)=>{const K=[];return U.forEach((k,L)=>{let ne=null;k.sort((Re,fe)=>Re.visibleIndex-fe.visibleIndex);const le=k.length;for(let Re=0;Re<le;Re++){const fe=k[Re];if(!fe?.stroke||V[L]===void 0&&V[L-1]===void 0)continue;let me=!1;if(R){const Ve=x.length;for(let ee=0;!me&&ee<Ve;ee++){let Y=x[ee];Y.colStart<=fe.index&&Y.colEnd>=fe.index&&Y.rowStart<L&&Y.rowEnd>=L&&(me=!0)}}else{const Ve=A.length;for(let ee=0;!me&&ee<Ve;ee++){let Y=A[ee];Y.rowStart<=fe.index&&Y.rowEnd>=fe.index&&Y.colStart<L&&Y.colEnd>=L&&(me=!0)}}if(me)continue;const ke=fe.stroke?.getColor(),We=ke?ke.toRGBA().toString():i,Fe=fe.stroke.getStyle()+":"+We;(Fe!==ne?.key||ne&&ne.visibleIndex+1<fe.visibleIndex)&&(ne&&K.push(ne),ne={key:Fe,index:V[L]??V[L-1]+1,visibleIndex:fe.visibleIndex,edge:fe.edge,stroke:fe.stroke,from:fe.index,to:fe.index+fe.length-1,intersections:[],length:1}),ne.to=fe.index+fe.length-1,ne.visibleIndex=fe.visibleIndex}ne&&K.push(ne)}),K};x=x.sort(Nl),A=A.sort(zl);const D=G(B,z,!1),O=G(M,H,!0);if(D.length===0&&O.length===0)return null;const $=O.length;for(let U=0;U<$;U++){const V=O[U];let R=he.CommonUtils.findEqualOrGreater(D,V.from,k=>k.index),K=!1;for(;!K;){const k=D[R++];k&&k.index>=V.from&&k.index<=V.to+1&&k.from<=V.index&&k.to+1>=V.index&&(V.intersections.push({stroke:k.stroke,range:{rowStart:k.from,rowEnd:k.to+1,colStart:k.index,colEnd:k.index}}),k.intersections.push({stroke:V.stroke,range:{rowStart:V.index,rowEnd:V.index,colStart:V.from,colEnd:V.to+1}})),K=!k||k.index>V.to+1}}for(let U=0;U<$;U++){const V=O[U];let R=V.stroke;const K=`rBorder:${V.index}:${V.from}:${V.to}:${V.edge}`,k={rowStart:V.index,rowEnd:V.index,colStart:V.from,colEnd:V.to+1},L=p.getLayout(),ne=!1,le=L.getColOffset(k.colStart),Re=L.getRowOffset(k.rowStart),fe=[le,Re,L.getColOffset(k.colEnd),Re];P.push(t({key:K,points:fe,stroke:R,darkMode:l,forceThinBorder:a,shiftIfWide:m,range:k,intersections:V.intersections,layout:L,isVertical:ne}))}const ue=D.length;for(let U=0;U<ue;U++){const V=D[U];let R=V.stroke;const K=`cBorder:${V.index}:${V.from}:${V.to}:${V.edge}`,k={rowStart:V.from,rowEnd:V.to+1,colStart:V.index,colEnd:V.index},L=p.getLayout(),ne=!0,le=L.getColOffset(k.colStart),Re=[le,L.getRowOffset(k.rowStart),le,L.getRowOffset(k.rowEnd)];P.push(t({key:K,stroke:R,points:Re,darkMode:l,forceThinBorder:a,shiftIfWide:m,range:k,intersections:V.intersections,layout:L,isVertical:ne}))}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:P},"borders")},[e,l])}},Vo=he.AnchorLocation.Center,Pl=Object.freeze({horizontal:!1,vertical:!1}),Ho=he.TypesUtils.EmptyTopLeft,jl=(e,t)=>he.CoordUtils.EmptyCell,Ol=(e,t)=>new Promise((n,l)=>{l("StaticBorderRenderer does not support scrolling")}),Bl=o.memo(e=>{const{getBorderAt:t,width:n,height:l,style:a,rowCount:i=2,columnCount:m=2,darkMode:h,forceThinBorder:s,children:p,...b}=e,C=o.useRef(null),[u,{width:I,height:x}]=Ot(),A=n??I,z=l??x,H=o.useMemo(()=>{const R=[];for(let K=0;K<i;K++)for(let k=0;k<m;k++){const L={colIndex:k,rowIndex:K};R.push({coords:L,value:L})}return R},[]),B=o.useCallback(R=>H,[H]),{overlay:M}=So({getVisibleCells:B,getBorderAt:t,darkMode:h,forceThinBorder:s}),P=Math.floor(A/m),f=Math.floor(z/i),F={getColOffset:R=>Math.ceil(R*P)+0,getRowOffset:R=>Math.ceil(R*f)+0,getColIndex:R=>Math.floor((R-0)/P)-1,getRowIndex:R=>Math.floor((R-0)/f)-1},S={rowStart:0,colStart:0,rowEnd:i,colEnd:m},G={x:0,y:0,width:Math.max(0,A)+0,height:Math.max(0,z)+0},D=o.useMemo(()=>{const R={},K=Math.floor(A/m);for(let k=0;k<m;k++)R[k]={offset:k*K,size:K,spanIndex:k};return R},[A,z]),O=o.useMemo(()=>{const R={},K=Math.floor(z/i);for(let k=0;k<i;k++)R[k]={offset:k*K,size:K,spanIndex:k};return R},[A,z]);if(!M)return null;const $={width:A,height:z},ue={width:A,height:z},U={getStage:()=>C.current,getTotalSize:()=>$,getViewportSize:()=>ue,getLayout:()=>F,getCellCoordsAsRangeCoords:he.CoordUtils.cellToRange,getVisibleRangeCoords:()=>S,getVisibleRows:()=>{const R=[];for(let K=0;K<i;K++)R.push(K);return R},getTotalRangeCoords:()=>S,getRelativePointFromClient:(R,K)=>({x:R,y:K}),getVisibleColumns:()=>{const R=[];for(let K=0;K<m;K++)R.push(K);return R},toClipBounds:(R,K)=>G,toViewBounds:R=>R,toAbsoluteBounds:R=>R,getBounds:()=>G,getInsets:()=>null,getRangeCoordsBounds:(R,K)=>null,getVisibleColumnOffsets:()=>D,getVisibleRowOffsets:()=>O,allViews:()=>({[Vo]:U}),getAnchor:()=>Vo,getZoom:()=>1,scrollCellCoordsIntoView:Ol,getCellCoordsFromClient:jl,getScrollOrientation:()=>Pl,getScrollTopLeft:()=>Ho,getFreezeTopLeft:()=>Ho},V=M(U);return c.jsxs("div",{style:{...a,position:"relative",display:"flex"},...b,children:[c.jsx("div",{ref:Xt([C,u]),style:{flex:"1 1 100%",display:"flex",maxWidth:"100%",maxHeight:"100%"},children:p}),V]})});function Fr(e){var t,n,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Fr(e[t]))&&(l&&(l+=" "),l+=n)}else for(n in e)e[n]&&(l&&(l+=" "),l+=n);return l}function gt(){for(var e,t,n=0,l="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Fr(e))&&(l&&(l+=" "),l+=t);return l}const Vl="_sheetxl-sheet_1qeq6_5",Hl="_viewport-overlay_1qeq6_6",Ar=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"})]})},Ul=o.memo(e=>{const{colorLicensee:t="blue",colorError:n="red",colorCredits:l="grey",credits:a="All rights reserved - Michael Ford",feature:i,style:m,...h}=e??{},[s,p]=o.useState(null);o.useEffect(()=>{(async()=>{const f=await d.LicenseManager.getDetails();p(f)})()},[]);const[b,C]=o.useState(!1),u={opacity:.65},I=o.useMemo(()=>{const f=s?.getExceptions(),F=f?.length??0;if(F===0)return null;const S=[];for(let G=0;G<F;G++){const D=f[G];S.push(c.jsx("div",{style:{opacity:.8,fontSize:"16px",textAlign:"left",color:n},children:D},G))}return S},[s,n]);if(s===null||s.isValidFor(i))return null;const x=s.getType(),A=!I&&x.endsWith("ity"),z=s.getLicensee(),H=A?1.6:1,B=135/H,M=37/H;let P=null;return!x&&z?.length>0&&(P=c.jsx("div",{style:{opacity:.7,fontWeight:"500",fontSize:"16px",textAlign:"left",color:t},children:z})),c.jsx("div",{style:{pointerEvents:"none",display:"flex",flexDirection:"column",overflow:"hidden",...m},...h,children:c.jsxs("div",{style:{position:"relative",display:"flex",flexDirection:"column"},children:[b?c.jsx(Ar,{style:u}):c.jsx("svg",{width:B,height:M,style:u,children:c.jsx("image",{style:{width:B,height:M},href:"https://www.sheetxl.com/watermark.svg",onError:()=>C(!0)})}),c.jsxs("div",{children:[P,I,c.jsx("div",{style:{height:"0px",fontSize:"16px",textAlign:"left",width:"0px",opacity:.8,color:l},children:a})]})]})})}),tt=(e,t,n)=>{const l=o.useRef(t);l.current=t;const a=n?.fireOnModelChange??!0;o.useEffect(()=>{if(!e||!l.current)return;const i=Object.keys(l.current),m={},h=i.length;for(let p=0;p<h;p++){const b=i[p];m[b]=(C,u)=>{l.current[b]?.(C,u)}}const s=e.addListeners(m,n);if(a)for(let p=0;p<h;p++)m[i[p]](e);return()=>{s?.()}},[e])},Pn=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 l=n.contributionPoints;if(l&&l.length!==0)for(let a of l)a.startsWith(e)&&t.push(n)}return t}},Dr=o.createContext(void 0),Kl={activateTaskPane(e,t){console.warn("No TaskPaneArea available to activate task pane",e,t)}},zr=()=>o.useContext(Dr)||Kl,Gt={TaskPaneArea:"_TaskPaneArea_6dmgk_5",TaskPaneTitle:"_TaskPaneTitle_6dmgk_13",TaskPaneFrame:"_TaskPaneFrame_6dmgk_36",TaskPaneStrip:"_TaskPaneStrip_6dmgk_52",TaskPaneStripItem:"_TaskPaneStripItem_6dmgk_60"},Ro=o.memo(o.forwardRef((e,t)=>{const{children:n,title:l,icon:a,onClose:i,readOnly:m,focused:h,style:s,className:p,...b}=e,C=o.useMemo(()=>gt("taskpane-title",p,Gt.TaskPaneTitle,{focused:h}),[p,h]);return c.jsxs("div",{ref:t,className:C,style:s,...b,children:[c.jsx("div",{className:"title",style:{flex:"1 1 100%"},children:l}),c.jsx("div",{"aria-label":"close",role:"button",style:{width:24,height:24,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onPointerDown:u=>{u.stopPropagation()},onPointerUp:()=>{i()},children:c.jsx("div",{style:{fontSize:"0.7em"},children:"✕"})})]})}));Ro.displayName="TaskPaneTitle";const $l=(e,t)=>c.jsx(Ro,{...e,ref:t}),Wl=o.memo(o.forwardRef((e,t)=>{const{children:n,entry:l,close:a,listenerContainer:i,model:m,commands:h,onMounted:s,onUnmounted:p,paneWrapper:b,paneProps:C,renderTaskPanelTitle:u=$l,style:I,className:x,...A}=e,[z,H]=o.useState(null),[B,M]=o.useState(!1),P=r.useCallbackRef(a,[a]),f=o.useRef(null),F=o.useRef(null);o.useEffect(()=>(s?.(l),()=>{p?.(l)}),[l]);const S=o.useRef([]),G=o.useMemo(()=>({addListener:$=>{const ue=i($);return S.current.push(ue),ue},close:()=>{P?.()}}),[i]);o.useEffect(()=>()=>{for(const $ of S.current)$();S.current=[]},[]);const D=o.useMemo(()=>(l.renderTaskPanelTitle??u)({title:l.getTitle(),icon:null,readOnly:!1,focused:B,onClose:P,onPointerDown:$=>{}},F),[l,B]),O=o.useMemo(()=>{let $=l.renderTaskPane({entryKey:l.key,model:m,commands:h,frame:G,...C},t);return b&&($=b($)),$},[l,m,h,t]);return c.jsxs("div",{className:gt("taskpane-frame",x,Gt.TaskPaneFrame),tabIndex:0,ref:f,style:I,onPointerDown:async $=>{$.currentTarget.focus()},onFocus:$=>{$.relatedTarget&&!z&&H($.relatedTarget),M(!0)},onBlur:$=>{z&&!f?.current?.contains($.relatedTarget)&&H(null),$.relatedTarget&&M(!1)},...A,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})]})})),ko=o.memo(o.forwardRef((e,t)=>{const{children:n,title:l,taskPanes:a,onSelect:i,selected:m,registry:h=Pn,style:s,className:p,...b}=e,C=o.useMemo(()=>a.map(x=>{const A=h.getRegisteredTaskPane(x);if(!A)return null;let z=A.getIcon?.();z&&(typeof z=="string"&&(z=c.jsx(r.DynamicIcon,{iconKey:z})),z=c.jsx("span",{style:{display:"inline-block",transform:"rotate(90deg)",transformOrigin:"center"},children:z}));const H=x===m;return c.jsxs("div",{style:{writingMode:"vertical-rl",textOrientation:"mixed",display:"flex",alignItems:"center",justifyContent:"space-between",gap:"4px",minWidth:"0px"},className:gt("taskpane-strip-item",Gt.TaskPaneStripItem,{selected:H}),onClick:()=>e.onSelect(x),children:[z,A.getTitle()]},x)}),[a,m,i,h]),u=r.useImperativeElement(t,()=>({isTaskPaneStrip:()=>!0}),[]),I=o.useMemo(()=>gt("taskpane-strip",p,Gt.TaskPaneStrip),[p]);return c.jsx("div",{ref:u,className:I,style:s,...b,children:C})}));ko.displayName="TaskPaneStrip";const _l=(e,t)=>c.jsx(ko,{ref:t,...e}),Gl=o.memo(o.forwardRef((e,t)=>{const{className:n="",registry:l=Pn,model:a,commands:i,onOpen:m,onClose:h,paneWrapper:s,paneProps:p,frameWrapper:b,frameProps:C,renderTaskPanelTitle:u,renderTaskPaneStrip:I=_l,alwaysShowStrip:x,style:A}=e,z=r.useCallbackRef(m,[m]),H=r.useCallbackRef(h,[h]),[B,M]=o.useState(null),P=o.useRef(null),[f,F]=o.useState([]),S=o.useRef(new Set),G=r.useCallbackRef(async(R,K=!1)=>{const k=Array.from(S.current),L=k.length;let ne=!0;for(let le=0;ne&&le<L;le++){const Re=k[le];if(Re.onBeforeHide)try{await Promise.resolve(Re.onBeforeHide())===!1&&(ne=!1)}catch{ne=!1}}return ne},[]),D=r.useCallbackRef(R=>{const K=Array.from(S.current),k=K.length;F(L=>{const ne=L.findIndex(Re=>Re.key===R);if(ne===-1)return L;const le=[...L];return le.splice(ne,1),le.length===0?(M(null),H?.(),le):(O(le[Math.max(le.length-1,ne-1)].key),le)});for(let L=0;L<k;L++){const ne=K[L];try{ne.onHide?.()}catch{}}},[H]),O=r.useCallbackRef(async R=>{const K=l.getRegisteredTaskPane(R);if(!K)return void console.warn(`Invalid taskpane '${R}'`);if(P.current===R||B&&!await G(B.key))return;const k=o.createRef();let L=c.jsx(Wl,{ref:()=>{P.current=null},entry:K,model:a,commands:i,close:async()=>{await G(R)&&D(R)},paneWrapper:s,paneProps:p,renderTaskPanelTitle:u,listenerContainer:le=>(S.current.add(le),()=>{S.current.delete(le)}),onMounted:le=>{le.key===R&&(P.current=null),z?.()},onUnmounted:le=>{},...C});b&&(L=b(L));const ne={key:R,elem:L,ref:k};F(le=>{if(le.findIndex(fe=>fe.key===R)!==-1)return le;const Re=[...le];return Re.push(ne),Re}),M(ne),P.current=R},[B,b,s,u]);o.useEffect(()=>{B&&!P.current&&O(B.key)},[C,a]);const $=r.useImperativeElement(t,()=>({activateTaskPane:O}),[l,p,a,i]),ue=o.useMemo(()=>f.map(R=>R.key),[f]),U=o.useMemo(()=>{if(ue.length<=1&&!x)return null;const R={className:Gt.TaskPaneAreaStrip,taskPanes:ue,selected:B?.key,onSelect:K=>{O(K)},registry:l};return I(R,null)},[ue,B,l,x]),V=B?.elem;return c.jsxs("div",{ref:$,className:gt("taskpane-area",n,Gt.TaskPaneArea),style:A,children:[V,U]})})),En=new d.Color("transparent");function Nr(e){const{sheet:t,onRepeatCommandChange:n,bodyStyle:l,commands:a,target:i,onStartEdit:m,getViewport:h}=e,s=r.useNotifier(),p=zr(),[b,C]=o.useState(null),[u,I]=o.useState(null),x=o.useRef(null),A=r.useCallbackRef(m,[m]),z=r.useCallbackRef(h,[h]),[H,B]=o.useState(),[M,P]=o.useState(()=>t?.getStyles().parseColor(d.IColor.Scheme.Bg2)),[f,F]=o.useState(()=>t?.getStyles().getNormal().getFont().getFill()),S=r.useEditMode();o.useRef(S.getMode()).current=S.getMode();const G=r.useGlobalClipboard(),[D,O]=o.useState(he.CommonUtils.EmptyArray),$=o.useCallback(()=>{if(x.current!==t)return;const g=t.getSelectedRanges();let T=null;D.length>0&&he.CoordUtils.isCellWithinRange(b,D[0].getRange().getCoords())&&(T=D[0]);const q=t?.getSelectedCell(),y=q?.getCoords()??null;jt.unstable_batchedUpdates(()=>{Re(T),C(y),I(g)})},[t,D,u,b]),ue=o.useCallback(he.CommonUtils.debounce($,210),[$]);o.useEffect(()=>{x.current=t,$()},[t]);const U=r.useCallbackRef(()=>t.getRange(b).getCell(),[t,b]),V=r.useCallbackRef(async(g,T,q=null,y=!1,w=!0)=>{const E=g?.label?.(),W=async()=>{const te=await Promise.resolve(w&&s.showBusy(E??"Busy..."));try{await t.doBatch(async()=>T(t),E),y&&S.setMode(null),te&&te()}catch(Ce){if(te&&te(),!Ce)return;s.showError(Ce)}},oe=[];let ce=!1;const de=async()=>(oe.push(W),(async()=>{if(!ce){for(ce=!0;oe.length>0;){const te=oe.shift();te&&await te()}ce=!1}})());if(n){let te=null;if(q!==!1&&g){const Ce=q??E;te=new r.SimpleCommand(g.key(),i,{label:Ce,description:Ce},de)}n(te)}return de()},[t,n,s]),R=r.useCallbackRef((g,T,q=!1,y)=>(y||(y={autoSelect:!0,autoFit:!0}),V(g,w=>{const E=w.getSelectedRanges();q&&E.getStyle().update(null,y),E.getStyle().update(T,y)})),[t]),K=r.useCallbackRef((g,T,q)=>{V(g,y=>{let w=T;(q||T?.address)&&(w=w??{},!q&&T?.address?.startsWith("#")?q=T?.address.substring(1):q&&(w.displayText=q)),y.getSelectedRange().setHyperlink(w)})},[t]),k=r.useCallbackRef((g,T)=>{V(g,q=>{q.getSelectedRange().setComments(T)})},[t]),L=r.useCallbackRef((g,T)=>{V(g,q=>{q.getSelectedRanges().clear(T)})},[t]),ne=r.useCallbackRef(async(g,T,q=!1,y=!1)=>V(g,async w=>{let E=w.getSelectedRanges();q&&(T===d.IRange.Orientation.Row?E=E.getEntireRows(y):T===d.IRange.Orientation.Column&&(E=E.getEntireColumns(y)));let W=null;const oe=S.getMode()?.key;if(oe==="copy"||oe==="cut"){const ce=await G.getClipboard().readReference();ce&&ce.getItemType()==="range"&&(W=ce.getItem(),W.getCoords()||(W=null))}if(W){const ce=await E.insertFrom(W,{...W.getMarkOptions(),orientation:T,autoSelect:!0});!ce||ce.isEntireRows()||ce.isEntireColumns()||ce.autoFit({orientations:d.IRange.Orientations.Row,minContent:!0}),S.setMode(null)}else E.insert({orientation:T,autoSelect:!0})},"Insert Cells",!1),[S]),[le,Re]=o.useState(null),fe=r.useCallbackRef(g=>t.getStyles().setDefaultTableStyle(g),[t]),me=r.useCallbackRef(g=>{t.getStyles().getTableStyle(g)?.delete()},[t]),ke=r.useCallbackRef((g,T)=>{V(g,async q=>{const y=q.getSelectedRange(),w=q.getSelectedCell().getCoords();let E=null,W=0;const oe=w.rowIndex>0?q.getRange({rowIndex:w.rowIndex,colIndex:w.colIndex}).getExtended(d.IRange.Direction.Up):null;oe&&q.getRange({colStart:w.colIndex,rowStart:oe.getCoords().rowStart,colEnd:w.colIndex,rowEnd:oe.getCoords().rowStart}).isContentful()&&(E=d.IRange.Direction.Up,W=w.rowIndex-oe.getCoords().rowEnd);const ce=w.colIndex>0?q.getRange({rowIndex:w.rowIndex,colIndex:w.colIndex-1}).getExtended(d.IRange.Direction.Left):null;if(ce&&q.getRange({colStart:ce.getCoords().colStart,rowStart:w.rowIndex,colEnd:ce.getCoords().colStart,rowEnd:w.rowIndex}).isContentful()){const te=w.colIndex-ce.getCoords().colEnd;(te<W||!E)&&(E=d.IRange.Direction.Left,W=te)}let de=null;if(E===d.IRange.Direction.Up){if(de={...oe.getCoords()},(de.rowEnd===w.rowIndex||!q.getRange({colIndex:w.colIndex,rowIndex:w.rowIndex-1}).isContentful())&&de.rowStart>0&&q.getRange({colIndex:w.colIndex,rowIndex:de.rowStart-1}).isContentful()){const te=oe.getExtended(d.IRange.Direction.Up);de={colStart:w.colIndex,rowStart:te.getCoords().rowStart,colEnd:w.colIndex,rowEnd:oe.getCoords().rowEnd}}de.rowEnd=w.rowIndex-1}else if(E===d.IRange.Direction.Left){if(de={...ce.getCoords()},(de.colEnd===w.colIndex||!q.getRange({colIndex:w.colIndex-1,rowIndex:w.rowIndex}).isContentful())&&de.colStart>0&&q.getRange({colIndex:de.colStart-1,rowIndex:w.rowIndex}).isContentful()){const te=ce.getExtended(d.IRange.Direction.Left);de={colStart:te.getCoords().colStart,rowStart:w.rowIndex,colEnd:te.getCoords().colEnd,rowEnd:w.rowIndex}}de.colEnd=w.colIndex-1}if(y.size!==1&&E){const te=y.getCoords(),Ce=y.startIncrementalUpdates({orientation:d.IRange.Orientation.Column}),ve={...de},ye=te.rowStart,He=te.rowEnd,Ee=te.colStart,ze=te.colEnd,Le=E===d.IRange.Direction.Up;for(let $e=Ee;$e<=ze;$e++){ve.colStart=Le?$e:de.colStart+($e-Ee),ve.colEnd=Le?$e:de.colEnd+($e-Ee);for(let Ue=ye;Ue<=He;Ue++){ve.rowStart=Le?de.rowStart+(Ue-ye):Ue,ve.rowEnd=Le?de.rowEnd+(Ue-ye):Ue;const et=q.getRange(ve).toString();Ce.pushAt(Ue,$e,`=${T}(${et})`)}}Ce.apply()}else{const te=de?q.getRange(de).toString():"",Ce=`=${T}(`;A?.({text:`${Ce}${te})`,editMode:!0,initialSelection:{start:Ce.length,end:Ce.length+te.length}})}},!1)},[t]),We=r.useCallbackRef((g,T,q=!1,y=!0)=>{V(g,async w=>{let E=null;if(le)return void le.updateStyleOptions(T);{const ce=w.getSelectedRanges().getFixed(!0),de=w.getSelectedRange().getDefaultSortCriteria();let te={ranges:ce,hasHeader:de?.options?.hasHeader??!1};E=y?new Promise((Ce,ve)=>{const ye={tableOptions:te,onCancel:()=>{ve()},onDone:He=>{Ce(He)},context:{getNames:()=>w.getNames()}};s.showWindow?.("tableNew",ye)}):{option:"Ok",tableOptions:te}}const W=await Promise.resolve(E);if(W?.option!=="Ok")throw null;const oe=await Promise.resolve(s.showBusy(g.label()));try{await w.getTables().add(W.tableOptions.ranges.at(0),{styleName:T?.name,clearFormatting:q,hasHeader:W.tableOptions.hasHeader}).getRange().select()}catch(ce){oe(),s.showError(ce)}oe()},!1,!0,!1)},[le]),Fe=r.useCallbackRef(()=>l,[l]),Ve=r.useCallbackRef(g=>({styles:()=>t.getStyles(),table:()=>g,bodyStyle:Fe,getNames:()=>t.getNames()}),[t]),ee=r.useCallbackRef(async(g,T,q,y=!0)=>{if(!T){let E=t.getSelectedRange();E.size===1&&(E=E.getSurrounding());let W=t.getTables().getItems({address:t.getSelectedRange()});W.length>0&&(T=W[0]),await E.select()}if(!T)return;try{q&&await T.select()}catch{}if(!y)return;const w=new Promise(async(E,W)=>{g.update({context:Ve(T)}),p.activateTaskPane("tableDetails",{}),E(!0)});try{if(!await w)return}catch(E){s.showError(E)}},[s]),Y=r.useCallbackRef(async(g,T,q=!1)=>{let y=null;if(T)T.isITable?y=T:T.getValue()&&(y=T.getValue());else{const w=t.getTables().getItems({address:t.getSelectedRange()});w.length>0&&(y=w[0])}if(y){if(!q){const w=y.getRange().getCoords(),E=(w.colEnd-w.colStart+1)*(w.rowEnd-w.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
10
  Continue?`,options:["Convert","Cancel"],defaultOption:"Convert"})!=="Convert")return}V(g,async()=>{q?y.delete():y.convertToRange()},!1,!0)}},[s]),ge=r.useCallbackRef((g,T,q)=>{V(g,async y=>{let w=y.getSelectedRanges();if(w.getCount()>1)throw new Error("Can not sort on multiple cell ranges. Please select a single range and try again.");let E=w.at(0);E.size===1&&(E=E.getSurrounding());const W=y.getSelection().getCoords().cell;let oe=E.getDefaultSortCriteria(d.IRange.Orientation.Row,W);if(!oe){if(q)throw new Error("Invalid sort selection. Sort requires a single range with data.");return}let ce=oe.options;if(q&&(ce=new Promise((te,Ce)=>{const ve={range:E,options:oe.options,cell:W,onCancel:()=>{Ce()},onDone:ye=>{ye?te(ye.options):Ce()}};s.showWindow?.("sort",ve)})),ce=await Promise.resolve(ce),!ce)return;const de=await Promise.resolve(s.showBusy(g.label()));try{E.doBatch(()=>{const te={...ce,...T};E.sort(te),E.autoFit({orientations:te?.orientation===d.IRange.Orientation.Column?d.IRange.Orientations.Column:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},g?.label?.())}catch(te){de(),s.showError(te)}de()},!1,!1,!1)},[s]),De=r.useCallbackRef(()=>{console.log("compactedSelection");const g=t.getSelection().getCoords(),T=t.getSelectedRanges().getFlattened().getCoords(),q=(E=>{const W=new Blob([E],{type:"application/javascript"}),oe=URL.createObjectURL(W),ce=new Worker(oe);return URL.revokeObjectURL(oe),ce})("console.log('hello from worker');");setTimeout(()=>{q.terminate(),console.log("Worker terminated")},5e3);let y=-1;for(let E=0;y===-1&&E<T.length;E++)he.CoordUtils.isCellWithinRange(g.cell,T[E])&&(y=E);if(he.CoordUtils.isEqualRangesArrays(g.ranges,T))return;const w={cell:g.cell,ranges:T,rangeIndex:y};t.getSelection().updateCoords(w)},[t]),X=r.useCallbackRef(()=>{console.log("selectComments")},[t]),_=r.useCallbackRef(async(g=!1,T=!1)=>{let q=null;if(T)q=t.getEntireRange();else{const y=t.getSelectedRange();if(y.isEntireRange()){const w=t.getSelection().getCoords().cell,E=t.getRange(w);q=E.getSurrounding(),q.isEntireRange()&&(q=E)}else q=y.getSurrounding({contentOnly:g})}q&&await q.select()},[t]),re=r.useCallbackRef((g,T,q)=>{V(g,async y=>{let w=y.getSelectedRanges();q&&(T===d.IRange.Orientation.Row?w=w.getEntireRows():T===d.IRange.Orientation.Column&&(w=w.getEntireColumns())),w.delete(T)},"Delete Cells")},[t]);r.useCallbackRef(async g=>{let T=null;const q=z(),y=Math.min(q.width-8,480),w=Math.min(q.height-8,288);try{t.getSelectedRanges(),T=await t.getMovables().add({bounds:{x:q.left+(q.width-y)/2,y:q.top+(q.height-w)/2,width:y,height:w},type:"chart",json:g.template}),T.select(),S.setMode(null)}catch(E){s.showError(E)}return T},[t,s]);const pe=r.useCallbackRef(async(g,T,q)=>{const y=await s.showBusy(g.label());try{const w=await t.getMovables().addImage(T,{autoSelect:!0,...q});return y(),S.setMode(null),w}catch(w){y();let E=w;typeof E!="string"&&(console.warn(w),E="Unable to resolve image."),s.showMessage(E,{type:r.NotifierType.Error})}},[t,s]),se=r.useCallbackRef((g,T)=>{V(g,async q=>{const y=q.getSelectedRanges();y.doBatch(()=>{const w=T===d.IRange.Direction.Up||T===d.IRange.Direction.Down,E=y.getCoords().slice().sort(he.CoordUtils.createRangeComparator(w?d.IRange.Orientation.Row:d.IRange.Orientation.Column));for(let W=0;W<E.length;W++){const oe=E[W];let ce=oe;const de=q.getRange(ce).getMerges();let te=0,Ce=0;if(de.length>0){const ve=de[0];te=ve.rowEnd-ve.rowStart,Ce=ve.colEnd-ve.colStart}T===d.IRange.Direction.Left?ce={...oe,colStart:oe.colEnd+Ce}:T===d.IRange.Direction.Right?ce={...oe,colEnd:oe.colStart+Ce}:T===d.IRange.Direction.Up?ce={...oe,rowStart:oe.rowEnd+te}:T===d.IRange.Direction.Down&&(ce={...oe,rowEnd:oe.rowStart+te}),q.getRange(ce).autoFill(oe,{filler:d.AutoFill.Types.Copy}),q.getRange(oe).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})}},{autoSelect:!0,description:g.label()})})},[s]),Ie=r.useCallbackRef(()=>{let g=null;const T=t.getSelectedCell().getCoords();if(T?.rowIndex>0){const q=t.getRange({rowIndex:T.rowIndex-1,colIndex:T.colIndex}).getCell();q&&(g=q.toTextUnformatted(!0))}A?.({text:g})},[t]),[ie,we]=o.useReducer(g=>g+1,0),[Me,Se]=o.useReducer(g=>g+1,0),je=o.useMemo(()=>[new r.Command("gridlinesToggle",i,{label:"Gridlines",scopedLabels:{view:"Gridlines"},description:"Toggle whether the lines between rows and columns in the sheet are displayed."}),new r.Command("sheetViewToggleGridlinesRows",i,{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",i,{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",i,{label:"Gridlines Color",description:"Color the rows and column gridlines."}),new r.Command("sheetViewToggleShowHeadings",i,{label:"Headings",scopedLabels:{view:"Headings"},description:"Toggle whether the row and column headings are displayed."}),new r.Command("sheetViewToggleShowHeadingRows",i,{label:"Row Headings",scopedLabels:{view:"Row Headings",headings:"Rows"},description:"Toggle whether the row headings are displayed."}),new r.Command("sheetViewToggleShowHeadingColumns",i,{label:"Column Headings",scopedLabels:{view:"Columns Headings",headings:"Columns"},description:"Toggle whether the column headings are displayed."}),new r.Command("sheetViewToggleShowHeadingsNumeric",i,{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",i,{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",i,{label:"Show Zeros",description:"Toggle whether cell with zero value shows '0' or blank.",icon:"ViewZero"}),new r.SimpleCommand("selectComments",i,{label:"Select Comments",description:"Select the cells with comments.",shortcut:{key:"O",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>X()),new r.Command("selectAll",i,{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)=>_(!1,g)),new r.SimpleCommand("selectRegion",i,{label:"Select Region",description:"Select the closest data.",shortcut:{key:"*",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},()=>_(!0,!1)),new r.SimpleCommand("breakSelection",i,{label:"Select Visible",description:"Break the selection based on hidden rows and columns.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}},()=>De()),new r.SimpleCommand("formatTextRotate0",i,{label:"No Text Rotation",description:"Remove all text rotation.",icon:"TextRotation315"}),new r.SimpleCommand("formatTextRotate45",i,{label:"Angle Clockwise",description:"Angle text 45 degrees downward.",icon:"TextRotation45"}),new r.SimpleCommand("formatTextRotate90",i,{label:"Rotate Text Down",description:"Angle your text so that it aligns with the left.",icon:"TextRotation90"}),new r.SimpleCommand("formatTextRotate270",i,{label:"Rotate Text Up",description:"Angle your text so that it aligns with the right.",icon:"TextRotation2702"}),new r.SimpleCommand("formatTextRotate315",i,{label:"Angle Counterclockwise",description:"Angle text 45 degrees upward.",icon:"TextRotation315"}),new r.Command("formatTextRotateCustom",i,{label:"Custom Text Rotation",description:"Angle your text using a custom angle.",icon:"TextRotationCustom"}),new r.SimpleCommand("formatTextRotateVertical",i,{label:"Vertical Text",description:"Stack text vertically.",icon:"TextRotationVertical"}),new r.SimpleCommand("sortAscending",i,{label:"Sort Ascending",scopedLabels:{sort:"Ascending"},description:"Lowest to Highest.",icon:"SortIncrease"},function(){ge(this,{reverse:!1},!1)}),new r.SimpleCommand("sortDescending",i,{label:"Sort Descending",scopedLabels:{sort:"Descending"},description:"Highest to Lowest.",icon:"SortDecrease"},function(){ge(this,{reverse:!0},!1)}),new r.SimpleCommand("sortCustom",i,{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(){ge(this,{},!0)}),new r.Command("protectionSheetToggle",i,{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",i,{label:"Tab Color",description:"Color the tab to help differentiate for other sheets.",icon:"stroke.colored"}),new r.Command("formatCellStyle",i,{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){R(this,{named:g.getName()},!0)}),new r.Command("formatTableStyle",i,{label:"Format as Table",scopedLabels:{table:"Apply (Keep Styles)"},description:"Create a table or apply style to the current table.",icon:"PresetStyles"},function(g){We(this,g)}),new r.Command("formatTableStyleClearCellStyles",i,{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){We(this,g,!0)}),new r.Command("formatTableStyleClearTableStyle",i,{label:"Clear Table Style",scopedLabels:{table:"Clear Style"},icon:"ClearFormats",description:"Remove all the styling that is specific for the table."},function(){We(this,{name:null},!0)}),new r.Command("setDefaultTableStyle",i,{label:"Set Default Table Style",scopedLabels:{table:"Set As Default"},description:"Sets the default table style used when a table is inserted."},fe),new r.Command("deleteTableStyle",i,{label:"Delete Table Style",scopedLabels:{table:"Delete"},description:"Remove the current table style."},me),new r.Command("formatBorder",i,{label:"Border",description:"Create an outline border."},function(g){R(this,{border:g})}),new r.Command("formatFillColor",i,{label:"Fill Color",description:"Color the background of the cells to make them stand out."},function(g){R(this,{fill:g})}),new r.Command("formatFontColor",i,{label:"Font Color",description:"Change the color of your text."},function(g){R(this,{font:{fill:g}})}),new r.Command("formatBoldToggle",i,{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",i,{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",i,{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",i,{label:"Double Underline",scopedLabels:{underline:"Double"},description:"Double underline the text.",icon:"TextUnderlineDouble"}),new r.Command("formatUnderlinedAccountingToggle",i,{label:"Accounting Underline",scopedLabels:{underline:"Accounting"},description:"Use accounting underline for the text.",icon:"TextUnderlineAccounting"}),new r.Command("formatUnderlinedAccountingDoubleToggle",i,{label:"Double Accounting Underline",scopedLabels:{underline:"Double Accounting"},description:"Use accounting double underline the text.",icon:"TextUnderlineAccountingDouble"}),new r.Command("formatStrikeThroughToggle",i,{label:"Strikethrough",description:"Toggle strike-through formatting of text.",icon:"TextStrike",shortcut:{key:"5",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("formatSuperscriptToggle",i,{label:"Superscript",description:"Format your text to be smaller and sit at the top of the line.",icon:"TextSuperscript"}),new r.Command("formatSubscriptToggle",i,{label:"Subscript",description:"Format your text to be smaller and sit at the bottom of the line.",icon:"TextSubscript"}),new r.Command("formatAlignTopToggle",i,{label:"Align Top",description:"Align text to the top.",icon:"TextVerticalTop"}),new r.Command("formatTextOverflowVisibleToggle",i,{label:"Overflow Text",description:"Overflow text to the next cells.",icon:"TextHorizontalOverflow"}),new r.Command("formatTextOverflowWrapToggle",i,{label:"Wrap Text",description:"Wrap text with the existing cell and increase the height as required.",icon:"TextHorizontalWrap"}),new r.Command("formatTextOverflowClipToggle",i,{label:"Clip Text",description:"Clip text that falls outside of the existing cell.",icon:"TextHorizontalClip"}),new r.Command("formatTextOverflowShrinkToggle",i,{label:"Shrink Text",description:"Shrink the text font to fit within existing cell.",icon:"TextHorizontalShrink"}),new r.Command("formatTextOverflowEllipsisToggle",i,{label:"Ellipsis Text",description:"Add a trailing '…' to the text to indicate text is partially hidden."}),new r.Command("formatAlignMiddleToggle",i,{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",i,{label:"Align Bottom",description:"Align text to the bottom.",icon:"TextVerticalBottom"}),new r.Command("formatAlignJustifyVerticalToggle",i,{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",i,{label:"Distribute Vertically",description:"Justify your content vertically.",icon:"FormatAlignJustify"}),new r.Command("formatAlignLeftToggle",i,{label:"Align Left",description:"Align your content to the left.",icon:"FormatAlignLeft"}),new r.Command("formatAlignCenterToggle",i,{label:"Align Center",description:"Center your content.",icon:"FormatAlignCenter"}),new r.Command("formatAlignRightToggle",i,{label:"Align Right",description:"Align your content to the right.",icon:"FormatAlignRight"}),new r.Command("formatAlignJustifyToggle",i,{label:"Align Justify",description:"Justify your content.",icon:"FormatAlignJustify"}),new r.Command("formatAlignCenterContinuousToggle",i,{label:"Center Across",description:"Center your content across multiple cells.",icon:"FormatAlignCenter"}),new r.Command("formatAlignFillToggle",i,{label:"Fill Across",description:"Repeat the value to fill the entire cell.",icon:"FormatAlignJustify"}),new r.Command("formatAlignDistributedHorizontalToggle",i,{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",i,{label:"Increase Font Size",description:"Make your text a bit bigger.",icon:"TextSizeIncrease",shortcut:{key:">",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){R(this,g=>({font:{size:po(g.getFont().getSize(),!0)}}))}),new r.SimpleCommand("formatFontSizeDecrease",i,{label:"Decrease Font Size",description:"Make your text a bit smaller.",icon:"TextSizeDecrease",shortcut:{key:"<",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){R(this,g=>({font:{size:po(g.getFont().getSize(),!1)}}))}),new r.Command("formatFontFamily",i,{label:"Font",description:"Select the font your text."},function(g){R(this,{font:{family:g}})}),new r.Command("formatFontSize",i,{label:"Font Size",description:"Change the size of your text."},function(g){R(this,{font:{size:g}})}),new r.Command("formatNumberDialog",i,{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,T){const q=this,y={initialValue:g??T.state(),context:T.context(),onInputOption:(w,E)=>{R(q,{numberFormat:w})}};s.showWindow?.("numberFormat",y)}),new r.Command("formatNumberFormat",i,{label:"Number Format",description:"Choose the format for your cells, such as percentage, currency, date or time."},function(g){R(this,{numberFormat:g})}),new r.Command("formatNumberFormatGeneralStyle",i,{label:"General Style",description:"Remove all specific formatting.",shortcut:{key:"Backquote",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){R(this,{numberFormat:d.NumberFormat.Type.General})}),new r.Command("formatNumberFormatNumberStyle",i,{label:"Number Style",description:"Format as number with two decimals and comma.",shortcut:{key:"1",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){R(this,{numberFormat:"#,##0.00"})}),new r.Command("formatNumberFormatTimeStyle",i,{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(){R(this,{numberFormat:"h:mm AM/PM"})}),new r.Command("formatNumberFormatDateStyle",i,{label:"Date Style",description:"Format as date with day, month, and year.",shortcut:{key:"3",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){R(this,{numberFormat:"d-mmm-yy"})}),new r.Command("formatNumberFormatAccountingStyle",i,{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){R(this,{numberFormat:g??'_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)'})}),new r.Command("formatNumberFormatPercentStyle",i,{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(){R(this,{numberFormat:"0%"})}),new r.Command("formatNumberFormatScientificStyle",i,{label:"Scientific Style",description:"Format as a scientific number with two decimal places .",shortcut:{key:"6",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){R(this,{numberFormat:"0.00E+00"})}),new r.Command("formatNumberFormatCommaStyle",i,{label:"Comma Style",description:"Format with a thousands separator.",icon:"Comma",shortcut:{key:",",modifiers:[r.KeyModifiers.Ctrl]}},function(){R(this,{numberFormat:'_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)'})}),new r.Command("formatNumberFormatIncreaseDecimal",i,{label:"Increase Decimal",description:"Show more decimal places for a more precise value.",icon:"IncreaseDecimal2"},function(){R(this,g=>({numberFormat:d.NumberFormat.Parser.adjustDecimalPlaces(g.getNumberFormat(),1)}))}),new r.Command("formatNumberFormatDecreaseDecimal",i,{label:"Decrease Decimal",description:"Show few decimal places.",icon:"DecreaseDecimal2"},function(){R(this,g=>({numberFormat:d.NumberFormat.Parser.adjustDecimalPlaces(g.getNumberFormat(),-1)}))}),new r.Command("displayPlaceholdersToggle",i,{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",i,{label:"Do nothing",description:"Do Nothing.",shortcut:{key:"7",modifiers:[r.KeyModifiers.Ctrl]}},function(){}),new r.Command("displayOutlineSymbolsToggle",i,{label:"Display Outline Symbols",description:"Display or hide the outline symbols.",shortcut:{key:"8",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("hideRows",i,{label:"Hide Rows",description:"Hide the rows.",icon:"HideRow",shortcut:{key:"9",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("unhideRows",i,{label:"Unhide Rows",description:"Unhide the rows.",icon:"ShowRow",shortcut:{key:"(",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.Command("hideColumns",i,{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",i,{label:"Unhide Columns",description:"Unhide the columns.",icon:"ShowColumn",shortcut:{key:")",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}}),new r.SimpleCommand("calculate",i,{label:"Calculate Sheet",description:"Recalculate the formulas on the current sheet.",icon:"CalculateSheet",shortcut:{key:"=",modifiers:[r.KeyModifiers.Ctrl]}}),new r.Command("insertFunction",i,{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&&ke(this,g.getName())}),new r.Command("insertFunctionSum",i,{label:"Quick Sum",scopedLabels:{insertFunction:"Sum"},description:"Quick sum of the cells.",icon:"FunctionSum",shortcut:{key:"=",modifiers:[r.KeyModifiers.Alt]}},function(){ke(this,"SUM")}),new r.Command("insertFunctionAverage",i,{label:"Quick Average",scopedLabels:{insertFunction:"Average"},description:"Quick average of the cells."},function(){ke(this,"AVERAGE")}),new r.Command("insertFunctionCount",i,{label:"Quick Count",scopedLabels:{insertFunction:"Count Numbers"},description:"Quick count of the cells."},function(){ke(this,"COUNT")}),new r.Command("insertFunctionMax",i,{label:"Quick Max",scopedLabels:{insertFunction:"Max"},description:"Quick maximum of the cells."},function(){ke(this,"MAX")}),new r.Command("insertFunctionMin",i,{label:"Quick Min",scopedLabels:{insertFunction:"Min"},description:"Quick minimum of the cells."},function(){ke(this,"MIN")}),new r.Command("startEditCurrentTime",i,{label:"Current Time",description:"Insert the current time.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Shift]}},function(){A?.({text:t.createTemporaryCell({value:hn(),style:{numberFormat:"Medium Time"}}).toText()})}),new r.Command("startEditCurrentDate",i,{label:"Current Date",description:"Insert the current date.",shortcut:{key:"Semicolon",modifiers:[r.KeyModifiers.Ctrl]}},function(){A?.({text:t.createTemporaryCell({value:hn(),style:{numberFormat:"Short Date"}}).toText()})}),new r.SimpleCommand("sheetZoomOut",i,{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",i,{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",i,{label:"Zoom 100%",description:"Zoom document to 100%.",shortcut:{key:"o",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}}),new r.Command("updateHyperlink",i,{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:"InsertHyperlink",context:()=>U,shortcut:[{key:"K",modifiers:[r.KeyModifiers.Ctrl]},{key:"K",modifiers:[r.KeyModifiers.Ctrl,r.KeyModifiers.Alt]}]},async function(g,T){const q=this,y={context:T.context(),onUpdateHyperlink:(w,E)=>{K(q,w,E)}};s.showWindow?.("hyperlink",y)}),new r.Command("openHyperlink",i,{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:"InsertHyperlink",context:()=>U},async(g,T)=>{const q=T.context()();if(!q)return;const y=q.getHyperlink();if(y)try{await y.open()}catch(w){s.showError(w)}}),new r.Command("deleteHyperlink",i,{label:"Delete Link",scopedLabels:{hyperlink:"Delete"},description:"Remove the hyperlink.",context:()=>U},function(g,T){K(this,null,null)}),new r.SimpleCommand("insertNote",i,{label:"Insert Note",scopedLabels:{contextMenu:"Insert Note…",insert:"Note"},shortcut:{key:"F2",modifiers:[r.KeyModifiers.Shift]},description:"Add a note to the cell."},(g,T)=>{((q,y)=>{q?.showMessage?.(c.jsxs("p",{style:{marginTop:"0px",marginBottom:"0px"},children:[y," 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,T.label())}),new r.Command("updateComments",i,{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:"InsertComment",context:()=>U},async function(g,T){const q=this,y={context:T.context(),onUpdateComments:w=>{k(q,w)}};s.showWindow?.("comments",y)}),new r.Command("deleteComments",i,{label:"Delete Comments",description:"Remove any comments.",context:()=>U},function(g,T){k(this,null)}),new r.Command("insertImageFromFile",i,{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 T=null,q=null;typeof g=="string"?q=g:T=g?.file?g.file:g,(T||(T=await he.CommonUtils.openFileDialog(q??"image/*"),T))&&await pe(this,{file:T},g?.options)}),new r.Command("insertImageFromURL",i,{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 T=await s.showInputOptions({title:"Insert Image from Web",description:"Enter the web address for the image to insert.",inputLabel:"Address",initialValue:"https://picsum.photos/360",inputProps:{style:{minWidth:"440px"}},options:["Insert"]});if(T.option!=="Insert")return;g=T.input}g&&pe(this,{fetch:g})}),new r.SimpleCommand("insertTable",i,{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(){We(this)}),new r.Command("editTable",i,{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 T=null,q=!1;g.isITable?T=g:g.getValue()&&(T=g.getValue(),q=!0),ee(this,T,q)}),new r.Command("deleteTable",i,{label:"Delete Table",scopedLabels:{delete:"Table",table:"Delete",namedItem:"Delete"},description:`Remove the table.
12
12
 
@@ -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",f,{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",f,{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",f,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped.",icon:"PasteTranspose"}),new r.Command("pasteLinks",f,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells.",icon:"PasteLinks"})];l.addCommands(F,!0)},[l,e]),o.useEffect(()=>{if(!l)return;const f={disabled:!t.getProtection().isFormatCellsAllowed()};l.getCommand("pasteValues").updateCallback(F=>M.paste({...Ql,...F})).update(f),l.getCommand("pasteFormats").updateCallback((F,S)=>M.paste({...ei,description:S.label(),...F})).update(f),l.getCommand("pasteFormulas").updateCallback((F,S)=>M.paste({...ti,description:S.label(),...F})).update(f),l.getCommand("pasteTranspose").updateCallback((F,S)=>M.paste({...ni,description:S.label(),...F})).update(f),l.getCommand("pasteLinks").updateCallback((F,S)=>M.paste({...oi,description:S.label(),...F})).update(f),l.getCommand("cut").update(f),l.getCommand("paste").update(f)},[t,l]);const P=o.useMemo(()=>{if(!A||!I.current)return;const f=A.key;if(f!=="copy"&&f!=="cut"&&f!=="formatPainter")return;const F=I.current.getItem();if(F.getSource()!==t)return;const S=I.current.isCut?.(),G=S?b:p,D=S?s:h,O=F.getCoords(),$=O?[O]:null;return $&&$.length!==0?ue=>{const U=[];for(let V=0;V<$.length;V++){const R=$[V],K=ue.toClipBounds(ue.getRangeCoordsBounds(R,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);K&&(U.push(u({range:R,key:`copy-selection-background-${V}`,x:K.x,y:K.y,width:Math.max(K.width,0),height:Math.max(K.height,0),stroke:G,strokeWidth:2})),U.push(u({range:R,key:`copy-selection-foreground-${V}`,x:K.x+(K.width<=2?-1:0),y:K.y,width:Math.max(K.width,3),height:Math.max(K.height,3),stroke:D,strokeWidth:2,isAnimatedStroke:!0})))}return U}:null},[A,t,n,h,p,s,b]);return{...M,clipboard:B,overlays:P}},ri=o.memo(o.forwardRef((e,t)=>{const{view:n,element:l,sheet:a,gridStyle:i,commands:m}=e,h=i.body??{},s=a.getView(),{overlays:p}=Lr({element:l,sheet:a,sheetView:s,commands:m,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:h.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:h.fill});return tt(a?.getSelection(),{onChange(b){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),p&&n?p(n):null})),li="_sheet-selection_12wyx_5",ii={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},ai={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},si={key:"dragCopy",description:"Drag selection to copy cell contents."},ci={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Qo=(e,t)=>t.ctrlKey&&t.shiftKey?ci:t.ctrlKey?si:t.shiftKey?ai:ii,di={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},ui=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:l,className:a,onFirstRender:i,onShowTooltip:m,onCloseTooltip:h,sheet:s,gridRef:p,gridStyle:b,isActive:C,editingCoords:u,...I}=e,x=n?.getBounds(),A=r.useCallbackRef(m,[m]),z=r.useCallbackRef(h,[h]),[H,B]=o.useState(()=>s?.getSelection().getCoords()),M=r.useCallbackRef(X=>{he.CoordUtils.isEqualSelectionCoords(X,H)||s&&s.getSelection().updateCoords(X)},[s,H]),P=r.useEditMode(),f=o.useRef(null),[F,S]=o.useState(s?.getProtection().isLocked()),[G,D]=o.useState(s?.getView().getMovableSelection().length>0),O=r.ReactUtils.detectIt().primaryInput==="touch",$=!O&&C,ue=u!==null||G,U=r.useCallbackRef(X=>{const _=he.CoordUtils.cellToRange(X);if(s.isClosed())return _;const re=s.getRange(_,{ignoreHidden:!0}).getMerges();return re.length===0?_:re[0]},[s]),V=r.useCallbackRef((X,_,re,pe,se,Ie)=>{const ie=s.getSelectedRange().getExtended(pe,X).getCoords();switch(pe){case d.IRange.Direction.Up:return ie.rowStart;case d.IRange.Direction.Down:return ie.rowEnd;case d.IRange.Direction.Left:return ie.colStart;case d.IRange.Direction.Right:return ie.colEnd}},[s]),R=r.useCallbackRef(()=>{const X=s.getUsedRange()?.getCoords(),_=s.getRowHeaders().getUsedRange()?.getCoords(),re=s.getColumnHeaders().getUsedRange()?.getCoords();return{...X,colEnd:Math.max(X?.colEnd??0,re?.max??0),rowEnd:Math.max(X?.rowEnd??0,_?.max??0)}},[s]),K=r.useCallbackRef((X,_)=>s.getRowHeaders().hiddenHeadersAt(X,_),[s]),k=r.useCallbackRef((X,_)=>s.getColumnHeaders().hiddenHeadersAt(X,_),[s]),L=r.useCallbackRef(X=>s.getRange(X,{ignoreHidden:!0}).getMerges(),[s]),ne=r.useCallbackRef(X=>{s?.getSelection().setAdjusting(X)},[s]),le=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),P.getMode()?.key==="formatPainter"&&(await l?.getCommand("pasteFormats")?.execute({}),P.setMode(null))},[P,H,s,l]),Re=o.useMemo(()=>{const X=P.getMode();return X?.key==="cut"||X?.key==="copy"},[P]);tt(s?.getView(),{onMovableSelectionChange:()=>{D(s.getView().getMovableSelection().length>0)}}),tt(s?.getSelection(),{onChange(X){const _=s.getSelection().getCoords();B(_)}}),tt(s,{onProtectionChange:()=>{S(s.getProtection().isLocked())}});const{body:fe={}}=b||{},me=r.useNotifier(),ke=n.getLayout(),We=!($&&H.ranges.length<=1&&u===null&&!F&&(!P.getMode()||Re)),{cursor:Fe,overlay:Ve,onPointerDown:ee}=dt.useSelection({gridRef:p,commands:l,layout:ke,getCellCoordsAsRangeCoords:U,selection:H,fillHandleBorderColor:fe.fill,selectionBackgroundColor:C?b.selection.fill:b.selectionInactive.fill,selectionBorderColor:C?b.selection.strokeFill:b.selectionInactive.strokeFill,selectionRemoveBackgroundColor:C?b.selectionRemove.fill:b.selectionInactive.fill,selectionRemoveBorderColor:C?b.selectionRemove.strokeFill:b.selectionInactive.strokeFill,disableFillDrag:We,disableMoveDrag:O||!(C&&H.ranges.length<=1&&u===null&&!F),disableTouchSelection:ue,onSelectionChange:M,onSelectionDragStart:ne,onSelectionDragEnd:le,onMoveDragStart:(X,_,re)=>{P.setMode(Qo(0,re))},onMoveDragUpdate:(X,_,re)=>{P.setMode(Qo(0,re))},onMoveDragEnd:(X,_)=>{P.setMode(null)},onMoveDragDone:async(X,_,re)=>{if(he.CoordUtils.isEqualRanges(X,_))return;const pe=s.getRange(_);if(me?.showOptions){const Me=pe.getDifferences(X);let Se=!1;const je=Me.getCount();for(let v=0;!Se&&v<je;v++)Se=Me.at(v).isContentful();if(Se&&await me?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const se=!re.ctrlKey,Ie=re.shiftKey,ie=Ie?se?"Insert Moved Cells":"Insert Copied Cells":se?"Move Cells":"Copy Cells",we=await me?.showBusy?.(ie);try{const Me=s.getRange(X);await pe.doBatch(async()=>{Ie?await pe.insertFrom(X,{isCut:se,undoRange:Me}):await pe.copyFrom(X,{isCut:se,undoRange:Me}),Me.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),pe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:ie,autoSelect:!0})}catch(Me){me?.showError?.(Me)}finally{we?.()}},contentfulCellFinder:V,hiddenRowsAt:K,hiddenColumnsAt:k,mergedRanges:L,getDataCoords:R,canSelectionSpanMergedCells:X=>{const _=s.getRange(X);return _.isEntireColumns()||_.isEntireRows()},onFill:async(X,_)=>{const re="Auto Fill",pe=await me?.showBusy?.(re);try{await s.doBatch(()=>{s.getRange(X).autoFill(_),s.getRange(_).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:re,autoSelect:!0})}catch(se){me?.showError?.(se)}finally{f.current=null,pe?.()}},onFillPreview:(X,_,re)=>{if(p.current&&A){P.setMode(di);try{f.current?.direction!==re&&(f.current=null,s.getRange(X).autoFill(_,{previewOnly:je=>{f.current={callback:je,direction:re}}}));const pe=f.current?.callback?.(_);if(!pe||pe.isEmpty())return;const se=pe.toText();if(!se)return;const Ie=he.CoordUtils.cellToRange(pe.getCoords()),ie=n.getRelativePointFromClient(0,0);let we=0,Me=0,Se=r.ToolTipPlacement.Bottom;if(re===d.IRange.Direction.Down){we=ke.getColOffset(Ie.colEnd+1)-ie.x;const je=ke.getRowOffset(Ie.rowEnd),v=ke.getRowOffset(Ie.rowEnd+1);Me=v-(v-je)/2-ie.y,Se=r.ToolTipPlacement.Right}else if(re===d.IRange.Direction.Right){Me=ke.getRowOffset(Ie.rowEnd+1)-ie.y;const je=ke.getColOffset(Ie.colEnd),v=ke.getColOffset(Ie.colEnd+1);we=v-(v-je)/2-ie.x,Se=r.ToolTipPlacement.Bottom}else if(re===d.IRange.Direction.Up){we=ke.getColOffset(Ie.colEnd+1)-ie.x;const je=ke.getRowOffset(Ie.rowStart),v=ke.getRowOffset(Ie.rowStart+1);Me=v-(v-je)/2-ie.y,Se=r.ToolTipPlacement.Right}else if(re===d.IRange.Direction.Left){Me=ke.getRowOffset(Ie.rowEnd+1)-ie.y;const je=ke.getColOffset(Ie.colStart),v=ke.getColOffset(Ie.colStart+1);we=v-(v-je)/2-ie.x,Se=r.ToolTipPlacement.Bottom}A({anchor:{x:we,y:Me},display:se,placement:Se})}catch(pe){me?.showError?.(pe)}}},onFillDone:()=>{f.current=null,P.setMode(null),z?.()}}),Y=r.useCallbackRef(X=>{ee(r.ReactUtils.createSyntheticEvent(X))},[ee,u]);o.useEffect(()=>{const X=n?.getStage();if(X)return X.addEventListener("pointerdown",Y),()=>{X.removeEventListener("pointerdown",Y)}},[n?.getStage()]);const ge=r.useImperativeElement(t,()=>({}),[]),De=o.useRef(null);return c.jsx("div",{className:gt(a,"sheet-selection",li),style:{position:"absolute",width:x?.width,height:x?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Xt([ge,De]),...I,children:Ve(n)})})),Fn=Object.freeze({x:0,y:0,width:0,height:0}),gi={fireOnModelChange:!1},hi=o.memo(o.forwardRef((e,t)=>{const{children:n,view:l,movable:a,onRefLoad:i,onRefUnload:m,onHide:h,onShow:s,onUnFocus:p,isDragging:b,updateFrameBounds:C,dragStart:u,style:I,disabled:x,renderMovable:A,...z}=e,[H,B]=o.useState(Fn),[M,P]=o.useState(null),[f,F]=o.useState(!1),S=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const D=a.getBounds();if(!D)return;const O=l.toViewBounds(D);B(O??Fn),C(O??Fn)},[l?.getBounds()]),tt(a,{onBoundsChange:D=>{const O=D.getBounds();if(!O)return;const $=l.toViewBounds(O);B($??Fn),C($)},onSelectionChange:()=>{const D=he.CommonUtils.hasFocus(S.current,!0);!f&&!D||a.isSelected()||p()}}),tt(a,{onRequestFocus:()=>he.CommonUtils.whenFocus(S.current,!0)},gi),o.useEffect(()=>{const D=S.current;return i(D),()=>{m(D)}},[]);const G=o.useMemo(()=>{if(!H)return null;let{width:D,height:O}=H;return A({view:l,movable:a,disabled:x,isDragging:b,style:{position:"relative",left:0,top:0,width:D,height:O},onHide:h,onShow:s})},[l,a,H.width,H.height,x,b]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Xt([S,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:H.x,top:H.y,width:H.width,height:H.height,...I},onMouseDown:async D=>{const O=D.shiftKey||D.ctrlKey,$=a.isSelected(),ue=D.currentTarget;O&&$?a.unselect():($&&!O||await a.select({addToSelection:O}),u(D.nativeEvent,ue),ue.focus())},onFocus:D=>{D.relatedTarget&&!M&&P(D.relatedTarget),F(!0)},onBlur:D=>{M&&!S?.current?.contains(D.relatedTarget)&&P(null),D.relatedTarget&&F(!1)},...z,children:G})})),mi="_movable-area_314c6_5",Pr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:l,movablesView:a,renderMovable:i,transactional:m,onUnFocus:h,onFocus:s,disabled:p=!1,disableDrag:b=!1,disableResize:C=!1,className:u,style:I,renderDirections:x=["nw","n","ne","w","e","sw","s","se"],onFirstRender:A,...z}=e,H=n.getBounds(),B=r.useCallbackRef(A,[A]),M=r.useCallbackRef(h,[h]),P=r.useCallbackRef(s,[s]),[f,F]=o.useState([]),[S,G]=o.useState(!1),[D,O]=o.useState(!1),$=o.useRef(!0),ue=o.useRef(new Map),U=o.useRef(new Map),V=o.useRef(new Map),R=o.useRef(new Map),K=o.useRef(new Map),k=o.useRef({onRequestFocus:ae=>(re(ae),null)}),L=o.useRef(null),ne=o.useRef(null),le=o.useRef(null),[Re,fe]=o.useReducer(ae=>ae+1,0);o.useLayoutEffect(()=>{fe()},[n,l]),tt(l,{onCollectionChange:()=>{const ae=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0}),Te=K.current;Te.forEach(Ae=>{Ae()}),Te.clear();const Ne=k.current;for(let Ae=0;Ae<ae.length;Ae++){const xe=ae[Ae];if(xe.isClosed())continue;const N=xe.addListeners(Ne);Te.set(xe,N)}fe()},onInvalidated:()=>{fe()}}),tt(a,{onMovableSelectionChange(ae){ke(),fe()}});const me=o.useCallback((ae,Te)=>{const Ne=V.current.get(ae);le.current&&(le.current.getTargets().forEach(Ae=>{if(Ae===Ne)return Ae.style.left=Te.x+"px",Ae.style.top=Te.y+"px",Ae.style.width=Te.width+"px",void(Ae.style.height=Te.height+"px")}),le.current.updateRect())},[]),ke=()=>{const ae=[],Te=a.getMovableSelection();Te.forEach(Ne=>{const Ae=V.current.get(Ne);Ae&&Te.indexOf(Ne)!==-1&&ae.push(Ae)}),F(Ne=>he.CommonUtils.isEqualArrays(Ne,ae)?Ne:ae)},We=o.useRef(null),Fe=o.useRef(null),Ve=o.useMemo(()=>(Fe.current||(Fe.current=new Promise(ae=>{We.current=ae})),Fe.current),[]),ee=o.useRef(null),Y=r.useCallbackRef(async(ae,Te)=>{ee.current=Te,await(async()=>!(!await Ve.then()||!le.current))()&&ee.current===Te&&le.current.dragStart(ae,Te)},[f]),[ge,De]=o.useState(!1),X=o.useRef(null),_=o.useRef(null),re=r.useCallbackRef(async(ae=null)=>{if(ae||(ae=a.getMovableSelection()[0]),!ae)return M?.(),!1;const Te=V.current.get(ae);Te?(await he.CommonUtils.whenFocus(Te),Te.focus(),_.current=Te,X.current=null):X.current=ae},[a]);o.useEffect(()=>{ge&&f.length>0&&_.current!==f[0]&&re(),$.current&&(B?.(),$.current=!1)},[f]);const pe=o.useMemo(()=>{const ae=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0});if(ae.length===0&&ue.current.size===0)return null;const Te=(J,j,Z,qe=!0)=>{const g=J.isSelected(),T={tabIndex:Z,view:n,movable:J,onRefLoad:q=>{X.current===J&&(q.focus(),_.current=q,X.current=null),V.current.set(J,q),U.current.set(q,J),j.rendered=!0,ke()},onRefUnload:q=>{V.current.delete(J),U.current.delete(q),j.rendered=!1,ke()},onUnFocus:M,onHide:q=>{j.onHide=q},onShow:q=>{j.onShow=q},isDragging:g&&(D||S),disabled:p,renderMovable:i,updateFrameBounds:q=>{me(J,q)},dragStart:Y,onMouseUp:()=>{if(ee.current=null,ne.current){G(!1),O(!1);let q=!1;R.current?.forEach(y=>{he.CommonUtils.isEqualBounds(y.movable.getBounds(),y.startBounds)||(q=!0)}),q?Ie():ie()}},style:{opacity:qe?S&&g?.7:void 0:0,zIndex:S&&g?J.getZIndex()+ae.length:void 0,pointerEvents:qe?void 0:"none",cursor:D&&g?"grabbing":p||b?"initial":"move",boxShadow:!g||D&&!S?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(hi,{...T},`movable-${J.getUUID()}`)},Ne=ue.current,Ae=new Map,xe=[];for(let J=0;J<ae.length;J++){const j=ae[J];if(j.isClosed())continue;let Z=Ne.get(j);Z||(Z={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(qe,g)=>{if(!g||g.shown===!0)return;g.shown=!0;const T=++g.visibilityRequestId;requestAnimationFrame(()=>{const q=ue.current.get(qe);q&&T===g.visibilityRequestId&&(g.onShow?.(qe),q.shown=!0)})},doHide:async(qe,g)=>{if(!g||g?.shown===!1)return;g.shown=!1;const T=++g.visibilityRequestId,q=await Promise.resolve(g.onHide?.(qe));T===g.visibilityRequestId&&q!==!1&&(g.shown=!1,ue.current.delete(qe),fe())},visibilityRequestId:0}),Z.frame=Te(j,Z,J,!0),xe.push(Z.frame),Z.doShow(j,Z),Ne.delete(j),Ae.set(j,Z)}const N=[];return a.getMovableSelection().forEach(J=>{const j=Ne.get(J);j&&(j.frame=Te(J,j,-1,!1),N.push(j.frame),Ne.delete(J),Ae.set(J,j))}),Ne.forEach((J,j)=>{J.frame=Te(j,J,-1,!1),N.push(J.frame),J.doHide(j,J),Ne.delete(j),Ae.set(j,J)}),ue.current=Ae,ke(),[...N,...xe]},[Re,n,i,p,b,C,S,D]),se=r.useCallbackRef((ae,Te)=>{const Ne=`${Te} ${f.length===1?d.TextUtils.capitalize(U.current?.get(f[0]).getContent().getType()):"Drawings"}`;ne.current&&(console.warn(`Transaction ${ne.current.getDescription()} is being replaced by ${Ne}`),ne.current.rollback(),ne.current=null),ne.current=m.beginCommit({description:Ne}),R.current.clear();for(let Ae=0;Ae<f.length;Ae++){const xe=f[Ae],N=U.current?.get(xe);N?R.current.set(xe,{movable:N,startBounds:n.toViewBounds(N.getBounds())}):console.warn("invalid element",N)}},[m,n,f]),Ie=o.useCallback(()=>{if(!ne.current)return;const ae=[];R.current?.forEach(Te=>{ae.push(Te.movable)}),ne.current.commit({viewAfter:{view:a,movableSelection:ae}}),R.current.clear(),ne.current=null},[]),ie=o.useCallback(()=>{ne.current&&(ne.current.rollback(),ne.current=null)},[]),we=o.useRef(null);o.useEffect(()=>{we.current&&(we.current.onscroll=ae=>{ae.preventDefault(),ae.srcElement.scrollTop=0,ae.srcElement.scrollLeft=0})},[we.current]);const Me=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:re,focus:()=>{re()}}),[a]),[Se,je]=o.useState(null),v=o.useRef(!1),_e=o.useRef(!1),Oe=o.useRef(!1);o.useEffect(()=>{if(p||f.length===0||Oe.current||v.current)return;if(_e.current)return void requestAnimationFrame(()=>{le.current&&L.current&&le.current.refTargets.length>0&&(Oe.current=!0,We.current?.(!0)),F([...f])});v.current=!0;const ae=o.lazy(async()=>{try{const Te=await Promise.resolve().then(()=>require("./DNPtrOAWXYL6H5gZ.cjs"));return v.current=!1,_e.current=!0,F([...f]),Te}catch(Te){return console.warn(Te),We.current?.(!1),null}});je(ae)},[f,p,b,C]);const Qe=o.useMemo(()=>!Se||p?null:c.jsx(o.Suspense,{children:c.jsx(Se,{className:gt({dragging:S||D,resizing:S,moving:D}),container:null,ref:le,target:le.current?f:[],draggable:!p&&!b,resizable:!p&&!C,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:x,onResizeStart:ae=>{se(ae.target,"Resize")},onResize:ae=>{if(!ne.current)return ae.stopDrag(),void fe();G(!0);const Te=ae.direction[0]!==0&&ae.direction[1]!==0;let Ne=0,Ae=0;for(let xe=0;xe<f.length;xe++){const N=f[xe],J=R.current.get(N),j=U.current.get(N);if(!J||!j){console.warn("invalid element");continue}let Z=ae.dist[0],qe=ae.dist[1],g=ae.drag.dist[0],T=ae.drag.dist[1],q=J.startBounds.width,y=J.startBounds.height;xe===0?(Ne=q,Ae=y):(Z*=q/Ne,g*=q/Ne,qe*=y/Ae,T*=y/Ae);const w={...J.startBounds};if(w.width=Math.max(0,q+Z),w.height=Math.max(0,y+qe),ae.direction[0]===-1&&(w.width=Math.max(0,Math.min(J.startBounds.x+q,q-g))),ae.direction[1]===-1&&(w.height=Math.max(0,Math.min(J.startBounds.y+y,y-T))),Te&&(j.isLockAspectRatio()||ae.inputEvent?.shiftKey)){const E=q/y,W=w.width/w.height;W>E?w.height=w.width/E:W<E&&(w.width=w.height*E)}ae.direction[0]===-1&&(w.x=Math.max(0,Math.min(J.startBounds.x+q,J.startBounds.x+q-w.width))),ae.direction[1]===-1&&(w.y=Math.min(J.startBounds.y+y,J.startBounds.y+y-w.height)),J.movable.setBounds(n.toAbsoluteBounds(w))}},onResizeEnd:ae=>{G(!1),Ie()},onDragStart:ae=>{se(ae.target,"Move")},onDrag:ae=>{if(!ne.current)return ae.stopDrag(),void fe();O(!0);for(let Te=0;Te<f.length;Te++){const Ne=f[Te],Ae=R.current.get(Ne);Ae?Ae.movable.setBounds(n.toAbsoluteBounds({...Ae.startBounds,x:Ae.startBounds.x+ae.translate[0],y:Ae.startBounds.y+ae.translate[1]})):console.warn("invalid element")}},onDragEnd:ae=>{},onMouseUp:ae=>{}})}),[Re,Se,f,n,p,b,C,S,D]);return c.jsx("div",{className:gt(u,"movable-area",mi),style:{width:H.width,height:H.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Xt([Me,we]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:H.width,height:H.height},...z,children:c.jsxs("div",{ref:L,style:{position:"absolute",pointerEvents:"auto"},onFocus:ae=>{P?.(),De(!0)},onBlur:ae=>{De(!1)},onKeyDownCapture:ae=>{if(ae.isDefaultPrevented())return;const Te=ae.nativeEvent.ctrlKey,Ne=ae.nativeEvent.altKey,Ae=ae.nativeEvent.shiftKey;if(ae.which===r.KeyCodes.Escape){const Z=a.getMovableSelection();let qe=[...Z];return f.forEach(g=>{if(qe.length===0)return;const T=U.current.get(g);let q=qe.indexOf(T);qe.splice(q,1)}),qe.length!==Z.length&&a.selectMovables(qe),qe.length===0&&M?.(),void ae.preventDefault()}const xe=.1,N=Z=>{l.updateSelected(qe=>{qe.setRotation(qe.getRotation()+Z)},"Rotate")},J=(Z,qe=!0)=>{l.updateSelected(g=>{const T=g.getBounds();let q=1+Z;qe||(q=1/q);const y=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),w=Math.atan2(T.height,T.width),E=q*y;if(E<10)return;const W=E*Math.cos(w),oe=E*Math.sin(w),ce={x:T.x+(T.width-W)/2,y:T.y+(T.height-oe)/2,width:W,height:oe};g.setBounds(ce)},"Resize")},j=Z=>{l.updateSelected(qe=>{const g=qe.getBounds(),T={x:g.x+(Z.x??0),y:g.y+(Z.y??0),width:g.width+(Z.width??0),height:g.height+(Z.height??0)};qe.setBounds(T)},"Nudge")};if(ae.which===r.KeyCodes.Delete)l.updateSelected(Z=>{Z.delete()},"Delete"),ae.preventDefault();else if(ae.key==="a"&&Te){const Z=a.getMovableSelection();a.selectMovables(l.getItems(),!0),a.selectMovables(Z,!0),ae.preventDefault()}else ae.key==="ArrowLeft"?(Ae?J(xe,!1):Ne?N(-10):j({x:Te?-10:-1}),ae.preventDefault()):ae.key==="ArrowRight"?(Ae?J(xe,!0):Ne?N(10):j({x:Te?10:1}),ae.preventDefault()):ae.key==="ArrowUp"?(Ae?J(xe,!0):j({y:Te?-10:-1}),ae.preventDefault()):ae.key==="ArrowDown"&&(Ae?J(xe,!1):j({y:Te?10:1}),ae.preventDefault())},children:[pe,Qe]})})})})),$t=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,l=0,a=0;for(let i=0;i<e.length;i++){const m=e[i].getBounds();t=Math.min(m.x,t),n=Math.min(m.y,n),l=Math.max(m.x+m.width,l),a=Math.max(m.y+m.height,a)}return{x:t,y:n,width:l-t,height:a-n}},er=(e,t=!0)=>{const n=[],l=t?"x":"y",a=t?"y":"x",i=t?"width":"height";let m=0,h=Number.MAX_SAFE_INTEGER,s=0;for(let C=0;C<e.length;C++){const u=e[C],I=u.getBounds();m+=I[i],h=Math.min(I[l],h),s=Math.max(I[l]+I[i],s),n.push({bounds:I,movable:u})}const p=(s-h-m)/(e.length-1);n.sort((C,u)=>{const I=C.bounds[l],x=u.bounds[l];return I!==x?I-x:C.bounds[a]-u.bounds[a]});const b=new Map;b.set(n[0].movable,n[0].bounds);for(let C=1;C<n.length-1;C++){const u=n[C-1].bounds,I={...n[C].bounds};I[l]=u[l]+u[i]+p,n[C].bounds=I,b.set(n[C].movable,I)}return b.set(n[n.length-1].movable,n[n.length-1].bounds),b};function jr(e){const{movables:t,movablesView:n,transactional:l,commands:a,target:i,onRepeatCommandChange:m}=e,h=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const p=r.useCallbackRef(async(M,P,f=null,F=!0)=>{const S=async()=>{const G=await Promise.resolve(h?.showBusy?.(M.label()));try{await P();const D=f??M?.label?.();if(m){let O=null;M&&D!==!1&&(O=new r.SimpleCommand(M.key(),i,{label:D,description:D},S)),m(O)}G?.(),F&&s.setMode(null)}catch(D){G?.(),h?.showError?.(D)}};await S()},[m,h]),[b,C]=o.useReducer(M=>M+1,0),u=r.useCallbackRef((M,P,f)=>{if(!n)return;const F=n.getMovableSelection();if(F.length===0)return;let S="Drawings";if(F.length===1){const D=F[0];S=d.TextUtils.capitalize(D.getContent().getType())??"Drawing"}const G=`${M.label()} ${S}`;p(M,()=>{let D=null;l&&(D=l.beginCommit(G));const O=n.getMovableSelection();if(O.length===0)return;const $=f?.(O);for(let ue=0;ue<O.length;ue++){const U=O[ue];P(U,$)}D?.commit()})},[n,l]),[I,x]=o.useState(n.getMovableSelection()[0]??null),[A,z]=o.useState(!I||I?.isProtected()),H=o.useMemo(()=>[new r.Command("moveToFront",i,{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(){u(this,M=>{M.moveToFront()})}),new r.Command("moveForward",i,{label:"Bring Forward",description:"Move forward one layer in the z order.",icon:"DrawMoveForward",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveForward()})}),new r.Command("moveToBack",i,{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(){u(this,M=>{M.moveToBack()})}),new r.Command("moveBackward",i,{label:"Send Backward",description:"Move backwards one layer in the z order.",icon:"DrawMoveBackward",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveBackward()})}),new r.Command("toggleLockAspectRatio",i,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners.",icon:"DrawAspect"},function(){u(this,M=>{M.setLockAspectRatio(!M.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",i,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",i,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",i,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",i,{label:"Align Left",description:"Align the selected drawings to the left.",icon:"DrawAlignLeft"},function(){u(this,(M,P)=>{M.setBounds({x:P.x})},$t)}),new r.Command("formatDrawAlignCenter",i,{label:"Align Center",description:"Align the selected drawings vertically relative to each other.",icon:"DrawAlignCenter"},function(){u(this,(M,P)=>{M.setBounds({x:(P.width-M.getBounds().width)/2+P.x})},$t)}),new r.Command("formatDrawAlignRight",i,{label:"Align Right",description:"Align the selected drawings to the right.",icon:"DrawAlignRight"},function(){u(this,(M,P)=>{M.setBounds({x:P.width-M.getBounds().width+P.x})},$t)}),new r.Command("formatDrawAlignTop",i,{label:"Align Top",description:"Align the selected drawings to the top.",icon:"DrawAlignTop"},function(){u(this,(M,P)=>{M.setBounds({y:P.y})},$t)}),new r.Command("formatDrawAlignMiddle",i,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other.",icon:"DrawAlignMiddle"},function(){u(this,(M,P)=>{M.setBounds({y:(P.height-M.getBounds().height)/2+P.y})},$t)}),new r.Command("formatDrawAlignBottom",i,{label:"Align Bottom",description:"Align the selected drawings to the bottom.",icon:"DrawAlignBottom"},function(){u(this,(M,P)=>{M.setBounds({y:P.height-M.getBounds().height+P.y})},$t)}),new r.Command("formatDrawDistributeHorz",i,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each.",icon:"DrawDistributeHorz"},function(){u(this,(M,P)=>{M.setBounds(P.get(M))},M=>er(M))}),new r.Command("formatDrawDistributeVert",i,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each.",icon:"DrawDistributeVert"},function(){u(this,(M,P)=>{M.setBounds(P.get(M))},M=>er(M,!1))}),new r.Command("formatDrawFlipHorz",i,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",i,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",i,{label:"Group",description:"Group the selected drawings into a single drawing.",icon:"DrawGroup"}),new r.Command("formatDrawUngroup",i,{label:"Ungroup",description:"Break the group of a drawing into individual drawings.",icon:"DrawUngroup"}),new r.Command("formatDrawSwapShapes",i,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",i,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",i,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,I]);o.useEffect(()=>{},[s]);const B=o.useMemo(()=>{let M=null;return M=a?a.createChildGroup(i,"movable",!1):new r.CommandGroup(i,"movable"),M.addCommands(H,!0),M},[a,H]);return tt(I,{onAnyChange:()=>{B.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===d.IAnchored.Type.TwoCell}),B.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===d.IAnchored.Type.OneCell}),B.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),B.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),B.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:M=>{z(M.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const M=n.getMovableSelection()[0]??null;x(M),z(!M||M.isProtected()),C()}}),tt(t,{onCollectionChange:()=>{C()}}),o.useEffect(()=>{const M={disabled:A};B.getCommand("formatAnchorTypeTwoCell").update(M),B.getCommand("formatAnchorTypeOneCell").update(M),B.getCommand("formatAnchorTypeAbsolute").update(M),B.getCommand("toggleLockAspectRatio").update(M);const P=t.getCount(),f=n.getMovableSelection(),F=A||P<=1||f.length===0;let S={disabled:F},G=S;if(!F&&f.length===1){const $=f[0];$.getZIndex()===0&&(S={disabled:!0}),$.getZIndex()===P-1&&(G={disabled:!0})}B.getCommand("moveToFront").update(G),B.getCommand("moveForward").update(G),B.getCommand("moveToBack").update(S),B.getCommand("moveBackward").update(S);const D={disabled:A||f.length<=1};B.getCommand("formatDrawAlignLeft").update(D),B.getCommand("formatDrawAlignCenter").update(D),B.getCommand("formatDrawAlignRight").update(D),B.getCommand("formatDrawAlignTop").update(D),B.getCommand("formatDrawAlignMiddle").update(D),B.getCommand("formatDrawAlignBottom").update(D),B.getCommand("formatDrawFlipHorz").update(D),B.getCommand("formatDrawFlipVert").update(D),B.getCommand("formatDrawGroup").update(D),B.getCommand("formatDrawUngroup").update(D),B.getCommand("formatDrawSwapShapes").update(D),B.getCommand("formatDrawSwapShapesHorz").update(D),B.getCommand("formatDrawSwapShapesVert").update(D);const O={disabled:A||f.length<=2};B.getCommand("formatDrawDistributeHorz").update(O),B.getCommand("formatDrawDistributeVert").update(O)},[b,A,b]),B}const fi=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,description:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[C,{height:u,width:I}]=Ot();return c.jsx("div",{...p,ref:Xt([b,C]),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:i.getZoom(),display:"flex",position:"relative",filter:l?"blur(1px)":void 0,boxShadow:m?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),pi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,movableProps:a,renderMovable:i,commands:m,target:h,onRepeatCommandChange:s}=e,p=jr({movables:l.getMovables(),movablesView:l?.getView(),transactional:l,onRepeatCommandChange:s,commands:m,target:h});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const b=o.useMemo(()=>c.jsx(Pr,{ref:t,view:n,movables:l.getMovables(),disableResize:!l.getProtection().isObjectsAllowed(),disableDrag:!l.getProtection().isObjectsAllowed(),movablesView:l.getView(),transactional:l,renderMovable:i,...a,onFocus:()=>{p.activate(),a?.onFocus?.()}},"movable-area"),[l,a,m,p]);return b&&n?b:null})),vi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,gridStyle:a,getCellEditor:i,showProtectedError:m,setEditingCoords:h,commands:s}=e,p=r.useEditMode(),[b,C]=o.useState(null),[u,I]=o.useState(null),[x,A]=o.useState(null),[z,H]=o.useState(null),[B,M]=o.useState(null);o.useLayoutEffect(()=>{if(x===null)return H(null),void M(null);const k=()=>{const L=l.getRange(x).getCell(),ne=L.getStyle();let le,Re=ne.getFill()?.toCSS(a.body.darkMode);Re.background!=="none"&&Re.background!=="transparent"||(Re=l.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),Re.background!=="none"&&Re.background!=="transparent"||(Re={background:a.body.fill}),H({style:Re}),L&&!L.getFormula()&&(le=L?.getRenderHorizontalAlignment()),M(le??r.HorizontalAlignment.Left)};return k(),l.getRange(x).addListener(()=>{k()})},[l,x,a?.body]);const P=r.useCallbackRef(()=>{let k=u.editState.dirty??"";if(u.editState.dirty!==void 0){const L=d.TextUtils.clampString(k);try{const ne=u.sheet.getRange(u.coords),le=`Typing '${L}' into ${ne.toString()}`;return ne.setValue(k,{description:le,autoFit:!0}),A(null),I(null),p.setMode(null),h(null),!0}catch(ne){throw he.Notifier.error(new Error(`Unable to enter '${L}'.`,{cause:ne})),ne}}},[l,u]),f=r.useCallbackRef(k=>l.getRange(k).getCell().getExtrusions()??he.CoordUtils.cellToRange(k),[l]),F=r.useCallbackRef(k=>{let L=d.IRange.Orientation.Row,ne=!1;k!==d.IRange.Direction.Up&&k!==d.IRange.Direction.Down||(L=d.IRange.Orientation.Column),k!==d.IRange.Direction.Left&&k!==d.IRange.Direction.Up||(ne=!0),l.getSelection().traverse(L,ne)},[l]),S=o.useCallback((k,L)=>{if(i)return i(k,L);if(!l)return null;const{ref:ne,...le}=k;return c.jsx(Mr,{ref:ne,...le,sheet:l,bodyStyle:a?.body,activeCoords:L,commands:s,onChangeEdit:Re=>{const fe={sheet:l,coords:L,editState:Re};p.setMode(me=>({...me,description:fe.editState.editMode?"Edit":"Enter",args:{...me?.args,stateAndCoords:fe}}))},editState:u.editState})},[l,z,i,u,x]),{overlay:G,startEdit:D,submitEdit:O,cancelEdit:$,onKeyboardEventNative:ue,onPointerEventNative:U}=dt.useKeyboardEditorOverlay({view:n,activeCoords:b,getCellEditor:S,canEdit:()=>{const k=l.getProtection();if(k.isReadOnly())return!1;const L=k.isLocked();return L&&m(),!L},onBeforeStartEdit:k=>{const L=Tr(()=>l.getRange(k).getCell()),ne={sheet:l,coords:k,editState:Object.freeze(L)};p.setMode({key:"edit",args:{stateAndCoords:ne}}),I(ne)},onStartEdit:k=>{A(k),h(k)},onSubmitEdit:P,onCancelEdit:k=>{A(null),I(null),p.setMode(null),h(null)},onDoneEdit:k=>{p.setMode(null)},onNavigate:F,containerProps:z,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:l?.getSelection().getCoords().ranges?.length>1?1:2,alignment:B,getRangeCoords:f});tt(l.getSelection(),{onChange(k){C(l.getSelection().getCoords().cell)}});const V=r.useCallbackRef(k=>{U(k),x&&O()},[U,$,x]),R=o.useCallback(k=>{U(k)},[U]),K=o.useCallback(k=>{ue(k)},[ue]);return o.useEffect(()=>{const k=n?.getStage();if(k)return k.addEventListener("pointerdown",V),k.addEventListener("dblclick",R),k.addEventListener("keydown",K),()=>{k.removeEventListener("pointerdown",V),k.removeEventListener("dblclick",R),k.removeEventListener("keydown",K)}},[n?.getStage()]),o.useEffect(()=>{const k=p.getMode(),L=k?.key;L==="edit"||L==="enter"?u?k.args?.cancel?$():k.args?.submit?O():I(k.args?.stateAndCoords):D(k.args?.start):x&&$()},[p]),G(n,t)})),Or="white",Br="black",Ci=`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='${Br}' fill='${Or}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,yi=`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='${Br}' fill='${Or}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,wi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l}=e,[a,i]=o.useState(l.getTables().getCount()>0),[m,h]=o.useState(null),[s,p]=o.useState(null),[b,C]=o.useState(null),[u,I]=o.useState(null),x=r.useCallbackRef(()=>{if(l.getTables().getCount()>0){i(!0);const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)}else i(!1),h(null)},[l,n]),A=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const F=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:F});S.length===1&&S[0].select()},[n,l]),z=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const F=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:F});if(S.length===1){const G=S[0].getRange().getCoords(),D={colStart:G.colStart,rowStart:F.rowIndex,colEnd:G.colEnd,rowEnd:F.rowIndex};l.getRange(D).select()}},[n,l]),H=r.useCallbackRef(()=>{if(!a)return;const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)},[l,a,n]);tt(l?.getSelection(),{onChange(f){p(l.getSelection().getCoords().cell)}}),tt(b,{onAnyChange(f){x(),H()}}),tt(u,{onAnyChange(f){H()}}),tt(l,{onTablesChange(f){x(),H()},onInvalidated(f){x(),H()}});const B=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle(H,300),300),[]);o.useEffect(()=>{B()},[n]),o.useEffect(()=>{let f=null;if(m)for(let F=0;F<m.length&&!f;F++){const S=m[F],G=S.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,G)&&(f=S)}C(f)},[s,m]);const M=r.useCallbackRef(f=>{let F=null;if(m)for(let S=0;S<m.length;S++){const G=m[S],D=G.getRange().getCoords();let O=n.getRangeCoordsBounds(D);const $=n.getRelativePointFromClient(f.clientX,f.clientY),ue=$.x,U=$.y;if(ue>=O.x&&ue<=O.x+O.width&&U>=O.y&&U<=O.y+O.height){const V=n.getViewportSize();ue<=0||U<=0||ue>=V.width||U>=V.height||(F=G)}}I(F)},[n,m]);if(o.useEffect(()=>{const f=n?.getStage();if(f&&m)return f.addEventListener("mousemove",M),f.addEventListener("mouseleave",M),()=>{f.removeEventListener("mousemove",M),f.removeEventListener("mouseleave",M)}},[m,n?.getStage()]),!n||!m||m.length===0)return null;const P=[];for(let f=0;f<m.length;f++){const F=m[f];if(F.isClosed())continue;const S=F===u,G=F===b,D=F.getRange().getCoords(),O=n.getRangeCoordsBounds(D);let $;if(S||G){const ue=F.getStyle().getProperties(),U=ue.headerRow?.fill?.background??ue.wholeTable?.border?.top?.color?.toString();if(U&&l){const V=l.getStyles().parseColor(U);V&&($=V.toCSS())}$||($="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}P.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:Ci},onMouseDown:z},`table-select-row-${F.getName()}`)),P.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:yi},onMouseDown:A},`table-select-${F.getName()}`)),P.push(c.jsx(dt.Selection,{x:O.x,y:O.y,width:O.width,height:O.height,range:D,strokeWidth:G?.5:0,stroke:$??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:S?`${$} 0px 0px 1px 1px`:void 0}},`table-outline-${F.getName()}`))}return P})),bi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,animationTime:a=60}=e,[i,m]=o.useState(null),[h,s]=o.useState(null),p=o.useRef(null),b=r.useCallbackRef(()=>{const z=l.getSelectedCell(),H=z.getSpill()?.getCoords()??null;he.CoordUtils.isEqualRanges(H,i)||(s(H?{transition:i?"move":"in",bounds:n.getRangeCoordsBounds(H),coords:H}:{transition:"out",bounds:n.getRangeCoordsBounds(i),coords:i}),m(H))},[l,n,i]);o.useEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),h&&(p.current=setTimeout(()=>{s(null),p.current=null},a)),()=>{p.current&&(clearTimeout(p.current),p.current=null)}),[h,a]);const C=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle(b,80),80),[]);if(tt(l?.getSelection(),{onChange(z){C()}}),tt(l,{onSpillsChange(z){b()},onInvalidated(z){b()}}),!n||!i&&!h)return null;const u=l.getRange(i).getValue()instanceof d.FormulaError.Spill,I=[];let x=h?.bounds??n.getRangeCoordsBounds(i);if(h&&!he.CommonUtils.isEqualBounds(h.bounds,n.getRangeCoordsBounds(h.coords))&&s(null),x=n.toClipBounds(x,-10),!x)return;const A="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(dt.Selection,{x:x.x,y:x.y,width:x.width,height:x.height,range:i,strokeWidth:1,stroke:A,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:u?"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:`${A} 0px 0px 4px 0px`}},"spill-outline}")),I})),xi={position:"absolute",top:0,left:0,bottom:0,right:0},tr=(e,t)=>{const n={...e},l=t?.getNormal().getFont(),a=l?.toCSS(),i={text:{fontFamily:a?.fontFamily,fontSize:l?.getSize()}},m=n.body=he.CommonUtils.mergeContentful(e.body,i);return n.body=he.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},m),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,i),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,i),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelectAll,i),n},qi={fireOnModelChange:!1},nr={},Vr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:l=nr,headersStyle:a=nr,onSheetContextMenu:i,showColumnHeaders:m,columnHeaderProps:h,showRowHeaders:s,rowHeaderProps:p,showScrollbars:b=!0,scrollPaneProps:C,onViewportChange:u,commands:I,onRepeatCommandChange:x,onMoveCell:A,overlays:z,renderMovable:H,viewportComponent:B,onElementLoad:M,getCellEditor:P,onFocus:f,onBlur:F,style:S=r.ReactUtils.EmptyCssProperties,onShowTooltip:G,onShowColumnTooltip:D,onShowRowTooltip:O,onCloseTooltip:$,gridProps:ue,cellRenderProps:U,...V}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[R,K]=o.useReducer(Q=>Q+1,0),[k,{width:L,height:ne}]=Ot(),le=r.useCallbackRef(G,[G]),Re=r.useCallbackRef(D,[D]),fe=r.useCallbackRef(O,[O]),me=r.useCallbackRef($,[$]),ke=o.useRef(!1);o.useLayoutEffect(()=>{ke.current=!0},[n]);const We=n?.getStyles(),Fe=o.useMemo(()=>tr(l,We),[l,We]),Ve=o.useMemo(()=>tr(a,We),[a,We]),{body:ee={},buttonSurface:Y={}}=Fe,{header:ge={},headerSelect:De={},headerSelectAll:X={}}=Ve,_=o.useRef(null),[re,pe]=o.useState(()=>n?.getView()),se=(re?.getZoomScale()??100)/100,Ie=o.useMemo(()=>({vertical:re.isShowColumnGridlines()&&se>=.4,horizontal:re.isShowRowGridlines()&&se>=.4}),[re?.isShowColumnGridlines(),re?.isShowRowGridlines(),se]),ie=o.useMemo(()=>{if(re?.getGridLineColor())return{strokeDasharray:"1,1"}},[re?.getGridLineColor(),Fe]),we=m??re?.isShowColumnHeaders(),Me=s??re?.isShowRowHeaders(),[Se,je]=o.useState({width:0,height:0}),v=o.useMemo(()=>{let Q=40,be=20;const Ke=n?.getStyles().getNormal().getFont();if(Se.width>0&&Se.height>0){const Be=Ke?.toCSS()?.fontFamily??Fe.header.text.fontFamily,Ye=Ke?.getSize()??Fe.header.text.fontSize,Ge=d.IFont.getSharedMeasurer()(""+Se.height,Math.ceil(Ye*d.IFont.getDeviceScale()),Be);Q=Ge.width,be=Ge.lineHeight}return{width:Math.round(Q+5),height:Math.round(be+3)}},[Se,Fe?.header.text,n]),_e=Me?se*v.width:ge.edgeStrokeWidth,Oe=we?se*v.height:ge.edgeStrokeWidth,Qe=Math.max(L,(n?.getColumnHeaders().getDefaultSize()??v.width)+_e+1),ae=Math.max(ne,(n?.getRowHeaders().getDefaultSize()??v.height)+Oe+1),Te=o.useRef(new Map),Ne=o.useRef(null),Ae=()=>({getColOffset:Q=>n.getColumnHeaders().findOffset(Q),getColIndex:Q=>n.getColumnHeaders().findIndex(Q),getRowOffset:Q=>n.getRowHeaders().findOffset(Q),getRowIndex:Q=>n.getRowHeaders().findIndex(Q)}),[xe,N]=o.useState(()=>Ae()),[J,j]=o.useState(!1),[Z,qe]=o.useState(null),g=!0,T=Fe.selection?.strokeFill,q=o.useCallback(()=>Mt.current,[]),[y,w]=o.useState(),E=r.useCallbackRef(Q=>{w(Q);const be=n?n.getView():null;be&&be.setTopLeft(Q?{left:Q.left,top:Q.top}:null),u?.(Q)},[n,u]),W=o.useRef(null);o.useEffect(()=>{if(!y||!n)return;const Q=n.getRangeAtBounds({x:y.left,y:y.top,width:y.width,height:y.height});W.current?.(),W.current=Q.addListener(()=>{const be=Q.getCoords();_?.current?.invalidate(be)})},[y,n]);const[oe,ce]=o.useState(()=>n?.getView().getTopLeft()),de=r.useCallbackRef(Q=>{const be=he.CoordUtils.cellToRange(Q);if(n.isClosed())return be;const Ke=n.getRange(be,{ignoreHidden:!0}).getMerges();return Ke.length===0?be:Ke[0]},[n]),te=Q=>{if(!Q||Q.coords.colIndex===0&&Q.coords.rowIndex===0)return null;const be={};return Q.coords.colIndex>0&&(be[he.AnchorLocation.Left]={index:Q.coords.colIndex,scrollOffset:Q.topLeft.left}),Q.coords.rowIndex>0&&(be[he.AnchorLocation.Top]={index:Q.coords.rowIndex,scrollOffset:Q.topLeft.top}),be},[Ce,ve]=o.useState(()=>te(n.getView().getFreezePanes())),ye=r.useEditMode(),He=o.useCallback(()=>_.current,[]),Ee=r.useCallbackRef(Q=>{ye.setMode(be=>be?.key==="edit"?{...be,args:{...be.args}}:{key:"edit",args:{stateAndCoords:null,start:Q}})},[]),ze=r.useCallbackRef(()=>y,[y]),Le=Nr({sheet:n,commands:I,target:He,onRepeatCommandChange:x,bodyStyle:ee,onStartEdit:Ee,getViewport:ze}),[$e,Ue]=o.useState(n.getSelection().isEntire()),[et,Pe]=o.useState(re?.getMovableSelection().length>0),Xe=Z!==null||et,st=null,[bt,it]=o.useState(!1);o.useEffect(()=>{it(!1)},[n.getProtection()]);const Ze=r.useNotifier(),xt=r.useCallbackRef(()=>{bt||(it(!0),Ze.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}))},[Ze,bt]),ft=o.useMemo(()=>{const Q=ye.getMode();return Q?.cursor?Q.cursor:null},[st,ye]),[mt,pt]=o.useState(null),at=o.useRef(!1),[Qt,It]=o.useState([]),Dt=o.useRef(null),[zt,en]=o.useState(he.TypesUtils.EmptyTopLeft),[Et,wn]=o.useState(he.TypesUtils.EmptyTopLeft);o.useEffect(()=>{en({left:oe?.left,top:0})},[oe?.left]),o.useEffect(()=>{wn({left:0,top:oe?.top})},[oe?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{ve(te(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ce(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Pe(n.getView().getMovableSelection().length>0)}}),tt(n?.getSelection(),{onChange:()=>{Ue(n.getSelection().isEntire())}}),tt(n,{onViewChange(){pe(n.getView()),N(Ae())},onLayoutChange:()=>{const Q=n.getEntireRange();je({height:Q.getRowCount(),width:Q.getColumnCount()}),N(Ae())},onStyleChange:()=>{Nt()},onMovablesChange:()=>{},onInvalidated:()=>{Nt()}}),tt(n,{onRequestScrollIntoView:async(Q,be)=>{if(!be)return;const Ke={colIndex:be?.coords?.colStart,rowIndex:be?.coords?.rowStart};return await _.current?.scrollCellCoordsIntoView(Ke,be?.scroll),!0},onRequestFocus:()=>he.CommonUtils.whenFocus(Mt.current)},qi);const yt=o.useRef(!1),Vt=o.useMemo(()=>{const Q=he.CommonUtils.debounce(Be=>{requestAnimationFrame(()=>{at.current&&Re?.(Be)})},32),be=(Be,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:0,rowEnd:Se.height,colStart:Be,colEnd:Be})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getColOffset(Be)),ot=Ge.getBounds(),wt=Math.min(ot.x+ot.width,lt.getColOffset(Be+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===he.AnchorLocation.Left||Tt===he.AnchorLocation.Center||Tt===he.AnchorLocation.Right)){const lo=he.CommonUtils.roundAccurately(Ye*he.CommonUtils.getDPI(),0),Tn=he.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ye/se),2).toFixed(2),io="Width: "+(Ye?Tn+" ("+lo+" pixels)":"Hidden"),on=Yn.current.getGridElement().getRelativePointFromClient(0,0),Kt=0-on.y,In=0-on.y+Oe,ao=on.x-ot.x;Q({anchor:{x:rt-ao,y:Kt,width:wt-rt,height:In-Kt},display:io})}const Pt=[0,0,0,ot.height],to={style:{boxShadow:`0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:rt-1,y:0,width:1,height:ot.height},oo={style:{boxShadow:`-0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:wt-1,y:0,width:1,height:ot.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(dt.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Be,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,be(Be,Ye)},onResizeHeaders:(Be,Ye,Ge)=>{yt.current=!1,be(Be,Ye)},onResizeHeadersDown:(Be,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&be(Be,Ye)},360)},onResizeHeadersEnd:(Be,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},onResizeHeadersUp:Be=>{yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},...h}},[n,h,Oe,mt]),tn=o.useMemo(()=>{const Q=he.CommonUtils.debounce(Be=>{requestAnimationFrame(()=>{at.current&&fe?.(Be)})},32),be=(Be,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:Be,rowEnd:Be,colStart:0,colEnd:Se.width})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getRowOffset(Be)),ot=Ge.getBounds(),wt=Math.min(ot.y+ot.height,lt.getRowOffset(Be+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===he.AnchorLocation.Top||Tt===he.AnchorLocation.Center||Tt===he.AnchorLocation.Bottom)){const lo=Math.floor(10*he.CommonUtils.getDPI())/10,Tn=he.CommonUtils.roundAccurately(Ye*lo,0),io=he.CommonUtils.roundAccurately(Tn/se/(n?.getRowHeaders().getScaleFactor()*he.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ye?io+" ("+Tn+" pixels)":"Hidden"),Kt=Ut.current.getGridElement().getRelativePointFromClient(0,0),In=0-Kt.x,ao=0-Kt.x+_e,Tl=Kt.y-ot.y;Q({anchor:{x:In,y:rt-Tl,width:ao-In,height:wt-rt},display:on})}const Pt=[0,0,ot.width,0],to={style:{boxShadow:`0px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:0,y:rt-1,width:ot.width,height:1},oo={style:{boxShadow:`0px -0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:0,y:wt-1,width:ot.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(dt.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Be,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,be(Be,Ye)},onResizeHeaders:(Be,Ye,Ge)=>{yt.current=!1,be(Be,Ye)},onResizeHeadersDown:(Be,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&be(Be,Ye)},360)},onResizeHeadersEnd:(Be,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},onResizeHeadersUp:Be=>{yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},...p}},[n,p,_e]),Mt=r.useImperativeElement(t,()=>{const Q=Ke=>{n?.getView()&&n.getView().selectMovables([]),Ne.current=null,_?.current?.focus(Ke)},be=async(Ke=null)=>{if(Ke||(Ke=n?.getView().getMovableSelection()[0]),!Ke)return!1;const Be=Ke.getAnchorCoords();if(!Be)return!1;const Ye=_.current?.getViewFromCellCoords({colIndex:Be.colStart,rowIndex:Be.rowStart});if(!Ye)return!1;const Ge=Ye.getAnchor();n?.getView().getMovableSelection().indexOf(Ke)===-1&&n?.getView().selectMovables([Ke]);let lt=Te.current?.get(Ge);return lt?.current?(await lt.current.focusMovable(Ke),!0):(Ne.current={movable:Ke,anchor:Ge},!0)};return{getGridElement:()=>_.current,getRowHeaderElement:()=>Ut.current,getColumnHeaderElement:()=>Yn.current,rowHeaderHeight:()=>Oe,colHeaderWidth:()=>_e,startEdit:Ee,submitEdit:()=>{ye.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{ye.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:Z!==null,focus:Ke=>{n?.getView().getMovableSelection().length>0&&be()||Q(Ke)},focusSheet:Q,focusMovable:be,contains:Ke=>_?.current?.contains?.(Ke),invalidate:Nt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Nt=o.useCallback(Q=>{ke.current||(_?.current?.invalidate(Q),K?.())},[]);o.useEffect(()=>{Nt()},[Fe]);const bn=$e?X.edgeStrokeFill:ge.fill,nt=$e?De.fill:typeof Fe.headerHover=="function"?Fe.headerHover(ge)?.fill:ge.fill,xn=o.useMemo(()=>B?c.jsx("div",{className:gt("sheetxl-viewport-overlay",Hl),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:B}):c.jsx(c.Fragment,{}),[B]);let Ht=null;we&&Me&&(Ht=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Oe}px`,width:`${_e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:Q=>{let be=!Q.ctrlKey;Le?.getCommand("selectAll")?.execute(!be||Q.button!==0),Q.nativeEvent.which===r.MouseButtonCodes.Right?i?.({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:-1,colIndex:-1}):_.current?.focus()},children:[c.jsx("div",{style:{height:Oe-5+"px",width:Oe-5+"px",clipPath:`path('M${Oe-5} 0 L0 ${Oe-5} L${Oe-5} ${Oe-5} L${Oe-5} 0 Z')`,borderRight:`2px solid ${bn}`,borderBottom:`2px solid ${bn}`,background:`${nt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${Oe}px`,width:`${_e}px`,boxSizing:"border-box",borderRight:`solid 1px ${ge.strokeFill}`,borderBottom:`solid 1px ${ge.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:Q,_top:be})=>{},[]),ct=r.useCallbackRef(Q=>{if(!i)return;const be=_.current.getViewFromClient(Q.clientX,Q.clientY)?.getCellCoordsFromClient(Q.clientX,Q.clientY);be&&(i({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:be.rowIndex,colIndex:be.colIndex}),Q.stopPropagation(),Q.preventDefault())},[i]),vt=r.useCallbackRef(Q=>{if(!(!Q.shiftKey&&(Q.ctrlKey||Q.metaKey)))return;const{deltaY:be}=Q;return be>0?Le.getCommand("sheetZoomOut")?.execute():be<0&&Le.getCommand("sheetZoomIn")?.execute(),be===0},[Le]);o.useEffect(()=>{It(null),Dt.current=null,at.current=!1,pt(null);const Q=n?.getView().getTopLeft();nn(Q),_.current?.scrollTo(Q),ce(Q),pe(n.getView()),ve(te(n.getView().getFreezePanes())),N(Ae()),K()},[n?.getView()]);const qn=o.useCallback((Q,be)=>n.getRowHeaders().hiddenHeadersAt(Q,be),[n]),Sn=o.useCallback((Q,be)=>n.getColumnHeaders().hiddenHeadersAt(Q,be),[n]),Lt=r.useCallbackRef(Q=>{const be=Q.getVisibleRangeCoords();if(!be)return null;const Ke=[];return n.getRange(be).forEach((Be,Ye)=>{const Ge=Ye.getCoords(),lt=Ye.getCell();(rt=>{if(rt.isEmpty())return!1;const ot=rt.getSpans();if(ot.width>1||ot.height>1||rt.getStyle().hasVisibleStyling()||re.isShowFormulas()&&rt.getFormula()!==null)return!0;const wt=rt.getValue();return wt!==null&&!(!re.isShowZeros()&&wt===0&&rt.getType()===d.ScalarType.Number)})(lt)&&Ke.push({coords:Ge,value:lt,range:re.isShowFormulas()?null:lt.getExtrusions()})},{ignoreHidden:!0,includeMergeOverflow:!0}),Ke},[n,re.isShowZeros(),re.isShowFormulas(),Z]);o.useEffect(()=>{const Q=[];z&&Q.push(...z),mt&&Q.push(...mt),he.CommonUtils.isEqualArrays(Q,Dt.current)||(Dt.current=Q,It(Q))},[z,mt,Fe]);const Rn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:l?.body?.text?.fill??"black"}}),[Fe?.header?.edgeStrokeFill]),Xn=r.useCallbackRef(Q=>{Q.isDefaultPrevented()||Q.isPropagationStopped()||(Ne.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),kn=o.useMemo(()=>{const Q=ye.getMode();return Q?.key==="cut"||Q?.key==="copy"},[ye]),Mn=r.useCallbackRef(async Q=>{const be=ye.getMode();return Q.keyCode===r.KeyCodes.Escape&&be?(Q.preventDefault(),void ye.setMode(null)):Q.keyCode===r.KeyCodes.Enter&&kn?(Q.preventDefault(),await Le?.getCommand("paste")?.execute(),void ye.setMode(null)):void Le?.dispatchToFocusedCommand(Q)},[Le,ye]),Ut=o.useRef(null),wl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Oe+1}px`,width:`${_e+ge.edgeStrokeWidth}px`,minWidth:`${_e+ge.edgeStrokeWidth}px`,borderRight:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,height:`calc(100% - ${Oe}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Jo,{ref:Ut,sheetElement:Mt.current,gridRef:_,freezeStart:Ce?.[he.AnchorLocation.Top],oppositeSize:_e,containerWidth:_e,containerHeight:ae,sheetHeader:n.getRowHeaders(),gridStyle:Ve,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Et,onSheetContextMenu:i,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Oe+1}px`,width:`${_e+ge.edgeStrokeWidth}px`,minWidth:`${_e+ge.edgeStrokeWidth}px`,borderRight:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,height:`calc(100% - ${Oe}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[_e,Oe,ae,n,Et,Ce?.[he.AnchorLocation.Top],Fe,g,i,ge.fill,p]),Yn=o.useRef(null),bl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Oe+ge.edgeStrokeWidth}px`,minHeight:`${Oe+ge.edgeStrokeWidth}px`,borderBottom:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Jo,{ref:Yn,sheetElement:Mt.current,gridRef:_,freezeStart:Ce?.[he.AnchorLocation.Left],oppositeSize:Oe,containerWidth:Qe,containerHeight:Oe,sheetHeader:n.getColumnHeaders(),gridStyle:Ve,scrollPoint:zt,onSheetContextMenu:i,...Vt,style:{...Vt?.style,position:"relative",left:"0px",width:"100%",height:`${Oe+ge.edgeStrokeWidth}px`,minHeight:`${Oe+ge.edgeStrokeWidth}px`,borderBottom:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Oe,Qe,n,zt,Ce?.[he.AnchorLocation.Left],Fe,ge.fill,g,i,h]),xl=r.useCallbackRef(Q=>{const{value:be,key:Ke,...Be}=Q;let Ye=be,Ge=Z;if(!Ge||Ge.colIndex===Q.coords.colIndex&&Ge.rowIndex===Q.coords.rowIndex||(Ge=null),!Ye){const ot=Q.range;if(Ye=n.getRange({rowIndex:ot.rowStart,colIndex:ot.colStart}).getCell(),Ye.isEmpty())return null}let lt=null;Ye.getHyperlink()&&(lt=async ot=>{if(U?.onLinkMouseDown?.(ot),ot.button===0&&!ot.isDefaultPrevented()){ot.stopPropagation(),ot.preventDefault();try{await Ye.getHyperlink()?.open()}catch(wt){Ze.showError?.(wt)}}}),Ge&&Ge.colIndex===Q.range.colStart&&Ge.rowIndex===Q.range.rowStart&&(Ye=Ye.createTemporaryCell({value:null}));const rt=n.getStyles();return o.createElement(kr,{...Be,key:Ke,bodyStyle:ee,docTheme:rt.getTheme(),normalStyle:rt.getNormal(),showFormulas:re.isShowFormulas(),showZeros:re.isShowZeros(),onLinkMouseDown:lt,...U,value:Ye})},[n,xe,ee,Z,re?.isShowFormulas(),re.isShowZeros()]),ql=o.useCallback((Q,be)=>{const{key:Ke,...Be}=Q;return[c.jsx(Xl,{ref:be,getVisibleCells:Lt,sheet:n,gridStyle:Fe,...Be},`border-${Ke}`),c.jsx(wi,{ref:be,sheet:n,commands:Le,...Be},`table-${Ke}`),c.jsx(bi,{ref:be,sheet:n,...Be},`spill-${Ke}`),c.jsx(ui,{ref:be,sheet:n,commands:Le,onShowTooltip:le,onCloseTooltip:me,gridStyle:Fe,gridRef:_,editingCoords:Z,isActive:g,...Be},`selection-${Ke}`),c.jsx(ri,{ref:be,sheet:n,commands:Le,gridStyle:Fe,element:q,...Be},`copy-paste-${Ke}`),c.jsx(pi,{ref:be,sheet:n,commands:Le,target:He,renderMovable:H,movableProps:{onUnFocus:()=>{Mt.current.focus()}},...Be},`movable-${Ke}`),c.jsx(vi,{ref:be,sheet:n,commands:Le,gridStyle:Fe,getCellEditor:P,showProtectedError:xt,setEditingCoords:qe,...Be},`editor-${Ke}`)]},[n,_.current,Fe,P,Le,Ze]),[Lo,Sl]=o.useState(!1),Rl=o.useMemo(()=>{if(Qe===0||ae===0)return null;const Q=n.getStyles().getNormal(),be=Q.getFont(),Ke=Q.getFill(),Be=Q.getBorder(),Ye=Q.getFill().getType()===d.IFill.Type.None;let Ge=ie,lt=ie;const rt=(wt,Tt,Pt)=>Pt?{stroke:Be.getBottom().isNone()?"none":wt.getColor().toRGBA(ee.darkMode).toString(),...Tt}:Tt;lt=rt(Be.getBottom(),lt,!Be.getBottom().isNone()),lt=rt(Be.getTop(),lt,!Be.getTop().isNone()),Ge=rt(Be.getRight(),Ge,!Be.getRight().isNone()),Ge=rt(Be.getLeft(),Ge,!Be.getLeft().isNone());let ot=re?.getGridLineColor()?.toRGBA(ee.darkMode).toString()??ee.strokeFill;return Ye||(lt=rt(Be.getBottom(),lt,!0),lt=rt(Be.getTop(),lt,!0),Ge=rt(Be.getRight(),Ge,!0),Ge=rt(Be.getLeft(),Ge,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...xi,...Ke.toCSS(ee.darkMode),...be.toCSS(ee.darkMode,se),"--sxl-app-color-background":ee.fill,"--sxl-app-color-shadow":Fe.colorShadow,"--sxl-app-color-grey":Fe.colorGrey,"--sxl-app-color-button-fill":Y.fill,"--sxl-app-color-button-text":Y.text?.fill,"--sxl-app-color-button-border":Y.edgeStrokeFill,"--sxl-app-color-primary-dark":Fe.selection.strokeFill},ref:_,zoom:se,...ue,onFirstRender:wt=>{Sl(!0),ue?.onFirstRender?.(wt),Le?.activate()},showGridLines:Ie,gridLineColor:ot,gridLineColumnsProps:Ge,gridLineRowsProps:lt,freezeLeft:Ce?.[he.AnchorLocation.Left],freezeLeftProps:Rn,freezeTop:Ce?.[he.AnchorLocation.Top],freezeTopProps:Rn,width:Qe,height:ae,columnCount:Se.width,rowCount:Se.height,cursor:ft??st??"cell",clipCells:!0,layout:xe,cellRenderer:xl,overlayRenderer:ql,getCellCoordsAsRangeCoords:de,hiddenRowsAt:qn,hiddenColumnsAt:Sn,getVisibleCells:Lt,onWheelScroll:vt,onPointerDown:Xn,onKeyDown:Mn,onViewportChange:E,onImmediateScroll:nn,scrollPoint:oe,stageProps:{onFocus:()=>{Le?.activate()}},overlays:Qt})},[R]);o.useEffect(()=>{ke.current||K()},[xe,Ce,se,Le,oe?.left,oe?.top,ee,ue,Qe,ae,ft,Qt,g,st]);let Jn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};b||(Jn={...Jn,...S});const kl=o.useMemo(()=>{const Q=n.getStyles().getTheme(),be=Q.getColorScheme(),Ke=Q.getFontScheme();return{"--sxl-doc-color-dk1":be.getDk1().toCSS(ee.darkMode),"--sxl-doc-color-dk2":be.getDk2().toCSS(ee.darkMode),"--sxl-doc-color-lt1":be.getLt1().toCSS(ee.darkMode),"--sxl-doc-color-lt2":be.getLt2().toCSS(ee.darkMode),"--sxl-doc-color-accent1":be.getAccent1().toCSS(ee.darkMode),"--sxl-doc-color-accent2":be.getAccent2().toCSS(ee.darkMode),"--sxl-doc-color-accent3":be.getAccent3().toCSS(ee.darkMode),"--sxl-doc-color-accent4":be.getAccent4().toCSS(ee.darkMode),"--sxl-doc-color-accent5":be.getAccent5().toCSS(ee.darkMode),"--sxl-doc-color-accent6":be.getAccent6().toCSS(ee.darkMode),"--sxl-doc-color-hlink":be.getHlink().toCSS(ee.darkMode),"--sxl-doc-color-fol-hlink":be.getFolHlink().toCSS(ee.darkMode),"--sxl-doc-font-major":Ke.getMajorFont(),"--sxl-doc-font-minor":Ke.getMinorFont()}},[n.getStyles().getTheme()]);let Qn=c.jsx("div",{style:Jn,onTouchStart:()=>{Po()},onFocus:Q=>{j(!0),f?.(Q)},onBlur:Q=>{j(!1),F?.(Q)},ref:Mt,...V,children:c.jsx("div",{className:gt("sheetxl-sheet",Vl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...kl},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Ht,wl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[bl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,backgroundColor:ee.fill},ref:k,onContextMenu:ct,children:[Rl,xn,c.jsx(Ul,{style:{position:"absolute",right:24,bottom:4},colorLicensee:Fe?.selection?.strokeFill,colorCredits:Fe?.body?.text?.fill})]})]})]})})});if(b){const Q=be=>c.jsx(Mo,{...be,sheet:n});Qn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${ge.fill}`,minHeight:2*v.height,minWidth:2*v.width,...S},viewport:y,touchElement:_.current?.stage,disableTouch:Xe,onScrollViewport:be=>{_.current?.scrollTo(be)},createHorizontalScrollbar:Q,createVerticalScrollbar:Q,...C,children:Qn})}o.useEffect(()=>{ke.current=!1,K?.(),J&&Mt.current?.focus()},[n]);const[eo,Ml]=o.useState(!1),Po=r.useCallbackRef(()=>{eo||Ml(!0)},[eo]);return o.useEffect(()=>{if(Lo)return typeof M=="function"&&M(),r.ReactUtils.detectIt().primaryInput==="touch"&&Po(),()=>{}},[M,Lo,eo]),Qn}));Vr.displayName="SheetElement";const Si=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),or="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=",Hr=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,style:a,picture:i,description:m,isDragging:h,view:s,onHide:p,onShow:b,onKeyDownCapture:C,onFocus:u,onBlur:I,loadingPanel:x,...A}=e,[z,H]=o.useState(!1),[B,M]=o.useState(null),[P,f]=o.useState(null),[F,S]=o.useState(null);o.useEffect(()=>{f(null),i.getDetails().then(O=>{H(!1),f(O.asUrl()),O.asSVGText?.()&&S(O.asSVGText())}).catch(O=>{console.warn(O),H(!0),f(or),S(null)})},[i]);const G=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),D=o.useMemo(()=>{if(P||F)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:B?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:P,onLoad:()=>{M(!0)},onError:({currentTarget:O})=>{console.log("error"),O.onerror=null,f(or),H(!0)},alt:m??`${i.getType()}`})},[B,i,P,F,h]);if(!i.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,...A,onKeyDownCapture:O=>{C?.(O)},ref:G,children:[B||z?void 0:x,D]})}));Hr.displayName="PictureEditor";const Ri=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,chart:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[C,{height:u,width:I}]=Ot();if(!a.isClosed())return c.jsx("div",{...p,ref:Xt([b,C]),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:i.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:l?"blur(1px)":void 0,boxShadow:m?"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()})})})})),ki="_editable-input_1bqx6_6",Mi=e=>c.jsx("input",{...e}),Ur=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:l,value:a="",onSubmit:i,onChange:m,onCancel:h,createInput:s=Mi,styleHover:p={},dragging:b,maxLength:C,disabled:u=!1,readOnly:I=!1,...x}=e,[A,z]=o.useState(!1),[H,B]=o.useState(!1),[M,P]=o.useState(a);o.useEffect(()=>{P(a)},[a]);const f=o.useRef(null),[F,S]=o.useState(null),G=r.useNotifier(),D=o.useCallback(function(K){const k=K.message;F!==k&&(G?.showMessage?.(k,{type:r.NotifierType.Error}),S(k))},[G,F]),O=o.useCallback(K=>{let k=!1;try{k=i?.(K)??!0}catch(L){D(L)}return k?(f.current=null,B(!1),P(K),k):(setTimeout(()=>{f.current?.focus()},0),k)},[i]),$=r.useCallbackRef(()=>{P(a),f.current=null,B(!1),h?.()},[h,a]),ue=o.useMemo(()=>{if(!H)return null;const K={className:gt(ki),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:C,type:"text",value:M,onFocus:k=>{f.current||(f.current=k.target,setTimeout(()=>{k.target?.select()},0))},onBlur:k=>{f.current&&O(M)},onChange:k=>{H&&P(k.target.value)},onMouseDown:k=>k.stopPropagation(),onKeyDown:k=>k.code==="Escape"?(k.preventDefault(),void $()):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(K)})},[H,M,O,$,s,u]),[U,V]=o.useState();o.useLayoutEffect(()=>{let K=Object.assign({},n);(b||A)&&(K=Object.assign(K,p)),V(K)},[b,A,p,n]),o.useEffect(()=>{ue&&m?.(M)},[ue,m,M]);const R=r.useImperativeElement(t,()=>({startEdit(){u||I||B(!0)},cancel(){$()}}),[]);return c.jsxs("div",{...x,ref:R,style:{flexDirection:"column",display:"flex",...U},className:gt(l),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{u||I||B(!0)},onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:H?0:1},children:M}),ue]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...p},children:M})]})})),$n=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Yt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function To(e){return"nodeType"in e}function Ct(e){var t,n;return e?Yt(e)?e:To(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Io(e){const{Document:t}=Ct(e);return e instanceof t}function vn(e){return!Yt(e)&&e instanceof Ct(e).HTMLElement}function Kr(e){return e instanceof Ct(e).SVGElement}function Zt(e){return e?Yt(e)?e.document:To(e)?Io(e)?e:vn(e)||Kr(e)?e.ownerDocument:document:document:document}const Rt=$n?o.useLayoutEffect:o.useEffect;function Wn(e){const t=o.useRef(e);return Rt(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,l=new Array(n),a=0;a<n;a++)l[a]=arguments[a];return t.current==null?void 0:t.current(...l)},[])}function mn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function cn(e,t){const n=o.useRef();return o.useMemo(()=>{const l=e(n.current);return n.current=l,l},[...t])}function jn(e){const t=Wn(e),n=o.useRef(null),l=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,l]}function On(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let uo={};function Cn(e,t){return o.useMemo(()=>{if(t)return t;const n=uo[e]==null?0:uo[e]+1;return uo[e]=n,e+"-"+n},[e,t])}function $r(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>{const h=Object.entries(m);for(const[s,p]of h){const b=i[s];b!=null&&(i[s]=b+e*p)}return i},{...t})}}const _t=$r(1),fn=$r(-1);function _n(e){if(!e)return!1;const{KeyboardEvent:t}=Ct(e.target);return t&&e instanceof t}function Bn(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=Ct(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 Bt=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[Bt.Translate.toString(e),Bt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:l}=e;return t+" "+n+"ms "+l}}}),rr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ti(e){return e.matches(rr)?e:e.querySelector(rr)}const Ii={display:"none"};function Ei(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Ii},n)}function Fi(e){let{id:t,announcement:n,ariaLiveType:l="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":l,"aria-atomic":!0},n)}const Wr=o.createContext(null),Ai={draggable:`
23
+ The content is not applied.`,icon:"PasteFormats"}),new r.Command("pasteFormulas",f,{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",f,{label:"Paste Transpose",scopedLabels:{paste:"Transpose"},description:"Paste with the rows and columns flipped.",icon:"PasteTranspose"}),new r.Command("pasteLinks",f,{label:"Paste Links",scopedLabels:{paste:"Links"},description:"Paste as formula references to the original cells.",icon:"PasteLinks"})];l.addCommands(F,!0)},[l,e]),o.useEffect(()=>{if(!l)return;const f={disabled:!t.getProtection().isFormatCellsAllowed()};l.getCommand("pasteValues").updateCallback(F=>M.paste({...Ql,...F})).update(f),l.getCommand("pasteFormats").updateCallback((F,S)=>M.paste({...ei,description:S.label(),...F})).update(f),l.getCommand("pasteFormulas").updateCallback((F,S)=>M.paste({...ti,description:S.label(),...F})).update(f),l.getCommand("pasteTranspose").updateCallback((F,S)=>M.paste({...ni,description:S.label(),...F})).update(f),l.getCommand("pasteLinks").updateCallback((F,S)=>M.paste({...oi,description:S.label(),...F})).update(f),l.getCommand("cut").update(f),l.getCommand("paste").update(f)},[t,l]);const P=o.useMemo(()=>{if(!A||!I.current)return;const f=A.key;if(f!=="copy"&&f!=="cut"&&f!=="formatPainter")return;const F=I.current.getItem();if(F.getSource()!==t)return;const S=I.current.isCut?.(),G=S?b:p,D=S?s:h,O=F.getCoords(),$=O?[O]:null;return $&&$.length!==0?ue=>{const U=[];for(let V=0;V<$.length;V++){const R=$[V],K=ue.toClipBounds(ue.getRangeCoordsBounds(R,{top:0,left:0,right:1,bottom:1}),dt.SELECTION_CLIP_INSETS);K&&(U.push(u({range:R,key:`copy-selection-background-${V}`,x:K.x,y:K.y,width:Math.max(K.width,0),height:Math.max(K.height,0),stroke:G,strokeWidth:2})),U.push(u({range:R,key:`copy-selection-foreground-${V}`,x:K.x+(K.width<=2?-1:0),y:K.y,width:Math.max(K.width,3),height:Math.max(K.height,3),stroke:D,strokeWidth:2,isAnimatedStroke:!0})))}return U}:null},[A,t,n,h,p,s,b]);return{...M,clipboard:B,overlays:P}},ri=o.memo(o.forwardRef((e,t)=>{const{view:n,element:l,sheet:a,gridStyle:i,commands:m}=e,h=i.body??{},s=a.getView(),{overlays:p}=Lr({element:l,sheet:a,sheetView:s,commands:m,copyForegroundColor:i.selection.strokeFill,copyBackgroundColor:h.fill,cutForegroundColor:i.selectionRemove.strokeFill,cutBackgroundColor:h.fill});return tt(a?.getSelection(),{onChange(b){}}),o.useEffect(()=>{n?.getStage()},[n?.getStage()]),p&&n?p(n):null})),li="_sheet-selection_12wyx_5",ii={key:"dragCut",description:"Drag selection to move cell contents.",cursor:"move"},ai={key:"dragCutInsert",description:"Drag selection to insert cell contents.",cursor:"copy"},si={key:"dragCopy",description:"Drag selection to copy cell contents."},ci={key:"dragCopyInsert",description:"Drag selection to insert copied cell contents.",cursor:"move"},Qo=(e,t)=>t.ctrlKey&&t.shiftKey?ci:t.ctrlKey?si:t.shiftKey?ai:ii,di={key:"fill",description:"Drag selection to extend series or fill.",cursor:"crosshair"},ui=o.memo(o.forwardRef((e,t)=>{const{view:n,commands:l,className:a,onFirstRender:i,onShowTooltip:m,onCloseTooltip:h,sheet:s,gridRef:p,gridStyle:b,isActive:C,editingCoords:u,...I}=e,x=n?.getBounds(),A=r.useCallbackRef(m,[m]),z=r.useCallbackRef(h,[h]),[H,B]=o.useState(()=>s?.getSelection().getCoords()),M=r.useCallbackRef(X=>{he.CoordUtils.isEqualSelectionCoords(X,H)||s&&s.getSelection().updateCoords(X)},[s,H]),P=r.useEditMode(),f=o.useRef(null),[F,S]=o.useState(s?.getProtection().isLocked()),[G,D]=o.useState(s?.getView().getMovableSelection().length>0),O=r.ReactUtils.detectIt().primaryInput==="touch",$=!O&&C,ue=u!==null||G,U=r.useCallbackRef(X=>{const _=he.CoordUtils.cellToRange(X);if(s.isClosed())return _;const re=s.getRange(_,{ignoreHidden:!0}).getMerges();return re.length===0?_:re[0]},[s]),V=r.useCallbackRef((X,_,re,pe,se,Ie)=>{const ie=s.getSelectedRange().getExtended(pe,X).getCoords();switch(pe){case d.IRange.Direction.Up:return ie.rowStart;case d.IRange.Direction.Down:return ie.rowEnd;case d.IRange.Direction.Left:return ie.colStart;case d.IRange.Direction.Right:return ie.colEnd}},[s]),R=r.useCallbackRef(()=>{const X=s.getUsedRange()?.getCoords(),_=s.getRowHeaders().getUsedRange()?.getCoords(),re=s.getColumnHeaders().getUsedRange()?.getCoords();return{...X,colEnd:Math.max(X?.colEnd??0,re?.max??0),rowEnd:Math.max(X?.rowEnd??0,_?.max??0)}},[s]),K=r.useCallbackRef((X,_)=>s.getRowHeaders().hiddenHeadersAt(X,_),[s]),k=r.useCallbackRef((X,_)=>s.getColumnHeaders().hiddenHeadersAt(X,_),[s]),L=r.useCallbackRef(X=>s.getRange(X,{ignoreHidden:!0}).getMerges(),[s]),ne=r.useCallbackRef(X=>{s?.getSelection().setAdjusting(X)},[s]),le=r.useCallbackRef(async()=>{s?.getSelection().setAdjusting(null),P.getMode()?.key==="formatPainter"&&(await l?.getCommand("pasteFormats")?.execute({}),P.setMode(null))},[P,H,s,l]),Re=o.useMemo(()=>{const X=P.getMode();return X?.key==="cut"||X?.key==="copy"},[P]);tt(s?.getView(),{onMovableSelectionChange:()=>{D(s.getView().getMovableSelection().length>0)}}),tt(s?.getSelection(),{onChange(X){const _=s.getSelection().getCoords();B(_)}}),tt(s,{onProtectionChange:()=>{S(s.getProtection().isLocked())}});const{body:fe={}}=b||{},me=r.useNotifier(),ke=n.getLayout(),We=!($&&H.ranges.length<=1&&u===null&&!F&&(!P.getMode()||Re)),{cursor:Fe,overlay:Ve,onPointerDown:ee}=dt.useSelection({gridRef:p,commands:l,layout:ke,getCellCoordsAsRangeCoords:U,selection:H,fillHandleBorderColor:fe.fill,selectionBackgroundColor:C?b.selection.fill:b.selectionInactive.fill,selectionBorderColor:C?b.selection.strokeFill:b.selectionInactive.strokeFill,selectionRemoveBackgroundColor:C?b.selectionRemove.fill:b.selectionInactive.fill,selectionRemoveBorderColor:C?b.selectionRemove.strokeFill:b.selectionInactive.strokeFill,disableFillDrag:We,disableMoveDrag:O||!(C&&H.ranges.length<=1&&u===null&&!F),disableTouchSelection:ue,onSelectionChange:M,onSelectionDragStart:ne,onSelectionDragEnd:le,onMoveDragStart:(X,_,re)=>{P.setMode(Qo(0,re))},onMoveDragUpdate:(X,_,re)=>{P.setMode(Qo(0,re))},onMoveDragEnd:(X,_)=>{P.setMode(null)},onMoveDragDone:async(X,_,re)=>{if(he.CoordUtils.isEqualRanges(X,_))return;const pe=s.getRange(_);if(me?.showOptions){const Me=pe.getDifferences(X);let Se=!1;const je=Me.getCount();for(let v=0;!Se&&v<je;v++)Se=Me.at(v).isContentful();if(Se&&await me?.showOptions({title:"Confirm",description:"There is already data here. Do you want to replace it?",options:["Replace","Cancel"],defaultOption:"Replace"})!=="Replace")return}const se=!re.ctrlKey,Ie=re.shiftKey,ie=Ie?se?"Insert Moved Cells":"Insert Copied Cells":se?"Move Cells":"Copy Cells",we=await me?.showBusy?.(ie);try{const Me=s.getRange(X);await pe.doBatch(async()=>{Ie?await pe.insertFrom(X,{isCut:se,undoRange:Me}):await pe.copyFrom(X,{isCut:se,undoRange:Me}),Me.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0}),pe.autoFit({skipCustomSize:!0,orientations:d.IRange.Orientations.Row,minContent:!0})},{description:ie,autoSelect:!0})}catch(Me){me?.showError?.(Me)}finally{we?.()}},contentfulCellFinder:V,hiddenRowsAt:K,hiddenColumnsAt:k,mergedRanges:L,getDataCoords:R,canSelectionSpanMergedCells:X=>{const _=s.getRange(X);return _.isEntireColumns()||_.isEntireRows()},onFill:async(X,_)=>{const re="Auto Fill",pe=await me?.showBusy?.(re);try{await s.doBatch(()=>{s.getRange(X).autoFill(_),s.getRange(_).autoFit({orientations:d.IRange.Orientations.Row,skipCustomSize:!0,minContent:!0})},{description:re,autoSelect:!0})}catch(se){me?.showError?.(se)}finally{f.current=null,pe?.()}},onFillPreview:(X,_,re)=>{if(p.current&&A){P.setMode(di);try{f.current?.direction!==re&&(f.current=null,s.getRange(X).autoFill(_,{previewOnly:je=>{f.current={callback:je,direction:re}}}));const pe=f.current?.callback?.(_);if(!pe||pe.isEmpty())return;const se=pe.toText();if(!se)return;const Ie=he.CoordUtils.cellToRange(pe.getCoords()),ie=n.getRelativePointFromClient(0,0);let we=0,Me=0,Se=r.ToolTipPlacement.Bottom;if(re===d.IRange.Direction.Down){we=ke.getColOffset(Ie.colEnd+1)-ie.x;const je=ke.getRowOffset(Ie.rowEnd),v=ke.getRowOffset(Ie.rowEnd+1);Me=v-(v-je)/2-ie.y,Se=r.ToolTipPlacement.Right}else if(re===d.IRange.Direction.Right){Me=ke.getRowOffset(Ie.rowEnd+1)-ie.y;const je=ke.getColOffset(Ie.colEnd),v=ke.getColOffset(Ie.colEnd+1);we=v-(v-je)/2-ie.x,Se=r.ToolTipPlacement.Bottom}else if(re===d.IRange.Direction.Up){we=ke.getColOffset(Ie.colEnd+1)-ie.x;const je=ke.getRowOffset(Ie.rowStart),v=ke.getRowOffset(Ie.rowStart+1);Me=v-(v-je)/2-ie.y,Se=r.ToolTipPlacement.Right}else if(re===d.IRange.Direction.Left){Me=ke.getRowOffset(Ie.rowEnd+1)-ie.y;const je=ke.getColOffset(Ie.colStart),v=ke.getColOffset(Ie.colStart+1);we=v-(v-je)/2-ie.x,Se=r.ToolTipPlacement.Bottom}A({anchor:{x:we,y:Me},display:se,placement:Se})}catch(pe){me?.showError?.(pe)}}},onFillDone:()=>{f.current=null,P.setMode(null),z?.()}}),Y=r.useCallbackRef(X=>{ee(r.ReactUtils.createSyntheticEvent(X))},[ee,u]);o.useEffect(()=>{const X=n?.getStage();if(X)return X.addEventListener("pointerdown",Y),()=>{X.removeEventListener("pointerdown",Y)}},[n?.getStage()]);const ge=r.useImperativeElement(t,()=>({}),[]),De=o.useRef(null);return c.jsx("div",{className:gt(a,"sheet-selection",li),style:{position:"absolute",width:x?.width,height:x?.height,overflow:"hidden",pointerEvents:"none",willChange:"none"},ref:Xt([ge,De]),...I,children:Ve(n)})})),Fn=Object.freeze({x:0,y:0,width:0,height:0}),gi={fireOnModelChange:!1},hi=o.memo(o.forwardRef((e,t)=>{const{children:n,view:l,movable:a,onRefLoad:i,onRefUnload:m,onHide:h,onShow:s,onUnFocus:p,isDragging:b,updateFrameBounds:C,dragStart:u,style:I,disabled:x,renderMovable:A,...z}=e,[H,B]=o.useState(Fn),[M,P]=o.useState(null),[f,F]=o.useState(!1),S=o.useRef(null);o.useLayoutEffect(()=>{if(a.isClosed())return;const D=a.getBounds();if(!D)return;const O=l.toViewBounds(D);B(O??Fn),C(O??Fn)},[l?.getBounds()]),tt(a,{onBoundsChange:D=>{const O=D.getBounds();if(!O)return;const $=l.toViewBounds(O);B($??Fn),C($)},onSelectionChange:()=>{const D=he.CommonUtils.hasFocus(S.current,!0);!f&&!D||a.isSelected()||p()}}),tt(a,{onRequestFocus:()=>he.CommonUtils.whenFocus(S.current,!0)},gi),o.useEffect(()=>{const D=S.current;return i(D),()=>{m(D)}},[]);const G=o.useMemo(()=>{if(!H)return null;let{width:D,height:O}=H;return A({view:l,movable:a,disabled:x,isDragging:b,style:{position:"relative",left:0,top:0,width:D,height:O},onHide:h,onShow:s})},[l,a,H.width,H.height,x,b]);return c.jsx("div",{className:"movable",tabIndex:0,ref:Xt([S,t]),style:{display:"flex",alignItems:"stretch",justifyContent:"stretch",position:"absolute",maxWidth:"auto",maxHeight:"auto",minWidth:"auto",minHeight:"auto",left:H.x,top:H.y,width:H.width,height:H.height,...I},onMouseDown:async D=>{const O=D.shiftKey||D.ctrlKey,$=a.isSelected(),ue=D.currentTarget;O&&$?a.unselect():($&&!O||await a.select({addToSelection:O}),u(D.nativeEvent,ue),ue.focus())},onFocus:D=>{D.relatedTarget&&!M&&P(D.relatedTarget),F(!0)},onBlur:D=>{M&&!S?.current?.contains(D.relatedTarget)&&P(null),D.relatedTarget&&F(!1)},...z,children:G})})),mi="_movable-area_314c6_5",Pr=o.memo(o.forwardRef((e,t)=>{const{view:n,movables:l,movablesView:a,renderMovable:i,transactional:m,onUnFocus:h,onFocus:s,disabled:p=!1,disableDrag:b=!1,disableResize:C=!1,className:u,style:I,renderDirections:x=["nw","n","ne","w","e","sw","s","se"],onFirstRender:A,...z}=e,H=n.getBounds(),B=r.useCallbackRef(A,[A]),M=r.useCallbackRef(h,[h]),P=r.useCallbackRef(s,[s]),[f,F]=o.useState([]),[S,G]=o.useState(!1),[D,O]=o.useState(!1),$=o.useRef(!0),ue=o.useRef(new Map),U=o.useRef(new Map),V=o.useRef(new Map),R=o.useRef(new Map),K=o.useRef(new Map),k=o.useRef({onRequestFocus:ae=>(re(ae),null)}),L=o.useRef(null),ne=o.useRef(null),le=o.useRef(null),[Re,fe]=o.useReducer(ae=>ae+1,0);o.useLayoutEffect(()=>{fe()},[n,l]),tt(l,{onCollectionChange:()=>{const ae=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0}),Te=K.current;Te.forEach(Ae=>{Ae()}),Te.clear();const Ne=k.current;for(let Ae=0;Ae<ae.length;Ae++){const xe=ae[Ae];if(xe.isClosed())continue;const N=xe.addListeners(Ne);Te.set(xe,N)}fe()},onInvalidated:()=>{fe()}}),tt(a,{onMovableSelectionChange(ae){ke(),fe()}});const me=o.useCallback((ae,Te)=>{const Ne=V.current.get(ae);le.current&&(le.current.getTargets().forEach(Ae=>{if(Ae===Ne)return Ae.style.left=Te.x+"px",Ae.style.top=Te.y+"px",Ae.style.width=Te.width+"px",void(Ae.style.height=Te.height+"px")}),le.current.updateRect())},[]),ke=()=>{const ae=[],Te=a.getMovableSelection();Te.forEach(Ne=>{const Ae=V.current.get(Ne);Ae&&Te.indexOf(Ne)!==-1&&ae.push(Ae)}),F(Ne=>he.CommonUtils.isEqualArrays(Ne,ae)?Ne:ae)},We=o.useRef(null),Fe=o.useRef(null),Ve=o.useMemo(()=>(Fe.current||(Fe.current=new Promise(ae=>{We.current=ae})),Fe.current),[]),ee=o.useRef(null),Y=r.useCallbackRef(async(ae,Te)=>{ee.current=Te,await(async()=>!(!await Ve.then()||!le.current))()&&ee.current===Te&&le.current.dragStart(ae,Te)},[f]),[ge,De]=o.useState(!1),X=o.useRef(null),_=o.useRef(null),re=r.useCallbackRef(async(ae=null)=>{if(ae||(ae=a.getMovableSelection()[0]),!ae)return M?.(),!1;const Te=V.current.get(ae);Te?(await he.CommonUtils.whenFocus(Te),Te.focus(),_.current=Te,X.current=null):X.current=ae},[a]);o.useEffect(()=>{ge&&f.length>0&&_.current!==f[0]&&re(),$.current&&(B?.(),$.current=!1)},[f]);const pe=o.useMemo(()=>{const ae=l.getItems({address:n.getVisibleRangeCoords(),ignoreHidden:!0});if(ae.length===0&&ue.current.size===0)return null;const Te=(J,j,Z,qe=!0)=>{const g=J.isSelected(),T={tabIndex:Z,view:n,movable:J,onRefLoad:q=>{X.current===J&&(q.focus(),_.current=q,X.current=null),V.current.set(J,q),U.current.set(q,J),j.rendered=!0,ke()},onRefUnload:q=>{V.current.delete(J),U.current.delete(q),j.rendered=!1,ke()},onUnFocus:M,onHide:q=>{j.onHide=q},onShow:q=>{j.onShow=q},isDragging:g&&(D||S),disabled:p,renderMovable:i,updateFrameBounds:q=>{me(J,q)},dragStart:Y,onMouseUp:()=>{if(ee.current=null,ne.current){G(!1),O(!1);let q=!1;R.current?.forEach(y=>{he.CommonUtils.isEqualBounds(y.movable.getBounds(),y.startBounds)||(q=!0)}),q?Ie():ie()}},style:{opacity:qe?S&&g?.7:void 0:0,zIndex:S&&g?J.getZIndex()+ae.length:void 0,pointerEvents:qe?void 0:"none",cursor:D&&g?"grabbing":p||b?"initial":"move",boxShadow:!g||D&&!S?void 0:"1px 1px 2px 2px rgba(0,0,0,.15)"}};return c.jsx(hi,{...T},`movable-${J.getUUID()}`)},Ne=ue.current,Ae=new Map,xe=[];for(let J=0;J<ae.length;J++){const j=ae[J];if(j.isClosed())continue;let Z=Ne.get(j);Z||(Z={frame:null,shown:null,onShow:null,onHide:null,rendered:!1,doShow:(qe,g)=>{if(!g||g.shown===!0)return;g.shown=!0;const T=++g.visibilityRequestId;requestAnimationFrame(()=>{const q=ue.current.get(qe);q&&T===g.visibilityRequestId&&(g.onShow?.(qe),q.shown=!0)})},doHide:async(qe,g)=>{if(!g||g?.shown===!1)return;g.shown=!1;const T=++g.visibilityRequestId,q=await Promise.resolve(g.onHide?.(qe));T===g.visibilityRequestId&&q!==!1&&(g.shown=!1,ue.current.delete(qe),fe())},visibilityRequestId:0}),Z.frame=Te(j,Z,J,!0),xe.push(Z.frame),Z.doShow(j,Z),Ne.delete(j),Ae.set(j,Z)}const N=[];return a.getMovableSelection().forEach(J=>{const j=Ne.get(J);j&&(j.frame=Te(J,j,-1,!1),N.push(j.frame),Ne.delete(J),Ae.set(J,j))}),Ne.forEach((J,j)=>{J.frame=Te(j,J,-1,!1),N.push(J.frame),J.doHide(j,J),Ne.delete(j),Ae.set(j,J)}),ue.current=Ae,ke(),[...N,...xe]},[Re,n,i,p,b,C,S,D]),se=r.useCallbackRef((ae,Te)=>{const Ne=`${Te} ${f.length===1?d.TextUtils.capitalize(U.current?.get(f[0]).getContent().getType()):"Drawings"}`;ne.current&&(console.warn(`Transaction ${ne.current.getDescription()} is being replaced by ${Ne}`),ne.current.rollback(),ne.current=null),ne.current=m.beginCommit({description:Ne}),R.current.clear();for(let Ae=0;Ae<f.length;Ae++){const xe=f[Ae],N=U.current?.get(xe);N?R.current.set(xe,{movable:N,startBounds:n.toViewBounds(N.getBounds())}):console.warn("invalid element",N)}},[m,n,f]),Ie=o.useCallback(()=>{if(!ne.current)return;const ae=[];R.current?.forEach(Te=>{ae.push(Te.movable)}),ne.current.commit({viewAfter:{view:a,movableSelection:ae}}),R.current.clear(),ne.current=null},[]),ie=o.useCallback(()=>{ne.current&&(ne.current.rollback(),ne.current=null)},[]),we=o.useRef(null);o.useEffect(()=>{we.current&&(we.current.onscroll=ae=>{ae.preventDefault(),ae.srcElement.scrollTop=0,ae.srcElement.scrollLeft=0})},[we.current]);const Me=r.useImperativeElement(t,()=>({isMovableArea:()=>!0,focusMovable:re,focus:()=>{re()}}),[a]),[Se,je]=o.useState(null),v=o.useRef(!1),_e=o.useRef(!1),Oe=o.useRef(!1);o.useEffect(()=>{if(p||f.length===0||Oe.current||v.current)return;if(_e.current)return void requestAnimationFrame(()=>{le.current&&L.current&&le.current.refTargets.length>0&&(Oe.current=!0,We.current?.(!0)),F([...f])});v.current=!0;const ae=o.lazy(async()=>{try{const Te=await Promise.resolve().then(()=>require("./QskIkt0VHXcDIdTP.cjs"));return v.current=!1,_e.current=!0,F([...f]),Te}catch(Te){return console.warn(Te),We.current?.(!1),null}});je(ae)},[f,p,b,C]);const Qe=o.useMemo(()=>!Se||p?null:c.jsx(o.Suspense,{children:c.jsx(Se,{className:gt({dragging:S||D,resizing:S,moving:D}),container:null,ref:le,target:le.current?f:[],draggable:!p&&!b,resizable:!p&&!C,individualGroupable:!0,edgeDraggable:!1,throttleDrag:2,throttleResize:2,origin:!1,keepRatio:!1,renderDirections:x,onResizeStart:ae=>{se(ae.target,"Resize")},onResize:ae=>{if(!ne.current)return ae.stopDrag(),void fe();G(!0);const Te=ae.direction[0]!==0&&ae.direction[1]!==0;let Ne=0,Ae=0;for(let xe=0;xe<f.length;xe++){const N=f[xe],J=R.current.get(N),j=U.current.get(N);if(!J||!j){console.warn("invalid element");continue}let Z=ae.dist[0],qe=ae.dist[1],g=ae.drag.dist[0],T=ae.drag.dist[1],q=J.startBounds.width,y=J.startBounds.height;xe===0?(Ne=q,Ae=y):(Z*=q/Ne,g*=q/Ne,qe*=y/Ae,T*=y/Ae);const w={...J.startBounds};if(w.width=Math.max(0,q+Z),w.height=Math.max(0,y+qe),ae.direction[0]===-1&&(w.width=Math.max(0,Math.min(J.startBounds.x+q,q-g))),ae.direction[1]===-1&&(w.height=Math.max(0,Math.min(J.startBounds.y+y,y-T))),Te&&(j.isLockAspectRatio()||ae.inputEvent?.shiftKey)){const E=q/y,W=w.width/w.height;W>E?w.height=w.width/E:W<E&&(w.width=w.height*E)}ae.direction[0]===-1&&(w.x=Math.max(0,Math.min(J.startBounds.x+q,J.startBounds.x+q-w.width))),ae.direction[1]===-1&&(w.y=Math.min(J.startBounds.y+y,J.startBounds.y+y-w.height)),J.movable.setBounds(n.toAbsoluteBounds(w))}},onResizeEnd:ae=>{G(!1),Ie()},onDragStart:ae=>{se(ae.target,"Move")},onDrag:ae=>{if(!ne.current)return ae.stopDrag(),void fe();O(!0);for(let Te=0;Te<f.length;Te++){const Ne=f[Te],Ae=R.current.get(Ne);Ae?Ae.movable.setBounds(n.toAbsoluteBounds({...Ae.startBounds,x:Ae.startBounds.x+ae.translate[0],y:Ae.startBounds.y+ae.translate[1]})):console.warn("invalid element")}},onDragEnd:ae=>{},onMouseUp:ae=>{}})}),[Re,Se,f,n,p,b,C,S,D]);return c.jsx("div",{className:gt(u,"movable-area",mi),style:{width:H.width,height:H.height,...I,position:"absolute",overflow:"hidden",willChange:"transform"},ref:Xt([Me,we]),...z,children:c.jsx("div",{className:"movable-scroll",style:{position:"absolute",cursor:"initial",left:0,top:0,width:H.width,height:H.height},...z,children:c.jsxs("div",{ref:L,style:{position:"absolute",pointerEvents:"auto"},onFocus:ae=>{P?.(),De(!0)},onBlur:ae=>{De(!1)},onKeyDownCapture:ae=>{if(ae.isDefaultPrevented())return;const Te=ae.nativeEvent.ctrlKey,Ne=ae.nativeEvent.altKey,Ae=ae.nativeEvent.shiftKey;if(ae.which===r.KeyCodes.Escape){const Z=a.getMovableSelection();let qe=[...Z];return f.forEach(g=>{if(qe.length===0)return;const T=U.current.get(g);let q=qe.indexOf(T);qe.splice(q,1)}),qe.length!==Z.length&&a.selectMovables(qe),qe.length===0&&M?.(),void ae.preventDefault()}const xe=.1,N=Z=>{l.updateSelected(qe=>{qe.setRotation(qe.getRotation()+Z)},"Rotate")},J=(Z,qe=!0)=>{l.updateSelected(g=>{const T=g.getBounds();let q=1+Z;qe||(q=1/q);const y=Math.sqrt(Math.pow(T.width,2)+Math.pow(T.height,2)),w=Math.atan2(T.height,T.width),E=q*y;if(E<10)return;const W=E*Math.cos(w),oe=E*Math.sin(w),ce={x:T.x+(T.width-W)/2,y:T.y+(T.height-oe)/2,width:W,height:oe};g.setBounds(ce)},"Resize")},j=Z=>{l.updateSelected(qe=>{const g=qe.getBounds(),T={x:g.x+(Z.x??0),y:g.y+(Z.y??0),width:g.width+(Z.width??0),height:g.height+(Z.height??0)};qe.setBounds(T)},"Nudge")};if(ae.which===r.KeyCodes.Delete)l.updateSelected(Z=>{Z.delete()},"Delete"),ae.preventDefault();else if(ae.key==="a"&&Te){const Z=a.getMovableSelection();a.selectMovables(l.getItems(),!0),a.selectMovables(Z,!0),ae.preventDefault()}else ae.key==="ArrowLeft"?(Ae?J(xe,!1):Ne?N(-10):j({x:Te?-10:-1}),ae.preventDefault()):ae.key==="ArrowRight"?(Ae?J(xe,!0):Ne?N(10):j({x:Te?10:1}),ae.preventDefault()):ae.key==="ArrowUp"?(Ae?J(xe,!0):j({y:Te?-10:-1}),ae.preventDefault()):ae.key==="ArrowDown"&&(Ae?J(xe,!1):j({y:Te?10:1}),ae.preventDefault())},children:[pe,Qe]})})})})),$t=e=>{let t=Number.MAX_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER,l=0,a=0;for(let i=0;i<e.length;i++){const m=e[i].getBounds();t=Math.min(m.x,t),n=Math.min(m.y,n),l=Math.max(m.x+m.width,l),a=Math.max(m.y+m.height,a)}return{x:t,y:n,width:l-t,height:a-n}},er=(e,t=!0)=>{const n=[],l=t?"x":"y",a=t?"y":"x",i=t?"width":"height";let m=0,h=Number.MAX_SAFE_INTEGER,s=0;for(let C=0;C<e.length;C++){const u=e[C],I=u.getBounds();m+=I[i],h=Math.min(I[l],h),s=Math.max(I[l]+I[i],s),n.push({bounds:I,movable:u})}const p=(s-h-m)/(e.length-1);n.sort((C,u)=>{const I=C.bounds[l],x=u.bounds[l];return I!==x?I-x:C.bounds[a]-u.bounds[a]});const b=new Map;b.set(n[0].movable,n[0].bounds);for(let C=1;C<n.length-1;C++){const u=n[C-1].bounds,I={...n[C].bounds};I[l]=u[l]+u[i]+p,n[C].bounds=I,b.set(n[C].movable,I)}return b.set(n[n.length-1].movable,n[n.length-1].bounds),b};function jr(e){const{movables:t,movablesView:n,transactional:l,commands:a,target:i,onRepeatCommandChange:m}=e,h=r.useNotifier(),s=r.useEditMode();o.useRef(s.getMode()).current=s.getMode();const p=r.useCallbackRef(async(M,P,f=null,F=!0)=>{const S=async()=>{const G=await Promise.resolve(h?.showBusy?.(M.label()));try{await P();const D=f??M?.label?.();if(m){let O=null;M&&D!==!1&&(O=new r.SimpleCommand(M.key(),i,{label:D,description:D},S)),m(O)}G?.(),F&&s.setMode(null)}catch(D){G?.(),h?.showError?.(D)}};await S()},[m,h]),[b,C]=o.useReducer(M=>M+1,0),u=r.useCallbackRef((M,P,f)=>{if(!n)return;const F=n.getMovableSelection();if(F.length===0)return;let S="Drawings";if(F.length===1){const D=F[0];S=d.TextUtils.capitalize(D.getContent().getType())??"Drawing"}const G=`${M.label()} ${S}`;p(M,()=>{let D=null;l&&(D=l.beginCommit(G));const O=n.getMovableSelection();if(O.length===0)return;const $=f?.(O);for(let ue=0;ue<O.length;ue++){const U=O[ue];P(U,$)}D?.commit()})},[n,l]),[I,x]=o.useState(n.getMovableSelection()[0]??null),[A,z]=o.useState(!I||I?.isProtected()),H=o.useMemo(()=>[new r.Command("moveToFront",i,{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(){u(this,M=>{M.moveToFront()})}),new r.Command("moveForward",i,{label:"Bring Forward",description:"Move forward one layer in the z order.",icon:"DrawMoveForward",shortcut:{key:"BracketRight",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveForward()})}),new r.Command("moveToBack",i,{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(){u(this,M=>{M.moveToBack()})}),new r.Command("moveBackward",i,{label:"Send Backward",description:"Move backwards one layer in the z order.",icon:"DrawMoveBackward",shortcut:{key:"BracketLeft",modifiers:[r.KeyModifiers.Ctrl]}},function(){u(this,M=>{M.moveBackward()})}),new r.Command("toggleLockAspectRatio",i,{label:"Lock Aspect Ratio",description:"Toggle whether the aspect ratio should be maintained when resizing from corners.",icon:"DrawAspect"},function(){u(this,M=>{M.setLockAspectRatio(!M.isLockAspectRatio())})}),new r.Command("formatAnchorTypeTwoCell",i,{label:"Move and size with cells",description:"Set your drawing to move and resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.TwoCell)})}),new r.Command("formatAnchorTypeOneCell",i,{label:"Move but don't size with cells",description:"Set your drawing to only move when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.OneCell)})}),new r.Command("formatAnchorTypeAbsolute",i,{label:"Don't move or size with cells",description:"Set your drawing to never move or resize when underling sheet resizes.",icon:"DrawResize"},function(){u(this,M=>{M.setAnchorType(d.IAnchored.Type.Absolute)})}),new r.Command("formatDrawAlignLeft",i,{label:"Align Left",description:"Align the selected drawings to the left.",icon:"DrawAlignLeft"},function(){u(this,(M,P)=>{M.setBounds({x:P.x})},$t)}),new r.Command("formatDrawAlignCenter",i,{label:"Align Center",description:"Align the selected drawings vertically relative to each other.",icon:"DrawAlignCenter"},function(){u(this,(M,P)=>{M.setBounds({x:(P.width-M.getBounds().width)/2+P.x})},$t)}),new r.Command("formatDrawAlignRight",i,{label:"Align Right",description:"Align the selected drawings to the right.",icon:"DrawAlignRight"},function(){u(this,(M,P)=>{M.setBounds({x:P.width-M.getBounds().width+P.x})},$t)}),new r.Command("formatDrawAlignTop",i,{label:"Align Top",description:"Align the selected drawings to the top.",icon:"DrawAlignTop"},function(){u(this,(M,P)=>{M.setBounds({y:P.y})},$t)}),new r.Command("formatDrawAlignMiddle",i,{label:"Align Middle",description:"Align the selected drawings horizontally relative to each other.",icon:"DrawAlignMiddle"},function(){u(this,(M,P)=>{M.setBounds({y:(P.height-M.getBounds().height)/2+P.y})},$t)}),new r.Command("formatDrawAlignBottom",i,{label:"Align Bottom",description:"Align the selected drawings to the bottom.",icon:"DrawAlignBottom"},function(){u(this,(M,P)=>{M.setBounds({y:P.height-M.getBounds().height+P.y})},$t)}),new r.Command("formatDrawDistributeHorz",i,{label:"Distribute Horizontally",description:"Distribute the selected drawings horizontally with equal spacing between each.",icon:"DrawDistributeHorz"},function(){u(this,(M,P)=>{M.setBounds(P.get(M))},M=>er(M))}),new r.Command("formatDrawDistributeVert",i,{label:"Distribute Vertically",description:"Distribute the selected drawings vertically with equal spacing between each.",icon:"DrawDistributeVert"},function(){u(this,(M,P)=>{M.setBounds(P.get(M))},M=>er(M,!1))}),new r.Command("formatDrawFlipHorz",i,{label:"Flip Horizontally",description:"Flip the selected drawings horizontally."}),new r.Command("formatDrawFlipVert",i,{label:"Flip Vertically",description:"Flip the selected drawings vertically."}),new r.Command("formatDrawGroup",i,{label:"Group",description:"Group the selected drawings into a single drawing.",icon:"DrawGroup"}),new r.Command("formatDrawUngroup",i,{label:"Ungroup",description:"Break the group of a drawing into individual drawings.",icon:"DrawUngroup"}),new r.Command("formatDrawSwapShapes",i,{label:"Swap Shapes",description:"Swap the positions of the swap."}),new r.Command("formatDrawSwapShapesHorz",i,{label:"Swap Shapes Horizontally",description:"Swap the positions of the swap horizontally."}),new r.Command("formatDrawSwapShapesVert",i,{label:"Swap Shapes Vertically",description:"Swap the positions of the swap vertically."})],[n,I]);o.useEffect(()=>{},[s]);const B=o.useMemo(()=>{let M=null;return M=a?a.createChildGroup(i,"movable",!1):new r.CommandGroup(i,"movable"),M.addCommands(H,!0),M},[a,H]);return tt(I,{onAnyChange:()=>{B.getCommand("formatAnchorTypeTwoCell").update({state:I?.getAnchorType()===d.IAnchored.Type.TwoCell}),B.getCommand("formatAnchorTypeOneCell").update({state:I?.getAnchorType()===d.IAnchored.Type.OneCell}),B.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),B.getCommand("formatAnchorTypeAbsolute").update({state:I?.getAnchorType()===d.IAnchored.Type.Absolute}),B.getCommand("toggleLockAspectRatio").update({state:I?.isLockAspectRatio()})},onProtectedChange:M=>{z(M.isProtected())},onDelete:()=>{}}),tt(n,{onMovableSelectionChange:()=>{const M=n.getMovableSelection()[0]??null;x(M),z(!M||M.isProtected()),C()}}),tt(t,{onCollectionChange:()=>{C()}}),o.useEffect(()=>{const M={disabled:A};B.getCommand("formatAnchorTypeTwoCell").update(M),B.getCommand("formatAnchorTypeOneCell").update(M),B.getCommand("formatAnchorTypeAbsolute").update(M),B.getCommand("toggleLockAspectRatio").update(M);const P=t.getCount(),f=n.getMovableSelection(),F=A||P<=1||f.length===0;let S={disabled:F},G=S;if(!F&&f.length===1){const $=f[0];$.getZIndex()===0&&(S={disabled:!0}),$.getZIndex()===P-1&&(G={disabled:!0})}B.getCommand("moveToFront").update(G),B.getCommand("moveForward").update(G),B.getCommand("moveToBack").update(S),B.getCommand("moveBackward").update(S);const D={disabled:A||f.length<=1};B.getCommand("formatDrawAlignLeft").update(D),B.getCommand("formatDrawAlignCenter").update(D),B.getCommand("formatDrawAlignRight").update(D),B.getCommand("formatDrawAlignTop").update(D),B.getCommand("formatDrawAlignMiddle").update(D),B.getCommand("formatDrawAlignBottom").update(D),B.getCommand("formatDrawFlipHorz").update(D),B.getCommand("formatDrawFlipVert").update(D),B.getCommand("formatDrawGroup").update(D),B.getCommand("formatDrawUngroup").update(D),B.getCommand("formatDrawSwapShapes").update(D),B.getCommand("formatDrawSwapShapesHorz").update(D),B.getCommand("formatDrawSwapShapesVert").update(D);const O={disabled:A||f.length<=2};B.getCommand("formatDrawDistributeHorz").update(O),B.getCommand("formatDrawDistributeVert").update(O)},[b,A,b]),B}const fi=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,description:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isEmptyFrame:()=>!0}),[]),[C,{height:u,width:I}]=Ot();return c.jsx("div",{...p,ref:Xt([b,C]),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:i.getZoom(),display:"flex",position:"relative",filter:l?"blur(1px)":void 0,boxShadow:m?"1px 1px 2px var(--sxl-app-color-shadow, rgba(0,0,0,.15))":void 0},children:c.jsx("div",{style:{textAlign:"center"},children:a})})})})),pi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,movableProps:a,renderMovable:i,commands:m,target:h,onRepeatCommandChange:s}=e,p=jr({movables:l.getMovables(),movablesView:l?.getView(),transactional:l,onRepeatCommandChange:s,commands:m,target:h});o.useEffect(()=>{n?.getStage()},[n?.getStage()]);const b=o.useMemo(()=>c.jsx(Pr,{ref:t,view:n,movables:l.getMovables(),disableResize:!l.getProtection().isObjectsAllowed(),disableDrag:!l.getProtection().isObjectsAllowed(),movablesView:l.getView(),transactional:l,renderMovable:i,...a,onFocus:()=>{p.activate(),a?.onFocus?.()}},"movable-area"),[l,a,m,p]);return b&&n?b:null})),vi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,gridStyle:a,getCellEditor:i,showProtectedError:m,setEditingCoords:h,commands:s}=e,p=r.useEditMode(),[b,C]=o.useState(null),[u,I]=o.useState(null),[x,A]=o.useState(null),[z,H]=o.useState(null),[B,M]=o.useState(null);o.useLayoutEffect(()=>{if(x===null)return H(null),void M(null);const k=()=>{const L=l.getRange(x).getCell(),ne=L.getStyle();let le,Re=ne.getFill()?.toCSS(a.body.darkMode);Re.background!=="none"&&Re.background!=="transparent"||(Re=l.getStyles().getNormal().getFill().toCSS(a.body.darkMode)),Re.background!=="none"&&Re.background!=="transparent"||(Re={background:a.body.fill}),H({style:Re}),L&&!L.getFormula()&&(le=L?.getRenderHorizontalAlignment()),M(le??r.HorizontalAlignment.Left)};return k(),l.getRange(x).addListener(()=>{k()})},[l,x,a?.body]);const P=r.useCallbackRef(()=>{let k=u.editState.dirty??"";if(u.editState.dirty!==void 0){const L=d.TextUtils.clampString(k);try{const ne=u.sheet.getRange(u.coords),le=`Typing '${L}' into ${ne.toString()}`;return ne.setValue(k,{description:le,autoFit:!0}),A(null),I(null),p.setMode(null),h(null),!0}catch(ne){throw he.Notifier.error(new Error(`Unable to enter '${L}'.`,{cause:ne})),ne}}},[l,u]),f=r.useCallbackRef(k=>l.getRange(k).getCell().getExtrusions()??he.CoordUtils.cellToRange(k),[l]),F=r.useCallbackRef(k=>{let L=d.IRange.Orientation.Row,ne=!1;k!==d.IRange.Direction.Up&&k!==d.IRange.Direction.Down||(L=d.IRange.Orientation.Column),k!==d.IRange.Direction.Left&&k!==d.IRange.Direction.Up||(ne=!0),l.getSelection().traverse(L,ne)},[l]),S=o.useCallback((k,L)=>{if(i)return i(k,L);if(!l)return null;const{ref:ne,...le}=k;return c.jsx(Mr,{ref:ne,...le,sheet:l,bodyStyle:a?.body,activeCoords:L,commands:s,onChangeEdit:Re=>{const fe={sheet:l,coords:L,editState:Re};p.setMode(me=>({...me,description:fe.editState.editMode?"Edit":"Enter",args:{...me?.args,stateAndCoords:fe}}))},editState:u.editState})},[l,z,i,u,x]),{overlay:G,startEdit:D,submitEdit:O,cancelEdit:$,onKeyboardEventNative:ue,onPointerEventNative:U}=dt.useKeyboardEditorOverlay({view:n,activeCoords:b,getCellEditor:S,canEdit:()=>{const k=l.getProtection();if(k.isReadOnly())return!1;const L=k.isLocked();return L&&m(),!L},onBeforeStartEdit:k=>{const L=Tr(()=>l.getRange(k).getCell()),ne={sheet:l,coords:k,editState:Object.freeze(L)};p.setMode({key:"edit",args:{stateAndCoords:ne}}),I(ne)},onStartEdit:k=>{A(k),h(k)},onSubmitEdit:P,onCancelEdit:k=>{A(null),I(null),p.setMode(null),h(null)},onDoneEdit:k=>{p.setMode(null)},onNavigate:F,containerProps:z,borderStrokeFill:a.selection?.strokeFill,borderStrokeWidth:l?.getSelection().getCoords().ranges?.length>1?1:2,alignment:B,getRangeCoords:f});tt(l.getSelection(),{onChange(k){C(l.getSelection().getCoords().cell)}});const V=r.useCallbackRef(k=>{U(k),x&&O()},[U,$,x]),R=o.useCallback(k=>{U(k)},[U]),K=o.useCallback(k=>{ue(k)},[ue]);return o.useEffect(()=>{const k=n?.getStage();if(k)return k.addEventListener("pointerdown",V),k.addEventListener("dblclick",R),k.addEventListener("keydown",K),()=>{k.removeEventListener("pointerdown",V),k.removeEventListener("dblclick",R),k.removeEventListener("keydown",K)}},[n?.getStage()]),o.useEffect(()=>{const k=p.getMode(),L=k?.key;L==="edit"||L==="enter"?u?k.args?.cancel?$():k.args?.submit?O():I(k.args?.stateAndCoords):D(k.args?.start):x&&$()},[p]),G(n,t)})),Or="white",Br="black",Ci=`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='${Br}' fill='${Or}'/%3E%3C/g%3E%3C/svg%3E%0A") 15 8, pointer`,yi=`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='${Br}' fill='${Or}'/%3E%3C/g%3E%3C/svg%3E%0A") 12 12, pointer`,wi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l}=e,[a,i]=o.useState(l.getTables().getCount()>0),[m,h]=o.useState(null),[s,p]=o.useState(null),[b,C]=o.useState(null),[u,I]=o.useState(null),x=r.useCallbackRef(()=>{if(l.getTables().getCount()>0){i(!0);const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)}else i(!1),h(null)},[l,n]),A=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const F=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:F});S.length===1&&S[0].select()},[n,l]),z=r.useCallbackRef(f=>{f.preventDefault(),f.stopPropagation();const F=n.getCellCoordsFromClient(f.clientX,f.clientY),S=l.getTables().getItems({address:F});if(S.length===1){const G=S[0].getRange().getCoords(),D={colStart:G.colStart,rowStart:F.rowIndex,colEnd:G.colEnd,rowEnd:F.rowIndex};l.getRange(D).select()}},[n,l]),H=r.useCallbackRef(()=>{if(!a)return;const f=l.getTables().getItems({address:n.getVisibleRangeCoords()});h(f.length>0?f:null)},[l,a,n]);tt(l?.getSelection(),{onChange(f){p(l.getSelection().getCoords().cell)}}),tt(b,{onAnyChange(f){x(),H()}}),tt(u,{onAnyChange(f){H()}}),tt(l,{onTablesChange(f){x(),H()},onInvalidated(f){x(),H()}});const B=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle(H,300),300),[]);o.useEffect(()=>{B()},[n]),o.useEffect(()=>{let f=null;if(m)for(let F=0;F<m.length&&!f;F++){const S=m[F],G=S.getRange().getCoords();d.CoordUtils.isCellWithinRange(s,G)&&(f=S)}C(f)},[s,m]);const M=r.useCallbackRef(f=>{let F=null;if(m)for(let S=0;S<m.length;S++){const G=m[S],D=G.getRange().getCoords();let O=n.getRangeCoordsBounds(D);const $=n.getRelativePointFromClient(f.clientX,f.clientY),ue=$.x,U=$.y;if(ue>=O.x&&ue<=O.x+O.width&&U>=O.y&&U<=O.y+O.height){const V=n.getViewportSize();ue<=0||U<=0||ue>=V.width||U>=V.height||(F=G)}}I(F)},[n,m]);if(o.useEffect(()=>{const f=n?.getStage();if(f&&m)return f.addEventListener("mousemove",M),f.addEventListener("mouseleave",M),()=>{f.removeEventListener("mousemove",M),f.removeEventListener("mouseleave",M)}},[m,n?.getStage()]),!n||!m||m.length===0)return null;const P=[];for(let f=0;f<m.length;f++){const F=m[f];if(F.isClosed())continue;const S=F===u,G=F===b,D=F.getRange().getCoords(),O=n.getRangeCoordsBounds(D);let $;if(S||G){const ue=F.getStyle().getProperties(),U=ue.headerRow?.fill?.background??ue.wholeTable?.border?.top?.color?.toString();if(U&&l){const V=l.getStyles().parseColor(U);V&&($=V.toCSS())}$||($="var(--sxl-app-color-shadow, rgba(0,0,0,.15))")}P.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:Ci},onMouseDown:z},`table-select-row-${F.getName()}`)),P.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:yi},onMouseDown:A},`table-select-${F.getName()}`)),P.push(c.jsx(dt.Selection,{x:O.x,y:O.y,width:O.width,height:O.height,range:D,strokeWidth:G?.5:0,stroke:$??"var(--sxl-app-color-grey, grey)",style:{willChange:"box-shadow",transition:"box-shadow 80ms ease-in-out",boxShadow:S?`${$} 0px 0px 1px 1px`:void 0}},`table-outline-${F.getName()}`))}return P})),bi=o.memo(o.forwardRef((e,t)=>{const{view:n,sheet:l,animationTime:a=60}=e,[i,m]=o.useState(null),[h,s]=o.useState(null),p=o.useRef(null),b=r.useCallbackRef(()=>{const z=l.getSelectedCell(),H=z.getSpill()?.getCoords()??null;he.CoordUtils.isEqualRanges(H,i)||(s(H?{transition:i?"move":"in",bounds:n.getRangeCoordsBounds(H),coords:H}:{transition:"out",bounds:n.getRangeCoordsBounds(i),coords:i}),m(H))},[l,n,i]);o.useEffect(()=>(p.current&&(clearTimeout(p.current),p.current=null),h&&(p.current=setTimeout(()=>{s(null),p.current=null},a)),()=>{p.current&&(clearTimeout(p.current),p.current=null)}),[h,a]);const C=o.useMemo(()=>he.CommonUtils.debounce(he.CommonUtils.throttle(b,80),80),[]);if(tt(l?.getSelection(),{onChange(z){C()}}),tt(l,{onSpillsChange(z){b()},onInvalidated(z){b()}}),!n||!i&&!h)return null;const u=l.getRange(i).getValue()instanceof d.FormulaError.Spill,I=[];let x=h?.bounds??n.getRangeCoordsBounds(i);if(h&&!he.CommonUtils.isEqualBounds(h.bounds,n.getRangeCoordsBounds(h.coords))&&s(null),x=n.toClipBounds(x,-10),!x)return;const A="var(--sxl-app-color-primary-dark, rgba(0,0,0,.15))";return I.push(c.jsx(dt.Selection,{x:x.x,y:x.y,width:x.width,height:x.height,range:i,strokeWidth:1,stroke:A,style:{willChange:"transform, opacity, width, height, opacity, left, top",strokeDasharray:u?"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:`${A} 0px 0px 4px 0px`}},"spill-outline}")),I})),xi={position:"absolute",top:0,left:0,bottom:0,right:0},tr=(e,t)=>{const n={...e},l=t?.getNormal().getFont(),a=l?.toCSS(),i={text:{fontFamily:a?.fontFamily,fontSize:l?.getSize()}},m=n.body=he.CommonUtils.mergeContentful(e.body,i);return n.body=he.CommonUtils.mergeContentful({fill:"#fff",strokeFill:"#dad8d6",strokeWidth:.5,text:{fontWeight:"400",fontStyle:"normal",fill:"#040404"}},m),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,i),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,i),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelect,{},e.headerSelectAll),n.headerSelectAll=he.CommonUtils.mergeContentful(n.headerSelectAll,i),n},qi={fireOnModelChange:!1},nr={},Vr=o.memo(o.forwardRef((e,t)=>{const{sheet:n,gridStyle:l=nr,headersStyle:a=nr,onSheetContextMenu:i,showColumnHeaders:m,columnHeaderProps:h,showRowHeaders:s,rowHeaderProps:p,showScrollbars:b=!0,scrollPaneProps:C,onViewportChange:u,commands:I,onRepeatCommandChange:x,onMoveCell:A,overlays:z,renderMovable:H,viewportComponent:B,onElementLoad:M,getCellEditor:P,onFocus:f,onBlur:F,style:S=r.ReactUtils.EmptyCssProperties,onShowTooltip:G,onShowColumnTooltip:D,onShowRowTooltip:O,onCloseTooltip:$,gridProps:ue,cellRenderProps:U,...V}=e;if(o.useEffect(()=>{d.LicenseManager._validate(!0)},[]),!n)throw new Error("ISheet must be provided.");const[R,K]=o.useReducer(Q=>Q+1,0),[k,{width:L,height:ne}]=Ot(),le=r.useCallbackRef(G,[G]),Re=r.useCallbackRef(D,[D]),fe=r.useCallbackRef(O,[O]),me=r.useCallbackRef($,[$]),ke=o.useRef(!1);o.useLayoutEffect(()=>{ke.current=!0},[n]);const We=n?.getStyles(),Fe=o.useMemo(()=>tr(l,We),[l,We]),Ve=o.useMemo(()=>tr(a,We),[a,We]),{body:ee={},buttonSurface:Y={}}=Fe,{header:ge={},headerSelect:De={},headerSelectAll:X={}}=Ve,_=o.useRef(null),[re,pe]=o.useState(()=>n?.getView()),se=(re?.getZoomScale()??100)/100,Ie=o.useMemo(()=>({vertical:re.isShowColumnGridlines()&&se>=.4,horizontal:re.isShowRowGridlines()&&se>=.4}),[re?.isShowColumnGridlines(),re?.isShowRowGridlines(),se]),ie=o.useMemo(()=>{if(re?.getGridLineColor())return{strokeDasharray:"1,1"}},[re?.getGridLineColor(),Fe]),we=m??re?.isShowColumnHeaders(),Me=s??re?.isShowRowHeaders(),[Se,je]=o.useState({width:0,height:0}),v=o.useMemo(()=>{let Q=40,be=20;const Ke=n?.getStyles().getNormal().getFont();if(Se.width>0&&Se.height>0){const Be=Ke?.toCSS()?.fontFamily??Fe.header.text.fontFamily,Ye=Ke?.getSize()??Fe.header.text.fontSize,Ge=d.IFont.getSharedMeasurer()(""+Se.height,Math.ceil(Ye*d.IFont.getDeviceScale()),Be);Q=Ge.width,be=Ge.lineHeight}return{width:Math.round(Q+5),height:Math.round(be+3)}},[Se,Fe?.header.text,n]),_e=Me?se*v.width:ge.edgeStrokeWidth,Oe=we?se*v.height:ge.edgeStrokeWidth,Qe=Math.max(L,(n?.getColumnHeaders().getDefaultSize()??v.width)+_e+1),ae=Math.max(ne,(n?.getRowHeaders().getDefaultSize()??v.height)+Oe+1),Te=o.useRef(new Map),Ne=o.useRef(null),Ae=()=>({getColOffset:Q=>n.getColumnHeaders().findOffset(Q),getColIndex:Q=>n.getColumnHeaders().findIndex(Q),getRowOffset:Q=>n.getRowHeaders().findOffset(Q),getRowIndex:Q=>n.getRowHeaders().findIndex(Q)}),[xe,N]=o.useState(()=>Ae()),[J,j]=o.useState(!1),[Z,qe]=o.useState(null),g=!0,T=Fe.selection?.strokeFill,q=o.useCallback(()=>Mt.current,[]),[y,w]=o.useState(),E=r.useCallbackRef(Q=>{w(Q);const be=n?n.getView():null;be&&be.setTopLeft(Q?{left:Q.left,top:Q.top}:null),u?.(Q)},[n,u]),W=o.useRef(null);o.useEffect(()=>{if(!y||!n)return;const Q=n.getRangeAtBounds({x:y.left,y:y.top,width:y.width,height:y.height});W.current?.(),W.current=Q.addListener(()=>{const be=Q.getCoords();_?.current?.invalidate(be)})},[y,n]);const[oe,ce]=o.useState(()=>n?.getView().getTopLeft()),de=r.useCallbackRef(Q=>{const be=he.CoordUtils.cellToRange(Q);if(n.isClosed())return be;const Ke=n.getRange(be,{ignoreHidden:!0}).getMerges();return Ke.length===0?be:Ke[0]},[n]),te=Q=>{if(!Q||Q.coords.colIndex===0&&Q.coords.rowIndex===0)return null;const be={};return Q.coords.colIndex>0&&(be[he.AnchorLocation.Left]={index:Q.coords.colIndex,scrollOffset:Q.topLeft.left}),Q.coords.rowIndex>0&&(be[he.AnchorLocation.Top]={index:Q.coords.rowIndex,scrollOffset:Q.topLeft.top}),be},[Ce,ve]=o.useState(()=>te(n.getView().getFreezePanes())),ye=r.useEditMode(),He=o.useCallback(()=>_.current,[]),Ee=r.useCallbackRef(Q=>{ye.setMode(be=>be?.key==="edit"?{...be,args:{...be.args}}:{key:"edit",args:{stateAndCoords:null,start:Q}})},[]),ze=r.useCallbackRef(()=>y,[y]),Le=Nr({sheet:n,commands:I,target:He,onRepeatCommandChange:x,bodyStyle:ee,onStartEdit:Ee,getViewport:ze}),[$e,Ue]=o.useState(n.getSelection().isEntire()),[et,Pe]=o.useState(re?.getMovableSelection().length>0),Xe=Z!==null||et,st=null,[bt,it]=o.useState(!1);o.useEffect(()=>{it(!1)},[n.getProtection()]);const Ze=r.useNotifier(),xt=r.useCallbackRef(()=>{bt||(it(!0),Ze.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}))},[Ze,bt]),ft=o.useMemo(()=>{const Q=ye.getMode();return Q?.cursor?Q.cursor:null},[st,ye]),[mt,pt]=o.useState(null),at=o.useRef(!1),[Qt,It]=o.useState([]),Dt=o.useRef(null),[zt,en]=o.useState(he.TypesUtils.EmptyTopLeft),[Et,wn]=o.useState(he.TypesUtils.EmptyTopLeft);o.useEffect(()=>{en({left:oe?.left,top:0})},[oe?.left]),o.useEffect(()=>{wn({left:0,top:oe?.top})},[oe?.top]),tt(n?.getView(),{onFreezeSplitChange:()=>{ve(te(n.getView().getFreezePanes()))},onTopLeftChange:()=>{ce(n.getView().getTopLeft())},onMovableSelectionChange:()=>{Pe(n.getView().getMovableSelection().length>0)}}),tt(n?.getSelection(),{onChange:()=>{Ue(n.getSelection().isEntire())}}),tt(n,{onViewChange(){pe(n.getView()),N(Ae())},onLayoutChange:()=>{const Q=n.getEntireRange();je({height:Q.getRowCount(),width:Q.getColumnCount()}),N(Ae())},onStyleChange:()=>{Nt()},onMovablesChange:()=>{},onInvalidated:()=>{Nt()}}),tt(n,{onRequestScrollIntoView:async(Q,be)=>{if(!be)return;const Ke={colIndex:be?.coords?.colStart,rowIndex:be?.coords?.rowStart};return await _.current?.scrollCellCoordsIntoView(Ke,be?.scroll),!0},onRequestFocus:()=>he.CommonUtils.whenFocus(Mt.current)},qi);const yt=o.useRef(!1),Vt=o.useMemo(()=>{const Q=he.CommonUtils.debounce(Be=>{requestAnimationFrame(()=>{at.current&&Re?.(Be)})},32),be=(Be,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:0,rowEnd:Se.height,colStart:Be,colEnd:Be})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getColOffset(Be)),ot=Ge.getBounds(),wt=Math.min(ot.x+ot.width,lt.getColOffset(Be+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===he.AnchorLocation.Left||Tt===he.AnchorLocation.Center||Tt===he.AnchorLocation.Right)){const lo=he.CommonUtils.roundAccurately(Ye*he.CommonUtils.getDPI(),0),Tn=he.CommonUtils.roundAccurately(n?.getColumnWidthAsFontUnit(Ye/se),2).toFixed(2),io="Width: "+(Ye?Tn+" ("+lo+" pixels)":"Hidden"),on=Yn.current.getGridElement().getRelativePointFromClient(0,0),Kt=0-on.y,In=0-on.y+Oe,ao=on.x-ot.x;Q({anchor:{x:rt-ao,y:Kt,width:wt-rt,height:In-Kt},display:io})}const Pt=[0,0,0,ot.height],to={style:{boxShadow:`0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:rt-1,y:0,width:1,height:ot.height},oo={style:{boxShadow:`-0.5px 0px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:wt-1,y:0,width:1,height:ot.height};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(dt.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Be,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,be(Be,Ye)},onResizeHeaders:(Be,Ye,Ge)=>{yt.current=!1,be(Be,Ye)},onResizeHeadersDown:(Be,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&be(Be,Ye)},360)},onResizeHeadersEnd:(Be,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},onResizeHeadersUp:Be=>{yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},...h}},[n,h,Oe,mt]),tn=o.useMemo(()=>{const Q=he.CommonUtils.debounce(Be=>{requestAnimationFrame(()=>{at.current&&fe?.(Be)})},32),be=(Be,Ye)=>{at.current=!0,pt([Ge=>{if(!Ge.toClipBounds(Ge.getRangeCoordsBounds({rowStart:Be,rowEnd:Be,colStart:0,colEnd:Se.width})))return;const lt=Ge.getLayout(),rt=Math.max(0,lt.getRowOffset(Be)),ot=Ge.getBounds(),wt=Math.min(ot.y+ot.height,lt.getRowOffset(Be+1)),Tt=Ge.getAnchor();if(Ye!==null&&(Tt===he.AnchorLocation.Top||Tt===he.AnchorLocation.Center||Tt===he.AnchorLocation.Bottom)){const lo=Math.floor(10*he.CommonUtils.getDPI())/10,Tn=he.CommonUtils.roundAccurately(Ye*lo,0),io=he.CommonUtils.roundAccurately(Tn/se/(n?.getRowHeaders().getScaleFactor()*he.CommonUtils.getDPI()),2).toFixed(2),on="Height: "+(Ye?io+" ("+Tn+" pixels)":"Hidden"),Kt=Ut.current.getGridElement().getRelativePointFromClient(0,0),In=0-Kt.x,ao=0-Kt.x+_e,Tl=Kt.y-ot.y;Q({anchor:{x:In,y:rt-Tl,width:ao-In,height:wt-rt},display:on})}const Pt=[0,0,ot.width,0],to={style:{boxShadow:`0px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},no={x:0,y:rt-1,width:ot.width,height:1},oo={style:{boxShadow:`0px -0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:T}},ro={x:0,y:wt-1,width:ot.width,height:1};return c.jsxs(o.Fragment,{children:[c.jsx(dt.SVGLine,{linePoints:Pt,bounds:no,...to}),c.jsx(dt.SVGLine,{linePoints:Pt,bounds:ro,...oo})]},"resize-dividers")}])};let Ke=null;return{onResizeHeadersStart:(Be,Ye,Ge)=>{Ke=n.beginCommit(Ge),yt.current=!1,be(Be,Ye)},onResizeHeaders:(Be,Ye,Ge)=>{yt.current=!1,be(Be,Ye)},onResizeHeadersDown:(Be,Ye)=>{yt.current=!0,setTimeout(()=>{yt.current&&be(Be,Ye)},360)},onResizeHeadersEnd:(Be,Ye,Ge)=>{Ke?.commit({description:Ge}),Ke=null,yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},onResizeHeadersUp:Be=>{yt.current=!1,requestAnimationFrame(()=>me?.()),at.current=!1,pt(null)},...p}},[n,p,_e]),Mt=r.useImperativeElement(t,()=>{const Q=Ke=>{n?.getView()&&n.getView().selectMovables([]),Ne.current=null,_?.current?.focus(Ke)},be=async(Ke=null)=>{if(Ke||(Ke=n?.getView().getMovableSelection()[0]),!Ke)return!1;const Be=Ke.getAnchorCoords();if(!Be)return!1;const Ye=_.current?.getViewFromCellCoords({colIndex:Be.colStart,rowIndex:Be.rowStart});if(!Ye)return!1;const Ge=Ye.getAnchor();n?.getView().getMovableSelection().indexOf(Ke)===-1&&n?.getView().selectMovables([Ke]);let lt=Te.current?.get(Ge);return lt?.current?(await lt.current.focusMovable(Ke),!0):(Ne.current={movable:Ke,anchor:Ge},!0)};return{getGridElement:()=>_.current,getRowHeaderElement:()=>Ut.current,getColumnHeaderElement:()=>Yn.current,rowHeaderHeight:()=>Oe,colHeaderWidth:()=>_e,startEdit:Ee,submitEdit:()=>{ye.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,submit:!0}})},cancelEdit:()=>{ye.setMode(Ke=>Ke?.key!=="edit"?Ke:{key:"edit",args:{stateAndCoords:null,cancel:!0}})},isEditing:Z!==null,focus:Ke=>{n?.getView().getMovableSelection().length>0&&be()||Q(Ke)},focusSheet:Q,focusMovable:be,contains:Ke=>_?.current?.contains?.(Ke),invalidate:Nt,isSheetElement:()=>!0,getSheet:()=>n}},[n]),Nt=o.useCallback(Q=>{ke.current||(_?.current?.invalidate(Q),K?.())},[]);o.useEffect(()=>{Nt()},[Fe]);const bn=$e?X.edgeStrokeFill:ge.fill,nt=$e?De.fill:typeof Fe.headerHover=="function"?Fe.headerHover(ge)?.fill:ge.fill,xn=o.useMemo(()=>B?c.jsx("div",{className:gt("sheetxl-viewport-overlay",Hl),style:{width:"100%",height:"100%",boxSizing:"border-box",position:"absolute"},children:B}):c.jsx(c.Fragment,{}),[B]);let Ht=null;we&&Me&&(Ht=c.jsxs("div",{tabIndex:-1,className:"top-left-corner",style:{padding:"2 2",position:"absolute",height:`${Oe}px`,width:`${_e}px`,zIndex:1,boxSizing:"border-box",cursor:"cell"},onMouseDown:Q=>{let be=!Q.ctrlKey;Le?.getCommand("selectAll")?.execute(!be||Q.button!==0),Q.nativeEvent.which===r.MouseButtonCodes.Right?i?.({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:-1,colIndex:-1}):_.current?.focus()},children:[c.jsx("div",{style:{height:Oe-5+"px",width:Oe-5+"px",clipPath:`path('M${Oe-5} 0 L0 ${Oe-5} L${Oe-5} ${Oe-5} L${Oe-5} 0 Z')`,borderRight:`2px solid ${bn}`,borderBottom:`2px solid ${bn}`,background:`${nt}`,boxSizing:"border-box",position:"absolute",right:"2px",bottom:"2px"}}),c.jsx("div",{style:{position:"absolute",height:`${Oe}px`,width:`${_e}px`,boxSizing:"border-box",borderRight:`solid 1px ${ge.strokeFill}`,borderBottom:`solid 1px ${ge.strokeFill}`,right:"-1px",bottom:"-1px"}})]}));const nn=r.useCallbackRef(({_left:Q,_top:be})=>{},[]),ct=r.useCallbackRef(Q=>{if(!i)return;const be=_.current.getViewFromClient(Q.clientX,Q.clientY)?.getCellCoordsFromClient(Q.clientX,Q.clientY);be&&(i({originalEvent:Q,clientX:Q.clientX,clientY:Q.clientY,rowIndex:be.rowIndex,colIndex:be.colIndex}),Q.stopPropagation(),Q.preventDefault())},[i]),vt=r.useCallbackRef(Q=>{if(!(!Q.shiftKey&&(Q.ctrlKey||Q.metaKey)))return;const{deltaY:be}=Q;return be>0?Le.getCommand("sheetZoomOut")?.execute():be<0&&Le.getCommand("sheetZoomIn")?.execute(),be===0},[Le]);o.useEffect(()=>{It(null),Dt.current=null,at.current=!1,pt(null);const Q=n?.getView().getTopLeft();nn(Q),_.current?.scrollTo(Q),ce(Q),pe(n.getView()),ve(te(n.getView().getFreezePanes())),N(Ae()),K()},[n?.getView()]);const qn=o.useCallback((Q,be)=>n.getRowHeaders().hiddenHeadersAt(Q,be),[n]),Sn=o.useCallback((Q,be)=>n.getColumnHeaders().hiddenHeadersAt(Q,be),[n]),Lt=r.useCallbackRef(Q=>{const be=Q.getVisibleRangeCoords();if(!be)return null;const Ke=[];return n.getRange(be).forEach((Be,Ye)=>{const Ge=Ye.getCoords(),lt=Ye.getCell();(rt=>{if(rt.isEmpty())return!1;const ot=rt.getSpans();if(ot.width>1||ot.height>1||rt.getStyle().hasVisibleStyling()||re.isShowFormulas()&&rt.getFormula()!==null)return!0;const wt=rt.getValue();return wt!==null&&!(!re.isShowZeros()&&wt===0&&rt.getType()===d.ScalarType.Number)})(lt)&&Ke.push({coords:Ge,value:lt,range:re.isShowFormulas()?null:lt.getExtrusions()})},{ignoreHidden:!0,includeMergeOverflow:!0}),Ke},[n,re.isShowZeros(),re.isShowFormulas(),Z]);o.useEffect(()=>{const Q=[];z&&Q.push(...z),mt&&Q.push(...mt),he.CommonUtils.isEqualArrays(Q,Dt.current)||(Dt.current=Q,It(Q))},[z,mt,Fe]);const Rn=o.useMemo(()=>({style:{boxShadow:`0.5px 0.5px 0px 0px ${l?.body?.fill}`},pathProps:{stroke:l?.body?.text?.fill??"black"}}),[Fe?.header?.edgeStrokeFill]),Xn=r.useCallbackRef(Q=>{Q.isDefaultPrevented()||Q.isPropagationStopped()||(Ne.current=null,n?.getView().getMovableSelection().length>0&&n.getView().selectMovables([]))},[n]),kn=o.useMemo(()=>{const Q=ye.getMode();return Q?.key==="cut"||Q?.key==="copy"},[ye]),Mn=r.useCallbackRef(async Q=>{const be=ye.getMode();return Q.keyCode===r.KeyCodes.Escape&&be?(Q.preventDefault(),void ye.setMode(null)):Q.keyCode===r.KeyCodes.Enter&&kn?(Q.preventDefault(),await Le?.getCommand("paste")?.execute(),void ye.setMode(null)):void Le?.dispatchToFocusedCommand(Q)},[Le,ye]),Ut=o.useRef(null),wl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",flex:"0",top:`${Oe+1}px`,width:`${_e+ge.edgeStrokeWidth}px`,minWidth:`${_e+ge.edgeStrokeWidth}px`,borderRight:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,height:`calc(100% - ${Oe}px)`,boxSizing:"border-box",zIndex:"2"},children:c.jsx(Jo,{ref:Ut,sheetElement:Mt.current,gridRef:_,freezeStart:Ce?.[he.AnchorLocation.Top],oppositeSize:_e,containerWidth:_e,containerHeight:ae,sheetHeader:n.getRowHeaders(),gridStyle:Ve,verticalPadding:Math.max(0,Math.floor(n.getStyles().getNormal().getFont().getSize()/10)),scrollPoint:Et,onSheetContextMenu:i,tabIndex:-1,style:{position:"relative",flex:"0",top:`${Oe+1}px`,width:`${_e+ge.edgeStrokeWidth}px`,minWidth:`${_e+ge.edgeStrokeWidth}px`,borderRight:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,height:`calc(100% - ${Oe}px)`,boxSizing:"border-box",zIndex:"2",...tn?.style},...tn})}),[_e,Oe,ae,n,Et,Ce?.[he.AnchorLocation.Top],Fe,g,i,ge.fill,p]),Yn=o.useRef(null),bl=o.useMemo(()=>c.jsx("div",{tabIndex:-1,style:{position:"relative",left:"0px",width:"100%",height:`${Oe+ge.edgeStrokeWidth}px`,minHeight:`${Oe+ge.edgeStrokeWidth}px`,borderBottom:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"},children:c.jsx(Jo,{ref:Yn,sheetElement:Mt.current,gridRef:_,freezeStart:Ce?.[he.AnchorLocation.Left],oppositeSize:Oe,containerWidth:Qe,containerHeight:Oe,sheetHeader:n.getColumnHeaders(),gridStyle:Ve,scrollPoint:zt,onSheetContextMenu:i,...Vt,style:{...Vt?.style,position:"relative",left:"0px",width:"100%",height:`${Oe+ge.edgeStrokeWidth}px`,minHeight:`${Oe+ge.edgeStrokeWidth}px`,borderBottom:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,boxSizing:"border-box",zIndex:"1"}})}),[Oe,Qe,n,zt,Ce?.[he.AnchorLocation.Left],Fe,ge.fill,g,i,h]),xl=r.useCallbackRef(Q=>{const{value:be,key:Ke,...Be}=Q;let Ye=be,Ge=Z;if(!Ge||Ge.colIndex===Q.coords.colIndex&&Ge.rowIndex===Q.coords.rowIndex||(Ge=null),!Ye){const ot=Q.range;if(Ye=n.getRange({rowIndex:ot.rowStart,colIndex:ot.colStart}).getCell(),Ye.isEmpty())return null}let lt=null;Ye.getHyperlink()&&(lt=async ot=>{if(U?.onLinkMouseDown?.(ot),ot.button===0&&!ot.isDefaultPrevented()){ot.stopPropagation(),ot.preventDefault();try{await Ye.getHyperlink()?.open()}catch(wt){Ze.showError?.(wt)}}}),Ge&&Ge.colIndex===Q.range.colStart&&Ge.rowIndex===Q.range.rowStart&&(Ye=Ye.createTemporaryCell({value:null}));const rt=n.getStyles();return o.createElement(kr,{...Be,key:Ke,bodyStyle:ee,docTheme:rt.getTheme(),normalStyle:rt.getNormal(),showFormulas:re.isShowFormulas(),showZeros:re.isShowZeros(),onLinkMouseDown:lt,...U,value:Ye})},[n,xe,ee,Z,re?.isShowFormulas(),re.isShowZeros()]),ql=o.useCallback((Q,be)=>{const{key:Ke,...Be}=Q;return[c.jsx(Xl,{ref:be,getVisibleCells:Lt,sheet:n,gridStyle:Fe,...Be},`border-${Ke}`),c.jsx(wi,{ref:be,sheet:n,commands:Le,...Be},`table-${Ke}`),c.jsx(bi,{ref:be,sheet:n,...Be},`spill-${Ke}`),c.jsx(ui,{ref:be,sheet:n,commands:Le,onShowTooltip:le,onCloseTooltip:me,gridStyle:Fe,gridRef:_,editingCoords:Z,isActive:g,...Be},`selection-${Ke}`),c.jsx(ri,{ref:be,sheet:n,commands:Le,gridStyle:Fe,element:q,...Be},`copy-paste-${Ke}`),c.jsx(pi,{ref:be,sheet:n,commands:Le,target:He,renderMovable:H,movableProps:{onUnFocus:()=>{Mt.current.focus()}},...Be},`movable-${Ke}`),c.jsx(vi,{ref:be,sheet:n,commands:Le,gridStyle:Fe,getCellEditor:P,showProtectedError:xt,setEditingCoords:qe,...Be},`editor-${Ke}`)]},[n,_.current,Fe,P,Le,Ze]),[Lo,Sl]=o.useState(!1),Rl=o.useMemo(()=>{if(Qe===0||ae===0)return null;const Q=n.getStyles().getNormal(),be=Q.getFont(),Ke=Q.getFill(),Be=Q.getBorder(),Ye=Q.getFill().getType()===d.IFill.Type.None;let Ge=ie,lt=ie;const rt=(wt,Tt,Pt)=>Pt?{stroke:Be.getBottom().isNone()?"none":wt.getColor().toRGBA(ee.darkMode).toString(),...Tt}:Tt;lt=rt(Be.getBottom(),lt,!Be.getBottom().isNone()),lt=rt(Be.getTop(),lt,!Be.getTop().isNone()),Ge=rt(Be.getRight(),Ge,!Be.getRight().isNone()),Ge=rt(Be.getLeft(),Ge,!Be.getLeft().isNone());let ot=re?.getGridLineColor()?.toRGBA(ee.darkMode).toString()??ee.strokeFill;return Ye||(lt=rt(Be.getBottom(),lt,!0),lt=rt(Be.getTop(),lt,!0),Ge=rt(Be.getRight(),Ge,!0),Ge=rt(Be.getLeft(),Ge,!0)),c.jsx(dt.Grid,{className:"sheetxl-sheet-primary",style:{...xi,...Ke.toCSS(ee.darkMode),...be.toCSS(ee.darkMode,se),"--sxl-app-color-background":ee.fill,"--sxl-app-color-shadow":Fe.colorShadow,"--sxl-app-color-grey":Fe.colorGrey,"--sxl-app-color-button-fill":Y.fill,"--sxl-app-color-button-text":Y.text?.fill,"--sxl-app-color-button-border":Y.edgeStrokeFill,"--sxl-app-color-primary-dark":Fe.selection.strokeFill},ref:_,zoom:se,...ue,onFirstRender:wt=>{Sl(!0),ue?.onFirstRender?.(wt),Le?.activate()},showGridLines:Ie,gridLineColor:ot,gridLineColumnsProps:Ge,gridLineRowsProps:lt,freezeLeft:Ce?.[he.AnchorLocation.Left],freezeLeftProps:Rn,freezeTop:Ce?.[he.AnchorLocation.Top],freezeTopProps:Rn,width:Qe,height:ae,columnCount:Se.width,rowCount:Se.height,cursor:ft??st??"cell",clipCells:!0,layout:xe,cellRenderer:xl,overlayRenderer:ql,getCellCoordsAsRangeCoords:de,hiddenRowsAt:qn,hiddenColumnsAt:Sn,getVisibleCells:Lt,onWheelScroll:vt,onPointerDown:Xn,onKeyDown:Mn,onViewportChange:E,onImmediateScroll:nn,scrollPoint:oe,stageProps:{onFocus:()=>{Le?.activate()}},overlays:Qt})},[R]);o.useEffect(()=>{ke.current||K()},[xe,Ce,se,Le,oe?.left,oe?.top,ee,ue,Qe,ae,ft,Qt,g,st]);let Jn={flex:"1 1 100%",display:"flex",alignContent:"stretch",position:"relative"};b||(Jn={...Jn,...S});const kl=o.useMemo(()=>{const Q=n.getStyles().getTheme(),be=Q.getColorScheme(),Ke=Q.getFontScheme();return{"--sxl-doc-color-dk1":be.getDk1().toCSS(ee.darkMode),"--sxl-doc-color-dk2":be.getDk2().toCSS(ee.darkMode),"--sxl-doc-color-lt1":be.getLt1().toCSS(ee.darkMode),"--sxl-doc-color-lt2":be.getLt2().toCSS(ee.darkMode),"--sxl-doc-color-accent1":be.getAccent1().toCSS(ee.darkMode),"--sxl-doc-color-accent2":be.getAccent2().toCSS(ee.darkMode),"--sxl-doc-color-accent3":be.getAccent3().toCSS(ee.darkMode),"--sxl-doc-color-accent4":be.getAccent4().toCSS(ee.darkMode),"--sxl-doc-color-accent5":be.getAccent5().toCSS(ee.darkMode),"--sxl-doc-color-accent6":be.getAccent6().toCSS(ee.darkMode),"--sxl-doc-color-hlink":be.getHlink().toCSS(ee.darkMode),"--sxl-doc-color-fol-hlink":be.getFolHlink().toCSS(ee.darkMode),"--sxl-doc-font-major":Ke.getMajorFont(),"--sxl-doc-font-minor":Ke.getMinorFont()}},[n.getStyles().getTheme()]);let Qn=c.jsx("div",{style:Jn,onTouchStart:()=>{Po()},onFocus:Q=>{j(!0),f?.(Q)},onBlur:Q=>{j(!1),F?.(Q)},ref:Mt,...V,children:c.jsx("div",{className:gt("sheetxl-sheet",Vl),style:{position:"absolute",width:"100%",height:"100%",boxSizing:"border-box",display:"flex",flexDirection:"column",flex:"1 1 100%",zIndex:"0",...kl},children:c.jsxs("div",{style:{display:"flex",flexDirection:"row",flex:"1 1 100%"},children:[Ht,wl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",overflow:"hidden",position:"relative"},children:[bl,c.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1 1 100%",position:"relative",borderRight:`solid ${ge.edgeStrokeWidth}px ${ge.edgeStrokeFill}`,backgroundColor:ee.fill},ref:k,onContextMenu:ct,children:[Rl,xn,c.jsx(Ul,{style:{position:"absolute",right:24,bottom:4},colorLicensee:Fe?.selection?.strokeFill,colorCredits:Fe?.body?.text?.fill})]})]})]})})});if(b){const Q=be=>c.jsx(Mo,{...be,sheet:n});Qn=c.jsx(r.ScrollPane,{style:{flex:"1 1 100%",overflow:"hidden",background:`${ge.fill}`,minHeight:2*v.height,minWidth:2*v.width,...S},viewport:y,touchElement:_.current?.stage,disableTouch:Xe,onScrollViewport:be=>{_.current?.scrollTo(be)},createHorizontalScrollbar:Q,createVerticalScrollbar:Q,...C,children:Qn})}o.useEffect(()=>{ke.current=!1,K?.(),J&&Mt.current?.focus()},[n]);const[eo,Ml]=o.useState(!1),Po=r.useCallbackRef(()=>{eo||Ml(!0)},[eo]);return o.useEffect(()=>{if(Lo)return typeof M=="function"&&M(),r.ReactUtils.detectIt().primaryInput==="touch"&&Po(),()=>{}},[M,Lo,eo]),Qn}));Vr.displayName="SheetElement";const Si=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),or="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=",Hr=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,style:a,picture:i,description:m,isDragging:h,view:s,onHide:p,onShow:b,onKeyDownCapture:C,onFocus:u,onBlur:I,loadingPanel:x,...A}=e,[z,H]=o.useState(!1),[B,M]=o.useState(null),[P,f]=o.useState(null),[F,S]=o.useState(null);o.useEffect(()=>{f(null),i.getDetails().then(O=>{H(!1),f(O.asUrl()),O.asSVGText?.()&&S(O.asSVGText())}).catch(O=>{console.warn(O),H(!0),f(or),S(null)})},[i]);const G=r.useImperativeElement(t,()=>({isPictureEditor:()=>!0}),[]),D=o.useMemo(()=>{if(P||F)return c.jsx("img",{style:{flex:"1",width:"100%",height:"100%",border:z?"var(--sxl-app-color-grey, grey) solid 1px":void 0,backgroundColor:z?"var(--sxl-app-color-background, white)":void 0,boxShadow:z?"0px 0px 3px var(--sxl-app-color-error, red)":void 0,objectFit:z?"contain":void 0,opacity:B?1:0,filter:"var(--sxl-app-filter-dark-invert)"},draggable:!1,src:P,onLoad:()=>{M(!0)},onError:({currentTarget:O})=>{console.log("error"),O.onerror=null,f(or),H(!0)},alt:m??`${i.getType()}`})},[B,i,P,F,h]);if(!i.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,...A,onKeyDownCapture:O=>{C?.(O)},ref:G,children:[B||z?void 0:x,D]})}));Hr.displayName="PictureEditor";const Ri=o.memo(o.forwardRef((e,t)=>{const{children:n,disabled:l,chart:a,view:i,isDragging:m,onHide:h,onShow:s,...p}=e;o.useEffect(()=>{},[a]);const b=r.useImperativeElement(t,()=>({isChartEditor:()=>!0}),[]),[C,{height:u,width:I}]=Ot();if(!a.isClosed())return c.jsx("div",{...p,ref:Xt([b,C]),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:i.getZoom(),display:"flex",position:"relative",border:"var(--sxl-app-color-grey, grey) solid 1px",filter:l?"blur(1px)":void 0,boxShadow:m?"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()})})})})),ki="_editable-input_1bqx6_6",Mi=e=>c.jsx("input",{...e}),Ur=o.memo(o.forwardRef((e,t)=>{const{style:n={},className:l,value:a="",onSubmit:i,onChange:m,onCancel:h,createInput:s=Mi,styleHover:p={},dragging:b,maxLength:C,disabled:u=!1,readOnly:I=!1,...x}=e,[A,z]=o.useState(!1),[H,B]=o.useState(!1),[M,P]=o.useState(a);o.useEffect(()=>{P(a)},[a]);const f=o.useRef(null),[F,S]=o.useState(null),G=r.useNotifier(),D=o.useCallback(function(K){const k=K.message;F!==k&&(G?.showMessage?.(k,{type:r.NotifierType.Error}),S(k))},[G,F]),O=o.useCallback(K=>{let k=!1;try{k=i?.(K)??!0}catch(L){D(L)}return k?(f.current=null,B(!1),P(K),k):(setTimeout(()=>{f.current?.focus()},0),k)},[i]),$=r.useCallbackRef(()=>{P(a),f.current=null,B(!1),h?.()},[h,a]),ue=o.useMemo(()=>{if(!H)return null;const K={className:gt(ki),autoFocus:!0,spellCheck:!1,name:"editable-label",autoComplete:"off",maxLength:C,type:"text",value:M,onFocus:k=>{f.current||(f.current=k.target,setTimeout(()=>{k.target?.select()},0))},onBlur:k=>{f.current&&O(M)},onChange:k=>{H&&P(k.target.value)},onMouseDown:k=>k.stopPropagation(),onKeyDown:k=>k.code==="Escape"?(k.preventDefault(),void $()):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(K)})},[H,M,O,$,s,u]),[U,V]=o.useState();o.useLayoutEffect(()=>{let K=Object.assign({},n);(b||A)&&(K=Object.assign(K,p)),V(K)},[b,A,p,n]),o.useEffect(()=>{ue&&m?.(M)},[ue,m,M]);const R=r.useImperativeElement(t,()=>({startEdit(){u||I||B(!0)},cancel(){$()}}),[]);return c.jsxs("div",{...x,ref:R,style:{flexDirection:"column",display:"flex",...U},className:gt(l),children:[c.jsxs("div",{style:{position:"relative",boxSizing:"content-box",whiteSpace:"pre",userSelect:"none",display:"flex",justifyContent:"center"},onDoubleClick:()=>{u||I||B(!0)},onMouseEnter:()=>z(!0),onMouseLeave:()=>z(!1),children:[c.jsx("div",{className:"editable-label-container",style:{textAlign:"center",display:"flex",minHeight:"1em",marginTop:"2px",opacity:H?0:1},children:M}),ue]}),c.jsx("div",{style:{whiteSpace:"pre",position:"relative",maxHeight:"0px",height:"0px",visibility:"hidden",marginLeft:"1px",marginRight:"1px",overflow:"hidden",...p},children:M})]})})),$n=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0;function Yt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function To(e){return"nodeType"in e}function Ct(e){var t,n;return e?Yt(e)?e:To(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Io(e){const{Document:t}=Ct(e);return e instanceof t}function vn(e){return!Yt(e)&&e instanceof Ct(e).HTMLElement}function Kr(e){return e instanceof Ct(e).SVGElement}function Zt(e){return e?Yt(e)?e.document:To(e)?Io(e)?e:vn(e)||Kr(e)?e.ownerDocument:document:document:document}const Rt=$n?o.useLayoutEffect:o.useEffect;function Wn(e){const t=o.useRef(e);return Rt(()=>{t.current=e}),o.useCallback(function(){for(var n=arguments.length,l=new Array(n),a=0;a<n;a++)l[a]=arguments[a];return t.current==null?void 0:t.current(...l)},[])}function mn(e,t){t===void 0&&(t=[e]);const n=o.useRef(e);return Rt(()=>{n.current!==e&&(n.current=e)},t),n}function cn(e,t){const n=o.useRef();return o.useMemo(()=>{const l=e(n.current);return n.current=l,l},[...t])}function jn(e){const t=Wn(e),n=o.useRef(null),l=o.useCallback(a=>{a!==n.current&&t?.(a,n.current),n.current=a},[]);return[n,l]}function On(e){const t=o.useRef();return o.useEffect(()=>{t.current=e},[e]),t.current}let uo={};function Cn(e,t){return o.useMemo(()=>{if(t)return t;const n=uo[e]==null?0:uo[e]+1;return uo[e]=n,e+"-"+n},[e,t])}function $r(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>{const h=Object.entries(m);for(const[s,p]of h){const b=i[s];b!=null&&(i[s]=b+e*p)}return i},{...t})}}const _t=$r(1),fn=$r(-1);function _n(e){if(!e)return!1;const{KeyboardEvent:t}=Ct(e.target);return t&&e instanceof t}function Bn(e){if((function(t){if(!t)return!1;const{TouchEvent:n}=Ct(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 Bt=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[Bt.Translate.toString(e),Bt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:l}=e;return t+" "+n+"ms "+l}}}),rr="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ti(e){return e.matches(rr)?e:e.querySelector(rr)}const Ii={display:"none"};function Ei(e){let{id:t,value:n}=e;return o.createElement("div",{id:t,style:Ii},n)}function Fi(e){let{id:t,announcement:n,ariaLiveType:l="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":l,"aria-atomic":!0},n)}const Wr=o.createContext(null),Ai={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
- `},Di={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 zi(e){let{announcements:t=Di,container:n,hiddenTextDescribedById:l,screenReaderInstructions:a=Ai}=e;const{announce:i,announcement:m}=(function(){const[C,u]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&u(I)},[]),announcement:C}})(),h=Cn("DndLiveRegion"),[s,p]=o.useState(!1);if(o.useEffect(()=>{p(!0)},[]),(function(C){const u=o.useContext(Wr);o.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(C)},[C,u])})(o.useMemo(()=>({onDragStart(C){let{active:u}=C;i(t.onDragStart({active:u}))},onDragMove(C){let{active:u,over:I}=C;t.onDragMove&&i(t.onDragMove({active:u,over:I}))},onDragOver(C){let{active:u,over:I}=C;i(t.onDragOver({active:u,over:I}))},onDragEnd(C){let{active:u,over:I}=C;i(t.onDragEnd({active:u,over:I}))},onDragCancel(C){let{active:u,over:I}=C;i(t.onDragCancel({active:u,over:I}))}}),[i,t])),!s)return null;const b=o.createElement(o.Fragment,null,o.createElement(Ei,{id:l,value:a.draggable}),o.createElement(Fi,{id:h,announcement:m}));return n?jt.createPortal(b,n):b}var ut;function Vn(){}function go(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"})(ut||(ut={}));const kt=Object.freeze({x:0,y:0});function _r(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ni(e,t){const n=Bn(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Gr(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return n-l}function Li(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return l-n}function lr(e){let{left:t,top:n,height:l,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+l},{x:t+a,y:n+l}]}function Zr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function ir(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 Pi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=ir(t,t.left,t.top),i=[];for(const m of l){const{id:h}=m,s=n.get(h);if(s){const p=_r(ir(s),a);i.push({id:h,data:{droppableContainer:m,value:p}})}}return i.sort(Gr)};function ji(e,t){const n=Math.max(t.top,e.top),l=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),m=a-l,h=i-n;if(l<a&&n<i){const s=t.width*t.height,p=e.width*e.height,b=m*h;return Number((b/(s+p-b)).toFixed(4))}return 0}const Oi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=[];for(const i of l){const{id:m}=i,h=n.get(m);if(h){const s=ji(h,t);s>0&&a.push({id:m,data:{droppableContainer:i,value:s}})}}return a.sort(Li)};function ar(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:kt}function Bi(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>({...i,top:i.top+e*m.y,bottom:i.bottom+e*m.y,left:i.left+e*m.x,right:i.right+e*m.x}),{...t})}}const Vi=Bi(1);function Xr(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 Hi={ignoreTransform:!1};function Jt(e,t){t===void 0&&(t=Hi);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:p,transformOrigin:b}=Ct(e).getComputedStyle(e);p&&(n=(function(C,u,I){const x=Xr(u);if(!x)return C;const{scaleX:A,scaleY:z,x:H,y:B}=x,M=C.left-H-(1-A)*parseFloat(I),P=C.top-B-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),f=A?C.width/A:C.width,F=z?C.height/z:C.height;return{width:f,height:F,top:P,right:M+f,bottom:P+F,left:M}})(n,p,b))}const{top:l,left:a,width:i,height:m,bottom:h,right:s}=n;return{top:l,left:a,width:i,height:m,bottom:h,right:s}}function sr(e){return Jt(e,{ignoreTransform:!0})}function Gn(e,t){const n=[];return e?(function l(a){if(t!=null&&n.length>=t||!a)return n;if(Io(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!vn(a)||Kr(a)||n.includes(a))return n;const i=Ct(e).getComputedStyle(a);return a!==e&&(function(m,h){h===void 0&&(h=Ct(m).getComputedStyle(m));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(p=>{const b=h[p];return typeof b=="string"&&s.test(b)})})(a,i)&&n.push(a),(function(m,h){return h===void 0&&(h=Ct(m).getComputedStyle(m)),h.position==="fixed"})(a,i)?n:l(a.parentNode)})(e):n}function Yr(e){const[t]=Gn(e,1);return t??null}function ho(e){return $n&&e?Yt(e)?e:To(e)?Io(e)||e===Zt(e).scrollingElement?window:vn(e)?e:null:null:null}function Jr(e){return Yt(e)?e.scrollX:e.scrollLeft}function Qr(e){return Yt(e)?e.scrollY:e.scrollTop}function Co(e){return{x:Jr(e),y:Qr(e)}}var ht;function el(e){return!(!$n||!e)&&e===document.scrollingElement}function tl(e){const t={x:0,y:0},n=el(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ht||(ht={}));const Ui={x:.2,y:.2};function Ki(e,t,n,l,a){let{top:i,left:m,right:h,bottom:s}=n;l===void 0&&(l=10),a===void 0&&(a=Ui);const{isTop:p,isBottom:b,isLeft:C,isRight:u}=tl(e),I={x:0,y:0},x={x:0,y:0},A=t.height*a.y,z=t.width*a.x;return!p&&i<=t.top+A?(I.y=ht.Backward,x.y=l*Math.abs((t.top+A-i)/A)):!b&&s>=t.bottom-A&&(I.y=ht.Forward,x.y=l*Math.abs((t.bottom-A-s)/A)),!u&&h>=t.right-z?(I.x=ht.Forward,x.x=l*Math.abs((t.right-z-h)/z)):!C&&m<=t.left+z&&(I.x=ht.Backward,x.x=l*Math.abs((t.left+z-m)/z)),{direction:I,speed:x}}function $i(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:m}=window;return{top:0,left:0,right:i,bottom:m,width:i,height:m}}const{top:t,left:n,right:l,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:l,bottom:a,width:e.clientWidth,height:e.clientHeight}}function nl(e){return e.reduce((t,n)=>_t(t,Co(n)),kt)}function ol(e,t){if(t===void 0&&(t=Jt),!e)return;const{top:n,left:l,bottom:a,right:i}=t(e);Yr(e)&&(a<=0||i<=0||n>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Wi=[["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+Qr(n),0)}]];class yo{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 l=Gn(n),a=nl(l);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,m,h]of Wi)for(const s of m)Object.defineProperty(this,s,{get:()=>{const p=h(l),b=a[i]-p;return this.rect[s]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...n)})},this.target=t}add(t,n,l){var a;(a=this.target)==null||a.addEventListener(t,n,l),this.listeners.push([t,n,l])}}function mo(e,t){const n=Math.abs(e.x),l=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+l**2)>t:"x"in t&&"y"in t?n>t.x&&l>t.y:"x"in t?n>t.x:"y"in t&&l>t.y}var qt,Je;function cr(e){e.preventDefault()}function _i(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"})(qt||(qt={})),(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"})(Je||(Je={}));const rl={start:[Je.Space,Je.Enter],cancel:[Je.Esc],end:[Je.Space,Je.Enter,Je.Tab]},Gi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Je.Right:return{...n,x:n.x+25};case Je.Left:return{...n,x:n.x-25};case Je.Down:return{...n,y:n.y+25};case Je.Up:return{...n,y:n.y-25}}};class Eo{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 dn(Zt(n)),this.windowListeners=new dn(Ct(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(qt.Resize,this.handleCancel),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(qt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,l=t.node.current;l&&ol(l),n(kt)}handleKeyDown(t){if(_n(t)){const{active:n,context:l,options:a}=this.props,{keyboardCodes:i=rl,coordinateGetter:m=Gi,scrollBehavior:h="smooth"}=a,{code:s}=t;if(i.end.includes(s))return void this.handleEnd(t);if(i.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:p}=l.current,b=p?{x:p.left,y:p.top}:kt;this.referenceCoordinates||(this.referenceCoordinates=b);const C=m(t,{active:n,context:l.current,currentCoordinates:b});if(C){const u=fn(C,b),I={x:0,y:0},{scrollableAncestors:x}=l.current;for(const A of x){const z=t.code,{isTop:H,isRight:B,isLeft:M,isBottom:P,maxScroll:f,minScroll:F}=tl(A),S=$i(A),G={x:Math.min(z===Je.Right?S.right-S.width/2:S.right,Math.max(z===Je.Right?S.left:S.left+S.width/2,C.x)),y:Math.min(z===Je.Down?S.bottom-S.height/2:S.bottom,Math.max(z===Je.Down?S.top:S.top+S.height/2,C.y))},D=z===Je.Right&&!B||z===Je.Left&&!M,O=z===Je.Down&&!P||z===Je.Up&&!H;if(D&&G.x!==C.x){const $=A.scrollLeft+u.x,ue=z===Je.Right&&$<=f.x||z===Je.Left&&$>=F.x;if(ue&&!u.y)return void A.scrollTo({left:$,behavior:h});I.x=ue?A.scrollLeft-$:z===Je.Right?A.scrollLeft-f.x:A.scrollLeft-F.x,I.x&&A.scrollBy({left:-I.x,behavior:h});break}if(O&&G.y!==C.y){const $=A.scrollTop+u.y,ue=z===Je.Down&&$<=f.y||z===Je.Up&&$>=F.y;if(ue&&!u.x)return void A.scrollTo({top:$,behavior:h});I.y=ue?A.scrollTop-$:z===Je.Down?A.scrollTop-f.y:A.scrollTop-F.y,I.y&&A.scrollBy({top:-I.y,behavior:h});break}}this.handleMove(t,_t(fn(C,this.referenceCoordinates),I))}}}handleMove(t,n){const{onMove:l}=this.props;t.preventDefault(),l(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 dr(e){return!!(e&&"distance"in e)}function ur(e){return!!(e&&"delay"in e)}Eo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:l=rl,onActivation:a}=t,{active:i}=n;const{code:m}=e.nativeEvent;if(l.start.includes(m)){const h=i.activatorNode.current;return(!h||e.target===h)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Fo{constructor(t,n,l){var a;l===void 0&&(l=(function(h){const{EventTarget:s}=Ct(h);return h instanceof s?h:Zt(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:i}=t,{target:m}=i;this.props=t,this.events=n,this.document=Zt(m),this.documentListeners=new dn(this.document),this.listeners=new dn(l),this.windowListeners=new dn(Ct(m)),this.initialCoordinates=(a=Bn(i))!=null?a:kt,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:l}}}=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(qt.Resize,this.handleCancel),this.windowListeners.add(qt.DragStart,cr),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),this.windowListeners.add(qt.ContextMenu,cr),this.documentListeners.add(qt.Keydown,this.handleKeydown),n){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ur(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(dr(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:l,onPending:a}=this.props;a(l,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(qt.Click,_i,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(qt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:l,initialCoordinates:a,props:i}=this,{onMove:m,options:{activationConstraint:h}}=i;if(!a)return;const s=(n=Bn(t))!=null?n:kt,p=fn(a,s);if(!l&&h){if(dr(h)){if(h.tolerance!=null&&mo(p,h.tolerance))return this.handleCancel();if(mo(p,h.distance))return this.handleStart()}return ur(h)&&mo(p,h.tolerance)?this.handleCancel():void this.handlePending(h,p)}t.cancelable&&t.preventDefault(),m(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===Je.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Zi={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ll extends Fo{constructor(t){const{event:n}=t,l=Zt(n.target);super(t,Zi,l)}}ll.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return!(!n.isPrimary||n.button!==0)&&(l?.({event:n}),!0)}}];const Xi={move:{name:"mousemove"},end:{name:"mouseup"}};var wo;(function(e){e[e.RightClick=2]="RightClick"})(wo||(wo={}));class il extends Fo{constructor(t){super(t,Xi,Zt(t.event.target))}}il.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return n.button!==wo.RightClick&&(l?.({event:n}),!0)}}];const fo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class al extends Fo{constructor(t){super(t,fo)}static setup(){return window.addEventListener(fo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(fo.move.name,t)};function t(){}}}var un,Hn;function Yi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:l,draggingRect:a,enabled:i,interval:m=5,order:h=Hn.TreeOrder,pointerCoordinates:s,scrollableAncestors:p,scrollableAncestorRects:b,delta:C,threshold:u}=e;const I=(function(F){let{delta:S,disabled:G}=F;const D=On(S);return cn(O=>{if(G||!D||!O)return Ji;const $={x:Math.sign(S.x-D.x),y:Math.sign(S.y-D.y)};return{x:{[ht.Backward]:O.x[ht.Backward]||$.x===-1,[ht.Forward]:O.x[ht.Forward]||$.x===1},y:{[ht.Backward]:O.y[ht.Backward]||$.y===-1,[ht.Forward]:O.y[ht.Forward]||$.y===1}}},[G,S,D])})({delta:C,disabled:!i}),[x,A]=(function(){const F=o.useRef(null);return[o.useCallback((S,G)=>{F.current=setInterval(S,G)},[]),o.useCallback(()=>{F.current!==null&&(clearInterval(F.current),F.current=null)},[])]})(),z=o.useRef({x:0,y:0}),H=o.useRef({x:0,y:0}),B=o.useMemo(()=>{switch(n){case un.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case un.DraggableRect:return a}},[n,a,s]),M=o.useRef(null),P=o.useCallback(()=>{const F=M.current;if(!F)return;const S=z.current.x*H.current.x,G=z.current.y*H.current.y;F.scrollBy(S,G)},[]),f=o.useMemo(()=>h===Hn.TreeOrder?[...p].reverse():p,[h,p]);o.useEffect(()=>{if(i&&p.length&&B){for(const F of f){if(l?.(F)===!1)continue;const S=p.indexOf(F),G=b[S];if(!G)continue;const{direction:D,speed:O}=Ki(F,G,B,t,u);for(const $ of["x","y"])I[$][D[$]]||(O[$]=0,D[$]=0);if(O.x>0||O.y>0)return A(),M.current=F,x(P,m),z.current=O,void(H.current=D)}z.current={x:0,y:0},H.current={x:0,y:0},A()}else A()},[t,P,l,A,i,m,JSON.stringify(B),JSON.stringify(I),x,p,f,b,JSON.stringify(u)])}al.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;const{touches:a}=n;return!(a.length>1)&&(l?.({event:n}),!0)}}],(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(un||(un={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));const Ji={x:{[ht.Backward]:!1,[ht.Forward]:!1},y:{[ht.Backward]:!1,[ht.Forward]:!1}};var pn,bo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(pn||(pn={})),(function(e){e.Optimized="optimized"})(bo||(bo={}));const gr=new Map;function xo(e,t){return cn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Un(e){let{callback:t,disabled:n}=e;const l=Wn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:i}=window;return new i(l)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Qi(e){return new yo(Jt(e),e)}function hr(e,t,n){t===void 0&&(t=Qi);const[l,a]=o.useState(null);function i(){a(s=>{if(!e)return null;var p;if(e.isConnected===!1)return(p=s??n)!=null?p:null;const b=t(e);return JSON.stringify(s)===JSON.stringify(b)?s:b})}const m=(function(s){let{callback:p,disabled:b}=s;const C=Wn(p),u=o.useMemo(()=>{if(b||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(C)},[C,b]);return o.useEffect(()=>()=>u?.disconnect(),[u]),u})({callback(s){if(e)for(const p of s){const{type:b,target:C}=p;if(b==="childList"&&C instanceof HTMLElement&&C.contains(e)){i();break}}}}),h=Un({callback:i});return Rt(()=>{i(),e?(h?.observe(e),m?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),m?.disconnect())},[e]),l}const mr=[];function fr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const l=e!==kt;l&&!n.current&&(n.current=e),!l&&n.current&&(n.current=null)},[e]),n.current?fn(e,n.current):kt}function pr(e){return o.useMemo(()=>e?(function(t){const n=t.innerWidth,l=t.innerHeight;return{top:0,left:0,right:n,bottom:l,width:n,height:l}})(e):null,[e])}const vr=[];function sl(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vn(t)?t:e}const ea=[{sensor:ll,options:{}},{sensor:Eo,options:{}}],ta={current:{}},zn={draggable:{measure:sr},droppable:{measure:sr,strategy:pn.WhileDragging,frequency:bo.Optimized},dragOverlay:{measure:Jt}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,l;return(n=(l=this.get(t))==null?void 0:l.node.current)!=null?n:void 0}}const na={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Vn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zn,measureDroppableContainers:Vn,windowRect:null,measuringScheduled:!1},cl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Vn,draggableNodes:new Map,over:null,measureDroppableContainers:Vn},yn=o.createContext(cl),dl=o.createContext(na);function oa(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function ra(e,t){switch(t.type){case ut.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ut.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 ut.DragEnd:case ut.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ut.RegisterDroppable:{const{element:n}=t,{id:l}=n,a=new gn(e.droppable.containers);return a.set(l,n),{...e,droppable:{...e.droppable,containers:a}}}case ut.SetDroppableDisabled:{const{id:n,key:l,disabled:a}=t,i=e.droppable.containers.get(n);if(!i||l!==i.key)return e;const m=new gn(e.droppable.containers);return m.set(n,{...i,disabled:a}),{...e,droppable:{...e.droppable,containers:m}}}case ut.UnregisterDroppable:{const{id:n,key:l}=t,a=e.droppable.containers.get(n);if(!a||l!==a.key)return e;const i=new gn(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function la(e){let{disabled:t}=e;const{active:n,activatorEvent:l,draggableNodes:a}=o.useContext(yn),i=On(l),m=On(n?.id);return o.useEffect(()=>{if(!t&&!l&&i&&m!=null){if(!_n(i)||document.activeElement===i.target)return;const h=a.get(m);if(!h)return;const{activatorNode:s,node:p}=h;if(!s.current&&!p.current)return;requestAnimationFrame(()=>{for(const b of[s.current,p.current]){if(!b)continue;const C=Ti(b);if(C){C.focus();break}}})}},[l,t,a,m,i]),null}function ul(e,t){let{transform:n,...l}=t;return e!=null&&e.length?e.reduce((a,i)=>i({transform:a,...l}),n):n}const Zn=o.createContext({...kt,scaleX:1,scaleY:1});var At;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(At||(At={}));const ia=o.memo(function(e){var t,n,l,a;let{id:i,accessibility:m,autoScroll:h=!0,children:s,sensors:p=ea,collisionDetection:b=Oi,measuring:C,modifiers:u,...I}=e;const x=o.useReducer(ra,void 0,oa),[A,z]=x,[H,B]=(function(){const[w]=o.useState(()=>new Set),E=o.useCallback(W=>(w.add(W),()=>w.delete(W)),[w]);return[o.useCallback(W=>{let{type:oe,event:ce}=W;w.forEach(de=>{var te;return(te=de[oe])==null?void 0:te.call(de,ce)})},[w]),E]})(),[M,P]=o.useState(At.Uninitialized),f=M===At.Initialized,{draggable:{active:F,nodes:S,translate:G},droppable:{containers:D}}=A,O=F!=null?S.get(F):null,$=o.useRef({initial:null,translated:null}),ue=o.useMemo(()=>{var w;return F!=null?{id:F,data:(w=O?.data)!=null?w:ta,rect:$}:null},[F,O]),U=o.useRef(null),[V,R]=o.useState(null),[K,k]=o.useState(null),L=mn(I,Object.values(I)),ne=Cn("DndDescribedBy",i),le=o.useMemo(()=>D.getEnabled(),[D]),Re=(fe=C,o.useMemo(()=>({draggable:{...zn.draggable,...fe?.draggable},droppable:{...zn.droppable,...fe?.droppable},dragOverlay:{...zn.dragOverlay,...fe?.dragOverlay}}),[fe?.draggable,fe?.droppable,fe?.dragOverlay]));var fe;const{droppableRects:me,measureDroppableContainers:ke,measuringScheduled:We}=(function(w,E){let{dragging:W,dependencies:oe,config:ce}=E;const[de,te]=o.useState(null),{frequency:Ce,measure:ve,strategy:ye}=ce,He=o.useRef(w),Ee=(function(){switch(ye){case pn.Always:return!1;case pn.BeforeDragging:return W;default:return!W}})(),ze=mn(Ee),Le=o.useCallback(function(et){et===void 0&&(et=[]),ze.current||te(Pe=>Pe===null?et:Pe.concat(et.filter(Xe=>!Pe.includes(Xe))))},[ze]),$e=o.useRef(null),Ue=cn(et=>{if(Ee&&!W)return gr;if(!et||et===gr||He.current!==w||de!=null){const Pe=new Map;for(let Xe of w){if(!Xe)continue;if(de&&de.length>0&&!de.includes(Xe.id)&&Xe.rect.current){Pe.set(Xe.id,Xe.rect.current);continue}const st=Xe.node.current,bt=st?new yo(ve(st),st):null;Xe.rect.current=bt,bt&&Pe.set(Xe.id,bt)}return Pe}return et},[w,de,W,Ee,ve]);return o.useEffect(()=>{He.current=w},[w]),o.useEffect(()=>{Ee||Le()},[W,Ee]),o.useEffect(()=>{de&&de.length>0&&te(null)},[JSON.stringify(de)]),o.useEffect(()=>{Ee||typeof Ce!="number"||$e.current!==null||($e.current=setTimeout(()=>{Le(),$e.current=null},Ce))},[Ce,Ee,Le,...oe]),{droppableRects:Ue,measureDroppableContainers:Le,measuringScheduled:de!=null}})(le,{dragging:f,dependencies:[G.x,G.y],config:Re.droppable}),Fe=(function(w,E){const W=E!=null?w.get(E):void 0,oe=W?W.node.current:null;return cn(ce=>{var de;return E==null?null:(de=oe??ce)!=null?de:null},[oe,E])})(S,F),Ve=o.useMemo(()=>K?Bn(K):null,[K]),ee=(function(){const w=V?.autoScrollEnabled===!1,E=typeof h=="object"?h.enabled===!1:h===!1,W=f&&!w&&!E;return typeof h=="object"?{...h,enabled:W}:{enabled:W}})(),Y=(function(w,E){return xo(w,E)})(Fe,Re.draggable.measure);(function(w){let{activeNode:E,measure:W,initialRect:oe,config:ce=!0}=w;const de=o.useRef(!1),{x:te,y:Ce}=typeof ce=="boolean"?{x:ce,y:ce}:ce;Rt(()=>{if(!te&&!Ce||!E)return void(de.current=!1);if(de.current||!oe)return;const ve=E?.node.current;if(!ve||ve.isConnected===!1)return;const ye=ar(W(ve),oe);if(te||(ye.x=0),Ce||(ye.y=0),de.current=!0,Math.abs(ye.x)>0||Math.abs(ye.y)>0){const He=Yr(ve);He&&He.scrollBy({top:ye.y,left:ye.x})}},[E,te,Ce,oe,W])})({activeNode:F!=null?S.get(F):null,config:ee.layoutShiftCompensation,initialRect:Y,measure:Re.draggable.measure});const ge=hr(Fe,Re.draggable.measure,Y),De=hr(Fe?Fe.parentElement:null),X=o.useRef({activatorEvent:null,active:null,activeNode:Fe,collisionRect:null,collisions:null,droppableRects:me,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),_=D.getNodeFor((t=X.current.over)==null?void 0:t.id),re=(function(w){let{measure:E}=w;const[W,oe]=o.useState(null),ce=Un({callback:o.useCallback(ve=>{for(const{target:ye}of ve)if(vn(ye)){oe(He=>{const Ee=E(ye);return He?{...He,width:Ee.width,height:Ee.height}:Ee});break}},[E])}),de=o.useCallback(ve=>{const ye=sl(ve);ce?.disconnect(),ye&&ce?.observe(ye),oe(ye?E(ye):null)},[E,ce]),[te,Ce]=jn(de);return o.useMemo(()=>({nodeRef:te,rect:W,setRef:Ce}),[W,te,Ce])})({measure:Re.dragOverlay.measure}),pe=(n=re.nodeRef.current)!=null?n:Fe,se=f?(l=re.rect)!=null?l:ge:null,Ie=!!(re.nodeRef.current&&re.rect),ie=ar(we=Ie?null:ge,xo(we));var we;const Me=pr(pe?Ct(pe):null),Se=(function(w){const E=o.useRef(w),W=cn(oe=>w?oe&&oe!==mr&&w&&E.current&&w.parentNode===E.current.parentNode?oe:Gn(w):mr,[w]);return o.useEffect(()=>{E.current=w},[w]),W})(f?_??Fe:null),je=(function(w,E){E===void 0&&(E=Jt);const[W]=w,oe=pr(W?Ct(W):null),[ce,de]=o.useState(vr);function te(){de(()=>w.length?w.map(ve=>el(ve)?oe:new yo(E(ve),ve)):vr)}const Ce=Un({callback:te});return Rt(()=>{Ce?.disconnect(),te(),w.forEach(ve=>Ce?.observe(ve))},[w]),ce})(Se),v=ul(u,{transform:{x:G.x-ie.x,y:G.y-ie.y,scaleX:1,scaleY:1},activatorEvent:K,active:ue,activeNodeRect:ge,containerNodeRect:De,draggingNodeRect:se,over:X.current.over,overlayNodeRect:re.rect,scrollableAncestors:Se,scrollableAncestorRects:je,windowRect:Me}),_e=Ve?_t(Ve,G):null,Oe=(function(w){const[E,W]=o.useState(null),oe=o.useRef(w),ce=o.useCallback(de=>{const te=ho(de.target);te&&W(Ce=>Ce?(Ce.set(te,Co(te)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const de=oe.current;if(w!==de){te(de);const Ce=w.map(ve=>{const ye=ho(ve);return ye?(ye.addEventListener("scroll",ce,{passive:!0}),[ye,Co(ye)]):null}).filter(ve=>ve!=null);W(Ce.length?new Map(Ce):null),oe.current=w}return()=>{te(w),te(de)};function te(Ce){Ce.forEach(ve=>{const ye=ho(ve);ye?.removeEventListener("scroll",ce)})}},[ce,w]),o.useMemo(()=>w.length?E?Array.from(E.values()).reduce((de,te)=>_t(de,te),kt):nl(w):kt,[w,E])})(Se),Qe=fr(Oe),ae=fr(Oe,[ge]),Te=_t(v,Qe),Ne=se?Vi(se,v):null,Ae=ue&&Ne?b({active:ue,collisionRect:Ne,droppableRects:me,droppableContainers:le,pointerCoordinates:_e}):null,xe=Zr(Ae,"id"),[N,J]=o.useState(null),j=(function(w,E,W){return{...w,scaleX:E&&W?E.width/W.width:1,scaleY:E&&W?E.height/W.height:1}})(Ie?v:_t(v,ae),(a=N?.rect)!=null?a:null,ge),Z=o.useRef(null),qe=o.useCallback((w,E)=>{let{sensor:W,options:oe}=E;if(U.current==null)return;const ce=S.get(U.current);if(!ce)return;const de=w.nativeEvent,te=new W({active:U.current,activeNode:ce,event:de,options:oe,context:X,onAbort(ve){if(!S.get(ve))return;const{onDragAbort:ye}=L.current,He={id:ve};ye?.(He),H({type:"onDragAbort",event:He})},onPending(ve,ye,He,Ee){if(!S.get(ve))return;const{onDragPending:ze}=L.current,Le={id:ve,constraint:ye,initialCoordinates:He,offset:Ee};ze?.(Le),H({type:"onDragPending",event:Le})},onStart(ve){const ye=U.current;if(ye==null)return;const He=S.get(ye);if(!He)return;const{onDragStart:Ee}=L.current,ze={activatorEvent:de,active:{id:ye,data:He.data,rect:$}};jt.unstable_batchedUpdates(()=>{Ee?.(ze),P(At.Initializing),z({type:ut.DragStart,initialCoordinates:ve,active:ye}),H({type:"onDragStart",event:ze}),R(Z.current),k(de)})},onMove(ve){z({type:ut.DragMove,coordinates:ve})},onEnd:Ce(ut.DragEnd),onCancel:Ce(ut.DragCancel)});function Ce(ve){return async function(){const{active:ye,collisions:He,over:Ee,scrollAdjustedTranslate:ze}=X.current;let Le=null;if(ye&&ze){const{cancelDrop:$e}=L.current;Le={activatorEvent:de,active:ye,collisions:He,delta:ze,over:Ee},ve===ut.DragEnd&&typeof $e=="function"&&await Promise.resolve($e(Le))&&(ve=ut.DragCancel)}U.current=null,jt.unstable_batchedUpdates(()=>{z({type:ve}),P(At.Uninitialized),J(null),R(null),k(null),Z.current=null;const $e=ve===ut.DragEnd?"onDragEnd":"onDragCancel";if(Le){const Ue=L.current[$e];Ue?.(Le),H({type:$e,event:Le})}})}}Z.current=te},[S]),g=o.useCallback((w,E)=>(W,oe)=>{const ce=W.nativeEvent,de=S.get(oe);if(U.current!==null||!de||ce.dndKit||ce.defaultPrevented)return;const te={active:de};w(W,E.options,te)===!0&&(ce.dndKit={capturedBy:E.sensor},U.current=oe,qe(W,E))},[S,qe]),T=(function(w,E){return o.useMemo(()=>w.reduce((W,oe)=>{const{sensor:ce}=oe;return[...W,...ce.activators.map(de=>({eventName:de.eventName,handler:E(de.handler,oe)}))]},[]),[w,E])})(p,g);(function(w){o.useEffect(()=>{if(!$n)return;const E=w.map(W=>{let{sensor:oe}=W;return oe.setup==null?void 0:oe.setup()});return()=>{for(const W of E)W?.()}},w.map(E=>{let{sensor:W}=E;return W}))})(p),Rt(()=>{ge&&M===At.Initializing&&P(At.Initialized)},[ge,M]),o.useEffect(()=>{const{onDragMove:w}=L.current,{active:E,activatorEvent:W,collisions:oe,over:ce}=X.current;if(!E||!W)return;const de={active:E,activatorEvent:W,collisions:oe,delta:{x:Te.x,y:Te.y},over:ce};jt.unstable_batchedUpdates(()=>{w?.(de),H({type:"onDragMove",event:de})})},[Te.x,Te.y]),o.useEffect(()=>{const{active:w,activatorEvent:E,collisions:W,droppableContainers:oe,scrollAdjustedTranslate:ce}=X.current;if(!w||U.current==null||!E||!ce)return;const{onDragOver:de}=L.current,te=oe.get(xe),Ce=te&&te.rect.current?{id:te.id,rect:te.rect.current,data:te.data,disabled:te.disabled}:null,ve={active:w,activatorEvent:E,collisions:W,delta:{x:ce.x,y:ce.y},over:Ce};jt.unstable_batchedUpdates(()=>{J(Ce),de?.(ve),H({type:"onDragOver",event:ve})})},[xe]),Rt(()=>{X.current={activatorEvent:K,active:ue,activeNode:Fe,collisionRect:Ne,collisions:Ae,droppableRects:me,draggableNodes:S,draggingNode:pe,draggingNodeRect:se,droppableContainers:D,over:N,scrollableAncestors:Se,scrollAdjustedTranslate:Te},$.current={initial:se,translated:Ne}},[ue,Fe,Ae,Ne,S,pe,se,me,D,N,Se,Te]),Yi({...ee,delta:G,draggingRect:Ne,pointerCoordinates:_e,scrollableAncestors:Se,scrollableAncestorRects:je});const q=o.useMemo(()=>({active:ue,activeNode:Fe,activeNodeRect:ge,activatorEvent:K,collisions:Ae,containerNodeRect:De,dragOverlay:re,draggableNodes:S,droppableContainers:D,droppableRects:me,over:N,measureDroppableContainers:ke,scrollableAncestors:Se,scrollableAncestorRects:je,measuringConfiguration:Re,measuringScheduled:We,windowRect:Me}),[ue,Fe,ge,K,Ae,De,re,S,D,me,N,ke,Se,je,Re,We,Me]),y=o.useMemo(()=>({activatorEvent:K,activators:T,active:ue,activeNodeRect:ge,ariaDescribedById:{draggable:ne},dispatch:z,draggableNodes:S,over:N,measureDroppableContainers:ke}),[K,T,ue,ge,z,ne,S,N,ke]);return o.createElement(Wr.Provider,{value:B},o.createElement(yn.Provider,{value:y},o.createElement(dl.Provider,{value:q},o.createElement(Zn.Provider,{value:j},s)),o.createElement(la,{disabled:m?.restoreFocus===!1})),o.createElement(zi,{...m,hiddenTextDescribedById:ne}))}),aa=o.createContext(null),Cr="button";function sa(e){let{id:t,data:n,disabled:l=!1,attributes:a}=e;const i=Cn("Draggable"),{activators:m,activatorEvent:h,active:s,activeNodeRect:p,ariaDescribedById:b,draggableNodes:C,over:u}=o.useContext(yn),{role:I=Cr,roleDescription:x="draggable",tabIndex:A=0}=a??{},z=s?.id===t,H=o.useContext(z?Zn:aa),[B,M]=jn(),[P,f]=jn(),F=(function(G,D){return o.useMemo(()=>G.reduce((O,$)=>{let{eventName:ue,handler:U}=$;return O[ue]=V=>{U(V,D)},O},{}),[G,D])})(m,t),S=mn(n);return Rt(()=>(C.set(t,{id:t,key:i,node:B,activatorNode:P,data:S}),()=>{const G=C.get(t);G&&G.key===i&&C.delete(t)}),[C,t]),{active:s,activatorEvent:h,activeNodeRect:p,attributes:o.useMemo(()=>({role:I,tabIndex:A,"aria-disabled":l,"aria-pressed":!(!z||I!==Cr)||void 0,"aria-roledescription":x,"aria-describedby":b.draggable}),[l,I,A,z,x,b.draggable]),isDragging:z,listeners:l?void 0:F,node:B,over:u,setNodeRef:M,setActivatorNodeRef:f,transform:H}}function gl(){return o.useContext(dl)}const ca={timeout:25};function da(e){let{animation:t,children:n}=e;const[l,a]=o.useState(null),[i,m]=o.useState(null),h=On(n);return n||l||!h||a(h),Rt(()=>{if(!i)return;const s=l?.key,p=l?.props.id;s!=null&&p!=null?Promise.resolve(t(p,i)).then(()=>{a(null)}):a(null)},[t,l,i]),o.createElement(o.Fragment,null,n,l?o.cloneElement(l,{ref:m}):null)}const ua={x:0,y:0,scaleX:1,scaleY:1};function ga(e){let{children:t}=e;return o.createElement(yn.Provider,{value:cl},o.createElement(Zn.Provider,{value:ua},t))}const ha={position:"fixed",touchAction:"none"},ma=e=>_n(e)?"transform 250ms ease":void 0,fa=o.forwardRef((e,t)=>{let{as:n,activatorEvent:l,adjustScale:a,children:i,className:m,rect:h,style:s,transform:p,transition:b=ma}=e;if(!h)return null;const C=a?p:{...p,scaleX:1,scaleY:1},u={...ha,width:h.width,height:h.height,top:h.top,left:h.left,transform:Bt.Transform.toString(C),transformOrigin:a&&l?Ni(l,h):void 0,transition:typeof b=="function"?b(l):b,...s};return o.createElement(n,{className:m,style:u,ref:t},i)}),pa=e=>t=>{let{active:n,dragOverlay:l}=t;const a={},{styles:i,className:m}=e;if(i!=null&&i.active)for(const[h,s]of Object.entries(i.active))s!==void 0&&(a[h]=n.node.style.getPropertyValue(h),n.node.style.setProperty(h,s));if(i!=null&&i.dragOverlay)for(const[h,s]of Object.entries(i.dragOverlay))s!==void 0&&l.node.style.setProperty(h,s);return m!=null&&m.active&&n.node.classList.add(m.active),m!=null&&m.dragOverlay&&l.node.classList.add(m.dragOverlay),function(){for(const[h,s]of Object.entries(a))n.node.style.setProperty(h,s);m!=null&&m.active&&n.node.classList.remove(m.active)}},hl={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Bt.Transform.toString(t)},{transform:Bt.Transform.toString(n)}]},sideEffects:pa({styles:{active:{opacity:"0"}}})};function va(e){let{config:t,draggableNodes:n,droppableContainers:l,measuringConfiguration:a}=e;return Wn((i,m)=>{if(t===null)return;const h=n.get(i);if(!h)return;const s=h.node.current;if(!s)return;const p=sl(m);if(!p)return;const{transform:b}=Ct(m).getComputedStyle(m),C=Xr(b);if(!C)return;const u=typeof t=="function"?t:(function(I){const{duration:x,easing:A,sideEffects:z,keyframes:H}={...hl,...I};return B=>{let{active:M,dragOverlay:P,transform:f,...F}=B;if(!x)return;const S={x:P.rect.left-M.rect.left,y:P.rect.top-M.rect.top},G={scaleX:f.scaleX!==1?M.rect.width*f.scaleX/P.rect.width:1,scaleY:f.scaleY!==1?M.rect.height*f.scaleY/P.rect.height:1},D={x:f.x-S.x,y:f.y-S.y,...G},O=H({...F,active:M,dragOverlay:P,transform:{initial:f,final:D}}),[$]=O,ue=O[O.length-1];if(JSON.stringify($)===JSON.stringify(ue))return;const U=z?.({active:M,dragOverlay:P,...F}),V=P.node.animate(O,{duration:x,easing:A,fill:"forwards"});return new Promise(R=>{V.onfinish=()=>{U?.(),R()}})}})(t);return ol(s,a.draggable.measure),u({active:{id:i,data:h.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:m,rect:a.dragOverlay.measure(p)},droppableContainers:l,measuringConfiguration:a,transform:C})})}let yr=0;function Ca(e){return o.useMemo(()=>{if(e!=null)return yr++,yr},[e])}const ya=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:l,style:a,transition:i,modifiers:m,wrapperElement:h="div",className:s,zIndex:p=999}=e;const{activatorEvent:b,active:C,activeNodeRect:u,containerNodeRect:I,draggableNodes:x,droppableContainers:A,dragOverlay:z,over:H,measuringConfiguration:B,scrollableAncestors:M,scrollableAncestorRects:P,windowRect:f}=gl(),F=o.useContext(Zn),S=Ca(C?.id),G=ul(m,{activatorEvent:b,active:C,activeNodeRect:u,containerNodeRect:I,draggingNodeRect:z.rect,over:H,overlayNodeRect:z.rect,scrollableAncestors:M,scrollableAncestorRects:P,transform:F,windowRect:f}),D=xo(u),O=va({config:l,draggableNodes:x,droppableContainers:A,measuringConfiguration:B}),$=D?z.setRef:void 0;return o.createElement(ga,null,o.createElement(da,{animation:O},C&&S?o.createElement(fa,{key:S,id:C.id,ref:$,as:h,activatorEvent:b,adjustScale:t,className:s,transition:i,rect:D,style:{zIndex:p,...a},transform:G},n):null))});function Ao(e,t,n){const l=e.slice();return l.splice(n<0?l.length+n:n,0,l.splice(t,1)[0]),l}function wa(e,t){return e.reduce((n,l,a)=>{const i=t.get(l);return i&&(n[a]=i),n},Array(e.length))}function An(e){return e!==null&&e>=0}const Dn={scaleX:1,scaleY:1},ba=e=>{var t;let{rects:n,activeNodeRect:l,activeIndex:a,overIndex:i,index:m}=e;const h=(t=n[a])!=null?t:l;if(!h)return null;const s=(function(p,b,C){const u=p[b],I=p[b-1],x=p[b+1];return!u||!I&&!x?0:C<b?I?u.left-(I.left+I.width):x.left-(u.left+u.width):x?x.left-(u.left+u.width):u.left-(I.left+I.width)})(n,m,a);if(m===a){const p=n[i];return p?{x:a<i?p.left+p.width-(h.left+h.width):p.left-h.left,y:0,...Dn}:null}return m>a&&m<=i?{x:-h.width-s,y:0,...Dn}:m<a&&m>=i?{x:h.width+s,y:0,...Dn}:{x:0,y:0,...Dn}},Do=e=>{let{rects:t,activeIndex:n,overIndex:l,index:a}=e;const i=Ao(t,l,n),m=t[a],h=i[a];return h&&m?{x:h.left-m.left,y:h.top-m.top,scaleX:h.width/m.width,scaleY:h.height/m.height}:null},ml="Sortable",fl=o.createContext({activeIndex:-1,containerId:ml,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Do,disabled:{draggable:!1,droppable:!1}});function xa(e){let{children:t,id:n,items:l,strategy:a=Do,disabled:i=!1}=e;const{active:m,dragOverlay:h,droppableRects:s,over:p,measureDroppableContainers:b}=gl(),C=Cn(ml,n),u=h.rect!==null,I=o.useMemo(()=>l.map(F=>typeof F=="object"&&"id"in F?F.id:F),[l]),x=m!=null,A=m?I.indexOf(m.id):-1,z=p?I.indexOf(p.id):-1,H=o.useRef(I),B=!(function(F,S){if(F===S)return!0;if(F.length!==S.length)return!1;for(let G=0;G<F.length;G++)if(F[G]!==S[G])return!1;return!0})(I,H.current),M=z!==-1&&A===-1||B,P=(function(F){return typeof F=="boolean"?{draggable:F,droppable:F}:F})(i);Rt(()=>{B&&x&&b(I)},[B,I,x,b]),o.useEffect(()=>{H.current=I},[I]);const f=o.useMemo(()=>({activeIndex:A,containerId:C,disabled:P,disableTransforms:M,items:I,overIndex:z,useDragOverlay:u,sortedRects:wa(I,s),strategy:a}),[A,C,P.draggable,P.droppable,M,I,z,s,u,a]);return o.createElement(fl.Provider,{value:f},t)}const qa=e=>{let{id:t,items:n,activeIndex:l,overIndex:a}=e;return Ao(n,l,a).indexOf(t)},Sa=e=>{let{containerId:t,isSorting:n,wasDragging:l,index:a,items:i,newIndex:m,previousItems:h,previousContainerId:s,transition:p}=e;return!(!p||!l)&&(h===i||a!==m)&&(!!n||m!==a&&t===s)},Ra={duration:200,easing:"ease"},pl="transform",ka=Bt.Transition.toString({property:pl,duration:0,easing:"linear"}),Ma={roleDescription:"sortable"};function Ta(e){let{animateLayoutChanges:t=Sa,attributes:n,disabled:l,data:a,getNewIndex:i=qa,id:m,strategy:h,resizeObserverConfig:s,transition:p=Ra}=e;const{items:b,containerId:C,activeIndex:u,disabled:I,disableTransforms:x,sortedRects:A,overIndex:z,useDragOverlay:H,strategy:B}=o.useContext(fl),M=(function(_,re){var pe,se;return typeof _=="boolean"?{draggable:_,droppable:!1}:{draggable:(pe=_?.draggable)!=null?pe:re.draggable,droppable:(se=_?.droppable)!=null?se:re.droppable}})(l,I),P=b.indexOf(m),f=o.useMemo(()=>({sortable:{containerId:C,index:P,items:b},...a}),[C,a,P,b]),F=o.useMemo(()=>b.slice(b.indexOf(m)),[b,m]),{rect:S,node:G,isOver:D,setNodeRef:O}=(function(_){let{data:re,disabled:pe=!1,id:se,resizeObserverConfig:Ie}=_;const ie=Cn("Droppable"),{active:we,dispatch:Me,over:Se,measureDroppableContainers:je}=o.useContext(yn),v=o.useRef({disabled:pe}),_e=o.useRef(!1),Oe=o.useRef(null),Qe=o.useRef(null),{disabled:ae,updateMeasurementsFor:Te,timeout:Ne}={...ca,...Ie},Ae=mn(Te??se),xe=Un({callback:o.useCallback(()=>{_e.current?(Qe.current!=null&&clearTimeout(Qe.current),Qe.current=setTimeout(()=>{je(Array.isArray(Ae.current)?Ae.current:[Ae.current]),Qe.current=null},Ne)):_e.current=!0},[Ne]),disabled:ae||!we}),N=o.useCallback((qe,g)=>{xe&&(g&&(xe.unobserve(g),_e.current=!1),qe&&xe.observe(qe))},[xe]),[J,j]=jn(N),Z=mn(re);return o.useEffect(()=>{xe&&J.current&&(xe.disconnect(),_e.current=!1,xe.observe(J.current))},[J,xe]),o.useEffect(()=>(Me({type:ut.RegisterDroppable,element:{id:se,key:ie,disabled:pe,node:J,rect:Oe,data:Z}}),()=>Me({type:ut.UnregisterDroppable,key:ie,id:se})),[se]),o.useEffect(()=>{pe!==v.current.disabled&&(Me({type:ut.SetDroppableDisabled,id:se,key:ie,disabled:pe}),v.current.disabled=pe)},[se,ie,pe,Me]),{active:we,rect:Oe,isOver:Se?.id===se,node:J,over:Se,setNodeRef:j}})({id:m,data:f,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:F,...s}}),{active:$,activatorEvent:ue,activeNodeRect:U,attributes:V,setNodeRef:R,listeners:K,isDragging:k,over:L,setActivatorNodeRef:ne,transform:le}=sa({id:m,data:f,attributes:{...Ma,...n},disabled:M.draggable}),Re=(function(){for(var _=arguments.length,re=new Array(_),pe=0;pe<_;pe++)re[pe]=arguments[pe];return o.useMemo(()=>se=>{re.forEach(Ie=>Ie(se))},re)})(O,R),fe=!!$,me=fe&&!x&&An(u)&&An(z),ke=!H&&k,We=ke&&me?le:null,Fe=me?We??(h??B)({rects:A,activeNodeRect:U,activeIndex:u,overIndex:z,index:P}):null,Ve=An(u)&&An(z)?i({id:m,items:b,activeIndex:u,overIndex:z}):P,ee=$?.id,Y=o.useRef({activeId:ee,items:b,newIndex:Ve,containerId:C}),ge=b!==Y.current.items,De=t({active:$,containerId:C,isDragging:k,isSorting:fe,id:m,index:P,items:b,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:p,wasDragging:Y.current.activeId!=null}),X=(function(_){let{disabled:re,index:pe,node:se,rect:Ie}=_;const[ie,we]=o.useState(null),Me=o.useRef(pe);return Rt(()=>{if(!re&&pe!==Me.current&&se.current){const Se=Ie.current;if(Se){const je=Jt(se.current,{ignoreTransform:!0}),v={x:Se.left-je.left,y:Se.top-je.top,scaleX:Se.width/je.width,scaleY:Se.height/je.height};(v.x||v.y)&&we(v)}}pe!==Me.current&&(Me.current=pe)},[re,pe,se,Ie]),o.useEffect(()=>{ie&&we(null)},[ie]),ie})({disabled:!De,index:P,node:G,rect:S});return o.useEffect(()=>{fe&&Y.current.newIndex!==Ve&&(Y.current.newIndex=Ve),C!==Y.current.containerId&&(Y.current.containerId=C),b!==Y.current.items&&(Y.current.items=b)},[fe,Ve,C,b]),o.useEffect(()=>{if(ee===Y.current.activeId)return;if(ee!=null&&Y.current.activeId==null)return void(Y.current.activeId=ee);const _=setTimeout(()=>{Y.current.activeId=ee},50);return()=>clearTimeout(_)},[ee]),{active:$,activeIndex:u,attributes:V,data:f,rect:S,index:P,newIndex:Ve,items:b,isOver:D,isSorting:fe,isDragging:k,listeners:K,node:G,overIndex:z,over:L,setNodeRef:Re,setActivatorNodeRef:ne,setDroppableNodeRef:O,setDraggableNodeRef:R,transform:X??Fe,transition:(function(){if(X||ge&&Y.current.newIndex===P)return ka;if(!(ke&&!_n(ue)||!p)&&(fe||De))return Bt.Transition.toString({...p,property:pl})})()}}function Kn(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 Ia=[Je.Down,Je.Right,Je.Up,Je.Left],Ea=(e,t)=>{let{context:{active:n,collisionRect:l,droppableRects:a,droppableContainers:i,over:m,scrollableAncestors:h}}=t;if(Ia.includes(e.code)){if(e.preventDefault(),!n||!l)return;const s=[];i.getEnabled().forEach(C=>{if(!C||C!=null&&C.disabled)return;const u=a.get(C.id);if(u)switch(e.code){case Je.Down:l.top<u.top&&s.push(C);break;case Je.Up:l.top>u.top&&s.push(C);break;case Je.Left:l.left>u.left&&s.push(C);break;case Je.Right:l.left<u.left&&s.push(C)}});const p=(C=>{let{collisionRect:u,droppableRects:I,droppableContainers:x}=C;const A=lr(u),z=[];for(const H of x){const{id:B}=H,M=I.get(B);if(M){const P=lr(M),f=A.reduce((S,G,D)=>S+_r(P[D],G),0),F=Number((f/4).toFixed(4));z.push({id:B,data:{droppableContainer:H,value:F}})}}return z.sort(Gr)})({collisionRect:l,droppableRects:a,droppableContainers:s});let b=Zr(p,"id");if(b===m?.id&&p.length>1&&(b=p[1].id),b!=null){const C=i.get(n.id),u=i.get(b),I=u?a.get(u.id):null,x=u?.node.current;if(x&&I&&C&&u){const A=Gn(x).some((P,f)=>h[f]!==P),z=wr(C,u),H=(function(P,f){return!Kn(P)||!Kn(f)||!wr(P,f)?!1:P.data.current.sortable.index<f.data.current.sortable.index})(C,u),B=A||!z?{x:0,y:0}:{x:H?l.width-I.width:0,y:H?l.height-I.height:0},M={x:I.left,y:I.top};return B.x&&B.y?M:fn(M,B)}}}};function wr(e,t){return!(!Kn(e)||!Kn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const Fa=e=>{let{transform:t}=e;return{...t,y:0}},vl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,index:i,editing:m,editable:h,selectedIndex:s,background:p,activeColor:b,borderColor:C,borderWidth:u,dragging:I,...x}=e;return c.jsxs("div",{ref:t,className:gt(a),style:{...l,display:"flex",flexDirection:"column",background:s===i?"white":p,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...x,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:s===i?"0px":"-1px",marginTop:s===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===i?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===i&&b?b?.toCSS():"none",minHeight:"2px"}})]})})),St={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"},zo=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:l,fadeIn:a,handle:i,height:m,index:h,listeners:s,onRemove:p,renderItem:b,sorting:C,style:u,transition:I,transform:x,value:A,wrapperStyle:z,...H},B)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const M=b?b({dragOverlay:!!t,dragging:!!n,sorting:!!C,index:h,fadeIn:!!a,listeners:s,ref:B,style:u,transform:x,transition:I,value:A}):c.jsx(c.Fragment,{children:A});return c.jsx("div",{className:gt("tab-item",St.Wrapper,a&&St.fadeIn,C&&St.sorting,t&&St.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":x?`${Math.round(x.x)}px`:void 0,"--translate-y":x?`${Math.round(x.y)}px`:void 0,"--scale-x":x?.scaleX?`${x.scaleX}`:void 0,"--scale-y":x?.scaleY?`${x.scaleY}`:void 0,"--index":h},ref:B,children:c.jsx("div",{className:gt(St.Item,n&&St.dragging,i&&St.withHandle,t&&St.dragOverlay,l&&St.disabled,e&&St.color,"dragging"),style:u,"data-cypress":"draggable-item",...i?void 0:s,...H,tabIndex:i?void 0:-1,children:M})})})),br={Row:"_Row_1kr10_1"},Cl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},l)=>c.jsx("div",{ref:l,style:{...n},className:gt(br.Row,t&&br.horizontal),children:e}))),Aa={...hl},Da=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:l,animateLayoutChanges:a,adjustScale:i=!1,collisionDetection:m=Pi,coordinateGetter:h=Ea,dropAnimation:s=Aa,getItemStyles:p=()=>({}),getNewIndex:b,handle:C=!1,items:u,onMove:I,isDisabled:x=()=>!1,measuring:A,modifiers:z,renderItem:H,renderDivider:B,reorderItems:M=Ao,strategy:P=Do,style:f,useDragOverlay:F=!0,onDragStart:S,wrapperStyle:G=()=>({})}=e,[D,O]=o.useState(()=>u);o.useEffect(()=>{O(u)},[u]);const[$,ue]=o.useState(null),U=(function(){for(var L=arguments.length,ne=new Array(L),le=0;le<L;le++)ne[le]=arguments[le];return o.useMemo(()=>[...ne].filter(Re=>Re!=null),[...ne])})(go(il,{activationConstraint:l}),go(al,{activationConstraint:l}),go(Eo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:h})),V=D.indexOf.bind(D),R=$?V($):-1,K=[];D.map((L,ne)=>{K.push(c.jsx(za,{id:L,handle:C,index:ne,style:p,wrapperStyle:G,disabled:x(L),renderItem:H,animateLayoutChanges:a,useDragOverlay:F,getNewIndex:b},L+"-"+ne));const le=B?.({key:"divider-"+ne});le&&K.push(le)});const{getPortalContainer:k}=r.useFullscreenPortal();return c.jsxs(ia,{sensors:U,collisionDetection:m,onDragStart:L=>{const{active:ne}=L;ne&&(S?.(L),ue(ne.id))},autoScroll:{canScroll:L=>!0},onDragEnd:L=>{if(ue(null),L.over){const ne=V(L.over.id);R!==ne&&(O(le=>M(le,R,ne)),I?.(R,ne))}},onDragCancel:()=>{ue(null)},measuring:A,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...f},className:gt(n,St.Wrapper),children:c.jsx(xa,{items:D,strategy:P,children:c.jsx(Cl,{ref:t,children:K})})}),F?jt.createPortal(c.jsx(ya,{adjustScale:i,dropAnimation:s,children:$?c.jsx(zo,{value:D[R],handle:C,renderItem:H,wrapperStyle:G({index:R,isDragging:!0,id:D[R]}),index:R,dragging:!0,style:p({id:D[R],index:R,isSorting:$!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),k()):null]})}));function za({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:l,id:a,index:i,onRemove:m,style:h,renderItem:s,useDragOverlay:p,wrapperStyle:b}){const{attributes:C,isDragging:u,isSorting:I,listeners:x,overIndex:A,setNodeRef:z,transform:H,transition:B}=Ta({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(zo,{ref:z,value:a,disabled:e,dragging:u,sorting:I,handle:l,renderItem:s,index:i,style:h({index:i,id:a,isDragging:u,isSorting:I,overIndex:A}),onRemove:m?()=>m(a):void 0,transform:H,transition:B,wrapperStyle:b({index:i,isDragging:u,id:a}),listeners:x,"data-index":i,"data-id":a,dragOverlay:!p&&u,...C})}const Na="_TabStrip_3x0dp_1",La=new d.Color("rgb(33, 115, 70)"),Pa="#eee",ja=e=>c.jsx(vl,{...e}),yl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,selectedTabIndex:i=0,tabNames:m=[],onSelectedTabIndexChange:h,onTabNameChange:s,onTabMove:p,createScrollStartButton:b=r.defaultCreateScrollStartButton,createScrollEndButton:C=r.defaultCreateScrollEndButton,createScrollEdgeButton:u=r.defaultCreateScrollEdgeButton,createTabButton:I=ja,createTabDivider:x,editLabelProps:A,disabled:z=!1,disableDrag:H=!1,background:B="white",activeColor:M=La,borderColor:P=Pa,borderWidth:f=1}=e,[F,S]=o.useState(i),[G,D]=o.useState(m),O=o.useCallback(ie=>{const we=k.current?.[ie]?.closest(".tab-item")??k.current?.[ie];we&&ke.current?.scrollTo({top:we.offsetTop,left:we.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{O(i)},[i]);const $=o.useCallback((ie,we)=>{we!==F&&(S(we),h?.(we)),O(we)},[h,F]),ue=o.useCallback((ie,we)=>{p?.(ie,we)},[p]),U=o.useRef(null),[V,R]=o.useState(-1),K=o.useCallback((ie,we)=>{s?.(ie,we)},[s]);o.useLayoutEffect(()=>{S(i)},[i]),o.useLayoutEffect(()=>{D(m)},[m]);const k=o.useRef([]),L=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ie){k.current?.[ie]?.startEdit()},cancel(ie){k.current?.[ie]?.cancel()}},L.current),[F,V]);const ne=o.useCallback(({value:ie,index:we,dragging:Me})=>{const{style:Se,maxLength:je,...v}=A||{},_e=c.jsx(Ur,{ref:Oe=>{k.current[we]=Oe},value:ie,disabled:z,maxLength:je,style:{color:F===we&&M?M?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...Se},styleHover:{},onSubmit:Oe=>(U.current=!1,R(-1),K(we,Oe)),onCancel:()=>{U.current=!1,R(-1)},onChange:Oe=>{U.current=!0,R(we)},...v});return I({onClick:Oe=>$(Oe,we),value:ie,index:we,editing:V===we&&U.current,editable:!0,disabled:z,selectedIndex:F,background:B,activeColor:M,borderColor:P,borderWidth:f,dragging:Me,children:_e})},[F,K,$,A,z,V,I]),[le,{width:Re}]=Ot(),[fe,{width:me}]=Ot(),ke=o.useRef(null),[We,Fe]=o.useState({left:0,top:0,width:0,height:0}),[Ve,ee]=o.useState(null);o.useEffect(()=>{Ve!==null&&ke.current&&ke.current.scrollTo({left:Ve,behavior:"smooth"})},[Ve]);const Y=o.useCallback((ie,we=!1)=>{if(!ke.current)return 0;let Me=ke.current.firstChild.getBoundingClientRect(),Se=ke.current.firstChild.firstChild.children,je=0;return je=we?0:r.ScrollUtils.getScrollTo(ie,Me.left,Se,!0,Math.max(0,ie-200)),ee(je),Math.max(0,je)},[]),ge=o.useCallback((ie,we=!1)=>{if(!ke.current)return 0;let Me=ke.current.firstChild.getBoundingClientRect(),Se=ke.current.firstChild.firstChild.children,je=0;const v=Math.ceil(me-Re);return je=we?v:r.ScrollUtils.getScrollTo(ie,Me.left,Se,!1,Math.max(0,ie+200)),ee(je),Math.min(v,je)},[me,Re]),De=o.useRef(null),X=o.useRef(null),_=o.useCallback(()=>{X.current&&(clearTimeout(X.current),X.current=null,De.current=null)},[]),re=o.useCallback((ie,we,Me=260)=>{De.current=ie,X.current=setTimeout(()=>{const Se=we?Y(De.current||ie):ge(De.current||ie);Se!==De.current?re(Se,we,120):_()},Me)},[Y,ge,_]);o.useEffect(()=>()=>_(),[_]);const pe=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(We.left)<=0||Math.floor(me-Re)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:_,onMouseLeave:_,onMouseDown:()=>re(ke.current.scrollLeft,!0),onClick:ie=>Y(Math.min(ke.current.scrollLeft,Ve??Number.MAX_SAFE_INTEGER),ie.ctrlKey)}),[We,Ve,me,Re]),se=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(me-Re)<=Math.ceil(We.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:_,onMouseLeave:_,onMouseDown:()=>re(ke.current.scrollLeft,!1),onClick:ie=>ge(Math.max(ke.current.scrollLeft,Ve??0),ie.ctrlKey)}),[We,Ve,me,Re]),Ie=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,u?.(pe)]}),[pe,se,b,C,n,u]);return c.jsxs("div",{style:{...l,display:"flex",alignItems:"stretch"},className:gt(Na,a),ref:L,children:[c.jsx("div",{style:{borderTop:`solid ${P} ${f}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Ie}),c.jsx("div",{className:"Tabs",ref:le,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:ke,onScroll:ie=>{Fe({left:ie.target.scrollLeft,top:ie.target.scrollTop,width:ie.target.scrollWidth,height:ie.target.scrollHeight})},children:c.jsx(Da,{isDisabled:ie=>z||H,items:G,strategy:ba,modifiers:[Fa],ref:fe,renderItem:ne,renderDivider:x,onMove:ue,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:u(se)})]})}));yl.displayName="TabStrip";const Nn=o.createContext(null);Nn.displayName="DocThemesContext";const Oa="_script-editor_iy654_5",Ba={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"},Va=o.lazy(()=>Promise.resolve().then(()=>require("./BpvPof6tJ_Nh2du1.cjs")));let ln,an,Ft=["define","require"],xr=!1,Ln="@0.7.7";Ln!=="@local"&&Ln!=="@0.0.0"||(Ln="");const Ha=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${Ln}/types/scripting.d.ts`,qr=async(e,t,n)=>{const l=e.getModel();if(!l)return;const a=await t.languages.typescript.getTypeScriptWorker(),i=await a(l.uri),m=await i.getNavigationTree(l.uri.toString()),h=e.getPosition();let s={...h};s.lineNumber=1,s.column=1;let p=!1;for(let A=h.lineNumber;A>=1;A--)if(l.getLineContent(A).trim()===""){const z=No(m,l.getOffsetAt({lineNumber:A,column:1}),"function");if(!z||Ka(z)){p=!0,s.lineNumber=A+1;break}{const H=z.spans[0].start;A=l.getPositionAt(H).lineNumber,s.lineNumber=A}}let b=n,C=!1;!p&&!b.startsWith(`
27
+ `},Di={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 zi(e){let{announcements:t=Di,container:n,hiddenTextDescribedById:l,screenReaderInstructions:a=Ai}=e;const{announce:i,announcement:m}=(function(){const[C,u]=o.useState("");return{announce:o.useCallback(I=>{I!=null&&u(I)},[]),announcement:C}})(),h=Cn("DndLiveRegion"),[s,p]=o.useState(!1);if(o.useEffect(()=>{p(!0)},[]),(function(C){const u=o.useContext(Wr);o.useEffect(()=>{if(!u)throw new Error("useDndMonitor must be used within a children of <DndContext>");return u(C)},[C,u])})(o.useMemo(()=>({onDragStart(C){let{active:u}=C;i(t.onDragStart({active:u}))},onDragMove(C){let{active:u,over:I}=C;t.onDragMove&&i(t.onDragMove({active:u,over:I}))},onDragOver(C){let{active:u,over:I}=C;i(t.onDragOver({active:u,over:I}))},onDragEnd(C){let{active:u,over:I}=C;i(t.onDragEnd({active:u,over:I}))},onDragCancel(C){let{active:u,over:I}=C;i(t.onDragCancel({active:u,over:I}))}}),[i,t])),!s)return null;const b=o.createElement(o.Fragment,null,o.createElement(Ei,{id:l,value:a.draggable}),o.createElement(Fi,{id:h,announcement:m}));return n?jt.createPortal(b,n):b}var ut;function Vn(){}function go(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"})(ut||(ut={}));const kt=Object.freeze({x:0,y:0});function _r(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ni(e,t){const n=Bn(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function Gr(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return n-l}function Li(e,t){let{data:{value:n}}=e,{data:{value:l}}=t;return l-n}function lr(e){let{left:t,top:n,height:l,width:a}=e;return[{x:t,y:n},{x:t+a,y:n},{x:t,y:n+l},{x:t+a,y:n+l}]}function Zr(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function ir(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 Pi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=ir(t,t.left,t.top),i=[];for(const m of l){const{id:h}=m,s=n.get(h);if(s){const p=_r(ir(s),a);i.push({id:h,data:{droppableContainer:m,value:p}})}}return i.sort(Gr)};function ji(e,t){const n=Math.max(t.top,e.top),l=Math.max(t.left,e.left),a=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),m=a-l,h=i-n;if(l<a&&n<i){const s=t.width*t.height,p=e.width*e.height,b=m*h;return Number((b/(s+p-b)).toFixed(4))}return 0}const Oi=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:l}=e;const a=[];for(const i of l){const{id:m}=i,h=n.get(m);if(h){const s=ji(h,t);s>0&&a.push({id:m,data:{droppableContainer:i,value:s}})}}return a.sort(Li)};function ar(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:kt}function Bi(e){return function(t){for(var n=arguments.length,l=new Array(n>1?n-1:0),a=1;a<n;a++)l[a-1]=arguments[a];return l.reduce((i,m)=>({...i,top:i.top+e*m.y,bottom:i.bottom+e*m.y,left:i.left+e*m.x,right:i.right+e*m.x}),{...t})}}const Vi=Bi(1);function Xr(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 Hi={ignoreTransform:!1};function Jt(e,t){t===void 0&&(t=Hi);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:p,transformOrigin:b}=Ct(e).getComputedStyle(e);p&&(n=(function(C,u,I){const x=Xr(u);if(!x)return C;const{scaleX:A,scaleY:z,x:H,y:B}=x,M=C.left-H-(1-A)*parseFloat(I),P=C.top-B-(1-z)*parseFloat(I.slice(I.indexOf(" ")+1)),f=A?C.width/A:C.width,F=z?C.height/z:C.height;return{width:f,height:F,top:P,right:M+f,bottom:P+F,left:M}})(n,p,b))}const{top:l,left:a,width:i,height:m,bottom:h,right:s}=n;return{top:l,left:a,width:i,height:m,bottom:h,right:s}}function sr(e){return Jt(e,{ignoreTransform:!0})}function Gn(e,t){const n=[];return e?(function l(a){if(t!=null&&n.length>=t||!a)return n;if(Io(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!vn(a)||Kr(a)||n.includes(a))return n;const i=Ct(e).getComputedStyle(a);return a!==e&&(function(m,h){h===void 0&&(h=Ct(m).getComputedStyle(m));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(p=>{const b=h[p];return typeof b=="string"&&s.test(b)})})(a,i)&&n.push(a),(function(m,h){return h===void 0&&(h=Ct(m).getComputedStyle(m)),h.position==="fixed"})(a,i)?n:l(a.parentNode)})(e):n}function Yr(e){const[t]=Gn(e,1);return t??null}function ho(e){return $n&&e?Yt(e)?e:To(e)?Io(e)||e===Zt(e).scrollingElement?window:vn(e)?e:null:null:null}function Jr(e){return Yt(e)?e.scrollX:e.scrollLeft}function Qr(e){return Yt(e)?e.scrollY:e.scrollTop}function Co(e){return{x:Jr(e),y:Qr(e)}}var ht;function el(e){return!(!$n||!e)&&e===document.scrollingElement}function tl(e){const t={x:0,y:0},n=el(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ht||(ht={}));const Ui={x:.2,y:.2};function Ki(e,t,n,l,a){let{top:i,left:m,right:h,bottom:s}=n;l===void 0&&(l=10),a===void 0&&(a=Ui);const{isTop:p,isBottom:b,isLeft:C,isRight:u}=tl(e),I={x:0,y:0},x={x:0,y:0},A=t.height*a.y,z=t.width*a.x;return!p&&i<=t.top+A?(I.y=ht.Backward,x.y=l*Math.abs((t.top+A-i)/A)):!b&&s>=t.bottom-A&&(I.y=ht.Forward,x.y=l*Math.abs((t.bottom-A-s)/A)),!u&&h>=t.right-z?(I.x=ht.Forward,x.x=l*Math.abs((t.right-z-h)/z)):!C&&m<=t.left+z&&(I.x=ht.Backward,x.x=l*Math.abs((t.left+z-m)/z)),{direction:I,speed:x}}function $i(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:m}=window;return{top:0,left:0,right:i,bottom:m,width:i,height:m}}const{top:t,left:n,right:l,bottom:a}=e.getBoundingClientRect();return{top:t,left:n,right:l,bottom:a,width:e.clientWidth,height:e.clientHeight}}function nl(e){return e.reduce((t,n)=>_t(t,Co(n)),kt)}function ol(e,t){if(t===void 0&&(t=Jt),!e)return;const{top:n,left:l,bottom:a,right:i}=t(e);Yr(e)&&(a<=0||i<=0||n>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Wi=[["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+Qr(n),0)}]];class yo{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 l=Gn(n),a=nl(l);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,m,h]of Wi)for(const s of m)Object.defineProperty(this,s,{get:()=>{const p=h(l),b=a[i]-p;return this.rect[s]+b},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class dn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...n)})},this.target=t}add(t,n,l){var a;(a=this.target)==null||a.addEventListener(t,n,l),this.listeners.push([t,n,l])}}function mo(e,t){const n=Math.abs(e.x),l=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+l**2)>t:"x"in t&&"y"in t?n>t.x&&l>t.y:"x"in t?n>t.x:"y"in t&&l>t.y}var qt,Je;function cr(e){e.preventDefault()}function _i(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"})(qt||(qt={})),(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"})(Je||(Je={}));const rl={start:[Je.Space,Je.Enter],cancel:[Je.Esc],end:[Je.Space,Je.Enter,Je.Tab]},Gi=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Je.Right:return{...n,x:n.x+25};case Je.Left:return{...n,x:n.x-25};case Je.Down:return{...n,y:n.y+25};case Je.Up:return{...n,y:n.y-25}}};class Eo{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 dn(Zt(n)),this.windowListeners=new dn(Ct(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(qt.Resize,this.handleCancel),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(qt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,l=t.node.current;l&&ol(l),n(kt)}handleKeyDown(t){if(_n(t)){const{active:n,context:l,options:a}=this.props,{keyboardCodes:i=rl,coordinateGetter:m=Gi,scrollBehavior:h="smooth"}=a,{code:s}=t;if(i.end.includes(s))return void this.handleEnd(t);if(i.cancel.includes(s))return void this.handleCancel(t);const{collisionRect:p}=l.current,b=p?{x:p.left,y:p.top}:kt;this.referenceCoordinates||(this.referenceCoordinates=b);const C=m(t,{active:n,context:l.current,currentCoordinates:b});if(C){const u=fn(C,b),I={x:0,y:0},{scrollableAncestors:x}=l.current;for(const A of x){const z=t.code,{isTop:H,isRight:B,isLeft:M,isBottom:P,maxScroll:f,minScroll:F}=tl(A),S=$i(A),G={x:Math.min(z===Je.Right?S.right-S.width/2:S.right,Math.max(z===Je.Right?S.left:S.left+S.width/2,C.x)),y:Math.min(z===Je.Down?S.bottom-S.height/2:S.bottom,Math.max(z===Je.Down?S.top:S.top+S.height/2,C.y))},D=z===Je.Right&&!B||z===Je.Left&&!M,O=z===Je.Down&&!P||z===Je.Up&&!H;if(D&&G.x!==C.x){const $=A.scrollLeft+u.x,ue=z===Je.Right&&$<=f.x||z===Je.Left&&$>=F.x;if(ue&&!u.y)return void A.scrollTo({left:$,behavior:h});I.x=ue?A.scrollLeft-$:z===Je.Right?A.scrollLeft-f.x:A.scrollLeft-F.x,I.x&&A.scrollBy({left:-I.x,behavior:h});break}if(O&&G.y!==C.y){const $=A.scrollTop+u.y,ue=z===Je.Down&&$<=f.y||z===Je.Up&&$>=F.y;if(ue&&!u.x)return void A.scrollTo({top:$,behavior:h});I.y=ue?A.scrollTop-$:z===Je.Down?A.scrollTop-f.y:A.scrollTop-F.y,I.y&&A.scrollBy({top:-I.y,behavior:h});break}}this.handleMove(t,_t(fn(C,this.referenceCoordinates),I))}}}handleMove(t,n){const{onMove:l}=this.props;t.preventDefault(),l(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 dr(e){return!!(e&&"distance"in e)}function ur(e){return!!(e&&"delay"in e)}Eo.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:l=rl,onActivation:a}=t,{active:i}=n;const{code:m}=e.nativeEvent;if(l.start.includes(m)){const h=i.activatorNode.current;return(!h||e.target===h)&&(e.preventDefault(),a?.({event:e.nativeEvent}),!0)}return!1}}];class Fo{constructor(t,n,l){var a;l===void 0&&(l=(function(h){const{EventTarget:s}=Ct(h);return h instanceof s?h:Zt(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:i}=t,{target:m}=i;this.props=t,this.events=n,this.document=Zt(m),this.documentListeners=new dn(this.document),this.listeners=new dn(l),this.windowListeners=new dn(Ct(m)),this.initialCoordinates=(a=Bn(i))!=null?a:kt,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:l}}}=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(qt.Resize,this.handleCancel),this.windowListeners.add(qt.DragStart,cr),this.windowListeners.add(qt.VisibilityChange,this.handleCancel),this.windowListeners.add(qt.ContextMenu,cr),this.documentListeners.add(qt.Keydown,this.handleKeydown),n){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ur(n))return this.timeoutId=setTimeout(this.handleStart,n.delay),void this.handlePending(n);if(dr(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:l,onPending:a}=this.props;a(l,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(qt.Click,_i,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(qt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:l,initialCoordinates:a,props:i}=this,{onMove:m,options:{activationConstraint:h}}=i;if(!a)return;const s=(n=Bn(t))!=null?n:kt,p=fn(a,s);if(!l&&h){if(dr(h)){if(h.tolerance!=null&&mo(p,h.tolerance))return this.handleCancel();if(mo(p,h.distance))return this.handleStart()}return ur(h)&&mo(p,h.tolerance)?this.handleCancel():void this.handlePending(h,p)}t.cancelable&&t.preventDefault(),m(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===Je.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Zi={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ll extends Fo{constructor(t){const{event:n}=t,l=Zt(n.target);super(t,Zi,l)}}ll.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return!(!n.isPrimary||n.button!==0)&&(l?.({event:n}),!0)}}];const Xi={move:{name:"mousemove"},end:{name:"mouseup"}};var wo;(function(e){e[e.RightClick=2]="RightClick"})(wo||(wo={}));class il extends Fo{constructor(t){super(t,Xi,Zt(t.event.target))}}il.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;return n.button!==wo.RightClick&&(l?.({event:n}),!0)}}];const fo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class al extends Fo{constructor(t){super(t,fo)}static setup(){return window.addEventListener(fo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(fo.move.name,t)};function t(){}}}var un,Hn;function Yi(e){let{acceleration:t,activator:n=un.Pointer,canScroll:l,draggingRect:a,enabled:i,interval:m=5,order:h=Hn.TreeOrder,pointerCoordinates:s,scrollableAncestors:p,scrollableAncestorRects:b,delta:C,threshold:u}=e;const I=(function(F){let{delta:S,disabled:G}=F;const D=On(S);return cn(O=>{if(G||!D||!O)return Ji;const $={x:Math.sign(S.x-D.x),y:Math.sign(S.y-D.y)};return{x:{[ht.Backward]:O.x[ht.Backward]||$.x===-1,[ht.Forward]:O.x[ht.Forward]||$.x===1},y:{[ht.Backward]:O.y[ht.Backward]||$.y===-1,[ht.Forward]:O.y[ht.Forward]||$.y===1}}},[G,S,D])})({delta:C,disabled:!i}),[x,A]=(function(){const F=o.useRef(null);return[o.useCallback((S,G)=>{F.current=setInterval(S,G)},[]),o.useCallback(()=>{F.current!==null&&(clearInterval(F.current),F.current=null)},[])]})(),z=o.useRef({x:0,y:0}),H=o.useRef({x:0,y:0}),B=o.useMemo(()=>{switch(n){case un.Pointer:return s?{top:s.y,bottom:s.y,left:s.x,right:s.x}:null;case un.DraggableRect:return a}},[n,a,s]),M=o.useRef(null),P=o.useCallback(()=>{const F=M.current;if(!F)return;const S=z.current.x*H.current.x,G=z.current.y*H.current.y;F.scrollBy(S,G)},[]),f=o.useMemo(()=>h===Hn.TreeOrder?[...p].reverse():p,[h,p]);o.useEffect(()=>{if(i&&p.length&&B){for(const F of f){if(l?.(F)===!1)continue;const S=p.indexOf(F),G=b[S];if(!G)continue;const{direction:D,speed:O}=Ki(F,G,B,t,u);for(const $ of["x","y"])I[$][D[$]]||(O[$]=0,D[$]=0);if(O.x>0||O.y>0)return A(),M.current=F,x(P,m),z.current=O,void(H.current=D)}z.current={x:0,y:0},H.current={x:0,y:0},A()}else A()},[t,P,l,A,i,m,JSON.stringify(B),JSON.stringify(I),x,p,f,b,JSON.stringify(u)])}al.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:l}=t;const{touches:a}=n;return!(a.length>1)&&(l?.({event:n}),!0)}}],(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(un||(un={})),(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));const Ji={x:{[ht.Backward]:!1,[ht.Forward]:!1},y:{[ht.Backward]:!1,[ht.Forward]:!1}};var pn,bo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(pn||(pn={})),(function(e){e.Optimized="optimized"})(bo||(bo={}));const gr=new Map;function xo(e,t){return cn(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Un(e){let{callback:t,disabled:n}=e;const l=Wn(t),a=o.useMemo(()=>{if(n||typeof window>"u"||window.ResizeObserver===void 0)return;const{ResizeObserver:i}=window;return new i(l)},[n]);return o.useEffect(()=>()=>a?.disconnect(),[a]),a}function Qi(e){return new yo(Jt(e),e)}function hr(e,t,n){t===void 0&&(t=Qi);const[l,a]=o.useState(null);function i(){a(s=>{if(!e)return null;var p;if(e.isConnected===!1)return(p=s??n)!=null?p:null;const b=t(e);return JSON.stringify(s)===JSON.stringify(b)?s:b})}const m=(function(s){let{callback:p,disabled:b}=s;const C=Wn(p),u=o.useMemo(()=>{if(b||typeof window>"u"||window.MutationObserver===void 0)return;const{MutationObserver:I}=window;return new I(C)},[C,b]);return o.useEffect(()=>()=>u?.disconnect(),[u]),u})({callback(s){if(e)for(const p of s){const{type:b,target:C}=p;if(b==="childList"&&C instanceof HTMLElement&&C.contains(e)){i();break}}}}),h=Un({callback:i});return Rt(()=>{i(),e?(h?.observe(e),m?.observe(document.body,{childList:!0,subtree:!0})):(h?.disconnect(),m?.disconnect())},[e]),l}const mr=[];function fr(e,t){t===void 0&&(t=[]);const n=o.useRef(null);return o.useEffect(()=>{n.current=null},t),o.useEffect(()=>{const l=e!==kt;l&&!n.current&&(n.current=e),!l&&n.current&&(n.current=null)},[e]),n.current?fn(e,n.current):kt}function pr(e){return o.useMemo(()=>e?(function(t){const n=t.innerWidth,l=t.innerHeight;return{top:0,left:0,right:n,bottom:l,width:n,height:l}})(e):null,[e])}const vr=[];function sl(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vn(t)?t:e}const ea=[{sensor:ll,options:{}},{sensor:Eo,options:{}}],ta={current:{}},zn={draggable:{measure:sr},droppable:{measure:sr,strategy:pn.WhileDragging,frequency:bo.Optimized},dragOverlay:{measure:Jt}};class gn extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,l;return(n=(l=this.get(t))==null?void 0:l.node.current)!=null?n:void 0}}const na={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new gn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Vn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:zn,measureDroppableContainers:Vn,windowRect:null,measuringScheduled:!1},cl={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Vn,draggableNodes:new Map,over:null,measureDroppableContainers:Vn},yn=o.createContext(cl),dl=o.createContext(na);function oa(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new gn}}}function ra(e,t){switch(t.type){case ut.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ut.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 ut.DragEnd:case ut.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ut.RegisterDroppable:{const{element:n}=t,{id:l}=n,a=new gn(e.droppable.containers);return a.set(l,n),{...e,droppable:{...e.droppable,containers:a}}}case ut.SetDroppableDisabled:{const{id:n,key:l,disabled:a}=t,i=e.droppable.containers.get(n);if(!i||l!==i.key)return e;const m=new gn(e.droppable.containers);return m.set(n,{...i,disabled:a}),{...e,droppable:{...e.droppable,containers:m}}}case ut.UnregisterDroppable:{const{id:n,key:l}=t,a=e.droppable.containers.get(n);if(!a||l!==a.key)return e;const i=new gn(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function la(e){let{disabled:t}=e;const{active:n,activatorEvent:l,draggableNodes:a}=o.useContext(yn),i=On(l),m=On(n?.id);return o.useEffect(()=>{if(!t&&!l&&i&&m!=null){if(!_n(i)||document.activeElement===i.target)return;const h=a.get(m);if(!h)return;const{activatorNode:s,node:p}=h;if(!s.current&&!p.current)return;requestAnimationFrame(()=>{for(const b of[s.current,p.current]){if(!b)continue;const C=Ti(b);if(C){C.focus();break}}})}},[l,t,a,m,i]),null}function ul(e,t){let{transform:n,...l}=t;return e!=null&&e.length?e.reduce((a,i)=>i({transform:a,...l}),n):n}const Zn=o.createContext({...kt,scaleX:1,scaleY:1});var At;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(At||(At={}));const ia=o.memo(function(e){var t,n,l,a;let{id:i,accessibility:m,autoScroll:h=!0,children:s,sensors:p=ea,collisionDetection:b=Oi,measuring:C,modifiers:u,...I}=e;const x=o.useReducer(ra,void 0,oa),[A,z]=x,[H,B]=(function(){const[w]=o.useState(()=>new Set),E=o.useCallback(W=>(w.add(W),()=>w.delete(W)),[w]);return[o.useCallback(W=>{let{type:oe,event:ce}=W;w.forEach(de=>{var te;return(te=de[oe])==null?void 0:te.call(de,ce)})},[w]),E]})(),[M,P]=o.useState(At.Uninitialized),f=M===At.Initialized,{draggable:{active:F,nodes:S,translate:G},droppable:{containers:D}}=A,O=F!=null?S.get(F):null,$=o.useRef({initial:null,translated:null}),ue=o.useMemo(()=>{var w;return F!=null?{id:F,data:(w=O?.data)!=null?w:ta,rect:$}:null},[F,O]),U=o.useRef(null),[V,R]=o.useState(null),[K,k]=o.useState(null),L=mn(I,Object.values(I)),ne=Cn("DndDescribedBy",i),le=o.useMemo(()=>D.getEnabled(),[D]),Re=(fe=C,o.useMemo(()=>({draggable:{...zn.draggable,...fe?.draggable},droppable:{...zn.droppable,...fe?.droppable},dragOverlay:{...zn.dragOverlay,...fe?.dragOverlay}}),[fe?.draggable,fe?.droppable,fe?.dragOverlay]));var fe;const{droppableRects:me,measureDroppableContainers:ke,measuringScheduled:We}=(function(w,E){let{dragging:W,dependencies:oe,config:ce}=E;const[de,te]=o.useState(null),{frequency:Ce,measure:ve,strategy:ye}=ce,He=o.useRef(w),Ee=(function(){switch(ye){case pn.Always:return!1;case pn.BeforeDragging:return W;default:return!W}})(),ze=mn(Ee),Le=o.useCallback(function(et){et===void 0&&(et=[]),ze.current||te(Pe=>Pe===null?et:Pe.concat(et.filter(Xe=>!Pe.includes(Xe))))},[ze]),$e=o.useRef(null),Ue=cn(et=>{if(Ee&&!W)return gr;if(!et||et===gr||He.current!==w||de!=null){const Pe=new Map;for(let Xe of w){if(!Xe)continue;if(de&&de.length>0&&!de.includes(Xe.id)&&Xe.rect.current){Pe.set(Xe.id,Xe.rect.current);continue}const st=Xe.node.current,bt=st?new yo(ve(st),st):null;Xe.rect.current=bt,bt&&Pe.set(Xe.id,bt)}return Pe}return et},[w,de,W,Ee,ve]);return o.useEffect(()=>{He.current=w},[w]),o.useEffect(()=>{Ee||Le()},[W,Ee]),o.useEffect(()=>{de&&de.length>0&&te(null)},[JSON.stringify(de)]),o.useEffect(()=>{Ee||typeof Ce!="number"||$e.current!==null||($e.current=setTimeout(()=>{Le(),$e.current=null},Ce))},[Ce,Ee,Le,...oe]),{droppableRects:Ue,measureDroppableContainers:Le,measuringScheduled:de!=null}})(le,{dragging:f,dependencies:[G.x,G.y],config:Re.droppable}),Fe=(function(w,E){const W=E!=null?w.get(E):void 0,oe=W?W.node.current:null;return cn(ce=>{var de;return E==null?null:(de=oe??ce)!=null?de:null},[oe,E])})(S,F),Ve=o.useMemo(()=>K?Bn(K):null,[K]),ee=(function(){const w=V?.autoScrollEnabled===!1,E=typeof h=="object"?h.enabled===!1:h===!1,W=f&&!w&&!E;return typeof h=="object"?{...h,enabled:W}:{enabled:W}})(),Y=(function(w,E){return xo(w,E)})(Fe,Re.draggable.measure);(function(w){let{activeNode:E,measure:W,initialRect:oe,config:ce=!0}=w;const de=o.useRef(!1),{x:te,y:Ce}=typeof ce=="boolean"?{x:ce,y:ce}:ce;Rt(()=>{if(!te&&!Ce||!E)return void(de.current=!1);if(de.current||!oe)return;const ve=E?.node.current;if(!ve||ve.isConnected===!1)return;const ye=ar(W(ve),oe);if(te||(ye.x=0),Ce||(ye.y=0),de.current=!0,Math.abs(ye.x)>0||Math.abs(ye.y)>0){const He=Yr(ve);He&&He.scrollBy({top:ye.y,left:ye.x})}},[E,te,Ce,oe,W])})({activeNode:F!=null?S.get(F):null,config:ee.layoutShiftCompensation,initialRect:Y,measure:Re.draggable.measure});const ge=hr(Fe,Re.draggable.measure,Y),De=hr(Fe?Fe.parentElement:null),X=o.useRef({activatorEvent:null,active:null,activeNode:Fe,collisionRect:null,collisions:null,droppableRects:me,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),_=D.getNodeFor((t=X.current.over)==null?void 0:t.id),re=(function(w){let{measure:E}=w;const[W,oe]=o.useState(null),ce=Un({callback:o.useCallback(ve=>{for(const{target:ye}of ve)if(vn(ye)){oe(He=>{const Ee=E(ye);return He?{...He,width:Ee.width,height:Ee.height}:Ee});break}},[E])}),de=o.useCallback(ve=>{const ye=sl(ve);ce?.disconnect(),ye&&ce?.observe(ye),oe(ye?E(ye):null)},[E,ce]),[te,Ce]=jn(de);return o.useMemo(()=>({nodeRef:te,rect:W,setRef:Ce}),[W,te,Ce])})({measure:Re.dragOverlay.measure}),pe=(n=re.nodeRef.current)!=null?n:Fe,se=f?(l=re.rect)!=null?l:ge:null,Ie=!!(re.nodeRef.current&&re.rect),ie=ar(we=Ie?null:ge,xo(we));var we;const Me=pr(pe?Ct(pe):null),Se=(function(w){const E=o.useRef(w),W=cn(oe=>w?oe&&oe!==mr&&w&&E.current&&w.parentNode===E.current.parentNode?oe:Gn(w):mr,[w]);return o.useEffect(()=>{E.current=w},[w]),W})(f?_??Fe:null),je=(function(w,E){E===void 0&&(E=Jt);const[W]=w,oe=pr(W?Ct(W):null),[ce,de]=o.useState(vr);function te(){de(()=>w.length?w.map(ve=>el(ve)?oe:new yo(E(ve),ve)):vr)}const Ce=Un({callback:te});return Rt(()=>{Ce?.disconnect(),te(),w.forEach(ve=>Ce?.observe(ve))},[w]),ce})(Se),v=ul(u,{transform:{x:G.x-ie.x,y:G.y-ie.y,scaleX:1,scaleY:1},activatorEvent:K,active:ue,activeNodeRect:ge,containerNodeRect:De,draggingNodeRect:se,over:X.current.over,overlayNodeRect:re.rect,scrollableAncestors:Se,scrollableAncestorRects:je,windowRect:Me}),_e=Ve?_t(Ve,G):null,Oe=(function(w){const[E,W]=o.useState(null),oe=o.useRef(w),ce=o.useCallback(de=>{const te=ho(de.target);te&&W(Ce=>Ce?(Ce.set(te,Co(te)),new Map(Ce)):null)},[]);return o.useEffect(()=>{const de=oe.current;if(w!==de){te(de);const Ce=w.map(ve=>{const ye=ho(ve);return ye?(ye.addEventListener("scroll",ce,{passive:!0}),[ye,Co(ye)]):null}).filter(ve=>ve!=null);W(Ce.length?new Map(Ce):null),oe.current=w}return()=>{te(w),te(de)};function te(Ce){Ce.forEach(ve=>{const ye=ho(ve);ye?.removeEventListener("scroll",ce)})}},[ce,w]),o.useMemo(()=>w.length?E?Array.from(E.values()).reduce((de,te)=>_t(de,te),kt):nl(w):kt,[w,E])})(Se),Qe=fr(Oe),ae=fr(Oe,[ge]),Te=_t(v,Qe),Ne=se?Vi(se,v):null,Ae=ue&&Ne?b({active:ue,collisionRect:Ne,droppableRects:me,droppableContainers:le,pointerCoordinates:_e}):null,xe=Zr(Ae,"id"),[N,J]=o.useState(null),j=(function(w,E,W){return{...w,scaleX:E&&W?E.width/W.width:1,scaleY:E&&W?E.height/W.height:1}})(Ie?v:_t(v,ae),(a=N?.rect)!=null?a:null,ge),Z=o.useRef(null),qe=o.useCallback((w,E)=>{let{sensor:W,options:oe}=E;if(U.current==null)return;const ce=S.get(U.current);if(!ce)return;const de=w.nativeEvent,te=new W({active:U.current,activeNode:ce,event:de,options:oe,context:X,onAbort(ve){if(!S.get(ve))return;const{onDragAbort:ye}=L.current,He={id:ve};ye?.(He),H({type:"onDragAbort",event:He})},onPending(ve,ye,He,Ee){if(!S.get(ve))return;const{onDragPending:ze}=L.current,Le={id:ve,constraint:ye,initialCoordinates:He,offset:Ee};ze?.(Le),H({type:"onDragPending",event:Le})},onStart(ve){const ye=U.current;if(ye==null)return;const He=S.get(ye);if(!He)return;const{onDragStart:Ee}=L.current,ze={activatorEvent:de,active:{id:ye,data:He.data,rect:$}};jt.unstable_batchedUpdates(()=>{Ee?.(ze),P(At.Initializing),z({type:ut.DragStart,initialCoordinates:ve,active:ye}),H({type:"onDragStart",event:ze}),R(Z.current),k(de)})},onMove(ve){z({type:ut.DragMove,coordinates:ve})},onEnd:Ce(ut.DragEnd),onCancel:Ce(ut.DragCancel)});function Ce(ve){return async function(){const{active:ye,collisions:He,over:Ee,scrollAdjustedTranslate:ze}=X.current;let Le=null;if(ye&&ze){const{cancelDrop:$e}=L.current;Le={activatorEvent:de,active:ye,collisions:He,delta:ze,over:Ee},ve===ut.DragEnd&&typeof $e=="function"&&await Promise.resolve($e(Le))&&(ve=ut.DragCancel)}U.current=null,jt.unstable_batchedUpdates(()=>{z({type:ve}),P(At.Uninitialized),J(null),R(null),k(null),Z.current=null;const $e=ve===ut.DragEnd?"onDragEnd":"onDragCancel";if(Le){const Ue=L.current[$e];Ue?.(Le),H({type:$e,event:Le})}})}}Z.current=te},[S]),g=o.useCallback((w,E)=>(W,oe)=>{const ce=W.nativeEvent,de=S.get(oe);if(U.current!==null||!de||ce.dndKit||ce.defaultPrevented)return;const te={active:de};w(W,E.options,te)===!0&&(ce.dndKit={capturedBy:E.sensor},U.current=oe,qe(W,E))},[S,qe]),T=(function(w,E){return o.useMemo(()=>w.reduce((W,oe)=>{const{sensor:ce}=oe;return[...W,...ce.activators.map(de=>({eventName:de.eventName,handler:E(de.handler,oe)}))]},[]),[w,E])})(p,g);(function(w){o.useEffect(()=>{if(!$n)return;const E=w.map(W=>{let{sensor:oe}=W;return oe.setup==null?void 0:oe.setup()});return()=>{for(const W of E)W?.()}},w.map(E=>{let{sensor:W}=E;return W}))})(p),Rt(()=>{ge&&M===At.Initializing&&P(At.Initialized)},[ge,M]),o.useEffect(()=>{const{onDragMove:w}=L.current,{active:E,activatorEvent:W,collisions:oe,over:ce}=X.current;if(!E||!W)return;const de={active:E,activatorEvent:W,collisions:oe,delta:{x:Te.x,y:Te.y},over:ce};jt.unstable_batchedUpdates(()=>{w?.(de),H({type:"onDragMove",event:de})})},[Te.x,Te.y]),o.useEffect(()=>{const{active:w,activatorEvent:E,collisions:W,droppableContainers:oe,scrollAdjustedTranslate:ce}=X.current;if(!w||U.current==null||!E||!ce)return;const{onDragOver:de}=L.current,te=oe.get(xe),Ce=te&&te.rect.current?{id:te.id,rect:te.rect.current,data:te.data,disabled:te.disabled}:null,ve={active:w,activatorEvent:E,collisions:W,delta:{x:ce.x,y:ce.y},over:Ce};jt.unstable_batchedUpdates(()=>{J(Ce),de?.(ve),H({type:"onDragOver",event:ve})})},[xe]),Rt(()=>{X.current={activatorEvent:K,active:ue,activeNode:Fe,collisionRect:Ne,collisions:Ae,droppableRects:me,draggableNodes:S,draggingNode:pe,draggingNodeRect:se,droppableContainers:D,over:N,scrollableAncestors:Se,scrollAdjustedTranslate:Te},$.current={initial:se,translated:Ne}},[ue,Fe,Ae,Ne,S,pe,se,me,D,N,Se,Te]),Yi({...ee,delta:G,draggingRect:Ne,pointerCoordinates:_e,scrollableAncestors:Se,scrollableAncestorRects:je});const q=o.useMemo(()=>({active:ue,activeNode:Fe,activeNodeRect:ge,activatorEvent:K,collisions:Ae,containerNodeRect:De,dragOverlay:re,draggableNodes:S,droppableContainers:D,droppableRects:me,over:N,measureDroppableContainers:ke,scrollableAncestors:Se,scrollableAncestorRects:je,measuringConfiguration:Re,measuringScheduled:We,windowRect:Me}),[ue,Fe,ge,K,Ae,De,re,S,D,me,N,ke,Se,je,Re,We,Me]),y=o.useMemo(()=>({activatorEvent:K,activators:T,active:ue,activeNodeRect:ge,ariaDescribedById:{draggable:ne},dispatch:z,draggableNodes:S,over:N,measureDroppableContainers:ke}),[K,T,ue,ge,z,ne,S,N,ke]);return o.createElement(Wr.Provider,{value:B},o.createElement(yn.Provider,{value:y},o.createElement(dl.Provider,{value:q},o.createElement(Zn.Provider,{value:j},s)),o.createElement(la,{disabled:m?.restoreFocus===!1})),o.createElement(zi,{...m,hiddenTextDescribedById:ne}))}),aa=o.createContext(null),Cr="button";function sa(e){let{id:t,data:n,disabled:l=!1,attributes:a}=e;const i=Cn("Draggable"),{activators:m,activatorEvent:h,active:s,activeNodeRect:p,ariaDescribedById:b,draggableNodes:C,over:u}=o.useContext(yn),{role:I=Cr,roleDescription:x="draggable",tabIndex:A=0}=a??{},z=s?.id===t,H=o.useContext(z?Zn:aa),[B,M]=jn(),[P,f]=jn(),F=(function(G,D){return o.useMemo(()=>G.reduce((O,$)=>{let{eventName:ue,handler:U}=$;return O[ue]=V=>{U(V,D)},O},{}),[G,D])})(m,t),S=mn(n);return Rt(()=>(C.set(t,{id:t,key:i,node:B,activatorNode:P,data:S}),()=>{const G=C.get(t);G&&G.key===i&&C.delete(t)}),[C,t]),{active:s,activatorEvent:h,activeNodeRect:p,attributes:o.useMemo(()=>({role:I,tabIndex:A,"aria-disabled":l,"aria-pressed":!(!z||I!==Cr)||void 0,"aria-roledescription":x,"aria-describedby":b.draggable}),[l,I,A,z,x,b.draggable]),isDragging:z,listeners:l?void 0:F,node:B,over:u,setNodeRef:M,setActivatorNodeRef:f,transform:H}}function gl(){return o.useContext(dl)}const ca={timeout:25};function da(e){let{animation:t,children:n}=e;const[l,a]=o.useState(null),[i,m]=o.useState(null),h=On(n);return n||l||!h||a(h),Rt(()=>{if(!i)return;const s=l?.key,p=l?.props.id;s!=null&&p!=null?Promise.resolve(t(p,i)).then(()=>{a(null)}):a(null)},[t,l,i]),o.createElement(o.Fragment,null,n,l?o.cloneElement(l,{ref:m}):null)}const ua={x:0,y:0,scaleX:1,scaleY:1};function ga(e){let{children:t}=e;return o.createElement(yn.Provider,{value:cl},o.createElement(Zn.Provider,{value:ua},t))}const ha={position:"fixed",touchAction:"none"},ma=e=>_n(e)?"transform 250ms ease":void 0,fa=o.forwardRef((e,t)=>{let{as:n,activatorEvent:l,adjustScale:a,children:i,className:m,rect:h,style:s,transform:p,transition:b=ma}=e;if(!h)return null;const C=a?p:{...p,scaleX:1,scaleY:1},u={...ha,width:h.width,height:h.height,top:h.top,left:h.left,transform:Bt.Transform.toString(C),transformOrigin:a&&l?Ni(l,h):void 0,transition:typeof b=="function"?b(l):b,...s};return o.createElement(n,{className:m,style:u,ref:t},i)}),pa=e=>t=>{let{active:n,dragOverlay:l}=t;const a={},{styles:i,className:m}=e;if(i!=null&&i.active)for(const[h,s]of Object.entries(i.active))s!==void 0&&(a[h]=n.node.style.getPropertyValue(h),n.node.style.setProperty(h,s));if(i!=null&&i.dragOverlay)for(const[h,s]of Object.entries(i.dragOverlay))s!==void 0&&l.node.style.setProperty(h,s);return m!=null&&m.active&&n.node.classList.add(m.active),m!=null&&m.dragOverlay&&l.node.classList.add(m.dragOverlay),function(){for(const[h,s]of Object.entries(a))n.node.style.setProperty(h,s);m!=null&&m.active&&n.node.classList.remove(m.active)}},hl={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Bt.Transform.toString(t)},{transform:Bt.Transform.toString(n)}]},sideEffects:pa({styles:{active:{opacity:"0"}}})};function va(e){let{config:t,draggableNodes:n,droppableContainers:l,measuringConfiguration:a}=e;return Wn((i,m)=>{if(t===null)return;const h=n.get(i);if(!h)return;const s=h.node.current;if(!s)return;const p=sl(m);if(!p)return;const{transform:b}=Ct(m).getComputedStyle(m),C=Xr(b);if(!C)return;const u=typeof t=="function"?t:(function(I){const{duration:x,easing:A,sideEffects:z,keyframes:H}={...hl,...I};return B=>{let{active:M,dragOverlay:P,transform:f,...F}=B;if(!x)return;const S={x:P.rect.left-M.rect.left,y:P.rect.top-M.rect.top},G={scaleX:f.scaleX!==1?M.rect.width*f.scaleX/P.rect.width:1,scaleY:f.scaleY!==1?M.rect.height*f.scaleY/P.rect.height:1},D={x:f.x-S.x,y:f.y-S.y,...G},O=H({...F,active:M,dragOverlay:P,transform:{initial:f,final:D}}),[$]=O,ue=O[O.length-1];if(JSON.stringify($)===JSON.stringify(ue))return;const U=z?.({active:M,dragOverlay:P,...F}),V=P.node.animate(O,{duration:x,easing:A,fill:"forwards"});return new Promise(R=>{V.onfinish=()=>{U?.(),R()}})}})(t);return ol(s,a.draggable.measure),u({active:{id:i,data:h.data,node:s,rect:a.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:m,rect:a.dragOverlay.measure(p)},droppableContainers:l,measuringConfiguration:a,transform:C})})}let yr=0;function Ca(e){return o.useMemo(()=>{if(e!=null)return yr++,yr},[e])}const ya=o.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:l,style:a,transition:i,modifiers:m,wrapperElement:h="div",className:s,zIndex:p=999}=e;const{activatorEvent:b,active:C,activeNodeRect:u,containerNodeRect:I,draggableNodes:x,droppableContainers:A,dragOverlay:z,over:H,measuringConfiguration:B,scrollableAncestors:M,scrollableAncestorRects:P,windowRect:f}=gl(),F=o.useContext(Zn),S=Ca(C?.id),G=ul(m,{activatorEvent:b,active:C,activeNodeRect:u,containerNodeRect:I,draggingNodeRect:z.rect,over:H,overlayNodeRect:z.rect,scrollableAncestors:M,scrollableAncestorRects:P,transform:F,windowRect:f}),D=xo(u),O=va({config:l,draggableNodes:x,droppableContainers:A,measuringConfiguration:B}),$=D?z.setRef:void 0;return o.createElement(ga,null,o.createElement(da,{animation:O},C&&S?o.createElement(fa,{key:S,id:C.id,ref:$,as:h,activatorEvent:b,adjustScale:t,className:s,transition:i,rect:D,style:{zIndex:p,...a},transform:G},n):null))});function Ao(e,t,n){const l=e.slice();return l.splice(n<0?l.length+n:n,0,l.splice(t,1)[0]),l}function wa(e,t){return e.reduce((n,l,a)=>{const i=t.get(l);return i&&(n[a]=i),n},Array(e.length))}function An(e){return e!==null&&e>=0}const Dn={scaleX:1,scaleY:1},ba=e=>{var t;let{rects:n,activeNodeRect:l,activeIndex:a,overIndex:i,index:m}=e;const h=(t=n[a])!=null?t:l;if(!h)return null;const s=(function(p,b,C){const u=p[b],I=p[b-1],x=p[b+1];return!u||!I&&!x?0:C<b?I?u.left-(I.left+I.width):x.left-(u.left+u.width):x?x.left-(u.left+u.width):u.left-(I.left+I.width)})(n,m,a);if(m===a){const p=n[i];return p?{x:a<i?p.left+p.width-(h.left+h.width):p.left-h.left,y:0,...Dn}:null}return m>a&&m<=i?{x:-h.width-s,y:0,...Dn}:m<a&&m>=i?{x:h.width+s,y:0,...Dn}:{x:0,y:0,...Dn}},Do=e=>{let{rects:t,activeIndex:n,overIndex:l,index:a}=e;const i=Ao(t,l,n),m=t[a],h=i[a];return h&&m?{x:h.left-m.left,y:h.top-m.top,scaleX:h.width/m.width,scaleY:h.height/m.height}:null},ml="Sortable",fl=o.createContext({activeIndex:-1,containerId:ml,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Do,disabled:{draggable:!1,droppable:!1}});function xa(e){let{children:t,id:n,items:l,strategy:a=Do,disabled:i=!1}=e;const{active:m,dragOverlay:h,droppableRects:s,over:p,measureDroppableContainers:b}=gl(),C=Cn(ml,n),u=h.rect!==null,I=o.useMemo(()=>l.map(F=>typeof F=="object"&&"id"in F?F.id:F),[l]),x=m!=null,A=m?I.indexOf(m.id):-1,z=p?I.indexOf(p.id):-1,H=o.useRef(I),B=!(function(F,S){if(F===S)return!0;if(F.length!==S.length)return!1;for(let G=0;G<F.length;G++)if(F[G]!==S[G])return!1;return!0})(I,H.current),M=z!==-1&&A===-1||B,P=(function(F){return typeof F=="boolean"?{draggable:F,droppable:F}:F})(i);Rt(()=>{B&&x&&b(I)},[B,I,x,b]),o.useEffect(()=>{H.current=I},[I]);const f=o.useMemo(()=>({activeIndex:A,containerId:C,disabled:P,disableTransforms:M,items:I,overIndex:z,useDragOverlay:u,sortedRects:wa(I,s),strategy:a}),[A,C,P.draggable,P.droppable,M,I,z,s,u,a]);return o.createElement(fl.Provider,{value:f},t)}const qa=e=>{let{id:t,items:n,activeIndex:l,overIndex:a}=e;return Ao(n,l,a).indexOf(t)},Sa=e=>{let{containerId:t,isSorting:n,wasDragging:l,index:a,items:i,newIndex:m,previousItems:h,previousContainerId:s,transition:p}=e;return!(!p||!l)&&(h===i||a!==m)&&(!!n||m!==a&&t===s)},Ra={duration:200,easing:"ease"},pl="transform",ka=Bt.Transition.toString({property:pl,duration:0,easing:"linear"}),Ma={roleDescription:"sortable"};function Ta(e){let{animateLayoutChanges:t=Sa,attributes:n,disabled:l,data:a,getNewIndex:i=qa,id:m,strategy:h,resizeObserverConfig:s,transition:p=Ra}=e;const{items:b,containerId:C,activeIndex:u,disabled:I,disableTransforms:x,sortedRects:A,overIndex:z,useDragOverlay:H,strategy:B}=o.useContext(fl),M=(function(_,re){var pe,se;return typeof _=="boolean"?{draggable:_,droppable:!1}:{draggable:(pe=_?.draggable)!=null?pe:re.draggable,droppable:(se=_?.droppable)!=null?se:re.droppable}})(l,I),P=b.indexOf(m),f=o.useMemo(()=>({sortable:{containerId:C,index:P,items:b},...a}),[C,a,P,b]),F=o.useMemo(()=>b.slice(b.indexOf(m)),[b,m]),{rect:S,node:G,isOver:D,setNodeRef:O}=(function(_){let{data:re,disabled:pe=!1,id:se,resizeObserverConfig:Ie}=_;const ie=Cn("Droppable"),{active:we,dispatch:Me,over:Se,measureDroppableContainers:je}=o.useContext(yn),v=o.useRef({disabled:pe}),_e=o.useRef(!1),Oe=o.useRef(null),Qe=o.useRef(null),{disabled:ae,updateMeasurementsFor:Te,timeout:Ne}={...ca,...Ie},Ae=mn(Te??se),xe=Un({callback:o.useCallback(()=>{_e.current?(Qe.current!=null&&clearTimeout(Qe.current),Qe.current=setTimeout(()=>{je(Array.isArray(Ae.current)?Ae.current:[Ae.current]),Qe.current=null},Ne)):_e.current=!0},[Ne]),disabled:ae||!we}),N=o.useCallback((qe,g)=>{xe&&(g&&(xe.unobserve(g),_e.current=!1),qe&&xe.observe(qe))},[xe]),[J,j]=jn(N),Z=mn(re);return o.useEffect(()=>{xe&&J.current&&(xe.disconnect(),_e.current=!1,xe.observe(J.current))},[J,xe]),o.useEffect(()=>(Me({type:ut.RegisterDroppable,element:{id:se,key:ie,disabled:pe,node:J,rect:Oe,data:Z}}),()=>Me({type:ut.UnregisterDroppable,key:ie,id:se})),[se]),o.useEffect(()=>{pe!==v.current.disabled&&(Me({type:ut.SetDroppableDisabled,id:se,key:ie,disabled:pe}),v.current.disabled=pe)},[se,ie,pe,Me]),{active:we,rect:Oe,isOver:Se?.id===se,node:J,over:Se,setNodeRef:j}})({id:m,data:f,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:F,...s}}),{active:$,activatorEvent:ue,activeNodeRect:U,attributes:V,setNodeRef:R,listeners:K,isDragging:k,over:L,setActivatorNodeRef:ne,transform:le}=sa({id:m,data:f,attributes:{...Ma,...n},disabled:M.draggable}),Re=(function(){for(var _=arguments.length,re=new Array(_),pe=0;pe<_;pe++)re[pe]=arguments[pe];return o.useMemo(()=>se=>{re.forEach(Ie=>Ie(se))},re)})(O,R),fe=!!$,me=fe&&!x&&An(u)&&An(z),ke=!H&&k,We=ke&&me?le:null,Fe=me?We??(h??B)({rects:A,activeNodeRect:U,activeIndex:u,overIndex:z,index:P}):null,Ve=An(u)&&An(z)?i({id:m,items:b,activeIndex:u,overIndex:z}):P,ee=$?.id,Y=o.useRef({activeId:ee,items:b,newIndex:Ve,containerId:C}),ge=b!==Y.current.items,De=t({active:$,containerId:C,isDragging:k,isSorting:fe,id:m,index:P,items:b,newIndex:Y.current.newIndex,previousItems:Y.current.items,previousContainerId:Y.current.containerId,transition:p,wasDragging:Y.current.activeId!=null}),X=(function(_){let{disabled:re,index:pe,node:se,rect:Ie}=_;const[ie,we]=o.useState(null),Me=o.useRef(pe);return Rt(()=>{if(!re&&pe!==Me.current&&se.current){const Se=Ie.current;if(Se){const je=Jt(se.current,{ignoreTransform:!0}),v={x:Se.left-je.left,y:Se.top-je.top,scaleX:Se.width/je.width,scaleY:Se.height/je.height};(v.x||v.y)&&we(v)}}pe!==Me.current&&(Me.current=pe)},[re,pe,se,Ie]),o.useEffect(()=>{ie&&we(null)},[ie]),ie})({disabled:!De,index:P,node:G,rect:S});return o.useEffect(()=>{fe&&Y.current.newIndex!==Ve&&(Y.current.newIndex=Ve),C!==Y.current.containerId&&(Y.current.containerId=C),b!==Y.current.items&&(Y.current.items=b)},[fe,Ve,C,b]),o.useEffect(()=>{if(ee===Y.current.activeId)return;if(ee!=null&&Y.current.activeId==null)return void(Y.current.activeId=ee);const _=setTimeout(()=>{Y.current.activeId=ee},50);return()=>clearTimeout(_)},[ee]),{active:$,activeIndex:u,attributes:V,data:f,rect:S,index:P,newIndex:Ve,items:b,isOver:D,isSorting:fe,isDragging:k,listeners:K,node:G,overIndex:z,over:L,setNodeRef:Re,setActivatorNodeRef:ne,setDroppableNodeRef:O,setDraggableNodeRef:R,transform:X??Fe,transition:(function(){if(X||ge&&Y.current.newIndex===P)return ka;if(!(ke&&!_n(ue)||!p)&&(fe||De))return Bt.Transition.toString({...p,property:pl})})()}}function Kn(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 Ia=[Je.Down,Je.Right,Je.Up,Je.Left],Ea=(e,t)=>{let{context:{active:n,collisionRect:l,droppableRects:a,droppableContainers:i,over:m,scrollableAncestors:h}}=t;if(Ia.includes(e.code)){if(e.preventDefault(),!n||!l)return;const s=[];i.getEnabled().forEach(C=>{if(!C||C!=null&&C.disabled)return;const u=a.get(C.id);if(u)switch(e.code){case Je.Down:l.top<u.top&&s.push(C);break;case Je.Up:l.top>u.top&&s.push(C);break;case Je.Left:l.left>u.left&&s.push(C);break;case Je.Right:l.left<u.left&&s.push(C)}});const p=(C=>{let{collisionRect:u,droppableRects:I,droppableContainers:x}=C;const A=lr(u),z=[];for(const H of x){const{id:B}=H,M=I.get(B);if(M){const P=lr(M),f=A.reduce((S,G,D)=>S+_r(P[D],G),0),F=Number((f/4).toFixed(4));z.push({id:B,data:{droppableContainer:H,value:F}})}}return z.sort(Gr)})({collisionRect:l,droppableRects:a,droppableContainers:s});let b=Zr(p,"id");if(b===m?.id&&p.length>1&&(b=p[1].id),b!=null){const C=i.get(n.id),u=i.get(b),I=u?a.get(u.id):null,x=u?.node.current;if(x&&I&&C&&u){const A=Gn(x).some((P,f)=>h[f]!==P),z=wr(C,u),H=(function(P,f){return!Kn(P)||!Kn(f)||!wr(P,f)?!1:P.data.current.sortable.index<f.data.current.sortable.index})(C,u),B=A||!z?{x:0,y:0}:{x:H?l.width-I.width:0,y:H?l.height-I.height:0},M={x:I.left,y:I.top};return B.x&&B.y?M:fn(M,B)}}}};function wr(e,t){return!(!Kn(e)||!Kn(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}const Fa=e=>{let{transform:t}=e;return{...t,y:0}},vl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,index:i,editing:m,editable:h,selectedIndex:s,background:p,activeColor:b,borderColor:C,borderWidth:u,dragging:I,...x}=e;return c.jsxs("div",{ref:t,className:gt(a),style:{...l,display:"flex",flexDirection:"column",background:s===i?"white":p,minHeight:"0px",fontFamily:"inherit",fontSize:"16px",fontWeight:s===i?"700":"400",lineHeight:"1",letterSpacing:"0px",textTransform:"none",minWidth:"unset"},...x,children:[c.jsxs("div",{style:{flex:"1 1 100%",display:"flex",flexDirection:"row"},children:[c.jsx("div",{style:{marginLeft:s===i?"0px":"-1px",marginTop:s===i?"0px":"4px",marginBottom:"0px",background:"grey",minWidth:"1px"}}),n,s===i?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===i&&b?b?.toCSS():"none",minHeight:"2px"}})]})})),St={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"},zo=o.memo(o.forwardRef(({color:e,dragOverlay:t,dragging:n,disabled:l,fadeIn:a,handle:i,height:m,index:h,listeners:s,onRemove:p,renderItem:b,sorting:C,style:u,transition:I,transform:x,value:A,wrapperStyle:z,...H},B)=>{o.useEffect(()=>{if(t)return document.body.style.cursor="grabbing",()=>{document.body.style.cursor=""}},[t]);const M=b?b({dragOverlay:!!t,dragging:!!n,sorting:!!C,index:h,fadeIn:!!a,listeners:s,ref:B,style:u,transform:x,transition:I,value:A}):c.jsx(c.Fragment,{children:A});return c.jsx("div",{className:gt("tab-item",St.Wrapper,a&&St.fadeIn,C&&St.sorting,t&&St.dragOverlay),style:{...z,transition:[I,z?.transition].filter(Boolean).join(", "),"--translate-x":x?`${Math.round(x.x)}px`:void 0,"--translate-y":x?`${Math.round(x.y)}px`:void 0,"--scale-x":x?.scaleX?`${x.scaleX}`:void 0,"--scale-y":x?.scaleY?`${x.scaleY}`:void 0,"--index":h},ref:B,children:c.jsx("div",{className:gt(St.Item,n&&St.dragging,i&&St.withHandle,t&&St.dragOverlay,l&&St.disabled,e&&St.color,"dragging"),style:u,"data-cypress":"draggable-item",...i?void 0:s,...H,tabIndex:i?void 0:-1,children:M})})})),br={Row:"_Row_1kr10_1"},Cl=o.memo(o.forwardRef(({children:e,horizontal:t,style:n},l)=>c.jsx("div",{ref:l,style:{...n},className:gt(br.Row,t&&br.horizontal),children:e}))),Aa={...hl},Da=o.memo(o.forwardRef((e,t)=>{const{className:n,activationConstraint:l,animateLayoutChanges:a,adjustScale:i=!1,collisionDetection:m=Pi,coordinateGetter:h=Ea,dropAnimation:s=Aa,getItemStyles:p=()=>({}),getNewIndex:b,handle:C=!1,items:u,onMove:I,isDisabled:x=()=>!1,measuring:A,modifiers:z,renderItem:H,renderDivider:B,reorderItems:M=Ao,strategy:P=Do,style:f,useDragOverlay:F=!0,onDragStart:S,wrapperStyle:G=()=>({})}=e,[D,O]=o.useState(()=>u);o.useEffect(()=>{O(u)},[u]);const[$,ue]=o.useState(null),U=(function(){for(var L=arguments.length,ne=new Array(L),le=0;le<L;le++)ne[le]=arguments[le];return o.useMemo(()=>[...ne].filter(Re=>Re!=null),[...ne])})(go(il,{activationConstraint:l}),go(al,{activationConstraint:l}),go(Eo,{scrollBehavior:"Cypress"in window?"auto":void 0,coordinateGetter:h})),V=D.indexOf.bind(D),R=$?V($):-1,K=[];D.map((L,ne)=>{K.push(c.jsx(za,{id:L,handle:C,index:ne,style:p,wrapperStyle:G,disabled:x(L),renderItem:H,animateLayoutChanges:a,useDragOverlay:F,getNewIndex:b},L+"-"+ne));const le=B?.({key:"divider-"+ne});le&&K.push(le)});const{getPortalContainer:k}=r.useFullscreenPortal();return c.jsxs(ia,{sensors:U,collisionDetection:m,onDragStart:L=>{const{active:ne}=L;ne&&(S?.(L),ue(ne.id))},autoScroll:{canScroll:L=>!0},onDragEnd:L=>{if(ue(null),L.over){const ne=V(L.over.id);R!==ne&&(O(le=>M(le,R,ne)),I?.(R,ne))}},onDragCancel:()=>{ue(null)},measuring:A,modifiers:z,children:[c.jsx("div",{style:{display:"flex",justifyContent:"flex-start",boxSizing:"border-box",...f},className:gt(n,St.Wrapper),children:c.jsx(xa,{items:D,strategy:P,children:c.jsx(Cl,{ref:t,children:K})})}),F?jt.createPortal(c.jsx(ya,{adjustScale:i,dropAnimation:s,children:$?c.jsx(zo,{value:D[R],handle:C,renderItem:H,wrapperStyle:G({index:R,isDragging:!0,id:D[R]}),index:R,dragging:!0,style:p({id:D[R],index:R,isSorting:$!==null,isDragging:!0,overIndex:-1,isDragOverlay:!0}),dragOverlay:!0}):null}),k()):null]})}));function za({disabled:e,animateLayoutChanges:t,getNewIndex:n,handle:l,id:a,index:i,onRemove:m,style:h,renderItem:s,useDragOverlay:p,wrapperStyle:b}){const{attributes:C,isDragging:u,isSorting:I,listeners:x,overIndex:A,setNodeRef:z,transform:H,transition:B}=Ta({id:a,animateLayoutChanges:t,disabled:e,getNewIndex:n});return c.jsx(zo,{ref:z,value:a,disabled:e,dragging:u,sorting:I,handle:l,renderItem:s,index:i,style:h({index:i,id:a,isDragging:u,isSorting:I,overIndex:A}),onRemove:m?()=>m(a):void 0,transform:H,transition:B,wrapperStyle:b({index:i,isDragging:u,id:a}),listeners:x,"data-index":i,"data-id":a,dragOverlay:!p&&u,...C})}const Na="_TabStrip_3x0dp_1",La=new d.Color("rgb(33, 115, 70)"),Pa="#eee",ja=e=>c.jsx(vl,{...e}),yl=o.memo(o.forwardRef((e,t)=>{const{children:n,style:l,className:a,selectedTabIndex:i=0,tabNames:m=[],onSelectedTabIndexChange:h,onTabNameChange:s,onTabMove:p,createScrollStartButton:b=r.defaultCreateScrollStartButton,createScrollEndButton:C=r.defaultCreateScrollEndButton,createScrollEdgeButton:u=r.defaultCreateScrollEdgeButton,createTabButton:I=ja,createTabDivider:x,editLabelProps:A,disabled:z=!1,disableDrag:H=!1,background:B="white",activeColor:M=La,borderColor:P=Pa,borderWidth:f=1}=e,[F,S]=o.useState(i),[G,D]=o.useState(m),O=o.useCallback(ie=>{const we=k.current?.[ie]?.closest(".tab-item")??k.current?.[ie];we&&ke.current?.scrollTo({top:we.offsetTop,left:we.offsetLeft,behavior:"smooth"})},[]);o.useEffect(()=>{O(i)},[i]);const $=o.useCallback((ie,we)=>{we!==F&&(S(we),h?.(we)),O(we)},[h,F]),ue=o.useCallback((ie,we)=>{p?.(ie,we)},[p]),U=o.useRef(null),[V,R]=o.useState(-1),K=o.useCallback((ie,we)=>{s?.(ie,we)},[s]);o.useLayoutEffect(()=>{S(i)},[i]),o.useLayoutEffect(()=>{D(m)},[m]);const k=o.useRef([]),L=o.useRef(null);o.useImperativeHandle(t,()=>Object.assign({startEdit(ie){k.current?.[ie]?.startEdit()},cancel(ie){k.current?.[ie]?.cancel()}},L.current),[F,V]);const ne=o.useCallback(({value:ie,index:we,dragging:Me})=>{const{style:Se,maxLength:je,...v}=A||{},_e=c.jsx(Ur,{ref:Oe=>{k.current[we]=Oe},value:ie,disabled:z,maxLength:je,style:{color:F===we&&M?M?.toRGBA().toString():"inherit",flex:"1 1 100%",paddingTop:"1px",paddingBottom:"1px",...Se},styleHover:{},onSubmit:Oe=>(U.current=!1,R(-1),K(we,Oe)),onCancel:()=>{U.current=!1,R(-1)},onChange:Oe=>{U.current=!0,R(we)},...v});return I({onClick:Oe=>$(Oe,we),value:ie,index:we,editing:V===we&&U.current,editable:!0,disabled:z,selectedIndex:F,background:B,activeColor:M,borderColor:P,borderWidth:f,dragging:Me,children:_e})},[F,K,$,A,z,V,I]),[le,{width:Re}]=Ot(),[fe,{width:me}]=Ot(),ke=o.useRef(null),[We,Fe]=o.useState({left:0,top:0,width:0,height:0}),[Ve,ee]=o.useState(null);o.useEffect(()=>{Ve!==null&&ke.current&&ke.current.scrollTo({left:Ve,behavior:"smooth"})},[Ve]);const Y=o.useCallback((ie,we=!1)=>{if(!ke.current)return 0;let Me=ke.current.firstChild.getBoundingClientRect(),Se=ke.current.firstChild.firstChild.children,je=0;return je=we?0:r.ScrollUtils.getScrollTo(ie,Me.left,Se,!0,Math.max(0,ie-200)),ee(je),Math.max(0,je)},[]),ge=o.useCallback((ie,we=!1)=>{if(!ke.current)return 0;let Me=ke.current.firstChild.getBoundingClientRect(),Se=ke.current.firstChild.firstChild.children,je=0;const v=Math.ceil(me-Re);return je=we?v:r.ScrollUtils.getScrollTo(ie,Me.left,Se,!1,Math.max(0,ie+200)),ee(je),Math.min(v,je)},[me,Re]),De=o.useRef(null),X=o.useRef(null),_=o.useCallback(()=>{X.current&&(clearTimeout(X.current),X.current=null,De.current=null)},[]),re=o.useCallback((ie,we,Me=260)=>{De.current=ie,X.current=setTimeout(()=>{const Se=we?Y(De.current||ie):ge(De.current||ie);Se!==De.current?re(Se,we,120):_()},Me)},[Y,ge,_]);o.useEffect(()=>()=>_(),[_]);const pe=o.useMemo(()=>({style:{marginLeft:"4px",marginRight:"6px"},disabled:Math.floor(We.left)<=0||Math.floor(me-Re)===0,orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:_,onMouseLeave:_,onMouseDown:()=>re(ke.current.scrollLeft,!0),onClick:ie=>Y(Math.min(ke.current.scrollLeft,Ve??Number.MAX_SAFE_INTEGER),ie.ctrlKey)}),[We,Ve,me,Re]),se=o.useMemo(()=>({style:{marginLeft:"6px",marginRight:"4px"},disabled:Math.floor(me-Re)<=Math.ceil(We.left),orientation:r.ScrollbarOrientation.Horizontal,onMouseUp:_,onMouseLeave:_,onMouseDown:()=>re(ke.current.scrollLeft,!1),onClick:ie=>ge(Math.max(ke.current.scrollLeft,Ve??0),ie.ctrlKey)}),[We,Ve,me,Re]),Ie=o.useMemo(()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{style:{minWidth:"16px"}}),n,u?.(pe)]}),[pe,se,b,C,n,u]);return c.jsxs("div",{style:{...l,display:"flex",alignItems:"stretch"},className:gt(Na,a),ref:L,children:[c.jsx("div",{style:{borderTop:`solid ${P} ${f}px`,position:"absolute",width:"100%"}}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:Ie}),c.jsx("div",{className:"Tabs",ref:le,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:ke,onScroll:ie=>{Fe({left:ie.target.scrollLeft,top:ie.target.scrollTop,width:ie.target.scrollWidth,height:ie.target.scrollHeight})},children:c.jsx(Da,{isDisabled:ie=>z||H,items:G,strategy:ba,modifiers:[Fa],ref:fe,renderItem:ne,renderDivider:x,onMove:ue,activationConstraint:{distance:15}})})}),c.jsx("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:u(se)})]})}));yl.displayName="TabStrip";const Nn=o.createContext(null);Nn.displayName="DocThemesContext";const Oa="_script-editor_iy654_5",Ba={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"},Va=o.lazy(()=>Promise.resolve().then(()=>require("./CQQHvbCOfJET0YkW.cjs")));let ln,an,Ft=["define","require"],xr=!1,Ln="@0.7.8";Ln!=="@local"&&Ln!=="@0.0.0"||(Ln="");const Ha=`https://cdn.jsdelivr.net/npm/@sheetxl/sdk${Ln}/types/scripting.d.ts`,qr=async(e,t,n)=>{const l=e.getModel();if(!l)return;const a=await t.languages.typescript.getTypeScriptWorker(),i=await a(l.uri),m=await i.getNavigationTree(l.uri.toString()),h=e.getPosition();let s={...h};s.lineNumber=1,s.column=1;let p=!1;for(let A=h.lineNumber;A>=1;A--)if(l.getLineContent(A).trim()===""){const z=No(m,l.getOffsetAt({lineNumber:A,column:1}),"function");if(!z||Ka(z)){p=!0,s.lineNumber=A+1;break}{const H=z.spans[0].start;A=l.getPositionAt(H).lineNumber,s.lineNumber=A}}let b=n,C=!1;!p&&!b.startsWith(`
28
28
  `)&&s.lineNumber>1&&(b=`
29
29
  `+b,C=!0);let u=!1;l.getLineCount()>1&&(b.endsWith(`
30
30
 
31
31
  `)||(b+=`
32
32
 
33
- `,u=!0));const I=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${b}`}];let x=null;l.pushEditOperations([],I,A=>(x=A[0].range,C&&x.startLineNumber++,u&&x.endLineNumber--,[new t.Selection(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn)])),e.setSelection({startLineNumber:x.endLineNumber,startColumn:x.endColumn,endLineNumber:x.startLineNumber,endColumn:x.startColumn})};function Ua(e,t){let n=null;const l=e.length;for(let a=0;!n&&a<l;a++){const i=e[a];i.getName()===t.text&&(n=i)}return n?n.getContext():"formula"}function qo(e,t,n,l,a=[]){if(l.kind==="function"&&l.kindModifiers==="export"){const i=l.spans[0].start,m=e.getPositionAt(i);a.push({name:l.text,type:Ua(n,l),lineNumber:m.lineNumber})}if(l.childItems)for(const i of l.childItems)qo(e,t,n,i,a);return a}function No(e,t,n="function",l){const a=e.spans,i=a.length;for(let m=0;m<i;m++){const h=a[m];if(h.start<=t&&t<h.start+h.length){if(e.kind===n&&(!l||e.kindModifiers===l))return e;for(const s of e.childItems||[]){const p=No(s,t,n,l);if(p)return p}}return null}}function Ka(e){return e.kind==="comment"}const $a=o.memo(o.forwardRef((e,t)=>{const{className:n,style:l,commands:a,readOnly:i=!1,darkMode:m,loadingPanel:h,autoFocus:s=!0,frame:p,onStatusChange:b,...C}=e,u=o.useRef(null),I=o.useRef(!1),x=o.useMemo(()=>({contains(ee){if(!u.current)return;const Y=u.current.editor;return Y&&Y.getDomNode()?.contains(ee)},focus(){if(!u.current)return;const ee=u.current.editor;return ee&&ee.getDomNode()?.focus()}}),[]),A=o.useMemo(()=>[new r.Command("help",x,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),z=o.useMemo(()=>{let ee=null;const Y=()=>x;return ee=a?a.createChildGroup(Y,"scriptEditor",!1):new r.CommandGroup(Y,"scriptEditor"),ee.addCommands(A,!0),ee},[a,A]),H=a.getGroup("workbook"),B=r.useCommands(H,["executeSelectedScript","saveScripts"]),M=B[0],P=B[1],f=M?.context(),[F,S]=o.useState({message:"Loading",cursor:"",dirty:!1}),[G,D]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),O=r.useCallbackRef(ee=>{S(Y=>{const ge={...Y,...ee};return he.CommonUtils.deepEqual(ge,Y)?Y:(P.update({disabled:!ge.dirty}).updateCallback(async()=>{await $()}),ge)})},[b,P]);o.useEffect(()=>{b?.(F)},[b,F]);const $=r.useCallbackRef(async()=>{if(!u.current)return;const ee=u.current.editor;let Y;if(F.dirty){const ge=ee.getValue();await f?.saveSource(ge),Y=f?.getScripts().getModules().getByName("scripts");const De=Y?.getSource(),X=ee.getValue(),_=(De?.length??0)!==ge.length||De!==X;O({dirty:_})}else Y=f?.getScripts().getModules().getByName("scripts");return Y},[F]);o.useEffect(()=>{const ee=p?.addListener({onBeforeHide:async()=>(await $(),!0)});return()=>{ee?.()}},[p]),o.useEffect(()=>{const ee=f?.getScripts();if(ee)return ee.addListeners({onBeforeSearch:()=>$()})},[f]);const ue=r.useCallbackRef(ee=>{M?.execute(ee)},[M]),U=o.useRef(""),[V,R]=o.useState(!1),K=r.useCallbackRef(async()=>{if(!u.current)return null;const ee=u.current,Y=ee.editor;if(!Y)return null;const ge=ee.monaco,De=await(async(X,_,re="export")=>{const pe=X.getModel();if(!pe)return null;const se=await _.languages.typescript.getTypeScriptWorker(),Ie=await se(pe.uri),ie=await Ie.getNavigationTree(pe.uri.toString());let we=null,Me=X.getSelection();if(!Me)return null;const Se=Me.startLineNumber===Me.endLineNumber&&Me.startColumn===Me.endColumn?pe.getLineCount():Math.min(Me.endLineNumber,pe.getLineCount());for(let je=Me.startLineNumber;!we&&je<=Se;je++){const v=No(ie,pe.getOffsetAt({lineNumber:je,column:1}),"function",re);v&&(we=v.text)}return we})(Y,ge);return O({message:(De??"").toUpperCase()}),De?{source:Y.getValue(),name:De}:null},[]);r.useCallbackRef(he.CommonUtils.debounce($,200),[]);const k=r.useCallbackRef(async(ee,Y,ge)=>{D(X=>({...X,compiling:!0}));const De=await f?.getScripts().createModule({source:ge?.getValue(),declarationsOnly:!0});De&&((async function(X,_){const re=[];for(let pe=1;pe<X.getLineCount()+1;pe++){const se={startLineNumber:pe,startColumn:1,endLineNumber:pe,endColumn:X.getLineLength(pe)+1},Ie=X.getValueInRange(se).indexOf("modelt");Ie!==-1&&re.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:_.MarkerSeverity.Hint,startLineNumber:se.startLineNumber,startColumn:Ie+1,endLineNumber:se.startLineNumber,endColumn:Ie+5})}_.editor.setModelMarkers(X,"owner",re)})(ee,Y),(async function(X,_,re,pe){const se=await _.languages.typescript.getTypeScriptWorker(),Ie=await se(X.uri),ie=await Ie.getNavigationTree(X.uri.toString()),we=qo(X,_,pe,ie).map(Me=>{let Se=null,je=null;return Me.type==="formula"?(Se="formula.margin-icon",je="Formula"):Me.type==="macro"?(Se="macro.margin-icon",je="Macro"):Me.type==="autoRun"&&(Se="autorun.margin-icon",je="Auto Run"),{range:new _.Range(Me.lineNumber,1,Me.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:Se,glyphMarginHoverMessage:{value:je},stickiness:_.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});me.current&&me.current.clear(),me.current=re.createDecorationsCollection(we)})(ee,Y,ge,De?De.getFunctions().getItems():he.CommonUtils.EmptyArray),D(X=>({...X,compiling:!1})))},[f]),L=r.useCallbackRef(he.CommonUtils.debounce(k,580),[]),ne=r.useCallbackRef(async(ee=void 0)=>{if(!u.current||!f)return;const Y=u.current.editor.getPosition(),ge={cursor:Y?Y.toString():""};ee!==void 0&&(ge.message=ee),O(ge);const De=K();f.setSelectedFunction(De)},[f]);o.useEffect(()=>{},[G]);const le=o.useRef(null),Re=r.useCallbackRef(async()=>{await $(),p?.close()},[p]);o.useEffect(()=>{if(!f)return;const ee={insertSnippet:ge=>{u.current?.editor&&qr(u.current.editor,u.current.monaco,ge)},close:()=>Re()};f.setEditor(ee),f.setSelectedFunction(K());const Y=f.addContainerListener({onBeforeSave:async()=>{$()},onReadonlyChange(){},onScriptChange:async()=>{if(!u.current?.editor||!f)return;const ge=u.current.editor,De=f.getScripts().getModules().getItems()[0]?.getSource()??"";ge.setValue(De)}});return()=>{f.setEditor(null),Y()}},[f]),o.useEffect(()=>()=>{const ee=le.current;if(ee){ee.dispose();const Y=ee.debounceTimer;Y!==void 0&&clearTimeout(Y),le.current=null}},[V]);const fe=r.useCallbackRef(ee=>{const Y=u.current?.editor;return!!Y&&(Y.focus(ee),!0)},[F]),me=o.useRef(null),ke=r.useCallbackRef((ee,Y)=>{u.current={monaco:Y,editor:ee},R(!0),ne("Loading Types");const ge=f?.getScripts().getModules().getItems()[0]?.getSource()??"";ee.setValue(ge),Promise.resolve().then(()=>require("./Bvwsa-scWvcLtf8S.cjs")).then(X=>X.customEditor).then(async X=>{ne(""),X.AutoTypings.create(ee,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:Y,onUpdate:(_,re)=>{if(_.type==="LookedUpPackage"&&_.success!==void 0){const pe=Y.languages.typescript.typescriptDefaults.getDiagnosticsOptions();Y.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...pe,diagnosticCodesToIgnore:[]})}},onError:_=>{_==="Not implemented yet"&&(_="Compile Errors"),console.warn("Error compiling types",_)}}).then(_=>{le.current=_;const re=ee.getModel();L(re,Y,ee),(()=>{if(xr)return;const pe=(Ie,ie)=>{try{if(ie===void 0)try{delete globalThis[Ie]}catch{try{globalThis[Ie]=void 0}catch{}}else globalThis[Ie]=ie}catch{}},se=Ft.length;for(let Ie=0;Ie<se;Ie++){const ie=Ft[Ie];pe(ie,ln[ie])}ln=void 0,xr=!0})()})}),ee.addCommand("executeScript",function(X,..._){_?.[0]&&ue({functionName:_?.[0]})},""),ee.addAction({id:"executeScript",label:"Execute",keybindings:[Y.KeyCode.F8],run:async X=>{const _=K();f?.setSelectedFunction(_);const re=await _;ue(re)}}),ee.addAction({id:"saveScript",label:"Save Script",keybindings:[Y.KeyMod.CtrlCmd|Y.KeyCode.KeyS],run:X=>{$()}}),ee.onMouseDown(async X=>{if(X.target.type===Y.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const _=X.target.position.lineNumber,re=await Y.languages.typescript.getTypeScriptWorker(),pe=await re(De.uri),se=await pe.getNavigationTree(De.uri.toString()),Ie=(await $()).getFunctions().getItems(),ie=qo(De,Y,Ie,se).find(we=>we.lineNumber===_);if(ie){const we=X.event.browserEvent.button;we===0?ie.type==="macro"||ie.type==="autoRun"?ue({functionName:ie.name}):ie.type==="formula"&&f?.quickInsertFunction?.(ie.name):we===2&&(console.log("Context menu for function:",ie.name),X.event.browserEvent.preventDefault())}}}),ee.onDidChangeModelContent(()=>{O({dirty:!0}),L(De,Y,ee)}),Y.editor.onDidChangeMarkers(X=>{X.some(_=>_.toString()===De.uri.toString())});const De=ee.getModel();(function(X,_){_.languages.registerInlayHintsProvider("typescript",{provideInlayHints(re,pe,se){const Ie=[];for(let ie=1;ie<re.getLineCount()+1;ie++){const we={startLineNumber:ie,startColumn:1,endLineNumber:ie,endColumn:re.getLineLength(ie)+1},Me="hint",Se=re.getValueInRange(we).indexOf("hint");Se!==-1&&Ie.push({kind:_.languages.InlayHintKind.Type,position:{lineNumber:we.startLineNumber,column:Se+Me.length+1},label:"[hint]"})}return{hints:Ie,dispose:()=>{}}}})})(0,Y),De.onDidChangeContent(X=>{const _=f?.getScripts().getModules().getByName("scripts"),re=_?.getSource(),pe=ee.getValue(),se=(re?.length??0)!==pe.length||re!==pe;O({dirty:se})}),ee.onDidChangeCursorPosition(X=>{ne()})},[f]),We=o.useMemo(()=>V?null:h||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[V,h]),Fe=o.useMemo(()=>{if(!V){if(!ln){ln={};const Y=Ft.length;for(let ge=0;ge<Y;ge++){const De=Ft[ge];ln[De]=globalThis[De]}}if(an){const Y=Ft.length;for(let ge=0;ge<Y;ge++){const De=Ft[ge];globalThis[De]=an[De]}}}const ee=f?.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(Va,{theme:m?"extended-dark":"extended",options:{...Ba,fixedOverflowWidgets:!0,readOnly:i},language:"typescript",value:ee,onValidate:Y=>{let ge=!1;const De=Y?Y.length:0;for(let X=0;!ge&&X<De;X++)Y[X].severity===8&&(ge=!0)},beforeMount:Y=>{Y.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),Y.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),Y.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),Y.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let ge=!1,De=!1;try{const X=await(async()=>await(await fetch(Ha)).text())(),_=Y.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let re=Y.editor.getModel(_);re?De=!0:re=Y.editor.createModel(X,"typescript",_),Y.editor.setModelMarkers(re,"default",[]),ge=!0}catch(X){console.warn("cant load types",X)}if(Y.languages.registerLinkProvider("*",{provideLinks:(X,_)=>{const re=[],pe={links:re},se=X.getLinesContent(),Ie=se.length;for(let ie=1;ie<=Ie;ie++){const we=se[ie-1],Me=Y.editor.tokenize(we,"typescript"),Se=Me[0].length;for(let je=0;je<Se;je++){const v=Me[0]?.[je];if(v&&v.type.startsWith("string")){let _e=v.offset,Oe=Me[0]?.[je+1]?.offset??we.length,Qe=new Y.Range(ie,_e+1,ie,Oe+1),ae=X.getValueInRange(Qe);const Te=ae[0];Te!=="`"&&Te!=="'"&&Te!=='"'||(_e++,ae=ae.substring(1));const Ne=ae[ae.length-1];Ne!=="`"&&Ne!=="'"&&Ne!=='"'||(_e++,ae=ae.substring(0,ae.length-1));try{f.getRanges(ae)&&re.push({range:{endColumn:Oe,endLineNumber:ie,startColumn:_e,startLineNumber:ie},tooltip:`Goto range '${ae}'`,url:`/range/${ae}`})}catch(Ae){console.warn(Ae)}}}}return pe}}),Y.editor.registerLinkOpener({open(X){if(X?.path?.startsWith("/range/")){try{f.getRanges(X.path.substring(7))?.select()}catch(_){console.warn("invalid range",_)}return!0}return!1}}),!De){const X=Y.languages.typescript.typescriptDefaults.getCompilerOptions();Y.languages.typescript.typescriptDefaults.setCompilerOptions({...X,target:Y.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:Y.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(U.current&&(await qr(u.current.editor,u.current.monaco,U.current),U.current=null),I.current&&requestAnimationFrame(async()=>{I.current&&Y.editor.focus()}),!an){an={};const X=Ft.length;for(let _=0;_<X;_++){const re=Ft[_];an[re]=globalThis[re]}}})()},onMount:ke})}),We]})},[f,z,i,We,m]),Ve=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:ee=>{fe(ee)},close:()=>Re(),getEditor:()=>f?.getEditor()}),[f]);return o.useEffect(()=>(s&&requestAnimationFrame(()=>{Ve.current?.focus()}),()=>{u.current?.editor&&requestAnimationFrame(()=>{Ve.current?.contains(document.activeElement)&&Ve.current?.focus()})}),[]),c.jsx("div",{className:gt("script-editor",Oa,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...l},ref:Ve,...C,children:Fe})}));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=Ri,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=Si,exports.CornerTriangle=vo,exports.DateUtils=Il,exports.DefaultTaskPaneRegistry=Pn,exports.DocThemesContext=Nn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Nn.Provider,{value:t,children:n})},exports.EditableLabel=Ur,exports.EmptyFrame=fi,exports.FilterButton=Rr,exports.FontUtils=El,exports.Item=zo,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=Ar,exports.MovableArea=Pr,exports.PictureEditor=Hr,exports.Row=Cl,exports.ScriptEditor=$a,exports.SheetCellEditor=Mr,exports.SheetCellRenderer=kr,exports.SheetElement=Vr,exports.SheetScrollbar=Mo,exports.StaticBorderRenderer=Bl,exports.StyledStrokePath=Ir,exports.Tab=vl,exports.TabStrip=yl,exports.TaskPaneArea=Gl,exports.TaskPaneProvider=({children:e,createArea:t,onUpdateArea:n,registry:l=Pn})=>{const a=o.useRef(null),i=o.useRef(null),[m,h]=o.useState(null),[s,p]=o.useState(null),b=o.useMemo(()=>({activateTaskPane(u,I){i.current!==u&&(a.current?a.current.activateTaskPane(u,I):(h(u),C(u)))}}),[]),C=r.useCallbackRef(u=>{const I=t({registry:l,onClose:()=>{p(null),n?.(null)}},x=>{x&&p(x)});return n?.(I),I},[t,l,m]);return o.useEffect(()=>{s&&m&&(s.activateTaskPane(m,{focus:!0}),h(null))},[m,s]),o.createElement(Dr.Provider,{value:s??b},e)},exports.TaskPaneStrip=ko,exports.TaskPaneTitle=Ro,exports.createCellEditStateFromCell=Tr,exports.useBordersOverlay=So,exports.useDocThemes=()=>{const e=o.useContext(Nn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=jr,exports.useRangeListener=(e,t,n,l)=>{const a=o.useRef(n);a.current=n;const i=l?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const s={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(s)}const m=s=>{a.current?.(s)},h=e.getRange(t).addListener(m,l);if(i){const s=e.getRange(t);m({getSource:()=>s,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{h?.()}},[e,t])},exports.useSheetCommands=Nr,exports.useSheetCopyPaste=Lr,exports.useTaskPaneArea=zr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
33
+ `,u=!0));const I=[{range:new t.Range(s.lineNumber,s.column,s.lineNumber,s.column),text:`${b}`}];let x=null;l.pushEditOperations([],I,A=>(x=A[0].range,C&&x.startLineNumber++,u&&x.endLineNumber--,[new t.Selection(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn)])),e.setSelection({startLineNumber:x.endLineNumber,startColumn:x.endColumn,endLineNumber:x.startLineNumber,endColumn:x.startColumn})};function Ua(e,t){let n=null;const l=e.length;for(let a=0;!n&&a<l;a++){const i=e[a];i.getName()===t.text&&(n=i)}return n?n.getContext():"formula"}function qo(e,t,n,l,a=[]){if(l.kind==="function"&&l.kindModifiers==="export"){const i=l.spans[0].start,m=e.getPositionAt(i);a.push({name:l.text,type:Ua(n,l),lineNumber:m.lineNumber})}if(l.childItems)for(const i of l.childItems)qo(e,t,n,i,a);return a}function No(e,t,n="function",l){const a=e.spans,i=a.length;for(let m=0;m<i;m++){const h=a[m];if(h.start<=t&&t<h.start+h.length){if(e.kind===n&&(!l||e.kindModifiers===l))return e;for(const s of e.childItems||[]){const p=No(s,t,n,l);if(p)return p}}return null}}function Ka(e){return e.kind==="comment"}const $a=o.memo(o.forwardRef((e,t)=>{const{className:n,style:l,commands:a,readOnly:i=!1,darkMode:m,loadingPanel:h,autoFocus:s=!0,frame:p,onStatusChange:b,...C}=e,u=o.useRef(null),I=o.useRef(!1),x=o.useMemo(()=>({contains(ee){if(!u.current)return;const Y=u.current.editor;return Y&&Y.getDomNode()?.contains(ee)},focus(){if(!u.current)return;const ee=u.current.editor;return ee&&ee.getDomNode()?.focus()}}),[]),A=o.useMemo(()=>[new r.Command("help",x,{label:"Script Commands",description:"Open Editor Commands",shortcut:{key:"F1"}},()=>{})],[]),z=o.useMemo(()=>{let ee=null;const Y=()=>x;return ee=a?a.createChildGroup(Y,"scriptEditor",!1):new r.CommandGroup(Y,"scriptEditor"),ee.addCommands(A,!0),ee},[a,A]),H=a.getGroup("workbook"),B=r.useCommands(H,["executeSelectedScript","saveScripts"]),M=B[0],P=B[1],f=M?.context(),[F,S]=o.useState({message:"Loading",cursor:"",dirty:!1}),[G,D]=o.useState({loading:!1,compiling:!1,errors:[],warnings:[]}),O=r.useCallbackRef(ee=>{S(Y=>{const ge={...Y,...ee};return he.CommonUtils.deepEqual(ge,Y)?Y:(P.update({disabled:!ge.dirty}).updateCallback(async()=>{await $()}),ge)})},[b,P]);o.useEffect(()=>{b?.(F)},[b,F]);const $=r.useCallbackRef(async()=>{if(!u.current)return;const ee=u.current.editor;let Y;if(F.dirty){const ge=ee.getValue();await f?.saveSource(ge),Y=f?.getScripts().getModules().getByName("scripts");const De=Y?.getSource(),X=ee.getValue(),_=(De?.length??0)!==ge.length||De!==X;O({dirty:_})}else Y=f?.getScripts().getModules().getByName("scripts");return Y},[F]);o.useEffect(()=>{const ee=p?.addListener({onBeforeHide:async()=>(await $(),!0)});return()=>{ee?.()}},[p]),o.useEffect(()=>{const ee=f?.getScripts();if(ee)return ee.addListeners({onBeforeSearch:()=>$()})},[f]);const ue=r.useCallbackRef(ee=>{M?.execute(ee)},[M]),U=o.useRef(""),[V,R]=o.useState(!1),K=r.useCallbackRef(async()=>{if(!u.current)return null;const ee=u.current,Y=ee.editor;if(!Y)return null;const ge=ee.monaco,De=await(async(X,_,re="export")=>{const pe=X.getModel();if(!pe)return null;const se=await _.languages.typescript.getTypeScriptWorker(),Ie=await se(pe.uri),ie=await Ie.getNavigationTree(pe.uri.toString());let we=null,Me=X.getSelection();if(!Me)return null;const Se=Me.startLineNumber===Me.endLineNumber&&Me.startColumn===Me.endColumn?pe.getLineCount():Math.min(Me.endLineNumber,pe.getLineCount());for(let je=Me.startLineNumber;!we&&je<=Se;je++){const v=No(ie,pe.getOffsetAt({lineNumber:je,column:1}),"function",re);v&&(we=v.text)}return we})(Y,ge);return O({message:(De??"").toUpperCase()}),De?{source:Y.getValue(),name:De}:null},[]);r.useCallbackRef(he.CommonUtils.debounce($,200),[]);const k=r.useCallbackRef(async(ee,Y,ge)=>{D(X=>({...X,compiling:!0}));const De=await f?.getScripts().createModule({source:ge?.getValue(),declarationsOnly:!0});De&&((async function(X,_){const re=[];for(let pe=1;pe<X.getLineCount()+1;pe++){const se={startLineNumber:pe,startColumn:1,endLineNumber:pe,endColumn:X.getLineLength(pe)+1},Ie=X.getValueInRange(se).indexOf("modelt");Ie!==-1&&re.push({message:"found 'modelt'",resource:"https://www.sheetxl.com",severity:_.MarkerSeverity.Hint,startLineNumber:se.startLineNumber,startColumn:Ie+1,endLineNumber:se.startLineNumber,endColumn:Ie+5})}_.editor.setModelMarkers(X,"owner",re)})(ee,Y),(async function(X,_,re,pe){const se=await _.languages.typescript.getTypeScriptWorker(),Ie=await se(X.uri),ie=await Ie.getNavigationTree(X.uri.toString()),we=qo(X,_,pe,ie).map(Me=>{let Se=null,je=null;return Me.type==="formula"?(Se="formula.margin-icon",je="Formula"):Me.type==="macro"?(Se="macro.margin-icon",je="Macro"):Me.type==="autoRun"&&(Se="autorun.margin-icon",je="Auto Run"),{range:new _.Range(Me.lineNumber,1,Me.lineNumber,1),options:{isWholeLine:!1,glyphMarginClassName:Se,glyphMarginHoverMessage:{value:je},stickiness:_.editor.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges}}});me.current&&me.current.clear(),me.current=re.createDecorationsCollection(we)})(ee,Y,ge,De?De.getFunctions().getItems():he.CommonUtils.EmptyArray),D(X=>({...X,compiling:!1})))},[f]),L=r.useCallbackRef(he.CommonUtils.debounce(k,580),[]),ne=r.useCallbackRef(async(ee=void 0)=>{if(!u.current||!f)return;const Y=u.current.editor.getPosition(),ge={cursor:Y?Y.toString():""};ee!==void 0&&(ge.message=ee),O(ge);const De=K();f.setSelectedFunction(De)},[f]);o.useEffect(()=>{},[G]);const le=o.useRef(null),Re=r.useCallbackRef(async()=>{await $(),p?.close()},[p]);o.useEffect(()=>{if(!f)return;const ee={insertSnippet:ge=>{u.current?.editor&&qr(u.current.editor,u.current.monaco,ge)},close:()=>Re()};f.setEditor(ee),f.setSelectedFunction(K());const Y=f.addContainerListener({onBeforeSave:async()=>{$()},onReadonlyChange(){},onScriptChange:async()=>{if(!u.current?.editor||!f)return;const ge=u.current.editor,De=f.getScripts().getModules().getItems()[0]?.getSource()??"";ge.setValue(De)}});return()=>{f.setEditor(null),Y()}},[f]),o.useEffect(()=>()=>{const ee=le.current;if(ee){ee.dispose();const Y=ee.debounceTimer;Y!==void 0&&clearTimeout(Y),le.current=null}},[V]);const fe=r.useCallbackRef(ee=>{const Y=u.current?.editor;return!!Y&&(Y.focus(ee),!0)},[F]),me=o.useRef(null),ke=r.useCallbackRef((ee,Y)=>{u.current={monaco:Y,editor:ee},R(!0),ne("Loading Types");const ge=f?.getScripts().getModules().getItems()[0]?.getSource()??"";ee.setValue(ge),Promise.resolve().then(()=>require("./CtvcgvmfdVKgRpFg.cjs")).then(X=>X.customEditor).then(async X=>{ne(""),X.AutoTypings.create(ee,{shareCache:!0,dontAdaptEditorOptions:!0,monaco:Y,onUpdate:(_,re)=>{if(_.type==="LookedUpPackage"&&_.success!==void 0){const pe=Y.languages.typescript.typescriptDefaults.getDiagnosticsOptions();Y.languages.typescript.typescriptDefaults.setDiagnosticsOptions({...pe,diagnosticCodesToIgnore:[]})}},onError:_=>{_==="Not implemented yet"&&(_="Compile Errors"),console.warn("Error compiling types",_)}}).then(_=>{le.current=_;const re=ee.getModel();L(re,Y,ee),(()=>{if(xr)return;const pe=(Ie,ie)=>{try{if(ie===void 0)try{delete globalThis[Ie]}catch{try{globalThis[Ie]=void 0}catch{}}else globalThis[Ie]=ie}catch{}},se=Ft.length;for(let Ie=0;Ie<se;Ie++){const ie=Ft[Ie];pe(ie,ln[ie])}ln=void 0,xr=!0})()})}),ee.addCommand("executeScript",function(X,..._){_?.[0]&&ue({functionName:_?.[0]})},""),ee.addAction({id:"executeScript",label:"Execute",keybindings:[Y.KeyCode.F8],run:async X=>{const _=K();f?.setSelectedFunction(_);const re=await _;ue(re)}}),ee.addAction({id:"saveScript",label:"Save Script",keybindings:[Y.KeyMod.CtrlCmd|Y.KeyCode.KeyS],run:X=>{$()}}),ee.onMouseDown(async X=>{if(X.target.type===Y.editor.MouseTargetType.GUTTER_GLYPH_MARGIN){const _=X.target.position.lineNumber,re=await Y.languages.typescript.getTypeScriptWorker(),pe=await re(De.uri),se=await pe.getNavigationTree(De.uri.toString()),Ie=(await $()).getFunctions().getItems(),ie=qo(De,Y,Ie,se).find(we=>we.lineNumber===_);if(ie){const we=X.event.browserEvent.button;we===0?ie.type==="macro"||ie.type==="autoRun"?ue({functionName:ie.name}):ie.type==="formula"&&f?.quickInsertFunction?.(ie.name):we===2&&(console.log("Context menu for function:",ie.name),X.event.browserEvent.preventDefault())}}}),ee.onDidChangeModelContent(()=>{O({dirty:!0}),L(De,Y,ee)}),Y.editor.onDidChangeMarkers(X=>{X.some(_=>_.toString()===De.uri.toString())});const De=ee.getModel();(function(X,_){_.languages.registerInlayHintsProvider("typescript",{provideInlayHints(re,pe,se){const Ie=[];for(let ie=1;ie<re.getLineCount()+1;ie++){const we={startLineNumber:ie,startColumn:1,endLineNumber:ie,endColumn:re.getLineLength(ie)+1},Me="hint",Se=re.getValueInRange(we).indexOf("hint");Se!==-1&&Ie.push({kind:_.languages.InlayHintKind.Type,position:{lineNumber:we.startLineNumber,column:Se+Me.length+1},label:"[hint]"})}return{hints:Ie,dispose:()=>{}}}})})(0,Y),De.onDidChangeContent(X=>{const _=f?.getScripts().getModules().getByName("scripts"),re=_?.getSource(),pe=ee.getValue(),se=(re?.length??0)!==pe.length||re!==pe;O({dirty:se})}),ee.onDidChangeCursorPosition(X=>{ne()})},[f]),We=o.useMemo(()=>V?null:h||c.jsx("div",{style:{position:"absolute",width:"100%",height:"100%"},children:"Loading..."}),[V,h]),Fe=o.useMemo(()=>{if(!V){if(!ln){ln={};const Y=Ft.length;for(let ge=0;ge<Y;ge++){const De=Ft[ge];ln[De]=globalThis[De]}}if(an){const Y=Ft.length;for(let ge=0;ge<Y;ge++){const De=Ft[ge];globalThis[De]=an[De]}}}const ee=f?.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(Va,{theme:m?"extended-dark":"extended",options:{...Ba,fixedOverflowWidgets:!0,readOnly:i},language:"typescript",value:ee,onValidate:Y=>{let ge=!1;const De=Y?Y.length:0;for(let X=0;!ge&&X<De;X++)Y[X].severity===8&&(ge=!0)},beforeMount:Y=>{Y.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!1,noSyntaxValidation:!1,diagnosticCodesToIgnore:[2307]}),Y.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0}),Y.editor.defineTheme("extended",{base:"vs",inherit:!0,rules:[],colors:{}}),Y.editor.defineTheme("extended-dark",{base:"vs-dark",inherit:!0,rules:[],colors:{}}),(async()=>{let ge=!1,De=!1;try{const X=await(async()=>await(await fetch(Ha)).text())(),_=Y.Uri.parse('inmemory://model/"sheetxl-models".d.ts');let re=Y.editor.getModel(_);re?De=!0:re=Y.editor.createModel(X,"typescript",_),Y.editor.setModelMarkers(re,"default",[]),ge=!0}catch(X){console.warn("cant load types",X)}if(Y.languages.registerLinkProvider("*",{provideLinks:(X,_)=>{const re=[],pe={links:re},se=X.getLinesContent(),Ie=se.length;for(let ie=1;ie<=Ie;ie++){const we=se[ie-1],Me=Y.editor.tokenize(we,"typescript"),Se=Me[0].length;for(let je=0;je<Se;je++){const v=Me[0]?.[je];if(v&&v.type.startsWith("string")){let _e=v.offset,Oe=Me[0]?.[je+1]?.offset??we.length,Qe=new Y.Range(ie,_e+1,ie,Oe+1),ae=X.getValueInRange(Qe);const Te=ae[0];Te!=="`"&&Te!=="'"&&Te!=='"'||(_e++,ae=ae.substring(1));const Ne=ae[ae.length-1];Ne!=="`"&&Ne!=="'"&&Ne!=='"'||(_e++,ae=ae.substring(0,ae.length-1));try{f.getRanges(ae)&&re.push({range:{endColumn:Oe,endLineNumber:ie,startColumn:_e,startLineNumber:ie},tooltip:`Goto range '${ae}'`,url:`/range/${ae}`})}catch(Ae){console.warn(Ae)}}}}return pe}}),Y.editor.registerLinkOpener({open(X){if(X?.path?.startsWith("/range/")){try{f.getRanges(X.path.substring(7))?.select()}catch(_){console.warn("invalid range",_)}return!0}return!1}}),!De){const X=Y.languages.typescript.typescriptDefaults.getCompilerOptions();Y.languages.typescript.typescriptDefaults.setCompilerOptions({...X,target:Y.languages.typescript.ScriptTarget.ES2020,lib:["webworker","es2020","esnext.asynciterable"],downlevelIteration:!0,moduleResolution:Y.languages.typescript.ModuleResolutionKind.NodeJs,allowSyntheticDefaultImports:!0,baseUrl:"inmemory://model/",allowNonTsExtensions:!0})}if(U.current&&(await qr(u.current.editor,u.current.monaco,U.current),U.current=null),I.current&&requestAnimationFrame(async()=>{I.current&&Y.editor.focus()}),!an){an={};const X=Ft.length;for(let _=0;_<X;_++){const re=Ft[_];an[re]=globalThis[re]}}})()},onMount:ke})}),We]})},[f,z,i,We,m]),Ve=r.useImperativeElement(t,()=>({isScriptEditorElement:()=>!0,focus:ee=>{fe(ee)},close:()=>Re(),getEditor:()=>f?.getEditor()}),[f]);return o.useEffect(()=>(s&&requestAnimationFrame(()=>{Ve.current?.focus()}),()=>{u.current?.editor&&requestAnimationFrame(()=>{Ve.current?.contains(document.activeElement)&&Ve.current?.focus()})}),[]),c.jsx("div",{className:gt("script-editor",Oa,n),style:{display:"flex",flexDirection:"row",flex:"1 1 100%",position:"relative",...l},ref:Ve,...C,children:Fe})}));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=Ri,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=Si,exports.CornerTriangle=vo,exports.DateUtils=Il,exports.DefaultTaskPaneRegistry=Pn,exports.DocThemesContext=Nn,exports.DocThemesProvider=e=>{const{themes:t,children:n}=e;return c.jsx(Nn.Provider,{value:t,children:n})},exports.EditableLabel=Ur,exports.EmptyFrame=fi,exports.FilterButton=Rr,exports.FontUtils=El,exports.Item=zo,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=Ar,exports.MovableArea=Pr,exports.PictureEditor=Hr,exports.Row=Cl,exports.ScriptEditor=$a,exports.SheetCellEditor=Mr,exports.SheetCellRenderer=kr,exports.SheetElement=Vr,exports.SheetScrollbar=Mo,exports.StaticBorderRenderer=Bl,exports.StyledStrokePath=Ir,exports.Tab=vl,exports.TabStrip=yl,exports.TaskPaneArea=Gl,exports.TaskPaneProvider=({children:e,createArea:t,onUpdateArea:n,registry:l=Pn})=>{const a=o.useRef(null),i=o.useRef(null),[m,h]=o.useState(null),[s,p]=o.useState(null),b=o.useMemo(()=>({activateTaskPane(u,I){i.current!==u&&(a.current?a.current.activateTaskPane(u,I):(h(u),C(u)))}}),[]),C=r.useCallbackRef(u=>{const I=t({registry:l,onClose:()=>{p(null),n?.(null)}},x=>{x&&p(x)});return n?.(I),I},[t,l,m]);return o.useEffect(()=>{s&&m&&(s.activateTaskPane(m,{focus:!0}),h(null))},[m,s]),o.createElement(Dr.Provider,{value:s??b},e)},exports.TaskPaneStrip=ko,exports.TaskPaneTitle=Ro,exports.createCellEditStateFromCell=Tr,exports.useBordersOverlay=So,exports.useDocThemes=()=>{const e=o.useContext(Nn),[t]=o.useState(()=>new d.ThemeCollection);return o.useMemo(()=>e||t,[e])},exports.useModelListener=tt,exports.useMovableCommands=jr,exports.useRangeListener=(e,t,n,l)=>{const a=o.useRef(n);a.current=n;const i=l?.fireOnAddressChange??!0;o.useEffect(()=>{if(!e||!t||!a.current){const s={getSource:()=>null,trigger:"delete",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()};return void a.current?.(s)}const m=s=>{a.current?.(s)},h=e.getRange(t).addListener(m,l);if(i){const s=e.getRange(t);m({getSource:()=>s,trigger:"modelChange",isDataChange:!1,isTransactional:!1,isUndo:!1,timeStamp:Date.now()})}return()=>{h?.()}},[e,t])},exports.useSheetCommands=Nr,exports.useSheetCopyPaste=Lr,exports.useTaskPaneArea=zr,Object.keys(r).forEach(e=>{e==="default"||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});