/*! For license information please see 249.7ec032cf0b3ede9a.js.LICENSE.txt */ (self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[249],{17:(e,t,n)=>{"use strict";var r=n(51605),o=n(91344).filter;r({target:"Array",proto:!0,forced:!n(45634)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},119:function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"ثانیه d%",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(95093))},1221:function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(95093))},1466:(e,t,n)=>{var r=n(30281),o=n(92074),i=n(78420),a=n(83062),s=n(56492),l=n(69965),u=function(){},c=[],h=s("Reflect","construct"),f=/^\s*(?:class|function)\b/,d=r(f.exec),m=!f.exec(u),p=function(e){if(!i(e))return!1;try{return h(u,c,e),!0}catch(e){return!1}},y=function(e){if(!i(e))return!1;switch(a(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return m||!!d(f,l(e))}catch(e){return!0}};y.sham=!0,e.exports=!h||o((function(){var e;return p(p.call)||!p(Object)||!p((function(){e=!0}))||e}))?y:p},1632:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(95093))},3035:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?o[n][2]?o[n][2]:o[n][1]:r?o[n][0]:o[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(95093))},3101:(e,t,n)=>{var r=n(51605),o=n(65077),i=n(15816),a=n(5476),s=n(97632),l=n(52057);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=s.f,u=i(r),c={},h=0;u.length>h;)void 0!==(n=o(r,t=u[h++]))&&l(c,t,n);return c}})},3322:function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var o=t.words[r];return 1===r.length?n?o[0]:o[1]:e+" "+t.correctGrammaticalCase(e,o)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(95093))},3508:function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(95093))},3727:(e,t,n)=>{var r=n(47061).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},3883:(e,t,n)=>{var r=n(51605),o=n(56492),i=n(36490),a=n(95362),s=n(50002),l=n(14569),u=s("string-to-symbol-registry"),c=s("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=a(e);if(i(u,t))return u[t];var n=o("Symbol")(t);return u[t]=n,c[n]=t,n}})},4038:(e,t,n)=>{n(51605)({target:"Number",stat:!0},{isInteger:n(83496)})},4632:(e,t,n)=>{n(51605)({target:"Object",stat:!0},{setPrototypeOf:n(39686)})},4657:(e,t,n)=>{"use strict";var r=n(51605),o=n(77804).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return o(this,e)}})},5086:(e,t,n)=>{var r=n(43129),o=n(7485),i=n(94972);r||o(Object.prototype,"toString",i,{unsafe:!0})},5225:(e,t,n)=>{var r=n(82072);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5476:(e,t,n)=>{var r=n(48664),o=n(71229);e.exports=function(e){return r(o(e))}},5549:e=>{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}},5784:function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function o(e,t,n,o){var i=e+" ";switch(n){case"s":return t||o?"pár sekúnd":"pár sekundami";case"ss":return t||o?i+(r(e)?"sekundy":"sekúnd"):i+"sekundami";case"m":return t?"minúta":o?"minútu":"minútou";case"mm":return t||o?i+(r(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":o?"hodinu":"hodinou";case"hh":return t||o?i+(r(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||o?"deň":"dňom";case"dd":return t||o?i+(r(e)?"dni":"dní"):i+"dňami";case"M":return t||o?"mesiac":"mesiacom";case"MM":return t||o?i+(r(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||o?"rok":"rokom";case"yy":return t||o?i+(r(e)?"roky":"rokov"):i+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(95093))},5959:(e,t,n)=>{"use strict";var r=n(43610).f,o=n(53105),i=n(92760),a=n(46885),s=n(65190),l=n(88406),u=n(52929),c=n(56409),h=n(48296),f=n(93524),d=n(65077),m=n(82014).fastKey,p=n(99206),y=p.set,v=p.getterFor;e.exports={getConstructor:function(e,t,n,c){var h=e((function(e,r){s(e,f),y(e,{type:t,index:o(null),first:void 0,last:void 0,size:0}),d||(e.size=0),l(r)||u(r,e[c],{that:e,AS_ENTRIES:n})})),f=h.prototype,p=v(t),g=function(e,t,n){var r,o,i=p(e),a=w(e,t);return a?a.value=n:(i.last=a={index:o=m(t,!0),key:t,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),d?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},w=function(e,t){var n,r=p(e),o=m(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==t)return n};return i(f,{clear:function(){for(var e=p(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,n=p(t),r=w(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),d?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=p(this),r=a(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!w(this,e)}}),i(f,n?{get:function(e){var t=w(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&r(f,"size",{get:function(){return p(this).size}}),h},setStrong:function(e,t,n){var r=t+" Iterator",o=v(t),i=v(r);c(e,t,(function(e,t){y(this,{type:r,target:e,state:o(e),kind:t,last:void 0})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?h("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,h(void 0,!0))}),n?"entries":"values",!n,!0),f(t)}}},6048:(e,t,n)=>{"use strict";var r=n(12071).PROPER,o=n(7485),i=n(73938),a=n(95362),s=n(92074),l=n(10353),u="toString",c=RegExp.prototype[u],h=s((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),f=r&&c.name!=u;(h||f)&&o(RegExp.prototype,u,(function(){var e=i(this);return"/"+a(e.source)+"/"+a(l(e))}),{unsafe:!0})},6539:(e,t,n)=>{var r=n(79328),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},6648:(e,t,n)=>{"use strict";var r=n(65077),o=n(18679),i=TypeError,a=Object.getOwnPropertyDescriptor,s=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(o(e)&&!a(e,"length").writable)throw i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},6845:(e,t,n)=>{var r,o,i=n(30200),a=n(47061),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},6926:e=>{e.exports=!1},7168:(e,t,n)=>{var r=n(92074);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},7306:function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(95093))},7473:(e,t,n)=>{var r=n(78420),o=String,i=TypeError;e.exports=function(e){if("object"==typeof e||r(e))return e;throw i("Can't set "+o(e)+" as a prototype")}},7485:(e,t,n)=>{var r=n(78420),o=n(43610),i=n(48218),a=n(59430);e.exports=function(e,t,n,s){s||(s={});var l=s.enumerable,u=void 0!==s.name?s.name:t;if(r(n)&&i(n,u,s),s.global)l?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},7809:(e,t,n)=>{var r=n(30281);e.exports=r(1..valueOf)},7899:(e,t,n)=>{var r=n(51605),o=n(92612),i=n(91641);r({target:"Object",stat:!0,forced:n(92074)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},7918:(e,t,n)=>{n(53656)},8235:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(95093))},8369:(e,t,n)=>{var r=n(30200),o=n(78420),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},9304:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},10121:(e,t,n)=>{n(13811)},10140:(e,t,n)=>{"use strict";var r=n(79328),o=n(95362),i=n(71229),a=RangeError;e.exports=function(e){var t=o(i(this)),n="",s=r(e);if(s<0||s==1/0)throw a("Wrong number of repetitions");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},10353:(e,t,n)=>{var r=n(72368),o=n(36490),i=n(47658),a=n(16844),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in s||o(e,"flags")||!i(s,e)?t:r(a,e)}},10516:(e,t,n)=>{"use strict";var r=n(91344).forEach,o=n(92349)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},10557:(e,t,n)=>{"use strict";var r=n(51605),o=n(30281),i=n(18679),a=o([].reverse),s=[1,2];r({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},10678:(e,t,n)=>{var r=n(51605),o=n(92074),i=n(5476),a=n(97632).f,s=n(65077),l=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},11025:function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(95093))},11470:function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){return e>9?n(e%10):e}e.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(n(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4}})}(n(95093))},11713:function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(95093))},11885:function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(95093))},12071:(e,t,n)=>{var r=n(65077),o=n(36490),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,"name"),l=s&&"something"===function(){}.name,u=s&&(!r||r&&a(i,"name").configurable);e.exports={EXISTS:s,PROPER:l,CONFIGURABLE:u}},12091:(e,t,n)=>{var r=n(51605),o=n(72368),i=n(65335),a=n(73938),s=n(66060),l=n(97632),u=n(97970);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,c,h=arguments.length<3?t:arguments[2];return a(t)===h?t[n]:(r=l.f(t,n))?s(r)?r.value:void 0===r.get?void 0:o(r.get,h):i(c=u(t))?e(c,n,h):void 0}})},12192:(e,t,n)=>{var r=n(92074),o=n(30200).RegExp,i=r((function(){var e=o("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),a=i||r((function(){return!o("a","y").sticky})),s=i||r((function(){var e=o("^r","gy");return e.lastIndex=2,null!=e.exec("str")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},12307:(e,t,n)=>{"use strict";n.d(t,{A:()=>pE});var r={};n.r(r),n.d(r,{arrayAvg:()=>j,arrayEach:()=>P,arrayFilter:()=>H,arrayFlatten:()=>F,arrayMap:()=>N,arrayMax:()=>Y,arrayMin:()=>I,arrayReduce:()=>A,arraySum:()=>x,arrayUnique:()=>W,extendArray:()=>L,pivot:()=>D,to2dArray:()=>R});var o={};n.r(o),n.d(o,{clone:()=>K,createObjectPropListener:()=>re,deepClone:()=>X,deepExtend:()=>q,deepObjectSize:()=>ne,defineGetter:()=>Z,duckSchema:()=>U,extend:()=>G,getProperty:()=>te,hasOwnProperty:()=>oe,inherit:()=>z,isObject:()=>Q,isObjectEqual:()=>$,mixin:()=>J,objectEach:()=>ee});var i={};n.r(i),n.d(i,{isChrome:()=>Re,isEdge:()=>Le,isIE:()=>De,isIE8:()=>Ae,isIE9:()=>He,isMSBrowser:()=>Ne,isMobileBrowser:()=>Pe,isSafari:()=>xe,setBrowserMeta:()=>Oe});var a={};n.r(a),n.d(a,{cancelAnimationFrame:()=>Ze,getComparisonFunction:()=>rt,hasCaptionProblem:()=>nt,isClassListSupported:()=>Je,isGetComputedStyleSupported:()=>Qe,isPassiveEventSupported:()=>ot,isTextContentSupported:()=>$e,isTouchSupported:()=>et,isWebComponentSupportedNatively:()=>tt,requestAnimationFrame:()=>Ke});var s={};n.r(s),n.d(s,{HTML_CHARACTERS:()=>St,addClass:()=>wt,addEvent:()=>Wt,clearTextSelection:()=>Gt,closest:()=>st,closestDown:()=>lt,empty:()=>Mt,fastInnerHTML:()=>Ct,fastInnerText:()=>Tt,getCaretPosition:()=>Vt,getComputedStyle:()=>xt,getCssTransform:()=>Qt,getParent:()=>at,getScrollLeft:()=>At,getScrollTop:()=>Dt,getScrollableElement:()=>Ht,getScrollbarWidth:()=>Xt,getSelectionEndPosition:()=>Ut,getSelectionText:()=>zt,getStyle:()=>Pt,getTrimmingContainer:()=>Nt,getWindowScrollLeft:()=>Lt,getWindowScrollTop:()=>Rt,hasClass:()=>gt,hasHorizontalScrollbar:()=>Jt,hasVerticalScrollbar:()=>Kt,index:()=>dt,innerHeight:()=>jt,innerWidth:()=>Ft,isChildOf:()=>ut,isChildOfWebComponentTable:()=>ct,isInput:()=>en,isOutsideInput:()=>tn,isVisible:()=>Et,offset:()=>Ot,outerHeight:()=>It,outerWidth:()=>Yt,overlayContainsElement:()=>mt,polymerUnwrap:()=>ft,polymerWrap:()=>ht,removeClass:()=>bt,removeEvent:()=>Bt,removeTextNodes:()=>_t,resetCssTransform:()=>Zt,selectElementIfAllowed:()=>nn,setCaretPosition:()=>qt,setOverlayPosition:()=>$t});var l={};n.r(l),n.d(l,{curry:()=>cn,curryRight:()=>hn,debounce:()=>sn,isFunction:()=>rn,partial:()=>un,pipe:()=>ln,throttle:()=>on,throttleAfterHits:()=>an});var u={};n.r(u),n.d(u,{_injectProductInfo:()=>_r,isDefined:()=>ar,isEmpty:()=>lr,isRegExp:()=>ur,isUndefined:()=>sr,stringify:()=>ir});var c={};n.r(c),n.d(c,{isImmediatePropagationStopped:()=>Fr,isLeftClick:()=>zr,isRightClick:()=>Ur,pageX:()=>Br,pageY:()=>Vr,stopImmediatePropagation:()=>jr,stopPropagation:()=>Wr});var h={};n.r(h),n.d(h,{equalsIgnoreCase:()=>Qr,isPercentValue:()=>eo,randomString:()=>Zr,stripTags:()=>ro,substitute:()=>to,toUpperCaseFirst:()=>$r});var f={};n.r(f),n.d(f,{KEY_CODES:()=>lo,isCtrlKey:()=>ho,isCtrlMetaKey:()=>fo,isKey:()=>mo,isMetaKey:()=>co,isPrintableChar:()=>uo});var d={};n.r(d),n.d(d,{isNumeric:()=>Oa,rangeEach:()=>Ra,rangeEachReverse:()=>La,valueAccordingPercent:()=>Da});var m={};n.r(m),n.d(m,{getNormalizedDate:()=>fl});var p={};n.r(p),n.d(p,{columnFactory:()=>Bl});var y={};n.r(y),n.d(y,{cellMethodLookupFactory:()=>Ql,createEmptySpreadsheetData:()=>Jl,createSpreadsheetData:()=>Xl,createSpreadsheetObjectData:()=>Kl,spreadsheetColumnIndex:()=>ql,spreadsheetColumnLabel:()=>Gl,translateRowsToColumns:()=>$l});var v={};n.r(v),n.d(v,{_dataToHTML:()=>mu,htmlToGridSettings:()=>yu,instanceToHTML:()=>du});var g={};n.r(g),n.d(g,{CONTEXTMENU_ITEMS_ADD_COMMENT:()=>uc,CONTEXTMENU_ITEMS_ALIGNMENT:()=>dc,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>bc,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>pc,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>vc,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>mc,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>wc,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>yc,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>gc,CONTEXTMENU_ITEMS_BORDERS:()=>_c,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>Sc,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>Cc,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>kc,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>Mc,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>nc,CONTEXTMENU_ITEMS_COPY:()=>rc,CONTEXTMENU_ITEMS_CUT:()=>oc,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>cc,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>ic,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>Rc,CONTEXTMENU_ITEMS_HIDE_ROW:()=>Dc,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>Ku,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>Ju,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>sc,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>Oc,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>Ec,CONTEXTMENU_ITEMS_NO_ITEMS:()=>Gu,CONTEXTMENU_ITEMS_READ_ONLY:()=>tc,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>fc,CONTEXTMENU_ITEMS_REDO:()=>ec,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>Tc,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>Qu,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>hc,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>$u,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>qu,CONTEXTMENU_ITEMS_ROW_BELOW:()=>Xu,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>Lc,CONTEXTMENU_ITEMS_SHOW_ROW:()=>Ac,CONTEXTMENU_ITEMS_UNDO:()=>Zu,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>ac,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>lc,CONTEXT_MENU_ITEMS_NAMESPACE:()=>zu,FILTERS_BUTTONS_CANCEL:()=>ch,FILTERS_BUTTONS_CLEAR:()=>lh,FILTERS_BUTTONS_OK:()=>uh,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>hh,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>dh,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>fh,FILTERS_BUTTONS_SELECT_ALL:()=>sh,FILTERS_CONDITIONS_AFTER:()=>$c,FILTERS_CONDITIONS_BEFORE:()=>Qc,FILTERS_CONDITIONS_BEGINS_WITH:()=>Fc,FILTERS_CONDITIONS_BETWEEN:()=>Kc,FILTERS_CONDITIONS_BY_VALUE:()=>Uc,FILTERS_CONDITIONS_CONTAINS:()=>Bc,FILTERS_CONDITIONS_EMPTY:()=>xc,FILTERS_CONDITIONS_ENDS_WITH:()=>Wc,FILTERS_CONDITIONS_EQUAL:()=>Ic,FILTERS_CONDITIONS_GREATER_THAN:()=>zc,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>Gc,FILTERS_CONDITIONS_LESS_THAN:()=>qc,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>Xc,FILTERS_CONDITIONS_NAMESPACE:()=>Nc,FILTERS_CONDITIONS_NONE:()=>Pc,FILTERS_CONDITIONS_NOT_BETWEEN:()=>Jc,FILTERS_CONDITIONS_NOT_CONTAIN:()=>Vc,FILTERS_CONDITIONS_NOT_EMPTY:()=>Yc,FILTERS_CONDITIONS_NOT_EQUAL:()=>jc,FILTERS_CONDITIONS_TODAY:()=>Zc,FILTERS_CONDITIONS_TOMORROW:()=>eh,FILTERS_CONDITIONS_YESTERDAY:()=>th,FILTERS_DIVS_FILTER_BY_CONDITION:()=>nh,FILTERS_DIVS_FILTER_BY_VALUE:()=>rh,FILTERS_LABELS_CONJUNCTION:()=>oh,FILTERS_LABELS_DISJUNCTION:()=>ih,FILTERS_NAMESPACE:()=>Hc,FILTERS_VALUES_BLANK_CELLS:()=>ah});var w={};n.r(w),n.d(w,{Loose:()=>Yw,Strict:()=>Fw});var b={};n.r(b),n.d(b,{OPERATION_NAME:()=>RS,operate:()=>DS,prepare:()=>LS});var _={};n.r(_),n.d(_,{OPERATION_NAME:()=>AS,operate:()=>HS});var M={};n.r(M),n.d(M,{OPERATION_NAME:()=>PS,operate:()=>xS});var k={};n.r(k),n.d(k,{OPERATION_NAME:()=>IS,operate:()=>jS});var S={};n.r(S),n.d(S,{OPERATION_NAME:()=>WS,operate:()=>BS});var C={};function T(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);ted,AutoFill:()=>ud,AutoRowSize:()=>vd,Base:()=>Rf,BindRowsWithHeaders:()=>Jw,CollapsibleColumns:()=>rb,ColumnSorting:()=>vm,ColumnSummary:()=>db,Comments:()=>Jm,ContextMenu:()=>Hp,CopyPaste:()=>Zp,CustomBorders:()=>py,DragToScroll:()=>ky,DropdownMenu:()=>kb,ExportFile:()=>zb,Filters:()=>Xk,Formulas:()=>pC,GanttChart:()=>PC,HeaderTooltips:()=>BC,HiddenColumns:()=>qT,HiddenRows:()=>eE,ManualColumnFreeze:()=>Ay,ManualColumnMove:()=>cv,ManualColumnResize:()=>gv,ManualRowMove:()=>Jv,ManualRowResize:()=>og,MergeCells:()=>Pg,MultiColumnSorting:()=>o_,MultipleSelectionHandles:()=>Bg,NestedHeaders:()=>nT,NestedRows:()=>jT,ObserveChanges:()=>tw,PersistentState:()=>jf,Search:()=>cw,TouchScroll:()=>vw,TrimRows:()=>hE,UndoRedo:()=>Nw}),n(67579),n(18665),n(5086),n(29979),n(10121),n(14602),n(63534),n(40590),n(64216),n(15195),n(7918),n(6048);var E=new Map;function O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";E.has(e)||E.set(e,new Map);var t=E.get(e);return{register:function(e,n){t.set(e,n)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return T(t.keys())},getValues:function(){return T(t.values())}}}function R(e){for(var t=e.length,n=0;nt?e:t}),Array.isArray(e)?e[0]:void 0)}function I(e){return A(e,(function(e,t){return e1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"value",r="_".concat(n),o=(B(t={_touched:!1},r,e),B(t,"isTouched",(function(){return this._touched})),t);return Object.defineProperty(o,n,{get:function(){return this[r]},set:function(e){this._touched=!0,this[r]=e},enumerable:!0,configurable:!0}),o}function oe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ie(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}},{key:"add",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))P(t,(function(t){return n.add(e,t,r)}));else{var o=this.getBucket(r);if(void 0===o[e]&&(this.register(e),o[e]=[]),t.skip=!1,-1===o[e].indexOf(t)){var i=!1;t.initialHook&&P(o[e],(function(n,r){if(n.initialHook)return o[e][r]=t,i=!0,!1})),i||o[e].push(t)}}return this}},{key:"once",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?P(t,(function(t){return n.once(e,t,r)})):(t.runOnce=!0,this.add(e,t,r))}},{key:"remove",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.getBucket(n);return void 0!==r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}},{key:"run",value:function(e,t,n,r,o,i,a,s){var l=this.globalBucket[t],u=l?l.length:0,c=0;if(u)for(;c0&&void 0!==arguments[0]?arguments[0]:null;ee(this.getBucket(e),(function(e,t,n){return n[t].length=0}))}},{key:"register",value:function(e){this.isRegistered(e)||se.push(e)}},{key:"deregister",value:function(e){this.isRegistered(e)&&se.splice(se.indexOf(e),1)}},{key:"isRegistered",value:function(e){return se.indexOf(e)>=0}},{key:"getRegistered",value:function(){return se}}]),e}(),ue=new le;const ce=le;function he(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.viewportSize,r=t.scrollOffset,o=t.totalItems,i=t.itemSizeFn,a=t.overrideFn,s=t.calculationType,l=t.stretchMode,u=t.stretchingItemWidthFn,c=void 0===u?function(e){return e}:u;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),de.set(this,{viewportWidth:n,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()}return fe(e,null,[{key:"DEFAULT_WIDTH",get:function(){return 50}}]),fe(e,[{key:"calculate",value:function(){for(var e,t=0,n=!0,r=[],o=de.get(this),i=o.calculationType,a=o.overrideFn,s=o.scrollOffset,l=o.totalColumns,u=o.viewportWidth,c=0;c=s&&t+(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(t),t+=e,2!==i&&(this.endColumn=c),t>=s+u){n=!1;break}if(this.endColumn===l-1&&n)for(this.startColumn=this.endColumn;this.startColumn>0;){var h=r[this.endColumn]+e-r[this.startColumn-1];if((h<=u||2!==i)&&(this.startColumn-=1),h>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=t/o,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){var u=this._getColumnWidth(r-1),c=l+u;this.stretchLastWidth=c>=0?c:u}}}},{key:"getStretchedColumnWidth",value:function(e,t){var n=null;return"all"===this.stretch&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}},{key:"_getStretchedAllColumnWidth",value:function(e,t){var n=0,r=de.get(this),o=r.totalColumns;if(!this.stretchAllColumnsWidth[e]){var i=Math.round(t*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&&void 0!==arguments[0]?arguments[0]:{},n=t.viewportSize,r=t.scrollOffset,o=t.totalItems,i=t.itemSizeFn,a=t.overrideFn,s=t.calculationType,l=t.scrollbarHeight;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ge.set(this,{viewportHeight:n,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()}return ve(e,null,[{key:"DEFAULT_HEIGHT",get:function(){return 23}}]),ve(e,[{key:"calculate",value:function(){for(var t,n=0,r=!0,o=[],i=ge.get(this),a=i.calculationType,s=i.overrideFn,l=i.rowHeightFn,u=i.scrollOffset,c=i.totalRows,h=i.viewportHeight,f=i.horizontalScrollbarHeight||0,d=0;d=u&&n+(2===a?t:0)<=u+h-f&&(null===this.startRow&&(this.startRow=d),this.endRow=d),o.push(n),n+=t,2!==a&&(this.endRow=d),n>=u+h-f){r=!1;break}if(this.endRow===c-1&&r)for(this.startRow=this.endRow;this.startRow>0;){var m=o[this.endRow]+t-o[this.startRow-1];if((m<=h-f||2!==a)&&(this.startRow-=1),m>=h-f)break}1===a&&null!==this.startRow&&s&&s(this),this.startPosition=o[this.startRow],void 0===this.startPosition&&(this.startPosition=null),c=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:"toObject",value:function(){return{row:this.row,col:this.col}}}],n&&be(t.prototype,n),e}();const Me=_e;function ke(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.highlight=t,this.from=n,this.to=r}var t,n;return t=e,n=[{key:"setHighlight",value:function(e){return this.highlight=e,this}},{key:"setFrom",value:function(e){return this.from=e,this}},{key:"setTo",value:function(e){return this.to=e,this}},{key:"isValid",value:function(e){return this.from.isValid(e)&&this.to.isValid(e)}},{key:"isSingle",value:function(){return this.from.row===this.to.row&&this.from.col===this.to.col}},{key:"getHeight",value:function(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}},{key:"getWidth",value:function(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}},{key:"includes",value:function(e){var t=e.row,n=e.col,r=this.getTopLeftCorner(),o=this.getBottomRightCorner();return r.row<=t&&o.row>=t&&r.col<=n&&o.col>=n}},{key:"includesRange",value:function(e){return this.includes(e.getTopLeftCorner())&&this.includes(e.getBottomRightCorner())}},{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.getTopLeftCorner())&&e.isNorthWestOf(this.getBottomRightCorner())}},{key:"isSouthEastOf",value:function(e){return this.getTopLeftCorner().isSouthEastOf(e)||this.getBottomRightCorner().isSouthEastOf(e)}},{key:"isNorthWestOf",value:function(e){return this.getTopLeftCorner().isNorthWestOf(e)||this.getBottomRightCorner().isNorthWestOf(e)}},{key:"isOverlappingHorizontally",value:function(e){return this.getTopRightCorner().col>=e.getTopLeftCorner().col&&this.getTopRightCorner().col<=e.getTopRightCorner().col||this.getTopLeftCorner().col<=e.getTopRightCorner().col&&this.getTopLeftCorner().col>=e.getTopLeftCorner().col}},{key:"isOverlappingVertically",value:function(e){return this.getBottomRightCorner().row>=e.getTopRightCorner().row&&this.getBottomRightCorner().row<=e.getBottomRightCorner().row||this.getTopRightCorner().row<=e.getBottomRightCorner().row&&this.getTopRightCorner().row>=e.getTopRightCorner().row}},{key:"expand",value:function(e){var t=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(e.rown.row||e.col>n.col)&&(this.from=new Me(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=new Me(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}},{key:"expandByRange",value:function(e){if(this.includesRange(e)||!this.overlaps(e))return!1;var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=this.getDirection(),o=e.getTopLeftCorner(),i=e.getBottomRightCorner(),a=Math.min(t.row,o.row),s=Math.min(t.col,o.col),l=Math.max(n.row,i.row),u=Math.max(n.col,i.col),c=new Me(a,s),h=new Me(l,u);return this.from=c,this.to=h,this.setDirection(r),this.highlight.row===this.getBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getTopRightCorner().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 t=[this.getTopLeftCorner(),this.getBottomRightCorner()];this.from=t[0],this.to=t[1];break;case"NE-SW":var n=[this.getTopRightCorner(),this.getBottomLeftCorner()];this.from=n[0],this.to=n[1];break;case"SE-NW":var r=[this.getBottomRightCorner(),this.getTopLeftCorner()];this.from=r[0],this.to=r[1];break;case"SW-NE":var o=[this.getBottomLeftCorner(),this.getTopRightCorner()];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 Me(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"getBottomRightCorner",value:function(){return new Me(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getTopRightCorner",value:function(){return new Me(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}},{key:"getBottomLeftCorner",value:function(){return new Me(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}},{key:"isCorner",value:function(e,t){return!!(t&&t.includes(e)&&(this.getTopLeftCorner().isEqual(new Me(t.from.row,t.from.col))||this.getTopRightCorner().isEqual(new Me(t.from.row,t.to.col))||this.getBottomLeftCorner().isEqual(new Me(t.to.row,t.from.col))||this.getBottomRightCorner().isEqual(new Me(t.to.row,t.to.col))))||e.isEqual(this.getTopLeftCorner())||e.isEqual(this.getTopRightCorner())||e.isEqual(this.getBottomLeftCorner())||e.isEqual(this.getBottomRightCorner())}},{key:"getOppositeCorner",value:function(e,t){if(!(e instanceof Me))return!1;if(t&&t.includes(e)){if(this.getTopLeftCorner().isEqual(new Me(t.from.row,t.from.col)))return this.getBottomRightCorner();if(this.getTopRightCorner().isEqual(new Me(t.from.row,t.to.col)))return this.getBottomLeftCorner();if(this.getBottomLeftCorner().isEqual(new Me(t.to.row,t.from.col)))return this.getTopRightCorner();if(this.getBottomRightCorner().isEqual(new Me(t.to.row,t.to.col)))return this.getTopLeftCorner()}return e.isEqual(this.getBottomRightCorner())?this.getTopLeftCorner():e.isEqual(this.getTopLeftCorner())?this.getBottomRightCorner():e.isEqual(this.getTopRightCorner())?this.getBottomLeftCorner():e.isEqual(this.getBottomLeftCorner())?this.getTopRightCorner():void 0}},{key:"getBordersSharedWith",value:function(e){if(!this.includesRange(e))return[];var t=Math.min(this.from.row,this.to.row),n=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 t===i&&u.push("top"),o===l&&u.push("right"),n===a&&u.push("bottom"),r===s&&u.push("left"),u}},{key:"getInner",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],r=e.row;r<=t.row;r++)for(var o=e.col;o<=t.col;o++)this.from.row===r&&this.from.col===o||this.to.row===r&&this.to.col===o||n.push(new Me(r,o));return n}},{key:"getAll",value:function(){for(var e=this.getTopLeftCorner(),t=this.getBottomRightCorner(),n=[],r=e.row;r<=t.row;r++)for(var o=e.col;o<=t.col;o++)e.row===r&&e.col===o?n.push(e):t.row===r&&t.col===o?n.push(t):n.push(new Me(r,o));return n}},{key:"forAll",value:function(e){for(var t=this.getTopLeftCorner(),n=this.getBottomRightCorner(),r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++)if(!1===e(r,o))return}},{key:"toObject",value:function(){return{from:this.from.toObject(),to:this.to.toObject()}}}],n&&ke(t.prototype,n),e}();const Ce=Se;n(80475),n(14913),n(79073),n(40173);var Te=function(e){var t={value:!1,test:function(n,r){t.value=e(n,r)}};return t},Ee={chrome:Te((function(e,t){return/Chrome/.test(e)&&/Google/.test(t)})),edge:Te((function(e){return/Edge/.test(e)})),ie:Te((function(e){return/Trident/.test(e)})),ie8:Te((function(){return!document.createTextNode("test").textContent})),ie9:Te((function(){return!!document.documentMode})),mobile:Te((function(e){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)})),safari:Te((function(e,t){return/Safari/.test(e)&&/Apple Computer/.test(t)}))};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.userAgent,n=void 0===t?navigator.userAgent:t,r=e.vendor,o=void 0===r?navigator.vendor:r;ee(Ee,(function(e){(0,e.test)(n,o)}))}function Re(){return Ee.chrome.value}function Le(){return Ee.edge.value}function De(){return Ee.ie.value}function Ae(){return Ee.ie8.value}function He(){return Ee.ie9.value}function Ne(){return Ee.ie.value||Ee.edge.value}function Pe(){return Ee.mobile.value}function xe(){return Ee.safari.value}function Ye(e){return Ye="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},Ye(e)}Oe(),n(78636),n(18772);for(var Ie,je,Fe,We,Be,Ve,Ue=0,ze=["ms","moz","webkit","o"],Ge=window.requestAnimationFrame,qe=window.cancelAnimationFrame,Xe=0;Xet
t";var n=document.createElement("CAPTION");n.innerHTML="c
c
c
c",n.style.padding="0",n.style.margin="0",e.insertBefore(n,t),document.body.appendChild(e),Ie=e.offsetHeight<2*e.lastChild.offsetHeight,document.body.removeChild(e)}(),Ie}function rt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return je||(je="object"===("undefined"==typeof Intl?"undefined":Ye(Intl))?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?function(e,t){return"".concat(e).localeCompare(t)}:function(e,t){return e===t?0:e>t?-1:1})}function ot(){if(void 0!==Fe)return Fe;try{var e={get passive(){Fe=!0}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){Fe=!1}return Fe}function it(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r}function st(e,t,n){for(var r=e;null!==r&&r!==n;){if(r.nodeType===Node.ELEMENT_NODE&&(t.indexOf(r.nodeName)>-1||t.indexOf(r)>-1))return r;r=r.host&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r.parentNode}return null}function lt(e,t,n){for(var r=[],o=e;o&&(o=st(o,t,n))&&(!n||n.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 ut(e,t){var n=e.parentNode,r=[];for("string"==typeof t?r=Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function ct(e){var t=!1,n=ht(e);function r(e){return e.nodeType===Node.ELEMENT_NODE&&e.nodeName==="hot-table".toUpperCase()}for(;null!==n;){if(r(n)){t=!0;break}if(n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(t=r(n.host))break;n=n.host}n=n.parentNode}return t}function ht(e){return"undefined"!=typeof Polymer&&"function"==typeof wrap?wrap(e):e}function ft(e){return"undefined"!=typeof Polymer&&"function"==typeof unwrap?unwrap(e):e}function dt(e){var t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t}function mt(e,t,n){var r=n.parentElement.querySelector(".ht_clone_".concat(e));return r?r.contains(t):null}function pt(e){var t=[];if(!e||!e.length)return t;for(var n=0;e[n];)t.push(e[n]),n+=1;return t}if(Ge||(Ge=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-Ue)),r=window.setTimeout((function(){e(t+n)}),n);return Ue=t+n,r}),qe||(qe=function(e){clearTimeout(e)}),Je()){var yt=function(e){var t=e.createElement("div");return t.classList.add("test","test2"),t.classList.contains("test2")};We=function(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)},Be=function(e,t){var n,r=e.ownerDocument,o=t;if("string"==typeof o&&(o=o.split(" ")),(o=pt(o)).length>0)if(yt(r))(n=e.classList).add.apply(n,it(o));else for(var i=0;o&&o[i];)e.classList.add(o[i]),i+=1},Ve=function(e,t){var n,r=t;if("string"==typeof r&&(r=r.split(" ")),(r=pt(r)).length>0)if(yt)(n=e.classList).remove.apply(n,it(r));else for(var o=0;r&&r[o];)e.classList.remove(r[o]),o+=1}}else{var vt=function(e){return new RegExp("(\\s|^)".concat(e,"(\\s|$)"))};We=function(e,t){return void 0!==e.className&&vt(t).test(e.className)},Be=function(e,t){var n=0,r=e.className,o=t;if("string"==typeof o&&(o=o.split(" ")),""===r)r=o.join(" ");else for(;o&&o[n];)vt(o[n]).test(r)||(r+=" ".concat(o[n])),n+=1;e.className=r},Ve=function(e,t){var n=0,r=e.className,o=t;for("string"==typeof o&&(o=o.split(" "));o&&o[n];)r=r.replace(vt(o[n])," ").trim(),n+=1;e.className!==r&&(e.className=r)}}function gt(e,t){return We(e,t)}function wt(e,t){return Be(e,t)}function bt(e,t){return Ve(e,t)}function _t(e,t){if(3===e.nodeType)t.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1)for(var n=e.childNodes,r=n.length-1;r>=0;r--)_t(n[r],e)}function Mt(e){for(var t;t=e.lastChild;)e.removeChild(t)}var kt,St=/(<(.*)>|&(.*);)/;function Ct(e,t){St.test(t)?e.innerHTML=t:Tt(e,t)}function Tt(e,t){var n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?$e?n.textContent=t:n.data=t:(Mt(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function Et(e){for(var t=e.ownerDocument.documentElement,n=e;ft(n)!==t;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return Et(n.host.impl);if(n.host)return Et(n.host);throw new Error("Lost in Web Components world")}return!1}if(n.style&&"none"===n.style.display)return!1;n=n.parentNode}return!0}function Ot(e){var t,n,r,o,i=e.ownerDocument,a=i.defaultView,s=i.documentElement,l=e;if(nt()&&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(t=l.offsetLeft,n=l.offsetTop,r=l;(l=l.offsetParent)&&l!==i.body;)t+=l.offsetLeft,n+=l.offsetTop,r=l;return r&&"fixed"===r.style.position&&(t+=a.pageXOffset||s.scrollLeft,n+=a.pageYOffset||s.scrollTop),{left:t,top:n}}function Rt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollY;return void 0===t&&(t=e.document.documentElement.scrollTop),t}function Lt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.scrollX;return void 0===t&&(t=e.document.documentElement.scrollLeft),t}function Dt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?Rt(t):e.scrollTop}function At(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?Lt(t):e.scrollLeft}function Ht(e){var t=e.ownerDocument,n=t?t.defaultView:void 0;t||(n=(t=e.document?e.document:e).defaultView);for(var r=["auto","scroll"],o=Qe(),i=e.parentNode;i&&i.style&&t.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=n.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 n}function Nt(e){for(var t=e.ownerDocument,n=t.defaultView,r=e.parentNode;r&&r.style&&t.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;var o=xt(r,n),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 n}function Pt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(e){if(e===n)return"width"===t?"".concat(n.innerWidth,"px"):"height"===t?"".concat(n.innerHeight,"px"):void 0;var r=e.style[t];if(""!==r&&void 0!==r)return r;var o=xt(e,n);return""!==o[t]&&void 0!==o[t]?o[t]:void 0}}function xt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function Yt(e){return e.offsetWidth}function It(e){return nt()&&e.firstChild&&"CAPTION"===e.firstChild.nodeName?e.offsetHeight+e.firstChild.offsetHeight:e.offsetHeight}function jt(e){return e.clientHeight||e.innerHeight}function Ft(e){return e.clientWidth||e.innerWidth}function Wt(e,t,n){var r=e.defaultView;r||(r=e.document?e:e.ownerDocument.defaultView),r.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on".concat(t),n)}function Bt(e,t,n){var r=e.defaultView;r||(r=e.document?e:e.ownerDocument.defaultView),r.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on".concat(t),n)}function Vt(e){var t=e.ownerDocument;if(e.selectionStart)return e.selectionStart;if(t.selection){e.focus();var n=t.selection.createRange();if(null===n)return 0;var r=e.createTextRange(),o=r.duplicate();return r.moveToBookmark(n.getBookmark()),o.setEndPoint("EndToStart",r),o.text.length}return 0}function Ut(e){var t=e.ownerDocument;if(e.selectionEnd)return e.selectionEnd;if(t.selection){var n=t.selection.createRange();return null===n?0:e.createTextRange().text.indexOf(n.text)+n.text.length}return 0}function zt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document,n="";return e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text),n}function Gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=e.document;e.getSelection?e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges():t.selection&&t.selection.empty()}function qt(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(i){var r=e.parentNode,o=r.style.display;r.style.display="block",e.setSelectionRange(t,n),r.style.display=o}}else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i.select()}}function Xt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===kt&&(kt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=e.createElement("div");t.style.height="200px",t.style.width="100%";var n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);var r=t.offsetWidth;n.style.overflow="scroll";var o=t.offsetWidth;return r===o&&(o=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-o}(e)),kt}function Kt(e){return e.offsetWidth!==e.clientWidth}function Jt(e){return e.offsetHeight!==e.clientHeight}function $t(e,t,n){Ae()||He()?(e.style.top=n,e.style.left=t):xe()?(e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)"),e.style["-webkit-transform"]="translate3d(".concat(t,",").concat(n,",0)")):e.style.transform="translate3d(".concat(t,",").concat(n,",0)")}function Qt(e){var t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:e.style["-webkit-transform"]&&""!==(t=e.style["-webkit-transform"])?["-webkit-transform",t]:-1}function Zt(e){e.style.transform&&""!==e.style.transform?e.style.transform="":e.style["-webkit-transform"]&&""!==e.style["-webkit-transform"]&&(e.style["-webkit-transform"]="")}function en(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function tn(e){return en(e)&&-1===e.className.indexOf("handsontableInput")&&-1===e.className.indexOf("copyPaste")}function nn(e){tn(e.ownerDocument.activeElement)||e.select()}function rn(e){return"function"==typeof e}function on(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0,r={lastCallThrottled:!0},o=null;return function(){for(var i=this,a=arguments.length,s=new Array(a),l=0;l2&&void 0!==arguments[2]?arguments[2]:10,n=on(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:200),r=t;function o(){for(var t=arguments.length,o=new Array(t),i=0;i1&&void 0!==arguments[1]?arguments[1]:200,r=null;return function(){for(var o=this,i=arguments.length,a=new Array(i),s=0;s1?t-1:0),r=1;r=t?e.apply(this,s):n(s)}}([])}function hn(e){var t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),a=0;a=t?e.apply(this,s):n(s)}}([])}function fn(e,t){for(var n=0;n0?this.collectedNodes[e-1]:null}},{key:"getRenderedChildCount",value:function(){var e=this.rootNode,t=this.sizeSet,n=0;if(this.isSharedViewSet())for(var r=e.firstElementChild;r;){if(r.tagName===this.childNodeType)n+=1;else if(t.isPlaceOn(1))break;r=r.nextElementSibling}else n=e.childElementCount;return n}},{key:"start",value:function(){this.collectedNodes.length=0,this.visualIndex=0;for(var e=this.rootNode,t=this.sizeSet,n=this.isSharedViewSet(),r=t.getViewSize().nextSize,o=this.getRenderedChildCount();or;)e.removeChild(a?e.firstChild:e.lastChild),o-=1}},{key:"render",value:function(){var e=this.rootNode,t=this.sizeSet,n=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(2)&&(n+=t.sharedSize.nextSize);var r=e.childNodes[n];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(){}}],n&&Mn(t.prototype,n),e}();function Sn(e){return Sn="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},Sn(e)}function Cn(e,t){for(var n=0;no;)r.removeChild(r.lastChild),this.renderedNodes-=1}var s=this.rootNode.childNodes.length;if(s>t)for(var l=t;lt;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}},{key:"render",value:function(){this.adjust();for(var e=this.table,t=e.columnsToRender,n=e.rowHeadersCount,r=0;r1?t-1:0),r=1;rRead 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.']);return $n=function(){return e},e}function Qn(){var e=rr(["\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.']);return Qn=function(){return e},e}function Zn(){var e=rr(['\n The license key for Handsontable is invalid. \n Read 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.']);return Zn=function(){return e},e}function er(){var e=rr(["\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'. If you need any help, contact \n 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'. If you need any help, contact\\x20\n us at support@handsontable.com."]);return er=function(){return e},e}function tr(){var e=rr(["\n The license key for Handsontable expired on ",", and is not valid for the installed \n version ",". Renew your license key at handsontable.com or downgrade to a version released prior \n to ",". If you need any 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 license key at handsontable.com or downgrade to a version released prior\\x20\n to ",". If you need any help, contact us at sales@handsontable.com."]);return tr=function(){return e},e}function nr(){var e=rr(["\n The license key for Handsontable is invalid. \n If you need any help, contact us at support@handsontable.com."],["\n The license key for Handsontable is invalid.\\x20\n If you need any help, contact us at support@handsontable.com."]);return nr=function(){return e},e}function rr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function or(e){return or="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},or(e)}function ir(e){var t;switch(or(e)){case"string":case"number":t="".concat(e);break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t}function ar(e){return void 0!==e}function sr(e){return void 0===e}function lr(e){return null===e||""===e||sr(e)}function ur(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var cr="length",hr=function(e){return parseInt(e,16)},fr=function(e){return parseInt(e,10)},dr=function(e,t,n){return e.substr(t,n)},mr=function(e){return e.codePointAt(0)-65},pr=function(e){return"".concat(e).replace(/\-/g,"")},yr=function(e){return hr(dr(pr(e),hr("12"),mr("F")))/(hr(dr(pr(e),mr("B"),~~![][cr]))||9)},vr=function(){return"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)},gr=!1,wr={invalid:function(){return Jn(nr())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return Jn(tr(),t,n,t)},missing:function(){return Jn(er())},non_commercial:function(){return""}},br={invalid:function(){return Jn(Zn())},expired:function(e){var t=e.keyValidityDate,n=e.hotVersion;return Jn(Qn(),t,n,t)},missing:function(){return Jn($n())},non_commercial:function(){return""}};function _r(e,t){var n,r=!lr(e),o="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="7.2.2",a="invalid",s="invalid",l=function(e){var t=[][cr],n=t;if(e[cr]!==mr("Z"))return!1;for(var r="",o="B>1:r=dr(e,i,i?1===o[cr]?9:8:6);return n===t}(e=pr(e||""));if(r||o||l)if(l){var u=Kn()("23/10/2019","DD/MM/YYYY"),c=Math.floor(u.toDate().getTime()/864e5),h=yr(e);if(n=Kn()(864e5*(h+1),"x").format("MMMM DD, YYYY"),c>h){var f=Kn()().diff(u,"days");a=f<=1?"valid":"expired",s=f<=15?"valid":"expired"}else a="valid",s="valid"}else o?(a="non_commercial",s="valid"):(a="invalid",s="invalid");else a="missing",s="missing";if(vr()&&(a="valid",s="valid"),gr||"valid"===a||(wr[a]({keyValidityDate:n,hotVersion:i})&&console["non_commercial"===a?"info":"warn"](wr[a]({keyValidityDate:n,hotVersion:i})),gr=!0),"valid"!==s&&t.parentNode&&br[s]({keyValidityDate:n,hotVersion:i})){var d=document.createElement("div");d.id="hot-display-license-info",d.innerHTML=br[s]({keyValidityDate:n,hotVersion:i}),t.parentNode.insertBefore(d,t.nextSibling)}}function Mr(){var e;ar(console)&&(e=console).warn.apply(e,arguments)}function kr(e){return kr="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},kr(e)}function Sr(){var e,t,n=(e=['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number \n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.'],(t=['Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting the number\\x20\n of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.'])||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return Sr=function(){return n},n}function Cr(e,t){for(var n=0;n1e3&&(Or=!0,Mr(Jn(Sr()))),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{}).cellRenderer;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.rootNode=t,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=n}var t,n;return t=e,n=[{key:"setAxisUtils",value:function(e,t){this.rowUtils=e,this.columnUtils=t}},{key:"setViewportSize",value:function(e,t){this.rowsToRender=e,this.columnsToRender=t}},{key:"setFilters",value:function(e,t){this.rowFilter=e,this.columnFilter=t}},{key:"setHeaderContentRenderers",value:function(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}},{key:"setRenderers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rowHeaders,n=e.columnHeaders,r=e.colGroup,o=e.rows,i=e.cells;t.setTable(this),n.setTable(this),r.setTable(this),o.setTable(this),i.setTable(this),this.rowHeaders=t,this.columnHeaders=n,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,t=this.rows,n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.TABLE,r=t.THEAD,o=t.COLGROUP,i=t.TBODY,a=t.rowUtils,s=t.columnUtils,l=t.cellRenderer;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderer=new xr(n,{cellRenderer:l}),this.renderer.setRenderers({rowHeaders:new Yn,columnHeaders:new Bn(r),colGroup:new qn(o),rows:new Rr(i),cells:new Nr}),this.renderer.setAxisUtils(a,s)}var t,n;return t=e,(n=[{key:"setFilters",value:function(e,t){return this.renderer.setFilters(e,t),this}},{key:"setViewportSize",value:function(e,t){return this.renderer.setViewportSize(e,t),this}},{key:"setHeaderContentRenderers",value:function(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}},{key:"adjust",value:function(){this.renderer.adjust()}},{key:"render",value:function(){this.renderer.render()}}])&&Yr(t.prototype,n),e}();function jr(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function Fr(e){return!1===e.isImmediatePropagationEnabled}function Wr(e){"function"==typeof e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Br(e){if(e.pageX)return e.pageX;var t=e.target.ownerDocument.defaultView;return e.clientX+Lt(t)}function Vr(e){if(e.pageY)return e.pageY;var t=e.target.ownerDocument.defaultView;return e.clientY+Rt(t)}function Ur(e){return 2===e.button}function zr(e){return 0===e.button}function Gr(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}var t,n;return t=e,n=[{key:"addEventListener",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context;function a(e){n.call(this,Kr(i,e))}return"boolean"==typeof o||ot()||(o=!1),this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:a,options:o,eventManager:this}),e.addEventListener(t,a,o),qr+=1,function(){r.removeEventListener(e,t,n)}}},{key:"removeEventListener",value:function(e,t,n){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===t&&r.element===e){if(n&&n!==r.callback)continue;if(o&&r.eventManager!==this)continue;this.context.eventListeners.splice(i,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),qr-=1}}},{key:"clearEvents",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.context)for(var t=this.context.eventListeners.length;t;){t-=1;var n=this.context.eventListeners[t];n&&this.removeEventListener(n.element,n.event,n.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,t){var n=e.document,r=e;n||(r=(n=e.ownerDocument?e.ownerDocument:e).defaultView);var o,i={bubbles:!0,cancelable:"mousemove"!==t,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};n.createEvent?(o=n.createEvent("MouseEvents")).initMouseEvent(t,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||n.body.parentNode):o=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(o):e.fireEvent("on".concat(t),o)}}],n&&Gr(t.prototype,n),e}();function Kr(e,t){var n,r,o,i,a,s="HOT-TABLE";t.isTargetWebComponent=!1,t.realTarget=t.target;var l=t.stopImmediatePropagation;if(t.stopImmediatePropagation=function(){l.apply(this),jr(this)},!Xr.isHotTableEnv)return t;for(a=(t=ht(t)).path?t.path.length:0;a;){if(a-=1,t.path[a].nodeName===s)n=!0;else if(n&&t.path[a].shadowRoot){i=t.path[a];break}0!==a||i||(i=t.path[a])}return i||(i=t.target),t.isTargetWebComponent=!0,tt()?t.realTarget=t.srcElement||t.toElement:(oe(e,"hot")||e.isHotTableEnv||e.wtTable)&&(oe(e,"hot")?r=e.hot?e.hot.view.wt.wtTable.TABLE:null:e.isHotTableEnv?r=e.view.activeWt.wtTable.TABLE.parentNode.parentNode:e.wtTable&&(r=e.wtTable.TABLE.parentNode.parentNode),o=st(t.target,[s],r),t.realTarget=o&&r.querySelector(s)||t.target),Object.defineProperty(t,"target",{get:function(){return ht(i)},enumerable:!0,configurable:!0}),t}const Jr=Xr;function $r(e){return e[0].toUpperCase()+e.substr(1)}function Qr(){for(var e=[],t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return"".concat(e).replace(/(?:\\)?\[([^[\]]+)]/g,(function(e,n){return"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n]}))}var no=/<\/?\w+\/?>|<\w+[\s|/][^>]*>/gi;function ro(e){return"".concat(e).replace(no,"")}function oo(e,t){for(var n=0;n=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function co(e){return-1!==[lo.ARROW_DOWN,lo.ARROW_UP,lo.ARROW_LEFT,lo.ARROW_RIGHT,lo.HOME,lo.END,lo.DELETE,lo.BACKSPACE,lo.F1,lo.F2,lo.F3,lo.F4,lo.F5,lo.F6,lo.F7,lo.F8,lo.F9,lo.F10,lo.F11,lo.F12,lo.TAB,lo.PAGE_DOWN,lo.PAGE_UP,lo.ENTER,lo.ESCAPE,lo.SHIFT,lo.CAPS_LOCK,lo.ALT].indexOf(e)}function ho(e){var t=[];return navigator.platform.includes("Mac")?t.push(lo.COMMAND_LEFT,lo.COMMAND_RIGHT,lo.COMMAND_FIREFOX):t.push(lo.CONTROL),t.includes(e)}function fo(e){return[lo.CONTROL,lo.COMMAND_LEFT,lo.COMMAND_RIGHT,lo.COMMAND_FIREFOX].includes(e)}function mo(e,t){var n=t.split("|"),r=!1;return P(n,(function(t){if(e===lo[t])return r=!0,!1})),r}function po(e,t){for(var n=0;n1,l=this.scrollableElement===r,u=this.wot.wtSettings.getSetting("preventWheel"),c={passive:l};(u||s||!Re())&&this.eventManager.addEventListener(this.wot.wtTable.wtRootElement,"wheel",(function(t){return e.onCloneWheel(t,u)}),c),[this.topOverlay,this.bottomOverlay,this.leftOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay].forEach((function(t){if(t&&t.needFullRender){var n=t.clone.wtTable.holder;e.eventManager.addEventListener(n,"wheel",(function(t){return e.onCloneWheel(t,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 t=this.wot.rootWindow,n=this.leftOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,o=e.target;this.keyPressed&&(r!==t&&o!==t&&!e.target.contains(r)||n!==t&&o!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}},{key:"onCloneWheel",value:function(e,t){var n=this.wot.rootWindow,r=this.leftOverlay.mainTableScrollableElement,o=this.topOverlay.mainTableScrollableElement,i=e.target,a=o!==n&&i!==n&&!i.contains(o),s=r!==n&&i!==n&&!i.contains(r);if(!this.keyPressed||!a&&!s){var l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}}},{key:"onKeyDown",value:function(e){this.keyPressed=mo(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}},{key:"onKeyUp",value:function(){this.keyPressed=!1}},{key:"translateMouseWheelToScroll",value:function(e){var t=this.browserLineHeight,n=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,r=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(r+=r*t,n+=n*t);var o=this.scrollVertically(n),i=this.scrollHorizontally(r);return o||i}},{key:"scrollVertically",value:function(e){var t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}},{key:"scrollHorizontally",value:function(e){var t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}},{key:"syncScrollPositions",value:function(){if(!this.destroyed){var e=this.wot.rootWindow,t=this.topOverlay.clone.wtTable.holder,n=this.leftOverlay.clone.wtTable.holder,r=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop],o=r[0],i=r[1];if(this.horizontalScrolling=t.scrollLeft!==o||this.lastScrollX!==e.scrollX,this.verticalScrolling=n.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=o;var a=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;a&&(a.scrollLeft=o)}this.verticalScrolling&&(n.scrollTop=i),this.refreshAll()}}},{key:"syncScrollWithMaster",value:function(){var e=this.topOverlay.mainTableScrollableElement,t=e.scrollLeft,n=e.scrollTop;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.leftOverlay.needFullRender&&(this.leftOverlay.clone.wtTable.holder.scrollTop=n)}},{key:"updateMainScrollableElements",value:function(){this.deregisterListeners(),this.leftOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();var e=this.wot,t=e.rootWindow,n=e.wtTable;"hidden"===t.getComputedStyle(n.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=n.holder:this.scrollableElement=Ht(n.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.debug&&this.debug.destroy(),this.destroyed=!0}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.topOverlay.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted){var t=this.wot.wtTable.wtRootElement.parentNode||this.wot.wtTable.wtRootElement,n=t.clientWidth,r=t.clientHeight;n===this.spreaderLastSize.width&&r===this.spreaderLastSize.height||(this.spreaderLastSize.width=n,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),this.debug&&this.debug.refresh(e)}},{key:"adjustElementsSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtViewport,r=t.wtTable,o=this.wot.getSetting("totalColumns"),i=this.wot.getSetting("totalRows"),a=n.getRowHeaderWidth(),s=n.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,h=u.scrollWidth,f=r.holder,d=f.scrollHeight,m=f.scrollWidth;this.hasScrollbarRight=ch?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.areElementSizesAdjusted&&this.leftOverlay.areElementSizesAdjusted||this.adjustElementsSize(),this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.leftOverlay.applyToDOM())}},{key:"getParentOverlay",value:function(e){if(!e)return null;var t=[this.topOverlay,this.leftOverlay,this.bottomOverlay,this.topLeftCornerOverlay,this.bottomLeftCornerOverlay],n=null;return P(t,(function(t){t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)})),n}}],n&&po(t.prototype,n),e}();const vo=yo;function go(e,t){for(var n=0;n=0&&e<=Math.max(a-1,0)){var l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();e>=o&&l>-1&&(e-1&&(e>u||t))&&(s=i.scrollTo(e,!0))}return s}},{key:"scrollViewportVertically",value:function(e,t,n){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;d--)if(f+=t.sumCellSizes(d-1,d),l.top+u-f<=h){s=d;break}}}return s}},{key:"getLastVisibleRow",value:function(){var e=this._getVariables(),t=e.topOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalRows,i=this.wot.rootWindow,a=n.getLastVisibleRow();if(t.mainTableScrollableElement===i){var s=Ot(n.wtRootElement),l=Dt(i,i);if(s.top>l)for(var u=jt(i),c=r.getColumnHeaderHeight(),h=1;h<=o;h++)if(c+=t.sumCellSizes(h-1,h),s.top+c-l>=u){a=h-2;break}}return a}},{key:"getFirstVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,a=n.getFirstVisibleColumn();if(t.mainTableScrollableElement===i){var s=Ot(n.wtRootElement),l=Ft(n.hider),u=Ft(i),c=At(i,i);if(s.left+l-u<=c)for(var h=r.getRowHeaderWidth(),f=o;f>0;f--)if(h+=t.sumCellSizes(f-1,f),s.left+l-h<=c){a=f;break}}return a}},{key:"getLastVisibleColumn",value:function(){var e=this._getVariables(),t=e.leftOverlay,n=e.wtTable,r=e.wtViewport,o=e.totalColumns,i=this.wot.rootWindow,a=n.getLastVisibleColumn();if(t.mainTableScrollableElement===i){var s=Ot(n.wtRootElement),l=At(i,i);if(s.left>l)for(var u=Ft(i),c=r.getRowHeaderWidth(),h=1;h<=o;h++)if(c+=t.sumCellSizes(h-1,h),s.left+c-l>=u){a=h-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")}}}],n&&go(t.prototype,n),e}();const bo=wo;function _o(e,t){for(var n=0;n0&&t.clientHeight>0?t.clientHeight:1/0}},{key:"getWorkspaceWidth",value:function(){var e,t,n=this.wot,r=n.rootDocument,o=n.rootWindow,i=this.instance.wtOverlays.leftOverlay.trimmingContainer,a=r.documentElement.offsetWidth,s=n.getSetting("totalColumns");if(n.getSetting("preventOverflow"))return Yt(this.instance.wtTable.wtRootElement);if(e=n.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"===(t=Pt(this.instance.wtOverlays.leftOverlay.trimmingContainer,"overflow",o))||"hidden"===t||"auto"===t))return Math.max(e,i.clientWidth);var l=n.getSetting("stretchH");return"none"!==l&&l?e:Math.max(e,Yt(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,t){for(var n=this.wot.wtTable,r=0,o=e;o0&&(e-=t),e}},{key:"getRowHeaderWidth",value:function(){var e=this.instance.getSetting("rowHeaderWidth"),t=this.instance.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(var n=0,r=t.length;n0?e-t:e}},{key:"createRowsCalculator",value:function(){var e,t,n,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"),h=o.getSetting("fixedRowsBottom"),f=o.getSetting("totalRows");return c&&(u+=n=a.topOverlay.sumCellSizes(0,c),e-=n),h&&a.bottomOverlay.clone&&(e-=n=a.bottomOverlay.sumCellSizes(f-h,f)),t=s.holder.clientHeight===s.holder.offsetHeight?0:Xt(l),new we({viewportSize:e,scrollOffset:u,totalItems:o.getSetting("totalRows"),itemSizeFn:function(e){return s.getRowHeight(e)},overrideFn:i.settings.viewportRowCalculatorOverride,calculationType:r,scrollbarHeight:t})}},{key:"createColumnsCalculator",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=this.wot,n=t.wtSettings,r=t.wtOverlays,o=t.wtTable,i=t.rootDocument,a=this.getViewportWidth(),s=r.leftOverlay.getScrollPosition()-r.leftOverlay.getTableParentOffset();this.columnHeaderHeight=NaN,s<0&&(s=0);var l=t.getSetting("fixedColumnsLeft");if(l){var u=r.leftOverlay.sumCellSizes(0,l);s+=u,a-=u}return o.holder.clientWidth!==o.holder.offsetWidth&&(a-=Xt(i)),new pe({viewportSize:a,scrollOffset:s,totalItems:t.getSetting("totalColumns"),itemSizeFn:function(e){return t.wtTable.getColumnWidth(e)},overrideFn:n.settings.viewportColumnCalculatorOverride,calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingItemWidthFn:function(e,n){return t.getSetting("onBeforeStretchingColumnWidth",e,n)}})}},{key:"createRenderCalculators",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){var t=this.createRowsCalculator(2),n=this.createColumnsCalculator(2);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(n)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(1),this.columnsRenderCalculator=this.createColumnsCalculator(1)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}},{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 t=e.startRow,n=e.endRow,r=this.rowsRenderCalculator,o=r.startRow,i=r.endRow;return!(t0||n>i||n===i&&n0||n>i||n===i&&n0&&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){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);var t=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),r=this.wtSettings.getSetting("fixedRowsBottom"),o=this.wtSettings.getSetting("fixedColumnsLeft");if(e.row=t-r){if(this.wtOverlays.bottomLeftCornerOverlay&&this.wtOverlays.bottomLeftCornerOverlay.clone)return this.wtOverlays.bottomLeftCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col=t-r&&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,t){return this.wtSettings.update(e,t)}},{key:"scrollViewport",value:function(e,t,n,r,o){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,n,r,o)}},{key:"scrollViewportHorizontally",value:function(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,n)}},{key:"scrollViewportVertically",value:function(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,n)}},{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,t=[],n=[];ee({rowHeaders:["array"],columnHeaders:["array"]},(function(r,o){r.indexOf("array")>-1&&e.getSetting(o).length&&n.push("ht".concat($r(o))),t.push("ht".concat($r(o)))})),bt(this.wtTable.wtRootElement.parentNode,t),wt(this.wtTable.wtRootElement.parentNode,n)}},{key:"getSetting",value:function(e,t,n,r,o){return this.wtSettings.getSetting(e,t,n,r,o)}},{key:"hasSetting",value:function(e){return this.wtSettings.has(e)}},{key:"destroy",value:function(){this.wtOverlays.destroy(),this.wtEvent.destroy()}}],n&&Eo(t.prototype,n),e}();const Ro=Oo;function Lo(e,t){for(var n=0;n=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)}Mr("The provided element is not a child of the ".concat(this.type," overlay"))}},{key:"getRelativeCellPositionWithinWindow",value:function(e,t,n,r){var o,i=this.wot.wtTable.wtRootElement.getBoundingClientRect(),a=0;return o=t?i.left<=0?-1*i.left:0:r.left,a=e?this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top:r.top,{left:n.left+o,top:n.top+a}}},{key:"getRelativeCellPositionWithinHolder",value:function(e,t,n,r,o){var i=this.clone.cloneSource.wtOverlays.leftOverlay.getScrollPosition(),a=this.clone.cloneSource.wtOverlays.topOverlay.getScrollPosition(),s=0,l=0;if(n||(s=i-o.left),t){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(t){if(-1===e.CLONE_TYPES.indexOf(t))throw new Error('Clone type "'.concat(t,'" is not supported.'));var n=this.wot,r=n.wtTable,o=n.rootDocument,i=n.rootWindow,a=o.createElement("DIV"),s=o.createElement("TABLE");a.className="ht_clone_".concat(t," handsontable"),a.style.position="absolute",a.style.top=0,a.style.left=0,a.style.overflow="hidden",s.className=r.TABLE.className,a.appendChild(s),this.type=t,r.wtRootElement.parentNode.appendChild(a);var l=this.wot.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===e.CLONE_TOP||"vertical"===l&&this.type===e.CLONE_LEFT?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=r.holder:this.mainTableScrollableElement=Ht(r.TABLE),new Ro({cloneSource:this.wot,cloneOverlay:this,table:s})}},{key:"refresh",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}},{key:"reset",value:function(){if(this.clone){var e=this.clone.wtTable.holder,t=this.clone.wtTable.hider;P([e.style,t.style,e.parentNode.style],(function(e){e.width="",e.height=""}))}}},{key:"destroy",value:function(){new Jr(this.clone).destroy()}}]),e}();const No=Ho;function Po(e){return Po="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},Po(e)}function xo(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],t=this.wot,n=t.wtOverlays,r=t.wtViewport,o=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),s=a.length,l=t.getSetting("columnHeaders"),u=l.length,c=!1,h=e;if(this.isMaster&&(this.holderOffset=Ot(this.holder),h=r.createRenderCalculators(h),s&&!t.getSetting("fixedColumnsLeft"))){var f=n.leftOverlay.getScrollPosition(),d=this.correctHeaderWidth;this.correctHeaderWidth=f>0,d!==this.correctHeaderWidth&&(h=!1)}if(this.isMaster&&(c=n.prepareOverlays()),h)this.isMaster&&r.createVisibleCalculators(),n&&n.refresh(!0);else{this.isMaster?this.tableOffset=Ot(this.TABLE):this.tableOffset=this.wot.cloneSource.wtTable.tableOffset;var m=o>0?this.getFirstRenderedRow():0,p=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new vn(m,o,u),this.columnFilter=new mn(p,i,s);var y,v=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();var g={};this.wot.getSetting("beforeDraw",!0,g),v=!0!==g.skipRender}if(v)if(this.tableRenderer.setHeaderContentRenderers(a,l),(this.is(No.CLONE_BOTTOM)||this.is(No.CLONE_BOTTOM_LEFT_CORNER))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(y=this.wot.wtViewport.getWorkspaceWidth(),this.wot.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(No.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.wot.wtViewport.createVisibleCalculators(),this.wot.wtOverlays.refresh(!1),this.wot.wtOverlays.applyToDOM();var w=Yt(this.hider),b=Yt(this.TABLE);0!==w&&b!==w&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),y!==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(No.CLONE_BOTTOM)&&this.wot.cloneSource.wtOverlays.adjustElementsSize()}return this.refreshSelections(h),this.isMaster&&(n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&n.bottomOverlay.resetFixedPosition(),n.leftOverlay.resetFixedPosition(),n.topLeftCornerOverlay&&n.topLeftCornerOverlay.resetFixedPosition(),n.bottomLeftCornerOverlay&&n.bottomLeftCornerOverlay.clone&&n.bottomLeftCornerOverlay.resetFixedPosition()),c&&n.syncScrollWithMaster(),t.drawn=!0,this}},{key:"markIfOversizedColumnHeader",value:function(e){for(var t,n,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,t=this.wot.wtTable.getColumnHeaderHeight(i),(n=this.wot.wtTable.getColumnHeader(o,i))&&(r=jt(n),(!t&&a=0)throw new Error("TR was expected to be rendered but is not");var u=l.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!u&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return u}},{key:"getColumnHeader",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.THEAD.childNodes[t];if(n)return n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}},{key:"getRowHeader",value:function(e){if(0===this.columnFilter.sourceColumnToVisibleRowHeadedColumn(0))return null;var t=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)];return t?t.childNodes[0]:void 0}},{key:"getCoords",value:function(e){var t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=st(t,["TD","TH"])),null===t)return null;var n=t.parentNode,r=n.parentNode,o=dt(n),i=t.cellIndex;return mt(No.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||mt(No.CLONE_TOP,t,this.wtRootElement)?"THEAD"===r.nodeName&&(o-=r.childNodes.length):o=mt(No.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)||mt(No.CLONE_BOTTOM,t,this.wtRootElement)?this.wot.getSetting("totalRows")-r.childNodes.length+o:r===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(o):this.rowFilter.renderedToSource(o),i=mt(No.CLONE_TOP_LEFT_CORNER,t,this.wtRootElement)||mt(No.CLONE_LEFT,t,this.wtRootElement)||mt(No.CLONE_BOTTOM_LEFT_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),new Me(o,i)}},{key:"markOversizedRows",value:function(){if(!this.wot.getSetting("externalRowCalculator")){var e,t,n,r,o,i=this.TBODY.childNodes.length;if(i*this.wot.wtSettings.settings.defaultRowHeight!=jt(this.TBODY)-1||this.wot.getSetting("fixedRowsBottom"))for(;i;)i-=1,n=this.rowFilter.renderedToSource(i),e=this.getRowHeight(n),t=(o=(r=this.getTrForRow(n)).querySelector("th"))?jt(o):jt(r)-1,(!e&&this.wot.wtSettings.settings.defaultRowHeightthis.wot.getSetting("columnHeaders").length-1}},{key:"isRowHeaderLevelRendered",value:function(e){return e>this.wot.getSetting("rowHeaders").length-1}},{key:"isRowBeforeRenderedRows",value:function(e){var t=this.getFirstRenderedRow();return e<0&&(e=0),-1===t||ethis.getLastVisibleRow()}},{key:"isRowAfterRenderedRows",value:function(e){if(e<0){var t=this.wot.getSetting("columnHeaders").length+e;return this.isColumnHeaderLevelRendered(t)}return e>this.getLastRenderedRow()}},{key:"isColumnBeforeViewport",value:function(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}},{key:"isColumnBeforeRenderedColumns",value:function(e){var t=this.getFirstRenderedColumn();return e<0&&(e=0),-1===t||ethis.getLastVisibleColumn()}},{key:"isColumnAfterRenderedColumns",value:function(e){if(e<0){var t=this.wot.getSetting("rowHeaders").length+e;return this.isRowHeaderLevelRendered(t)}return this.columnFilter&&e>this.getLastRenderedColumn()}},{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 Et(this.TABLE)}},{key:"_modifyRowHeaderWidth",value:function(e){var t,n=rn(e)?e():null;return Array.isArray(n)?(t=n,n=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t0,this.hasTableWidth=u>0}this.isTableVisible=Et(this.TABLE)}},{key:"markOversizedColumnHeaders",value:function(){var e=this.wot,t=e.getOverlayName(),n=e.getSetting("columnHeaders").length;if(n&&!e.wtViewport.hasOversizedColumnHeadersMarked[t]){for(var r=e.getSetting("rowHeaders").length,o=this.getRenderedColumnsCount(),i=0;i0?-s:0,$t(t,o+="px",i)}this.adjustHeaderBordersPosition(n),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,Rt(t)),n=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollVertically")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot.wtSettings.defaultColumnWidth,r=e,o=0;r0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,o=Xt(n),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,t.wtRootElement.scrollHeight),i.height="".concat(s,"px")}else i.height="";this.clone.wtTable.holder.style.height=i.height;var l=Yt(this.clone.wtTable.TABLE);i.width="".concat(0===l?l:l+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=Xt(this.wot.rootDocument);this.clone.wtTable.hider.style.height=this.hider.style.height,this.clone.wtTable.holder.style.height=this.clone.wtTable.holder.parentNode.style.height,0===e&&(e=30),this.clone.wtTable.holder.style.width="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.width,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalColumns");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"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,t){var n=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=0;return t&&r.offsetWidth!==r.clientWidth&&(o=Xt(this.wot.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportWidth()):n+=this.sumCellSizes(this.wot.getSetting("fixedColumnsLeft"),e),n+=o,this.setScrollPosition(n)}},{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 At(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode,n=this.wot.getSetting("rowHeaders"),r=this.wot.getSetting("fixedColumnsLeft");if(this.wot.getSetting("totalRows")?bt(t,"emptyRows"):wt(t,"emptyRows"),r&&!n.length)wt(t,"innerBorderLeft");else if(!r&&n.length){var o=gt(t,"innerBorderLeft");e?wt(t,"innerBorderLeft"):bt(t,"innerBorderLeft"),(!o&&e||o&&!e)&&this.wot.wtOverlays.adjustElementsSize()}}}],r&&li(n.prototype,r),t}(No);No.registerOverlay(No.CLONE_LEFT,hi);var fi={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()}};Z(fi,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});const di=fi;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},mi(e)}function pi(e){return pi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pi(e)}function yi(e,t){return yi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},yi(e,t)}var vi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){return!t||"object"!==mi(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,pi(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yi(e,t)}(t,e),t}(Bo);J(vi,di),J(vi,Go);const gi=vi;function wi(e){return wi="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},wi(e)}function bi(e,t,n){return bi=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&ki(o,n.prototype),o},bi.apply(null,arguments)}function _i(e,t){for(var n=0;n0?-s:0,$t(e,r,o+="px")}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo(Lt(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=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(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.rootDocument,r=e.rootWindow,o=Xt(n),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,t.wtRootElement.scrollWidth),i.width="".concat(s,"px")}else i.width="";this.clone.wtTable.holder.style.width=i.width;var l=It(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),i.height="".concat(0===l?l:l+4,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=Xt(this.wot.rootDocument);this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"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,t){var n=this.wot,r=(n.cloneSource?n.cloneSource:n).wtTable.holder,o=this.getTableParentOffset(),i=0;if(t&&r.offsetHeight!==r.clientHeight&&(i=Xt(n.rootDocument)),t){var a=n.getSetting("fixedRowsBottom"),s=n.getSetting("totalRows");o+=this.sumCellSizes(0,e+1),o-=n.wtViewport.getViewportHeight()-this.sumCellSizes(s-a,s),o+=1}else o+=this.sumCellSizes(n.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 Dt(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"redrawSelectionBorders",value:function(e){if(e&&e.cellRange){var t=e.getBorder(this.wot),n=e.getCorners();t.disappear(),t.appear(n)}}},{key:"redrawAllSelectionsBorders",value:function(){var e=this,t=this.wot.selections;this.redrawSelectionBorders(t.getCell()),P(t.getAreas(),(function(t){e.redrawSelectionBorders(t)})),this.redrawSelectionBorders(t.getFill()),this.wot.wtTable.wot.wtOverlays.leftOverlay.refresh()}},{key:"adjustHeaderBordersPosition",value:function(e){var t=this.wot.wtTable.holder.parentNode;if(this.wot.getSetting("totalColumns")?bt(t,"emptyColumns"):wt(t,"emptyColumns"),0===this.wot.getSetting("fixedRowsTop")&&this.wot.getSetting("columnHeaders").length>0){var n=gt(t,"innerBorderTop");e||0===this.wot.getSetting("totalRows")?wt(t,"innerBorderTop"):bt(t,"innerBorderTop"),(!n&&e||n&&!e)&&(this.wot.wtOverlays.adjustElementsSize(),this.redrawAllSelectionsBorders())}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelectorAll("th:nth-of-type(2)");if(r)for(var o=0;o0&&(s="".concat(-o,"px")),t&&"horizontal"!==t||r<0&&i-e.offsetHeight>0&&(l="".concat(-r,"px")),$t(e,s,l)}else Zt(e);var u=It(this.clone.wtTable.TABLE),c=Yt(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(u=0),e.style.height="".concat(0===u?u:u+4,"px"),e.style.width="".concat(0===c?c:c+4,"px")}}}],r&&Ai(n.prototype,r),t}(No);No.registerOverlay(No.CLONE_TOP_LEFT_CORNER,Pi);var xi={getFirstRenderedRow:function(){var e=this.wot.getSetting("totalRows")-this.wot.getSetting("fixedRowsBottom");return e<0?-1:e},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()}};Z(xi,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});const Yi=xi;function Ii(e){return Ii="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},Ii(e)}function ji(e){return ji=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ji(e)}function Fi(e,t){return Fi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Fi(e,t)}var Wi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){return!t||"object"!==Ii(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,ji(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fi(e,t)}(t,e),t}(Bo);J(Wi,Yi),J(Wi,Go);const Bi=Wi;function Vi(e){return Vi="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},Vi(e)}function Ui(e,t,n){return Ui=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&qi(o,n.prototype),o},Ui.apply(null,arguments)}function zi(e,t){for(var n=0;nc?u-c:0,o+="px",e.style.top="",e.style.left=r,e.style.bottom=o}this.adjustHeaderBordersPosition(t),this.adjustElementsSize()}}},{key:"setScrollPosition",value:function(e){var t=this.wot.rootWindow,n=!1;return this.mainTableScrollableElement===t?(t.scrollTo(Lt(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}},{key:"onScroll",value:function(){this.wot.getSetting("onScrollHorizontally")}},{key:"sumCellSizes",value:function(e,t){for(var n=this.wot,r=n.wtTable,o=n.wtSettings.settings.defaultRowHeight,i=e,a=0;i0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize(),e||(this.areElementSizesAdjusted=!0))}},{key:"adjustRootElementSize",value:function(){var e=this.wot,t=e.wtTable,n=e.wtViewport,r=e.rootWindow,o=Xt(this.wot.rootDocument),i=this.clone.wtTable.holder.parentNode.style,a=this.wot.getSetting("preventOverflow");if(this.trimmingContainer!==r||"horizontal"===a){var s=n.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(s-=o),s=Math.min(s,t.wtRootElement.scrollWidth),i.width="".concat(s,"px")}else i.width="";this.clone.wtTable.holder.style.width=i.width;var l=It(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),i.height="".concat(l,"px")}},{key:"adjustRootChildrenSize",value:function(){var e=Xt(this.wot.rootDocument);this.clone.wtTable.hider.style.width=this.hider.style.width,this.clone.wtTable.holder.style.width=this.clone.wtTable.holder.parentNode.style.width,0===e&&(e=30),this.clone.wtTable.holder.style.height="".concat(parseInt(this.clone.wtTable.holder.parentNode.style.height,10)+e,"px")}},{key:"applyToDOM",value:function(){var e=this.wot.getSetting("totalRows");if(this.areElementSizesAdjusted||this.adjustElementsSize(),"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,t){var n=this.getTableParentOffset(),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,o=0;t&&r.offsetHeight!==r.clientHeight&&(o=Xt(this.wot.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wot.getSetting("fixedRowsBottom"),e),n+=o,this.setScrollPosition(n)}},{key:"getTableParentOffset",value:function(){return this.mainTableScrollableElement===this.wot.rootWindow?this.wot.wtTable.holderOffset.top:0}},{key:"getScrollPosition",value:function(){return Dt(this.mainTableScrollableElement,this.wot.rootWindow)}},{key:"adjustHeaderBordersPosition",value:function(e){if(0===this.wot.getSetting("fixedRowsBottom")&&this.wot.getSetting("columnHeaders").length>0){var t=this.wot.wtTable.holder.parentNode,n=gt(t,"innerBorderTop");e?wt(t,"innerBorderTop"):bt(t,"innerBorderTop"),(!n&&e||n&&!e)&&this.wot.wtOverlays.adjustElementsSize()}if(0===this.wot.getSetting("rowHeaders").length){var r=this.clone.wtTable.THEAD.querySelector("th:nth-of-type(2)");r&&(r.style["border-left-width"]=0)}}}],r&&zi(n.prototype,r),t}(No);function Ki(e){return Ki="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},Ki(e)}function Ji(e){return Ji=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ji(e)}function $i(e,t){return $i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$i(e,t)}No.registerOverlay(No.CLONE_BOTTOM,Xi);var Qi=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){return!t||"object"!==Ki(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,Ji(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$i(e,t)}(t,e),t}(Bo);J(Qi,Yi),J(Qi,ei);const Zi=Qi;function ea(e){return ea="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},ea(e)}function ta(e,t,n){return ta=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&oa(o,n.prototype),o},ta.apply(null,arguments)}function na(e,t){for(var n=0;ns?i-s:0,r+="px",n+="px",t.style.top="",t.style.left=n,t.style.bottom=r}else Zt(t),this.repositionOverlay();var l=It(this.clone.wtTable.TABLE),u=Yt(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),t.style.height="".concat(l,"px"),t.style.width="".concat(u,"px")}}}],r&&na(n.prototype,r),t}(No);function aa(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function sa(e,t){for(var n=0;nMath.ceil(o.top+o.height)||a.clientXMath.ceil(o.left+o.width))&&(n.eventManager.removeEventListener(r,"mousemove",e),t.style.display="block")}))}}},{key:"createBorders",value:function(e){var t=this.wot.rootDocument;this.main=t.createElement("div");var n=["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=n[o],a=t.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(" "),Pe()&&this.createMultipleSelectorHandles(),this.disappear();var s=this.wot.wtTable,l=s.bordersHolder;l||((l=t.createElement("div")).className="htBorders",s.bordersHolder=l,s.spreader.appendChild(l)),l.appendChild(this.main)}},{key:"createMultipleSelectorHandles",value:function(){var e=this,t=this.wot.rootDocument;this.selectionHandles={topLeft:t.createElement("DIV"),topLeftHitArea:t.createElement("DIV"),bottomRight:t.createElement("DIV"),bottomRightHitArea:t.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},ee({position:"absolute",height:"".concat(40,"px"),width:"".concat(40,"px"),"border-radius":"".concat(parseInt(40/1.5,10),"px")},(function(t,n){e.selectionHandles.styles.bottomRightHitArea[n]=t,e.selectionHandles.styles.topLeftHitArea[n]=t})),ee({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(t,n){e.selectionHandles.styles.bottomRight[n]=t,e.selectionHandles.styles.topLeft[n]=t})),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,t){var n=this.wot.selections.createOrGetArea();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}},{key:"updateMultipleSelectionHandlesPosition",value:function(e,t,n,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(n-a,10),"px"),this.selectionHandles.styles.topLeft.left="".concat(parseInt(r-a,10),"px"),this.selectionHandles.styles.topLeftHitArea.top="".concat(parseInt(n-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(n+i,10),"px"),this.selectionHandles.styles.bottomRight.left="".concat(parseInt(r+o,10),"px"),this.selectionHandles.styles.bottomRightHitArea.top="".concat(parseInt(n+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,t)?(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")||t===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 t,n,r,o,i=this.wot,a=i.wtTable,s=i.rootDocument,l=i.rootWindow,u=a.getRenderedRowsCount(),c=0;c=e[0]&&h<=e[2]){t=h;break}}for(var f=u-1;f>=0;f-=1){var d=a.rowFilter.renderedToSource(f);if(d>=e[0]&&d<=e[2]){n=d;break}}for(var m=a.getRenderedColumnsCount(),p=0;p=e[1]&&y<=e[3]){r=y;break}}for(var v=m-1;v>=0;v-=1){var g=a.columnFilter.renderedToSource(v);if(g>=e[1]&&g<=e[3]){o=g;break}}if(void 0!==t&&void 0!==r){var w=a.getCell(new Me(t,r)),b=t!==n||r!==o,_=b?a.getCell(new Me(n,o)):w,M=Ot(w),k=b?Ot(_):M,S=Ot(a.TABLE),C=M.top,T=M.left,E=T-S.left-1,O=k.left+Yt(_)-T;if(this.isEntireColumnSelected(t,n)){var R=this.getDimensionsFromHeader("columns",r,o,S),L=null;if(R){var D=aa(R,3);L=D[0],E=D[1],O=D[2]}L&&(w=L)}var A=C-S.top-1,H=k.top+It(_)-C;if(this.isEntireRowSelected(r,o)){var N=this.getDimensionsFromHeader("rows",t,n,S),P=null;if(N){var x=aa(N,3);P=x[0],A=x[1],H=x[2]}P&&(w=P)}var Y=xt(w,l);parseInt(Y.borderTopWidth,10)>0&&(A+=1,H=H>0?H-1:0),parseInt(Y.borderLeftWidth,10)>0&&(E+=1,O=O>0?O-1:0),this.topStyle.top="".concat(A,"px"),this.topStyle.left="".concat(E,"px"),this.topStyle.width="".concat(O,"px"),this.topStyle.display="block",this.leftStyle.top="".concat(A,"px"),this.leftStyle.left="".concat(E,"px"),this.leftStyle.height="".concat(H,"px"),this.leftStyle.display="block";var I=Math.floor(this.settings.border.width/2);this.bottomStyle.top="".concat(A+H-I,"px"),this.bottomStyle.left="".concat(E,"px"),this.bottomStyle.width="".concat(O,"px"),this.bottomStyle.display="block",this.rightStyle.top="".concat(A,"px"),this.rightStyle.left="".concat(E+O-I,"px"),this.rightStyle.height="".concat(H+1,"px"),this.rightStyle.display="block";var j=this.settings.border.cornerVisible;j="function"==typeof j?j(this.settings.layerLevel):j;var F=this.wot.getSetting("onModifyGetCellCoords",n,o),W=n,B=o;if(F&&Array.isArray(F)){var V=aa(F,4);W=V[2],B=V[3]}if(Pe()||!j||this.isPartRange(W,B))this.cornerStyle.display="none";else{this.cornerStyle.top="".concat(A+H-4,"px"),this.cornerStyle.left="".concat(E+O-4,"px"),this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";var U=Nt(a.TABLE),z=U===l;z&&(U=s.documentElement),o===this.wot.getSetting("totalColumns")-1&&(z?_.getBoundingClientRect().left:_.offsetLeft)+Yt(_)+parseInt(this.cornerDefaultStyle.width,10)/2>=Ft(U)&&(this.cornerStyle.left="".concat(Math.floor(E+O-3-parseInt(this.cornerDefaultStyle.width,10)/2),"px"),this.cornerStyle.borderRightWidth=0),n===this.wot.getSetting("totalRows")-1&&(z?_.getBoundingClientRect().top:_.offsetTop)+It(_)+parseInt(this.cornerDefaultStyle.height,10)/2>=jt(U)&&(this.cornerStyle.top="".concat(Math.floor(A+H-3-parseInt(this.cornerDefaultStyle.height,10)/2),"px"),this.cornerStyle.borderBottomWidth=0),this.cornerStyle.display="block"}Pe()&&this.updateMultipleSelectionHandlesPosition(n,o,A,E,O,H)}else this.disappear()}}},{key:"isEntireColumnSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}},{key:"isEntireRowSelected",value:function(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}},{key:"getDimensionsFromHeader",value:function(e,t,n,r){var o=this.wot.wtTable,i=o.wtRootElement.parentNode,a=null,s=null,l=null,u=null,c=null,h=null,f=null,d=null;switch(e){case"rows":a=function(){return o.getRowHeader.apply(o,arguments)},s=function(){return It.apply(void 0,arguments)},l="ht__selection--rows",h="top";break;case"columns":a=function(){return o.getColumnHeader.apply(o,arguments)},s=function(){return Yt.apply(void 0,arguments)},l="ht__selection--columns",h="left"}if(i.className.includes(l)){var m=this.wot.getSetting("columnHeaders").length;if(f=a(t,m-1),d=a(n,m-1),!f||!d)return!1;var p=Ot(f),y=Ot(d);return f&&d&&(u=p[h]-r[h]-1,c=y[h]+s(d)-p[h]),[f,u,c]}return!1}},{key:"changeBorderStyle",value:function(e,t){var n=this[e].style,r=t[e];!r||r.hide?wt(this[e],"hidden"):(gt(this[e],"hidden")&&bt(this[e],"hidden"),n.backgroundColor=r.color,"top"!==e&&"bottom"!==e||(n.height="".concat(r.width,"px")),"right"!==e&&"left"!==e||(n.width="".concat(r.width,"px")))}},{key:"changeBorderToDefaultStyle",value:function(e){var t=this[e].style;t.backgroundColor="#000",t.width="".concat(1,"px"),t.height="".concat(1,"px")}},{key:"toggleHiddenClass",value:function(e,t){this.changeBorderToDefaultStyle(e),t?wt(this[e],"hidden"):bt(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",Pe()&&(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)}}],n&&sa(t.prototype,n),e}();const ua=la;function ca(e){return ca="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},ca(e)}function ha(e,t){for(var n=0;n4&&void 0!==arguments[4]&&arguments[4],i=e.wtTable.getCell(new Me(t,n));if("object"===ca(i)){var a=r;o&&(a=this.classNameGenerator(i),this.classNames.includes(a)||this.classNames.push(a)),wt(i,a)}return this}},{key:"linearClassNameGenerator",value:function(e,t){return function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(0===t||0===o)return e;var i=o>=0?o:t,a=e;if(gt(r,0==(i-=1)?e:"".concat(e,"-").concat(i))){var s=i+1;a="".concat(e,"-").concat(s)}else a=n(r,i);return a}}},{key:"draw",value:function(e){if(this.isEmpty())this.settings.border&&this.getBorder(e).disappear();else{for(var t=e.wtTable.getRenderedRowsCount(),n=e.wtTable.getRenderedColumnsCount(),r=this.getCorners(),o=(_=4,function(e){if(Array.isArray(e))return e}(b=r)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(b,_)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=o[0],a=o[1],s=o[2],l=o[3],u=0;u=a&&c<=l){var h=e.wtTable.getColumnHeader(c);if(h){var f=[];this.settings.highlightHeaderClassName&&f.push(this.settings.highlightHeaderClassName),this.settings.highlightColumnClassName&&f.push(this.settings.highlightColumnClassName),wt(h,f)}}}for(var d=0;d=i&&m<=s){var p=e.wtTable.getRowHeader(m);if(p){var y=[];this.settings.highlightHeaderClassName&&y.push(this.settings.highlightHeaderClassName),this.settings.highlightRowClassName&&y.push(this.settings.highlightRowClassName),wt(p,y)}}for(var v=0;v=i&&m<=s&&g>=a&&g<=l?this.settings.className&&this.addClassAtCoords(e,m,g,this.settings.className,this.settings.markIntersections):m>=i&&m<=s?this.settings.highlightRowClassName&&this.addClassAtCoords(e,m,g,this.settings.highlightRowClassName):g>=a&&g<=l&&this.settings.highlightColumnClassName&&this.addClassAtCoords(e,m,g,this.settings.highlightColumnClassName);var w=e.getSetting("onAfterDrawSelection",m,g,r,this.settings.layerLevel);"string"==typeof w&&this.addClassAtCoords(e,m,g,w)}}e.getSetting("onBeforeDrawBorders",r,this.settings.className),this.settings.border&&this.getBorder(e).appear(r)}var b,_}},{key:"destroy",value:function(){Object.values(this.instanceBorders).forEach((function(e){return e.destroy()}))}}],n&&ha(t.prototype,n),e}();const da=fa;var ma={_hooksStorage:Object.create(null),addHook:function(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey:function(e){var t=this;P(this._hooksStorage[e]||[],(function(n){t.hot.removeHook(e,n)}))},clearHooks:function(){var e=this;ee(this._hooksStorage,(function(t,n){return e.removeHooksByKey(n)})),this._hooksStorage={}}};Z(ma,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});const pa=ma;function ya(e){return ya="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},ya(e)}function va(e){return va=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},va(e)}function ga(e,t){return ga=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ga(e,t)}function wa(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ba(e,t){for(var n=0;nn[2]&&(r=n[0],n[0]=n[2],n[2]=r),n[1]>n[3]&&(r=n[1],n[1]=n[3],n[3]=r)):n=[this.row,this.col,null,null],this.hot.populateFromArray(n[0],n[1],e,n[2],n[3],"edit")}},{key:"beginEditing",value:function(e,t){if(this.state===_a){if(this.hot.view.scrollViewport(new Me(this.row,this.col)),this.state=Ma,this.isInFullEditMode()){var n="string"==typeof e?e:ir(this.originalValue);this.setValue(n)}this.open(t),this._opened=!0,this.focus(),this.hot.view.render(),this.hot.runHooks("afterBeginEditing",this.row,this.col)}}},{key:"finishEditing",value:function(e,t,n){var r,o=this;if(n){var i=this._closeCallback;this._closeCallback=function(e){i&&i(e),n(e),o.hot.view.render()}}if(!this.isWaiting())if(this.state!==_a){if(this.state===Ma){if(e)return this.cancelChanges(),void this.hot.view.render();var a=this.getValue();r=this.hot.getSettings().trimWhitespace?[["string"==typeof a?String.prototype.trim.call(a||""):a]]:[[a]],this.state=ka,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(function(e){o.state=Sa,o.discardEditor(e)})):(this.state=Sa,this.discardEditor(!0))}}else this.hot._registerTimeout((function(){o._fireCallbacks(!0)}))}},{key:"cancelChanges",value:function(){this.state=Sa,this.discardEditor()}},{key:"discardEditor",value:function(e){this.state===Sa&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=Ma,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=_a,this._fireCallbacks(!0)))}},{key:"enableFullEditMode",value:function(){this._fullEditMode=!0}},{key:"isInFullEditMode",value:function(){return this._fullEditMode}},{key:"isOpened",value:function(){return this._opened}},{key:"isWaiting",value:function(){return this.state===ka}},{key:"getEditedCellsLayerClass",value:function(){switch(this.checkEditorSection()){case"right":return"ht_clone_right";case"left":return"ht_clone_left";case"bottom":return"ht_clone_bottom";case"bottom-right-corner":return"ht_clone_bottom_right_corner";case"bottom-left-corner":return"ht_clone_bottom_left_corner";case"top":return"ht_clone_top";case"top-right-corner":return"ht_clone_top_right_corner";case"top-left-corner":return"ht_clone_top_left_corner";default:return"ht_clone_master"}}},{key:"getEditedCell",value:function(){return this.hot.getCell(this.row,this.col,!0)}},{key:"checkEditorSection",value:function(){var e=this.hot.countRows(),t="";return this.row=e-this.hot.getSettings().fixedRowsBottom?t=this.col=t&&!1!==n(r););}function Da(e,t){return t=parseInt(t.toString().replace("%",""),10),parseInt(e*t/100,10)}n(17),n(18636),n(35231),n(10678),n(12091);var Aa=n(27367),Ha=n.n(Aa);function Na(e){return Na="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},Na(e)}function Pa(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0]?nn(this.TEXTAREA):(this.TEXTAREA.select(),qt(this.TEXTAREA,this.TEXTAREA.value.length))}},{key:"createElements",value:function(){var e=this.hot.rootDocument;this.TEXTAREA=e.createElement("TEXTAREA"),this.TEXTAREA.tabIndex=-1,wt(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),wt(this.TEXTAREA_PARENT,"handsontableInputHolder"),gt(this.TEXTAREA_PARENT,this.layerClass)&&bt(this.TEXTAREA_PARENT,this.layerClass),wt(this.TEXTAREA_PARENT,Fa),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}},{key:"hideEditableElement",value:function(){(De()||Le())&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",gt(this.TEXTAREA_PARENT,this.layerClass)&&bt(this.TEXTAREA_PARENT,this.layerClass),wt(this.TEXTAREA_PARENT,Fa)}},{key:"showEditableElement",value:function(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle.right="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";var e=this.TEXTAREA_PARENT.childNodes,t=!1;Ra(e.length-1,(function(n){if(gt(e[n],"handsontableEditor"))return t=!0,!1})),gt(this.TEXTAREA_PARENT,Fa)&&bt(this.TEXTAREA_PARENT,Fa),t?(this.layerClass="ht_editor_visible",wt(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),wt(this.TEXTAREA_PARENT,this.layerClass))}},{key:"refreshValue",value:function(){var e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}},{key:"refreshDimensions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state===Ma||e)if(this.TD=this.getEditedCell(),this.TD){var t,n=this.hot.view.wt,r=n.wtOverlays,o=n.wtViewport,i=Ot(this.TD),a=Ot(this.hot.rootElement),s=r.topOverlay.holder,l=r.leftOverlay.holder,u=this.hot.countRows(),c=s!==this.hot.rootWindow?s.scrollTop:0,h=l!==this.hot.rootWindow?l.scrollLeft:0,f=this.checkEditorSection(),d=["","left"].includes(f)?c:0,m=["","top","bottom"].includes(f)?h:0,p=i.top===a.top?0:1,y=this.hot.getSettings(),v=this.hot.hasColHeaders(),g=this.TD.style.backgroundColor,w=i.top-a.top-p-d,b=i.left-a.left-1-m;switch(f){case"top":t=Qt(r.topOverlay.clone.wtTable.holder.parentNode);break;case"left":t=Qt(r.leftOverlay.clone.wtTable.holder.parentNode);break;case"top-left-corner":t=Qt(r.topLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom-left-corner":t=Qt(r.bottomLeftCornerOverlay.clone.wtTable.holder.parentNode);break;case"bottom":t=Qt(r.bottomOverlay.clone.wtTable.holder.parentNode)}(v&&0===this.hot.getSelectedLast()[0]||y.fixedRowsBottom&&this.hot.getSelectedLast()[0]===u-y.fixedRowsBottom)&&(w+=1),0===this.hot.getSelectedLast()[1]&&(b+=1),t&&-1!==t?this.textareaParentStyle[t[0]]=t[1]:Zt(this.TEXTAREA_PARENT),this.textareaParentStyle.top="".concat(w,"px"),this.textareaParentStyle.left="".concat(b,"px"),this.showEditableElement();var _=o.rowsRenderCalculator.startPosition,M=o.columnsRenderCalculator.startPosition,k=r.leftOverlay.getScrollPosition(),S=r.topOverlay.getScrollPosition(),C=Xt(this.hot.rootDocument),T=this.TD.offsetTop+_-S,E=this.TD.offsetLeft+M-k,O=Ft(this.TD)-8,R=Kt(s)?C:0,L=Jt(l)?C:0,D=this.hot.view.maximumVisibleElementWidth(E)-9-R,A=this.TD.scrollHeight+1,H=Math.max(this.hot.view.maximumVisibleElementHeight(T)-L,23),N=xt(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=N.fontSize,this.TEXTAREA.style.fontFamily=N.fontFamily,this.TEXTAREA.style.backgroundColor=g,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(A,H),maxHeight:H,minWidth:Math.min(O,D),maxWidth:D},!0)}else e||this.close()}},{key:"bindEvents",value:function(){var e=this;this.eventManager.addEventListener(this.TEXTAREA,"cut",(function(e){return Wr(e)})),this.eventManager.addEventListener(this.TEXTAREA,"paste",(function(e){return Wr(e)})),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 t=(e.ctrlKey||e.metaKey)&&!e.altKey;if(e.target===this.TEXTAREA&&!Fr(e)){switch(e.keyCode){case lo.ARROW_RIGHT:case lo.ARROW_LEFT:case lo.ARROW_UP:case lo.ARROW_DOWN:this.isInFullEditMode()&&(this.isWaiting()||this.allowKeyEventPropagation(e.keyCode)||jr(e));break;case lo.ENTER:var n=this.hot.selection.isMultiple();if(t&&!n||e.altKey){if(this.isOpened()){var r=Vt(this.TEXTAREA),o=this.getValue(),i="".concat(o.slice(0,r),"\n").concat(o.slice(r));this.setValue(i),qt(this.TEXTAREA,r+1)}else this.beginEditing("".concat(this.originalValue,"\n"));jr(e)}e.preventDefault();break;case lo.BACKSPACE:case lo.DELETE:case lo.HOME:case lo.END:jr(e)}-1===[lo.ARROW_UP,lo.ARROW_RIGHT,lo.ARROW_DOWN,lo.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}}],r&&Pa(n.prototype,r),t}(Ta);const Ba=Wa;function Va(e){return Va="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},Va(e)}function Ua(e,t){for(var n=0;no.countRows()-1?o.deselectCell():o.selectCell(n,0),o.getData().length&&(e.preventDefault(),jr(e),this.hot.listen(),this.TEXTAREA.focus())),za(Ga(t.prototype),"onBeforeKeyDown",this).call(this,e)}}}],r&&Ua(n.prototype,r),t}(Ba);const Ka=Xa;function Ja(e){return Ja="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},Ja(e)}function $a(e,t){for(var n=0;n".concat(s,""))),t.innerHTML=f},autoColumnSize:!0,modifyColWidth:function(e,t){var n=this.getPlugin("autoColumnSize"),r=e;if(n){var i=n.widths;i[t]&&(r=i[t])}return o?r:r+15}}),this.htEditor.view.wt.wtTable.holder.parentNode.style["padding-right"]="".concat(i+2,"px"),n.skipOne&&(n.skipOne=!1),this.hot._registerTimeout((function(){e.queryChoices(e.TEXTAREA.value)}))}},{key:"close",value:function(){this.removeHooksByKey("beforeKeyDown"),Za(es(t.prototype),"close",this).call(this)}},{key:"discardEditor",value:function(e){Za(es(t.prototype),"discardEditor",this).call(this,e),this.hot.view.render()}},{key:"queryChoices",value:function(e){var t=this,n=this.cellProperties.source;this.query=e,"function"==typeof n?n.call(this.cellProperties,e,(function(e){t.rawChoices=e,t.updateChoicesList(t.stripValuesIfNeeded(e))})):Array.isArray(n)?(this.rawChoices=n,this.updateChoicesList(this.stripValuesIfNeeded(n))):this.updateChoicesList([])}},{key:"updateChoicesList",value:function(e){var n=Vt(this.TEXTAREA),r=Ut(this.TEXTAREA),o=this.cellProperties.sortByRelevance,i=this.cellProperties.filter,a=null,s=null,l=e;o&&(a=t.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));var u=Array.isArray(a)?a.length:0;if(!1===i)u&&(s=a[0]);else{for(var c=[],h=0,f=l.length;hl&&s>l;return u?this.flipDropdown(n):this.unflipDropdown(),this.limitDropdownIfNeeded(u?s:l,n),u}},{key:"limitDropdownIfNeeded",value:function(e,t){if(t>e){var n,r=0,o=0,i=0;do{r+=i=this.htEditor.getRowHeight(o)||this.htEditor.view.wt.wtSettings.settings.defaultRowHeight,o+=1}while(r=t?t*e:this.strippedChoices.length*e+8}},{key:"stripValueIfNeeded",value:function(e){return this.stripValuesIfNeeded([e])[0]}},{key:"stripValuesIfNeeded",value:function(e){var t=this.cellProperties.allowHtml,n=N(e,(function(e){return ir(e)})),r=N(n,(function(e){return t?e:ro(e)}));return r}},{key:"allowKeyEventPropagation",value:function(e){var t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1,r=!1;return e===lo.ARROW_DOWN&&n>0&&n-1&&(r=!0),r}},{key:"onBeforeKeyDown",value:function(e){var n=this,r=ns.get(this);if(r.skipOne=!1,uo(e.keyCode)||e.keyCode===lo.BACKSPACE||e.keyCode===lo.DELETE||e.keyCode===lo.INSERT){var o=0;if(e.keyCode===lo.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(o+=10),this.htEditor&&this.hot._registerTimeout((function(){n.queryChoices(n.TEXTAREA.value),r.skipOne=!0}),o)}Za(es(t.prototype),"onBeforeKeyDown",this).call(this,e)}}],r&&$a(n.prototype,r),t}(Ka);rs.sortByRelevance=function(e,t,n){var r,o,i,a,s=[],l=e.length,u=[],c=t.length;if(0===l){for(a=0;at.charsLeft)return 1}return 0})),a=0,c=s.length;a0&&void 0!==arguments[0]?arguments[0]:null;ms(ps(t.prototype),"open",this).call(this),this.showDatepicker(e)}},{key:"close",value:function(){var e=this;this._opened=!1,this.instance._registerTimeout((function(){e.instance._refreshBorders()})),ms(ps(t.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 r=this.originalValue;void 0!==r&&this.setValue(r)}this.hideDatepicker(),ms(ps(t.prototype),"finishEditing",this).call(this,e,n)}},{key:"showDatepicker",value:function(e){this.$datePicker.config(this.getDatePickerConfig());var t,n=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,o=this.$datePicker.config(),i=this.instance.view.isMouseDown(),a=!!e&&co(e.keyCode);this.datePickerStyle.top="".concat(this.hot.rootWindow.pageYOffset+n.top+It(this.TD),"px"),this.datePickerStyle.left="".concat(this.hot.rootWindow.pageXOffset+n.left,"px"),this.$datePicker._onInputFocus=function(){},o.format=r,this.originalValue?(t=this.originalValue,Kn()(t,r,!0).isValid()&&this.$datePicker.setMoment(Kn()(t,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),a||i||this.setValue("")):this.cellProperties.defaultDate?(t=this.cellProperties.defaultDate,o.defaultDate=t,Kn()(t,r,!0).isValid()&&this.$datePicker.setMoment(Kn()(t,r),!0),a||i||this.setValue("")):this.$datePicker.gotoToday(),this.datePickerStyle.display="block",this.$datePicker.show()}},{key:"hideDatepicker",value:function(){this.datePickerStyle.display="none",this.$datePicker.hide()}},{key:"getDatePickerConfig",value:function(){var e=this,t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&q(n,this.cellProperties.datePickerConfig);var r=n.onSelect,o=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.format=n.format||this.defaultDateFormat,n.reposition=n.reposition||!1,n.onSelect=function(t){var n=t;isNaN(n.getTime())||(n=Kn()(n).format(e.cellProperties.dateFormat||e.defaultDateFormat)),e.setValue(n),e.hideDatepicker(),r&&r()},n.onClose=function(){e.parentDestroyed||e.finishEditing(!1),o&&o()},n}}],r&&ds(n.prototype,r),t}(Ba);const gs=vs;function ws(e){return ws="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},ws(e)}function bs(e,t){for(var n=0;n0&&(s-=1),parseInt(h.borderLeftWidth,10)>0&&(a-=1),c.height="".concat(s,"px"),c.minWidth="".concat(a,"px"),c.top="".concat(l,"px"),c.left="".concat(u,"px"),c.margin="0px",wt(this.select,Ws)}else this.close()}},{key:"onBeforeKeyDown",value:function(){var e=this.select.selectedIndex-1,t=this.select.selectedIndex+1;switch(event.keyCode){case lo.ARROW_UP:e>=0&&(this.select[e].selected=!0),jr(event),event.preventDefault();break;case lo.ARROW_DOWN:t<=this.select.length-1&&(this.select[t].selected=!0),jr(event),event.preventDefault()}}}],r&&Ys(n.prototype,r),t}(Ta);const Vs=Bs;var Us=new WeakMap,zs=O("editors"),Gs=zs.register,qs=zs.getItem,Xs=zs.hasItem,Ks=zs.getNames;function Js(e){var t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},ce.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function $s(e,t){var n;if("function"==typeof e)Us.get(e)||Zs(null,e),n=Us.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=qs(e)}if(!n)throw Error('No editor registered under name "'.concat(e,'"'));return n.getInstance(t)}function Qs(e){if(!Xs(e))throw Error('No registered editor found under "'.concat(e,'" name'));return qs(e).getConstructor()}function Zs(e,t){var n=new Js(t);"string"==typeof e&&Gs(e,n),Us.set(t,n)}zs.getValues,Zs("base",Ta),Zs("autocomplete",os),Zs("checkbox",us),Zs("date",gs),Zs("dropdown",Cs),Zs("handsontable",Ka),Zs("numeric",Rs),Zs("password",Ps),Zs("select",Vs),Zs("text",Ba);var el=new WeakMap,tl=new WeakMap;function nl(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}var rl=n(28646),ol=n.n(rl);var il=O("renderers"),al=il.register,sl=il.getItem,ll=il.hasItem,ul=il.getNames;function cl(e){if("function"==typeof e)return e;if(!ll(e))throw Error('No registered renderer found under "'.concat(e,'" name'));return sl(e)}function hl(e,t){var n=e;return function(e){for(var r=!1,o=0,i=e.length;o7?c-7:0),f=7;f7?l-7:0),c=7;c0&&void 0!==arguments[0]&&arguments[0],n=e.getSelectedRangeLast();if(n){for(var r=n.getTopLeftCorner(),o=r.row,i=r.col,a=n.getBottomRightCorner(),s=a.row,l=a.col,u=[],c=o;c<=s;c+=1)for(var h=i;h<=l;h+=1){var f=e.getCellMeta(c,h);if("checkbox"!==f.type)return;if(!0!==f.readOnly){void 0===f.checkedTemplate&&(f.checkedTemplate=!0),void 0===f.uncheckedTemplate&&(f.uncheckedTemplate=!1);var d=e.getDataAtCell(c,h);!1===t?[f.checkedTemplate,f.checkedTemplate.toString()].includes(d)?u.push([c,h,f.uncheckedTemplate]):[f.uncheckedTemplate,f.uncheckedTemplate.toString(),null,void 0].includes(d)&&u.push([c,h,f.checkedTemplate]):u.push([c,h,f.uncheckedTemplate])}}u.length>0&&e.setDataAtCell(u)}}t.appendChild(h),d&&t.appendChild(s.createTextNode("#bad-value#")),el.has(e)||(el.set(e,!0),e.addHook("beforeKeyDown",(function(t){var n="SPACE|ENTER",r="DELETE|BACKSPACE",o=un(mo,t.keyCode);!e.getSettings().enterBeginsEditing&&o("ENTER")||(o("".concat(n,"|").concat(r))&&!Fr(t)&&function(t){var n=e.getSelectedRangeLast();if(n)for(var r=n.getTopLeftCorner(),o=n.getBottomRightCorner(),i=r.row;i<=o.row;i++)for(var a=r.col;a<=o.col;a++){var s=e.getCellMeta(i,a);if("checkbox"!==s.type)return;var l=e.getCell(i,a);if(null==l)t();else{var u=l.querySelectorAll("input[type=checkbox]");u.length>0&&!s.readOnly&&t()}}}((function(){jr(t),t.preventDefault()})),o(n)&&v(),o(r)&&v(!0))})))})),al("html",(function(e,t,n,r,o,i){for(var a=arguments.length,s=new Array(a>6?a-6:0),l=6;l7?s-7:0),u=7;u7?s-7:0),u=7;u-1;return(n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||o?n:r).format(t)}(r,this.dateFormat),l=this.instance.runHooks("unmodifyRow",this.row),u=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(l,u,s,"dateValidator"),o=!0}else o=!1;t(o)})),pl("numeric",(function(e,t){var n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&Oa(e))})),pl("time",(function(e,t){var n=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=Kn()(o,dl,!0).isValid()?Kn()(o):Kn()(o,n),s=a.isValid(),l=Kn()(o,n,!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(n),c=this.instance.runHooks("unmodifyRow",this.row),h=this.instance.runHooks("unmodifyCol",this.col);this.instance.setDataAtCell(c,h,u,"timeValidator"),r=!0}else r=!1;t(r)}));var bl="autocomplete";const _l={editor:Qs(bl),renderer:cl(bl),validator:wl(bl)};var Ml="checkbox";const kl={editor:Qs(Ml),renderer:cl(Ml)};var Sl="date";const Cl={editor:Qs(Sl),renderer:cl("autocomplete"),validator:wl(Sl)},Tl={editor:Qs("dropdown"),renderer:cl("autocomplete"),validator:wl("autocomplete")},El={editor:Qs("handsontable"),renderer:cl("autocomplete")};var Ol="numeric";const Rl={editor:Qs(Ol),renderer:cl(Ol),validator:wl(Ol),dataType:"number"};var Ll="password";const Dl={editor:Qs(Ll),renderer:cl(Ll),copyable:!1};var Al="text";const Hl={editor:Qs(Al),renderer:cl(Al)},Nl={editor:Qs("text"),renderer:cl("text"),validator:wl("time")};var Pl=O("cellTypes"),xl=Pl.register,Yl=Pl.getItem,Il=Pl.hasItem,jl=Pl.getNames;function Fl(e){if(!Il(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 "Handsontable.cellTypes.registerCellType" method'));return Yl(e)}function Wl(e,t){var n=t.editor,r=t.renderer,o=t.validator;n&&Zs(e,n),r&&al(e,r),o&&pl(e,o),xl(e,t)}function Bl(e,t){function n(){}z(n,e);for(var r=0,o=t.length;r0;)t=(n-1)%zl,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/zl,10);return r}function ql(e){var t=0;if(e)for(var n=0,r=e.length-1;n0&&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;ethis.delay&&(this._then=e-t%this.delay,this.func())}else this.func()}}]),e}();function nu(e){return nu="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},nu(e)}function ru(e,t){for(var n=0;n0?s:this.instance.countSourceCols(),a=!0),e=0;e1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,o=0,i=e;if(("number"!=typeof i||i>=this.instance.countSourceRows())&&(i=this.instance.countSourceRows()),!1===this.instance.runHooks("beforeCreateRow",i,n,r))return 0;for(var a=this.instance.getSettings().maxRows,s=this.instance.countCols(),l=function(){var e=null;"array"===t.instance.dataType?t.instance.getSettings().dataSchema?e=X(t.getSchema()):(e=[],Ra(s-1,(function(){return e.push(null)}))):"function"===t.instance.dataType?e=t.instance.getSettings().dataSchema(i):q(e={},t.getSchema()),i===t.instance.countSourceRows()?t.dataSource.push(e):t.spliceData(i,0,e),o+=1};o1&&void 0!==arguments[1]?arguments[1]:1,n=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,o=this.instance.countSourceRows(),i=this.dataSource,a=this.instance.countCols(),s="number"!=typeof e||e>=a?a:e,l=0;if(!1===this.instance.runHooks("beforeCreateCol",s,t,n))return 0;r=s;for(var u=this.instance.getSettings().maxCols;l=this.instance.countCols()){if(o>0)for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r="number"!=typeof e?-t:e,o=this.instance.runHooks("modifyRemovedAmount",t,r),i=this.instance.countSourceRows();r=(i+r)%i;var a=this.visualRowsToPhysical(r,o);if(!1!==this.instance.runHooks("beforeRemoveRow",r,o,a,n)){var s=this.dataSource,l=this.filterData(r,o);l&&(s.length=0,Array.prototype.push.apply(s,l)),this.instance.runHooks("afterRemoveRow",r,o,a,n),this.instance.forceFullRender=!0}}},{key:"removeCol",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.instance.getSettings().columns)throw new Error("cannot remove column with object data source or columns option specified");var r="number"!=typeof e?-t:e;r=(this.instance.countCols()+r)%this.instance.countCols();var o=this.visualColumnsToPhysical(r,t),i=o.slice(0).sort((function(e,t){return t-e}));if(!1!==this.instance.runHooks("beforeRemoveCol",r,t,o,n)){for(var a=!0,s=i.length,l=this.dataSource,u=0;u3?a-3:0),l=3;l3?a-3:0),l=3;l-1){var a=t.split("."),s=r;if(!s)return null;for(var l=0,u=a.length;l-1){var u,c=t.split("."),h=a,f=0;for(f=0,u=c.length-1;f0?o[0].length:0,s=["","
"],l=t?["",""]:[],u=["",""],c=n?1:0,h=t?1:0,f=0;f".concat(e.getColHeader(p-c),"");else if(y)v="".concat(e.getRowHeader(f-h),"");else{var g=o[f][p],w=e.getCellMeta(f-c,p-h),b=w.hidden,_=w.rowspan,M=w.colspan;if(!b){var k=[];if(_&&k.push('rowspan="'.concat(_,'"')),M&&k.push('colspan="'.concat(M,'"')),lr(g))v="");else{var S=g.toString().replace(/((\r\n|\n)?|\r\n|\n)/g,"
\r\n").replace(/\x20/gi," ").replace(/\t/gi," ");v="").concat(S,"")}}}m.push(v)}var C=[""].concat(m,[""]).join("");d?l.splice(1,0,C):u.splice(-1,0,C)}return s.splice(1,0,l.join(""),u.join("")),s.join("")}function mu(e){for(var t=e.length,n=[""],r=0;r");for(var s=0;s(\r\n|\n)?|\r\n|\n)/g,"
\r\n").replace(/\x20/gi," ").replace(/\t/gi," ");a.push("
"))}n.push.apply(n,[""].concat(a,[""])),r+1===t&&n.push("")}return n.push("
".concat(u,"
"),n.join("")}function pu(e,t){var n;return e.msMatchesSelector?n=e.msMatchesSelector(t):e.matches&&(n=e.matches(t)),n}function yu(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n={},r=t.createDocumentFragment(),o=t.createElement("div");r.appendChild(o);var i=e;if("string"==typeof i&&(o.insertAdjacentHTML("afterbegin","".concat(i)),i=o.querySelector("table")),i&&function(e){return"TABLE"===(e&&e.nodeName||"")}(i)){var a=o.querySelector("style"),s=null,l=[];a&&(t.body.appendChild(a),a.disabled=!0,s=a.sheet,l=s?Array.from(s.cssRules):[],t.body.removeChild(a));var u,c=o.querySelector('meta[name$="enerator"]'),h=null!==i.querySelector("tbody th"),f=Array.from(i.querySelector("tr").cells).reduce((function(e,t){return e+t.colSpan}),0)-(h?1:0),d=i.tFoot&&Array.from(i.tFoot.rows)||[],m=[],p=!1,y=0;if(i.tHead){var v=Array.from(i.tHead.rows).filter((function(e){var t=null!==e.querySelector("td");return t&&m.push(e),!t}));p=(y=v.length)>0,y>1?n.nestedHeaders=Array.from(v).reduce((function(e,t){var n=Array.from(t.cells).reduce((function(e,t,n){if(h&&0===n)return e;var r=t.colSpan,o=t.innerHTML,i=r>1?{label:o,colspan:r}:o;return e.push(i),e}),[]);return e.push(n),e}),[]):p&&(n.colHeaders=Array.from(v[0].children).reduce((function(e,t,n){return h&&0===n||e.push(t.innerHTML),e}),[]))}m.length&&(n.fixedRowsTop=m.length),d.length&&(n.fixedRowsBottom=d.length);var g=[].concat(m,fu(Array.from(i.tBodies).reduce((function(e,t){return e.push.apply(e,fu(Array.from(t.rows))),e}),[])),fu(d));u=g.length;for(var w=new Array(u),b=0;b1||i>1){for(var s=k;s/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/ /gi," "):c&&/excel/gi.test(c.content)?w[k][a]=r.replace(/[\r\n]?[\x20]{0,2}/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/ /gi," "):w[k][a]=r.replace(/[\r\n]?/gim,"\r\n").replace(/(<([^>]+)>)/gi,"").replace(/ /gi," ")}else M.push(r)},O=0;O=0&&o.col>=0&&!a.cells?i.setRangeEnd(o):(l||u)&&o.row>=0&&o.col>=0&&!a.cells?i.setRangeEnd(new Me(o.row,o.col)):l&&o.row<0&&!a.column?i.setRangeEnd(new Me(s.to.row,o.col)):u&&o.col<0&&!a.row?i.setRangeEnd(new Me(o.row,s.to.col)):(!l&&!u&&o.col<0||l&&o.col<0)&&!a.row?i.selectRows(s.from.row,o.row):(!l&&!u&&o.row<0||u&&o.row<0)&&!a.column&&i.selectColumns(s.from.col,o.col);else{var c=new Me(o.row,o.col);c.row<0&&(c.row=0),c.col<0&&(c.col=0);var h=!i.inInSelection(c),f=n||r&&h;o.row<0&&o.col>=0&&!a.column?f&&i.selectColumns(o.col):o.col<0&&o.row>=0&&!a.row?f&&i.selectRows(o.row):o.col>=0&&o.row>=0&&!a.cells?f&&i.setRangeStart(o):o.col<0&&o.row<0&&i.setRangeStart(o)}}var bu=new Map([["mousedown",wu],["mouseover",function(e){var t=e.isLeftClick,n=e.coords,r=e.selection,o=e.controller;if(t){var i=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),s=r.tableProps.countCols(),l=r.tableProps.countRows();a&&!o.column?r.setRangeEnd(new Me(l-1,n.col)):i&&!o.row?r.setRangeEnd(new Me(n.row,s-1)):o.cell||r.setRangeEnd(n)}}],["touchstart",wu]]);function _u(e,t){var n=t.coords,r=t.selection,o=t.controller;bu.get(e.type)({coords:n,selection:r,controller:o,isShiftKey:e.shiftKey,isLeftClick:zr(e)||"touchstart"===e.type,isRightClick:Ur(e)})}function Mu(e,t){for(var n=0;n0||"auto"===n){var r=e.instance.countRows();if("number"==typeof n)t.startRow=Math.max(t.startRow-n,0),t.endRow=Math.min(t.endRow+n,r-1);else if("auto"===n){var o=t.startRow+t.endRow-t.startRow,i=Math.ceil(o/r*12);t.startRow=Math.max(t.startRow-i,0),t.endRow=Math.min(t.endRow+i,r-1)}}e.instance.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:function(t){var n=e.settings.viewportColumnRenderingOffset;if("auto"===n&&e.settings.fixedColumnsLeft&&(n=10),n>0||"auto"===n){var r=e.instance.countCols();if("number"==typeof n&&(t.startColumn=Math.max(t.startColumn-n,0),t.endColumn=Math.min(t.endColumn+n,r-1)),"auto"===n){var o=t.startColumn+t.endColumn-t.startColumn,i=Math.ceil(o/r*12);t.startRow=Math.max(t.startColumn-i,0),t.endColumn=Math.min(t.endColumn+i,r-1)}}e.instance.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:function(){return e.settings.rowHeaderWidth},columnHeaderHeight:function(){var t=e.instance.runHooks("modifyColumnHeaderHeight");return e.settings.columnHeaderHeight||t}};this.instance.runHooks("beforeInitWalkontable",n),this.wt=new Ro(n),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&&Wr(e)})),this.eventManager.addEventListener(r,"contextmenu",(function(e){e.target===r&&3===e.which&&Wr(e)})),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(en(e))return!0;var t=ut(e,this.instance.view.wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell())}},{key:"isMouseDown",value:function(){return ku.get(this).mouseDown}},{key:"isSelectedOnlyCell",value:function(){var e,t,n=(e=this.instance.getSelectedLast()||[],t=4,function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),r=n[0],o=n[1],i=n[2],a=n[3];return void 0!==r&&r===i&&o===a}},{key:"isCellEdited",value:function(){var e=this.instance.getActiveEditor();return e&&e.isOpened()}},{key:"beforeRender",value:function(e,t){e&&this.instance.runHooks("beforeRender",this.instance.forceFullRender,t)}},{key:"onDraw",value:function(e){e&&this.instance.runHooks("afterRender",this.instance.forceFullRender)}},{key:"appendRowHeader",value:function(e,t){if(t.firstChild){var n=t.firstChild;if(!gt(n,"relative"))return Mt(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.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),t.appendChild(a)}this.instance.runHooks("afterGetRowHeader",e,t)}},{key:"appendColHeader",value:function(e,t){if(t.firstChild){var n=t.firstChild;gt(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,this.instance.getColHeader):(Mt(t),this.appendColHeader(e,t))}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),t.appendChild(o)}this.instance.runHooks("afterGetColHeader",e,t)}},{key:"updateCellHeader",value:function(e,t,n){var r=t,o=this.wt.wtOverlays.getParentOverlay(e)||this.wt;e.parentNode&&(gt(e,"colHeader")?r=o.wtTable.columnFilter.sourceToRendered(t):gt(e,"rowHeader")&&(r=o.wtTable.rowFilter.sourceToRendered(t))),r>-1?Ct(e,n(t)):(Tt(e,String.fromCharCode(160)),wt(e,"cornerHeader"))}},{key:"maximumVisibleElementWidth",value:function(e){var t=this.wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}},{key:"maximumVisibleElementHeight",value:function(e){var t=this.wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}},{key:"setLastSize",value:function(e,t){var n=ku.get(this),r=[e,t];n.lastWidth=r[0],n.lastHeight=r[1]}},{key:"getLastSize",value:function(){var e=ku.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()}}],n&&Mu(t.prototype,n),e}();const Cu=Su;function Tu(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.data=n,this.dataType="array",this.colToProp=function(){},this.propToCol=function(){}}var t,n;return t=e,n=[{key:"getData",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data;return e&&(t=this.getByRange({row:0,col:0},{row:Math.max(this.countRows()-1,0),col:Math.max(this.countColumns()-1,0)},!0)),t}},{key:"setData",value:function(e){this.data=e}},{key:"getAtColumn",value:function(e){var t=this,n=[];return P(this.data,(function(r){var o,i=t.colToProp(e);o="string"==typeof i?te(r,i):"function"==typeof i?i(r):r[i],n.push(o)})),n}},{key:"getAtRow",value:function(e){return this.data[e]}},{key:"getAtCell",value:function(e,t){var n=null,r=this.hot.runHooks("modifyRowData",e),o=isNaN(r)?r:this.data[e];if(o){var i=this.colToProp(t);n="string"==typeof i?te(o,i):"function"==typeof i?i(this.data.slice(e,e+1)[0]):o[i]}return n}},{key:"getByRange",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=Math.min(e.row,t.row),i=Math.min(e.col,t.col),a=Math.max(e.row,t.row),s=Math.max(e.col,t.col),l=[];return Ra(o,a,(function(e){var t,o=n.getAtRow(e);"array"===n.dataType?t=o.slice(i,s+1):"object"===n.dataType&&(t=r?[]:{},Ra(i,s,(function(e){var i=n.colToProp(e);r?t.push(o[i]):t[i]=o[i]}))),l.push(t)})),l}},{key:"countRows",value:function(){return Array.isArray(this.data)?this.data.length:0}},{key:"countColumns",value:function(){var e=0;return Array.isArray(this.data)&&("array"===this.dataType?e=this.data[0].length:"object"===this.dataType&&(e=Object.keys(this.data[0]).length)),e}},{key:"destroy",value:function(){this.data=null,this.hot=null}}],n&&Tu(t.prototype,n),e}();const Ou=Eu;function Ru(e,t){for(var n=0;n0&&(Dh-=1),0===Dh&&(Rh.clearEvents(),Lh.clear(),Dh=0)}function Nh(){return Array.from(Lh.values()).some((function(e){return fo(e)}))}n(32982),n(3101);var Ph=O("highlight/types"),xh=Ph.register,Yh=Ph.getItem;function Ih(e,t){return Yh(e)(t)}function jh(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);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,t=this.layerLevel;return this.areas.has(t)?e=this.areas.get(t):(e=Ih(Uh,Wh({layerLevel:t},this.options)),this.areas.set(t,e)),e}},{key:"getAreas",value:function(){return jh(this.areas.values())}},{key:"createOrGetHeader",value:function(){var e,t=this.layerLevel;return this.headers.has(t)?e=this.headers.get(t):(e=Ih(Gh,Wh({},this.options)),this.headers.set(t,e)),e}},{key:"getHeaders",value:function(){return jh(this.headers.values())}},{key:"createOrGetActiveHeader",value:function(){var e,t=this.layerLevel;return this.activeHeaders.has(t)?e=this.activeHeaders.get(t):(e=Ih("active-header",Wh({},this.options)),this.activeHeaders.set(t,e)),e}},{key:"getActiveHeaders",value:function(){return jh(this.activeHeaders.values())}},{key:"getCustomSelections",value:function(){return jh(this.customSelections.values())}},{key:"addCustomSelection",value:function(e){this.customSelections.push(Ih("custom-selection",Wh({},e)))}},{key:"clear",value:function(){this.cell.clear(),this.fill.clear(),P(this.areas.values(),(function(e){e.clear()})),P(this.headers.values(),(function(e){e.clear()})),P(this.activeHeaders.values(),(function(e){e.clear()}))}},{key:Symbol.iterator,value:function(){return[this.cell,this.fill].concat(jh(this.areas.values()),jh(this.headers.values()),jh(this.activeHeaders.values()),jh(this.customSelections))[Symbol.iterator]()}}],n&&Vh(t.prototype,n),e}();const Xh=qh;function Kh(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=this.size()+t-1;return n>=0&&(e=this.ranges[n]),e}},{key:Symbol.iterator,value:function(){return this.ranges[Symbol.iterator]()}}],n&&Kh(t.prototype,n),e}();const $h=Jh;var Qh={_localHooks:Object.create(null),addLocalHook:function(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;oo-1?n&&s>0&&!(a&&h.row>=o-a-1)?(this.runLocalHooks("insertRowRequire",o),o=this.options.countRows()):c&&(r.row=1-o,r.col=h.col+r.col===i-1?1-i:1):c&&h.row+r.row<0&&h.col+r.col>=0&&(r.row=o-1,r.col=h.col+r.col===0?i-1:-1),h.col+r.col>i-1?n&&l>0?(this.runLocalHooks("insertColRequire",i),i=this.options.countCols()):u&&(r.row=h.row+r.row===o-1?1-o:1,r.col=1-i):u&&h.col+r.col<0&&h.row+r.row>=0&&(r.row=h.row+r.row===0?o-1:-1,r.col=i-1);var f=new Me(h.row+r.row,h.col+r.col),d=0,m=0;return f.row<0?(d=-1,f.row=0):f.row>0&&f.row>=o&&(d=1,f.row=o-1),f.col<0?(m=-1,f.col=0):f.col>0&&f.col>=i&&(m=1,f.col=i-1),this.runLocalHooks("afterTransformStart",f,d,m),f}},{key:"transformEnd",value:function(e,t){var n=new Me(e,t);this.runLocalHooks("beforeTransformEnd",n);var r=this.options.countRows(),o=this.options.countCols(),i=this.range.current(),a=new Me(i.to.row+n.row,i.to.col+n.col),s=0,l=0;return a.row<0?(s=-1,a.row=0):a.row>0&&a.row>=r&&(s=1,a.row=r-1),a.col<0?(l=-1,a.col=0):a.col>0&&a.col>=o&&(l=1,a.col=o-1),this.runLocalHooks("afterTransformEnd",a,s,l),a}}])&&ef(t.prototype,n),e}();J(tf,Zh);const nf=tf;function rf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function of(e){return of="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},of(e)}var af=[3,2],sf=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],lf=Symbol("root"),uf=Symbol("child");function cf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:lf;if(t!==lf&&t!==uf)throw new Error("The second argument is used internally only and cannot be overwritten.");var n=Array.isArray(e),r=t===lf,o=0;if(n){var i=e[0];if(0===e.length)o=1;else if(r&&i instanceof Ce)o=3;else if(r&&Array.isArray(i))o=cf(i,uf);else if(e.length>=2&&e.length<=4){var a=!e.some((function(e,t){return!sf[t].includes(of(e))}));a&&(o=2)}}return o}function hf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.keepDirection,r=void 0!==n&&n,o=t.propToCol;if(!af.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(t){var n=3===e,i=n?t.from.row:t[0],a=n?t.from.col:t[1],s=n?t.to.row:t[2],l=n?t.to.col:t[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof l&&(l=o(l))),sr(s)&&(s=i),sr(l)&&(l=a),!r){var u=i,c=a,h=s,f=l;i=Math.min(u,h),a=Math.min(c,f),s=Math.max(u,h),l=Math.max(c,f)}return[i,a,s,l]}}function ff(e){return"number"==typeof e&&e>=0&&e<(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0)}function df(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function mf(){var e,t,n=(e=["Unsupported format of the selection ranges was passed. To select cells pass \n the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd, columnEnd/columnPropEnd]]) \n or as an array of CellRange objects."],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return mf=function(){return n},n}function pf(e,t){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],r="multiple"===this.settings.selectionMode,o=sr(t)?Nh():t,i=e.row<0,a=e.col<0,s=i&&a;i&&(e.row=0),a&&(e.col=0),this.selectedByCorner=s,this.runLocalHooks("beforeSetRangeStart".concat(n?"Only":""),e),(!r||r&&!o&&sr(t))&&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()),n||this.setRangeEnd(e)}},{key:"setRangeStartOnly",value:function(e,t){this.setRangeStart(e,t,!0)}},{key:"setRangeEnd",value:function(e){if(!this.selectedRange.isEmpty()){this.runLocalHooks("beforeSetRangeEnd",e),this.begin();var t=this.selectedRange.current();"single"!==this.settings.selectionMode&&t.setTo(new Me(e.row,e.col)),this.highlight.getCell().clear(),this.highlight.isEnabledFor(zh)&&this.highlight.getCell().add(this.selectedRange.current().highlight);var n=this.getLayerLevel();n=1)&&(r.add(t.from).add(t.to),1===n&&(this.highlight.useLayerLevel(n-1).createOrGetArea().add(this.selectedRange.previous().from),this.highlight.useLayerLevel(n))),this.highlight.isEnabledFor(Gh)&&("single"===this.settings.selectionMode?o.add(t.highlight):o.add(t.from).add(t.to)),this.isSelectedByRowHeader()&&this.tableProps.countCols()===t.getWidth()&&i.add(new Me(t.from.row,-1)).add(new Me(t.to.row,-1)),this.isSelectedByColumnHeader()&&this.tableProps.countRows()===t.getHeight()&&i.add(new Me(-1,t.from.col)).add(new Me(-1,t.to.col)),this.runLocalHooks("afterSetRangeEnd",e)}}},{key:"isMultiple",value:function(){var e=re(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}},{key:"transformStart",value:function(e,t,n){this.setRangeStart(this.transformation.transformStart(e,t,n))}},{key:"transformEnd",value:function(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}},{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-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-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e)}},{key:"isSelectedByAnyHeader",value:function(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)}},{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(){this.clear(),this.setRangeStart(new Me(-1,-1)),this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(new Me(this.tableProps.countRows()-1,this.tableProps.countCols()-1))}},{key:"selectCells",value:function(e){var t=this,n=cf(e);if(1===n)return!1;if(0===n)throw new Error(Jn(mf()));var r=hf(n,{propToCol:function(e){return t.tableProps.propToCol(e)},keepDirection:!0}),o=this.tableProps.countRows(),i=this.tableProps.countCols(),a=!e.some((function(e){var t=df(r(e),4),n=t[0],a=t[1],s=t[2],l=t[3];return!(ff(n,o)&&ff(a,i)&&ff(s,o)&&ff(l,i))}));return a&&(this.clear(),P(e,(function(e){var n=df(r(e),4),o=n[0],i=n[1],a=n[2],s=n[3];t.setRangeStartOnly(new Me(o,i),!1),t.setRangeEnd(new Me(a,s)),t.finish()}))),a}},{key:"selectColumns",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n="string"==typeof e?this.tableProps.propToCol(e):e,r="string"==typeof t?this.tableProps.propToCol(t):t,o=this.tableProps.countCols(),i=ff(n,o)&&ff(r,o);return i&&(this.setRangeStartOnly(new Me(-1,n)),this.setRangeEnd(new Me(this.tableProps.countRows()-1,r)),this.finish()),i}},{key:"selectRows",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.tableProps.countRows(),r=ff(e,n)&&ff(t,n);return r&&(this.setRangeStartOnly(new Me(e,-1)),this.setRangeEnd(new Me(t,this.tableProps.countCols()-1)),this.finish()),r}}],n&&pf(t.prototype,n),e}();J(yf,Zh);const vf=yf;function gf(e){return gf="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},gf(e)}function wf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function bf(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&void 0!==arguments[2]&&arguments[2],f=!1,d=this,m=function(){},p=new Jr(d);G(m.prototype,Fu.prototype),G(m.prototype,t),G(m.prototype,k(t)),s=m.prototype,Sh(u=Bu(l=t.language))?s.language=u:(s.language=yh,Vu(l)),xu(h)&&Nu.set(this,!0),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,Ah(this.rootDocument),this.isDestroyed=!1,this.isHotTableEnv=ct(this.rootElement),Jr.isHotTableEnv=this.isHotTableEnv,this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),Yu(this)&&_r(t.licenseKey,e),this.guid="ht_".concat(Zr());var y=Hu(d);o=new Ou(d),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid),n={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width","language"],settings:new m,selRange:null,isPopulated:null,scrollable:null,firstRun:!0};var v=new vf(n.settings,{countCols:function(){return d.countCols()},countRows:function(){return d.countRows()},propToCol:function(e){return r.propToCol(e)},isEditorOpened:function(){return!!d.getActiveEditor()&&d.getActiveEditor().isOpened()}});function g(e){var t=Bu(e);Sh(t)?(d.runHooks("beforeLanguageChange",t),m.prototype.language=t,d.runHooks("afterLanguageChange",t)):Vu(e)}function w(){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 b(e,t,n){if(e.length){var o=d.getActiveEditor(),i=d.runHooks("beforeChange",e,t||"edit"),a=!0;if(rn(i))Mr("Your beforeChange callback returns a function. It's not supported since Handsontable 0.12.1 (and the returned function will not be executed).");else if(!1===i)return void(o&&o.cancelChanges());var s,l,u=new w,c=function(e){return e.length>0&&/^\s*[+-.]?\s*(?:(?:\d+(?:(\.|,)\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/.test(e)};u.onQueueEmpty=function(e){o&&a&&o.cancelChanges(),n(e)};for(var h=e.length-1;h>=0;h--)if(null===e[h])e.splice(h,1);else{var f=wf(e[h],4),m=f[0],p=f[1],y=f[3],v=r.propToCol(p),g=d.getCellMeta(m,v);"numeric"===g.type&&"string"==typeof y&&c(y)&&(e[h][3]=(void 0,l=(s=y).replace(",","."),!1===isNaN(parseFloat(l))?parseFloat(l):s)),d.getCellValidator(g)&&(u.addValidatorToQueue(),d.validateCell(e[h][3],g,function(t,n){return function(r){if("boolean"!=typeof r)throw new Error("Validation error: result is not boolean");if(!1===r&&!1===n.allowInvalid){a=!1,e.splice(t,1),n.valid=!0;var o=d.getCell(n.visualRow,n.visualCol);null!==o&&bt(o,d.getSettings().invalidCellClassName)}u.removeValidatorFormQueue()}}(h,g),t))}u.checkIfQueueIsEmpty()}}function _(e,t){var o=e.length-1;if(!(o<0)){for(;o>=0;o--){var s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(n.settings.allowInsertRow)for(;e[o][0]>d.countRows()-1;)if(0===r.createRow(void 0,void 0,t)){s=!0;break}if("array"===d.dataType&&(!n.settings.columns||0===n.settings.columns.length)&&n.settings.allowInsertColumn)for(;r.propToCol(e[o][1])>d.countCols()-1;)if(0===r.createCol(void 0,void 0,t)){s=!0;break}s||r.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}d.forceFullRender=!0,i.adjustRowsAndCols(),d.runHooks("beforeChangeRender",e,t),a.lockEditor(),d._refreshBorders(null),a.unlockEditor(),d.view.wt.wtOverlays.adjustElementsSize(),d.runHooks("afterChange",e,t||"edit");var l=d.getActiveEditor();l&&ar(l.refreshValue)&&l.refreshValue()}}function M(e,t,n){return"object"===gf(e)?e:[[e,t,n]]}function k(e){if(oe(e,"type")){var t,n={};for(var r in"object"===gf(e.type)?t=e.type:"string"==typeof e.type&&(t=Fl(e.type)),t)oe(t,r)&&!oe(e,r)&&(n[r]=t[r]);return n}}this.selection=v,this.selection.addLocalHook("beforeSetRangeStart",(function(e){c.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(function(e){c.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(function(e){c.runHooks("beforeSetRangeEnd",e),e.row<0&&(e.row=c.view.wt.wtTable.getFirstVisibleRow()),e.col<0&&(e.col=c.view.wt.wtTable.getFirstVisibleColumn())})),this.selection.addLocalHook("afterSetRangeEnd",(function(e){var t=re(!1),n=c.selection.getSelectedRange(),r=n.current(),o=r.from,i=r.to,a=n.size()-1;c.runHooks("afterSelection",o.row,o.col,i.row,i.col,t,a),c.runHooks("afterSelectionByProp",o.row,d.colToProp(o.col),i.row,d.colToProp(i.col),t,a);var s=c.selection.isSelectedByAnyHeader(),l=c.selection.selectedRange.current(),u=!0;f&&(u=!1),t.isTouched()&&(u=!t.value);var h=c.selection.isSelectedByRowHeader(),m=c.selection.isSelectedByColumnHeader();!1!==u&&(s?h?c.view.scrollViewportVertically(e.row):m&&c.view.scrollViewportHorizontally(e.col):l&&!c.selection.isMultiple()?c.view.scrollViewport(l.from):c.view.scrollViewport(e)),h&&m?wt(c.rootElement,["ht__selection--rows","ht__selection--columns"]):h?(bt(c.rootElement,"ht__selection--columns"),wt(c.rootElement,"ht__selection--rows")):m?(bt(c.rootElement,"ht__selection--rows"),wt(c.rootElement,"ht__selection--columns")):bt(c.rootElement,["ht__selection--rows","ht__selection--columns"]),c._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(function(e){var t=e.length-1,n=e[t],r=n.from,o=n.to;c.runHooks("afterSelectionEnd",r.row,r.col,o.row,o.col,t),c.runHooks("afterSelectionEndByProp",r.row,d.colToProp(r.col),o.row,d.colToProp(o.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(function(e){var t=c.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeModifyTransformStart",(function(e){c.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",(function(e,t,n){c.runHooks("afterModifyTransformStart",e,t,n)})),this.selection.addLocalHook("beforeModifyTransformEnd",(function(e){c.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",(function(e,t,n){c.runHooks("afterModifyTransformEnd",e,t,n)})),this.selection.addLocalHook("afterDeselect",(function(){a.destroyEditor(),c._refreshBorders(),bt(c.rootElement,["ht__selection--rows","ht__selection--columns"]),c.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(function(e){c.alter("insert_row",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(function(e){c.alter("insert_col",e,1,"auto")})),i={alter:function(e,t){var o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;function u(e,t,n,r){var o=N(new Array(n),(function(){return"array"===r?e=[]:"object"===r&&(e={}),e;var e}));o.unshift(t,0),e.splice.apply(e,bf(o))}var c=function(e){if(0===e.length)return[];var t=bf(e);return t.sort((function(e,t){var n=wf(e,1)[0],r=wf(t,1)[0];return n===r?0:n>r?1:-1})),A(t,(function(e,t){var n=wf(t,2),r=n[0],o=n[1],i=e[e.length-1],a=wf(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}),[t[0]])};switch(e){case"insert_row":var h=d.countSourceRows();if(d.getSettings().maxRows===h)return;t=ar(t)?t:h,o=r.createRow(t,a,s),u(n.cellSettings,t,a,"array"),o&&(v.isSelected()&&v.selectedRange.current().from.row>=t?(v.selectedRange.current().from.row+=o,v.transformEnd(o,0)):d._refreshBorders());break;case"insert_col":o=r.createCol(t,a,s);for(var f=0,m=d.countSourceRows();f=t?(v.selectedRange.current().from.col+=o,v.transformEnd(0,o)):d._refreshBorders()}break;case"remove_row":var g=function(e){var t=0;P(e,(function(e){var o=wf(e,2),i=o[0],l=o[1],u=lr(i)?d.countRows()-1:Math.max(i-t,0);Number.isInteger(i)&&(i=Math.max(i-t,0)),r.removeRow(i,l,s),n.cellSettings.splice(u,a);var c=d.countRows(),h=d.getSettings().fixedRowsTop;h>=u+1&&(d.getSettings().fixedRowsTop-=Math.min(l,h-u));var f=d.getSettings().fixedRowsBottom;f&&u>=c-f&&(d.getSettings().fixedRowsBottom-=Math.min(l,f)),t+=l}))};Array.isArray(t)?g(c(t)):g([[t,a]]),i.adjustRowsAndCols(),d._refreshBorders();break;case"remove_col":var w=function(e){var t=0;P(e,(function(e){var o=wf(e,2),i=o[0],a=o[1],l=lr(i)?d.countCols()-1:Math.max(i-t,0),u=y.toPhysicalColumn(l);Number.isInteger(i)&&(i=Math.max(i-t,0)),r.removeCol(i,a,s);for(var c=0,h=d.countSourceRows();c=l+1&&(d.getSettings().fixedColumnsLeft-=Math.min(a,f-l)),Array.isArray(d.getSettings().colHeaders)&&(void 0===u&&(u=-1),d.getSettings().colHeaders.splice(u,a)),t+=a}))};Array.isArray(t)?w(c(t)):w([[t,a]]),i.adjustRowsAndCols(),d._refreshBorders();break;default:throw new Error('There is no such action "'.concat(e,'"'))}l||i.adjustRowsAndCols()},adjustRowsAndCols:function(){if(n.settings.minRows){var e=d.countRows();if(es-1?(t=!0,o>(n=s-1)&&(o=n)):o>s-1&&(t=!0,n>(o=s-1)&&(n=o)),r>l-1?(t=!0,i>(r=l-1)&&(i=r)):i>l-1&&(t=!0,r>(i=l-1)&&(r=i)),t&&d.selectCell(n,r,o,i)})),d.view&&d.view.wt.wtOverlays.adjustElementsSize()},populateFromArray:function(e,t,r,o,i,a,s){var l,u,c,h,f,m,p,y,v=[],g={};if(0===(u=t.length))return!1;switch(i){case"shift_down":for(f=r?r.col-e.col+1:0,m=r?r.row-e.row+1:0,c=0,h=(t=$l(t)).length,p=Math.max(h,f);c1&&void 0!==arguments[1]?arguments[1]:null,r=t[e%t.length];return null!==n?r[n%r.length]:r},R=t.length,L=r?r.row-e.row+1:0;for(u=r?L:Math.max(R,L),l=0;lr.row&&L>R||!n.settings.allowInsertRow&&g.row>d.countRows()-1||g.row>=n.settings.maxRows);l++){var D=l-C,A=O(D).length,H=r?r.col-e.col+1:0;if(h=r?H:Math.max(A,H),g.col=e.col,k=d.getCellMeta(g.row,g.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!k.skipRowOnPaste){for(T=0,c=0;cr.col&&H>A||!n.settings.allowInsertColumn&&g.col>d.countCols()-1||g.col>=n.settings.maxCols);c++)if(k=d.getCellMeta(g.row,g.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!k.skipColumnOnPaste)if(k.readOnly)g.col+=1;else{var N=c-T,P=O(D,N),x=d.getDataAtCell(g.row,g.col),Y={row:D,col:N};if("Autofill.fill"===o){var I=d.runHooks("beforeAutofillInsidePopulate",Y,a,t,s,{},S);I&&(P=sr(I.value)?P:I.value)}null!==P&&"object"===gf(P)?(Array.isArray(P)&&null===x&&(x=[]),null===x||"object"!==gf(x)?E=!1:$(U(Array.isArray(x)?x:x[0]||x),U(Array.isArray(P)?P:P[0]||P))?P=X(P):E=!1):null!==x&&"object"===gf(x)&&(E=!1),E&&v.push([g.row,g.col,P]),E=!0,g.col+=1}else T+=1,g.col+=1,h+=1;g.row+=1}else C+=1,g.row+=1,u+=1}d.setDataAtCell(v,null,null,o||"populateFromArray")}}},this.init=function(){o.setData(n.settings.data),d.runHooks("beforeInit"),Pe()&&wt(d.rootElement,"mobile"),this.updateSettings(n.settings,!0),this.view=new Cu(this),a=hu.getInstance(d,n,v,r),this.forceFullRender=!0,d.runHooks("init"),this.view.render(),"object"===gf(n.firstRun)&&(d.runHooks("afterChange",n.firstRun[0],n.firstRun[1]),n.firstRun=!1),d.runHooks("afterInit")},this.validateCell=function(e,t,n,r){var o,i=d.getCellValidator(t);function a(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!0===t.hidden)n(e);else{var r=t.visualCol,o=t.visualRow,i=d.getCell(o,r,!0);i&&"TH"!==i.nodeName&&d.view.wt.wtSettings.settings.cellRenderer(o,r,i),n(e)}}ur(i)&&(o=i,i=function(e,t){t(o.test(e))}),rn(i)?(e=d.runHooks("beforeValidate",e,t.visualRow,t.prop,r),d._registerImmediate((function(){i.call(t,e,(function(n){d&&(n=d.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),d.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))}))}))):d._registerImmediate((function(){t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,n,i){var a,s,l,u=M(e,t,n),c=[],h=i;for(a=0,s=u.length;a0&&void 0!==arguments[0])||arguments[0],t=d.rootDocument;if(e){var n=!t.activeElement||t.activeElement&&void 0===t.activeElement.nodeName;t.activeElement&&t.activeElement!==t.body&&!n?t.activeElement.blur():n&&t.body.focus()}d&&!d.isListening()&&(_f=d.guid,d.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(_f=null,d.runHooks("afterUnlisten"))},this.isListening=function(){return _f===d.guid},this.destroyEditor=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d._refreshBorders(e,t)},this.populateFromArray=function(e,t,n,r,o,a,s,l,u){if("object"!==gf(n)||"object"!==gf(n[0]))throw new Error("populateFromArray parameter `input` must be an array of arrays");var c="number"==typeof r?new Me(r,o):null;return i.populateFromArray(new Me(e,t),n,c,a,s,l,u)},this.spliceCol=function(e,t,n){for(var o,i=arguments.length,a=new Array(i>3?i-3:0),s=3;s3?i-3:0),s=3;s0&&(e=t[t.length-1]),e},this.getSelectedRange=function(){if(v.isSelected())return Array.from(v.getSelectedRange())},this.getSelectedRangeLast=function(){var e,t=this.getSelectedRange();return t&&t.length>0&&(e=t[t.length-1]),e},this.emptySelectedCells=function(e){var t=this;if(v.isSelected()){var n=[];P(v.getSelectedRange(),(function(e){var r=e.getTopLeftCorner(),o=e.getBottomRightCorner();Ra(r.row,o.row,(function(e){Ra(r.col,o.col,(function(r){t.getCellMeta(e,r).readOnly||n.push([e,r,null])}))}))})),n.length>0&&this.setDataAtCell(n,e)}},this.render=function(){d.view&&(d.renderCall=!0,d.forceFullRender=!0,a.lockEditor(),d._refreshBorders(null),a.unlockEditor())},this.refreshDimensions=function(){if(d.view){var e=d.view.getLastSize(),t=e.width,n=e.height,r=d.rootElement.getBoundingClientRect(),o=r.width,i=r.height,a=o!==t||i!==n;!1===d.runHooks("beforeRefreshDimensions",{width:t,height:n},{width:o,height:i},a)||((a||d.view.wt.wtOverlays.scrollableElement===d.rootWindow)&&(d.view.setLastSize(o,i),d.render()),d.runHooks("afterRefreshDimensions",{width:t,height:n},{width:o,height:i},a))}},this.loadData=function(e){if(Array.isArray(n.settings.dataSchema)?d.dataType="array":rn(n.settings.dataSchema)?d.dataType="function":d.dataType="object",r&&r.destroy(),r=new su(d,n,m),"object"===gf(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(gf(e)," given)"));var t,a=r.getSchema();e=[];var s,l=0;for(l=0,s=n.settings.startRows;l1&&void 0!==arguments[1]&&arguments[1],u=!1;if(ar(e.rows))throw new Error('"rows" setting is no longer supported. do you mean startRows, minRows or maxRows?');if(ar(e.cols))throw new Error('"cols" setting is no longer supported. do you mean startCols, minCols or maxCols?');for(t in e)"data"!==t&&("language"!==t?ce.getSingleton().getRegistered().indexOf(t)>-1?(rn(e[t])||Array.isArray(e[t]))&&(e[t].initialHook=!0,d.addHook(t,e[t])):!l&&oe(e,t)&&(m.prototype[t]=e[t]):g(e.language));void 0===e.data&&void 0===n.settings.data?d.loadData(null):void 0!==e.data?d.loadData(e.data):void 0!==e.columns&&r.createMap(),s=d.countCols();var c,h,f=e.columns||m.prototype.columns;if(f&&rn(f)&&(s=d.countSourceCols(),u=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||(n.cellSettings.length=0),s>0)for(t=0,o=0;t-1||v.indexOf("overflow")>-1)?d.rootElement.setAttribute("style",v):(d.rootElement.style.height="",d.rootElement.style.overflow="")}else void 0!==y&&(d.rootElement.style.height=isNaN(y)?"".concat(y):"".concat(y,"px"),d.rootElement.style.overflow="hidden");if(void 0!==e.width){var w=e.width;rn(w)&&(w=w()),d.rootElement.style.width=isNaN(w)?"".concat(w):"".concat(w,"px")}l||(r.clearLengthCache(),d.view&&d.view.wt.wtViewport.resetHasOversizedColumnHeadersMarked(),d.runHooks("afterUpdateSettings",e)),i.adjustRowsAndCols(),d.view&&!n.firstRun&&(d.forceFullRender=!0,a.lockEditor(),d._refreshBorders(null),a.unlockEditor()),l||!d.view||""!==p&&""!==y&&void 0!==y||p===y||d.view.wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){var e=d.getSelectedLast();if(m.prototype.getValue){if(rn(m.prototype.getValue))return m.prototype.getValue.call(d);if(e)return d.getData()[e[0][0]][m.prototype.getValue]}else if(e)return d.getDataAtCell(e[0],e[1])},this.getSettings=function(){return n.settings},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,o){i.alter(e,t,n,r,o)},this.getCell=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return d.view.getCellAtCoords(new Me(e,t),n)},this.getCoords=function(e){return this.view.wt.wtTable.getCoords.call(this.view.wt.wtTable,e)},this.colToProp=function(e){return r.colToProp(e)},this.propToCol=function(e){return r.propToCol(e)},this.toVisualRow=function(e){return y.toVisualRow(e)},this.toVisualColumn=function(e){return y.toVisualColumn(e)},this.toPhysicalRow=function(e){return y.toPhysicalRow(e)},this.toPhysicalColumn=function(e){return y.toPhysicalColumn(e)},this.getDataAtCell=function(e,t){return r.get(e,r.colToProp(t))},this.getDataAtRowProp=function(e,t){return r.get(e,t)},this.getDataAtCol=function(e){var t;return(t=[]).concat.apply(t,bf(r.getRange(new Me(0,e),new Me(n.settings.data.length-1,e),r.DESTINATION_RENDERER)))},this.getDataAtProp=function(e){var t,o=r.getRange(new Me(0,r.propToCol(e)),new Me(n.settings.data.length-1,r.propToCol(e)),r.DESTINATION_RENDERER);return(t=[]).concat.apply(t,bf(o))},this.getSourceData=function(e,t,n,r){return void 0===e?o.getData():o.getByRange(new Me(e,t),new Me(n,r))},this.getSourceDataArray=function(e,t,n,r){return void 0===e?o.getData(!0):o.getByRange(new Me(e,t),new Me(n,r),!0)},this.getSourceDataAtCol=function(e){return o.getAtColumn(e)},this.getSourceDataAtRow=function(e){return o.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return o.getAtCell(e,t)},this.getDataAtRow=function(e){return r.getRange(new Me(e,0),new Me(e,this.countCols()-1),r.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,r){var o=this,i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],a=i[0],s=i[1],l=i[2],u=i[3],c=null,h=null;void 0===l&&(l=a),void 0===u&&(u=s);var f="mixed";return Ra(Math.min(a,l),Math.max(a,l),(function(e){var t=!0;return Ra(Math.min(s,u),Math.max(s,u),(function(n){var r=o.getCellMeta(e,n);return h=r.type,c?t=c===h:c=h,t})),f=t?h:"mixed",t})),f},this.removeCellMeta=function(e,t,r){var o=wf(y.toPhysical(e,t),2),i=o[0],a=o[1],s=n.cellSettings[i][a][r];!1!==d.runHooks("beforeRemoveCellMeta",e,t,r,s)&&(delete n.cellSettings[i][a][r],d.runHooks("afterRemoveCellMeta",e,t,r,s)),s=null},this.spliceCellsMeta=function(e,t){for(var r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a=0;)if(void 0===t||-1!==t.indexOf(o)){for(var i=d.countCols()-1;i>=0;)void 0===n||-1!==n.indexOf(i)?(r.addValidatorToQueue(),d.validateCell(d.getDataAtCell(o,i),d.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 t=n.settings.rowHeaders,r=e;return void 0!==r&&(r=d.runHooks("modifyRowHeader",r)),void 0===r?(t=[],Ra(d.countRows()-1,(function(e){t.push(d.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[r]?t=t[r]:rn(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+1),t},this.hasRowHeaders=function(){return!!n.settings.rowHeaders},this.hasColHeaders=function(){if(void 0!==n.settings.colHeaders&&null!==n.settings.colHeaders)return!!n.settings.colHeaders;for(var e=0,t=d.countCols();e0&&void 0!==arguments[0]&&arguments[0],t=0;return La(d.countRows()-1,(function(n){if(d.isEmptyRow(n))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(d.countRows()<1)return 0;var t=0;return La(d.countCols()-1,(function(n){if(d.isEmptyCol(n))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return n.settings.isEmptyRow.call(d,e)},this.isEmptyCol=function(e){return n.settings.isEmptyCol.call(d,e)},this.selectCell=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!sr(e)&&!sr(t)&&this.selectCells([[e,t,n,r]],o,i)},this.selectCells=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(f=!0);var n=v.selectCells(e);return n&&t&&d.listen(),f=!1,n},this.selectColumns=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return v.selectColumns(e,t)},this.selectRows=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return v.selectRows(e,t)},this.deselectCell=function(){v.deselect()},this.selectAll=function(){f=!0,v.selectAll(),f=!1},this.scrollViewportTo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=!n,i=!r,a=!1;return void 0!==e&&void 0!==t&&(a=d.view.scrollViewport(new Me(e,t),o,r,n,i)),"number"==typeof e&&"number"!=typeof t&&(a=d.view.scrollViewportVertically(e,o,n)),"number"==typeof t&&"number"!=typeof e&&(a=d.view.scrollViewportHorizontally(t,r,i)),a},this.destroy=function(){if(d._clearTimeouts(),d._clearImmediates(),d.view&&d.view.destroy(),o&&o.destroy(),o=null,Hh(),Yu(d)){var e=this.rootDocument.querySelector("#hot-display-license-info");e&&e.parentNode.removeChild(e)}Mt(d.rootElement),p.destroy(),a&&a.destroy(),d.runHooks("afterDestroy"),ce.getSingleton().destroy(d),ee(d,(function(e,t,n){var r;rn(e)?n[t]=(r=t,function(){throw new Error('The "'.concat(r,'" method cannot be called because this Handsontable instance has been destroyed'))}):"guid"!==t&&(n[t]=null)})),d.isDestroyed=!0,r&&r.destroy(),r=null,n=null,i=null,v=null,a=null,d=null,m=null},this.getActiveEditor=function(){return a.getActiveEditor()},this.getPlugin=function(e){return function(e,t){if("string"!=typeof t)throw Error('Only strings can be passed as "plugin" parameter');var n=$r(t);if(vu.has(e)&&vu.get(e)[n])return vu.get(e)[n]}(this,e)},this.getInstance=function(){return d},this.addHook=function(e,t){ce.getSingleton().add(e,t,d)},this.hasHook=function(e){return ce.getSingleton().has(e,d)},this.addHookOnce=function(e,t){ce.getSingleton().once(e,t,d)},this.removeHook=function(e,t){ce.getSingleton().remove(e,t,d)},this.runHooks=function(e,t,n,r,o,i,a){return ce.getSingleton().run(d,e,t,n,r,o,i,a)},this.getTranslatedPhrase=function(e,t){return Oh(n.settings.language,e,t)},this.toHTML=function(){return du(c)},this.toTableElement=function(){var e=c.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",du(c)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){var t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){P(this.timeouts,(function(e){clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){P(this.immediates,(function(e){clearImmediate(e)}))},this._refreshBorders=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];a.destroyEditor(e),d.view.render(),t&&v.isSelected()&&a.prepareEditor()},ce.getSingleton().run(d,"construct")}function kf(e,t){for(var n=0;n0&&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 t=this.hot.rootDocument.createElement("col");return t.style.width="".concat(this.hot.view.wt.wtTable.getStretchedColumnWidth(e),"px"),t}},{key:"createTable",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("table"),o=t.createElement("thead"),i=t.createElement("tbody"),a=t.createElement("colgroup"),s=t.createElement("tr"),l=t.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),wt(r,e),n.appendChild(r),{fragment:n,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]:"",t=this.hot.rootDocument,n=t.createDocumentFragment(),r=t.createElement("div");return wt(r,"htGhostTable htAutoSize ".concat(e.trim())),n.appendChild(r),{fragment:n,container:r}}},{key:"isVertical",value:function(){return!(!this.rows.length||this.columns.length)}},{key:"isHorizontal",value:function(){return!(!this.columns.length||this.rows.length)}}],n&&kf(t.prototype,n),e}();const Cf=Sf;function Tf(e,t){for(var n=0;n=0&&Of.splice(Of.indexOf(this.pluginName),1),Of.length||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,t){Ef.get(this).hooks[e]=Ef.get(this).hooks[e]||[];var n=Ef.get(this).hooks[e];this.hot.addHook(e,t),n.push(t),Ef.get(this).hooks[e]=n}},{key:"removeHooks",value:function(e){var t=this;P(Ef.get(this).hooks[e]||[],(function(n){t.hot.removeHook(e,n)}))}},{key:"clearHooks",value:function(){var e=this,t=Ef.get(this).hooks;ee(t,(function(t,n){return e.removeHooks(n)})),t.length=0}},{key:"callOnPluginsReady",value:function(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}},{key:"onAfterPluginsInitialized",value:function(){P(this.pluginsInitializedCallbacks,(function(e){return e()})),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}},{key:"onUpdateSettings",value:function(){this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&this.updatePlugin())}},{key:"updatePlugin",value:function(){}},{key:"destroy",value:function(){var e=this;this.eventManager&&this.eventManager.destroy(),this.clearHooks(),ee(this,(function(t,n){"hot"!==n&&"t"!==n&&(e[n]=null)})),delete this.t,delete this.hot}}])&&Tf(t.prototype,n),e}();function Lf(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:window;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.rootWindow=n,this.prefix=t,this.savedKeys=[],this.loadSavedKeys()}var t,n;return t=e,n=[{key:"saveValue",value:function(e,t){this.rootWindow.localStorage.setItem("".concat(this.prefix,"_").concat(e),JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}},{key:"loadValue",value:function(e,t){var n=void 0===e?t:e,r=this.rootWindow.localStorage.getItem("".concat(this.prefix,"_").concat(n));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;P(this.savedKeys,(function(t,n){e.rootWindow.localStorage.removeItem("".concat(e.prefix,"_").concat(e.savedKeys[n]))})),this.clearSavedKeys()}},{key:"loadSavedKeys",value:function(){var e=this.rootWindow.localStorage.getItem("".concat(this.prefix,"__persistentStateKeys")),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}},{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()}}],n&&Lf(t.prototype,n),e}();const Af=Df;function Hf(e){return Hf="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},Hf(e)}function Nf(e,t){for(var n=0;n0;s=Q(u)?Object.keys(u).length:Array.isArray(u)?u.length:ir(u).length,h&&(s+=c),o.has(s)||o.set(s,{needed:r.getSampleCount(),strings:[]});var f=o.get(s);f.needed&&(!(a.indexOf(u)>-1)||r.allowDuplicates||h)&&(f.strings.push(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({value:u},i,t)),a.push(u),f.needed-=1)})),o}}]),e}();const Vf=Bf;function Uf(e){return Uf="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},Uf(e)}function zf(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Gf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qf(e,t,n){return qf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xf(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},qf(e,t,n||e)}function Xf(e){return Xf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xf(e)}function Kf(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},n=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 t?{from:t,to:t}:t,i="number"==typeof n?{from:n,to:n}:n;Ra(o.from,o.to,(function(t){(r||void 0===e.widths[t]&&!e.hot._getColWidthFromSettings(t))&&P(e.samplesGenerator.generateColumnSamples(t,i),(function(t){var n=zf(t,2),r=n[0],o=n[1];return e.ghostTable.addColumn(r,o)}))})),this.ghostTable.columns.length&&(this.ghostTable.getWidths((function(t,n){e.widths[t]=n})),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},r=0,o=this.hot.countCols()-1,i=null;this.inProgress=!0;var a=this.getSyncCalculationLimit();this.firstCalculation&&a>=0&&(this.calculateColumnsWidth({from:0,to:a},n),this.firstCalculation=!1,r=a+1),r>=0),Math.min(e,n)}},{key:"getColumnWidth",value:function(e){var t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===n&&(n=this.widths[e],t&&"number"==typeof n&&(n=Math.max(n,pe.DEFAULT_WIDTH))),n}},{key:"getFirstVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getFirstVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getFirstRenderedColumn():-1}},{key:"getLastVisibleColumn",value:function(){var e=this.hot.view.wt;return e.wtViewport.columnsVisibleCalculator?e.wtTable.getLastVisibleColumn():e.wtViewport.columnsRenderCalculator?e.wtTable.getLastRenderedColumn():-1}},{key:"findColumnsWhereHeaderWasChanged",value:function(){var e=this.hot.getColHeader(),t=Qf.get(this).cachedColumnHeaders;return A(e,(function(e,n,r){var o=t.length;return(o-10&&void 0!==arguments[0]?arguments[0]:[];t.length?P(t,(function(t){e.widths[t]=void 0})):this.widths.length=0}},{key:"isNeedRecalculate",value:function(){return!!H(this.widths,(function(e){return void 0===e})).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.countRows(),n=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();-1!==n&&-1!==r&&t&&(this.calculateColumnsWidth({from:n,to:r},void 0,e),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 t=this,n=N(e,(function(e){var n=zf(e,2)[1];return t.hot.propToCol(n)}));this.clearCache(n)}},{key:"onBeforeColumnResize",value:function(e,t,n){var r=t;return n&&(this.calculateColumnsWidth(e,void 0,!0),r=this.getColumnWidth(e,void 0,!1)),r}},{key:"onAfterInit",value:function(){Qf.get(this).cachedColumnHeaders=this.hot.getColHeader()}},{key:"destroy",value:function(){this.ghostTable.clean(),qf(Xf(t.prototype),"destroy",this).call(this)}}]),t}(Rf);gu("autoColumnSize",Zf);const ed=Zf;var td={horizontal:"horizontal",vertical:"vertical"};function nd(e){return nd="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},nd(e)}function rd(e,t){for(var n=0;ne[3]?(o="right",n=new Me(t[0],e[3]+1),r=new Me(t[2],t[3])):t[0]e[2]&&t[1]===e[1]&&(o="down",n=new Me(e[2]+1,t[1]),r=new Me(t[2],t[3])),{directionOfDrag:o,startOfDragCoords:n,endOfDragCoords:r}}(t,e=this.hot.runHooks("modifyAutofillRange",e,t)),r=n.directionOfDrag,o=n.startOfDragCoords,i=n.endOfDragCoords;if(o&&o.row>-1&&o.col>-1){var a=this.getSelectionData();this.hot.runHooks("beforeAutofill",o,i,a);var s=function(e,t,n,r){var o=n.length,i=n?n[0].length:0,a=[],s=t.row-e.row,l=t.col-e.col;if(-1!==["down","up"].indexOf(r)){for(var u=[],c=0;c-1){l=[];var u=null,c=null;if("up"===r){c=(u=i.row-o.row+1)%a.length;for(var h=0;he.row))t=new Me(e.row,r.col);else{if(!this.directions.includes(td.horizontal))return;t=new Me(r.row,e.col)}return this.reduceSelectionAreaIfNeeded(t)}},{key:"showBorder",value:function(e){var t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}},{key:"addRow",value:function(){var e=this;this.hot._registerTimeout(setTimeout((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().cellRange&&!1===this.addingStarted&&this.autoInsertRow){var e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getCorners(),n=this.hot.countRows();e[2]n&&e.clientX<=r}},{key:"registerEvents",value:function(){var e=this,t=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()})),this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)}))}},{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 t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(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 t={};return!0===e?(t.directions=Object.keys(td),t.autoInsertRow=!0):Q(e)?(ar(e.autoInsertRow)?e.direction===td.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,ar(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(td)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}},{key:"destroy",value:function(){id(ad(t.prototype),"destroy",this).call(this)}}],r&&rd(n.prototype,r),t}(Rf);gu("autofill",ld);const ud=ld;function cd(e){return cd="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},cd(e)}function hd(e,t,n){return hd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fd(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},hd(e,t,n||e)}function fd(e){return fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fd(e)}function dd(e,t){for(var n=0;n=0?r=n.hot.getDataAtCell(e,t):-1===e&&(r=n.hot.getColHeader(t)),{value:r}})),n.firstCalculation=!0,n.inProgress=!1,n.addHook("beforeRowResize",(function(e,t,r){return n.onBeforeRowResize(e,t,r)})),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pd(e,t)}(t,e),md(t,null,[{key:"CALCULATION_STEP",get:function(){return 50}},{key:"SYNC_CALCULATION_LIMIT",get:function(){return 500}}]),md(t,[{key:"isEnabled",value:function(){return!0===this.hot.getSettings().autoRowSize||Q(this.hot.getSettings().autoRowSize)}},{key:"enablePlugin",value:function(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){return e.onAfterLoadData()})),this.addHook("beforeChange",(function(t){return e.onBeforeChange(t)})),this.addHook("beforeColumnMove",(function(){return e.recalculateAllRowsHeight()})),this.addHook("beforeColumnResize",(function(){return e.recalculateAllRowsHeight()})),this.addHook("beforeColumnSort",(function(){return e.clearCache()})),this.addHook("beforeRender",(function(t){return e.onBeforeRender(t)})),this.addHook("beforeRowMove",(function(t,n){return e.onBeforeRowMove(t,n)})),this.addHook("modifyRowHeight",(function(t,n){return e.getRowHeight(n,t)})),this.addHook("modifyColumnHeaderHeight",(function(){return e.getColumnHeaderHeight()})),hd(fd(t.prototype),"enablePlugin",this).call(this))}},{key:"disablePlugin",value:function(){hd(fd(t.prototype),"disablePlugin",this).call(this)}},{key:"calculateRowsHeight",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},n=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 t?{from:t,to:t}:t,i="number"==typeof n?{from:n,to:n}:n;if(null!==this.hot.getColHeader(0)){var a=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(a.get(-1))}Ra(o.from,o.to,(function(t){(r||void 0===e.heights[t])&&P(e.samplesGenerator.generateRowSamples(t,i),(function(t){var n,r,o=(r=2,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=o[0],a=o[1];return e.ghostTable.addRow(i,a)}))})),this.ghostTable.rows.length&&(this.ghostTable.getHeights((function(t,n){e.heights[t]=n})),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},r=0,o=this.hot.countRows()-1,i=null;this.inProgress=!0;var a=this.getSyncCalculationLimit();this.firstCalculation&&a>=0&&(this.calculateRowsHeight({from:0,to:a},n),this.firstCalculation=!1,r=a+1),r>=0),Math.min(e,n)}},{key:"getRowHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=t;return void 0!==this.heights[e]&&this.heights[e]>(t||0)&&(n=this.heights[e]),n}},{key:"getColumnHeaderHeight",value:function(){return this.heights[-1]}},{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.heights.length=0,this.heights[-1]=void 0}},{key:"clearCacheByRange",value:function(e){var t=this,n="number"==typeof e?{from:e,to:e}:e,r=n.from,o=n.to;Ra(Math.min(r,o),Math.max(r,o),(function(e){t.heights[e]=void 0}))}},{key:"isNeedRecalculate",value:function(){return!!H(this.heights,(function(e){return void 0===e})).length}},{key:"onBeforeRender",value:function(){var e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,n=this.getFirstVisibleRow(),r=this.getLastVisibleRow();if(-1!==n&&-1!==r){if(this.calculateRowsHeight({from:n,to:r},void 0,e),t){var o=this.hot.countRows()-1;this.calculateRowsHeight({from:o-t,to:o})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}},{key:"onBeforeRowMove",value:function(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()}},{key:"onBeforeRowResize",value:function(e,t,n){var r=t;return n&&(this.calculateRowsHeight(e,void 0,!0),r=this.getRowHeight(e)),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 t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}},{key:"destroy",value:function(){this.ghostTable.clean(),hd(fd(t.prototype),"destroy",this).call(this)}}]),t}(Rf);gu("autoRowSize",yd);const vd=yd;function gd(e,t){for(var n=0;n0&&(e=this.sortedColumnsStates[0].column),e}},{key:"getSortOrderOfColumn",value:function(e){var t,n=this.sortedColumnsStates.find((function(t){var n=t.column;return e===n}));return Q(n)&&(t=n.sortOrder),t}},{key:"getSortedColumns",value:function(){return N(this.sortedColumnsStates,(function(e){return e.column}))}},{key:"getIndexOfColumnInSortQueue",value:function(e){return this.getSortedColumns().indexOf(e)}},{key:"getNumberOfSortedColumns",value:function(){return this.sortedColumnsStates.length}},{key:"isListOfSortedColumnsEmpty",value:function(){return 0===this.getNumberOfSortedColumns()}},{key:"isColumnSorted",value:function(e){return this.getSortedColumns().includes(e)}},{key:"getSortStates",value:function(){return X(this.sortedColumnsStates)}},{key:"getColumnSortState",value:function(e){if(this.isColumnSorted(e))return X(this.sortedColumnsStates[this.getIndexOfColumnInSortQueue(e)])}},{key:"setSortStates",value:function(e){this.sortedColumnsStates=e}},{key:"destroy",value:function(){this.sortedColumnsStates.length=0,this.sortedColumnsStates=null}}],n&&gd(t.prototype,n),e}(),_d="asc",Md="desc";function kd(e){if(sr(e))return!1;var t=e.column,n=e.sortOrder;return Number.isInteger(t)&&[_d,Md].includes(n)}function Sd(e){if(e!==Md)return e===_d?Md:_d}function Cd(e){return e.querySelector(".".concat("colHeader"))}function Td(e,t){if(e<0||!t.parentNode)return!1;var n=t.parentNode.parentNode.childNodes;return-1==Array.from(n).indexOf(t.parentNode)-n.length}function Ed(e,t,n){return-1===e&&t>=0&&!1===Ur(n)}var Od="indicatorDisabled",Rd="columnSorting",Ld="sortAction",Dd=new Map([[_d,"ascending"],[Md,"descending"]]);function Ad(e,t,n,r){var o=[Rd];if(r&&o.push(Ld),!1===n)o.push(Od);else if(e.isColumnSorted(t)){var i=e.getSortOrderOfColumn(t);o.push(Dd.get(i))}return o}var Hd={_arrayMap:[],getValueByIndex:function(e){var t=null;return e1&&void 0!==arguments[1]?arguments[1]:1,r=Y(this._arrayMap)+1,o=[];return Ra(n-1,(function(n){o.push(t._arrayMap.splice(e+n,0,r+n))})),o},removeItems:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[];if(Array.isArray(e)){var r=[].concat(this._arrayMap);e.sort((function(e,t){return t-e}));for(var o=0,i=e.length;o1&&void 0!==arguments[1]?arguments[1]:1,n=this.removeItems(e,t);this._arrayMap=N(this._arrayMap,(function(e){var t=e,r=function(e){return A(n,(function(t,n){var r=t;return e>n&&(r+=1),r}),0)}(t);return r&&(t-=r),t}))},shiftItems:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this._arrayMap=N(this._arrayMap,(function(t){var r=t;return r>=e&&(r+=n),r})),Ra(n-1,(function(n){t._arrayMap.splice(e+n,0,e+n)}))},swapIndexes:function(e,t){var n,r;(n=this._arrayMap).splice.apply(n,[t,0].concat(function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);ti?"asc"===e?tm:em:Zd}})),Fd("date",(function(e,t,n){return function(r,o){var i=n.sortEmptyCells;if(r===o)return Zd;if(lr(r))return lr(o)?Zd:i&&"asc"===e?em:tm;if(lr(o))return i&&"asc"===e?tm:em;var a=t.dateFormat,s=Kn()(r,a),l=Kn()(o,a);return s.isValid()?l.isValid()?l.isAfter(s)?"asc"===e?em:tm:l.isBefore(s)?"asc"===e?tm:em:Zd:em:tm}})),Fd(Id,(function(e,t,n){return function(t,r){var o=n.sortEmptyCells;return"string"==typeof t&&(t=t.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase()),t===r?Zd:lr(t)?lr(r)?Zd:o&&"asc"===e?em:tm:lr(r)?o&&"asc"===e?tm:em:isNaN(t)&&!isNaN(r)?"asc"===e?tm:em:!isNaN(t)&&isNaN(r)?"asc"===e?em:tm:(isNaN(t)||isNaN(r)||(t=parseFloat(t),r=parseFloat(r)),tr?"asc"===e?tm:em:Zd)}}));var Kd=function e(t){Xd(this,e),this.data=t,this.next=null,this.prev=null};const Jd=function(){function e(){Xd(this,e),this.first=null,this.last=null}var t,n;return t=e,(n=[{key:"push",value:function(e){var t=new Kd(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.last;this.last=t,t.prev=n,n.next=t}}},{key:"unshift",value:function(e){var t=new Kd(e);if(null===this.first)this.first=t,this.last=t;else{var n=this.first;this.first=t,t.next=n,n.prev=t}}},{key:"inorder",value:function(e){for(var t=this.first;t;)e(t),t=t.next}},{key:"remove",value:function(e){if(null===this.first)return!1;for(var t,n,r=this.first;r;){if(r.data===e)return t=r.next,n=r.prev,t&&(t.prev=n),n&&(n.next=t),r===this.first&&(this.first=t),r===this.last&&(this.last=n),!0;r=r.next}return!1}},{key:"hasCycle",value:function(){for(var e=this.first,t=this.first;;){if(null===e)return!1;if(null===(e=e.next))return!1;if((e=e.next)===(t=t.next))return!0}}},{key:"pop",value:function(){if(null===this.last)return null;var e=this.last;return this.last=this.last.prev,e}},{key:"shift",value:function(){if(null===this.first)return null;var e=this.first;return this.first=this.first.next,e}},{key:"recursiveReverse",value:function(){if(this.first){!function e(t,n){n&&(e(n,n.next),n.next=t)}(this.first,this.first.next),this.first.next=null;var e=this.first;this.first=this.last,this.last=e}}},{key:"reverse",value:function(){if(this.first&&this.first.next){for(var e,t=this.first.next,n=this.first;t;)e=t.next,t.next=n,n.prev=t,n=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=n,this.last=e}}}])&&qd(t.prototype,n),e}();var $d=function(e,t){var n=e.toString(),r=t.toString();return n===r?0:n1&&void 0!==arguments[1]?arguments[1]:$d,n=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-n)<=1)return[];var o=Math.ceil((n+r)/2);return Qd(e,t,n,o),Qd(e,t,o,r),function(e,t,n,r,o){for(var i=new Jd,a=new Jd,s=r-n,l=o-r,u=Math.max(s,l),c=o-n,h=0;h0?e[n+f]=a.shift().data:e[n+f]=i.shift().data:i.first?e[n+f]=i.shift().data:e[n+f]=a.shift().data,f+=1;return e}(e,t,n,o,r)}var Zd=0,em=-1,tm=1;function nm(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function rm(e){return rm="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},rm(e)}function om(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function um(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e].slice(0,1)}},{key:"areValidSortConfigs",value:function(e){if(!1===Array.isArray(e))return!1;var t=e.map((function(e){return e.column})),n=this.hot.countCols(),r=t.every((function(e){return e<=n&&e>=0}));return function(e){if(!1===Array.isArray(e)||!1===e.every((function(e){return Q(e)})))return!1;var t=e.map((function(e){return e.column}));return new Set(t).size===t.length&&e.every(kd)}(e)&&r}},{key:"saveAllSortSettings",value:function(){var e=this.columnStatesManager.getAllColumnsProperties();e.initialConfig=this.columnStatesManager.getSortStates(),this.hot.runHooks("persistentStateSave","columnSorting",e)}},{key:"getAllSavedSortSettings",value:function(){var e=this,t={};this.hot.runHooks("persistentStateLoad","columnSorting",t);var n=t.value;return ar(n)&&Array.isArray(n.initialConfig)&&(n.initialConfig=N(n.initialConfig,(function(t){var n=t.column,r=lm(t,["column"]);return am({column:e.hot.toVisualColumn(n)},r)}))),n}},{key:"getColumnNextConfig",value:function(e){var t=this.hot.toPhysicalColumn(e);if(this.columnStatesManager.isColumnSorted(t)){var n=this.getSortConfig(e),r=Sd(n.sortOrder);return ar(r)?(n.sortOrder=r,n):void 0}var o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e1&&void 0!==arguments[1]?arguments[1]:mm,n=this.hot.toPhysicalColumn(e),r=this.columnStatesManager.getIndexOfColumnInSortQueue(n),o=this.columnStatesManager.isColumnSorted(n),i=this.getSortConfig(),a=this.getColumnNextConfig(e);if(o){if(sr(a))return[].concat(om(i.slice(0,r)),om(i.slice(r+1)));if(t===mm)return[].concat(om(i.slice(0,r)),om(i.slice(r+1)),[a]);if("replace"===t)return[].concat(om(i.slice(0,r)),[a],om(i.slice(r+1)))}return ar(a)?i.concat(a):i}},{key:"setMergedPluginSettings",value:function(e){var t=this.hot.toPhysicalColumn(e),n=this.hot.getSettings()[this.pluginKey],r=this.columnStatesManager.getAllColumnsProperties(),o=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(o),a=Object.hasOwnProperty.call(i,this.pluginKey)?i[this.pluginKey]:{};this.columnMetaCache.set(t,Object.assign(r,n,a))}},{key:"getFirstCellSettings",value:function(e){var t=this.blockPluginTranslation;this.blockPluginTranslation=!0,(0===this.columnMetaCache.size||this.columnMetaCache.size2?r-2:0),i=2;i1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}},{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 t=this.rootDocument.createElement("div"),n=this.rootDocument.createElement("textarea");return this.container=this.rootDocument.querySelector(".".concat(e.CLASS_EDITOR_CONTAINER)),this.container||(this.container=this.rootDocument.createElement("div"),wt(this.container,e.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container)),wt(t,e.CLASS_EDITOR),wt(n,e.CLASS_INPUT),t.appendChild(n),this.container.appendChild(t),t}},{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)}}]),e}();const _m=bm;n(98741);var Mm="---------";function km(e){return gt(e,"htSeparator")}function Sm(e){return gt(e,"htDisabled")}function Cm(e){return gt(e,"htSelectionDisabled")}function Tm(e){var t=e.getSelected();return t?t[0]<0?null:t:null}function Em(e,t){var n={};return P(e,(function(e){for(var r=e.from,o=e.to,i=r.row;i<=o.row;i++)for(var a=r.col;a<=o.col;a++)n[i]||(n[i]=[]),n[i][a]=t(i,a)})),n}function Om(e,t,n,r,o){P(e,(function(e){var i=e.from,a=e.to;if(i.row===a.row&&i.col===a.col)Rm(i.row,i.col,t,n,r,o);else for(var s=i.row;s<=a.row;s++)for(var l=i.col;l<=a.col;l++)Rm(s,l,t,n,r,o)}))}function Rm(e,t,n,r,o,i){var a=o(e,t),s=r;a.className&&(s="vertical"===n?function(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return"".concat(n," ").concat(t)}(a.className,r):function(e,t){if(-1!==e.indexOf(t))return e;var n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return"".concat(n," ").concat(t)}(a.className,r)),i(e,t,"className",s)}function Lm(e,t){var n=!1;return Array.isArray(e)&&P(e,(function(e){return e.forAll((function(e,r){if(t(e,r))return n=!0,!1})),n})),n}function Dm(e){return''.concat(String.fromCharCode(10003),"").concat(e)}function Am(e,t){for(var n=e.slice(0);01&&void 0!==arguments[1]?arguments[1]:Mm,n=e.slice(0);return n=function(e,t){var n=e.slice(0);return n.reverse(),(n=Am(n,t)).reverse(),n}(n=Am(n,t),t),n=function(e){var t=[];return P(e,(function(e,n){n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(n),n}function Nm(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=sn((function(t){e.wasLastActionShow&&e.runLocalHooks("show",t.from.row,t.from.col)}),t)}},{key:"destroy",value:function(){this.clearLocalHooks()}}],n&&Nm(t.prototype,n),e}();J(Pm,Zh);const xm=Pm;function Ym(e){return Ym="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},Ym(e)}function Im(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jm(e,t){for(var n=0;n0&&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,zm,void 0),e&&this.hot.render(),this.hide()}},{key:"removeCommentAtCell",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:new Me(e,t)}),this.removeComment(n)}},{key:"getComment",value:function(){var e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,Gm)}},{key:"getCommentAtCell",value:function(e,t){return this.getCommentMeta(e,t,Gm)}},{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.hot.getCellMeta(this.range.from.row,this.range.from.col);return this.refreshEditor(!0),this.editor.setValue(e[zm]?e[zm][Gm]:""),this.editor.hidden&&this.editor.show(),!0}},{key:"showAtCell",value:function(e,t){return this.setRange({from:new Me(e,t)}),this.show()}},{key:"hide",value:function(){this.editor.hidden||this.editor.hide()}},{key:"refreshEditor",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&this.editor.isVisible()){var e=this.hot.rootWindow,t=this.hot.view.wt,n=t.wtTable,r=t.wtOverlays,o=t.wtViewport,i=r.scrollableElement,a=n.getCell(this.range.from),s=this.range.from.row,l=this.range.from.col,u=Ot(a),c=n.getStretchedColumnWidth(l),h=u.top<0?0:u.top,f=u.left;o.hasVerticalScroll()&&i!==e&&(h-=r.topOverlay.getScrollPosition()),o.hasHorizontalScroll()&&i!==e&&(f-=r.leftOverlay.getScrollPosition());var d=f+c,m=h,p=this.getCommentMeta(s,l,qm),y=this.getCommentMeta(s,l,Xm);p?this.editor.setSize(p.width,p.height):this.editor.resetSize(),this.editor.setReadOnlyState(y),this.editor.setPosition(d,m)}}},{key:"checkSelectionCommentsConsistency",value:function(){var e=this.hot.getSelectedRangeLast();if(!e)return!1;var t=!1,n=e.from;return this.getCommentMeta(n.row,n.col,Gm)&&(t=!0),t}},{key:"updateCommentMeta",value:function(e,t,n){var r,o=this.hot.getCellMeta(e,t)[zm];o?q(r=X(o),n):r=n,this.hot.setCellMeta(e,t,zm,r)}},{key:"getCommentMeta",value:function(e,t,n){var r=this.hot.getCellMeta(e,t);if(r[zm])return r[zm][n]}},{key:"onMouseDown",value:function(e){if(this.mouseDown=!0,this.hot.view&&this.hot.view.wt){if(!this.contextMenuEvent&&!this.targetIsCommentTextArea(e)){var t=st(e.target,"TD","TBODY"),n=null;t&&(n=this.hot.view.wt.wtTable.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}this.contextMenuEvent=!1}}},{key:"onMouseOver",value:function(e){var t=Um.get(this),n=this.hot.rootDocument;if(t.cellBelowCursor=n.elementFromPoint(e.clientX,e.clientY),!(this.mouseDown||this.editor.isFocused()||gt(e.target,"wtBorder")||t.cellBelowCursor!==e.target)&&this.editor)if(this.targetIsCellWithComment(e)){var r=this.hot.view.wt.wtTable.getCoords(e.target),o={from:new Me(r.row,r.col)};this.displaySwitch.show(o)}else ut(e.target,n)&&!this.targetIsCommentTextArea(e)&&this.displaySwitch.hide()}},{key:"onMouseUp",value:function(){this.mouseDown=!1}},{key:"onAfterRenderer",value:function(e,t){t[zm]&&t[zm][Gm]&&wt(e,t.commentedCellClassName)}},{key:"onEditorBlur",value:function(){this.setComment()}},{key:"onEditorMouseDown",value:function(e){Um.get(this).tempEditorDimensions={width:Yt(e.target),height:It(e.target)}}},{key:"onEditorMouseUp",value:function(e){var t=Um.get(this),n=Yt(e.target),r=It(e.target);n===t.tempEditorDimensions.width+1&&r===t.tempEditorDimensions.height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,Im({},qm,{width:n,height:r}))}},{key:"onContextMenuAddComment",value:function(){var e=this;this.displaySwitch.cancelHiding();var t=this.hot.getSelectedRangeLast();this.contextMenuEvent=!0,this.setRange({from:t.from}),this.show(),setTimeout((function(){e.hot&&(e.hot.deselectCell(),e.editor.focus())}),10)}},{key:"onContextMenuRemoveComment",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++)this.removeCommentAtCell(r,o,!1);this.hot.render()}},{key:"onContextMenuMakeReadOnly",value:function(){var e=this.hot.getSelectedRangeLast(),t=e.from,n=e.to;this.contextMenuEvent=!0;for(var r=t.row;r<=n.row;r++)for(var o=t.col;o<=n.col;o++){var i=!!this.getCommentMeta(r,o,Xm);this.updateCommentMeta(r,o,Im({},Xm,!i))}}},{key:"addToContextMenu",value:function(e){var t=this;e.items.push({name:"---------"},{key:"commentsAddEdit",name:function(){return t.checkSelectionCommentsConsistency()?t.hot.getTranslatedPhrase(cc):t.hot.getTranslatedPhrase(uc)},callback:function(){return t.onContextMenuAddComment()},disabled:function(){return!(this.getSelectedLast()&&!this.selection.isSelectedByCorner())}},{key:"commentsRemove",name:function(){return this.getTranslatedPhrase(hc)},callback:function(){return t.onContextMenuRemoveComment()},disabled:function(){return t.hot.selection.isSelectedByCorner()}},{key:"commentsReadOnly",name:function(){var e=this,t=this.getTranslatedPhrase(fc),n=Lm(this.getSelectedRangeLast(),(function(t,n){var r=e.getCellMeta(t,n)[zm];if(r&&(r=r[Xm]),r)return!0}));return n&&(t=Dm(t)),t},callback:function(){return t.onContextMenuMakeReadOnly()},disabled:function(){return t.hot.selection.isSelectedByCorner()||!t.checkSelectionCommentsConsistency()}})}},{key:"getDisplayDelaySetting",value:function(){var e=this.hot.getSettings().comments;if(Q(e))return e.displayDelay}},{key:"onAfterBeginEditing",value:function(){this.hide()}},{key:"destroy",value:function(){this.editor&&this.editor.destroy(),this.displaySwitch&&this.displaySwitch.destroy(),Wm(Bm(t.prototype),"destroy",this).call(this)}}],r&&jm(n.prototype,r),t}(Rf);gu("comments",Km);const Jm=Km;function $m(e,t){for(var n=0;n1?n-1:0),o=1;o=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}})),fp(ap,up,(function(){return{key:up,name:function(){return this.getTranslatedPhrase(Xu)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_row",n.end.row+1,1,"ContextMenu.rowBelow")},disabled:function(){return!Tm(this)||this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden:function(){return!this.getSettings().allowInsertRow}}})),fp(ap,tp,(function(){return{key:tp,name:function(){return this.getTranslatedPhrase(Ku)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_col",n.start.col,1,"ContextMenu.columnLeft")},disabled:function(){var e=Tm(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t,n,r=(t=e[0],n=3,function(e){if(Array.isArray(e))return e}(t)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),o=r[0],i=r[1],a=[o,0,r[2],this.countCols()-1].join(",")===e.join(","),s=1===this.countCols();return i<0||this.countCols()>=this.getSettings().maxCols||!s&&a},hidden:function(){return!this.getSettings().allowInsertColumn}}})),fp(ap,np,(function(){return{key:np,name:function(){return this.getTranslatedPhrase(Ju)},callback:function(e,t){var n=t[Math.max(t.length-1,0)];this.alter("insert_col",n.end.col+1,1,"ContextMenu.columnRight")},disabled:function(){var e=Tm(this);if(!e)return!0;if(!this.isColumnModificationAllowed())return!0;var t,n,r=(t=e[0],n=3,function(e){if(Array.isArray(e))return e}(t)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),o=r[0],i=r[1],a=[o,0,r[2],this.countCols()-1].join(",")===e.join(","),s=1===this.countCols();return i<0||this.countCols()>=this.getSettings().maxCols||!s&&a},hidden:function(){return!this.getSettings().allowInsertColumn}}})),fp(ap,ep,(function(){return{key:ep,name:function(){return this.getTranslatedPhrase(nc)},callback:function(e,t){var n=t[0].start.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled:function(){var e=Tm(this);if(!e)return!0;var t,n,r=(t=e[0],n=3,function(e){if(Array.isArray(e))return e}(t)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),o=r[0],i=r[1],a=[o,0,r[2],this.countCols()-1].join(",")===e.join(",");return i<0||this.countCols()>=this.getSettings().maxCols||a}}})),fp(ap,sp,(function(){return{key:sp,name:function(){var e,t,n=this.getSelected(),r=0;if(n)if(n.length>1)r=1;else{var o=(e=n[0],t=3,function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}());o[0]-o[2]!=0&&(r=1)}return this.getTranslatedPhrase($u,r)},callback:function(){this.alter("remove_row",function(e){var t=cf(e);if(0===t||1===t)return[];var n=hf(t),r=new Set;P(e,(function(e){var t=rf(n(e),3),o=t[0],i=t[2]-o+1;P(Array.from(new Array(i),(function(e,t){return o+t})),(function(e){r.has(e)||r.add(e)}))}));var o=A(Array.from(r).sort((function(e,t){return e-t})),(function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[]);return o}(this.getSelected()),1,"ContextMenu.removeRow")},disabled:function(){var e=Tm(this),t=this.countRows();return!e||this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner()||!t},hidden:function(){return!this.getSettings().allowRemoveRow}}})),fp(ap,ip,(function(){return{key:ip,name:function(){var e,t,n=this.getSelected(),r=0;if(n)if(n.length>1)r=1;else{var o=(e=n[0],t=4,function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}());o[1]-o[3]!=0&&(r=1)}return this.getTranslatedPhrase(Qu,r)},callback:function(){this.alter("remove_col",function(e){var t=cf(e);if(0===t||1===t)return[];var n=hf(t),r=new Set;P(e,(function(e){var t=rf(n(e),4),o=t[1],i=t[3]-o+1;P(Array.from(new Array(i),(function(e,t){return o+t})),(function(e){r.has(e)||r.add(e)}))}));var o=A(Array.from(r).sort((function(e,t){return e-t})),(function(e,t,n,r){return 0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e}),[]);return o}(this.getSelected()),null,"ContextMenu.removeColumn")},disabled:function(){var e=Tm(this),t=this.countCols();return!e||this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner()||!this.isColumnModificationAllowed()||!t},hidden:function(){return!this.getSettings().allowRemoveColumn}}})),fp(ap,hp,(function(){return{key:hp,name:function(){return this.getTranslatedPhrase(Zu)},callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}}})),fp(ap,op,(function(){return{key:op,name:function(){return this.getTranslatedPhrase(ec)},callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}}})),fp(ap,rp,(function(){return{key:rp,name:function(){var e=this,t=this.getTranslatedPhrase(tc),n=Lm(this.getSelectedRange(),(function(t,n){return e.getCellMeta(t,n).readOnly}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Lm(t,(function(t,n){return e.getCellMeta(t,n).readOnly}));P(t,(function(t){t.forAll((function(t,r){e.setCellMeta(t,r,"readOnly",!n)}))})),this.render()},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())}}})),fp(ap,Zm,(function(){return{key:Zm,name:function(){return this.getTranslatedPhrase(dc)},disabled:function(){return!(this.getSelectedRange()&&!this.selection.isSelectedByCorner())},submenu:{items:[{key:"".concat(Zm,":left"),name:function(){var e=this,t=this.getTranslatedPhrase(mc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htLeft"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",o="htLeft";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(Zm,":center"),name:function(){var e=this,t=this.getTranslatedPhrase(pc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htCenter"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",o="htCenter";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(Zm,":right"),name:function(){var e=this,t=this.getTranslatedPhrase(yc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htRight"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",o="htRight";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(Zm,":justify"),name:function(){var e=this,t=this.getTranslatedPhrase(vc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htJustify"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="horizontal",o="htJustify";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{name:Mm},{key:"".concat(Zm,":top"),name:function(){var e=this,t=this.getTranslatedPhrase(gc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htTop"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="vertical",o="htTop";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(Zm,":middle"),name:function(){var e=this,t=this.getTranslatedPhrase(wc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="vertical",o="htMiddle";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1},{key:"".concat(Zm,":bottom"),name:function(){var e=this,t=this.getTranslatedPhrase(bc),n=Lm(this.getSelectedRange(),(function(t,n){var r=e.getCellMeta(t,n).className;if(r&&-1!==r.indexOf("htBottom"))return!0}));return n&&(t=Dm(t)),t},callback:function(){var e=this,t=this.getSelectedRange(),n=Em(t,(function(t,n){return e.getCellMeta(t,n).className})),r="vertical",o="htBottom";this.runHooks("beforeCellAlignment",n,t,r,o),Om(t,r,o,(function(t,n){return e.getCellMeta(t,n)}),(function(t,n,r,o){return e.setCellMeta(t,n,r,o)})),this.render()},disabled:!1}]}}})),ap);function pp(){var e={};return ee(mp,(function(t,n){e[n]=t()})),e}function yp(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.hot=t,this.predefinedItems=pp(),this.defaultOrderPattern=n}var t,n;return t=e,n=[{key:"setPredefinedItems",value:function(e){var t=this,n={};this.defaultOrderPattern.length=0,ee(e,(function(e,r){var o="";e.name===Mm?(n[Mm]=e,o=Mm):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,n[r]=e,o=e.key):(n[e.key]=e,o=e.key),t.defaultOrderPattern.push(o)})),this.predefinedItems=n}},{key:"getItems",value:function(){return function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=[],r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return r&&r.items?r=r.items:Array.isArray(r)||(r=e),Q(r)?ee(r,(function(e,r){var o=t["string"==typeof e?e:r];o||(o=e),Q(e)?G(o,e):"string"==typeof o&&(o={name:o}),void 0===o.key&&(o.key=r),n.push(o)})):P(r,(function(e,r){var o=t[e];!o&&dp.indexOf(e)>=0||(o||(o={name:e,key:"".concat(r)}),Q(e)&&G(o,e),void 0===o.key&&(o.key=r),n.push(o))})),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}],n&&yp(t.prototype,n),e}();const gp=vp;function wp(e,t){for(var n=0;n=e.offsetHeight}},{key:"fitsBelow",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}},{key:"fitsOnRight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}},{key:"fitsOnLeft",value:function(e){return this.leftRelative>=e.offsetWidth}}],n&&wp(t.prototype,n),e}();const _p=bp;function Mp(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t}},{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 t=sn((function(t){return e.openSubMenu(t)}),300),n=this.options.minWidth||215,r=!1,o=H(this.menuItems,(function(t){return t.key===cp&&(r=!0),function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}(t,e.hot)}));if(o.length<1&&!r)o.push(pp()[cp]);else if(0===o.length)return;var i={data:o=Hm(o,Mm),colHeaders:!1,autoColumnSize:!0,modifyColWidth:function(e){return ar(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(t){if(!this.hotMenu)return!1;var n=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!n||!function(e){return gt(e,"htSubmenu")}(n))return!1;var r=this.hotMenu.getSourceDataAtRow(t),o=new e(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0});return o.setMenuItems(r.submenu.items),o.open(),o.setPosition(n.getBoundingClientRect()),this.hotSubMenus[r.key]=o,o}},{key:"closeSubMenu",value:function(e){var t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];n&&(n.destroy(),delete this.hotSubMenus[t.key])}},{key:"closeAllSubMenus",value:function(){var e=this;P(this.hotMenu.getData(),(function(t,n){return e.closeSubMenu(n)}))}},{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.hotMenu.getSelectedLast()){var t=this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]);if(this.runLocalHooks("select",t,e),!1!==t.isCommand&&t.name!==Mm){var n=this.hot.getSelectedRange(),r=n?function(e){return N(e,(function(e){return{start:e.getTopLeftCorner(),end:e.getBottomRightCorner()}}))}(n):[],o=!0;(!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(this.hot)||t.submenu)&&(o=!1),this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e),o&&this.close(!0)}}}},{key:"setPosition",value:function(e){var t=new _p(e,this.hot.rootWindow);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),t.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(t):this.setPositionOnLeftOfCursor(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))}},{key:"setPositionAboveCursor",value:function(e){var t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top="".concat(t,"px")}},{key:"setPositionBelowCursor",value:function(e){var t=this.offset.below+e.top;this.isSubMenu()&&(t=e.top-1),this.container.style.top="".concat(t,"px")}},{key:"setPositionOnRightOfCursor",value:function(e){var t;t=this.isSubMenu()?1+e.left+e.cellWidth:this.offset.right+1+e.left,this.container.style.left="".concat(t,"px")}},{key:"setPositionOnLeftOfCursor",value:function(e){var t=this.offset.left+e.left-this.container.offsetWidth+Xt(this.hot.rootDocument)+4;this.container.style.left="".concat(t,"px")}},{key:"selectFirstCell",value:function(){var e=this.hotMenu.getCell(0,0);km(e)||Sm(e)||Cm(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}},{key:"selectLastCell",value:function(){var e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);km(t)||Sm(t)||Cm(t)?this.selectPrevCell(e,0):this.hotMenu.selectCell(e,0)}},{key:"selectNextCell",value:function(e,t){var n=e+1,r=n=0?this.hotMenu.getCell(n,t):null;r&&(km(r)||Sm(r)||Cm(r)?this.selectPrevCell(n,t):this.hotMenu.selectCell(n,t))}},{key:"menuItemRenderer",value:function(e,t,n,r,o,i){var a,s=this,l=e.getSourceDataAtRow(n),u=this.hot.rootDocument.createElement("div"),c=function(e){return e.disableSelection},h=i;"function"==typeof h&&(h=h.call(this.hot)),Mt(t),wt(u,"htItemWrapper"),t.appendChild(u),a=l,new RegExp(Mm,"i").test(a.name)?wt(t,"htSeparator"):"function"==typeof l.renderer?(wt(t,"htCustomMenuRenderer"),t.appendChild(l.renderer(e,u,n,r,o,h))):Ct(u,h),function(e){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(s.hot)}(l)?(wt(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):c(l)?(wt(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()}))):function(e){return oe(e,"submenu")}(l)?(wt(t,"htSubmenu"),c(l)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,r,void 0,void 0,!1,!1)}))):(bt(t,"htSubmenu"),bt(t,"htDisabled"),c(l)?this.eventManager.addEventListener(t,"mouseenter",(function(){return e.deselectCell()})):this.eventManager.addEventListener(t,"mouseenter",(function(){return e.selectCell(n,r,void 0,void 0,!1,!1)})))}},{key:"createContainer",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=this.hot.rootDocument,r=t;return r&&(rn(r)&&(r=null===(r=r.call(this.hot))||sr(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r="".concat(this.options.className,"Sub_").concat(r),e=n.querySelector(".".concat(this.options.className,".").concat(r))),e||(wt(e=n.createElement("div"),"htMenu ".concat(this.options.className)),r&&wt(e,r),n.getElementsByTagName("body")[0].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){var t=this.hotMenu.getSelectedLast(),n=!1;switch(this.keyEvent=!0,e.keyCode){case lo.ESCAPE:this.close(),n=!0;break;case lo.ENTER:t&&(this.hotMenu.getSourceDataAtRow(t[0]).submenu?n=!0:(this.executeCommand(e),this.close(!0)));break;case lo.ARROW_DOWN:t?this.selectNextCell(t[0],t[1]):this.selectFirstCell(),n=!0;break;case lo.ARROW_UP:t?this.selectPrevCell(t[0],t[1]):this.selectLastCell(),n=!0;break;case lo.ARROW_RIGHT:if(t){var r=this.openSubMenu(t[0]);r&&r.selectFirstCell()}n=!0;break;case lo.ARROW_LEFT:t&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen(),n=!0)}n&&(e.preventDefault(),jr(e)),this.keyEvent=!1}},{key:"onAfterInit",value:function(){var e=this.hotMenu.view.wt.wtTable,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,o=parseInt(n.width,10),i=A(t,(function(e,t){return e+(t.name===Mm?1:26)}),0);r.width="".concat(o+22,"px"),r.height="".concat(i+4,"px"),n.height=r.height}},{key:"onAfterSelection",value:function(e,t,n,r,o){!1===this.keyEvent&&(o.value=!0)}},{key:"onDocumentMouseDown",value:function(e){this.isOpened()&&(this.container&&ut(e.target,this.container)&&this.executeCommand(e),(this.options.standalone&&this.hotMenu&&!ut(e.target,this.hotMenu.rootElement)||(this.isAllSubMenusClosed()||this.isSubMenu())&&!ut(e.target,".htMenu")&&ut(e.target,this.hot.rootDocument))&&this.close(!0))}}],n&&Mp(t.prototype,n),e}();J(kp,Zh);const Sp=kp;function Cp(e){return Cp="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},Cp(e)}function Tp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ep(e,t,n){return Ep="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Op(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}},Ep(e,t,n||e)}function Op(e){return Op=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Op(e)}function Rp(e,t){for(var n=0;n1?n-1:0),o=1;o0&&(jp-=1),function(e){e.eventManager.clear()}(e),jp<=0)){jp=0;var t=Bp.get(e.rootDocument);t&&t.parentNode&&(t.parentNode.removeChild(t),Bp.delete(e.rootDocument)),e.mainElement=null}}function Up(e){return Up="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},Up(e)}function zp(e,t){for(var n=0;n',''].join(""),Qp=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t){return!t||"object"!==Up(t)&&"function"!=typeof t?Gp(e):t}(this,Xp(t).call(this,e))).columnsLimit=1e3,n.copyableRanges=[],n.focusableElement=void 0,n.pasteMode="overwrite",n.rowsLimit=1e3,Jp.set(Gp(n),{isTriggeredByCopy:!1,isTriggeredByCut:!1,isBeginEditing:!1,isFragmentSelectionEnabled:!1}),n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kp(e,t)}(t,e),n=t,r=[{key:"isEnabled",value:function(){return!!this.hot.getSettings().copyPaste}},{key:"enablePlugin",value:function(){var e=this;if(!this.enabled){var n,r,o=this.hot.getSettings();Jp.get(this).isFragmentSelectionEnabled=o.fragmentSelection,"object"===Up(o.copyPaste)&&(this.pasteMode=o.copyPaste.pasteMode||this.pasteMode,this.rowsLimit=o.copyPaste.rowsLimit||this.rowsLimit,this.columnsLimit=o.copyPaste.columnsLimit||this.columnsLimit),this.addHook("afterContextMenuDefaultOptions",(function(t){return e.onAfterContextMenuDefaultOptions(t)})),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.hot.rootDocument,r=new Ip(n),jp+=1,r),this.focusableElement.addLocalHook("copy",(function(t){return e.onCopy(t)})).addLocalHook("cut",(function(t){return e.onCut(t)})).addLocalHook("paste",(function(t){return e.onPaste(t)})),qp(Xp(t.prototype),"enablePlugin",this).call(this)}}},{key:"updatePlugin",value:function(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),qp(Xp(t.prototype),"updatePlugin",this).call(this)}},{key:"disablePlugin",value:function(){this.focusableElement&&Vp(this.focusableElement),qp(Xp(t.prototype),"disablePlugin",this).call(this)}},{key:"copy",value:function(){Jp.get(this).isTriggeredByCopy=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("copy")}},{key:"cut",value:function(){Jp.get(this).isTriggeredByCut=!0,this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("cut")}},{key:"getRangedCopyableData",value:function(e){var t=this,n=[],r=[],o=[];return P(e,(function(e){Ra(e.startRow,e.endRow,(function(e){-1===r.indexOf(e)&&r.push(e)})),Ra(e.startCol,e.endCol,(function(e){-1===o.indexOf(e)&&o.push(e)}))})),P(r,(function(e){var r=[];P(o,(function(n){r.push(t.hot.getCopyableData(e,n))})),n.push(r)})),Vl.stringify(n)}},{key:"getRangedData",value:function(e){var t=this,n=[],r=[],o=[];return P(e,(function(e){Ra(e.startRow,e.endRow,(function(e){-1===r.indexOf(e)&&r.push(e)})),Ra(e.startCol,e.endCol,(function(e){-1===o.indexOf(e)&&o.push(e)}))})),P(r,(function(e){var r=[];P(o,(function(n){r.push(t.hot.getCopyableData(e,n))})),n.push(r)})),n}},{key:"paste",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e||t){var n=new xp;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.getOrCreateFocusableElement(),this.onPaste(n)}}},{key:"setCopyableText",value:function(){var e=this.hot.getSelectedRangeLast();if(e){var t=e.getTopLeftCorner(),n=e.getBottomRightCorner(),r=t.row,o=t.col,i=n.row,a=n.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(),t=e?e.TEXTAREA:void 0;t?this.focusableElement.setFocusableElement(t):this.focusableElement.useSecondaryElement()}},{key:"isEditorOpened",value:function(){var e=this.hot.getActiveEditor();return e&&e.isOpened()}},{key:"populateValues",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedLast();if(e.length){for(var n=e.length-1,r=e[0].length-1,o=Math.min(t[0],t[2]),i=Math.max(t[0],t[2],n+o),a=Math.min(t[1],t[3]),s=Math.max(t[1],t[3],r+a),l=[],u=o,c=0;u<=i;u+=1){for(var h=[],f=a,d=0;f<=s;f+=1)h.push(e[c][d]),d=d===r?0:d+=1;l.push(h),c=c===n?0:c+=1}return this.hot.populateFromArray(o,a,l,void 0,void 0,"CopyPaste.paste",this.pasteMode),[o,a,i,s]}}},{key:"onCopy",value:function(e){var t=Jp.get(this);if((this.hot.isListening()||t.isTriggeredByCopy)&&!this.isEditorOpened()){this.setCopyableText(),t.isTriggeredByCopy=!1;var n=this.getRangedData(this.copyableRanges);if(this.hot.runHooks("beforeCopy",n,this.copyableRanges)){var r=Vl.stringify(n);if(e&&e.clipboardData){var o=mu(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[$p,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.runHooks("afterCopy",n,this.copyableRanges)}e.preventDefault()}}},{key:"onCut",value:function(e){var t=Jp.get(this);if((this.hot.isListening()||t.isTriggeredByCut)&&!this.isEditorOpened()){this.setCopyableText(),t.isTriggeredByCut=!1;var n=this.getRangedData(this.copyableRanges);if(this.hot.runHooks("beforeCut",n,this.copyableRanges)){var r=Vl.stringify(n);if(e&&e.clipboardData){var o=mu(n,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[$p,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",n,this.copyableRanges)}e.preventDefault()}}},{key:"onPaste",value:function(e){if(this.hot.isListening()&&!this.isEditorOpened()){var t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){var n=e.clipboardData.getData("text/html");t=n&&/(1},hidden:!1}),function(e){return{key:"cut",name:function(){return this.getTranslatedPhrase(oc)},callback:function(){e.cut()},disabled:function(){var e=this.getSelected();return!e||e.length>1},hidden:!1}}(this))}},{key:"onAfterOnCellMouseUp",value:function(){this.hot.isListening()&&!this.isEditorOpened()&&(this.getOrCreateFocusableElement(),this.focusableElement.focus())}},{key:"onAfterSelectionEnd",value:function(){var e=Jp.get(this).isFragmentSelectionEnabled;this.isEditorOpened()||(this.getOrCreateFocusableElement(),e&&this.focusableElement.getFocusableElement()!==this.hot.rootDocument.activeElement&&zt()||(this.setCopyableText(),this.focusableElement.focus()))}},{key:"onBeforeKeyDown",value:function(){if(this.hot.isListening()&&!this.isEditorOpened()){var e=this.hot.rootDocument.activeElement,t=this.hot.getActiveEditor();!t||e!==this.focusableElement.getFocusableElement()&&e!==t.select||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}}},{key:"destroy",value:function(){this.focusableElement&&(Vp(this.focusableElement),this.focusableElement=null),qp(Xp(t.prototype),"destroy",this).call(this)}}],r&&zp(n.prototype,r),t}(Rf);gu("CopyPaste",Qp);const Zp=Qp;function ey(e,t){return"border_row".concat(e,"col").concat(t)}function ty(e,t){return{id:ey(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},right:{hide:!0},bottom:{hide:!0},left:{hide:!0}}}function ny(e,t){var n=!1;return P(e.getSelectedRange(),(function(r){r.forAll((function(r,o){var i=e.getCellMeta(r,o).borders;if(i){if(!t)return n=!0,!1;if(!oe(i[t],"hide")||!1===i[t].hide)return n=!0,!1}}))})),n}function ry(e){return''.concat(String.fromCharCode(10003),"").concat(e)}function oy(e){return{key:"borders:bottom",name:function(){var e=this.getTranslatedPhrase(Sc);return ny(this,"bottom")&&(e=ry(e)),e},callback:function(t,n){var r=ny(this,"bottom");e.prepareBorder(n,"bottom",r)}}}function iy(e){return{key:"borders:left",name:function(){var e=this.getTranslatedPhrase(Cc);return ny(this,"left")&&(e=ry(e)),e},callback:function(t,n){var r=ny(this,"left");e.prepareBorder(n,"left",r)}}}function ay(e){return{key:"borders:no_borders",name:function(){return this.getTranslatedPhrase(Tc)},callback:function(t,n){e.prepareBorder(n,"noBorders")},disabled:function(){return!ny(this)}}}function sy(e){return{key:"borders:right",name:function(){var e=this.getTranslatedPhrase(kc);return ny(this,"right")&&(e=ry(e)),e},callback:function(t,n){var r=ny(this,"right");e.prepareBorder(n,"right",r)}}}function ly(e){return ly="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},ly(e)}function uy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function cy(e,t){for(var n=0;n0&&(t.hot.setCellMeta(r,o,"borders",i),t.insertBorderIntoSettings(i))}))}))}},{key:"removeAllBorders",value:function(e,t){var n=ey(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}},{key:"setBorder",value:function(e,t,n,r){var o=this.hot.getCellMeta(e,t).borders;o&&void 0!==o.border||(o=ty(e,t)),r?(o[n]={hide:!0},4===this.countHide(o)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",o))):(o[n]={width:1,color:"#000"},this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",o))}},{key:"prepareBorder",value:function(e,t,n){var r=this;P(e,(function(e){var o=e.start,i=e.end;if(o.row===i.row&&o.col===i.col)"noBorders"===t?r.removeAllBorders(o.row,o.col):r.setBorder(o.row,o.col,t,n);else switch(t){case"noBorders":Ra(o.col,i.col,(function(e){Ra(o.row,i.row,(function(t){r.removeAllBorders(t,e)}))}));break;case"top":Ra(o.col,i.col,(function(e){r.setBorder(o.row,e,t,n)}));break;case"right":Ra(o.row,i.row,(function(e){r.setBorder(e,i.col,t,n)}));break;case"bottom":Ra(o.col,i.col,(function(e){r.setBorder(i.row,e,t,n)}));break;case"left":Ra(o.row,i.row,(function(e){r.setBorder(e,o.col,t,n)}))}}))}},{key:"createCustomBorders",value:function(e){var t=this;P(e,(function(e){e.range?t.prepareBorderFromCustomAddedRange(e):t.prepareBorderFromCustomAdded(e.row,e.col,e)}))}},{key:"countHide",value:function(e){return A(Object.values(e),(function(e,t){var n=e;return t.hide&&(n+=1),n}),0)}},{key:"clearBordersFromSelectionSettings",value:function(e){var t=N(this.hot.selection.highlight.customSelections,(function(e){return e.settings.id})).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}},{key:"clearNullCellRange",value:function(){var e=this;P(this.hot.selection.highlight.customSelections,(function(t,n){if(null===t.cellRange)return e.hot.selection.highlight.customSelections[n].destroy(),e.hot.selection.highlight.customSelections.splice(n,1),!1}))}},{key:"hideBorders",value:function(){var e=this;P(this.savedBorders,(function(t){e.clearBordersFromSelectionSettings(t.id),e.clearNullCellRange()}))}},{key:"spliceBorder",value:function(e){var t=N(this.savedBorders,(function(e){return e.id})).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}},{key:"checkSavedBorders",value:function(e){var t=this,n=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),n=!0):P(this.savedBorders,(function(r,o){if(e.id===r.id)return t.savedBorders[o]=e,n=!0,!1})),n}},{key:"checkCustomSelectionsFromContextMenu",value:function(e,t,n){var r=!1;return P(this.hot.selection.highlight.customSelections,(function(o){if(e.id===o.settings.id)return ee(o.instanceBorders,(function(e){e.toggleHiddenClass(t,n)})),r=!0,!1})),r}},{key:"checkCustomSelections",value:function(e,t,n){var r=this.countHide(e),o=!1;return 4===r?(this.removeAllBorders(e.row,e.col),o=!0):P(this.hot.selection.highlight.customSelections,(function(r){if(e.id===r.settings.id)return r.cellRange=t,n&&ee(r.instanceBorders,(function(t){t.changeBorderStyle(n,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 t;this.hot.getSettings().customBorders&&e.items.push({name:"---------"},{key:"borders",name:function(){return this.getTranslatedPhrase(_c)},disabled:function(){return this.selection.isSelectedByCorner()},submenu:{items:[(t=this,{key:"borders:top",name:function(){var e=this.getTranslatedPhrase(Mc);return ny(this,"top")&&(e=ry(e)),e},callback:function(e,n){var r=ny(this,"top");t.prepareBorder(n,"top",r)}}),sy(this),oy(this),iy(this),ay(this)]}})}},{key:"onAfterInit",value:function(){this.changeBorderSettings()}},{key:"destroy",value:function(){hy(fy(t.prototype),"destroy",this).call(this)}}],r&&cy(n.prototype,r),t}(Rf);gu("customBorders",my);const py=my;function yy(e){return yy="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},yy(e)}function vy(e,t){for(var n=0;nthis.boundaries.bottom&&(r=t-this.boundaries.bottom),ethis.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,r)}},{key:"registerEvents",value:function(){var e=this,t=this.hot.rootDocument;this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()})),this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)}))}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"setupListening",value:function(){var e=this.hot.view.wt.wtTable.holder;e!==this.hot.rootWindow&&(this.setBoundaries(e.getBoundingClientRect()),this.setCallback((function(t,n){t<0?e.scrollLeft-=50:t>0&&(e.scrollLeft+=50),n<0?e.scrollTop-=20:n>0&&(e.scrollTop+=20)})),this.listening=!0)}},{key:"onMouseMove",value:function(e){this.listening&&this.check(e.clientX,e.clientY)}},{key:"onMouseUp",value:function(){this.listening=!1}},{key:"destroy",value:function(){wy(by(t.prototype),"destroy",this).call(this)}}],r&&vy(n.prototype,r),t}(Rf);gu("dragToScroll",My);const ky=My;function Sy(e){return Sy="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},Sy(e)}function Cy(e,t){for(var n=0;nn.fixedColumnsLeft-1)){var r=this.getBestColumnReturnPosition(e);t.moveByFreeze=!0,n.fixedColumnsLeft-=1,this.getMovePlugin().moveColumn(e,r+1)}}},{key:"getMovePlugin",value:function(){return this.manualColumnMovePlugin||(this.manualColumnMovePlugin=this.hot.getPlugin("manualColumnMove")),this.manualColumnMovePlugin}},{key:"getBestColumnReturnPosition",value:function(e){var t,n=this.getMovePlugin(),r=this.hot.getSettings().fixedColumnsLeft,o=n.columnsMapper.getValueByIndex(r);if(null===this.frozenColumnsBasePositions[e]||void 0===this.frozenColumnsBasePositions[e])for(t=n.columnsMapper.getValueByIndex(e);null!==o&&o<=t;)r+=1,o=n.columnsMapper.getValueByIndex(r);else{for(t=this.frozenColumnsBasePositions[e],this.frozenColumnsBasePositions[e]=void 0;null!==o&&o<=t;)r+=1,o=n.columnsMapper.getValueByIndex(r);r=o}return r-1}},{key:"addContextMenuEntry",value:function(e){var t;e.items.push({name:"---------"},(t=this,{key:"freeze_column",name:function(){return this.getTranslatedPhrase(ic)},callback:function(e,n){var r,o,i=(r=n,o=1,function(e){if(Array.isArray(e))return e}(r)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}())[0].start.col;t.freezeColumn(i),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsLeft-1)&&(t=!0),t}}),function(e){return{key:"unfreeze_column",name:function(){return this.getTranslatedPhrase(ac)},callback:function(t,n){var r,o,i=(r=n,o=1,function(e){if(Array.isArray(e))return e}(r)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}())[0].start.col;e.unfreezeColumn(i),this.render(),this.view.wt.wtOverlays.adjustElementsSize(!0)},hidden:function(){var e=this.getSelectedRange(),t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsLeft)&&(t=!0),t}}}(this))}},{key:"onAfterInit",value:function(){this.getMovePlugin().isEnabled()||this.getMovePlugin().enablePlugin()}},{key:"onBeforeColumnMove",value:function(e,t){var n=Ly.get(this);if(n.afterFirstUse&&!n.moveByFreeze){var r=this.hot.getSettings().fixedColumnsLeft,o=t=1}},{key:"setPosition",value:function(e,t){Oa(e)&&(this._element.style.top=e+Yy),Oa(t)&&(this._element.style.left=t+Yy)}},{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,t){Oa(e)&&(this._element.style.width=e+Yy),Oa(t)&&(this._element.style.height=t+Yy)}},{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,t){Oa(e)&&(this._element.style.marginTop=e+Yy),Oa(t)&&(this._element.style.marginLeft=t+Yy)}},{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}}}],n&&xy(t.prototype,n),e}();const jy=Iy;function Fy(e){return Fy="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},Fy(e)}function Wy(e,t){for(var n=0;n0?e.target.col=0:e.target.col=t>0?t-1:t;else if(e.target.TD.offsetWidth/2+a<=s){var d=e.coordsColumn>=e.countCols?e.countCols-1:e.coordsColumn;e.target.col=d+1,a+=e.target.TD.offsetWidth,e.target.col>n&&n=e.fixedColumns&&t>0&&this.hot.scrollViewportTo(void 0,t-1);e.target.col<=t&&e.target.col>=e.fixedColumns&&t>0&&this.hot.scrollViewportTo(void 0,t-1);var m=s,p=a;s+h+c>=l?m=l-h-c:s+c=l-1?p=l-1:0===p?p=1:void 0!==o.scrollX&&e.coordsColumne){var r=e-1,o=[];P(this.columnsMapper._arrayMap,(function(e,t){e>r&&o.push(t)})),this.columnsMapper.removeItems(o)}}},{key:"registerEvents",value:function(){var e=this,t=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()}))}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){var o=this.hot.view.wt.wtTable,i=this.hot.selection.isSelectedByColumnHeader(),a=this.hot.getSelectedRangeLast(),s=ov.get(this),l=gt(e.realTarget,"sortAction");if(!a||!i||s.pressed||0!==e.button||l)return s.pressed=!1,s.columnsToMove.length=0,void bt(this.hot.rootElement,[sv,av]);var u=this.guideline.isBuilt()&&!this.guideline.isAppended(),c=this.backlight.isBuilt()&&!this.backlight.isAppended();u&&c&&(this.guideline.appendTo(o.hider),this.backlight.appendTo(o.hider));var h=a.from,f=a.to,d=Math.min(h.col,f.col),m=Math.max(h.col,f.col);if(t.row<0&&t.col>=d&&t.col<=m){r.column=!0,s.pressed=!0,s.target.eventPageX=e.pageX,s.coordsColumn=t.col,s.target.TD=n,s.target.col=t.col,s.columnsToMove=this.prepareColumnsToMoving(d,m),s.hasRowHeaders=!!this.hot.getSettings().rowHeaders,s.countCols=this.hot.countCols(),s.fixedColumns=this.hot.getSettings().fixedColumnsLeft,s.rootElementOffset=Ot(this.hot.rootElement).left;var p=s.hasRowHeaders?-1:0,y=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,v=t.col-1?bt(this.hot.rootElement,av):wt(this.hot.rootElement,av),r.row=!0,r.column=!0,r.cell=!0,i.coordsColumn=t.col,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=ov.get(this);if(e.coordsColumn=void 0,e.pressed=!1,e.backlightWidth=0,bt(this.hot.rootElement,[sv,av,lv]),this.hot.selection.isSelectedByColumnHeader()&&wt(this.hot.rootElement,lv),!(e.columnsToMove.length<1||void 0===e.target.col||e.columnsToMove.indexOf(e.target.col)>-1)){if(this.moveColumns(e.columnsToMove,e.target.col),this.persistentStateSave(),this.hot.render(),this.hot.view.wt.wtOverlays.adjustElementsSize(!0),!e.disallowMoving){var t=this.columnsMapper.getIndexByValue(e.columnsToMove[0]),n=this.columnsMapper.getIndexByValue(e.columnsToMove[e.columnsToMove.length-1]);this.changeSelection(t,n)}e.columnsToMove.length=0}}},{key:"onAfterScrollVertically",value:function(){var e=this.hot.view.wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;this.backlight.setPosition(t),this.backlight.setSize(null,e.hider.offsetHeight-t)}},{key:"onAfterCreateCol",value:function(e,t){this.columnsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveCol",value:function(e,t){var n=this;this.removedColumns.length=0,!1!==e&&Ra(e,e+t-1,(function(e){n.removedColumns.push(n.hot.runHooks("modifyCol",e,n.pluginName))}))}},{key:"onAfterRemoveCol",value:function(){this.columnsMapper.unshiftItems(this.removedColumns)}},{key:"onAfterLoadData",value:function(){this.updateColumnsMapper()}},{key:"onModifyCol",value:function(e,t){var n=e;if(t!==this.pluginName){var r=this.columnsMapper.getValueByIndex(n);n=null===r?n:r}return n}},{key:"onUnmodifyCol",value:function(e){var t=this.columnsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateColumnsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),tv(nv(t.prototype),"destroy",this).call(this)}}],r&&Zy(n.prototype,r),t}(Rf);gu("ManualColumnMove",uv);const cv=uv;function hv(e){return hv="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},hv(e)}function fv(e,t){for(var n=0;n=0){var i=this.currentTH.getBoundingClientRect(),a=r=d&&(f=h.col,d=c.col),this.currentCol>=f&&this.currentCol<=d?Ra(f,d,(function(e){return t.selectedCols.push(e)})):this.selectedCols.push(this.currentCol)}else this.selectedCols.push(this.currentCol);this.startOffset=s.left-6,this.startWidth=parseInt(i.width,10),this.handle.style.top="".concat(s.top,"px"),this.handle.style.left="".concat(this.startOffset+this.startWidth,"px"),this.handle.style.height="".concat(o,"px"),this.hot.rootElement.appendChild(this.handle)}}},{key:"refreshHandlePosition",value:function(){this.handle.style.left="".concat(this.startOffset+this.currentWidth,"px")}},{key:"setupGuidePosition",value:function(){var e=parseInt(It(this.handle),10),t=parseInt(this.handle.style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);wt(this.handle,"active"),wt(this.guide,"active"),this.guide.style.top="".concat(t,"px"),this.guide.style.left=this.handle.style.left,this.guide.style.height="".concat(n-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.left=this.handle.style.left}},{key:"hideHandleAndGuide",value:function(){bt(this.handle,"active"),bt(this.guide,"active")}},{key:"checkIfColumnHeader",value:function(e){if(e!==this.hot.rootElement){var t=e.parentNode;return"THEAD"===t.tagName||this.checkIfColumnHeader(t)}return!1}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfColumnHeader(e.target)){var t=this.getTHFromTargetElement(e.target);if(!t)return;var n=t.getAttribute("colspan");!t||null!==n&&1!==n||this.pressed||this.setupHandlePosition(t)}}},{key:"afterMouseDownTimeout",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){var o=e.hot.runHooks("beforeColumnResize",n,e.newSize,!0);void 0!==o&&(e.newSize=o),"all"===e.hot.getSettings().stretchH?e.clearManualSize(n):e.setManualSize(n,e.newSize),r&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize,!0)};this.dblclick>=2&&(this.selectedCols.length>1?(P(this.selectedCols,(function(e){n(e)})),t()):P(this.selectedCols,(function(e){n(e,!0)}))),this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;gt(e.target,"manualColumnResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((function(){return t.afterMouseDownTimeout()}),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startX=Br(e),this.newSize=this.startWidth)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentWidth=this.startWidth+(Br(e)-this.startX),P(this.selectedCols,(function(e){t.newSize=t.setManualSize(e,t.currentWidth)})),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){e.hot.runHooks("beforeColumnResize",n,e.newSize,!1),r&&t(),e.saveManualColumnWidths(),e.hot.runHooks("afterColumnResize",n,e.newSize)};this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startWidth&&(this.selectedCols.length>1?(P(this.selectedCols,(function(e){n(e)})),t()):P(this.selectedCols,(function(e){n(e,!0)}))),this.setupHandlePosition(this.currentTH))}},{key:"bindEvents",value:function(){var e=this,t=this.hot,n=t.rootWindow,r=t.rootElement;this.eventManager.addEventListener(r,"mouseover",(function(t){return e.onMouseOver(t)})),this.eventManager.addEventListener(r,"mousedown",(function(t){return e.onMouseDown(t)})),this.eventManager.addEventListener(n,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(n,"mouseup",(function(){return e.onMouseUp()}))}},{key:"setManualSize",value:function(e,t){var n=Math.max(t,20),r=this.hot.runHooks("modifyCol",e);return this.manualColumnWidths[r]=n,n}},{key:"clearManualSize",value:function(e){var t=this.hot.runHooks("modifyCol",e);this.manualColumnWidths[t]=void 0}},{key:"onModifyColWidth",value:function(e,t){var n=e;if(this.enabled){var r=this.hot.runHooks("modifyCol",t),o=this.manualColumnWidths[r];this.hot.getSettings().manualColumnResize&&o&&(n=o)}return n}},{key:"onBeforeStretchingColumnWidth",value:function(e,t){var n=this.manualColumnWidths[t];return void 0===n&&(n=e),n}},{key:"onBeforeColumnResize",value:function(){this.hot.view.wt.wtViewport.hasOversizedColumnHeadersMarked={}}}],r&&fv(n.prototype,r),t}(Rf);gu("manualColumnResize",vv);const gv=vv;function wv(e,t){for(var n=0;n=1}},{key:"setPosition",value:function(e,t){void 0!==e&&(this._element.style.top=e+kv),void 0!==t&&(this._element.style.left=t+kv)}},{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,t){e&&(this._element.style.width=e+kv),t&&(this._element.style.height=t+kv)}},{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,t){e&&(this._element.style.marginTop=e+kv),t&&(this._element.style.marginLeft=t+kv)}},{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}}}],n&&Mv(t.prototype,n),e}();const Cv=Sv;function Tv(e){return Tv="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},Tv(e)}function Ev(e,t){for(var n=0;nthis.hot.getSettings().fixedRowsBottom}},{key:"persistentStateSave",value:function(){this.hot.runHooks("persistentStateSave","manualRowMove",this.rowsMapper._arrayMap)}},{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(),t=[];if(!e)return t;var n=e.from,r=e.to;return Ra(Math.min(n.row,r.row),Math.max(n.row,r.row),(function(e){t.push(e)})),t}},{key:"refreshPositions",value:function(){var e=Uv.get(this),t=e.target.coords,n=this.hot.view.wt.wtTable.getFirstVisibleRow(),r=this.hot.view.wt.wtTable.getLastVisibleRow(),o=this.hot.getSettings().fixedRowsTop,i=this.hot.countRows();t.row0&&this.hot.scrollViewportTo(n-1),t.row>=r&&r0?n-1:n:s.offsetHeight/2+u<=c?(e.target.row=t.row+1,u+=0===t.row?s.offsetHeight-1:s.offsetHeight):e.target.row=t.row;var p=c,y=u;c+m+d>=h?p=h-m-d:c+d=h-1&&(y=h-1);var v=0;this.hot.view.wt.wtOverlays.topOverlay&&(v=this.hot.view.wt.wtOverlays.topOverlay.clone.wtTable.TABLE.offsetHeight),t.row>=o&&y-a.holder.scrollTope){var r=e-1,o=[];P(this.rowsMapper._arrayMap,(function(e,t){e>r&&o.push(t)})),this.rowsMapper.removeItems(o)}}},{key:"registerEvents",value:function(){var e=this,t=this.hot.rootDocument.documentElement;this.eventManager.addEventListener(t,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(t,"mouseup",(function(){return e.onMouseUp()}))}},{key:"unregisterEvents",value:function(){this.eventManager.clear()}},{key:"onBeforeColumnSort",value:function(e,t){Uv.get(this).disallowMoving=void 0!==t}},{key:"onBeforeOnCellMouseDown",value:function(e,t,n,r){var o=this.hot.view.wt,i=o.wtTable,a=o.wtViewport,s=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast(),u=Uv.get(this);if(!l||!s||u.pressed||0!==e.button)return u.pressed=!1,u.rowsToMove.length=0,void bt(this.hot.rootElement,[qv,Gv]);var c=this.guideline.isBuilt()&&!this.guideline.isAppended(),h=this.backlight.isBuilt()&&!this.backlight.isAppended();c&&h&&(this.guideline.appendTo(i.hider),this.backlight.appendTo(i.hider));var f=l.from,d=l.to,m=Math.min(f.row,d.row),p=Math.max(f.row,d.row);if(t.col<0&&t.row>=m&&t.row<=p){r.row=!0,u.pressed=!0,u.target.eventPageY=e.pageY,u.target.coords=t,u.target.TD=n,u.rowsToMove=this.prepareRowsToMoving();var y=i.holder.scrollLeft+a.getRowHeaderWidth();this.backlight.setPosition(null,y),this.backlight.setSize(i.hider.offsetWidth-y,this.getRowsHeight(m,p+1)),this.backlight.setOffset(-1*(this.getRowsHeight(m,t.row)+e.layerY),null),wt(this.hot.rootElement,qv),this.refreshPositions()}else bt(this.hot.rootElement,Xv),u.pressed=!1,u.rowsToMove.length=0}},{key:"onMouseMove",value:function(e){var t=Uv.get(this);if(t.pressed){if(e.realTarget===this.backlight.element){var n=this.backlight.getSize().height;this.backlight.setSize(null,0),setTimeout((function(){this.backlight.setPosition(null,n)}))}t.target.eventPageY=e.pageY,this.refreshPositions()}}},{key:"onBeforeOnCellMouseOver",value:function(e,t,n,r){var o=this.hot.getSelectedRangeLast(),i=Uv.get(this);o&&i.pressed&&(i.rowsToMove.indexOf(t.row)>-1?bt(this.hot.rootElement,Gv):wt(this.hot.rootElement,Gv),r.row=!0,r.column=!0,r.cell=!0,i.target.coords=t,i.target.TD=n)}},{key:"onMouseUp",value:function(){var e=Uv.get(this),t=e.target.row,n=e.rowsToMove.length;if(e.pressed=!1,e.backlightHeight=0,bt(this.hot.rootElement,[qv,Gv,Xv]),this.hot.selection.isSelectedByRowHeader()&&wt(this.hot.rootElement,Xv),!(n<1||void 0===t||e.rowsToMove.indexOf(t)>-1||e.rowsToMove[n-1]===t-1)){if(this.moveRows(e.rowsToMove,t),this.persistentStateSave(),this.hot.render(),!e.disallowMoving){var r=this.rowsMapper.getIndexByValue(e.rowsToMove[0]),o=this.rowsMapper.getIndexByValue(e.rowsToMove[n-1]);this.changeSelection(r,o)}e.rowsToMove.length=0}}},{key:"onAfterScrollHorizontally",value:function(){var e=this.hot.view.wt.wtTable,t=this.hot.view.wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;this.backlight.setPosition(null,t),this.backlight.setSize(e.hider.offsetWidth-t)}},{key:"onAfterCreateRow",value:function(e,t){this.rowsMapper.shiftItems(e,t)}},{key:"onBeforeRemoveRow",value:function(e,t){var n=this;this.removedRows.length=0,!1!==e&&Ra(e,e+t-1,(function(e){n.removedRows.push(n.hot.runHooks("modifyRow",e,n.pluginName))}))}},{key:"onAfterRemoveRow",value:function(){this.rowsMapper.unshiftItems(this.removedRows)}},{key:"onAfterLoadData",value:function(){this.updateRowsMapper()}},{key:"onModifyRow",value:function(e,t){var n=e;if(t!==this.pluginName){var r=this.rowsMapper.getValueByIndex(n);n=null===r?n:r}return n}},{key:"onUnmodifyRow",value:function(e){var t=this.rowsMapper.getIndexByValue(e);return null===t?e:t}},{key:"onAfterPluginsInitialized",value:function(){this.updateRowsMapper(),this.initialSettings(),this.backlight.build(),this.guideline.build()}},{key:"destroy",value:function(){this.backlight.destroy(),this.guideline.destroy(),this.rowsMapper.destroy(),Wv(Bv(t.prototype),"destroy",this).call(this)}}],r&&jv(n.prototype,r),t}(Rf);gu("ManualRowMove",Kv);const Jv=Kv;function $v(e){return $v="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},$v(e)}function Qv(e,t){for(var n=0;n=0){var i=this.currentTH.getBoundingClientRect(),a=r=this.hot.countRows()-this.hot.getSettings().fixedRowsBottom,l=this.hot.view.wt.wtOverlays.leftOverlay;a?l=this.hot.view.wt.wtOverlays.topLeftCornerOverlay:s&&(l=this.hot.view.wt.wtOverlays.bottomLeftCornerOverlay);var u=l.getRelativeCellPosition(this.currentTH,n.row,n.col);if(!u){var c=l.clone.wtTable.TBODY.children[+!!this.hot.getSettings().colHeaders+r].firstChild;u=l.getRelativeCellPosition(c,n.row,n.col)}if(this.currentRow=r,this.selectedRows=[],this.hot.selection.isSelected()&&this.hot.selection.isSelectedByRowHeader()){var h=this.hot.getSelectedRangeLast(),f=h.from,d=h.to,m=f.row,p=d.row;m>=p&&(m=d.row,p=f.row),this.currentRow>=m&&this.currentRow<=p?Ra(m,p,(function(e){return t.selectedRows.push(e)})):this.selectedRows.push(this.currentRow)}else this.selectedRows.push(this.currentRow);this.startOffset=u.top-6,this.startHeight=parseInt(i.height,10),this.handle.style.top="".concat(this.startOffset+this.startHeight,"px"),this.handle.style.left="".concat(u.left,"px"),this.handle.style.width="".concat(o,"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(Yt(this.handle),10),t=parseInt(this.handle.style.left,10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);wt(this.handle,"active"),wt(this.guide,"active"),this.guide.style.top=this.handle.style.top,this.guide.style.left="".concat(t,"px"),this.guide.style.width="".concat(n-e,"px"),this.hot.rootElement.appendChild(this.guide)}},{key:"refreshGuidePosition",value:function(){this.guide.style.top=this.handle.style.top}},{key:"hideHandleAndGuide",value:function(){bt(this.handle,"active"),bt(this.guide,"active")}},{key:"checkIfRowHeader",value:function(e){if(e!==this.hot.rootElement){var t=e.parentNode;return"TBODY"===t.tagName||this.checkIfRowHeader(t)}return!1}},{key:"getTHFromTargetElement",value:function(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getTHFromTargetElement(e.parentNode):null}},{key:"onMouseOver",value:function(e){if(this.checkIfRowHeader(e.target)){var t=this.getTHFromTargetElement(e.target);t&&(this.pressed||this.setupHandlePosition(t))}}},{key:"afterMouseDownTimeout",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){var o=e.hot.runHooks("beforeRowResize",n,e.newSize,!0);void 0!==o&&(e.newSize=o),e.setManualSize(n,e.newSize),r&&t(),e.hot.runHooks("afterRowResize",n,e.newSize,!0)};this.dblclick>=2&&(this.selectedRows.length>1?(P(this.selectedRows,(function(e){n(e)})),t()):P(this.selectedRows,(function(e){n(e,!0)}))),this.dblclick=0,this.autoresizeTimeout=null}},{key:"onMouseDown",value:function(e){var t=this;gt(e.target,"manualRowResizer")&&(this.setupGuidePosition(),this.pressed=this.hot,null===this.autoresizeTimeout&&(this.autoresizeTimeout=setTimeout((function(){return t.afterMouseDownTimeout()}),500),this.hot._registerTimeout(this.autoresizeTimeout)),this.dblclick+=1,this.startY=Vr(e),this.newSize=this.startHeight)}},{key:"onMouseMove",value:function(e){var t=this;this.pressed&&(this.currentHeight=this.startHeight+(Vr(e)-this.startY),P(this.selectedRows,(function(e){t.newSize=t.setManualSize(e,t.currentHeight)})),this.refreshHandlePosition(),this.refreshGuidePosition())}},{key:"onMouseUp",value:function(){var e=this,t=function(){e.hot.forceFullRender=!0,e.hot.view.render(),e.hot.view.wt.wtOverlays.adjustElementsSize(!0)},n=function(n,r){e.hot.runHooks("beforeRowResize",n,e.newSize),r&&t(),e.saveManualRowHeights(),e.hot.runHooks("afterRowResize",n,e.newSize,!1)};this.pressed&&(this.hideHandleAndGuide(),this.pressed=!1,this.newSize!==this.startHeight&&(this.selectedRows.length>1?(P(this.selectedRows,(function(e){n(e)})),t()):P(this.selectedRows,(function(e){n(e,!0)}))),this.setupHandlePosition(this.currentTH))}},{key:"bindEvents",value:function(){var e=this,t=this.hot,n=t.rootElement,r=t.rootWindow;this.eventManager.addEventListener(n,"mouseover",(function(t){return e.onMouseOver(t)})),this.eventManager.addEventListener(n,"mousedown",(function(t){return e.onMouseDown(t)})),this.eventManager.addEventListener(r,"mousemove",(function(t){return e.onMouseMove(t)})),this.eventManager.addEventListener(r,"mouseup",(function(){return e.onMouseUp()}))}},{key:"setManualSize",value:function(e,t){var n=this.hot.runHooks("modifyRow",e);return this.manualRowHeights[n]=t,t}},{key:"onModifyRowHeight",value:function(e,t){if(this.enabled){var n=this.hot.getPlugin("autoRowSize"),r=n?n.heights[t]:null,o=this.hot.runHooks("modifyRow",t),i=this.manualRowHeights[o];if(void 0!==i&&(i===r||i>(e||0)))return i}return e}}],r&&Qv(n.prototype,r),t}(Rf);gu("manualRowResize",rg);const og=rg;function ig(){var e=ug(["The merged cell declared at [",", ",'] has "rowspan" or "colspan" declared as \n "0", which is not supported. It cannot be added to the collection.']);return ig=function(){return e},e}function ag(){var e=ug(["The merged cell declared at [",", ",'] has both "rowspan" \n and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.']);return ag=function(){return e},e}function sg(){var e=ug(["The merged cell declared at [",", ","] is positioned (or positioned partially) \n outside of the table range. It was not added to the table, please fix your setup."]);return sg=function(){return e},e}function lg(){var e=ug(["The merged cell declared with {row: ",", col: ",", rowspan: \n ",", colspan: ","} contains negative values, which is not supported. It \n will not be added to the collection."]);return lg=function(){return e},e}function ug(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function cg(e,t){for(var n=0;nt-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col)}},{key:"includes",value:function(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}},{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,t){var n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",a=Math.min(t,r),s=Math.max(t,r),l=this[i],u=this[i]+this[o]-1;if(l>=t&&(this[i]+=n),n>0)t<=u&&t>l&&(this[o]+=n);else if(n<0){if(a<=l&&s>=u)return this.removed=!0,!1;if(l>=a&&l<=s){var c=s-l+1,h=Math.abs(n)-c;this[i]-=h+n,this[o]-=c}else if(l<=a&&u>=s)this[o]+=n;else if(l<=a&&u>=a&&uthis.row:"right"===t?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 Ce(new Me(this.row,this.col),new Me(this.row,this.col),new Me(this.getLastRow(),this.getLastColumn()))}}],r=[{key:"NEGATIVE_VALUES_WARNING",value:function(e){return Jn(lg(),e.row,e.col,e.rowspan,e.colspan)}},{key:"IS_OUT_OF_BOUNDS_WARNING",value:function(e){return Jn(sg(),e.row,e.col)}},{key:"IS_SINGLE_CELL",value:function(e){return Jn(ag(),e.row,e.col)}},{key:"ZERO_SPAN_WARNING",value:function(e){return Jn(ig(),e.row,e.col)}},{key:"containsNegativeValues",value:function(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}},{key:"isSingleCell",value:function(e){return 1===e.colspan&&1===e.rowspan}},{key:"containsZeroSpan",value:function(e){return 0===e.colspan||0===e.rowspan}},{key:"isOutOfBounds",value:function(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}}],n&&cg(t.prototype,n),r&&cg(t,r),e}();const fg=hg;function dg(e,t,n,r){t?t.row===n&&t.col===r?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}function mg(){var e,t,n=(e=["The merged cell declared at [",", ","], overlaps with the other declared merged \n cell. The overlapping merged cell was not added to the table, please fix your setup."],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return mg=function(){return n},n}function pg(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=e&&n.col<=t&&n.col+n.colspan-1>=t&&(r=n,1))})),r}},{key:"getByRange",value:function(e){var t=this.mergedCells,n=!1;return P(t,(function(t){return!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(n=t)})),n}},{key:"getWithinRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.mergedCells,r=[],o=e;if(!o.includesRange){var i=new Me(o.from.row,o.from.col),a=new Me(o.to.row,o.to.col);o=new Ce(i,i,a)}return P(n,(function(e){var n=new Me(e.row,e.col),i=new Me(e.row+e.rowspan-1,e.col+e.colspan-1),a=new Ce(n,n,i);t?o.overlaps(a)&&r.push(e):o.includesRange(a)&&r.push(e)})),!!r.length&&r}},{key:"add",value:function(t){var n=this.mergedCells,r=t.row,o=t.col,i=t.rowspan,a=t.colspan,s=new fg(r,o,i,a),l=this.get(r,o),u=this.isOverlapping(s);return l||u?(Mr(e.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),n.push(s),s)}},{key:"remove",value:function(e,t){var n=this.mergedCells,r=this.get(e,t),o=r?this.mergedCells.indexOf(r):null;return!(!r||!1===o)&&(n.splice(o,1),r)}},{key:"clear",value:function(){var e=this,t=this.mergedCells,n=[],r=[];P(t,(function(t){var r=e.hot.getCell(t.row,t.col);r&&n.push([r,e.get(t.row,t.col),t.row,t.col])})),this.mergedCells.length=0,P(n,(function(t,o){Ra(0,t.rowspan-1,(function(n){Ra(0,t.colspan-1,(function(o){if(0!==o||0!==n){var i=e.hot.getCell(t.row+n,t.col+o);i&&r.push([i,null,null,null])}}))})),n[o][1]=null})),P(n,(function(e){dg.apply(void 0,pg(e))})),P(r,(function(e){dg.apply(void 0,pg(e))}))}},{key:"isOverlapping",value:function(e){var t=new Ce(null,new Me(e.row,e.col),new Me(e.row+e.rowspan-1,e.col+e.colspan-1)),n=!1;return P(this.mergedCells,(function(e){return!new Ce(null,new Me(e.row,e.col),new Me(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(n=!0,!1)})),n}},{key:"isMergedParent",value:function(e,t){var n=this.mergedCells,r=!1;return P(n,(function(n){return n.row!==e||n.col!==t||(r=!0,!1)})),r}},{key:"shiftCollections",value:function(e,t,n){var r=this,o=[0,0];switch(e){case"right":o[0]+=n;break;case"left":o[0]-=n;break;case"down":o[1]+=n;break;case"up":o[1]-=n}P(this.mergedCells,(function(e){e.shift(o,t)})),La(this.mergedCells.length-1,0,(function(e){var t=r.mergedCells[e];t&&t.removed&&r.mergedCells.splice(r.mergedCells.indexOf(t),1)}))}}],r=[{key:"IS_OVERLAPPING_WARNING",value:function(e){return Jn(mg(),e.row,e.col)}}],n&&yg(t.prototype,n),r&&yg(t,r),e}();const gg=vg;function wg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function bg(e,t){for(var n=0;n-1?u-s+1:c-l+1,f=i-Math.floor(i/h)*h,d=this.getFarthestCollection(e,t,n,r);if(d)if("down"===n){var m=d.row+d.rowspan-s-f;o[2]+m>=this.plugin.hot.countRows()?o[2]-=f:o[2]+=f?m:0}else if("right"===n){var p=d.col+d.colspan-l-f;o[3]+p>=this.plugin.hot.countCols()?o[3]-=f:o[3]+=f?p:0}else if("up"===n){var y=u-f-d.row+1;o[0]+y<0?o[0]+=f:o[0]-=f?y:0}else if("left"===n){var v=c-f-d.col+1;o[1]+v<0?o[1]+=f:o[1]-=f?v:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:i,dragArea:o,cycleLength:h}),o}},{key:"updateCurrentFillCache",value:function(e){this.currentFillData||(this.currentFillData={}),G(this.currentFillData,e)}},{key:"getAutofillSize",value:function(e,t,n){var r=wg(e,4),o=r[0],i=r[1],a=r[2],s=r[3],l=wg(t,4),u=l[0],c=l[1],h=l[2],f=l[3];switch(n){case"up":return o-u;case"down":return h-a;case"left":return i-c;case"right":return f-s;default:return null}}},{key:"getDragArea",value:function(e,t,n){var r=wg(e,4),o=r[0],i=r[1],a=r[2],s=r[3],l=wg(t,4),u=l[0],c=l[1],h=l[2],f=l[3];switch(n){case"up":return[u,c,o-1,s];case"down":return[a+1,i,h,s];case"left":return[u,c,a,i-1];case"right":return[o,s+1,h,f];default:return null}}},{key:"getFarthestCollection",value:function(e,t,n,r){var o=wg(e,4),i=o[0],a=o[1],s=o[2],l=o[3],u=["up","down"].indexOf(n)>-1,c=u?s:l,h=u?i:a,f=this.getAutofillSize(e,t,n),d=u?s-i+1:l-a+1,m=f-Math.floor(f/d)*d,p=null,y=null,v=null;switch(n){case"up":p="includesVertically",v=c-m+1;break;case"left":p="includesHorizontally",v=c-m+1;break;case"down":p="includesVertically",v=h+m-1;break;case"right":p="includesHorizontally",v=h+m-1}return P(r,(function(e){e[p](v)&&e.isFarther(y,n)&&(y=e)})),y}},{key:"recreateAfterDataPopulation",value:function(e){if(this.currentFillData){var t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,o=function(e,n){switch(r){case"up":return e.row-n>=t.from.row;case"down":return e.row+e.rowspan-1+n<=t.to.row;case"left":return e.col-n>=t.from.column;case"right":return e.col+e.colspan-1+n<=t.to.column;default:return null}},i=0,a=null,s=1;do{for(var l=0;ln.max)&&(n.max=o),(null===r.min||ir.max)&&(r.max=i)})),{from:{row:n.min,column:r.min},to:{row:n.max,column:r.max}}}},{key:"dragAreaOverlapsCollections",value:function(e,t,n){var r=wg(this.getDragArea(e,t,n),4),o=r[0],i=r[1],a=r[2],s=r[3],l=new Me(o,i),u=new Me(a,s),c=new Ce(l,l,u);return!!this.mergedCellsCollection.getWithinRange(c,!0)}}],n&&bg(t.prototype,n),e}();const Mg=_g;function kg(e,t){for(var n=0;n0?o&&n!==i&&(r+=a-n+1):o&&n!==a&&(r-=n-i+1),e.row?e.row=r:e.col&&(e.col=r))}},{key:"getUpdatedSelectionRange",value:function(e,t){return new Ce(e.highlight,e.from,new Me(e.to.row+t.row,e.to.col+t.col))}},{key:"getSelectedMergedCellClassName",value:function(e,t,n,r){var o,i,a=(i=4,function(e){if(Array.isArray(e))return e}(o=n)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),s=a[0],l=a[1],u=a[2],c=a[3];if(void 0!==r&&e>=s&&e<=u&&t>=l&&t<=c){if(!this.plugin.mergedCellsCollection.isMergedParent(e,t))return;var h=this.plugin.mergedCellsCollection.get(e,t);if(!h)return;if(h.row+h.rowspan-1<=u&&h.col+h.colspan-1<=c)return"".concat(this.fullySelectedMergedCellClassName,"-").concat(r);if(this.plugin.selectionCalculations.isMergeCellFullySelected(h,this.plugin.hot.getSelectedRange()))return"".concat(this.fullySelectedMergedCellClassName,"-multiple")}}},{key:"isMergeCellFullySelected",value:function(e,t){var n=[];if(!t||!e)return!1;for(var r=0;r1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}},{key:"toggleMergeOnSelection",value:function(){var e=this.hot.getSelectedRangeLast();if(e){e.setDirection("NW-SE");var t=e.from,n=e.to;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,n.row,n.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 t=e.from,n=e.to;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"unmergeSelection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(e){var t=e.from,n=e.to;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}}},{key:"mergeRange",value:function(e){var t=this,n=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;return!!this.canMergeRange(a,n)&&(this.hot.runHooks("beforeMergeCells",e,n),Ra(0,a.rowspan-1,(function(e){Ra(0,a.colspan-1,(function(n){var r=null;s[e]||(s[e]=[]),0===e&&0===n?r=t.hot.getDataAtCell(a.row,a.col):t.hot.setCellMeta(a.row+e,a.col+n,"hidden",!0),s[e][n]=r}))})),this.hot.setCellMeta(a.row,a.col,"spanned",!0),!this.mergedCellsCollection.add(a)||(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,n),l))}},{key:"unmergeRange",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.mergedCellsCollection.getWithinRange(e);r&&(this.hot.runHooks("beforeUnmergeCells",e,n),P(r,(function(e){t.mergedCellsCollection.remove(e.row,e.col),Ra(0,e.rowspan-1,(function(n){Ra(0,e.colspan-1,(function(r){t.hot.removeCellMeta(e.row+n,e.col+r,"hidden")}))})),t.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.render(),this.hot.runHooks("afterUnmergeCells",e,n))}},{key:"toggleMerge",value:function(e){var t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}},{key:"merge",value:function(e,t,n,r){var o=new Me(e,t),i=new Me(n,r);this.mergeRange(new Ce(o,o,i))}},{key:"unmerge",value:function(e,t,n,r){var o=new Me(e,t),i=new Me(n,r);this.unmergeRange(new Ce(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(),jr(e))}},{key:"onAfterIsMultipleSelection",value:function(e){if(e)for(var t=this.mergedCellsCollection.mergedCells,n=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)}t=new Me(r.highlight.row+o.row,r.highlight.col+o.col);var u=this.mergedCellsCollection.get(t.row,t.col);u&&(n.lastDesiredCoords=t,o={row:u.row-i.row,col:u.col-i.col}),0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}},{key:"onModifyTransformEnd",value:function(e){var t=this,n=this.hot.getSelectedRangeLast(),r=K(e),o=this.selectionCalculations.getUpdatedSelectionRange(n,e),i=K(r),a=this.mergedCellsCollection.getWithinRange(o,!0);do{i=K(r),this.selectionCalculations.getUpdatedSelectionRange(n,r),P(a,(function(e){t.selectionCalculations.snapDelta(r,n,e)}))}while(r.row!==i.row||r.col!==i.col);e.row=r.row,e.col=r.col}},{key:"onModifyGetCellCoords",value:function(e,t){var n=this.mergedCellsCollection.get(e,t);return n?[n.row,n.col,n.row+n.rowspan-1,n.col+n.colspan-1]:void 0}},{key:"addMergeActionsToContextMenu",value:function(e){var t;e.items.push({name:"---------"},(t=this,{key:"mergeCells",name:function(){var e=this.getSelectedLast();if(e){var n=t.mergedCellsCollection.get(e[0],e[1]);if(n.row===e[0]&&n.col===e[1]&&n.row+n.rowspan-1===e[2]&&n.col+n.colspan-1===e[3])return this.getTranslatedPhrase(lc)}return this.getTranslatedPhrase(sc)},callback:function(){t.toggleMergeOnSelection()},disabled:function(){var e=this.getSelectedLast();return!e||fg.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,t,n){dg(e,this.mergedCellsCollection.get(t,n),t,n)}},{key:"onBeforeSetRangeEnd",value:function(e){var t=this.hot.getSelectedRangeLast();t.highlight=new Me(t.highlight.row,t.highlight.col),t.to=e;var n=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{n=!1;for(var r=0;re.endRow)return e.endRow=o,n.onAfterViewportRowCalculatorOverride.call(n,e)}return!0}))}},{key:"onAfterViewportColumnCalculatorOverride",value:function(e){var t,n=this;Ra(0,this.hot.countRows()-1,(function(r){if((t=n.mergedCellsCollection.get(r,e.startColumn))&&t.cole.endColumn)return e.endColumn=o,n.onAfterViewportColumnCalculatorOverride.call(n,e)}return!0}))}},{key:"onModifyAutofillRange",value:function(e,t){this.autofillCalculations.correctSelectionAreaSize(t);var n=this.autofillCalculations.getDirection(t,e),r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,r,n))return t;var o=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return o?r=this.autofillCalculations.snapDragArea(t,r,n,o):r}},{key:"onAfterCreateCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}},{key:"onAfterRemoveCol",value:function(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}},{key:"onAfterCreateRow",value:function(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}},{key:"onAfterRemoveRow",value:function(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}},{key:"onAfterChange",value:function(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}},{key:"onBeforeDrawAreaBorders",value:function(e,t){if(t&&"area"===t){var n=this.hot.getSelectedRangeLast();P(this.mergedCellsCollection.getWithinRange(n),(function(t){n.getBottomRightCorner().row===t.getLastRow()&&n.getBottomRightCorner().col===t.getLastColumn()&&(e[2]=t.row,e[3]=t.col)}))}}},{key:"onAfterModifyTransformStart",value:function(e,t,n){if(this.enabled){var r=this.mergedCellsCollection.get(e.row,e.col);if(r){var o=t>0,i=t<0,a=n<0,s=n>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,h=0===r.col;(o&&l||i&&u||s&&c||a&&h)&&(e.row=r.row,e.col=r.col)}}}},{key:"onAfterDrawSelection",value:function(e,t,n,r){return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}},{key:"onBeforeRemoveCellClassNames",value:function(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}}],r&&Og(n.prototype,r),t}(Rf);gu("mergeCells",Ng);const Pg=Ng;function xg(e){return xg="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},xg(e)}function Yg(e,t){for(var n=0;n0}}],r&&Yg(n.prototype,r),t}(Rf);gu("multipleSelectionHandles",Wg);const Bg=Wg;var Vg=n(78717),Ug=n.n(Vg);function zg(e){var t=e.match(/^\/(\d+)\/?(.*)?$/);if(!t)return null;var n,r,o=(r=3,function(e){if(Array.isArray(e))return e}(n=t)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),i=o[1],a=o[2];return{row:parseInt(i,10),col:/^\d*$/.test(a)?parseInt(a,10):a}}function Gg(e,t){for(var n=0;n1&&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 Ra(0,o-1,(function(o){Ra(0,i-1,(function(i){var l=t.hot.getDataAtCell(o,i),u=t.hot.getCellMeta(o,i),c=u.search.callback||n,h=(u.search.queryMethod||r)(e,l,u);if(h){var f={row:o,col:i,data:l};a.push(f)}c&&c(s,o,i,l,h)}))})),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){Q(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}},{key:"onBeforeRenderer",value:function(e,t,n,r,o,i){var a,s,l=i.className||[],u=[];"string"==typeof l?u=l.split(" "):(a=u).push.apply(a,function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t1?this.getSelected():[[i[0][0],i[0][1]]];t.done(new Ew.ChangeAction(i,a))}})),e.addHook("afterCreateRow",(function(e,n,r){if("UndoRedo.undo"!==r&&"UndoRedo.undo"!==r&&"auto"!==r){var o=new Ew.CreateRowAction(e,n);t.done(o)}})),e.addHook("beforeRemoveRow",(function(n,r,o,i){if("UndoRedo.undo"!==i&&"UndoRedo.redo"!==i&&"auto"!==i){var a=t.instance.getSourceDataArray(),s=(a.length+n)%a.length,l=e.toPhysicalRow(s),u=X(a.slice(l,l+r));t.done(new Ew.RemoveRowAction(s,u))}})),e.addHook("afterCreateCol",(function(e,n,r){"UndoRedo.undo"!==r&&"UndoRedo.redo"!==r&&"auto"!==r&&t.done(new Ew.CreateColumnAction(e,n))})),e.addHook("beforeRemoveCol",(function(n,r,o,i){if("UndoRedo.undo"!==i&&"UndoRedo.redo"!==i&&"auto"!==i){var a=t.instance.getSourceDataArray(),s=(t.instance.countCols()+n)%t.instance.countCols(),l=[],u=[],c=[];Ra(a.length-1,(function(t){var n=[],o=a[t];Ra(s,s+(r-1),(function(t){n.push(o[e.runHooks("modifyCol",t)])})),l.push(n)})),Ra(r-1,(function(t){c.push(e.runHooks("modifyCol",s+t))})),Array.isArray(e.getSettings().colHeaders)&&Ra(r-1,(function(t){u.push(e.getSettings().colHeaders[e.runHooks("modifyCol",s+t)]||null)}));var h=t.instance.getPlugin("manualColumnMove"),f=h.isEnabled()?h.columnsMapper.__arrayMap:[],d=new Ew.RemoveColumnAction(s,c,l,u,f);t.done(d)}})),e.addHook("beforeCellAlignment",(function(e,n,r,o){var i=new Ew.CellAlignmentAction(e,n,r,o);t.done(i)})),e.addHook("beforeFilter",(function(e){t.done(new Ew.FiltersAction(e))})),e.addHook("beforeRowMove",(function(e,n){!1!==e&&t.done(new Ew.RowMoveAction(e,n))})),e.addHook("beforeMergeCells",(function(n,r){r||t.done(new Ew.MergeCellsAction(e,n))})),e.addHook("afterUnmergeCells",(function(n,r){r||t.done(new Ew.UnmergeCellsAction(e,n))}))}Ew.prototype.done=function(e){this.ignoreNewActions||(this.doneActions.push(e),this.undoneActions.length=0)},Ew.prototype.undo=function(){if(this.isUndoAvailable()){var e=this.doneActions.pop(),t=X(e),n=this.instance;if(!1===n.runHooks("beforeUndo",t))return;this.ignoreNewActions=!0;var r=this;e.undo(this.instance,(function(){r.ignoreNewActions=!1,r.undoneActions.push(e)})),n.runHooks("afterUndo",t)}},Ew.prototype.redo=function(){if(this.isRedoAvailable()){var e=this.undoneActions.pop(),t=X(e),n=this.instance;if(!1===n.runHooks("beforeRedo",t))return;this.ignoreNewActions=!0;var r=this;e.redo(this.instance,(function(){r.ignoreNewActions=!1,r.doneActions.push(e)})),n.runHooks("afterRedo",t)}},Ew.prototype.isUndoAvailable=function(){return this.doneActions.length>0},Ew.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},Ew.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},Ew.Action=function(){},Ew.Action.prototype.undo=function(){},Ew.Action.prototype.redo=function(){},Ew.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},z(Ew.ChangeAction,Ew.Action),Ew.ChangeAction.prototype.undo=function(e,t){for(var n=X(this.changes),r=e.countEmptyRows(!0),o=e.countEmptyCols(!0),i=0,a=n.length;i=n&&this.index-rthis.target?this.rows[0]+this.rows.length:this.rows[0],i=[],a=this.rows.length+r,s=r;s