From 3b87a5c66382d9e46b77aea61e42fa086aca6ed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Laiola=20Guimar=C3=A3es?= Date: Sun, 14 Apr 2024 14:46:48 -0300 Subject: [PATCH] Update gist --- ...97f98.css => calc.040ca5ee17c8bb6a366b.css | 0 ...css.gz => calc.040ca5ee17c8bb6a366b.css.gz | Bin index.html | 4 +- index.html.gz | Bin 1823 -> 1821 bytes js/calc.040ca5ee17c8bb6a366b.bundle.js | 153 ++++++++++++++++++ js/calc.040ca5ee17c8bb6a366b.bundle.js.gz | Bin 0 -> 1012382 bytes js/calc.48afd3ebdd9746997f98.bundle.js | 153 ------------------ js/calc.48afd3ebdd9746997f98.bundle.js.gz | Bin 875669 -> 0 bytes js/tests.040ca5ee17c8bb6a366b.bundle.js | 42 +++++ js/tests.040ca5ee17c8bb6a366b.bundle.js.gz | Bin 0 -> 153428 bytes js/tests.48afd3ebdd9746997f98.bundle.js | 42 ----- js/tests.48afd3ebdd9746997f98.bundle.js.gz | Bin 152636 -> 0 bytes test.html | 4 +- test.html.gz | Bin 421 -> 420 bytes ...7f98.css => tests.040ca5ee17c8bb6a366b.css | 0 ...ss.gz => tests.040ca5ee17c8bb6a366b.css.gz | Bin 16 files changed, 199 insertions(+), 199 deletions(-) rename calc.48afd3ebdd9746997f98.css => calc.040ca5ee17c8bb6a366b.css (100%) rename calc.48afd3ebdd9746997f98.css.gz => calc.040ca5ee17c8bb6a366b.css.gz (100%) create mode 100644 js/calc.040ca5ee17c8bb6a366b.bundle.js create mode 100644 js/calc.040ca5ee17c8bb6a366b.bundle.js.gz delete mode 100644 js/calc.48afd3ebdd9746997f98.bundle.js delete mode 100644 js/calc.48afd3ebdd9746997f98.bundle.js.gz create mode 100644 js/tests.040ca5ee17c8bb6a366b.bundle.js create mode 100644 js/tests.040ca5ee17c8bb6a366b.bundle.js.gz delete mode 100644 js/tests.48afd3ebdd9746997f98.bundle.js delete mode 100644 js/tests.48afd3ebdd9746997f98.bundle.js.gz rename tests.48afd3ebdd9746997f98.css => tests.040ca5ee17c8bb6a366b.css (100%) rename tests.48afd3ebdd9746997f98.css.gz => tests.040ca5ee17c8bb6a366b.css.gz (100%) diff --git a/calc.48afd3ebdd9746997f98.css b/calc.040ca5ee17c8bb6a366b.css similarity index 100% rename from calc.48afd3ebdd9746997f98.css rename to calc.040ca5ee17c8bb6a366b.css diff --git a/calc.48afd3ebdd9746997f98.css.gz b/calc.040ca5ee17c8bb6a366b.css.gz similarity index 100% rename from calc.48afd3ebdd9746997f98.css.gz rename to calc.040ca5ee17c8bb6a366b.css.gz diff --git a/index.html b/index.html index eeb6b90f..0be95a7c 100644 --- a/index.html +++ b/index.html @@ -116,7 +116,7 @@ } } - +
@@ -125,6 +125,6 @@
- + \ No newline at end of file diff --git a/index.html.gz b/index.html.gz index 8ea8e7f22ff30f0f5a50385681c29bca6e2ae4a4..95199fe4044ee049fae536c35e28d613ac2ceb5f 100644 GIT binary patch literal 1821 zcmV+&2jci2iwFP!000026RlTmbKAxd{!IOfH9aZGmHL_aJHgz1 ztFsyB1t^JQw9;1m;(M;d4-}Ec(@Ir~ibPd#s&Sa8vKCaOPm%xz*OMrsy)C=s-*tXYpg zq?oEJ3BOyVs`ph9tu2+_acmb*_Yvk68-yRAy; zS^w!|@_9O+KMeDQalV$B4}|CviFoSpJD2=47l#M?*+WL;_JX7AA$aaT024mo2uTFq z-f-U5nLCAsa!h7SYD@)!a7>8P#fW|erYGMFzEP^E_$8upZDnS@^VMkZmS&{C2oUWS z{_)E%w3XV4=ndUgeA8j@0@Rzgqqu2JITX5R7f{uV9QJM;FcrX4`ZLwMqOXPJ;m98) zKsIrv8Kkp{9p6xm#{QIr-z(U58|JI^r6^v*H-NmEybS_kVb*o#q<3qh-Ky}bMcfDt z*4HS%u|yfw_A8z%%|q`IK<-Avm8^5M8dI(^ulSe-!KVYfCCO^FiVN?tNNijdXKImb zS69YC3o(FEkXeY~AeiLHXh(+!htCfGdTvtO zo^xS^wse6ShB9*wD7|b@0$~b$Bke!h)DsPbVjY;f1haf=lPj?lf$E~Hmn5H-6=1G8 z7<7jM&7@7e-CE2w-zKIJQJ_Z67QgL`!)z3~f+k6ju zbxB>P3v!}A=J1uJsyblCGC(D5hOM2CC7F3&Csc)w*d}ugSI4x(KpF zox5CIB9aW+38f;t2D)qInbKZTt1FKbdG1kRJ4i^iS|JbzhM*R@*_vA8dQ%9)xFg1z zn@VJii$}7=aqN=<{jQx`TwZylDKHl@ht%c3B6V;vnL`B?t3N zhyizfgd*h};8<`o^Hu|(krS&rI0JirhzKGc8oR>iKq+Gmk)hGnyK3#&iYVJkcz8Zk z)(W!=i44MXx4VwtEo{}MjLq>L8?^td+?1uI(Bz8J&v!ogdz<~(xQH80N3lU6w!^`n z2BR2?oQbU55xv~V@q%1sT5cF-Az$&ic_UDITzM2*u~$mg9<;f&Ve%`k|JMZ7*Busk z@4BZ`{U&bc$!z8`V2*hpzd!r2FsR$A8k7GHV3>$Gw{-oY(`GWJXgZ?5gd;0FqgdrLaxq3pFO6h2L}gUs-I$y>F8N=>(?c_sNxMF#$rtzWaUY^LOpjq&Ox(DCo46k;@#NVg6Nk*x&$H)gdL#~xj?g^~26#VddTvuP zqaU9n;YaS?NviU-%ZywuDXTDiz77+lxV^w=+$WjO`mR7D!7eahaP6D<7C!5TO!DM+ z=sS_`4#bY<>|XAlj>8?ImD=JSA14U&*1hRh<`L^tq*=unmYn3SY@8&)<~=yU{o?;0 LCh`s12oL}OxZ#zQ literal 1823 zcmV+)2jKW0iwFP!000026RlTmbK5o&{w)8BjWRt+cOog-u@k#i+SK*6>Gje~?VD>S zlMf&XlCU9y20+Pb>;Cq808lS+66e~f#ukaivy0uuzUlPQ*FT(H{`~r!Dm$0Y_fEqD zPtNk^d%e>+w~VriX~XTT-`XO2*5A-8YnzDQv|=&q{}lb_MRca-4YMMZyib{`Ew91! z@_feg5|qR-T45!B{v(&{CyGepX@#npBqmFqY8=L7)`F_^X%fKTdK5*p*Xy0BW~D`0 zS=ygWkLWv9vAX7l{>6=vTmyl>%Ssr!P_525ovEDDKb4*nXr@iCcxK5evK1%G_1usu z{Nms07a=91*KI0A1}Wc*jMs*bX%W+YJc;RLK~N3~Y*=1@PfKQ~R+e&MtQKi&c}`1V zD*%LnltM^|_*u0ut0t9NCh({^G3&i|k|gtRa;$WjKxBf$k{HHD(Z&jKS%^Et7@*t zA5u)!Qo!$4DfzxCthJTWJC5xFY7=3e1w4>(?WBXHX(W%VYO^X5;OmnSzi>0_PoGV0 z@!zLP^8z@7%rQy977mr%XN#M<^cS?19HiM*1I5Igl{|5nwfKYm+k^d&2=AVe$NXW* z)1%wz(I+H(%m*aTSuF}~>_^y*usmM!bOXE3ZLT{fewdvVOpB-yxQaZoERD^gbhjmy zp7kG3CQs9%xF68P`G|f6rYGJEzEP@_`~{+NWkqIw@YQJWmS&_s4-oAZ z{_)#yw3XV4=ndUgeA8j@0@Rzgqqu2JHDtPM=TOy*9QJM;FcRP?{heyQq_3If!;wFV zfo$STbCAv@cYH%N8v9e`ey`-V+c00PE?M~sz5(RToXeMpy?bfW&{5CNSivl%jw)kyl9A=}?9e+gDa7nLuE;2NQG0D))y4i|a<9bsF!?+{H znm3YV92bvdiR0KO1=yFB$SPW@dH`csYq&qS6Y36P*7AAd&ymw8?=K#lon<-iifJRO%>);IR`5_{RxNqzdqXVTJbBG9yw%%21$5uqyR>J-B zp|Vz(U5I56p1a*u{BB{B>oQj0JvM0nS+y=p3#Q2xrC;xS^7q#Jv2hVMoQ`6HLTrbF zzYRt)6gg*EwIh15mg5Dv%CuNB%tF56bMuCw^tkfKwqmc8s6A+XYs2JsT>tM0s;@gN z@ZNP#r}|CY(4*PRXF!2@Am5z*P#Dy$lwI(3eq|G%r0UHPH9 z7bEX61P2c^3QZc)Pl%;PNkoI!!>ZLY!5Q-t@~_glD#9*Yfp2fe zovX{ZP1m{gOH8KWFqge0Laxq3pFN?+2L}gUs-I#{=;%pv>(>=`Rc(imB0{;2G|NS6 zPG~ym)QK=(Tnme4fzc*df~mq!!HDh1jm3m%74(Q z*v6kx_m5iQ;yy%gm>$Eln7DEOHgP{x;wR5okst6h&ySxzIXXUmS{y%%GlK!%Pnw?F zRGgz9pC;i)?%rvt@|DYsTr4P)7(QQx36kAjU^MQN$Y*_5ppjq~7%+J4oB0+#>xWG8 z diff --git a/js/calc.040ca5ee17c8bb6a366b.bundle.js b/js/calc.040ca5ee17c8bb6a366b.bundle.js new file mode 100644 index 00000000..4427ba65 --- /dev/null +++ b/js/calc.040ca5ee17c8bb6a366b.bundle.js @@ -0,0 +1,153 @@ +!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/relax/",t(t.s=0)}({"./node_modules/@babel/runtime/helpers/assertThisInitialized.js":function(e,n){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/defineProperty.js":function(e,n){e.exports=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/defineProperty.js":function(e,n,t){"use strict";function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}t.d(n,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/extends.js":function(e,n,t){"use strict";function r(){return(r=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o}t.d(n,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/extends.js":function(e,n){function t(){return e.exports=t=Object.assign||function(e){for(var n=1;n=0||(o[t]=e[t]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":function(e,n){function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@fortawesome/free-solid-svg-icons/faMoon.js":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=[],o="M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z";n.definition={prefix:"fas",iconName:"moon",icon:[512,512,r,"f186",o]},n.faMoon=n.definition,n.prefix="fas",n.iconName="moon",n.width=512,n.height=512,n.ligatures=r,n.unicode="f186",n.svgPathData=o},"./node_modules/@fortawesome/free-solid-svg-icons/index.es.js":function(e,n,t){"use strict";t.d(n,"a",(function(){return r})),t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return i})),t.d(n,"d",(function(){return a})),t.d(n,"e",(function(){return s})),t.d(n,"f",(function(){return l})),t.d(n,"g",(function(){return u})),t.d(n,"h",(function(){return c})),t.d(n,"i",(function(){return d})),t.d(n,"j",(function(){return f})),t.d(n,"k",(function(){return h})),t.d(n,"l",(function(){return A})),t.d(n,"m",(function(){return m})),t.d(n,"n",(function(){return p})),t.d(n,"o",(function(){return g})),t.d(n,"p",(function(){return y})),t.d(n,"q",(function(){return v})),t.d(n,"r",(function(){return b})),t.d(n,"s",(function(){return w})),t.d(n,"t",(function(){return _})),t.d(n,"u",(function(){return C})),t.d(n,"v",(function(){return E})),t.d(n,"w",(function(){return k})); +/*! + * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + */ +var r={prefix:"fas",iconName:"address-card",icon:[576,512,[],"f2bb","M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-352 96c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zm112 236.8c0 10.6-10 19.2-22.4 19.2H86.4C74 384 64 375.4 64 364.8v-19.2c0-31.8 30.1-57.6 67.2-57.6h5c12.3 5.1 25.7 8 39.8 8s27.6-2.9 39.8-8h5c37.1 0 67.2 25.8 67.2 57.6v19.2zM512 312c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16zm0-64c0 4.4-3.6 8-8 8H360c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h144c4.4 0 8 3.6 8 8v16z"]},o={prefix:"fas",iconName:"bars",icon:[448,512,[],"f0c9","M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"]},i={prefix:"fas",iconName:"calculator",icon:[448,512,[],"f1ec","M400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zM128 435.2c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8V268.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v166.4zm0-256c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8V76.8C64 70.4 70.4 64 76.8 64h294.4c6.4 0 12.8 6.4 12.8 12.8v102.4z"]},a={prefix:"fas",iconName:"calendar-alt",icon:[448,512,[],"f073","M0 464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V192H0v272zm320-196c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM192 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12v-40zM64 268c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zm0 128c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12v-40zM400 64h-48V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H160V16c0-8.8-7.2-16-16-16h-32c-8.8 0-16 7.2-16 16v48H48C21.5 64 0 85.5 0 112v48h448v-48c0-26.5-21.5-48-48-48z"]},s={prefix:"fas",iconName:"check-circle",icon:[512,512,[],"f058","M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"]},l={prefix:"fas",iconName:"comment",icon:[512,512,[],"f075","M256 32C114.6 32 0 125.1 0 240c0 49.6 21.4 95 57 130.7C44.5 421.1 2.7 466 2.2 466.5c-2.2 2.3-2.8 5.7-1.5 8.7S4.8 480 8 480c66.3 0 116-31.8 140.6-51.4 32.7 12.3 69 19.4 107.4 19.4 141.4 0 256-93.1 256-208S397.4 32 256 32z"]},u={prefix:"fas",iconName:"database",icon:[448,512,[],"f1c0","M448 73.143v45.714C448 159.143 347.667 192 224 192S0 159.143 0 118.857V73.143C0 32.857 100.333 0 224 0s224 32.857 224 73.143zM448 176v102.857C448 319.143 347.667 352 224 352S0 319.143 0 278.857V176c48.125 33.143 136.208 48.572 224 48.572S399.874 209.143 448 176zm0 160v102.857C448 479.143 347.667 512 224 512S0 479.143 0 438.857V336c48.125 33.143 136.208 48.572 224 48.572S399.874 369.143 448 336z"]},c={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]},d={prefix:"fas",iconName:"external-link-alt",icon:[512,512,[],"f35d","M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"]},f={prefix:"fas",iconName:"file-csv",icon:[384,512,[],"f6dd","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm-96 144c0 4.42-3.58 8-8 8h-8c-8.84 0-16 7.16-16 16v32c0 8.84 7.16 16 16 16h8c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-8c-26.51 0-48-21.49-48-48v-32c0-26.51 21.49-48 48-48h8c4.42 0 8 3.58 8 8v16zm44.27 104H160c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h12.27c5.95 0 10.41-3.5 10.41-6.62 0-1.3-.75-2.66-2.12-3.84l-21.89-18.77c-8.47-7.22-13.33-17.48-13.33-28.14 0-21.3 19.02-38.62 42.41-38.62H200c4.42 0 8 3.58 8 8v16c0 4.42-3.58 8-8 8h-12.27c-5.95 0-10.41 3.5-10.41 6.62 0 1.3.75 2.66 2.12 3.84l21.89 18.77c8.47 7.22 13.33 17.48 13.33 28.14.01 21.29-19 38.62-42.39 38.62zM256 264v20.8c0 20.27 5.7 40.17 16 56.88 10.3-16.7 16-36.61 16-56.88V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8v20.8c0 35.48-12.88 68.89-36.28 94.09-3.02 3.25-7.27 5.11-11.72 5.11s-8.7-1.86-11.72-5.11c-23.4-25.2-36.28-58.61-36.28-94.09V264c0-4.42 3.58-8 8-8h16c4.42 0 8 3.58 8 8zm121-159L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},h={prefix:"fas",iconName:"file-download",icon:[384,512,[],"f56d","M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm76.45 211.36l-96.42 95.7c-6.65 6.61-17.39 6.61-24.04 0l-96.42-95.7C73.42 337.29 80.54 320 94.82 320H160v-80c0-8.84 7.16-16 16-16h32c8.84 0 16 7.16 16 16v80h65.18c14.28 0 21.4 17.29 11.27 27.36zM377 105L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"]},A={prefix:"fas",iconName:"globe-europe",icon:[496,512,[],"f7a2","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm200 248c0 22.5-3.9 44.2-10.8 64.4h-20.3c-4.3 0-8.4-1.7-11.4-4.8l-32-32.6c-4.5-4.6-4.5-12.1.1-16.7l12.5-12.5v-8.7c0-3-1.2-5.9-3.3-8l-9.4-9.4c-2.1-2.1-5-3.3-8-3.3h-16c-6.2 0-11.3-5.1-11.3-11.3 0-3 1.2-5.9 3.3-8l9.4-9.4c2.1-2.1 5-3.3 8-3.3h32c6.2 0 11.3-5.1 11.3-11.3v-9.4c0-6.2-5.1-11.3-11.3-11.3h-36.7c-8.8 0-16 7.2-16 16v4.5c0 6.9-4.4 13-10.9 15.2l-31.6 10.5c-3.3 1.1-5.5 4.1-5.5 7.6v2.2c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8s-3.6-8-8-8H247c-3 0-5.8 1.7-7.2 4.4l-9.4 18.7c-2.7 5.4-8.2 8.8-14.3 8.8H194c-8.8 0-16-7.2-16-16V199c0-4.2 1.7-8.3 4.7-11.3l20.1-20.1c4.6-4.6 7.2-10.9 7.2-17.5 0-3.4 2.2-6.5 5.5-7.6l40-13.3c1.7-.6 3.2-1.5 4.4-2.7l26.8-26.8c2.1-2.1 3.3-5 3.3-8 0-6.2-5.1-11.3-11.3-11.3H258l-16 16v8c0 4.4-3.6 8-8 8h-16c-4.4 0-8-3.6-8-8v-20c0-2.5 1.2-4.9 3.2-6.4l28.9-21.7c1.9-.1 3.8-.3 5.7-.3C358.3 56 448 145.7 448 256zM130.1 149.1c0-3 1.2-5.9 3.3-8l25.4-25.4c2.1-2.1 5-3.3 8-3.3 6.2 0 11.3 5.1 11.3 11.3v16c0 3-1.2 5.9-3.3 8l-9.4 9.4c-2.1 2.1-5 3.3-8 3.3h-16c-6.2 0-11.3-5.1-11.3-11.3zm128 306.4v-7.1c0-8.8-7.2-16-16-16h-20.2c-10.8 0-26.7-5.3-35.4-11.8l-22.2-16.7c-11.5-8.6-18.2-22.1-18.2-36.4v-23.9c0-16 8.4-30.8 22.1-39l42.9-25.7c7.1-4.2 15.2-6.5 23.4-6.5h31.2c10.9 0 21.4 3.9 29.6 10.9l43.2 37.1h18.3c8.5 0 16.6 3.4 22.6 9.4l17.3 17.3c3.4 3.4 8.1 5.3 12.9 5.3H423c-32.4 58.9-93.8 99.5-164.9 103.1z"]},m={prefix:"fas",iconName:"history",icon:[512,512,[],"f1da","M504 255.531c.253 136.64-111.18 248.372-247.82 248.468-59.015.042-113.223-20.53-155.822-54.911-11.077-8.94-11.905-25.541-1.839-35.607l11.267-11.267c8.609-8.609 22.353-9.551 31.891-1.984C173.062 425.135 212.781 440 256 440c101.705 0 184-82.311 184-184 0-101.705-82.311-184-184-184-48.814 0-93.149 18.969-126.068 49.932l50.754 50.754c10.08 10.08 2.941 27.314-11.313 27.314H24c-8.837 0-16-7.163-16-16V38.627c0-14.254 17.234-21.393 27.314-11.314l49.372 49.372C129.209 34.136 189.552 8 256 8c136.81 0 247.747 110.78 248 247.531zm-180.912 78.784l9.823-12.63c8.138-10.463 6.253-25.542-4.21-33.679L288 256.349V152c0-13.255-10.745-24-24-24h-16c-13.255 0-24 10.745-24 24v135.651l65.409 50.874c10.463 8.137 25.541 6.253 33.679-4.21z"]},p={prefix:"fas",iconName:"image",icon:[512,512,[],"f03e","M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"]},g={prefix:"fas",iconName:"magic",icon:[512,512,[],"f0d0","M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.66-53.33L160 80l-53.34-26.67L80 0 53.34 53.33 0 80l53.34 26.67L80 160zm352 128l-26.66 53.33L352 368l53.34 26.67L432 448l26.66-53.33L512 368l-53.34-26.67L432 288zm70.62-193.77L417.77 9.38C411.53 3.12 403.34 0 395.15 0c-8.19 0-16.38 3.12-22.63 9.38L9.38 372.52c-12.5 12.5-12.5 32.76 0 45.25l84.85 84.85c6.25 6.25 14.44 9.37 22.62 9.37 8.19 0 16.38-3.12 22.63-9.37l363.14-363.15c12.5-12.48 12.5-32.75 0-45.24zM359.45 203.46l-50.91-50.91 86.6-86.6 50.91 50.91-86.6 86.6z"]},y={prefix:"fas",iconName:"paste",icon:[448,512,[],"f0ea","M128 184c0-30.879 25.122-56 56-56h136V56c0-13.255-10.745-24-24-24h-80.61C204.306 12.89 183.637 0 160 0s-44.306 12.89-55.39 32H24C10.745 32 0 42.745 0 56v336c0 13.255 10.745 24 24 24h104V184zm32-144c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24zm184 248h104v200c0 13.255-10.745 24-24 24H184c-13.255 0-24-10.745-24-24V184c0-13.255 10.745-24 24-24h136v104c0 13.2 10.8 24 24 24zm104-38.059V256h-96v-96h6.059a24 24 0 0 1 16.97 7.029l65.941 65.941a24.002 24.002 0 0 1 7.03 16.971z"]},v={prefix:"fas",iconName:"play",icon:[448,512,[],"f04b","M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"]},b={prefix:"fas",iconName:"play-circle",icon:[512,512,[],"f144","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm115.7 272l-176 101c-15.8 8.8-35.7-2.5-35.7-21V152c0-18.4 19.8-29.8 35.7-21l176 107c16.4 9.2 16.4 32.9 0 42z"]},w={prefix:"fas",iconName:"question-circle",icon:[512,512,[],"f059","M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"]},_={prefix:"fas",iconName:"sun",icon:[512,512,[],"f185","M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"]},C={prefix:"fas",iconName:"table",icon:[512,512,[],"f0ce","M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zM224 416H64v-96h160v96zm0-160H64v-96h160v96zm224 160H288v-96h160v96zm0-160H288v-96h160v96z"]},E={prefix:"fas",iconName:"times-circle",icon:[512,512,[],"f057","M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"]},k={prefix:"fas",iconName:"upload",icon:[512,512,[],"f093","M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z"]}},"./node_modules/@fortawesome/react-fontawesome/index.es.js":function(e,n,t){"use strict"; +/*! + * Font Awesome Free 6.0.0 by @fontawesome - https://fontawesome.com + * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) + * Copyright 2022 Fonticons, Inc. + */ +function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function o(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0;)n+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return n}function q(e){for(var n=[],t=(e||[]).length>>>0;t--;)n[t]=e[t];return n}function J(e){return e.classList?q(e.classList):(e.getAttribute("class")||"").split(" ").filter((function(e){return e}))}function X(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function $(e){return Object.keys(e||{}).reduce((function(n,t){return n+"".concat(t,": ").concat(e[t].trim(),";")}),"")}function Z(e){return e.size!==K.size||e.x!==K.x||e.y!==K.y||e.rotate!==K.rotate||e.flipX||e.flipY}function ee(){var e="svg-inline--fa",n=W.familyPrefix,t=W.replacementClass,r=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0);\n animation-delay: var(--fa-animation-delay, 0);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';if("fa"!==n||t!==e){var o=new RegExp("\\.".concat("fa","\\-"),"g"),i=new RegExp("\\--".concat("fa","\\-"),"g"),a=new RegExp("\\.".concat(e),"g");r=r.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(a,".".concat(t))}return r}var ne=!1;function te(){W.autoAddCss&&!ne&&(!function(e){if(e&&C){var n=b.createElement("style");n.setAttribute("type","text/css"),n.innerHTML=e;for(var t=b.head.childNodes,r=null,o=t.length-1;o>-1;o--){var i=t[o],a=(i.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=i)}b.head.insertBefore(n,r)}}(ee()),ne=!0)}var re={mixout:function(){return{dom:{css:ee,insertCss:te}}},hooks:function(){return{beforeDOMElementCreation:function(){te()},beforeI2svg:function(){te()}}}},oe=v||{};oe.___FONT_AWESOME___||(oe.___FONT_AWESOME___={}),oe.___FONT_AWESOME___.styles||(oe.___FONT_AWESOME___.styles={}),oe.___FONT_AWESOME___.hooks||(oe.___FONT_AWESOME___.hooks={}),oe.___FONT_AWESOME___.shims||(oe.___FONT_AWESOME___.shims=[]);var ie=oe.___FONT_AWESOME___,ae=[],se=!1;function le(e){C&&(se?setTimeout(e,0):ae.push(e))}function ue(e){var n=e.tag,t=e.attributes,r=void 0===t?{}:t,o=e.children,i=void 0===o?[]:o;return"string"==typeof e?X(e):"<".concat(n," ").concat(function(e){return Object.keys(e||{}).reduce((function(n,t){return n+"".concat(t,'="').concat(X(e[t]),'" ')}),"").trim()}(r),">").concat(i.map(ue).join(""),"")}function ce(e,n,t){if(e&&e[n]&&e[n][t])return{prefix:n,iconName:t,icon:e[n][t]}}C&&((se=(b.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(b.readyState))||b.addEventListener("DOMContentLoaded",(function e(){b.removeEventListener("DOMContentLoaded",e),se=1,ae.map((function(e){return e()}))})));var de=function(e,n,t,r){var o,i,a,s=Object.keys(e),l=s.length,u=void 0!==r?function(e,n){return function(t,r,o,i){return e.call(n,t,r,o,i)}}(n,r):n;for(void 0===t?(o=1,a=e[s[0]]):(o=0,a=t);o=55296&&o<=56319&&t2&&void 0!==arguments[2]?arguments[2]:{},r=t.skipHooks,i=void 0!==r&&r,a=he(n);"function"!=typeof ie.hooks.addPack||i?ie.styles[e]=o(o({},ie.styles[e]||{}),a):ie.hooks.addPack(e,he(n)),"fas"===e&&Ae("fa",n)}var me=ie.styles,pe=ie.shims,ge=Object.values(j),ye=null,ve={},be={},we={},_e={},Ce={},Ee=Object.keys(x);function ke(e,n){var t,r=n.split("-"),o=r[0],i=r.slice(1).join("-");return o!==e||""===i||(t=i,~U.indexOf(t))?null:i}var Se,xe=function(){var e=function(e){return de(me,(function(n,t,r){return n[r]=de(t,e,{}),n}),{})};ve=e((function(e,n,t){(n[3]&&(e[n[3]]=t),n[2])&&n[2].filter((function(e){return"number"==typeof e})).forEach((function(n){e[n.toString(16)]=t}));return e})),be=e((function(e,n,t){(e[t]=t,n[2])&&n[2].filter((function(e){return"string"==typeof e})).forEach((function(n){e[n]=t}));return e})),Ce=e((function(e,n,t){var r=n[2];return e[t]=t,r.forEach((function(n){e[n]=t})),e}));var n="far"in me||W.autoFetchSvg,t=de(pe,(function(e,t){var r=t[0],o=t[1],i=t[2];return"far"!==o||n||(o="fas"),"string"==typeof r&&(e.names[r]={prefix:o,iconName:i}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:o,iconName:i}),e}),{names:{},unicodes:{}});we=t.names,_e=t.unicodes,ye=Le(W.styleDefault)};function Me(e,n){return(ve[e]||{})[n]}function je(e,n){return(Ce[e]||{})[n]}function Be(e){return we[e]||{prefix:null,iconName:null}}function Te(){return ye}Se=function(e){ye=Le(e.styleDefault)},V.push(Se),xe();function Le(e){var n=M[e]||M[x[e]],t=e in ie.styles?e:null;return n||t||null}function Oe(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.skipLookups,r=void 0!==t&&t,o=null,i=e.reduce((function(e,n){var t=ke(W.familyPrefix,n);if(me[n]?(n=ge.includes(n)?B[n]:n,o=n,e.prefix=n):Ee.indexOf(n)>-1?(o=n,e.prefix=Le(n)):t?e.iconName=t:n!==W.replacementClass&&e.rest.push(n),!r&&e.prefix&&e.iconName){var i="fa"===o?Be(e.iconName):{},a=je(e.prefix,e.iconName);i.prefix&&(o=null),e.iconName=i.iconName||a||e.iconName,e.prefix=i.prefix||e.prefix,"far"!==e.prefix||me.far||!me.fas||W.autoFetchSvg||(e.prefix="fas")}return e}),{prefix:null,iconName:null,rest:[]});return"fa"!==i.prefix&&"fa"!==o||(i.prefix=Te()||"fas"),i}var Re=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var n,t,r;return n=e,(t=[{key:"add",value:function(){for(var e=this,n=arguments.length,t=new Array(n),r=0;r0&&s.forEach((function(n){"string"==typeof n&&(e[o][n]=a)})),e[o][i]=a})),e}}])&&a(n.prototype,t),r&&a(n,r),Object.defineProperty(n,"prototype",{writable:!1}),e}(),De=[],Ie={},He={},Pe=Object.keys(He);function Ne(e,n){for(var t=arguments.length,r=new Array(t>2?t-2:0),o=2;o1?n-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{};return C?(Fe("beforeI2svg",e),Ue("pseudoElements2svg",e),Ue("i2svg",e)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.autoReplaceSvgRoot;!1===W.autoReplaceSvg&&(W.autoReplaceSvg=!0),W.observeMutations=!0,le((function(){ze({autoReplaceSvgRoot:n}),Fe("watch",e)}))}},Ve={noAuto:function(){W.autoReplaceSvg=!1,W.observeMutations=!1,Fe("noAuto")},config:W,dom:We,parse:{icon:function(e){if(null===e)return null;if("object"===i(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:je(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var n=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],t=Le(e[0]);return{prefix:t,iconName:je(t,n)||n}}if("string"==typeof e&&(e.indexOf("".concat(W.familyPrefix,"-"))>-1||e.match(T))){var r=Oe(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||Te(),iconName:je(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var o=Te();return{prefix:o,iconName:je(o,e)||e}}}},library:Ye,findIconDefinition:Qe,toHtml:ue},ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.autoReplaceSvgRoot,t=void 0===n?b:n;(Object.keys(ie.styles).length>0||W.autoFetchSvg)&&C&&W.autoReplaceSvg&&Ve.dom.i2svg({node:t})};function Ke(e,n){return Object.defineProperty(e,"abstract",{get:n}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((function(e){return ue(e)}))}}),Object.defineProperty(e,"node",{get:function(){if(C){var n=b.createElement("div");return n.innerHTML=e.html,n.children}}}),e}function Ge(e){var n=e.icons,t=n.main,r=n.mask,i=e.prefix,a=e.iconName,s=e.transform,l=e.symbol,u=e.title,c=e.maskId,d=e.titleId,f=e.extra,h=e.watchable,A=void 0!==h&&h,m=r.found?r:t,p=m.width,g=m.height,y="fak"===i,v=[W.replacementClass,a?"".concat(W.familyPrefix,"-").concat(a):""].filter((function(e){return-1===f.classes.indexOf(e)})).filter((function(e){return""!==e||!!e})).concat(f.classes).join(" "),b={children:[],attributes:o(o({},f.attributes),{},{"data-prefix":i,"data-icon":a,class:v,role:f.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(p," ").concat(g)})},w=y&&!~f.classes.indexOf("fa-fw")?{width:"".concat(p/g*16*.0625,"em")}:{};A&&(b.attributes["data-fa-i2svg"]=""),u&&(b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(d||G())},children:[u]}),delete b.attributes.title);var _=o(o({},b),{},{prefix:i,iconName:a,main:t,mask:r,maskId:c,transform:s,symbol:l,styles:o(o({},w),f.styles)}),C=r.found&&t.found?Ue("generateAbstractMask",_)||{children:[],attributes:{}}:Ue("generateAbstractIcon",_)||{children:[],attributes:{}},E=C.children,k=C.attributes;return _.children=E,_.attributes=k,l?function(e){var n=e.prefix,t=e.iconName,r=e.children,i=e.attributes,a=e.symbol,s=!0===a?"".concat(n,"-").concat(W.familyPrefix,"-").concat(t):a;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:o(o({},i),{},{id:s}),children:r}]}]}(_):function(e){var n=e.children,t=e.main,r=e.mask,i=e.attributes,a=e.styles,s=e.transform;if(Z(s)&&t.found&&!r.found){var l={x:t.width/t.height/2,y:.5};i.style=$(o(o({},a),{},{"transform-origin":"".concat(l.x+s.x/16,"em ").concat(l.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:n}]}(_)}function qe(e){var n=e.content,t=e.width,r=e.height,i=e.transform,a=e.title,s=e.extra,l=e.watchable,u=void 0!==l&&l,c=o(o(o({},s.attributes),a?{title:a}:{}),{},{class:s.classes.join(" ")});u&&(c["data-fa-i2svg"]="");var d=o({},s.styles);Z(i)&&(d.transform=function(e){var n=e.transform,t=e.width,r=void 0===t?16:t,o=e.height,i=void 0===o?16:o,a=e.startCentered,s=void 0!==a&&a,l="";return l+=s&&E?"translate(".concat(n.x/z-r/2,"em, ").concat(n.y/z-i/2,"em) "):s?"translate(calc(-50% + ".concat(n.x/z,"em), calc(-50% + ").concat(n.y/z,"em)) "):"translate(".concat(n.x/z,"em, ").concat(n.y/z,"em) "),l+="scale(".concat(n.size/z*(n.flipX?-1:1),", ").concat(n.size/z*(n.flipY?-1:1),") "),l+="rotate(".concat(n.rotate,"deg) ")}({transform:i,startCentered:!0,width:t,height:r}),d["-webkit-transform"]=d.transform);var f=$(d);f.length>0&&(c.style=f);var h=[];return h.push({tag:"span",attributes:c,children:[n]}),a&&h.push({tag:"span",attributes:{class:"sr-only"},children:[a]}),h}function Je(e){var n=e.content,t=e.title,r=e.extra,i=o(o(o({},r.attributes),t?{title:t}:{}),{},{class:r.classes.join(" ")}),a=$(r.styles);a.length>0&&(i.style=a);var s=[];return s.push({tag:"span",attributes:i,children:[n]}),t&&s.push({tag:"span",attributes:{class:"sr-only"},children:[t]}),s}var Xe=ie.styles;function $e(e){var n=e[0],t=e[1],r=l(e.slice(4),1)[0];return{found:!0,width:n,height:t,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(W.familyPrefix,"-").concat(H)},children:[{tag:"path",attributes:{class:"".concat(W.familyPrefix,"-").concat(F),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(W.familyPrefix,"-").concat(N),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var Ze={found:!1,width:512,height:512};function en(e,n){var t=n;return"fa"===n&&null!==W.styleDefault&&(n=Te()),new Promise((function(r,i){Ue("missingIconAbstract");if("fa"===t){var a=Be(e)||{};e=a.iconName||e,n=a.prefix||n}if(e&&n&&Xe[n]&&Xe[n][e])return r($e(Xe[n][e]));!function(e,n){S||W.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(n,'" is missing.'))}(e,n),r(o(o({},Ze),{},{icon:W.showMissingIcons&&e&&Ue("missingIconAbstract")||{}}))}))}var nn=function(){},tn=W.measurePerformance&&_&&_.mark&&_.measure?_:{mark:nn,measure:nn},rn=function(e){tn.mark("".concat('FA "6.0.0"'," ").concat(e," ends")),tn.measure("".concat('FA "6.0.0"'," ").concat(e),"".concat('FA "6.0.0"'," ").concat(e," begins"),"".concat('FA "6.0.0"'," ").concat(e," ends"))},on=function(e){return tn.mark("".concat('FA "6.0.0"'," ").concat(e," begins")),function(){return rn(e)}},an=function(){};function sn(e){return"string"==typeof(e.getAttribute?e.getAttribute("data-fa-i2svg"):null)}function ln(e){return b.createElementNS("http://www.w3.org/2000/svg",e)}function un(e){return b.createElement(e)}var cn={replace:function(e){var n=e[0];if(n.parentNode)if(e[1].forEach((function(e){n.parentNode.insertBefore(function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.ceFn,o=void 0===r?"svg"===n.tag?ln:un:r;if("string"==typeof n)return b.createTextNode(n);var i=o(n.tag);Object.keys(n.attributes||[]).forEach((function(e){i.setAttribute(e,n.attributes[e])}));var a=n.children||[];return a.forEach((function(n){i.appendChild(e(n,{ceFn:o}))})),i}(e),n)})),null===n.getAttribute("data-fa-i2svg")&&W.keepOriginalSource){var t=b.createComment(function(e){var n=" ".concat(e.outerHTML," ");return n="".concat(n,"Font Awesome fontawesome.com ")}(n));n.parentNode.replaceChild(t,n)}else n.remove()},nest:function(e){var n=e[0],t=e[1];if(~J(n).indexOf(W.replacementClass))return cn.replace(e);var r=new RegExp("".concat(W.familyPrefix,"-.*"));if(delete t[0].attributes.id,t[0].attributes.class){var o=t[0].attributes.class.split(" ").reduce((function(e,n){return n===W.replacementClass||n.match(r)?e.toSvg.push(n):e.toNode.push(n),e}),{toNode:[],toSvg:[]});t[0].attributes.class=o.toSvg.join(" "),0===o.toNode.length?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var i=t.map((function(e){return ue(e)})).join("\n");n.setAttribute("data-fa-i2svg",""),n.innerHTML=i}};function dn(e){e()}function fn(e,n){var t="function"==typeof n?n:an;if(0===e.length)t();else{var r=dn;"async"===W.mutateApproach&&(r=v.requestAnimationFrame||dn),r((function(){var n=!0===W.autoReplaceSvg?cn.replace:cn[W.autoReplaceSvg]||cn.replace,r=on("mutate");e.map(n),r(),t()}))}}var hn=!1;function An(){hn=!0}function mn(){hn=!1}var pn=null;function gn(e){if(w&&W.observeMutations){var n=e.treeCallback,t=void 0===n?an:n,r=e.nodeCallback,o=void 0===r?an:r,i=e.pseudoElementsCallback,a=void 0===i?an:i,s=e.observeMutationsRoot,l=void 0===s?b:s;pn=new w((function(e){if(!hn){var n=Te();q(e).forEach((function(e){if("childList"===e.type&&e.addedNodes.length>0&&!sn(e.addedNodes[0])&&(W.searchPseudoElements&&a(e.target),t(e.target)),"attributes"===e.type&&e.target.parentNode&&W.searchPseudoElements&&a(e.target.parentNode),"attributes"===e.type&&sn(e.target)&&~I.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var n=e.getAttribute?e.getAttribute("data-prefix"):null,t=e.getAttribute?e.getAttribute("data-icon"):null;return n&&t}(e.target)){var r=Oe(J(e.target)),i=r.prefix,s=r.iconName;e.target.setAttribute("data-prefix",i||n),s&&e.target.setAttribute("data-icon",s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(W.replacementClass)&&o(e.target);var l}))}})),C&&pn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function yn(e){var n=e.getAttribute("style"),t=[];return n&&(t=n.split(";").reduce((function(e,n){var t=n.split(":"),r=t[0],o=t.slice(1);return r&&o.length>0&&(e[r]=o.join(":").trim()),e}),{})),t}function vn(e){var n,t,r=e.getAttribute("data-prefix"),o=e.getAttribute("data-icon"),i=void 0!==e.innerText?e.innerText.trim():"",a=Oe(J(e));return a.prefix||(a.prefix=Te()),r&&o&&(a.prefix=r,a.iconName=o),a.iconName&&a.prefix||a.prefix&&i.length>0&&(a.iconName=(n=a.prefix,t=e.innerText,(be[n]||{})[t]||Me(a.prefix,fe(e.innerText)))),a}function bn(e){var n=q(e.attributes).reduce((function(e,n){return"class"!==e.name&&"style"!==e.name&&(e[n.name]=n.value),e}),{}),t=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return W.autoA11y&&(t?n["aria-labelledby"]="".concat(W.replacementClass,"-title-").concat(r||G()):(n["aria-hidden"]="true",n.focusable="false")),n}function wn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},t=vn(e),r=t.iconName,i=t.prefix,a=t.rest,s=bn(e),l=Ne("parseNodeAttributes",{},e),u=n.styleParser?yn(e):[];return o({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:K,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:a,styles:u,attributes:s}},l)}var _n=ie.styles;function Cn(e){var n="nest"===W.autoReplaceSvg?wn(e,{styleParser:!1}):wn(e);return~n.extra.classes.indexOf("fa-layers-text")?Ue("generateLayersText",e,n):Ue("generateSvgReplacementMutation",e,n)}function En(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!C)return Promise.resolve();var t=b.documentElement.classList,r=function(e){return t.add("".concat("fontawesome-i2svg","-").concat(e))},o=function(e){return t.remove("".concat("fontawesome-i2svg","-").concat(e))},i=W.autoFetchSvg?Object.keys(x):Object.keys(_n),a=[".".concat("fa-layers-text",":not([").concat("data-fa-i2svg","])")].concat(i.map((function(e){return".".concat(e,":not([").concat("data-fa-i2svg","])")}))).join(", ");if(0===a.length)return Promise.resolve();var s=[];try{s=q(e.querySelectorAll(a))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),o("complete");var l=on("onTree"),u=s.reduce((function(e,n){try{var t=Cn(n);t&&e.push(t)}catch(e){S||"MissingIcon"===e.name&&console.error(e)}return e}),[]);return new Promise((function(e,t){Promise.all(u).then((function(t){fn(t,(function(){r("active"),r("complete"),o("pending"),"function"==typeof n&&n(),l(),e()}))})).catch((function(e){l(),t(e)}))}))}function kn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Cn(e).then((function(e){e&&fn([e],n)}))}var Sn=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.transform,r=void 0===t?K:t,i=n.symbol,a=void 0!==i&&i,s=n.mask,l=void 0===s?null:s,u=n.maskId,c=void 0===u?null:u,d=n.title,f=void 0===d?null:d,h=n.titleId,A=void 0===h?null:h,m=n.classes,p=void 0===m?[]:m,g=n.attributes,y=void 0===g?{}:g,v=n.styles,b=void 0===v?{}:v;if(e){var w=e.prefix,_=e.iconName,C=e.icon;return Ke(o({type:"icon"},e),(function(){return Fe("beforeDOMElementCreation",{iconDefinition:e,params:n}),W.autoA11y&&(f?y["aria-labelledby"]="".concat(W.replacementClass,"-title-").concat(A||G()):(y["aria-hidden"]="true",y.focusable="false")),Ge({icons:{main:$e(C),mask:l?$e(l.icon):{found:!1,width:null,height:null,icon:{}}},prefix:w,iconName:_,transform:o(o({},K),r),symbol:a,title:f,maskId:c,titleId:A,extra:{attributes:y,styles:b,classes:p}})}))}},xn={mixout:function(){return{icon:(e=Sn,function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(n||{}).icon?n:Qe(n||{}),i=t.mask;return i&&(i=(i||{}).icon?i:Qe(i||{})),e(r,o(o({},t),{},{mask:i}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=En,e.nodeCallback=kn,e}}},provides:function(e){e.i2svg=function(e){var n=e.node,t=void 0===n?b:n,r=e.callback;return En(t,void 0===r?function(){}:r)},e.generateSvgReplacementMutation=function(e,n){var t=n.iconName,r=n.title,o=n.titleId,i=n.prefix,a=n.transform,s=n.symbol,u=n.mask,c=n.maskId,d=n.extra;return new Promise((function(n,f){Promise.all([en(t,i),u.iconName?en(u.iconName,u.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((function(u){var f=l(u,2),h=f[0],A=f[1];n([e,Ge({icons:{main:h,mask:A},prefix:i,iconName:t,transform:a,symbol:s,maskId:c,title:r,titleId:o,extra:d,watchable:!0})])})).catch(f)}))},e.generateAbstractIcon=function(e){var n,t=e.children,r=e.attributes,o=e.main,i=e.transform,a=$(e.styles);return a.length>0&&(r.style=a),Z(i)&&(n=Ue("generateAbstractTransformGrouping",{main:o,transform:i,containerWidth:o.width,iconWidth:o.width})),t.push(n||o.icon),{children:t,attributes:r}}}},Mn={mixout:function(){return{layer:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.classes,r=void 0===t?[]:t;return Ke({type:"layer"},(function(){Fe("beforeDOMElementCreation",{assembler:e,params:n});var t=[];return e((function(e){Array.isArray(e)?e.map((function(e){t=t.concat(e.abstract)})):t=t.concat(e.abstract)})),[{tag:"span",attributes:{class:["".concat(W.familyPrefix,"-layers")].concat(u(r)).join(" ")},children:t}]}))}}}},jn={mixout:function(){return{counter:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.title,r=void 0===t?null:t,o=n.classes,i=void 0===o?[]:o,a=n.attributes,s=void 0===a?{}:a,l=n.styles,c=void 0===l?{}:l;return Ke({type:"counter",content:e},(function(){return Fe("beforeDOMElementCreation",{content:e,params:n}),Je({content:e.toString(),title:r,extra:{attributes:s,styles:c,classes:["".concat(W.familyPrefix,"-layers-counter")].concat(u(i))}})}))}}}},Bn={mixout:function(){return{text:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.transform,r=void 0===t?K:t,i=n.title,a=void 0===i?null:i,s=n.classes,l=void 0===s?[]:s,c=n.attributes,d=void 0===c?{}:c,f=n.styles,h=void 0===f?{}:f;return Ke({type:"text",content:e},(function(){return Fe("beforeDOMElementCreation",{content:e,params:n}),qe({content:e,transform:o(o({},K),r),title:a,extra:{attributes:d,styles:h,classes:["".concat(W.familyPrefix,"-layers-text")].concat(u(l))}})}))}}},provides:function(e){e.generateLayersText=function(e,n){var t=n.title,r=n.transform,o=n.extra,i=null,a=null;if(E){var s=parseInt(getComputedStyle(e).fontSize,10),l=e.getBoundingClientRect();i=l.width/s,a=l.height/s}return W.autoA11y&&!t&&(o.attributes["aria-hidden"]="true"),Promise.resolve([e,qe({content:e.innerHTML,width:i,height:a,transform:r,title:t,extra:o,watchable:!0})])}}},Tn=new RegExp('"',"ug"),Ln=[1105920,1112319];function On(e,n){var t="".concat("data-fa-pseudo-element-pending").concat(n.replace(":","-"));return new Promise((function(r,i){if(null!==e.getAttribute(t))return r();var a,s,l,u=q(e.children).filter((function(e){return e.getAttribute("data-fa-pseudo-element")===n}))[0],c=v.getComputedStyle(e,n),d=c.getPropertyValue("font-family").match(L),f=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(u&&!d)return e.removeChild(u),r();if(d&&"none"!==h&&""!==h){var A=c.getPropertyValue("content"),m=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(d[2])?M[d[2].toLowerCase()]:O[f],p=function(e){var n,t,r,o,i,a=e.replace(Tn,""),s=(t=0,o=(n=a).length,(i=n.charCodeAt(t))>=55296&&i<=56319&&o>t+1&&(r=n.charCodeAt(t+1))>=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i),l=s>=Ln[0]&&s<=Ln[1],u=2===a.length&&a[0]===a[1];return{value:fe(u?a[0]:a),isSecondary:l||u}}(A),g=p.value,y=p.isSecondary,w=d[0].startsWith("FontAwesome"),_=Me(m,g),C=_;if(w){var E=(s=_e[a=g],l=Me("fas",a),s||(l?{prefix:"fas",iconName:l}:null)||{prefix:null,iconName:null});E.iconName&&E.prefix&&(_=E.iconName,m=E.prefix)}if(!_||y||u&&u.getAttribute("data-prefix")===m&&u.getAttribute("data-icon")===C)r();else{e.setAttribute(t,C),u&&e.removeChild(u);var k={iconName:null,title:null,titleId:null,prefix:null,transform:K,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},S=k.extra;S.attributes["data-fa-pseudo-element"]=n,en(_,m).then((function(i){var a=Ge(o(o({},k),{},{icons:{main:i,mask:{prefix:null,iconName:null,rest:[]}},prefix:m,iconName:C,extra:S,watchable:!0})),s=b.createElement("svg");"::before"===n?e.insertBefore(s,e.firstChild):e.appendChild(s),s.outerHTML=a.map((function(e){return ue(e)})).join("\n"),e.removeAttribute(t),r()})).catch(i)}}else r()}))}function Rn(e){return Promise.all([On(e,"::before"),On(e,"::after")])}function Dn(e){return!(e.parentNode===document.head||~k.indexOf(e.tagName.toUpperCase())||e.getAttribute("data-fa-pseudo-element")||e.parentNode&&"svg"===e.parentNode.tagName)}function In(e){if(C)return new Promise((function(n,t){var r=q(e.querySelectorAll("*")).filter(Dn).map(Rn),o=on("searchPseudoElements");An(),Promise.all(r).then((function(){o(),mn(),n()})).catch((function(){o(),mn(),t()}))}))}var Hn=!1,Pn=function(e){return e.toLowerCase().split(" ").reduce((function(e,n){var t=n.toLowerCase().split("-"),r=t[0],o=t.slice(1).join("-");if(r&&"h"===o)return e.flipX=!0,e;if(r&&"v"===o)return e.flipY=!0,e;if(o=parseFloat(o),isNaN(o))return e;switch(r){case"grow":e.size=e.size+o;break;case"shrink":e.size=e.size-o;break;case"left":e.x=e.x-o;break;case"right":e.x=e.x+o;break;case"up":e.y=e.y-o;break;case"down":e.y=e.y+o;break;case"rotate":e.rotate=e.rotate+o}return e}),{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Nn={mixout:function(){return{parse:{transform:function(e){return Pn(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,n){var t=n.getAttribute("data-fa-transform");return t&&(e.transform=Pn(t)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var n=e.main,t=e.transform,r=e.containerWidth,i=e.iconWidth,a={transform:"translate(".concat(r/2," 256)")},s="translate(".concat(32*t.x,", ").concat(32*t.y,") "),l="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),u="rotate(".concat(t.rotate," 0 0)"),c={outer:a,inner:{transform:"".concat(s," ").concat(l," ").concat(u)},path:{transform:"translate(".concat(i/2*-1," -256)")}};return{tag:"g",attributes:o({},c.outer),children:[{tag:"g",attributes:o({},c.inner),children:[{tag:n.icon.tag,children:n.icon.children,attributes:o(o({},n.icon.attributes),c.path)}]}]}}}},Fn={x:0,y:0,width:"100%",height:"100%"};function Un(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||n)&&(e.attributes.fill="black"),e}var Qn,Yn={hooks:function(){return{parseNodeAttributes:function(e,n){var t=n.getAttribute("data-fa-mask"),r=t?Oe(t.split(" ").map((function(e){return e.trim()}))):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=Te()),e.mask=r,e.maskId=n.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var n,t=e.children,r=e.attributes,i=e.main,a=e.mask,s=e.maskId,l=e.transform,u=i.width,c=i.icon,d=a.width,f=a.icon,h=function(e){var n=e.transform,t=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(t/2," 256)")},i="translate(".concat(32*n.x,", ").concat(32*n.y,") "),a="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),s="rotate(".concat(n.rotate," 0 0)");return{outer:o,inner:{transform:"".concat(i," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:l,containerWidth:d,iconWidth:u}),A={tag:"rect",attributes:o(o({},Fn),{},{fill:"white"})},m=c.children?{children:c.children.map(Un)}:{},p={tag:"g",attributes:o({},h.inner),children:[Un(o({tag:c.tag,attributes:o(o({},c.attributes),h.path)},m))]},g={tag:"g",attributes:o({},h.outer),children:[p]},y="mask-".concat(s||G()),v="clip-".concat(s||G()),b={tag:"mask",attributes:o(o({},Fn),{},{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[A,g]},w={tag:"defs",children:[{tag:"clipPath",attributes:{id:v},children:(n=f,"g"===n.tag?n.children:[n])},b]};return t.push(w,{tag:"rect",attributes:o({fill:"currentColor","clip-path":"url(#".concat(v,")"),mask:"url(#".concat(y,")")},Fn)}),{children:t,attributes:r}}}};Qn={mixoutsTo:Ve}.mixoutsTo,De=[re,xn,Mn,jn,Bn,{hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=In,e}}},provides:function(e){e.pseudoElements2svg=function(e){var n=e.node,t=void 0===n?b:n;W.searchPseudoElements&&In(t)}}},{mixout:function(){return{dom:{unwatch:function(){An(),Hn=!0}}}},hooks:function(){return{bootstrap:function(){gn(Ne("mutationObserverCallbacks",{}))},noAuto:function(){pn&&pn.disconnect()},watch:function(e){var n=e.observeMutationsRoot;Hn?mn():gn(Ne("mutationObserverCallbacks",{observeMutationsRoot:n}))}}}},Nn,Yn,{provides:function(e){var n=!1;v.matchMedia&&(n=v.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],t={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:o(o({},t),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var i=o(o({},r),{},{attributeName:"opacity"}),a={tag:"circle",attributes:o(o({},t),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||a.children.push({tag:"animate",attributes:o(o({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:o(o({},i),{},{values:"1;0;1;1;0;1;"})}),e.push(a),e.push({tag:"path",attributes:o(o({},t),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:o(o({},i),{},{values:"1;0;0;0;0;1;"})}]}),n||e.push({tag:"path",attributes:o(o({},t),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:o(o({},i),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},{hooks:function(){return{parseNodeAttributes:function(e,n){var t=n.getAttribute("data-fa-symbol"),r=null!==t&&(""===t||t);return e.symbol=r,e}}}}],Ie={},Object.keys(He).forEach((function(e){-1===Pe.indexOf(e)&&delete He[e]})),De.forEach((function(e){var n=e.mixout?e.mixout():{};if(Object.keys(n).forEach((function(e){"function"==typeof n[e]&&(Qn[e]=n[e]),"object"===i(n[e])&&Object.keys(n[e]).forEach((function(t){Qn[e]||(Qn[e]={}),Qn[e][t]=n[e][t]}))})),e.hooks){var t=e.hooks();Object.keys(t).forEach((function(e){Ie[e]||(Ie[e]=[]),Ie[e].push(t[e])}))}e.provides&&e.provides(He)}));var Wn=Ve.parse,Vn=Ve.icon,zn=t("./node_modules/prop-types/index.js"),Kn=t.n(zn),Gn=t("./node_modules/react/index.js"),qn=t.n(Gn);function Jn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Xn(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function nt(e){return function(e){if(Array.isArray(e))return tt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return tt(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return tt(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0||!Array.isArray(n)&&n?Zn({},e,n):{}}var ut=["forwardedRef"];function ct(e){var n=e.forwardedRef,t=et(e,ut),r=t.icon,o=t.mask,i=t.symbol,a=t.className,s=t.title,l=t.titleId,u=t.maskId,c=st(r),d=lt("classes",[].concat(nt(function(e){var n,t=e.beat,r=e.fade,o=e.beatFade,i=e.bounce,a=e.shake,s=e.flash,l=e.spin,u=e.spinPulse,c=e.spinReverse,d=e.pulse,f=e.fixedWidth,h=e.inverse,A=e.border,m=e.listItem,p=e.flip,g=e.size,y=e.rotation,v=e.pull,b=(Zn(n={"fa-beat":t,"fa-fade":r,"fa-beat-fade":o,"fa-bounce":i,"fa-shake":a,"fa-flash":s,"fa-spin":l,"fa-spin-reverse":c,"fa-spin-pulse":u,"fa-pulse":d,"fa-fw":f,"fa-inverse":h,"fa-border":A,"fa-li":m,"fa-flip-horizontal":"horizontal"===p||"both"===p,"fa-flip-vertical":"vertical"===p||"both"===p},"fa-".concat(g),null!=g),Zn(n,"fa-rotate-".concat(y),null!=y&&0!==y),Zn(n,"fa-pull-".concat(v),null!=v),Zn(n,"fa-swap-opacity",e.swapOpacity),n);return Object.keys(b).map((function(e){return b[e]?e:null})).filter((function(e){return e}))}(t)),nt(a.split(" ")))),f=lt("transform","string"==typeof t.transform?Wn.transform(t.transform):t.transform),h=lt("mask",st(o)),A=Vn(c,Xn(Xn(Xn(Xn({},d),f),h),{},{symbol:i,title:s,titleId:l,maskId:u}));if(!A)return function(){var e;!at&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",c),null;var m=A.abstract,p={ref:n};return Object.keys(t).forEach((function(e){ct.defaultProps.hasOwnProperty(e)||(p[e]=t[e])})),dt(m[0],p)}ct.displayName="FontAwesomeIcon",ct.propTypes={beat:Kn.a.bool,border:Kn.a.bool,bounce:Kn.a.bool,className:Kn.a.string,fade:Kn.a.bool,flash:Kn.a.bool,mask:Kn.a.oneOfType([Kn.a.object,Kn.a.array,Kn.a.string]),maskId:Kn.a.string,fixedWidth:Kn.a.bool,inverse:Kn.a.bool,flip:Kn.a.oneOf(["horizontal","vertical","both"]),icon:Kn.a.oneOfType([Kn.a.object,Kn.a.array,Kn.a.string]),listItem:Kn.a.bool,pull:Kn.a.oneOf(["right","left"]),pulse:Kn.a.bool,rotation:Kn.a.oneOf([0,90,180,270]),shake:Kn.a.bool,size:Kn.a.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Kn.a.bool,spinPulse:Kn.a.bool,spinReverse:Kn.a.bool,symbol:Kn.a.oneOfType([Kn.a.bool,Kn.a.string]),title:Kn.a.string,titleId:Kn.a.string,transform:Kn.a.oneOfType([Kn.a.string,Kn.a.object]),swapOpacity:Kn.a.bool},ct.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var dt=function e(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t)return t;var o=(t.children||[]).map((function(t){return e(n,t)})),i=Object.keys(t.attributes||{}).reduce((function(e,n){var r=t.attributes[n];switch(n){case"class":e.attrs.className=r,delete t.attributes.class;break;case"style":e.attrs.style=it(r);break;default:0===n.indexOf("aria-")||0===n.indexOf("data-")?e.attrs[n.toLowerCase()]=r:e.attrs[rt(n)]=r}return e}),{attrs:{}}),a=r.style,s=void 0===a?{}:a,l=et(r,ot);return i.attrs.style=Xn(Xn({},i.attrs.style),s),n.apply(void 0,[t.tag,Xn(Xn({},i.attrs),l)].concat(nt(o)))}.bind(null,qn.a.createElement)},"./node_modules/@handsontable/react/es/react-handsontable.js":function(e,n,t){"use strict";t.d(n,"a",(function(){return CD}));var r={};t.r(r),t.d(r,"requestAnimationFrame",(function(){return T})),t.d(r,"isClassListSupported",(function(){return L})),t.d(r,"isTextContentSupported",(function(){return O})),t.d(r,"isGetComputedStyleSupported",(function(){return R})),t.d(r,"cancelAnimationFrame",(function(){return D})),t.d(r,"isTouchSupported",(function(){return I})),t.d(r,"hasCaptionProblem",(function(){return H})),t.d(r,"getComparisonFunction",(function(){return P})),t.d(r,"isPassiveEventSupported",(function(){return N}));var o={};t.r(o),t.d(o,"to2dArray",(function(){return F})),t.d(o,"extendArray",(function(){return U})),t.d(o,"pivot",(function(){return Q})),t.d(o,"arrayReduce",(function(){return Y})),t.d(o,"arrayFilter",(function(){return W})),t.d(o,"arrayMap",(function(){return V})),t.d(o,"arrayEach",(function(){return z})),t.d(o,"arraySum",(function(){return K})),t.d(o,"arrayMax",(function(){return G})),t.d(o,"arrayMin",(function(){return q})),t.d(o,"arrayAvg",(function(){return J})),t.d(o,"arrayFlatten",(function(){return X})),t.d(o,"arrayUnique",(function(){return $})),t.d(o,"getDifferenceOfArrays",(function(){return Z})),t.d(o,"getIntersectionOfArrays",(function(){return ee})),t.d(o,"getUnionOfArrays",(function(){return ne})),t.d(o,"stringToArray",(function(){return te}));var i={};t.r(i),t.d(i,"duckSchema",(function(){return ie})),t.d(i,"inherit",(function(){return ae})),t.d(i,"extend",(function(){return se})),t.d(i,"deepExtend",(function(){return le})),t.d(i,"deepClone",(function(){return ue})),t.d(i,"clone",(function(){return ce})),t.d(i,"mixin",(function(){return de})),t.d(i,"isObjectEqual",(function(){return fe})),t.d(i,"isObject",(function(){return he})),t.d(i,"defineGetter",(function(){return Ae})),t.d(i,"objectEach",(function(){return me})),t.d(i,"getProperty",(function(){return pe})),t.d(i,"setProperty",(function(){return ge})),t.d(i,"deepObjectSize",(function(){return ye})),t.d(i,"createObjectPropListener",(function(){return ve})),t.d(i,"hasOwnProperty",(function(){return be}));var a={};t.r(a),t.d(a,"setBrowserMeta",(function(){return Ee})),t.d(a,"setPlatformMeta",(function(){return ke})),t.d(a,"isChrome",(function(){return Se})),t.d(a,"isChromeWebKit",(function(){return xe})),t.d(a,"isFirefox",(function(){return Me})),t.d(a,"isFirefoxWebKit",(function(){return je})),t.d(a,"isSafari",(function(){return Be})),t.d(a,"isEdge",(function(){return Te})),t.d(a,"isEdgeWebKit",(function(){return Le})),t.d(a,"isIE",(function(){return Oe})),t.d(a,"isIE9",(function(){return Re})),t.d(a,"isMSBrowser",(function(){return De})),t.d(a,"isMobileBrowser",(function(){return Ie})),t.d(a,"isIOS",(function(){return He})),t.d(a,"isIpadOS",(function(){return Pe})),t.d(a,"isWindowsOS",(function(){return Ne})),t.d(a,"isMacOS",(function(){return Fe})),t.d(a,"isLinuxOS",(function(){return Ue}));var s={};t.r(s),t.d(s,"stringify",(function(){return Ze})),t.d(s,"isDefined",(function(){return en})),t.d(s,"isUndefined",(function(){return nn})),t.d(s,"isEmpty",(function(){return tn})),t.d(s,"isRegExp",(function(){return rn})),t.d(s,"_injectProductInfo",(function(){return gn}));var l={};t.r(l),t.d(l,"toUpperCaseFirst",(function(){return yn})),t.d(l,"equalsIgnoreCase",(function(){return vn})),t.d(l,"randomString",(function(){return bn})),t.d(l,"isPercentValue",(function(){return wn})),t.d(l,"substitute",(function(){return _n})),t.d(l,"stripTags",(function(){return Cn})),t.d(l,"sanitize",(function(){return En}));var u={};t.r(u),t.d(u,"getParent",(function(){return xn})),t.d(u,"getFrameElement",(function(){return Mn})),t.d(u,"getParentWindow",(function(){return jn})),t.d(u,"hasAccessToParentWindow",(function(){return Bn})),t.d(u,"closest",(function(){return Tn})),t.d(u,"closestDown",(function(){return Ln})),t.d(u,"isChildOf",(function(){return On})),t.d(u,"index",(function(){return Rn})),t.d(u,"overlayContainsElement",(function(){return Dn})),t.d(u,"hasClass",(function(){return Nn})),t.d(u,"addClass",(function(){return Fn})),t.d(u,"removeClass",(function(){return Un})),t.d(u,"removeTextNodes",(function(){return Qn})),t.d(u,"empty",(function(){return Yn})),t.d(u,"HTML_CHARACTERS",(function(){return Vn})),t.d(u,"fastInnerHTML",(function(){return zn})),t.d(u,"fastInnerText",(function(){return Kn})),t.d(u,"isVisible",(function(){return Gn})),t.d(u,"offset",(function(){return qn})),t.d(u,"getWindowScrollTop",(function(){return Jn})),t.d(u,"getWindowScrollLeft",(function(){return Xn})),t.d(u,"getScrollTop",(function(){return $n})),t.d(u,"getScrollLeft",(function(){return Zn})),t.d(u,"getScrollableElement",(function(){return et})),t.d(u,"getTrimmingContainer",(function(){return nt})),t.d(u,"getStyle",(function(){return tt})),t.d(u,"matchesCSSRules",(function(){return rt})),t.d(u,"getComputedStyle",(function(){return ot})),t.d(u,"outerWidth",(function(){return it})),t.d(u,"outerHeight",(function(){return at})),t.d(u,"innerHeight",(function(){return st})),t.d(u,"innerWidth",(function(){return lt})),t.d(u,"addEvent",(function(){return ut})),t.d(u,"removeEvent",(function(){return ct})),t.d(u,"getCaretPosition",(function(){return dt})),t.d(u,"getSelectionEndPosition",(function(){return ft})),t.d(u,"getSelectionText",(function(){return ht})),t.d(u,"clearTextSelection",(function(){return At})),t.d(u,"setCaretPosition",(function(){return mt})),t.d(u,"getScrollbarWidth",(function(){return gt})),t.d(u,"hasVerticalScrollbar",(function(){return yt})),t.d(u,"hasHorizontalScrollbar",(function(){return vt})),t.d(u,"setOverlayPosition",(function(){return bt})),t.d(u,"getCssTransform",(function(){return wt})),t.d(u,"resetCssTransform",(function(){return _t})),t.d(u,"isInput",(function(){return Ct})),t.d(u,"isOutsideInput",(function(){return Et})),t.d(u,"selectElementIfAllowed",(function(){return kt})),t.d(u,"isDetached",(function(){return St}));var c={};t.r(c),t.d(c,"isFunction",(function(){return xt})),t.d(c,"throttle",(function(){return Mt})),t.d(c,"throttleAfterHits",(function(){return jt})),t.d(c,"debounce",(function(){return Bt})),t.d(c,"pipe",(function(){return Tt})),t.d(c,"partial",(function(){return Lt})),t.d(c,"curry",(function(){return Ot})),t.d(c,"curryRight",(function(){return Rt})),t.d(c,"fastCall",(function(){return Dt}));var d={};t.r(d),t.d(d,"KEY_CODES",(function(){return Pt})),t.d(d,"isPrintableChar",(function(){return Ft})),t.d(d,"isFunctionKey",(function(){return Ut})),t.d(d,"isCtrlKey",(function(){return Qt})),t.d(d,"isCtrlMetaKey",(function(){return Yt})),t.d(d,"isKey",(function(){return Wt}));var f={};t.r(f),t.d(f,"stopImmediatePropagation",(function(){return Vt})),t.d(f,"isImmediatePropagationStopped",(function(){return zt})),t.d(f,"isRightClick",(function(){return Kt})),t.d(f,"isLeftClick",(function(){return Gt}));var h={};t.r(h),t.d(h,"instanceToHTML",(function(){return Xr})),t.d(h,"_dataToHTML",(function(){return $r})),t.d(h,"htmlToGridSettings",(function(){return Zr}));var A={};t.r(A),t.d(A,"isNumeric",(function(){return ro})),t.d(A,"isNumericLike",(function(){return oo})),t.d(A,"rangeEach",(function(){return io})),t.d(A,"rangeEachReverse",(function(){return ao})),t.d(A,"valueAccordingPercent",(function(){return so}));var m={};t.r(m),t.d(m,"spreadsheetColumnLabel",(function(){return hu})),t.d(m,"spreadsheetColumnIndex",(function(){return Au})),t.d(m,"createSpreadsheetData",(function(){return mu})),t.d(m,"createSpreadsheetObjectData",(function(){return pu})),t.d(m,"createEmptySpreadsheetData",(function(){return gu})),t.d(m,"translateRowsToColumns",(function(){return yu})),t.d(m,"cellMethodLookupFactory",(function(){return vu})),t.d(m,"dataRowToChangesArray",(function(){return bu})),t.d(m,"countFirstRowKeys",(function(){return wu})),t.d(m,"isArrayOfArrays",(function(){return _u})),t.d(m,"isArrayOfObjects",(function(){return Cu}));var p={};t.r(p),t.d(p,"CONTEXT_MENU_ITEMS_NAMESPACE",(function(){return wd})),t.d(p,"CONTEXTMENU_ITEMS_NO_ITEMS",(function(){return _d})),t.d(p,"CONTEXTMENU_ITEMS_ROW_ABOVE",(function(){return Cd})),t.d(p,"CONTEXTMENU_ITEMS_ROW_BELOW",(function(){return Ed})),t.d(p,"CONTEXTMENU_ITEMS_INSERT_LEFT",(function(){return kd})),t.d(p,"CONTEXTMENU_ITEMS_INSERT_RIGHT",(function(){return Sd})),t.d(p,"CONTEXTMENU_ITEMS_REMOVE_ROW",(function(){return xd})),t.d(p,"CONTEXTMENU_ITEMS_REMOVE_COLUMN",(function(){return Md})),t.d(p,"CONTEXTMENU_ITEMS_UNDO",(function(){return jd})),t.d(p,"CONTEXTMENU_ITEMS_REDO",(function(){return Bd})),t.d(p,"CONTEXTMENU_ITEMS_READ_ONLY",(function(){return Td})),t.d(p,"CONTEXTMENU_ITEMS_CLEAR_COLUMN",(function(){return Ld})),t.d(p,"CONTEXTMENU_ITEMS_COPY",(function(){return Od})),t.d(p,"CONTEXTMENU_ITEMS_CUT",(function(){return Rd})),t.d(p,"CONTEXTMENU_ITEMS_FREEZE_COLUMN",(function(){return Dd})),t.d(p,"CONTEXTMENU_ITEMS_UNFREEZE_COLUMN",(function(){return Id})),t.d(p,"CONTEXTMENU_ITEMS_MERGE_CELLS",(function(){return Hd})),t.d(p,"CONTEXTMENU_ITEMS_UNMERGE_CELLS",(function(){return Pd})),t.d(p,"CONTEXTMENU_ITEMS_ADD_COMMENT",(function(){return Nd})),t.d(p,"CONTEXTMENU_ITEMS_EDIT_COMMENT",(function(){return Fd})),t.d(p,"CONTEXTMENU_ITEMS_REMOVE_COMMENT",(function(){return Ud})),t.d(p,"CONTEXTMENU_ITEMS_READ_ONLY_COMMENT",(function(){return Qd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT",(function(){return Yd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_LEFT",(function(){return Wd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_CENTER",(function(){return Vd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT",(function(){return zd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY",(function(){return Kd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_TOP",(function(){return Gd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE",(function(){return qd})),t.d(p,"CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM",(function(){return Jd})),t.d(p,"CONTEXTMENU_ITEMS_BORDERS",(function(){return Xd})),t.d(p,"CONTEXTMENU_ITEMS_BORDERS_TOP",(function(){return $d})),t.d(p,"CONTEXTMENU_ITEMS_BORDERS_RIGHT",(function(){return Zd})),t.d(p,"CONTEXTMENU_ITEMS_BORDERS_BOTTOM",(function(){return ef})),t.d(p,"CONTEXTMENU_ITEMS_BORDERS_LEFT",(function(){return nf})),t.d(p,"CONTEXTMENU_ITEMS_REMOVE_BORDERS",(function(){return tf})),t.d(p,"CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD",(function(){return rf})),t.d(p,"CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD",(function(){return of})),t.d(p,"CONTEXTMENU_ITEMS_HIDE_COLUMN",(function(){return af})),t.d(p,"CONTEXTMENU_ITEMS_SHOW_COLUMN",(function(){return sf})),t.d(p,"CONTEXTMENU_ITEMS_HIDE_ROW",(function(){return lf})),t.d(p,"CONTEXTMENU_ITEMS_SHOW_ROW",(function(){return uf})),t.d(p,"FILTERS_NAMESPACE",(function(){return cf})),t.d(p,"FILTERS_CONDITIONS_NAMESPACE",(function(){return df})),t.d(p,"FILTERS_CONDITIONS_NONE",(function(){return ff})),t.d(p,"FILTERS_CONDITIONS_EMPTY",(function(){return hf})),t.d(p,"FILTERS_CONDITIONS_NOT_EMPTY",(function(){return Af})),t.d(p,"FILTERS_CONDITIONS_EQUAL",(function(){return mf})),t.d(p,"FILTERS_CONDITIONS_NOT_EQUAL",(function(){return pf})),t.d(p,"FILTERS_CONDITIONS_BEGINS_WITH",(function(){return gf})),t.d(p,"FILTERS_CONDITIONS_ENDS_WITH",(function(){return yf})),t.d(p,"FILTERS_CONDITIONS_CONTAINS",(function(){return vf})),t.d(p,"FILTERS_CONDITIONS_NOT_CONTAIN",(function(){return bf})),t.d(p,"FILTERS_CONDITIONS_BY_VALUE",(function(){return wf})),t.d(p,"FILTERS_CONDITIONS_GREATER_THAN",(function(){return _f})),t.d(p,"FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL",(function(){return Cf})),t.d(p,"FILTERS_CONDITIONS_LESS_THAN",(function(){return Ef})),t.d(p,"FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL",(function(){return kf})),t.d(p,"FILTERS_CONDITIONS_BETWEEN",(function(){return Sf})),t.d(p,"FILTERS_CONDITIONS_NOT_BETWEEN",(function(){return xf})),t.d(p,"FILTERS_CONDITIONS_AFTER",(function(){return Mf})),t.d(p,"FILTERS_CONDITIONS_BEFORE",(function(){return jf})),t.d(p,"FILTERS_CONDITIONS_TODAY",(function(){return Bf})),t.d(p,"FILTERS_CONDITIONS_TOMORROW",(function(){return Tf})),t.d(p,"FILTERS_CONDITIONS_YESTERDAY",(function(){return Lf})),t.d(p,"FILTERS_DIVS_FILTER_BY_CONDITION",(function(){return Of})),t.d(p,"FILTERS_DIVS_FILTER_BY_VALUE",(function(){return Rf})),t.d(p,"FILTERS_LABELS_CONJUNCTION",(function(){return Df})),t.d(p,"FILTERS_LABELS_DISJUNCTION",(function(){return If})),t.d(p,"FILTERS_VALUES_BLANK_CELLS",(function(){return Hf})),t.d(p,"FILTERS_BUTTONS_SELECT_ALL",(function(){return Pf})),t.d(p,"FILTERS_BUTTONS_CLEAR",(function(){return Nf})),t.d(p,"FILTERS_BUTTONS_OK",(function(){return Ff})),t.d(p,"FILTERS_BUTTONS_CANCEL",(function(){return Uf})),t.d(p,"FILTERS_BUTTONS_PLACEHOLDER_SEARCH",(function(){return Qf})),t.d(p,"FILTERS_BUTTONS_PLACEHOLDER_VALUE",(function(){return Yf})),t.d(p,"FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE",(function(){return Wf}));var g={};t.r(g),t.d(g,"getNormalizedDate",(function(){return Jm}));var y=t("./node_modules/react/index.js"),v=t.n(y),b=t("./node_modules/react-dom/index.js"),w=t.n(b);t("./node_modules/core-js/modules/es.object.get-own-property-names.js"),t("./node_modules/core-js/modules/es.array.sort.js"),t("./node_modules/core-js/modules/es.array.splice.js"),t("./node_modules/core-js/modules/es.number.is-integer.js"),t("./node_modules/core-js/modules/es.number.constructor.js"),t("./node_modules/core-js/modules/es.regexp.exec.js"),t("./node_modules/core-js/modules/es.string.replace.js"),t("./node_modules/core-js/modules/es.array.concat.js"),t("./node_modules/core-js/modules/es.array.from.js"),t("./node_modules/core-js/modules/es.string.iterator.js"),t("./node_modules/core-js/modules/es.array.index-of.js"),t("./node_modules/core-js/modules/es.array.reverse.js"),t("./node_modules/core-js/modules/web.dom-collections.for-each.js"),t("./node_modules/core-js/modules/web.timers.js"),t("./node_modules/core-js/modules/web.immediate.js"),t("./node_modules/core-js/modules/es.symbol.js"),t("./node_modules/core-js/modules/es.symbol.description.js"),t("./node_modules/core-js/modules/es.object.to-string.js"),t("./node_modules/core-js/modules/es.symbol.iterator.js"),t("./node_modules/core-js/modules/es.array.iterator.js"),t("./node_modules/core-js/modules/web.dom-collections.iterator.js"),t("./node_modules/core-js/modules/es.array.slice.js"),t("./node_modules/core-js/modules/es.function.name.js"),t("./node_modules/core-js/modules/es.object.get-prototype-of.js"),t("./node_modules/core-js/modules/es.array.includes.js"),t("./node_modules/core-js/modules/es.string.includes.js"),t("./node_modules/core-js/modules/es.array.filter.js"),t("./node_modules/core-js/modules/es.string.split.js"),t("./node_modules/core-js/modules/es.regexp.constructor.js"),t("./node_modules/core-js/modules/es.regexp.to-string.js"),t("./node_modules/core-js/modules/es.array.join.js"),t("./node_modules/core-js/modules/es.string.trim.js");function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}for(var C,E,k,S=0,x=["ms","moz","webkit","o"],M=window.requestAnimationFrame,j=window.cancelAnimationFrame,B=0;Bt
t";var t=document.createElement("CAPTION");t.innerHTML="c
c
c
c",t.style.padding="0",t.style.margin="0",e.insertBefore(t,n),document.body.appendChild(e),C=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}(),C}function P(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return E||(E="object"===("undefined"==typeof Intl?"undefined":_(Intl))?new Intl.Collator(e,n).compare:"function"==typeof String.prototype.localeCompare?function(e,n){return"".concat(e).localeCompare(n)}:function(e,n){return e===n?0:e>n?-1:1})}function N(){if(void 0!==k)return k;try{var e={get passive(){k=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){k=!1}return k}M||(M=function(e){var n=(new Date).getTime(),t=Math.max(0,16-(n-S)),r=window.setTimeout((function(){e(n+t)}),t);return S=n+t,r}),j||(j=function(e){clearTimeout(e)});t("./node_modules/core-js/modules/es.set.js");function F(e){for(var n=e.length,t=0;tn?e:n}),Array.isArray(e)?e[0]:void 0)}function q(e){return Y(e,(function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(n)}function re(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ie(e){var n;return Array.isArray(e)?n=[]:(n={},me(e,(function(e,t){"__children"!==t&&(e&&"object"===oe(e)&&!Array.isArray(e)?n[t]=ie(e):Array.isArray(e)?e.length&&"object"===oe(e[0])&&!Array.isArray(e[0])?n[t]=[ie(e[0])]:n[t]=[]:n[t]=null)}))),n}function ae(e,n){return n.prototype.constructor=n,e.prototype=new n,e.prototype.constructor=e,e}function se(e,n,t){var r=Array.isArray(t);return me(n,(function(n,o){(!1===r||t.includes(o))&&(e[o]=n)})),e}function le(e,n){me(n,(function(t,r){n[r]&&"object"===oe(n[r])?(e[r]||(Array.isArray(n[r])?e[r]=[]:"[object Date]"===Object.prototype.toString.call(n[r])?e[r]=n[r]:e[r]={}),le(e[r],n[r])):e[r]=n[r]}))}function ue(e){return"object"===oe(e)?JSON.parse(JSON.stringify(e)):e}function ce(e){var n={};return me(e,(function(e,t){n[t]=e})),n}function de(e){e.MIXINS||(e.MIXINS=[]);for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(t),o=(re(n={_touched:!1},r,e),re(n,"isTouched",(function(){return this._touched})),n);return Object.defineProperty(o,t,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),o}function be(e,n){return Object.prototype.hasOwnProperty.call(e,n)}var we=function(e){var n={value:!1,test:function(t,r){n.value=e(t,r)}};return n},_e={chrome:we((function(e,n){return/Chrome/.test(e)&&/Google/.test(n)})),chromeWebKit:we((function(e){return/CriOS/.test(e)})),edge:we((function(e){return/Edge/.test(e)})),edgeWebKit:we((function(e){return/EdgiOS/.test(e)})),firefox:we((function(e){return/Firefox/.test(e)})),firefoxWebKit:we((function(e){return/FxiOS/.test(e)})),ie:we((function(e){return/Trident/.test(e)})),ie9:we((function(){return!!document.documentMode})),mobile:we((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:we((function(e,n){return/Safari/.test(e)&&/Apple Computer/.test(n)}))},Ce={mac:we((function(e){return/^Mac/.test(e)})),win:we((function(e){return/^Win/.test(e)})),linux:we((function(e){return/^Linux/.test(e)})),ios:we((function(e){return/iPhone|iPad|iPod/i.test(e)}))};function Ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.userAgent,t=void 0===n?navigator.userAgent:n,r=e.vendor,o=void 0===r?navigator.vendor:r;me(_e,(function(e){(0,e.test)(t,o)}))}function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.platform,t=void 0===n?navigator.platform:n;me(Ce,(function(e){(0,e.test)(t)}))}function Se(){return _e.chrome.value}function xe(){return _e.chromeWebKit.value}function Me(){return _e.firefox.value}function je(){return _e.firefoxWebKit.value}function Be(){return _e.safari.value}function Te(){return _e.edge.value}function Le(){return _e.edgeWebKit.value}function Oe(){return _e.ie.value}function Re(){return _e.ie9.value}function De(){return _e.ie.value||_e.edge.value}function Ie(){return _e.mobile.value}function He(){return Ce.ios.value}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator,n=e.maxTouchPoints;return n>2&&Ce.mac.value}function Ne(){return Ce.win.value}function Fe(){return Ce.mac.value}function Ue(){return Ce.linux.value}Ee(),ke();var Qe,Ye,We,Ve,ze,Ke,Ge=t("./node_modules/dompurify/dist/purify.js"),qe=(t("./node_modules/core-js/modules/es.object.freeze.js"),t("./node_modules/core-js/modules/es.string.code-point-at.js"),t("./node_modules/core-js/modules/es.string.pad-start.js"),t("./node_modules/moment/moment.js"));function Je(e){for(var n=arguments.length,t=new Array(n>1?n-1:0),r=1;rRead more on how to \n install it properly or contact us at support@handsontable.com.'],['\n The license key for Handsontable is invalid.\\x20\n Read more on how to\\x20\n install it properly or contact us at support@handsontable.com.'])))},expired:function(e){var n=e.keyValidityDate,t=e.hotVersion;return Je(ze||(ze=Xe(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",'. Renew your \n license key or downgrade to a version released prior to ','. If you need any \n help, contact us at sales@handsontable.com.'],["\n The license key for Handsontable expired on ",", and is not valid for the installed\\x20\n version ",'. Renew your\\x20\n license key or downgrade to a version released prior to ','. If you need any\\x20\n help, contact us at sales@handsontable.com.'])),n,t,n)},missing:function(){return Je(Ke||(Ke=Xe(['\n The license key for Handsontable is missing. Use your purchased key to activate the product. \n Alternatively, you can activate Handsontable to use for non-commercial purposes by \n passing the key: \'non-commercial-and-evaluation\'. \n Read more about it in \n the documentation or contact us at support@handsontable.com.'],['\n The license key for Handsontable is missing. Use your purchased key to activate the product.\\x20\n Alternatively, you can activate Handsontable to use for non-commercial purposes by\\x20\n passing the key: \'non-commercial-and-evaluation\'.\\x20\n Read more about it in\\x20\n the documentation or contact us at support@handsontable.com.'])))},non_commercial:function(){return""}};function gn(e,n){var t,r,o=!tn(e),i="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),a="invalid",s="invalid",l=function(e){var n=[][ln],t=n;if(e[ln]!==fn("Z"))return!1;for(var r="",o="B>1:r=dn(e,i,i?1===o[ln]?9:8:6);return t===n}(e=hn(e||""));if(o||i||l)if(l){var u=qe("29/09/2021","DD/MM/YYYY"),c=Math.floor(u.toDate().getTime()/864e5),d=un(dn(hn(r=e),un("12"),fn("F")))/(un(dn(hn(r),fn("B"),~~![][ln]))||9);if(t=qe(864e5*(d+1),"x").format("MMMM DD, YYYY"),c>d){var f=qe().diff(u,"days");a=f<=1?"valid":"expired",s=f<=15?"valid":"expired"}else a="valid",s="valid"}else i?(a="non_commercial",s="valid"):(a="invalid",s="invalid");else a="missing",s="missing";("undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)&&(a="valid",s="valid"),An||"valid"===a)||(mn[a]({keyValidityDate:t,hotVersion:"10.0.0"})&&console["non_commercial"===a?"info":"warn"](mn[a]({keyValidityDate:t,hotVersion:"10.0.0"})),An=!0);if("valid"!==s&&n.parentNode&&pn[s]({keyValidityDate:t,hotVersion:"10.0.0"})){var h=document.createElement("div");h.id="hot-display-license-info",h.innerHTML=pn[s]({keyValidityDate:t,hotVersion:"10.0.0"}),n.parentNode.insertBefore(h,n.nextSibling)}}function yn(e){return e[0].toUpperCase()+e.substr(1)}function vn(){for(var e=[],n=arguments.length,t=new Array(n),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,(function(e,t){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===n[t]?"":n[t]}))}function Cn(e){return En("".concat(e),{ALLOWED_TAGS:[]})}function En(e,n){return Ge.sanitize(e,n)}function kn(e){return function(e){if(Array.isArray(e))return Sn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return Sn(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Sn(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:0,t=-1,r=null,o=e;null!==o;){if(t===n){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(t+=1,o=o.parentNode)}return r}function Mn(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function jn(e){return Mn(e)&&e.parent}function Bn(e){return!!Object.getPrototypeOf(e.parent)}function Tn(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2?arguments[2]:void 0,r=Node,o=r.ELEMENT_NODE,i=r.DOCUMENT_FRAGMENT_NODE,a=e;null!=a&&a!==t;){var s=a,l=s.nodeType,u=s.nodeName;if(l===o&&(n.includes(u)||n.includes(a)))return a;var c=a,d=c.host;a=d&&l===i?d:a.parentNode}return null}function Ln(e,n,t){for(var r=[],o=e;o&&(o=Tn(o,n,t))&&(!t||t.contains(o));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;var i=r.length;return i?r[i-1]:null}function On(e,n){var t=e.parentNode,r=[];for("string"==typeof n?r=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(n),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(n),0):r.push(n);null!==t;){if(r.indexOf(t)>-1)return!0;t=t.parentNode}return!1}function Rn(e){var n=0,t=e;if(t.previousSibling)for(;t=t.previousSibling;)n+=1;return n}function Dn(e,n,t){var r=t.parentElement.querySelector(".ht_clone_".concat(e));return r?r.contains(n):null}function In(e){return e&&e.length?e.filter((function(e){return!!e})):[]}if(L()){var Hn=function(e){var n=e.createElement("div");return n.classList.add("test","test2"),n.classList.contains("test2")};on=function(e,n){return void 0!==e.classList&&"string"==typeof n&&""!==n&&e.classList.contains(n)},an=function(e,n){var t,r=e.ownerDocument,o=n;if("string"==typeof o&&(o=o.split(" ")),(o=In(o)).length>0)if(Hn(r))(t=e.classList).add.apply(t,kn(o));else for(var i=0;o[i];)e.classList.add(o[i]),i+=1},sn=function(e,n){var t,r=e.ownerDocument,o=n;if("string"==typeof o&&(o=o.split(" ")),(o=In(o)).length>0)if(Hn(r))(t=e.classList).remove.apply(t,kn(o));else for(var i=0;o[i];)e.classList.remove(o[i]),i+=1}}else{var Pn=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};on=function(e,n){return void 0!==e.className&&Pn(n).test(e.className)},an=function(e,n){var t=e.className,r=n;if("string"==typeof r&&(r=r.split(" ")),r=In(r),""===t)t=r.join(" ");else for(var o=0;o-1)for(var n=e.childNodes,t=n.length-1;t>=0;t--)Qn(n[t])}function Yn(e){for(var n;n=e.lastChild;)e.removeChild(n)}var Wn,Vn=/(<(.*)>|&(.*);)/;function zn(e,n){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Vn.test(n)?e.innerHTML=t?En(n):n:Kn(e,n)}function Kn(e,n){var t=e.firstChild;t&&3===t.nodeType&&null===t.nextSibling?O?t.textContent=n:t.data=n:(Yn(e),e.appendChild(e.ownerDocument.createTextNode(n)))}function Gn(e){for(var n=e.ownerDocument.documentElement,t=e;t!==n;){if(null===t)return!1;if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t.host){if(t.host.impl)return Gn(t.host.impl);if(t.host)return Gn(t.host);throw new Error("Lost in Web Components world")}return!1}if(t.style&&"none"===t.style.display)return!1;t=t.parentNode}return!0}function qn(e){var n,t,r,o,i=e.ownerDocument,a=i.defaultView,s=i.documentElement,l=e;if(H()&&l.firstChild&&"CAPTION"===l.firstChild.nodeName)return{top:(o=l.getBoundingClientRect()).top+(a.pageYOffset||s.scrollTop)-(s.clientTop||0),left:o.left+(a.pageXOffset||s.scrollLeft)-(s.clientLeft||0)};for(n=l.offsetLeft,t=l.offsetTop,r=l;(l=l.offsetParent)&&l!==i.body;)n+=l.offsetLeft,t+=l.offsetTop,r=l;return r&&"fixed"===r.style.position&&(n+=a.pageXOffset||s.scrollLeft,t+=a.pageYOffset||s.scrollTop),{left:n,top:t}}function Jn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,n=e.scrollY;return void 0===n&&(n=e.document.documentElement.scrollTop),n}function Xn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,n=e.scrollX;return void 0===n&&(n=e.document.documentElement.scrollLeft),n}function $n(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===n?Jn(n):e.scrollTop}function Zn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===n?Xn(n):e.scrollLeft}function et(e){var n=e.ownerDocument,t=n?n.defaultView:void 0;n||(t=(n=e.document?e.document:e).defaultView);for(var r=["auto","scroll"],o=R(),i=e.parentNode;i&&i.style&&n.body!==i;){var a=i.style,s=a.overflow,l=a.overflowX,u=a.overflowY;if([s,l,u].includes("scroll"))return i;if(o){var c=t.getComputedStyle(i);if(s=c.overflow,l=c.overflowX,u=c.overflowY,r.includes(s)||r.includes(l)||r.includes(u))return i}if(i.clientHeight<=i.scrollHeight+1&&(r.includes(u)||r.includes(s)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(l)||r.includes(s)))return i;i=i.parentNode}return t}function nt(e){for(var n=e.ownerDocument,t=n.defaultView,r=e.parentNode;r&&r.style&&n.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;var o=ot(r,t),i=["scroll","hidden","auto"],a=o.getPropertyValue("overflow"),s=o.getPropertyValue("overflow-y"),l=o.getPropertyValue("overflow-x");if(i.includes(a)||i.includes(s)||i.includes(l))return r;r=r.parentNode}return t}function tt(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(e){if(e===t)return"width"===n?"".concat(t.innerWidth,"px"):"height"===n?"".concat(t.innerHeight,"px"):void 0;var r=e.style[n];if(""!==r&&void 0!==r)return r;var o=ot(e,t);return""!==o[n]&&void 0!==o[n]?o[n]:void 0}}function rt(e,n){var t=n.selectorText,r=!1;return n.type===CSSRule.STYLE_RULE&&t&&(e.msMatchesSelector?r=e.msMatchesSelector(t):e.matches&&(r=e.matches(t))),r}function ot(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||n.getComputedStyle(e)}function it(e){return Math.ceil(e.getBoundingClientRect().width)}function at(e){return H()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function st(e){return e.clientHeight||e.innerHeight}function lt(e){return e.clientWidth||e.innerWidth}function ut(e,n,t){e.addEventListener(n,t,!1)}function ct(e,n,t){e.removeEventListener(n,t,!1)}function dt(e){var n=e.ownerDocument;if(e.selectionStart)return e.selectionStart;if(n.selection){e.focus();var t=n.selection.createRange();if(null===t)return 0;var r=e.createTextRange(),o=r.duplicate();return r.moveToBookmark(t.getBookmark()),o.setEndPoint("EndToStart",r),o.text.length}return 0}function ft(e){var n=e.ownerDocument;if(e.selectionEnd)return e.selectionEnd;if(n.selection){var t=n.selection.createRange();return null===t?0:e.createTextRange().text.indexOf(t.text)+t.text.length}return 0}function ht(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,n=e.document,t="";return e.getSelection?t=e.getSelection().toString():n.selection&&"Control"!==n.selection.type&&(t=n.selection.createRange().text),t}function At(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,n=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():n.selection&&n.selection.empty()}function mt(e,n,t){if(void 0===t&&(t=n),e.setSelectionRange){e.focus();try{e.setSelectionRange(n,t)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(n,t),r.style.display=o}}}function pt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=e.createElement("div");n.style.height="200px",n.style.width="100%";var t=e.createElement("div");t.style.boxSizing="content-box",t.style.height="150px",t.style.left="0px",t.style.overflow="hidden",t.style.position="absolute",t.style.top="0px",t.style.width="200px",t.style.visibility="hidden",t.appendChild(n),(e.body||e.documentElement).appendChild(t);var r=n.offsetWidth;t.style.overflow="scroll";var o=n.offsetWidth;return r===o&&(o=t.clientWidth),(e.body||e.documentElement).removeChild(t),r-o}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===Wn&&(Wn=pt(e)),Wn}function yt(e){return e.offsetWidth!==e.clientWidth}function vt(e){return e.offsetHeight!==e.clientHeight}function bt(e,n,t){Re()?(e.style.top=t,e.style.left=n):Be()?e.style["-webkit-transform"]="translate3d(".concat(n,",").concat(t,",0)"):e.style.transform="translate3d(".concat(n,",").concat(t,",0)")}function wt(e){var n;return e.style.transform&&""!==(n=e.style.transform)?["transform",n]:e.style["-webkit-transform"]&&""!==(n=e.style["-webkit-transform"])?["-webkit-transform",n]:-1}function _t(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function Ct(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function Et(e){return Ct(e)&&!1===e.hasAttribute("data-hot-input")}function kt(e){Et(e.ownerDocument.activeElement)||e.select()}function St(e){return!e.parentNode}function xt(e){return"function"==typeof e}function Mt(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,t=0,r={lastCallThrottled:!0},o=null;function i(){for(var i=this,a=arguments.length,s=new Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:200,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=Mt(e,n),o=t;function i(){o=t}function a(){for(var n=arguments.length,t=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:200,r=null;function o(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s1?n-1:0),r=1;r=n?e.apply(this,s):t(s)}}([])}function Rt(e){var n=e.length;return function t(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a=n?e.apply(this,s):t(s)}}([])}function Dt(e,n,t,r,o,i,a,s){return en(s)?e.call(n,t,r,o,i,a,s):en(a)?e.call(n,t,r,o,i,a):en(i)?e.call(n,t,r,o,i):en(o)?e.call(n,t,r,o):en(r)?e.call(n,t,r):en(t)?e.call(n,t):e.call(n)}t("./node_modules/core-js/modules/es.weak-map.js");function It(e,n){for(var t=0;t=e.getSetting("totalRows")||this.col>=e.getSetting("totalColumns"))}},{key:"isEqual",value:function(e){return e===this||this.row===e.row&&this.col===e.col}},{key:"isSouthEastOf",value:function(e){return this.row>=e.row&&this.col>=e.col}},{key:"isNorthWestOf",value:function(e){return this.row<=e.row&&this.col<=e.col}},{key:"isSouthWestOf",value:function(e){return this.row>=e.row&&this.col<=e.col}},{key:"isNorthEastOf",value:function(e){return this.row<=e.row&&this.col>=e.col}},{key:"normalize",value:function(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}},{key:"clone",value:function(){return new e(this.row,this.col)}},{key:"toObject",value:function(){return{row:this.row,col:this.col}}}])&&It(n.prototype,t),r&&It(n,r),e}(),Pt={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:Me()?182:174,AUDIO_MUTE:Me()?181:173,AUDIO_UP:Me()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90},Nt=[Pt.ALT,Pt.ARROW_DOWN,Pt.ARROW_LEFT,Pt.ARROW_RIGHT,Pt.ARROW_UP,Pt.AUDIO_DOWN,Pt.AUDIO_MUTE,Pt.AUDIO_UP,Pt.BACKSPACE,Pt.CAPS_LOCK,Pt.DELETE,Pt.END,Pt.ENTER,Pt.ESCAPE,Pt.F1,Pt.F2,Pt.F3,Pt.F4,Pt.F5,Pt.F6,Pt.F7,Pt.F8,Pt.F9,Pt.F10,Pt.F11,Pt.F12,Pt.F13,Pt.F14,Pt.F15,Pt.F16,Pt.F17,Pt.F18,Pt.F19,Pt.HOME,Pt.INSERT,Pt.MEDIA_NEXT,Pt.MEDIA_PLAY_PAUSE,Pt.MEDIA_PREV,Pt.MEDIA_STOP,Pt.NULL,Pt.NUM_LOCK,Pt.PAGE_DOWN,Pt.PAGE_UP,Pt.PAUSE,Pt.SCROLL_LOCK,Pt.SHIFT,Pt.TAB];function Ft(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function Ut(e){return Nt.includes(e)}function Qt(e){var n=[];return Fe()?n.push(Pt.COMMAND_LEFT,Pt.COMMAND_RIGHT,Pt.COMMAND_FIREFOX):n.push(Pt.CONTROL),n.includes(e)}function Yt(e){return[Pt.CONTROL,Pt.COMMAND_LEFT,Pt.COMMAND_RIGHT,Pt.COMMAND_FIREFOX].includes(e)}function Wt(e,n){var t=n.split("|"),r=!1;return z(t,(function(n){if(e===Pt[n])return r=!0,!1})),r}function Vt(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function zt(e){return!1===e.isImmediatePropagationEnabled}function Kt(e){return 2===e.button}function Gt(e){return 0===e.button}var qt;t("./node_modules/core-js/modules/es.map.js");function Jt(){var e;en(console)&&(e=console).warn.apply(e,arguments)}function Xt(){var e;en(console)&&(e=console).error.apply(e,arguments)}function $t(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,n){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(n))z(n,(function(n){return t.add(e,n,r)}));else{rr.has(e)&&Jt(_n(tr,{hookName:e,removedInVersion:rr.get(e)})),or.has(e)&&Jt(or.get(e));var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),n.skip=!1,-1===o[e].indexOf(n)){var i=!1;n.initialHook&&z(o[e],(function(t,r){if(t.initialHook)return o[e][r]=n,i=!0,!1})),i||o[e].push(n)}}return this}},{key:"once",value:function(e,n){var t=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(n)?z(n,(function(n){return t.once(e,n,r)})):(n.runOnce=!0,this.add(e,n,r))}},{key:"remove",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(t);return void 0!==r[e]&&r[e].indexOf(n)>=0&&(n.skip=!0,!0)}},{key:"has",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,t=this.getBucket(n);return!(void 0===t[e]||!t[e].length)}},{key:"run",value:function(e,n,t,r,o,i,a,s){var l=this.globalBucket[n],u=l?l.length:0,c=0;if(u)for(;c0&&void 0!==arguments[0]?arguments[0]:null;me(this.getBucket(e),(function(e,n,t){return t[n].length=0}))}},{key:"register",value:function(e){this.isRegistered(e)||nr.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&nr.splice(nr.indexOf(e),1)}},{key:"isDeprecated",value:function(e){return or.has(e)||rr.has(e)}},{key:"isRegistered",value:function(e){return nr.indexOf(e)>=0}},{key:"getRegistered",value:function(){return nr}}])&&$t(n.prototype,t),r&&$t(n,r),e}(),ar=new ir;var sr=ir;function lr(e){return function(e){if(Array.isArray(e))return ur(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return ur(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return ur(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ur(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:"common";cr.has(e)||cr.set(e,new Map);var n=cr.get(e);function t(e,t){n.set(e,t)}function r(e){return n.get(e)}function o(e){return n.has(e)}function i(){return lr(n.keys())}function a(){return lr(n.values())}return{register:t,getItem:r,hasItem:o,getNames:i,getValues:a}}var fr=new WeakMap,hr=dr("editors"),Ar=hr.register,mr=hr.getItem,pr=hr.hasItem,gr=hr.getNames;hr.getValues;function yr(e){var n={},t=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in n||(n[e.guid]=new t(e)),n[e.guid]},sr.getSingleton().add("afterDestroy",(function(){n[this.guid]=null}))}function vr(e,n){var t;if("function"==typeof e)fr.get(e)||wr(null,e),t=fr.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');t=mr(e)}if(!t)throw Error('No editor registered under name "'.concat(e,'"'));return t.getInstance(n)}function br(e){if(!pr(e))throw Error('No registered editor found under "'.concat(e,'" name'));return mr(e).getConstructor()}function wr(e,n){e&&"string"!=typeof e&&(e=(n=e).EDITOR_TYPE);var t=new yr(n);"string"==typeof e&&Ar(e,t),fr.set(n,t)}function _r(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Cr(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:null;_r(this,e),this.context=n||this,this.context.eventListeners||(this.context.eventListeners=[])}var n,t,r;return n=e,(t=[{key:"addEventListener",value:function(e,n,t){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){t.call(this,kr(e))}return"boolean"==typeof o||N()||(o=!1),this.context.eventListeners.push({element:e,event:n,callback:t,callbackProxy:i,options:o,eventManager:this}),e.addEventListener(n,i,o),Er+=1,function(){r.removeEventListener(e,n,t)}}},{key:"removeEventListener",value:function(e,n,t){for(var r,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;i;)if(i-=1,(r=this.context.eventListeners[i]).event===n&&r.element===e){if(t&&t!==r.callback)continue;if(o&&r.eventManager!==this)continue;this.context.eventListeners.splice(i,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),Er-=1}}},{key:"clearEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.context)for(var n=this.context.eventListeners.length;n;){n-=1;var t=this.context.eventListeners[n];t&&this.removeEventListener(t.element,t.event,t.callback,e)}}},{key:"clear",value:function(){this.clearEvents()}},{key:"destroy",value:function(){this.clearEvents(),this.context=null}},{key:"destroyWithOwnEventsOnly",value:function(){this.clearEvents(!0),this.context=null}},{key:"fireEvent",value:function(e,n){var t=e.document,r=e;t||(r=(t=e.ownerDocument?e.ownerDocument:e).defaultView);var o,i={bubbles:!0,cancelable:"mousemove"!==n,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};t.createEvent?(o=t.createEvent("MouseEvents")).initMouseEvent(n,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||t.body.parentNode):o=t.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on".concat(n),o)}}])&&Cr(n.prototype,t),r&&Cr(n,r),e}();t("./node_modules/core-js/modules/es.object.set-prototype-of.js"),t("./node_modules/core-js/modules/es.reflect.construct.js");var xr={_hooksStorage:Object.create(null),addHook:function(e,n){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,n),this._hooksStorage[e].push(n),this},removeHooksByKey:function(e){var n=this;z(this._hooksStorage[e]||[],(function(t){n.hot.removeHook(e,t)}))},clearHooks:function(){var e=this;me(this._hooksStorage,(function(n,t){return e.removeHooksByKey(t)})),this._hooksStorage={}}};Ae(xr,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});var Mr=xr;function jr(e){return(jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Br(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Tr(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Tr(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tr(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e-this.hot.getSettings().fixedRowsBottom?n=this.cole.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t"},qr=new RegExp(Object.keys(Gr).map((function(e){return"(".concat(e,")")})).join("|"),"gi");function Jr(e){return"TABLE"===(e&&e.nodeName||"")}function Xr(e){for(var n=e.hasColHeaders(),t=e.hasRowHeaders(),r=[n?-1:0,t?-1:0,e.countRows()-1,e.countCols()-1],o=e.getData.apply(e,r),i=o.length,a=i>0?o[0].length:0,s=["","
"],l=n?["",""]:[],u=["",""],c=t?1:0,d=n?1:0,f=0;f".concat(e.getColHeader(m-c),"");else if(p)g="".concat(e.getRowHeader(f-d),"");else{var y=o[f][m],v=e.getCellMeta(f-d,m-c),b=v.hidden,w=v.rowspan,_=v.colspan;if(!b){var C=[];if(w&&C.push('rowspan="'.concat(w,'"')),_&&C.push('colspan="'.concat(_,'"')),tn(y))g="");else{var E=y.toString().replace("<","<").replace(">",">").replace(/((\r\n|\n)?|\r\n|\n)/g,"
\r\n").replace(/\x20/gi," ").replace(/\t/gi," ");g="").concat(E,"")}}}A.push(g)}var k=[""].concat(A,[""]).join("");h?l.splice(1,0,k):u.splice(-1,0,k)}return s.splice(1,0,l.join(""),u.join("")),s.join("")}function $r(e){for(var n=e.length,t=[""],r=0;r");for(var s=0;s/g,">").replace(/((\r\n|\n)?|\r\n|\n)/g,"
\r\n").replace(/\x20/gi," ").replace(/\t/gi," ");a.push("
"))}t.push.apply(t,[""].concat(a,[""])),r+1===n&&t.push("")}return t.push("
".concat(u,"
"),t.join("")}function Zr(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,t={},r=n.createDocumentFragment(),o=n.createElement("div");r.appendChild(o);var i=e;if("string"==typeof i){var a=i.replace(/]*?>([\s\S]*?)<\/\s*td>/g,(function(e){var n=e.match(/]*?>/g)[0],t=e.substring(n.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"");return"".concat(n).concat(t).concat("")}));o.insertAdjacentHTML("afterbegin","".concat(a)),i=o.querySelector("table")}if(i&&Jr(i)){var s=o.querySelector('meta[name$="enerator"]'),l=null!==i.querySelector("tbody th"),u=i.querySelector("tr"),c=u?Array.from(u.cells).reduce((function(e,n){return e+n.colSpan}),0)-(l?1:0):0,d=i.tFoot&&Array.from(i.tFoot.rows)||[],f=[],h=!1,A=0,m=0;if(i.tHead){var p=Array.from(i.tHead.rows).filter((function(e){var n=null!==e.querySelector("td");return n&&f.push(e),!n}));h=(A=p.length)>0,A>1?t.nestedHeaders=Array.from(p).reduce((function(e,n){var t=Array.from(n.cells).reduce((function(e,n,t){if(l&&0===t)return e;var r=n.colSpan,o=n.innerHTML,i=r>1?{label:o,colspan:r}:o;return e.push(i),e}),[]);return e.push(t),e}),[]):h&&(t.colHeaders=Array.from(p[0].children).reduce((function(e,n,t){return l&&0===t||e.push(n.innerHTML),e}),[]))}f.length&&(t.fixedRowsTop=f.length),d.length&&(t.fixedRowsBottom=d.length);var g=[].concat(f,zr(Array.from(i.tBodies).reduce((function(e,n){return e.push.apply(e,zr(Array.from(n.rows))),e}),[])),zr(d));m=g.length;for(var y=new Array(m),v=0;v1||T>1){for(var O=_;O<_+B;O++)if(O[\r\n]?[\x20]{0,3}/gim,"\r\n"):j.replace(/[\r\n]?/gim,"\r\n"),y[_][L]=H.replace(qr,(function(e){return Gr[e]}))}else w.push(j)}return b.length&&(t.mergeCells=b),w.length&&(t.rowHeaders=w),y.length&&(t.data=y),t}}function eo(e){return function(e){if(Array.isArray(e))return no(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return no(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return no(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function no(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:[],t=to(e);if("number"===t)return!isNaN(e)&&isFinite(e);if("string"===t){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);var r=Array.from(new Set(["."].concat(eo(n)))).map((function(e){return"\\".concat(e)})).join("|");return new RegExp("^[+-]?\\s*(((".concat(r,")?\\d+((").concat(r,")\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$"),"i").test(e.trim())}return"object"===t&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}function oo(e){return ro(e,[","])}function io(e,n,t){var r=-1;for("function"==typeof n?(t=n,n=e):r=e-1;++r<=n&&!1!==t(r););}function ao(e,n,t){var r=e+1;for("function"==typeof n&&(t=n,n=0);--r>=n&&!1!==t(r););}function so(e,n){return n=parseInt(n.tostring().replace("%",""),10),n=parseInt(e*n/100,10)}function lo(e){return function(e){if(Array.isArray(e))return fo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||co(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uo(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||co(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function co(e,n){if(e){if("string"==typeof e)return fo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fo(e,n):void 0}}function fo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},n=e.errorIdExists,t=new Map;function r(e,r){if(l(e))throw new Error(n(e));t.set(e,r)}function o(){t.clear()}function i(e){var n=s().find((function(n){var t=yo(n,2),r=t[0],o=t[1];return e===o&&r}))||[null];return yo(n,1)[0]}function a(e){return t.get(e)}function s(){return go(t)}function l(e){return t.has(e)}return n=xt(n)?n:wo,{addItem:r,clear:o,getId:i,getItem:a,getItems:s,hasItem:l}}function Co(e){return function(e){if(Array.isArray(e))return Eo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return Eo(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Eo(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Eo(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{},n=e.errorPriorityExists,t=e.errorPriorityNaN,r=new Map;function o(e,o){if(!ro(e))throw new Error(t(e));if(r.has(e))throw new Error(n(e));r.set(e,o)}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ho,n=Ao.get(e)||Ao.get(ho),t=uo(n,2),o=t[0],i=t[1];return lo(r).sort((function(e,n){return e[0]0&&void 0!==arguments[0]?arguments[0]:{},n=e.errorItemExists,t=new Set;function r(e){if(t.has(e))throw new Error(n(e));t.add(e)}function o(){return Co(t)}return n=xt(n)?n:ko,{addItem:r,getItems:o}}({errorItemExists:Bo}),Oo=_o({errorIdExists:Bo});function Ro(){return[].concat(xo(To.getItems()),xo(Lo.getItems()))}function Do(e){var n=yn(e);return Oo.getItem(n)}function Io(e,n,t){var r=So(function(e,n,t){"function"==typeof e&&(e=(n=e).PLUGIN_KEY,t=n.PLUGIN_PRIORITY);return[e,n,t]}(e,n,t),3);e=r[0],n=r[1],t=r[2],void 0===Do(e)&&function(e,n,t){var r=yn(e);if(Oo.hasItem(r))throw new Error(Bo(r));void 0===t?Lo.addItem(r):To.addItem(t,r);Oo.addItem(r,n)}(e,n,t)}var Ho=dr("renderers"),Po=Ho.register,No=Ho.getItem,Fo=Ho.hasItem,Uo=Ho.getNames;Ho.getValues;function Qo(e){if("function"==typeof e)return e;if(!Fo(e))throw Error('No registered renderer found under "'.concat(e,'" name'));return No(e)}function Yo(e,n){"string"!=typeof e&&(e=(n=e).RENDERER_TYPE),Po(e,n)}var Wo=dr("validators"),Vo=Wo.register,zo=Wo.getItem,Ko=Wo.hasItem,Go=Wo.getNames;Wo.getValues;function qo(e){if("function"==typeof e)return e;if(!Ko(e))throw Error('No registered validator found under "'.concat(e,'" name'));return zo(e)}function Jo(e,n){"string"!=typeof e&&(e=(n=e).VALIDATOR_TYPE),Vo(e,n)}function Xo(e,n){for(var t=0;t=0&&r.col>=0;e.cancelable&&o&&this.instance.getSetting("isDataViewInstance")&&(He()&&(xe()||je())&&this.selectedCellWasTouched(t)&&!["A","BUTTON","INPUT"].includes(t.tagName)?e.preventDefault():this.selectedCellWasTouched(t)||e.preventDefault()),this.onMouseUp(e),this.instance.touchApplied=!1}},{key:"destroy",value:function(){var e=$o.get(this);clearTimeout(e.dblClickTimeout[0]),clearTimeout(e.dblClickTimeout[1]),this.eventManager.destroy()}}])&&Xo(n.prototype,t),r&&Xo(n,r),e}(),ei=["top","bottom","left","top_left_corner","bottom_left_corner"],ni={};function ti(e){var n=e.OVERLAY_NAME;if(-1===ei.indexOf(n))throw new Error("Unsupported overlay (".concat(n,")."));oi(n)||(ni[n]=e)}function ri(e,n){return new ni[e](n)}function oi(e){return void 0!==ni[e]}function ii(e,n){for(var t=0;t0?this.collectedNodes[e-1]:null}},{key:"getRenderedChildCount",value:function(){var e=this.rootNode,n=this.sizeSet,t=0;if(this.isSharedViewSet())for(var r=e.firstElementChild;r;){if(r.tagName===this.childNodeType)t+=1;else if(n.isPlaceOn(1))break;r=r.nextElementSibling}else t=e.childElementCount;return t}},{key:"start",value:function(){this.collectedNodes.length=0,this.visualIndex=0;for(var e=this.rootNode,n=this.sizeSet,t=this.isSharedViewSet(),r=n.getViewSize().nextSize,o=this.getRenderedChildCount();or;)e.removeChild(a?e.firstChild:e.lastChild),o-=1}},{key:"render",value:function(){var e=this.rootNode,n=this.sizeSet,t=this.visualIndex;this.isSharedViewSet()&&n.isPlaceOn(2)&&(t+=n.sharedSize.nextSize);var r=e.childNodes[t];if(r.tagName!==this.childNodeType){var o=this.nodesPool();e.replaceChild(o,r),r=o}this.collectedNodes.push(r),this.visualIndex+=1}},{key:"end",value:function(){}}])&&hi(n.prototype,t),r&&hi(n,r),e}();function mi(e){return(mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pi(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function gi(e,n){for(var t=0;to;)r.removeChild(r.lastChild),this.renderedNodes-=1}var s=this.rootNode.childNodes.length;if(s>n)for(var l=n;ln;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}},{key:"render",value:function(){this.adjust();for(var e=this.table,n=e.columnsToRender,t=e.rowHeadersCount,r=0;r1e3&&(na=!0,Jt(Je(Ki||(Ki=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting \n the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.'],['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\\x20\n the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.']))))),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.cellRenderer;ca(this,e),this.rootNode=n,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=r}var n,t,r;return n=e,(t=[{key:"setAxisUtils",value:function(e,n){this.rowUtils=e,this.columnUtils=n}},{key:"setViewportSize",value:function(e,n){this.rowsToRender=e,this.columnsToRender=n}},{key:"setFilters",value:function(e,n){this.rowFilter=e,this.columnFilter=n}},{key:"setHeaderContentRenderers",value:function(e,n){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=n,this.columnHeadersCount=n.length}},{key:"setRenderers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.rowHeaders,t=e.columnHeaders,r=e.colGroup,o=e.rows,i=e.cells;n.setTable(this),t.setTable(this),r.setTable(this),o.setTable(this),i.setTable(this),this.rowHeaders=n,this.columnHeaders=t,this.colGroup=r,this.rows=o,this.cells=i}},{key:"renderedRowToSource",value:function(e){return this.rowFilter.renderedToSource(e)}},{key:"renderedColumnToSource",value:function(e){return this.columnFilter.renderedToSource(e)}},{key:"render",value:function(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();for(var e=this.rowsToRender,n=this.rows,t=0;t0&&void 0!==arguments[0]?arguments[0]:{},t=n.TABLE,r=n.THEAD,o=n.COLGROUP,i=n.TBODY,a=n.rowUtils,s=n.columnUtils,l=n.cellRenderer;ha(this,e),this.renderer=new fa(t,{cellRenderer:l}),this.renderer.setRenderers({rowHeaders:new Oi,columnHeaders:new Fi(r),colGroup:new Gi(o),rows:new ta(i),cells:new ua}),this.renderer.setAxisUtils(a,s)}var n,t,r;return n=e,(t=[{key:"setFilters",value:function(e,n){return this.renderer.setFilters(e,n),this}},{key:"setViewportSize",value:function(e,n){return this.renderer.setViewportSize(e,n),this}},{key:"setHeaderContentRenderers",value:function(e,n){return this.renderer.setHeaderContentRenderers(e,n),this}},{key:"adjust",value:function(){this.renderer.adjust()}},{key:"render",value:function(){this.renderer.render()}}])&&Aa(n.prototype,t),r&&Aa(n,r),e}();function pa(e){return(pa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ga(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]&&arguments[0],n=this.wot,t=n.wtOverlays,r=n.wtViewport,o=n.getSetting("totalRows"),i=n.getSetting("totalColumns"),a=n.getSetting("rowHeaders"),s=a.length,l=n.getSetting("columnHeaders"),u=l.length,c=!1,d=e;if(this.isMaster&&(this.holderOffset=qn(this.holder),d=r.createRenderCalculators(d),s&&!n.getSetting("fixedColumnsLeft"))){var f=t.leftOverlay.getScrollPosition(),h=this.correctHeaderWidth;this.correctHeaderWidth=f>0,h!==this.correctHeaderWidth&&(d=!1)}if(this.isMaster&&(c=t.prepareOverlays()),d)this.isMaster&&r.createVisibleCalculators(),t&&t.refresh(!0);else{this.isMaster?this.tableOffset=qn(this.TABLE):this.tableOffset=this.wot.cloneSource.wtTable.tableOffset;var A=o>0?this.getFirstRenderedRow():0,m=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new li(A,o,u),this.columnFilter=new ai(m,i,s);var p,g=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();var y={};this.wot.getSetting("beforeDraw",!0,y),g=!0!==y.skipRender}if(g)if(this.tableRenderer.setHeaderContentRenderers(a,l),(this.is("bottom")||this.is("bottom_left_corner"))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(p=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is("bottom"))&&this.markOversizedRows(),this.isMaster){this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var v=it(this.hider),b=it(this.TABLE);0!==v&&b!==v&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),p!==this.wot.wtViewport.getWorkspaceWidth()&&(this.wot.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wot.getSetting("onDraw",!0)}else this.is("bottom")&&this.wot.cloneSource.wtOverlays.adjustElementsSize()}if(this.isMaster){var w=t.topOverlay.resetFixedPosition();t.bottomOverlay.clone&&(w=t.bottomOverlay.resetFixedPosition()||w),w=t.leftOverlay.resetFixedPosition()||w,t.topLeftCornerOverlay&&t.topLeftCornerOverlay.resetFixedPosition(),t.bottomLeftCornerOverlay&&t.bottomLeftCornerOverlay.clone&&t.bottomLeftCornerOverlay.resetFixedPosition(),w&&(t.refreshAll(),t.adjustElementsSize())}return this.refreshSelections(d),c&&t.syncScrollWithMaster(),n.drawn=!0,this}},{key:"markIfOversizedColumnHeader",value:function(e){for(var n,t,r,o=this.wot.wtTable.columnFilter.renderedToSource(e),i=this.wot.getSetting("columnHeaders").length,a=this.wot.wtSettings.settings.defaultRowHeight,s=this.wot.getSetting("columnHeaderHeight")||[];i;)i-=1,n=this.wot.wtTable.getColumnHeaderHeight(i),(t=this.wot.wtTable.getColumnHeader(o,i))&&(r=st(t),(!n&&a=0)throw new Error("TR was expected to be rendered but is not");var a=n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!a&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return a}},{key:"getColumnHeader",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=this.THEAD.childNodes[n];return null==t?void 0:t.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getColumnHeaders",value:function(e){var n=[],t=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((function(e){var r=e.childNodes[t];r&&n.push(r)})),n}},{key:"getRowHeader",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0!==this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0)){var t=this.wot.getSetting("rowHeaders").length;if(!(n>=t)){var r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return null==r?void 0:r.childNodes[n]}}}},{key:"getRowHeaders",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return[];for(var n=[],t=this.wot.getSetting("rowHeaders").length,r=0;r=0)return!1;var n=this.wot.getSetting("rowHeaders").length;return Math.abs(e)<=n}},{key:"isRowHeaderRendered",value:function(e){if(e>=0)return!1;var n=this.wot.getSetting("columnHeaders").length;return Math.abs(e)<=n}},{key:"isRowBeforeRenderedRows",value:function(e){var n=this.getFirstRenderedRow();return e<0&&n<=0?!this.isRowHeaderRendered(e):ethis.getLastRenderedRow()}},{key:"isColumnBeforeRenderedColumns",value:function(e){var n=this.getFirstRenderedColumn();return e<0&&n<=0?!this.isColumnHeaderRendered(e):ethis.getLastRenderedColumn()}},{key:"isColumnAfterViewport",value:function(e){return this.columnFilter&&e>this.getLastVisibleColumn()}},{key:"isRowAfterViewport",value:function(e){return this.rowFilter&&e>this.getLastVisibleRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isLastRowFullyVisible",value:function(){return this.getLastVisibleRow()===this.getLastRenderedRow()}},{key:"isLastColumnFullyVisible",value:function(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}},{key:"allRowsInViewport",value:function(){return this.wot.getSetting("totalRows")===this.getVisibleRowsCount()}},{key:"allColumnsInViewport",value:function(){return this.wot.getSetting("totalColumns")===this.getVisibleColumnsCount()}},{key:"getRowHeight",value:function(e){return this.rowUtils.getHeight(e)}},{key:"getColumnHeaderHeight",value:function(e){return this.columnUtils.getHeaderHeight(e)}},{key:"getColumnWidth",value:function(e){return this.columnUtils.getWidth(e)}},{key:"getStretchedColumnWidth",value:function(e){return this.columnUtils.getStretchedColumnWidth(e)}},{key:"hasDefinedSize",value:function(){return this.hasTableHeight&&this.hasTableWidth}},{key:"isVisible",value:function(){return Gn(this.TABLE)}},{key:"_modifyRowHeaderWidth",value:function(e){var n=xt(e)?e():null;return Array.isArray(n)?(n=wa(n))[n.length-1]=this._correctRowHeaderWidth(n[n.length-1]):n=this._correctRowHeaderWidth(n),n}},{key:"_correctRowHeaderWidth",value:function(e){var n=e;return"number"!=typeof e&&(n=this.wot.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(n+=1),n}}])&&ka(n.prototype,t),r&&ka(n,r),e}(),xa={getFirstRenderedRow:function(){var e=this.wot.getSetting("totalRows"),n=this.wot.getSetting("fixedRowsBottom"),t=e-n;return 0===e||0===n?-1:t<0?0:t},getFirstVisibleRow:function(){return this.getFirstRenderedRow()},getLastRenderedRow:function(){return this.wot.getSetting("totalRows")-1},getLastVisibleRow:function(){return this.getLastRenderedRow()},getRenderedRowsCount:function(){var e=this.wot.getSetting("totalRows");return Math.min(this.wot.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount:function(){return this.getRenderedRowsCount()}};Ae(xa,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var Ma=xa,ja={getFirstRenderedColumn:function(){return 0===this.wot.getSetting("totalColumns")?-1:0},getFirstVisibleColumn:function(){return this.getFirstRenderedColumn()},getLastRenderedColumn:function(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn:function(){return this.getLastRenderedColumn()},getRenderedColumnsCount:function(){var e=this.wot.getSetting("totalColumns");return Math.min(this.wot.getSetting("fixedColumnsLeft"),e)},getVisibleColumnsCount:function(){return this.getRenderedColumnsCount()}};Ae(ja,"MIXIN_NAME","stickyColumnsLeft",{writable:!1,enumerable:!1});var Ba=ja;function Ta(e){return(Ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function La(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Oa(e,n){return(Oa=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function Ra(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=Ia(e);if(n){var o=Ia(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Da(this,t)}}function Da(e,n){if(n&&("object"===Ta(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ia(e){return(Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ha=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Oa(e,n)}(t,e);var n=Ra(t);function t(){return La(this,t),n.apply(this,arguments)}return t}(Sa);de(Ha,Ma),de(Ha,Ba);var Pa=Ha;function Na(e,n){for(var t=0;t=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom"),s={left:this.clone.wtTable.spreader.offsetLeft,top:this.clone.wtTable.spreader.offsetTop},l={left:e.offsetLeft,top:e.offsetTop};return r?this.getRelativeCellPositionWithinWindow(i,o,l,s):this.getRelativeCellPositionWithinHolder(i,a,o,l,s)}Jt("The provided element is not a child of the ".concat(this.type," overlay"))}},{key:"getRelativeCellPositionWithinWindow",value:function(e,n,t,r){var o=this.wot.wtTable.wtRootElement.getBoundingClientRect(),i=0,a=0;return i=n?o.left<=0?-1*o.left:0:r.left,a=e?this.clone.wtTable.TABLE.getBoundingClientRect().top-o.top:r.top,{left:t.left+i,top:t.top+a}}},{key:"getRelativeCellPositionWithinHolder",value:function(e,n,t,r,o){var i=this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),a=this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition(),s=0,l=0;if(t||(s=i-o.left),n){var u=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+u.top}else e||(l=a-o.top);return{left:r.left-s,top:r.top-l}}},{key:"makeClone",value:function(e){if(-1===ei.indexOf(e))throw new Error('Clone type "'.concat(e,'" is not supported.'));var n=this.wot,t=n.wtTable,r=n.rootDocument,o=n.rootWindow,i=r.createElement("DIV"),a=r.createElement("TABLE"),s=t.wtRootElement.parentNode;i.className="ht_clone_".concat(e," handsontable"),i.style.position="absolute",i.style.top=0,i.style.left=0,i.style.overflow="visible",a.className=t.TABLE.className,i.appendChild(a),this.type=e,s.appendChild(i);var l=this.wot.getSetting("preventOverflow");return!0===l||"horizontal"===l&&"top"===this.type||"vertical"===l&&"left"===this.type?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(s).getPropertyValue("overflow")?this.mainTableScrollableElement=t.holder:this.mainTableScrollableElement=et(t.TABLE),new this.wot.constructor({cloneSource:this.wot,cloneOverlay:this,table:a})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.shouldBeRendered();this.clone&&(this.needFullRender||n)&&this.clone.draw(e),this.needFullRender=n}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,n=this.clone.wtTable.hider;z([e.style,n.style,e.parentNode.style],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new Sr(this.clone).destroy()}}])&&Na(n.prototype,t),r&&Na(n,r),e}();function Ua(e){return(Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qa(e,n,t){return(Qa=za()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&Wa(o,t.prototype),o}).apply(null,arguments)}function Ya(e,n){for(var t=0;tu?s-u:0,r+="px",t+="px",n.style.left=t,n.style.bottom=r}else _t(n),this.repositionOverlay();var c=at(this.clone.wtTable.TABLE),d=it(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(c=0),n.style.height="".concat(c,"px"),n.style.width="".concat(d,"px"),!1}}},{key:"repositionOverlay",value:function(){var e=this.wot,n=e.wtTable,t=e.rootDocument,r=this.clone.wtTable.holder.parentNode,o=gt(t);n.holder.clientHeight===n.holder.offsetHeight&&(o=0),r.style.bottom="".concat(o,"px")}}])&&Ya(r.prototype,o),i&&Ya(r,i),s}(Fa),qa={getFirstRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.startColumn;return null===e?-1:e},getFirstVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.startColumn;return null===e?-1:e},getLastRenderedColumn:function(){var e=this.wot.wtViewport.columnsRenderCalculator.endColumn;return null===e?-1:e},getLastVisibleColumn:function(){var e=this.wot.wtViewport.columnsVisibleCalculator.endColumn;return null===e?-1:e},getRenderedColumnsCount:function(){return this.wot.wtViewport.columnsRenderCalculator.count},getVisibleColumnsCount:function(){return this.wot.wtViewport.columnsVisibleCalculator.count}};Ae(qa,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var Ja=qa;function Xa(e){return(Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $a(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Za(e,n){return(Za=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function es(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=ts(e);if(n){var o=ts(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return ns(this,t)}}function ns(e,n){if(n&&("object"===Xa(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ts(e){return(ts=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rs=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Za(e,n)}(t,e);var n=es(t);function t(){return $a(this,t),n.apply(this,arguments)}return t}(Sa);de(rs,Ma),de(rs,Ja);var os=rs;function is(e){return(is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function as(e,n,t){return(as=ds()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&ls(o,t.prototype),o}).apply(null,arguments)}function ss(e,n){for(var t=0;tc?u-c:0,o+="px",e.style.left=r,e.style.bottom=o}var d=this.adjustHeaderBordersPosition(n);return this.adjustElementsSize(),d}}},{key:"repositionOverlay",value:function(){var e=this.wot,n=e.wtTable,t=e.rootDocument,r=this.clone.wtTable.holder.parentNode,o=gt(t);n.holder.clientHeight===n.holder.offsetHeight&&(o=0),r.style.bottom="".concat(o,"px")}},{key:"setScrollPosition",value:function(e){var n=this.wot.rootWindow,t=!1;return this.mainTableScrollableElement===n?(n.scrollTo(Xn(n),e),t=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,n){for(var t=this.wot,r=t.wtTable,o=t.wtSettings.settings.defaultRowHeight,i=e,a=0;i0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}},{key:"adjustRootElementSize",value:function(){var e=this.wot,n=e.wtTable,t=e.wtViewport,r=e.rootWindow,o=gt(this.wot.rootDocument),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=o),s=Math.min(s,n.wtRootElement.scrollWidth),i.width="".concat(s,"px")}else i.width="";this.clone.wtTable.holder.style.width=i.width;var l=at(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),i.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=this.clone.wtTable.holder;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,n){var t=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=0;n&&r.offsetHeight!==r.clientHeight&&(o=gt(this.wot.rootDocument)),n?(t+=this.sumCellSizes(0,e+1),t-=this.wot.wtViewport.getViewportHeight(),t+=1):t+=this.sumCellSizes(this.wot.getSetting("fixedRowsBottom"),e),t+=o,this.setScrollPosition(t)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return $n(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){var n=this.wot.getSetting("fixedRowsBottom"),t=this.cachedFixedRowsBottom!==n,r=this.wot.getSetting("columnHeaders"),o=!1;if((t||0===n)&&r.length>0){var i=this.wot.wtTable.holder.parentNode,a=Nn(i,"innerBorderBottom");this.cachedFixedRowsBottom=this.wot.getSetting("fixedRowsBottom"),e||0===this.wot.getSetting("totalRows")?(Fn(i,"innerBorderBottom"),o=!a):(Un(i,"innerBorderBottom"),o=a)}return o}}])&&ss(r.prototype,o),i&&ss(r,i),s}(Fa),As={getFirstRenderedRow:function(){var e=this.wot.wtViewport.rowsRenderCalculator.startRow;return null===e?-1:e},getFirstVisibleRow:function(){var e=this.wot.wtViewport.rowsVisibleCalculator.startRow;return null===e?-1:e},getLastRenderedRow:function(){var e=this.wot.wtViewport.rowsRenderCalculator.endRow;return null===e?-1:e},getLastVisibleRow:function(){var e=this.wot.wtViewport.rowsVisibleCalculator.endRow;return null===e?-1:e},getRenderedRowsCount:function(){return this.wot.wtViewport.rowsRenderCalculator.count},getVisibleRowsCount:function(){return this.wot.wtViewport.rowsVisibleCalculator.count}};Ae(As,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var ms=As;function ps(e){return(ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gs(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ys(e,n){return(ys=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function vs(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=ws(e);if(n){var o=ws(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return bs(this,t)}}function bs(e,n){if(n&&("object"===ps(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ws(e){return(ws=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _s=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&ys(e,n)}(t,e);var n=vs(t);function t(){return gs(this,t),n.apply(this,arguments)}return t}(Sa);de(_s,ms),de(_s,Ba);var Cs=_s;function Es(e){return(Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ks(e,n,t){return(ks=js()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&xs(o,t.prototype),o}).apply(null,arguments)}function Ss(e,n){for(var t=0;t0?-s:0,bt(n,o+="px",i)}var u=this.adjustHeaderBordersPosition(t);return this.adjustElementsSize(),u}}},{key:"setScrollPosition",value:function(e){var n=this.wot.rootWindow,t=!1;return this.mainTableScrollableElement===n&&n.scrollX!==e?(n.scrollTo(e,Jn(n)),t=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,n){for(var t=this.wot.wtSettings.defaultColumnWidth,r=e,o=0;r0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}},{key:"adjustRootElementSize",value:function(){var e=this.wot,n=e.wtTable,t=e.rootDocument,r=e.rootWindow,o=gt(t),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"vertical"===a){var s=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(s-=o),s=Math.min(s,n.wtRootElement.scrollHeight),i.height="".concat(s,"px")}else i.height="";this.clone.wtTable.holder.style.height=i.height;var l=it(this.clone.wtTable.TABLE);i.width="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e,n=this.clone.wtTable.holder,t=this.wot.selections,r=Math.abs(null!==(e=null==t?void 0:t.getCell().getBorder(this.wot).cornerCenterPointOffset)&&void 0!==e?e:0);this.clone.wtTable.hider.style.height=this.hider.style.height,n.style.height=n.parentNode.style.height,n.style.width="".concat(parseInt(n.parentNode.style.width,10)+r,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style.left="0"}this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.top=""}},{key:"scrollTo",value:function(e,n){var t=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=0;return n&&r.offsetWidth!==r.clientWidth&&(o=gt(this.wot.rootDocument)),n?(t+=this.sumCellSizes(0,e+1),t-=this.wot.wtViewport.getViewportWidth()):t+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),t+=o,this.setScrollPosition(t)}},{key:"getTableParentOffset",value:function(){var e=0;return this.wot.getSetting("preventOverflow")||this.trimmingContainer!==this.wot.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}},{key:"getScrollPosition",value:function(){return Zn(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){var n=this.wot.wtTable.holder.parentNode,t=this.wot.getSetting("rowHeaders"),r=this.wot.getSetting("fixedColumnsLeft");this.wot.getSetting("totalRows")?Un(n,"emptyRows"):Fn(n,"emptyRows");var o=!1;if(r&&!t.length)Fn(n,"innerBorderLeft");else if(!r&&t.length){var i=Nn(n,"innerBorderLeft");e?(Fn(n,"innerBorderLeft"),o=!i):(Un(n,"innerBorderLeft"),o=i)}return o}}])&&Ss(r.prototype,o),i&&Ss(r,i),s}(Fa),Ls={getFirstRenderedRow:function(){return 0===this.wot.getSetting("totalRows")?-1:0},getFirstVisibleRow:function(){return this.getFirstRenderedRow()},getLastRenderedRow:function(){return this.getRenderedRowsCount()-1},getLastVisibleRow:function(){return this.getLastRenderedRow()},getRenderedRowsCount:function(){var e=this.wot.getSetting("totalRows");return Math.min(this.wot.getSetting("fixedRowsTop"),e)},getVisibleRowsCount:function(){return this.getRenderedRowsCount()}};Ae(Ls,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var Os=Ls;function Rs(e){return(Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ds(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Is(e,n){return(Is=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function Hs(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=Ns(e);if(n){var o=Ns(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Ps(this,t)}}function Ps(e,n){if(n&&("object"===Rs(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ns(e){return(Ns=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fs=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&Is(e,n)}(t,e);var n=Hs(t);function t(){return Ds(this,t),n.apply(this,arguments)}return t}(Sa);de(Fs,Os),de(Fs,Ba);var Us=Fs;function Qs(e){return(Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ys(e,n,t){return(Ys=Ks()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&Vs(o,t.prototype),o}).apply(null,arguments)}function Ws(e,n){for(var t=0;t0&&(s="".concat(-o,"px")),n&&"horizontal"!==n||r<0&&i-e.offsetHeight>0&&(l="".concat(-r,"px")),bt(e,s,l)}else _t(e);var u=at(this.clone.wtTable.TABLE),c=it(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(u=0),e.style.height="".concat(u,"px"),e.style.width="".concat(c,"px"),!1}}}])&&Ws(r.prototype,o),i&&Ws(r,i),s}(Fa);function Js(e){return(Js="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xs(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function $s(e,n){return($s=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function Zs(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=nl(e);if(n){var o=nl(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return el(this,t)}}function el(e,n){if(n&&("object"===Js(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function nl(e){return(nl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tl=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&$s(e,n)}(t,e);var n=Zs(t);function t(){return Xs(this,t),n.apply(this,arguments)}return t}(Sa);de(tl,Os),de(tl,Ja);var rl=tl;function ol(e){return(ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function il(e,n,t){return(il=cl()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&sl(o,t.prototype),o}).apply(null,arguments)}function al(e,n){for(var t=0;t0?-l:0,bt(e,o=""===(o=a.hider.style.left)?0:o,i+="px")}var d=this.adjustHeaderBordersPosition(t,r);return this.adjustElementsSize(),d}}},{key:"setScrollPosition",value:function(e){var n=this.wot.rootWindow,t=!1;return this.mainTableScrollableElement===n&&n.scrollY!==e?(n.scrollTo(Xn(n),e),t=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,t=!0),t}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,n){for(var t=this.wot.wtSettings.settings.defaultRowHeight,r=e,o=0;r0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}},{key:"adjustRootElementSize",value:function(){var e=this.wot,n=e.wtTable,t=e.rootDocument,r=e.rootWindow,o=gt(t),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=o),s=Math.min(s,n.wtRootElement.scrollWidth),i.width="".concat(s,"px")}else i.width="";this.clone.wtTable.holder.style.width=i.width;var l=at(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),i.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e,n=this.clone.wtTable.holder,t=this.wot.selections,r=Math.abs(null!==(e=null==t?void 0:t.getCell().getBorder(this.wot).cornerCenterPointOffset)&&void 0!==e?e:0);this.clone.wtTable.hider.style.width=this.hider.style.width,n.style.width=n.parentNode.style.width,n.style.height="".concat(parseInt(n.parentNode.style.height,10)+r,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top="".concat(this.wot.wtViewport.rowsRenderCalculator.startPosition,"px");else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}},{key:"syncOverlayOffset",value:function(){"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.left="".concat(this.wot.wtViewport.columnsRenderCalculator.startPosition,"px"):this.clone.wtTable.spreader.style.left=""}},{key:"scrollTo",value:function(e,n){var t=this.wot,r=(t.cloneSource?t.cloneSource:t).wtTable.holder,o=this.getTableParentOffset(),i=0;if(n&&r.offsetHeight!==r.clientHeight&&(i=gt(t.rootDocument)),n){var a=t.getSetting("fixedRowsBottom"),s=t.getSetting("totalRows");o+=this.sumCellSizes(0,e+1),o-=t.wtViewport.getViewportHeight()-this.sumCellSizes(s-a,s),o+=1}else o+=this.sumCellSizes(t.getSetting("fixedRowsTop"),e);return o+=i,this.setScrollPosition(o)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return $n(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=this.wot.wtTable.holder.parentNode,r=this.wot.getSetting("totalColumns");r?Un(t,"emptyColumns"):Fn(t,"emptyColumns");var o=!1;if(!n){var i=this.wot.getSetting("fixedRowsTop"),a=this.cachedFixedRowsTop!==i,s=this.wot.getSetting("columnHeaders");if((a||0===i)&&s.length>0){var l=Nn(t,"innerBorderTop");this.cachedFixedRowsTop=this.wot.getSetting("fixedRowsTop"),e||0===this.wot.getSetting("totalRows")?(Fn(t,"innerBorderTop"),o=!l):(Un(t,"innerBorderTop"),o=l)}}if(0===this.wot.getSetting("rowHeaders").length){var u=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(u)for(var c=0;c1,l=this.scrollableElement===r,u=this.wot.wtSettings.getSetting("preventWheel"),c={passive:l};(u||s||!Se())&&this.eventManager.addEventListener(this.wot.wtTable.wtRootElement,"wheel",(function(n){return e.onCloneWheel(n,u)}),c),[this.topOverlay,this.bottomOverlay,this.leftOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay].forEach((function(n){if(n&&n.needFullRender){var t=n.clone.wtTable.holder;e.eventManager.addEventListener(t,"wheel",(function(n){return e.onCloneWheel(n,u)}),c)}})),this.eventManager.addEventListener(r,"resize",(function(){clearTimeout(a),a=setTimeout((function(){e.wot.getSetting("onWindowResize")}),200)}))}},{key:"deregisterListeners",value:function(){this.eventManager.clearEvents(!0)}},{key:"onTableScroll",value:function(e){var n=this.wot.rootWindow,t=this.leftOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,o=e.target;this.keyPressed&&(r!==n&&o!==n&&!e.target.contains(r)||t!==n&&o!==n&&!e.target.contains(t))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e,n){var t=this.wot.rootWindow,r=this.leftOverlay.mainTableScrollableElement,o=this.topOverlay.mainTableScrollableElement,i=e.target,a=o!==t&&i!==t&&!i.contains(o),s=r!==t&&i!==t&&!i.contains(r);if(!this.keyPressed||!a&&!s){var l=this.translateMouseWheelToScroll(e);(n||this.scrollableElement!==t&&l)&&e.preventDefault()}}},{key:"onKeyDown",value:function(e){this.keyPressed=Wt(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var n=this.browserLineHeight,t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,r=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(r+=r*n,t+=t*n);var o=this.scrollVertically(t),i=this.scrollHorizontally(r);return o||i}},{key:"scrollVertically",value:function(e){var n=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,n!==this.scrollableElement.scrollTop}},{key:"scrollHorizontally",value:function(e){var n=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,n!==this.scrollableElement.scrollLeft}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var e=this.wot.rootWindow,n=this.topOverlay.clone.wtTable.holder,t=this.leftOverlay.clone.wtTable.holder,r=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],o=r[0],i=r[1];if(this.horizontalScrolling=n.scrollLeft!==o||this.lastScrollX!==e.scrollX,this.verticalScrolling=t.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){n.scrollLeft=o;var a=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;a&&(a.scrollLeft=o)}this.verticalScrolling&&(t.scrollTop=i),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,n=e.scrollLeft,t=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=n),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=n),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=t)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();var e=this.wot,n=e.rootWindow,t=e.wtTable;"hidden"===n.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=t.holder:this.scrollableElement=et(t.TABLE),this.registerListeners()}},{key:"destroy",value:function(){this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.leftOverlay.destroy(),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.destroy(),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.destroy(),this.destroyed=!0}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.wot.wtTable.spreader,t=n.clientWidth,r=n.clientHeight;t===this.spreaderLastSize.width&&r===this.spreaderLastSize.height||(this.spreaderLastSize.width=t,this.spreaderLastSize.height=r,this.adjustElementsSize()),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.leftOverlay.refresh(e),this.topOverlay.refresh(e),this.topLeftCornerOverlay&&this.topLeftCornerOverlay.refresh(e),this.bottomLeftCornerOverlay&&this.bottomLeftCornerOverlay.clone&&this.bottomLeftCornerOverlay.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.wot,t=n.wtViewport,r=n.wtTable,o=this.wot.getSetting("totalColumns"),i=this.wot.getSetting("totalRows"),a=t.getRowHeaderWidth(),s=t.getColumnHeaderHeight(),l=r.hider.style;if(l.width="".concat(a+this.leftOverlay.sumCellSizes(0,o),"px"),l.height="".concat(s+this.topOverlay.sumCellSizes(0,i)+1,"px"),this.scrollbarSize>0){var u=r.wtRootElement,c=u.scrollHeight,d=u.scrollWidth,f=r.holder,h=f.scrollHeight,A=f.scrollWidth;this.hasScrollbarRight=cd?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&r.hider.scrollHeight+this.scrollbarSize>c&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.leftOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}},{key:"applyToDOM",value:function(){this.wot.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM())}},{key:"getParentOverlay",value:function(e){if(!e)return null;var n=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],t=null;return z(n,(function(n){n&&n.clone&&n.clone.wtTable.TABLE.contains(e)&&(t=n.clone)})),t}},{key:"syncOverlayTableClassNames",value:function(){var e=this.instance.wtTable.TABLE;z([this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],(function(n){n&&(n.clone.wtTable.TABLE.className=e.className)}))}}])&&hl(n.prototype,t),r&&hl(n,r),e}();function ml(e,n){for(var t=0;t=0&&e<=Math.max(a-1,0)){var l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();e>=o&&l>-1&&(e-1&&(e>u||n))&&(s=i.scrollTo(e,!0))}return s}},{key:"scrollViewportVertically",value:function(e,n,t){if(!this.wot.drawn)return!1;var r=this._getVariables(),o=r.fixedRowsBottom,i=r.fixedRowsTop,a=r.topOverlay,s=r.totalRows,l=!1;if(e>=0&&e<=Math.max(s-1,0)){var u=this.getFirstVisibleRow(),c=this.getLastVisibleRow();e>=i&&u>-1&&(e-1&&(e>c&&e0;h--)if(f+=n.sumCellSizes(h-1,h),l.top+u-f<=d){s=h;break}}}return s}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),n=e.topOverlay,t=e.wtTable,r=e.wtViewport,o=e.totalRows,i=this.wot.rootWindow,a=t.getLastVisibleRow();if(n.mainTableScrollableElement===i){var s=qn(t.wtRootElement),l=$n(i,i);if(s.top>l)for(var u=st(i),c=r.getColumnHeaderHeight(),d=1;d<=o;d++)if(c+=n.sumCellSizes(d-1,d),s.top+c-l>=u){a=d-2;break}}return a}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),n=e.leftOverlay,t=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,a=t.getFirstVisibleColumn();if(n.mainTableScrollableElement===i){var s=qn(t.wtRootElement),l=lt(t.hider),u=lt(i),c=Zn(i,i);if(s.left+l-u<=c)for(var d=r.getRowHeaderWidth(),f=o;f>0;f--)if(d+=n.sumCellSizes(f-1,f),s.left+l-d<=c){a=f;break}}return a}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),n=e.leftOverlay,t=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,a=t.getLastVisibleColumn();if(n.mainTableScrollableElement===i){var s=qn(t.wtRootElement),l=Zn(i,i);if(s.left>l)for(var u=lt(i),c=r.getRowHeaderWidth(),d=1;d<=o;d++)if(c+=n.sumCellSizes(d-1,d),s.left+c-l>=u){a=d-2;break}}return a}},{key:"_getVariables",value:function(){var e=this.wot;return{topOverlay:e.wtOverlays.topOverlay,leftOverlay:e.wtOverlays.leftOverlay,wtTable:e.wtTable,wtViewport:e.wtViewport,totalRows:e.getSetting("totalRows"),totalColumns:e.getSetting("totalColumns"),fixedRowsTop:e.getSetting("fixedRowsTop"),fixedRowsBottom:e.getSetting("fixedRowsBottom"),fixedColumnsLeft:e.getSetting("fixedColumnsLeft")}}}])&&ml(n.prototype,t),r&&ml(n,r),e}();function gl(e,n){for(var t=0;t0||r.getSetting("rowHeaders").length>0},shouldRenderTopOverlay:function(){return r.getSetting("fixedRowsTop")>0||r.getSetting("columnHeaders").length>0},shouldRenderBottomOverlay:function(){return r.getSetting("fixedRowsBottom")>0},minSpareRows:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:function(e,n,t){var o=r.getSetting("data",e,n);Kn(t,null==o?"":o)},columnWidth:function(){},rowHeight:function(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:function(e){return e},onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:function(e){return e},onBeforeHighlightingColumnHeader:function(e){return e},onWindowResize:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null},this.settings={},me(this.defaults,(function(e,n){if(void 0!==t[n])r.settings[n]=t[n];else{if(void 0===e)throw new Error('A required setting "'.concat(n,'" was not provided'));r.settings[n]=e}}))}var n,t,r;return n=e,(t=[{key:"update",value:function(e,n){var t=this;return void 0===n?me(e,(function(e,n){t.settings[n]=e})):this.settings[e]=n,this.wot}},{key:"getSetting",value:function(e,n,t,r,o){return"function"==typeof this.settings[e]?this.settings[e](n,t,r,o):void 0!==n&&Array.isArray(this.settings[e])?this.settings[e][n]:this.settings[e]}},{key:"has",value:function(e){return!!this.settings[e]}}])&&gl(n.prototype,t),r&&gl(n,r),e}();function vl(e){return(vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bl(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function wl(e,n){for(var t=0;t0,this.hasTableWidth=u>0}this.isTableVisible=Gn(this.TABLE)}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot,n=e.getOverlayName(),t=e.getSetting("columnHeaders").length;if(t&&!e.wtViewport.hasOversizedColumnHeadersMarked[n]){for(var r=e.getSetting("rowHeaders").length,o=this.getRenderedColumnsCount(),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=n.viewportSize,r=n.scrollOffset,o=n.totalItems,i=n.itemSizeFn,a=n.overrideFn,s=n.calculationType,l=n.scrollbarHeight;Ml(this,e),Bl.set(this,{viewportHeight:t,scrollOffset:r,totalRows:o,rowHeightFn:i,overrideFn:a,calculationType:s,horizontalScrollbarHeight:l}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.calculate()}var n,t,r;return n=e,r=[{key:"DEFAULT_HEIGHT",get:function(){return 23}}],(t=[{key:"calculate",value:function(){for(var n,t=0,r=!0,o=[],i=Bl.get(this),a=i.calculationType,s=i.overrideFn,l=i.rowHeightFn,u=i.scrollOffset,c=i.totalRows,d=i.viewportHeight,f=i.horizontalScrollbarHeight||0,h=0;h=u&&t+(2===a?n:0)<=u+d-f&&(null===this.startRow&&(this.startRow=h),this.endRow=h),o.push(t),t+=n,2!==a&&(this.endRow=h),t>=u+d-f){r=!1;break}if(this.endRow===c-1&&r)for(this.startRow=this.endRow;this.startRow>0;){var A=o[this.endRow]+n-o[this.startRow-1];if((A<=d-f||2!==a)&&(this.startRow-=1),A>=d-f)break}1===a&&null!==this.startRow&&s&&s(this),this.startPosition=o[this.startRow],void 0===this.startPosition&&(this.startPosition=null),c0&&void 0!==arguments[0]?arguments[0]:{},t=n.viewportSize,r=n.scrollOffset,o=n.totalItems,i=n.itemSizeFn,a=n.overrideFn,s=n.calculationType,l=n.stretchMode,u=n.stretchingItemWidthFn,c=void 0===u?function(e){return e}:u;Ll(this,e),Rl.set(this,{viewportWidth:t,scrollOffset:r,totalColumns:o,columnWidthFn:i,overrideFn:a,calculationType:s,stretchingColumnWidthFn:c}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=l,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}var n,t,r;return n=e,r=[{key:"DEFAULT_WIDTH",get:function(){return 50}}],(t=[{key:"calculate",value:function(){for(var e,n=0,t=!0,r=[],o=Rl.get(this),i=o.calculationType,a=o.overrideFn,s=o.scrollOffset,l=o.totalColumns,u=o.viewportWidth,c=0;c=s&&n+(2===i?e:0)<=s+(s>0?u+1:u)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=c),this.endColumn=c),r.push(n),n+=e,2!==i&&(this.endColumn=c),n>=s+u){t=!1;break}if(this.endColumn===l-1&&t)for(this.startColumn=this.endColumn;this.startColumn>0;){var d=r[this.endColumn]+e-r[this.startColumn-1];if((d<=u||2!==i)&&(this.startColumn-=1),d>u)break}1===i&&null!==this.startColumn&&a&&a(this),this.startPosition=r[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),l0)this.stretchAllRatio=n/o,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&n!==1/0){var u=this._getColumnWidth(r-1),c=l+u;this.stretchLastWidth=c>=0?c:u}}}},{key:"getStretchedColumnWidth",value:function(e,n){var t=null;return"all"===this.stretch&&0!==this.stretchAllRatio?t=this._getStretchedAllColumnWidth(e,n):"last"===this.stretch&&0!==this.stretchLastWidth&&(t=this._getStretchedLastColumnWidth(e)),t}},{key:"_getStretchedAllColumnWidth",value:function(e,n){var t=0,r=Rl.get(this),o=r.totalColumns;if(!this.stretchAllColumnsWidth[e]){var i=Math.round(n*this.stretchAllRatio),a=r.stretchingColumnWidthFn(i,e);this.stretchAllColumnsWidth[e]=void 0===a?i:isNaN(a)?this._getColumnWidth(e):a}if(this.stretchAllColumnsWidth.length===o&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(var s=0;s0&&n.clientHeight>0?n.clientHeight:1/0}},{key:"getWorkspaceWidth",value:function(){var e,n,t=this.wot,r=t.rootDocument,o=t.rootWindow,i=this.instance.wtOverlays.leftOverlay.trimmingContainer,a=r.documentElement.offsetWidth,s=t.getSetting("totalColumns");if(t.getSetting("preventOverflow"))return it(this.instance.wtTable.wtRootElement);if(e=t.getSetting("freezeOverlays")?Math.min(a-this.getWorkspaceOffset().left,a):Math.min(this.getContainerFillWidth(),a-this.getWorkspaceOffset().left,a),i===o&&s>0&&this.sumColumnWidths(0,s-1)>e)return r.documentElement.clientWidth;if(i!==o&&("scroll"===(n=tt(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow",o))||"hidden"===n||"auto"===n))return Math.max(e,i.clientWidth);var l=t.getSetting("stretchH");return"none"!==l&&l?e:Math.max(e,it(this.instance.wtTable.TABLE))}},{key:"hasVerticalScroll",value:function(){return this.getWorkspaceActualHeight()>this.getWorkspaceHeight()}},{key:"hasHorizontalScroll",value:function(){return this.getWorkspaceActualWidth()>this.getWorkspaceWidth()}},{key:"sumColumnWidths",value:function(e,n){for(var t=this.wot.wtTable,r=0,o=e;o0&&(e-=n),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),n=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var t=0,r=n.length;t0?e-n:e}},{key:"createRowsCalculator",value:function(){var e,n,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,o=this.wot,i=o.wtSettings,a=o.wtOverlays,s=o.wtTable,l=o.rootDocument;this.rowHeaderWidth=NaN,e=i.settings.renderAllRows&&1===r?1/0:this.getViewportHeight();var u=a.topOverlay.getScrollPosition()-a.topOverlay.getTableParentOffset();u<0&&(u=0);var c=o.getSetting("fixedRowsTop"),d=o.getSetting("fixedRowsBottom"),f=o.getSetting("totalRows");return c&&(u+=t=a.topOverlay.sumCellSizes(0,c),e-=t),d&&a.bottomOverlay.clone&&(e-=t=a.bottomOverlay.sumCellSizes(f-d,f)),n=s.holder.clientHeight===s.holder.offsetHeight?0:gt(l),new Tl({viewportSize:e,scrollOffset:u,totalItems:o.getSetting("totalRows"),itemSizeFn:function(e){return s.getRowHeight(e)},overrideFn:i.settings.viewportRowCalculatorOverride,calculationType:r,scrollbarHeight:n})}},{key:"createColumnsCalculator",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=this.wot,t=n.wtSettings,r=n.wtOverlays,o=n.wtTable,i=n.rootDocument,a=this.getViewportWidth(),s=r.leftOverlay.getScrollPosition()-r.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,s<0&&(s=0);var l=n.getSetting("fixedColumnsLeft");if(l){var u=r.leftOverlay.sumCellSizes(0,l);s+=u,a-=u}return o.holder.clientWidth!==o.holder.offsetWidth&&(a-=gt(i)),new Dl({viewportSize:a,scrollOffset:s,totalItems:n.getSetting("totalColumns"),itemSizeFn:function(e){return n.wtTable.getColumnWidth(e)},overrideFn:t.settings.viewportColumnCalculatorOverride,calculationType:e,stretchMode:n.getSetting("stretchH"),stretchingItemWidthFn:function(e,t){return n.getSetting("onBeforeStretchingColumnWidth",e,t)}})}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=e;if(n){var t=this.createRowsCalculator(2),r=this.createColumnsCalculator(2);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(r)||(n=!1)}return n||(this.rowsRenderCalculator=this.createRowsCalculator(1),this.columnsRenderCalculator=this.createColumnsCalculator(1)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,n}},{key:"createVisibleCalculators",value:function(){this.rowsVisibleCalculator=this.createRowsCalculator(2),this.columnsVisibleCalculator=this.createColumnsCalculator(2)}},{key:"areAllProposedVisibleRowsAlreadyRendered",value:function(e){if(!this.rowsVisibleCalculator)return!1;var n=e.startRow,t=e.endRow,r=this.rowsRenderCalculator,o=r.startRow,i=r.endRow;return!(n0||t>i||t===i&&t0||t>i||t===i&&t0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}},{key:"getCell",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!n)return this.wtTable.getCell(e);var t=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsTop"),o=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row=t-o){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col=t-o&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}},{key:"update",value:function(e,n){return this.wtSettings.update(e,n)}},{key:"scrollViewport",value:function(e,n,t,r,o){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,n,t,r,o)}},{key:"scrollViewportHorizontally",value:function(e,n,t){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,n,t)}},{key:"scrollViewportVertically",value:function(e,n,t){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,n,t)}},{key:"getViewport",value:function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}},{key:"getOverlayName",value:function(){return this.cloneOverlay?this.cloneOverlay.type:"master"}},{key:"exportSettingsAsClassNames",value:function(){var e=this,n=[],t=[];me({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},(function(r,o){e.getSetting(o).length&&t.push(r),n.push(r)})),Un(this.wtTable.wtRootElement.parentNode,n),Fn(this.wtTable.wtRootElement.parentNode,t)}},{key:"getSetting",value:function(e,n,t,r,o){return this.wtSettings.getSetting(e,n,t,r,o)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}])&&Pl(n.prototype,t),r&&Pl(n,r),e}();function Fl(e){var n=e.isShiftKey,t=e.isLeftClick,r=e.isRightClick,o=e.coords,i=e.selection,a=e.controller,s=i.isSelected()?i.getSelectedRange().current():null,l=i.isSelectedByCorner(),u=i.isSelectedByRowHeader();if(n&&s)o.row>=0&&o.col>=0&&!a.cell?i.setRangeEnd(o):(l||u)&&o.row>=0&&o.col>=0&&!a.cell?i.setRangeEnd(new Ht(o.row,o.col)):l&&o.row<0&&!a.column?i.setRangeEnd(new Ht(s.to.row,o.col)):u&&o.col<0&&!a.row?i.setRangeEnd(new Ht(o.row,s.to.col)):(!l&&!u&&o.col<0||l&&o.col<0)&&!a.row?i.selectRows(Math.max(s.from.row,0),o.row,o.col):(!l&&!u&&o.row<0||u&&o.row<0)&&!a.column&&i.selectColumns(Math.max(s.from.col,0),o.col,o.row);else{var c=!i.inInSelection(o),d=t||r&&c;o.row<0&&o.col>=0&&!a.column?d&&i.selectColumns(o.col,o.col,o.row):o.col<0&&o.row>=0&&!a.row?d&&i.selectRows(o.row,o.row,o.col):o.col>=0&&o.row>=0&&!a.cell?d&&i.setRangeStart(o):o.col<0&&o.row<0&&i.selectAll(!0,!0)}}var Ul=new Map([["mousedown",Fl],["mouseover",function(e){var n=e.isLeftClick,t=e.coords,r=e.selection,o=e.controller;if(n){var i=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),s=r.tableProps.countCols(),l=r.tableProps.countRows();a&&!o.column?r.setRangeEnd(new Ht(l-1,t.col)):i&&!o.row?r.setRangeEnd(new Ht(t.row,s-1)):o.cell||r.setRangeEnd(t)}}],["touchstart",Fl]]);function Ql(e,n){var t=n.coords,r=n.selection,o=n.controller;Ul.get(e.type)({coords:t,selection:r,controller:o,isShiftKey:e.shiftKey,isLeftClick:Gt(e)||"touchstart"===e.type,isRightClick:Kt(e)})}var Yl=new WeakMap,Wl=Symbol("rootInstance");function Vl(e){Yl.set(e,!0)}function zl(e){return e===Wl}function Kl(e){return Yl.has(e)}function Gl(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||Zl(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ql(e,n,t){return(ql=Jl()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&Xl(o,t.prototype),o}).apply(null,arguments)}function Jl(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Xl(e,n){return(Xl=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function $l(e){return function(e){if(Array.isArray(e))return eu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Zl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zl(e,n){if(e){if("string"==typeof e)return eu(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?eu(e,n):void 0}}function eu(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]&&arguments[0];this.instance.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this.wt.wtOverlays.adjustElementsSize(e)}},{key:"getCellAtCoords",value:function(e,n){var t=this.wt.getCell(e,n);return t<0?null:t}},{key:"scrollViewport",value:function(e,n,t,r,o){return this.wt.scrollViewport(e,n,t,r,o)}},{key:"scrollViewportHorizontally",value:function(e,n,t){return this.wt.scrollViewportHorizontally(e,n,t)}},{key:"scrollViewportVertically",value:function(e,n,t){return this.wt.scrollViewportVertically(e,n,t)}},{key:"createElements",value:function(){var e=tu.get(this),n=this.instance,t=n.rootElement,r=n.rootDocument,o=t.getAttribute("style");o&&t.setAttribute("data-originalstyle",o),Fn(t,"handsontable"),e.table=r.createElement("TABLE"),Fn(e.table,"htCore"),this.instance.getSettings().tableClassName&&Fn(e.table,this.instance.getSettings().tableClassName),this.THEAD=r.createElement("THEAD"),e.table.appendChild(this.THEAD),this.TBODY=r.createElement("TBODY"),e.table.appendChild(this.TBODY),this.instance.table=e.table,this.instance.container.insertBefore(e.table,this.instance.container.firstChild)}},{key:"registerEvents",value:function(){var e=this,n=tu.get(this),t=this.instance,r=t.rootElement,o=t.rootDocument,i=t.selection,a=o.documentElement;this.eventManager.addEventListener(r,"mousedown",(function(t){if(n.selectionMouseDown=!0,!e.isTextSelectionAllowed(t.target)){var r=e.instance.rootWindow;At(r),t.preventDefault(),r.focus()}})),this.eventManager.addEventListener(r,"mouseup",(function(){n.selectionMouseDown=!1})),this.eventManager.addEventListener(r,"mousemove",(function(t){n.selectionMouseDown&&!e.isTextSelectionAllowed(t.target)&&(e.settings.fragmentSelection&&At(e.instance.rootWindow),t.preventDefault())})),this.eventManager.addEventListener(a,"keyup",(function(e){i.isInProgress()&&!e.shiftKey&&i.finish()})),this.eventManager.addEventListener(a,"mouseup",(function(t){i.isInProgress()&&Gt(t)&&i.finish(),n.mouseDown=!1,!Et(o.activeElement)&&(i.isSelected()||i.isSelectedByAnyHeader()||r.contains(t.target)||Kt(t))||e.instance.unlisten()})),this.eventManager.addEventListener(a,"contextmenu",(function(e){i.isInProgress()&&Kt(e)&&(i.finish(),n.mouseDown=!1)})),this.eventManager.addEventListener(a,"touchend",(function(){i.isInProgress()&&i.finish(),n.mouseDown=!1})),this.eventManager.addEventListener(a,"mousedown",(function(t){var i=t.target,s=t.x||t.clientX,l=t.y||t.clientY,u=t.target;if(!n.mouseDown&&r&&e.instance.view){var c=e.instance.view.wt.wtTable.holder;if(u===c){var d=gt(o);if(o.elementFromPoint(s+d,l)!==c||o.elementFromPoint(s,l+d)!==c)return}else for(;u!==a;){if(null===u){if(t.isTargetWebComponent)break;return}if(u===r)return;u=u.parentNode}("function"==typeof e.settings.outsideClickDeselects?e.settings.outsideClickDeselects(i):e.settings.outsideClickDeselects)?e.instance.deselectCell():e.instance.destroyEditor(!1,!1)}})),this.eventManager.addEventListener(n.table,"selectstart",(function(n){e.settings.fragmentSelection||Ct(n.target)||n.preventDefault()}))}},{key:"translateFromRenderableToVisualCoords",value:function(e){var n=e.row,t=e.col;return ql(Ht,$l(this.translateFromRenderableToVisualIndex(n,t)))}},{key:"translateFromRenderableToVisualIndex",value:function(e,n){var t=e>=0?this.instance.rowIndexMapper.getVisualFromRenderableIndex(e):e,r=n>=0?this.instance.columnIndexMapper.getVisualFromRenderableIndex(n):n;return null===t&&(t=e),null===r&&(r=n),[t,r]}},{key:"countRenderableIndexes",value:function(e,n){var t=Math.min(e.getNotTrimmedIndexesLength(),n),r=e.getFirstNotHiddenIndex(t-1,-1);return null===r?0:e.getRenderableFromVisualIndex(r)+1}},{key:"countRenderableColumns",value:function(){return this.countRenderableIndexes(this.instance.columnIndexMapper,this.settings.maxCols)}},{key:"countRenderableRows",value:function(){return this.countRenderableIndexes(this.instance.rowIndexMapper,this.settings.maxRows)}},{key:"countNotHiddenRowIndexes",value:function(e,n){return this.countNotHiddenIndexes(e,n,this.instance.rowIndexMapper,this.countRenderableRows())}},{key:"countNotHiddenColumnIndexes",value:function(e,n){return this.countNotHiddenIndexes(e,n,this.instance.columnIndexMapper,this.countRenderableColumns())}},{key:"countNotHiddenIndexes",value:function(e,n,t,r){if(isNaN(e)||e<0)return 0;var o=t.getFirstNotHiddenIndex(e,n),i=t.getRenderableFromVisualIndex(o);if(!Number.isInteger(i))return 0;var a=0;return n<0?a=i+1:n>0&&(a=r-i),a}},{key:"initializeWalkontable",value:function(){var e=this,n=tu.get(this),t={externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:n.table,isDataViewInstance:function(){return Kl(e.instance)},preventOverflow:function(){return e.settings.preventOverflow},preventWheel:function(){return e.settings.preventWheel},stretchH:function(){return e.settings.stretchH},data:function(n,t){var r;return(r=e.instance).getDataAtCell.apply(r,$l(e.translateFromRenderableToVisualIndex(n,t)))},totalRows:function(){return e.countRenderableRows()},totalColumns:function(){return e.countRenderableColumns()},fixedColumnsLeft:function(){var n=e.instance.countCols(),t=Math.min(parseInt(e.settings.fixedColumnsLeft,10),n)-1;return e.countNotHiddenColumnIndexes(t,-1)},fixedRowsTop:function(){var n=e.instance.countRows(),t=Math.min(parseInt(e.settings.fixedRowsTop,10),n)-1;return e.countNotHiddenRowIndexes(t,-1)},fixedRowsBottom:function(){var n=e.instance.countRows(),t=Math.max(n-parseInt(e.settings.fixedRowsBottom,10),0);return e.countNotHiddenRowIndexes(t,1)},shouldRenderLeftOverlay:function(){return e.settings.fixedColumnsLeft>0||t.rowHeaders().length>0},shouldRenderTopOverlay:function(){return e.settings.fixedRowsTop>0||t.columnHeaders().length>0},shouldRenderBottomOverlay:function(){return e.settings.fixedRowsBottom>0},minSpareRows:function(){return e.settings.minSpareRows},renderAllRows:this.settings.renderAllRows,rowHeaders:function(){var n=[];return e.instance.hasRowHeaders()&&n.push((function(n,t){var r=n>=0?e.instance.rowIndexMapper.getVisualFromRenderableIndex(n):n;e.appendRowHeader(r,t)})),e.instance.runHooks("afterGetRowHeaderRenderers",n),n},columnHeaders:function(){var n=[];return e.instance.hasColHeaders()&&n.push((function(n,t){var r=n>=0?e.instance.columnIndexMapper.getVisualFromRenderableIndex(n):n;e.appendColHeader(r,t)})),e.instance.runHooks("afterGetColumnHeaderRenderers",n),n},columnWidth:function(n){var t=e.instance.columnIndexMapper.getVisualFromRenderableIndex(n);return e.instance.getColWidth(null===t?n:t)},rowHeight:function(n){var t=e.instance.rowIndexMapper.getVisualFromRenderableIndex(n);return e.instance.getRowHeight(null===t?n:t)},cellRenderer:function(n,t,r){var o=Gl(e.translateFromRenderableToVisualIndex(n,t),2),i=o[0],a=o[1],s=e.instance.runHooks("modifyGetCellCoords",i,a),l=i,u=a;if(Array.isArray(s)){var c=Gl(s,2);l=c[0],u=c[1]}var d=e.instance.getCellMeta(l,u),f=e.instance.colToProp(u),h=e.instance.getDataAtRowProp(l,f);e.instance.hasHook("beforeValueRender")&&(h=e.instance.runHooks("beforeValueRender",h,d)),e.instance.runHooks("beforeRenderer",r,i,a,f,h,d),e.instance.getCellRenderer(d)(e.instance,r,i,a,f,h,d),e.instance.runHooks("afterRenderer",r,i,a,f,h,d)},selections:this.instance.selection.highlight,hideBorderOnMouseDownOver:function(){return e.settings.fragmentSelection},onWindowResize:function(){e.instance&&!e.instance.isDestroyed&&e.instance.refreshDimensions()},onCellMouseDown:function(t,r,o,i){var a=e.translateFromRenderableToVisualCoords(r),s={row:!1,column:!1,cell:!1};e.instance.listen(),e.activeWt=i,n.mouseDown=!0,e.instance.runHooks("beforeOnCellMouseDown",t,a,o,s),zt(t)||(Ql(t,{coords:a,selection:e.instance.selection,controller:s}),e.instance.runHooks("afterOnCellMouseDown",t,a,o),e.activeWt=e.wt)},onCellContextMenu:function(t,r,o,i){var a=e.translateFromRenderableToVisualCoords(r);e.activeWt=i,n.mouseDown=!1,e.instance.selection.isInProgress()&&e.instance.selection.finish(),e.instance.runHooks("beforeOnCellContextMenu",t,a,o),zt(t)||(e.instance.runHooks("afterOnCellContextMenu",t,a,o),e.activeWt=e.wt)},onCellMouseOut:function(n,t,r,o){var i=e.translateFromRenderableToVisualCoords(t);e.activeWt=o,e.instance.runHooks("beforeOnCellMouseOut",n,i,r),zt(n)||(e.instance.runHooks("afterOnCellMouseOut",n,i,r),e.activeWt=e.wt)},onCellMouseOver:function(t,r,o,i){var a=e.translateFromRenderableToVisualCoords(r),s={row:!1,column:!1,cell:!1};e.activeWt=i,e.instance.runHooks("beforeOnCellMouseOver",t,a,o,s),zt(t)||(n.mouseDown&&Ql(t,{coords:a,selection:e.instance.selection,controller:s}),e.instance.runHooks("afterOnCellMouseOver",t,a,o),e.activeWt=e.wt)},onCellMouseUp:function(n,t,r,o){var i=e.translateFromRenderableToVisualCoords(t);e.activeWt=o,e.instance.runHooks("beforeOnCellMouseUp",n,i,r),zt(n)||e.instance.isDestroyed||(e.instance.runHooks("afterOnCellMouseUp",n,i,r),e.activeWt=e.wt)},onCellCornerMouseDown:function(n){n.preventDefault(),e.instance.runHooks("afterOnCellCornerMouseDown",n)},onCellCornerDblClick:function(n){n.preventDefault(),e.instance.runHooks("afterOnCellCornerDblClick",n)},beforeDraw:function(n,t){return e.beforeRender(n,t)},onDraw:function(n){return e.afterRender(n)},onScrollVertically:function(){return e.instance.runHooks("afterScrollVertically")},onScrollHorizontally:function(){return e.instance.runHooks("afterScrollHorizontally")},onBeforeRemoveCellClassNames:function(){return e.instance.runHooks("beforeRemoveCellClassNames")},onBeforeHighlightingRowHeader:function(n,t,r){var o=e.instance.rowIndexMapper,i=o.getVisualFromRenderableIndex(n),a=e.instance.runHooks("beforeHighlightingRowHeader",i,t,r);return o.getRenderableFromVisualIndex(o.getFirstNotHiddenIndex(a,1))},onBeforeHighlightingColumnHeader:function(n,t,r){var o=e.instance.columnIndexMapper,i=o.getVisualFromRenderableIndex(n),a=e.instance.runHooks("beforeHighlightingColumnHeader",i,t,r);return o.getRenderableFromVisualIndex(o.getFirstNotHiddenIndex(a,1))},onAfterDrawSelection:function(n,t,r){var o,i=Gl(e.translateFromRenderableToVisualIndex(n,t),2),a=i[0],s=i[1],l=e.instance.selection.getSelectedRange(),u=l.size();if(u>0){var c=(null!=r?r:0)+1-u,d=l.peekByIndex(c);o=[d.from.row,d.from.col,d.to.row,d.to.col]}return e.instance.runHooks("afterDrawSelection",a,s,o,r)},onBeforeDrawBorders:function(n,t){var r=Gl(n,4),o=r[0],i=r[1],a=r[2],s=r[3],l=[e.instance.rowIndexMapper.getVisualFromRenderableIndex(o),e.instance.columnIndexMapper.getVisualFromRenderableIndex(i),e.instance.rowIndexMapper.getVisualFromRenderableIndex(a),e.instance.columnIndexMapper.getVisualFromRenderableIndex(s)];return e.instance.runHooks("beforeDrawBorders",l,t)},onBeforeTouchScroll:function(){return e.instance.runHooks("beforeTouchScroll")},onAfterMomentumScroll:function(){return e.instance.runHooks("afterMomentumScroll")},onBeforeStretchingColumnWidth:function(n,t){var r=e.instance.columnIndexMapper.getVisualFromRenderableIndex(t);return e.instance.runHooks("beforeStretchingColumnWidth",n,r)},onModifyRowHeaderWidth:function(n){return e.instance.runHooks("modifyRowHeaderWidth",n)},onModifyGetCellCoords:function(n,t,r){var o=e.instance.rowIndexMapper,i=e.instance.columnIndexMapper,a=t>=0?i.getVisualFromRenderableIndex(t):t,s=n>=0?o.getVisualFromRenderableIndex(n):n,l=e.instance.runHooks("modifyGetCellCoords",s,a,r);if(Array.isArray(l)){var u=Gl(l,4),c=u[0],d=u[1],f=u[2],h=u[3];return[c>=0?o.getRenderableFromVisualIndex(o.getFirstNotHiddenIndex(c,1)):c,d>=0?i.getRenderableFromVisualIndex(i.getFirstNotHiddenIndex(d,1)):d,f>=0?o.getRenderableFromVisualIndex(o.getFirstNotHiddenIndex(f,-1)):f,h>=0?i.getRenderableFromVisualIndex(i.getFirstNotHiddenIndex(h,-1)):h]}},viewportRowCalculatorOverride:function(n){var t=e.settings.viewportRowRenderingOffset;if("auto"===t&&e.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){var r=e.countRenderableRows(),o=n.startRow,i=n.endRow;if("number"==typeof t)n.startRow=Math.max(o-t,0),n.endRow=Math.min(i+t,r-1);else if("auto"===t){var a=Math.ceil(i/r*12);n.startRow=Math.max(o-a,0),n.endRow=Math.min(i+a,r-1)}}e.instance.runHooks("afterViewportRowCalculatorOverride",n)},viewportColumnCalculatorOverride:function(n){var t=e.settings.viewportColumnRenderingOffset;if("auto"===t&&e.settings.fixedColumnsLeft&&(t=10),t>0||"auto"===t){var r=e.countRenderableColumns(),o=n.startColumn,i=n.endColumn;if("number"==typeof t&&(n.startColumn=Math.max(o-t,0),n.endColumn=Math.min(i+t,r-1)),"auto"===t){var a=Math.ceil(i/r*6);n.startColumn=Math.max(o-a,0),n.endColumn=Math.min(i+a,r-1)}}e.instance.runHooks("afterViewportColumnCalculatorOverride",n)},rowHeaderWidth:function(){return e.settings.rowHeaderWidth},columnHeaderHeight:function(){var n=e.instance.runHooks("modifyColumnHeaderHeight");return e.settings.columnHeaderHeight||n}};this.instance.runHooks("beforeInitWalkontable",t),this.wt=new Nl(t),this.activeWt=this.wt;var r=this.wt.wtTable.spreader,o=this.instance.rootElement.getBoundingClientRect(),i=o.width,a=o.height;this.setLastSize(i,a),this.eventManager.addEventListener(r,"mousedown",(function(e){e.target===r&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(r,"contextmenu",(function(e){e.target===r&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"click",(function(){e.settings.observeDOMVisibility&&e.wt.drawInterrupted&&(e.instance.forceFullRender=!0,e.render())}))}},{key:"isTextSelectionAllowed",value:function(e){if(Ct(e))return!0;var n=On(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!n)||!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!n)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell())}},{key:"isMouseDown",value:function(){return tu.get(this).mouseDown}},{key:"isSelectedOnlyCell",value:function(){var e,n;return null!==(e=null===(n=this.instance.getSelectedRangeLast())||void 0===n?void 0:n.isSingle())&&void 0!==e&&e}},{key:"isCellEdited",value:function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()}},{key:"beforeRender",value:function(e,n){e&&this.instance.runHooks("beforeViewRender",this.instance.forceFullRender,n)}},{key:"afterRender",value:function(e){e&&this.instance.runHooks("afterViewRender",this.instance.forceFullRender)}},{key:"appendRowHeader",value:function(e,n){if(n.firstChild){var t=n.firstChild;if(!Nn(t,"relative"))return Yn(n),void this.appendRowHeader(e,n);this.updateCellHeader(t.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{var r=this.instance,o=r.rootDocument,i=r.getRowHeader,a=o.createElement("div"),s=o.createElement("span");a.className="relative",s.className="rowHeader",this.updateCellHeader(s,e,i),a.appendChild(s),n.appendChild(a)}this.instance.runHooks("afterGetRowHeader",e,n)}},{key:"appendColHeader",value:function(e,n){if(n.firstChild){var t=n.firstChild;Nn(t,"relative")?this.updateCellHeader(t.querySelector(".colHeader"),e,this.instance.getColHeader):(Yn(n),this.appendColHeader(e,n))}else{var r=this.instance.rootDocument,o=r.createElement("div"),i=r.createElement("span");o.className="relative",i.className="colHeader",this.updateCellHeader(i,e,this.instance.getColHeader),o.appendChild(i),n.appendChild(o)}this.instance.runHooks("afterGetColHeader",e,n)}},{key:"updateCellHeader",value:function(e,n,t){var r=n,o=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&(Nn(e,"colHeader")?r=o.wtTable.columnFilter.sourceToRendered(n):Nn(e,"rowHeader")&&(r=o.wtTable.rowFilter.sourceToRendered(n))),r>-1?zn(e,t(n)):(Kn(e,String.fromCharCode(160)),Fn(e,"cornerHeader"))}},{key:"maximumVisibleElementWidth",value:function(e){var n=this.wt.wtViewport.getWorkspaceWidth()-e;return n>0?n:0}},{key:"maximumVisibleElementHeight",value:function(e){var n=this.wt.wtViewport.getWorkspaceHeight()-e;return n>0?n:0}},{key:"setLastSize",value:function(e,n){var t=tu.get(this),r=[e,n];t.lastWidth=r[0],t.lastHeight=r[1]}},{key:"getLastSize",value:function(){var e=tu.get(this);return{width:e.lastWidth,height:e.lastHeight}}},{key:"mainViewIsActive",value:function(){return this.wt===this.activeWt}},{key:"destroy",value:function(){this.wt.destroy(),this.eventManager.destroy()}}])&&nu(n.prototype,t),r&&nu(n,r),e}(),ou=dr("cellTypes"),iu=ou.register,au=ou.getItem,su=ou.hasItem,lu=ou.getNames;ou.getValues;function uu(e){if(!su(e))throw Error('You declared cell type "'.concat(e,'" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method'));return au(e)}function cu(e,n){"string"!=typeof e&&(e=(n=e).CELL_TYPE);var t=n,r=t.editor,o=t.renderer,i=t.validator;r&&wr(e,r),o&&Yo(e,o),i&&Jo(e,i),iu(e,n)}function du(e){return(du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fu="ABCDEFGHIJKLMNOPQRSTUVWXYZ".length;function hu(e){for(var n,t=e+1,r="";t>0;)n=(t-1)%fu,r=String.fromCharCode(65+n)+r,t=parseInt((t-n)/fu,10);return r}function Au(e){var n=0;if(e)for(var t=0,r=e.length-1;t0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,o=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:0,t=e,r=[];return Array.isArray(e)&&Array.isArray(e[0])||(t=[e]),t.forEach((function(e,t){Array.isArray(e)?e.forEach((function(e,o){r.push([t+n,o,e])})):Object.keys(e).forEach((function(o){r.push([t+n,o,e[o]])}))})),r}function wu(e){var n=0;return Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?n=e[0].length:e[0]&&he(e[0])&&(n=ye(e[0]))),n}function _u(e){return!!(Array.isArray(e)&&e.length&&e.every((function(e){return Array.isArray(e)})))}function Cu(e){return!!(Array.isArray(e)&&e.length&&e.every((function(e){return"object"===du(e)&&!Array.isArray(e)&&null!==e})))}function Eu(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ku(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:[];Eu(this,e),this.hot=n,this.data=t,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}var n,t,r;return n=e,(t=[{key:"modifyRowData",value:function(e){var n;return this.hot.hasHook("modifyRowData")&&(n=this.hot.runHooks("modifyRowData",e)),void 0===n||Number.isInteger(n)?this.data[e]:n}},{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}},{key:"setData",value:function(e){this.data=e}},{key:"getAtColumn",value:function(e){var n=this,t=[];return z(this.data,(function(r,o){var i=n.getAtCell(o,e);t.push(i)})),t}},{key:"getAtRow",value:function(e,n,t){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=void 0===n&&void 0===t,a=null,s=null;if(a=this.modifyRowData(e),Array.isArray(a))s=[],i?a.forEach((function(n,t){s[t]=r.getAtPhysicalCell(e,t,a)})):io(n,t,(function(t){s[t-n]=r.getAtPhysicalCell(e,t,a)}));else if(he(a)||xt(a))if(s=o?[]:{},!i||o){var l=0,u=this.countFirstRowKeys()-1;io(l,u,(function(i){var c=r.colToProp(i);if(i>=(n||l)&&i<=(t||u)&&!Number.isInteger(c)){var d=r.getAtPhysicalCell(e,c,a);o?s.push(d):ge(s,c,d)}}))}else me(a,(function(n,t){ge(s,t,r.getAtPhysicalCell(e,t,a))}));return s}},{key:"setAtCell",value:function(e,n,t){if(!(e>=this.countRows()||n>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){var r=ve(t);this.hot.runHooks("modifySourceData",e,this.propToCol(n),r,"set"),r.isTouched()&&(t=r.value)}Number.isInteger(n)?this.data[e][n]=t:ge(this.data[e],n,t)}}},{key:"getAtPhysicalCell",value:function(e,n,t){var r=null;if(t&&(r="string"==typeof n?pe(t,n):"function"==typeof n?n(t):t[n]),this.hot.hasHook("modifySourceData")){var o=ve(r);this.hot.runHooks("modifySourceData",e,this.colToProp(n),o,"get"),o.isTouched()&&(r=o.value)}return r}},{key:"getAtCell",value:function(e,n){var t=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(n),t)}},{key:"getByRange",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,i=null,a=null,s=null,l=null;null===n||null===t?(o=!0,i=0,s=this.countRows()-1):(i=Math.min(n.row,t.row),a=Math.min(n.col,t.col),s=Math.max(n.row,t.row),l=Math.max(n.col,t.col));var u=[];return io(i,s,(function(n){u.push(o?e.getAtRow(n,void 0,void 0,r):e.getAtRow(n,a,l,r))})),u}},{key:"countRows",value:function(){if(this.hot.hasHook("modifySourceLength")){var e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}},{key:"countFirstRowKeys",value:function(){return wu(this.data)}},{key:"destroy",value:function(){this.data=null,this.hot=null}}])&&ku(n.prototype,t),r&&ku(n,r),e}(),xu=(t("./node_modules/core-js/modules/es.array.fill.js"),t("./node_modules/core-js/modules/es.reflect.get.js"),t("./node_modules/core-js/modules/es.object.get-own-property-descriptor.js"),{_localHooks:Object.create(null),addLocalHook:function(e,n){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(n),this},runLocalHooks:function(e,n,t,r,o,i,a){if(this._localHooks[e])for(var s=this._localHooks[e].length,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;ju(this,e),this.indexedValues=[],this.initValueOrFn=n}var n,t,r;return n=e,(t=[{key:"getValues",value:function(){return this.indexedValues}},{key:"getValueAtIndex",value:function(e){var n=this.indexedValues;if(e0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,xt(this.initValueOrFn)?io(n-1,(function(n){return e.indexedValues.push(e.initValueOrFn(n))})):io(n-1,(function(){return e.indexedValues.push(e.initValueOrFn)})),this.runLocalHooks("change")}},{key:"init",value:function(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}},{key:"insert",value:function(){this.runLocalHooks("change")}},{key:"remove",value:function(){this.runLocalHooks("change")}},{key:"destroy",value:function(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}])&&Bu(n.prototype,t),r&&Bu(n,r),e}();function Lu(e){return function(e){if(Array.isArray(e))return Ou(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return Ou(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ou(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ou(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=t?e+r:e}))}function Pu(e){return(Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nu(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]&&arguments[0];return ac(this,i),o.call(this,e)}return n=i,(t=[{key:"getHiddenIndexes",value:function(){return Y(this.getValues(),(function(e,n,t){return n&&e.push(t),e}),[])}}])&&sc(n.prototype,t),r&&sc(n,r),i}(oc);function hc(e){return(hc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ac(e){return function(e){if(Array.isArray(e))return mc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return mc(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return mc(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mc(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,yc(Cc(i.prototype),"setDefaultValues",this).call(this,e)}},{key:"insert",value:function(e,n){this.indexedValues=Gu(this.indexedValues,0,n,this.initValueOrFn),this.orderOfIndexes=Hu(this.orderOfIndexes,n),yc(Cc(i.prototype),"insert",this).call(this,e,n)}},{key:"remove",value:function(e){this.indexedValues=qu(this.indexedValues,e),this.orderOfIndexes=Du(this.orderOfIndexes,e),this.orderOfIndexes=Iu(this.orderOfIndexes,e),yc(Cc(i.prototype),"remove",this).call(this,e)}},{key:"getEntries",value:function(){var e=this;return this.orderOfIndexes.map((function(n){return[n,e.getValueAtIndex(n)]}))}}])&&gc(n.prototype,t),r&&gc(n,r),i}(Tu);function Sc(e){return(Sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xc(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Mc(e,n){for(var t=0;t0&&void 0!==arguments[0]&&arguments[0];return xc(this,i),o.call(this,e)}return n=i,(t=[{key:"getTrimmedIndexes",value:function(){return Y(this.getValues(),(function(e,n,t){return n&&e.push(t),e}),[])}}])&&Mc(n.prototype,t),r&&Mc(n,r),i}(oc),Rc=new Map([["hiding",fc],["index",Tu],["linkedPhysicalIndexToValue",kc],["physicalIndexToValue",oc],["trimming",Oc]]);function Dc(e,n){for(var t=0;t0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.mergedValuesCache;if(0===this.getLength())return[];for(var n=V(this.get(),(function(e){return e.getValues()})),t=[],r=en(n[0])&&n[0].length||0,o=0;o0&&this.runLocalHooks("change",e),this}},{key:"_writeInitialChanges",value:function(e){Kc(this,qc,e)}}])&&Vc(n.prototype,t),r&&Vc(n,r),e}();function Xc(e,n){for(var t=[],r=0,o=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=n.initialIndexValue;$c(this,e),ed(this,od,{writable:!0,value:new Set}),ed(this,id,{writable:!0,value:[]}),ed(this,ad,{writable:!0,value:[]}),ed(this,sd,{writable:!0,value:!1}),ed(this,ld,{writable:!0,value:!1}),td(this,ld,null!=t&&t)}var n,t,r;return n=e,(t=[{key:"createObserver",value:function(){var e=this,n=new Jc;return nd(this,od).add(n),n.addLocalHook("unsubscribe",(function(){nd(e,od).delete(n)})),n._writeInitialChanges(Xc(nd(this,id),nd(this,ad))),n}},{key:"emit",value:function(e){var n=nd(this,ad);nd(this,sd)&&nd(this,id).length===e.length||(0===e.length?e=new Array(n.length).fill(nd(this,ld)):td(this,id,new Array(e.length).fill(nd(this,ld))),nd(this,sd)||(td(this,sd,!0),n=nd(this,id)));var t=Xc(n,e);nd(this,od).forEach((function(e){return e._write(t)})),td(this,ad,e)}}])&&Zc(n.prototype,t),r&&Zc(n,r),e}();function cd(e){return function(e){if(Array.isArray(e))return dd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return dd(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return dd(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dd(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:null;if(!Rc.has(e))throw new Error('The provided map type ("'.concat(e,'") does not exist.'));return new(Rc.get(e))(n)}(n,t))}},{key:"registerMap",value:function(e,n){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error('Map with name "'.concat(e,'" has been already registered.'));n instanceof Oc?this.trimmingMapsCollection.register(e,n):n instanceof fc?this.hidingMapsCollection.register(e,n):this.variousMapsCollection.register(e,n);var t=this.getNumberOfIndexes();return t>0&&n.init(t),n}},{key:"unregisterMap",value:function(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}},{key:"unregisterAll",value:function(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}},{key:"getPhysicalFromVisualIndex",value:function(e){var n=this.notTrimmedIndexesCache[e];return en(n)?n:null}},{key:"getPhysicalFromRenderableIndex",value:function(e){var n=this.renderablePhysicalIndexesCache[e];return en(n)?n:null}},{key:"getVisualFromPhysicalIndex",value:function(e){var n=this.fromPhysicalToVisualIndexesCache.get(e);return en(n)?n:null}},{key:"getVisualFromRenderableIndex",value:function(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}},{key:"getRenderableFromVisualIndex",value:function(e){var n=this.fromVisualToRenderableIndexesCache.get(e);return en(n)?n:null}},{key:"getFirstNotHiddenIndex",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e-n,o=this.getPhysicalFromVisualIndex(e);return null===o?!0===t&&r!==e-n?this.getFirstNotHiddenIndex(r,-n,!1,r):null:!1===this.isHidden(o)?e:this.getFirstNotHiddenIndex(e+n,n,t,r)}},{key:"initToLength",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=cd(new Array(e).keys()),this.notHiddenIndexesCache=cd(new Array(e).keys()),this.suspendOperations(),this.indexesSequence.init(e),this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}},{key:"getIndexesSequence",value:function(){return this.indexesSequence.getValues()}},{key:"setIndexesSequence",value:function(e){this.indexesSequence.setValues(e)}},{key:"getNotTrimmedIndexes",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===n)return this.notTrimmedIndexesCache;var t=this.getIndexesSequence();return t.filter((function(n){return!1===e.isTrimmed(n)}))}},{key:"getNotTrimmedIndexesLength",value:function(){return this.getNotTrimmedIndexes().length}},{key:"getNotHiddenIndexes",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===n)return this.notHiddenIndexesCache;var t=this.getIndexesSequence();return t.filter((function(n){return!1===e.isHidden(n)}))}},{key:"getNotHiddenIndexesLength",value:function(){return this.getNotHiddenIndexes().length}},{key:"getRenderableIndexes",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===n)return this.renderablePhysicalIndexesCache;var t=this.getNotTrimmedIndexes();return t.filter((function(n){return!1===e.isHidden(n)}))}},{key:"getRenderableIndexesLength",value:function(){return this.getRenderableIndexes().length}},{key:"getNumberOfIndexes",value:function(){return this.getIndexesSequence().length}},{key:"moveIndexes",value:function(e,n){var t=this;"number"==typeof e&&(e=[e]);var r=V(e,(function(e){return t.getPhysicalFromVisualIndex(e)})),o=this.getNotTrimmedIndexesLength(),i=e.length,a=Du(this.getIndexesSequence(),r),s=o-i;if(n+i0&&void 0!==arguments[0]&&arguments[0],n=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===n)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderabIendexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}},{key:"cacheFromPhysicalToVisualIndexes",value:function(){var e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(var n=0;n0&&(ah-=1),0===ah&&(oh.clearEvents(),ih.clear(),ah=0)}function uh(){return Array.from(ih.values()).some((function(e){return Yt(e)}))}t("./node_modules/core-js/modules/es.object.get-own-property-descriptors.js");function ch(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function dh(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;ch(this,e),this.highlight=n.clone().normalize(),this.from=t.clone(),this.to=r.clone()}var n,t,r;return n=e,(t=[{key:"setHighlight",value:function(e){return this.highlight=e.clone().normalize(),this}},{key:"setFrom",value:function(e){return this.from=e.clone(),this}},{key:"setTo",value:function(e){return this.to=e.clone(),this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}},{key:"getOuterHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getOuterWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"getHeight",value:function(){var e=Math.max(this.from.row,0),n=Math.max(this.to.row,0);return Math.max(e,n)-Math.min(e,n)+1}},{key:"getWidth",value:function(){var e=Math.max(this.from.col,0),n=Math.max(this.to.col,0);return Math.max(e,n)-Math.min(e,n)+1}},{key:"includes",value:function(e){var n=e.row,t=e.col,r=this.getOuterTopLeftCorner(),o=this.getOuterBottomRightCorner();return r.row<=n&&o.row>=n&&r.col<=t&&o.col>=t}},{key:"includesRange",value:function(e){return this.includes(e.getOuterTopLeftCorner())&&this.includes(e.getOuterBottomRightCorner())}},{key:"isEqual",value:function(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}},{key:"overlaps",value:function(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getOuterTopRightCorner().col>=e.getOuterTopLeftCorner().col&&this.getOuterTopRightCorner().col<=e.getOuterTopRightCorner().col||this.getOuterTopLeftCorner().col<=e.getOuterTopRightCorner().col&&this.getOuterTopLeftCorner().col>=e.getOuterTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getOuterBottomRightCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomRightCorner().row<=e.getOuterBottomRightCorner().row||this.getOuterTopRightCorner().row<=e.getOuterBottomRightCorner().row&&this.getOuterTopRightCorner().row>=e.getOuterTopRightCorner().row}},{key:"expand",value:function(e){var n=this.getOuterTopLeftCorner(),t=this.getOuterBottomRightCorner();return(e.rowt.row||e.col>t.col)&&(this.from=new Ht(Math.min(n.row,e.row),Math.min(n.col,e.col)),this.to=new Ht(Math.max(t.row,e.row),Math.max(t.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var n=this.getOuterTopLeftCorner(),t=this.getOuterBottomRightCorner(),r=this.getDirection(),o=e.getOuterTopLeftCorner(),i=e.getOuterBottomRightCorner(),a=Math.min(n.row,o.row),s=Math.min(n.col,o.col),l=Math.max(t.row,i.row),u=Math.max(t.col,i.col),c=new Ht(a,s),d=new Ht(l,u);return this.from=c,this.to=d,this.setDirection(r),this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}},{key:"getDirection",value:function(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}},{key:"setDirection",value:function(e){switch(e){case"NW-SE":var n=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];this.from=n[0],this.to=n[1];break;case"NE-SW":var t=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];this.from=t[0],this.to=t[1];break;case"SE-NW":var r=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];this.from=r[0],this.to=r[1];break;case"SW-NE":var o=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()];this.from=o[0],this.to=o[1]}}},{key:"getVerticalDirection",value:function(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}},{key:"getHorizontalDirection",value:function(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}},{key:"flipDirectionVertically",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}},{key:"flipDirectionHorizontally",value:function(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}},{key:"getTopLeftCorner",value:function(){return new Ht(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}},{key:"getBottomRightCorner",value:function(){return new Ht(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}},{key:"getTopRightCorner",value:function(){return new Ht(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}},{key:"getBottomLeftCorner",value:function(){return new Ht(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}},{key:"getOuterTopLeftCorner",value:function(){return new Ht(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getOuterBottomRightCorner",value:function(){return new Ht(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getOuterTopRightCorner",value:function(){return new Ht(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getOuterBottomLeftCorner",value:function(){return new Ht(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,n){return!!(n&&n.includes(e)&&(this.getOuterTopLeftCorner().isEqual(new Ht(n.from.row,n.from.col))||this.getOuterTopRightCorner().isEqual(new Ht(n.from.row,n.to.col))||this.getOuterBottomLeftCorner().isEqual(new Ht(n.to.row,n.from.col))||this.getOuterBottomRightCorner().isEqual(new Ht(n.to.row,n.to.col))))||e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}},{key:"getOppositeCorner",value:function(e,n){if(!(e instanceof Ht))return!1;if(n&&n.includes(e)){if(this.getOuterTopLeftCorner().isEqual(new Ht(n.from.row,n.from.col)))return this.getOuterBottomRightCorner();if(this.getOuterTopRightCorner().isEqual(new Ht(n.from.row,n.to.col)))return this.getOuterBottomLeftCorner();if(this.getOuterBottomLeftCorner().isEqual(new Ht(n.to.row,n.from.col)))return this.getOuterTopRightCorner();if(this.getOuterBottomRightCorner().isEqual(new Ht(n.to.row,n.to.col)))return this.getOuterTopLeftCorner()}return e.isEqual(this.getOuterBottomRightCorner())?this.getOuterTopLeftCorner():e.isEqual(this.getOuterTopLeftCorner())?this.getOuterBottomRightCorner():e.isEqual(this.getOuterTopRightCorner())?this.getOuterBottomLeftCorner():e.isEqual(this.getOuterBottomLeftCorner())?this.getOuterTopRightCorner():void 0}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var n=Math.min(this.from.row,this.to.row),t=Math.max(this.from.row,this.to.row),r=Math.min(this.from.col,this.to.col),o=Math.max(this.from.col,this.to.col),i=Math.min(e.from.row,e.to.row),a=Math.max(e.from.row,e.to.row),s=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),u=[];return n===i&&u.push("top"),o===l&&u.push("right"),t===a&&u.push("bottom"),r===s&&u.push("left"),u}},{key:"getInner",value:function(){for(var e=this.getOuterTopLeftCorner(),n=this.getOuterBottomRightCorner(),t=[],r=e.row;r<=n.row;r++)for(var o=e.col;o<=n.col;o++)this.from.row===r&&this.from.col===o||this.to.row===r&&this.to.col===o||t.push(new Ht(r,o));return t}},{key:"getAll",value:function(){for(var e=this.getOuterTopLeftCorner(),n=this.getOuterBottomRightCorner(),t=[],r=e.row;r<=n.row;r++)for(var o=e.col;o<=n.col;o++)e.row===r&&e.col===o?t.push(e):n.row===r&&n.col===o?t.push(n):t.push(new Ht(r,o));return t}},{key:"forAll",value:function(e){for(var n=this.getOuterTopLeftCorner(),t=this.getOuterBottomRightCorner(),r=n.row;r<=t.row;r++)for(var o=n.col;o<=t.col;o++)if(!1===e(r,o))return}},{key:"clone",value:function(){return new e(this.highlight,this.from,this.to)}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}])&&dh(n.prototype,t),r&&dh(n,r),e}();t("./node_modules/core-js/modules/es.object.values.js");function hh(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Ah(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ah(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ah(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);tMath.ceil(o.top+o.height)||a.clientXMath.ceil(o.left+o.width))&&(t.eventManager.removeEventListener(r,"mousemove",e),n.style.display="block")}))}}},{key:"createBorders",value:function(e){var n=this.wot.rootDocument;this.main=n.createElement("div");var t=["top","left","bottom","right","corner"],r=this.main.style;r.position="absolute",r.top=0,r.left=0;for(var o=0;o<5;o++){var i=t[o],a=n.createElement("div");a.className="wtBorder ".concat(this.settings.className||""),this.settings[i]&&this.settings[i].hide&&(a.className+=" hidden"),(r=a.style).backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,r.height=this.settings[i]&&this.settings[i].width?"".concat(this.settings[i].width,"px"):"".concat(e.border.width,"px"),r.width=this.settings[i]&&this.settings[i].width?"".concat(this.settings[i].width,"px"):"".concat(e.border.width,"px"),this.main.appendChild(a)}this.top=this.main.childNodes[0],this.left=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.right=this.main.childNodes[3],this.topStyle=this.top.style,this.leftStyle=this.left.style,this.bottomStyle=this.bottom.style,this.rightStyle=this.right.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),Ie()&&this.createMultipleSelectorHandles(),this.disappear();var s=this.wot.wtTable,l=s.bordersHolder;l||((l=n.createElement("div")).className="htBorders",s.bordersHolder=l,s.spreader.appendChild(l)),l.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var e=this,n=this.wot.rootDocument;this.selectionHandles={topLeft:n.createElement("DIV"),topLeftHitArea:n.createElement("DIV"),bottomRight:n.createElement("DIV"),bottomRightHitArea:n.createElement("DIV")},this.selectionHandles.topLeft.className="topLeftSelectionHandle",this.selectionHandles.topLeftHitArea.className="topLeftSelectionHandle-HitArea",this.selectionHandles.bottomRight.className="bottomRightSelectionHandle",this.selectionHandles.bottomRightHitArea.className="bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={topLeft:this.selectionHandles.topLeft.style,topLeftHitArea:this.selectionHandles.topLeftHitArea.style,bottomRight:this.selectionHandles.bottomRight.style,bottomRightHitArea:this.selectionHandles.bottomRightHitArea.style},me({position:"absolute",height:"".concat(40,"px"),width:"".concat(40,"px"),"border-radius":"".concat(parseInt(40/1.5,10),"px")},(function(n,t){e.selectionHandles.styles.bottomRightHitArea[t]=n,e.selectionHandles.styles.topLeftHitArea[t]=n})),me({position:"absolute",height:"".concat(10,"px"),width:"".concat(10,"px"),"border-radius":"".concat(parseInt(10/1.5,10),"px"),background:"#F5F5FF",border:"1px solid #4285c8"},(function(n,t){e.selectionHandles.styles.bottomRight[t]=n,e.selectionHandles.styles.topLeft[t]=n})),this.main.appendChild(this.selectionHandles.topLeft),this.main.appendChild(this.selectionHandles.bottomRight),this.main.appendChild(this.selectionHandles.topLeftHitArea),this.main.appendChild(this.selectionHandles.bottomRightHitArea)}},{key:"isPartRange",value:function(e,n){var t=this.wot.selections.createOrGetArea();return!(!t.cellRange||e===t.cellRange.to.row&&n===t.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,n,t,r,o,i){var a=parseInt(this.selectionHandles.styles.topLeft.width,10),s=parseInt(this.selectionHandles.styles.topLeftHitArea.width,10);this.selectionHandles.styles.topLeft.top="".concat(parseInt(t-a,10),"px"),this.selectionHandles.styles.topLeft.left="".concat(parseInt(r-a,10),"px"),this.selectionHandles.styles.topLeftHitArea.top="".concat(parseInt(t-s/4*3,10),"px"),this.selectionHandles.styles.topLeftHitArea.left="".concat(parseInt(r-s/4*3,10),"px"),this.selectionHandles.styles.bottomRight.top="".concat(parseInt(t+i,10),"px"),this.selectionHandles.styles.bottomRight.left="".concat(parseInt(r+o,10),"px"),this.selectionHandles.styles.bottomRightHitArea.top="".concat(parseInt(t+i-s/4,10),"px"),this.selectionHandles.styles.bottomRightHitArea.left="".concat(parseInt(r+o-s/4,10),"px"),this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(this.selectionHandles.styles.topLeft.display="block",this.selectionHandles.styles.topLeftHitArea.display="block",this.isPartRange(e,n)?(this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"):(this.selectionHandles.styles.bottomRight.display="block",this.selectionHandles.styles.bottomRightHitArea.display="block")):(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none",this.selectionHandles.styles.topLeftHitArea.display="none",this.selectionHandles.styles.bottomRightHitArea.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||n===this.wot.wtSettings.getSetting("fixedColumnsLeft")?(this.selectionHandles.styles.topLeft.zIndex="9999",this.selectionHandles.styles.topLeftHitArea.zIndex="9999"):(this.selectionHandles.styles.topLeft.zIndex="",this.selectionHandles.styles.topLeftHitArea.zIndex="")}},{key:"appear",value:function(e){if(!this.disabled){for(var n,t,r,o,i,a,s=this.wot,l=s.wtTable,u=s.rootDocument,c=s.rootWindow,d=l.getRenderedRowsCount(),f=0;f=e[0]&&h<=e[2]){n=h,i=e[0];break}}for(var A=d-1;A>=0;A-=1){var m=l.rowFilter.renderedToSource(A);if(m>=e[0]&&m<=e[2]){t=m;break}}for(var p=l.getRenderedColumnsCount(),g=0;g=e[1]&&y<=e[3]){r=y,a=e[1];break}}for(var v=p-1;v>=0;v-=1){var b=l.columnFilter.renderedToSource(v);if(b>=e[1]&&b<=e[3]){o=b;break}}if(void 0!==n&&void 0!==r){var w=l.getCell(new Ht(n,r)),_=n!==t||r!==o,C=_?l.getCell(new Ht(t,o)):w,E=qn(w),k=_?qn(C):E,S=qn(l.TABLE),x=E.top,M=E.left,j=M-S.left-1,B=k.left+it(C)-M;if(this.isEntireColumnSelected(n,t)){var T=this.getDimensionsFromHeader("columns",r,o,i,S),L=null;if(T){var O=hh(T,3);L=O[0],j=O[1],B=O[2]}L&&(w=L)}var R=x-S.top-1,D=k.top+at(C)-x;if(this.isEntireRowSelected(r,o)){var I=this.getDimensionsFromHeader("rows",n,t,a,S),H=null;if(I){var P=hh(I,3);H=P[0],R=P[1],D=P[2]}H&&(w=H)}var N=ot(w,c);parseInt(N.borderTopWidth,10)>0&&(R+=1,D=D>0?D-1:0),parseInt(N.borderLeftWidth,10)>0&&(j+=1,B=B>0?B-1:0),this.topStyle.top="".concat(R,"px"),this.topStyle.left="".concat(j,"px"),this.topStyle.width="".concat(B,"px"),this.topStyle.display="block",this.leftStyle.top="".concat(R,"px"),this.leftStyle.left="".concat(j,"px"),this.leftStyle.height="".concat(D,"px"),this.leftStyle.display="block";var F=Math.floor(this.settings.border.width/2);this.bottomStyle.top="".concat(R+D-F,"px"),this.bottomStyle.left="".concat(j,"px"),this.bottomStyle.width="".concat(B,"px"),this.bottomStyle.display="block",this.rightStyle.top="".concat(R,"px"),this.rightStyle.left="".concat(j+B-F,"px"),this.rightStyle.height="".concat(D+1,"px"),this.rightStyle.display="block";var U=this.settings.border.cornerVisible;U="function"==typeof U?U(this.settings.layerLevel):U;var Q=this.wot.getSetting("onModifyGetCellCoords",t,o),Y=t,W=o;if(Q&&Array.isArray(Q)){var V=hh(Q,4);Y=V[2],W=V[3]}if(Ie()||!U||this.isPartRange(Y,W))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(R+D+this.cornerCenterPointOffset-1,"px"),this.cornerStyle.left="".concat(j+B+this.cornerCenterPointOffset-1,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var z=nt(l.TABLE),K=z===c;K&&(z=u.documentElement),o===this.wot.getSetting("totalColumns")-1&&(K?C.getBoundingClientRect().left:C.offsetLeft)+it(C)+parseInt(this.cornerDefaultStyle.width,10)/2>=lt(z)&&(this.cornerStyle.left="".concat(Math.floor(j+B+this.cornerCenterPointOffset-parseInt(this.cornerDefaultStyle.width,10)/2),"px"),this.cornerStyle.borderRightWidth=0),t===this.wot.getSetting("totalRows")-1&&(K?C.getBoundingClientRect().top:C.offsetTop)+at(C)+parseInt(this.cornerDefaultStyle.height,10)/2>=st(z)&&(this.cornerStyle.top="".concat(Math.floor(R+D+this.cornerCenterPointOffset-parseInt(this.cornerDefaultStyle.height,10)/2),"px"),this.cornerStyle.borderBottomWidth=0),this.cornerStyle.display="block"}Ie()&&this.updateMultipleSelectionHandlesPosition(t,o,R,j,B,D)}else this.disappear()}}},{key:"isEntireColumnSelected",value:function(e,n){return e===this.wot.wtTable.getFirstRenderedRow()&&n===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,n){return e===this.wot.wtTable.getFirstRenderedColumn()&&n===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,n,t,r,o){var i=this.wot.wtTable,a=i.wtRootElement.parentNode,s=null,l=null,u=null,c=null,d=null,f=null,h=null,A=null;switch(e){case"rows":s=function(){return i.getRowHeader.apply(i,arguments)},l=function(){return at.apply(void 0,arguments)},u="ht__selection--rows",f="top";break;case"columns":s=function(){return i.getColumnHeader.apply(i,arguments)},l=function(){return it.apply(void 0,arguments)},u="ht__selection--columns",f="left"}if(a.classList.contains(u)){var m=this.wot.getSetting("columnHeaders").length;if(h=s(n,m-r),A=s(t,m-r),!h||!A)return!1;var p=qn(h),g=qn(A);return h&&A&&(c=p[f]-o[f]-1,d=g[f]+l(A)-p[f]),[h,c,d]}return!1}},{key:"changeBorderStyle",value:function(e,n){var t=this[e].style,r=n[e];!r||r.hide?Fn(this[e],"hidden"):(Nn(this[e],"hidden")&&Un(this[e],"hidden"),t.backgroundColor=r.color,"top"!==e&&"bottom"!==e||(t.height="".concat(r.width,"px")),"right"!==e&&"left"!==e||(t.width="".concat(r.width,"px")))}},{key:"changeBorderToDefaultStyle",value:function(e){var n=1,t="#000",r=this[e].style;r.backgroundColor=t,r.width="".concat(n,"px"),r.height="".concat(n,"px")}},{key:"toggleHiddenClass",value:function(e,n){this.changeBorderToDefaultStyle(e),n?Fn(this[e],"hidden"):Un(this[e],"hidden")}},{key:"disappear",value:function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none",Ie()&&(this.selectionHandles.styles.topLeft.display="none",this.selectionHandles.styles.bottomRight.display="none")}},{key:"destroy",value:function(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}])&&mh(n.prototype,t),r&&mh(n,r),e}();function gh(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return yh(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return yh(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yh(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:t,o=this.findVisibleCoordsInRowsRange(e.row,n.row,t);if(null===o)return null;var i=this.findVisibleCoordsInColumnsRange(e.col,n.col,r);return null===i?null:new Ht(o,i)}},{key:"findVisibleCoordsInRowsRange",value:function(e,n,t){var r=this.settings.visualToRenderableCoords({row:e,col:-1}).row;return n===e&&null===r?null:null===r?this.findVisibleCoordsInRowsRange(e+t,n,t):e}},{key:"findVisibleCoordsInColumnsRange",value:function(e,n,t){var r=this.settings.visualToRenderableCoords({row:-1,col:e}).col;return n===e&&null===r?null:null===r?this.findVisibleCoordsInColumnsRange(e+t,n,t):e}},{key:"findVisibleHeaderRange",value:function(e,n,t,r){var o=this.findVisibleCoordsInRowsRange(e.row,n.row,t),i=this.findVisibleCoordsInRowsRange(n.row,e.row,-t),a=this.findVisibleCoordsInColumnsRange(e.col,n.col,r),s=this.findVisibleCoordsInColumnsRange(n.col,e.col,-r);return null===o&&null===i&&null===a&&null===s?null:[new Ht(o,a),new Ht(i,s)]}},{key:"commit",value:function(){if(null===this.visualCellRange)return this;var e=this.visualCellRange,n=e.from,t=e.to,r=this.getRowSearchDirection(this.visualCellRange),o=this.getColumnSearchDirection(this.visualCellRange),i=this.findVisibleCoordsInRange(n,t,r,o),a=this.findVisibleCoordsInRange(t,n,-r,-o);if(null===i||null===a){var s=null;if("header"===this.settings.type){var l=_h(this.findVisibleHeaderRange(n,t,r,o),2),u=l[0],c=l[1];s=this.createRenderableCellRange(u,c)}this.cellRange=s}else this.cellRange=this.createRenderableCellRange(i,a);return this}},{key:"adjustCoordinates",value:function(e){var n=this.getRowSearchDirection(e),t=this.getColumnSearchDirection(e),r=e.from.clone().normalize(),o=e.to.clone().normalize(),i=this.findVisibleCoordsInRange(r,o,n,t);if(null!==i){if(null===this.cellRange){var a=this.settings.visualToRenderableCoords(i);this.cellRange=new fh(a)}return e.setHighlight(i),this}return e.setHighlight(e.from),this}},{key:"getCorners",value:function(){var e=this.cellRange,n=e.from,t=e.to,r=null===n.row||null===t.row,o=null===n.col||null===t.col,i=new Ht(r?null:Math.min(n.row,t.row),o?null:Math.min(n.col,t.col)),a=new Ht(r?null:Math.max(n.row,t.row),o?null:Math.max(n.col,t.col));return[i.row,i.col,a.row,a.col]}},{key:"getVisualCorners",value:function(){var e=this.settings.renderableToVisualCoords(this.cellRange.getTopLeftCorner()),n=this.settings.renderableToVisualCoords(this.cellRange.getBottomRightCorner());return[e.row,e.col,n.row,n.col]}},{key:"createRenderableCellRange",value:function(e,n){var t=this.settings.visualToRenderableCoords(e),r=this.settings.visualToRenderableCoords(n);return new fh(t,t,r)}},{key:"getRowSearchDirection",value:function(e){return e.from.row4&&void 0!==arguments[4]&&arguments[4],i=e.wtTable.getCell(new Ht(n,t));if("object"===vh(i)){var a=r;o&&(a=this.classNameGenerator(i),this.classNames.includes(a)||this.classNames.push(a)),Fn(i,a)}return this}},{key:"linearClassNameGenerator",value:function(e,n){return function t(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===n||0===o)return e;var i=o>=0?o:n,a=e,s=0==(i-=1)?e:"".concat(e,"-").concat(i);if(Nn(r,s)){var l=i+1;a="".concat(e,"-").concat(l)}else a=t(r,i);return a}}},{key:"draw",value:function(e){if(this.isEmpty())this.settings.border&&this.getBorder(e).disappear();else{var n=e.wtTable.getRenderedRowsCount(),t=e.wtTable.getRenderedColumnsCount(),r=this.getCorners(),o=gh(r,4),i=o[0],a=o[1],s=o[2],l=o[3],u=this.settings,c=u.highlightHeaderClassName,d=u.highlightColumnClassName,f=u.highlightRowClassName,h=u.highlightOnlyClosestHeader,A=u.selectionType,m=void 0===A||["active-header","header"].includes(A);if(m&&null!==a&&null!==l)for(var p=0,g=0;g=a&&y<=l){var v=e.wtTable.getColumnHeaders(y),b=v.length-1;h&&v.length>1&&(v=[v[b]]);for(var w=0;w=i&&x<=s){var M=e.wtTable.getRowHeaders(x),j=M.length-1;h&&M.length>1&&(M=[M[j]]);for(var B=0;B=i&&x<=s&&D>=a&&D<=l?this.settings.className&&this.addClassAtCoords(e,x,D,this.settings.className,this.settings.markIntersections):x>=i&&x<=s?f&&this.addClassAtCoords(e,x,D,f):D>=a&&D<=l&&d&&this.addClassAtCoords(e,x,D,d);var I=e.getSetting("onAfterDrawSelection",x,D,this.settings.layerLevel);"string"==typeof I&&this.addClassAtCoords(e,x,D,I)}}e.getSetting("onBeforeDrawBorders",r,this.settings.className),this.settings.border&&this.getBorder(e).appear(r)}}},{key:"destroy",value:function(){Object.values(this.instanceBorders).forEach((function(e){return e.destroy()}))}}])&&bh(n.prototype,t),r&&bh(n,r),e}()),Th=["activeHeaderClassName"];function Lh(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Oh(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Ih=function(e){var n=e.activeHeaderClassName,t=Dh(e,Th);return new Bh(Oh(Oh({highlightHeaderClassName:n},t),{},{selectionType:"active-header"}))},Hh=["layerLevel","areaCornerVisible"];function Ph(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Nh(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Qh=function(e){var n=e.layerLevel,t=e.areaCornerVisible,r=Uh(e,Hh);return new Bh(Nh(Nh({className:"area",markIntersections:!0,layerLevel:Math.min(n,7),border:{width:1,color:"#4b89ff",cornerVisible:t}},r),{},{selectionType:"area"}))},Yh=["cellCornerVisible"];function Wh(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Vh(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var Gh=function(e){var n=e.cellCornerVisible,t=Kh(e,Yh);return new Bh(Vh(Vh({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:n}},t),{},{selectionType:"cell"}))},qh=["border","visualCellRange"];function Jh(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Xh(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var eA=function(e){var n=e.border,t=e.visualCellRange,r=Zh(e,qh);return new Bh(Xh(Xh(Xh({},n),r),{},{selectionType:"custom-selection"}),t)};t("./node_modules/core-js/modules/es.object.assign.js");function nA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function tA(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var cA=function(e){var n=e.headerClassName,t=e.rowClassName,r=e.columnClassName,o=uA(e,iA);return new Bh(sA(sA({className:"highlight",highlightHeaderClassName:n,highlightRowClassName:t,highlightColumnClassName:r},o),{},{highlightOnlyClosestHeader:!0,selectionType:"header"}))};function dA(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function fA(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var hA=dr("highlight/types"),AA=hA.register,mA=hA.getItem;function pA(e,n){return mA(e)(function(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}},{key:"getCell",value:function(){return this.cell}},{key:"getFill",value:function(){return this.fill}},{key:"createOrGetArea",value:function(){var e,n=this.layerLevel;return this.areas.has(n)?e=this.areas.get(n):(e=pA("area",bA({layerLevel:n},this.options)),this.areas.set(n,e)),e}},{key:"getAreas",value:function(){return gA(this.areas.values())}},{key:"createOrGetHeader",value:function(){var e,n=this.layerLevel;return this.headers.has(n)?e=this.headers.get(n):(e=pA("header",bA({},this.options)),this.headers.set(n,e)),e}},{key:"getHeaders",value:function(){return gA(this.headers.values())}},{key:"createOrGetActiveHeader",value:function(){var e,n=this.layerLevel;return this.activeHeaders.has(n)?e=this.activeHeaders.get(n):(e=pA("active-header",bA({},this.options)),this.activeHeaders.set(n,e)),e}},{key:"getActiveHeaders",value:function(){return gA(this.activeHeaders.values())}},{key:"getCustomSelections",value:function(){return gA(this.customSelections.values())}},{key:"addCustomSelection",value:function(e){this.customSelections.push(pA("custom-selection",bA(bA({},this.options),e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),z(this.areas.values(),(function(e){e.clear()})),z(this.headers.values(),(function(e){e.clear()})),z(this.activeHeaders.values(),(function(e){e.clear()}))}},{key:e,value:function(){return[this.cell,this.fill].concat(gA(this.areas.values()),gA(this.headers.values()),gA(this.activeHeaders.values()),gA(this.customSelections))[Symbol.iterator]()}}])&&_A(t.prototype,r),o&&_A(t,o),n}(Symbol.iterator);function EA(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:0,t=this.size()+n-1;return t>=0&&(e=this.ranges[t]),e}},{key:e,value:function(){return this.ranges[Symbol.iterator]()}}])&&EA(t.prototype,r),o&&EA(t,o),n}(Symbol.iterator);function SA(e,n){for(var t=0;td-1?t&&A>0&&!(h&&a>=d-h-1)?(this.runLocalHooks("insertRowRequire",d),d=this.options.countRows()):g&&(r.row=1-d,r.col=s+r.col===f-1?1-f:1):g&&a+r.row<0&&s+r.col>=0&&(r.row=d-1,r.col=s+r.col===0?f-1:-1),s+r.col>f-1?t&&m>0?(this.runLocalHooks("insertColRequire",f),f=this.options.countCols()):p&&(r.row=a+r.row===d-1?1-d:1,r.col=1-f):p&&s+r.col<0&&a+r.row>=0&&(r.row=a+r.row===0?d-1:-1,r.col=f-1);var y=new Ht(a+r.row,s+r.col);u=0,c=0,y.row<0?(u=-1,y.row=0):y.row>0&&y.row>=d&&(u=1,y.row=d-1),y.col<0?(c=-1,y.col=0):y.col>0&&y.col>=f&&(c=1,y.col=f-1),l=this.options.renderableToVisualCoords(y)}return this.runLocalHooks("afterTransformStart",l,u,c),l}},{key:"transformEnd",value:function(e,n){var t=new Ht(e,n),r=this.range.current(),o=r.to,i=0,a=0;this.runLocalHooks("beforeTransformEnd",t);var s=this.options.visualToRenderableCoords(r.highlight),l=s.row,u=s.col;if(null!==l&&null!==u){var c=this.options.countRows(),d=this.options.countCols(),f=this.options.visualToRenderableCoords(r.to),h=f.row,A=f.col,m=new Ht(h+t.row,A+t.col);i=0,a=0,m.row<0?(i=-1,m.row=0):m.row>0&&m.row>=c&&(i=1,m.row=c-1),m.col<0?(a=-1,m.col=0):m.col>0&&m.col>=d&&(a=1,m.col=d-1),o=this.options.renderableToVisualCoords(m)}return this.runLocalHooks("afterTransformEnd",o,i,a),o}}])&&SA(n.prototype,t),r&&SA(n,r),e}();de(xA,Mu);var MA=xA;function jA(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return BA(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return BA(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BA(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:DA;if(n!==DA&&n!==IA)throw new Error("The second argument is used internally only and cannot be overwritten.");var t=Array.isArray(e),r=n===DA,o=0;if(t){var i=e[0];if(0===e.length)o=1;else if(r&&i instanceof fh)o=3;else if(r&&Array.isArray(i))o=HA(i,IA);else if(e.length>=2&&e.length<=4){var a=!e.some((function(e,n){return!RA[n].includes(TA(e))}));a&&(o=2)}}return o}function PA(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.keepDirection,r=void 0!==t&&t,o=n.propToCol;if(!OA.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(n){var t=3===e,i=t?n.from.row:n[0],a=t?n.from.col:n[1],s=t?n.to.row:n[2],l=t?n.to.col:n[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof l&&(l=o(l))),nn(s)&&(s=i),nn(l)&&(l=a),!r){var u=i,c=a,d=s,f=l;i=Math.min(u,d),a=Math.min(c,f),s=Math.max(u,d),l=Math.max(c,f)}return[i,a,s,l]}}function NA(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;return"number"==typeof e&&e>=0&&ee.length)&&(n=e.length);for(var t=0,r=new Array(n);t2&&void 0!==arguments[2]&&arguments[2],r="multiple"===this.settings.selectionMode,o=nn(n)?uh():n,i=e.row<0,a=e.col<0,s=i&&a;this.selectedByCorner=s,this.runLocalHooks("beforeSetRangeStart".concat(t?"Only":""),e),(!r||r&&!o&&nn(n))&&this.selectedRange.clear(),this.selectedRange.add(e),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),!s&&a&&this.selectedByRowHeader.add(this.getLayerLevel()),!s&&i&&this.selectedByColumnHeader.add(this.getLayerLevel()),t||this.setRangeEnd(e)}},{key:"setRangeStartOnly",value:function(e,n){this.setRangeStart(e,n,!0)}},{key:"setRangeEnd",value:function(e){if(!this.selectedRange.isEmpty()){this.runLocalHooks("beforeSetRangeEnd",e),this.begin();var n=this.selectedRange.current();"single"!==this.settings.selectionMode&&n.setTo(new Ht(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor("cell",n.highlight)&&this.highlight.getCell().add(this.selectedRange.current().highlight).commit().adjustCoordinates(n);var t=this.getLayerLevel();t=1)&&(r.add(n.from).add(n.to).commit(),1===t)){var a=this.selectedRange.previous();this.highlight.useLayerLevel(t-1).createOrGetArea().add(a.from).commit().adjustCoordinates(a),this.highlight.useLayerLevel(t)}if(this.highlight.isEnabledFor("header",n.highlight)){var s=0===this.tableProps.countRowsTranslated(),l=0===this.tableProps.countColsTranslated(),u=n;(s||l)&&(u=n.clone()),s&&(u.from.row=-1),l&&(u.from.col=-1),"single"===this.settings.selectionMode?(this.isSelectedByAnyHeader()&&u.from.normalize(),o.add(u.from).commit()):o.add(u.from).add(u.to).commit(),this.isEntireRowSelected()&&this.tableProps.countCols()===n.getWidth()&&i.add(new Ht(n.from.row,-1)).add(new Ht(n.to.row,-1)).commit(),this.isEntireColumnSelected()&&this.tableProps.countRows()===n.getHeight()&&i.add(new Ht(-1,n.from.col)).add(new Ht(-1,n.to.col)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=ve(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}},{key:"transformStart",value:function(e,n,t){this.setRangeStart(this.transformation.transformStart(e,n,t))}},{key:"transformEnd",value:function(e,n){this.setRangeEnd(this.transformation.transformEnd(e,n))}},{key:"getLayerLevel",value:function(){return this.selectedRange.size()-1}},{key:"isSelected",value:function(){return!this.selectedRange.isEmpty()}},{key:"isSelectedByRowHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&this.isEntireRowSelected(e)}},{key:"isEntireRowSelected",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e)}},{key:"isSelectedByColumnHeader",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&this.isEntireColumnSelected(e)}},{key:"isEntireColumnSelected",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}},{key:"isSelectedByCorner",value:function(){return this.selectedByCorner}},{key:"inInSelection",value:function(e){return this.selectedRange.includes(e)}},{key:"isCellCornerVisible",value:function(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}},{key:"isAreaCornerVisible",value:function(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple()}},{key:"clear",value:function(){this.selectedRange.clear(),this.highlight.clear()}},{key:"deselect",value:function(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}},{key:"selectAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=this.tableProps.countRows(),r=this.tableProps.countCols();if(e||n||0!==t&&0!==r){var o=new Ht(n?-1:0,e?-1:0);this.clear(),this.setRangeStartOnly(o),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new Ht(t-1,r-1)),this.finish()}}},{key:"selectCells",value:function(e){var n=this,t=HA(e);if(1===t)return!1;if(0===t)throw new Error(Je(LA||(LA=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["Unsupported format of the selection ranges was passed. To select cells pass \n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, \n columnEnd/columnPropEnd]]) or as an array of CellRange objects."],["Unsupported format of the selection ranges was passed. To select cells pass\\x20\n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\\x20\n columnEnd/columnPropEnd]]) or as an array of CellRange objects."]))));var r=PA(t,{propToCol:function(e){return n.tableProps.propToCol(e)},keepDirection:!0}),o=this.tableProps.countRows(),i=this.tableProps.countCols(),a=!e.some((function(e){var n=FA(r(e),4),t=n[0],a=n[1],s=n[2],l=n[3];return!(NA(t,o)&&NA(a,i)&&NA(s,o)&&NA(l,i))}));return a&&(this.clear(),z(e,(function(e){var t=FA(r(e),4),o=t[0],i=t[1],a=t[2],s=t[3];n.setRangeStartOnly(new Ht(o,i),!1),n.setRangeEnd(new Ht(a,s)),n.finish()}))),a}},{key:"selectColumns",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r="string"==typeof e?this.tableProps.propToCol(e):e,o="string"==typeof n?this.tableProps.propToCol(n):n,i=this.tableProps.countCols(),a=this.tableProps.countRows(),s=NA(r,i)&&NA(o,i);return s&&(this.setRangeStartOnly(new Ht(t,r)),this.setRangeEnd(new Ht(a-1,o)),this.finish()),s}},{key:"selectRows",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,r=this.tableProps.countRows(),o=this.tableProps.countCols(),i=NA(e,r)&&NA(n,r);return i&&(this.setRangeStartOnly(new Ht(e,t)),this.setRangeEnd(new Ht(n,o-1)),this.finish()),i}},{key:"refresh",value:function(){if(this.highlight.getCustomSelections().forEach((function(e){e.commit()})),this.isSelected()){var e=this.highlight.getCell(),n=this.getLayerLevel();e.commit().adjustCoordinates(this.selectedRange.current());for(var t=0;t=0}function KA(e,n){if(!e())throw new Error("Assertion failed: ".concat(n))}function GA(e){return null==e}function qA(e){return(qA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var JA=function(){return{licenseKey:void 0,data:void 0,dataSchema:void 0,width:void 0,height:void 0,startRows:5,startCols:5,rowHeaders:void 0,colHeaders:null,colWidths:void 0,rowHeights:void 0,columns:void 0,cells:void 0,cell:[],comments:!1,customBorders:!1,minRows:0,minCols:0,maxRows:1/0,maxCols:1/0,minSpareRows:0,minSpareCols:0,allowInsertRow:!0,allowInsertColumn:!0,allowRemoveRow:!0,allowRemoveColumn:!0,selectionMode:"multiple",fillHandle:{autoInsertRow:!1},fixedRowsTop:0,fixedRowsBottom:0,fixedColumnsLeft:0,outsideClickDeselects:!0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},tabMoves:{row:0,col:1},autoWrapRow:!1,autoWrapCol:!1,persistentState:void 0,currentRowClassName:void 0,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",activeHeaderClassName:"ht__active_highlight",className:void 0,tableClassName:void 0,stretchH:"none",isEmptyRow:function(e){var n,t,r,o;for(n=0,t=this.countCols();n=0)void 0===(n=this.data[t])&&(n=this.valueFactory(e),this.data[t]=n);else if(n=this.valueFactory(e),this.holes.size>0){var r=this.holes.values().next().value;this.holes.delete(r),this.data[r]=n,this.index[e]=r}else this.data.push(n),this.index[e]=this.data.length-1;return n}},{key:"insert",value:function(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;KA((function(){return zA(e)||GA(e)}),"Expecting an unsigned number or null/undefined argument.");for(var r=[],o=this.data.length,i=0;i1&&void 0!==arguments[1]?arguments[1]:1;KA((function(){return zA(e)||GA(e)}),"Expecting an unsigned number or null/undefined argument.");for(var t=this.index.splice(GA(e)?this.index.length-n:e,n),r=0;re?this.index[e]:-1}},{key:"_getKeyByStorageIndex",value:function(e){return this.index.indexOf(e)}},{key:e,value:function(){return this.entries()}}])&&tm(t.prototype,r),o&&tm(t,o),n}(Symbol.iterator);function om(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:[];function t(){}ae(t,e);for(var r=0;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];dm(this,e),this.hot=n,this.globalMeta=new ZA(n),this.globalMeta.updateMeta(r),this.tableMeta=new nm(this.globalMeta),this.columnMeta=new am(this.globalMeta),this.cellMeta=new cm(this.columnMeta),o.forEach((function(e){return new e(t)}))}var n,t,r;return n=e,(t=[{key:"getGlobalMeta",value:function(){return this.globalMeta.getMeta()}},{key:"updateGlobalMeta",value:function(e){this.globalMeta.updateMeta(e)}},{key:"getTableMeta",value:function(){return this.tableMeta.getMeta()}},{key:"updateTableMeta",value:function(e){this.tableMeta.updateMeta(e)}},{key:"getColumnMeta",value:function(e){return this.columnMeta.getMeta(e)}},{key:"updateColumnMeta",value:function(e,n){this.columnMeta.updateMeta(e,n)}},{key:"getCellMeta",value:function(e,n,t){var r=t.visualRow,o=t.visualColumn,i=this.cellMeta.getMeta(e,n);return i.visualRow=r,i.visualCol=o,i.row=e,i.col=n,this.runLocalHooks("afterGetCellMeta",i),i}},{key:"getCellMetaKeyValue",value:function(e,n,t){if("string"!=typeof t)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,n,t)}},{key:"setCellMeta",value:function(e,n,t,r){this.cellMeta.setMeta(e,n,t,r)}},{key:"updateCellMeta",value:function(e,n,t){this.cellMeta.updateMeta(e,n,t)}},{key:"removeCellMeta",value:function(e,n,t){this.cellMeta.removeMeta(e,n,t)}},{key:"getCellsMeta",value:function(){return this.cellMeta.getMetas()}},{key:"getCellsMetaAtRow",value:function(e){return this.cellMeta.getMetasAtRow(e)}},{key:"createRow",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,n)}},{key:"removeRow",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,n)}},{key:"createColumn",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,n),this.columnMeta.createColumn(e,n)}},{key:"removeColumn",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,n),this.columnMeta.removeColumn(e,n)}},{key:"clearCellsCache",value:function(){this.cellMeta.clearCache()}},{key:"clearCache",value:function(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}])&&fm(n.prototype,t),r&&fm(n,r),e}();function Am(e,n){for(var t=0;t0&&(a+="\t"),"string"==typeof(i=e[n][r])?i.indexOf("\n")>-1?a+='"'.concat(i.replace(/"/g,'""'),'"'):a+=i:a+=null==i?"":i;n!==t-1&&(a+="\n")}return a}function bm(e){return(bm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wm(e,n){for(var t=0;t0?a:this.countFirstRowKeys(),i=!0}else{var s=this.tableMeta.maxCols;r=Math.min(s,t.length)}for(n=0;n1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,o=this.instance.countSourceRows(),i=o,a=0,s=e;("number"!=typeof s||s>=o)&&(s=o),s1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2?arguments[2]:void 0;if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");var r=this.dataSource,o=this.tableMeta.maxCols,i=e;("number"!=typeof i||i>=this.instance.countSourceCols())&&(i=this.instance.countSourceCols());var a=this.instance.runHooks("beforeCreateCol",i,n,t);if(!1===a)return 0;var s=this.instance.countSourceCols();i=u)if(l>0)for(var f=0;f1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2?arguments[2]:void 0,r=Number.isInteger(e)?e:-n,o=this.visualRowsToPhysical(r,n),i=this.instance.countSourceRows();r=(i+r)%i;var a=this.instance.runHooks("beforeRemoveRow",r,o.length,o,t);if(!1===a)return!1;var s=o.length;if(this.filterData(r,s,o),r1&&void 0!==arguments[1]?arguments[1]:1,t=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");var r="number"!=typeof e?-n:e;r=(this.instance.countCols()+r)%this.instance.countCols();var o=this.visualColumnsToPhysical(r,n),i=o.slice(0).sort((function(e,n){return n-e})),a=this.instance.runHooks("beforeRemoveCol",r,n,o,t);if(!1===a)return!1;for(var s=!0,l=i.length,u=this.dataSource,c=0;c3?a-3:0),l=3;l3?a-3:0),l=3;l2?t-2:0),o=2;o-1){var a=n.split("."),s=r;if(!s)return null;for(var l=0,u=a.length;l-1){var l,u=n.split("."),c=i,d=0;for(d=0,l=u.length-1;d=0?this.instance.toPhysicalRow(o):o;for(i=Math.min(n.col,t.col);i<=f&&null!==h;i++)a.push(c.call(this,o,this.colToProp(i)));null!==h&&s.push(a)}return s}},{key:"getText",value:function(n,t){return vm(this.getRange(n,t,e.DESTINATION_RENDERER))}},{key:"getCopyableText",value:function(n,t){return vm(this.getRange(n,t,e.DESTINATION_CLIPBOARD_GENERATOR))}},{key:"destroy",value:function(){this.instance=null,this.tableMeta=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}])&&wm(n.prototype,t),r&&wm(n,r),e}();function Em(e){return(Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function km(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||xm(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sm(e){return function(e){if(Array.isArray(e))return Mm(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xm(e,n){if(e){if("string"==typeof e)return Mm(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Mm(e,n):void 0}}function Mm(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t2&&void 0!==arguments[2]&&arguments[2],l=!1,u=this,c=new Sr(u),d=!0;n.language=rh(n.language);var f=new hm(u,n,[mm]),h=f.getTableMeta(),A=f.getGlobalMeta(),m=_o();zl(s)&&Vl(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0,sh(this.rootDocument),this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),Kl(this)&&gn(n.licenseKey,e),this.guid="ht_".concat(bn()),this.columnIndexMapper=new Ad,this.rowIndexMapper=new Ad,r=new Su(u),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);var p=function(e){var n=e.row,t=e.col;return new Ht(n>=0?u.rowIndexMapper.getRenderableFromVisualIndex(n):n,t>=0?u.columnIndexMapper.getRenderableFromVisualIndex(t):t)},g=function(e){var n=e.row,t=e.col;return new Ht(n>=0?u.rowIndexMapper.getVisualFromRenderableIndex(n):n,t>=0?u.columnIndexMapper.getVisualFromRenderableIndex(t):t)},y=new WA(h,{countCols:function(){return u.countCols()},countRows:function(){return u.countRows()},propToCol:function(e){return t.propToCol(e)},isEditorOpened:function(){return!!u.getActiveEditor()&&u.getActiveEditor().isOpened()},countColsTranslated:function(){return a.view.countRenderableColumns()},countRowsTranslated:function(){return a.view.countRenderableRows()},visualToRenderableCoords:p,renderableToVisualCoords:g,isDisabledCellSelection:function(e,n){return u.getCellMeta(e,n).disableVisualSelection}});this.selection=y;var v=function(e){e.hiddenIndexesChanged&&a.selection.refresh()};function b(e){var n=md(e);nh(n)?(u.runHooks("beforeLanguageChange",n),A.language=n,u.runHooks("afterLanguageChange",n)):pd(e)}function w(e,n){var t="className"===e?u.rootElement:u.table;if(d)Fn(t,n);else{var r=[],o=[];A[e]&&(r=Array.isArray(A[e])?A[e]:te(A[e])),n&&(o=Array.isArray(n)?n:te(n));var i=Z(r,o),a=Z(o,r);i.length&&Un(t,i),a.length&&Fn(t,a)}A[e]=n}function _(){var e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue:function(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue:function(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty:function(){},checkIfQueueIsEmpty:function(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function C(e){var n=e.replace(",",".");return!1===isNaN(parseFloat(n))?parseFloat(n):e}function E(e,n,r){if(e.length){var o=u.getActiveEditor(),i=u.runHooks("beforeChange",e,n||"edit"),a=!0;if(!1!==i){var s=new _;s.onQueueEmpty=function(e){o&&a&&o.cancelChanges(),r(e)};for(var l=e.length-1;l>=0;l--)if(null===e[l])e.splice(l,1);else{var c=km(e[l],4),d=c[0],f=c[1],A=c[3],m=t.propToCol(f),p=u.getCellMeta(d,m);"numeric"===p.type&&"string"==typeof A&&oo(A)&&(e[l][3]=C(A)),u.getCellValidator(p)&&(s.addValidatorToQueue(),u.validateCell(e[l][3],p,function(n,t){return function(r){if("boolean"!=typeof r)throw new Error("Validation error: result is not boolean");if(!1===r&&!1===t.allowInvalid){a=!1,e.splice(n,1),t.valid=!0;var o=u.getCell(t.visualRow,t.visualCol);null!==o&&Un(o,h.invalidCellClassName)}s.removeValidatorFormQueue()}}(l,p),n))}s.checkIfQueueIsEmpty()}else o&&o.cancelChanges()}}function k(e,n){var r=e.length-1;if(!(r<0)){for(;r>=0;r--){var a=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(h.allowInsertRow)for(;e[r][0]>u.countRows()-1;){var s=t.createRow(void 0,void 0,n);if(!(s>=1)){a=!0;break}f.createRow(null,s)}if("array"===u.dataType&&(!h.columns||0===h.columns.length)&&h.allowInsertColumn)for(;t.propToCol(e[r][1])>u.countCols()-1;){var l=t.createCol(void 0,void 0,n);if(!(l>=1)){a=!0;break}f.createColumn(null,l)}a||t.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}u.forceFullRender=!0,o.adjustRowsAndCols(),u.runHooks("beforeChangeRender",e,n),i.lockEditor(),u._refreshBorders(null),i.unlockEditor(),u.view.adjustElementsSize(),u.runHooks("afterChange",e,n||"edit");var c=u.getActiveEditor();c&&en(c.refreshValue)&&c.refreshValue()}}function S(e,n,t){return Array.isArray(e)?e:[[e,n,t]]}this.columnIndexMapper.addLocalHook("cacheUpdated",v),this.rowIndexMapper.addLocalHook("cacheUpdated",v),this.selection.addLocalHook("beforeSetRangeStart",(function(e){a.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(function(e){a.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(function(e){a.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=a.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=a.view.wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(function(e){var n=ve(!1),t=a.selection.getSelectedRange(),r=t.current(),o=r.from,i=r.to,s=t.size()-1;a.runHooks("afterSelection",o.row,o.col,i.row,i.col,n,s),a.runHooks("afterSelectionByProp",o.row,u.colToProp(o.col),i.row,u.colToProp(i.col),n,s);var c=a.selection.isSelectedByAnyHeader(),d=a.selection.selectedRange.current(),f=!0;l&&(f=!1),n.isTouched()&&(f=!n.value);var h=a.selection.isSelectedByRowHeader(),A=a.selection.isSelectedByColumnHeader();!1!==f&&(c?h?a.view.scrollViewportVertically(u.rowIndexMapper.getRenderableFromVisualIndex(e.row)):A&&a.view.scrollViewportHorizontally(u.columnIndexMapper.getRenderableFromVisualIndex(e.col)):d&&!a.selection.isMultiple()?a.view.scrollViewport(p(d.from)):a.view.scrollViewport(p(e))),h&&A?Fn(a.rootElement,["ht__selection--rows","ht__selection--columns"]):h?(Un(a.rootElement,"ht__selection--columns"),Fn(a.rootElement,"ht__selection--rows")):A?(Un(a.rootElement,"ht__selection--rows"),Fn(a.rootElement,"ht__selection--columns")):Un(a.rootElement,["ht__selection--rows","ht__selection--columns"]),a._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(function(e){var n=e.length-1,t=e[n],r=t.from,o=t.to;a.runHooks("afterSelectionEnd",r.row,r.col,o.row,o.col,n),a.runHooks("afterSelectionEndByProp",r.row,u.colToProp(r.col),o.row,u.colToProp(o.col),n)})),this.selection.addLocalHook("afterIsMultipleSelection",(function(e){var n=a.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=n)})),this.selection.addLocalHook("beforeModifyTransformStart",(function(e){a.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",(function(e,n,t){a.runHooks("afterModifyTransformStart",e,n,t)})),this.selection.addLocalHook("beforeModifyTransformEnd",(function(e){a.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",(function(e,n,t){a.runHooks("afterModifyTransformEnd",e,n,t)})),this.selection.addLocalHook("afterDeselect",(function(){i.destroyEditor(),a._refreshBorders(),Un(a.rootElement,["ht__selection--rows","ht__selection--columns"]),a.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(function(e){a.alter("insert_row",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(function(e){a.alter("insert_col",e,1,"auto")})),o={alter:function(e,n){var r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,l=function(e){if(0===e.length)return[];var n=Sm(e);return n.sort((function(e,n){var t=km(e,1)[0],r=km(n,1)[0];return t===r?0:t>r?1:-1})),Y(n,(function(e,n){var t=km(n,2),r=t[0],o=t[1],i=e[e.length-1],a=km(i,2),s=a[0]+a[1];if(r<=s){var l=Math.max(o-(s-r),0);i[1]+=l}else e.push([r,o]);return e}),[n[0]])};switch(e){case"insert_row":var c=u.countSourceRows();if(h.maxRows===c)return;if(n=en(n)?n:c,r=t.createRow(n,i,a)){f.createRow(u.toPhysicalRow(n),i);var d=y.selectedRange.current(),A=null==d?void 0:d.from,m=null==A?void 0:A.row;if(en(m)&&m>=n){var p=d.to,g=p.row,v=p.col,b=A.col;y.isSelectedByRowHeader()&&(b=-1),y.getSelectedRange().pop(),y.setRangeStartOnly(new Ht(m+r,b),!0),y.setRangeEnd(new Ht(g+r,v))}else u._refreshBorders()}break;case"insert_col":if(r=t.createCol(n,i,a)){if(f.createColumn(u.toPhysicalColumn(n),i),Array.isArray(h.colHeaders)){var w=[n,0];w.length+=r,Array.prototype.splice.apply(h.colHeaders,w)}var _=y.selectedRange.current(),C=null==_?void 0:_.from,E=null==C?void 0:C.col;if(en(E)&&E>=n){var k=_.to,S=k.row,x=k.col,M=C.row;y.isSelectedByColumnHeader()&&(M=-1),y.getSelectedRange().pop(),y.setRangeStartOnly(new Ht(M,E+r),!0),y.setRangeEnd(new Ht(S,x+r))}else u._refreshBorders()}break;case"remove_row":var j=function(e){var n=0;z(e,(function(e){var r=km(e,2),o=r[0],i=r[1],s=tn(o)?u.countRows()-1:Math.max(o-n,0);if(Number.isInteger(o)&&(o=Math.max(o-n,0)),t.removeRow(o,i,a)){f.removeRow(u.toPhysicalRow(s),i);var l=u.countRows(),c=h.fixedRowsTop;c>=s+1&&(h.fixedRowsTop-=Math.min(i,c-s));var d=h.fixedRowsBottom;d&&s>=l-d&&(h.fixedRowsBottom-=Math.min(i,d)),n+=i}}))};Array.isArray(n)?j(l(n)):j([[n,i]]),o.adjustRowsAndCols(),u._refreshBorders();break;case"remove_col":var B=function(e){var n=0;z(e,(function(e){var r=km(e,2),o=r[0],i=r[1],s=tn(o)?u.countCols()-1:Math.max(o-n,0),l=u.toPhysicalColumn(s);if(Number.isInteger(o)&&(o=Math.max(o-n,0)),t.removeCol(o,i,a)){f.removeColumn(l,i);var c=h.fixedColumnsLeft;c>=s+1&&(h.fixedColumnsLeft-=Math.min(i,c-s)),Array.isArray(h.colHeaders)&&(void 0===l&&(l=-1),h.colHeaders.splice(l,i)),n+=i}}))};Array.isArray(n)?B(l(n)):B([[n,i]]),o.adjustRowsAndCols(),u._refreshBorders();break;default:throw new Error('There is no such action "'.concat(e,'"'))}s||o.adjustRowsAndCols()},adjustRowsAndCols:function(){var e,n=h.minRows,r=h.minSpareRows,o=h.minCols,i=h.minSpareCols;if(n){var a=u.countRows();ap-1?(n=!0,o>(t=p-1)&&(o=t)):o>p-1&&(n=!0,t>(o=p-1)&&(t=o)),r>g-1?(n=!0,i>(r=g-1)&&(i=r)):i>g-1&&(n=!0,r>(i=g-1)&&(r=i)),n&&u.selectCell(t,r,o,i)})),u.view&&u.view.adjustElementsSize()},populateFromArray:function(e,n,t,r,o,i,a){var s,l,c,d,f,A,m,p,g=[],y={};if(0===(l=n.length))return!1;switch(o){case"shift_down":for(f=t?t.col-e.col+1:0,A=t?t.row-e.row+1:0,c=0,d=(n=yu(n)).length,m=Math.max(d,f);c1&&void 0!==arguments[1]?arguments[1]:null,r=n[e%n.length];return null!==t?r[t%r.length]:r},j=n.length,B=t?t.row-e.row+1:0;for(l=t?B:Math.max(j,B),s=0;st.row&&B>j||!h.allowInsertRow&&y.row>u.countRows()-1||y.row>=h.maxRows);s++){var T=s-k,L=M(T).length,O=t?t.col-e.col+1:0;if(d=t?O:Math.max(L,O),y.col=e.col,C=u.getCellMeta(y.row,y.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!C.skipRowOnPaste){for(S=0,c=0;ct.col&&O>L||!h.allowInsertColumn&&y.col>u.countCols()-1||y.col>=h.maxCols);c++)if(C=u.getCellMeta(y.row,y.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!C.skipColumnOnPaste)if(C.readOnly&&"UndoRedo.undo"!==r)y.col+=1;else{var R=c-S,D=M(T,R),I=u.getDataAtCell(y.row,y.col),H={row:T,col:R};if("Autofill.fill"===r){var P=u.runHooks("beforeAutofillInsidePopulate",H,i,n,a,{},E);P&&(D=nn(P.value)?D:P.value)}if(null!==D&&"object"===Em(D))if(Array.isArray(D)&&null===I&&(I=[]),null===I||"object"!==Em(I))x=!1;else fe(ie(Array.isArray(I)?I:I[0]||I),ie(Array.isArray(D)?D:D[0]||D))?D=ue(D):x=!1;else null!==I&&"object"===Em(I)&&(x=!1);x&&g.push([y.row,y.col,D]),x=!0,y.col+=1}else S+=1,y.col+=1,d+=1;y.row+=1}else k+=1,y.row+=1,l+=1}u.setDataAtCell(g,null,null,r||"populateFromArray")}}},this.init=function(){r.setData(h.data),u.runHooks("beforeInit"),(Ie()||Pe())&&Fn(u.rootElement,"mobile"),this.updateSettings(h,!0),this.view=new ru(this),i=Vr.getInstance(u,h,y),u.runHooks("init"),this.forceFullRender=!0,this.view.render(),"object"===Em(d)&&(u.runHooks("afterChange",d[0],d[1]),d=!1),u.runHooks("afterInit")},this.validateCell=function(e,n,t,r){var o,i=u.getCellValidator(n);function a(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(r&&!0!==n.hidden){var o=n.visualCol,i=n.visualRow,a=u.getCell(i,o,!0);if(a&&"TH"!==a.nodeName){var s=u.rowIndexMapper.getRenderableFromVisualIndex(i),l=u.columnIndexMapper.getRenderableFromVisualIndex(o);u.view.wt.wtSettings.settings.cellRenderer(s,l,a)}t(e)}else t(e)}rn(i)&&(o=i,i=function(e,n){n(o.test(e))}),xt(i)?(e=u.runHooks("beforeValidate",e,n.visualRow,n.prop,r),u._registerImmediate((function(){i.call(n,e,(function(t){u&&(t=u.runHooks("afterValidate",t,e,n.visualRow,n.prop,r),n.valid=t,a(t),u.runHooks("postAfterValidate",t,e,n.visualRow,n.prop,r))}))}))):u._registerImmediate((function(){n.valid=!0,a(n.valid,!1)}))},this.setDataAtCell=function(e,n,o,i){var a,s,l,c=S(e,n,o),d=[],f=i;for(a=0,s=c.length;a=this.countCols()?c[a][1]:t.colToProp(c[a][1]),d.push([c[a][0],l,r.getAtCell(this.toPhysicalRow(c[a][0]),c[a][1]),c[a][2]])}f||"object"!==Em(e)||(f=n),u.runHooks("afterSetDataAtCell",d,f),E(d,f,(function(){k(d,f)}))},this.setDataAtRowProp=function(e,n,t,o){var i,a,s=S(e,n,t),l=[],c=o;for(i=0,a=s.length;i0&&void 0!==arguments[0]&&arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];u._refreshBorders(e,n)},this.populateFromArray=function(e,n,t,r,i,a,s,l,u){if("object"!==Em(t)||"object"!==Em(t[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var c="number"==typeof r?new Ht(r,i):null;return o.populateFromArray(new Ht(e,n),t,c,a,s,l,u)},this.spliceCol=function(e,n,r){for(var o,i=arguments.length,a=new Array(i>3?i-3:0),s=3;s3?i-3:0),s=3;s0&&(e=n[n.length-1]),e},this.getSelectedRange=function(){if(y.isSelected())return Array.from(y.getSelectedRange())},this.getSelectedRangeLast=function(){var e,n=this.getSelectedRange();return n&&n.length>0&&(e=n[n.length-1]),e},this.emptySelectedCells=function(e){var n=this;if(y.isSelected()&&0!==this.countRows()&&0!==this.countCols()){var t=[];z(y.getSelectedRange(),(function(e){var r=e.getTopLeftCorner(),o=e.getBottomRightCorner();io(r.row,o.row,(function(e){io(r.col,o.col,(function(r){n.getCellMeta(e,r).readOnly||t.push([e,r,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)}},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){var e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(i.lockEditor(),this._refreshBorders(null),i.unlockEditor()))},this.batchRender=function(e){this.suspendRender();var n=e();return this.resumeRender(),n},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(n,0),(!this.isExecutionSuspended()&&n===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();var t=e();return this.resumeExecution(n),t},this.batch=function(e){this.suspendRender(),this.suspendExecution();var n=e();return this.resumeExecution(),this.resumeRender(),n},this.refreshDimensions=function(){if(u.view){var e=u.view.getLastSize(),n=e.width,t=e.height,r=u.rootElement.getBoundingClientRect(),o=r.width,i=r.height,a=o!==n||i!==t;!1===u.runHooks("beforeRefreshDimensions",{width:n,height:t},{width:o,height:i},a)||((a||u.view.wt.wtOverlays.scrollableElement===u.rootWindow)&&(u.view.setLastSize(o,i),u.render()),u.runHooks("afterRefreshDimensions",{width:n,height:t},{width:o,height:i},a))}},this.loadData=function(e,n){if(Array.isArray(h.dataSchema)?u.dataType="array":xt(h.dataSchema)?u.dataType="function":u.dataType="object",t&&t.destroy(),e=u.runHooks("beforeLoadData",e,d,n),t=new Cm(u,e,h),"object"===Em(e)&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error("loadData only accepts array of objects or array of arrays (".concat(Em(e)," given)"));var i,a=t.getSchema();e=[];var s,l=0;for(l=0,s=h.startRows;l1&&void 0!==arguments[1]&&arguments[1],s=!1;if(en(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if(en(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if(en(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(n in e)"data"!==n&&("language"!==n?"className"===n?w("className",e.className):"tableClassName"===n&&u.table?(w("tableClassName",e.tableClassName),u.view.wt.wtOverlays.syncOverlayTableClassNames()):sr.getSingleton().isRegistered(n)||sr.getSingleton().isDeprecated(n)?(xt(e[n])||Array.isArray(e[n]))&&(e[n].initialHook=!0,u.addHook(n,e[n])):!a&&be(e,n)&&(A[n]=e[n]):b(e.language));void 0===e.data&&void 0===h.data?u.loadData(null,"updateSettings"):void 0!==e.data?u.loadData(e.data,"updateSettings"):void 0!==e.columns&&(t.createMap(),u.initIndexMappers());var l=u.countCols(),c=h.columns;if(c&&xt(c)&&(s=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||f.clearCache(),l>0)for(n=0,r=0;n-1||v.indexOf("overflow")>-1)?u.rootElement.setAttribute("style",v):(u.rootElement.style.height="",u.rootElement.style.overflow="")}else void 0!==g&&(u.rootElement.style.height=isNaN(g)?"".concat(g):"".concat(g,"px"),u.rootElement.style.overflow="hidden");if(void 0!==e.width){var _=e.width;xt(_)&&(_=_()),u.rootElement.style.width=isNaN(_)?"".concat(_):"".concat(_,"px")}a||(u.view&&(u.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),u.view.wt.exportSettingsAsClassNames()),u.runHooks("afterUpdateSettings",e)),o.adjustRowsAndCols(),u.view&&!d&&(u.forceFullRender=!0,i.lockEditor(),u._refreshBorders(null),u.view.wt.wtOverlays.adjustElementsSize(),i.unlockEditor()),a||!u.view||""!==p&&""!==g&&void 0!==g||p===g||u.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=u.getSelectedLast();if(h.getValue){if(xt(h.getValue))return h.getValue.call(u);if(e)return u.getData()[e[0][0]][h.getValue]}else if(e)return u.getDataAtCell(e[0],e[1])},this.getSettings=function(){return h},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,n,t,r,i){o.alter(e,n,t,r,i)},this.getCell=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n,o=e;if(n>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(n)))return null;r=this.columnIndexMapper.getRenderableFromVisualIndex(n)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;o=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===o||null===r?null:u.view.getCellAtCoords(new Ht(o,r),t)},this.getCoords=function(e){var n=this.view.wt.wtTable.getCoords(e);if(null===n)return null;var t=n.row,r=n.col,o=t,i=r;return t>=0&&(o=this.rowIndexMapper.getVisualFromRenderableIndex(t)),r>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(r)),new Ht(o,i)},this.colToProp=function(e){return t.colToProp(e)},this.propToCol=function(e){return t.propToCol(e)},this.toVisualRow=function(e){return a.rowIndexMapper.getVisualFromPhysicalIndex(e)},this.toVisualColumn=function(e){return a.columnIndexMapper.getVisualFromPhysicalIndex(e)},this.toPhysicalRow=function(e){return a.rowIndexMapper.getPhysicalFromVisualIndex(e)},this.toPhysicalColumn=function(e){return a.columnIndexMapper.getPhysicalFromVisualIndex(e)},this.getDataAtCell=function(e,n){return t.get(e,t.colToProp(n))},this.getDataAtRowProp=function(e,n){return t.get(e,n)},this.getDataAtCol=function(e){var n;return(n=[]).concat.apply(n,Sm(t.getRange(new Ht(0,e),new Ht(h.data.length-1,e),t.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var n,r=t.getRange(new Ht(0,t.propToCol(e)),new Ht(h.data.length-1,t.propToCol(e)),t.DESTINATION_RENDERER);return(n=[]).concat.apply(n,Sm(r))},this.getSourceData=function(e,n,t,o){return void 0===e?r.getData():r.getByRange(new Ht(e,n),new Ht(t,o))},this.getSourceDataArray=function(e,n,t,o){return void 0===e?r.getData(!0):r.getByRange(new Ht(e,n),new Ht(t,o),!0)},this.getSourceDataAtCol=function(e){return r.getAtColumn(e)},this.setSourceDataAtCell=function(e,n,t,o){var i=S(e,n,t),a=this.hasHook("afterSetSourceDataAtCell"),s=[];a&&z(i,(function(e){var n=km(e,3),t=n[0],o=n[1],i=n[2];s.push([t,o,r.getAtCell(t,o),i])})),z(i,(function(e){var n=km(e,3),t=n[0],o=n[1],i=n[2];r.setAtCell(t,o,i)})),a&&this.runHooks("afterSetSourceDataAtCell",s,o),this.render();var l=u.getActiveEditor();l&&en(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return r.getAtRow(e)},this.getSourceDataAtCell=function(e,n){return r.getAtCell(e,n)},this.getDataAtRow=function(e){return t.getRange(new Ht(e,0),new Ht(e,this.countCols()-1),t.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,n,t,r){var o=this,i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,n,t,r],a=i[0],s=i[1],l=i[2],u=i[3],c=null,d=null;void 0===l&&(l=a),void 0===u&&(u=s);var f="mixed";return io(Math.max(Math.min(a,l),0),Math.max(a,l),(function(e){var n=!0;return io(Math.max(Math.min(s,u),0),Math.max(s,u),(function(t){var r=o.getCellMeta(e,t);return d=r.type,c?n=c===d:c=d,n})),f=n?d:"mixed",n})),f},this.removeCellMeta=function(e,n,t){var r=[this.toPhysicalRow(e),this.toPhysicalColumn(n)],o=r[0],i=r[1],a=f.getCellMetaKeyValue(o,i,t);!1!==u.runHooks("beforeRemoveCellMeta",e,n,t,a)&&(f.removeCellMeta(o,i,t),u.runHooks("afterRemoveCellMeta",e,n,t,a)),a=null},this.spliceCellsMeta=function(e){for(var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length,o=new Array(r>2?r-2:0),i=2;i0&&!Array.isArray(o[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&f.removeRow(this.toPhysicalRow(e),t),o.length>0&&z(o.reverse(),(function(t){f.createRow(n.toPhysicalRow(e)),z(t,(function(t,r){return n.setCellMetaObject(e,r,t)}))})),u.render()},this.setCellMetaObject=function(e,n,t){var r=this;"object"===Em(t)&&me(t,(function(t,o){r.setCellMeta(e,n,o,t)}))},this.setCellMeta=function(e,n,t,r){if(!1!==u.runHooks("beforeSetCellMeta",e,n,t,r)){var o=e,i=n;e=0;)if(void 0===n||-1!==n.indexOf(o)){for(var i=u.countCols()-1;i>=0;)void 0===t||-1!==t.indexOf(i)?(r.addValidatorToQueue(),u.validateCell(u.getDataAtCell(o,i),u.getCellMeta(o,i),(function(e){if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()}),"validateCells"),i-=1):i-=1;o-=1}else o-=1;r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){var n=h.rowHeaders,t=e;return void 0!==t&&(t=u.runHooks("modifyRowHeader",t)),void 0===t?(n=[],io(u.countRows()-1,(function(e){n.push(u.getRowHeader(e))}))):Array.isArray(n)&&void 0!==n[t]?n=n[t]:xt(n)?n=n(t):n&&"string"!=typeof n&&"number"!=typeof n&&(n=t+1),n},this.hasRowHeaders=function(){return!!h.rowHeaders},this.hasColHeaders=function(){if(void 0!==h.colHeaders&&null!==h.colHeaders)return!!h.colHeaders;for(var e=0,n=u.countCols();e=0&&(n=u.getCellMeta(0,e).width);if(void 0!==n&&n!==h.width||(n=h.colWidths),null!=n){switch(Em(n)){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return n},this.getColWidth=function(e){var n=u._getColWidthFromSettings(e);return void 0===(n=u.runHooks("modifyColWidth",n,e))&&(n=Dl.DEFAULT_WIDTH),n},this._getRowHeightFromSettings=function(e){var n=h.rowHeights;if(null!=n){switch(Em(n)){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return n},this.getRowHeight=function(e){var n=u._getRowHeightFromSettings(e);return n=u.runHooks("modifyRowHeight",n,e)},this.countSourceRows=function(){return r.countRows()},this.countSourceCols=function(){return r.countFirstRowKeys()},this.countRows=function(){return t.getLength()},this.countCols=function(){var e=h.maxCols,n=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,n)},this.countRenderedRows=function(){return u.view.wt.drawn?u.view.wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return u.view.wt.drawn?u.view.wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return u.view.wt.drawn?u.view.wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return u.view.wt.drawn?u.view.wt.wtTable.getVisibleColumnsCount():-1},this.countEmptyRows=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=0;return ao(u.countRows()-1,(function(t){if(u.isEmptyRow(t))n+=1;else if(!0===e)return!1})),n},this.countEmptyCols=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(u.countRows()<1)return 0;var n=0;return ao(u.countCols()-1,(function(t){if(u.isEmptyCol(t))n+=1;else if(!0===e)return!1})),n},this.isEmptyRow=function(e){return h.isEmptyRow.call(u,e)},this.isEmptyCol=function(e){return h.isEmptyCol.call(u,e)},this.selectCell=function(e,n,t,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!nn(e)&&!nn(n)&&this.selectCells([[e,n,t,r]],o,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===n&&(l=!0);var r=y.selectCells(e);return r&&t&&u.listen(),l=!1,r},this.selectColumns=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return y.selectColumns(e,n)},this.selectRows=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return y.selectRows(e,n)},this.deselectCell=function(){y.deselect()},this.selectAll=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=e&&this.hasRowHeaders(),t=e&&this.hasColHeaders();l=!0,y.selectAll(n,t),l=!1};var j=function(e,n){return e.getFirstNotHiddenIndex(n,1,!0)};function B(e){return function(){throw new Error('The "'.concat(e,'" method cannot be called because this Handsontable instance has been destroyed'))}}this.scrollViewportTo=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!t,a=!r,s=e,l=n;if(o){var c=Number.isInteger(e),d=Number.isInteger(n),f=c?j(this.rowIndexMapper,e):void 0,h=d?j(this.columnIndexMapper,n):void 0;if(null===f||null===h)return!1;s=c?u.rowIndexMapper.getRenderableFromVisualIndex(f):void 0,l=d?u.columnIndexMapper.getRenderableFromVisualIndex(h):void 0}var A=Number.isInteger(s),m=Number.isInteger(l);return A&&m?u.view.scrollViewport(new Ht(s,l),i,r,t,a):A&&!1===m?u.view.scrollViewportVertically(s,i,t):!(!m||!1!==A)&&u.view.scrollViewportHorizontally(l,r,a)},this.destroy=function(){if(u._clearTimeouts(),u._clearImmediates(),u.view&&u.view.destroy(),r&&r.destroy(),r=null,f.clearCache(),lh(),Kl(u)){var e=this.rootDocument.querySelector("#hot-display-license-info");e&&e.parentNode.removeChild(e)}Yn(u.rootElement),c.destroy(),i&&i.destroy(),u.batchExecution((function(){u.rowIndexMapper.unregisterAll(),u.columnIndexMapper.unregisterAll(),m.getItems().forEach((function(e){km(e,2)[1].destroy()})),m.clear(),u.runHooks("afterDestroy")}),!0),sr.getSingleton().destroy(u),me(u,(function(e,n,t){xt(e)?t[n]=B(n):"guid"!==n&&(t[n]=null)})),u.isDestroyed=!0,t&&t.destroy(),u.rowIndexMapper=null,u.columnIndexMapper=null,t=null,o=null,y=null,i=null,u=null},this.getActiveEditor=function(){return i.getActiveEditor()},this.getPlugin=function(e){var n=yn(e);return"UndoRedo"===n?this.undoRedo:m.getItem(n)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:m.getId(e)},this.getInstance=function(){return u},this.addHook=function(e,n){sr.getSingleton().add(e,n,u)},this.hasHook=function(e){return sr.getSingleton().has(e,u)},this.addHookOnce=function(e,n){sr.getSingleton().once(e,n,u)},this.removeHook=function(e,n){sr.getSingleton().remove(e,n,u)},this.runHooks=function(e,n,t,r,o,i,a){return sr.getSingleton().run(u,e,n,t,r,o,i,a)},this.getTranslatedPhrase=function(e,n){return th(h.language,e,n)},this.toHTML=function(){return Xr(a)},this.toTableElement=function(){var e=a.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",Xr(a)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=e;"function"==typeof t&&(t=setTimeout(t,n)),this.timeouts.push(t)},this._clearTimeouts=function(){z(this.timeouts,(function(e){clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){z(this.immediates,(function(e){clearImmediate(e)}))},this._refreshBorders=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];i.destroyEditor(e),u.view.render(),n&&y.isSelected()&&i.prepareEditor()},Ro().forEach((function(e){var n=Do(e);m.addItem(e,new n(a))})),sr.getSingleton().run(u,"construct")}function Tm(){var e,n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},t=document.body,r=document.createTextNode(""),o=document.createElement("SPAN"),i=function(e,n,t){e.addEventListener(n,t,!1)},a=function(e,n,t){e.removeEventListener(n,t,!1)},s=function(i){var a,s;i?/^[a-zA-Z \.,\\\/\|0-9]$/.test(i)||(i="."):i="",void 0!==r.textContent?r.textContent=e.value+i:r.data=e.value+i,o.style.fontSize=c(e).fontSize,o.style.fontFamily=c(e).fontFamily,o.style.whiteSpace="pre",t.appendChild(o),a=o.clientWidth+2,t.removeChild(o),e.style.height=n.minHeight+"px",n.minWidth>a?e.style.width=n.minWidth+"px":a>n.maxWidth?e.style.width=n.maxWidth+"px":e.style.width=a+"px",s=e.scrollHeight?e.scrollHeight-1:0,n.minHeight>s?e.style.height=n.minHeight+"px":n.maxHeight0&&void 0!==arguments[0]&&arguments[0];if(this.state===Pr.EDITING||e)if(this.TD=this.getEditedCell(),this.TD){var n,t=this.hot.view.wt,r=t.wtOverlays,o=t.wtViewport,i=qn(this.TD),a=qn(this.hot.rootElement),s=r.topOverlay.holder,l=r.leftOverlay.holder,u=s!==this.hot.rootWindow?s.scrollTop:0,c=l!==this.hot.rootWindow?l.scrollLeft:0,d=this.checkEditorSection(),f=["","left"].includes(d)?u:0,h=["","top","bottom"].includes(d)?c:0,A=i.top===a.top?0:1,m=this.TD.style.backgroundColor,p=i.top-a.top-A-f,g=i.left-a.left-1-h;switch(d){case"top":n=wt(r.topOverlay.clone.wtTable.holder.parentNode);break;case"left":n=wt(r.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":n=wt(r.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":n=wt(r.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":n=wt(r.bottomOverlay.clone.wtTable.holder.parentNode)}var y=this.hot.hasColHeaders(),v=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),w=this.hot.rowIndexMapper.getRenderableIndexesLength(),_=w-this.hot.view.wt.getSetting("fixedRowsBottom");(y&&v<=0||v===_)&&(p+=1),b<=0&&(g+=1),n&&-1!==n?this.textareaParentStyle[n[0]]=n[1]:_t(this.TEXTAREA_PARENT),this.textareaParentStyle.top="".concat(p,"px"),this.textareaParentStyle.left="".concat(g,"px"),this.showEditableElement();var C=o.rowsRenderCalculator.startPosition,E=o.columnsRenderCalculator.startPosition,k=r.leftOverlay.getScrollPosition(),S=r.topOverlay.getScrollPosition(),x=gt(this.hot.rootDocument),M=this.TD.offsetTop+C-S,j=this.TD.offsetLeft+E-k,B=lt(this.TD)-8,T=yt(s)?x:0,L=vt(l)?x:0,O=this.hot.view.maximumVisibleElementWidth(j)-9-T,R=this.TD.scrollHeight+1,D=Math.max(this.hot.view.maximumVisibleElementHeight(M)-L,23),I=ot(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=I.fontSize,this.TEXTAREA.style.fontFamily=I.fontFamily,this.TEXTAREA.style.backgroundColor=m,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(R,D),maxHeight:D,minWidth:Math.min(B,O),maxWidth:O},!0)}else e||this.close()}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",(function(e){return e.stopPropagation()})),this.eventManager.addEventListener(this.TEXTAREA,"paste",(function(e){return e.stopPropagation()})),He()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(function(){return e.finishEditing(!1)})),this.addHook("afterScrollHorizontally",(function(){return e.refreshDimensions()})),this.addHook("afterScrollVertically",(function(){return e.refreshDimensions()})),this.addHook("afterColumnResize",(function(){e.refreshDimensions(),e.focus()})),this.addHook("afterRowResize",(function(){e.refreshDimensions(),e.focus()}))}},{key:"allowKeyEventPropagation",value:function(){}},{key:"destroy",value:function(){this.eventManager.destroy(),this.clearHooks()}},{key:"onBeforeKeyDown",value:function(e){var n=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===this.TEXTAREA&&!zt(e)){switch(e.keyCode){case Pt.ARROW_RIGHT:case Pt.ARROW_LEFT:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||Vt(e));break;case Pt.ARROW_UP:case Pt.ARROW_DOWN:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||Vt(e));break;case Pt.ENTER:var t=this.hot.selection.isMultiple();if(n&&!t||e.altKey){if(this.isOpened()){var r=dt(this.TEXTAREA),o=this.getValue(),i="".concat(o.slice(0,r),"\n").concat(o.slice(r));this.setValue(i),mt(this.TEXTAREA,r+1)}else this.beginEditing("".concat(this.originalValue,"\n"));Vt(e)}e.preventDefault();break;case Pt.BACKSPACE:case Pt.DELETE:case Pt.HOME:case Pt.END:Vt(e)}-1===[Pt.ARROW_UP,Pt.ARROW_RIGHT,Pt.ARROW_DOWN,Pt.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}}])&&Om(n.prototype,t),r&&Om(n,r),i}(Nr);function Um(e,n,t,r,o,i,a){var s=[],l=[];a.className&&Fn(n,a.className),a.readOnly&&s.push(a.readOnlyCellClassName),!1===a.valid&&a.invalidCellClassName?s.push(a.invalidCellClassName):l.push(a.invalidCellClassName),!1===a.wordWrap&&a.noWordWrapClassName&&s.push(a.noWordWrapClassName),!i&&a.placeholder&&s.push(a.placeholderCellClassName),Un(n,l),Fn(n,s)}Um.RENDERER_TYPE="base";function Qm(e,n,t,r,o,i,a){Um.apply(this,[e,n,t,r,o,i,a]);var s=i;if(!s&&a.placeholder&&(s=a.placeholder),s=Ze(s),e.getSettings().trimWhitespace&&(s=s.trim()),a.rendererTemplate){Yn(n);var l=e.rootDocument.createElement("TEMPLATE");l.setAttribute("bind","{{}}"),l.innerHTML=a.rendererTemplate,HTMLTemplateElement.decorate(l),l.model=e.getSourceDataAtRow(t),n.appendChild(l)}else Kn(n,s)}Qm.RENDERER_TYPE="text";var Ym={CELL_TYPE:"text",editor:Fm,renderer:Qm};function Wm(e,n){var t=new Bm(e,n||{},Wl);return t.init(),t}cu(Ym),Wm.Core=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Bm(e,n,Wl)},Wm.packageName="handsontable",Wm.buildDate="29/09/2021 10:35:47",Wm.version="10.0.0",Wm.languages={dictionaryKeys:p,getLanguageDictionary:eh,getLanguagesDictionaries:function(){return $f()},registerLanguageDictionary:Zf,getTranslatedPhrase:th};var Vm=Wm;function zm(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Km(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Km(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Km(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}},{key:"removeTable",value:function(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}},{key:"createColElement",value:function(e){var n=this.hot.rootDocument.createElement("col");return n.style.width="".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(e),"px"),n}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.hot.rootDocument,t=n.createDocumentFragment(),r=n.createElement("table"),o=n.createElement("thead"),i=n.createElement("tbody"),a=n.createElement("colgroup"),s=n.createElement("tr"),l=n.createElement("th");return this.isVertical()&&r.appendChild(a),this.isHorizontal()&&(s.appendChild(l),o.appendChild(s),r.style.tableLayout="auto",r.style.width="auto"),r.appendChild(o),this.isVertical()&&i.appendChild(s),r.appendChild(i),Fn(r,e),t.appendChild(r),{fragment:t,table:r,tHead:o,tBody:i,colGroup:a,tr:s,th:l}}},{key:"createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=this.hot.rootDocument,t=n.createDocumentFragment(),r=n.createElement("div"),o="htGhostTable htAutoSize ".concat(e.trim());return Fn(r,o),t.appendChild(r),{fragment:t,container:r}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}])&&Gm(n.prototype,t),r&&Gm(n,r),e}();function Jm(e){var n=new Date(e);return isNaN(new Date("".concat(e,"T00:00")).getDate())?n:new Date(n.getTime()+6e4*n.getTimezoneOffset())}function Xm(e){return(Xm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Zm(e,n){for(var t=0;tr.countRows()-1?r.deselectCell():r.selectCell(n,0),r.getData().length&&(e.preventDefault(),Vt(e),this.hot.listen(),this.TEXTAREA.focus())),ep(op(i.prototype),"onBeforeKeyDown",this).call(this,e)}}}])&&Zm(n.prototype,t),r&&Zm(n,r),i}(Fm);function ap(e){return(ap="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sp(e,n){for(var t=0;t-1}),n}return n=i,r=[{key:"EDITOR_TYPE",get:function(){return"autocomplete"}}],(t=[{key:"getValue",value:function(){var e=this,n=this.rawChoices.find((function(n){return e.stripValueIfNeeded(n)===e.TEXTAREA.value}));return en(n)?n:this.TEXTAREA.value}},{key:"createElements",value:function(){lp(hp(i.prototype),"createElements",this).call(this),Fn(this.htContainer,"autocompleteEditor"),Fn(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll")}},{key:"open",value:function(){var e=this,n=Ap.get(this);lp(hp(i.prototype),"open",this).call(this);var t=this.htEditor.getInstance(),r=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();var o=gt();0===o&&n.isMacOS&&(o+=15),t.updateSettings({colWidths:r?[it(this.TEXTAREA)-2]:void 0,width:r?it(this.TEXTAREA)+o:void 0,renderer:function(n,t,r,o,i,a,s){Qm(n,t,r,o,i,a,s);var l,u,c=e.cellProperties,d=c.filteringCaseSensitive,f=c.allowHtml,h=e.query,A=Ze(a);A&&!f&&-1!==(l=!0===d?A.indexOf(h):A.toLowerCase().indexOf(h.toLowerCase()))&&(u=A.substr(l,h.length),A=A.replace(u,"".concat(u,""))),t.innerHTML=A},autoColumnSize:!0}),n.skipOne&&(n.skipOne=!1),this.hot._registerTimeout((function(){e.queryChoices(e.TEXTAREA.value)}))}},{key:"close",value:function(){this.removeHooksByKey("beforeKeyDown"),lp(hp(i.prototype),"close",this).call(this)}},{key:"discardEditor",value:function(e){lp(hp(i.prototype),"discardEditor",this).call(this,e),this.hot.view.render()}},{key:"queryChoices",value:function(e){var n=this,t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(function(e){n.rawChoices=e,n.updateChoicesList(n.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}},{key:"updateChoicesList",value:function(e){var n=dt(this.TEXTAREA),t=ft(this.TEXTAREA),r=this.cellProperties.sortByRelevance,o=this.cellProperties.filter,a=null,s=null,l=e;r&&(a=i.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));var u=Array.isArray(a)?a.length:0;if(!1===o)u&&(s=a[0]);else{for(var c=[],d=0,f=l.length;dl&&s>l;return u?this.flipDropdown(t):this.unflipDropdown(),this.limitDropdownIfNeeded(u?s:l,t),u}},{key:"limitDropdownIfNeeded",value:function(e,n){if(n>e){var t,r=0,o=0,i=0;do{r+=i=this.htEditor.getRowHeight(o)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,o+=1}while(r=n?n*e:this.strippedChoices.length*e+8}},{key:"stripValueIfNeeded",value:function(e){return this.stripValuesIfNeeded([e])[0]}},{key:"stripValuesIfNeeded",value:function(e){var n=this.cellProperties.allowHtml,t=V(e,(function(e){return Ze(e)}));return V(t,(function(e){return n?e:Cn(e)}))}},{key:"allowKeyEventPropagation",value:function(e){var n=this.htEditor.getSelectedRangeLast(),t=n?n.from.row:-1,r=!1;return e===Pt.ARROW_DOWN&&t>0&&t-1&&(r=!0),r}},{key:"onBeforeKeyDown",value:function(e){var n=this,t=Ap.get(this);if(t.skipOne=!1,Ft(e.keyCode)||e.keyCode===Pt.BACKSPACE||e.keyCode===Pt.DELETE||e.keyCode===Pt.INSERT){var r=0;if(e.keyCode===Pt.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(r+=10),this.htEditor&&this.hot._registerTimeout((function(){n.queryChoices(n.TEXTAREA.value),t.skipOne=!0}),r)}lp(hp(i.prototype),"onBeforeKeyDown",this).call(this,e)}}])&&sp(n.prototype,t),r&&sp(n,r),i}(ip);function pp(e){return(pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gp(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function yp(e,n){for(var t=0;tn.charsLeft)return 1}return 0})),i=0,c=s.length;i0&&void 0!==arguments[0]?arguments[0]:null;xp(Tp(i.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.$datePicker.destroy(),this.instance._registerTimeout((function(){e.instance._refreshBorders()})),xp(Tp(i.prototype),"close",this).call(this)}},{key:"finishEditing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){var t=this.originalValue;void 0!==t&&this.setValue(t)}xp(Tp(i.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){var n,t=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.instance.view.isMouseDown(),i=!!e&&Ut(e.keyCode);this.datePickerStyle.top="".concat(this.hot.rootWindow.pageYOffset+t.top+at(this.TD),"px"),this.datePickerStyle.left="".concat(this.hot.rootWindow.pageXOffset+t.left,"px"),this.$datePicker=new Ep(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.originalValue?(n=this.originalValue,qe(n,r,!0).isValid()&&this.$datePicker.setMoment(qe(n,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),i||o||this.setValue("")):this.cellProperties.defaultDate?(n=this.cellProperties.defaultDate,qe(n,r,!0).isValid()&&this.$datePicker.setMoment(qe(n,r),!0),i||o||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block"}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var e=this,n=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&le(t,this.cellProperties.datePickerConfig);var r=t.onSelect,o=t.onClose;return t.field=n,t.trigger=n,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.onSelect=function(n){var t=n;isNaN(t.getTime())||(t=qe(t).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(t),e.hideDatepicker(),r&&r()},t.onClose=function(){e.parentDestroyed||e.finishEditing(!1),o&&o()},t}}])&&Sp(n.prototype,t),r&&Sp(n,r),i}(Fm);function Op(e){return(Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rp(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Dp(e,n){for(var t=0;t0&&(s-=1),parseInt(A.borderLeftWidth,10)>0&&(a-=1),h.height="".concat(s,"px"),h.minWidth="".concat(a,"px"),h.top="".concat(l,"px"),h.left="".concat(u,"px"),h.margin="0px",Fn(this.select,"ht_editor_visible")}else this.close()}},{key:"onBeforeKeyDown",value:function(){var e=this.select.selectedIndex-1,n=this.select.selectedIndex+1;switch(event.keyCode){case Pt.ARROW_UP:e>=0&&(this.select[e].selected=!0),Vt(event),event.preventDefault();break;case Pt.ARROW_DOWN:n<=this.select.length-1&&(this.select[n].selected=!0),Vt(event),event.preventDefault()}}}])&&sg(n.prototype,t),r&&sg(n,r),i}(Nr);function Ag(e,n,t,r,o,i,a){Um.apply(this,[e,n,t,r,o,i,a]),zn(n,null==i?"":i,!1)}Ag.RENDERER_TYPE="html";function mg(e,n,t,r,o,i,a){var s=e.rootDocument,l=a.allowHtml?Ag:Qm,u=s.createElement("DIV");if(u.className="htAutocompleteArrow",u.appendChild(s.createTextNode(String.fromCharCode(9660))),l.apply(this,[e,n,t,r,o,i,a]),n.firstChild||n.appendChild(s.createTextNode(String.fromCharCode(160))),n.insertBefore(u,n.firstChild),Fn(n,"htAutocomplete"),!e.acArrowListener){var c=new Sr(e);e.acArrowListener=function(o){Nn(o.target,"htAutocompleteArrow")&&e.view.wt.getSetting("onCellDblClick",null,new Ht(t,r),n)},c.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(function(){c.destroy()}))}}mg.RENDERER_TYPE="autocomplete";var pg=new WeakMap,gg=new WeakMap;function yg(e,n,t,r,o,i,a){var s=e.rootDocument;Um.apply(this,[e,n,t,r,o,i,a]),function(e){var n=gg.get(e);if(!n){var t=e.rootElement;(n=new Sr(e)).addEventListener(t,"click",(function(n){return function(e,n){var t=e.target;if(!vg(t))return;if(!t.hasAttribute("data-row")||!t.hasAttribute("data-col"))return;var r=parseInt(t.getAttribute("data-row"),10),o=parseInt(t.getAttribute("data-col"),10);n.getCellMeta(r,o).readOnly&&e.preventDefault()}(n,e)})),n.addEventListener(t,"mouseup",(function(n){return function(e,n){var t=e.target;if(!vg(t))return;if(!t.hasAttribute("data-row")||!t.hasAttribute("data-col"))return;setTimeout(n.listen,10)}(n,e)})),n.addEventListener(t,"change",(function(n){return function(e,n){var t=e.target;if(!vg(t))return;if(!t.hasAttribute("data-row")||!t.hasAttribute("data-col"))return;var r=parseInt(t.getAttribute("data-row"),10),o=parseInt(t.getAttribute("data-col"),10),i=n.getCellMeta(r,o);if(!i.readOnly){var a=null;a=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,n.setDataAtCell(r,o,a)}}(n,e)})),gg.set(e,n)}}(e);var l=function(e){var n=e.createElement("input");return n.className="htCheckboxRendererInput",n.type="checkbox",n.setAttribute("autocomplete","off"),n.setAttribute("tabindex","-1"),n.cloneNode(!1)}(s),u=a.label,c=!1;if(void 0===a.checkedTemplate&&(a.checkedTemplate=!0),void 0===a.uncheckedTemplate&&(a.uncheckedTemplate=!1),Yn(n),i===a.checkedTemplate||vn(i,a.checkedTemplate)?l.checked=!0:i===a.uncheckedTemplate||vn(i,a.uncheckedTemplate)?l.checked=!1:tn(i)?Fn(l,"noValue"):(l.style.display="none",Fn(l,"htBadValue"),c=!0),l.setAttribute("data-row",t),l.setAttribute("data-col",r),!c&&u){var d="";if(u.value)d="function"==typeof u.value?u.value.call(this,t,r,o,i):u.value;else if(u.property){var f=e.getDataAtRowProp(t,u.property);d=null!==f?f:""}var h=function(e,n,t){var r=e.createElement("label");return r.className="htCheckboxRendererLabel ".concat(t?"fullWidth":""),r.appendChild(e.createTextNode(n)),r.cloneNode(!0)}(s,d,!0!==u.separated);"before"===u.position?u.separated?(n.appendChild(h),n.appendChild(l)):(h.appendChild(l),l=h):u.position&&"after"!==u.position||(u.separated?(n.appendChild(l),n.appendChild(h)):(h.insertBefore(l,h.firstChild),l=h))}function A(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e.getSelectedRange();if(t)for(var r=0;r0&&e.setDataAtCell(c)}}(!u||u&&!u.separated)&&n.appendChild(l),c&&n.appendChild(s.createTextNode("#bad-value#")),pg.has(e)||(pg.set(e,!0),e.addHook("beforeKeyDown",(function(n){var t=Lt(Wt,n.keyCode);if(!e.getSettings().enterBeginsEditing&&t("ENTER"))return;t("".concat("SPACE|ENTER","|").concat("DELETE|BACKSPACE"))&&!zt(n)&&function(n){var t=e.getSelectedRange();if(!t)return;for(var r=0;r0&&!l.readOnly&&n(c)}}}((function(){Vt(n),n.preventDefault()}));t("SPACE|ENTER")&&A();t("DELETE|BACKSPACE")&&A(!0)})))}function vg(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}sr.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,n,t){var r=n.label,o=n.type,i=n.row,a=n.column,s=n.prop;if("checkbox"===o){if(r){var l=r.value,u=r.property,c=t;if(l)c="function"==typeof l?l(i,a,s,t):l;else if(u){var d=this.getDataAtRowProp(i,u);c=null!==d?d:t}e=c}return e}})),yg.RENDERER_TYPE="checkbox";var bg=t("./node_modules/numbro/dist/numbro.min.js");function wg(e,n,t,r,o,i,a){var s=i;if(ro(s)){var l=a.numericFormat,u=l&&l.culture||"-",c=l&&l.pattern,d=a.className||"",f=d.length?d.split(" "):[];if(void 0!==u&&!bg.languages()[u]){var h=u.replace("-",""),A=bg.allLanguages?bg.allLanguages[u]:bg[h];A&&bg.registerLanguage(A)}bg.setLanguage(u),s=bg(s).format(c||"0"),f.indexOf("htLeft")<0&&f.indexOf("htCenter")<0&&f.indexOf("htRight")<0&&f.indexOf("htJustify")<0&&f.push("htRight"),f.indexOf("htNumeric")<0&&f.push("htNumeric"),a.className=f.join(" ")}Qm(e,n,t,r,o,s,a)}wg.RENDERER_TYPE="numeric";function _g(e,n,t,r,o,i,a){Qm.apply(this,[e,n,t,r,o,i,a]);var s=a.hashLength||n.innerHTML.length,l=a.hashSymbol||"*",u="";io(s-1,(function(){u+=l})),zn(n,u)}_g.RENDERER_TYPE="password";function Cg(e,n){var t=e;null==t&&(t=""),this.allowEmpty&&""===t?n(!0):this.strict&&this.source?"function"==typeof this.source?this.source(t,Eg(t,n)):Eg(t,n)(this.source):n(!0)}function Eg(e,n){var t=e;return function(e){for(var r=!1,o=0,i=e.length;o-1;t=r.isValid()&&r.format("x")===o.format("x")||!o.isValid()||i?r:o;return t.format(n)}(r,this.dateFormat),l=this.instance.toVisualRow(this.row),u=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(l,u,s,"dateValidator"),o=!0}else o=!1;n(o)}kg.VALIDATOR_TYPE="date";function Sg(e,n){var t=e;null==t&&(t=""),this.allowEmpty&&""===t?n(!0):n(""!==t&&ro(e))}Sg.VALIDATOR_TYPE="numeric";var xg=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function Mg(e,n){var t=this.timeFormat||"h:mm:ss a",r=!0,o=e;null===o&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;var i=/^\d{1,2}$/.test(o);i&&(o+=":00");var a=qe(o,xg,!0).isValid()?qe(o):qe(o,t),s=a.isValid(),l=qe(o,t,!0).isValid()&&!i;if(this.allowEmpty&&""===o&&(s=!0,l=!0),s||(r=!1),!s&&l&&(r=!0),s&&!l)if(!0===this.correctFormat){var u=a.format(t),c=this.instance.toVisualRow(this.row),d=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(c,d,u,"timeValidator"),r=!0}else r=!1;n(r)}Mg.VALIDATOR_TYPE="time";var jg={CELL_TYPE:"autocomplete",editor:mp,renderer:mg,validator:Cg},Bg={CELL_TYPE:"checkbox",editor:Cp,renderer:yg},Tg={CELL_TYPE:"date",editor:Lp,renderer:mg,validator:kg},Lg={CELL_TYPE:"dropdown",editor:Up,renderer:mg,validator:Cg},Og={CELL_TYPE:"handsontable",editor:ip,renderer:mg},Rg={CELL_TYPE:"numeric",editor:qp,renderer:wg,validator:Sg,dataType:"number"},Dg={CELL_TYPE:"password",editor:og,renderer:_g,copyable:!1},Ig={CELL_TYPE:"time",editor:Fm,renderer:Qm,validator:Mg};function Hg(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Pg(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Pg(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pg(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0){var r=[];if(t.forEach((function(e){var n=Hg(e.split(":"),2),t=n[0],o=n[1];if(!Fg.has(t))throw new Error('Unknown plugin dependency type "'.concat(t,'" was found.'));Fg.get(t)(o)||r.push(" - ".concat(o," (").concat(t,")"))})),r.length>0){var o=["The ".concat(this.pluginName," plugin requires the following modules:\n"),"".concat(r.join("\n"),"\n")].join("");Qg.push(o)}}if(Yg||(Yg=Ro()),Yg.indexOf("UndoRedo")>=0&&Yg.splice(Yg.indexOf("UndoRedo"),1),Yg.indexOf(this.pluginName)>=0&&Yg.splice(Yg.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(function(){e.isEnabled&&e.isEnabled()&&e.enablePlugin()})),0===Yg.length){if(Qg.length>0){var i=["".concat(Qg.join("\n"),"\n"),"You have to import and register them manually."].join("");throw new Error(i)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}},{key:"enablePlugin",value:function(){this.enabled=!0}},{key:"disablePlugin",value:function(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}},{key:"addHook",value:function(e,n){Ug.get(this).hooks[e]=Ug.get(this).hooks[e]||[];var t=Ug.get(this).hooks[e];this.hot.addHook(e,n),t.push(n),Ug.get(this).hooks[e]=t}},{key:"removeHooks",value:function(e){var n=this;z(Ug.get(this).hooks[e]||[],(function(t){n.hot.removeHook(e,t)}))}},{key:"clearHooks",value:function(){var e=this,n=Ug.get(this).hooks;me(n,(function(n,t){return e.removeHooks(t)})),n.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){z(this.pluginsInitializedCallbacks,(function(e){return e()})),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(e){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin(e))}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),me(this,(function(n,t){"hot"!==t&&(e[t]=null)})),delete this.t,delete this.hot}}])&&Ng(n.prototype,t),r&&Ng(n,r),e}();function Vg(e,n){for(var t=0;t0;s=d?c:he(u)?"".concat(Object.keys(u).length):Array.isArray(u)?"".concat(u.length):"".concat(Ze(u).length),o.has(s)||o.set(s,{needed:r.getSampleCount(),strings:[]});var f=o.get(s);f.needed&&(!(a.indexOf(u)>-1)||r.allowDuplicates||d)&&(f.strings.push(function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}({value:u},i,n)),a.push(u),f.needed-=1)})),o}}])&&Vg(n.prototype,t),r&&Vg(n,r),e}();function Kg(e){return(Kg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gg(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return qg(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qg(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qg(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="number"==typeof n?{from:n,to:n}:n,i="number"==typeof t?{from:t,to:t}:t;io(o.from,o.to,(function(n){var t=e.hot.toPhysicalColumn(n);null===t&&(t=n),(r||null===e.columnWidthsMap.getValueAtIndex(t)&&!e.hot._getColWidthFromSettings(t))&&z(e.samplesGenerator.generateColumnSamples(n,i),(function(n){var t=Gg(n,2),r=t[0],o=t[1];return e.ghostTable.addColumn(r,o)}))})),this.ghostTable.columns.length&&(this.hot.batchExecution((function(){e.ghostTable.getWidths((function(n,t){var r=e.hot.toPhysicalColumn(n);e.columnWidthsMap.setValueAtIndex(r,t)}))}),!0),this.measuredColumns=o.to+1,this.ghostTable.clean())}},{key:"calculateAllColumnsWidth",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0,r=this.hot.countCols()-1,o=null;this.inProgress=!0;var a=function a(){if(!e.hot)return D(o),void(e.inProgress=!1);e.calculateColumnsWidth({from:t,to:Math.min(t+i.CALCULATION_STEP,r)},n),(t=t+i.CALCULATION_STEP+1)=0&&(this.calculateColumnsWidth({from:0,to:s},n),this.firstCalculation=!1,t=s+1),t>=0),Math.min(n,t)}},{key:"getColumnWidth",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof r&&(r=Math.max(r,Dl.DEFAULT_WIDTH))),r}},{key:"getFirstVisibleColumn",value:function(){var e=this.hot.view.wt;if(e.wtViewport.columnsVisibleCalculator){var n=e.wtTable.getFirstVisibleColumn();if(-1!==n)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(n)}if(e.wtViewport.columnsRenderCalculator){var t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}},{key:"getLastVisibleColumn",value:function(){var e=this.hot.view.wt;if(e.wtViewport.columnsVisibleCalculator){var n=e.wtTable.getLastVisibleColumn();if(-1!==n)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(n)}if(e.wtViewport.columnsRenderCalculator){var t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}},{key:"findColumnsWhereHeaderWasChanged",value:function(){var e=this.hot.getColHeader(),n=ry.get(this).cachedColumnHeaders;return Y(e,(function(e,t,r){var o=n.length;return(o-10&&void 0!==arguments[0]?arguments[0]:[];n.length?this.hot.batchExecution((function(){z(n,(function(n){e.columnWidthsMap.setValueAtIndex(n,null)}))}),!0):this.columnWidthsMap.clear()}},{key:"isNeedRecalculate",value:function(){return!!W(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(function(e){return null===e})).length}},{key:"onBeforeViewRender",value:function(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllColumnsWidth():setTimeout((function(){e.hot&&e.recalculateAllColumnsWidth()}),0)}},{key:"onBeforeChange",value:function(e){var n=this,t=V(e,(function(e){var t=Gg(e,2)[1];return n.hot.toPhysicalColumn(n.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}},{key:"onBeforeColumnResize",value:function(e,n,t){var r=e;return t&&(this.calculateColumnsWidth(n,void 0,!0),r=this.getColumnWidth(n,void 0,!1)),r}},{key:"onAfterInit",value:function(){ry.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"onAfterFormulasValuesUpdate",value:function(e){var n=V(W(e,(function(e){var n;return en(null===(n=e.address)||void 0===n?void 0:n.col)})),(function(e){return e.address.col}));this.clearCache(Array.from(new Set(n)))}},{key:"destroy",value:function(){this.ghostTable.clean(),Xg(ty(i.prototype),"destroy",this).call(this)}}])&&Jg(n.prototype,t),r&&Jg(n,r),i}(Wg),iy={horizontal:"horizontal",vertical:"vertical"};function ay(e){return(ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sy(e){return function(e){if(Array.isArray(e))return cy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||uy(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ly(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||uy(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uy(e,n){if(e){if("string"==typeof e)return cy(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?cy(e,n):void 0}}function cy(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te[3]?(o="right",t=new Ht(n[0],e[3]+1),r=new Ht(n[2],n[3])):n[0]e[2]&&n[1]===e[1]&&(o="down",t=new Ht(e[2]+1,n[1]),r=new Ht(n[2],n[3])),t&&t.normalize(),r&&r.normalize(),{directionOfDrag:o,startOfDragCoords:t,endOfDragCoords:r}}(l,u),d=c.directionOfDrag,f=c.startOfDragCoords,h=c.endOfDragCoords;if(f&&f.row>-1&&f.col>-1){var A=this.getSelectionData(),m=i.clone(),p=new fh(f,f,h),g=this.hot.runHooks("beforeAutofill",A,m,p,d);if(!1===g)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;var y=function(e,n,t,r){var o=t.length,i=t?t[0].length:0,a=[],s=n.row-e.row,l=n.col-e.col;if(-1!==["down","up"].indexOf(r)){for(var u=[],c=0;c-1&&(1!==b.length||0!==b[0].length))if(v=[],"up"===d)for(var w=h.row-f.row+1,_=w%b.length,C=0;C=e.col)&&(r=new Ht(t.row,e.col)),(t.rowe.row)&&(r=new Ht(e.row,t.col))}else if(this.directions.includes(iy.vertical))r=new Ht(e.row,t.col);else{if(!this.directions.includes(iy.horizontal))return;r=new Ht(t.row,e.col)}return this.reduceSelectionAreaIfNeeded(r)}},{key:"showBorder",value:function(e){var n=this.getCoordsOfDragAndDropBorders(e);n&&this.redrawBorders(n)}},{key:"addRow",value:function(){var e=this;this.hot._registerTimeout((function(){e.hot.alter("insert_row",void 0,1,"".concat(e.pluginName,".fill")),e.addingStarted=!1}),200)}},{key:"addNewRowIfNeeded",value:function(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){var e=this.hot.getSelectedLast(),n=this.hot.selection.highlight.getFill().getVisualCorners(),t=this.hot.countRows();e[2]t&&e.clientX<=r}},{key:"registerEvents",value:function(){var e=this,n=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(n,"mouseup",(function(){return e.onMouseUp()})),this.eventManager.addEventListener(n,"mousemove",(function(n){return e.onMouseMove(n)}))}},{key:"onCellCornerDblClick",value:function(){this.selectAdjacent()&&this.fillIn()}},{key:"onAfterCellCornerMouseDown",value:function(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}},{key:"onBeforeCellMouseOver",value:function(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}},{key:"onMouseUp",value:function(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}},{key:"onMouseMove",value:function(e){var n=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&n?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}},{key:"clearMappedSettings",value:function(){this.directions.length=0,this.autoInsertRow=!1}},{key:"mapSettings",value:function(){var e=function(e){var n={};return!0===e?(n.directions=Object.keys(iy),n.autoInsertRow=!0):he(e)?(en(e.autoInsertRow)?e.direction===iy.horizontal?n.autoInsertRow=!1:n.autoInsertRow=e.autoInsertRow:n.autoInsertRow=!1,en(e.direction)?n.directions=[e.direction]:n.directions=Object.keys(iy)):"string"==typeof e?(n.directions=[e],n.autoInsertRow=!0):(n.directions=[],n.autoInsertRow=!1),n}(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}},{key:"destroy",value:function(){fy(gy(i.prototype),"destroy",this).call(this)}}])&&dy(n.prototype,t),r&&dy(n,r),i}(Wg);function vy(e){return(vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function by(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return wy(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return wy(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wy(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0?r=n.hot.getDataAtCell(e,t):-1===e&&(r=n.hot.getColHeader(t)),{value:r}})),n.firstCalculation=!0,n.inProgress=!1,n.measuredRows=0,n.rowHeightsMap=new oc,n.hot.rowIndexMapper.registerMap("autoRowSize",n.rowHeightsMap),n.addHook("beforeRowResize",(function(e,t,r){return n.onBeforeRowResize(e,t,r)})),n}return n=i,r=[{key:"PLUGIN_KEY",get:function(){return"autoRowSize"}},{key:"PLUGIN_PRIORITY",get:function(){return 40}},{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}],(t=[{key:"isEnabled",value:function(){var e=this.hot.getSettings().autoRowSize;return!0===e||he(e)}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){return e.onAfterLoadData()})),this.addHook("beforeChange",(function(n){return e.onBeforeChange(n)})),this.addHook("beforeColumnResize",(function(){return e.recalculateAllRowsHeight()})),this.addHook("beforeViewRender",(function(n){return e.onBeforeViewRender(n)})),this.addHook("modifyRowHeight",(function(n,t){return e.getRowHeight(t,n)})),this.addHook("modifyColumnHeaderHeight",(function(){return e.getColumnHeaderHeight()})),Cy(xy(i.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){var e=this;this.headerHeight=null,Cy(xy(i.prototype),"disablePlugin",this).call(this),this.addHook("beforeRowResize",(function(n,t,r){return e.onBeforeRowResize(n,t,r)}))}},{key:"calculateRowsHeight",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o="number"==typeof n?{from:n,to:n}:n,i="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){var a=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(a.get(-1))}io(o.from,o.to,(function(n){(r||null===e.rowHeightsMap.getValueAtIndex(n))&&z(e.samplesGenerator.generateRowSamples(n,i),(function(n){var t=by(n,2),r=t[0],o=t[1];return e.ghostTable.addRow(r,o)}))})),this.ghostTable.rows.length&&(this.hot.batchExecution((function(){e.ghostTable.getHeights((function(n,t){n<0?e.headerHeight=t:e.rowHeightsMap.setValueAtIndex(e.hot.toPhysicalRow(n),t)}))}),!0),this.measuredRows=o.to+1,this.ghostTable.clean())}},{key:"calculateAllRowsHeight",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0,r=this.hot.countRows()-1,o=null;this.inProgress=!0;var a=function a(){if(!e.hot)return D(o),void(e.inProgress=!1);e.calculateRowsHeight({from:t,to:Math.min(t+i.CALCULATION_STEP,r)},n),(t=t+i.CALCULATION_STEP+1)=0&&(this.calculateRowsHeight({from:0,to:s},n),this.firstCalculation=!1,t=s+1),t>=0),Math.min(n,t)}},{key:"getRowHeight",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,t=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e)),r=n;return null!==t&&t>(n||0)&&(r=t),r}},{key:"getColumnHeaderHeight",value:function(){return this.headerHeight}},{key:"getFirstVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}},{key:"getLastVisibleRow",value:function(){var e=this.hot.view.wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}},{key:"clearCache",value:function(){this.headerHeight=null,this.rowHeightsMap.init()}},{key:"clearCacheByRange",value:function(e){var n=this,t="number"==typeof e?{from:e,to:e}:e,r=t.from,o=t.to;this.hot.batchExecution((function(){io(Math.min(r,o),Math.max(r,o),(function(e){n.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}},{key:"isNeedRecalculate",value:function(){return!!W(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(function(e){return null===e})).length}},{key:"onBeforeViewRender",value:function(){var e=this.hot.renderCall,n=this.hot.getSettings().fixedRowsBottom,t=this.getFirstVisibleRow(),r=this.getLastVisibleRow();if(-1!==t&&-1!==r){if(this.calculateRowsHeight({from:t,to:r},void 0,e),n){var o=this.hot.countRows()-1;this.calculateRowsHeight({from:o-n,to:o})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}},{key:"onBeforeRowMove",value:function(e,n){this.clearCacheByRange({from:e,to:n}),this.calculateAllRowsHeight()}},{key:"onBeforeRowResize",value:function(e,n,t){var r=e;return t&&(this.calculateRowsHeight(n,void 0,!0),r=this.getRowHeight(n)),r}},{key:"onAfterLoadData",value:function(){var e=this;this.hot.view?this.recalculateAllRowsHeight():setTimeout((function(){e.hot&&e.recalculateAllRowsHeight()}),0)}},{key:"onBeforeChange",value:function(e){var n=null;1===e.length?n=e[0][0]:e.length>1&&(n={from:e[0][0],to:e[e.length-1][0]}),null!==n&&this.clearCacheByRange(n)}},{key:"destroy",value:function(){this.ghostTable.clean(),Cy(xy(i.prototype),"destroy",this).call(this)}}])&&_y(n.prototype,t),r&&_y(n,r),i}(Wg),jy=new Map([["indexesSequence",{getListWithInsertedItems:Ru,getListWithRemovedItems:Du}],["physicallyIndexed",{getListWithInsertedItems:Gu,getListWithRemovedItems:qu}]]),By=function(e){if(!1===jy.has(e))throw new Error("Alter strategy with ID '".concat(e,"' does not exist."));return jy.get(e)};function Ty(e){return(Ty="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ly(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1}})):Array.isArray(e)&&this.headerStateManager.mergeStateWith(e)}Av(vv(i.prototype),"updatePlugin",this).call(this)}}},{key:"disablePlugin",value:function(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Cv(this,Sv,null),this.nestedHeadersPlugin=null,this.clearButtons(),Av(vv(i.prototype),"disablePlugin",this).call(this)}},{key:"clearButtons",value:function(){if(this.hot.view){var e=this.hot.view.wt.getSetting("columnHeaders").length,n=this.hot.view.wt.wtTable.THEAD,t=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view.wt.wtOverlays.topLeftCornerOverlay?this.hot.view.wt.wtOverlays.topLeftCornerOverlay.clone.wtTable.THEAD:null,o=function(e){e&&e.parentNode.removeChild(e)};io(0,e-1,(function(e){var i=n.childNodes[e],a=t.childNodes[e],s=r?r.childNodes[e]:null;io(0,i.childNodes.length-1,(function(e){var n=i.childNodes[e].querySelector(".collapsibleIndicator");o(n),a&&a.childNodes[e]&&(n=a.childNodes[e].querySelector(".collapsibleIndicator"),o(n)),r&&s&&s.childNodes[e]&&(n=s.childNodes[e].querySelector(".collapsibleIndicator"),o(n))}))}))}}},{key:"expandSection",value:function(e){this.toggleCollapsibleSection([e],"expand")}},{key:"collapseSection",value:function(e){this.toggleCollapsibleSection([e],"collapse")}},{key:"toggleAllCollapsibleSections",value:function(e){var n=this,t=this.headerStateManager.mapNodes((function(e){var t=e.collapsible,r=e.origColspan,o=e.headerLevel,i=e.columnIndex;if(!0===t&&r>1)return{row:n.headerStateManager.levelToRowCoords(o),col:i}}));this.toggleCollapsibleSection(t,e)}},{key:"collapseAll",value:function(){this.toggleAllCollapsibleSections("collapse")}},{key:"expandAll",value:function(){this.toggleAllCollapsibleSections("expand")}},{key:"toggleCollapsibleSection",value:function(e,n){var t=this;if(!kv.has(n))throw new Error("Unsupported action is passed (".concat(n,")."));if(Array.isArray(e)){var r=W(e,(function(e){return e.row<0})),o=r.length>0;z(r,(function(e){var r,i=e.row,a=e.col,s=null!==(r=t.headerStateManager.getHeaderSettings(i,a))&&void 0!==r?r:{},l=s.collapsible,u=s.isCollapsed;if(!l||u&&"collapse"===n||!u&&"expand"===n)return o=!1,!1}));var i=[],a=[];o&&z(r,(function(e){var r=e.row,o=e.col,s=t.headerStateManager.triggerNodeModification(n,r,o),l=s.colspanCompensation,u=s.affectedColumns,c=s.rollbackModification;l>0&&(a.push.apply(a,cv(u)),i.push(c))}));var s=this.getCollapsedColumns(),l=[];"collapse"===n?l=$([].concat(cv(s),a)):"expand"===n&&(l=W(s,(function(e){return!a.includes(e)})));var u=kv.get(n);if(!1!==this.hot.runHooks(u.beforeHook,s,l,o)){this.hot.batchExecution((function(){z(a,(function(e){_v(t,Sv).setValueAtIndex(t.hot.toPhysicalColumn(e),u.hideColumn)}))}),!0);var c=this.getCollapsedColumns().length!==s.length;this.hot.runHooks(u.afterHook,s,l,o,c),this.hot.render(),this.hot.view.adjustElementsSize(!0)}else z(i,(function(e){e()}))}}},{key:"getCollapsedColumns",value:function(){return _v(this,Sv).getHiddenIndexes()}},{key:"generateIndicator",value:function(e,n){var t=this.hot.rootDocument.createElement("div"),r=this.headerStateManager.getHeaderSettings(e,n);return Fn(t,"collapsibleIndicator"),r.isCollapsed?(Fn(t,"collapsed"),Kn(t,"+")):(Fn(t,"expanded"),Kn(t,"-")),t}},{key:"onAfterGetColHeader",value:function(e,n){var t,r=n.parentNode,o=r.parentNode,i=-1*o.childNodes.length+Array.prototype.indexOf.call(o.childNodes,r),a=null!==(t=this.headerStateManager.getHeaderSettings(i,e))&&void 0!==t?t:{},s=a.collapsible,l=a.origColspan;if(s&&l>1&&e>=this.hot.getSettings().fixedColumnsLeft){var u=this.generateIndicator(i,e);n.querySelector("div:first-child").appendChild(u)}}},{key:"onBeforeOnCellMouseDown",value:function(e,n){Nn(e.target,"collapsibleIndicator")&&(Nn(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([n],"collapse")):Nn(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([n],"expand")),Vt(e))}},{key:"onInit",value:function(){this.updatePlugin()}},{key:"onAfterLoadData",value:function(e,n){n||this.updatePlugin()}},{key:"destroy",value:function(){Cv(this,Sv,null),Av(vv(i.prototype),"destroy",this).call(this)}}])&&hv(n.prototype,t),r&&hv(n,r),i}(Wg);function Mv(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function jv(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Bv(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Tv(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Tv(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tv(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0&&!1===Kt(t)}var Qv=new Map([[Dv,"ascending"],[Iv,"descending"]]);function Yv(e,n,t,r){var o=["columnSorting"];if(r&&o.push("sortAction"),!1===t)return o.push("indicatorDisabled"),o;var i=e.getSortOrderOfColumn(n);return en(i)&&o.push(Qv.get(i)),o}function Wv(){return Array.from(Qv.values()).concat("sortAction","indicatorDisabled","columnSorting")}function Vv(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:qv,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.length;if(Math.abs(r-t)<=1)return[];var o=Math.ceil((t+r)/2);return Jv(e,n,t,o),Jv(e,n,o,r),Xv(e,n,t,o,r)}function Xv(e,n,t,r,o){for(var i=new Gv,a=new Gv,s=r-t,l=o-r,u=Math.max(s,l),c=o-t,d=0;d0?e[t+f]=a.shift().data:e[t+f]=i.shift().data:i.first?e[t+f]=i.shift().data:e[t+f]=a.shift().data,f+=1;return e}function $v(e,n,t){return function(n,r){var o=t.sortEmptyCells;return"string"==typeof n&&(n=n.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),n===r?0:tn(n)?tn(r)?0:o&&"asc"===e?-1:1:tn(r)?o&&"asc"===e?1:-1:isNaN(n)&&!isNaN(r)?"asc"===e?1:-1:!isNaN(n)&&isNaN(r)?"asc"===e?-1:1:(isNaN(n)||isNaN(r)||(n=parseFloat(n),r=parseFloat(r)),nr?"asc"===e?1:-1:0)}}var Zv=dr("sorting.compareFunctionFactory"),eb=Zv.register,nb=Zv.getItem,tb=Zv.hasItem,rb=dr("sorting.mainSortComparator"),ob=rb.register,ib=rb.getItem;function ab(e){return tb(e)?nb(e):nb("default")}function sb(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return lb(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return lb(e,n)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lb(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);ti?"asc"===e?1:-1:0}})),eb("checkbox",(function(e,n,t){var r=n.checkedTemplate,o=n.uncheckedTemplate,i=t.sortEmptyCells;return function(n,a){var s=tn(n),l=tn(a),u=s?o:n,c=l?o:a,d=u===o||u===r,f=c===o||c===r;if(!1===i){if(s&&!1===l)return 1;if(!1===s&&l)return-1}return!1===d&&f?"asc"===e?-1:1:d&&!1===f?"asc"===e?1:-1:!1===d&&!1===f?$v(e,0,t)(n,a):u===o&&c===r?"asc"===e?-1:1:u===r&&c===o?"asc"===e?1:-1:0}})),eb("date",(function(e,n,t){return function(r,o){var i=t.sortEmptyCells;if(r===o)return 0;if(tn(r))return tn(o)?0:i&&"asc"===e?-1:1;if(tn(o))return i&&"asc"===e?1:-1;var a=n.dateFormat,s=qe(r,a),l=qe(o,a);return s.isValid()?l.isValid()?l.isAfter(s)?"asc"===e?-1:1:l.isBefore(s)?"asc"===e?1:-1:0:-1:1}})),eb("default",$v);var cb=["column"],db=["column"];function fb(e){return function(e){if(Array.isArray(e))return hb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return hb(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hb(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hb(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function yb(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}},{key:"areValidSortConfigs",value:function(e){var n=this.hot.countCols();return Hv(e)&&e.every((function(e){var t=e.column;return t<=n&&t>=0}))}},{key:"saveAllSortSettings",value:function(e){var n=this,t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=V(e,(function(e){var t=e.column,r=gb(e,cb);return mb({column:n.hot.toPhysicalColumn(t)},r)})),this.hot.runHooks("persistentStateSave","columnSorting",t)}},{key:"getAllSavedSortSettings",value:function(){var e=this,n={};this.hot.runHooks("persistentStateLoad","columnSorting",n);var t=n.value;return en(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=V(t.initialConfig,(function(n){var t=n.column,r=gb(n,db);return mb({column:e.hot.toVisualColumn(t)},r)}))),t}},{key:"getColumnNextConfig",value:function(e){var n=this.columnStatesManager.getSortOrderOfColumn(e);if(en(n)){var t=Pv(n);return en(t)?{column:e,sortOrder:t}:void 0}var r=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e1&&void 0!==arguments[1]?arguments[1]:"append",t=this.columnStatesManager.getIndexOfColumnInSortQueue(e),r=-1!==t,o=this.getSortConfig(),i=this.getColumnNextConfig(e);if(r){if(nn(i))return[].concat(fb(o.slice(0,t)),fb(o.slice(t+1)));if("append"===n)return[].concat(fb(o.slice(0,t)),fb(o.slice(t+1)),[i]);if("replace"===n)return[].concat(fb(o.slice(0,t)),[i],fb(o.slice(t+1)))}return en(i)?o.concat(i):o}},{key:"getPluginColumnConfig",value:function(e){if(he(e)){var n=e[this.pluginKey];if(he(n))return n}return{}}},{key:"getMergedPluginSettings",value:function(e){var n=this.hot.getSettings()[this.pluginKey],t=this.columnStatesManager.getAllColumnsProperties(),r=this.hot.getCellMeta(0,e),o=Object.getPrototypeOf(r);return Array.isArray(o.columns)?Object.assign(t,n,this.getPluginColumnConfig(o.columns[e])):xt(o.columns)?Object.assign(t,n,this.getPluginColumnConfig(o.columns(e))):Object.assign(t,n)}},{key:"getFirstCellSettings",value:function(e){var n=this.hot.getCellMeta(0,e),t=Object.create(n);return t[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),t}},{key:"getNumberOfRowsToSort",value:function(e){var n=this.hot.getSettings();return n.maxRows<=e?n.maxRows:e-n.minSpareRows}},{key:"sortByPresetSortStates",value:function(e){var n=this;if(0!==e.length){for(var t=[],r=this.hot.countRows(),o=function(t){return V(e,(function(e){return n.hot.getDataAtCell(t,e.column)}))},i=0;i2?r-2:0),i=2;i1?n-1:0),r=1;r-1?"row":"col",o=this.getAllEndpoints();z(o,(function(o){"row"===r&&o.destinationRow>=n&&("insert_row"===e?o.alterRowOffset=t:"remove_row"===e&&(o.alterRowOffset=-1*t)),"col"===r&&o.destinationColumn>=n&&("insert_col"===e?o.alterColumnOffset=t:"remove_col"===e&&(o.alterColumnOffset=-1*t))})),this.resetAllEndpoints(o,!1)}}},{key:"resetSetupAfterStructureAlteration",value:function(e,n,t,r,o){var i=this,a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"!==this.settingsType){var s=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,u=this.getAllEndpoints(),c=0===e.indexOf("move_row"),d=n;z(u,(function(e){"row"===s&&e.destinationRow>=d&&(e.alterRowOffset=l*t),"col"===s&&e.destinationColumn>=d&&(e.alterColumnOffset=l*t)})),this.resetAllEndpoints(u,!c),z(u,c?function(e){i.extendEndpointRanges(e,d,r[0],r.length),i.recreatePhysicalRanges(e),i.clearOffsetInformation(e)}:function(e){i.shiftEndpointCoordinates(e,d)}),a&&this.refreshAllEndpoints()}else{var f=function e(){return i.hot.removeHook("beforeViewRender",e),i.refreshAllEndpoints()};this.hot.addHookOnce("beforeViewRender",f)}}},{key:"clearOffsetInformation",value:function(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}},{key:"extendEndpointRanges",value:function(e,n,t,r){z(e.ranges,(function(e){e[1]&&(n>=e[0]&&n<=e[1]?t>e[1]?e[1]+=r:t=e[0]&&t<=e[1]&&(e[1]-=r,n<=e[0]&&(e[0]+=1,e[1]+=1)))}))}},{key:"recreatePhysicalRanges",value:function(e){var n=this,t=e.ranges,r=[],o=[];z(t,(function(e){var t=[];if(e[1])for(var r=e[0];r<=e[1];r++)t.push(n.hot.toPhysicalRow(r));else t.push(n.hot.toPhysicalRow(e[0]));o.push(t)})),z(o,(function(e){var n=[];z(e,(function(t,o){0===o?n.push(t):e[o]!==e[o-1]+1&&(n.push(e[o-1]),r.push(n),(n=[]).push(t)),o===e.length-1&&(n.push(t),r.push(n))}))})),e.ranges=r}},{key:"shiftEndpointCoordinates",value:function(e,n){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,z(e.ranges,(function(t){z(t,(function(r,o){r>=n&&(t[o]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}},{key:"resetAllEndpoints",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.some((function(n){var t=n.alterRowOffset||0,r=n.alterColumnOffset||0;return n.destinationRow+t>=e.hot.countRows()||n.destinationColumn+r>=e.hot.countCols()}));r||(this.cellsToSetCache=[],z(n,(function(n){e.resetEndpointValue(n,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}},{key:"refreshAllEndpoints",value:function(){var e=this;this.cellsToSetCache=[],z(this.getAllEndpoints(),(function(n){e.currentEndpoint=n,e.plugin.calculate(n),e.setEndpointValue(n,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshChangedEndpoints",value:function(e){var n=this,t=[];this.cellsToSetCache=[],z(e,(function(e,r,o){"".concat(e[2]||"")!=="".concat(e[3])&&z(n.getAllEndpoints(),(function(e,i){n.hot.propToCol(o[r][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)}))})),z(t,(function(e){n.refreshEndpoint(n.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}},{key:"refreshEndpoint",value:function(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}},{key:"resetEndpointValue",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=e.alterRowOffset||0,r=e.alterColumnOffset||0,o=[this.hot.toVisualRow(e.destinationRow),this.hot.toVisualColumn(e.destinationColumn)],i=o[0],a=o[1];if(null!==a&&null!==i){var s=this.hot.getCellMeta(i,a);s.readOnly=!1,s.className=""}this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(n?t:0)),this.hot.toVisualColumn(e.destinationColumn+(n?r:0)),""])}},{key:"setEndpointValue",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1*e.alterRowOffset||0,o=-1*e.alterColumnOffset||0,i=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())this.throwOutOfBoundsWarning();else{var a=this.hot.toVisualRow(e.destinationRow+r);if(null!==a){var s=this.hot.getCellMeta(a,e.destinationColumn+o);"init"!==n&&s.readOnly===e.readOnly||(s.readOnly=e.readOnly,s.className="columnSummaryResult")}e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),t?this.hot.setDataAtCell(i,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([i,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}}},{key:"throwOutOfBoundsWarning",value:function(){Jt("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}])&&kb(n.prototype,t),r&&kb(n,r),e}();function Mb(e){return(Mb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jb(e,n){for(var t=0;ti&&(i=a),t+=o||0,r-=1}while(r>=e[0]);return Math.round(t*Math.pow(10,i))/Math.pow(10,i)}},{key:"calculateMinMax",value:function(e,n){var t=this,r=null;return me(e.ranges,(function(o){var i=t.getPartialMinMax(o,e.sourceColumn,n);if(null===r&&null!==i&&(r=i),null!==i)switch(n){case"min":r=Math.min(r,i);break;case"max":r=Math.max(r,i)}})),null===r?"Not enough data":r}},{key:"getPartialMinMax",value:function(e,n,t){var r,o=null,i=e[1]||e[0];do{if(r=this.getCellValue(i,n)||null,null===o)o=r;else if(null!==r)switch(t){case"min":o=Math.min(o,r);break;case"max":o=Math.max(o,r)}i-=1}while(i>=e[0]);return o}},{key:"countEmpty",value:function(e,n){var t=0,r=e[1]||e[0];do{this.getCellValue(r,n)||(t+=1),r-=1}while(r>=e[0]);return t}},{key:"countEntries",value:function(e){var n=this,t=0;return me(e.ranges,(function(r){var o=void 0===r[1]?1:r[1]-r[0]+1,i=n.countEmpty(r,e.sourceColumn);t+=o,t-=i})),t}},{key:"calculateAverage",value:function(e){return this.calculateSum(e)/this.countEntries(e)}},{key:"getCellValue",value:function(e,n){var t=this.hot.toVisualRow(e),r=this.hot.toVisualColumn(n),o=this.hot.getSourceDataAtCell(e,n),i="";if(null!==t&&null!==r&&(i=this.hot.getCellMeta(t,r).className||""),i.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof o&&(o=o.replace(/,/,".")),o=parseFloat(o)),isNaN(o)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(Je(Sb||(Sb=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["ColumnSummary plugin: cell at (",", ",") is not in a \n numeric format. Cannot do the calculation."],["ColumnSummary plugin: cell at (",", ",") is not in a\\x20\n numeric format. Cannot do the calculation."])),e,n));return o}},{key:"onAfterInit",value:function(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}},{key:"onAfterChange",value:function(e,n){e&&"ColumnSummary.reset"!==n&&"ColumnSummary.set"!==n&&"loadData"!==n&&this.endpoints.refreshChangedEndpoints(e)}},{key:"onAfterRowMove",value:function(e,n){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",n,e.length,e,this.pluginName)}}])&&jb(n.prototype,t),r&&jb(n,r),i}(Wg);function Ib(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:"",n=e||"";this.getInputElement().value=n}},{key:"getValue",value:function(){return this.getInputElement().value}},{key:"isFocused",value:function(){return this.rootDocument.activeElement===this.getInputElement()}},{key:"focus",value:function(){this.getInputElement().focus()}},{key:"createEditor",value:function(){var n=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return this.container=this.rootDocument.createElement("div"),Fn(this.container,e.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),Fn(n,e.CLASS_EDITOR),Fn(t,e.CLASS_INPUT),n.appendChild(t),this.container.appendChild(n),n}},{key:"getInputElement",value:function(){return this.editor.querySelector(".".concat(e.CLASS_INPUT))}},{key:"destroy",value:function(){var e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}])&&Ib(n.prototype,t),r&&Ib(n,r),e}(),Pb="---------";function Nb(e){return Nn(e,"htSeparator")}function Fb(e){return Nn(e,"htDisabled")}function Ub(e){return Nn(e,"htSelectionDisabled")}function Qb(e){var n=e.getSelected();return n?n[0]<0?null:n:null}function Yb(e,n){var t={};return z(e,(function(e){e.forAll((function(e,r){e>=0&&r>=0&&(t[e]||(t[e]=[]),t[e][r]=n(e,r))}))})),t}function Wb(e,n,t,r,o){z(e,(function(e){e.forAll((function(e,i){e>=0&&i>=0&&function(e,n,t,r,o,i){var a=o(e,n),s=r;a.className&&(s="vertical"===t?function(e,n){if(-1!==e.indexOf(n))return e;var t=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(t," ").concat(n)}(a.className,r):function(e,n){if(-1!==e.indexOf(n))return e;var t=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(t," ").concat(n)}(a.className,r));i(e,n,"className",s)}(e,i,n,t,r,o)}))}))}function Vb(e,n){var t=!1;return Array.isArray(e)&&z(e,(function(e){return e.forAll((function(e,r){if(e>=0&&r>=0&&n(e,r))return t=!0,!1})),t})),t}function zb(e){return''.concat(String.fromCharCode(10003),"").concat(e)}function Kb(e,n){for(var t=e.slice(0);00?n[n.length-1].name!==e.name&&n.push(e):n.push(e)})),n}function Jb(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=Bt((function(n){e.wasLastActionShow&&e.runLocalHooks("show",n.from.row,n.from.col)}),n)}},{key:"destroy",value:function(){this.clearLocalHooks()}}])&&Jb(n.prototype,t),r&&Jb(n,r),e}();de(Xb,Mu);var $b=Xb;function Zb(e){return(Zb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ew(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function nw(e,n){for(var t=0;t0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,"comment"),e&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(e,n){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:new Ht(e,n)}),this.removeComment(t)}},{key:"getComment",value:function(){var e=this.range.from.row,n=this.range.from.col;return this.getCommentMeta(e,n,"value")}},{key:"getCommentAtCell",value:function(e,n){return this.getCommentMeta(e,n,"value")}},{key:"show",value:function(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');var e=this.range.from,n=e.row,t=e.col;if(n<0||n>this.hot.countSourceRows()-1||t<0||t>this.hot.countSourceCols()-1)return!1;var r=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditor(!0),this.editor.setValue(r.comment?r.comment.value:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,n){return this.setRange({from:new Ht(e,n)}),this.show()}},{key:"hide",value:function(){this.editor.hidden||this.editor.hide()}},{key:"refreshEditor",value:function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t||this.range.from&&this.editor.isVisible()){var r=this.hot,o=r.rowIndexMapper,i=r.columnIndexMapper,a=this.range.from,s=a.row,l=a.col,u=o.getRenderableFromVisualIndex(s),c=i.getRenderableFromVisualIndex(l),d=null===u;null===u&&(u=o.getRenderableFromVisualIndex(o.getFirstNotHiddenIndex(s,-1))),null===c&&(c=i.getRenderableFromVisualIndex(i.getFirstNotHiddenIndex(l,-1)));var f=null===u,h=null===c;u=null!==(e=u)&&void 0!==e?e:0,c=null!==(n=c)&&void 0!==n?n:0;var A=this.hot,m=A.rootWindow,p=A.view.wt,g=p.wtTable,y=p.wtOverlays,v=p.wtViewport,b=y.scrollableElement,w=g.getCell({row:u,col:c}),_=qn(w),C=h?0:g.getStretchedColumnWidth(c),E=d&&!f?at(w):0,k=_.top,S=_.left;v.hasVerticalScroll()&&b!==m&&(k-=y.topOverlay.getScrollPosition()),v.hasHorizontalScroll()&&b!==m&&(S-=y.leftOverlay.getScrollPosition());var x=S+C,M=k+E,j=this.getCommentMeta(s,l,"style"),B=this.getCommentMeta(s,l,"readOnly");j?this.editor.setSize(j.width,j.height):this.editor.resetSize(),this.editor.setReadOnlyState(B),this.editor.setPosition(x,M)}}},{key:"checkSelectionCommentsConsistency",value:function(){var e=this.hot.getSelectedRangeLast();if(!e)return!1;var n=!1,t=e.getTopLeftCorner();return this.getCommentMeta(t.row,t.col,"value")&&(n=!0),n}},{key:"updateCommentMeta",value:function(e,n,t){var r,o=this.hot.getCellMeta(e,n).comment;o?le(r=ue(o),t):r=t,this.hot.setCellMeta(e,n,"comment",r)}},{key:"getCommentMeta",value:function(e,n,t){var r=this.hot.getCellMeta(e,n);if(r.comment)return r.comment[t]}},{key:"onMouseDown",value:function(e){if(this.mouseDown=!0,this.hot.view&&this.hot.view.wt){if(!this.contextMenuEvent&&!this.targetIsCommentTextArea(e)){var n=Tn(e.target,"TD","TBODY"),t=null;n&&(t=this.hot.view.wt.wtTable.getCoords(n),t={row:this.hot.rowIndexMapper.getVisualFromRenderableIndex(t.row),col:this.hot.columnIndexMapper.getVisualFromRenderableIndex(t.col)}),(!n||this.range.from&&t&&(this.range.from.row!==t.row||this.range.from.col!==t.col))&&this.hide()}this.contextMenuEvent=!1}}},{key:"onMouseOver",value:function(e){var n=lw.get(this),t=this.hot.rootDocument;if(n.cellBelowCursor=t.elementFromPoint(e.clientX,e.clientY),!(this.mouseDown||this.editor.isFocused()||Nn(e.target,"wtBorder")||n.cellBelowCursor!==e.target)&&this.editor)if(this.targetIsCellWithComment(e)){var r=this.hot.view.wt.wtTable.getCoords(e.target),o={from:new Ht(this.hot.rowIndexMapper.getVisualFromRenderableIndex(r.row),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r.col))};this.displaySwitch.show(o)}else On(e.target,t)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,n){n.comment&&n.comment.value&&Fn(e,n.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(e){lw.get(this).tempEditorDimensions={width:it(e.target),height:at(e.target)}}},{key:"onEditorMouseUp",value:function(e){var n=lw.get(this),t=it(e.target),r=at(e.target);t===n.tempEditorDimensions.width+1&&r===n.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,ew({},"style",{width:t,height:r}))}},{key:"onContextMenuAddComment",value:function(){var e=this;this.displaySwitch.cancelHiding();var n=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,this.setRange({from:n.highlight}),this.show(),setTimeout((function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())}),10)}},{key:"onContextMenuRemoveComment",value:function(){var e=this,n=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,n.forAll((function(n,t){n>=0&&t>=0&&e.removeCommentAtCell(n,t,!1)})),this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){var e=this,n=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,n.forAll((function(n,t){if(n>=0&&t>=0){var r=!!e.getCommentMeta(n,t,"readOnly");e.updateCommentMeta(n,t,ew({},"readOnly",!r))}}))}},{key:"addToContextMenu",value:function(e){var n=this,t=function(){return n.hot.rowIndexMapper.getRenderableIndexesLength()>0&&n.hot.columnIndexMapper.getRenderableIndexesLength()>0};e.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return n.checkSelectionCommentsConsistency()?n.hot.getTranslatedPhrase(Fd):n.hot.getTranslatedPhrase(Nd)},callback:function(){return n.onContextMenuAddComment()},disabled:function(){return!t()||!(n.hot.getSelectedLast()&&!n.hot.selection.isSelectedByCorner())}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(Ud)},callback:function(){return n.onContextMenuRemoveComment()},disabled:function(){return!t()||!(n.hot.getSelectedLast()&&!n.hot.selection.isSelectedByCorner())}},{key:"commentsReadOnly",name:function(){var e=this,n=this.getTranslatedPhrase(Qd);return Vb(this.getSelectedRangeLast(),(function(n,t){var r=e.getCellMeta(n,t).comment;if(r&&(r=r.readOnly),r)return!0}))&&(n=zb(n)),n},callback:function(){return n.onContextMenuMakeReadOnly()},disabled:function(){return!t()||!(n.hot.getSelectedLast()&&!n.hot.selection.isSelectedByCorner()&&n.checkSelectionCommentsConsistency())}})}},{key:"getDisplayDelaySetting",value:function(){var e=this.hot.getSettings().comments;if(he(e))return e.displayDelay}},{key:"onAfterBeginEditing",value:function(){this.hide()}},{key:"destroy",value:function(){this.editor&&this.editor.destroy(),this.displaySwitch&&this.displaySwitch.destroy(),tw(sw(i.prototype),"destroy",this).call(this)}}])&&nw(n.prototype,t),r&&nw(n,r),i}(Wg);function cw(e,n){for(var t=0;t1?t-1:0),o=1;oe.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=this.getSettings().maxRows)},hidden:function(){return!this.getSettings().allowInsertRow}}})),yw(gw,"row_below",(function(){return{key:"row_below",name:function(){return this.getTranslatedPhrase(Ed)},callback:function(e,n){var t=this.selection.isSelectedByCorner(),r=0;if(t)r=this.countRows();else{var o,i=n[Math.max(n.length-1,0)],a=null==i||null===(o=i.end)||void 0===o?void 0:o.row;r=en(a)?a+1:0}this.alter("insert_row",r,1,"ContextMenu.rowBelow"),t&&this.selectAll()},disabled:function(){return!Qb(this)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows)},hidden:function(){return!this.getSettings().allowInsertRow}}})),yw(gw,"col_left",(function(){return{key:"col_left",name:function(){return this.getTranslatedPhrase(kd)},callback:function(e,n){var t=this.selection.isSelectedByCorner(),r=0;t||(r=n[Math.max(n.length-1,0)].start.col);this.alter("insert_col",r,1,"ContextMenu.columnLeft"),t&&this.selectAll()},disabled:function(){return!this.isColumnModificationAllowed()||(!Qb(this)||(this.selection.isSelectedByCorner()?0===this.countCols():this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden:function(){return!this.getSettings().allowInsertColumn}}})),yw(gw,"col_right",(function(){return{key:"col_right",name:function(){return this.getTranslatedPhrase(Sd)},callback:function(e,n){var t=this.selection.isSelectedByCorner(),r=0;if(t)r=this.countCols();else{var o,i=n[Math.max(n.length-1,0)],a=null==i||null===(o=i.end)||void 0===o?void 0:o.col;r=en(a)?a+1:0}this.alter("insert_col",r,1,"ContextMenu.columnRight"),t&&this.selectAll()},disabled:function(){return!this.isColumnModificationAllowed()||(!Qb(this)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden:function(){return!this.getSettings().allowInsertColumn}}})),yw(gw,"clear_column",(function(){return{key:"clear_column",name:function(){return this.getTranslatedPhrase(Ld)},callback:function(e,n){var t=n[0].start.col,r=n[0].end.col;this.countRows()&&this.populateFromArray(0,t,[[null]],Math.max(n[0].start.row,n[0].end.row),r,"ContextMenu.clearColumn")},disabled:function(){return!Qb(this)||!this.selection.isSelectedByColumnHeader()}}})),yw(gw,"remove_row",(function(){return{key:"remove_row",name:function(){var e=this.getSelected(),n=0;if(e)if(e.length>1)n=1;else{var t=mw(e[0],3);t[0]-t[2]!=0&&(n=1)}return this.getTranslatedPhrase(xd,n)},callback:function(){this.alter("remove_row",function(e){var n=HA(e);if(0===n||1===n)return[];var t=PA(n),r=new Set;return z(e,(function(e){var n=jA(t(e),3),o=n[0],i=n[2],a=Math.max(o,0),s=i-a+1;z(Array.from(new Array(s),(function(e,n){return a+n})),(function(e){r.has(e)||r.add(e)}))})),Y(Array.from(r).sort((function(e,n){return e-n})),(function(e,n,t,r){return 0!==t&&n===r[t-1]+1?e[e.length-1][1]+=1:e.push([n,1]),e}),[])}(this.getSelected()),1,"ContextMenu.removeRow")},disabled:function(){if(!Qb(this))return!0;var e=this.countRows();return this.selection.isSelectedByCorner()?0===e:this.selection.isSelectedByColumnHeader()||0===e},hidden:function(){return!this.getSettings().allowRemoveRow}}})),yw(gw,"remove_col",(function(){return{key:"remove_col",name:function(){var e=this.getSelected(),n=0;if(e)if(e.length>1)n=1;else{var t=hw(e[0],4);t[1]-t[3]!=0&&(n=1)}return this.getTranslatedPhrase(Md,n)},callback:function(){this.alter("remove_col",function(e){var n=HA(e);if(0===n||1===n)return[];var t=PA(n),r=new Set;return z(e,(function(e){var n=jA(t(e),4),o=n[1],i=n[3],a=Math.max(o,0),s=i-a+1;z(Array.from(new Array(s),(function(e,n){return a+n})),(function(e){r.has(e)||r.add(e)}))})),Y(Array.from(r).sort((function(e,n){return e-n})),(function(e,n,t,r){return 0!==t&&n===r[t-1]+1?e[e.length-1][1]+=1:e.push([n,1]),e}),[])}(this.getSelected()),null,"ContextMenu.removeColumn")},disabled:function(){if(!this.isColumnModificationAllowed())return!0;if(!Qb(this))return!0;var e=this.countCols();return this.selection.isSelectedByCorner()?0===e:this.selection.isSelectedByRowHeader()||0===e},hidden:function(){return!this.getSettings().allowRemoveColumn}}})),yw(gw,"undo",(function(){return{key:"undo",name:function(){return this.getTranslatedPhrase(jd)},callback:function(){this.undo()},hidden:function(){var e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled:function(){return!this.getPlugin("undoRedo").isUndoAvailable()}}})),yw(gw,"redo",(function(){return{key:"redo",name:function(){return this.getTranslatedPhrase(Bd)},callback:function(){this.redo()},hidden:function(){var e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled:function(){return!this.getPlugin("undoRedo").isRedoAvailable()}}})),yw(gw,"make_read_only",(function(){return{key:"make_read_only",name:function(){var e=this,n=this.getTranslatedPhrase(Td);return Vb(this.getSelectedRange(),(function(n,t){return e.getCellMeta(n,t).readOnly}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Vb(n,(function(n,t){return e.getCellMeta(n,t).readOnly}));z(n,(function(n){n.forAll((function(n,r){n>=0&&r>=0&&e.setCellMeta(n,r,"readOnly",!t)}))})),this.render()},disabled:function(){return!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))}}})),yw(gw,"alignment",(function(){return{key:"alignment",name:function(){return this.getTranslatedPhrase(Yd)},disabled:function(){return 0===this.countRows()||0===this.countCols()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:"".concat("alignment",":left"),name:function(){var e=this,n=this.getTranslatedPhrase(Wd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htLeft"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"horizontal","htLeft"),Wb(n,"horizontal","htLeft",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1},{key:"".concat("alignment",":center"),name:function(){var e=this,n=this.getTranslatedPhrase(Vd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htCenter"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"horizontal","htCenter"),Wb(n,"horizontal","htCenter",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1},{key:"".concat("alignment",":right"),name:function(){var e=this,n=this.getTranslatedPhrase(zd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htRight"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"horizontal","htRight"),Wb(n,"horizontal","htRight",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1},{key:"".concat("alignment",":justify"),name:function(){var e=this,n=this.getTranslatedPhrase(Kd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htJustify"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"horizontal","htJustify"),Wb(n,"horizontal","htJustify",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1},{name:Pb},{key:"".concat("alignment",":top"),name:function(){var e=this,n=this.getTranslatedPhrase(Gd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htTop"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"vertical","htTop"),Wb(n,"vertical","htTop",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1},{key:"".concat("alignment",":middle"),name:function(){var e=this,n=this.getTranslatedPhrase(qd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"vertical","htMiddle"),Wb(n,"vertical","htMiddle",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1},{key:"".concat("alignment",":bottom"),name:function(){var e=this,n=this.getTranslatedPhrase(Jd);return Vb(this.getSelectedRange(),(function(n,t){var r=e.getCellMeta(n,t).className;if(r&&-1!==r.indexOf("htBottom"))return!0}))&&(n=zb(n)),n},callback:function(){var e=this,n=this.getSelectedRange(),t=Yb(n,(function(n,t){return e.getCellMeta(n,t).className}));this.runHooks("beforeCellAlignment",t,n,"vertical","htBottom"),Wb(n,"vertical","htBottom",(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),this.render()},disabled:!1}]}}})),gw);function ww(){var e={};return me(bw,(function(n,t){e[t]=n()})),e}function _w(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Cw(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=[],o=e;return o&&o.items?o=o.items:Array.isArray(o)||(o=n),he(o)?me(o,(function(e,n){var o=t["string"==typeof e?e:n];o||(o=e),he(e)?se(o,e):"string"==typeof o&&(o={name:o}),void 0===o.key&&(o.key=n),r.push(o)})):z(o,(function(e,n){var o=t[e];!o&&vw.indexOf(e)>=0||(o||(o={name:e,key:"".concat(n)}),he(e)&&se(o,e),void 0===o.key&&(o.key=n),r.push(o))})),r}var kw=function(){function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_w(this,e),this.hot=n,this.predefinedItems=ww(),this.defaultOrderPattern=t}var n,t,r;return n=e,(t=[{key:"setPredefinedItems",value:function(e){var n=this,t={};this.defaultOrderPattern.length=0,me(e,(function(e,r){var o="";e.name===Pb?(t[Pb]=e,o=Pb):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,t[r]=e,o=e.key):(t[e.key]=e,o=e.key),n.defaultOrderPattern.push(o)})),this.predefinedItems=t}},{key:"getItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Ew(e,this.defaultOrderPattern,this.predefinedItems)}}])&&Cw(n.prototype,t),r&&Cw(n,r),e}();function Sw(e,n){for(var t=0;t=e.offsetHeight}},{key:"fitsBelow",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=n}},{key:"fitsOnRight",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=n}},{key:"fitsOnLeft",value:function(e){return this.leftRelative>=e.offsetWidth}}])&&Sw(n.prototype,t),r&&Sw(n,r),e}();function Mw(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=n}},{key:"isSubMenu",value:function(){return null!==this.parentMenu}},{key:"open",value:function(){var e=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";var n=Bt((function(n){return e.openSubMenu(n)}),300),t=this.options.minWidth||215,r=!1,o=W(this.menuItems,(function(n){return"no_items"===n.key&&(r=!0),function(e,n){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(n))}(n,e.hot)}));if(o.length<1&&!r)o.push(ww().no_items);else if(0===o.length)return;o=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pb,t=e.slice(0);return t=qb(t=Gb(t=Kb(t,n),n))}(o,Pb);var i=!1,a={data:o,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:function(e){return en(e)&&e0&&void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}},{key:"openSubMenu",value:function(n){if(!this.hotMenu)return!1;var t=this.hotMenu.getCell(n,0);if(this.closeAllSubMenus(),!t||!function(e){return Nn(e,"htSubmenu")}(t))return!1;var r=this.hotMenu.getSourceDataAtRow(n),o=new e(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return o.setMenuItems(r.submenu.items),o.open(),o.setPosition(t.getBoundingClientRect()),this.hotSubMenus[r.key]=o,o}},{key:"closeSubMenu",value:function(e){var n=this.hotMenu.getSourceDataAtRow(e),t=this.hotSubMenus[n.key];t&&(t.destroy(),delete this.hotSubMenus[n.key])}},{key:"closeAllSubMenus",value:function(){var e=this;z(this.hotMenu.getData(),(function(n,t){return e.closeSubMenu(t)}))}},{key:"isAllSubMenusClosed",value:function(){return 0===Object.keys(this.hotSubMenus).length}},{key:"destroy",value:function(){var e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}},{key:"isOpened",value:function(){return null!==this.hotMenu}},{key:"executeCommand",value:function(e){if(this.isOpened()&&this.hasSelectedItem()){var n=this.getSelectedItem();if(this.runLocalHooks("select",n,e),!this.isCommandPassive(n)){var t=this.hot.getSelectedRange(),r=t?function(e){return V(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))}(t):[];this.runLocalHooks("executeCommand",n.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",n.key,r,e)}}}},{key:"isCommandPassive",value:function(e){var n=e.isCommand,t=e.name,r=e.disabled,o=e.submenu,i=!0===r||"function"==typeof r&&!0===r.call(this.hot);return!1===n||t===Pb||!0===i||o}},{key:"setPosition",value:function(e){var n=new xw(e,this.container.ownerDocument.defaultView);this.options.keepInViewport?(n.fitsBelow(this.container)?this.setPositionBelowCursor(n):n.fitsAbove(this.container)?this.setPositionAboveCursor(n):this.setPositionBelowCursor(n),n.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(n):this.setPositionOnLeftOfCursor(n)):(this.setPositionBelowCursor(n),this.setPositionOnRightOfCursor(n))}},{key:"setPositionAboveCursor",value:function(e){var n=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(n=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top="".concat(n,"px")}},{key:"setPositionBelowCursor",value:function(e){var n=this.offset.below+e.top+1;this.isSubMenu()&&(n=e.top-1),this.container.style.top="".concat(n,"px")}},{key:"setPositionOnRightOfCursor",value:function(e){var n;n=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left="".concat(n,"px")}},{key:"setPositionOnLeftOfCursor",value:function(e){var n=gt(this.hot.rootDocument),t=this.offset.left+e.left-this.container.offsetWidth+n+4;this.container.style.left="".concat(t,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);Nb(e)||Fb(e)||Ub(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var e=this.hotMenu.countRows()-1,n=this.hotMenu.getCell(e,0);Nb(n)||Fb(n)||Ub(n)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,n){var t=e+1,r=t=0?this.hotMenu.getCell(t,n):null;r&&(Nb(r)||Fb(r)||Ub(r)?this.selectPrevCell(t,n):this.hotMenu.selectCell(t,n))}},{key:"menuItemRenderer",value:function(e,n,t,r,o,i){var a,s=this,l=e.getSourceDataAtRow(t),u=this.hot.rootDocument.createElement("div"),c=function(e){return e.disableSelection},d=i;"function"==typeof d&&(d=d.call(this.hot)),Yn(n),Fn(u,"htItemWrapper"),n.appendChild(u),a=l,new RegExp(Pb,"i").test(a.name)?Fn(n,"htSeparator"):"function"==typeof l.renderer?(Fn(n,"htCustomMenuRenderer"),n.appendChild(l.renderer(e,u,t,r,o,d))):zn(u,d),function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(s.hot)}(l)?(Fn(n,"htDisabled"),this.eventManager.addEventListener(n,"mouseenter",(function(){return e.deselectCell()}))):c(l)?(Fn(n,"htSelectionDisabled"),this.eventManager.addEventListener(n,"mouseenter",(function(){return e.deselectCell()}))):function(e){return be(e,"submenu")}(l)?(Fn(n,"htSubmenu"),c(l)?this.eventManager.addEventListener(n,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(n,"mouseenter",(function(){return e.selectCell(t,r,void 0,void 0,!1,!1)}))):(Un(n,["htSubmenu","htDisabled"]),c(l)?this.eventManager.addEventListener(n,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(n,"mouseenter",(function(){return e.selectCell(t,r,void 0,void 0,!1,!1)})))}},{key:"createContainer",value:function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.options.container.ownerDocument,r=n;return r&&(xt(r)&&(r=null===(r=r.call(this.hot))||nn(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r="".concat(this.options.className,"Sub_").concat(r),e=t.querySelector(".".concat(this.options.className,".").concat(r))),e||(Fn(e=t.createElement("div"),"htMenu ".concat(this.options.className)),r&&Fn(e,r),this.options.container.appendChild(e)),e}},{key:"blockMainTableCallbacks",value:function(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}},{key:"releaseMainTableCallbacks",value:function(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}},{key:"onBeforeKeyDown",value:function(e){if(Ct(e.target)&&this.container.contains(e.target))Vt(e);else{var n=this.hotMenu.getSelectedLast(),t=!1;switch(this.keyEvent=!0,e.keyCode){case Pt.ESCAPE:this.close(),t=!0;break;case Pt.ENTER:n&&(this.hotMenu.getSourceDataAtRow(n[0]).submenu?t=!0:(this.executeCommand(e),this.close(!0)));break;case Pt.ARROW_DOWN:n?this.selectNextCell(n[0],n[1]):this.selectFirstCell(),t=!0;break;case Pt.ARROW_UP:n?this.selectPrevCell(n[0],n[1]):this.selectLastCell(),t=!0;break;case Pt.ARROW_RIGHT:if(n){var r=this.openSubMenu(n[0]);r&&r.selectFirstCell()}t=!0;break;case Pt.ARROW_LEFT:n&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),t=!0)}t&&(e.preventDefault(),Vt(e)),this.keyEvent=!1}}},{key:"onAfterInit",value:function(){var e=this.hotMenu.view.wt.wtTable,n=this.hotMenu.getSettings().data,t=e.hider.style,r=e.holder.style,o=parseInt(t.width,10),i=Y(n,(function(e,n){return e+(n.name===Pb?1:26)}),0);r.width="".concat(o+3,"px"),r.height="".concat(i+3,"px"),t.height=r.height}},{key:"onAfterSelection",value:function(e,n,t,r,o){!1===this.keyEvent&&(o.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!On(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||On(e.target,".htMenu")||this.close(!0))}},{key:"onDocumentContextMenu",value:function(e){this.isOpened()&&Nn(e.target,"htCore")&&On(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}])&&Mw(n.prototype,t),r&&Mw(n,r),e}();de(jw,Mu);var Bw=jw;function Tw(e){return(Tw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lw(e,n){for(var t=0;t1?t-1:0),o=1;o0&&(n-=1),function(e){e.eventManager.clear()}(e),n<=0){n=0;var t=Gw.get(e.container);t&&t.parentNode&&(t.parentNode.removeChild(t),Gw.delete(e.container)),e.mainElement=null}Vw.set(e.container,n)}}function Jw(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Xw(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Xw(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xw(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t',''].join(""),l_=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&n_(e,n)}(i,e);var n,t,r,o=t_(i);function i(e){var n;return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,i),(n=o.call(this,e)).columnsLimit=1/0,n.copyableRanges=[],n.focusableElement=void 0,n.pasteMode="overwrite",n.rowsLimit=1/0,n.uiContainer=n.hot.rootDocument.body,a_.set(o_(n),{isTriggeredByCopy:!1,isTriggeredByCut:!1,isBeginEditing:!1,isFragmentSelectionEnabled:!1}),n}return n=i,r=[{key:"PLUGIN_KEY",get:function(){return"copyPaste"}},{key:"PLUGIN_PRIORITY",get:function(){return 80}}],(t=[{key:"isEnabled",value:function(){return!!this.hot.getSettings().copyPaste}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n,t,r,o=this.hot.getSettings(),a=o.copyPaste,s=o.fragmentSelection;a_.get(this).isFragmentSelectionEnabled=!!s,"object"===$w(a)&&(this.pasteMode=a.pasteMode||this.pasteMode,this.rowsLimit=isNaN(a.rowsLimit)?this.rowsLimit:a.rowsLimit,this.columnsLimit=isNaN(a.columnsLimit)?this.columnsLimit:a.columnsLimit,this.uiContainer=a.uiContainer||this.uiContainer),this.addHook("afterContextMenuDefaultOptions",(function(n){return e.onAfterContextMenuDefaultOptions(n)})),this.addHook("afterOnCellMouseUp",(function(){return e.onAfterOnCellMouseUp()})),this.addHook("afterSelectionEnd",(function(){return e.onAfterSelectionEnd()})),this.addHook("beforeKeyDown",(function(){return e.onBeforeKeyDown()})),this.focusableElement=(n=this.uiContainer,t=new Ww(n),r=Vw.get(n),r=isNaN(r)?0:r,Vw.set(n,r+1),t),this.focusableElement.addLocalHook("copy",(function(n){return e.onCopy(n)})).addLocalHook("cut",(function(n){return e.onCut(n)})).addLocalHook("paste",(function(n){return e.onPaste(n)})),e_(i_(i.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),e_(i_(i.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&qw(this.focusableElement),e_(i_(i.prototype),"disablePlugin",this).call(this)}},{key:"copy",value:function(){a_.get(this).isTriggeredByCopy=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("copy")}},{key:"cut",value:function(){a_.get(this).isTriggeredByCut=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("cut")}},{key:"getRangedCopyableData",value:function(e){var n=this,t=[],r=[],o=[];return z(e,(function(e){io(e.startRow,e.endRow,(function(e){-1===r.indexOf(e)&&r.push(e)})),io(e.startCol,e.endCol,(function(e){-1===o.indexOf(e)&&o.push(e)}))})),z(r,(function(e){var r=[];z(o,(function(t){r.push(n.hot.getCopyableData(e,t))})),t.push(r)})),vm(t)}},{key:"getRangedData",value:function(e){var n=this,t=[],r=[],o=[];return z(e,(function(e){io(e.startRow,e.endRow,(function(e){-1===r.indexOf(e)&&r.push(e)})),io(e.startCol,e.endCol,(function(e){-1===o.indexOf(e)&&o.push(e)}))})),z(r,(function(e){var r=[];z(o,(function(t){r.push(n.hot.getCopyableData(e,t))})),t.push(r)})),t}},{key:"paste",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e||n){var t=new Qw;e&&t.clipboardData.setData("text/plain",e),n&&t.clipboardData.setData("text/html",n),this.getOrCreateFocusableElement(),this.onPaste(t)}}},{key:"setCopyableText",value:function(){var e=this.hot.getSelectedRangeLast();if(e){var n=e.getTopLeftCorner(),t=e.getBottomRightCorner(),r=n.row,o=n.col,i=t.row,a=t.col,s=Math.min(i,r+this.rowsLimit-1),l=Math.min(a,o+this.columnsLimit-1);this.copyableRanges.length=0,this.copyableRanges.push({startRow:r,startCol:o,endRow:s,endCol:l}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges),i===s&&a===l||this.hot.runHooks("afterCopyLimit",i-r+1,a-o+1,this.rowsLimit,this.columnsLimit)}}},{key:"getOrCreateFocusableElement",value:function(){var e=this.hot.getActiveEditor(),n=e?e.TEXTAREA:void 0;n?this.focusableElement.setFocusableElement(n):this.focusableElement.useSecondaryElement()}},{key:"isEditorOpened",value:function(){var e=this.hot.getActiveEditor();return e&&e.isOpened()}},{key:"populateValues",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(e.length){for(var t=e.length,r=e[0].length,o=[],i=n.getTopLeftCorner(),a=i.row,s=i.col,l=n.getBottomRightCorner(),u=l.row,c=l.col,d=a,f=s,h=a,A=s;o.length0&&t!==e.length;)if(t=e.length,e.match(ym))e=e.replace(ym,""),r+=1,n[o][r]="";else if(e.match(pm))e=e.replace(pm,""),r=0,n[o+=1]=[""];else{var i="";if(e.startsWith('"')){for(var a=0,s=!0;s;){var l=e.slice(0,1);'"'===l&&(a+=1),i+=l,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&a%2==0)&&(s=!1)}i=i.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(function(e){return new Array(Math.floor(e.length/2)).fill('"').join("")}))}else{var u=e.match(gm);i=u?u[0]:"",e=e.slice(i.length)}n[o][r]=i}return n}(n)),(!n||0!==n.length)&&!1!==this.hot.runHooks("beforePaste",n,this.copyableRanges)){var r=Jw(this.populateValues(n),4),o=r[0],i=r[1],a=r[2],s=r[3];this.hot.selectCell(o,i,Math.min(this.hot.countRows()-1,a),Math.min(this.hot.countCols()-1,s)),this.hot.runHooks("afterPaste",n,this.copyableRanges)}}}},{key:"onAfterContextMenuDefaultOptions",value:function(e){var n;e.items.push({name:"---------"},(n=this,{key:"copy",name:function(){return this.getTranslatedPhrase(Od)},callback:function(){n.copy()},disabled:function(){if(0===this.countRows()||0===this.countCols())return!0;var e=this.getSelected();return!e||e.length>1},hidden:!1}),function(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(Rd)},callback:function(){e.cut()},disabled:function(){if(0===this.countRows()||0===this.countCols())return!0;var e=this.getSelected();return!e||e.length>1},hidden:!1}}(this))}},{key:"onAfterOnCellMouseUp",value:function(){!this.hot.isListening()||this.isEditorOpened()||this.hot.getSettings().fragmentSelection||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}},{key:"onAfterSelectionEnd",value:function(){var e=a_.get(this).isFragmentSelectionEnabled;this.isEditorOpened()||(this.getOrCreateFocusableElement(),e&&this.focusableElement.getFocusableElement()!==this.hot.rootDocument.activeElement&&ht()||(this.setCopyableText(),this.focusableElement.focus()))}},{key:"onBeforeKeyDown",value:function(){if(this.hot.isListening()&&!this.isEditorOpened()){var e=this.hot.rootDocument.activeElement,n=this.hot.getActiveEditor();!n||e!==this.focusableElement.getFocusableElement()&&e!==n.select||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}}},{key:"destroy",value:function(){this.focusableElement&&(qw(this.focusableElement),this.focusableElement=null),e_(i_(i.prototype),"destroy",this).call(this)}}])&&Zw(n.prototype,t),r&&Zw(n,r),i}(Wg);function u_(e,n){return"border_row".concat(e,"col").concat(n)}function c_(e,n){return{id:u_(e,n),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:n,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}}function d_(e,n){var t=!1;return z(e.getSelectedRange(),(function(r){r.forAll((function(r,o){if(!(r<0||o<0)){var i=e.getCellMeta(r,o).borders;if(i){if(!n)return t=!0,!1;if(!be(i[n],"hide")||!1===i[n].hide)return t=!0,!1}}}))})),t}function f_(e){return''.concat(String.fromCharCode(10003),"").concat(e)}function h_(e){return{key:"borders:right",name:function(){var e=this.getTranslatedPhrase(Zd);return d_(this,"right")&&(e=f_(e)),e},callback:function(n,t){var r=d_(this,"right");e.prepareBorder(t,"right",r)}}}function A_(e){return{key:"borders:bottom",name:function(){var e=this.getTranslatedPhrase(ef);return d_(this,"bottom")&&(e=f_(e)),e},callback:function(n,t){var r=d_(this,"bottom");e.prepareBorder(t,"bottom",r)}}}function m_(e){return{key:"borders:left",name:function(){var e=this.getTranslatedPhrase(nf);return d_(this,"left")&&(e=f_(e)),e},callback:function(n,t){var r=d_(this,"left");e.prepareBorder(t,"left",r)}}}function p_(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(tf)},callback:function(n,t){e.prepareBorder(t,"noBorders")},disabled:function(){return!d_(this)}}}function g_(e){return(g_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y_(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return v_(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v_(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v_(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=o||n>=i)){var a,s,l=c_(e,n);t&&(a=l,be(s=t,"border")&&(a.border=s.border),be(s,"top")&&(s.top?(he(s.top)||(s.top={width:1,color:"#000"}),a.top=s.top):(s.top={hide:!0},a.top=s.top)),be(s,"right")&&(s.right?(he(s.right)||(s.right={width:1,color:"#000"}),a.right=s.right):(s.right={hide:!0},a.right=s.right)),be(s,"bottom")&&(s.bottom?(he(s.bottom)||(s.bottom={width:1,color:"#000"}),a.bottom=s.bottom):(s.bottom={hide:!0},a.bottom=s.bottom)),be(s,"left")&&(s.left?(he(s.left)||(s.left={width:1,color:"#000"}),a.left=s.left):(s.left={hide:!0},a.left=s.left)),l=a,z(this.hot.selection.highlight.customSelections,(function(e){if(l.id===e.settings.id)return Object.assign(e.settings,t),l.id=e.settings.id,l.left=e.settings.left,l.right=e.settings.right,l.top=e.settings.top,l.bottom=e.settings.bottom,!1}))),this.hot.setCellMeta(e,n,"borders",l),this.insertBorderIntoSettings(l,r)}}},{key:"prepareBorderFromCustomAddedRange",value:function(e){var n=this,t=e.range,r=Math.min(t.to.row,this.hot.countRows()-1),o=Math.min(t.to.col,this.hot.countCols()-1);io(t.from.row,r,(function(r){io(t.from.col,o,(function(o){var i=c_(r,o),a=0;r===t.from.row&&be(e,"top")&&(a+=1,i.top=e.top),r===t.to.row&&be(e,"bottom")&&(a+=1,i.bottom=e.bottom),o===t.from.col&&be(e,"left")&&(a+=1,i.left=e.left),o===t.to.col&&be(e,"right")&&(a+=1,i.right=e.right),a>0&&(n.hot.setCellMeta(r,o,"borders",i),n.insertBorderIntoSettings(i))}))}))}},{key:"removeAllBorders",value:function(e,n){var t=u_(e,n);this.spliceBorder(t),this.clearBordersFromSelectionSettings(t),this.clearNullCellRange(),this.hot.removeCellMeta(e,n,"borders")}},{key:"setBorder",value:function(e,n,t,r){var o=this.hot.getCellMeta(e,n).borders;o&&void 0!==o.border||(o=c_(e,n)),r?(o[t]={hide:!0},4===this.countHide(o)?this.removeAllBorders(e,n):(this.checkCustomSelectionsFromContextMenu(o,t,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,n,"borders",o))):(o[t]={width:1,color:"#000"},this.checkCustomSelectionsFromContextMenu(o,t,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,n,"borders",o))}},{key:"prepareBorder",value:function(e,n,t){var r=this;z(e,(function(e){var o=e.start,i=e.end;if(o.row===i.row&&o.col===i.col)"noBorders"===n?r.removeAllBorders(o.row,o.col):r.setBorder(o.row,o.col,n,t);else switch(n){case"noBorders":io(o.col,i.col,(function(e){io(o.row,i.row,(function(n){r.removeAllBorders(n,e)}))}));break;case"top":io(o.col,i.col,(function(e){r.setBorder(o.row,e,n,t)}));break;case"right":io(o.row,i.row,(function(e){r.setBorder(e,i.col,n,t)}));break;case"bottom":io(o.col,i.col,(function(e){r.setBorder(i.row,e,n,t)}));break;case"left":io(o.row,i.row,(function(e){r.setBorder(e,o.col,n,t)}))}}))}},{key:"createCustomBorders",value:function(e){var n=this;z(e,(function(e){e.range?n.prepareBorderFromCustomAddedRange(e):n.prepareBorderFromCustomAdded(e.row,e.col,e)}))}},{key:"countHide",value:function(e){return Y(Object.values(e),(function(e,n){var t=e;return n.hide&&(t+=1),t}),0)}},{key:"clearBordersFromSelectionSettings",value:function(e){var n=V(this.hot.selection.highlight.customSelections,(function(e){return e.settings.id})).indexOf(e);n>-1&&this.hot.selection.highlight.customSelections[n].clear()}},{key:"clearNullCellRange",value:function(){var e=this;z(this.hot.selection.highlight.customSelections,(function(n,t){if(null===n.cellRange)return e.hot.selection.highlight.customSelections[t].destroy(),e.hot.selection.highlight.customSelections.splice(t,1),!1}))}},{key:"hideBorders",value:function(){var e=this;z(this.savedBorders,(function(n){e.clearBordersFromSelectionSettings(n.id),e.clearNullCellRange()}))}},{key:"spliceBorder",value:function(e){var n=V(this.savedBorders,(function(e){return e.id})).indexOf(e);n>-1&&this.savedBorders.splice(n,1)}},{key:"checkSavedBorders",value:function(e){var n=this,t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):z(this.savedBorders,(function(r,o){if(e.id===r.id)return n.savedBorders[o]=e,t=!0,!1})),t}},{key:"checkCustomSelectionsFromContextMenu",value:function(e,n,t){var r=!1;return z(this.hot.selection.highlight.customSelections,(function(o){if(e.id===o.settings.id)return me(o.instanceBorders,(function(e){e.toggleHiddenClass(n,t)})),r=!0,!1})),r}},{key:"checkCustomSelections",value:function(e,n,t){var r=this.countHide(e),o=!1;return 4===r?(this.removeAllBorders(e.row,e.col),o=!0):z(this.hot.selection.highlight.customSelections,(function(r){if(e.id===r.settings.id)return r.visualCellRange=n,r.commit(),t&&me(r.instanceBorders,(function(n){n.changeBorderStyle(t,e)})),o=!0,!1})),o}},{key:"changeBorderSettings",value:function(){var e=this.hot.getSettings().customBorders;Array.isArray(e)?(e.length||(this.savedBorders=e),this.createCustomBorders(e)):void 0!==e&&this.createCustomBorders(this.savedBorders)}},{key:"onAfterContextMenuDefaultOptions",value:function(e){var n;this.hot.getSettings().customBorders&&e.items.push({name:"---------"},{key:"borders",name:function(){return this.getTranslatedPhrase(Xd)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[(n=this,{key:"borders:top",name:function(){var e=this.getTranslatedPhrase($d);return d_(this,"top")&&(e=f_(e)),e},callback:function(e,t){var r=d_(this,"top");n.prepareBorder(t,"top",r)}}),h_(this),A_(this),m_(this),p_(this)]}})}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){w_(k_(i.prototype),"destroy",this).call(this)}}])&&b_(n.prototype,t),r&&b_(n,r),i}(Wg);function x_(e){return(x_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M_(e,n){for(var t=0;tthis.boundaries.bottom&&(r=n-this.boundaries.bottom),ethis.boundaries.right&&(t=e-this.boundaries.right),this.callback(t,r)}},{key:"listen",value:function(){this.listening=!0}},{key:"unlisten",value:function(){this.listening=!1}},{key:"isListening",value:function(){return this.listening}},{key:"registerEvents",value:function(){for(var e=this,n=this.hot.rootWindow;n;)this.eventManager.addEventListener(n.document,"contextmenu",(function(){return e.unlisten()})),this.eventManager.addEventListener(n.document,"mouseup",(function(){return e.unlisten()})),this.eventManager.addEventListener(n.document,"mousemove",(function(n){return e.onMouseMove(n)})),n=jn(n)}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(e){if(!Kt(e)){var n=this.hot.view.wt.wtTable.holder;n!==this.hot.rootWindow&&(this.setBoundaries(n.getBoundingClientRect()),this.setCallback((function(e,t){e<0?n.scrollLeft-=50:e>0&&(n.scrollLeft+=50),t<0?n.scrollTop-=20:t>0&&(n.scrollTop+=20)})),this.listen())}}},{key:"onMouseMove",value:function(e){this.isListening()&&this.check(e.clientX,e.clientY)}},{key:"destroy",value:function(){j_(R_(i.prototype),"destroy",this).call(this)}}])&&M_(n.prototype,t),r&&M_(n,r),i}(Wg);function I_(e){return(I_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H_(e,n){for(var t=0;t1?t-1:0),o=1;o0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}},{key:"onTableClick",value:function(e){if(e.stopPropagation(),Nn(e.target,"changeType")&&!this.menu.isOpened()){var n=0,t=0;if(this.hot.rootDocument!==this.menu.container.ownerDocument){var r=this.hot.rootWindow.frameElement.getBoundingClientRect();n=r.top,t=r.left}var o=e.target.getBoundingClientRect();this.open({left:o.left+t,top:o.top+e.target.offsetHeight+3+n,width:o.width,height:o.height})}}},{key:"onAfterGetColHeader",value:function(e,n){var t=n.parentNode;if(t){var r=t.parentNode.childNodes,o=Array.prototype.indexOf.call(r,t);if(!(e<0||o!==r.length-1)){var i=n.querySelector(".".concat("changeType"));if(!this.enabled||!i)if(this.enabled){var a=this.hot.rootDocument.createElement("button");a.className="changeType",a.onclick=function(){return!1},n.firstChild.insertBefore(a,n.firstChild.firstChild)}else i&&i.parentNode.removeChild(i)}}}},{key:"onMenuBeforeOpen",value:function(){this.hot.runHooks("beforeDropdownMenuShow",this)}},{key:"onMenuAfterOpen",value:function(){this.hot.runHooks("afterDropdownMenuShow",this)}},{key:"onMenuAfterClose",value:function(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}},{key:"destroy",value:function(){this.close(),this.menu&&this.menu.destroy(),P_(Y_(i.prototype),"destroy",this).call(this)}}])&&H_(n.prototype,t),r&&H_(n,r),i}(Wg);function V_(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return z_(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return z_(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z_(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t0,i=this.dataProvider.getRowHeaders(),a=i.length>0,s=n.bom?String.fromCharCode(65279):"";return o&&(r=V(r,(function(n){return e._escapeCell(n,!0)})),a&&(s+=n.columnDelimiter),s+=r.join(n.columnDelimiter),s+=n.rowDelimiter),z(t,(function(t,r){r>0&&(s+=n.rowDelimiter),a&&(s+=e._escapeCell(i[r])+n.columnDelimiter),s+=t.map((function(n){return e._escapeCell(n)})).join(n.columnDelimiter)})),s}},{key:"_escapeCell",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=Ze(e);return""!==t&&(n||t.indexOf(oC)>=0||t.indexOf(iC)>=0||t.indexOf(aC)>=0||t.indexOf(this.options.columnDelimiter)>=0)&&(t=t.replace(new RegExp('"',"g"),'""'),t='"'.concat(t,'"')),t}}])&&Z_(n.prototype,t),r&&Z_(n,r),i}(J_);var lC,uC,cC,dC=(cC=sC,(uC="csv")in(lC={})?Object.defineProperty(lC,uC,{value:cC,enumerable:!0,configurable:!0,writable:!0}):lC[uC]=cC,lC);function fC(e,n,t){return"function"==typeof dC[e]?new dC[e](n,t):null}function hC(e){return(hC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AC(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function mC(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,n).export()}},{key:"exportAsBlob",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,n))}},{key:"downloadFile",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=this.hot,r=t.rootDocument,o=t.rootWindow,i=this._createTypeFormatter(e,n),a=this._createBlob(i),s=o.URL||o.webkitURL,l=r.createElement("a"),u="".concat(i.options.filename,".").concat(i.options.fileExtension);if(void 0!==l.download){var c=s.createObjectURL(a);l.style.display="none",l.setAttribute("href",c),l.setAttribute("download",u),r.body.appendChild(l),l.dispatchEvent(new MouseEvent("click")),r.body.removeChild(l),setTimeout((function(){s.revokeObjectURL(c)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(a,u)}},{key:"_createTypeFormatter",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!dC[e])throw new Error('Export format type "'.concat(e,'" is not supported.'));return fC(e,new G_(this.hot),n)}},{key:"_createBlob",value:function(e){var n=null;return"undefined"!=typeof Blob&&(n=new Blob([e.export()],{type:"".concat(e.options.mimeType,";charset=").concat(e.options.encoding)})),n}}])&&mC(n.prototype,t),r&&mC(n,r),i}(Wg);function wC(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);tt}),{name:_f,inputsCount:1,showOperators:!0});function RC(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return DC(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return DC(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function DC(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=t}),{name:Cf,inputsCount:1,showOperators:!0});function IC(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return HC(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return HC(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HC(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0}),{name:Mf,inputsCount:1,showOperators:!0});function QC(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return YC(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return YC(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function YC(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=r&&e.value<=o}),{name:Sf,inputsCount:2,showOperators:!0});function WC(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return VC(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return VC(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function VC(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0}),{name:vf,inputsCount:1,showOperators:!0});xC("not_contains",(function(e,n){return!kC("contains",n)(e)}),{name:bf,inputsCount:1,showOperators:!0});xC("date_tomorrow",(function(e){var n=qe(e.value,e.meta.dateFormat);return!!n.isValid()&&n.isSame(qe().subtract(-1,"days").startOf("day"),"d")}),{name:Tf,inputsCount:0});xC("date_today",(function(e){var n=qe(e.value,e.meta.dateFormat);return!!n.isValid()&&n.isSame(qe().startOf("day"),"d")}),{name:Bf,inputsCount:0});var JC;function XC(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}xC("date_yesterday",(function(e){var n=qe(e.value,e.meta.dateFormat);return!!n.isValid()&&n.isSame(qe().subtract(1,"days").startOf("day"),"d")}),{name:Lf,inputsCount:0});var $C=(XC(JC={},"numeric",["none",Pb,"empty","not_empty",Pb,"eq","neq",Pb,"gt","gte","lt","lte","between","not_between"]),XC(JC,"text",["none",Pb,"empty","not_empty",Pb,"eq","neq",Pb,"begins_with","ends_with",Pb,"contains","not_contains"]),XC(JC,"date",["none",Pb,"empty","not_empty",Pb,"eq","neq",Pb,"date_before","date_after","between",Pb,"date_tomorrow","date_today","date_yesterday"]),JC);function ZC(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);tt.inputsCount-1)return!1;var o=n.getInputElement(r);o.setValue(e),o[t.inputsCount>r?"show":"hide"](),r||setTimeout((function(){return o.focus()}),10)}))}}},{key:"getState",value:function(){var e=this.getSelectElement().getValue()||SC("none"),n=[];return z(this.getInputElements(),(function(t,r){e.inputsCount>r&&n.push(t.getValue())})),{command:e,args:n}}},{key:"updateState",value:function(e,n){var t=SC(e?e.name:"none");this.state.setValueAtIndex(n,{command:t,args:e?e.args:[]}),e||z(this.getInputElements(),(function(e){return e.setValue(null)}))}},{key:"getSelectElement",value:function(){return this.elements.filter((function(e){return e instanceof _E}))[0]}},{key:"getInputElement",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}},{key:"getInputElements",value:function(){return this.elements.filter((function(e){return e instanceof fE}))}},{key:"getMenuItemDescriptor",value:function(){var e=this;return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:function(){return e.isHidden()},renderer:function(n,t,r,o,i,a){Fn(t.parentNode,"htFiltersMenuCondition"),e.addSeparator&&Fn(t.parentNode,"border");var s=e.hot.rootDocument.createElement("div");return Fn(s,"htFiltersMenuLabel"),s.textContent=a,t.appendChild(s),t.parentNode.hasAttribute("ghost-table")||z(e.elements,(function(e){return t.appendChild(e.element)})),t}}}},{key:"reset",value:function(){var e,n=this.hot.getPlugin("filters").getSelectedColumn(),t=n&&n.visualIndex,r=function(e){var n=[],t=e;return $C[t]||(t="text"),z($C[t],(function(e){var t;t=e===Pb?{name:Pb}:ce(SC(e)),n.push(t)})),n}((e=this.hot).getDataType.apply(e,EE(this.hot.getSelectedLast()||[0,t])));z(this.getInputElements(),(function(e){return e.hide()})),this.getSelectElement().setItems(r),xE(TE(i.prototype),"reset",this).call(this),this.getSelectElement().setValue(r[0])}},{key:"onConditionSelect",value:function(e){z(this.getInputElements(),(function(n,t){n[e.inputsCount>t?"show":"hide"](),0===t&&setTimeout((function(){return n.focus()}),10)})),this.runLocalHooks("change",e)}},{key:"onSelectUIClosed",value:function(){this.runLocalHooks("afterClose")}},{key:"onInputKeyDown",value:function(e){Wt(e.keyCode,"ENTER")?(this.runLocalHooks("accept"),Vt(e)):Wt(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Vt(e))}}])&&SE(n.prototype,t),r&&SE(n,r),i}(CC),OE={};function RE(e){if(!OE[e])throw Error('Operation with id "'.concat(e,'" does not exist.'));var n=OE[e].func;return function(e,t){return n(e,t)}}function DE(e,n,t){OE[e]={name:n,func:t}}DE("conjunction",Df,(function(e,n){return e.every((function(e){return e.func(n)}))}));DE("disjunction",If,(function(e,n){return e.some((function(e){return e.func(n)}))}));function IE(e){return(IE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HE(e,n){for(var t=0;t0&&void 0!==arguments[0])||arguments[0];this.options.checked=e,this.update()}},{key:"focus",value:function(){this.isBuilt()&&VE.get(this).input.focus()}}])&&HE(n.prototype,t),r&&HE(n,r),i}(tE);function KE(e){return(KE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function GE(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:"conjunction",n=arguments.length>1?arguments[1]:void 0,t=e;"disjunctionWithExtraCondition"===t&&(t="disjunction"),this.state.setValueAtIndex(n,t)}},{key:"reset",value:function(){this.setChecked(0)}},{key:"onRadioInputChange",value:function(e){this.setState(e.target.value)}}])&&GE(n.prototype,t),r&&GE(n,r),i}(CC);P();function ek(e,n){var t=e;return""===t&&(t="(".concat(n,")")),t}var nk=new Set([1]).has(1),tk=nk&&"function"==typeof Array.from;function rk(e){var n=e;return nk&&(n=new Set(n)),function(e){return nk?n.has(e):!!~n.indexOf(e)}}function ok(e){return null==e?"":e}function ik(e){var n=e;return n=(n=tk?Array.from(new Set(n)):$(n)).sort((function(e,n){return"number"==typeof e&&"number"==typeof n?e-n:e===n?0:e>n?1:-1}))}function ak(e,n,t,r){var o,i=[],a=e===n;return a||(o=rk(n)),z(e,(function(e){var n=!1;(a||o(e))&&(n=!0);var s={checked:n,value:e,visualValue:ek(e,t)};r&&r(s),i.push(s)})),i}t("./node_modules/core-js/modules/es.string.link.js");function sk(e){return(sk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lk(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t=0})),this.itemsBox.loadData(n)}},{key:"onInputKeyDown",value:function(e){this.runLocalHooks("keydown",e,this),Lt(Wt,e.keyCode)("ARROW_DOWN|TAB")&&!this.itemsBox.isListening()&&(Vt(e),this.itemsBox.listen(),this.itemsBox.selectCell(0,0))}},{key:"onItemsBoxBeforeKeyDown",value:function(e){var n=Lt(Wt,e.keyCode);n("ESCAPE")&&this.runLocalHooks("keydown",e,this),n("ARROW_UP|ARROW_DOWN|ARROW_LEFT|ARROW_RIGHT|TAB|SPACE|ENTER")||(Vt(e),this.itemsBox.unlisten(),this.itemsBox.deselectCell(),this.searchInput.focus())}},{key:"onSelectAllClick",value:function(e){var n=[];e.preventDefault(),z(this.itemsBox.getSourceData(),(function(e,t){e.checked=!0,n.push(bu(e,t)[0])})),this.itemsBox.setSourceDataAtCell(n)}},{key:"onClearAllClick",value:function(e){var n=[];e.preventDefault(),z(this.itemsBox.getSourceData(),(function(e,t){e.checked=!1,n.push(bu(e,t)[0])})),this.itemsBox.setSourceDataAtCell(n)}}])&&bk(n.prototype,t),r&&bk(n,r),i}(tE);function jk(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Bk(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Bk(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bk(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1])||arguments[1];Zk(this,e),this.hot=n,this.isMapRegistrable=t,this.filteringStates=new kc,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(nS,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}var n,t,r;return n=e,(t=[{key:"isEmpty",value:function(){return 0===this.getFilteredColumns().length}},{key:"isMatch",value:function(e,n){var t,r=this.filteringStates.getValueAtIndex(n),o=null!==(t=null==r?void 0:r.conditions)&&void 0!==t?t:[],i=null==r?void 0:r.operation;return this.isMatchInConditions(o,e,i)}},{key:"isMatchInConditions",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"conjunction";return!e.length||RE(t)(e,n)}},{key:"addCondition",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"conjunction",r=arguments.length>3?arguments[3]:void 0,o=V(n.args,(function(e){return"string"==typeof e?e.toLowerCase():e})),i=n.name||n.command.key;this.runLocalHooks("beforeAdd",e);var a=this.getOperation(e);if(a){if(a!==t)throw Error(Je(Kk||(Kk=$k(["The column of index "," has been already applied with a `","` \n filter operation. Use `removeConditions` to clear the current conditions and then add new ones. \n Mind that you cannot mix different types of operations (for instance, if you use `conjunction`, \n use it consequently for a particular column)."],["The column of index "," has been already applied with a \\`","\\`\\x20\n filter operation. Use \\`removeConditions\\` to clear the current conditions and then add new ones.\\x20\n Mind that you cannot mix different types of operations (for instance, if you use \\`conjunction\\`,\\x20\n use it consequently for a particular column)."])),e,a))}else if(nn(OE[t]))throw new Error(Je(Gk||(Gk=$k(["Unexpected operation named `","`. Possible ones are \n `disjunction` and `conjunction`."],["Unexpected operation named \\`","\\`. Possible ones are\\x20\n \\`disjunction\\` and \\`conjunction\\`."])),t));var s=this.getConditions(e);0===s.length?this.filteringStates.setValueAtIndex(e,{operation:t,conditions:[{name:i,args:o,func:kC(i,o)}]},r):s.push({name:i,args:o,func:kC(i,o)}),this.runLocalHooks("afterAdd",e)}},{key:"getConditions",value:function(e){var n,t;return null!==(n=null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.conditions)&&void 0!==n?n:[]}},{key:"getOperation",value:function(e){var n;return null===(n=this.filteringStates.getValueAtIndex(e))||void 0===n?void 0:n.operation}},{key:"getFilteredColumns",value:function(){return this.filteringStates.getEntries().map((function(e){return Jk(e,1)[0]}))}},{key:"getColumnStackPosition",value:function(e){return this.getFilteredColumns().indexOf(e)}},{key:"exportAllConditions",value:function(){return Y(this.filteringStates.getEntries(),(function(e,n){var t=Jk(n,2),r=t[0],o=t[1],i=o.operation,a=o.conditions;return e.push({column:r,operation:i,conditions:V(a,(function(e){return{name:e.name,args:e.args}}))}),e}),[])}},{key:"importAllConditions",value:function(e){var n=this;this.clean(),z(e,(function(e){z(e.conditions,(function(t){return n.addCondition(e.column,t)}))}))}},{key:"removeConditions",value:function(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}},{key:"clean",value:function(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}},{key:"hasConditions",value:function(e,n){var t=this.getConditions(e);return n?t.some((function(e){return e.name===n})):t.length>0}},{key:"destroy",value:function(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(nS),this.filteringStates=null,this.clearLocalHooks()}}])&&eS(n.prototype,t),r&&eS(n,r),e}();de(tS,Mu);var rS=tS;function oS(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function iS(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:function(){return[]};oS(this,e),this.conditionCollection=n,this.columnDataFactory=t}var n,t,r;return n=e,(t=[{key:"filter",value:function(){var e=this,n=[];return z(this.conditionCollection.getFilteredColumns(),(function(t,r){var o=e.columnDataFactory(t);r&&(o=e._getIntersectData(o,n)),n=e.filterByColumn(t,o)})),n}},{key:"filterByColumn",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[];return z(t,(function(t){void 0!==t&&n.conditionCollection.isMatch(t,e)&&r.push(t)})),r}},{key:"_getIntersectData",value:function(e,n){var t=[];return z(n,(function(n){var r=n.meta.visualRow;void 0!==e[r]&&(t[r]=e[r])})),t}}])&&iS(n.prototype,t),r&&iS(n,r),e}();function sS(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function lS(e,n){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:function(){return[]};sS(this,e),this.hot=n,this.conditionCollection=t,this.columnDataFactory=o,this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.conditionCollection.addLocalHook("beforeRemove",(function(e){return r._onConditionBeforeModify(e)})),this.conditionCollection.addLocalHook("afterRemove",(function(e){return r.updateStatesAtColumn(e)})),this.conditionCollection.addLocalHook("afterAdd",(function(e){return r.updateStatesAtColumn(e)})),this.conditionCollection.addLocalHook("beforeClean",(function(){return r._onConditionBeforeClean()})),this.conditionCollection.addLocalHook("afterClean",(function(){return r._onConditionAfterClean()}))}var n,t,r;return n=e,(t=[{key:"groupChanges",value:function(){this.grouping=!0}},{key:"flush",value:function(){var e=this;this.grouping=!1,z(this.changes,(function(n){e.updateStatesAtColumn(n)})),this.changes.length=0}},{key:"_onConditionBeforeModify",value:function(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}},{key:"updateStatesAtColumn",value:function(e,n){var t=this;if(this.grouping)-1===this.changes.indexOf(e)&&this.changes.push(e);else{var r=this.conditionCollection.exportAllConditions(),o=this.conditionCollection.getColumnStackPosition(e);-1===o&&(o=this.latestEditedColumnPosition);var i=r.slice(0,o),a=r.slice(o);a.length&&a[0].column===e&&a.shift();var s=Ot((function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=new rS(t.hot,!1),i=[].concat(e,r);o.importAllConditions(i);var a=t.columnDataFactory(n),s=rk(V(o.isEmpty()?a:new aS(o,(function(e){return t.columnDataFactory(e)})).filter(),(function(e){return e.meta.visualRow})));return o.destroy(),W(a,(function(e){return s(e.meta.visualRow)}))}))(i),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:a,filteredRowsFactory:s,conditionArgsChange:n})}}},{key:"_onConditionBeforeClean",value:function(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}},{key:"_onConditionAfterClean",value:function(){var e=this;z(this.latestOrderStack,(function(n){e.updateStatesAtColumn(n)}))}},{key:"destroy",value:function(){var e=this;this.clearLocalHooks(),me(this,(function(n,t){e[t]=null}))}}])&&lS(n.prototype,t),r&&lS(n,r),e}();de(uS,Mu);var cS,dS=uS;function fS(e){return(fS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hS(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return AS(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return AS(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AS(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t3&&void 0!==arguments[3]?arguments[3]:"conjunction",o=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(o,{command:{key:n},args:t},r)}},{key:"removeConditions",value:function(e){var n=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(n)}},{key:"clearConditions",value:function(e){if(void 0===e)this.conditionCollection.clean();else{var n=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(n)}}},{key:"filter",value:function(){var e=this,n=this._createDataFilter(),t=!this.conditionCollection.isEmpty(),r=[],o=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",o))if(t){var i=[];this.hot.batchExecution((function(){e.filtersRowsMap.clear();var t=rk(r=V(n.filter(),(function(e){return e.meta.visualRow})));io(e.hot.countSourceRows()-1,(function(e){t(e)||i.push(e)})),z(i,(function(n){e.filtersRowsMap.setValueAtIndex(n,!0)}))}),!0),r.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",o),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.clearColumnSelection()}},{key:"getSelectedColumn",value:function(){return this.lastSelectedColumn}},{key:"clearColumnSelection",value:function(){var e,n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.getTopLeftCorner();void 0!==n&&this.hot.selectCell(n.row,n.col)}},{key:"getDataMapAtColumn",value:function(e){var n=this,t=this.hot.toVisualColumn(e),r=[];return z(this.hot.getSourceDataAtCol(t),(function(e,o){var i=n.hot.getCellMeta(o,t),a=i.row,s=i.col,l=i.visualCol,u=i.visualRow,c=i.type,d=i.instance,f=i.dateFormat;r.push({meta:{row:a,col:s,visualCol:l,visualRow:u,type:c,instance:d,dateFormat:f},value:ok(e)})})),r}},{key:"onAfterChange",value:function(e){var n=this;e&&z(e,(function(e){var t=hS(e,2)[1],r=n.hot.propToCol(t);n.conditionCollection.hasConditions(r)&&n.updateValueComponentCondition(r)}))}},{key:"updateValueComponentCondition",value:function(e){var n=ik(this.hot.getDataAtCol(e));this.conditionUpdateObserver.updateStatesAtColumn(e,n)}},{key:"restoreComponents",value:function(e){var n,t=null===(n=this.getSelectedColumn())||void 0===n?void 0:n.physicalIndex;e.forEach((function(e){e.isHidden()||e.restoreState(t)})),this.updateDependentComponentsVisibility()}},{key:"onAfterDropdownMenuShow",value:function(){this.restoreComponents(Array.from(this.components.values()))}},{key:"onAfterDropdownMenuHide",value:function(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}},{key:"onBeforeDropdownMenuSetItems",value:function(){var e=this;this.dropdownMenuPlugin&&this.dropdownMenuPlugin.menu.addLocalHook("afterOpen",(function(){e.dropdownMenuPlugin.menu.hotMenu.updateSettings({hiddenRows:!0})}))}},{key:"onAfterDropdownMenuDefaultOptions",value:function(e){e.items.push({name:Pb}),this.components.forEach((function(n){e.items.push(n.getMenuItemDescriptor())}))}},{key:"getOperationBasedOnArguments",value:function(e,n,t,r){var o=e;return"disjunction"===o&&"none"!==n.command.key&&"none"!==t.command.key&&"none"!==r.command.key?o="disjunctionWithExtraCondition":"none"!==r.command.key&&("none"!==n.command.key&&"none"!==t.command.key||(o="conjunction")),o}},{key:"onActionBarSubmit",value:function(e){if("accept"===e){var n,t=null===(n=this.getSelectedColumn())||void 0===n?void 0:n.physicalIndex,r=this.components.get("filter_by_condition").getState(),o=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),a=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,o,i);this.conditionUpdateObserver.groupChanges();var s=this.conditionCollection.getColumnStackPosition(t);-1===s&&(s=void 0),this.conditionCollection.removeConditions(t),"none"!==r.command.key&&(this.conditionCollection.addCondition(t,r,a,s),"none"!==o.command.key&&this.conditionCollection.addCondition(t,o,a,s)),"none"!==i.command.key&&this.conditionCollection.addCondition(t,i,a,s),this.conditionUpdateObserver.flush(),this.components.forEach((function(e){return e.saveState(t)})),this.filtersRowsMap.clear(),this.filter()}this.dropdownMenuPlugin&&this.dropdownMenuPlugin.close()}},{key:"onComponentChange",value:function(e,n){this.updateDependentComponentsVisibility(),e.constructor!==LE||n.inputsCount||this.setListeningDropdownMenu()}},{key:"onSelectUIClosed",value:function(){this.setListeningDropdownMenu()}},{key:"setListeningDropdownMenu",value:function(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}},{key:"updateDependentComponentsVisibility",value:function(){var e=this.components.get("filter_by_condition").getState().command,n=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];e.showOperators?this.showComponents.apply(this,n):this.hideComponents.apply(this,n)}},{key:"onAfterGetColHeader",value:function(e,n){var t=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(t)?Fn(n,"htFiltersActive"):Un(n,"htFiltersActive")}},{key:"onTableClick",value:function(e){var n=Tn(e.target,"TH");if(n){var t=this.hot.getCoords(n).col,r=this.hot.toPhysicalColumn(t);this.lastSelectedColumn={visualIndex:t,physicalIndex:r}}}},{key:"_createDataFilter",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new aS(n,(function(n){return e.getDataMapAtColumn(n)}))}},{key:"updateComponents",value:function(e){var n;if(null!==(n=this.dropdownMenuPlugin)&&void 0!==n&&n.enabled){var t=e.editedConditionStack,r=t.conditions,o=t.column,i=r.filter((function(e){return"by_value"===e.name})),a=r.filter((function(e){return"by_value"!==e.name}));if(i.length>=2||a.length>=3)Jt(Je(cS||(cS=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["The filter conditions have been applied properly, but couldn’t be displayed visually. \n The overall amount of conditions exceed the capability of the dropdown menu. \n For more details see the documentation."],["The filter conditions have been applied properly, but couldn’t be displayed visually.\\x20\n The overall amount of conditions exceed the capability of the dropdown menu.\\x20\n For more details see the documentation."]))));else{var s=this.conditionCollection.getOperation(o);this.components.get("filter_by_condition").updateState(a[0],o),this.components.get("filter_by_condition2").updateState(a[1],o),this.components.get("filter_operators").updateState(s,o),this.components.get("filter_by_value").updateState(e)}}}},{key:"getIndexesOfComponents",value:function(){var e=[];if(!this.dropdownMenuPlugin)return e;for(var n=this.dropdownMenuPlugin.menu,t=arguments.length,r=new Array(t),o=0;o0&&void 0!==arguments[0])||arguments[0];if(this.dropdownMenuPlugin){for(var n=this.dropdownMenuPlugin.menu,t=n.hotMenu,r=t.getPlugin("hiddenRows"),o=arguments.length,i=new Array(o>1?o-1:0),a=1;ae.length)&&(n=e.length);for(var t=0,r=new Array(n);t=t?r+(e-t):n}},{key:"toPhysicalRowPosition",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPhysicalIndexPosition(e,this.hot.toPhysicalRow(e),this.hot.countRows(),this.hot.countSourceRows(),n)}},{key:"toPhysicalColumnPosition",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPhysicalIndexPosition(e,this.hot.toPhysicalColumn(e),this.hot.countCols(),this.hot.countSourceCols(),n)}},{key:"addSheet",value:function(e,n){if(en(n)&&!_u(n))return Jt("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return Jt("Sheet with the provided name already exists."),!1;try{var t=this.engine.addSheet(null!=e?e:void 0);return n&&this.engine.setSheetContent(this.engine.getSheetId(t),n),t}catch(e){return Jt(e.message),!1}}},{key:"switchSheet",value:function(e){if(this.engine.doesSheetExist(e)){this.sheetName=e;var n=this.engine.getSheetSerialized(this.sheetId);n.length>0&&this.hot.loadData(n,"".concat(yn(rx),".switchSheet"))}else Xt("The sheet named `".concat(e,"` does not exist, switch aborted."))}},{key:"getCellType",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId,r=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(n);return null!==r&&null!==o?this.engine.getCellType({sheet:t,row:r,col:o}):"EMPTY"}},{key:"isFormulaCellType",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId,r=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(n);return null!==r&&null!==o&&this.engine.doesCellHaveFormula({sheet:t,row:r,col:o})}},{key:"renderDependentSheets",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=new Set;e.forEach((function(e){var n,t=null==e||null===(n=e.address)||void 0===n?void 0:n.sheet;void 0!==t&&(r.has(t)||r.add(t))})),OS(this.engine).forEach((function(e,o){var i;(t||o!==n.sheetId)&&r.has(o)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())}))}},{key:"validateDependentCells",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=function(e){var n,t=null!==(n=null==e?void 0:e.address)&&void 0!==n?n:{},r=t.row,o=t.col,i=t.sheet;return en(i)?"".concat(i,":").concat(r,"x").concat(o):""},o=new Set(t.map((function(e){return r(e)})));e.forEach((function(e){var t,i,a=null!==(t=e.address)&&void 0!==t?t:{},s=a.row,l=a.col,u=en(s)?n.hot.toVisualRow(s):null,c=en(l)?n.hot.toVisualColumn(l):null;if(null!==u&&null!==c){var d=null==e||null===(i=e.address)||void 0===i?void 0:i.sheet,f=r(e);if(void 0!==d&&!o.has(f)){var h=OS(n.engine).get(d);h.validateCell(h.getDataAtCell(u,c),h.getCellMeta(u,c),(function(){}))}}}))}},{key:"syncChangeWithEngine",value:function(e,n,t){var r={row:this.toPhysicalRowPosition(e),col:this.toPhysicalColumnPosition(n),sheet:this.sheetId};if(this.engine.isItPossibleToSetCellContents(r))return this.engine.setCellContents(r,t);Jt("Not possible to set cell data at ".concat(JSON.stringify(r)))}},{key:"onBeforeValidate",value:function(e,n,t){var r=this.hot.propToCol(t);if(this.isFormulaCellType(n,r)){var o={row:this.hot.toPhysicalRow(n),col:this.hot.toPhysicalColumn(r),sheet:this.sheetId},i=this.engine.getCellValue(o);return"object"===FS(i)&&null!==i?i.value:i}return e}},{key:"onBeforeAutofill",value:function(e,n,t){var r=this,o=function(e){return NS(NS({},e),{},{sheet:r.sheetId})},i={start:o(n.getTopLeftCorner()),end:o(n.getBottomRightCorner())},a={start:o(t.getTopLeftCorner()),end:o(t.getBottomRightCorner())};return!1!==this.engine.isItPossibleToSetCellContents(a)&&this.engine.getFillRangeData(i,a)}},{key:"onBeforeLoadData",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.includes(yn(rx))||ex(this,ax,nn(this.hot.getSettings().data))}},{key:"onAfterLoadData",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!t.includes(yn(rx)))if(this.sheetName=DS(this.engine,this.hot.getSettings()[rx].sheetName),nx(this,ax))this.switchSheet(this.sheetName);else{var r=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,r)){ex(this,ix,!0);var o=this.engine.setSheetContent(this.sheetId,this.hot.getSourceDataArray());this.renderDependentSheets(o),ex(this,ix,!1)}}}},{key:"onModifyData",value:function(e,n,t,r){if("get"===r&&!nx(this,ix)&&null!==this.sheetName&&this.engine.doesSheetExist(this.sheetName)){var o,i=this.hot.toVisualRow(e);if(!this.isFormulaCellType(i,n)&&"ARRAY"!==this.getCellType(i,n))return void(IS(t.value)&&(t.value=IS(o=t.value)?o.substr(1):o));var a={row:e,col:this.toPhysicalColumnPosition(n),sheet:this.sheetId},s=this.engine.getCellValue(a),l="object"===FS(s)&&null!==s?s.value:s;t.value=l}}},{key:"onModifySourceData",value:function(e,n,t,r){if("get"===r&&!nx(this,ix)&&null!==this.sheetName&&this.engine.doesSheetExist(this.sheetName)){var o=this.hot.toVisualRow(e),i=this.hot.propToCol(n);if(!this.isFormulaCellType(o,i)&&"ARRAY"!==this.getCellType(o,i))return;var a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0!==a.width||0!==a.height){var s={row:e,col:this.toPhysicalColumnPosition(i),sheet:this.sheetId};t.value=this.engine.getCellSerialized(s)}}}},{key:"onAfterSetDataAtCell",value:function(e,n){var t=this;if(!ox(n)){var r=[],o=[],i=this.engine.batch((function(){e.forEach((function(e){var n=US(e,4),i=n[0],a=n[1],s=n[3],l=t.hot.propToCol(a),u=t.hot.toPhysicalRow(i),c=t.hot.toPhysicalColumn(l),d={row:u,col:c,sheet:t.sheetId};null!==u&&null!==c?t.syncChangeWithEngine(i,l,s):r.push([i,l,s]),o.push({address:d})}))}));r.length&&this.hot.addHookOnce("afterChange",(function(){var e=t.engine.batch((function(){r.forEach((function(e){var n=US(e,3),r=n[0],o=n[1],i=n[2];t.syncChangeWithEngine(r,o,i)}))}));t.renderDependentSheets(e,!0)})),this.renderDependentSheets(i),this.validateDependentCells(i,o)}}},{key:"onAfterSetSourceDataAtCell",value:function(e,n){var t=this;if(!ox(n)){var r=[],o=[];e.forEach((function(e){var n=US(e,4),i=n[0],a=n[1],s=n[3],l=t.hot.propToCol(a);if(ro(l)){var u={row:i,col:t.toPhysicalColumnPosition(l),sheet:t.sheetId};t.engine.isItPossibleToSetCellContents(u)?(o.push({address:u}),r.push.apply(r,HS(t.engine.setCellContents(u,s)))):Jt("Not possible to set source cell data at ".concat(JSON.stringify(u)))}})),this.renderDependentSheets(r),this.validateDependentCells(r,o)}}},{key:"onBeforeCreateRow",value:function(e,n){if(null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[this.toPhysicalRowPosition(e),n]))return!1}},{key:"onBeforeCreateCol",value:function(e,n){if(null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[this.toPhysicalColumnPosition(e),n]))return!1}},{key:"onBeforeRemoveRow",value:function(e,n,t){var r=this;return!1!==t.every((function(e){return r.engine.isItPossibleToRemoveRows(r.sheetId,[e,1])}))&&void 0}},{key:"onBeforeRemoveCol",value:function(e,n,t){var r=this;return!1!==t.every((function(e){return r.engine.isItPossibleToRemoveColumns(r.sheetId,[e,1])}))&&void 0}},{key:"onAfterCreateRow",value:function(e,n,t){if(!ox(t)){var r=this.engine.addRows(this.sheetId,[this.toPhysicalRowPosition(e),n]);this.renderDependentSheets(r)}}},{key:"onAfterCreateCol",value:function(e,n,t){if(!ox(t)){var r=this.engine.addColumns(this.sheetId,[this.toPhysicalColumnPosition(e),n]);this.renderDependentSheets(r)}}},{key:"onAfterRemoveRow",value:function(e,n,t,r){var o=this;if(!ox(r)){var i=t.sort().reverse(),a=this.engine.batch((function(){i.forEach((function(e){o.engine.removeRows(o.sheetId,[e,1])}))}));this.renderDependentSheets(a)}}},{key:"onAfterRemoveCol",value:function(e,n,t,r){var o=this;if(!ox(r)){var i=t.sort().reverse(),a=this.engine.batch((function(){i.forEach((function(e){o.engine.removeColumns(o.sheetId,[e,1])}))}));this.renderDependentSheets(a)}}},{key:"onAfterDetachChild",value:function(e,n,t){var r,o=this;ex(this,ix,!0);var i=this.hot.getSourceDataArray(t,0,t+((null===(r=n.__children)||void 0===r?void 0:r.length)||0),this.hot.countSourceCols());ex(this,ix,!1),i.forEach((function(e,n){e.forEach((function(e,r){o.engine.setCellContents({col:r,row:t+n,sheet:o.sheetId},[[e]])}))}))}},{key:"onEngineValuesUpdated",value:function(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}},{key:"onEngineNamedExpressionsAdded",value:function(e,n){this.hot.runHooks("afterNamedExpressionAdded",e,n)}},{key:"onEngineNamedExpressionsRemoved",value:function(e,n){this.hot.runHooks("afterNamedExpressionRemoved",e,n)}},{key:"onEngineSheetAdded",value:function(e){this.hot.runHooks("afterSheetAdded",e)}},{key:"onEngineSheetRenamed",value:function(e,n){this.hot.runHooks("afterSheetRenamed",e,n)}},{key:"onEngineSheetRemoved",value:function(e,n){this.hot.runHooks("afterSheetRemoved",e,n)}}])&&VS(n.prototype,t),r&&VS(n,r),i}(Wg);function ux(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return cx(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cx(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cx(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0;r&&a&&(z(e.map((function(e){return n.hot.toPhysicalColumn(e)})),(function(e){i[e]=!1})),o=Y(i,(function(e,t,r){return t&&e.push(n.hot.toVisualColumn(r)),e}),[])),!1!==this.hot.runHooks("beforeUnhideColumns",t,o,r&&a)&&(r&&a&&Cx(this,xx).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,o,r&&a,r&&o.lengtht.length))}},{key:"hideColumn",value:function(){for(var e=arguments.length,n=new Array(e),t=0;t0)&&e.every((function(e){return Number.isInteger(e)&&e>=0&&e0){var o=r.indexOf("afterHiddenColumn");o>-1&&r.splice(o,1),t.className=r.join(" ")}}}},{key:"onModifyCopyableRange",value:function(e){var n=this;if(Cx(this,Sx).copyPasteEnabled)return e;var t=[],r=function(e,n,r,o){t.push({startRow:e,endRow:n,startCol:r,endCol:o})};return z(e,(function(e){var t=!0,o=0;io(e.startCol,e.endCol,(function(i){n.isHidden(i)?(t||r(e.startRow,e.endRow,o,i-1),t=!0):(t&&(o=i),i===e.endCol&&r(e.startRow,e.endRow,o,i),t=!1)}))})),t}},{key:"onAfterGetColHeader",value:function(e,n){if(Cx(this,Sx).indicators&&!(e<0)){var t=[];e>=1&&this.isHidden(e-1)&&t.push("afterHiddenColumn"),e=0?this.selectColumns(c):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}),function(e){var n=[];return{key:"hidden_columns_show",name:function(){var e=n.length>1?1:0;return this.getTranslatedPhrase(sf,e)},callback:function(){var t,r;if(0!==n.length){var o=n[0],i=n[n.length-1];o=null!==(t=this.columnIndexMapper.getFirstNotHiddenIndex(o-1,-1))&&void 0!==t?t:0,i=null!==(r=this.columnIndexMapper.getFirstNotHiddenIndex(i+1,1))&&void 0!==r?r:this.countCols()-1,e.showColumns(n),this.render(),this.view.adjustElementsSize(!0),i-o+1===this.countCols()||this.selectColumns(o,i)}},disabled:!1,hidden:function(){var t=this,r=V(e.getHiddenColumns(),(function(e){return t.toPhysicalColumn(e)}));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||r.length<1)return!0;n.length=0;var o=this.getSelectedRangeLast(),i=o.getTopLeftCorner().col,a=o.getBottomRightCorner().col,s=this.columnIndexMapper,l=s.getRenderableFromVisualIndex(i),u=s.getRenderableFromVisualIndex(a),c=s.getNotTrimmedIndexes(),d=[];if(i!==a){if(a-i+1>u-l+1){var f=c.slice(i,a+1);d.push.apply(d,dx(f.filter((function(e){return r.includes(e)}))))}}else if(0===l&&la&&d.push.apply(d,dx(c.slice(a+1)))}return z(d,(function(e){n.push(t.toVisualColumn(e))})),0===n.length}}}(this))}},{key:"onMapInit",value:function(){Array.isArray(Cx(this,Sx).columns)&&this.hideColumns(Cx(this,Sx).columns)}},{key:"destroy",value:function(){Ex(this,Sx,null),Ex(this,xx,null),px(wx(i.prototype),"destroy",this).call(this)}}])&&mx(n.prototype,t),r&&mx(n,r),i}(Wg);function jx(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Bx(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Bx(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bx(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0;r&&a&&(z(e.map((function(e){return n.hot.toPhysicalRow(e)})),(function(e){i[e]=!1})),o=Y(i,(function(e,t,r){return t&&e.push(n.hot.toVisualRow(r)),e}),[])),!1!==this.hot.runHooks("beforeUnhideRows",t,o,r&&a)&&(r&&a&&Yx(this,Kx).setValues(i),this.hot.runHooks("afterUnhideRows",t,o,r&&a,r&&o.lengtht.length))}},{key:"hideRow",value:function(){for(var e=arguments.length,n=new Array(e),t=0;t0)&&e.every((function(e){return Number.isInteger(e)&&e>=0&&e0){var o=r.indexOf("afterHiddenRow");o>-1&&r.splice(o,1),t.className=r.join(" ")}}}},{key:"onModifyCopyableRange",value:function(e){var n=this;if(Yx(this,zx).copyPasteEnabled)return e;var t=[],r=function(e,n,r,o){t.push({startRow:e,endRow:n,startCol:r,endCol:o})};return z(e,(function(e){var t=!0,o=0;io(e.startRow,e.endRow,(function(i){n.isHidden(i)?(t||r(o,i-1,e.startCol,e.endCol),t=!0):(t&&(o=i),i===e.endRow&&r(o,i,e.startCol,e.endCol),t=!1)}))})),t}},{key:"onAfterGetRowHeader",value:function(e,n){if(Yx(this,zx).indicators&&!(e<0)){var t=[];e>=1&&this.isHidden(e-1)&&t.push("afterHiddenRow"),e=0?this.selectRows(c):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden:function(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}),function(e){var n=[];return{key:"hidden_rows_show",name:function(){var e=n.length>1?1:0;return this.getTranslatedPhrase(uf,e)},callback:function(){var t,r;if(0!==n.length){var o=n[0],i=n[n.length-1];o=null!==(t=this.rowIndexMapper.getFirstNotHiddenIndex(o-1,-1))&&void 0!==t?t:0,i=null!==(r=this.rowIndexMapper.getFirstNotHiddenIndex(i+1,1))&&void 0!==r?r:this.countRows()-1,e.showRows(n),this.render(),this.view.adjustElementsSize(!0),i-o+1===this.countRows()||this.selectRows(o,i)}},disabled:!1,hidden:function(){var t=this,r=V(e.getHiddenRows(),(function(e){return t.toPhysicalRow(e)}));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||r.length<1)return!0;n.length=0;var o=this.getSelectedRangeLast(),i=o.getTopLeftCorner().row,a=o.getBottomRightCorner().row,s=this.rowIndexMapper,l=s.getRenderableFromVisualIndex(i),u=s.getRenderableFromVisualIndex(a),c=s.getNotTrimmedIndexes(),d=[];if(i!==a){if(a-i+1>u-l+1){var f=c.slice(i,a+1);d.push.apply(d,Tx(f.filter((function(e){return r.includes(e)}))))}}else if(0===l&&la&&d.push.apply(d,Tx(c.slice(a+1)))}return z(d,(function(e){n.push(t.toVisualRow(e))})),0===n.length}}}(this))}},{key:"onMapInit",value:function(){Array.isArray(Yx(this,zx).rows)&&this.hideRows(Yx(this,zx).rows)}},{key:"destroy",value:function(){Wx(this,zx,null),Wx(this,Kx,null),Ix(Ux(i.prototype),"destroy",this).call(this)}}])&&Dx(n.prototype,t),r&&Dx(n,r),i}(Wg);function qx(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return Jx(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Jx(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jx(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);tt.fixedColumnsLeft-1||(t.fixedColumnsLeft-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsLeft))}},{key:"addContextMenuEntry",value:function(e){var n;e.items.push({name:"---------"},(n=this,{key:"freeze_column",name:function(){return this.getTranslatedPhrase(Dd)},callback:function(e,t){var r=qx(t,1)[0].start.col;n.freezeColumn(r),this.render(),this.view.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),n=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsLeft-1)&&(n=!0),n}}),function(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(Id)},callback:function(n,t){var r=Xx(t,1)[0].start.col;e.unfreezeColumn(r),this.render(),this.view.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),n=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsLeft)&&(n=!0),n}}}(this))}},{key:"onBeforeColumnMove",value:function(e,n){if(sM.get(this).afterFirstUse){var t=this.hot.getSettings().fixedColumnsLeft;if(n=1}},{key:"setPosition",value:function(e,n){ro(e)&&(this._element.style.top=e+"px"),ro(n)&&(this._element.style.left=n+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,n){ro(e)&&(this._element.style.width=e+"px"),ro(n)&&(this._element.style.height=n+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,n){ro(e)&&(this._element.style.marginTop=e+"px"),ro(n)&&(this._element.style.marginLeft=n+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}])&&uM(n.prototype,t),r&&uM(n,r),e}();function dM(e){return(dM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fM(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function hM(e,n){for(var t=0;tt,o=n<0,i=e.some((function(e){return e<0})),a=e.some((function(e){return e>=t}));return!(r||o||i||a)}},{key:"isColumnOrderChanged",value:function(e,n){return e.some((function(e,t){return e-t!==n}))}},{key:"countFinalIndex",value:function(e,n){var t=Y(e,(function(e,t){return t0?e.target.col=0:e.target.col=n>0?n-1:n;else if(e.target.TD.offsetWidth/2+a<=s){var h=e.coords>=e.countCols?e.countCols-1:e.coords;e.target.col=h+1,a+=e.target.TD.offsetWidth,e.target.col>t&&t=e.fixedColumns&&n>0&&this.hot.scrollViewportTo(void 0,n-1);e.target.col<=n&&e.target.col>=e.fixedColumns&&n>0&&this.hot.scrollViewportTo(void 0,n-1);var A=s,m=a;s+d+c>=l?A=l-d-c:s+c=l-1?m=l-1:0===m?m=1:void 0!==o.scrollX&&e.coords=h&&n.col<=A){r.column=!0,s.pressed=!0,s.target.eventPageX=e.pageX,s.coords=n.col,s.target.TD=t,s.target.col=n.col,s.columnsToMove=this.prepareColumnsToMoving(h,A),s.hasRowHeaders=!!this.hot.getSettings().rowHeaders,s.countCols=this.hot.countCols(),s.fixedColumns=this.hot.getSettings().fixedColumnsLeft,s.rootElementOffset=qn(this.hot.rootElement).left;var m=s.hasRowHeaders?-1:0,p=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,g=n.col-1?Un(this.hot.rootElement,"show-ui"):Fn(this.hot.rootElement,"show-ui"),r.row=!0,r.column=!0,r.cell=!0,i.coords=n.col,i.target.TD=t)}},{key:"onMouseUp",value:function(){var e=HM.get(this),n=e.target.col,t=e.columnsToMove.length;if(e.coords=void 0,e.pressed=!1,e.backlightWidth=0,Un(this.hot.rootElement,["on-moving--columns","show-ui","after-selection--columns"]),this.hot.selection.isSelectedByColumnHeader()&&Fn(this.hot.rootElement,"after-selection--columns"),!(t<1||void 0===n)){var r=e.columnsToMove[0],o=this.hot.toPhysicalColumn(r),i=this.dragColumns(e.columnsToMove,n);if(e.columnsToMove.length=0,!0===i){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);var a=this.hot.toVisualColumn(o),s=a+t-1;this.hot.selectColumns(a,s)}}}},{key:"onAfterScrollVertically",value:function(){var e=this.hot.view.wt.wtTable,n=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(n),this.backlight.setSize(null,e.hider.offsetHeight-n)}},{key:"buildPluginUI",value:function(){this.backlight.build(),this.guideline.build()}},{key:"onAfterLoadData",value:function(){this.moveBySettingsOrLoad()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),TM(IM(i.prototype),"destroy",this).call(this)}}])&&BM(n.prototype,t),r&&BM(n,r),i}(Wg);function NM(e){return(NM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FM(e,n){for(var t=0;t=2&&(this.selectedCols.length>1?(z(this.selectedCols,(function(e){t(e)})),n()):z(this.selectedCols,(function(e){t(e,!0)}))),this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var n=this;Nn(e.target,"manualColumnResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((function(){return n.afterMouseDownTimeout()}),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=e.pageX,this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var n=this;this.pressed&&(this.currentWidth=this.startWidth+(e.pageX-this.startX),z(this.selectedCols,(function(e){n.newSize=n.setManualSize(e,n.currentWidth)})),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,n=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.adjustElementsSize(!0)},t=function(t,r){e.hot.runHooks("beforeColumnResize",e.newSize,t,!1),r&&n(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",e.newSize,t,!1)};this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth&&(this.selectedCols.length>1?(z(this.selectedCols,(function(e){t(e)})),n()):z(this.selectedCols,(function(e){t(e,!0)}))),this.setupHandlePosition(this.currentTH))}},{key:"bindEvents",value:function(){var e=this,n=this.hot,t=n.rootWindow,r=n.rootElement;this.eventManager.addEventListener(r,"mouseover",(function(n){return e.onMouseOver(n)})),this.eventManager.addEventListener(r,"mousedown",(function(n){return e.onMouseDown(n)})),this.eventManager.addEventListener(t,"mousemove",(function(n){return e.onMouseMove(n)})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()}))}},{key:"onModifyColWidth",value:function(e,n){var t=e;if(this.enabled){var r=this.hot.toPhysicalColumn(n),o=this.columnWidthsMap.getValueAtIndex(r);this.hot.getSettings().manualColumnResize&&o&&(t=o)}return t}},{key:"onBeforeStretchingColumnWidth",value:function(e,n){var t=this.columnWidthsMap.getValueAtIndex(n);return null===t&&(t=e),t}},{key:"onBeforeColumnResize",value:function(){this.hot.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked()}},{key:"destroy",value:function(){UM(zM(i.prototype),"destroy",this).call(this)}}])&&FM(n.prototype,t),r&&FM(n,r),i}(Wg);function qM(e,n){for(var t=0;t=1}},{key:"setPosition",value:function(e,n){void 0!==e&&(this._element.style.top=e+"px"),void 0!==n&&(this._element.style.left=n+"px")}},{key:"getPosition",value:function(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}},{key:"setSize",value:function(e,n){e&&(this._element.style.width=e+"px"),n&&(this._element.style.height=n+"px")}},{key:"getSize",value:function(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}},{key:"setOffset",value:function(e,n){e&&(this._element.style.marginTop=e+"px"),n&&(this._element.style.marginLeft=n+"px")}},{key:"getOffset",value:function(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}])&&qM(n.prototype,t),r&&qM(n,r),e}();function XM(e){return(XM="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $M(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function ZM(e,n){for(var t=0;tt,o=n<0,i=e.some((function(e){return e<0})),a=e.some((function(e){return e>=t}));return!(r||o||i||a)}},{key:"isRowOrderChanged",value:function(e,n){return e.some((function(e,t){return e-t!==n}))}},{key:"countFinalIndex",value:function(e,n){var t=Y(e,(function(e,t){return tthis.hot.getSettings().fixedRowsBottom}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}},{key:"persistentStateLoad",value:function(){var e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}},{key:"prepareRowsToMoving",value:function(){var e=this.hot.getSelectedRangeLast(),n=[];if(!e)return n;var t=e.from,r=e.to;return io(Math.min(t.row,r.row),Math.max(t.row,r.row),(function(e){n.push(e)})),n}},{key:"refreshPositions",value:function(){var e=Cj.get(this),n=e.target.coords,t=this.hot.view.wt.wtTable.getFirstVisibleRow(),r=this.hot.view.wt.wtTable.getLastVisibleRow(),o=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();n.row0&&this.hot.scrollViewportTo(t-1),n.row>=r&&r0?t-1:t:s.offsetHeight/2+u<=c?(e.target.row=n.row+1,u+=0===n.row?s.offsetHeight-1:s.offsetHeight):e.target.row=n.row;var m=c,p=u;c+A+h>=d?m=d-A-h:c+h=d-1&&(p=d-1);var g=0;this.hot.view.wt.wtOverlays.topOverlay&&(g=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),n.row>=o&&p-a.holder.scrollTop=A&&n.row<=m){r.row=!0,u.pressed=!0,u.target.eventPageY=e.pageY,u.target.coords=n,u.target.TD=t,u.rowsToMove=this.prepareRowsToMoving();var p=i.holder.scrollLeft+a.getRowHeaderWidth();this.backlight.setPosition(null,p),this.backlight.setSize(i.hider.offsetWidth-p,this.getRowsHeight(A,m)),this.backlight.setOffset(-1*(this.getRowsHeight(A,n.row-1)+e.offsetY),null),Fn(this.hot.rootElement,"on-moving--rows"),this.refreshPositions()}else Un(this.hot.rootElement,"after-selection--rows"),u.pressed=!1,u.rowsToMove.length=0}},{key:"onMouseMove",value:function(e){var n=Cj.get(this);if(n.pressed){if(e.target===this.backlight.element){var t=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout((function(){this.backlight.setPosition(null,t)}))}n.target.eventPageY=e.pageY,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,n,t,r){var o=this.hot.getSelectedRangeLast(),i=Cj.get(this);o&&i.pressed&&(i.rowsToMove.indexOf(n.row)>-1?Un(this.hot.rootElement,"show-ui"):Fn(this.hot.rootElement,"show-ui"),r.row=!0,r.column=!0,r.cell=!0,i.target.coords=n,i.target.TD=t)}},{key:"onMouseUp",value:function(){var e=Cj.get(this),n=e.target.row,t=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,Un(this.hot.rootElement,["on-moving--rows","show-ui","after-selection--rows"]),this.hot.selection.isSelectedByRowHeader()&&Fn(this.hot.rootElement,"after-selection--rows"),!(t<1||void 0===n)){var r=e.rowsToMove[0],o=this.hot.toPhysicalRow(r),i=this.dragRows(e.rowsToMove,n);if(e.rowsToMove.length=0,!0===i){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);var a=this.hot.toVisualRow(o),s=a+t-1;this.hot.selectRows(a,s)}}}},{key:"onAfterScrollHorizontally",value:function(){var e=this.hot.view.wt.wtTable,n=this.hot.view.wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,n),this.backlight.setSize(e.hider.offsetWidth-n)}},{key:"buildPluginUI",value:function(){this.backlight.build(),this.guideline.build()}},{key:"onAfterLoadData",value:function(){this.moveBySettingsOrLoad()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),gj(_j(i.prototype),"destroy",this).call(this)}}])&&pj(n.prototype,t),r&&pj(n,r),i}(Wg);function kj(e){return(kj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sj(e,n){for(var t=0;t=t.countNotHiddenRowIndexes(0,1)-r.getSetting("fixedRowsBottom");u?a=r.wtOverlays.topLeftCornerOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col):c&&(a=r.wtOverlays.bottomLeftCornerOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col)),a||(a=r.wtOverlays.leftOverlay.getRelativeCellPosition(this.currentTH,o.row,o.col)),this.currentRow=this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.selectedRows=[];var d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();this.hot.selection.isSelected()&&d&&z(this.hot.getSelectedRange(),(function(e){io(e.getTopLeftCorner().row,e.getBottomLeftCorner().row,(function(e){n.selectedRows.includes(e)||n.selectedRows.push(e)}))})),this.selectedRows.includes(this.currentRow)||(this.selectedRows=[this.currentRow]),this.startOffset=a.top-6,this.startHeight=parseInt(l.height,10),this.handle.style.top="".concat(this.startOffset+this.startHeight,"px"),this.handle.style.left="".concat(a.left,"px"),this.handle.style.width="".concat(s,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.top="".concat(this.startOffset+this.currentHeight,"px")}},{key:"setupGuidePosition",value:function(){var e=parseInt(it(this.handle),10),n=parseInt(this.handle.style.left,10)+e,t=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);Fn(this.handle,"active"),Fn(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left="".concat(n,"px"),this.guide.style.width="".concat(t-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.top=this.handle.style.top}},{key:"hideHandleAndGuide",value:function(){Un(this.handle,"active"),Un(this.guide,"active")}},{key:"checkIfRowHeader",value:function(e){var n,t;return Tn(e,["TH"],this.hot.rootElement)&&"TBODY"===(null===(n=e.parentNode)||void 0===n||null===(t=n.parentNode)||void 0===t?void 0:t.tagName)}},{key:"getClosestTHParent",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}},{key:"getActualRowHeight",value:function(e){var n=this.hot.view.wt.wtTable.getRowHeight(e);return void 0!==n&&this.newSize=2&&(this.selectedRows.length>1?(z(this.selectedRows,(function(e){t(e)})),n()):z(this.selectedRows,(function(e){t(e,!0)}))),this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var n=this;Nn(e.target,"manualRowResizer")&&(this.setupHandlePosition(this.currentTH),this.setupGuidePosition(),this.pressed=!0,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((function(){return n.afterMouseDownTimeout()}),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=e.pageY,this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var n=this;this.pressed&&(this.currentHeight=this.startHeight+(e.pageY-this.startY),z(this.selectedRows,(function(e){n.newSize=n.setManualSize(e,n.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,n=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.adjustElementsSize(!0)},t=function(t,r){e.hot.runHooks("beforeRowResize",e.getActualRowHeight(t),t,!1),r&&n(),e.saveManualRowHeights(),e.hot.runHooks("afterRowResize",e.getActualRowHeight(t),t,!1)};this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight&&(this.selectedRows.length>1?(z(this.selectedRows,(function(e){t(e)})),n()):z(this.selectedRows,(function(e){t(e,!0)}))),this.setupHandlePosition(this.currentTH))}},{key:"bindEvents",value:function(){var e=this,n=this.hot,t=n.rootElement,r=n.rootWindow;this.eventManager.addEventListener(t,"mouseover",(function(n){return e.onMouseOver(n)})),this.eventManager.addEventListener(t,"mousedown",(function(n){return e.onMouseDown(n)})),this.eventManager.addEventListener(r,"mousemove",(function(n){return e.onMouseMove(n)})),this.eventManager.addEventListener(r,"mouseup",(function(){return e.onMouseUp()}))}},{key:"onModifyRowHeight",value:function(e,n){var t=e;if(this.enabled){var r=this.hot.toPhysicalRow(n),o=this.rowHeightsMap.getValueAtIndex(r);this.hot.getSettings().manualRowResize&&o&&(t=o)}return t}},{key:"onMapInit",value:function(){var e=this,n=Hj.get(this),t=this.hot.getSettings().manualRowResize,r=this.loadManualRowHeights();this.hot.batchExecution((function(){void 0!==r?r.forEach((function(n,t){e.rowHeightsMap.setValueAtIndex(t,n)})):Array.isArray(t)?(t.forEach((function(n,t){e.rowHeightsMap.setValueAtIndex(t,n)})),n.config=t):!0===t&&Array.isArray(n.config)&&n.config.forEach((function(n,t){e.rowHeightsMap.setValueAtIndex(t,n)}))}),!0)}},{key:"destroy",value:function(){xj(Lj(i.prototype),"destroy",this).call(this)}}])&&Sj(n.prototype,t),r&&Sj(n,r),i}(Wg);function Nj(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function Fj(e,n){for(var t=0;t=n||e.row+e.rowspan-1>=n||e.col>=t||e.col+e.colspan-1>=t}}],(t=[{key:"normalize",value:function(e){var n=e.countRows(),t=e.countCols();this.row<0?this.row=0:this.row>n-1&&(this.row=n-1),this.col<0?this.col=0:this.col>t-1&&(this.col=t-1),this.row+this.rowspan>n-1&&(this.rowspan=n-this.row),this.col+this.colspan>t-1&&(this.colspan=t-this.col)}},{key:"includes",value:function(e,n){return this.row<=e&&this.col<=n&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=n}},{key:"includesHorizontally",value:function(e){return this.col<=e&&this.col+this.colspan-1>=e}},{key:"includesVertically",value:function(e){return this.row<=e&&this.row+this.rowspan-1>=e}},{key:"shift",value:function(e,n){var t=e[0]||e[1],r=n+Math.abs(e[0]||e[1])-1,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(n,r),s=Math.max(n,r),l=this[i],u=this[i]+this[o]-1;if(l>=n&&(this[i]+=t),t>0)n<=u&&n>l&&(this[o]+=t);else if(t<0){if(a<=l&&s>=u)return this.removed=!0,!1;if(l>=a&&l<=s){var c=s-l+1,d=Math.abs(t)-c;this[i]-=d+t,this[o]-=c}else if(l<=a&&u>=s)this[o]+=t;else if(l<=a&&u>=a&&uthis.row:"right"===n?e.col+e.colspan-1this.col:null)}},{key:"getLastRow",value:function(){return this.row+this.rowspan-1}},{key:"getLastColumn",value:function(){return this.col+this.colspan-1}},{key:"getRange",value:function(){return new fh(new Ht(this.row,this.col),new Ht(this.row,this.col),new Ht(this.getLastRow(),this.getLastColumn()))}}])&&Fj(n.prototype,t),r&&Fj(n,r),e}();function Yj(e,n,t,r){n?n.row===t&&n.col===r?(e.setAttribute("rowspan",n.rowspan.toString()),e.setAttribute("colspan",n.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}function Wj(e){return function(e){if(Array.isArray(e))return Vj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return Vj(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Vj(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vj(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t=e&&t.col<=n&&t.col+t.colspan-1>=n&&(r=t,1))})),r}},{key:"getByRange",value:function(e){var n=this.mergedCells,t=!1;return z(n,(function(n){return!(n.row<=e.from.row&&n.row+n.rowspan-1>=e.to.row&&n.col<=e.from.col&&n.col+n.colspan-1>=e.to.col)||(t=n)})),t}},{key:"getWithinRange",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=this.mergedCells,r=[],o=e;if(!o.includesRange){var i=new Ht(o.from.row,o.from.col),a=new Ht(o.to.row,o.to.col);o=new fh(i,i,a)}return z(t,(function(e){var t=new Ht(e.row,e.col),i=new Ht(e.row+e.rowspan-1,e.col+e.colspan-1),a=new fh(t,t,i);n?o.overlaps(a)&&r.push(e):o.includesRange(a)&&r.push(e)})),!!r.length&&r}},{key:"add",value:function(n){var t=this.mergedCells,r=n.row,o=n.col,i=n.rowspan,a=n.colspan,s=new Qj(r,o,i,a),l=this.get(r,o),u=this.isOverlapping(s);return l||u?(Jt(e.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),t.push(s),s)}},{key:"remove",value:function(e,n){var t=this.mergedCells,r=this.get(e,n),o=r?this.mergedCells.indexOf(r):-1;return!(!r||-1===o)&&(t.splice(o,1),r)}},{key:"clear",value:function(){var e=this,n=this.mergedCells,t=[],r=[];z(n,(function(n){var r=e.hot.getCell(n.row,n.col);r&&t.push([r,e.get(n.row,n.col),n.row,n.col])})),this.mergedCells.length=0,z(t,(function(n,o){io(0,n.rowspan-1,(function(t){io(0,n.colspan-1,(function(o){if(0!==o||0!==t){var i=e.hot.getCell(n.row+t,n.col+o);i&&r.push([i,null,null,null])}}))})),t[o][1]=null})),z(t,(function(e){Yj.apply(void 0,Wj(e))})),z(r,(function(e){Yj.apply(void 0,Wj(e))}))}},{key:"isOverlapping",value:function(e){var n=new fh(new Ht(0,0),new Ht(e.row,e.col),new Ht(e.row+e.rowspan-1,e.col+e.colspan-1)),t=!1;return z(this.mergedCells,(function(e){return!new fh(new Ht(0,0),new Ht(e.row,e.col),new Ht(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(n)||(t=!0,!1)})),t}},{key:"isFirstRenderableMergedCell",value:function(e,n){var t=this.get(e,n);return t&&this.hot.rowIndexMapper.getFirstNotHiddenIndex(t.row,1)===e&&this.hot.columnIndexMapper.getFirstNotHiddenIndex(t.col,1)===n}},{key:"getFirstRenderableCoords",value:function(e,n){var t=this.get(e,n);if(!t||this.isFirstRenderableMergedCell(e,n))return new Ht(e,n);var r=this.hot.rowIndexMapper.getFirstNotHiddenIndex(t.row,1),o=this.hot.columnIndexMapper.getFirstNotHiddenIndex(t.col,1);return new Ht(r,o)}},{key:"shiftCollections",value:function(e,n,t){var r=this,o=[0,0];switch(e){case"right":o[0]+=t;break;case"left":o[0]-=t;break;case"down":o[1]+=t;break;case"up":o[1]-=t}z(this.mergedCells,(function(e){e.shift(o,n)})),ao(this.mergedCells.length-1,0,(function(e){var n=r.mergedCells[e];n&&n.removed&&r.mergedCells.splice(r.mergedCells.indexOf(n),1)}))}}])&&zj(n.prototype,t),r&&zj(n,r),e}();function Gj(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return qj(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qj(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qj(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t-1?u-s+1:c-l+1,f=i-Math.floor(i/d)*d,h=this.getFarthestCollection(e,n,t,r);if(h)if("down"===t){var A=h.row+h.rowspan-s-f;o[2]+A>=this.plugin.hot.countRows()?o[2]-=f:o[2]+=f?A:0}else if("right"===t){var m=h.col+h.colspan-l-f;o[3]+m>=this.plugin.hot.countCols()?o[3]-=f:o[3]+=f?m:0}else if("up"===t){var p=u-f-h.row+1;o[0]+p<0?o[0]+=f:o[0]-=f?p:0}else if("left"===t){var g=c-f-h.col+1;o[1]+g<0?o[1]+=f:o[1]-=f?g:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:t,foundMergedCells:r,fillSize:i,dragArea:o,cycleLength:d}),o}},{key:"updateCurrentFillCache",value:function(e){this.currentFillData||(this.currentFillData={}),se(this.currentFillData,e)}},{key:"getAutofillSize",value:function(e,n,t){var r=Gj(e,4),o=r[0],i=r[1],a=r[2],s=r[3],l=Gj(n,4),u=l[0],c=l[1],d=l[2],f=l[3];switch(t){case"up":return o-u;case"down":return d-a;case"left":return i-c;case"right":return f-s;default:return null}}},{key:"getDragArea",value:function(e,n,t){var r=Gj(e,4),o=r[0],i=r[1],a=r[2],s=r[3],l=Gj(n,4),u=l[0],c=l[1],d=l[2],f=l[3];switch(t){case"up":return[u,c,o-1,s];case"down":return[a+1,i,d,s];case"left":return[u,c,a,i-1];case"right":return[o,s+1,d,f];default:return null}}},{key:"getFarthestCollection",value:function(e,n,t,r){var o=Gj(e,4),i=o[0],a=o[1],s=o[2],l=o[3],u=["up","down"].indexOf(t)>-1,c=u?s:l,d=u?i:a,f=this.getAutofillSize(e,n,t),h=u?s-i+1:l-a+1,A=f-Math.floor(f/h)*h,m=null,p=null,g=null;switch(t){case"up":m="includesVertically",g=c-A+1;break;case"left":m="includesHorizontally",g=c-A+1;break;case"down":m="includesVertically",g=d+A-1;break;case"right":m="includesHorizontally",g=d+A-1}return z(r,(function(e){e[m](g)&&e.isFarther(p,t)&&(p=e)})),p}},{key:"recreateAfterDataPopulation",value:function(e){if(this.currentFillData){var n=this.getRangeFromChanges(e),t=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,o=function(e,t){switch(r){case"up":return e.row-t>=n.from.row;case"down":return e.row+e.rowspan-1+t<=n.to.row;case"left":return e.col-t>=n.from.column;case"right":return e.col+e.colspan-1+t<=n.to.column;default:return null}},i=0,a=null,s=1;do{for(var l=0;lt.max)&&(t.max=o),(null===r.min||ir.max)&&(r.max=i)})),{from:{row:t.min,column:r.min},to:{row:t.max,column:r.max}}}},{key:"dragAreaOverlapsCollections",value:function(e,n,t){var r=Gj(this.getDragArea(e,n,t),4),o=r[0],i=r[1],a=r[2],s=r[3],l=new Ht(o,i),u=new Ht(a,s),c=new fh(l,l,u);return!!this.mergedCellsCollection.getWithinRange(c,!0)}}])&&Jj(n.prototype,t),r&&Jj(n,r),e}();function $j(e,n){for(var t=0;t0?o&&t!==i&&(r+=a-t+1):o&&t!==a&&(r-=t-i+1),e.row?e.row=r:e.col&&(e.col=r))}},{key:"getUpdatedSelectionRange",value:function(e,n){return new fh(e.highlight,e.from,new Ht(e.to.row+n.row,e.to.col+n.col))}},{key:"getSelectedMergedCellClassName",value:function(e,n,t,r){var o=Math.min(t[0],t[2]),i=Math.min(t[1],t[3]),a=Math.max(t[0],t[2]),s=Math.max(t[1],t[3]);if(void 0!==r&&this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,n)){var l=this.plugin.mergedCellsCollection.get(e,n);if(l){var u=l.getLastRow(),c=l.getLastColumn();return o<=l.row&&i<=l.col&&a>=u&&s>=c?"".concat(this.fullySelectedMergedCellClassName,"-").concat(r):this.plugin.selectionCalculations.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?"".concat(this.fullySelectedMergedCellClassName,"-multiple"):void 0}}}},{key:"isMergeCellFullySelected",value:function(e,n){var t=[];if(!n||!e)return!1;for(var r=0;re.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]&&arguments[1];return!!n||this.validateSetting(e)}},{key:"toggleMergeOnSelection",value:function(){var e=this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var n=e.from,t=e.to;this.toggleMerge(e),this.hot.selectCell(n.row,n.col,t.row,t.col,!1)}}},{key:"mergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var n=e.from,t=e.to;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(n.row,n.col,t.row,t.col,!1)}}},{key:"unmergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){var n=e.from,t=e.to;this.unmergeRange(e,!0),this.hot.selectCell(n.row,n.col,t.row,t.col,!1)}}},{key:"mergeRange",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e.getTopLeftCorner(),i=e.getBottomRightCorner(),a={row:o.row,col:o.col,rowspan:i.row-o.row+1,colspan:i.col-o.col+1},s=[],l=null;if(!this.canMergeRange(a,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),io(0,a.rowspan-1,(function(e){io(0,a.colspan-1,(function(t){var r=null;s[e]||(s[e]=[]),0===e&&0===t?r=n.hot.getDataAtCell(a.row,a.col):n.hot.setCellMeta(a.row+e,a.col+t,"hidden",!0),s[e][t]=r}))})),this.hot.setCellMeta(a.row,a.col,"spanned",!0);var u=this.mergedCellsCollection.add(a);return!u||(r?l=[a.row,a.col,s]:this.hot.populateFromArray(a.row,a.col,s,void 0,void 0,this.pluginName),this.hot.runHooks("afterMergeCells",e,a,t),l)}},{key:"unmergeRange",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.mergedCellsCollection.getWithinRange(e);r&&(this.hot.runHooks("beforeUnmergeCells",e,t),z(r,(function(e){n.mergedCellsCollection.remove(e.row,e.col),io(0,e.rowspan-1,(function(t){io(0,e.colspan-1,(function(r){n.hot.removeCellMeta(e.row+t,e.col+r,"hidden")}))})),n.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}},{key:"toggleMerge",value:function(e){var n=this.mergedCellsCollection.get(e.from.row,e.from.col);n.row===e.from.row&&n.col===e.from.col&&n.row+n.rowspan-1===e.to.row&&n.col+n.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}},{key:"merge",value:function(e,n,t,r){var o=new Ht(e,n),i=new Ht(t,r);this.mergeRange(new fh(o,o,i))}},{key:"unmerge",value:function(e,n,t,r){var o=new Ht(e,n),i=new Ht(t,r);this.unmergeRange(new fh(o,o,i))}},{key:"onAfterInit",value:function(){this.generateFromSettings(this.hot.getSettings().mergeCells),this.hot.render()}},{key:"onBeforeKeyDown",value:function(e){(e.ctrlKey||e.metaKey)&&!e.altKey&&77===e.keyCode&&(this.toggleMerge(this.hot.getSelectedRangeLast()),this.hot.render(),Vt(e))}},{key:"onAfterIsMultipleSelection",value:function(e){if(e)for(var n=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),r=0;r0?o.row=a.row+a.rowspan-1-i.row+e.row:e.row<0&&(o.row=i.row-a.row+e.row),e.col>0?o.col=a.col+a.colspan-1-i.col+e.col:e.col<0&&(o.col=i.col-a.col+e.col)}n=new Ht(r.highlight.row+o.row,r.highlight.col+o.col);var u=this.mergedCellsCollection.get(n.row,n.col);if(u){var c=this.mergedCellsCollection.getFirstRenderableCoords(u.row,u.col);t.lastDesiredCoords=n,o={row:c.row-i.row,col:c.col-i.col}}0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}},{key:"onModifyTransformEnd",value:function(e){var n=this,t=this.hot.getSelectedRangeLast(),r=ce(e),o=this.selectionCalculations.getUpdatedSelectionRange(t,e),i=ce(r),a=this.mergedCellsCollection.getWithinRange(o,!0);do{i=ce(r),this.selectionCalculations.getUpdatedSelectionRange(t,r),z(a,(function(e){n.selectionCalculations.snapDelta(r,t,e)}))}while(r.row!==i.row||r.col!==i.col);e.row=r.row,e.col=r.col}},{key:"onModifyGetCellCoords",value:function(e,n){if(!(e<0||n<0)){var t=this.mergedCellsCollection.get(e,n);if(t){var r=t.row,o=t.col,i=t.colspan;return[r,o,r+t.rowspan-1,o+i-1]}}}},{key:"addMergeActionsToContextMenu",value:function(e){var n;e.items.push({name:"---------"},(n=this,{key:"mergeCells",name:function(){var e=this.getSelectedLast();if(e){var t=n.mergedCellsCollection.get(e[0],e[1]);if(t.row===e[0]&&t.col===e[1]&&t.row+t.rowspan-1===e[2]&&t.col+t.colspan-1===e[3])return this.getTranslatedPhrase(Pd)}return this.getTranslatedPhrase(Hd)},callback:function(){n.toggleMergeOnSelection()},disabled:function(){var e=this.getSelectedLast();return!e||Qj.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}))}},{key:"onAfterRenderer",value:function(e,n,t){var r=this.mergedCellsCollection.get(n,t),o=he(r)?ce(r):void 0;if(he(o)){var i=this.hot,a=i.rowIndexMapper,s=i.columnIndexMapper,l=o.row,u=o.col,c=o.colspan,d=o.rowspan,f=nB(this.translateMergedCellToRenderable(l,d,u,c),2),h=f[0],A=f[1],m=h-a.getRenderableFromVisualIndex(n)+1,p=A-s.getRenderableFromVisualIndex(t)+1;o.row=a.getFirstNotHiddenIndex(o.row,1),o.col=s.getFirstNotHiddenIndex(o.col,1),o.rowspan=Math.min(o.rowspan,m),o.colspan=Math.min(o.colspan,p)}Yj(e,o,n,t)}},{key:"onBeforeSetRangeStart",value:function(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){var n=this.mergedCellsCollection.get(e.row,e.col),t=[n.row,n.col];e.row=t[0],e.col=t[1]}}},{key:"onBeforeSetRangeEnd",value:function(e){var n=this.hot.getSelectedRangeLast();n.highlight=new Ht(n.highlight.row,n.highlight.col),n.to=e;var t=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{t=!1;for(var r=0;re.endRow)return e.endRow=s,void this.modifyViewportRowEnd(e,n)}}}},{key:"onAfterViewportColumnCalculatorOverride",value:function(e){var n=this.hot.countRows();this.modifyViewportColumnStart(e,n),this.modifyViewportColumnEnd(e,n)}},{key:"modifyViewportColumnStart",value:function(e,n){for(var t=this.hot.columnIndexMapper,r=t.getVisualFromRenderableIndex(e.startColumn),o=0;oe.endColumn)return e.endColumn=s,void this.modifyViewportColumnEnd(e,n)}}}},{key:"translateMergedCellToRenderable",value:function(e,n,t,r){var o,i,a=this.hot,s=a.rowIndexMapper,l=a.columnIndexMapper;return o=0===n?s.getFirstNotHiddenIndex(e,1):s.getFirstNotHiddenIndex(e+n-1,-1),i=0===r?l.getFirstNotHiddenIndex(t,1):l.getFirstNotHiddenIndex(t+r-1,-1),[e>=0?s.getRenderableFromVisualIndex(o):e,t>=0?l.getRenderableFromVisualIndex(i):t]}},{key:"onModifyAutofillRange",value:function(e,n){this.autofillCalculations.correctSelectionAreaSize(n);var t=this.autofillCalculations.getDirection(n,e),r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(n,r,t))return r=n;var o=this.mergedCellsCollection.getWithinRange({from:{row:n[0],col:n[1]},to:{row:n[2],col:n[3]}});return o?r=this.autofillCalculations.snapDragArea(n,r,t,o):r}},{key:"onAfterCreateCol",value:function(e,n){this.mergedCellsCollection.shiftCollections("right",e,n)}},{key:"onAfterRemoveCol",value:function(e,n){this.mergedCellsCollection.shiftCollections("left",e,n)}},{key:"onAfterCreateRow",value:function(e,n,t){"auto"!==t&&this.mergedCellsCollection.shiftCollections("down",e,n)}},{key:"onAfterRemoveRow",value:function(e,n){this.mergedCellsCollection.shiftCollections("up",e,n)}},{key:"onAfterChange",value:function(e,n){"Autofill.fill"===n&&this.autofillCalculations.recreateAfterDataPopulation(e)}},{key:"onBeforeDrawAreaBorders",value:function(e,n){if(n&&"area"===n){var t=this.hot.getSelectedRangeLast();z(this.mergedCellsCollection.getWithinRange(t),(function(n){t.getBottomRightCorner().row===n.getLastRow()&&t.getBottomRightCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)}))}}},{key:"onAfterModifyTransformStart",value:function(e,n,t){if(this.enabled){var r=this.mergedCellsCollection.get(e.row,e.col);if(r){var o=n>0,i=n<0,a=t<0,s=t>0,l=r.row+r.rowspan-1==this.hot.countRows()-1,u=0===r.row,c=r.col+r.colspan-1==this.hot.countCols()-1,d=0===r.col;(o&&l||i&&u||s&&c||a&&d)&&(e.row=r.row,e.col=r.col)}}}},{key:"onAfterDrawSelection",value:function(e,n,t,r){if(t)return this.selectionCalculations.getSelectedMergedCellClassName(e,n,t,r)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}])&&iB(n.prototype,t),r&&iB(n,r),i}(Wg);function mB(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return pB(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return pB(e,n)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pB(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&r.push("".concat("sort","-").concat(e.getIndexOfColumnInSortQueue(n)+1)),r}function vB(e){var n=e.className.split(" "),t=new RegExp("^".concat("sort","-[0-9]{1,2}$"));return n.filter((function(e){return t.test(e)}))}function bB(e){return(bB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wB(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}},{key:"updateHeaderClasses",value:function(e){for(var n,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o0}}])&&jB(n.prototype,t),r&&jB(n,r),i}(Wg);function IB(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.label,t=void 0===n?"":n,r=e.colspan,o=void 0===r?1:r,i=e.origColspan,a=void 0===i?1:i,s=e.collapsible,l=void 0!==s&&s,u=e.crossHiddenColumns,c=void 0===u?[]:u,d=e.isCollapsed,f=void 0!==d&&d,h=e.isHidden,A=void 0!==h&&h,m=e.isRoot,p=void 0!==m&&m,g=e.isPlaceholder,y=void 0!==g&&g;return{label:t,colspan:o,origColspan:a,collapsible:l,isCollapsed:f,crossHiddenColumns:c,isHidden:A,isRoot:p,isPlaceholder:y}}function HB(e){return function(e){if(Array.isArray(e))return PB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return PB(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return PB(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PB(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:1/0,t=[];if(0===n)return t;z(e,(function(e){var r=[],o=0;t.push(r),z(e,(function(e){var t=IB();if(he(e)){var i=e.label,a=e.colspan;t.label=Ze(i),"number"==typeof a&&a>1&&(t.colspan=a,t.origColspan=a)}else t.label=Ze(e);var s=!1;if((o+=t.origColspan)>=n&&(t.colspan=t.origColspan-(o-n),t.origColspan=t.colspan,s=!0),r.push(t),t.colspan>1)for(var l=0;l=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function WB(e,n){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];KB(this,JB,NB(e,zB(this,$B))),KB(this,XB,zB(this,JB).length)}},{key:"getData",value:function(){return zB(this,JB)}},{key:"mergeWith",value:function(e){var n=this;z(e,(function(e){var t=e.row,r=e.col,o=YB(e,FB),i=n.getHeaderSettings(t,r);null!==i&&se(i,o,qB)}))}},{key:"map",value:function(e){z(zB(this,JB),(function(n){z(n,(function(n){var t=e(function(e){for(var n=1;n=zB(this,XB)||e<0)return null;var r=zB(this,JB)[e];return n>=r.length?null:null!==(t=r[n])&&void 0!==t?t:null}},{key:"getHeadersSettings",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=[];if(e>=zB(this,XB)||e<0)return r;for(var o=zB(this,JB)[e],i=0,a=n;a1&&(a+=s.colspan-1),i===t)break;if(i>t)throw new Error("The last column settings cannot overlap the other header layers")}return r}},{key:"getLayersCount",value:function(){return zB(this,XB)}},{key:"getColumnsCount",value:function(){return zB(this,XB)>0?zB(this,JB)[0].length:0}},{key:"clear",value:function(){KB(this,JB,[]),KB(this,XB,0)}}])&&WB(n.prototype,t),r&&WB(n,r),e}();function eT(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function nT(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]?arguments[0]:this,t=new e(nT({},n.data)),r=0;r1&&void 0!==arguments[1]?arguments[1]:"BF";if(!aT.has(n))throw new Error('Traversal strategy "'.concat(n,'" does not exist'));aT.get(n).call(this,e,this)}},{key:"walkUp",value:function(e){var n=this;!function t(r){!1!==e.call(n,r)&&null!==r.parent&&t(r.parent)}(this)}}])&&tT(n.prototype,t),r&&tT(n,r),e}();function lT(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function uT(e){for(var n=1;ne.length)&&(n=e.length);for(var t=0,r=new Array(n);t=i&&o<=i+a-1)return r=n,!1;i+=a}})),r}}},{key:"rebuildTreeIndex",value:function(){var e=this,n=0;mT(this,wT).clear(),z(mT(this,bT),(function(t){for(var r=dT(t,2)[1].data.colspan,o=n;o3&&void 0!==arguments[3]?arguments[3]:1,i=mT(this,_T).getHeadersSettings(t,n,o);t+=1,z(i,(function(o){var i,a=uT(uT({},o),{},{headerLevel:t-1,columnIndex:n});1===t?(e.data=a,i=e):(i=new sT(a),e.addChild(i)),t0)z(r,(function(e){e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;var n=e.data;i+=n.colspan,ET(e,(function(e){o.add(e)}))}));else{var a=n.colspan,s=n.origColspan,l=n.columnIndex;i=s-a;for(var u=1;u=n.origColspan?(n.colspan=n.origColspan,n.isCollapsed=!1):ST(e)&&(n.isCollapsed=kT(e,"isCollapsed"))})),{rollbackModification:function(){return MT(e)},affectedColumns:Array.from(o),colspanCompensation:i}}function MT(e){var n,t=e.data,r=e.childs;if(t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:function(){},affectedColumns:[],colspanCompensation:0};if(ST(e))return MT(r[0]);t.isCollapsed=!0;var o=r.slice(1),i=new Set;if(o.length>0)z(o,(function(e){ET(e,(function(e){i.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((function(e){e.data.isHidden=!0}))}));else for(var a=t.origColspan,s=t.columnIndex,l=1;l0)throw new Error(Je(yT||(yT=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["The passed node is not the last node on the tree. Only for \nthe last node, the hide column modification can be applied."],["The passed node is not the last node on the tree. Only for\\x20\nthe last node, the hide column modification can be applied."]))));if(!e.data.crossHiddenColumns.includes(n)){var t=!1;e.walkUp((function(e){if(e.data.collapsible)return t=!0,!1})),t||e.walkUp((function(e){var t=e.data;t.crossHiddenColumns.push(n),t.colspan>1?t.colspan-=1:t.isHidden=!0}))}}],["show-column",function(e,n){if(!Number.isInteger(n))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Je(vT||(vT=function(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}(["The passed node is not the last node on the tree. Only for \nthe last node, the show column modification can be applied."],["The passed node is not the last node on the tree. Only for\\x20\nthe last node, the show column modification can be applied."]))));if(e.data.crossHiddenColumns.includes(n)){var t=!1;e.walkUp((function(e){if(e.data.collapsible)return t=!0,!1})),t||e.walkUp((function(e){var t=e.data;t.crossHiddenColumns.splice(t.crossHiddenColumns.indexOf(n),1),!t.isHidden&&t.colspan=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function LT(e){var n=[];return z(e,(function(e){e.walkDown((function(e){for(var t=e.data,r=t.origColspan,o=t.columnIndex,i=t.headerLevel,a=t.crossHiddenColumns,s=function(e,n){var t;Array.isArray(e[n])?t=e[n]:(t=[],e[n]=t);return t}(n,i),l=!1,u=o;u=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function NT(e,n){for(var t=0;t=this.getLayersCount()?null:null!==(t=null===(r=QT(this,zT)[e])||void 0===r?void 0:r[n])&&void 0!==t?t:null}},{key:"getHeaderTreeNodeData",value:function(e,n){e<0&&(e=this.rowCoordsToLevel(e));var t=QT(this,VT).getNode(e,n);return t?IT({},t.data):null}},{key:"findLeftMostColumnIndex",value:function(e,n){var t;if((null!==(t=this.getHeaderSettings(e,n))&&void 0!==t?t:{isRoot:!0}).isRoot)return n;for(var r=n-1;r>=0;){var o;if((null!==(o=this.getHeaderSettings(e,r))&&void 0!==o?o:{isRoot:!0}).isRoot)break;r-=1}return r}},{key:"getLayersCount",value:function(){return QT(this,WT).getLayersCount()}},{key:"getColumnsCount",value:function(){return QT(this,WT).getColumnsCount()}},{key:"clear",value:function(){UT(this,zT,[]),QT(this,WT).clear(),QT(this,VT).clear()}}])&&NT(n.prototype,t),r&&NT(n,r),e}();function GT(e,n){for(var t=0;t1&&(o=!0),i&&(h.label+='')),zn(f,h.label),void 0!==h.colspan&&(f.colSpan=h.colspan),c.appendChild(f))}r.appendChild(c)}if(o){for(var A=n.createElement("tr"),m=0;m1){var m,p,g=null===(m=u.wt.wtOverlays.topLeftCornerOverlay)||void 0===m?void 0:m.clone.wtTable.THEAD.contains(o),y=null===(p=u.wt.wtOverlays.leftOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(o),v=g||y?Math.min(f,t-r):f;v>1&&o.setAttribute("colspan",v)}var b=s.createElement("div"),w=s.createElement("span");Fn(b,"relative"),Fn(w,"colHeader"),zn(w,h),b.appendChild(w),Yn(o),o.appendChild(b),n.hot.runHooks("afterGetColHeader",c,o)}}},{key:"onBeforeHighlightingColumnHeader",value:function(e,n,t){var r=dL(this,hL).getHeaderTreeNodeData(n,e);if(!r)return e;var o=t.classNames,i=t.columnCursor,a=t.selectionType,s=t.selectionWidth,l=dL(this,hL).getHeaderSettings(n,e),u=l.isRoot,c=l.colspan;if("header"===a){if(!u)return r.columnIndex}else"active-header"===a&&(c>s-i||!u)&&(o.length=0);return e}},{key:"onBeforeOnCellMouseDown",value:function(e,n,t,r){this._getHeaderTreeNodeDataByCoords(n)&&(r.column=!0)}},{key:"onAfterOnCellMouseDown",value:function(e,n){var t=this._getHeaderTreeNodeDataByCoords(n);if(t){var r=this.hot.selection,o=r.isSelected()?r.getSelectedRange().current():null,i=[],a=t.columnIndex,s=t.origColspan,l=!r.inInSelection(n);e.shiftKey&&o?n.colo.from.col?i.push(o.getTopLeftCorner().col,a+s-1,n.row):i.push(a,a+s-1,n.row):(Gt(e)||Kt(e)&&l)&&i.push(a,a+s-1,n.row),r.selectColumns.apply(r,i)}}},{key:"onBeforeOnCellMouseOver",value:function(e,n,t,r){var o;if(this.hot.view.isMouseDown()){var i=this._getHeaderTreeNodeDataByCoords(n);if(i){var a=i.columnIndex,s=i.origColspan,l=this.hot.getSelectedRangeLast(),u=l.getTopLeftCorner(),c=l.getBottomRightCorner(),d=l.from;r.column=!0,r.cell=!0;var f=[];n.cold.col?f.push(u.col,a+s-1):f.push(a,a+s-1),(o=this.hot).selectColumns.apply(o,f)}}}},{key:"onAfterGetColumnHeaderRenderers",value:function(e){if(e){e.length=0;for(var n=0;n=0&&(r=!1),ro(a)&&at?e:t}},{key:"onInit",value:function(){this.updatePlugin()}},{key:"onAfterLoadData",value:function(e,n){n||this.updatePlugin()}},{key:"destroy",value:function(){cL(this,hL,null),null!==dL(this,AL)&&(dL(this,AL).unsubscribe(),cL(this,AL,null)),tL(sL(i.prototype),"destroy",this).call(this)}},{key:"_getHeaderTreeNodeDataByCoords",value:function(e){if(!(e.row>=0||e.col<0))return dL(this,hL).getHeaderTreeNodeData(e.row,e.col)}}])&&nL(n.prototype,t),r&&nL(n,r),i}(Wg);function pL(e){return function(e){if(Array.isArray(e))return gL(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return gL(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return gL(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gL(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:"below",t=this.translateTrimmedRow(e),r=this.getRowParent(t),o=this.getRowIndexWithinParent(t);switch(n){case"below":this.addChildAtIndex(r,o+1,null);break;case"above":this.addChildAtIndex(r,o,null)}}},{key:"detachFromParent",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=null,o=[];Array.isArray(e)?(io(e[0],e[2],(function(e){var t=n.translateTrimmedRow(e);o.push(n.getDataObject(t))})),io(0,o.length-2,(function(e){n.detachFromParent(o[e],!1)})),r=o[o.length-1]):r=e;var i=this.getRowIndex(r),a=this.countChildren(r),s=this.getRowIndexWithinParent(r),l=this.getRowParent(r),u=this.getRowParent(l),c=this.getRowIndex(u),d=null;if(this.hot.runHooks("beforeDetachChild",l,r),null!=s){var f=Array.from(new Array(i+a+1).keys()).splice(-1*(a+1));if(this.hot.runHooks("beforeRemoveRow",i,a+1,f,this.plugin.pluginName),l.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,a+1,f,this.plugin.pluginName),u){d=c+this.countChildren(u);var h=this.getChild(u,this.countChildren(u)-1),A=this.getRowIndex(h);this.hot.runHooks("beforeCreateRow",A+1,a+1,this.plugin.pluginName),u.__children.push(r)}else d=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",d-2,a+1,this.plugin.pluginName),this.data.push(r)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",d-2,a+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,r,this.getRowIndex(r)),t&&this.hot.render()}},{key:"filterData",value:function(e,n,t){var r=this,o=[];z(t,(function(e){o.push(r.getDataObject(e))})),z(o,(function(e){var n=r.getRowIndexWithinParent(e),t=r.getRowParent(e);null===t?r.data.splice(n,1):t.__children.splice(n,1)})),this.rewriteCache()}},{key:"spliceData",value:function(e,n,t){var r,o=this.getDataObject(e-1),i=null,a=e;if(o&&o.__children&&0===o.__children.length?(i=o,a=0):en,u=o?this.getRowParent(n-1):this.getRowParent(n);null==u&&(u=this.getRowParent(n-1)),null==u&&(u=this.getDataObject(n-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(n)).__children=[];var c=o||t||r?u.__children.length:this.getRowIndexWithinParent(n),d=i===u;u.__children.splice(c,0,s[0]),i.__children.splice(a+(l&&d?1:0),1),this.syncRowWithRawSource(i),d||this.syncRowWithRawSource(u)}},{key:"translateTrimmedRow",value:function(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}},{key:"untranslateTrimmedRow",value:function(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}])&&vL(n.prototype,t),r&&vL(n,r),e}();var wL=function e(n,t){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.plugin=n};function _L(e){return(_L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CL(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&void 0!==arguments[0]&&arguments[0];t.lastCollapsedRows=t.collapsedRows.slice(0),t.expandMultipleChildren(t.lastCollapsedRows,e)},shiftStash:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==n&&(n=1/0),z(t.lastCollapsedRows,(function(o,i){o>=e&&o0&&void 0!==arguments[0])||arguments[0];t.collapseMultipleChildren(t.lastCollapsedRows,e),t.lastCollapsedRows=void 0},trimStash:function(e,n){io(e,e+n-1,(function(e){var n=t.lastCollapsedRows.indexOf(e);n>-1&&t.lastCollapsedRows.splice(n,1)}))}},t}return n=i,(t=[{key:"collapseChildren",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=[],i=null,a=null,s=null;return isNaN(e)?(i=e,a=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),a=e),this.dataManager.hasChildren(i)&&z(i.__children,(function(e){o.push(n.dataManager.getRowIndex(e))})),s=this.collapseRows(o,!0,!1),r&&this.trimRows(s),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(a)&&this.collapsedRows.push(a),s}},{key:"collapseMultipleChildren",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=[];z(e,(function(e){o.push.apply(o,BL(n.collapseChildren(e,!1,!1)))})),r&&this.trimRows(o),t&&this.renderAndAdjust()}},{key:"collapseRow",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],n)}},{key:"collapseRows",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=[];return z(e,(function(e){o.push(e),t&&n.collapseChildRows(e,o)})),r&&this.trimRows(o),o}},{key:"collapseChildRows",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){var o=this.dataManager.getDataObject(e);z(o.__children,(function(e){var r=n.dataManager.getRowIndex(e);t.push(r),n.collapseChildRows(r,t)}))}r&&this.trimRows(t)}},{key:"expandRow",value:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],n)}},{key:"expandRows",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=[];return z(e,(function(e){o.push(e),t&&n.expandChildRows(e,o)})),r&&this.untrimRows(o),o}},{key:"expandChildRows",value:function(e){var n=this,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){var o=this.dataManager.getDataObject(e);z(o.__children,(function(e){if(!n.isAnyParentCollapsed(e)){var r=n.dataManager.getRowIndex(e);t.push(r),n.expandChildRows(r,t)}}))}r&&this.untrimRows(t)}},{key:"expandChildren",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=[],i=null,a=null,s=null;return isNaN(e)?(i=e,a=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),a=e),this.collapsedRows.splice(this.collapsedRows.indexOf(a),1),this.dataManager.hasChildren(i)&&z(i.__children,(function(e){var t=n.dataManager.getRowIndex(e);o.push(t)})),s=this.expandRows(o,!0,!1),r&&this.untrimRows(s),t&&this.renderAndAdjust(),s}},{key:"expandMultipleChildren",value:function(e){var n=this,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=[];z(e,(function(e){o.push.apply(o,BL(n.expandChildren(e,!1,!1)))})),r&&this.untrimRows(o),t&&this.renderAndAdjust()}},{key:"collapseAll",value:function(){var e=this,n=this.dataManager.getData(),t=[];z(n,(function(n){e.dataManager.hasChildren(n)&&t.push(n)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}},{key:"expandAll",value:function(){var e=this,n=this.dataManager.getData(),t=[];z(n,(function(n){e.dataManager.hasChildren(n)&&t.push(n)})),this.expandMultipleChildren(t),this.renderAndAdjust()}},{key:"trimRows",value:function(e){var n=this;this.hot.batchExecution((function(){z(e,(function(e){n.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}},{key:"untrimRows",value:function(e){var n=this;this.hot.batchExecution((function(){z(e,(function(e){n.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}},{key:"areChildrenCollapsed",value:function(e){var n=this,t=isNaN(e)?e:this.dataManager.getDataObject(e),r=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&z(t.__children,(function(e){var t=n.dataManager.getRowIndex(e);if(!n.plugin.collapsedRowsMap.getValueAtIndex(t))return r=!1,!1})),r}},{key:"isAnyParentCollapsed",value:function(e){for(var n=e;null!==n;){n=this.dataManager.getRowParent(n);var t=this.dataManager.getRowIndex(n);if(this.collapsedRows.indexOf(t)>-1)return!0}return!1}},{key:"toggleState",value:function(e,n){if(!(n.col>=0)){var t=this.translateTrimmedRow(n.row);Nn(e.target,ML.CSS_CLASSES.button)&&(this.areChildrenCollapsed(t)?this.expandChildren(t):this.collapseChildren(t),Vt(e))}}},{key:"translateTrimmedRow",value:function(e){return this.hot.toPhysicalRow(e)}},{key:"untranslateTrimmedRow",value:function(e){return this.hot.toVisualRow(e)}},{key:"renderAndAdjust",value:function(){this.hot.render(),this.hot.view.adjustElementsSize()}}])&&LL(n.prototype,t),r&&LL(n,r),i}(wL);function PL(e){return(PL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function NL(e,n){for(var t=0;t=n.hot.getSettings().maxRows}},{key:"detach_from_parent",name:function(){return this.getTranslatedPhrase(of)},callback:function(){n.dataManager.detachFromParent(n.hot.getSelectedLast())},disabled:function(){var e=n.hot.getSelectedLast(),t=n.dataManager.translateTrimmedRow(e[0]);return!n.dataManager.getRowParent(t)||!e||e[0]<0||n.hot.selection.isSelectedByColumnHeader()||n.hot.countRows()>=n.hot.getSettings().maxRows}},{name:"---------"}];return io(0,e.items.length-1,(function(n){if(0===n)return z(t,(function(t,r){e.items.splice(n+r,0,t)})),!1})),this.modifyRowInsertingOptions(e)}},{key:"modifyRowInsertingOptions",value:function(e){var n=zL.get(this);return io(0,e.items.length-1,(function(t){var r=n[e.items[t].key];null!=r&&(e.items[t].callback=r)})),e}}])&&NL(n.prototype,t),r&&NL(n,r),i}(wL);function GL(e){return function(e){if(Array.isArray(e))return qL(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return qL(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return qL(e,n)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qL(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);te.length)&&(n=e.length);for(var t=0,r=new Array(n);t0&&this.headersUI.updateRowHeaderWidth(e)}},{key:"onBeforeViewRender",value:function(e,n){lO.get(this).skipRender&&(n.skipRender=!0)}},{key:"destroy",value:function(){tO(sO(i.prototype),"destroy",this).call(this)}},{key:"onBeforeLoadData",value:function(e){if(!Cu(e))return Xt("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}}])&&nO(n.prototype,t),r&&nO(n,r),i}(Wg);function cO(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function dO(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:window;cO(this,e),this.rootWindow=t,this.prefix=n,this.savedKeys=[],this.loadSavedKeys()}var n,t,r;return n=e,(t=[{key:"saveValue",value:function(e,n){this.rootWindow.localStorage.setItem("".concat(this.prefix,"_").concat(e),JSON.stringify(n)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}},{key:"loadValue",value:function(e,n){var t=void 0===e?n:e,r=this.rootWindow.localStorage.getItem("".concat(this.prefix,"_").concat(t));return null===r?void 0:JSON.parse(r)}},{key:"reset",value:function(e){this.rootWindow.localStorage.removeItem("".concat(this.prefix,"_").concat(e))}},{key:"resetAll",value:function(){var e=this;z(this.savedKeys,(function(n,t){e.rootWindow.localStorage.removeItem("".concat(e.prefix,"_").concat(e.savedKeys[t]))})),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var e=this.rootWindow.localStorage.getItem("".concat(this.prefix,"__persistentStateKeys")),n="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=n||[]}},{key:"saveSavedKeys",value:function(){this.rootWindow.localStorage.setItem("".concat(this.prefix,"__persistentStateKeys"),JSON.stringify(this.savedKeys))}},{key:"clearSavedKeys",value:function(){this.savedKeys.length=0,this.saveSavedKeys()}}])&&dO(n.prototype,t),r&&dO(n,r),e}();function hO(e){return(hO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AO(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,r=new Array(n);t1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod(),o=this.hot.countRows(),i=this.hot.countCols(),a=[],s=this.hot;return io(0,o-1,(function(o){io(0,i-1,(function(i){var l=n.hot.getDataAtCell(o,i),u=n.hot.getCellMeta(o,i),c=u.search.callback||t,d=(u.search.queryMethod||r)(e,l,u);if(d){var f={row:o,col:i,data:l};a.push(f)}c&&c(s,o,i,l,d)}))})),a}},{key:"getCallback",value:function(){return this.callback}},{key:"setCallback",value:function(e){this.callback=e}},{key:"getQueryMethod",value:function(){return this.queryMethod}},{key:"setQueryMethod",value:function(e){this.queryMethod=e}},{key:"getSearchResultClass",value:function(){return this.searchResultClass}},{key:"setSearchResultClass",value:function(e){this.searchResultClass=e}},{key:"updatePluginSettings",value:function(e){he(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}},{key:"onBeforeRenderer",value:function(e,n,t,r,o,i){var a,s=i.className||[],l=[];"string"==typeof s?l=s.split(" "):(a=l).push.apply(a,_O(s)),this.isEnabled()&&i.isSearchResult?l.includes(this.searchResultClass)||l.push("".concat(this.searchResultClass)):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),i.className=l.join(" ")}},{key:"destroy",value:function(){kO(jO(i.prototype),"destroy",this).call(this)}}])&&EO(n.prototype,t),r&&EO(n,r),i}(Wg);function OO(e){return(OO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RO(e,n){for(var t=0;tt.length))}},{key:"trimRow",value:function(){for(var e=arguments.length,n=new Array(e),t=0;t0;t&&i&&(z(e,(function(e){o[e]=!1})),r=Y(o,(function(e,n,t){return n&&e.push(t),e}),[])),!1!==this.hot.runHooks("beforeUntrimRow",n,r,t&&i)&&(t&&i&&this.trimmedRowsMap.setValues(o),this.hot.runHooks("afterUntrimRow",n,r,t&&i,t&&r.length=0&&ee.length)&&(n=e.length);for(var t=0,r=new Array(n);t1?o.getSelected():[[n[0][0],n[0][1]]];return new lR.ChangeAction(n,r)}),r)}})),e.addHook("afterCreateRow",(function(e,t,r){n.done((function(){return new lR.CreateRowAction(e,t)}),r)})),e.addHook("beforeRemoveRow",(function(t,r,o,i){n.done((function(){var o=n.instance.getSourceDataArray(),i=(o.length+t)%o.length,a=e.toPhysicalRow(i),s=ue(o.slice(a,a+r));return new lR.RemoveRowAction(i,s,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop)}),i)})),e.addHook("afterCreateCol",(function(e,t,r){n.done((function(){return new lR.CreateColumnAction(e,t)}),r)})),e.addHook("beforeRemoveCol",(function(t,r,o,i){n.done((function(){var o=n.instance.getSourceDataArray(),i=(n.instance.countCols()+t)%n.instance.countCols(),a=[],s=[],l=[];io(o.length-1,(function(n){var t=[],s=o[n];io(i,i+(r-1),(function(n){t.push(s[e.toPhysicalColumn(n)])})),a.push(t)})),io(r-1,(function(n){l.push(e.toPhysicalColumn(i+n))})),Array.isArray(e.getSettings().colHeaders)&&io(r-1,(function(n){s.push(e.getSettings().colHeaders[e.toPhysicalColumn(i+n)]||null)}));var u=e.columnIndexMapper.getIndexesSequence(),c=e.rowIndexMapper.getIndexesSequence();return new lR.RemoveColumnAction(i,l,a,s,u,c,e.getSettings().fixedColumnsLeft)}),i)})),e.addHook("beforeCellAlignment",(function(e,t,r,o){n.done((function(){return new lR.CellAlignmentAction(e,t,r,o)}))})),e.addHook("beforeFilter",(function(e){n.done((function(){return new lR.FiltersAction(e)}))})),e.addHook("beforeRowMove",(function(e,t){!1!==e&&n.done((function(){return new lR.RowMoveAction(e,t)}))})),e.addHook("beforeMergeCells",(function(t,r){r||n.done((function(){return new lR.MergeCellsAction(e,t)}))})),e.addHook("afterUnmergeCells",(function(t,r){r||n.done((function(){return new lR.UnmergeCellsAction(e,t)}))})),e.addHook("afterInit",(function(){n.init()}))}lR.prototype.done=function(e,n){if(!this.ignoreNewActions&&!("UndoRedo.undo"===n||"UndoRedo.redo"===n||"auto"===n)){var t=this.doneActions.slice();if(!1!==this.instance.runHooks("beforeUndoStackChange",t,n)){var r=e(),o=this.undoneActions.slice();this.doneActions.push(r),this.instance.runHooks("afterUndoStackChange",t,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",o),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",o,this.undoneActions.slice())}}},lR.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);var n=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());var t=ue(n);if(!1===this.instance.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var r=this,o=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",o),n.undo(this.instance,(function(){r.ignoreNewActions=!1,r.undoneActions.push(n)})),this.instance.runHooks("afterRedoStackChange",o,this.undoneActions.slice()),this.instance.runHooks("afterUndo",t)}},lR.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);var n=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());var t=ue(n);if(!1===this.instance.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var r=this,o=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",o),n.redo(this.instance,(function(){r.ignoreNewActions=!1,r.doneActions.push(n)})),this.instance.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.instance.runHooks("afterRedo",t)}},lR.prototype.isUndoAvailable=function(){return this.doneActions.length>0},lR.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},lR.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},lR.prototype.isEnabled=function(){return this.enabled},lR.prototype.enable=function(){if(!this.isEnabled()){var e,n=this.instance;this.enabled=!0,(e=n).undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()},n.addHook("beforeKeyDown",dR),n.addHook("afterChange",fR)}},lR.prototype.disable=function(){if(this.isEnabled()){var e,n=this.instance;this.enabled=!1,delete(e=n).undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo,n.removeHook("beforeKeyDown",dR),n.removeHook("afterChange",fR)}},lR.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},lR.Action=function(){},lR.Action.prototype.undo=function(){},lR.Action.prototype.redo=function(){},lR.ChangeAction=function(e,n){this.changes=e,this.selected=n,this.actionType="change"},ae(lR.ChangeAction,lR.Action),lR.ChangeAction.prototype.undo=function(e,n){for(var t=ue(this.changes),r=e.countEmptyRows(!0),o=e.countEmptyCols(!0),i=0,a=t.length;i=t&&this.index-r=0&&r>=0&&e.setCellMeta(n,r,"className",t.stateBefore[n][r]||" htLeft")}))})),e.addHookOnce("afterViewRender",n),e.render()},lR.CellAlignmentAction.prototype.redo=function(e,n){Wb(this.range,this.type,this.alignment,(function(n,t){return e.getCellMeta(n,t)}),(function(n,t,r,o){return e.setCellMeta(n,t,r,o)})),e.addHookOnce("afterViewRender",n),e.render()},lR.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},ae(lR.FiltersAction,lR.Action),lR.FiltersAction.prototype.undo=function(e,n){var t=e.getPlugin("filters");e.addHookOnce("afterViewRender",n),t.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),t.filter()},lR.FiltersAction.prototype.redo=function(e,n){var t=e.getPlugin("filters");e.addHookOnce("afterViewRender",n),t.conditionCollection.importAllConditions(this.conditionsStack),t.filter()};var uR=function(e){ZO(t,e);var n=nR(t);function t(e,r){var o;JO(this,t),(o=n.call(this)).cellRange=r;var i=o.cellRange.getTopLeftCorner(),a=o.cellRange.getBottomRightCorner();return o.rangeData=e.getData(i.row,i.col,a.row,a.col),o}return $O(t,[{key:"undo",value:function(e,n){var t=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",n),t.unmergeRange(this.cellRange,!0);var r=this.cellRange.getTopLeftCorner();e.populateFromArray(r.row,r.col,this.rangeData,void 0,void 0,"MergeCells")}},{key:"redo",value:function(e,n){var t=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",n),t.mergeRange(this.cellRange)}}]),t}(lR.Action);lR.MergeCellsAction=uR;var cR=function(e){ZO(t,e);var n=nR(t);function t(e,r){var o;return JO(this,t),(o=n.call(this)).cellRange=r,o}return $O(t,[{key:"undo",value:function(e,n){var t=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",n),t.mergeRange(this.cellRange,!0)}},{key:"redo",value:function(e,n){var t=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",n),t.unmergeRange(this.cellRange,!0),e.render()}}]),t}(lR.Action);function dR(e){if(!zt(e)){var n=this.getActiveEditor();if(!n||!n.isOpened()){var t=e.altKey,r=e.ctrlKey,o=e.keyCode,i=e.metaKey,a=e.shiftKey;if((r||i)&&!t)89===o||a&&90===o?(this.undoRedo.redo(),Vt(e)):90===o&&(this.undoRedo.undo(),Vt(e))}}}function fR(e,n){if("loadData"===n)return this.undoRedo.clear()}lR.UnmergeCellsAction=cR,lR.RowMoveAction=function(e,n){this.rows=e.slice(),this.finalIndex=n,this.actionType="row_move"},ae(lR.RowMoveAction,lR.Action),lR.RowMoveAction.prototype.undo=function(e,n){var t=this,r=e.getPlugin("manualRowMove"),o=[].concat(this.rows),i=o.filter((function(e){return e>t.finalIndex})),a=o.filter((function(e){return e<=t.finalIndex})),s=i.sort((function(e,n){return n-e})).concat(a.sort((function(e,n){return e-n})));e.addHookOnce("afterViewRender",n);for(var l=0;l1?s-1:0),u=1;u0&&void 0!==arguments[0]?arguments[0]:document;e.querySelectorAll('[class^="'.concat(OR,'"]')).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}function HR(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0;if(null!==n){var t=e.createElement("DIV"),r=NR(n.props,!1),o=r.id,i=r.className,a=r.style;return o&&(t.id=o),t.className=[OR,i].join(" "),a&&Object.assign(t.style,a),e.body.appendChild(t),w.a.createPortal(n,t)}}function PR(e,n){var t=RR(e,"hot-editor"),r=DR(t);return t?v.a.cloneElement(t,{emitEditorInstance:function(e){n.set(r,e)},isEditor:!0}):null}function NR(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{id:e.id||(n?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function FR(e){var n=v.a.version.split(".").map((function(e){return parseInt(e)}));n[0]>=16&&n[1]>=3&&(e.UNSAFE_componentWillUpdate=e.componentWillUpdate,e.componentWillUpdate=void 0,e.UNSAFE_componentWillMount=e.componentWillMount,e.componentWillMount=void 0)}var UR=function(){function e(){vR(this,e)}return wR(e,null,[{key:"getSettings",value:function(e){var n={};if(e.settings){var t=e.settings;for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])}for(var o in e)"settings"!==o&&"children"!==o&&e.hasOwnProperty(o)&&(n[o]=e[o]);return n}}]),e}(),QR=function(e){kR(t,e);var n=TR(t);function t(e,r){var o;return vR(this,t),(o=n.call(this,e,r)).localEditorPortal=null,FR(jR(o)),o}return wR(t,[{key:"getLocalEditorPortal",value:function(){return this.localEditorPortal}},{key:"setLocalEditorPortal",value:function(e){this.localEditorPortal=e}},{key:"getSettingsProps",value:function(){var e=this;return this.internalProps=["__componentRendererColumns","_emitColumnSettings","_columnIndex","_getChildElementByType","_getRendererWrapper","_getEditorClass","_getEditorCache","_getOwnerDocument","hot-renderer","hot-editor","children"],Object.keys(this.props).filter((function(n){return!e.internalProps.includes(n)})).reduce((function(n,t){return n[t]=e.props[t],n}),{})}},{key:"hasProp",value:function(e){return!!this.props[e]}},{key:"getLocalEditorElement",value:function(){return PR(this.props.children,this.props._getEditorCache())}},{key:"createColumnSettings",value:function(){var e=this.props._getChildElementByType(this.props.children,"hot-renderer"),n=this.getLocalEditorElement();this.columnSettings=UR.getSettings(this.getSettingsProps()),null!==e?(this.columnSettings.renderer=this.props._getRendererWrapper(e),this.props._componentRendererColumns.set(this.props._columnIndex,!0)):this.hasProp("renderer")?this.columnSettings.renderer=this.props.renderer:this.columnSettings.renderer=void 0,null!==n?this.columnSettings.editor=this.props._getEditorClass(n):this.hasProp("editor")?this.columnSettings.editor=this.props.editor:this.columnSettings.editor=void 0}},{key:"createLocalEditorPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,n=this.props._getEditorCache(),t=PR(e,n);t&&this.setLocalEditorPortal(HR(this.props._getOwnerDocument(),t,n))}},{key:"emitColumnSettings",value:function(){this.props._emitColumnSettings(this.columnSettings,this.props._columnIndex)}},{key:"componentWillMount",value:function(){this.createLocalEditorPortal()}},{key:"componentDidMount",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"componentWillUpdate",value:function(e,n,t){this.createLocalEditorPortal(e.children)}},{key:"componentDidUpdate",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"render",value:function(){return v.a.createElement(v.a.Fragment,null,this.getLocalEditorPortal())}}]),t}(v.a.Component),YR=function(e){kR(t,e);var n=TR(t);function t(e){var r;return vR(this,t),(r=n.call(this,e)).state={portals:[]},r}return wR(t,[{key:"render",value:function(){return v.a.createElement(v.a.Fragment,null,this.state.portals)}}]),t}(v.a.Component);function WR(e,n){return e(n={exports:{}},n.exports),n.exports +/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */}var VR="function"==typeof Symbol&&Symbol.for,zR=VR?Symbol.for("react.element"):60103,KR=VR?Symbol.for("react.portal"):60106,GR=VR?Symbol.for("react.fragment"):60107,qR=VR?Symbol.for("react.strict_mode"):60108,JR=VR?Symbol.for("react.profiler"):60114,XR=VR?Symbol.for("react.provider"):60109,$R=VR?Symbol.for("react.context"):60110,ZR=VR?Symbol.for("react.async_mode"):60111,eD=VR?Symbol.for("react.concurrent_mode"):60111,nD=VR?Symbol.for("react.forward_ref"):60112,tD=VR?Symbol.for("react.suspense"):60113,rD=VR?Symbol.for("react.suspense_list"):60120,oD=VR?Symbol.for("react.memo"):60115,iD=VR?Symbol.for("react.lazy"):60116,aD=VR?Symbol.for("react.block"):60121,sD=VR?Symbol.for("react.fundamental"):60117,lD=VR?Symbol.for("react.responder"):60118,uD=VR?Symbol.for("react.scope"):60119;function cD(e){if("object"===yR(e)&&null!==e){var n=e.$$typeof;switch(n){case zR:switch(e=e.type){case ZR:case eD:case GR:case JR:case qR:case tD:return e;default:switch(e=e&&e.$$typeof){case $R:case nD:case iD:case oD:case XR:return e;default:return n}}case KR:return n}}}function dD(e){return cD(e)===eD}var fD={AsyncMode:ZR,ConcurrentMode:eD,ContextConsumer:$R,ContextProvider:XR,Element:zR,ForwardRef:nD,Fragment:GR,Lazy:iD,Memo:oD,Portal:KR,Profiler:JR,StrictMode:qR,Suspense:tD,isAsyncMode:function(e){return dD(e)||cD(e)===ZR},isConcurrentMode:dD,isContextConsumer:function(e){return cD(e)===$R},isContextProvider:function(e){return cD(e)===XR},isElement:function(e){return"object"===yR(e)&&null!==e&&e.$$typeof===zR},isForwardRef:function(e){return cD(e)===nD},isFragment:function(e){return cD(e)===GR},isLazy:function(e){return cD(e)===iD},isMemo:function(e){return cD(e)===oD},isPortal:function(e){return cD(e)===KR},isProfiler:function(e){return cD(e)===JR},isStrictMode:function(e){return cD(e)===qR},isSuspense:function(e){return cD(e)===tD},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===GR||e===eD||e===JR||e===qR||e===tD||e===rD||"object"===yR(e)&&null!==e&&(e.$$typeof===iD||e.$$typeof===oD||e.$$typeof===XR||e.$$typeof===$R||e.$$typeof===nD||e.$$typeof===sD||e.$$typeof===lD||e.$$typeof===uD||e.$$typeof===aD)},typeOf:cD},hD=WR((function(e,n){0})),AD=(hD.AsyncMode,hD.ConcurrentMode,hD.ContextConsumer,hD.ContextProvider,hD.Element,hD.ForwardRef,hD.Fragment,hD.Lazy,hD.Memo,hD.Portal,hD.Profiler,hD.StrictMode,hD.Suspense,hD.isAsyncMode,hD.isConcurrentMode,hD.isContextConsumer,hD.isContextProvider,hD.isElement,hD.isForwardRef,hD.isFragment,hD.isLazy,hD.isMemo,hD.isPortal,hD.isProfiler,hD.isStrictMode,hD.isSuspense,hD.isValidElementType,hD.typeOf,WR((function(e){e.exports=fD})),Object.getOwnPropertySymbols),mD=Object.prototype.hasOwnProperty,pD=Object.prototype.propertyIsEnumerable;function gD(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}})()&&Object.assign;var yD="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function vD(e,n,t,r,o){}vD.resetWarningCache=function(){0};Function.call.bind(Object.prototype.hasOwnProperty);function bD(){}function wD(){}wD.resetWarningCache=bD;var _D=WR((function(e){e.exports=function(){function e(e,n,t,r,o,i){if(i!==yD){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:wD,resetWarningCache:bD};return t.PropTypes=t,t}()})),CD=function(e){kR(t,e);var n=TR(t);function t(e,r){var o;return vR(this,t),(o=n.call(this,e,r)).id=null,o.hotInstance=null,o.hotElementRef=null,o.columnSettings=[],o.portalManager=null,o.portalCacheArray=[],o.globalEditorPortal=null,o.renderedCellCache=new Map,o.editorCache=new Map,o.componentRendererColumns=new Map,FR(jR(o)),o}return wR(t,[{key:"getRenderedCellCache",value:function(){return this.renderedCellCache}},{key:"getEditorCache",value:function(){return this.editorCache}},{key:"getGlobalEditorPortal",value:function(){return this.globalEditorPortal}},{key:"setGlobalEditorPortal",value:function(e){this.globalEditorPortal=e}},{key:"clearCache",value:function(){var e=this.getRenderedCellCache();this.setGlobalEditorPortal(null),IR(this.getOwnerDocument()),this.getEditorCache().clear(),e.clear(),this.componentRendererColumns.clear()}},{key:"getOwnerDocument",value:function(){return this.hotElementRef?this.hotElementRef.ownerDocument:document}},{key:"setHotElementRef",value:function(e){this.hotElementRef=e}},{key:"getRendererWrapper",value:function(e){var n=this;return function(t,r,o,i,a,s,l){var u=n.getRenderedCellCache();if(u.has("".concat(o,"-").concat(i))&&(r.innerHTML=u.get("".concat(o,"-").concat(i)).innerHTML),r&&!r.getAttribute("ghost-table")){for(var c=function(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;r||(r=document),LR||(LR=r.createDocumentFragment());var o=r.createElement("DIV");LR.appendChild(o);var i=v.a.cloneElement(e,ER({key:"".concat(n.row,"-").concat(n.col)},n));return{portal:w.a.createPortal(i,o,"".concat(n.row,"-").concat(n.col,"-").concat(Math.random())),portalContainer:o}}(e,{TD:r,row:o,col:i,prop:a,value:s,cellProperties:l,isRenderer:!0},(function(){}),r.ownerDocument),d=c.portal,f=c.portalContainer;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(f),n.portalCacheArray.push(d)}return u.set("".concat(o,"-").concat(i),r),r}}},{key:"getEditorClass",value:function(e){var n=DR(e),t=this.getEditorCache().get(n);return this.makeEditorClass(t)}},{key:"makeEditorClass",value:function(e){var n=function(n){kR(r,n);var t=TR(r);function r(n,o,i,a,s,l){var u;return vR(this,r),u=t.call(this,n,o,i,a,s,l),e.hotCustomEditorInstance=jR(u),u.editorComponent=e,u}return wR(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}]),r}(gR.editors.BaseEditor);return Object.getOwnPropertyNames(gR.editors.BaseEditor.prototype).forEach((function(t){"constructor"!==t&&(n.prototype[t]=function(){for(var n,r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props.children;return PR(e,this.getEditorCache())}},{key:"createGlobalEditorPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,n=this.getGlobalEditorElement(e);n&&this.setGlobalEditorPortal(HR(this.getOwnerDocument(),n,this.getEditorCache()))}},{key:"createNewGlobalSettings",value:function(){var e=UR.getSettings(this.props),n=this.getGlobalRendererElement(),t=this.getGlobalEditorElement();return e.columns=this.columnSettings.length?this.columnSettings:e.columns,e.editor=t?this.getEditorClass(t):this.props.editor||(this.props.settings?this.props.settings.editor:void 0),n?(e.renderer=this.getRendererWrapper(n),this.componentRendererColumns.set("global",!0)):e.renderer=this.props.renderer||(this.props.settings?this.props.settings.renderer:void 0),e}},{key:"displayAutoSizeWarning",value:function(e){(this.hotInstance.getPlugin("autoRowSize").enabled||this.hotInstance.getPlugin("autoColumnSize").enabled)&&this.componentRendererColumns.size>0&&function(){var e;"undefined"!=typeof console&&(e=console).warn.apply(e,arguments)}("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")}},{key:"setHotColumnSettings",value:function(e,n){this.columnSettings[n]=e}},{key:"handsontableBeforeRender",value:function(){this.getRenderedCellCache().clear()}},{key:"handsontableAfterRender",value:function(){var e=this;this.portalManager.setState((function(){return Object.assign({},{portals:e.portalCacheArray})}),(function(){e.portalCacheArray.length=0}))}},{key:"updateHot",value:function(e){this.hotInstance.updateSettings(e,!1)}},{key:"setPortalManagerRef",value:function(e){this.portalManager=e}},{key:"componentWillMount",value:function(){this.clearCache(),this.createGlobalEditorPortal()}},{key:"componentDidMount",value:function(){var e=this,n=this.createNewGlobalSettings();this.hotInstance=new gR.Core(this.hotElementRef,n),this.hotInstance.addHook("beforeRender",(function(n){e.handsontableBeforeRender()})),this.hotInstance.addHook("afterRender",(function(){e.handsontableAfterRender()})),this.hotInstance.init(),this.displayAutoSizeWarning(n)}},{key:"componentWillUpdate",value:function(e,n,t){this.clearCache(),IR(this.getOwnerDocument()),this.createGlobalEditorPortal(e.children)}},{key:"componentDidUpdate",value:function(){var e=this.createNewGlobalSettings();this.updateHot(e),this.displayAutoSizeWarning(e)}},{key:"componentWillUnmount",value:function(){this.hotInstance.destroy(),IR(this.getOwnerDocument())}},{key:"render",value:function(){var e=this,n=NR(this.props),t=n.id,r=n.className,o=n.style,i=v.a.Children.toArray(this.props.children),a=(i=i.filter((function(e){return function(e){return e.type===QR}(e)}))).map((function(n,t){return v.a.cloneElement(n,{_componentRendererColumns:e.componentRendererColumns,_emitColumnSettings:e.setHotColumnSettings.bind(e),_columnIndex:t,_getChildElementByType:RR.bind(e),_getRendererWrapper:e.getRendererWrapper.bind(e),_getEditorClass:e.getEditorClass.bind(e),_getOwnerDocument:e.getOwnerDocument.bind(e),_getEditorCache:e.getEditorCache.bind(e),children:n.props.children})}));return a.push(this.getGlobalEditorPortal()),v.a.createElement(v.a.Fragment,null,v.a.createElement("div",{ref:this.setHotElementRef.bind(this),id:t,className:r,style:o},a),v.a.createElement(YR,{ref:this.setPortalManagerRef.bind(this)}))}}],[{key:"version",get:function(){return"3.1.3"}}]),t}(v.a.Component);CD.propTypes={style:_D.object,id:_D.string,className:_D.string};v.a.Component},"./node_modules/@hypnosphi/create-react-context/lib/implementation.js":function(e,n,t){"use strict";n.__esModule=!0;var r=t("./node_modules/react/index.js"),o=(a(r),a(t("./node_modules/prop-types/index.js"))),i=a(t("./node_modules/gud/index.js"));a(t("./node_modules/warning/warning.js"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function l(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}function u(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}function c(e){var n=[];return{on:function(e){n.push(e)},off:function(e){n=n.filter((function(n){return n!==e}))},get:function(){return e},set:function(t,r){e=t,n.forEach((function(n){return n(e,r)}))}}}n.default=function(e,n){var t,a,d="__create-react-context-"+(0,i.default)()+"__",f=function(e){function t(){var n,r;s(this,t);for(var o=arguments.length,i=Array(o),a=0;a-1?o(t):t}},"./node_modules/call-bind/index.js":function(e,n,t){"use strict";var r=t("./node_modules/function-bind/index.js"),o=t("./node_modules/get-intrinsic/index.js"),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),l=o("%Object.getOwnPropertyDescriptor%",!0),u=o("%Object.defineProperty%",!0),c=o("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var n=s(r,a,arguments);if(l&&u){var t=l(n,"length");t.configurable&&u(n,"length",{value:1+c(0,e.length-(arguments.length-1))})}return n};var d=function(){return s(r,i,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},"./node_modules/classnames/index.js":function(e,n,t){var r; +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/!function(){"use strict";var t={}.hasOwnProperty;function o(){for(var e=[],n=0;n1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var o=0;ou.clientHeight+1;if(setTimeout((function(){M=a.getScrollInfo()})),j.bottom-x>0){var T=j.bottom-j.top;if(g.top-(g.bottom-j.top)-T>0)u.style.top=(v=g.top-T-_)+"px",b=!1;else if(T>x){u.style.height=x-5+"px",u.style.top=(v=g.bottom-j.top-_)+"px";var L=a.getCursor();t.from.ch!=L.ch&&(g=a.cursorCoords(L),u.style.left=(y=g.left-w)+"px",j=u.getBoundingClientRect())}}var O,R=j.right-S;if(B&&(R+=a.display.nativeBarWidth),R>0&&(j.right-j.left>S&&(u.style.width=S-5+"px",R-=j.right-j.left-S),u.style.left=(y=g.left-R-w)+"px"),B)for(var D=u.firstChild;D;D=D.nextSibling)D.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=function(e,n){var t={Up:function(){n.moveFocus(-1)},Down:function(){n.moveFocus(1)},PageUp:function(){n.moveFocus(1-n.menuSize(),!0)},PageDown:function(){n.moveFocus(n.menuSize()-1,!0)},Home:function(){n.setFocus(0)},End:function(){n.setFocus(n.length-1)},Enter:n.pick,Tab:n.pick,Esc:n.close};/Mac/.test(navigator.platform)&&(t["Ctrl-P"]=function(){n.moveFocus(-1)},t["Ctrl-N"]=function(){n.moveFocus(1)});var r=e.options.customKeys,o=r?{}:t;function i(e,r){var i;i="string"!=typeof r?function(e){return r(e,n)}:t.hasOwnProperty(r)?t[r]:r,o[e]=i}if(r)for(var a in r)r.hasOwnProperty(a)&&i(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&i(a,s[a]);return o}(n,{moveFocus:function(e,n){r.changeActive(r.selectedHint+e,n)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:d.length,close:function(){n.close()},pick:function(){r.pick()},data:t})),n.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){O=setTimeout((function(){n.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(O)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();M||(M=a.getScrollInfo());var r=v+M.top-e.top,o=r-(l.pageYOffset||(s.documentElement||s.body).scrollTop);if(b||(o+=u.offsetHeight),o<=t.top||o>=t.bottom)return n.close();u.style.top=r+"px",u.style.left=y+M.left-e.left+"px"}),e.on(u,"dblclick",(function(e){var n=i(u,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),r.pick())})),e.on(u,"click",(function(e){var t=i(u,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),n.options.completeOnSingleClick&&r.pick())})),e.on(u,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var I=this.getSelectedHintRange();return 0===I.from&&0===I.to||this.scrollToActive(),e.signal(t,"select",d[this.selectedHint],u.childNodes[this.selectedHint]),!0}function s(e,n,t,r){if(e.async)e(n,r,t);else{var o=e(n,t);o&&o.then?o.then(r):r(o)}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(n,t){var r=n.list[t],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,n,r):i.cm.replaceRange(o(r),r.from||n.from,r.to||n.to,"complete"),e.signal(n,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var n=this.cm.getCursor(),o=this.cm.getLine(n.line);if(n.line!=this.startPos.line||o.length-n.ch!=this.startLen-this.startPos.ch||n.ch=this.data.list.length?n=t?this.data.list.length-1:0:n<0&&(n=t?0:this.data.list.length-1),this.selectedHint!=n){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" CodeMirror-hint-active",""),r.removeAttribute("aria-selected")),(r=this.hints.childNodes[this.selectedHint=n]).className+=" CodeMirror-hint-active",r.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",r.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},scrollToActive:function(){var e=this.getSelectedHintRange(),n=this.hints.childNodes[e.from],t=this.hints.childNodes[e.to],r=this.hints.firstChild;n.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=t.offsetTop+t.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:function(n,t){var r,o=n.getHelpers(t,"hint");if(o.length){var i=function(e,n,t){var r=function(e,n){if(!e.somethingSelected())return n;for(var t=[],r=0;r0?n(e):o(i+1)}))}(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=n.getHelper(n.getCursor(),"hintWords"))?function(n){return e.hint.fromList(n,{words:r})}:e.hint.anyword?function(n,t){return e.hint.anyword(n,t)}:function(){}}}),e.registerHelper("hint","fromList",(function(n,t){var r,o=n.getCursor(),i=n.getTokenAt(o),a=e.Pos(o.line,i.start),s=o;i.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(t("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/addon/lint/lint.css":function(e,n,t){},"./node_modules/codemirror/addon/lint/lint.js":function(e,n,t){!function(e){"use strict";var n="CodeMirror-lint-markers";function t(e){e.parentNode&&e.parentNode.removeChild(e)}function r(n,r,o,i){var a=function(n,t,r){var o=document.createElement("div");function i(n){if(!o.parentNode)return e.off(document,"mousemove",i);o.style.top=Math.max(0,n.clientY-o.offsetHeight-5)+"px",o.style.left=n.clientX+5+"px"}return o.className="CodeMirror-lint-tooltip cm-s-"+n.options.theme,o.appendChild(r.cloneNode(!0)),n.state.lint.options.selfContain?n.getWrapperElement().appendChild(o):document.body.appendChild(o),e.on(document,"mousemove",i),i(t),null!=o.style.opacity&&(o.style.opacity=1),o}(n,r,o);function s(){var n;e.off(i,"mouseout",s),a&&((n=a).parentNode&&(null==n.style.opacity&&t(n),n.style.opacity=0,setTimeout((function(){t(n)}),600)),a=null)}var l=setInterval((function(){if(a)for(var e=i;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){s();break}}if(!a)return clearInterval(l)}),400);e.on(i,"mouseout",s)}function o(e,n,t){for(var o in this.marked=[],n instanceof Function&&(n={getAnnotations:n}),n&&!0!==n||(n={}),this.options={},this.linterOptions=n.options||{},i)this.options[o]=i[o];for(var o in n)i.hasOwnProperty(o)?null!=n[o]&&(this.options[o]=n[o]):n.options||(this.linterOptions[o]=n[o]);this.timeout=null,this.hasGutter=t,this.onMouseOver=function(n){!function(e,n){var t=n.target||n.srcElement;if(/\bCodeMirror-lint-mark-/.test(t.className)){for(var o=t.getBoundingClientRect(),i=(o.left+o.right)/2,a=(o.top+o.bottom)/2,s=e.findMarksAt(e.coordsChar({left:i,top:a},"client")),u=[],c=0;c-1)&&h.push(e.message)}));for(var A=null,m=r.hasGutter&&document.createDocumentFragment(),p=0;p1,o.tooltips)),o.highlightLines&&e.addLineClass(d,"wrap","CodeMirror-lint-line-"+A)}}o.onUpdateLinting&&o.onUpdateLinting(t,c,e)}}function d(e){var n=e.state.lint;n&&(clearTimeout(n.timeout),n.timeout=setTimeout((function(){u(e)}),n.options.delay))}e.defineOption("lint",!1,(function(t,r,i){if(i&&i!=e.Init&&(a(t),!1!==t.state.lint.options.lintOnChange&&t.off("change",d),e.off(t.getWrapperElement(),"mouseover",t.state.lint.onMouseOver),clearTimeout(t.state.lint.timeout),delete t.state.lint),r){for(var s=t.getOption("gutters"),l=!1,c=0;c2),p=/Android/.test(e),g=m||p||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(n),v=/\bCrOS\b/.test(e),b=/win/i.test(n),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var _=y&&(u||d&&(null==w||w<12.11)),C=t||a&&s>=9;function E(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,S=function(e,n){var t=e.className,r=E(n).exec(t);if(r){var o=t.slice(r.index+r[0].length);e.className=t.slice(0,r.index)+(o?r[1]+o:"")}};function x(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function M(e,n){return x(e).appendChild(n)}function j(e,n,t,r){var o=document.createElement(e);if(t&&(o.className=t),r&&(o.style.cssText=r),"string"==typeof n)o.appendChild(document.createTextNode(n));else if(n)for(var i=0;i=n)return a+(n-i);a+=s-i,a+=t-a%t,i=s+1}}m?D=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(D=function(e){try{e.select()}catch(e){}});var N=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function F(e,n){for(var t=0;t=n)return r+Math.min(a,n-o);if(o+=i-r,r=i+1,(o+=t-o%t)>=n)return r}}var z=[""];function K(e){for(;z.length<=e;)z.push(G(z)+" ");return z[e]}function G(e){return e[e.length-1]}function q(e,n){for(var t=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||$.test(e))}function ee(e,n){return n?!!(n.source.indexOf("\\w")>-1&&Z(e))||n.test(e):Z(e)}function ne(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var te=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&te.test(e)}function oe(e,n,t){for(;(t<0?n>0:nt?-1:1;;){if(n==t)return n;var o=(n+t)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==n)return e(i)?n:t;e(i)?t=i:n=i+r}}var ae=null;function se(e,n,t){var r;ae=null;for(var o=0;on)return o;i.to==n&&(i.from!=i.to&&"before"==t?r=o:ae=o),i.from==n&&(i.from!=i.to&&"before"!=t?r=o:ae=o)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,t=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,n,t){this.level=e,this.from=n,this.to=t}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u,c=a.length,d=[],f=0;f-1&&(r[n]=o.slice(0,i).concat(o.slice(i+1)))}}}function Ae(e,n){var t=fe(e,n);if(t.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function ye(e){e.prototype.on=function(e,n){de(this,e,n)},e.prototype.off=function(e,n){he(this,e,n)}}function ve(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function be(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){ve(e),be(e)}function Ce(e){return e.target||e.srcElement}function Ee(e){var n=e.which;return null==n&&(1&e.button?n=1:2&e.button?n=3:4&e.button&&(n=2)),y&&e.ctrlKey&&1==n&&(n=3),n}var ke,Se,xe=function(){if(a&&s<9)return!1;var e=j("div");return"draggable"in e||"dragDrop"in e}();function Me(e){if(null==ke){var n=j("span","​");M(e,j("span",[n,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(ke=n.offsetWidth<=1&&n.offsetHeight>2&&!(a&&s<8))}var t=ke?j("span","​"):j("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return t.setAttribute("cm-text",""),t}function je(e){if(null!=Se)return Se;var n=M(e,document.createTextNode("AخA")),t=k(n,0,1).getBoundingClientRect(),r=k(n,1,2).getBoundingClientRect();return x(e),!(!t||t.left==t.right)&&(Se=r.right-t.right<3)}var Be,Te=3!="\n\nb".split(/\n/).length?function(e){for(var n=0,t=[],r=e.length;n<=r;){var o=e.indexOf("\n",n);-1==o&&(o=e.length);var i=e.slice(n,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(t.push(i.slice(0,a)),n+=a+1):(t.push(i),n=o+1)}return t}:function(e){return e.split(/\r\n?|\n/)},Le=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(e){}return!(!n||n.parentElement()!=e)&&0!=n.compareEndPoints("StartToEnd",n)},Oe="oncopy"in(Be=j("div"))||(Be.setAttribute("oncopy","return;"),"function"==typeof Be.oncopy),Re=null,De={},Ie={};function He(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),De[e]=n}function Pe(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var n=Ie[e.name];"string"==typeof n&&(n={name:n}),(e=X(n,e)).name=n.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ne(e,n){n=Pe(n);var t=De[n.name];if(!t)return Ne(e,"text/plain");var r=t(e,n);if(Fe.hasOwnProperty(n.name)){var o=Fe[n.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)r[a]=n.modeProps[a];return r}var Fe={};function Ue(e,n){H(n,Fe.hasOwnProperty(e)?Fe[e]:Fe[e]={})}function Qe(e,n){if(!0===n)return n;if(e.copyState)return e.copyState(n);var t={};for(var r in n){var o=n[r];o instanceof Array&&(o=o.concat([])),t[r]=o}return t}function Ye(e,n){for(var t;e.innerMode&&(t=e.innerMode(n))&&t.mode!=e;)n=t.state,e=t.mode;return t||{mode:e,state:n}}function We(e,n,t){return!e.startState||e.startState(n,t)}var Ve=function(e,n,t){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=t};function ze(e,n){if((n-=e.first)<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var t=e;!t.lines;)for(var r=0;;++r){var o=t.children[r],i=o.chunkSize();if(n=e.first&&nt?en(t,ze(e,t).text.length):function(e,n){var t=e.ch;return null==t||t>n?en(e.line,n):t<0?en(e.line,0):e}(n,ze(e,n.line).text.length)}function un(e,n){for(var t=[],r=0;r=this.string.length},Ve.prototype.sol=function(){return this.pos==this.lineStart},Ve.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ve.prototype.next=function(){if(this.posn},Ve.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ve.prototype.skipToEnd=function(){this.pos=this.string.length},Ve.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},Ve.prototype.backUp=function(e){this.pos-=e},Ve.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==n&&(this.pos+=r[0].length),r)}var o=function(e){return t?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==n&&(this.pos+=e.length),!0},Ve.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ve.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},Ve.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},Ve.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var cn=function(e,n){this.state=e,this.lookAhead=n},dn=function(e,n,t,r){this.state=n,this.doc=e,this.line=t,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function fn(e,n,t,r){var o=[e.state.modeGen],i={};wn(e,n.text,e.doc.mode,t,(function(e,n){return o.push(e,n)}),i,r);for(var a=t.state,s=function(r){t.baseTokens=o;var s=e.state.overlays[r],l=1,u=0;t.state=!0,wn(e,n.text,s.mode,t,(function(e,n){for(var t=l;ue&&o.splice(l,1,e,o[l+1],r),l+=2,u=Math.min(e,r)}if(n)if(s.opaque)o.splice(t,l-t,e,"overlay "+n),l=t+2;else for(;te.options.maxHighlightLength&&Qe(e.doc.mode,r.state),i=fn(e,n,r);o&&(r.state=o),n.stateAfter=r.save(!o),n.styles=i.styles,i.classes?n.styleClasses=i.classes:n.styleClasses&&(n.styleClasses=null),t===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function An(e,n,t){var r=e.doc,o=e.display;if(!r.mode.startState)return new dn(r,!0,n);var i=function(e,n,t){for(var r,o,i=e.doc,a=t?-1:n-(e.doc.mode.innerMode?1e3:100),s=n;s>a;--s){if(s<=i.first)return i.first;var l=ze(i,s-1),u=l.stateAfter;if(u&&(!t||s+(u instanceof cn?u.lookAhead:0)<=i.modeFrontier))return s;var c=P(l.text,null,e.options.tabSize);(null==o||r>c)&&(o=s-1,r=c)}return o}(e,n,t),a=i>r.first&&ze(r,i-1).stateAfter,s=a?dn.fromSaved(r,a,i):new dn(r,We(r.mode),i);return r.iter(i,n,(function(t){mn(e,t.text,s);var r=s.line;t.stateAfter=r==n-1||r%5==0||r>=o.viewFrom&&rn.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}dn.prototype.lookAhead=function(e){var n=this.doc.getLine(this.line+e);return null!=n&&e>this.maxLookAhead&&(this.maxLookAhead=e),n},dn.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},dn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},dn.fromSaved=function(e,n,t){return n instanceof cn?new dn(e,Qe(e.mode,n.state),t,n.lookAhead):new dn(e,Qe(e.mode,n),t)},dn.prototype.save=function(e){var n=!1!==e?Qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new cn(n,this.maxLookAhead):n};var yn=function(e,n,t){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=t};function vn(e,n,t,r){var o,i,a=e.doc,s=a.mode,l=ze(a,(n=ln(a,n)).line),u=An(e,n.line,t),c=new Ve(l.text,e.options.tabSize,u);for(r&&(i=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&mn(e,n,r,d.pos),d.pos=n.length,l=null):l=bn(gn(t,d,r.state,f),i),f){var h=f[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||c!=l){for(;u=n:i.to>n);(r||(r=[])).push(new En(a,i.from,s?null:i.to))}}return r}(t,o,a),l=function(e,n,t){var r;if(e)for(var o=0;o=n:i.to>n)||i.from==n&&"bookmark"==a.type&&(!t||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=n:i.from0&&s)for(var v=0;vn)&&(!t||On(t,i.marker)<0)&&(t=i.marker)}return t}function Pn(e,n,t,r,o){var i=ze(e,n),a=Cn&&i.markedSpans;if(a)for(var s=0;s=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?nn(u.to,t)>=0:nn(u.to,t)>0)||c>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?nn(u.from,r)<=0:nn(u.from,r)<0)))return!0}}}function Nn(e){for(var n;n=Dn(e);)e=n.find(-1,!0).line;return e}function Fn(e,n){var t=ze(e,n),r=Nn(t);return t==r?n:Je(r)}function Un(e,n){if(n>e.lastLine())return n;var t,r=ze(e,n);if(!Qn(e,r))return n;for(;t=In(r);)r=t.find(1,!0).line;return Je(r)+1}function Qn(e,n){var t=Cn&&n.markedSpans;if(t)for(var r=void 0,o=0;on.maxLineLength&&(n.maxLineLength=t,n.maxLine=e)}))}var Kn=function(e,n,t){this.text=e,Bn(this,n),this.height=t?t(this):1};function Gn(e){e.parent=null,jn(e)}Kn.prototype.lineNo=function(){return Je(this)},ye(Kn);var qn={},Jn={};function Xn(e,n){if(!e||/^\s*$/.test(e))return null;var t=n.addModeClass?Jn:qn;return t[e]||(t[e]=e.replace(/\S+/g,"cm-$&"))}function $n(e,n){var t=B("span",null,null,l?"padding-right: .1px":null),r={pre:B("pre",[t],"CodeMirror-line"),content:t,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var o=0;o<=(n.rest?n.rest.length:0);o++){var i=o?n.rest[o-1]:n.line,a=void 0;r.pos=0,r.addToken=et,je(e.display.measure)&&(a=ue(i,e.doc.direction))&&(r.addToken=nt(r.addToken,a)),r.map=[],rt(i,r,hn(e,i,n!=e.display.externalMeasured&&Je(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=R(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=R(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Me(e.display.measure))),0==o?(n.measure.map=r.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(r.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ae(e,"renderLine",e,n.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function Zn(e){var n=j("span","•","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function et(e,n,t,r,o,i,l){if(n){var u,c=e.splitSpaces?function(e,n){if(e.length>1&&!/ /.test(e))return e;for(var t=n,r="",o=0;ou&&d.from<=u);f++);if(d.to>=c)return e(t,r,o,i,a,s,l);e(t,r.slice(0,d.to-u),o,i,null,s,l),i=null,r=r.slice(d.to-u),u=d.to}}}function tt(e,n,t,r){var o=!r&&t.widgetNode;o&&e.map.push(e.pos,e.pos+n,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",t.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=n,e.trailingSpace=!1}function rt(e,n,t){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,u,c,d,f,h=o.length,A=0,m=1,p="",g=0;;){if(g==A){l=u=c=s="",f=null,d=null,g=1/0;for(var y=[],v=void 0,b=0;bA||_.collapsed&&w.to==A&&w.from==A)){if(null!=w.to&&w.to!=A&&g>w.to&&(g=w.to,u=""),_.className&&(l+=" "+_.className),_.css&&(s=(s?s+";":"")+_.css),_.startStyle&&w.from==A&&(c+=" "+_.startStyle),_.endStyle&&w.to==g&&(v||(v=[])).push(_.endStyle,w.to),_.title&&((f||(f={})).title=_.title),_.attributes)for(var C in _.attributes)(f||(f={}))[C]=_.attributes[C];_.collapsed&&(!d||On(d.marker,_)<0)&&(d=w)}else w.from>A&&g>w.from&&(g=w.from)}if(v)for(var E=0;E=h)break;for(var S=Math.min(h,g);;){if(p){var x=A+p.length;if(!d){var M=x>S?p.slice(0,S-A):p;n.addToken(n,M,a?a+l:l,c,A+M.length==g?u:"",s,f)}if(x>=S){p=p.slice(S-A),A=S;break}A=x,c=""}p=o.slice(i,i=t[m++]),a=Xn(t[m++],n.cm.options)}}else for(var j=1;jt)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function Bt(e,n,t,r){return Ot(e,Lt(e,n),t,r)}function Tt(e,n){if(n>=e.display.viewFrom&&n=t.lineN&&n2&&i.push((l.bottom+u.top)/2-t.top)}}i.push(t.bottom-t.top)}}(e,n.view,n.rect),n.hasHeights=!0),(i=function(e,n,t,r){var o,i=It(n.map,t,r),l=i.node,u=i.start,c=i.end,d=i.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;u&&re(n.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+c1}(e))return n;var t=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*t,right:n.right*t,top:n.top*r,bottom:n.bottom*r}}(e.display.measure,o))}else{var h;u>0&&(d=r="right"),o=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!o||!o.left&&!o.right)){var A=l.parentNode.getClientRects()[0];o=A?{left:A.left,right:A.left+or(e.display),top:A.top,bottom:A.bottom}:Dt}for(var m=o.top-n.rect.top,p=o.bottom-n.rect.top,g=(m+p)/2,y=n.view.measure.heights,v=0;vn)&&(o=(i=l-s)-1,n>=l&&(a="right")),null!=o){if(r=e[u+2],s==l&&t==(r.insertLeft?"left":"right")&&(a=t),"left"==t&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==t&&o==l-s)for(;u=0&&(t=e[o]).left==t.right;o--);return t}function Pt(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var n=0;n=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,n,t){return a(t?e-1:e,1==s[n].level!=t)}var d=se(s,l,u),f=ae,h=c(l,d,"before"==u);return null!=f&&(h.other=c(l,f,"before"!=u)),h}function Gt(e,n){var t=0;n=ln(e.doc,n),e.options.lineWrapping||(t=or(e.display)*n.ch);var r=ze(e.doc,n.line),o=Wn(r)+Ct(e.display);return{left:t,right:t,top:o,bottom:o+r.height}}function qt(e,n,t,r,o){var i=en(e,n,t);return i.xRel=o,r&&(i.outside=r),i}function Jt(e,n,t){var r=e.doc;if((t+=e.display.viewOffset)<0)return qt(r.first,0,null,-1,-1);var o=Xe(r,t),i=r.first+r.size-1;if(o>i)return qt(r.first+r.size-1,ze(r,i).text.length,null,1,1);n<0&&(n=0);for(var a=ze(r,o);;){var s=er(e,a,o,n,t),l=Hn(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==o)return u;a=ze(r,o=u.line)}}function Xt(e,n,t,r){r-=Yt(n);var o=n.text.length,i=ie((function(n){return Ot(e,t,n-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(n){return Ot(e,t,n).top>r}),i,o)}}function $t(e,n,t,r){return t||(t=Lt(e,n)),Xt(e,n,t,Wt(e,n,Ot(e,t,r),"line").top)}function Zt(e,n,t,r){return!(e.bottom<=t)&&(e.top>t||(r?e.left:e.right)>n)}function er(e,n,t,r,o){o-=Wn(n);var i=Lt(e,n),a=Yt(n),s=0,l=n.text.length,u=!0,c=ue(n,e.doc.direction);if(c){var d=(e.options.lineWrapping?tr:nr)(e,n,t,i,c,r,o);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var f,h,A=null,m=null,p=ie((function(n){var t=Ot(e,i,n);return t.top+=a,t.bottom+=a,!!Zt(t,r,o,!1)&&(t.top<=o&&t.left<=r&&(A=n,m=t),!0)}),s,l),g=!1;if(m){var y=r-m.left=b.bottom?1:0}return qt(t,p=oe(n.text,p,1),h,g,r-f)}function nr(e,n,t,r,o,i,a){var s=ie((function(s){var l=o[s],u=1!=l.level;return Zt(Kt(e,en(t,u?l.to:l.from,u?"before":"after"),"line",n,r),i,a,!0)}),0,o.length-1),l=o[s];if(s>0){var u=1!=l.level,c=Kt(e,en(t,u?l.from:l.to,u?"after":"before"),"line",n,r);Zt(c,i,a,!0)&&c.top>a&&(l=o[s-1])}return l}function tr(e,n,t,r,o,i,a){var s=Xt(e,n,r,a),l=s.begin,u=s.end;/\s/.test(n.text.charAt(u-1))&&u--;for(var c=null,d=null,f=0;f=u||h.to<=l)){var A=Ot(e,r,1!=h.level?Math.min(u,h.to)-1:Math.max(l,h.from)).right,m=Am)&&(c=h,d=m)}}return c||(c=o[o.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Rt){Rt=j("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)Rt.appendChild(document.createTextNode("x")),Rt.appendChild(j("br"));Rt.appendChild(document.createTextNode("x"))}M(e.measure,Rt);var t=Rt.offsetHeight/50;return t>3&&(e.cachedTextHeight=t),x(e.measure),t||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var n=j("span","xxxxxxxxxx"),t=j("pre",[n],"CodeMirror-line-like");M(e.measure,t);var r=n.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ir(e){for(var n=e.display,t={},r={},o=n.gutters.clientLeft,i=n.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;t[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:ar(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:t,gutterWidth:r,wrapperWidth:n.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function sr(e){var n=rr(e.display),t=e.options.lineWrapping,r=t&&Math.max(5,e.display.scroller.clientWidth/or(e.display)-3);return function(o){if(Qn(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(l=ze(e.doc,u.line).text).length==u.ch){var c=P(l,l.length,e.options.tabSize)-l.length;u=en(u.line,Math.max(0,Math.round((i-kt(e.display).left)/or(e.display))-c))}return u}function cr(e,n){if(n>=e.display.viewTo)return null;if((n-=e.display.viewFrom)<0)return null;for(var t=e.display.view,r=0;rn)&&(o.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=o.viewTo)Cn&&Fn(e.doc,n)o.viewFrom?hr(e):(o.viewFrom+=r,o.viewTo+=r);else if(n<=o.viewFrom&&t>=o.viewTo)hr(e);else if(n<=o.viewFrom){var i=Ar(e,t,t+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):hr(e)}else if(t>=o.viewTo){var a=Ar(e,n,n,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):hr(e)}else{var s=Ar(e,n,n,-1),l=Ar(e,t,t+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(it(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):hr(e)}var u=o.externalMeasured;u&&(t=o.lineN&&n=r.viewTo)){var i=r.view[cr(e,n)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==F(a,t)&&a.push(t)}}}function hr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ar(e,n,t,r){var o,i=cr(e,n),a=e.display.view;if(!Cn||t==e.doc.first+e.doc.size)return{index:i,lineN:t};for(var s=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=s+a[i].size-n,i++}else o=s-n;n+=o,t+=o}for(;Fn(e.doc,t)!=t;){if(i==(r<0?0:a.length-1))return null;t+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:t}}function mr(e){for(var n=e.display.view,t=0,r=0;r=e.display.viewTo||l.to().line0?a:e.defaultCharWidth())+"px"}if(r.other){var s=t.appendChild(j("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=r.other.left+"px",s.style.top=r.other.top+"px",s.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function vr(e,n){return e.top-n.top||e.left-n.left}function br(e,n,t){var r=e.display,o=e.doc,i=document.createDocumentFragment(),a=kt(e.display),s=a.left,l=Math.max(r.sizerWidth,xt(e)-r.sizer.offsetLeft)-a.right,u="ltr"==o.direction;function c(e,n,t,r){n<0&&(n=0),n=Math.round(n),r=Math.round(r),i.appendChild(j("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+n+"px; width: "+(null==t?l-e:t)+"px;\n height: "+(r-n)+"px"))}function d(n,t,r){var i,a,d=ze(o,n),f=d.text.length;function h(t,r){return zt(e,en(n,t),"div",d,r)}function A(n,t,r){var o=$t(e,d,null,n),i="ltr"==t==("after"==r)?"left":"right";return h("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),i)[i]}var m=ue(d,o.direction);return function(e,n,t,r){if(!e)return r(n,t,"ltr",0);for(var o=!1,i=0;in||n==t&&a.to==n)&&(r(Math.max(a.from,n),Math.min(a.to,t),1==a.level?"rtl":"ltr",i),o=!0)}o||r(n,t,"ltr")}(m,t||0,null==r?f:r,(function(e,n,o,d){var p="ltr"==o,g=h(e,p?"left":"right"),y=h(n-1,p?"right":"left"),v=null==t&&0==e,b=null==r&&n==f,w=0==d,_=!m||d==m.length-1;if(y.top-g.top<=3){var C=(u?b:v)&&_,E=(u?v:b)&&w?s:(p?g:y).left,k=C?l:(p?y:g).right;c(E,g.top,k-E,g.bottom)}else{var S,x,M,j;p?(S=u&&v&&w?s:g.left,x=u?l:A(e,o,"before"),M=u?s:A(n,o,"after"),j=u&&b&&_?l:y.right):(S=u?A(e,o,"before"):s,x=!u&&v&&w?l:g.right,M=!u&&b&&_?s:y.left,j=u?A(n,o,"after"):l),c(S,g.top,x-S,g.bottom),g.bottom0?n.blinker=setInterval((function(){e.hasFocus()||kr(e),n.cursorDiv.style.visibility=(t=!t)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function _r(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Er(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&kr(e))}),100)}function Er(e,n){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ae(e,"focus",e,n),e.state.focused=!0,O(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function kr(e,n){e.state.delayingBlurEvent||(e.state.focused&&(Ae(e,"blur",e,n),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var n=e.display,t=n.lineDiv.offsetTop,r=Math.max(0,n.scroller.getBoundingClientRect().top),o=n.lineDiv.getBoundingClientRect().top,i=0,l=0;l.005||m<-.005)&&(oe.display.sizerWidth){var g=Math.ceil(f/or(e.display));g>e.display.maxLineLength&&(e.display.maxLineLength=g,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(n.scroller.scrollTop+=i)}function xr(e){if(e.widgets)for(var n=0;n=a&&(i=Xe(n,Wn(ze(n,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function jr(e,n){var t=e.display,r=rr(e.display);n.top<0&&(n.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:t.scroller.scrollTop,i=Mt(e),a={};n.bottom-n.top>i&&(n.bottom=n.top+i);var s=e.doc.height+Et(t),l=n.tops-r;if(n.topo+i){var c=Math.min(n.top,(u?s:n.bottom)-i);c!=o&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:t.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:t.scroller.scrollLeft-d,h=xt(e)-t.gutters.offsetWidth,A=n.right-n.left>h;return A&&(n.right=n.left+h),n.left<10?a.scrollLeft=0:n.lefth+f-3&&(a.scrollLeft=n.right+(A?0:10)-h),a}function Br(e,n){null!=n&&(Or(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Tr(e){Or(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function Lr(e,n,t){null==n&&null==t||Or(e),null!=n&&(e.curOp.scrollLeft=n),null!=t&&(e.curOp.scrollTop=t)}function Or(e){var n=e.curOp.scrollToPos;n&&(e.curOp.scrollToPos=null,Rr(e,Gt(e,n.from),Gt(e,n.to),n.margin))}function Rr(e,n,t,r){var o=jr(e,{left:Math.min(n.left,t.left),top:Math.min(n.top,t.top)-r,right:Math.max(n.right,t.right),bottom:Math.max(n.bottom,t.bottom)+r});Lr(e,o.scrollLeft,o.scrollTop)}function Dr(e,n){Math.abs(e.doc.scrollTop-n)<2||(t||lo(e,{top:n}),Ir(e,n,!0),t&&lo(e),ro(e,100))}function Ir(e,n,t){n=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n)),(e.display.scroller.scrollTop!=n||t)&&(e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n))}function Hr(e,n,t,r){n=Math.max(0,Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(t?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!r||(e.doc.scrollLeft=n,fo(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n))}function Pr(e){var n=e.display,t=n.gutters.offsetWidth,r=Math.round(e.doc.height+Et(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?t:0,docHeight:r,scrollHeight:r+St(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:t}}var Nr=function(e,n,t){this.cm=t;var r=this.vert=j("div",[j("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=j("div",[j("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),de(r,"scroll",(function(){r.clientHeight&&n(r.scrollTop,"vertical")})),de(o,"scroll",(function(){o.clientWidth&&n(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Nr.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,t=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(t){this.vert.style.display="block",this.vert.style.bottom=n?r+"px":"0";var o=e.viewHeight-(n?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=t?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(t?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:t?r:0,bottom:n?r:0}},Nr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Nr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Nr.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new N,this.disableVert=new N},Nr.prototype.enableZeroWidthBar=function(e,n,t){e.style.pointerEvents="auto",n.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==t?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":n.set(1e3,r)}))},Nr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Fr=function(){};function Ur(e,n){n||(n=Pr(e));var t=e.display.barWidth,r=e.display.barHeight;Qr(e,n);for(var o=0;o<4&&t!=e.display.barWidth||r!=e.display.barHeight;o++)t!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),Qr(e,Pr(e)),t=e.display.barWidth,r=e.display.barHeight}function Qr(e,n){var t=e.display,r=t.scrollbars.update(n);t.sizer.style.paddingRight=(t.barWidth=r.right)+"px",t.sizer.style.paddingBottom=(t.barHeight=r.bottom)+"px",t.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(t.scrollbarFiller.style.display="block",t.scrollbarFiller.style.height=r.bottom+"px",t.scrollbarFiller.style.width=r.right+"px"):t.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(t.gutterFiller.style.display="block",t.gutterFiller.style.height=r.bottom+"px",t.gutterFiller.style.width=n.gutterWidth+"px"):t.gutterFiller.style.display=""}Fr.prototype.update=function(){return{bottom:0,right:0}},Fr.prototype.setScrollLeft=function(){},Fr.prototype.setScrollTop=function(){},Fr.prototype.clear=function(){};var Yr={native:Nr,null:Fr};function Wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Yr[e.options.scrollbarStyle]((function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),de(n,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),n.setAttribute("cm-not-content","true")}),(function(n,t){"horizontal"==t?Hr(e,n):Dr(e,n)}),e),e.display.scrollbars.addClass&&O(e.display.wrapper,e.display.scrollbars.addClass)}var Vr=0;function zr(e){var n;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vr,markArrays:null},n=e.curOp,at?at.ops.push(n):n.ownsGroup=at={ops:[n],delayedCallbacks:[]}}function Kr(e){var n=e.curOp;n&&function(e,n){var t=e.ownsGroup;if(t)try{!function(e){var n=e.delayedCallbacks,t=0;do{for(;t=t.viewTo)||t.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new io(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function qr(e){e.updatedDisplay=e.mustUpdate&&ao(e.cm,e.update)}function Jr(e){var n=e.cm,t=n.display;e.updatedDisplay&&Sr(n),e.barMeasure=Pr(n),t.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Bt(n,t.maxLine,t.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(t.scroller.clientWidth,t.sizer.offsetLeft+e.adjustWidthTo+St(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,t.sizer.offsetLeft+e.adjustWidthTo-xt(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=t.input.prepareSelection())}function Xr(e){var n=e.cm;null!=e.adjustWidthTo&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!A){var i=j("div","​",null,"position: absolute;\n top: "+(n.top-t.viewOffset-Ct(e.display))+"px;\n height: "+(n.bottom-n.top+St(e)+t.barHeight)+"px;\n left: "+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(n,function(e,n,t,r){var o;null==r&&(r=0),e.options.lineWrapping||n!=t||(t="before"==n.sticky?en(n.line,n.ch+1,"before"):n,n=n.ch?en(n.line,"before"==n.sticky?n.ch-1:n.ch,"after"):n);for(var i=0;i<5;i++){var a=!1,s=Kt(e,n),l=t&&t!=n?Kt(e,t):s,u=jr(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(Dr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(Hr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(n,ln(r,e.scrollToPos.from),ln(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var t=+new Date+e.options.workTime,r=An(e,n.highlightFrontier),o=[];n.iter(r.line,Math.min(n.first+n.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?Qe(n.mode,r.state):null,l=fn(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var u=i.styleClasses,c=l.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!d&&ft)return ro(e,e.options.workDelay),!0})),n.highlightFrontier=r.line,n.modeFrontier=Math.max(n.modeFrontier,r.line),o.length&&Zr(e,(function(){for(var n=0;n=t.viewFrom&&n.visible.to<=t.viewTo&&(null==t.updateLineNumbers||t.updateLineNumbers>=t.viewTo)&&t.renderedView==t.view&&0==mr(e))return!1;ho(e)&&(hr(e),n.dims=ir(e));var o=r.first+r.size,i=Math.max(n.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+e.options.viewportMargin);t.viewFroma&&t.viewTo-a<20&&(a=Math.min(o,t.viewTo)),Cn&&(i=Fn(e.doc,i),a=Un(e.doc,a));var s=i!=t.viewFrom||a!=t.viewTo||t.lastWrapHeight!=n.wrapperHeight||t.lastWrapWidth!=n.wrapperWidth;!function(e,n,t){var r=e.display;0==r.view.length||n>=r.viewTo||t<=r.viewFrom?(r.view=it(e,n,t),r.viewFrom=n):(r.viewFrom>n?r.view=it(e,n,r.viewFrom).concat(r.view):r.viewFromt&&(r.view=r.view.slice(0,cr(e,t)))),r.viewTo=t}(e,i,a),t.viewOffset=Wn(ze(e.doc,t.viewFrom)),e.display.mover.style.top=t.viewOffset+"px";var u=mr(e);if(!s&&0==u&&!n.force&&t.renderedView==t.view&&(null==t.updateLineNumbers||t.updateLineNumbers>=t.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var n=L();if(!n||!T(e.display.lineDiv,n))return null;var t={activeElt:n};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&T(e.display.lineDiv,r.anchorNode)&&(t.anchorNode=r.anchorNode,t.anchorOffset=r.anchorOffset,t.focusNode=r.focusNode,t.focusOffset=r.focusOffset)}return t}(e);return u>4&&(t.lineDiv.style.display="none"),function(e,n,t){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(n){var t=n.nextSibling;return l&&y&&e.display.currentWheelTarget==n?n.style.display="none":n.parentNode.removeChild(n),t}for(var u=r.view,c=r.viewFrom,d=0;d-1&&(h=!1),ct(e,f,c,t)),h&&(x(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Ze(e.options,c)))),a=f.node.nextSibling}else{var A=gt(e,f,c,t);i.insertBefore(A,a)}c+=f.size}for(;a;)a=s(a)}(e,t.updateLineNumbers,n.dims),u>4&&(t.lineDiv.style.display=""),t.renderedView=t.view,function(e){if(e&&e.activeElt&&e.activeElt!=L()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&T(document.body,e.anchorNode)&&T(document.body,e.focusNode))){var n=window.getSelection(),t=document.createRange();t.setEnd(e.anchorNode,e.anchorOffset),t.collapse(!1),n.removeAllRanges(),n.addRange(t),n.extend(e.focusNode,e.focusOffset)}}(c),x(t.cursorDiv),x(t.selectionDiv),t.gutters.style.height=t.sizer.style.minHeight=0,s&&(t.lastWrapHeight=n.wrapperHeight,t.lastWrapWidth=n.wrapperWidth,ro(e,400)),t.updateLineNumbers=null,!0}function so(e,n){for(var t=n.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&n.oldDisplayWidth!=xt(e))r&&(n.visible=Mr(e.display,e.doc,t));else if(t&&null!=t.top&&(t={top:Math.min(e.doc.height+Et(e.display)-Mt(e),t.top)}),n.visible=Mr(e.display,e.doc,t),n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)break;if(!ao(e,n))break;Sr(e);var o=Pr(e);pr(e),Ur(e,o),co(e,o),n.force=!1}n.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function lo(e,n){var t=new io(e,n);if(ao(e,t)){Sr(e),so(e,t);var r=Pr(e);pr(e),Ur(e,r),co(e,r),t.finish()}}function uo(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px",lt(e,"gutterChanged",e)}function co(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+St(e)+"px"}function fo(e){var n=e.display,t=n.view;if(n.alignWidgets||n.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(n)-n.scroller.scrollLeft+e.doc.scrollLeft,o=n.gutters.offsetWidth,i=r+"px",a=0;au.clientWidth,f=u.scrollHeight>u.clientHeight;if(o&&c||i&&f){if(i&&y&&l)e:for(var h=n.target,A=s.view;h!=u;h=h.parentNode)for(var m=0;m=0&&nn(e,r.to())<=0)return t}return-1};var Eo=function(e,n){this.anchor=e,this.head=n};function ko(e,n,t){var r=e&&e.options.selectionsMayTouch,o=n[t];n.sort((function(e,n){return nn(e.from(),n.from())})),t=F(n,o);for(var i=1;i0:l>=0){var u=an(s.from(),a.from()),c=on(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=t&&--t,n.splice(--i,2,new Eo(d?c:u,d?u:c))}}return new Co(n,t)}function So(e,n){return new Co([new Eo(e,n||e)],0)}function xo(e){return e.text?en(e.from.line+e.text.length-1,G(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Mo(e,n){if(nn(e,n.from)<0)return e;if(nn(e,n.to)<=0)return xo(n);var t=e.line+n.text.length-(n.to.line-n.from.line)-1,r=e.ch;return e.line==n.to.line&&(r+=xo(n).ch-n.to.ch),en(t,r)}function jo(e,n){for(var t=[],r=0;r1&&e.remove(s.line+1,A-1),e.insert(s.line+1,g)}lt(e,"change",e,n)}function Do(e,n,t){!function e(r,o,i){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==n.origin.charAt(0)))&&(i=function(e,n){return n?(Fo(e.done),G(e.done)):e.done.length&&!G(e.done).ranges?G(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),G(e.done)):void 0}(o,o.lastOp==r)))a=G(i.changes),0==nn(n.from,n.to)&&0==nn(n.from,a.to)?a.to=xo(n):i.changes.push(No(e,n));else{var l=G(o.done);for(l&&l.ranges||Yo(e.sel,o.done),i={changes:[No(e,n)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(t),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=n.origin,a||Ae(e,"historyAdded")}function Qo(e,n,t,r){var o=e.history,i=r&&r.origin;t==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,n,t,r){var o=n.charAt(0);return"*"==o||"+"==o&&t.ranges.length==r.ranges.length&&t.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,G(o.done),n))?o.done[o.done.length-1]=n:Yo(n,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=t,r&&!1!==r.clearRedo&&Fo(o.undone)}function Yo(e,n){var t=G(n);t&&t.ranges&&t.equals(e)||n.push(e)}function Wo(e,n,t,r){var o=n["spans_"+e.id],i=0;e.iter(Math.max(e.first,t),Math.min(e.first+e.size,r),(function(t){t.markedSpans&&((o||(o=n["spans_"+e.id]={}))[i]=t.markedSpans),++i}))}function Vo(e){if(!e)return null;for(var n,t=0;t-1&&(G(s)[d]=u[d],delete u[d])}}}return r}function Go(e,n,t,r){if(r){var o=e.anchor;if(t){var i=nn(n,o)<0;i!=nn(t,o)<0?(o=n,n=t):i!=nn(n,t)<0&&(n=t)}return new Eo(o,n)}return new Eo(t||n,n)}function qo(e,n,t,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Co([Go(e.sel.primary(),n,t,o)],0),r)}function Jo(e,n,t){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=n.ch:s.to>n.ch))){if(o&&(Ae(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(t){var d=l.find(r<0?1:-1),f=void 0;if((r<0?c:u)&&(d=si(e,d,-r,d&&d.line==n.line?i:null)),d&&d.line==n.line&&(f=nn(d,t))&&(r<0?f<0:f>0))return ii(e,d,n,r,o)}var h=l.find(r<0?-1:1);return(r<0?u:c)&&(h=si(e,h,r,h.line==n.line?i:null)),h?ii(e,h,n,r,o):null}}return n}function ai(e,n,t,r,o){var i=r||1,a=ii(e,n,t,i,o)||!o&&ii(e,n,t,i,!0)||ii(e,n,t,-i,o)||!o&&ii(e,n,t,-i,!0);return a||(e.cantEdit=!0,en(e.first,0))}function si(e,n,t,r){return t<0&&0==n.ch?n.line>e.first?ln(e,en(n.line-1)):null:t>0&&n.ch==(r||ze(e,n.line)).text.length?n.line0)){var c=[l,1],d=nn(u.from,s.from),f=nn(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),o.splice.apply(o,c),l+=c.length-3}}return o}(e,n.from,n.to);if(r)for(var o=r.length-1;o>=0;--o)di(e,{from:r[o].from,to:r[o].to,text:o?[""]:n.text,origin:n.origin});else di(e,n)}}function di(e,n){if(1!=n.text.length||""!=n.text[0]||0!=nn(n.from,n.to)){var t=jo(e,n);Uo(e,n,t,e.cm?e.cm.curOp.id:NaN),Ai(e,n,t,xn(e,n));var r=[];Do(e,(function(e,t){t||-1!=F(r,e.history)||(yi(e.history,n),r.push(e.history)),Ai(e,n,null,xn(e,n))}))}}function fi(e,n,t){var r=e.cm&&e.cm.state.suppressEdits;if(!r||t){for(var o,i=e.history,a=e.sel,s="undo"==n?i.done:i.undone,l="undo"==n?i.undone:i.done,u=0;u=0;--h){var A=f(h);if(A)return A.v}}}}function hi(e,n){if(0!=n&&(e.first+=n,e.sel=new Co(q(e.sel.ranges,(function(e){return new Eo(en(e.anchor.line+n,e.anchor.ch),en(e.head.line+n,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-n,n);for(var t=e.cm.display,r=t.viewFrom;re.lastLine())){if(n.from.linei&&(n={from:n.from,to:en(i,ze(e,i).text.length),text:[n.text[0]],origin:n.origin}),n.removed=Ke(e,n.from,n.to),t||(t=jo(e,n)),e.cm?function(e,n,t){var r=e.doc,o=e.display,i=n.from,a=n.to,s=!1,l=i.line;e.options.lineWrapping||(l=Je(Nn(ze(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),r.sel.contains(n.from,n.to)>-1&&pe(e),Ro(r,n,t,sr(e)),e.options.lineWrapping||(r.iter(l,i.line+n.text.length,(function(e){var n=Vn(e);n>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=n,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),!(e.highlightFrontiert;r--){var o=ze(e,r).stateAfter;if(o&&(!(o instanceof cn)||r+o.lookAhead1||!(this.children[0]instanceof bi))){var s=[];this.collapse(s),this.children=[new bi(s)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n50){for(var a=o.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,n,t){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=B("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Pn(e,n.line,n,t,i)||n.line!=t.line&&Pn(e,t.line,n,t,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Cn=!0}i.addToHistory&&Uo(e,{from:n,to:t,origin:"markText"},e.sel,NaN);var s,l=n.line,u=e.cm;if(e.iter(l,t.line+1,(function(r){u&&i.collapsed&&!u.options.lineWrapping&&Nn(r)==u.display.maxLine&&(s=!0),i.collapsed&&l!=n.line&&qe(r,0),function(e,n,t){var r=t&&window.WeakSet&&(t.markedSpans||(t.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(n):(e.markedSpans=e.markedSpans?e.markedSpans.concat([n]):[n],r&&r.add(e.markedSpans)),n.marker.attachLine(e)}(r,new En(i,l==n.line?n.ch:null,l==t.line?t.ch:null),e.cm&&e.cm.curOp),++l})),i.collapsed&&e.iter(n.line,t.line+1,(function(n){Qn(e,n)&&qe(n,0)})),i.clearOnEnter&&de(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(_n=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++Ei,i.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),i.collapsed)dr(u,n.line,t.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var c=n.line;c<=t.line;c++)fr(u,c,"text");i.atomic&&ri(u.doc),lt(u,"markerAdded",u,i)}return i}ki.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,n=e&&!e.curOp;if(n&&zr(e),ge(this,"clear")){var t=this.find();t&<(this,"clear",t.from,t.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&<(e,"markerCleared",e,this,r,o),n&&Kr(e),this.parent&&this.parent.clear()}},ki.prototype.find=function(e,n){var t,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)ci(this,r[l]);s?Zo(this,s):this.cm&&Tr(this.cm)})),undo:to((function(){fi(this,"undo")})),redo:to((function(){fi(this,"redo")})),undoSelection:to((function(){fi(this,"undo",!0)})),redoSelection:to((function(){fi(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,t=0,r=0;r=e.ch)&&n.push(o.marker.parent||o.marker)}return n},findMarks:function(e,n,t){e=ln(this,e),n=ln(this,n);var r=[],o=e.line;return this.iter(e.line,n.line+1,(function(i){var a=i.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&o!=e.line||null!=l.from&&o==n.line&&l.from>=n.ch||t&&!t(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(n){var t=n.markedSpans;if(t)for(var r=0;re)return n=e,!0;e-=i,++t})),ln(this,en(t,n))},indexFromPos:function(e){var n=(e=ln(this,e)).ch;if(e.linen&&(n=e.from),null!=e.to&&e.to-1)return n.state.draggingText(e),void setTimeout((function(){return n.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(n.state.draggingText&&!n.state.draggingText.copy&&(f=n.listSelections()),ni(n.doc,So(t,t)),f)for(var h=0;h=0;n--)mi(e.doc,"",r[n].from,r[n].to,"+delete");Tr(e)}))}function $i(e,n,t){var r=oe(e.text,n+t,t);return r<0||r>e.text.length?null:r}function Zi(e,n,t){var r=$i(e,n.ch,t);return null==r?null:new en(n.line,r,t<0?"after":"before")}function ea(e,n,t,r,o){if(e){"rtl"==n.doc.direction&&(o=-o);var i=ue(t,n.doc.direction);if(i){var a,s=o<0?G(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==n.doc.direction){var u=Lt(n,t);a=o<0?t.text.length-1:0;var c=Ot(n,u,a).top;a=ie((function(e){return Ot(n,u,e).top==c}),o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=$i(t,a,1))}else a=o<0?s.to:s.from;return new en(r,a,l)}}return new en(r,o<0?t.text.length:0,o<0?"before":"after")}Yi.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Yi.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Yi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Yi.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Yi.default=y?Yi.macDefault:Yi.pcDefault;var na={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Q)},killLine:function(e){return Xi(e,(function(n){if(n.empty()){var t=ze(e.doc,n.head.line).text.length;return n.head.ch==t&&n.head.line0)o=new en(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),en(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=ze(e.doc,o.line-1).text;a&&(o=new en(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),en(o.line-1,a.length-1),o,"+transpose"))}t.push(new Eo(o,o))}e.setSelections(t)}))},newlineAndIndent:function(e){return Zr(e,(function(){for(var n=e.listSelections(),t=n.length-1;t>=0;t--)e.replaceRange(e.doc.lineSeparator(),n[t].anchor,n[t].head,"+input");n=e.listSelections();for(var r=0;r-1&&(nn((o=u.ranges[o]).from(),n)<0||n.xRel>0)&&(nn(o.to(),n)>0||n.xRel<0)?function(e,n,t,r){var o=e.display,i=!1,u=eo(e,(function(n){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Cr(e)),he(o.wrapper.ownerDocument,"mouseup",u),he(o.wrapper.ownerDocument,"mousemove",c),he(o.scroller,"dragstart",d),he(o.scroller,"drop",u),i||(ve(n),r.addNew||qo(e.doc,t,null,null,r.extend),l&&!f||a&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),c=function(e){i=i||Math.abs(n.clientX-e.clientX)+Math.abs(n.clientY-e.clientY)>=10},d=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,de(o.wrapper.ownerDocument,"mouseup",u),de(o.wrapper.ownerDocument,"mousemove",c),de(o.scroller,"dragstart",d),de(o.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,n,i):function(e,n,t,r){a&&Cr(e);var o=e.display,i=e.doc;ve(n);var s,l,u=i.sel,c=u.ranges;if(r.addNew&&!r.extend?(l=i.sel.contains(t),s=l>-1?c[l]:new Eo(t,t)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Eo(t,t)),t=ur(e,n,!0,!0),l=-1;else{var d=ga(e,t,r.unit);s=r.extend?Go(s,d.anchor,d.head,r.extend):d}r.addNew?-1==l?(l=c.length,ei(i,ko(e,c.concat([s]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==r.unit&&!r.extend?(ei(i,ko(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),u=i.sel):Xo(i,l,s,Y):(l=0,ei(i,new Co([s],0),Y),u=i.sel);var f=t;function h(n){if(0!=nn(f,n))if(f=n,"rectangle"==r.unit){for(var o=[],a=e.options.tabSize,c=P(ze(i,t.line).text,t.ch,a),d=P(ze(i,n.line).text,n.ch,a),h=Math.min(c,d),A=Math.max(c,d),m=Math.min(t.line,n.line),p=Math.min(e.lastLine(),Math.max(t.line,n.line));m<=p;m++){var g=ze(i,m).text,y=V(g,h,a);h==A?o.push(new Eo(en(m,y),en(m,y))):g.length>y&&o.push(new Eo(en(m,y),en(m,V(g,A,a))))}o.length||o.push(new Eo(t,t)),ei(i,ko(e,u.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(n)}else{var v,b=s,w=ga(e,n,r.unit),_=b.anchor;nn(w.anchor,_)>0?(v=w.head,_=an(b.from(),w.anchor)):(v=w.anchor,_=on(b.to(),w.head));var C=u.ranges.slice(0);C[l]=function(e,n){var t=n.anchor,r=n.head,o=ze(e.doc,t.line);if(0==nn(t,r)&&t.sticky==r.sticky)return n;var i=ue(o);if(!i)return n;var a=se(i,t.ch,t.sticky),s=i[a];if(s.from!=t.ch&&s.to!=t.ch)return n;var l,u=a+(s.from==t.ch==(1!=s.level)?0:1);if(0==u||u==i.length)return n;if(r.line!=t.line)l=(r.line-t.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=se(i,r.ch,r.sticky),d=c-a||(r.ch-t.ch)*(1==s.level?-1:1);l=c==u-1||c==u?d<0:d>0}var f=i[u+(l?-1:0)],h=l==(1==f.level),A=h?f.from:f.to,m=h?"after":"before";return t.ch==A&&t.sticky==m?n:new Eo(new en(t.line,A,m),r)}(e,new Eo(ln(i,_),v)),ei(i,ko(e,C,l),Y)}}var A=o.wrapper.getBoundingClientRect(),m=0;function p(n){e.state.selectingText=!1,m=1/0,n&&(ve(n),o.input.focus()),he(o.wrapper.ownerDocument,"mousemove",g),he(o.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var g=eo(e,(function(n){0!==n.buttons&&Ee(n)?function n(t){var a=++m,s=ur(e,t,!0,"rectangle"==r.unit);if(s)if(0!=nn(s,f)){e.curOp.focus=L(),h(s);var l=Mr(o,i);(s.line>=l.to||s.lineA.bottom?20:0;u&&setTimeout(eo(e,(function(){m==a&&(o.scroller.scrollTop+=u,n(t))})),50)}}(n):p(n)})),y=eo(e,p);e.state.selectingText=y,de(o.wrapper.ownerDocument,"mousemove",g),de(o.wrapper.ownerDocument,"mouseup",y)}(e,r,n,i)}(n,r,i,e):Ce(e)==t.scroller&&ve(e):2==o?(r&&qo(n.doc,r),setTimeout((function(){return t.input.focus()}),20)):3==o&&(C?n.display.input.onContextMenu(e):Cr(n)))}}function ga(e,n,t){if("char"==t)return new Eo(n,n);if("word"==t)return e.findWordAt(n);if("line"==t)return new Eo(en(n.line,0),ln(e.doc,en(n.line+1,0)));var r=t(e,n);return new Eo(r.from,r.to)}function ya(e,n,t,r){var o,i;if(n.touches)o=n.touches[0].clientX,i=n.touches[0].clientY;else try{o=n.clientX,i=n.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ve(n);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!ge(e,t))return we(n);i-=s.top-a.viewOffset;for(var l=0;l=o)return Ae(e,t,e,Xe(e.doc,i),e.display.gutterSpecs[l].className,n),we(n)}}function va(e,n){return ya(e,n,"gutterClick",!0)}function ba(e,n){_t(e.display,n)||function(e,n){return!!ge(e,"gutterContextMenu")&&ya(e,n,"gutterContextMenu",!1)}(e,n)||me(e,n,"contextmenu")||C||e.display.input.onContextMenu(n)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Ft(e)}ma.prototype.compare=function(e,n,t){return this.time+400>e&&0==nn(n,this.pos)&&t==this.button};var _a={toString:function(){return"CodeMirror.Init"}},Ca={},Ea={};function ka(e,n,t){if(!n!=!(t&&t!=_a)){var r=e.display.dragFunctions,o=n?de:he;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),zn(e)),lr(e),dr(e),Ft(e),setTimeout((function(){return Ur(e)}),100)}function xa(e,n){var t=this;if(!(this instanceof xa))return new xa(e,n);this.options=n=n?H(n):{},H(Ca,n,!1);var r=n.value;"string"==typeof r?r=new Ti(r,n.mode,null,n.lineSeparator,n.direction):n.mode&&(r.modeOption=n.mode),this.doc=r;var o=new xa.inputStyles[n.inputStyle](this),i=this.display=new go(e,r,o,n);for(var u in i.wrapper.CodeMirror=this,wa(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new N,keySeq:null,specialChars:null},n.autofocus&&!g&&i.input.focus(),a&&s<11&&setTimeout((function(){return t.display.input.reset(!0)}),20),function(e){var n=e.display;de(n.scroller,"mousedown",eo(e,pa)),de(n.scroller,"dblclick",a&&s<11?eo(e,(function(n){if(!me(e,n)){var t=ur(e,n);if(t&&!va(e,n)&&!_t(e.display,n)){ve(n);var r=e.findWordAt(t);qo(e.doc,r.anchor,r.head)}}})):function(n){return me(e,n)||ve(n)}),de(n.scroller,"contextmenu",(function(n){return ba(e,n)})),de(n.input.getField(),"contextmenu",(function(t){n.scroller.contains(t.target)||ba(e,t)}));var t,r={end:0};function o(){n.activeTouch&&(t=setTimeout((function(){return n.activeTouch=null}),1e3),(r=n.activeTouch).end=+new Date)}function i(e,n){if(null==n.left)return!0;var t=n.left-e.left,r=n.top-e.top;return t*t+r*r>400}de(n.scroller,"touchstart",(function(o){if(!me(e,o)&&!function(e){if(1!=e.touches.length)return!1;var n=e.touches[0];return n.radiusX<=1&&n.radiusY<=1}(o)&&!va(e,o)){n.input.ensurePolled(),clearTimeout(t);var i=+new Date;n.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(n.activeTouch.left=o.touches[0].pageX,n.activeTouch.top=o.touches[0].pageY)}})),de(n.scroller,"touchmove",(function(){n.activeTouch&&(n.activeTouch.moved=!0)})),de(n.scroller,"touchend",(function(t){var r=n.activeTouch;if(r&&!_t(n,t)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(n.activeTouch,"page");a=!r.prev||i(r,r.prev)?new Eo(s,s):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(s):new Eo(en(s.line,0),ln(e.doc,en(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),ve(t)}o()})),de(n.scroller,"touchcancel",o),de(n.scroller,"scroll",(function(){n.scroller.clientHeight&&(Dr(e,n.scroller.scrollTop),Hr(e,n.scroller.scrollLeft,!0),Ae(e,"scroll",e))})),de(n.scroller,"mousewheel",(function(n){return _o(e,n)})),de(n.scroller,"DOMMouseScroll",(function(n){return _o(e,n)})),de(n.wrapper,"scroll",(function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0})),n.dragFunctions={enter:function(n){me(e,n)||_e(n)},over:function(n){me(e,n)||(function(e,n){var t=ur(e,n);if(t){var r=document.createDocumentFragment();yr(e,t,r),e.display.dragCursor||(e.display.dragCursor=j("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),M(e.display.dragCursor,r)}}(e,n),_e(n))},start:function(n){return function(e,n){if(a&&(!e.state.draggingText||+new Date-Li<100))_e(n);else if(!me(e,n)&&!_t(e.display,n)&&(n.dataTransfer.setData("Text",e.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!f)){var t=j("img",null,null,"position: fixed; left: 0; top: 0;");t.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(t.width=t.height=1,e.display.wrapper.appendChild(t),t._top=t.offsetTop),n.dataTransfer.setDragImage(t,0,0),d&&t.parentNode.removeChild(t)}}(e,n)},drop:eo(e,Oi),leave:function(n){me(e,n)||Ri(e)}};var l=n.input.getField();de(l,"keyup",(function(n){return da.call(e,n)})),de(l,"keydown",eo(e,ca)),de(l,"keypress",eo(e,fa)),de(l,"focus",(function(n){return Er(e,n)})),de(l,"blur",(function(n){return kr(e,n)}))}(this),Hi(),zr(this),this.curOp.forceUpdate=!0,Io(this,r),n.autofocus&&!g||this.hasFocus()?setTimeout((function(){t.hasFocus()&&!t.state.focused&&Er(t)}),20):kr(this),Ea)Ea.hasOwnProperty(u)&&Ea[u](this,n[u],_a);ho(this),n.finishInit&&n.finishInit(this);for(var c=0;c150)){if(!r)return;t="prev"}}else u=0,t="not";"prev"==t?u=n>i.first?P(ze(i,n-1).text,null,a):0:"add"==t?u=l+e.options.indentUnit:"subtract"==t?u=l-e.options.indentUnit:"number"==typeof t&&(u=l+t),u=Math.max(0,u);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(u/a);h;--h)f+=a,d+="\t";if(fa,l=Te(n),u=null;if(s&&r.ranges.length>1)if(Ba&&Ba.text.join("\n")==n){if(r.ranges.length%Ba.text.length==0){u=[];for(var c=0;c=0;f--){var h=r.ranges[f],A=h.from(),m=h.to();h.empty()&&(t&&t>0?A=en(A.line,A.ch-t):e.state.overwrite&&!s?m=en(m.line,Math.min(ze(i,m.line).text.length,m.ch+G(l).length)):s&&Ba&&Ba.lineWise&&Ba.text.join("\n")==l.join("\n")&&(A=m=en(A.line,0)));var p={from:A,to:m,text:u?u[f%u.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ci(e.doc,p),lt(e,"inputRead",e,p)}n&&!s&&Ra(e,n),Tr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Oa(e,n){var t=e.clipboardData&&e.clipboardData.getData("Text");if(t)return e.preventDefault(),n.isReadOnly()||n.options.disableInput||Zr(n,(function(){return La(n,t,0,null,"paste")})),!0}function Ra(e,n){if(e.options.electricChars&&e.options.smartIndent)for(var t=e.doc.sel,r=t.ranges.length-1;r>=0;r--){var o=t.ranges[r];if(!(o.head.ch>100||r&&t.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s-1){a=ja(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(ze(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=ja(e,o.head.line,"smart"));a&<(e,"electricInput",e,o.head.line)}}}function Da(e){for(var n=[],t=[],r=0;r0?0:-1));if(isNaN(c))a=null;else{var d=t>0?c>=55296&&c<56320:c>=56320&&c<57343;a=new en(n.line,Math.max(0,Math.min(s.text.length,n.ch+t*(d?2:1))),-t)}}else a=o?function(e,n,t,r){var o=ue(n,e.doc.direction);if(!o)return Zi(n,t,r);t.ch>=n.text.length?(t.ch=n.text.length,t.sticky="before"):t.ch<=0&&(t.ch=0,t.sticky="after");var i=se(o,t.ch,t.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>t.ch:a.from=a.from&&f>=c.begin)){var h=d?"before":"after";return new en(t.line,f,h)}}var A=function(e,n,r){for(var i=function(e,n){return n?new en(t.line,l(e,1),"before"):new en(t.line,e,"after")};e>=0&&e0==(1!=a.level),u=s?r.begin:l(r.end,-1);if(a.from<=u&&u0?c.end:l(c.begin,-1);return null==p||r>0&&p==n.text.length||!(m=A(r>0?0:o.length-1,r,u(p)))?null:m}(e.cm,s,n,t):Zi(s,n,t);if(null==a){if(i||(u=n.line+l)=e.first+e.size||(n=new en(u,n.ch,n.sticky),!(s=ze(e,u))))return!1;n=ea(o,e.cm,s,n.line,l)}else n=a;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var c=null,d="group"==r,f=e.cm&&e.cm.getHelper(n,"wordChars"),h=!0;!(t<0)||u(!h);h=!1){var A=s.text.charAt(n.ch)||"\n",m=ee(A,f)?"w":d&&"\n"==A?"n":!d||/\s/.test(A)?null:"p";if(!d||h||m||(m="s"),c&&c!=m){t<0&&(t=1,u(),n.sticky="after");break}if(m&&(c=m),t>0&&!u(!h))break}var p=ai(e,n,i,a,!0);return tn(i,p)&&(p.hitSide=!0),p}function Na(e,n,t,r){var o,i,a=e.doc,s=n.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*rr(e.display),3);o=(t>0?n.bottom:n.top)+t*u}else"line"==r&&(o=t>0?n.bottom+3:n.top-3);for(;(i=Jt(e,s,o)).outside;){if(t<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*t}return i}var Fa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new N,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,n){var t=Tt(e,n.line);if(!t||t.hidden)return null;var r=ze(e.doc,n.line),o=jt(t,r,n.line),i=ue(r,e.doc.direction),a="left";i&&(a=se(i,n.ch)%2?"right":"left");var s=It(o.map,n.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Qa(e,n){return n&&(e.bad=!0),e}function Ya(e,n,t){var r;if(n==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[t]))return Qa(e.clipPos(en(e.display.viewTo-1)),!0);n=null,t=0}else for(r=n;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=n.display.viewTo||i.line=n.display.viewFrom&&Ua(n,o)||{node:l[0].measure.map[2],offset:0},c=i.liner.firstLine()&&(a=en(a.line-1,ze(r.doc,a.line-1).length)),s.ch==ze(r.doc,s.line).text.length&&s.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=cr(r,a.line))?(n=Je(o.view[0].line),t=o.view[0].node):(n=Je(o.view[e].line),t=o.view[e-1].node.nextSibling);var l,u,c=cr(r,s.line);if(c==o.view.length-1?(l=o.viewTo-1,u=o.lineDiv.lastChild):(l=Je(o.view[c+1].line)-1,u=o.view[c+1].node.previousSibling),!t)return!1;for(var d=r.doc.splitLines(function(e,n,t,r,o){var i="",a=!1,s=e.doc.lineSeparator(),l=!1;function u(){a&&(i+=s,l&&(i+=s),a=l=!1)}function c(e){e&&(u(),i+=e)}function d(n){if(1==n.nodeType){var t=n.getAttribute("cm-text");if(t)return void c(t);var i,f=n.getAttribute("cm-marker");if(f){var h=e.findMarks(en(r,0),en(o+1,0),(p=+f,function(e){return e.id==p}));return void(h.length&&(i=h[0].find(0))&&c(Ke(e.doc,i.from,i.to).join(s)))}if("false"==n.getAttribute("contenteditable"))return;var A=/^(pre|div|p|li|table|br)$/i.test(n.nodeName);if(!/^br$/i.test(n.nodeName)&&0==n.textContent.length)return;A&&u();for(var m=0;m1&&f.length>1;)if(G(d)==G(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),n++}for(var h=0,A=0,m=d[0],p=f[0],g=Math.min(m.length,p.length);ha.ch&&y.charCodeAt(y.length-A-1)==v.charCodeAt(v.length-A-1);)h--,A++;d[d.length-1]=y.slice(0,y.length-A).replace(/^\u200b+/,""),d[0]=d[0].slice(h).replace(/\u200b+$/,"");var w=en(n,h),_=en(l,f.length?G(f).length-A:0);return d.length>1||d[0]||nn(w,_)?(mi(r.doc,d,w,_,"+input"),!0):void 0},Fa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Fa.prototype.reset=function(){this.forceCompositionEnd()},Fa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Fa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Fa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return dr(e.cm)}))},Fa.prototype.setUneditable=function(e){e.contentEditable="false"},Fa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,La)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Fa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Fa.prototype.onContextMenu=function(){},Fa.prototype.resetPosition=function(){},Fa.prototype.needsContentAttribute=!0;var Va=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new N,this.hasSelection=!1,this.composing=null};Va.prototype.init=function(e){var n=this,t=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!me(r,e)){if(r.somethingSelected())Ta({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var n=Da(r);Ta({lineWise:!0,text:n.text}),"cut"==e.type?r.setSelections(n.ranges,null,Q):(t.prevInput="",o.value=n.text.join("\n"),D(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(o.style.width="0px"),de(o,"input",(function(){a&&s>=9&&n.hasSelection&&(n.hasSelection=null),t.poll()})),de(o,"paste",(function(e){me(r,e)||Oa(e,r)||(r.state.pasteIncoming=+new Date,t.fastPoll())})),de(o,"cut",i),de(o,"copy",i),de(e.scroller,"paste",(function(n){if(!_t(e,n)&&!me(r,n)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void t.focus();var i=new Event("paste");i.clipboardData=n.clipboardData,o.dispatchEvent(i)}})),de(e.lineSpace,"selectstart",(function(n){_t(e,n)||ve(n)})),de(o,"compositionstart",(function(){var e=r.getCursor("from");t.composing&&t.composing.range.clear(),t.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(o,"compositionend",(function(){t.composing&&(t.poll(),t.composing.range.clear(),t.composing=null)}))},Va.prototype.createField=function(e){this.wrapper=Ha(),this.textarea=this.wrapper.firstChild},Va.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Va.prototype.prepareSelection=function(){var e=this.cm,n=e.display,t=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var o=Kt(e,t.sel.primary().head,"div"),i=n.wrapper.getBoundingClientRect(),a=n.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Va.prototype.showSelection=function(e){var n=this.cm.display;M(n.cursorDiv,e.cursors),M(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Va.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var n=this.cm;if(n.somethingSelected()){this.prevInput="";var t=n.getSelection();this.textarea.value=t,n.state.focused&&D(this.textarea),a&&s>=9&&(this.hasSelection=t)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Va.prototype.getField=function(){return this.textarea},Va.prototype.supportsTouch=function(){return!1},Va.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||L()!=this.textarea))try{this.textarea.focus()}catch(e){}},Va.prototype.blur=function(){this.textarea.blur()},Va.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Va.prototype.receivedFocus=function(){this.slowPoll()},Va.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Va.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,(function t(){n.poll()||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}))},Va.prototype.poll=function(){var e=this,n=this.cm,t=this.textarea,r=this.prevInput;if(this.contextMenuPending||!n.state.focused||Le(t)&&!r&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var o=t.value;if(o==r&&!n.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,o.length);l1e3||o.indexOf("\n")>-1?t.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Va.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Va.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Va.prototype.onContextMenu=function(e){var n=this,t=n.cm,r=t.display,o=n.textarea;n.contextMenuPending&&n.contextMenuPending();var i=ur(t,e),u=r.scroller.scrollTop;if(i&&!d){t.options.resetSelectionOnContextMenu&&-1==t.doc.sel.contains(i)&&eo(t,ei)(t.doc,So(i),Q);var c,f=o.style.cssText,h=n.wrapper.style.cssText,A=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-A.top-5)+"px; left: "+(e.clientX-A.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(c=window.scrollY),r.input.focus(),l&&window.scrollTo(null,c),r.input.reset(),t.somethingSelected()||(o.value=n.prevInput=" "),n.contextMenuPending=g,r.selForContextMenu=t.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&p(),C){_e(e);var m=function(){he(window,"mouseup",m),setTimeout(g,20)};de(window,"mouseup",m)}else setTimeout(g,50)}function p(){if(null!=o.selectionStart){var e=t.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,n.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=t.doc.sel}}function g(){if(n.contextMenuPending==g&&(n.contextMenuPending=!1,n.wrapper.style.cssText=h,o.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=o.selectionStart)){(!a||a&&s<9)&&p();var e=0,i=function(){r.selForContextMenu==t.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==n.prevInput?eo(t,li)(t):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Va.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Va.prototype.setUneditable=function(){},Va.prototype.needsContentAttribute=!1,function(e){var n=e.optionHandlers;function t(t,r,o,i){e.defaults[t]=r,o&&(n[t]=i?function(e,n,t){t!=_a&&o(e,n,t)}:o)}e.defineOption=t,e.Init=_a,t("value","",(function(e,n){return e.setValue(n)}),!0),t("mode",null,(function(e,n){e.doc.modeOption=n,To(e)}),!0),t("indentUnit",2,To,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,(function(e){Lo(e),Ft(e),dr(e)}),!0),t("lineSeparator",null,(function(e,n){if(e.doc.lineSep=n,n){var t=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(n,o);if(-1==i)break;o=i+n.length,t.push(en(r,i))}r++}));for(var o=t.length-1;o>=0;o--)mi(e.doc,n,t[o],en(t[o].line,t[o].ch+n.length))}})),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,n,t){e.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),t!=_a&&e.refresh()})),t("specialCharPlaceholder",Zn,(function(e){return e.refresh()}),!0),t("electricChars",!0),t("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),t("spellcheck",!1,(function(e,n){return e.getInputField().spellcheck=n}),!0),t("autocorrect",!1,(function(e,n){return e.getInputField().autocorrect=n}),!0),t("autocapitalize",!1,(function(e,n){return e.getInputField().autocapitalize=n}),!0),t("rtlMoveVisually",!b),t("wholeLineUpdateBefore",!0),t("theme","default",(function(e){wa(e),po(e)}),!0),t("keyMap","default",(function(e,n,t){var r=Ji(n),o=t!=_a&&Ji(t);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Sa,!0),t("gutters",[],(function(e,n){e.display.gutterSpecs=Ao(n,e.options.lineNumbers),po(e)}),!0),t("fixedGutter",!0,(function(e,n){e.display.gutters.style.left=n?ar(e.display)+"px":"0",e.refresh()}),!0),t("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),t("scrollbarStyle","native",(function(e){Wr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),t("lineNumbers",!1,(function(e,n){e.display.gutterSpecs=Ao(e.options.gutters,n),po(e)}),!0),t("firstLineNumber",1,po,!0),t("lineNumberFormatter",(function(e){return e}),po,!0),t("showCursorWhenSelecting",!1,pr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("selectionsMayTouch",!1),t("readOnly",!1,(function(e,n){"nocursor"==n&&(kr(e),e.display.input.blur()),e.display.input.readOnlyChanged(n)})),t("screenReaderLabel",null,(function(e,n){n=""===n?null:n,e.display.input.screenReaderLabelChanged(n)})),t("disableInput",!1,(function(e,n){n||e.display.input.reset()}),!0),t("dragDrop",!0,ka),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,pr,!0),t("singleCursorHeightPerLine",!0,pr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Lo,!0),t("addModeClass",!1,Lo,!0),t("pollInterval",100),t("undoDepth",200,(function(e,n){return e.doc.history.undoDepth=n})),t("historyEventDelay",1250),t("viewportMargin",10,(function(e){return e.refresh()}),!0),t("maxHighlightLength",1e4,Lo,!0),t("moveInputWithCursor",!0,(function(e,n){n||e.display.input.resetPosition()})),t("tabindex",null,(function(e,n){return e.display.input.getField().tabIndex=n||""})),t("autofocus",null),t("direction","ltr",(function(e,n){return e.doc.setDirection(n)}),!0),t("phrases",null)}(xa),function(e){var n=e.optionHandlers,t=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var r=this.options,o=r[e];r[e]==t&&"mode"!=e||(r[e]=t,n.hasOwnProperty(e)&&eo(this,n[e])(this,t,o),Ae(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,n){this.state.keyMaps[n?"push":"unshift"](Ji(e))},removeKeyMap:function(e){for(var n=this.state.keyMaps,t=0;tt&&(ja(this,o.head.line,e,!0),t=o.head.line,r==this.doc.sel.primIndex&&Tr(this));else{var i=o.from(),a=o.to(),s=Math.max(t,i.line);t=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Xo(this.doc,r,new Eo(i,u[r].to()),Q)}}})),getTokenAt:function(e,n){return vn(this,e,n)},getLineTokens:function(e,n){return vn(this,en(e),n,!0)},getTokenTypeAt:function(e){e=ln(this.doc,e);var n,t=hn(this,ze(this.doc,e.line)),r=0,o=(t.length-1)/2,i=e.ch;if(0==i)n=t[2];else for(;;){var a=r+o>>1;if((a?t[2*a-1]:0)>=i)o=a;else{if(!(t[2*a+1]i&&(e=i,o=!0),r=ze(this.doc,e)}else r=e;return Wt(this,r,{top:0,left:0},n||"page",t||o).top+(o?this.doc.height-Wn(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,n,t,r,o){var i,a,s,l=this.display,u=(e=Kt(this,ln(this.doc,e))).bottom,c=e.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),l.sizer.appendChild(n),"over"==r)u=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+n.offsetHeight>d)&&e.top>n.offsetHeight?u=e.top-n.offsetHeight:e.bottom+n.offsetHeight<=d&&(u=e.bottom),c+n.offsetWidth>f&&(c=f-n.offsetWidth)}n.style.top=u+"px",n.style.left=n.style.right="","right"==o?(c=l.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):("left"==o?c=0:"middle"==o&&(c=(l.sizer.clientWidth-n.offsetWidth)/2),n.style.left=c+"px"),t&&(i=this,a={left:c,top:u,right:c+n.offsetWidth,bottom:u+n.offsetHeight},null!=(s=jr(i,a)).scrollTop&&Dr(i,s.scrollTop),null!=s.scrollLeft&&Hr(i,s.scrollLeft))},triggerOnKeyDown:no(ca),triggerOnKeyPress:no(fa),triggerOnKeyUp:da,triggerOnMouseDown:no(pa),execCommand:function(e){if(na.hasOwnProperty(e))return na[e].call(null,this)},triggerElectric:no((function(e){Ra(this,e)})),findPosH:function(e,n,t,r){var o=1;n<0&&(o=-1,n=-n);for(var i=ln(this.doc,e),a=0;a0&&a(n.charAt(t-1));)--t;for(;r.5||this.options.lineWrapping)&&lr(this),Ae(this,"refresh",this)})),swapDoc:no((function(e){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),Io(this,e),Ft(this),this.display.input.reset(),Lr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,lt(this,"swapDoc",this,n),n})),phrase:function(e){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,e)?n[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(n,r,o){t.hasOwnProperty(n)||(t[n]=e[n]={_global:[]}),t[n][r]=o},e.registerGlobalHelper=function(n,r,o,i){e.registerHelper(n,r,i),t[n]._global.push({pred:o,val:i})}}(xa);var za="iter insert remove copy getEditor constructor".split(" ");for(var Ka in Ti.prototype)Ti.prototype.hasOwnProperty(Ka)&&F(za,Ka)<0&&(xa.prototype[Ka]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ti.prototype[Ka]));return ye(Ti),xa.inputStyles={textarea:Va,contenteditable:Fa},xa.defineMode=function(e){xa.defaults.mode||"null"==e||(xa.defaults.mode=e),He.apply(this,arguments)},xa.defineMIME=function(e,n){Ie[e]=n},xa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),xa.defineMIME("text/plain","null"),xa.defineExtension=function(e,n){xa.prototype[e]=n},xa.defineDocExtension=function(e,n){Ti.prototype[e]=n},xa.fromTextArea=function(e,n){if((n=n?H(n):{}).value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),null==n.autofocus){var t=L();n.autofocus=t==e||null!=e.getAttribute("autofocus")&&t==document.body}function r(){e.value=s.getValue()}var o;if(e.form&&(de(e.form,"submit",r),!n.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}n.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),n.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=xa((function(n){return e.parentNode.insertBefore(n,e.nextSibling)}),n);return s},function(e){e.off=he,e.on=de,e.wheelEventPixels=wo,e.Doc=Ti,e.splitLines=Te,e.countColumn=P,e.findColumn=V,e.isWordChar=Z,e.Pass=U,e.signal=Ae,e.Line=Kn,e.changeEnd=xo,e.scrollbarModel=Yr,e.Pos=en,e.cmpPos=nn,e.modes=De,e.mimeModes=Ie,e.resolveMode=Pe,e.getMode=Ne,e.modeExtensions=Fe,e.extendMode=Ue,e.copyState=Qe,e.startState=We,e.innerMode=Ye,e.commands=na,e.keyMap=Yi,e.keyName=qi,e.isModifierKey=Ki,e.lookupKey=zi,e.normalizeKeyMap=Vi,e.StringStream=Ve,e.SharedTextMarker=xi,e.TextMarker=ki,e.LineWidget=_i,e.e_preventDefault=ve,e.e_stopPropagation=be,e.e_stop=_e,e.addClass=O,e.contains=T,e.rmClass=S,e.keyNames=Ni}(xa),xa.version="5.65.3",xa}()},"./node_modules/codemirror/mode/sql/sql.js":function(e,n,t){!function(e){"use strict";function n(e){for(var n;null!=(n=e.next());)if("`"==n&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function t(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function r(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(n,t){var r=t.client||{},s=t.atoms||{false:!0,true:!0,null:!0},l=t.builtin||i(a),u=t.keywords||i(o),c=t.operatorChars||/^[*+\-%<>!=&|~^\/]/,d=t.support||{},f=t.hooks||{},h=t.dateSQL||{date:!0,time:!0,timestamp:!0},A=!1!==t.backslashStringEscapes,m=t.brackets||/^[\{}\(\)\[\]]/,p=t.punctuation||/^[;.,:]/;function g(e,n){var t=e.next();if(f[t]){var o=f[t](e,n);if(!1!==o)return o}if(d.hexNumber&&("0"==t&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==t||"X"==t)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(d.binaryNumber&&(("b"==t||"B"==t)&&e.match(/^'[01]+'/)||"0"==t&&e.match(/^b[01]+/)))return"number";if(t.charCodeAt(0)>47&&t.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),d.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==t&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==t||'"'==t&&d.doubleQuote)return n.tokenize=y(t),n.tokenize(e,n);if((d.nCharCast&&("n"==t||"N"==t)||d.charsetCast&&"_"==t&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(d.escapeConstant&&("e"==t||"E"==t)&&("'"==e.peek()||'"'==e.peek()&&d.doubleQuote))return n.tokenize=function(e,n){return(n.tokenize=y(e.next(),!0))(e,n)},"keyword";if(d.commentSlashSlash&&"/"==t&&e.eat("/"))return e.skipToEnd(),"comment";if(d.commentHash&&"#"==t||"-"==t&&e.eat("-")&&(!d.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==t&&e.eat("*"))return n.tokenize=function e(n){return function(t,r){var o=t.match(/^.*?(\/\*|\*\/)/);return o?"/*"==o[1]?r.tokenize=e(n+1):r.tokenize=n>1?e(n-1):g:t.skipToEnd(),"comment"}}(1),n.tokenize(e,n);if("."!=t){if(c.test(t))return e.eatWhile(c),"operator";if(m.test(t))return"bracket";if(p.test(t))return e.eatWhile(p),"punctuation";if("{"==t&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var i=e.current().toLowerCase();return h.hasOwnProperty(i)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":s.hasOwnProperty(i)?"atom":l.hasOwnProperty(i)?"type":u.hasOwnProperty(i)?"keyword":r.hasOwnProperty(i)?"builtin":null}return d.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:d.ODBCdotTable&&e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function y(e,n){return function(t,r){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){r.tokenize=g;break}i=(A||n)&&!i&&"\\"==o}return"string"}}function v(e,n,t){n.context={prev:n.context,indent:e.indentation(),col:e.column(),type:t}}return{startState:function(){return{tokenize:g,context:null}},token:function(e,n){if(e.sol()&&n.context&&null==n.context.align&&(n.context.align=!1),n.tokenize==g&&e.eatSpace())return null;var t=n.tokenize(e,n);if("comment"==t)return t;n.context&&null==n.context.align&&(n.context.align=!0);var r=e.current();return"("==r?v(e,n,")"):"["==r?v(e,n,"]"):n.context&&n.context.type==r&&function(e){e.indent=e.context.indent,e.context=e.context.prev}(n),t},indent:function(t,r){var o=t.context;if(!o)return e.Pass;var i=r.charAt(0)==o.type;return o.align?o.col+(i?0:1):o.indent+(i?0:n.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:d.commentSlashSlash?"//":d.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var o="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function i(e){for(var n={},t=e.split(" "),r=0;r!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:i("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":t}}),e.defineMIME("text/x-mysql",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":t,"`":n,"\\":r}}),e.defineMIME("text/x-mariadb",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":t,"`":n,"\\":r}}),e.defineMIME("text/x-sqlite",{name:"sql",client:i("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:i(o+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:i("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:i("date time timestamp datetime"),support:i("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":t,":":t,"?":t,$:t,'"':function(e){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null},"`":n}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:i("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:i("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:i("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:i("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:i("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:i("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:i("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:i("date time timestamp"),support:i("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:i("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:i("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date timestamp"),support:i("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:i("source"),keywords:i(o+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:i("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:i("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:i("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:i("false true"),builtin:i("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:i("source"),keywords:i("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:i("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:i("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:i("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:i("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:i("source"),keywords:i("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:i("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:i("time"),support:i("decimallessFloat zerolessFloat binaryNumber hexNumber")})}(t("./node_modules/codemirror/lib/codemirror.js"))},"./node_modules/codemirror/theme/eclipse.css":function(e,n,t){},"./node_modules/core-js/internals/a-callable.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-callable.js"),i=t("./node_modules/core-js/internals/try-to-string.js"),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a function")}},"./node_modules/core-js/internals/a-constructor.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-constructor.js"),i=t("./node_modules/core-js/internals/try-to-string.js"),a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not a constructor")}},"./node_modules/core-js/internals/a-possible-prototype.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-callable.js"),i=r.String,a=r.TypeError;e.exports=function(e){if("object"==typeof e||o(e))return e;throw a("Can't set "+i(e)+" as a prototype")}},"./node_modules/core-js/internals/add-to-unscopables.js":function(e,n,t){var r=t("./node_modules/core-js/internals/well-known-symbol.js"),o=t("./node_modules/core-js/internals/object-create.js"),i=t("./node_modules/core-js/internals/object-define-property.js"),a=r("unscopables"),s=Array.prototype;null==s[a]&&i.f(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},"./node_modules/core-js/internals/advance-string-index.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/string-multibyte.js").charAt;e.exports=function(e,n,t){return n+(t?r(e,n).length:1)}},"./node_modules/core-js/internals/an-instance.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/object-is-prototype-of.js"),i=r.TypeError;e.exports=function(e,n){if(o(n,e))return e;throw i("Incorrect invocation")}},"./node_modules/core-js/internals/an-object.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-object.js"),i=r.String,a=r.TypeError;e.exports=function(e){if(o(e))return e;throw a(i(e)+" is not an object")}},"./node_modules/core-js/internals/array-buffer-non-extensible.js":function(e,n,t){var r=t("./node_modules/core-js/internals/fails.js");e.exports=r((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}))},"./node_modules/core-js/internals/array-fill.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/to-object.js"),o=t("./node_modules/core-js/internals/to-absolute-index.js"),i=t("./node_modules/core-js/internals/length-of-array-like.js");e.exports=function(e){for(var n=r(this),t=i(n),a=arguments.length,s=o(a>1?arguments[1]:void 0,t),l=a>2?arguments[2]:void 0,u=void 0===l?t:o(l,t);u>s;)n[s++]=e;return n}},"./node_modules/core-js/internals/array-for-each.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/array-iteration.js").forEach,o=t("./node_modules/core-js/internals/array-method-is-strict.js")("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},"./node_modules/core-js/internals/array-from.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/function-bind-context.js"),i=t("./node_modules/core-js/internals/function-call.js"),a=t("./node_modules/core-js/internals/to-object.js"),s=t("./node_modules/core-js/internals/call-with-safe-iteration-closing.js"),l=t("./node_modules/core-js/internals/is-array-iterator-method.js"),u=t("./node_modules/core-js/internals/is-constructor.js"),c=t("./node_modules/core-js/internals/length-of-array-like.js"),d=t("./node_modules/core-js/internals/create-property.js"),f=t("./node_modules/core-js/internals/get-iterator.js"),h=t("./node_modules/core-js/internals/get-iterator-method.js"),A=r.Array;e.exports=function(e){var n=a(e),t=u(this),r=arguments.length,m=r>1?arguments[1]:void 0,p=void 0!==m;p&&(m=o(m,r>2?arguments[2]:void 0));var g,y,v,b,w,_,C=h(n),E=0;if(!C||this==A&&l(C))for(g=c(n),y=t?new this(g):A(g);g>E;E++)_=p?m(n[E],E):n[E],d(y,E,_);else for(w=(b=f(n,C)).next,y=t?new this:[];!(v=i(w,b)).done;E++)_=p?s(b,m,[v.value,E],!0):v.value,d(y,E,_);return y.length=E,y}},"./node_modules/core-js/internals/array-includes.js":function(e,n,t){var r=t("./node_modules/core-js/internals/to-indexed-object.js"),o=t("./node_modules/core-js/internals/to-absolute-index.js"),i=t("./node_modules/core-js/internals/length-of-array-like.js"),a=function(e){return function(n,t,a){var s,l=r(n),u=i(l),c=o(a,u);if(e&&t!=t){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===t)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"./node_modules/core-js/internals/array-iteration.js":function(e,n,t){var r=t("./node_modules/core-js/internals/function-bind-context.js"),o=t("./node_modules/core-js/internals/function-uncurry-this.js"),i=t("./node_modules/core-js/internals/indexed-object.js"),a=t("./node_modules/core-js/internals/to-object.js"),s=t("./node_modules/core-js/internals/length-of-array-like.js"),l=t("./node_modules/core-js/internals/array-species-create.js"),u=o([].push),c=function(e){var n=1==e,t=2==e,o=3==e,c=4==e,d=6==e,f=7==e,h=5==e||d;return function(A,m,p,g){for(var y,v,b=a(A),w=i(b),_=r(m,p),C=s(w),E=0,k=g||l,S=n?k(A,C):t||f?k(A,0):void 0;C>E;E++)if((h||E in w)&&(v=_(y=w[E],E,b),e))if(n)S[E]=v;else if(v)switch(e){case 3:return!0;case 5:return y;case 6:return E;case 2:u(S,y)}else switch(e){case 4:return!1;case 7:u(S,y)}return d?-1:o||c?c:S}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},"./node_modules/core-js/internals/array-last-index-of.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/function-apply.js"),o=t("./node_modules/core-js/internals/to-indexed-object.js"),i=t("./node_modules/core-js/internals/to-integer-or-infinity.js"),a=t("./node_modules/core-js/internals/length-of-array-like.js"),s=t("./node_modules/core-js/internals/array-method-is-strict.js"),l=Math.min,u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0,d=s("lastIndexOf"),f=c||!d;e.exports=f?function(e){if(c)return r(u,this,arguments)||0;var n=o(this),t=a(n),s=t-1;for(arguments.length>1&&(s=l(s,i(arguments[1]))),s<0&&(s=t+s);s>=0;s--)if(s in n&&n[s]===e)return s||0;return-1}:u},"./node_modules/core-js/internals/array-method-has-species-support.js":function(e,n,t){var r=t("./node_modules/core-js/internals/fails.js"),o=t("./node_modules/core-js/internals/well-known-symbol.js"),i=t("./node_modules/core-js/internals/engine-v8-version.js"),a=o("species");e.exports=function(e){return i>=51||!r((function(){var n=[];return(n.constructor={})[a]=function(){return{foo:1}},1!==n[e](Boolean).foo}))}},"./node_modules/core-js/internals/array-method-is-strict.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/fails.js");e.exports=function(e,n){var t=[][e];return!!t&&r((function(){t.call(null,n||function(){return 1},1)}))}},"./node_modules/core-js/internals/array-reduce.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/a-callable.js"),i=t("./node_modules/core-js/internals/to-object.js"),a=t("./node_modules/core-js/internals/indexed-object.js"),s=t("./node_modules/core-js/internals/length-of-array-like.js"),l=r.TypeError,u=function(e){return function(n,t,r,u){o(t);var c=i(n),d=a(c),f=s(c),h=e?f-1:0,A=e?-1:1;if(r<2)for(;;){if(h in d){u=d[h],h+=A;break}if(h+=A,e?h<0:f<=h)throw l("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=A)h in d&&(u=t(u,d[h],h,c));return u}};e.exports={left:u(!1),right:u(!0)}},"./node_modules/core-js/internals/array-slice-simple.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/to-absolute-index.js"),i=t("./node_modules/core-js/internals/length-of-array-like.js"),a=t("./node_modules/core-js/internals/create-property.js"),s=r.Array,l=Math.max;e.exports=function(e,n,t){for(var r=i(e),u=o(n,r),c=o(void 0===t?r:t,r),d=s(l(c-u,0)),f=0;u0;)e[r]=e[--r];r!==i++&&(e[r]=t)}return e},s=function(e,n,t,r){for(var o=n.length,i=t.length,a=0,s=0;a1?arguments[1]:void 0);n=n?n.next:t.first;)for(r(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(e){return!!y(this,e)}}),i(h,t?{get:function(e){var n=y(this,e);return n&&n.value},set:function(e,n){return g(this,0===e?0:e,n)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&r(h,"size",{get:function(){return p(this).size}}),c},setStrong:function(e,n,t){var r=n+" Iterator",o=m(n),i=m(r);u(e,n,(function(e,n){A(this,{type:r,target:e,state:o(e),kind:n,last:void 0})}),(function(){for(var e=i(this),n=e.kind,t=e.last;t&&t.removed;)t=t.previous;return e.target&&(e.last=t=t?t.next:e.state.first)?"keys"==n?{value:t.key,done:!1}:"values"==n?{value:t.value,done:!1}:{value:[t.key,t.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),t?"entries":"values",!t,!0),c(n)}}},"./node_modules/core-js/internals/collection-weak.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/function-uncurry-this.js"),o=t("./node_modules/core-js/internals/define-built-ins.js"),i=t("./node_modules/core-js/internals/internal-metadata.js").getWeakData,a=t("./node_modules/core-js/internals/an-object.js"),s=t("./node_modules/core-js/internals/is-object.js"),l=t("./node_modules/core-js/internals/an-instance.js"),u=t("./node_modules/core-js/internals/iterate.js"),c=t("./node_modules/core-js/internals/array-iteration.js"),d=t("./node_modules/core-js/internals/has-own-property.js"),f=t("./node_modules/core-js/internals/internal-state.js"),h=f.set,A=f.getterFor,m=c.find,p=c.findIndex,g=r([].splice),y=0,v=function(e){return e.frozen||(e.frozen=new b)},b=function(){this.entries=[]},w=function(e,n){return m(e.entries,(function(e){return e[0]===n}))};b.prototype={get:function(e){var n=w(this,e);if(n)return n[1]},has:function(e){return!!w(this,e)},set:function(e,n){var t=w(this,e);t?t[1]=n:this.entries.push([e,n])},delete:function(e){var n=p(this.entries,(function(n){return n[0]===e}));return~n&&g(this.entries,n,1),!!~n}},e.exports={getConstructor:function(e,n,t,r){var c=e((function(e,o){l(e,f),h(e,{type:n,id:y++,frozen:void 0}),null!=o&&u(o,e[r],{that:e,AS_ENTRIES:t})})),f=c.prototype,m=A(n),p=function(e,n,t){var r=m(e),o=i(a(n),!0);return!0===o?v(r).set(n,t):o[r.id]=t,e};return o(f,{delete:function(e){var n=m(this);if(!s(e))return!1;var t=i(e);return!0===t?v(n).delete(e):t&&d(t,n.id)&&delete t[n.id]},has:function(e){var n=m(this);if(!s(e))return!1;var t=i(e);return!0===t?v(n).has(e):t&&d(t,n.id)}}),o(f,t?{get:function(e){var n=m(this);if(s(e)){var t=i(e);return!0===t?v(n).get(e):t?t[n.id]:void 0}},set:function(e,n){return p(this,e,n)}}:{add:function(e){return p(this,e,!0)}}),c}}},"./node_modules/core-js/internals/collection.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/export.js"),o=t("./node_modules/core-js/internals/global.js"),i=t("./node_modules/core-js/internals/function-uncurry-this.js"),a=t("./node_modules/core-js/internals/is-forced.js"),s=t("./node_modules/core-js/internals/define-built-in.js"),l=t("./node_modules/core-js/internals/internal-metadata.js"),u=t("./node_modules/core-js/internals/iterate.js"),c=t("./node_modules/core-js/internals/an-instance.js"),d=t("./node_modules/core-js/internals/is-callable.js"),f=t("./node_modules/core-js/internals/is-object.js"),h=t("./node_modules/core-js/internals/fails.js"),A=t("./node_modules/core-js/internals/check-correctness-of-iteration.js"),m=t("./node_modules/core-js/internals/set-to-string-tag.js"),p=t("./node_modules/core-js/internals/inherit-if-required.js");e.exports=function(e,n,t){var g=-1!==e.indexOf("Map"),y=-1!==e.indexOf("Weak"),v=g?"set":"add",b=o[e],w=b&&b.prototype,_=b,C={},E=function(e){var n=i(w[e]);s(w,e,"add"==e?function(e){return n(this,0===e?0:e),this}:"delete"==e?function(e){return!(y&&!f(e))&&n(this,0===e?0:e)}:"get"==e?function(e){return y&&!f(e)?void 0:n(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!f(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};if(a(e,!d(b)||!(y||w.forEach&&!h((function(){(new b).entries().next()})))))_=t.getConstructor(n,e,g,v),l.enable();else if(a(e,!0)){var k=new _,S=k[v](y?{}:-0,1)!=k,x=h((function(){k.has(1)})),M=A((function(e){new b(e)})),j=!y&&h((function(){for(var e=new b,n=5;n--;)e[v](n,n);return!e.has(-0)}));M||((_=n((function(e,n){c(e,w);var t=p(new b,e,_);return null!=n&&u(n,t[v],{that:t,AS_ENTRIES:g}),t}))).prototype=w,w.constructor=_),(x||j)&&(E("delete"),E("has"),g&&E("get")),(j||S)&&E(v),y&&w.clear&&delete w.clear}return C[e]=_,r({global:!0,constructor:!0,forced:_!=b},C),m(_,e),y||t.setStrong(_,e,g),_}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(e,n,t){var r=t("./node_modules/core-js/internals/has-own-property.js"),o=t("./node_modules/core-js/internals/own-keys.js"),i=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),a=t("./node_modules/core-js/internals/object-define-property.js");e.exports=function(e,n,t){for(var s=o(n),l=a.f,u=i.f,c=0;c"+l+""}},"./node_modules/core-js/internals/create-iterator-constructor.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,o=t("./node_modules/core-js/internals/object-create.js"),i=t("./node_modules/core-js/internals/create-property-descriptor.js"),a=t("./node_modules/core-js/internals/set-to-string-tag.js"),s=t("./node_modules/core-js/internals/iterators.js"),l=function(){return this};e.exports=function(e,n,t,u){var c=n+" Iterator";return e.prototype=o(r,{next:i(+!u,t)}),a(e,c,!1,!0),s[c]=l,e}},"./node_modules/core-js/internals/create-non-enumerable-property.js":function(e,n,t){var r=t("./node_modules/core-js/internals/descriptors.js"),o=t("./node_modules/core-js/internals/object-define-property.js"),i=t("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=r?function(e,n,t){return o.f(e,n,i(1,t))}:function(e,n,t){return e[n]=t,e}},"./node_modules/core-js/internals/create-property-descriptor.js":function(e,n){e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},"./node_modules/core-js/internals/create-property.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/to-property-key.js"),o=t("./node_modules/core-js/internals/object-define-property.js"),i=t("./node_modules/core-js/internals/create-property-descriptor.js");e.exports=function(e,n,t){var a=r(n);a in e?o.f(e,a,i(0,t)):e[a]=t}},"./node_modules/core-js/internals/define-built-in.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-callable.js"),i=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=t("./node_modules/core-js/internals/make-built-in.js"),s=t("./node_modules/core-js/internals/set-global.js");e.exports=function(e,n,t,l){var u=!!l&&!!l.unsafe,c=!!l&&!!l.enumerable,d=!!l&&!!l.noTargetGet,f=l&&void 0!==l.name?l.name:n;return o(t)&&a(t,f,l),e===r?(c?e[n]=t:s(n,t),e):(u?!d&&e[n]&&(c=!0):delete e[n],c?e[n]=t:i(e,n,t),e)}},"./node_modules/core-js/internals/define-built-ins.js":function(e,n,t){var r=t("./node_modules/core-js/internals/define-built-in.js");e.exports=function(e,n,t){for(var o in n)r(e,o,n[o],t);return e}},"./node_modules/core-js/internals/define-iterator.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/export.js"),o=t("./node_modules/core-js/internals/function-call.js"),i=t("./node_modules/core-js/internals/is-pure.js"),a=t("./node_modules/core-js/internals/function-name.js"),s=t("./node_modules/core-js/internals/is-callable.js"),l=t("./node_modules/core-js/internals/create-iterator-constructor.js"),u=t("./node_modules/core-js/internals/object-get-prototype-of.js"),c=t("./node_modules/core-js/internals/object-set-prototype-of.js"),d=t("./node_modules/core-js/internals/set-to-string-tag.js"),f=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),h=t("./node_modules/core-js/internals/define-built-in.js"),A=t("./node_modules/core-js/internals/well-known-symbol.js"),m=t("./node_modules/core-js/internals/iterators.js"),p=t("./node_modules/core-js/internals/iterators-core.js"),g=a.PROPER,y=a.CONFIGURABLE,v=p.IteratorPrototype,b=p.BUGGY_SAFARI_ITERATORS,w=A("iterator"),_=function(){return this};e.exports=function(e,n,t,a,A,p,C){l(t,n,a);var E,k,S,x=function(e){if(e===A&&L)return L;if(!b&&e in B)return B[e];switch(e){case"keys":case"values":case"entries":return function(){return new t(this,e)}}return function(){return new t(this)}},M=n+" Iterator",j=!1,B=e.prototype,T=B[w]||B["@@iterator"]||A&&B[A],L=!b&&T||x(A),O="Array"==n&&B.entries||T;if(O&&(E=u(O.call(new e)))!==Object.prototype&&E.next&&(i||u(E)===v||(c?c(E,v):s(E[w])||h(E,w,_)),d(E,M,!0,!0),i&&(m[M]=_)),g&&"values"==A&&T&&"values"!==T.name&&(!i&&y?f(B,"name","values"):(j=!0,L=function(){return o(T,this)})),A)if(k={values:x("values"),keys:p?L:x("keys"),entries:x("entries")},C)for(S in k)(b||j||!(S in B))&&h(B,S,k[S]);else r({target:n,proto:!0,forced:b||j},k);return i&&!C||B[w]===L||h(B,w,L,{name:A}),m[n]=L,k}},"./node_modules/core-js/internals/define-well-known-symbol.js":function(e,n,t){var r=t("./node_modules/core-js/internals/path.js"),o=t("./node_modules/core-js/internals/has-own-property.js"),i=t("./node_modules/core-js/internals/well-known-symbol-wrapped.js"),a=t("./node_modules/core-js/internals/object-define-property.js").f;e.exports=function(e){var n=r.Symbol||(r.Symbol={});o(n,e)||a(n,e,{value:i.f(e)})}},"./node_modules/core-js/internals/descriptors.js":function(e,n,t){var r=t("./node_modules/core-js/internals/fails.js");e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"./node_modules/core-js/internals/document-create-element.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-object.js"),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},"./node_modules/core-js/internals/dom-iterables.js":function(e,n){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"./node_modules/core-js/internals/dom-token-list-prototype.js":function(e,n,t){var r=t("./node_modules/core-js/internals/document-create-element.js")("span").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},"./node_modules/core-js/internals/engine-ff-version.js":function(e,n,t){var r=t("./node_modules/core-js/internals/engine-user-agent.js").match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},"./node_modules/core-js/internals/engine-is-ie-or-edge.js":function(e,n,t){var r=t("./node_modules/core-js/internals/engine-user-agent.js");e.exports=/MSIE|Trident/.test(r)},"./node_modules/core-js/internals/engine-is-ios.js":function(e,n,t){var r=t("./node_modules/core-js/internals/engine-user-agent.js");e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},"./node_modules/core-js/internals/engine-is-node.js":function(e,n,t){var r=t("./node_modules/core-js/internals/classof-raw.js"),o=t("./node_modules/core-js/internals/global.js");e.exports="process"==r(o.process)},"./node_modules/core-js/internals/engine-user-agent.js":function(e,n,t){var r=t("./node_modules/core-js/internals/get-built-in.js");e.exports=r("navigator","userAgent")||""},"./node_modules/core-js/internals/engine-v8-version.js":function(e,n,t){var r,o,i=t("./node_modules/core-js/internals/global.js"),a=t("./node_modules/core-js/internals/engine-user-agent.js"),s=i.process,l=i.Deno,u=s&&s.versions||l&&l.version,c=u&&u.v8;c&&(o=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},"./node_modules/core-js/internals/engine-webkit-version.js":function(e,n,t){var r=t("./node_modules/core-js/internals/engine-user-agent.js").match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},"./node_modules/core-js/internals/enum-bug-keys.js":function(e,n){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/export.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,i=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),a=t("./node_modules/core-js/internals/define-built-in.js"),s=t("./node_modules/core-js/internals/set-global.js"),l=t("./node_modules/core-js/internals/copy-constructor-properties.js"),u=t("./node_modules/core-js/internals/is-forced.js");e.exports=function(e,n){var t,c,d,f,h,A=e.target,m=e.global,p=e.stat;if(t=m?r:p?r[A]||s(A,{}):(r[A]||{}).prototype)for(c in n){if(f=n[c],d=e.noTargetGet?(h=o(t,c))&&h.value:t[c],!u(m?c:A+(p?".":"#")+c,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;l(f,d)}(e.sham||d&&d.sham)&&i(f,"sham",!0),a(t,c,f,e)}}},"./node_modules/core-js/internals/fails.js":function(e,n){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js":function(e,n,t){"use strict";t("./node_modules/core-js/modules/es.regexp.exec.js");var r=t("./node_modules/core-js/internals/function-uncurry-this.js"),o=t("./node_modules/core-js/internals/define-built-in.js"),i=t("./node_modules/core-js/internals/regexp-exec.js"),a=t("./node_modules/core-js/internals/fails.js"),s=t("./node_modules/core-js/internals/well-known-symbol.js"),l=t("./node_modules/core-js/internals/create-non-enumerable-property.js"),u=s("species"),c=RegExp.prototype;e.exports=function(e,n,t,d){var f=s(e),h=!a((function(){var n={};return n[f]=function(){return 7},7!=""[e](n)})),A=h&&!a((function(){var n=!1,t=/a/;return"split"===e&&((t={}).constructor={},t.constructor[u]=function(){return t},t.flags="",t[f]=/./[f]),t.exec=function(){return n=!0,null},t[f](""),!n}));if(!h||!A||t){var m=r(/./[f]),p=n(f,""[e],(function(e,n,t,o,a){var s=r(e),l=n.exec;return l===i||l===c.exec?h&&!a?{done:!0,value:m(n,t,o)}:{done:!0,value:s(t,n,o)}:{done:!1}}));o(String.prototype,e,p[0]),o(c,f,p[1])}d&&l(c[f],"sham",!0)}},"./node_modules/core-js/internals/freezing.js":function(e,n,t){var r=t("./node_modules/core-js/internals/fails.js");e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},"./node_modules/core-js/internals/function-apply.js":function(e,n,t){var r=t("./node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},"./node_modules/core-js/internals/function-bind-context.js":function(e,n,t){var r=t("./node_modules/core-js/internals/function-uncurry-this.js"),o=t("./node_modules/core-js/internals/a-callable.js"),i=t("./node_modules/core-js/internals/function-bind-native.js"),a=r(r.bind);e.exports=function(e,n){return o(e),void 0===n?e:i?a(e,n):function(){return e.apply(n,arguments)}}},"./node_modules/core-js/internals/function-bind-native.js":function(e,n,t){var r=t("./node_modules/core-js/internals/fails.js");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"./node_modules/core-js/internals/function-bind.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/function-uncurry-this.js"),i=t("./node_modules/core-js/internals/a-callable.js"),a=t("./node_modules/core-js/internals/is-object.js"),s=t("./node_modules/core-js/internals/has-own-property.js"),l=t("./node_modules/core-js/internals/array-slice.js"),u=t("./node_modules/core-js/internals/function-bind-native.js"),c=r.Function,d=o([].concat),f=o([].join),h={},A=function(e,n,t){if(!s(h,n)){for(var r=[],o=0;o]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,n,t,r,d,f){var h=t+e.length,A=r.length,m=c;return void 0!==d&&(d=o(d),m=u),s(f,m,(function(o,s){var u;switch(a(s,0)){case"$":return"$";case"&":return e;case"`":return l(n,0,t);case"'":return l(n,h);case"<":u=d[l(s,1,-1)];break;default:var c=+s;if(0===c)return o;if(c>A){var f=i(c/10);return 0===f?o:f<=A?void 0===r[f-1]?a(s,1):r[f-1]+a(s,1):o}u=r[c-1]}return void 0===u?"":u}))}},"./node_modules/core-js/internals/global.js":function(e,n,t){(function(n){var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof n&&n)||function(){return this}()||Function("return this")()}).call(this,t("./node_modules/webpack/buildin/global.js"))},"./node_modules/core-js/internals/has-own-property.js":function(e,n,t){var r=t("./node_modules/core-js/internals/function-uncurry-this.js"),o=t("./node_modules/core-js/internals/to-object.js"),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,n){return i(o(e),n)}},"./node_modules/core-js/internals/hidden-keys.js":function(e,n){e.exports={}},"./node_modules/core-js/internals/html.js":function(e,n,t){var r=t("./node_modules/core-js/internals/get-built-in.js");e.exports=r("document","documentElement")},"./node_modules/core-js/internals/ie8-dom-define.js":function(e,n,t){var r=t("./node_modules/core-js/internals/descriptors.js"),o=t("./node_modules/core-js/internals/fails.js"),i=t("./node_modules/core-js/internals/document-create-element.js");e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},"./node_modules/core-js/internals/indexed-object.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/function-uncurry-this.js"),i=t("./node_modules/core-js/internals/fails.js"),a=t("./node_modules/core-js/internals/classof-raw.js"),s=r.Object,l=o("".split);e.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?l(e,""):s(e)}:s},"./node_modules/core-js/internals/inherit-if-required.js":function(e,n,t){var r=t("./node_modules/core-js/internals/is-callable.js"),o=t("./node_modules/core-js/internals/is-object.js"),i=t("./node_modules/core-js/internals/object-set-prototype-of.js");e.exports=function(e,n,t){var a,s;return i&&r(a=n.constructor)&&a!==t&&o(s=a.prototype)&&s!==t.prototype&&i(e,s),e}},"./node_modules/core-js/internals/inspect-source.js":function(e,n,t){var r=t("./node_modules/core-js/internals/function-uncurry-this.js"),o=t("./node_modules/core-js/internals/is-callable.js"),i=t("./node_modules/core-js/internals/shared-store.js"),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},"./node_modules/core-js/internals/internal-metadata.js":function(e,n,t){var r=t("./node_modules/core-js/internals/export.js"),o=t("./node_modules/core-js/internals/function-uncurry-this.js"),i=t("./node_modules/core-js/internals/hidden-keys.js"),a=t("./node_modules/core-js/internals/is-object.js"),s=t("./node_modules/core-js/internals/has-own-property.js"),l=t("./node_modules/core-js/internals/object-define-property.js").f,u=t("./node_modules/core-js/internals/object-get-own-property-names.js"),c=t("./node_modules/core-js/internals/object-get-own-property-names-external.js"),d=t("./node_modules/core-js/internals/object-is-extensible.js"),f=t("./node_modules/core-js/internals/uid.js"),h=t("./node_modules/core-js/internals/freezing.js"),A=!1,m=f("meta"),p=0,g=function(e){l(e,m,{value:{objectID:"O"+p++,weakData:{}}})},y=e.exports={enable:function(){y.enable=function(){},A=!0;var e=u.f,n=o([].splice),t={};t[m]=1,e(t).length&&(u.f=function(t){for(var r=e(t),o=0,i=r.length;oy;y++)if((b=j(e[y]))&&c(p,b))return b;return new m(!1)}r=d(e,g)}for(w=r.next;!(_=i(w,r)).done;){try{b=j(_.value)}catch(e){h(r,"throw",e)}if("object"==typeof b&&b&&c(p,b))return b}return new m(!1)}},"./node_modules/core-js/internals/iterator-close.js":function(e,n,t){var r=t("./node_modules/core-js/internals/function-call.js"),o=t("./node_modules/core-js/internals/an-object.js"),i=t("./node_modules/core-js/internals/get-method.js");e.exports=function(e,n,t){var a,s;o(e);try{if(!(a=i(e,"return"))){if("throw"===n)throw t;return t}a=r(a,e)}catch(e){s=!0,a=e}if("throw"===n)throw t;if(s)throw a;return o(a),t}},"./node_modules/core-js/internals/iterators-core.js":function(e,n,t){"use strict";var r,o,i,a=t("./node_modules/core-js/internals/fails.js"),s=t("./node_modules/core-js/internals/is-callable.js"),l=t("./node_modules/core-js/internals/object-create.js"),u=t("./node_modules/core-js/internals/object-get-prototype-of.js"),c=t("./node_modules/core-js/internals/define-built-in.js"),d=t("./node_modules/core-js/internals/well-known-symbol.js"),f=t("./node_modules/core-js/internals/is-pure.js"),h=d("iterator"),A=!1;[].keys&&("next"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):A=!0),null==r||a((function(){var e={};return r[h].call(e)!==e}))?r={}:f&&(r=l(r)),s(r[h])||c(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:A}},"./node_modules/core-js/internals/iterators.js":function(e,n){e.exports={}},"./node_modules/core-js/internals/length-of-array-like.js":function(e,n,t){var r=t("./node_modules/core-js/internals/to-length.js");e.exports=function(e){return r(e.length)}},"./node_modules/core-js/internals/make-built-in.js":function(e,n,t){var r=t("./node_modules/core-js/internals/fails.js"),o=t("./node_modules/core-js/internals/is-callable.js"),i=t("./node_modules/core-js/internals/has-own-property.js"),a=t("./node_modules/core-js/internals/descriptors.js"),s=t("./node_modules/core-js/internals/function-name.js").CONFIGURABLE,l=t("./node_modules/core-js/internals/inspect-source.js"),u=t("./node_modules/core-js/internals/internal-state.js"),c=u.enforce,d=u.get,f=Object.defineProperty,h=a&&!r((function(){return 8!==f((function(){}),"length",{value:8}).length})),A=String(String).split("String"),m=e.exports=function(e,n,t){if("Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(n="get "+n),t&&t.setter&&(n="set "+n),(!i(e,"name")||s&&e.name!==n)&&f(e,"name",{value:n,configurable:!0}),h&&t&&i(t,"arity")&&e.length!==t.arity&&f(e,"length",{value:t.arity}),t&&i(t,"constructor")&&t.constructor){if(a)try{f(e,"prototype",{writable:!1})}catch(e){}}else e.prototype=void 0;var r=c(e);return i(r,"source")||(r.source=A.join("string"==typeof n?n:"")),e};Function.prototype.toString=m((function(){return o(this)&&d(this).source||l(this)}),"toString")},"./node_modules/core-js/internals/native-symbol-registry.js":function(e,n,t){var r=t("./node_modules/core-js/internals/native-symbol.js");e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},"./node_modules/core-js/internals/native-symbol.js":function(e,n,t){var r=t("./node_modules/core-js/internals/engine-v8-version.js"),o=t("./node_modules/core-js/internals/fails.js");e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"./node_modules/core-js/internals/native-weak-map.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-callable.js"),i=t("./node_modules/core-js/internals/inspect-source.js"),a=r.WeakMap;e.exports=o(a)&&/native code/.test(i(a))},"./node_modules/core-js/internals/not-a-regexp.js":function(e,n,t){var r=t("./node_modules/core-js/internals/global.js"),o=t("./node_modules/core-js/internals/is-regexp.js"),i=r.TypeError;e.exports=function(e){if(o(e))throw i("The method doesn't accept regular expressions");return e}},"./node_modules/core-js/internals/object-assign.js":function(e,n,t){"use strict";var r=t("./node_modules/core-js/internals/descriptors.js"),o=t("./node_modules/core-js/internals/function-uncurry-this.js"),i=t("./node_modules/core-js/internals/function-call.js"),a=t("./node_modules/core-js/internals/fails.js"),s=t("./node_modules/core-js/internals/object-keys.js"),l=t("./node_modules/core-js/internals/object-get-own-property-symbols.js"),u=t("./node_modules/core-js/internals/object-property-is-enumerable.js"),c=t("./node_modules/core-js/internals/to-object.js"),d=t("./node_modules/core-js/internals/indexed-object.js"),f=Object.assign,h=Object.defineProperty,A=o([].concat);e.exports=!f||a((function(){if(r&&1!==f({b:1},f(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},t=Symbol();return e[t]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),7!=f({},e)[t]||"abcdefghijklmnopqrst"!=s(f({},n)).join("")}))?function(e,n){for(var t=c(e),o=arguments.length,a=1,f=l.f,h=u.f;o>a;)for(var m,p=d(arguments[a++]),g=f?A(s(p),f(p)):s(p),y=g.length,v=0;y>v;)m=g[v++],r&&!i(h,p,m)||(t[m]=p[m]);return t}:f},"./node_modules/core-js/internals/object-create.js":function(e,n,t){var r,o=t("./node_modules/core-js/internals/an-object.js"),i=t("./node_modules/core-js/internals/object-define-properties.js"),a=t("./node_modules/core-js/internals/enum-bug-keys.js"),s=t("./node_modules/core-js/internals/hidden-keys.js"),l=t("./node_modules/core-js/internals/html.js"),u=t("./node_modules/core-js/internals/document-create-element.js"),c=t("./node_modules/core-js/internals/shared-key.js"),d=c("IE_PROTO"),f=function(){},h=function(e){return" + diff --git a/test.html.gz b/test.html.gz index db0af6497c9bf3a1fde0eabe7af2e67484d639bc..1782a60ba23c8fe5bfea4a540c7101137780d86c 100644 GIT binary patch delta 406 zcmV;H0crlF1Ed3x7=LNEWyNOalC8kD4hyjK(4#EVwK7?9MLJFT^<(TdmjML?P<$dE z$ww6zUw^N+_nU9fa_3j`;?8A50iHl@-E^a<*ajYM;w;p5=;rLr+F2G01{ zqkkzLT?UwR3=}1SXlEB@$!?s zuBxSZzg$+iB~lrLKRT5=N5PLR+rTfYLEGjPSjJnTo0z^3O#+Ze*lRuLw*7P0F6Dv A(EtDd delta 407 zcmV;I0cifD1Em9y7=K+?w8>`YlC8kD4hyjC(4%b8wK7?9MLLc9^<&~TmjMF=P<$dE z$ww6zpMS2m51TL0a_3j`;?1D3tNE;`3?Z}$n^I{7`UrK%MxwdT@M&=SQq?gq2F`fw zQNgQMD#iorBi$#cTayU6{Jp))7V5;pjyZ8`(R5_37Q46J(Vmg;$vrOdnF8q0uIiWWPeNraBUYN#yz{=X? z?e)!adD|=(c}=81qDnT`=b`d^pT5Uj_1M@Q-@T@Wr)bA_J1*