1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-696e880a"],{"00fd":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("d06e");var r=n("9f10"),i=n("81ea");class s extends r["a"]{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super(e)}getTrimmedIndexes(){return Object(i["arrayReduce"])(this.getValues(),(e,t,n)=>(t&&e.push(n),e),[])}}},"010e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},"01b5":function(e,t,n){"use strict";var r=n("73fa"),i=n("8793"),s=n("7c2b");e.exports=function(e,t,n){var o,a;return s&&r(o=t.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&s(e,a),e}},"0204":function(e,t,n){"use strict";var r=n("48ab"),i=Function.prototype,s=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(s):function(){return o.apply(s,arguments)})},"0227":function(e,t,n){"use strict";var r=n("f2e8"),i=n("73fa"),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e]):r[e]&&r[e][t]}},"022b":function(e,t,n){"use strict";e.exports=function(e){return null===e||void 0===e}},"0283":function(e,t,n){"use strict";n.r(t),n.d(t,"CONTEXT_MENU_ITEMS_NAMESPACE",(function(){return r})),n.d(t,"CONTEXTMENU_ITEMS_NO_ITEMS",(function(){return s})),n.d(t,"CONTEXTMENU_ITEMS_ROW_ABOVE",(function(){return o})),n.d(t,"CONTEXTMENU_ITEMS_ROW_BELOW",(function(){return a})),n.d(t,"CONTEXTMENU_ITEMS_INSERT_LEFT",(function(){return l})),n.d(t,"CONTEXTMENU_ITEMS_INSERT_RIGHT",(function(){return c})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_ROW",(function(){return u})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COLUMN",(function(){return h})),n.d(t,"CONTEXTMENU_ITEMS_UNDO",(function(){return d})),n.d(t,"CONTEXTMENU_ITEMS_REDO",(function(){return m})),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY",(function(){return f})),n.d(t,"CONTEXTMENU_ITEMS_CLEAR_COLUMN",(function(){return p})),n.d(t,"CONTEXTMENU_ITEMS_COPY",(function(){return g})),n.d(t,"CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS",(function(){return y})),n.d(t,"CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS",(function(){return w})),n.d(t,"CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY",(function(){return b})),n.d(t,"CONTEXTMENU_ITEMS_CUT",(function(){return _})),n.d(t,"CONTEXTMENU_ITEMS_FREEZE_COLUMN",(function(){return v})),n.d(t,"CONTEXTMENU_ITEMS_UNFREEZE_COLUMN",(function(){return S})),n.d(t,"CONTEXTMENU_ITEMS_MERGE_CELLS",(function(){return E})),n.d(t,"CONTEXTMENU_ITEMS_UNMERGE_CELLS",(function(){return C})),n.d(t,"CONTEXTMENU_ITEMS_ADD_COMMENT",(function(){return T})),n.d(t,"CONTEXTMENU_ITEMS_EDIT_COMMENT",(function(){return M})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COMMENT",(function(){return R})),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY_COMMENT",(function(){return O})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT",(function(){return N})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_LEFT",(function(){return A})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_CENTER",(function(){return L})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT",(function(){return I})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY",(function(){return x})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_TOP",(function(){return k})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE",(function(){return D})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM",(function(){return H})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS",(function(){return P})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_TOP",(function(){return j})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_RIGHT",(function(){return F})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_BOTTOM",(function(){return Y})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_LEFT",(function(){return U})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_BORDERS",(function(){return V})),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD",(function(){return B})),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD",(function(){return W})),n.d(t,"CONTEXTMENU_ITEMS_HIDE_COLUMN",(function(){return G})),n.d(t,"CONTEXTMENU_ITEMS_SHOW_COLUMN",(function(){return z})),n.d(t,"CONTEXTMENU_ITEMS_HIDE_ROW",(function(){return K})),n.d(t,"CONTEXTMENU_ITEMS_SHOW_ROW",(function(){return X})),n.d(t,"FILTERS_NAMESPACE",(function(){return $})),n.d(t,"FILTERS_CONDITIONS_NAMESPACE",(function(){return q})),n.d(t,"FILTERS_CONDITIONS_NONE",(function(){return J})),n.d(t,"FILTERS_CONDITIONS_EMPTY",(function(){return Q})),n.d(t,"FILTERS_CONDITIONS_NOT_EMPTY",(function(){return Z})),n.d(t,"FILTERS_CONDITIONS_EQUAL",(function(){return ee})),n.d(t,"FILTERS_CONDITIONS_NOT_EQUAL",(function(){return te})),n.d(t,"FILTERS_CONDITIONS_BEGINS_WITH",(function(){return ne})),n.d(t,"FILTERS_CONDITIONS_ENDS_WITH",(function(){return re})),n.d(t,"FILTERS_CONDITIONS_CONTAINS",(function(){return ie})),n.d(t,"FILTERS_CONDITIONS_NOT_CONTAIN",(function(){return se})),n.d(t,"FILTERS_CONDITIONS_BY_VALUE",(function(){return oe})),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN",(function(){return ae})),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL",(function(){return le})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN",(function(){return ce})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL",(function(){return ue})),n.d(t,"FILTERS_CONDITIONS_BETWEEN",(function(){return he})),n.d(t,"FILTERS_CONDITIONS_NOT_BETWEEN",(function(){return de})),n.d(t,"FILTERS_CONDITIONS_AFTER",(function(){return me})),n.d(t,"FILTERS_CONDITIONS_BEFORE",(function(){return fe})),n.d(t,"FILTERS_CONDITIONS_TODAY",(function(){return pe})),n.d(t,"FILTERS_CONDITIONS_TOMORROW",(function(){return ge})),n.d(t,"FILTERS_CONDITIONS_YESTERDAY",(function(){return ye})),n.d(t,"FILTERS_DIVS_FILTER_BY_CONDITION",(function(){return we})),n.d(t,"FILTERS_DIVS_FILTER_BY_VALUE",(function(){return be})),n.d(t,"FILTERS_LABELS_CONJUNCTION",(function(){return _e})),n.d(t,"FILTERS_LABELS_DISJUNCTION",(function(){return ve})),n.d(t,"FILTERS_VALUES_BLANK_CELLS",(function(){return Se})),n.d(t,"FILTERS_BUTTONS_SELECT_ALL",(function(){return Ee})),n.d(t,"FILTERS_BUTTONS_CLEAR",(function(){return Ce})),n.d(t,"FILTERS_BUTTONS_OK",(function(){return Te})),n.d(t,"FILTERS_BUTTONS_CANCEL",(function(){return Me})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SEARCH",(function(){return Re})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_VALUE",(function(){return Oe})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE",(function(){return Ne})),n.d(t,"CHECKBOX_RENDERER_NAMESPACE",(function(){return Ae})),n.d(t,"CHECKBOX_CHECKED",(function(){return Le})),n.d(t,"CHECKBOX_UNCHECKED",(function(){return Ie}));const r="ContextMenu:items",i=r,s=i+".noItems",o=i+".insertRowAbove",a=i+".insertRowBelow",l=i+".insertColumnOnTheLeft",c=i+".insertColumnOnTheRight",u=i+".removeRow",h=i+".removeColumn",d=i+".undo",m=i+".redo",f=i+".readOnly",p=i+".clearColumn",g=i+".copy",y=i+".copyWithHeaders",w=i+".copyWithGroupHeaders",b=i+".copyHeadersOnly",_=i+".cut",v=i+".freezeColumn",S=i+".unfreezeColumn",E=i+".mergeCells",C=i+".unmergeCells",T=i+".addComment",M=i+".editComment",R=i+".removeComment",O=i+".readOnlyComment",N=i+".align",A=i+".align.left",L=i+".align.center",I=i+".align.right",x=i+".align.justify",k=i+".align.top",D=i+".align.middle",H=i+".align.bottom",P=i+".borders",j=i+".borders.top",F=i+".borders.right",Y=i+".borders.bottom",U=i+".borders.left",V=i+".borders.remove",B=i+".nestedHeaders.insertChildRow",W=i+".nestedHeaders.detachFromParent",G=i+".hideColumn",z=i+".showColumn",K=i+".hideRow",X=i+".showRow",$="Filters:",q=$+"conditions",J=q+".none",Q=q+".isEmpty",Z=q+".isNotEmpty",ee=q+".isEqualTo",te=q+".isNotEqualTo",ne=q+".beginsWith",re=q+".endsWith",ie=q+".contains",se=q+".doesNotContain",oe=q+".byValue",ae=q+".greaterThan",le=q+".greaterThanOrEqualTo",ce=q+".lessThan",ue=q+".lessThanOrEqualTo",he=q+".isBetween",de=q+".isNotBetween",me=q+".after",fe=q+".before",pe=q+".today",ge=q+".tomorrow",ye=q+".yesterday",we=$+"labels.filterByCondition",be=$+"labels.filterByValue",_e=$+"labels.conjunction",ve=$+"labels.disjunction",Se=$+"values.blankCells",Ee=$+"buttons.selectAll",Ce=$+"buttons.clear",Te=$+"buttons.ok",Me=$+"buttons.cancel",Re=$+"buttons.placeholder.search",Oe=$+"buttons.placeholder.value",Ne=$+"buttons.placeholder.secondValue",Ae="CheckboxRenderer:",Le=Ae+"checked",Ie=Ae+"unchecked"},"02fb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ml",{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 വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},"03529":function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));n("7a89");var r=n("13e1"),i=n("87d6"),s=n("63d8"),o=n("5d7f"),a=n("ffec");function l(e,t,n){e.addEventListener(t,n,!1)}function c(e,t,n){e.removeEventListener(t,n,!1)}function u(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function h(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=e.body,r=e.createTextNode(""),i=e.createElement("span");let s;function o(){r.textContent=s.value,i.style.position="absolute",i.style.fontSize=u(s).fontSize,i.style.fontFamily=u(s).fontFamily,i.style.whiteSpace="pre",n.appendChild(i);const e=i.clientWidth+2;n.removeChild(i);const o=s.style;o.height=t.minHeight+"px",t.minWidth>e?o.width=t.minWidth+"px":e>t.maxWidth?o.width=t.maxWidth+"px":o.width=e+"px";const a=s.scrollHeight?s.scrollHeight-1:0;t.minHeight>a?o.height=t.minHeight+"px":t.maxHeight<a?(o.height=t.maxHeight+"px",o.overflowY="visible"):o.height=a+"px"}function a(){e.defaultView.setTimeout(o,0)}function h(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=s.clientHeight;else{const n=parseInt(e.minHeight,10);isNaN(n)||(t.minHeight=n)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=s.clientHeight;else{const n=parseInt(e.maxHeight,10);isNaN(n)||(t.maxHeight=n)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=s.clientWidth;else{const n=parseInt(e.minWidth,10);isNaN(n)||(t.minWidth=n)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=s.clientWidth;else{const n=parseInt(e.maxWidth,10);isNaN(n)||(t.maxWidth=n)}i.firstChild||(i.className="autoResize",i.style.display="inline-block",i.appendChild(r))}function d(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s=e,h(n),"TEXTAREA"===s.nodeName&&(s.style.resize="none",s.style.height=t.minHeight+"px",s.style.minWidth=t.minWidth+"px",s.style.maxWidth=t.maxWidth+"px",s.style.overflowY="hidden"),r&&(l(s,"input",o),l(s,"keydown",a)),o()}return{init:d,resize:o,unObserve(){c(s,"input",o),c(s,"keydown",a)}}}var d=n("7b9c"),m=n("c5c4");function f(e,t){const n=Object(o["getCaretPosition"])(t),r=t.value.split("\n");let i=n,s=0;for(let o=0;o<r.length;o++){const t=r[o];0!==o&&(s+=r[o-1].length+1);const a=s+t.length;if("home"===e?i=s:"end"===e&&(i=a),n<=a)break}Object(o["setCaretPosition"])(t,i)}var p=n("8828");function g(e,t,n){return t=y(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function w(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const b="ht_editor_visible",_="ht_editor_hidden",v="textEditor",S="text";class E extends r["a"]{static get EDITOR_TYPE(){return S}constructor(e){super(e),g(this,"eventManager",new i["a"](this)),g(this,"autoResize",h(this.hot.rootDocument)),g(this,"TEXTAREA",void 0),g(this,"textareaStyle",void 0),g(this,"TEXTAREA_PARENT",void 0),g(this,"textareaParentStyle",void 0),g(this,"layerClass",void 0),this.eventManager=new i["a"](this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),Object(o["isThisHotChild"])(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,n,i,s,o){const a=this.state;if(super.prepare(e,t,n,i,s,o),!o.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=o;e&&(this.TEXTAREA.value=""),a!==r["b"].FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===r["b"].VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),Object(o["setCaretPosition"])(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),Object(o["setAttribute"])(this.TEXTAREA,[["data-hot-input",""],Object(p["K"])(-1)]),this.hot.getSettings().ariaTags&&Object(o["setAttribute"])(this.TEXTAREA,[Object(p["n"])()]),Object(o["addClass"])(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"),Object(o["addClass"])(this.TEXTAREA_PARENT,"handsontableInputHolder"),Object(o["hasClass"])(this.TEXTAREA_PARENT,this.layerClass)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,this.layerClass),Object(o["addClass"])(this.TEXTAREA_PARENT,_),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){Object(s["isEdge"])()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",Object(o["removeClass"])(this.TEXTAREA_PARENT,this.layerClass),Object(o["addClass"])(this.TEXTAREA_PARENT,_)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;Object(a["rangeEach"])(e.length-1,n=>{const r=e[n];if(Object(o["hasClass"])(r,"handsontableEditor"))return t=!0,!1}),Object(o["hasClass"])(this.TEXTAREA_PARENT,_)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,_),t?(this.layerClass=b,Object(o["addClass"])(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),Object(o["addClass"])(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==r["b"].EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:n,width:i,maxWidth:s,height:a,maxHeight:l}=this.getEditedCellRect();this.textareaParentStyle.top=t+"px",this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=n+"px",this.showEditableElement();const c=Object(o["getComputedStyle"])(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=c.fontSize,this.TEXTAREA.style.fontFamily=c.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const u=Object(o["getComputedStyle"])(this.TEXTAREA),h=parseInt(u.paddingLeft,10)+parseInt(u.paddingRight,10),d=parseInt(u.paddingTop,10)+parseInt(u.paddingBottom,10),m=i-h,f=a-d,p=s-h,g=l-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(m,p),minHeight:Math.min(f,g),maxWidth:p,maxHeight:g},!0)}bindEvents(){Object(s["isIOS"])()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===r["b"].EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===r["b"].EDITING&&this.focus()})}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),n=e.getContext("grid"),r={runOnlyIf:()=>Object(d["isDefined"])(this.hot.getSelected()),group:v},i=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Tab"],["Shift","Tab"],["PageUp"],["PageDown"]],forwardToContext:n,callback:()=>{}},{keys:[["Control","Enter"]],callback:()=>(i(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(i(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(i(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[n]=t;f(n,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[n]=t;f(n,this.TEXTAREA)}}],r)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(m["a"]),t.removeShortcutsByGroup(v),t.removeShortcutsByGroup(r["c"])}}},"03ec":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},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-мӗш",week:{dow:1,doy:7}});return t}))},"0558":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e){return e%100===11||e%10!==1}function n(e,n,r,i){var s=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?s+(n||i?"sekúndur":"sekúndum"):s+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?s+(n||i?"mínútur":"mínútum"):n?s+"mínúta":s+"mínútu";case"hh":return t(e)?s+(n||i?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?s+"dagar":s+(i?"daga":"dögum"):n?s+"dagur":s+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?s+"mánuðir":s+(i?"mánuði":"mánuðum"):n?s+"mánuður":s+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?s+(n||i?"ár":"árum"):s+(n||i?"ár":"ári")}}var r=e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},"0716":function(e,t,n){"use strict";n("7a89");function r(e,t,n){i(e,t),t.set(e,n)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t,n){return t=o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e,t){return e.get(u(e,t))}function c(e,t,n){return e.set(u(e,t),n),n}function u(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var h=new WeakMap;class d{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s(this,"row",null),s(this,"col",null),r(this,h,!1),c(h,this,n),"undefined"!==typeof e&&"undefined"!==typeof t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:n,countRowHeaders:r,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-i||this.col<-r)&&!(this.row>=t||this.col>=n))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return l(h,this)}isSouthEastOf(e){return this.row>=e.row&&(l(h,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(l(h,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(l(h,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(l(h,this)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null===e||void 0===e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null===e||void 0===e?void 0:e.col)&&(this.col=e.col),e instanceof d&&c(h,this,e.isRtl()),this}clone(){return new d(this.row,this.col,l(h,this))}toObject(){return{row:this.row,col:this.col}}}t["a"]=d},"0721":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".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:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"079e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".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/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":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年"}});return t}))},"07ac":function(e,t,n){var r=n("23e7"),i=n("6f53").values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},"088f":function(e,t,n){"use strict";var r=n("8793"),i=String,s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(i(e)+" is not an object")}},"0a3c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return s}))},"0a73":function(e,t,n){"use strict";var r=n("d128"),i=n("69ba"),s=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=i(s,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&o(s,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},"0a84":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-ma",{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"},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:1,doy:4}});return t}))},"0ad8":function(e,t,n){"use strict";var r,i=n("088f"),s=n("fdba"),o=n("e1c6"),a=n("861e"),l=n("f808"),c=n("2179"),u=n("ab25"),h=">",d="<",m="prototype",f="script",p=u("IE_PROTO"),g=function(){},y=function(e){return d+f+h+e+d+"/"+f+h},w=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=c("iframe"),n="java"+f+":";return t.style.display="none",l.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(y("document.F=Object")),e.close(),e.F},_=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}_="undefined"!=typeof document?document.domain&&r?w(r):b():w(r);var e=o.length;while(e--)delete _[m][o[e]];return _()};a[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[m]=i(e),n=new g,g[m]=null,n[p]=e):n=_(),void 0===t?n:s.f(n,t)}},"0c0f":function(e,t,n){"use strict";var r=n("b343"),i=n("73fa"),s=/#|\.prototype\./,o=function(e,t){var n=l[a(e)];return n===u||n!==c&&(i(t)?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},"0caa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?i[n][0]:i[n][1]}var n=e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}});return n}))},"0e49":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".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"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t}))},"0e6b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:0,doy:4}});return t}))},"0e81":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},n=e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},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:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10,i=e%100-r,s=e>=100?100:null;return e+(t[r]||t[i]||t[s])}},week:{dow:1,doy:7}});return n}))},"0e87":function(e,t,n){"use strict";var r=n("73fa"),i=n("a60d"),s=n("b384"),o=n("3df8");e.exports=function(e,t,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:t;if(r(n)&&s(n,c,a),a.global)l?e[t]=n:o(t,n);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(u){}l?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},"0eec":function(e,t,n){"use strict";var r=n("ac4f"),i=n("f2e8"),s=n("d2e4").clear;r({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==s},{clearImmediate:s})},"0f14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".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.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"0f38":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"0ff2":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=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}});return t}))},1004:function(e,t,n){"use strict";n("7a89"),n("d06e");var r=n("81ea"),i=n("351d"),s=n("29b0"),o=n("bd5e"),a=n("67a87"),l=n("97b9");function c(e,t,n){return t=u(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const d=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],m=a["a"]`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
- Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
- learn about the migration path.`,f=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),p=new Map([[]]);class g{static getSingleton(){return w()}constructor(){c(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return Object(r["arrayEach"])(d,t=>e[t]=[]),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))Object(r["arrayEach"])(t,t=>this.add(e,t,n));else{f.has(e)&&Object(o["b"])(Object(s["substitute"])(m,{hookName:e,removedInVersion:f.get(e)})),p.has(e)&&Object(o["b"])(p.get(e));const i=this.getBucket(n);if("undefined"===typeof i[e]&&(this.register(e),i[e]=[]),t.skip=!1,-1===i[e].indexOf(t)){let n=!1;t.initialHook&&Object(r["arrayEach"])(i[e],(r,s)=>{if(r.initialHook)return i[e][s]=t,n=!0,!1}),n||i[e].push(t)}}return this}once(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?Object(r["arrayEach"])(t,t=>this.once(e,t,n)):(t.runOnce=!0,this.add(e,t,n))}remove(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=this.getBucket(n);return"undefined"!==typeof r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}run(e,t,n,r,i,s,o,a){{const c=this.globalBucket[t],u=c?c.length:0;let h=0;if(u)while(h<u){if(!c[h]||c[h].skip){h+=1;continue}const u=Object(l["fastCall"])(c[h],e,n,r,i,s,o,a);void 0!==u&&(n=u),c[h]&&c[h].runOnce&&this.remove(t,c[h]),h+=1}}{const c=this.getBucket(e)[t],u=c?c.length:0;let h=0;if(u)while(h<u){if(!c[h]||c[h].skip){h+=1;continue}const u=Object(l["fastCall"])(c[h],e,n,r,i,s,o,a);void 0!==u&&(n=u),c[h]&&c[h].runOnce&&this.remove(t,c[h],e),h+=1}}return n}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(i["objectEach"])(this.getBucket(e),(e,t,n)=>n[t].length=0)}register(e){this.isRegistered(e)||d.push(e)}deregister(e){this.isRegistered(e)&&d.splice(d.indexOf(e),1)}isDeprecated(e){return p.has(e)||f.has(e)}isRegistered(e){return d.indexOf(e)>=0}getRegistered(){return d}}const y=new g;function w(){return y}t["a"]=g},1096:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));n("7a89"),n("d06e");var r=n("ffec"),i=n("351d"),s=n("97b9"),o=n("7ae0");function a(e,t,n){return t=l(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class u{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a(this,"indexedValues",[]),a(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,Object(s["isFunction"])(this.initValueOrFn)?Object(r["rangeEach"])(e-1,e=>this.indexedValues.push(this.initValueOrFn(e))):Object(r["rangeEach"])(e-1,()=>this.indexedValues.push(this.initValueOrFn)),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}Object(i["mixin"])(u,o["a"])},"10e8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("th",{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"},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:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return t}))},"11b3":function(e,t,n){"use strict";var r=n("8793"),i=n("939b"),s=n("80dd"),o=s("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},"12e9":function(e,t,n){"use strict";var r=n("80dd"),i=r("toStringTag"),s={};s[i]="z",e.exports="[object z]"===String(s)},"13e1":function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g})),n.d(t,"a",(function(){return y}));n("7a89");var r=n("7b9c"),i=n("351d"),s=n("c5c4"),o=(n("d06e"),n("81ea"));const a="hooksRefRegisterer",l={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){Object(o["arrayEach"])(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){Object(i["objectEach"])(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};Object(i["defineGetter"])(l,"MIXIN_NAME",a,{writable:!1,enumerable:!1});var c=l,u=n("5d7f");function h(e,t,n){return t=d(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){var t=m(e,"string");return"symbol"==typeof t?t:t+""}function m(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const f="base",p=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),g="baseEditor";class y{static get EDITOR_TYPE(){return f}constructor(e){h(this,"hot",void 0),h(this,"state",p.VIRGIN),h(this,"_opened",!1),h(this,"_fullEditMode",!1),h(this,"_closeCallback",null),h(this,"TD",null),h(this,"row",null),h(this,"col",null),h(this,"prop",null),h(this,"originalValue",null),h(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,n,r,i,s){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=i,this.cellProperties=s,this.state=p.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let n,i,s,o;if(t){const e=this.hot.getSelectedLast();n=Math.max(Math.min(e[0],e[2]),0),i=Math.max(Math.min(e[1],e[3]),0),s=Math.max(e[0],e[2]),o=Math.max(e[1],e[3])}else[n,i,s,o]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",n,i);Array.isArray(a)&&([n,i]=a);const l=this.hot.getShortcutManager(),c=l.getContext("editor"),u={runOnlyIf:()=>Object(r["isDefined"])(this.hot.getSelected()),group:g};this.isInFullEditMode()&&c.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],u),this.hot.populateFromArray(n,i,e,s,o,"edit")}beginEditing(e,t){if(this.state!==p.VIRGIN)return;const n=this.hot,i=n.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=n.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(n.view.scrollViewport(n._createCellCoords(i,s)),this.state=p.EDITING,this.isInFullEditMode()){const t="string"===typeof e?e:Object(r["stringify"])(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),n.view.render(),n.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,n){let r;if(n){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),n(t),this.hot.view.render()}}if(this.isWaiting())return;const i=this.hot.getShortcutManager(),o=i.getContext("editor");if(o.removeShortcutsByGroup(g),o.removeShortcutsByGroup(s["a"]),this.state!==p.VIRGIN){if(this.state===p.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const n=this.getValue();r=this.cellProperties.trimWhitespace?[["string"===typeof n?String.prototype.trim.call(n||""):n]]:[[n]],this.state=p.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=p.FINISHED,this.discardEditor(e)}):(this.state=p.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=p.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===p.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=p.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=p.VIRGIN,this._fireCallbacks(!0);const e=this.hot.getShortcutManager();e.setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===p.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:n,wtViewport:r}=this.hot.view._wt,i=this.hot.rootWindow,s=Object(u["offset"])(t),o=Object(u["outerWidth"])(t),a=Object(u["offset"])(this.hot.rootElement),l=Object(u["outerWidth"])(this.hot.rootElement),c=n.topOverlay.holder,h=n.inlineStartOverlay.holder,d=c!==i?c.scrollTop:0,m=h!==i?h.scrollLeft:0,f=i.innerWidth-a.left-l,{wtTable:p}=null!==(e=n.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,g=p.name,y=["master","inline_start"].includes(g)?d:0,w=["master","top","bottom"].includes(g)?m:0,b=s.top===a.top?0:1;let _=s.top-a.top-b-y,v=0;v=this.hot.isRtl()?i.innerWidth-s.left-o-f-1+w:s.left-a.left-1-w,["top","top_inline_start_corner"].includes(g)&&(_+=n.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(g)&&(v+=Math.abs(n.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),E=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),C=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),T=this.hot.rowIndexMapper.getRenderableIndexesLength(),M=T-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&E<=0||E===M)&&(_+=1),C<=0&&(v+=1);const R=r.rowsRenderCalculator.startPosition,O=r.columnsRenderCalculator.startPosition,N=Math.abs(n.inlineStartOverlay.getScrollPosition()),A=n.topOverlay.getScrollPosition(),L=Object(u["getScrollbarWidth"])(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(g)&&(I+=R-A),["bottom","bottom_inline_start_corner"].includes(g)){const{wtViewport:e,wtTable:t}=n.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-L}let x=t.offsetLeft;this.hot.isRtl()?(x=x>=0?p.getWidth()-t.offsetLeft:Math.abs(x),x+=O-N-o):["top","master","bottom"].includes(g)&&(x+=O-N);const k=Object(u["getComputedStyle"])(this.TD,this.hot.rootWindow),D=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",H=parseInt(k[D],10)>0?0:1,P=parseInt(k.borderTopWidth,10)>0?0:1,j=Object(u["outerWidth"])(t)+H,F=Object(u["outerHeight"])(t)+P,Y=Object(u["hasVerticalScrollbar"])(c)?L:0,U=Object(u["hasHorizontalScrollbar"])(h)?L:0,V=this.hot.view.maximumVisibleElementWidth(x)-Y+H,B=Math.max(this.hot.view.maximumVisibleElementHeight(I)-U+P,23);return{top:_,start:v,height:F,maxHeight:B,width:j,maxWidth:V}}getEditedCellsLayerClass(){const e=this.checkEditorSection();switch(e){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}Object(i["mixin"])(y,c)},"13e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,n,r,i){var s,o=t.words[r];return 1===r.length?"y"===r&&n?"једна година":i||n?o[0]:o[1]:(s=t.correctGrammaticalCase(e,o),"yy"===r&&n&&"годину"===s?e+" година":e+" "+s)}},n=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:"D. M. 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(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[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:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"142d":function(e,t,n){"use strict";var r=n("7b69"),i=n("088f"),s=n("2471");e.exports=function(e,t,n){var o,a;i(e);try{if(o=s(e,"return"),!o){if("throw"===t)throw n;return n}o=r(o,e)}catch(l){a=!0,o=l}if("throw"===t)throw n;if(a)throw o;return i(o),n}},"167b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_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] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},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}});return t}))},"169f":function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("7a89");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("validators");function c(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered validator found under "${e}" name`);return s(e)}function u(e,t){"string"!==typeof e&&(t=e,e=t.VALIDATOR_TYPE),i(e,t)}},"170e":function(e,t,n){"use strict";var r=n("0227"),i=n("69ba"),s=n("2d2d"),o=n("1e92"),a=n("7c2b"),l=n("1d07"),c=n("2c35"),u=n("01b5"),h=n("a45f"),d=n("9718"),m=n("2daa"),f=n("d128"),p=n("d62b");e.exports=function(e,t,n,g){var y="stackTraceLimit",w=g?2:1,b=e.split("."),_=b[b.length-1],v=r.apply(null,b);if(v){var S=v.prototype;if(!p&&i(S,"cause")&&delete S.cause,!n)return v;var E=r("Error"),C=t((function(e,t){var n=h(g?t:e,void 0),r=g?new v(e):new v;return void 0!==n&&s(r,"message",n),m(r,C,r.stack,2),this&&o(S,this)&&u(r,this,C),arguments.length>w&&d(r,arguments[w]),r}));if(C.prototype=S,"Error"!==_?a?a(C,E):l(C,E,{name:!0}):f&&y in v&&(c(C,v,y),c(C,v,"prepareStackTrace")),l(C,v),!p)try{S.name!==_&&s(S,"name",_),S.constructor=C}catch(T){}return C}}},"1b1a":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("1096"),i=n("3d57"),s=n("a73f");class o extends r["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(s["b"])(this.indexedValues,t);this.indexedValues=Object(i["a"])(n,e,t),super.insert(e,t)}remove(e){const t=Object(i["b"])(this.indexedValues,e);this.indexedValues=Object(s["a"])(t,e),super.remove(e)}}},"1b45":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".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:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"1caf":function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"1cfd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,s,o){var a=n(t),l=r[e][n(t)];return 2===a&&(l=l[i?0:1]),l.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o=e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/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:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return o}))},"1d07":function(e,t,n){"use strict";var r=n("69ba"),i=n("fb46"),s=n("485c"),o=n("a60d");e.exports=function(e,t,n){for(var a=i(t),l=o.f,c=s.f,u=0;u<a.length;u++){var h=a[u];r(e,h)||n&&r(n,h)||l(e,h,c(t,h))}}},"1e8c":function(e,t,n){"use strict";n.d(t,"a",(function(){return Q}));var r=n("c4fa");const i={name:"editorCloseAndSave",callback(e,t){const n=e._getEditorManager();n.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),n.moveSelectionAfterEnter(t)}},s={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},o={name:"editorFastOpen",callback(e,t){const{highlight:n}=e.getSelectedRangeLast();n.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};var a=n("de3b");const l={name:"editorOpen",callback(e,t,n){const r=e._getEditorManager(),i=e.getSelectedRangeLast(),{highlight:s}=i;if(e.selection.isMultiple()&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){const r=e.getSettings(),i="function"===typeof r.enterMoves?r.enterMoves(t):r.enterMoves;n.includes("shift")?e.selection.transformFocus(-i.row,-i.col):e.selection.transformFocus(i.row,i.col)}else s.isHeader()||(e.getSettings().enterBeginsEditing?r.cellProperties.readOnly?r.moveSelectionAfterEnter(t):r.openEditor(null,t,!0):r.moveSelectionAfterEnter(t),Object(a["stopImmediatePropagation"])(t))}};function c(){return[i,s,o,l]}const u={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(1,0)}},h={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),n=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),r=e.rowIndexMapper.getNearestNotHiddenIndex(n,-1);if(null!==r){const n=e._createCellCoords(r,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),s=Math.min(n.row-i,e.countRows()-1);e.selection.setRangeEnd(n),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},d={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,-1*e.getDirectionFactor())}},m={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,e.getDirectionFactor())}},f={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:n,to:r}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(n.col,r.col,t)}},p={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByRowHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=r.row,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,s.col))}}},g={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&r.isCell()){const o=n.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=r.col,t.setRangeStart(a,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(s.row,o))}}},y={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&r.isCell()){const o=parseInt(e.getSettings().fixedColumnsStart,10),a=n.getNearestNotHiddenIndex(o,1),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},w={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByColumnHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},b={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByColumnHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},_={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByRowHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=r.row,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,s.col))}}},v={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:n,to:r}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(n.row,r.row,t)}},S={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(-1,0)}},E={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),n=Math.max(t.row-e.countVisibleRows(),0),r=e.rowIndexMapper.getNearestNotHiddenIndex(n,1);if(null!==r){const n=e._createCellCoords(r,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),s=Math.max(n.row-i,0);e.selection.setRangeEnd(n),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}};function C(){return[u,h,d,m,f,p,g,y,w,b,_,v,S,E]}const T={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}},M={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),n=t?e.countColHeaders():0,{row:r}=e.getSelectedRangeLast().highlight;let i=e.countVisibleRows()+n;r===e.countRows()-1?i=1:r+i>e.countRows()&&(i=e.countRows()-r-1),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}},R={name:"moveCellSelectionInlineEnd",callback(e,t){const n=e.getSettings(),r=e.getSelectedRangeLast(),i="function"===typeof n.tabMoves?n.tabMoves(t):n.tabMoves;e.selection.isMultiple()&&!r.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(-i.row,-i.col):e.selection.transformStart(-i.row,-i.col)}},O={name:"moveCellSelectionInlineStart",callback(e,t){const n=e.getSettings(),r=e.getSelectedRangeLast(),i="function"===typeof n.tabMoves?n.tabMoves(t):n.tabMoves;e.selection.isMultiple()&&!r.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(i.row,i.col):e.selection.transformStart(i.row,i.col)}},N={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}},A={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}},L={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),e.selection.setRangeStart(e._createCellCoords(n,t))}},I={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,i=parseInt(e.getSettings().fixedRowsBottom,10),s=n.getNearestNotHiddenIndex(e.countRows()-i-1,-1),o=r.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(s,o))}},x={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,n.getNearestNotHiddenIndex(e.countCols()-1,-1)))}},k={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,r=parseInt(e.getSettings().fixedColumnsStart,10),i=e.getSelectedRangeLast().highlight.row,s=n.getNearestNotHiddenIndex(r,1);t.setRangeStart(e._createCellCoords(i,s))}},D={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,r=e.getSelectedRangeLast().highlight.row;let i=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===i&&(i=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(r,i))}},H={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{row:r}=e.getSelectedRangeLast().highlight;let i=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===i&&(i=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(r,i))}},P={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(n,t))}},j={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,i=parseInt(e.getSettings().fixedRowsTop,10),s=parseInt(e.getSettings().fixedColumnsStart,10),o=n.getNearestNotHiddenIndex(i,1),a=r.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(o,a))}},F={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}},Y={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),n=t?e.countColHeaders():0,{row:r}=e.getSelectedRangeLast().highlight;let i=-(e.countVisibleRows()+n);r===-n?i=-1:r+i<n&&(i=-(r+n)),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};function U(){return[T,M,R,O,N,A,L,I,x,k,D,H,P,j,F,Y]}const V={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},B={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),n=e.view.getFirstFullyVisibleRow()-1,r=e.view.getFirstFullyVisibleColumn()-1,i=e.view.getLastFullyVisibleRow()+1,s=e.view.getLastFullyVisibleColumn()+1,o=e._createCellCoords(n,r),a=e._createCellCoords(i,s),l=e._createCellRange(o,o,a);if(!l.includes(t)&&(t.row>=0||t.col>=0)){const n={};if(t.col>=0){const r=Math.floor(e.countVisibleCols()/2);n.col=Math.max(t.col-r,0)}if(t.row>=0){const r=Math.floor(e.countVisibleRows()/2);n.row=Math.max(t.row-r,0)}e.scrollViewportTo({...n,verticalSnap:"top",horizontalSnap:"start"})}}},W={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}},G={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}},z={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:n,col:r}=t[t.length-1].highlight.normalize(),i=e.getDataAtCell(n,r),s=new Map;for(let o=0;o<t.length;o++)t[o].forAll((t,o)=>{if(t>=0&&o>=0&&(t!==n||o!==r)){const{readOnly:n}=e.getCellMeta(t,o);n||s.set(`${t}x${o}`,[t,o,i])}});e.setDataAtCell(Array.from(s.values()))}},K=[...c(),...C(),...U(),V,B,W,G,z];function X(e){const t={};return K.forEach(n=>{let{name:r,callback:i}=n;t[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(e,...n)}}),t}function $(e){const t=e.getShortcutManager().addContext("editor"),n=X(e),i={group:r["a"]};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorCloseAndSave(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>n.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>n.editorCloseWithoutSaving()}],i)}var q=n("7b9c");function J(e){const t=e.getShortcutManager().addContext("grid"),n=X(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return Object(q["isDefined"])(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:r["b"]};t.addShortcuts([{keys:[["F2"]],callback:e=>n.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>n.emptySelectedCells()}],{group:r["a"],runOnlyIf:()=>Object(q["isDefined"])(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>e.getSelectedRangeLast().highlight.isHeader(),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>n.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>n.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>n.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>n.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>n.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>n.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>n.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>n.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>n.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>n.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>n.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>n.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>n.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>n.scrollToFocusedCell()}],i)}function Q(e){[$,J].forEach(t=>t(e))}},"1e92":function(e,t,n){"use strict";var r=n("fd18");e.exports=r({}.isPrototypeOf)},"1fc1":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===r?n?"хвіліна":"хвіліну":"h"===r?n?"гадзіна":"гадзіну":e+" "+t(i[r],+e)}var r=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},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",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return r}))},"201b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},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[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});return t}))},2179:function(e,t,n){"use strict";var r=n("f2e8"),i=n("8793"),s=r.document,o=i(s)&&i(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},"220a":function(e,t,n){"use strict";n("7a89"),n("d06e");var r=n("5d7f"),i=n("81ea");function s(e,t,n){return t=o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class l{constructor(e){s(this,"hot",null),s(this,"container",null),s(this,"injected",!1),s(this,"rows",[]),s(this,"columns",[]),s(this,"samples",null),s(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!==t&&void 0!==t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}getHeights(e){this.injected||this.injectTable(),Object(i["arrayEach"])(this.rows,t=>{e(t.row,Object(r["outerHeight"])(t.table)-1)})}getWidths(e){this.injected||this.injectTable(),Object(i["arrayEach"])(this.columns,t=>{const{width:n}=t.table.getBoundingClientRect();e(t.col,Math.ceil(n))})}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach(n=>{Object(i["arrayEach"])(n.strings,n=>{t.appendChild(this.createColElement(n.col,e))})}),t}createRow(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),r=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),n.appendChild(r)),this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.col,s=this.hot.getCellMeta(e,i);s.col=i,s.row=e;const o=this.hot.getCellRenderer(s),a=t.createElement("td");a.setAttribute("ghost-table",1),o(this.hot,a,e,i,this.hot.colToProp(i),r.value,s),n.appendChild(a)})}),n}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),n=[];if(this.hot.hasRowHeaders()){const r=e.createElement("th");n.push([-1,r]),t.appendChild(r)}this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.col,s=e.createElement("th");n.push([i,s]),t.appendChild(s)})}),this.table.tHead.appendChild(t),Object(i["arrayEach"])(n,e=>{const[t,n]=e;this.hot.view.appendColHeader(t,n)})}createCol(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment();return this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.row,s=this.hot.getCellMeta(i,e);s.col=e,s.row=i;const o=this.hot.getCellRenderer(s),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),o(this.hot,a,i,e,this.hot.colToProp(e),r.value,s),l.appendChild(a),n.appendChild(l)})}),n}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const n=this.hot.rootDocument.createElement("col");let r=0;t>=0&&e>=0&&(r=this.hot.getCellMeta(t,e).colspan);let i=this.hot.getColWidth(e);if(r>1)for(let s=e+1;s<e+r;s++)i+=this.hot.getColWidth(s);return n.style.width=i+"px",n}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),i=t.createElement("table"),s=t.createElement("thead"),o=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),c=t.createElement("th");return this.isVertical()&&i.appendChild(a),this.isHorizontal()&&(l.appendChild(c),s.appendChild(l),i.style.tableLayout="auto",i.style.width="auto"),i.appendChild(s),this.isVertical()&&o.appendChild(l),i.appendChild(o),Object(r["addClass"])(i,e),n.appendChild(i),{fragment:n,table:i,tHead:s,tBody:o,colGroup:a,tr:l,th:c}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),i=t.createElement("div"),s="htGhostTable htAutoSize "+e.trim();return Object(r["addClass"])(i,s),n.appendChild(i),{fragment:n,container:i}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}t["a"]=l},"22f8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd 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:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},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}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}});return t}))},2349:function(e,t,n){"use strict";var r=n("d128"),i=n("bdfe"),s=TypeError,o=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!o(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},2408:function(e,t,n){"use strict";var r=n("e156"),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},2421:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],i=e.defineLocale("ku",{months:r,monthsShort:r,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,"،")},week:{dow:6,doy:12}});return i}))},2471:function(e,t,n){"use strict";var r=n("2aac"),i=n("022b");e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},"24b5":function(e,t,n){"use strict";n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return S})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return C}));n("7a89");var r=n("29b0"),i=n("ffec"),s=n("97b9");const o="asc",a="desc",l=new Map([[o,[-1,1]],[a,[1,-1]]]),c=e=>`The priority '${e}' is already declared in a map.`,u=e=>`The priority '${e}' is not a number.`;function h(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new Map;function r(r,s){if(!Object(i["isNumeric"])(r))throw new Error(t(r));if(n.has(r))throw new Error(e(r));n.set(r,s)}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const[t,r]=l.get(e)||l.get(o);return[...n].sort((e,n)=>e[0]<n[0]?t:r).map(e=>e[1])}return e=Object(s["isFunction"])(e)?e:c,t=Object(s["isFunction"])(t)?t:u,{addItem:r,getItems:a}}var d=n("6906");const m=e=>`'${e}' value is already declared in a unique set.`;function f(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;function n(n){if(t.has(n))throw new Error(e(n));t.add(n)}function r(){return[...t]}function i(){t.clear()}return e=Object(s["isFunction"])(e)?e:m,{addItem:n,clear:i,getItems:r}}const p=e=>`There is already registered "${e}" plugin.`,g=e=>`There is already registered plugin on priority "${e}".`,y=e=>`The priority "${e}" is not a number.`,w=h({errorPriorityExists:g,errorPriorityNaN:y}),b=f({errorItemExists:p}),_=Object(d["a"])({errorIdExists:p});function v(){return[...w.getItems(),...b.getItems()]}function S(e){const t=Object(r["toUpperCaseFirst"])(e);return _.getItem(t)}function E(e){return!!S(e)}function C(e,t,n){[e,t,n]=M(e,t,n),void 0===S(e)&&T(e,t,n)}function T(e,t,n){const i=Object(r["toUpperCaseFirst"])(e);if(_.hasItem(i))throw new Error(p(i));void 0===n?b.addItem(i):w.addItem(n,i),_.addItem(i,t)}function M(e,t,n){return"function"===typeof e&&(t=e,e=t.PLUGIN_KEY,n=t.PLUGIN_PRIORITY),[e,t,n]}},"24b9e":function(e,t,n){"use strict";var r=n("f41c");r("flat")},"24d5":function(e,t,n){"use strict";var r=n("84d8"),i=n("4c54");e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2554:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",r;case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",r;case"dd":return r+=1===e?"dan":"dana",r;case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",r;case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",r}}var n=e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".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:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"26f9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function r(e,t,n,r){return t?s(n)[0]:r?s(n)[1]:s(n)[2]}function i(e){return e%10===0||e>10&&e<20}function s(e){return t[e].split("_")}function o(e,t,n,o){var a=e+" ";return 1===e?a+r(e,t,n[0],o):t?a+(i(e)?s(n)[1]:s(n)[0]):o?a+s(n)[1]:a+(i(e)?s(n)[1]:s(n)[2])}var a=e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:n,ss:o,m:r,mm:o,h:r,hh:o,d:r,dd:o,M:r,MM:o,y:r,yy:o},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return a}))},"27dc":function(e,t,n){"use strict";var r=n("9394"),i=n("6b27"),s=n("7dcf4"),o=function(e){return function(t,n,o){var a=r(t),l=s(a);if(0===l)return!e&&-1;var c,u=i(o,l);if(e&&n!==n){while(l>u)if(c=a[u++],c!==c)return!0}else for(;l>u;u++)if((e||u in a)&&a[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},2921:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"293c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}},n=e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".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:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"29b0":function(e,t,n){"use strict";n.r(t),n.d(t,"toUpperCaseFirst",(function(){return s})),n.d(t,"equalsIgnoreCase",(function(){return o})),n.d(t,"randomString",(function(){return a})),n.d(t,"isPercentValue",(function(){return l})),n.d(t,"substitute",(function(){return c})),n.d(t,"stripTags",(function(){return u})),n.d(t,"sanitize",(function(){return h}));n("d06e");var r=n("c0c4"),i=n("7b9c");function s(e){return e[0].toUpperCase()+e.substr(1)}function o(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let s=n.length;while(s){s-=1;const t=Object(i["stringify"])(n[s]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length}function a(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function l(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,(e,n)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n])}function u(e){return h(""+e,{ALLOWED_TAGS:[]})}function h(e,t){return r.sanitize(e,t)}},"2aac":function(e,t,n){"use strict";var r=n("73fa"),i=n("71ca"),s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(i(e)+" is not a function")}},"2b75":function(e,t,n){"use strict";var r=n("d128"),i=n("b343");e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},"2bfb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},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:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t}))},"2c35":function(e,t,n){"use strict";var r=n("a60d").f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},"2cb8":function(e,t,n){"use strict";var r=n("7b69"),i=n("69ba"),s=n("1e92"),o=n("97dc"),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||i(e,"flags")||!s(a,e)?t:r(o,e)}},"2d2d":function(e,t,n){"use strict";var r=n("d128"),i=n("a60d"),s=n("1caf");e.exports=r?function(e,t,n){return i.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},"2daa":function(e,t,n){"use strict";var r=n("2d2d"),i=n("78e9"),s=n("cf36"),o=Error.captureStackTrace;e.exports=function(e,t,n,a){s&&(o?o(e,t):r(e,"stack",i(n,a)))}},"2e8c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("uz",{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:"D MMMM YYYY, dddd 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 йил"},week:{dow:1,doy:7}});return t}))},3037:function(e,t,n){"use strict";var r=n("fd18"),i=n("bdfe"),s=n("73fa"),o=n("939b"),a=n("2408"),l=r([].push);e.exports=function(e){if(s(e))return e;if(i(e)){for(var t=e.length,n=[],r=0;r<t;r++){var c=e[r];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==o(c)&&"String"!==o(c)||l(n,a(c))}var u=n.length,h=!0;return function(e,t){if(h)return h=!1,t;if(i(this))return t;for(var r=0;r<u;r++)if(n[r]===e)return t}}}},"351d":function(e,t,n){"use strict";n.r(t),n.d(t,"duckSchema",(function(){return i})),n.d(t,"inherit",(function(){return s})),n.d(t,"extend",(function(){return o})),n.d(t,"deepExtend",(function(){return a})),n.d(t,"deepClone",(function(){return l})),n.d(t,"clone",(function(){return c})),n.d(t,"mixin",(function(){return u})),n.d(t,"isObjectEqual",(function(){return h})),n.d(t,"isObject",(function(){return d})),n.d(t,"defineGetter",(function(){return m})),n.d(t,"objectEach",(function(){return f})),n.d(t,"getProperty",(function(){return p})),n.d(t,"setProperty",(function(){return g})),n.d(t,"deepObjectSize",(function(){return y})),n.d(t,"createObjectPropListener",(function(){return w})),n.d(t,"hasOwnProperty",(function(){return b}));n("7a89"),n("d06e"),n("5b82");var r=n("81ea");function i(e){let t;return Array.isArray(e)?t=e.length?new Array(e.length).fill(null):[]:(t={},f(e,(e,n)=>{"__children"!==n&&(e&&"object"===typeof e&&!Array.isArray(e)?t[n]=i(e):Array.isArray(e)?e.length&&"object"===typeof e[0]&&!Array.isArray(e[0])?t[n]=[i(e[0])]:t[n]=[]:t[n]=null)})),t}function s(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function o(e,t,n){const r=Array.isArray(n);return f(t,(t,i)=>{(!1===r||n.includes(i))&&(e[i]=t)}),e}function a(e,t){f(t,(n,r)=>{t[r]&&"object"===typeof t[r]?(e[r]||(Array.isArray(t[r])?e[r]=[]:"[object Date]"===Object.prototype.toString.call(t[r])?e[r]=t[r]:e[r]={}),a(e[r],t[r])):e[r]=t[r]})}function l(e){return"object"===typeof e?JSON.parse(JSON.stringify(e)):e}function c(e){const t={};return f(e,(e,n)=>{t[n]=e}),t}function u(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object(r["arrayEach"])(n,t=>{e.MIXINS.push(t.MIXIN_NAME),f(t,(t,n)=>{if(void 0!==e.prototype[n])throw new Error(`Mixin conflict. Property '${n}' already exist and cannot be overwritten.`);if("function"===typeof t)e.prototype[n]=t;else{const r=function(e,t){const n="_"+e,r=e=>{let t=e;return(Array.isArray(t)||d(t))&&(t=l(t)),t};return function(){return void 0===this[n]&&(this[n]=r(t)),this[n]}},i=function(e){const t="_"+e;return function(e){this[t]=e}};Object.defineProperty(e.prototype,n,{get:r(n,t),set:i(n),configurable:!0})}})}),e}function h(e,t){return JSON.stringify(e)===JSON.stringify(t)}function d(e){return"[object Object]"===Object.prototype.toString.call(e)}function m(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)}function f(e,t){for(const n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}function p(e,t){const n=t.split(".");let r=e;return f(n,e=>{if(r=r[e],void 0===r)return r=void 0,!1}),r}function g(e,t,n){const r=t.split(".");let i=e;r.forEach((e,t)=>{t!==r.length-1?(b(i,e)||(i[e]={}),i=i[e]):i[e]=n})}function y(e){if(!d(e))return 0;const t=function(e){let n=0;return d(e)?f(e,(e,r)=>{"__children"!==r&&(n+=t(e))}):n+=1,n};return t(e)}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";const n="_"+t,r={_touched:!1,[n]:e,isTouched(){return this._touched}};return Object.defineProperty(r,t,{get(){return this[n]},set(e){this._touched=!0,this[n]=e},enumerable:!0,configurable:!0}),r}function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},3886:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}});return t}))},"39a6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".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:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"39bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे";break}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां";break}return i.replace(/%d/i,e)}var i=e.defineLocale("mr",{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:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},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||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return i}))},"3a39":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=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}});return r}))},"3a6c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-mo",{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:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",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:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",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 年"}});return t}))},"3b1b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},n=e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".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",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},"3bc4":function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));const r=/^(\r\n|\n\r|\r|\n)/,i=/^[^\t\r\n]+/,s=/^\t/;function o(e){const t=[[""]];if(0===e.length)return t;let n,o=0,a=0;while(e.length>0){if(n===e.length)break;if(n=e.length,e.match(s))e=e.replace(s,""),o+=1,t[a][o]="";else if(e.match(r))e=e.replace(r,""),o=0,a+=1,t[a]=[""];else{let n="";if(e.startsWith('"')){let t=0,r=!0;while(r){const i=e.slice(0,1);'"'===i&&(t+=1),n+=i,e=e.slice(1),(0===e.length||e.match(/^[\t\r\n]/)&&t%2===0)&&(r=!1)}n=n.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,e=>new Array(Math.floor(e.length/2)).fill('"').join(""))}else{const t=e.match(i);n=t?t[0]:"",e=e.slice(n.length)}t[a][o]=n}}return t}function a(e){let t,n,r,i,s,o="";for(t=0,n=e.length;t<n;t+=1){for(i=e[t].length,r=0;r<i;r+=1)r>0&&(o+="\t"),s=e[t][r],"string"===typeof s?s.indexOf("\n")>-1?o+=`"${s.replace(/"/g,'""')}"`:o+=s:o+=null===s||void 0===s?"":s;t!==n-1&&(o+="\n")}return o}},"3c0d":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={format:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),standalone:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_")},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function s(e){return e>1&&e<5&&1!==~~(e/10)}function o(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(s(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(s(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(s(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(s(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(s(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(s(e)?"roky":"let"):i+"lety"}}var a=e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_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",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %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}});return a}))},"3d57":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("81ea");function i(e,t,n){return[...e.slice(0,t),...n,...e.slice(t)]}function s(e,t){return Object(r["arrayFilter"])(e,e=>!1===t.includes(e))}},"3d76":function(e,t,n){"use strict";n.d(t,"d",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("7a89");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("renderers");function c(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered renderer found under "${e}" name`);return s(e)}function u(e,t){"string"!==typeof e&&(t=e,e=t.RENDERER_TYPE),i(e,t)}},"3de5":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},r=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}});return r}))},"3df8":function(e,t,n){"use strict";var r=n("f2e8"),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},"3e92":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},r=e.defineLocale("kn",{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 ವರ್ಷ"},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<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});return r}))},"3eb5":function(e,t,n){"use strict";function r(e){const t=new Date(e);return isNaN(new Date(e+"T00:00").getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}n.r(t),n.d(t,"getNormalizedDate",(function(){return r}))},"423e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-kw",{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"},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:12}});return t}))},"440c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){var t=e.substr(0,e.indexOf(" "));return i(t)?"a "+e:"an "+e}function r(e){var t=e.substr(0,e.indexOf(" "));return i(t)?"viru "+e:"virun "+e}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,n=e/10;return i(0===t?n:t)}if(e<1e4){while(e>=10)e/=10;return i(e)}return e/=1e3,i(e)}var s=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"44d0":function(e,t,n){"use strict";var r,i,s=n("f2e8"),o=n("65c6"),a=s.process,l=s.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(r=u.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),e.exports=i},"480c":function(e,t,n){"use strict";n.r(t),n.d(t,"spreadsheetColumnLabel",(function(){return o})),n.d(t,"spreadsheetColumnIndex",(function(){return a})),n.d(t,"createSpreadsheetData",(function(){return l})),n.d(t,"createSpreadsheetObjectData",(function(){return c})),n.d(t,"createEmptySpreadsheetData",(function(){return u})),n.d(t,"dataRowToChangesArray",(function(){return h})),n.d(t,"countFirstRowKeys",(function(){return d})),n.d(t,"isArrayOfArrays",(function(){return m})),n.d(t,"isArrayOfObjects",(function(){return f}));n("d06e");var r=n("351d");const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=i.length;function o(e){let t,n=e+1,r="";while(n>0)t=(n-1)%s,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/s,10);return r}function a(e){let t=0;if(e)for(let n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=s**r*(i.indexOf(e[n])+1);return t-=1,t}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=[];let r,i;for(r=0;r<e;r++){const e=[];for(i=0;i<t;i++)e.push(o(i)+(r+1));n.push(e)}return n}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=[];let r,i;for(r=0;r<e;r++){const e={};for(i=0;i<t;i++)e["prop"+i]=o(i)+(r+1);n.push(e)}return n}function u(e,t){const n=[];let r;for(let i=0;i<e;i++){r=[];for(let e=0;e<t;e++)r.push("");n.push(r)}return n}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;const r=[];return Array.isArray(e)&&Array.isArray(e[0])||(n=[e]),n.forEach((e,n)=>{Array.isArray(e)?e.forEach((e,i)=>{r.push([n+t,i,e])}):Object.keys(e).forEach(i=>{r.push([n+t,i,e[i]])})}),r}function d(e){let t=0;return Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&Object(r["isObject"])(e[0])&&(t=Object(r["deepObjectSize"])(e[0]))),t}function m(e){return!!(Array.isArray(e)&&e.length&&e.every(e=>Array.isArray(e)))}function f(e){return!!(Array.isArray(e)&&e.length&&e.every(e=>"object"===typeof e&&!Array.isArray(e)&&null!==e))}},"485c":function(e,t,n){"use strict";var r=n("d128"),i=n("7b69"),s=n("ba51"),o=n("1caf"),a=n("9394"),l=n("24d5"),c=n("69ba"),u=n("d435"),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=a(e),t=l(t),u)try{return h(e,t)}catch(n){}if(c(e,t))return o(!i(s.f,e,t),e[t])}},"485c5":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},n=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".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"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10,r=e%100-n,i=e>=100?100:null;return e+(t[n]||t[r]||t[i])},week:{dow:1,doy:7}});return n}))},"48ab":function(e,t,n){"use strict";var r=n("b343");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"491c":function(e,t,n){"use strict";n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return c}));n("7a89");var r=n("1004"),i=n("9acd");const s=new WeakMap,{register:o,getItem:a,hasItem:l,getNames:c,getValues:u}=Object(i["a"])("editors");function h(e){const 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]},r["a"].getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function d(e,t){let n;if("function"===typeof e)s.get(e)||f(null,e),n=s.get(e);else{if("string"!==typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=a(e)}if(!n)throw Error(`No editor registered under name "${e}"`);return n.getInstance(t)}function m(e){if("function"===typeof e)return e;if(!l(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()}function f(e,t){e&&"string"!==typeof e&&(t=e,e=t.EDITOR_TYPE);const n=new h(t);"string"===typeof e&&o(e,n),s.set(t,n)}},"49ab":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=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<1200?"上午":1200===r?"中午":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 年"}});return t}))},"4aa5":function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},"4ba9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",r;case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",r;case"dd":return r+=1===e?"dan":"dana",r;case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",r;case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",r}}var n=e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"4c54":function(e,t,n){"use strict";var r=n("0227"),i=n("73fa"),s=n("1e92"),o=n("9c76"),a=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&s(t.prototype,a(e))}},"4cd6":function(e,t,n){"use strict";var r=n("f41c");r("flatMap")},"4ec9":function(e,t,n){"use strict";var r=n("6d61"),i=n("6566");e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},5038:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}});return t}))},"5120b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],n=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],r=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],i=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],s=["Do","Lu","Má","Cé","Dé","A","Sa"],o=e.defineLocale("ga",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:s,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:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return o}))},5294:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],r=e.defineLocale("ur",{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}});return r}))},"52bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},"54d7":function(e,t,n){"use strict";var r=n("d62b"),i=n("f2e8"),s=n("3df8"),o="__core-js_shared__",a=e.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.37.1",mode:r?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},"55c9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}});return s}))},"576c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".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:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"592a":function(e,t,n){"use strict";var r=n("fd18"),i=0,s=Math.random(),o=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+s,36)}},"598a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],r=e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/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:7,doy:12}});return r}))},"59a2":function(e,t,n){"use strict";var r=n("ac4f"),i=n("f2e8"),s=n("d2e4").set,o=n("f6cb"),a=i.setImmediate?o(s,!1):s;r({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})},"5aff":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},n=e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".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:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var r=e%10,i=e%100-r,s=e>=100?100:null;return e+(t[r]||t[i]||t[s])}},week:{dow:1,doy:7}});return n}))},"5b14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var i=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},"5b82":function(e,t,n){"use strict";var r=n("ac4f"),i=n("0227"),s=n("0204"),o=n("7b69"),a=n("fd18"),l=n("b343"),c=n("73fa"),u=n("4c54"),h=n("9674"),d=n("3037"),m=n("7b7f"),f=String,p=i("JSON","stringify"),g=a(/./.exec),y=a("".charAt),w=a("".charCodeAt),b=a("".replace),_=a(1..toString),v=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,C=!m||l((function(){var e=i("Symbol")("stringify detection");return"[null]"!==p([e])||"{}"!==p({a:e})||"{}"!==p(Object(e))})),T=l((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),M=function(e,t){var n=h(arguments),r=d(t);if(c(r)||void 0!==e&&!u(e))return n[1]=function(e,t){if(c(r)&&(t=o(r,this,f(e),t)),!u(t))return t},s(p,null,n)},R=function(e,t,n){var r=y(n,t-1),i=y(n,t+1);return g(S,e)&&!g(E,i)||g(E,e)&&!g(S,r)?"\\u"+_(w(e,0),16):e};p&&r({target:"JSON",stat:!0,arity:3,forced:C||T},{stringify:function(e,t,n){var r=h(arguments),i=s(C?M:p,null,r);return T&&"string"==typeof i?b(i,v,R):i}})},"5bc5":function(e,t,n){"use strict";var r=n("f2e8"),i=n("939b");e.exports="process"===i(r.process)},"5c3a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-cn",{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日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点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||"晚上"===t?e+12:e>=11?e:e+12},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:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},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 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return t}))},"5cbb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=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}});return t}))},"5d7f":function(e,t,n){"use strict";n.r(t),n.d(t,"getParent",(function(){return s})),n.d(t,"isThisHotChild",(function(){return o})),n.d(t,"getFrameElement",(function(){return a})),n.d(t,"getParentWindow",(function(){return l})),n.d(t,"hasAccessToParentWindow",(function(){return c})),n.d(t,"closest",(function(){return u})),n.d(t,"closestDown",(function(){return h})),n.d(t,"isChildOf",(function(){return d})),n.d(t,"index",(function(){return m})),n.d(t,"overlayContainsElement",(function(){return f})),n.d(t,"hasClass",(function(){return y})),n.d(t,"addClass",(function(){return w})),n.d(t,"removeClass",(function(){return b})),n.d(t,"setAttribute",(function(){return _})),n.d(t,"removeAttribute",(function(){return v})),n.d(t,"removeTextNodes",(function(){return S})),n.d(t,"empty",(function(){return E})),n.d(t,"HTML_CHARACTERS",(function(){return C})),n.d(t,"fastInnerHTML",(function(){return T})),n.d(t,"fastInnerText",(function(){return M})),n.d(t,"isVisible",(function(){return R})),n.d(t,"offset",(function(){return O})),n.d(t,"getWindowScrollTop",(function(){return N})),n.d(t,"getWindowScrollLeft",(function(){return A})),n.d(t,"getScrollTop",(function(){return L})),n.d(t,"getScrollLeft",(function(){return I})),n.d(t,"getScrollableElement",(function(){return x})),n.d(t,"getMaximumScrollTop",(function(){return k})),n.d(t,"getMaximumScrollLeft",(function(){return D})),n.d(t,"getTrimmingContainer",(function(){return H})),n.d(t,"getStyle",(function(){return P})),n.d(t,"matchesCSSRules",(function(){return j})),n.d(t,"getComputedStyle",(function(){return F})),n.d(t,"outerWidth",(function(){return Y})),n.d(t,"outerHeight",(function(){return U})),n.d(t,"innerHeight",(function(){return V})),n.d(t,"innerWidth",(function(){return B})),n.d(t,"addEvent",(function(){return W})),n.d(t,"removeEvent",(function(){return G})),n.d(t,"getCaretPosition",(function(){return z})),n.d(t,"getSelectionEndPosition",(function(){return K})),n.d(t,"getSelectionText",(function(){return X})),n.d(t,"clearTextSelection",(function(){return $})),n.d(t,"setCaretPosition",(function(){return q})),n.d(t,"getScrollbarWidth",(function(){return Z})),n.d(t,"hasVerticalScrollbar",(function(){return ee})),n.d(t,"hasHorizontalScrollbar",(function(){return te})),n.d(t,"setOverlayPosition",(function(){return ne})),n.d(t,"getCssTransform",(function(){return re})),n.d(t,"resetCssTransform",(function(){return ie})),n.d(t,"isInput",(function(){return se})),n.d(t,"isOutsideInput",(function(){return oe})),n.d(t,"selectElementIfAllowed",(function(){return ae})),n.d(t,"isDetached",(function(){return le})),n.d(t,"observeVisibilityChangeOnce",(function(){return ce})),n.d(t,"makeElementContentEditableAndSelectItsContent",(function(){return ue})),n.d(t,"removeContentEditableFromElementAndDeselect",(function(){return he})),n.d(t,"runWithSelectedContendEditableElement",(function(){return de}));n("7a89"),n("d06e");var r=n("29b0"),i=n("8828");function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,i=e;while(null!==i){if(n===t){r=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(n+=1,i=i.parentNode)}return r}function o(e,t){const n=e.closest(".handsontable");return!!n&&(n.parentNode===t||n===t)}function a(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function l(e){return a(e)&&e.parent}function c(e){return!!Object.getPrototypeOf(e.parent)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:r,DOCUMENT_FRAGMENT_NODE:i}=Node;let s=e;while(null!==s&&void 0!==s&&s!==n){const{nodeType:e,nodeName:n}=s;if(e===r&&(t.includes(n)||t.includes(s)))return s;const{host:o}=s;s=o&&e===i?o:s.parentNode}return null}function h(e,t,n){const r=[];let i=e;while(i){if(i=u(i,t,n),!i||n&&!n.contains(i))break;r.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode}const s=r.length;return s?r[s-1]:null}function d(e,t){let n=e.parentNode,r=[];"string"===typeof t?r=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);while(null!==n){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function m(e){let t=0,n=e;if(n.previousSibling)while(n=n.previousSibling)t+=1;return t}function f(e,t,n){const r=n.parentElement.querySelector(".ht_clone_"+e);return r?r.contains(t):null}function p(e){return e&&e.length?e.filter(e=>!!e):[]}function g(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const n=[],r=[];return r.push(...e.filter(e=>{const r=e instanceof RegExp;return r&&t&&n.push(e),!r})),t?{regexFree:r,regexes:n}:r}function y(e,t){return void 0!==e.classList&&"string"===typeof t&&""!==t&&e.classList.contains(t)}function w(e,t){"string"===typeof t&&(t=t.split(" ")),t=p(t),t.length>0&&e.classList.add(...t)}function b(e,t){"string"===typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:n,regexes:r}=g(t,!0);n=p(n),n.length>0&&e.classList.remove(...n),r.forEach(t=>{e.classList.forEach(n=>{t.test(n)&&e.classList.remove(n)})})}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,n]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)})}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"===typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:n,regexes:r}=g(t,!0);n.forEach(t=>{""!==t&&e.removeAttribute(t)}),r.forEach(t=>{e.getAttributeNames().forEach(n=>{t.test(n)&&e.removeAttribute(n)})})}function S(e){if(3===e.nodeType)e.parentNode.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){const t=e.childNodes;for(let e=t.length-1;e>=0;e--)S(t[e])}}function E(e){let t;while(t=e.lastChild)e.removeChild(t)}const C=/(<(.*)>|&(.*);)/;function T(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];C.test(t)?e.innerHTML=n?Object(r["sanitize"])(t):t:M(e,t)}function M(e,t){const n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=t:(E(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function R(e){const t=e.ownerDocument.documentElement;let n=e;while(n!==t){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return R(n.host.impl);if(n.host)return R(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===F(n).display)return!1;n=n.parentNode}return!0}function O(e){const t=e.ownerDocument,n=t.defaultView,r=t.documentElement;let i,s,o,a=e;i=a.offsetLeft,s=a.offsetTop,o=a;while(a=a.offsetParent){if(a===t.body)break;if(!("offsetLeft"in a))break;i+=a.offsetLeft,s+=a.offsetTop,o=a}return o&&"fixed"===o.style.position&&(i+=n.pageXOffset||r.scrollLeft,s+=n.pageYOffset||r.scrollTop),{left:i,top:s}}function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function A(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?N(t):e.scrollTop}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?A(t):e.scrollLeft}function x(e){let t=e.ownerDocument,n=t?t.defaultView:void 0;t||(t=e.document?e.document:e,n=t.defaultView);const r=["auto","scroll"];let i=e.parentNode;while(i&&i.style&&t.body!==i){let{overflow:e,overflowX:t,overflowY:s}=i.style;if([e,t,s].includes("scroll"))return i;if(({overflow:e,overflowX:t,overflowY:s}=n.getComputedStyle(i)),r.includes(e)||r.includes(t)||r.includes(s))return i;if(i.clientHeight<=i.scrollHeight+1&&(r.includes(s)||r.includes(e)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(t)||r.includes(e)))return i;i=i.parentNode}return n}function k(e){return e.scrollHeight-e.clientHeight}function D(e){return e.scrollWidth-e.clientWidth}function H(e){const t=e.ownerDocument,n=t.defaultView;let r=e.parentNode;while(r&&r.style&&t.body!==r){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;const e=F(r,n),t=["scroll","hidden","auto"],i=e.getPropertyValue("overflow"),s=e.getPropertyValue("overflow-y"),o=e.getPropertyValue("overflow-x");if(t.includes(i)||t.includes(s)||t.includes(o))return r;r=r.parentNode}return n}function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===n)return"width"===t?n.innerWidth+"px":"height"===t?n.innerHeight+"px":void 0;const r=e.style[t];if(""!==r&&void 0!==r)return r;const i=F(e,n);return""!==i[t]&&void 0!==i[t]?i[t]:void 0}function j(e,t){const{selectorText:n}=t;let r=!1;return t.type===CSSRule.STYLE_RULE&&n&&(e.msMatchesSelector?r=e.msMatchesSelector(n):e.matches&&(r=e.matches(n))),r}function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function Y(e){return e.offsetWidth}function U(e){return e.offsetHeight}function V(e){return e.clientHeight||e.innerHeight}function B(e){return e.clientWidth||e.innerWidth}function W(e,t,n){e.addEventListener(t,n,!1)}function G(e,t,n){e.removeEventListener(t,n,!1)}function z(e){return e.selectionStart?e.selectionStart:0}function K(e){return e.selectionEnd?e.selectionEnd:0}function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let n="";return e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text),n}function $(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())}function q(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(r){const i=e.parentNode,s=i.style.display;i.style.display="block",e.setSelectionRange(t,n),i.style.display=s}}}let J;function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const 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);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;return r===i&&(i=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-i}function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===J&&(J=Q(e)),J}function ee(e){return e.offsetWidth!==e.clientWidth}function te(e){return e.offsetHeight!==e.clientHeight}function ne(e,t,n){e.style.transform=`translate3d(${t},${n},0)`}function re(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function ie(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function se(e){const t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function oe(e){return se(e)&&!1===e.hasAttribute("data-hot-input")}function ae(e){const t=e.ownerDocument.activeElement;oe(t)||e.select()}function le(e){return!e.parentNode}function ce(e,t){const n=new IntersectionObserver((n,r)=>{n.forEach(n=>{n.isIntersecting&&null!==e.offsetParent&&(t(),r.unobserve(e))})},{root:e.ownerDocument.body});n.observe(e)}function ue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=e.ownerDocument,s=r.createRange(),o=r.defaultView.getSelection();_(e,"contenteditable",!0),n&&_(e,...Object(i["n"])()),t&&w(e,"invisibleSelection"),s.selectNodeContents(e),o.removeAllRanges(),o.addRange(s)}function he(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),n.removeAllRanges(),t&&b(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function de(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ue(e,n),t(),he(e,n)}},"5fbd3":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?":e":1===t||2===t?":a":":e";return e+n},week:{dow:1,doy:4}});return t}))},6038:function(e,t,n){"use strict";var r=TypeError;e.exports=function(e,t){if(e<t)throw new r("Not enough arguments");return e}},6117:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".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:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},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:"[كېلەركى] 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,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}});return t}))},"624b":function(e,t,n){"use strict";var r=n("fd18"),i=n("2aac");e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(s){}}},"63d8":function(e,t,n){"use strict";n.r(t),n.d(t,"setBrowserMeta",(function(){return l})),n.d(t,"setPlatformMeta",(function(){return c})),n.d(t,"isChrome",(function(){return u})),n.d(t,"isChromeWebKit",(function(){return h})),n.d(t,"isFirefox",(function(){return d})),n.d(t,"isFirefoxWebKit",(function(){return m})),n.d(t,"isSafari",(function(){return f})),n.d(t,"isEdge",(function(){return p})),n.d(t,"isEdgeWebKit",(function(){return g})),n.d(t,"isMobileBrowser",(function(){return y})),n.d(t,"isIOS",(function(){return w})),n.d(t,"isIpadOS",(function(){return b})),n.d(t,"isWindowsOS",(function(){return _})),n.d(t,"isMacOS",(function(){return v})),n.d(t,"isLinuxOS",(function(){return S}));var r=n("351d"),i=n("7dd09");const s=e=>{const t={value:!1,test:(n,r)=>{t.value=e(n,r)}};return t},o={chrome:s((e,t)=>/Chrome/.test(e)&&/Google/.test(t)),chromeWebKit:s(e=>/CriOS/.test(e)),edge:s(e=>/Edge/.test(e)),edgeWebKit:s(e=>/EdgiOS/.test(e)),firefox:s(e=>/Firefox/.test(e)),firefoxWebKit:s(e=>/FxiOS/.test(e)),mobile:s(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:s((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t))},a={mac:s(e=>/^Mac/.test(e)),win:s(e=>/^Win/.test(e)),linux:s(e=>/^Linux/.test(e)),ios:s(e=>/iPhone|iPad|iPod/i.test(e))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r["objectEach"])(o,n=>{let{test:r}=n;r(e,t)})}function c(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r["objectEach"])(a,t=>{let{test:n}=t;n(e)})}function u(){return o.chrome.value}function h(){return o.chromeWebKit.value}function d(){return o.firefox.value}function m(){return o.firefoxWebKit.value}function f(){return o.safari.value}function p(){return o.edge.value}function g(){return o.edgeWebKit.value}function y(){return o.mobile.value}function w(){return a.ios.value}function b(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value}function _(){return a.win.value}function v(){return a.mac.value}function S(){return a.linux.value}Object(i["isCSR"])()&&(l(),c())},6403:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},"652d":function(e,t,n){"use strict";var r=n("fd18"),i=n("69ba"),s=n("9394"),o=n("27dc").indexOf,a=n("861e"),l=r([].push);e.exports=function(e,t){var n,r=s(e),c=0,u=[];for(n in r)!i(a,n)&&i(r,n)&&l(u,n);while(t.length>c)i(r,n=t[c++])&&(~o(u,n)||l(u,n));return u}},"65c6":function(e,t,n){"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},"65db":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t}))},6784:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],r=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}});return r}))},"67a87":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("81ea");function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const s=Object(r["arrayReduce"])(e,(e,t,r)=>{const i=t.replace(/\r?\n\s*/g,""),s=n[r]?n[r]:"";return e+i+s},"");return s.trim()}},6887:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+i(r[n],e)}function n(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function r(e){return e>9?r(e%10):e}function i(e,t){return 2===t?s(e):e}function s(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var o=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],a=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,c=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,u=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],h=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],d=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],m=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("_"),weekdaysParse:d,fullWeekdaysParse:u,shortWeekdaysParse:h,minWeekdaysParse:d,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:l,monthsShortStrictRegex:c,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},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:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}});return m}))},"688b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},6906:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("7a89");var r=n("97b9");const i=e=>`The id '${e}' is already declared in a map.`;function s(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function n(n,r){if(u(n))throw new Error(e(n));t.set(n,r)}function s(e){return t.delete(e)}function o(){t.clear()}function a(e){const[t]=c().find(t=>{let[n,r]=t;return e===r&&n})||[null];return t}function l(e){return t.get(e)}function c(){return[...t]}function u(e){return t.has(e)}return e=Object(r["isFunction"])(e)?e:i,{addItem:n,clear:o,getId:a,getItem:l,getItems:c,hasItem:u,removeItem:s}}},6909:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.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:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] 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){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"69ba":function(e,t,n){"use strict";var r=n("fd18"),i=n("fc2d"),s=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(i(e),t)}},"6b27":function(e,t,n){"use strict";var r=n("9e75"),i=Math.max,s=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):s(n,t)}},"6ce3":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"6d79":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},n=e.defineLocale("kk",{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){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},"6d83":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-tn",{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"},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:1,doy:4}});return t}))},"6e98":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".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:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f12":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".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:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f50":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"6f53":function(e,t,n){var r=n("83ab"),i=n("df75"),s=n("fc6a"),o=n("d1e7").f,a=function(e){return function(t){var n,a=s(t),l=i(a),c=l.length,u=0,h=[];while(c>u)n=l[u++],r&&!o.call(a,n)||h.push(e?[n,a[n]]:a[n]);return h}};e.exports={entries:a(!0),values:a(!1)}},"70f9":function(e,t,n){"use strict";var r=n("ac4f"),i=n("7b69"),s=n("fd18"),o=n("bf78"),a=n("73fa"),l=n("022b"),c=n("11b3"),u=n("2408"),h=n("2471"),d=n("2cb8"),m=n("aa44"),f=n("80dd"),p=n("d62b"),g=f("replace"),y=TypeError,w=s("".indexOf),b=s("".replace),_=s("".slice),v=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,s,f,S,E,C,T,M,R=o(this),O=0,N=0,A="";if(!l(e)){if(n=c(e),n&&(r=u(o(d(e))),!~w(r,"g")))throw new y("`.replaceAll` does not allow non-global regexes");if(s=h(e,g),s)return i(s,e,R,t);if(p&&n)return b(u(R),e,t)}f=u(R),S=u(e),E=a(t),E||(t=u(t)),C=S.length,T=v(1,C),O=w(f,S);while(-1!==O)M=E?u(t(S,O,f)):m(S,f,O,[],void 0,t),A+=_(f,N,O)+M,N=O+C,O=O+T>f.length?-1:w(f,S,O+T);return N<f.length&&(A+=_(f,N)),A}})},7118:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),r=e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".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"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return r}))},"71ca":function(e,t,n){"use strict";var r=String;e.exports=function(e){try{return r(e)}catch(t){return"Object"}}},7333:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".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:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}});return t}))},"73d9":function(e,t,n){"use strict";var r=n("b2c9"),i=String,s=TypeError;e.exports=function(e){if(r(e))return e;throw new s("Can't set "+i(e)+" as a prototype")}},"73fa":function(e,t,n){"use strict";var r="object"==typeof document&&document.all;e.exports="undefined"==typeof r&&void 0!==r?function(e){return"function"==typeof e||e===r}:function(e){return"function"==typeof e}},"74dc":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",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:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t}))},"76ab":function(e,t,n){"use strict";n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return u}));n("7a89");var r=n("9acd"),i=n("491c"),s=n("3d76"),o=n("169f");const{register:a,getItem:l,hasItem:c,getNames:u,getValues:h}=Object(r["a"])("cellTypes");function d(e){if(!c(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return l(e)}function m(e,t){"string"!==typeof e&&(t=e,e=t.CELL_TYPE);const{editor:n,renderer:r,validator:l}=t;n&&Object(i["e"])(e,n),r&&Object(s["d"])(e,r),l&&Object(o["d"])(e,l),a(e,t)}},"77aa":function(e,t,n){"use strict";function r(e){return e&&0===e.length}function i(e){return void 0===e||null===e?[]:Object.keys(e)}function s(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}function o(e,t){for(var n=[],r=i(e),s=0;s<r.length;s++){var o=r[s];n.push(t.call(null,e[o],o))}return n}function a(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}function l(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(l(r)):t.push(r)}return t}function c(e){return r(e)?void 0:e[0]}function u(e){var t=e&&e.length;return t?e[t-1]:void 0}function h(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else{if(!I(e))throw Error("non exhaustive match");var r=i(e);for(n=0;n<r.length;n++){var s=r[n],o=e[s];t.call(null,o,s)}}}function d(e){return"string"===typeof e}function m(e){return void 0===e}function f(e){return e instanceof Function}function p(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function g(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function y(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}function w(e,t){return y(e,(function(e){return!t(e)}))}function b(e,t){for(var n=Object.keys(e),r={},i=0;i<n.length;i++){var s=n[i],o=e[s];t(o)&&(r[s]=o)}return r}function _(e,t){return!!I(e)&&e.hasOwnProperty(t)}function v(e,t){return void 0!==C(e,(function(e){return e===t}))}function S(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function E(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function C(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}function T(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}function M(e,t,n){for(var r=Array.isArray(e),o=r?e:s(e),a=r?[]:i(e),l=n,c=0;c<o.length;c++)l=t.call(null,l,o[c],r?c:a[c]);return l}function R(e){return w(e,(function(e){return null===e||void 0===e}))}function O(e,t){void 0===t&&(t=function(e){return e});var n=[];return M(e,(function(e,r){var i=t(r);return v(n,i)?e:(n.push(i),e.concat(r))}),[])}function N(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=[null],i=r.concat(t);return Function.bind.apply(e,i)}function A(e){return Array.isArray(e)}function L(e){return e instanceof RegExp}function I(e){return e instanceof Object}function x(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function k(e,t){return w(e,(function(e){return v(t,e)}))}function D(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function H(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function P(e,t){var n=S(e);return n.sort((function(e,n){return t(e)-t(n)})),n}function j(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}function F(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)for(var s=t[r],o=i(s),a=0;a<o.length;a++){var l=o[a];e[l]=s[l]}return e}function Y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var s=t[r];if(!m(s))for(var o=i(s),a=0;a<o.length;a++){var l=o[a];_(e,l)||(e[l]=s[l])}}return e}function U(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Y.apply(null,[{}].concat(e))}function V(e,t){var n={};return h(e,(function(e){var r=t(e),i=n[r];i?i.push(e):n[r]=[e]})),n}function B(e,t){for(var n=E(e),r=i(t),s=0;s<r.length;s++){var o=r[s],a=t[o];n[o]=a}return n}function W(){}function G(e){return e}function z(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(void 0!==r?r:void 0)}return t}function K(e){console&&console.error&&console.error("Error: "+e)}function X(e){console&&console.warn&&console.warn("Warning: "+e)}function $(){return"function"===typeof Map}function q(e,t){t.forEach((function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]}}))}))}function J(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}function Q(e){return e[e.length-1]}function Z(e){var t=(new Date).getTime(),n=e(),r=(new Date).getTime(),i=r-t;return{time:i,value:n}}n.d(t,"A",(function(){return r})),n.d(t,"G",(function(){return i})),n.d(t,"U",(function(){return s})),n.d(t,"J",(function(){return o})),n.d(t,"I",(function(){return a})),n.d(t,"t",(function(){return l})),n.d(t,"s",(function(){return c})),n.d(t,"H",(function(){return u})),n.d(t,"u",(function(){return h})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return m})),n.d(t,"B",(function(){return f})),n.d(t,"m",(function(){return p})),n.d(t,"n",(function(){return g})),n.d(t,"p",(function(){return y})),n.d(t,"P",(function(){return w})),n.d(t,"N",(function(){return b})),n.d(t,"w",(function(){return _})),n.d(t,"j",(function(){return v})),n.d(t,"g",(function(){return S})),n.d(t,"h",(function(){return E})),n.d(t,"q",(function(){return C})),n.d(t,"r",(function(){return T})),n.d(t,"O",(function(){return M})),n.d(t,"i",(function(){return R})),n.d(t,"T",(function(){return O})),n.d(t,"y",(function(){return A})),n.d(t,"D",(function(){return L})),n.d(t,"C",(function(){return I})),n.d(t,"o",(function(){return x})),n.d(t,"l",(function(){return k})),n.d(t,"Q",(function(){return D})),n.d(t,"x",(function(){return H})),n.d(t,"f",(function(){return F})),n.d(t,"k",(function(){return U})),n.d(t,"v",(function(){return V})),n.d(t,"K",(function(){return B})),n.d(t,"b",(function(){return W})),n.d(t,"a",(function(){return G})),n.d(t,"L",(function(){return z})),n.d(t,"c",(function(){return K})),n.d(t,"d",(function(){return X})),n.d(t,"z",(function(){return $})),n.d(t,"e",(function(){return q})),n.d(t,"S",(function(){return J})),n.d(t,"M",(function(){return Q})),n.d(t,"R",(function(){return Z}))},"78e9":function(e,t,n){"use strict";var r=n("fd18"),i=Error,s=r("".replace),o=function(e){return String(new i(e).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(o);e.exports=function(e,t){if(l&&"string"==typeof e&&!i.prepareStackTrace)while(t--)e=s(e,a,"");return e}},"7a89":function(e,t,n){"use strict";var r=n("ac4f"),i=n("f2e8"),s=n("0204"),o=n("170e"),a="WebAssembly",l=i[a],c=7!==new Error("e",{cause:7}).cause,u=function(e,t){var n={};n[e]=o(e,t,c),r({global:!0,constructor:!0,arity:1,forced:c},n)},h=function(e,t){if(l&&l[e]){var n={};n[e]=o(a+"."+e,t,c),r({target:a,stat:!0,constructor:!0,arity:1,forced:c},n)}};u("Error",(function(e){return function(t){return s(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return s(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return s(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return s(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return s(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return s(e,this,arguments)}})),u("URIError",(function(e){return function(t){return s(e,this,arguments)}})),h("CompileError",(function(e){return function(t){return s(e,this,arguments)}})),h("LinkError",(function(e){return function(t){return s(e,this,arguments)}})),h("RuntimeError",(function(e){return function(t){return s(e,this,arguments)}}))},"7ae0":function(e,t,n){"use strict";n("d06e");var r=n("351d"),i=n("97b9");const s="localHooks",o={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,n,r,s,o,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let c=0;c<l;c++)Object(i["fastCall"])(this._localHooks[e][c],this,t,n,r,s,o,a)}},clearLocalHooks(){return this._localHooks={},this}};Object(r["defineGetter"])(o,"MIXIN_NAME",s,{writable:!1,enumerable:!1}),t["a"]=o},"7b69":function(e,t,n){"use strict";var r=n("48ab"),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},"7b7f":function(e,t,n){"use strict";var r=n("44d0"),i=n("b343"),s=n("f2e8"),o=s.String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"7b9c":function(e,t,n){"use strict";n.r(t),n.d(t,"stringify",(function(){return s})),n.d(t,"isDefined",(function(){return o})),n.d(t,"isUndefined",(function(){return a})),n.d(t,"isEmpty",(function(){return l})),n.d(t,"isRegExp",(function(){return c})),n.d(t,"_injectProductInfo",(function(){return v}));var r=n("c1df"),i=n("67a87");function s(e){let t;switch(typeof e){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString();break}return t}function o(e){return"undefined"!==typeof e}function a(e){return"undefined"===typeof e}function l(e){return null===e||""===e||a(e)}function c(e){return"[object RegExp]"===Object.prototype.toString.call(e)}const u="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),m=(e,t,n)=>e["substr"](t,n),f=e=>e["codePointAt"](0)-65,p=e=>(""+e).replace(/\-/g,""),g=e=>h(m(p(e),h("12"),f("F")))/(h(m(p(e),f("B"),~~![][u]))||9),y=()=>"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);let w=!1;const b={invalid:()=>i["a"]`
- The license key for Handsontable is invalid.\x20
- If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return i["a"]`
- The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
- version ${n}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
- to ${t}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>i["a"]`
- The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
- Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
- passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
- us at support@handsontable.com.`,non_commercial:()=>""},_={invalid:()=>i["a"]`
- The license key for Handsontable is invalid.\x20
- <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
- install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return i["a"]`
- The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
- version ${n}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
- license key or downgrade to a version released prior to ${t}. If you need any\x20
- help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>i["a"]`
- The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
- Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
- passing the key: 'non-commercial-and-evaluation'.\x20
- <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
- the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function v(e,t){const n=!l(e),i="string"===typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),s="14.3.0";let o,a="invalid",c="invalid";e=p(e||"");const u=S(e);if(n||i||u)if(u){const t=r("16/04/2024","DD/MM/YYYY"),n=Math.floor(t.toDate().getTime()/864e5),i=g(e);o=r(864e5*(i+1),"x").format("MMMM DD, YYYY"),n>i?(a="expired",c="expired"):(a="valid",c="valid")}else i?(a="non_commercial",c="valid"):(a="invalid",c="invalid");else a="missing",c="missing";if(y()&&(a="valid",c="valid"),!w&&"valid"!==a){const e=b[a]({keyValidityDate:o,hotVersion:s});e&&console["non_commercial"===a?"info":"warn"](b[a]({keyValidityDate:o,hotVersion:s})),w=!0}if("valid"!==c&&t.parentNode){const e=_[c]({keyValidityDate:o,hotVersion:s});if(e){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=_[c]({keyValidityDate:o,hotVersion:s}),t.parentNode.insertBefore(e,t.nextSibling)}}}function S(e){let t=[][u],n=t;if(e[u]!==f("Z"))return!1;for(let r="",i="B<H4P+".split(""),s=f(i.shift());s;s=f(i.shift()||"A"))--s<""[u]?n|=(d(""+d(h(r)+(h(m(e,Math.abs(s),2))+[]).padStart(2,"0")))%97||2)>>1:r=m(e,s,s?1===i[u]?9:8:6);return n===t}},"7be6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- 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 i(e,t,n,i){var s=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?s+(r(e)?"sekundy":"sekúnd"):s+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?s+(r(e)?"minúty":"minút"):s+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?s+(r(e)?"hodiny":"hodín"):s+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?s+(r(e)?"dni":"dní"):s+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?s+(r(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?s+(r(e)?"roky":"rokov"):s+"rokmi"}}var s=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:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"7c2b":function(e,t,n){"use strict";var r=n("624b"),i=n("8793"),s=n("bf78"),o=n("73d9");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=r(Object.prototype,"__proto__","set"),e(n,[]),t=n instanceof Array}catch(a){}return function(n,r){return s(n),o(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},"7d61":function(e,t,n){"use strict";var r=n("9046"),i=n("2aac"),s=n("48ab"),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},"7dcf4":function(e,t,n){"use strict";var r=n("c5ae");e.exports=function(e){return r(e.length)}},"7dd09":function(e,t,n){"use strict";function r(e){return window.requestAnimationFrame(e)}function i(e){window.cancelAnimationFrame(e)}function s(){return"ontouchstart"in window}function o(){return"undefined"!==typeof window}let a;function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a||(a="object"===typeof Intl?new Intl.Collator(e,t).compare:"function"===typeof String.prototype.localeCompare?(e,t)=>(""+e).localeCompare(t):(e,t)=>e===t?0:e>t?-1:1,a)}n.r(t),n.d(t,"requestAnimationFrame",(function(){return r})),n.d(t,"cancelAnimationFrame",(function(){return i})),n.d(t,"isTouchSupported",(function(){return s})),n.d(t,"isCSR",(function(){return o})),n.d(t,"getComparisonFunction",(function(){return l}))},"7f33":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return t}))},8033:function(e,t,n){},"80dd":function(e,t,n){"use strict";var r=n("f2e8"),i=n("de26"),s=n("69ba"),o=n("592a"),a=n("7b7f"),l=n("9c76"),c=r.Symbol,u=i("wks"),h=l?c["for"]||c:c&&c.withoutSetter||o;e.exports=function(e){return s(u,e)||(u[e]=a&&s(c,e)?c[e]:h("Symbol."+e)),u[e]}},8155:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund",i;case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami",i;case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami",i;case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi",i;case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci",i;case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti",i}}var n=e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".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:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"81b7":function(e,t,n){"use strict";var r=n("fd18"),i=n("b343"),s=n("939b"),o=Object,a=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?a(e,""):o(e)}:o},"81e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,t,n,r){var s="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":s=r?"sekunnin":"sekuntia";break;case"m":return r?"minuutin":"minuutti";case"mm":s=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":s=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":s=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":s=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":s=r?"vuoden":"vuotta";break}return s=i(e,r)+" "+s,s}function i(e,r){return e<10?r?n[e]:t[e]:e}var s=e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"81ea":function(e,t,n){"use strict";n.r(t),n.d(t,"to2dArray",(function(){return r})),n.d(t,"extendArray",(function(){return i})),n.d(t,"pivot",(function(){return s})),n.d(t,"arrayReduce",(function(){return o})),n.d(t,"arrayFilter",(function(){return a})),n.d(t,"arrayMap",(function(){return l})),n.d(t,"arrayEach",(function(){return c})),n.d(t,"arraySum",(function(){return u})),n.d(t,"arrayMax",(function(){return h})),n.d(t,"arrayMin",(function(){return d})),n.d(t,"arrayAvg",(function(){return m})),n.d(t,"arrayFlatten",(function(){return f})),n.d(t,"arrayUnique",(function(){return p})),n.d(t,"getDifferenceOfArrays",(function(){return g})),n.d(t,"getIntersectionOfArrays",(function(){return y})),n.d(t,"getUnionOfArrays",(function(){return w})),n.d(t,"stringToArray",(function(){return b}));n("d06e");function r(e){const t=e.length;let n=0;while(n<t)e[n]=[e[n]],n+=1}function i(e,t){const n=t.length;let r=0;while(r<n)e.push(t[r]),r+=1}function s(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const n=e.length,r=e[0].length;for(let i=0;i<n;i++)for(let n=0;n<r;n++)t[n]||(t[n]=[]),t[n][i]=e[i][n];return t}function o(e,t,n,r){let i=-1,s=e,o=n;Array.isArray(e)||(s=Array.from(e));const a=s.length;r&&a&&(i+=1,o=s[i]),i+=1;while(i<a)o=t(o,s[i],i,s),i+=1;return o}function a(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length,s=[];let o=-1;while(n<i){const e=r[n];t(e,n,r)&&(o+=1,s[o]=e),n+=1}return s}function l(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length,s=[];let o=-1;while(n<i){const e=r[n];o+=1,s[o]=t(e,n,r),n+=1}return s}function c(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length;while(n<i){if(!1===t(r[n],n,r))break;n+=1}return e}function u(e){return o(e,(e,t)=>e+t,0)}function h(e){return o(e,(e,t)=>e>t?e:t,Array.isArray(e)?e[0]:void 0)}function d(e){return o(e,(e,t)=>e<t?e:t,Array.isArray(e)?e[0]:void 0)}function m(e){return e.length?u(e)/e.length:0}function f(e){return o(e,(e,t)=>e.concat(Array.isArray(t)?f(t):t),[])}function p(e){const t=[];return c(e,e=>{-1===t.indexOf(e)&&t.push(e)}),t}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t];let s=r;return c(i,e=>{s=s.filter(t=>!e.includes(t))}),s}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t];let s=r;return c(i,e=>{s=s.filter(t=>e.includes(t))}),s}function w(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t],s=new Set(r);return c(i,e=>{c(e,e=>{s.has(e)||s.add(e)})}),Array.from(s)}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}},8230:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=e.defineLocale("ar-sa",{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"م"===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,"،")},week:{dow:0,doy:6}});return r}))},"84aa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.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:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"84d8":function(e,t,n){"use strict";var r=n("7b69"),i=n("8793"),s=n("4c54"),o=n("2471"),a=n("86d6"),l=n("80dd"),c=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!i(e)||s(e))return e;var n,l=o(e,u);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!i(n)||s(n))return n;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},"861dd":function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));n("7a89"),n("b879"),n("d06e");var r=n("a6de");function i(e,t,n){s(e,t),t.set(e,n)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,n){return t=a(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e,t){return e.get(h(e,t))}function u(e,t,n){return e.set(h(e,t),n),n}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var d=new WeakMap;class m{static get DEFAULT_WIDTH(){return 50}constructor(e){o(this,"count",0),o(this,"startColumn",null),o(this,"endColumn",null),o(this,"startPosition",null),o(this,"isVisibleInTrimmingContainer",!1),i(this,d,void 0),u(d,this,e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,scrollOffset:n,totalColumns:i,viewportWidth:s}=c(d,this),o=Math.max(c(d,this).scrollOffset,0),a=o>0?s+1:s;let l=0,u=!0;const h=[];let m,f=0,p=0;for(let c=0;c<i;c++)if(m=this._getColumnWidth(c),l<=o&&e!==r["a"]&&(this.startColumn=c,f=m),l>=o&&l+(e===r["a"]?m:0)<=o+a&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=c,f=m),this.endColumn=c),h.push(l),l+=m,p=m,e!==r["a"]&&(this.endColumn=c),l>=o+s){u=!1;break}const g=n+s-a,y=e===r["a"]?0:p,w=e===r["a"]?f:0;if(g<-1*c(d,this).inlineStartOffset||n>h.at(-1)+y||-1*c(d,this).scrollOffset-c(d,this).viewportWidth>-1*w?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===i-1&&u){this.startColumn=this.endColumn;while(this.startColumn>0){const t=h[this.endColumn]+m-h[this.startColumn-1];if((t<=s||e!==r["a"])&&(this.startColumn-=1),t>s)break}}e===r["c"]&&null!==this.startColumn&&t&&t(this),this.startPosition=h[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),i<this.endColumn&&(this.endColumn=i-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}_getColumnWidth(e){let t=c(d,this).columnWidthFn(e);return isNaN(t)&&(t=m.DEFAULT_WIDTH),t}}},"861e":function(e,t,n){"use strict";e.exports={}},8689:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},r=e.defineLocale("my",{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 နှစ်"},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]}))},week:{dow:1,doy:4}});return r}))},"86d6":function(e,t,n){"use strict";var r=n("7b69"),i=n("73fa"),s=n("8793"),o=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&i(n=e.toString)&&!s(a=r(n,e)))return a;if(i(n=e.valueOf)&&!s(a=r(n,e)))return a;if("string"!==t&&i(n=e.toString)&&!s(a=r(n,e)))return a;throw new o("Can't convert object to primitive value")}},"8722d":function(e,t,n){var r;!function(t){e.exports=t()}((function(){return function e(t,n,i){function s(a,l){if(!n[a]){if(!t[a]){var c="function"==typeof r&&r;if(!l&&c)return r(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var h=n[a]={exports:{}};t[a][0].call(h.exports,(function(e){return s(t[a][1][e]||e)}),h,h.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof r&&r,a=0;a<i.length;a++)s(i[a]);return s}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,s=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",l=1e14,c=14,u=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,m=1e9;function f(e){var t=0|e;return 0<e||e===t?t:t-1}function p(e){for(var t,n,r=1,i=e.length,s=e[0]+"";r<i;){for(t=e[r++]+"",n=c-t.length;n--;t="0"+t);s+=t}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function g(e,t){var n,r,i=e.c,s=t.c,o=e.s,a=t.s,l=e.e,c=t.e;if(!o||!a)return null;if(n=i&&!i[0],r=s&&!s[0],n||r)return n?r?0:-a:o;if(o!=a)return o;if(n=o<0,r=l==c,!i||!s)return r?0:!i^n?1:-1;if(!r)return c<l^n?1:-1;for(a=(l=i.length)<(c=s.length)?l:c,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^n?1:-1;return l==c?0:c<l^n?1:-1}function y(e,t,n,r){if(e<t||n<e||e!==(e<0?i(e):s(e)))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return f(e.e/c)==t&&e.c[t]%2!=0}function b(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function _(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,v,S,E,C,T,M,R,O,N,A=B.prototype={constructor:B,toString:null,valueOf:null},L=new B(1),I=20,x=4,k=-7,D=21,H=-1e7,P=1e7,j=!1,F=1,Y=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},V="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,i,o,l,h,d,m,f,p=this;if(!(p instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return p.s=e.s,p.e=e.e,void(p.c=(e=e.c)?e.slice():e);if((d="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;10<=h;h/=10,l++);return p.e=l,void(p.c=[e])}f=String(e)}else{if(f=String(e),!r.test(f))return S(p,f,d);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}-1<(l=f.indexOf("."))&&(f=f.replace(".","")),0<(h=f.search(/e/i))?(l<0&&(l=h),l+=+f.slice(h+1),f=f.substring(0,h)):l<0&&(l=f.length)}else{if(y(t,2,V.length,"Base"),f=String(e),10==t)return K(p=new B(e instanceof B?e:f),I+p.e+1,x);if(d="number"==typeof e){if(0*e!=0)return S(p,f,d,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,B.DEBUG&&15<f.replace(/^0\.0*|\./,"").length)throw Error(a+e);d=!1}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=V.slice(0,t),l=h=0,m=f.length;h<m;h++)if(n.indexOf(i=f.charAt(h))<0){if("."==i){if(l<h){l=m;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,h=-1,l=0;continue}return S(p,String(e),d,t)}-1<(l=(f=v(f,t,10,p.s)).indexOf("."))?f=f.replace(".",""):l=f.length}for(h=0;48===f.charCodeAt(h);h++);for(m=f.length;48===f.charCodeAt(--m););if(f=f.slice(h,++m)){if(m-=h,d&&B.DEBUG&&15<m&&(u<e||e!==s(e)))throw Error(a+p.s*e);if(P<(l=l-h-1))p.c=p.e=null;else if(l<H)p.c=[p.e=0];else{if(p.e=l,p.c=[],h=(l+1)%c,l<0&&(h+=c),h<m){for(h&&p.c.push(+f.slice(0,h)),m-=c;h<m;)p.c.push(+f.slice(h,h+=c));f=f.slice(h),h=c-f.length}else h-=m;for(;h--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function W(e,t,n,r){var i,s,o,a,l;if(null==n?n=x:y(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)l=p(e.c),l=1==r||2==r&&(o<=k||D<=o)?b(l,o):_(l,o,"0");else if(s=(e=K(new B(e),t,n)).e,a=(l=p(e.c)).length,1==r||2==r&&(t<=s||s<=k)){for(;a<t;l+="0",a++);l=b(l,s)}else if(t-=o,l=_(l,s,"0"),a<s+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=s-a))for(s+1==a&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function G(e,t){for(var n,r=1,i=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function z(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];10<=i;i/=10,r++);return(n=r+n*c-1)>P?e.c=e.e=null:e.c=n<H?[e.e=0]:(e.e=n,t),e}function K(e,t,n,r){var o,a,u,d,m,f,p,g=e.c,y=h;if(g){e:{for(o=1,d=g[0];10<=d;d/=10,o++);if((a=t-o)<0)a+=c,u=t,p=(m=g[f=0])/y[o-u-1]%10|0;else if((f=i((a+1)/c))>=g.length){if(!r)break e;for(;g.length<=f;g.push(0));m=p=0,u=(a%=c)-c+(o=1)}else{for(m=d=g[f],o=1;10<=d;d/=10,o++);p=(u=(a%=c)-c+o)<0?0:m/y[o-u-1]%10|0}if(r=r||t<0||null!=g[f+1]||(u<0?m:m%y[o-u-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):5<p||5==p&&(4==n||r||6==n&&(0<a?0<u?m/y[o-u]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=y[(c-t%c)%c],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=f,d=1,f--):(g.length=f+1,d=y[c-a],g[f]=0<u?s(m/y[o-u]%y[u])*d:0),r)for(;;){if(0==f){for(a=1,u=g[0];10<=u;u/=10,a++);for(u=g[0]+=d,d=1;10<=u;u/=10,d++);a!=d&&(e.e++,g[0]==l&&(g[0]=1));break}if(g[f]+=d,g[f]!=l)break;g[f--]=0,d=1}for(a=g.length;0===g[--a];g.pop());}e.e>P?e.c=e.e=null:e.e<H&&(e.c=[e.e=0])}return e}function X(e){var t,n=e.e;return null===n?e.toString():(t=p(e.c),t=n<=k||D<=n?b(t,n):_(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,m,t),I=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),x=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-m,0,t),y(n[1],0,m,t),k=n[0],D=n[1]):(y(n,-m,m,t),k=-(D=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-m,-1,t),y(n[1],1,m,t),H=n[0],P=n[1];else{if(y(n,-m,m,t),!n)throw Error(o+t+" cannot be zero: "+n);H=-(P=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!n,Error(o+"crypto unavailable");j=n}else j=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,m,t),Y=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);V=n}}return{DECIMAL_PLACES:I,ROUNDING_MODE:x,EXPONENTIAL_AT:[k,D],RANGE:[H,P],CRYPTO:j,MODULO_MODE:F,POW_PRECISION:Y,FORMAT:U,ALPHABET:V}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return G(arguments,A.lt)},B.minimum=B.min=function(){return G(arguments,A.gt)},B.random=(E=9007199254740992,C=Math.random()*E&2097151?function(){return s(Math.random()*E)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,l,u=0,d=[],f=new B(L);if(null==e?e=I:y(e,0,m),a=i(e/c),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)9e15<=(l=131072*t[u]+(t[u+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(d.push(l%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw j=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)9e15<=(l=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])?crypto.randomBytes(7).copy(t,u):(d.push(l%1e14),u+=7);u=a/7}if(!j)for(;u<a;)(l=C())<9e15&&(d[u++]=l%1e14);for(a=d[--u],e%=c,a&&e&&(l=h[c-e],d[u]=s(a/l)*l);0===d[u];d.pop(),u--);if(u<0)d=[r=0];else{for(r=-1;0===d[0];d.splice(0,1),r-=c);for(u=1,l=d[0];10<=l;l/=10,u++);u<c&&(r-=c-u)}return f.e=r,f.c=d,f}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},v=function(){var e="0123456789";function t(e,t,n,r){for(var i,s,o=[0],a=0,l=e.length;a<l;){for(s=o.length;s--;o[s]*=t);for(o[0]+=r.indexOf(e.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,s,o,a){var l,c,u,h,d,m,f,g,y=r.indexOf("."),w=I,b=x;for(0<=y&&(h=Y,Y=0,r=r.replace(".",""),m=(g=new B(i)).pow(r.length-y),Y=h,g.c=t(_(p(m.c),m.e,"0"),10,s,e),g.e=g.c.length),u=h=(f=t(r,i,s,a?(l=V,e):(l=e,V))).length;0==f[--h];f.pop());if(!f[0])return l.charAt(0);if(y<0?--u:(m.c=f,m.e=u,m.s=o,f=(m=n(m,g,w,b,s)).c,d=m.r,u=m.e),y=f[c=u+w+1],h=s/2,d=d||c<0||null!=f[c+1],d=b<4?(null!=y||d)&&(0==b||b==(m.s<0?3:2)):h<y||y==h&&(4==b||d||6==b&&1&f[c-1]||b==(m.s<0?8:7)),c<1||!f[0])r=d?_(l.charAt(1),-w,l.charAt(0)):l.charAt(0);else{if(f.length=c,d)for(--s;++f[--c]>s;)f[c]=0,c||(++u,f=[1].concat(f));for(h=f.length;!f[--h];);for(y=0,r="";y<=h;r+=l.charAt(f[y++]));r=_(r,u,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,s,o,a=0,l=e.length,c=t%d,u=t/d|0;for(e=e.slice();l--;)a=((i=c*(s=e[l]%d)+(r=u*s+(o=e[l]/d|0)*c)%d*d+a)/n|0)+(r/d|0)+u*o,e[l]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,s;if(n!=r)s=r<n?1:-1;else for(i=s=0;i<n;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(r,i,o,a,u){var h,d,m,p,g,y,w,b,_,v,S,E,C,T,M,R,O,N=r.s==i.s?1:-1,A=r.c,L=i.c;if(!(A&&A[0]&&L&&L[0]))return new B(r.s&&i.s&&(A?!L||A[0]!=L[0]:L)?A&&0==A[0]||!L?0*N:N/0:NaN);for(_=(b=new B(N)).c=[],N=o+(d=r.e-i.e)+1,u||(u=l,d=f(r.e/c)-f(i.e/c),N=N/c|0),m=0;L[m]==(A[m]||0);m++);if(L[m]>(A[m]||0)&&d--,N<0)_.push(1),p=!0;else{for(T=A.length,R=L.length,N+=2,1<(g=s(u/(L[m=0]+1)))&&(L=e(L,g,u),A=e(A,g,u),R=L.length,T=A.length),C=R,S=(v=A.slice(0,R)).length;S<R;v[S++]=0);O=L.slice(),O=[0].concat(O),M=L[0],L[1]>=u/2&&M++;do{if(g=0,(h=t(L,v,R,S))<0){if(E=v[0],R!=S&&(E=E*u+(v[1]||0)),1<(g=s(E/M)))for(u<=g&&(g=u-1),w=(y=e(L,g,u)).length,S=v.length;1==t(y,v,w,S);)g--,n(y,R<w?O:L,w,u),w=y.length,h=1;else 0==g&&(h=g=1),w=(y=L.slice()).length;if(w<S&&(y=[0].concat(y)),n(v,y,S,u),S=v.length,-1==h)for(;t(L,v,R,S)<1;)g++,n(v,R<S?O:L,S,u),S=v.length}else 0===h&&(g++,v=[0]);_[m++]=g,v[0]?v[S++]=A[C]||0:(v=[A[C]],S=1)}while((C++<T||null!=v[0])&&N--);p=null!=v[0],_[0]||_.splice(0,1)}if(u==l){for(m=1,N=_[0];10<=N;N/=10,m++);K(b,o+(b.e=m+d*c-1)+1,a,p)}else b.e=d,b.r=+p;return b}}(),T=/^(-?)0([xbo])(?=\w[\w.]*$)/i,M=/^([^.]+)\.$/,R=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,n,r){var i,s=n?t:t.replace(N,"");if(O.test(s))e.s=isNaN(s)?null:s<0?-1:1,e.c=e.e=null;else{if(!n&&(s=s.replace(T,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,s=s.replace(M,"$1").replace(R,"0.$1")),t!=s))return new B(s,i);if(B.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},A.absoluteValue=A.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},A.comparedTo=function(e,t){return g(this,new B(e,t))},A.decimalPlaces=A.dp=function(e,t){var n,r,i;if(null!=e)return y(e,0,m),null==t?t=x:y(t,0,8),K(new B(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-f(this.e/c))*c,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},A.dividedBy=A.div=function(e,t){return n(this,new B(e,t),I,x)},A.dividedToIntegerBy=A.idiv=function(e,t){return n(this,new B(e,t),0,1)},A.exponentiatedBy=A.pow=function(e,t){var n,r,a,l,u,h,d,m,f=this;if((e=new B(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+X(e));if(null!=t&&(t=new B(t)),u=14<e.e,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return m=new B(Math.pow(+X(f),u?2-w(e):+X(e))),t?m.mod(t):m;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!h&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(9<e.e&&(0<f.e||f.e<-1||(0==f.e?1<f.c[0]||u&&24e7<=f.c[1]:f.c[0]<8e13||u&&f.c[0]<=9999975e7)))return l=f.s<0&&w(e)?-0:0,-1<f.e&&(l=1/l),new B(h?1/l:l);Y&&(l=i(Y/c+2))}for(d=u?(n=new B(.5),h&&(e.s=1),w(e)):(a=Math.abs(+X(e)))%2,m=new B(L);;){if(d){if(!(m=m.times(f)).c)break;l?m.c.length>l&&(m.c.length=l):r&&(m=m.mod(t))}if(a){if(0===(a=s(a/2)))break;d=a%2}else if(K(e=e.times(n),e.e+1,1),14<e.e)d=w(e);else{if(0==(a=+X(e)))break;d=a%2}f=f.times(f),l?f.c&&f.c.length>l&&(f.c.length=l):r&&(f=f.mod(t))}return r?m:(h&&(m=L.div(m)),t?m.mod(t):l?K(m,Y,x,void 0):m)},A.integerValue=function(e){var t=new B(this);return null==e?e=x:y(e,0,8),K(t,t.e+1,e)},A.isEqualTo=A.eq=function(e,t){return 0===g(this,new B(e,t))},A.isFinite=function(){return!!this.c},A.isGreaterThan=A.gt=function(e,t){return 0<g(this,new B(e,t))},A.isGreaterThanOrEqualTo=A.gte=function(e,t){return 1===(t=g(this,new B(e,t)))||0===t},A.isInteger=function(){return!!this.c&&f(this.e/c)>this.c.length-2},A.isLessThan=A.lt=function(e,t){return g(this,new B(e,t))<0},A.isLessThanOrEqualTo=A.lte=function(e,t){return-1===(t=g(this,new B(e,t)))||0===t},A.isNaN=function(){return!this.s},A.isNegative=function(){return this.s<0},A.isPositive=function(){return 0<this.s},A.isZero=function(){return!!this.c&&0==this.c[0]},A.minus=function(e,t){var n,r,i,s,o=this,a=o.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,o.plus(e);var u=o.e/c,h=e.e/c,d=o.c,m=e.c;if(!u||!h){if(!d||!m)return d?(e.s=-t,e):new B(m?o:NaN);if(!d[0]||!m[0])return m[0]?(e.s=-t,e):new B(d[0]?o:3==x?-0:0)}if(u=f(u),h=f(h),d=d.slice(),a=u-h){for((i=(s=a<0)?(a=-a,d):(h=u,m)).reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(s=(a=d.length)<(t=m.length))?a:t,a=t=0;t<r;t++)if(d[t]!=m[t]){s=d[t]<m[t];break}if(s&&(i=d,d=m,m=i,e.s=-e.s),0<(t=(r=m.length)-(n=d.length)))for(;t--;d[n++]=0);for(t=l-1;a<r;){if(d[--r]<m[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=m[r]}for(;0==d[0];d.splice(0,1),--h);return d[0]?z(e,d,h):(e.s=3==x?-1:1,e.c=[e.e=0],e)},A.modulo=A.mod=function(e,t){var r,i,s=this;return e=new B(e,t),!s.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||s.c&&!s.c[0]?new B(s):(9==F?(i=e.s,e.s=1,r=n(s,e,0,3),e.s=i,r.s*=i):r=n(s,e,0,F),(e=s.minus(r.times(e))).c[0]||1!=F||(e.s=s.s),e)},A.multipliedBy=A.times=function(e,t){var n,r,i,s,o,a,u,h,m,p,g,y,w,b,_,v=this,S=v.c,E=(e=new B(e,t)).c;if(!(S&&E&&S[0]&&E[0]))return!v.s||!e.s||S&&!S[0]&&!E||E&&!E[0]&&!S?e.c=e.e=e.s=null:(e.s*=v.s,S&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(v.e/c)+f(e.e/c),e.s*=v.s,(u=S.length)<(p=E.length)&&(w=S,S=E,E=w,i=u,u=p,p=i),i=u+p,w=[];i--;w.push(0));for(b=l,_=d,i=p;0<=--i;){for(n=0,g=E[i]%_,y=E[i]/_|0,s=i+(o=u);i<s;)n=((h=g*(h=S[--o]%_)+(a=y*h+(m=S[o]/_|0)*g)%_*_+w[s]+n)/b|0)+(a/_|0)+y*m,w[s--]=h%b;w[s]=n}return n?++r:w.splice(0,1),z(e,w,r)},A.negated=function(){var e=new B(this);return e.s=-e.s||null,e},A.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,r.minus(e);var s=r.e/c,o=e.e/c,a=r.c,u=e.c;if(!s||!o){if(!a||!u)return new B(i/0);if(!a[0]||!u[0])return u[0]?e:new B(a[0]?r:0*i)}if(s=f(s),o=f(o),a=a.slice(),i=s-o){for((n=0<i?(o=s,u):(i=-i,a)).reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=u.length)<0&&(n=u,u=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/l|0,a[t]=l===a[t]?0:a[t]%l;return i&&(a=[i].concat(a),++o),z(e,a,o)},A.precision=A.sd=function(e,t){var n,r,i;if(null!=e&&e!==!!e)return y(e,1,m),null==t?t=x:y(t,0,8),K(new B(this),e,t);if(!(n=this.c))return null;if(r=(i=n.length-1)*c+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];10<=i;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},A.shiftedBy=function(e){return y(e,-u,u),this.times("1e"+e)},A.squareRoot=A.sqrt=function(){var e,t,r,i,s,o=this,a=o.c,l=o.s,c=o.e,u=I+4,h=new B("0.5");if(1!==l||!a||!a[0])return new B(!l||l<0&&(!a||a[0])?NaN:a?o:1/0);if((r=0==(l=Math.sqrt(+X(o)))||l==1/0?(((t=p(a)).length+c)%2==0&&(t+="0"),l=Math.sqrt(+t),c=f((c+1)/2)-(c<0||c%2),new B(t=l==1/0?"1e"+c:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+c)):new B(l+"")).c[0])for((l=(c=r.e)+u)<3&&(l=0);;)if(s=r,r=h.times(s.plus(n(o,s,u,1))),p(s.c).slice(0,l)===(t=p(r.c)).slice(0,l)){if(r.e<c&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(K(r,r.e+I+2,1),e=!r.times(r).eq(o));break}if(!i&&(K(s,s.e+I+2,0),s.times(s).eq(o))){r=s;break}u+=4,l+=4,i=1}return K(r,r.e+I+1,x,e)},A.toExponential=function(e,t){return null!=e&&(y(e,0,m),e++),W(this,e,t,1)},A.toFixed=function(e,t){return null!=e&&(y(e,0,m),e=e+this.e+1),W(this,e,t)},A.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,c=n.groupSeparator||"",u=s[0],h=s[1],d=this.s<0,m=d?u.slice(1):u,f=m.length;if(l&&(i=a,a=l,f-=l=i),0<a&&0<f){for(i=f%a||a,u=m.substr(0,i);i<f;i+=a)u+=c+m.substr(i,a);0<l&&(u+=c+m.slice(i)),d&&(u="-"+u)}r=h?u+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):u}return(n.prefix||"")+r+(n.suffix||"")},A.toFraction=function(e){var t,r,i,s,a,l,u,d,m,f,g,y,w=this,b=w.c;if(null!=e&&(!(u=new B(e)).isInteger()&&(u.c||1!==u.s)||u.lt(L)))throw Error(o+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+X(u));if(!b)return new B(w);for(t=new B(L),m=r=new B(L),i=d=new B(L),y=p(b),a=t.e=y.length-w.e-1,t.c[0]=h[(l=a%c)<0?c+l:l],e=!e||0<u.comparedTo(t)?0<a?t:m:u,l=P,P=1/0,u=new B(y),d.c[0]=0;f=n(u,t,0,1),1!=(s=r.plus(f.times(i))).comparedTo(e);)r=i,i=s,m=d.plus(f.times(s=m)),d=s,t=u.minus(f.times(s=t)),u=s;return s=n(e.minus(r),i,0,1),d=d.plus(s.times(m)),r=r.plus(s.times(i)),d.s=m.s=w.s,g=n(m,i,a*=2,x).minus(w).abs().comparedTo(n(d,r,a,x).minus(w).abs())<1?[m,i]:[d,r],P=l,g},A.toNumber=function(){return+X(this)},A.toPrecision=function(e,t){return null!=e&&y(e,1,m),W(this,e,t,2)},A.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?i<=k||D<=i?b(p(n.c),i):_(p(n.c),i,"0"):10===e?_(p((n=K(new B(n),I+i+1,x)).c),n.e,"0"):(y(e,2,V.length,"Base"),v(_(p(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},A.valueOf=A.toJSON=function(){return X(this)},A._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(A[Symbol.toStringTag]="BigNumber",A[Symbol.for("nodejs.util.inspect.custom")]=A.valueOf),null!=t&&B.set(t),B}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,s=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw s}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=e("./globalState"),s=e("./validating"),o=e("./parsing"),a=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:a,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:a,marker:"d"}},c={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function u(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=o.parseFormat(t)),!s.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",a=t.postfix||"",u=function(e,t,n){switch(t.output){case"currency":return t=p(t,i.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),i=Object.assign({},c,t),s=void 0,o="",a=!!i.totalLength||!!i.forceAverage||i.average,l=t.currencyPosition||r.position,u=t.currencySymbol||r.symbol;i.spaceSeparated&&(o=" "),"infix"===l&&(s=o+u+o);var h=f({instance:e,providedFormat:t,state:n,decimalSeparator:s});return"prefix"===l&&(h=e._value<0&&"sign"===i.negative?"-".concat(o).concat(u).concat(h.slice(1)):u+o+h),l&&"postfix"!==l||(h=h+(o=a?"":o)+u),h}(e,t,i);case"percent":return t=p(t,i.currentPercentageDefaultFormat()),function(e,t,n,r){var i=t.prefixSymbol,s=f({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},c,t);return i?"%".concat(o.spaceSeparated?" ":"").concat(s):"".concat(s).concat(o.spaceSeparated?" ":"","%")}(e,t,i,n);case"byte":return t=p(t,i.currentByteDefaultFormat()),_=e,S=i,E=n,C=(v=t).base||"binary",T=l[C],M=h(_._value,T.suffixes,T.scale),R=M.value,O=M.suffix,N=f({instance:E(R),providedFormat:v,state:S,defaults:S.currentByteDefaultFormat()}),A=S.currentAbbreviations(),"".concat(N).concat(A.spaced?" ":"").concat(O);case"time":return t=p(t,i.currentTimeDefaultFormat()),g=e,y=Math.floor(g._value/60/60),w=Math.floor((g._value-60*y*60)/60),b=Math.round(g._value-60*y*60-60*w),"".concat(y,":").concat(w<10?"0":"").concat(w,":").concat(b<10?"0":"").concat(b);case"ordinal":return t=p(t,i.currentOrdinalDefaultFormat()),r=e,s=t,a=(o=i).currentOrdinal(),u=Object.assign({},c,s),d=f({instance:r,providedFormat:s,state:o}),m=a(r._value),"".concat(d).concat(u.spaceSeparated?" ":"").concat(m);case"number":default:return f({instance:e,providedFormat:t,numbro:n})}var r,s,o,a,u,d,m,g,y,w,b,_,v,S,E,C,T,M,R,O,N,A}(e,t,n);return(u=r+u)+a}function h(e,t,n){var r=t[0],i=Math.abs(e);if(n<=i){for(var s=1;s<t.length;++s){var o=Math.pow(n,s),a=Math.pow(n,s+1);if(o<=i&&i<a){r=t[s],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function d(e){for(var t="",n=0;n<e;n++)t+="0";return t}function m(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),i=r(n.split("e"),2),s=i[0],o=i[1],a=r(s.split("."),2),l=a[0],c=a[1],u=void 0===c?"":c;if(0<+o)n=l+u+d(o-u.length);else{var h=".";h=+l<0?"-0".concat(h):"0".concat(h);var m=(d(-o-1)+Math.abs(l)+u).substr(0,t);m.length<t&&(m+=d(t-m.length)),n=h+m}return 0<+o&&0<t&&(n+=".".concat(d(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function f(e){var t=e.instance,n=e.providedFormat,s=e.state,o=void 0===s?i:s,a=e.decimalSeparator,l=e.defaults,u=void 0===l?o.currentDefaults():l,h=t._value;if(0===h&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(h))return h.toString();var d,f,p,g,y,w,b,_,v=Object.assign({},c,u,n),S=v.totalLength,E=S?0:v.characteristic,C=v.optionalCharacteristic,T=v.forceAverage,M=!!S||!!T||v.average,R=S?-1:M&&void 0===n.mantissa?0:v.mantissa,O=!S&&(void 0===n.optionalMantissa?-1===R:v.optionalMantissa),N=v.trimMantissa,A=v.thousandSeparated,L=v.spaceSeparated,I=v.negative,x=v.forceSign,k=v.exponential,D="";if(M){var H=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,i=e.spaceSeparated,s=void 0!==i&&i,o=e.totalLength,a=void 0===o?0:o,l="",c=Math.abs(t),u=-1;if(c>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):c<Math.pow(10,12)&&c>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):c<Math.pow(10,9)&&c>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(c<Math.pow(10,6)&&c>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(s?" ":"")+l),a){var h=t.toString().split(".")[0];u=Math.max(a-h.length,0)}return{value:t,abbreviation:l,mantissaPrecision:u}}({value:h,forceAverage:T,abbreviations:o.currentAbbreviations(),spaceSeparated:L,totalLength:S});h=H.value,D+=H.abbreviation,S&&(R=H.mantissaPrecision)}if(k){var P=(f=(d={value:h,characteristicPrecision:E}).value,p=d.characteristicPrecision,g=void 0===p?0:p,y=r(f.toExponential().split("e"),2),w=y[0],b=y[1],_=+w,g&&1<g&&(_*=Math.pow(10,g-1),b=0<=(b=+b-(g-1))?"+".concat(b):b),{value:_,abbreviation:"e".concat(b)});h=P.value,D=P.abbreviation+D}var j,F,Y,U=function(e,t,n,i,s){if(-1===i)return e;var o=m(t,i),a=r(o.toString().split("."),2),l=a[0],c=a[1],u=void 0===c?"":c;if(u.match(/^0+$/)&&(n||s))return l;var h=u.match(/0+$/);return s&&h?"".concat(l,".").concat(u.toString().slice(0,h.index)):o.toString()}(h.toString(),h,O,R,N);return U=function(e,t,n,r,i){var s=r.currentDelimiters(),o=s.thousands;i=i||s.decimal;var a=s.thousandsSize||3,l=e.toString(),c=l.split(".")[0],u=l.split(".")[1];return n&&(t<0&&(c=c.slice(1)),function(e,t){for(var n=[],r=0,i=e;0<i;i--)r===t&&(n.unshift(i),r=0),r++;return n}(c.length,a).forEach((function(e,t){c=c.slice(0,e+t)+o+c.slice(e+t)})),t<0&&(c="-".concat(c))),u?c+i+u:c}(U=function(e,t,n,i){var s=e,o=r(s.toString().split("."),2),a=o[0],l=o[1];if(a.match(/^-?0$/)&&n)return l?"".concat(a.replace("0",""),".").concat(l):a.replace("0","");if(a.length<i)for(var c=i-a.length,u=0;u<c;u++)s="0".concat(s);return s.toString()}(U,0,C,E),h,A,o,a),(M||k)&&(U+=D),(x||h<0)&&(j=U,Y=I,U=0===(F=h)?j:0==+j?j.replace("-",""):0<F?"+".concat(j):"sign"===Y?j:"(".concat(j.replace("-",""),")")),U}function p(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return u.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.general;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.binary;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.decimal;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:p}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),i=e("./validating"),s=e("./parsing"),o={},a=void 0,l={},c=null,u={};function h(e){a=e}function d(){return l[a]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return a},o.currentCurrency=function(){return d().currency},o.currentAbbreviations=function(){return d().abbreviations},o.currentDelimiters=function(){return d().delimiters},o.currentOrdinal=function(){return d().ordinal},o.currentDefaults=function(){return Object.assign({},d().defaults,u)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().timeFormat)},o.setDefaults=function(e){e=s.parseFormat(e),i.validateFormat(e)&&(u=e)},o.getZeroFormat=function(){return c},o.setZeroFormat=function(e){return c="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==c},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return d()},o.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!i.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&h(e.languageTag)},o.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],i=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[i]?void h(i):void h(t)}h(e)},o.registerLanguage(r),a=r.languageTag,t.exports=o},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function i(e,t,n){var i=new r(e._value),s=t;return n.isNumbro(t)&&(s=t._value),s=new r(s),e._value=i.minus(s).toNumber(),e}t.exports=function(e){return{add:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.plus(l).toNumber(),i;var i,s,o,a,l},subtract:function(t,n){return i(t,n,e)},multiply:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.times(l).toNumber(),i;var i,s,o,a,l},divide:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.dividedBy(l).toNumber(),i;var i,s,o,a,l},set:function(t,n){return r=t,s=i=n,e.isNumbro(i)&&(s=i._value),r._value=s,r;var r,i,s},difference:function(t,n){return r=n,i(o=(s=e)(t._value),r,s),Math.abs(o._value);var r,s,o}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./globalState"),s=e("./validating"),o=e("./loading")(m),a=e("./unformatting"),l=e("./formatting")(m),c=e("./manipulating")(m),u=e("./parsing"),h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n,s;return t=e,(n=[{key:"clone",value:function(){return m(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=u.parseFormat(e)),(e=l.formatOrDefault(e,i.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return c.difference(this,e)}},{key:"add",value:function(e){return c.add(this,e)}},{key:"subtract",value:function(e){return c.subtract(this,e)}},{key:"multiply",value:function(e){return c.multiply(this,e)}},{key:"divide",value:function(e){return c.divide(this,e)}},{key:"set",value:function(e){return c.set(this,d(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),s&&r(t,s),e}();function d(e){var t=e;return m.isNumbro(e)?t=e._value:"string"==typeof e?t=m.unformat(e):isNaN(e)&&(t=NaN),t}function m(e){return new h(d(e))}m.version="2.1.2",m.isNumbro=function(e){return e instanceof h},m.language=i.currentLanguage,m.registerLanguage=i.registerLanguage,m.setLanguage=i.setLanguage,m.languages=i.languages,m.languageData=i.languageData,m.zeroFormat=i.setZeroFormat,m.defaultFormat=i.currentDefaults,m.setDefaults=i.setDefaults,m.defaultCurrencyFormat=i.currentCurrencyDefaultFormat,m.validate=s.validate,m.loadLanguagesInNode=o.loadLanguagesInNode,m.unformat=a.unformat,t.exports=m},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,i,s,o,a,l,c,u,h,d,m,f,p,g,y,w,b,_,v=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=v,e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t,s=v,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(o=(i=e).match(/{([^}]*)}$/))?(s.postfix=o[1],i.slice(0,-o[0].length)):i,v),a=v,(l=e.match(/[1-9]+[0-9]*/))&&(a.totalLength=+l[0]),c=v,(u=e.split(".")[0].match(/0+/))&&(c.characteristic=u[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,v),h=v,-1!==e.indexOf("a")&&(h.average=!0),m=v,-1!==(d=e).indexOf("K")?m.forceAverage="thousand":-1!==d.indexOf("M")?m.forceAverage="million":-1!==d.indexOf("B")?m.forceAverage="billion":-1!==d.indexOf("T")&&(m.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,v),p=v,(f=e).match(/\[\.]/)?p.optionalMantissa=!0:f.match(/\./)&&(p.optionalMantissa=!1),g=v,-1!==e.indexOf(",")&&(g.thousandSeparated=!0),y=v,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=v,(w=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),w.match(/^\+?-/)&&(b.negative="sign"),_=v,e.match(/^\+/)&&(_.forceSign=!0),v)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function i(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",s=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,a=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,c=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var u="",h=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==t)return-1*e(h,n,s,o,a,l,c);for(var d=0;d<r.length;d++){var m=r[d];if((u=t.replace(m.key,""))!==t)return e(u,n,s,o,a,l,c)*m.factor}if((u=t.replace("%",""))!==t)return e(u,n,s,o,a,l,c)/100;var f=parseFloat(t);if(!isNaN(f)){var p=o(f);if(p&&"."!==p&&(u=t.replace(new RegExp("".concat(i(p),"$")),""))!==t)return e(u,n,s,o,a,l,c);var g={};Object.keys(l).forEach((function(e){g[l[e]]=e}));for(var y=Object.keys(g).sort().reverse(),w=y.length,b=0;b<w;b++){var _=y[b],v=g[_];if((u=t.replace(_,""))!==t){var S=void 0;switch(v){case"thousand":S=Math.pow(10,3);break;case"million":S=Math.pow(10,6);break;case"billion":S=Math.pow(10,9);break;case"trillion":S=Math.pow(10,12)}return e(u,n,s,o,a,l,c)*S}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(i(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,s,o,a,l)}t.exports={unformat:function(t,n){var r,i,o,a=e("./globalState"),l=a.currentDelimiters(),c=a.currentCurrency().symbol,u=a.currentOrdinal(),h=a.getZeroFormat(),d=a.currentAbbreviations(),m=void 0;if("string"==typeof t)m=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],i=+n[1],s=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(s)}(t,l)?(r=t.split(":"),i=+r[0],o=+r[1],+r[2]+60*o+3600*i):s(t,l,c,u,h,d,n);else{if("number"!=typeof t)return;m=t}if(void 0!==m)return m}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(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 spread non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s=e("./unformatting"),o=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,a={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},l={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(o)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function c(e){return!!s.unformat(e)}function u(e,t,n){var s=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e).map((function(r){if(!t[r])return console.error("".concat(n," Invalid key: ").concat(r)),!1;var s=e[r],o=t[r];if("string"==typeof o&&(o={type:o}),"format"===o.type){if(!u(s,a,"[Validate ".concat(r,"]"),!0))return!1}else if(i(s)!==o.type)return console.error("".concat(n," ").concat(r,' type mismatched: "').concat(o.type,'" expected, "').concat(i(s),'" provided')),!1;if(o.restrictions&&o.restrictions.length)for(var l=o.restrictions.length,c=0;c<l;c++){var h=o.restrictions[c],d=h.restriction,m=h.message;if(!d(s,e))return console.error("".concat(n," ").concat(r," invalid value: ").concat(m)),!1}return o.restriction&&!o.restriction(s,e)?(console.error("".concat(n," ").concat(r," invalid value: ").concat(o.message)),!1):o.validValues&&-1===o.validValues.indexOf(s)?(console.error("".concat(n," ").concat(r," invalid value: must be among ").concat(JSON.stringify(o.validValues),', "').concat(s,'" provided')),!1):!(o.children&&!u(s,o.children,"[Validate ".concat(r,"]")))}));return s||o.push.apply(o,r(Object.keys(t).map((function(r){var i=t[r];if("string"==typeof i&&(i={type:i}),i.mandatory){var s=i.mandatory;if("function"==typeof s&&(s=s(e)),s&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),o.reduce((function(e,t){return e&&t}),!0)}function h(e){return u(e,a,"[Validate format]")}t.exports={validate:function(e,t){var n=c(e),r=h(t);return n&&r},validateFormat:h,validateInput:c,validateLanguage:function(e){return u(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)}))},8793:function(e,t,n){"use strict";var r=n("73fa");e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},"87d6":function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));n("7a89"),n("d06e");var r=n("de3b");function i(e,t,n){return t=s(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let a=0;class l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){n.call(this,c(e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i,options:r,eventManager:this}),e.addEventListener(t,i,r),a+=1,()=>{this.removeEventListener(e,t,n)}}removeEventListener(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=this.context.eventListeners.length;while(s)if(s-=1,r=this.context.eventListeners[s],r.event===t&&r.element===e){if(n&&n!==r.callback)continue;if(i&&r.eventManager!==this)continue;this.context.eventListeners.splice(s,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),a-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;while(t){t-=1;const n=this.context.eventListeners[t];e&&n.eventManager!==this||(this.context.eventListeners.splice(t,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),a-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let n=e.document,r=e;n||(n=e.ownerDocument?e.ownerDocument:e,r=n.defaultView);const 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};let s;n.createEvent?(s=n.createEvent("MouseEvents"),s.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)):s=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(s):e.fireEvent("on"+t,s)}}function c(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),Object(r["stopImmediatePropagation"])(this)},e}function u(){return a}t["a"]=l},8828:function(e,t,n){"use strict";n.d(t,"K",(function(){return r})),n.d(t,"M",(function(){return i})),n.d(t,"x",(function(){return s})),n.d(t,"l",(function(){return o})),n.d(t,"D",(function(){return a})),n.d(t,"C",(function(){return l})),n.d(t,"g",(function(){return c})),n.d(t,"A",(function(){return u})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return d})),n.d(t,"h",(function(){return m})),n.d(t,"q",(function(){return f})),n.d(t,"v",(function(){return p})),n.d(t,"c",(function(){return g})),n.d(t,"F",(function(){return y})),n.d(t,"G",(function(){return w})),n.d(t,"L",(function(){return b})),n.d(t,"p",(function(){return _})),n.d(t,"n",(function(){return v})),n.d(t,"j",(function(){return S})),n.d(t,"u",(function(){return E})),n.d(t,"m",(function(){return C})),n.d(t,"B",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"E",(function(){return R})),n.d(t,"f",(function(){return O})),n.d(t,"k",(function(){return N})),n.d(t,"J",(function(){return A})),n.d(t,"y",(function(){return L})),n.d(t,"o",(function(){return I})),n.d(t,"d",(function(){return x})),n.d(t,"H",(function(){return k})),n.d(t,"b",(function(){return D})),n.d(t,"i",(function(){return H})),n.d(t,"a",(function(){return P})),n.d(t,"r",(function(){return j})),n.d(t,"z",(function(){return F})),n.d(t,"I",(function(){return Y})),n.d(t,"w",(function(){return U}));const r=e=>["tabindex",e],i=()=>["role","treegrid"],s=()=>["role","presentation"],o=()=>["role","gridcell"],a=()=>["role","rowheader"],l=()=>["role","rowgroup"],c=()=>["role","columnheader"],u=()=>["role","row"],h=()=>["role","menu"],d=()=>["role","menuitem"],m=()=>["role","combobox"],f=()=>["role","listbox"],p=()=>["role","option"],g=()=>["role","checkbox"],y=()=>["scope","col"],w=()=>["scope","row"],b=()=>["type","text"],_=e=>["aria-label",e],v=()=>["aria-hidden","true"],S=()=>["aria-disabled","true"],E=()=>["aria-multiselectable","true"],C=e=>["aria-haspopup",e],T=e=>["aria-rowcount",e],M=e=>["aria-colcount",e],R=e=>["aria-rowindex",e],O=e=>["aria-colindex",e],N=e=>["aria-expanded",e],A=e=>["aria-sort",e],L=()=>["aria-readonly","true"],I=()=>["aria-invalid","true"],x=e=>["aria-checked",e],k=()=>["aria-selected","true"],D=()=>["aria-autocomplete","list"],H=e=>["aria-controls",e],P=e=>["aria-activedescendant",e],j=e=>["aria-live",e],F=e=>["aria-relevant",e],Y=e=>["aria-setsize",e],U=e=>["aria-posinset",e]},8840:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"890f":function(e,t,n){var r,i,s;(function(n,o){i=[],r=o,s="function"===typeof r?r.apply(t,i):r,void 0===s||(e.exports=s)})("undefined"!==typeof self&&self,(function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":a(n,"global");break;case"i":a(n,"ignoreCase");break;case"m":a(n,"multiLine");break;case"u":a(n,"unicode");break;case"y":a(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t}},e.prototype.disjunction=function(){var e=[];e.push(this.alternative());while("|"===this.peekChar())this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){var e=[];while(this.isTerm())e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break}l(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}c()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":var r;this.isDigit()?(r=this.integerIncludingZero(),t={atLeast:n,atMost:r}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(!0===e&&void 0===t)return;l(t);break}if(!0!==e||void 0!==t)return l(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),l(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[s("\n"),s("\r"),s("\u2028"),s("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){var e=this.positiveInteger();return{type:"GroupBackReference",value:e}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=u;break;case"D":e=u,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=h;break;case"W":e=h,t=!0;break}return l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=s("\f");break;case"n":e=s("\n");break;case"r":e=s("\r");break;case"t":e=s("\t");break;case"v":e=s("\v");break}return l(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");var t=e.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:t}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:s("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){var e=this.popChar();return{type:"Character",value:s(e)}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var e=this.popChar();return{type:"Character",value:s(e)}}},e.prototype.characterClass=function(){var e=[],t=!1;this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);while(this.isClassAtom()){var n=this.classAtom(),r="Character"===n.type;if(r&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom(),a="Character"===i.type;if(a){if(i.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:i.value})}else o(n.value,e),e.push(s("-")),o(i.value,e)}else o(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:s("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}var t=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===i.test(e))throw Error("Expecting a positive integer");while(r.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===r.test(e))throw Error("Expecting an integer");while(r.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:s(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return r.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",r=0;r<e;r++){var i=this.popChar();if(!1===n.test(i))throw Error("Expecting a HexDecimal digits");t+=i}var s=parseInt(t,16);return{type:"Character",value:s}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function s(e){return e.charCodeAt(0)}function o(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function a(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function l(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}function c(){throw Error("Internal Error - Should never get here!")}var u=[];for(t=s("0");t<=s("9");t++)u.push(t);var h=[s("_")].concat(u);for(t=s("a");t<=s("z");t++)h.push(t);for(t=s("A");t<=s("Z");t++)h.push(t);var d=[s(" "),s("\f"),s("\n"),s("\r"),s("\t"),s("\v"),s("\t"),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s("\u2028"),s("\u2029"),s(" "),s(" "),s(" "),s("\ufeff")];function m(){}return m.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(e){this.visit(e)}),this))}},m.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)},m.prototype.visitPattern=function(e){},m.prototype.visitFlags=function(e){},m.prototype.visitDisjunction=function(e){},m.prototype.visitAlternative=function(e){},m.prototype.visitStartAnchor=function(e){},m.prototype.visitEndAnchor=function(e){},m.prototype.visitWordBoundary=function(e){},m.prototype.visitNonWordBoundary=function(e){},m.prototype.visitLookahead=function(e){},m.prototype.visitNegativeLookahead=function(e){},m.prototype.visitCharacter=function(e){},m.prototype.visitSet=function(e){},m.prototype.visitGroup=function(e){},m.prototype.visitGroupBackReference=function(e){},m.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:m,VERSION:"0.4.0"}}))},"898b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"});return s}))},"8c7e":function(e,t,n){"use strict";n.d(t,"a",(function(){return VR}));n("7a89"),n("d06e");var r=n("03529"),i=n("5d7f"),s=n("de3b"),o=n("351d"),a=n("c5c4");const l="handsontableEditor",c="handsontable";class u extends r["a"]{static get EDITOR_TYPE(){return c}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),Object(i["setCaretPosition"])(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const n=this.getSourceData(t.row,t.col);void 0!==n&&a.setValue(n),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&Object(o["extend"])(l,s.handsontable),this.htOptions=l}beginEditing(e,t){const n=this.hot.getSettings().onBeginEditing;n&&!1===n()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,n){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,n)}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor&&this.htEditor.destroy()})}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");super.registerShortcuts();const n={group:l,relativeToGroup:a["a"],position:"before"},r=(e,t)=>{const n=this.htEditor;if(void 0!==e&&(e<0||n.flipped&&e>n.countRows()-1?n.deselectCell():n.selectCell(e,0),n.getData().length))return t.preventDefault(),Object(s["stopImmediatePropagation"])(t),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,i;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(i=t.getSelectedLast()[0],n=Math.max(0,i-1)):(i=t.getSelectedLast()[0],n=i-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,i;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;i=t.getSelectedLast()[0],n=Math.min(e,i+1)}}else n=0;return r(n,e)},preventDefault:!1}],n)}unregisterShortcuts(){super.unregisterShortcuts();const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(l)}}var h=n("81ea"),d=n("7b9c"),m=n("29b0"),f=n("f938"),p=n("63d8"),g=n("dd49"),y=n("8828");function w(e,t,n){b(e,t),t.set(e,n)}function b(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _(e,t,n){return t=v(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){var t=S(e,"string");return"symbol"==typeof t?t:t+""}function S(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e,t){return e.get(C(e,t))}function C(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const T="autocomplete";var M=new WeakMap;class R extends u{constructor(){super(...arguments),_(this,"query",null),_(this,"strippedChoices",[]),_(this,"rawChoices",[]),w(this,M,this.hot.guid.slice(0,9)),_(this,"sortByRelevance",(function(e,t,n){const r=[],i=[],s=e.length;let o,a,l,c,u=t.length;if(0===s){for(l=0;l<u;l++)i.push(l);return i}for(l=0;l<u;l++){if(a=Object(m["stripTags"])(Object(d["stringify"])(t[l])),n)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(o=a.length-c-s,r.push({baseIndex:l,index:c,charsLeft:o,value:a}))}for(r.sort((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0}),l=0,u=r.length;l<u;l++)i.push(r[l].baseIndex);return i}))}static get EDITOR_TYPE(){return T}getValue(){const e=this.rawChoices.find(e=>{const t=this.stripValueIfNeeded(e);return t===this.TEXTAREA.value});return Object(d["isDefined"])(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),Object(i["addClass"])(this.htContainer,"autocompleteEditor"),Object(i["addClass"])(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["L"])(),Object(y["h"])(),Object(y["m"])("listbox"),Object(y["b"])()])}prepare(e,t,n,r,s,o){super.prepare(e,t,n,r,s,o),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["k"])("false"),Object(y["i"])(`${E(M,this)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,r=null===n||void 0===n?void 0:n.length,{row:s,col:o}=this;this.showEditableElement(),this.focus();let a=Object(i["getScrollbarWidth"])();0===a&&Object(p["isMacOS"])()&&(a+=15),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.updateSettings({colWidths:e?[Object(i["outerWidth"])(this.TEXTAREA)-2]:void 0,width:e?Object(i["outerWidth"])(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,o,a,l,c,u)=>{Object(g["a"])(e,s,o,a,l,c,u);const{filteringCaseSensitive:h,allowHtml:m,locale:f}=this.cellProperties,p=this.query;let w,b,_=Object(d["stringify"])(c);_&&!m&&(w=!0===h?_.indexOf(p):_.toLocaleLowerCase(f).indexOf(p.toLocaleLowerCase(f)),-1!==w&&(b=_.substr(w,p.length),_=_.replace(b,`<strong>${b}</strong>`))),t&&Object(i["setAttribute"])(s,[Object(y["v"])(),...n?[Object(y["I"])(r)]:[],...n?[Object(y["w"])(n.indexOf(c)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${a}`]]),s.innerHTML=_},afterSelectionEnd:(e,n)=>{if(t){const t=this.htEditor.getCell(e,n,!0);Object(i["setAttribute"])(t,[Object(y["H"])()]),Object(i["setAttribute"])(this.TEXTAREA,...Object(y["a"])(t.id))}}}),t&&(Object(i["setAttribute"])(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...Object(y["x"])()),Object(i["setAttribute"])(this.htEditor.rootElement,[Object(y["q"])(),Object(y["r"])("polite"),Object(y["z"])("text"),["id",`${E(M,this)}-listbox-${s}-${o}`]]),Object(i["setAttribute"])(this.TEXTAREA,...Object(y["k"])("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["k"])("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"===typeof t?t.call(this.cellProperties,e,e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=Object(i["getCaretPosition"])(this.TEXTAREA),n=Object(i["getSelectionEndPosition"])(this.TEXTAREA),r=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let o=null,a=null,l=e;r&&(o=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));const c=Array.isArray(o)?o.length:0;if(!1===s)c&&(a=o[0]);else{const e=[];for(let t=0,n=l.length;t<n;t++){if(r&&c<=t)break;c?e.push(l[o[t]]):e.push(l[t])}a=0,l=e}this.strippedChoices=l,this.htEditor.loadData(Object(h["pivot"])([l])),0===l.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),Object(i["setCaretPosition"])(this.TEXTAREA,t,t===n?void 0:n)}flipDropdownIfNeeded(){const e=Object(i["getTrimmingContainer"])(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,n=this.cellProperties.preventOverflow;if(t||!t&&(n||"horizontal"===n))return!1;const r=Object(i["offset"])(this.TEXTAREA),s=Object(i["outerHeight"])(this.TEXTAREA),o=this.getDropdownHeight(),a=e.scrollTop,l=Object(i["outerHeight"])(this.hot.view._wt.wtTable.THEAD),c=Object(i["offset"])(e),u=r.top-c.top-l+a,h=e.scrollHeight-u-l-s,d=o>h&&u>h;return d?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(d?u:h,o),d}limitDropdownIfNeeded(e,t){if(t>e){let n=0,r=0,i=0,s=null;do{i=this.htEditor.getRowHeight(r)||this.htEditor.view._wt.getSetting("defaultRowHeight"),n+=i,r+=1}while(n<e);s=n-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-s+"px"),this.setDropdownHeight(n-i)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+Object(i["getScrollbarWidth"])(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"===typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,n=Object(h["arrayMap"])(e,e=>Object(d["stringify"])(e)),r=Object(h["arrayMap"])(n,e=>t?e:Object(m["stripTags"])(e));return r}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),n={row:t?t.from.row:-1};let r=!1;return e===f["KEY_CODES"].ARROW_DOWN&&n.row>0&&n.row<this.htEditor.countRows()-1&&(r=!0),e===f["KEY_CODES"].ARROW_UP&&n.row>-1&&(r=!0),r}onBeforeKeyDown(e){if(Object(f["isPrintableChar"])(e.keyCode)||e.keyCode===f["KEY_CODES"].BACKSPACE||e.keyCode===f["KEY_CODES"].DELETE||e.keyCode===f["KEY_CODES"].INSERT){let t=10;if(e.keyCode===f["KEY_CODES"].C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t)}}}var O=n("13e1");const N="checkbox";class A extends O["a"]{static get EDITOR_TYPE(){return N}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');Object(i["hasClass"])(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var L=n("c1df");
- /*!
- * Pikaday
- *
- * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
- */const I=()=>window,x=()=>window.document,k=(e,t)=>window.setTimeout(e,t),D=function(e,t,n,r){e.addEventListener(t,n,!!r)},H=function(e,t,n,r){e.removeEventListener(t,n,!!r)},P=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},j=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},F=function(e,t){j(e,t)||(e.className=""===e.className?t:e.className+" "+t)},Y=function(e,t){e.className=P((" "+e.className+" ").replace(" "+t+" "," "))},U=function(e){return/Array/.test(Object.prototype.toString.call(e))},V=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},B=function(e){let t=e.getDay();return 0===t||6===t},W=function(e){return e%4===0&&e%100!==0||e%400===0},G=function(e,t){return[31,W(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},z=function(e){V(e)&&e.setHours(0,0,0,0)},K=function(e,t){return e.getTime()===t.getTime()},X=function(e,t,n){let r,i;for(r in t)i=void 0!==e[r],i&&"object"===typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?V(t[r])?n&&(e[r]=new Date(t[r].getTime())):U(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=X({},t[r],n):!n&&i||(e[r]=t[r]);return e},$=function(e,t,n){let r=x().createEvent("HTMLEvents");r.initEvent(t,!0,!1),r=X(r,n),e.dispatchEvent(r)},q=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},J={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},Q=function(e,t,n){t+=e.firstDay;while(t>=7)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},Z=function(e){let t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},ee=function(e,t){e.setHours(0,0,0,0);let n=e.getDate(),r=e.getDay(),i=t,s=i-1,o=7,a=function(e){return(e+o-1)%o};e.setDate(n+s-a(r));let l=new Date(e.getFullYear(),0,i),c=864e5,u=(e.getTime()-l.getTime())/c,h=1+Math.round((u-s+a(l.getDay()))/o);return h},te=function(e,t,n,r,i){let s=new Date(r,n,t),o=e.hasMoment?e.moment(s).isoWeek():ee(s,i);return'<td class="pika-week">'+o+"</td>"},ne=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},re=function(e){return"<tbody>"+e.join("")+"</tbody>"},ie=function(e){let t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+Q(e,t)+'">'+Q(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},se=function(e,t,n,r,i,s){let o,a,l,c,u,h=e._o,d=n===h.minYear,m=n===h.maxYear,f='<div id="'+s+'" class="pika-title" role="heading" aria-live="polite">',p=!0,g=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===i?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(d&&o<h.minMonth||m&&o>h.maxMonth?' disabled="disabled"':"")+">"+h.i18n.months[o]+"</option>");for(c='<div class="pika-label">'+h.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",U(h.yearRange)?(o=h.yearRange[0],a=h.yearRange[1]+1):(o=n-h.yearRange,a=1+n+h.yearRange),l=[];o<a&&o<=h.maxYear;o++)o>=h.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return u='<div class="pika-label">'+n+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?f+=u+c:f+=c+u,d&&(0===r||h.minMonth>=r)&&(p=!1),m&&(11===r||h.maxMonth<=r)&&(g=!1),0===t&&(f+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(g?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),f+"</div>"},oe=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+ie(e)+re(t)+"</table>"};function ae(e){let t=this,n=t.config(e);t._onMouseDown=function(e){if(!t._v)return;e=e||I().event;let r=e.target||e.srcElement;if(r)if(j(r,"is-disabled")||(!j(r,"pika-button")||j(r,"is-empty")||j(r.parentNode,"is-disabled")?j(r,"pika-prev")?t.prevMonth():j(r,"pika-next")&&t.nextMonth():(t.setDate(new Date(r.getAttribute("data-pika-year"),r.getAttribute("data-pika-month"),r.getAttribute("data-pika-day"))),n.bound&&k((function(){t.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()}),100))),j(r,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}},t._onChange=function(e){e=e||I().event;let n=e.target||e.srcElement;n&&(j(n,"pika-select-month")?t.gotoMonth(n.value):j(n,"pika-select-year")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||I().event,t.isVisible())switch(e.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:t.adjustDate("subtract",1);break;case 38:t.adjustDate("subtract",7);break;case 39:t.adjustDate("add",1);break;case 40:t.adjustDate("add",7);break;case 8:case 46:t.setDate(null);break}},t._parseFieldValue=function(){if(n.parse)return n.parse(n.field.value,n.format);if(this.hasMoment){let e=this.moment(n.field.value,n.format,n.formatStrict);return e&&e.isValid()?e.toDate():null}return new Date(Date.parse(n.field.value))},t._onInputChange=function(e){let n;e.firedBy!==t&&(n=t._parseFieldValue(),V(n)&&t.setDate(n),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=x().activeElement;do{if(j(e,"pika-single"))return}while(e=e.parentNode);t._c||(t._b=k((function(){t.hide()}),50)),t._c=!1},t._onClick=function(e){e=e||I().event;let r=e.target||e.srcElement,i=r;if(r){!hasEventListeners&&j(r,"pika-select")&&(r.onchange||(r.setAttribute("onchange","return;"),D(r,"change",t._onChange)));do{if(j(i,"pika-single")||i===n.trigger)return}while(i=i.parentNode);t._v&&r!==n.trigger&&i!==n.trigger&&t.hide()}},t.el=x().createElement("div"),t.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),D(t.el,"mousedown",t._onMouseDown,!0),D(t.el,"touchend",t._onMouseDown,!0),D(t.el,"change",t._onChange),n.keyboardInput&&D(x(),"keydown",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?x().body.appendChild(t.el):n.field.parentNode.insertBefore(t.el,n.field.nextSibling),D(n.field,"change",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));let r=n.defaultDate;V(r)?n.setDefaultDate?t.setDate(r,!0):t.gotoDate(r):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=" is-bound",D(n.trigger,"click",t._onInputClick),D(n.trigger,"focus",t._onInputFocus),D(n.trigger,"blur",t._onInputBlur)):this.show()}function le(e,t,n){return t=ce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e){var t=ue(e,"string");return"symbol"==typeof t?t:t+""}function ue(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}ae.prototype={config:function(e){this._o||(this._o=X({},J,!0));let t=X(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"===typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"===typeof t.disableDayFn?t.disableDayFn:null;let n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,V(t.minDate)||(t.minDate=!1),V(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),U(t.yearRange)){let e=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||e,t.yearRange[1]=parseInt(t.yearRange[1],10)||e}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||J.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return e=e||this._o.format,V(this._d)?this._o.toString?this._o.toString(this._d,e):this.hasMoment?this.moment(this._d).format(e):this._d.toDateString():""},getMoment:function(){return this.hasMoment?this.moment(this._d):null},setMoment:function(e,t){this.hasMoment&&this.moment.isMoment(e)&&this.setDate(e.toDate(),t)},useMoment:function(e){this.hasMoment=!0,this.moment=e},getDate:function(){return V(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",$(this._o.field,"change",{firedBy:this})),this.draw();if("string"===typeof e&&(e=new Date(Date.parse(e))),!V(e))return;let n=this._o.minDate,r=this._o.maxDate;V(n)&&e<n?e=n:V(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),z(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),$(this._o.field,"change",{firedBy:this})),t||"function"!==typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())},clear:function(){this.setDate(null)},gotoDate:function(e){let t=!0;if(V(e)){if(this.calendars){let n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=i<n.getTime()||r.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){let n,r=this.getDate()||new Date,i=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+i):"subtract"===e&&(n=new Date(r.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=q(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=q({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(z(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=J.minDate,this._o.minYear=J.minYear,this._o.minMonth=J.minMonth,this._o.startRange=J.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(z(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=J.maxDate,this._o.maxYear=J.maxYear,this._o.maxMonth=J.maxMonth,this._o.endRange=J.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(!this._v&&!e)return;let t,n=this._o,r=n.minYear,i=n.maxYear,s=n.minMonth,o=n.maxMonth,a="";this._y<=r&&(this._y=r,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=i&&(this._y=i,!isNaN(o)&&this._m>o&&(this._m=o));for(let l=0;l<n.numberOfMonths;l++)t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),a+='<div class="pika-lendar">'+se(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"</div>";this.el.innerHTML=a,n.bound&&"hidden"!==n.field.type&&k((function(){n.trigger.focus()}),1),"function"===typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)},adjustPosition:function(){let e,t,n,r,i,s,o,a,l,c,u;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,n=this.el.offsetHeight,r=I().innerWidth||x().documentElement.clientWidth,i=I().innerHeight||x().documentElement.clientHeight,s=x().body.scrollTop||x().documentElement.scrollTop,c=!0,u=!0,l=e.getBoundingClientRect(),o=l.left+I().pageXOffset,a=l.bottom+I().pageYOffset,(this._o.reposition&&o+t>r||this._o.position.indexOf("right")>-1&&o-t+e.offsetWidth>0)&&(o=o-t+e.offsetWidth,c=!1),(this._o.reposition&&a+n>i+s||this._o.position.indexOf("top")>-1&&a-n-e.offsetHeight>0)&&(a=a-n-e.offsetHeight,u=!1),o<0&&(o=0),a<0&&(a=0),this.el.style.left=o+"px",this.el.style.top=a+"px",F(this.el,c?"left-aligned":"right-aligned"),F(this.el,u?"bottom-aligned":"top-aligned"),Y(this.el,c?"right-aligned":"left-aligned"),Y(this.el,u?"top-aligned":"bottom-aligned"))},render:function(e,t,n){let r=this._o,i=new Date,s=G(e,t),o=new Date(e,t,1).getDay(),a=[],l=[];z(i),r.firstDay>0&&(o-=r.firstDay,o<0&&(o+=7));let c=0===t?11:t-1,u=11===t?0:t+1,h=0===t?e-1:e,d=11===t?e+1:e,m=G(h,c),f=s+o,p=f;while(p>7)p-=7;f+=7-p;let g=!1;for(let y=0,w=0;y<f;y++){let n=new Date(e,t,y-o+1),f=!!V(this._d)&&K(n,this._d),p=K(n,i),b=-1!==r.events.indexOf(n.toDateString()),_=y<o||y>=s+o,v=y-o+1,S=t,E=e,C=r.startRange&&K(r.startRange,n),T=r.endRange&&K(r.endRange,n),M=r.startRange&&r.endRange&&r.startRange<n&&n<r.endRange,R=r.minDate&&n<r.minDate||r.maxDate&&n>r.maxDate||r.disableWeekends&&B(n)||r.disableDayFn&&r.disableDayFn(n);_&&(y<o?(v=m+v,S=c,E=h):(v-=s,S=u,E=d));let O={day:v,month:S,year:E,hasEvent:b,isSelected:f,isToday:p,isDisabled:R,isEmpty:_,isStartRange:C,isEndRange:T,isInRange:M,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&f&&(g=!0),l.push(Z(O)),7===++w&&(r.showWeekNumber&&l.unshift(te(this,y-o,t,e,r.firstWeekOfYearMinDays)),a.push(ne(l,r.isRTL,r.pickWholeWeek,g)),l=[],w=0,g=!1)}return oe(r,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),Y(this.el,"is-hidden"),this._o.bound&&(D(x(),"click",this._onClick),this.adjustPosition()),"function"===typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){let e=this._v;!1!==e&&(this._o.bound&&H(x(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),F(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"===typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){let e=this._o;this.hide(),H(this.el,"mousedown",this._onMouseDown,!0),H(this.el,"touchend",this._onMouseDown,!0),H(this.el,"change",this._onChange),e.keyboardInput&&H(x(),"keydown",this._onKeyChange),e.field&&(H(e.field,"change",this._onInputChange),e.bound&&(H(e.trigger,"click",this._onInputClick),H(e.trigger,"focus",this._onInputFocus),H(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};const he="date",de="dateEditor";class me extends r["a"]{constructor(){super(...arguments),le(this,"defaultDateFormat","DD/MM/YYYY"),le(this,"parentDestroyed",!1),le(this,"$datePicker",null)}static get EDITOR_TYPE(){return he}init(){if("function"!==typeof L)throw new Error("You need to include moment.js to your project.");if("function"!==typeof ae)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",()=>{this.parentDestroyed=!0,this.destroyElements()})}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),Object(i["addClass"])(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",e=>{Object(i["hasClass"])(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager(),n=t.getContext("editor");this.showDatepicker(e),super.open(),n.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:de})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{this.hot._refreshBorders()});const t=this.hot.getShortcutManager(),n=t.getContext("editor");n.removeShortcutsByGroup(de),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),r=!!e&&Object(f["isFunctionKey"])(e.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new ae(this.getDatePickerConfig()),"function"===typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(L),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,L(i,t,!0).isValid()&&this.$datePicker.setMoment(L(i,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),r||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,L(i,t,!0).isValid()&&this.$datePicker.setMoment(L(i,t),!0),r||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&Object(o["deepExtend"])(t,this.cellProperties.datePickerConfig);const n=t.onSelect,r=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=L(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),n&&n()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),r&&r()},t}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==O["b"].EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:n,columnIndexMapper:r}=this.hot,{wtOverlays:s}=this.hot.view._wt,{wtTable:o}=null!==(t=s.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,a=n.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleRow()),l=n.getVisualFromRenderableIndex(o.getLastPartiallyVisibleRow()),c=r.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleColumn()),u=r.getVisualFromRenderableIndex(o.getLastPartiallyVisibleColumn());if(this.row>=a&&this.row<=l&&this.col>=c&&this.col<=u){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=this.hot.rootWindow.pageYOffset+e.top+Object(i["outerHeight"])(this.TD)+"px";let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-Object(i["outerWidth"])(this.datePicker):t+=e.left,this.datePickerStyle.left=t+"px"}else this.hideDatepicker()}}var fe=n("1004");const pe="dropdown";class ge extends R{static get EDITOR_TYPE(){return pe}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}fe["a"].getSingleton().add("beforeValidate",(function(e,t,n){const r=this.getCellMeta(t,this.propToCol(n));r.editor===ge&&void 0===r.strict&&(r.filter=!1,r.strict=!0)}));const ye="numeric";class we extends r["a"]{static get EDITOR_TYPE(){return ye}}const be="password";class _e extends r["a"]{static get EDITOR_TYPE(){return be}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["n"])()]),Object(i["empty"])(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const ve="ht_editor_visible",Se="selectEditor",Ee="select";class Ce extends O["a"]{static get EDITOR_TYPE(){return Ee}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",Object(i["addClass"])(this.select,"htSelectEditor"),this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";const e=this.hot.getShortcutManager();e.setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",Object(i["hasClass"])(this.select,ve)&&Object(i["removeClass"])(this.select,ve),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>this.refreshDimensions()),this.addHook("afterRowResize",()=>this.refreshDimensions())}prepare(e,t,n,r,s,a){super.prepare(e,t,n,r,s,a);const l=this.cellProperties.selectOptions;let c;c="function"===typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),Object(i["empty"])(this.select),Object(o["objectEach"])(c,(e,t)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=t,Object(i["fastInnerHTML"])(n,e),this.select.appendChild(n)})}prepareOptions(e){let t={};if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)t[e[n]]=e[n];else"object"===typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==O["b"].EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:n,height:r}=this.getEditedCellRect(),s=this.select.style;s.height=r+"px",s.width=n+"px",s.top=e+"px",s[this.hot.isRtl()?"right":"left"]=t+"px",s.margin="0px",Object(i["addClass"])(this.select,ve)}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),n=e.getContext("grid"),r={group:Se};t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:n,callback:()=>{}}],r),!0===this.isInFullEditMode()&&t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],r)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(Se)}}const Te="time";class Me extends r["a"]{static get EDITOR_TYPE(){return Te}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.TEXTAREA.dir="ltr"}}var Re=n("491c");function Oe(){Object(Re["e"])(O["a"]),Object(Re["e"])(R),Object(Re["e"])(A),Object(Re["e"])(me),Object(Re["e"])(ge),Object(Re["e"])(u),Object(Re["e"])(we),Object(Re["e"])(_e),Object(Re["e"])(Ce),Object(Re["e"])(r["a"]),Object(Re["e"])(Me)}var Ne=n("a357c");const Ae="html";function Le(e,t,n,r,s,o,a){Ne["a"].apply(this,[e,t,n,r,s,o,a]),Object(i["fastInnerHTML"])(t,null===o||void 0===o?"":o,!1)}Le.RENDERER_TYPE=Ae;var Ie=n("87d6");const xe="autocomplete";function ke(e,t,n,r,s,o,a){const{rootDocument:l}=e,c=a.allowHtml?Le:g["a"],u=l.createElement("DIV"),h=e.getSettings().ariaTags;if(u.className="htAutocompleteArrow",h&&u.setAttribute(...Object(y["n"])()),u.appendChild(l.createTextNode(String.fromCharCode(9660))),c.apply(this,[e,t,n,r,s,o,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(u,t.firstChild),Object(i["addClass"])(t,"htAutocomplete"),!e.acArrowListener){const s=new Ie["a"](e);e.acArrowListener=function(s){Object(i["hasClass"])(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(n,r),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",()=>{s.destroy()})}}ke.RENDERER_TYPE=xe;const De="dropdown";function He(e,t,n,r,i,s,o){ke.apply(this,[e,t,n,r,i,s,o])}He.RENDERER_TYPE=De;var Pe=n("c4fa"),je=n("0283");const Fe=new WeakMap,Ye=new WeakMap,Ue="htBadValue",Ve="data-row",Be="data-col",We="checkboxRenderer",Ge="checkbox";function ze(e,t,n,r,s,o,a){const{rootDocument:l}=e,c=e.getSettings().ariaTags;Ne["a"].apply(this,[e,t,n,r,s,o,a]),Ke(e);let u=Xe(l);const h=a.label;let m=!1;if("undefined"===typeof a.checkedTemplate&&(a.checkedTemplate=!0),"undefined"===typeof a.uncheckedTemplate&&(a.uncheckedTemplate=!1),Object(i["empty"])(t),o===a.checkedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(a.locale)===Object(d["stringify"])(a.checkedTemplate).toLocaleLowerCase(a.locale)?u.checked=!0:o===a.uncheckedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(a.locale)===Object(d["stringify"])(a.uncheckedTemplate).toLocaleLowerCase(a.locale)?u.checked=!1:Object(d["isEmpty"])(o)?Object(i["addClass"])(u,"noValue"):(u.style.display="none",Object(i["addClass"])(u,Ue),m=!0),Object(i["setAttribute"])(u,[[Ve,n],[Be,r]]),c&&Object(i["setAttribute"])(u,[Object(y["p"])(u.checked?e.getTranslatedPhrase(je["CHECKBOX_CHECKED"]):e.getTranslatedPhrase(je["CHECKBOX_UNCHECKED"])),Object(y["d"])(u.checked),Object(y["c"])()]),!m&&h){let i="";if(h.value)i="function"===typeof h.value?h.value.call(this,n,r,s,o):h.value;else if(h.property){const t=e.getDataAtRowProp(n,h.property);i=null!==t?t:""}const a=$e(l,i,!0!==h.separated);"before"===h.position?h.separated?(t.appendChild(a),t.appendChild(u)):(a.appendChild(u),u=a):h.position&&"after"!==h.position||(h.separated?(t.appendChild(u),t.appendChild(a)):(a.insertBefore(u,a.firstChild),u=a))}function f(){const t=e.getShortcutManager(),n=t.getContext("grid"),r={group:We,relativeToGroup:Pe["a"],position:"before"};n.addShortcuts([{keys:[["space"]],callback:()=>(p(),!g())},{keys:[["enter"]],callback:()=>(p(),!g()),runOnlyIf:()=>{var t;return e.getSettings().enterBeginsEditing&&(null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())}},{keys:[["delete"],["backspace"]],callback:()=>(p(!0),!g())}],r)}function p(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),r=[];let i=[],s=0;if(n){for(let o=0;o<n.length;o++){const{row:a,col:l}=n[o].getTopStartCorner(),{row:c,col:u}=n[o].getBottomEndCorner();for(let n=a;n<=c;n+=1)for(let r=l;r<=u;r+=1){const o=e.getCellMeta(n,r),a={checkedTemplate:o.checkedTemplate,uncheckedTemplate:o.uncheckedTemplate};if("checkbox"!==o.type)return;if(!0===o.readOnly)continue;"undefined"===typeof o.checkedTemplate&&(o.checkedTemplate=!0),"undefined"===typeof o.uncheckedTemplate&&(o.uncheckedTemplate=!1);const l=e.getDataAtCell(n,r);!1===t?[o.checkedTemplate,o.checkedTemplate.toString()].includes(l)?i.push([n,r,o.uncheckedTemplate,a]):[o.uncheckedTemplate,o.uncheckedTemplate.toString(),null,void 0].includes(l)&&i.push([n,r,o.checkedTemplate,a]):i.push([n,r,o.uncheckedTemplate,a]),s+=1}r.push(s),s=0}i=i.every(e=>{let[,,t]=e;return t===i[0][2]})?i.map(e=>{let[t,n,r]=e;return[t,n,r]}):i.map(e=>{let[t,n,,r]=e;return[t,n,r.checkedTemplate]}),i.length>0&&r.forEach(t=>{const n=i.splice(0,t);e.setDataAtCell(n)})}}function g(){const t=e.getSelectedRange();if(t){for(let n=0;n<t.length;n++){const r=t[n].getTopStartCorner(),i=t[n].getBottomEndCorner();for(let t=r.row;t<=i.row;t++)for(let n=r.col;n<=i.col;n++){const r=e.getCellMeta(t,n);if("checkbox"!==r.type)return!1;const i=e.getCell(t,n);if(null===i||void 0===i)return!0;{const e=i.querySelectorAll("input[type=checkbox]");if(e.length>0&&!r.readOnly)return!0}}}return!1}}(!h||h&&!h.separated)&&t.appendChild(u),m&&t.appendChild(l.createTextNode("#bad-value#")),Fe.has(e)||(Fe.set(e,!0),f())}function Ke(e){let t=Ye.get(e);if(!t){const{rootElement:n}=e;t=new Ie["a"](e),t.addEventListener(n,"click",t=>Je(t,e)),t.addEventListener(n,"mouseup",t=>qe(t,e)),t.addEventListener(n,"change",t=>Qe(t,e)),Ye.set(e,t)}return t}function Xe(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}function $e(e,t,n){const r=e.createElement("label");return r.className="htCheckboxRendererLabel "+(n?"fullWidth":""),r.appendChild(e.createTextNode(t)),r.cloneNode(!0)}function qe(e,t){const{target:n}=e;Ze(n)&&n.hasAttribute(Ve)&&n.hasAttribute(Be)&&setTimeout(t.listen,10)}function Je(e,t){const{target:n}=e;if(!Ze(n))return;if(!n.hasAttribute(Ve)||!n.hasAttribute(Be))return;const r=parseInt(n.getAttribute(Ve),10),i=parseInt(n.getAttribute(Be),10),s=t.getCellMeta(r,i);s.readOnly&&e.preventDefault()}function Qe(e,t){const{target:n}=e;if(!Ze(n))return;if(!n.hasAttribute(Ve)||!n.hasAttribute(Be))return;const r=parseInt(n.getAttribute(Ve),10),i=parseInt(n.getAttribute(Be),10),s=t.getCellMeta(r,i);if(!s.readOnly){let n=null;n=e.target.checked?void 0===s.uncheckedTemplate||s.checkedTemplate:void 0!==s.uncheckedTemplate&&s.uncheckedTemplate,t.setDataAtCell(r,i,n)}}function Ze(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}fe["a"].getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,n){const{label:r,type:i,row:s,column:o,prop:a}=t;if(i===Ge){if(r){const{value:t,property:i}=r;let l=n;if(t)l="function"===typeof t?t(s,o,a,n):t;else if(i){const e=this.getDataAtRowProp(s,i);l=null!==e?e:n}e=l}return e}})),ze.RENDERER_TYPE=Ge;const et="handsontable";function tt(e,t,n,r,i,s,o){ke.apply(this,[e,t,n,r,i,s,o])}tt.RENDERER_TYPE=et;var nt=n("8722d"),rt=n("ffec");const it="numeric";function st(e,t){if(Object(rt["isNumeric"])(e)){const n=t.numericFormat,r=n&&n.culture||"-",i=n&&n.pattern;if("undefined"!==typeof r&&!nt.languages()[r]){const e=r.replace("-",""),t=nt.allLanguages?nt.allLanguages[r]:nt[e];t&&nt.registerLanguage(t)}nt.setLanguage(r),e=nt(e).format(i||"0")}return e}function ot(e,t,n,r,i,s,o){let a=s;if(Object(rt["isNumeric"])(a)){const e=o.className||"",n=e.length?e.split(" "):[];a=st(a,o),n.indexOf("htLeft")<0&&n.indexOf("htCenter")<0&&n.indexOf("htRight")<0&&n.indexOf("htJustify")<0&&n.push("htRight"),n.indexOf("htNumeric")<0&&n.push("htNumeric"),o.className=n.join(" "),t.dir="ltr"}Object(g["a"])(e,t,n,r,i,a,o)}ot.RENDERER_TYPE=it;const at="password";function lt(e,t,n,r,s,o,a){g["a"].apply(this,[e,t,n,r,s,o,a]);const l=a.hashLength||t.innerHTML.length,c=a.hashSymbol||"*";let u="";Object(rt["rangeEach"])(l-1,()=>{u+=c}),Object(i["fastInnerHTML"])(t,u)}lt.RENDERER_TYPE=at;const ct="select";function ut(e,t,n,r,i,s,o){g["a"].apply(this,[e,t,n,r,i,s,o])}ut.RENDERER_TYPE=ct;const ht="time";function dt(e,t,n,r,i,s,o){g["a"].apply(this,[e,t,n,r,i,s,o]),t.dir="ltr"}dt.RENDERER_TYPE=ht;var mt=n("3d76");function ft(){Object(mt["d"])(ke),Object(mt["d"])(Ne["a"]),Object(mt["d"])(ze),Object(mt["d"])(He),Object(mt["d"])(tt),Object(mt["d"])(Le),Object(mt["d"])(ot),Object(mt["d"])(lt),Object(mt["d"])(ut),Object(mt["d"])(g["a"]),Object(mt["d"])(dt)}const pt="autocomplete";function gt(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"===typeof this.source?this.source(n,yt(n,t)):yt(n,t)(this.source):t(!0)}function yt(e,t){const n=e;return function(e){let r=!1;for(let t=0,i=e.length;t<i;t++)if(n===e[t]){r=!0;break}t(r)}}gt.VALIDATOR_TYPE=pt;var wt=n("3eb5");const bt="date";function _t(e,t){const n=Object(Re["b"])(he,this.instance);let r=e,i=!0;null!==r&&void 0!==r||(r="");let s=L(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),o=L(new Date(r)).isValid()||s;if(this.allowEmpty&&""===r&&(o=!0,s=!0),o||(i=!1),!o&&s&&(i=!0),o&&!s)if(!0===this.correctFormat){const e=vt(r,this.dateFormat),t=this.instance.toVisualRow(this.row),n=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,n,e,"dateValidator"),i=!0}else i=!1;t(i)}function vt(e,t){const n=L(Object(wt["getNormalizedDate"])(e)),r=L(e,t),i=e.search(/[A-z]/g)>-1;let s;return s=n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||i?n:r,s.format(t)}_t.VALIDATOR_TYPE=bt;const St="dropdown";function Et(e,t){gt.apply(this,[e,t])}Et.VALIDATOR_TYPE=St;const Ct="numeric";function Tt(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&Object(rt["isNumeric"])(e))}Tt.VALIDATOR_TYPE=Ct;const Mt=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],Rt="time";function Ot(e,t){const n=this.timeFormat||"h:mm:ss a";let r=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const s=/^\d{1,2}$/.test(i);s&&(i+=":00");const o=L(i,Mt,!0).isValid()?L(i):L(i,n);let a=o.isValid(),l=L(i,n,!0).isValid()&&!s;if(this.allowEmpty&&""===i&&(a=!0,l=!0),a||(r=!1),!a&&l&&(r=!0),a&&!l)if(!0===this.correctFormat){const e=o.format(n),t=this.instance.toVisualRow(this.row),i=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,i,e,"timeValidator"),r=!0}else r=!1;t(r)}Ot.VALIDATOR_TYPE=Rt;var Nt=n("169f");function At(){Object(Nt["d"])(gt),Object(Nt["d"])(Et),Object(Nt["d"])(_t),Object(Nt["d"])(Tt),Object(Nt["d"])(Ot)}const Lt="autocomplete",It={CELL_TYPE:Lt,editor:R,renderer:ke,validator:gt},xt="checkbox",kt={CELL_TYPE:xt,editor:A,renderer:ze},Dt="date";function Ht(e,t,n,r,i,s,o){ke.apply(this,[e,t,n,r,i,s,o])}Ht.RENDERER_TYPE=Dt;const Pt="date",jt={CELL_TYPE:Pt,editor:me,renderer:Ht,validator:_t},Ft="dropdown",Yt={CELL_TYPE:Ft,editor:ge,renderer:He,validator:Et},Ut="handsontable",Vt={CELL_TYPE:Ut,editor:u,renderer:tt},Bt="numeric",Wt={CELL_TYPE:Bt,editor:we,renderer:ot,validator:Tt,dataType:"number"},Gt="password",zt={CELL_TYPE:Gt,editor:_e,renderer:lt,copyable:!1},Kt="select",Xt={CELL_TYPE:Kt,editor:Ce,renderer:ut};var $t=n("ef07");const qt="time",Jt={CELL_TYPE:qt,editor:Me,renderer:dt,validator:Ot};var Qt=n("76ab");function Zt(){Object(Qt["d"])(It),Object(Qt["d"])(kt),Object(Qt["d"])(jt),Object(Qt["d"])(Yt),Object(Qt["d"])(Vt),Object(Qt["d"])(Wt),Object(Qt["d"])(zt),Object(Qt["d"])(Xt),Object(Qt["d"])($t["a"]),Object(Qt["d"])(Jt)}var en=n("d3c5"),tn=n("7dd09"),nn=n("220a");function rn(e,t,n){return t=sn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(e){var t=on(e,"string");return"symbol"==typeof t?t:t+""}function on(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class an{static get SAMPLE_COUNT(){return 3}constructor(e){rn(this,"samples",null),rn(this,"dataFactory",null),rn(this,"customSampleCount",null),rn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:an.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,n){const r=new Map,{from:i,to:s}="number"===typeof n?{from:n,to:n}:n;return Object(rt["rangeEach"])(i,s,n=>{const i=this.generateSample(e,t,n);r.set(n,i)}),r}generateSample(e,t,n){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const r=new Map,i="row"===e?"col":"row",s=[];return Object(rt["rangeEach"])(t.from,t.to,t=>{const a="row"===e?this.dataFactory(n,t):this.dataFactory(t,n);if(!1===a)return;const{value:l,bundleSeed:c}=a,u="string"===typeof c&&c.length>0;let h;h=u?c:Object(o["isObject"])(l)?""+Object.keys(l).length:Array.isArray(l)?""+l.length:""+Object(d["stringify"])(l).length,r.has(h)||r.set(h,{needed:this.getSampleCount(),strings:[]});const m=r.get(h);if(m.needed){const e=s.indexOf(l)>-1;(!e||this.allowDuplicates||u)&&(m.strings.push({value:l,[i]:t}),s.push(l),m.needed-=1)}}),r}}var ln=an,cn=n("861dd"),un=n("9f10");function hn(e,t){mn(e,t),t.add(e)}function dn(e,t,n){mn(e,t),t.set(e,n)}function mn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fn(e,t,n){return t=pn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e){var t=gn(e,"string");return"symbol"==typeof t?t:t+""}function gn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function yn(e,t,n){return e.set(bn(e,t),n),n}function wn(e,t){return e.get(bn(e,t))}function bn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("modifyAutoColumnSizeSeed");const _n="autoColumnSize",vn=10,Sn="autoColumnSize";var En=new WeakMap,Cn=new WeakSet;class Tn extends en["a"]{static get PLUGIN_KEY(){return _n}static get PLUGIN_PRIORITY(){return vn}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){super(e),hn(this,Cn),fn(this,"ghostTable",new nn["a"](this.hot)),fn(this,"samplesGenerator",new ln((e,t)=>{const n=this.hot.toPhysicalRow(e),r=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(r))return!1;const i=this.hot.getCellMeta(e,t);let s="";i.spanned||(s=this.hot.getDataAtCell(e,t));let o="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(o=this.hot.runHooks("modifyAutoColumnSizeSeed",o,i,s)),{value:s,bundleSeed:o}})),fn(this,"firstCalculation",!0),fn(this,"inProgress",!1),fn(this,"measuredColumns",0),fn(this,"columnWidthsMap",new un["a"]),dn(this,En,[]),this.hot.columnIndexMapper.registerMap(Sn,this.columnWidthsMap),this.addHook("beforeColumnResize",(e,t,n)=>bn(Cn,this,Nn).call(this,e,t,n))}isEnabled(){return!1!==this.hot.getSettings()[_n]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[_n];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bn(Cn,e,Rn).call(e,...n)})),this.addHook("beforeChangeRender",e=>bn(Cn,this,On).call(this,e)),this.addHook("afterFormulasValuesUpdate",e=>bn(Cn,this,Ln).call(this,e)),this.addHook("beforeViewRender",e=>bn(Cn,this,Mn).call(this,e)),this.addHook("modifyColWidth",(e,t)=>this.getColumnWidth(t,e)),this.addHook("afterInit",()=>bn(Cn,this,An).call(this)),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",(e,t,n)=>bn(Cn,this,Nn).call(this,e,t,n))}calculateVisibleColumnsWidth(){const e=this.hot.countRows();if(!e)return;const t=this.hot.renderCall,n=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();-1!==n&&-1!==r&&this.calculateColumnsWidth({from:n,to:r},void 0,t)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="number"===typeof e?{from:e,to:e}:e,i="number"===typeof t?{from:t,to:t}:t;Object(rt["rangeEach"])(r.from,r.to,e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),n||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,i);Object(h["arrayEach"])(t,e=>{let[t,n]=e;return this.ghostTable.addColumn(t,n)})}}),this.ghostTable.columns.length&&(this.hot.batchExecution(()=>{this.ghostTable.getWidths((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)})},!0),this.measuredColumns=r.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const n=this.hot.countCols()-1;let r=null;this.inProgress=!0;const i=()=>{if(!this.hot)return Object(tn["cancelAnimationFrame"])(r),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+Tn.CALCULATION_STEP,n)},e),t=t+Tn.CALCULATION_STEP+1,t<n?r=Object(tn["requestAnimationFrame"])(i):(Object(tn["cancelAnimationFrame"])(r),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();this.firstCalculation&&s>=0&&(this.calculateColumnsWidth({from:0,to:s},e),this.firstCalculation=!1,t=s+1),t<n?i():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[_n],t=e&&Object(o["hasOwnProperty"])(e,"samplingRatio")?e.samplingRatio:void 0,n=e&&Object(o["hasOwnProperty"])(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[_n];let t=Tn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(rt["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getColumnWidth(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),n&&"number"===typeof r&&(r=Math.max(r,cn["a"].DEFAULT_WIDTH))),r}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader(),t=Object(h["arrayReduce"])(e,(e,t,n)=>{const r=wn(En,this).length;return(r-1<n||wn(En,this)[n]!==t)&&e.push(n),r-1<n?wn(En,this).push(t):wn(En,this)[n]=t,e},[]);return t}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.columnWidthsMap.setValueAtIndex(e,null)})},!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!Object(h["arrayFilter"])(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function Mn(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}function Rn(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout(()=>{this.hot&&this.recalculateAllColumnsWidth()},0)}function On(e){const t=Object(h["arrayMap"])(e,e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))});this.clearCache(Array.from(new Set(t)))}function Nn(e,t,n){let r=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),r=this.getColumnWidth(t,void 0,!1)),r}function An(){yn(En,this,this.hot.getColHeader())}function Ln(e){const t=Object(h["arrayFilter"])(e,e=>{var t;return Object(d["isDefined"])(null===(t=e.address)||void 0===t?void 0:t.col)}),n=Object(h["arrayMap"])(t,e=>e.address.col);this.clearCache(Array.from(new Set(n)))}const In={horizontal:"horizontal",vertical:"vertical"};function xn(e,t,n){let r,i,s;return t[0]===e[0]&&t[1]<e[1]?(s="left",r=n(t[0],t[1]),i=n(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(s="right",r=n(t[0],e[3]+1),i=n(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(s="up",r=n(t[0],t[1]),i=n(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(s="down",r=n(e[2]+1,t[1]),i=n(t[2],t[3])),r&&r.normalize(),i&&i.normalize(),{directionOfDrag:s,startOfDragCoords:r,endOfDragCoords:i}}function kn(e){const t={};return!0===e?(t.directions=Object.keys(In),t.autoInsertRow=!0):Object(o["isObject"])(e)?(Object(d["isDefined"])(e.autoInsertRow)?e.direction===In.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,Object(d["isDefined"])(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(In)):"string"===typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}function Dn(e,t){Hn(e,t),t.add(e)}function Hn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pn(e,t,n){return t=jn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jn(e){var t=Fn(e,"string");return"symbol"==typeof t?t:t+""}function Fn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Yn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("modifyAutofillRange"),fe["a"].getSingleton().register("beforeAutofill"),fe["a"].getSingleton().register("afterAutofill");const Un="autofill",Vn=20,Bn=["fillHandle"],Wn="insert_row_below",Gn=200;var zn=new WeakSet;class Kn extends en["a"]{constructor(){super(...arguments),Dn(this,zn),Pn(this,"addingStarted",!1),Pn(this,"mouseDownOnCellCorner",!1),Pn(this,"mouseDragOutside",!1),Pn(this,"handleDraggedCells",0),Pn(this,"directions",[]),Pn(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Un}static get PLUGIN_PRIORITY(){return Vn}static get SETTING_KEYS(){return[Un,...Bn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",e=>Yn(zn,this,$n).call(this,e)),this.addHook("afterOnCellCornerDblClick",e=>Yn(zn,this,Xn).call(this,e)),this.addHook("beforeOnCellMouseOver",(e,t)=>Yn(zn,this,qn).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:n}=e.getTopStartCorner(),{row:r,col:i}=e.getBottomEndCorner(),s=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:n,endRow:r,endCol:i}]),o=[],a=[],l=[];return Object(h["arrayEach"])(s,e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===o.indexOf(t)&&o.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)}),Object(h["arrayEach"])(o,e=>{const t=[];Object(h["arrayEach"])(a,n=>{t.push(this.hot.getCopyableData(e,n))}),l.push(t)}),l}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,n,r]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),s=i.getTopStartCorner(),o=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[s.row,s.col,o.row,o.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(s.row,e),Math.min(s.col,t),Math.max(o.row,n),Math.max(o.col,r)],a),{directionOfDrag:c,startOfDragCoords:u,endOfDragCoords:h}=xn(a,l,(e,t)=>this.hot._createCellCoords(e,t));if(u&&u.row>-1&&u.col>-1){const e=this.getSelectionData(),t=i.clone(),n=this.hot._createCellRange(u,u,h),r=this.hot.runHooks("beforeAutofill",e,t,n,c);if(!1===r)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let s=r;const o=r;if(["up","left"].indexOf(c)>-1&&(1!==o.length||0!==o[0].length))if(s=[],"up"===c){const e=h.row-u.row+1,t=e%o.length;for(let n=0;n<e;n++)s.push(o[(n+(o.length-t))%o.length])}else{const e=h.col-u.col+1,t=e%o[0].length;for(let n=0;n<o.length;n++){s.push([]);for(let r=0;r<e;r++)s[n].push(o[n][(r+(o[n].length-t))%o[n].length])}}this.hot.populateFromArray(u.row,u.col,s,h.row,h.col,this.pluginName+".fill",null),this.setSelection(l),this.hot.runHooks("afterAutofill",s,t,n,c),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),n=t.getBottomEndCorner();let r=e;if(this.directions.includes(In.vertical)&&this.directions.includes(In.horizontal)){const i=t.getTopStartCorner();(n.col<=e.col||i.col>=e.col)&&(r=this.hot._createCellCoords(n.row,e.col)),(n.row<e.row||i.row>e.row)&&(r=this.hot._createCellCoords(e.row,n.col))}else if(this.directions.includes(In.vertical))r=this.hot._createCellCoords(e.row,n.col);else{if(!this.directions.includes(In.horizontal))return;r=this.hot._createCellCoords(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(r)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout(()=>{this.hot.alter(Wn,void 0,1,this.pluginName+".fill"),this.addingStarted=!1},Gn)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.countRows();e[2]<n-1&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),n=this.hot.countRows();let r;for(let i=e[2]+1;i<n;i++){for(let r=e[1];r<=e[3];r++){const e=t[i][r];if(!Object(d["isEmpty"])(e))return-1}const n=t[i][e[1]-1],s=t[i][e[3]+1];Object(d["isEmpty"])(n)&&Object(d["isEmpty"])(s)||(r=i)}return r}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...Object(h["arrayMap"])(e,e=>Math.max(e,0)),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,n=Object(i["offset"])(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+Object(i["outerHeight"])(this.hot.table),r=Object(i["offset"])(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+Object(i["outerWidth"])(this.hot.table);return e.clientY>n&&e.clientX<=r}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",()=>Yn(zn,this,Jn).call(this)),this.eventManager.addEventListener(e,"mousemove",e=>Yn(zn,this,Qn).call(this,e))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=kn(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function Xn(){const e=this.selectAdjacent();e&&this.fillIn()}function $n(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function qn(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function Jn(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function Qn(e){const 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()}function Zn(e,t){er(e,t),t.add(e)}function er(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tr(e,t,n){return t=nr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){var t=rr(e,"string");return"symbol"==typeof t?t:t+""}function rr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ir(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const sr="autoRowSize",or=40,ar="autoRowSize";var lr=new WeakSet;class cr extends en["a"]{static get PLUGIN_KEY(){return sr}static get PLUGIN_PRIORITY(){return or}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),Zn(this,lr),tr(this,"headerHeight",null),tr(this,"ghostTable",new nn["a"](this.hot)),tr(this,"samplesGenerator",new ln((e,t)=>{const n=this.hot.toPhysicalRow(e),r=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(r))return!1;if(e>=0&&t>=0){const n=this.hot.getCellMeta(e,t);if(n.hidden)return!1}let i;return e>=0?i=this.hot.getDataAtCell(e,t):-1===e&&(i=this.hot.getColHeader(t)),{value:i}})),tr(this,"firstCalculation",!0),tr(this,"inProgress",!1),tr(this,"measuredRows",0),tr(this,"rowHeightsMap",new un["a"]),this.hot.rowIndexMapper.registerMap(ar,this.rowHeightsMap),this.addHook("beforeRowResize",(e,t,n)=>ir(lr,this,hr).call(this,e,t,n))}isEnabled(){const e=this.hot.getSettings()[sr];return!0===e||Object(o["isObject"])(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ir(lr,e,dr).call(e,...n)})),this.addHook("beforeChangeRender",e=>ir(lr,this,mr).call(this,e)),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("beforeViewRender",e=>ir(lr,this,ur).call(this,e)),this.addHook("modifyRowHeight",(e,t)=>this.getRowHeight(t,e)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",(e,t,n)=>ir(lr,this,hr).call(this,e,t,n))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="number"===typeof e?{from:e,to:e}:e,i="number"===typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(e.get(-1))}Object(rt["rangeEach"])(r.from,r.to,e=>{if(n||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,i);Object(h["arrayEach"])(t,e=>{let[t,n]=e;return this.ghostTable.addRow(t,n)})}}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)})},!0),this.measuredRows=r.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const n=this.hot.countRows()-1;let r=null;this.inProgress=!0;const i=()=>{if(!this.hot)return Object(tn["cancelAnimationFrame"])(r),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+cr.CALCULATION_STEP,n)},e),t=t+cr.CALCULATION_STEP+1,t<n?r=Object(tn["requestAnimationFrame"])(i):(Object(tn["cancelAnimationFrame"])(r),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},s=this.getSyncCalculationLimit();this.firstCalculation&&s>=0&&(this.calculateRowsHeight({from:0,to:s},e),this.firstCalculation=!1,t=s+1),t<n?i():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[sr],t=e&&Object(o["hasOwnProperty"])(e,"samplingRatio")?e.samplingRatio:void 0,n=e&&Object(o["hasOwnProperty"])(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}recalculateAllRowsHeight(){Object(i["isVisible"])(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[sr];let t=cr.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(rt["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const n=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let r=t;return null!==n&&n>(t||0)&&(r=n),r}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:n}="number"===typeof e?{from:e,to:e}:e;this.hot.batchExecution(()=>{Object(rt["rangeEach"])(Math.min(t,n),Math.max(t,n),e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0)}isNeedRecalculate(){return!!Object(h["arrayFilter"])(this.rowHeightsMap.getValues().slice(0,this.measuredRows),e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function ur(){const 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){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}function hr(e,t,n){let r=e;return n&&(this.calculateRowsHeight(t,void 0,!0),r=this.getRowHeight(t)),r}function dr(){this.hot.view?this.recalculateAllRowsHeight():this.hot._registerTimeout(()=>{this.hot&&this.recalculateAllRowsHeight()})}function mr(e){let 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)}var fr=n("bdd7"),pr=n("1096"),gr=n("a73f");const{getListWithInsertedItems:yr,getListWithRemovedItems:wr}=Object(fr["a"])("physicallyIndexed");class br extends pr["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(gr["b"])(this.indexedValues,t);this.indexedValues=yr(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=wr(this.indexedValues,e);this.indexedValues=Object(gr["a"])(t,e),super.remove(e)}}var _r=br;const{getListWithInsertedItems:vr,getListWithRemovedItems:Sr}=Object(fr["a"])("physicallyIndexed");class Er extends pr["a"]{constructor(){super(e=>e)}insert(e,t){this.indexedValues=vr(this.indexedValues,e,t,(e,t)=>this.getNextValue(t)),super.insert(e,t)}remove(e){this.indexedValues=Sr(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var Cr=Er;function Tr(e,t){Mr(e,t),t.add(e)}function Mr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rr(e,t,n){return t=Or(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Or(e){var t=Nr(e,"string");return"symbol"==typeof t?t:t+""}function Nr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ar(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Lr="bindRowsWithHeaders",Ir=210,xr="loose",kr=new Map([["loose",_r],["strict",Cr]]);var Dr=new WeakSet;class Hr extends en["a"]{constructor(){super(...arguments),Tr(this,Dr),Rr(this,"headerIndexes",null)}static get PLUGIN_KEY(){return Lr}static get PLUGIN_PRIORITY(){return Ir}isEnabled(){return!!this.hot.getSettings()[Lr]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[Lr];"string"!==typeof e&&(e=xr);const t=kr.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",e=>Ar(Dr,this,Pr).call(this,e)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function Pr(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}var jr=n("bd5e");function Fr(e,t){Ur(e,t),t.add(e)}function Yr(e,t,n){Ur(e,t),t.set(e,n)}function Ur(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vr(e,t,n){return t=Br(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Br(e){var t=Wr(e,"string");return"symbol"==typeof t?t:t+""}function Wr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Gr(e,t){return e.get(Kr(e,t))}function zr(e,t,n){return e.set(Kr(e,t),n),n}function Kr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Xr="collapsibleColumns",$r=290,qr=["nestedHeaders"],Jr="collapsibleIndicator",Qr=Xr,Zr=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var ei=new WeakMap,ti=new WeakSet;class ni extends en["a"]{constructor(){super(...arguments),Fr(this,ti),Vr(this,"nestedHeadersPlugin",null),Vr(this,"headerStateManager",null),Yr(this,ei,null)}static get PLUGIN_KEY(){return Xr}static get PLUGIN_PRIORITY(){return $r}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[Xr,...qr]}isEnabled(){return!!this.hot.getSettings()[Xr]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||Object(jr["b"])("You need to configure the Nested Headers plugin in order to use collapsible headers."),zr(ei,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>Kr(ti,this,si).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kr(ti,e,oi).call(e,...n)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kr(ti,e,ri).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(e,t,n)=>Kr(ti,this,ii).call(this,e,t,n)),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"===typeof e?this.headerStateManager.mapState(e=>({collapsible:e.origColspan>1})):Array.isArray(e)&&(this.headerStateManager.mapState(()=>({collapsible:!1})),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),zr(ei,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:n}=this.hot.getSelectedRangeLast().highlight,{collapsible:r,isCollapsed:i,columnIndex:s}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,n))&&void 0!==e?e:{};if(r)return i?this.expandSection({row:t,col:s}):this.collapseSection({row:t,col:s}),!1},runOnlyIf:()=>{var e,t;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader())},group:Qr,relativeToGroup:Pe["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Qr)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(e){e&&e.parentNode.removeChild(e)};Object(rt["rangeEach"])(0,e-1,e=>{const s=t.childNodes[e],o=n.childNodes[e],a=r?r.childNodes[e]:null;Object(rt["rangeEach"])(0,s.childNodes.length-1,e=>{let t=s.childNodes[e].querySelector("."+Jr);i(t),o&&o.childNodes[e]&&(t=o.childNodes[e].querySelector("."+Jr),i(t)),r&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector("."+Jr),i(t))})},!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes(t=>{const{collapsible:n,origColspan:r,headerLevel:i,columnIndex:s,isCollapsed:o}=t;if(!0===n&&r>1&&(o&&"expand"===e||!o&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(i),col:s}});this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!Zr.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const n=Object(h["arrayFilter"])(e,e=>{let{row:t}=e;return t<0});let r=n.length>0;Object(h["arrayEach"])(n,e=>{var n;let{row:i,col:s}=e;const{collapsible:o,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(i,s))&&void 0!==n?n:{};if(!o||a&&"collapse"===t||!a&&"expand"===t)return r=!1,!1});const i=[],s=[];r&&Object(h["arrayEach"])(n,e=>{let{row:n,col:r}=e;const{colspanCompensation:o,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,n,r);o>0&&(s.push(...a),i.push(l))});const o=this.getCollapsedColumns();let a=[];"collapse"===t?a=Object(h["arrayUnique"])([...o,...s]):"expand"===t&&(a=Object(h["arrayFilter"])(o,e=>!s.includes(e)));const l=Zr.get(t),c=this.hot.runHooks(l.beforeHook,o,a,r);if(!1===c)return void Object(h["arrayEach"])(i,e=>{e()});this.hot.batchExecution(()=>{Object(h["arrayEach"])(s,e=>{Gr(ei,this).setValueAtIndex(this.hot.toPhysicalColumn(e),l.hideColumn)})},!0);const u=this.getCollapsedColumns().length!==o.length,d=this.hot.getSelectedRangeLast();if("collapse"===t&&u&&d){const{row:e,col:t}=d.highlight,n=this.hot.rowIndexMapper.isHidden(e)||this.hot.columnIndexMapper.isHidden(t);if(n&&s.includes(t)){const n=e>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(e,1,!0):e,r=t>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(t,1,!0):t;null!==n&&null!==r&&this.hot.selectCell(n,r)}}this.hot.runHooks(l.afterHook,o,a,r,u),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return Gr(ei,this).getHiddenIndexes()}destroy(){zr(ei,this,null),super.destroy()}}function ri(e,t,n){var r;const{collapsible:s,origColspan:o,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(n,e))&&void 0!==r?r:{},l=s&&o>1&&e>=this.hot.getSettings().fixedColumnsStart,c=this.hot.getSettings().ariaTags;let u=t.querySelector("."+Jr);var h;(Object(i["removeAttribute"])(t,[Object(y["k"])("")[0]]),l)?(u||(u=this.hot.rootDocument.createElement("div"),Object(i["addClass"])(u,Jr),t.querySelector("div:first-child").appendChild(u)),Object(i["removeClass"])(u,["collapsed","expanded"]),a?(Object(i["addClass"])(u,"collapsed"),Object(i["fastInnerText"])(u,"+"),c&&Object(i["setAttribute"])(t,...Object(y["k"])(!1))):(Object(i["addClass"])(u,"expanded"),Object(i["fastInnerText"])(u,"-"),c&&Object(i["setAttribute"])(t,...Object(y["k"])(!0))),c&&Object(i["setAttribute"])(u,...Object(y["n"])())):null===(h=u)||void 0===h||h.remove()}function ii(e,t){Object(i["hasClass"])(e.target,Jr)&&(Object(i["hasClass"])(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):Object(i["hasClass"])(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),Object(s["stopImmediatePropagation"])(e))}function si(){this.updatePlugin()}function oi(e,t){t||this.updatePlugin()}var ai=n("97b9"),li=n("1b1a"),ci=n("9056");function ui(e,t,n){return t=hi(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hi(e){var t=di(e,"string");return"symbol"==typeof t?t:t+""}function di(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const mi=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],fi=!1,pi=!0,gi=!0;class yi{constructor(e,t){ui(this,"hot",void 0),ui(this,"sortingStates",new ci["a"]),ui(this,"sortEmptyCells",fi),ui(this,"indicator",pi),ui(this,"headerAction",gi),ui(this,"compareFunctionFactory",void 0),ui(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){Object(o["isObject"])(e)&&Object(o["objectEach"])(e,(e,t)=>{mi.includes(t)&&(this[t]=e)})}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"===typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex(t=>{let[n]=t;return n===e})}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return Object(o["isObject"])(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];const e=this.sortingStates.getEntries();return e.map(e=>{let[t,n]=e;return{column:this.hot.toVisualColumn(t),...n}})}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}const wi="asc",bi="desc",_i="colHeader";function vi(e){if(!1===Object(o["isObject"])(e))return!1;const{column:t,sortOrder:n}=e;return Number.isInteger(t)&&[wi,bi].includes(n)}function Si(e){if(e.some(e=>!1===vi(e)))return!1;const t=e.map(e=>{let{column:t}=e;return t});return new Set(t).size===t.length}function Ei(e){if(e!==bi)return e===wi?bi:wi}function Ci(e){const t=e.querySelector("."+_i);return t}function Ti(e,t){if(e<0||!t.parentNode)return!1;const n=t.parentNode.parentNode.childNodes,r=Array.from(n).indexOf(t.parentNode)-n.length;return-1===r}function Mi(e,t,n){return-1===e&&t>=0&&!1===Object(s["isRightClick"])(n)}const Ri="ascending",Oi="descending",Ni="indicatorDisabled",Ai="columnSorting",Li="sortAction",Ii=new Map([[wi,Ri],[bi,Oi]]);function xi(e,t,n,r){const i=[Ai];if(r&&i.push(Li),!1===n)return i.push(Ni),i;const s=e.getSortOrderOfColumn(t);return Object(d["isDefined"])(s)&&i.push(Ii.get(s)),i}function ki(){return Array.from(Ii.values()).concat(Li,Ni,Ai)}const Di=0,Hi=-1,Pi=1;function ji(e,t){const n=Qi(t);for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];e.sort(n(...i))}function Fi(e,t,n){const r=t.locale;return function(t,i){const{sortEmptyCells:s}=n;return"string"===typeof t&&(t=t.toLocaleLowerCase(r)),"string"===typeof i&&(i=i.toLocaleLowerCase(r)),t===i?Di:Object(d["isEmpty"])(t)?Object(d["isEmpty"])(i)?Di:s&&"asc"===e?Hi:Pi:Object(d["isEmpty"])(i)?s&&"asc"===e?Pi:Hi:isNaN(t)&&!isNaN(i)?"asc"===e?Pi:Hi:!isNaN(t)&&isNaN(i)?"asc"===e?Hi:Pi:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?Hi:Pi:t>i?"asc"===e?Pi:Hi:Di)}}const Yi="default";function Ui(e,t,n){return function(t,r){const i=parseFloat(t),s=parseFloat(r),{sortEmptyCells:o}=n;if(i===s||isNaN(i)&&isNaN(s))return Di;if(o){if(Object(d["isEmpty"])(t))return"asc"===e?Hi:Pi;if(Object(d["isEmpty"])(r))return"asc"===e?Pi:Hi}return isNaN(i)?Pi:isNaN(s)?Hi:i<s?"asc"===e?Hi:Pi:i>s?"asc"===e?Pi:Hi:Di}}const Vi="numeric";function Bi(e,t,n){const r=t.checkedTemplate,i=t.uncheckedTemplate,{sortEmptyCells:s}=n;return function(o,a){const l=Object(d["isEmpty"])(o),c=Object(d["isEmpty"])(a),u=l?i:o,h=c?i:a,m=u===i||u===r,f=h===i||h===r;if(!1===s){if(l&&!1===c)return Pi;if(!1===l&&c)return Hi}return!1===m&&f?"asc"===e?Hi:Pi:m&&!1===f?"asc"===e?Pi:Hi:!1===m&&!1===f?Fi(e,t,n)(o,a):u===i&&h===r?"asc"===e?Hi:Pi:u===r&&h===i?"asc"===e?Pi:Hi:Di}}const Wi="checkbox";function Gi(e,t,n){return function(r,i){const{sortEmptyCells:s}=n;if(r===i)return Di;if(Object(d["isEmpty"])(r))return Object(d["isEmpty"])(i)?Di:s&&"asc"===e?Hi:Pi;if(Object(d["isEmpty"])(i))return s&&"asc"===e?Pi:Hi;const o=t.dateFormat,a=L(r,o),l=L(i,o);return a.isValid()?l.isValid()?l.isAfter(a)?"asc"===e?Hi:Pi:l.isBefore(a)?"asc"===e?Pi:Hi:Di:Hi:Pi}}const zi="date";var Ki=n("9acd");const{register:Xi,getItem:$i,hasItem:qi}=Object(Ki["a"])("sorting.compareFunctionFactory"),{register:Ji,getItem:Qi}=Object(Ki["a"])("sorting.mainSortComparator");function Zi(e){return qi(e)?$i(e):$i(Yi)}function es(e,t){return function(n,r){const[,...i]=n,[,...s]=r;return function(n){const r=e[n],o=t[n],a=i[n],l=s[n],c=o.columnSorting,u=c.compareFunctionFactory?c.compareFunctionFactory:Zi(o.type),h=u(r,o,c)(a,l);return h}(0)}}function ts(e,t){ns(e,t),t.add(e)}function ns(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rs(e,t,n){return t=is(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function is(e){var t=ss(e,"string");return"symbol"==typeof t?t:t+""}function ss(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function os(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Xi(Vi,Ui),Xi(Wi,Bi),Xi(zi,Gi),Xi(Yi,Fi);const as="columnSorting",ls=50,cs="append",us="replace",hs=as;Ji(as,es),fe["a"].getSingleton().register("beforeColumnSort"),fe["a"].getSingleton().register("afterColumnSort");var ds=new WeakSet;class ms extends en["a"]{constructor(){super(...arguments),ts(this,ds),rs(this,"columnStatesManager",null),rs(this,"columnMetaCache",null),rs(this,"pluginKey",as),rs(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return as}static get PLUGIN_PRIORITY(){return ls}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new yi(this.hot,this.pluginKey+".sortingStates"),this.columnMetaCache=new un["a"](e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)}),this.hot.columnIndexMapper.registerMap(this.pluginKey+".columnMeta",this.columnMetaCache),this.addHook("afterGetColHeader",(e,t)=>os(ds,this,ps).call(this,e,t)),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return os(ds,e,ys).call(e,...n)})),this.addHook("afterOnCellMouseDown",(e,t)=>this.onAfterOnCellMouseDown(e,t)),this.addHook("afterInit",()=>os(ds,this,fs).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return os(ds,e,gs).call(e,...n)})),this.hot.view&&os(ds,this,fs).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=Ci(t);!1!==Ti(e,t)&&null!==n&&this.updateHeaderClasses(n)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("afterGetColHeader",e)}),this.hot.batchExecution(()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))},!0),this.hot.columnIndexMapper.unregisterMap(this.pluginKey+".columnMeta"),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return this.sort(this.getColumnNextConfig(e.col)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.row&&n.col>=0},relativeToGroup:Pe["a"],position:"before",group:hs})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(hs)}sort(e){const t=this.getSortConfig(),n=this.getNormalizedSortConfigs(e),r=this.areValidSortConfigs(n),i=this.hot.runHooks("beforeColumnSort",t,n,r);!1!==i&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new li["a"]),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),r&&(this.columnStatesManager.setSortStates(n),this.sortByPresetSortStates(n),this.saveAllSortSettings(n)),this.hot.runHooks("afterColumnSort",t,r?n:t,r),r&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return Object(d["isDefined"])(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return Si(e)&&e.every(e=>{let{column:n}=e;return n<=t&&n>=0})}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties(),n=e=>{let{column:t,...n}=e;return{column:this.hot.toPhysicalColumn(t),...n}};t.initialConfig=Object(h["arrayMap"])(e,n),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,n=e=>{let{column:t,...n}=e;return{column:this.hot.toVisualColumn(t),...n}};return Object(d["isDefined"])(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=Object(h["arrayMap"])(t.initialConfig,n)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t)){const n=Ei(t);return Object(d["isDefined"])(n)?{column:e,sortOrder:n}:void 0}const n=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<n)return{column:e,sortOrder:Ei()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cs;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e),r=-1!==n,i=this.getSortConfig(),s=this.getColumnNextConfig(e);if(r){if(Object(d["isUndefined"])(s))return[...i.slice(0,n),...i.slice(n+1)];if(t===cs)return[...i.slice(0,n),...i.slice(n+1),s];if(t===us)return[...i.slice(0,n),s,...i.slice(n+1)]}return Object(d["isDefined"])(s)?i.concat(s):i}getPluginColumnConfig(e){if(Object(o["isObject"])(e)){const t=e[this.pluginKey];if(Object(o["isObject"])(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),r=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(r);return Array.isArray(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns[e])):Object(ai["isFunction"])(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns(e))):Object.assign(n,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),n=Object.create(t);return n[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),n}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],n=this.hot.countRows(),r=t=>Object(h["arrayMap"])(e,e=>this.hot.getDataAtCell(t,e.column));for(let l=0;l<this.getNumberOfRowsToSort(n);l+=1)t.push([this.hot.toPhysicalRow(l)].concat(r(l)));const i=Object(h["arrayMap"])(t,e=>e[0]);ji(t,this.pluginKey,Object(h["arrayMap"])(e,e=>e.sortOrder),Object(h["arrayMap"])(e,e=>this.getFirstCellSettings(e.column)));for(let l=t.length;l<n;l+=1)t.push([l].concat(r(l)));const s=Object(h["arrayMap"])(t,e=>e[0]),o=new Map(Object(h["arrayMap"])(i,(e,t)=>[e,s[t]])),a=Object(h["arrayMap"])(this.hot.rowIndexMapper.getIndexesSequence(),e=>o.has(e)?o.get(e):e);this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if(Object(o["isObject"])(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||Object(o["isObject"])(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if(Object(i["removeClass"])(e,ki(e)),!1!==this.enabled){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Object(i["addClass"])(e,xi(...n))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),Object(d["isDefined"])(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){const n=this.getFirstCellSettings(t)[this.pluginKey],r=n.headerAction;return r&&Object(i["hasClass"])(e.target,_i)}onAfterOnCellMouseDown(e,t){!1!==Mi(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function fs(){const e=this.getAllSavedSortSettings();if(Object(o["isObject"])(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function ps(e,t){const n=Ci(t);if(!1===Ti(e,t)||null===n)return;const r=this.getFirstCellSettings(e)[this.pluginKey],s=r.indicator,o=r.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,e,s,o),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(e);Object(i["setAttribute"])(t,...Object(y["J"])(n?n+"ending":"none"))}}function gs(e){!0===e&&this.hot.view&&os(ds,this,fs).call(this)}function ys(e,t,n,r){!1!==Mi(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(r.column=!0)}function ws(e,t,n){return t=bs(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bs(e){var t=_s(e,"string");return"symbol"==typeof t?t:t+""}function _s(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class vs{constructor(e,t){ws(this,"plugin",void 0),ws(this,"hot",void 0),ws(this,"endpoints",[]),ws(this,"settings",void 0),ws(this,"settingsType","array"),ws(this,"currentEndpoint",null),ws(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let n=e;if(n||"function"!==typeof this.settings)return n||(n=this.settings),Object(h["arrayEach"])(n,e=>{const n={};this.assignSetting(e,n,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,n,"reversedRowCoords",!1),this.assignSetting(e,n,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"sourceColumn",e.destinationColumn),this.assignSetting(e,n,"type","sum"),this.assignSetting(e,n,"forceNumeric",!1),this.assignSetting(e,n,"suppressDataTypeErrors",!0),this.assignSetting(e,n,"customFunction",null),this.assignSetting(e,n,"readOnly",!0),this.assignSetting(e,n,"roundFloat",!1),t.push(n)}),t;this.settingsType="function"}assignSetting(e,t,n,r){if("ranges"!==n||void 0!==e[n]){if("ranges"!==n||0!==e[n].length)if(void 0===e[n]){if(r instanceof Error)throw r;t[n]=r}else"destinationRow"===n&&t.reversedRowCoords?t[n]=this.hot.countRows()-e[n]-1:t[n]=e[n]}else t[n]=r}resetSetupBeforeStructureAlteration(e,t,n){if("function"!==this.settingsType)return;const r=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();Object(h["arrayEach"])(i,i=>{"row"===r&&i.destinationRow>=t&&("insert_row"===e?i.alterRowOffset=n:"remove_row"===e&&(i.alterRowOffset=-1*n)),"col"===r&&i.destinationColumn>=t&&("insert_col"===e?i.alterColumnOffset=n:"remove_col"===e&&(i.alterColumnOffset=-1*n))}),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(e,t,n,r,i){let s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const o=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,l=this.getAllEndpoints(),c=0===e.indexOf("move_row"),u=t;Object(h["arrayEach"])(l,e=>{"row"===o&&e.destinationRow>=u&&(e.alterRowOffset=a*n),"col"===o&&e.destinationColumn>=u&&(e.alterColumnOffset=a*n)}),this.resetAllEndpoints(l,!c),c?Object(h["arrayEach"])(l,e=>{this.extendEndpointRanges(e,u,r[0],r.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)}):Object(h["arrayEach"])(l,e=>{this.shiftEndpointCoordinates(e,u)}),s&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,n,r){Object(h["arrayEach"])(e.ranges,e=>{e[1]&&(t>=e[0]&&t<=e[1]?n>e[1]?e[1]+=r:n<e[0]&&(e[0]-=r):n>=e[0]&&n<=e[1]&&(e[1]-=r,t<=e[0]&&(e[0]+=1,e[1]+=1)))})}recreatePhysicalRanges(e){const t=e.ranges,n=[],r=[];Object(h["arrayEach"])(t,e=>{const t=[];if(e[1])for(let n=e[0];n<=e[1];n++)t.push(this.hot.toPhysicalRow(n));else t.push(this.hot.toPhysicalRow(e[0]));r.push(t)}),Object(h["arrayEach"])(r,e=>{let t=[];Object(h["arrayEach"])(e,(r,i)=>{0===i?t.push(r):e[i]!==e[i-1]+1&&(t.push(e[i-1]),n.push(t),t=[],t.push(r)),i===e.length-1&&(t.push(r),n.push(t))})}),e.ranges=n}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,Object(h["arrayEach"])(e.ranges,n=>{Object(h["arrayEach"])(n,(r,i)=>{r>=t&&(n[i]+=e.alterRowOffset||0)})})):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.some(e=>{const t=e.alterRowOffset||0,n=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+n>=this.hot.countCols()});n||(this.cellsToSetCache=[],Object(h["arrayEach"])(e,e=>{this.resetEndpointValue(e,t)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],Object(h["arrayEach"])(this.getAllEndpoints(),e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")}),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],Object(h["arrayEach"])(e,(e,n,r)=>{""+(e[2]||"")!==""+e[3]&&Object(h["arrayEach"])(this.getAllEndpoints(),(e,i)=>{this.hot.propToCol(r[n][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)})}),Object(h["arrayEach"])(t,e=>{this.refreshEndpoint(this.getEndpoint(e))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.alterRowOffset||0,r=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?n:0)),this.hot.toVisualColumn(e.destinationColumn+(t?r:0)),""])}setEndpointValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(e.destinationRow);if(null!==i){const n=this.hot.getCellMeta(i,e.destinationColumn);"init"!==t&&n.readOnly===e.readOnly||(n.readOnly=e.readOnly,n.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let n=0;Number.isInteger(t)&&(n=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(n)}n?this.hot.setDataAtCell(r,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([r,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){Object(jr["b"])("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}var Ss=vs,Es=n("67a87");function Cs(e){return null===e||void 0===e||isNaN(e)}function Ts(e,t){Ms(e,t),t.add(e)}function Ms(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rs(e,t,n){return t=Os(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Os(e){var t=Ns(e,"string");return"symbol"==typeof t?t:t+""}function Ns(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function As(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ls="columnSummary",Is=220;var xs=new WeakSet;class ks extends en["a"]{constructor(){super(...arguments),Ts(this,xs),Rs(this,"endpoints",null)}static get PLUGIN_KEY(){return Ls}static get PLUGIN_PRIORITY(){return Is}isEnabled(){return!!this.hot.getSettings()[Ls]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Ls],this.endpoints=new Ss(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return As(xs,e,Ds).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return As(xs,e,Hs).call(e,...n)})),this.addHook("beforeCreateRow",(e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,n)),this.addHook("beforeCreateCol",(e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,n)),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...n)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...n)})),this.addHook("afterCreateRow",(e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,n)),this.addHook("afterCreateCol",(e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,n)),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...n)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return As(xs,e,Ps).call(e,...n)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":e.result=this.calculateMinMax(e,e.type);break;case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e);break;default:break}}calculateSum(e){let t=0;return Object(o["objectEach"])(e.ranges,n=>{t+=this.getPartialSum(n,e.sourceColumn)}),t}getPartialSum(e,t){let n=0,r=e[1]||e[0],i=null,s=0;do{if(i=this.getCellValue(r,t),i=Cs(i)?null:i,null!==i){const e=((""+i).split(".")[1]||[]).length||1;e>s&&(s=e)}n+=i||0,r-=1}while(r>=e[0]);return Math.round(n*10**s)/10**s}calculateMinMax(e,t){let n=null;return Object(o["objectEach"])(e.ranges,r=>{const i=this.getPartialMinMax(r,e.sourceColumn,t);if(null===n&&null!==i&&(n=i),null!==i)switch(t){case"min":n=Math.min(n,i);break;case"max":n=Math.max(n,i);break;default:break}}),null===n?"Not enough data":n}getPartialMinMax(e,t,n){let r,i=null,s=e[1]||e[0];do{if(r=this.getCellValue(s,t),r=Cs(r)?null:r,null===i)i=r;else if(null!==r)switch(n){case"min":i=Math.min(i,r);break;case"max":i=Math.max(i,r);break;default:break}s-=1}while(s>=e[0]);return i}countEmpty(e,t){let n,r=0,i=e[1]||e[0];do{n=this.getCellValue(i,t),n=Cs(n)?null:n,null===n&&(r+=1),i-=1}while(i>=e[0]);return r}countEntries(e){let t=0;const n=e.ranges;return Object(o["objectEach"])(n,n=>{const r=void 0===n[1]?1:n[1]-n[0]+1,i=this.countEmpty(n,e.sourceColumn);t+=r,t-=i}),t}calculateAverage(e){const t=this.calculateSum(e),n=this.countEntries(e);return t/n}getCellValue(e,t){const n=this.hot.toVisualRow(e),r=this.hot.toVisualColumn(t);let i=this.hot.getSourceDataAtCell(e,t),s="";if(null!==n&&null!==r&&(s=this.hot.getCellMeta(n,r).className||""),s.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"===typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(Es["a"]`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
- numeric format. Cannot do the calculation.`);return i}}function Ds(){this.endpoints.initEndpoints()}function Hs(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function Ps(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}function js(e,t,n){return t=Fs(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fs(e){var t=Ys(e,"string");return"symbol"==typeof t?t:t+""}function Ys(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Us{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){js(this,"rootDocument",void 0),js(this,"isRtl",!1),js(this,"container",null),js(this,"editor",void 0),js(this,"editorStyle",void 0),js(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=e+"px",this.editorStyle.top=t+"px"}setSize(e,t){if(e&&t){const n=this.getInputElement();n.style.width=e+"px",n.style.height=t+"px"}}getSize(){return{width:Object(i["outerWidth"])(this.getInputElement()),height:Object(i["outerHeight"])(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){const t=this.getInputElement();t.readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e||"";this.getInputElement().value=t}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),Object(i["addClass"])(this.container,Us.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),Object(i["addClass"])(e,Us.CLASS_EDITOR),Object(i["addClass"])(t,Us.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector("."+Us.CLASS_INPUT)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}var Vs=Us,Bs=n("7ae0");function Ws(e,t,n){return t=Gs(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gs(e){var t=zs(e,"string");return"symbol"==typeof t?t:t+""}function zs(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Ks=250,Xs=250;class $s{constructor(e){Ws(this,"wasLastActionShow",!0),Ws(this,"showDebounced",null),Ws(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout(()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")},Xs)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ks;this.showDebounced=Object(ai["debounce"])(e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)},e)}destroy(){this.clearLocalHooks()}}Object(o["mixin"])($s,Bs["a"]);var qs=$s;const Js="---------";function Qs(){return{name:Js}}function Zs(e){return{key:"commentsAddEdit",name(){var t;const n=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!==n&&void 0!==n&&n.isCell()&&e.getCommentAtCell(n.row,n.col)?this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_EDIT_COMMENT"]):this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ADD_COMMENT"])},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function eo(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_COMMENT"])},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{t>=0&&n>=0&&e.removeCommentAtCell(t,n,!1)}),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function to(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return`${n} ${t}`}function no(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return`${n} ${t}`}function ro(e,t){const n={};return Object(h["arrayEach"])(e,e=>{e.forAll((e,r)=>{e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))})}),n}function io(e,t,n,r,i){Object(h["arrayEach"])(e,e=>{e.forAll((e,s)=>{e>=0&&s>=0&&so(e,s,t,n,r,i)})})}function so(e,t,n,r,i,s){const o=i(e,t);let a=r;o.className&&(a="vertical"===n?to(o.className,r):no(o.className,r)),s(e,t,"className",a)}function oo(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function ao(e,t){let n=!1;return Array.isArray(e)&&Object(h["arrayEach"])(e,e=>(e.forAll((e,r)=>{if(e>=0&&r>=0&&t(e,r))return n=!0,!1}),n)),n}function lo(e,t){const n={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:r,left:i}=e.getBoundingClientRect();n.top=r,n.left=i}return n}function co(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]),n=ao(this.getSelectedRange(),(t,n)=>e.getCommentMeta(t,n,To));return n?oo(t):t},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{if(t>=0&&n>=0){const r=!!e.getCommentMeta(t,n,To);e.updateCommentMeta(t,n,{[To]:!r})}})},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function uo(e,t){mo(e,t),t.add(e)}function ho(e,t,n){mo(e,t),t.set(e,n)}function mo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fo(e,t,n){return t=po(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function po(e){var t=go(e,"string");return"symbol"==typeof t?t:t+""}function go(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function yo(e,t,n){return e.set(bo(e,t),n),n}function wo(e,t){return e.get(bo(e,t))}function bo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const _o="comments",vo=60,So="comment",Eo="value",Co="style",To="readOnly",Mo=_o,Ro="plugin:"+_o;var Oo=new WeakMap,No=new WeakMap,Ao=new WeakMap,Lo=new WeakMap,Io=new WeakMap,xo=new WeakMap,ko=new WeakMap,Do=new WeakSet;class Ho extends en["a"]{constructor(){super(...arguments),uo(this,Do),fo(this,"range",{}),ho(this,Oo,null),ho(this,No,null),ho(this,Ao,!1),ho(this,Lo,!1),ho(this,Io,{}),ho(this,xo,null),ho(this,ko,"")}static get PLUGIN_KEY(){return _o}static get PLUGIN_PRIORITY(){return vo}isEnabled(){return!!this.hot.getSettings()[_o]}enablePlugin(){this.enabled||(wo(Oo,this)||yo(Oo,this,new Vs(this.hot.rootDocument,this.hot.isRtl())),wo(No,this)||yo(No,this,new qs(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",e=>this.addToContextMenu(e)),this.addHook("afterRenderer",(e,t,n,r,i,s)=>bo(Do,this,Yo).call(this,e,s)),this.addHook("afterScroll",()=>bo(Do,this,zo).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",e=>bo(Do,this,Go).call(this,e)),wo(No,this).addLocalHook("hide",()=>this.hide()),wo(No,this).addLocalHook("show",(e,t)=>this.showAtCell(e,t)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){wo(No,this).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),n=e.addContext(Ro);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();yo(Lo,this,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(Ro),this.hot._registerTimeout(()=>{yo(Lo,this,!1)})})},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!wo(Oo,this).isVisible()},group:Mo}),n.addShortcut({keys:[["Escape"]],callback:()=>{wo(Oo,this).setValue(wo(ko,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&wo(Oo,this).isVisible()},group:Mo}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&wo(Oo,this).isVisible()},group:Mo})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Mo)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",e=>bo(Do,this,jo).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>bo(Do,this,Po).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>bo(Do,this,Fo).call(this)),this.eventManager.addEventListener(t,"focus",()=>bo(Do,this,Vo).call(this)),this.eventManager.addEventListener(t,"blur",()=>bo(Do,this,Uo).call(this)),this.eventManager.addEventListener(t,"mousedown",e=>bo(Do,this,Bo).call(this,e)),this.eventManager.addEventListener(t,"mouseup",e=>bo(Do,this,Wo).call(this,e))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=Object(i["closest"])(e.target,"TD","TBODY");return!!(t&&Object(i["hasClass"])(t,"htCommentCell")&&Object(i["closest"])(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=wo(Oo,this).getValue();let n="";null!==e&&void 0!==e?n=e:null!==t&&void 0!==t&&(n=t);const r=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(r,i,{[Eo]:n}),this.hot.render()}setCommentAtCell(e,t,n){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(n)}removeComment(){let e=!(arguments.length>0&&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,So),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(n)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,Eo)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,Eo)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:n}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||n<0||n>this.hot.countSourceCols()-1)return!1;const r=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return wo(No,this).cancelHiding(),wo(Oo,this).setValue(null!==(e=r[So]?r[So][Eo]:null)&&void 0!==e?e:""),wo(Oo,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){wo(Oo,this).hide()}refreshEditor(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!n&&(!this.range.from||!wo(Oo,this).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:s}=this.hot,{row:o,col:a}=this.range.from;let l=r.getRenderableFromVisualIndex(o),c=s.getRenderableFromVisualIndex(a);const u=null===l;wo(Oo,this).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,-1))),null===c&&(c=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(a,-1)));const h=null===l,d=null===c;l=null!==(e=l)&&void 0!==e?e:0,c=null!==(t=c)&&void 0!==t?t:0;const{rootWindow:m,view:{_wt:f}}=this.hot,{wtTable:p}=f,g=f.getCell({row:l,col:c},!0),y=this.getCommentMeta(o,a,Co);y?wo(Oo,this).setSize(y.width,y.height):wo(Oo,this).resetSize();const w=d?0:p.getStretchedColumnWidth(c),b=u&&!h?Object(i["outerHeight"])(g):0,{left:_,top:v,width:S,height:E}=g.getBoundingClientRect(),{width:C,height:T}=wo(Oo,this).getSize(),{innerWidth:M,innerHeight:R}=this.hot.rootWindow,O=this.hot.rootDocument.documentElement;let N=_+m.scrollX+w,A=v+m.scrollY+b;this.hot.isRtl()&&(N-=C+w),this.hot.isLtr()&&_+S+C>M?N=_+m.scrollX-C-1:this.hot.isRtl()&&N<-(O.scrollWidth-O.clientWidth)&&(N=_+m.scrollX+w+1),v+T>R&&(A-=T-E+1),wo(Oo,this).setPosition(N,A),wo(Oo,this).setReadOnlyState(this.getCommentMeta(o,a,To))}focusEditor(){wo(Oo,this).focus()}updateCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t)[So];let i;r?(i=Object(o["deepClone"])(r),Object(o["deepExtend"])(i,n)):i=n,this.hot.setCellMeta(e,t,So,i)}getCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t);if(r[So])return r[So][n]}addToContextMenu(e){e.items.push({name:Js},Zs(this),eo(this),co(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[_o];if(Object(o["isObject"])(e))return e.displayDelay}getEditorInputElement(){return wo(Oo,this).getInputElement()}destroy(){wo(Oo,this)&&wo(Oo,this).destroy(),wo(No,this)&&wo(No,this).destroy(),super.destroy()}}function Po(e){if(this.hot.view&&this.hot.view._wt&&!wo(Ao,this)&&!this.targetIsCommentTextArea(e)){const t=Object(i["closest"])(e.target,"TD","TBODY");let n=null;t&&(n=this.hot.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}}function jo(e){const{rootDocument:t}=this.hot;if(!(wo(Ao,this)||wo(Oo,this).isFocused()||Object(i["hasClass"])(e.target,"wtBorder")||wo(xo,this)===e.target)&&wo(Oo,this))if(yo(xo,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));wo(No,this).show(t)}else Object(i["isChildOf"])(e.target,t)&&!this.targetIsCommentTextArea(e)&&wo(No,this).hide()}function Fo(){yo(Ao,this,!1)}function Yo(e,t){t[So]&&t[So][Eo]&&Object(i["addClass"])(e,t.commentedCellClassName)}function Uo(){yo(ko,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Vo(){yo(ko,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(Ro)}function Bo(e){yo(Io,this,{width:Object(i["outerWidth"])(e.target),height:Object(i["outerHeight"])(e.target)})}function Wo(e){const t=Object(i["outerWidth"])(e.target),n=Object(i["outerHeight"])(e.target);t===wo(Io,this).width+1&&n===wo(Io,this).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[Co]:{width:t,height:n}})}function Go(e){wo(Oo,this).isVisible()&&Object(s["stopImmediatePropagation"])(e)}function zo(){wo(Lo,this)||this.hide()}n("956b");function Ko(e,t,n){return t=Xo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xo(e){var t=$o(e,"string");return"symbol"==typeof t?t:t+""}function $o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class qo{constructor(e){Ko(this,"hot",void 0),Ko(this,"commands",{}),Ko(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=e.split(":"),s=i[0],a=2===i.length?i[1]:null;let l=this.commands[s];if(!l)throw new Error(`Menu command '${s}' not exists.`);if(a&&l.submenu&&(l=Jo(a,l.submenu.items)),!0===l.disabled)return;if("function"===typeof l.disabled&&!0===l.disabled.call(this.hot))return;if(Object(o["hasOwnProperty"])(l,"submenu"))return;const c=[];"function"===typeof l.callback&&c.push(l.callback),"function"===typeof this.commonCallback&&c.push(this.commonCallback),n.unshift(i.join(":")),Object(h["arrayEach"])(c,e=>e.apply(this.hot,n))}}function Jo(e,t){let n;return Object(h["arrayEach"])(t,t=>{const r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1}),n}const Qo="alignment";function Zo(){return{key:Qo,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT"])},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:Qo+":left",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htLeft"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htLeft";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Qo+":center",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htCenter"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htCenter";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Qo+":right",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htRight"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htRight";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Qo+":justify",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htJustify"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htJustify";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{name:Js},{key:Qo+":top",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htTop"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htTop";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Qo+":middle",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htMiddle"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Qo+":bottom",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]);const t=ao(this.getSelectedRange(),(e,t)=>{const n=this.getCellMeta(e,t).className;if(n&&-1!==n.indexOf("htBottom"))return!0});return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ro(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htBottom";this.runHooks("beforeCellAlignment",t,e,n,r),io(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1}]}}}const ea="clear_column";function ta(){return{key:ea,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_CLEAR_COLUMN"])},callback(e,t){const n=t[0].start.col,r=t[0].end.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),r,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}}const na="col_left";function ra(){return{key:na,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_INSERT_LEFT"])},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){const e=this.countCols();return 0===e}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}}const ia="col_right";function sa(){return{key:ia,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_INSERT_RIGHT"])},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}}const oa="make_read_only";function aa(){return{key:oa,name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_READ_ONLY"]);const t=ao(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return t&&(e=oo(e)),e},callback(){const e=this.getSelectedRange(),t=ao(e,(e,t)=>this.getCellMeta(e,t).readOnly);Object(h["arrayEach"])(e,e=>{e.forAll((e,n)=>{e>=0&&n>=0&&this.setCellMeta(e,n,"readOnly",!t)})}),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}}const la="redo";function ca(){return{key:la,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REDO"])},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}}var ua=n("a952");const ha="remove_col";function da(){return{key:ha,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,n,,r]=e[0];n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_COLUMN"],t)},callback(){this.alter("remove_col",Object(ua["e"])(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}}const ma="remove_row";function fa(){return{key:ma,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[n,,r]=e[0];n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_ROW"],t)},callback(){this.alter("remove_row",Object(ua["f"])(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}}const pa="row_above";function ga(){return{key:pa,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ROW_ABOVE"])},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){const e=this.countRows();return 0===e}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}}const ya="row_below";function wa(){return{key:ya,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ROW_BELOW"])},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}}const ba="no_items";function _a(){return{key:ba,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_NO_ITEMS"])},disabled:!0,isCommand:!1}}const va="undo";function Sa(){return{key:va,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_UNDO"])},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}}const Ea=[pa,ya,na,ia,ea,ma,ha,va,la,oa,Qo,Js,ba],Ca={[Js]:Qs,[ba]:_a,[pa]:ga,[ya]:wa,[na]:ra,[ia]:sa,[ea]:ta,[ma]:fa,[ha]:da,[va]:Sa,[la]:ca,[oa]:aa,[Qo]:Zo};function Ta(){const e={};return Object(o["objectEach"])(Ca,(t,n)=>{e[n]=t()}),e}function Ma(e,t,n){return t=Ra(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ra(e){var t=Oa(e,"string");return"symbol"==typeof t?t:t+""}function Oa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Na{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Ma(this,"hot",void 0),Ma(this,"predefinedItems",Ta()),Ma(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,Object(o["objectEach"])(e,(e,n)=>{let r="";e.name===Js?(t[Js]=e,r=Js):isNaN(parseInt(n,10))?(e.key=void 0===e.key?n:e.key,t[n]=e,r=e.key):(t[e.key]=e,r=e.key),this.defaultOrderPattern.push(r)}),this.predefinedItems=t}getItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return Aa(e,this.defaultOrderPattern,this.predefinedItems)}}function Aa(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[];let i=e;return i&&i.items?i=i.items:Array.isArray(i)||(i=t),Object(o["isObject"])(i)?Object(o["objectEach"])(i,(e,t)=>{let i=n["string"===typeof e?e:t];i||(i=e),Object(o["isObject"])(e)?Object(o["extend"])(i,e):"string"===typeof i&&(i={name:i}),void 0===i.key&&(i.key=t),r.push(i)}):Object(h["arrayEach"])(i,(e,t)=>{let i=n[e];!i&&Ea.indexOf(e)>=0||(i||(i={name:e,key:""+t}),Object(o["isObject"])(e)&&Object(o["extend"])(i,e),void 0===i.key&&(i.key=t),r.push(i))}),r}function La(e,t,n){return t=Ia(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ia(e){var t=xa(e,"string");return"symbol"==typeof t?t:t+""}function xa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ka{constructor(e,t){La(this,"top",void 0),La(this,"topRelative",void 0),La(this,"left",void 0),La(this,"leftRelative",void 0),La(this,"scrollTop",void 0),La(this,"scrollLeft",void 0),La(this,"cellHeight",void 0),La(this,"cellWidth",void 0);const n=t.scrollY,r=t.scrollX;let i,s,o,a,l,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),o=parseInt(e.left,10),l=e.height||0,c=e.width||0,s=i,a=o,i+=n,o+=r):"event"===this.type&&(i=parseInt(e.pageY,10),o=parseInt(e.pageX,10),l=e.target.clientHeight,c=e.target.clientWidth,s=i-n,a=o-r),this.top=i,this.topRelative=s,this.left=o,this.leftRelative=a,this.scrollTop=n,this.scrollLeft=r,this.cellHeight=l,this.cellWidth=c}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}function Da(e,t,n){Ha(e,t),t.set(e,n)}function Ha(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pa(e,t){return e.get(Fa(e,t))}function ja(e,t,n){return e.set(Fa(e,t),n),n}function Fa(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ya=new WeakMap,Ua=new WeakMap,Va=new WeakMap,Ba=new WeakMap,Wa=new WeakMap;class Ga{constructor(e){Da(this,Ya,void 0),Da(this,Ua,void 0),Da(this,Va,void 0),Da(this,Ba,!1),Da(this,Wa,{above:0,below:0,left:0,right:0}),ja(Ba,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Pa(Wa,this)[e]=t,this}setElement(e){return ja(Ya,this,e),this}setParentElement(e){return ja(Ua,this,e),this}updatePosition(e){ja(Va,this,new ka(e,Pa(Ya,this).ownerDocument.defaultView)),Pa(Ba,this)?(Pa(Va,this).fitsBelow(Pa(Ya,this))?this.setPositionBelowCursor():Pa(Va,this).fitsAbove(Pa(Ya,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===Pa(Ya,this).dir?Pa(Va,this).fitsOnLeft(Pa(Ya,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():Pa(Va,this).fitsOnRight(Pa(Ya,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=Pa(Wa,this).above+Pa(Va,this).top-Pa(Ya,this).offsetHeight;Pa(Ua,this)&&(e=Pa(Va,this).top+Pa(Va,this).cellHeight-Pa(Ya,this).offsetHeight+3),Pa(Ya,this).style.top=e+"px"}setPositionBelowCursor(){let e=Pa(Wa,this).below+Pa(Va,this).top+1;Pa(Ua,this)&&(e=Pa(Va,this).top-1),Pa(Ya,this).style.top=e+"px"}setPositionOnRightOfCursor(){let e=Pa(Va,this).left;if(Pa(Ua,this)){const{right:t}=Pa(Ua,this).getBoundingClientRect();e+=Pa(Va,this).cellWidth+t-(Pa(Va,this).left+Pa(Va,this).cellWidth)}else e+=Pa(Wa,this).right;Pa(Ya,this).style.left=e+"px"}setPositionOnLeftOfCursor(){let e=Pa(Wa,this).left+Pa(Va,this).left-Pa(Ya,this).offsetWidth;if(Pa(Ua,this)){const{left:t}=Pa(Ua,this).getBoundingClientRect();e-=Pa(Va,this).left-t}Pa(Ya,this).style.left=e+"px"}}function za(e){let{initialPage:t=-1,size:n=(()=>0),onItemSelect:r=(()=>{}),onClear:i=(()=>{})}=e;const s=new Set;let o=Object(rt["clamp"])(t,-1,f()-1);function a(e,t){const n=f()-1;if(e<0&&(e=n),e>n&&(e=0),s.has(e))return-1;s.add(e);const i=r(e,!1);return!1===i&&(e=a(1===t?++e:--e,t)),e}function l(e){e>-1&&e<f()&&!1!==r(e,!0)&&(o=e)}function c(){return o}function u(){f()>0&&(s.clear(),o=a(0,1))}function h(){f()>0&&(s.clear(),o=a(f()-1,-1))}function d(){f()>0&&(s.clear(),o=a(++o,1))}function m(){f()>0&&(s.clear(),o=a(--o,-1))}function f(){return Math.max(n(),0)}function p(){s.clear(),o=t,i()}return{setCurrentPage:l,getCurrentPage:c,toFirstItem:u,toLastItem:h,toNextItem:d,toPreviousItem:m,getSize:f,clear:p}}function Ka(e){return Object(h["arrayMap"])(e,e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()}))}function Xa(e){return Object(o["hasOwnProperty"])(e,"submenu")}function $a(e){return new RegExp(Js,"i").test(e.name)}function qa(e,t){return!0===e.disabled||"function"===typeof e.disabled&&!0===e.disabled.call(t)}function Ja(e){return Object(o["hasOwnProperty"])(e,"disableSelection")}function Qa(e){return Object(i["hasClass"])(e,"htSeparator")}function Za(e){return Object(i["hasClass"])(e,"htSubmenu")}function el(e){return Object(i["hasClass"])(e,"htDisabled")}function tl(e){return Object(i["hasClass"])(e,"htSelectionDisabled")}function nl(e,t){return!e.hidden||!("function"===typeof e.hidden&&e.hidden.call(t))}function rl(e,t){const n=e.slice(0);for(let r=0;r<n.length;){if(n[r].name!==t)break;n.shift()}return n}function il(e,t){let n=e.slice(0);return n.reverse(),n=rl(n,t),n.reverse(),n}function sl(e){const t=[];return Object(h["arrayEach"])(e,(e,n)=>{n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function ol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Js,n=e.slice(0);return n=rl(n,t),n=il(n,t),n=sl(n),n}function al(e){return za({size:()=>e.countRows(),onItemSelect(t,n){const r=e.getCell(t,0);if(!r||Qa(r)||el(r)||tl(r))return!1;e.selectCell(t,0,...n?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})}function ll(e){const{hot:t,hotMenu:n}=e;return[{keys:[["Control/Meta","A"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(n,r)=>{const i=t.getSettings(),s="function"===typeof i.tabMoves?i.tabMoves(n):i.tabMoves;r.includes("shift")?t.selection.transformStart(-s.row,-s.col):t.selection.transformStart(s.row,s.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=n.getSelectedLast();if(t){const n=e.openSubMenu(t[0]);n&&n.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{const t=n.getSelectedLast();t&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=n.getSelectedLast();r&&(n.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{const t=n.getSelectedLast();t?n.selection.transformStart(-n.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{const t=n.getSelectedLast();t?n.selection.transformStart(n.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}const cl="menu",ul=cl;function hl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function r(e,t){a(t).addShortcuts(e,{group:cl})}function i(e,t){const i=a(t);e.forEach(e=>{let{keys:t}=e;t.forEach(e=>i.removeShortcutsByKeys(e))}),n.push({shortcuts:e,contextName:t}),r(e,t)}function s(){return[...n]}function o(e){return e?`${ul}:${e}`:ul}function a(t){var n;const r=e.hotMenu.getShortcutManager(),i=o(t);return null!==(n=r.getContext(i))&&void 0!==n?n:r.addContext(i)}function l(t){e.hotMenu.getShortcutManager().setActiveContextName(o(t))}return r(ll(e)),t.forEach(e=>{let{shortcuts:t,contextName:n}=e;i(t,n)}),{addCustomShortcuts:i,getCustomShortcuts:s,getContext:a,listen:l}}function dl(e){return(t,n,r,s,o,a)=>{if(n.hasAttribute("ghost-table"))return;const l=t.getSourceDataAtRow(r),c=e.rootDocument.createElement("div"),u="function"===typeof a?a.call(e):a;if(Object(i["empty"])(n),Object(i["addClass"])(c,"htItemWrapper"),e.getSettings().ariaTags){const t=!qa(l,e)&&!Ja(l)&&!$a(l);Object(i["setAttribute"])(n,[Object(y["t"])(),Object(y["p"])(u),...t?[Object(y["K"])(-1)]:[],...qa(l,e)?[Object(y["j"])()]:[],...Xa(l)?[Object(y["k"])(!1)]:[]])}n.className="",n.appendChild(c),$a(l)?Object(i["addClass"])(n,"htSeparator"):"function"===typeof l.renderer?(Object(i["addClass"])(n,"htCustomMenuRenderer"),n.appendChild(l.renderer(t,c,r,s,o,u))):Object(i["fastInnerHTML"])(c,u),qa(l,e)?Object(i["addClass"])(n,"htDisabled"):Ja(l)?Object(i["addClass"])(n,"htSelectionDisabled"):Xa(l)&&Object(i["addClass"])(n,"htSubmenu")}}function ml(e,t,n){fl(e,t),t.set(e,n)}function fl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pl(e,t,n){return t=gl(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(e){var t=yl(e,"string");return"symbol"==typeof t?t:t+""}function yl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function wl(e,t,n){return e.set(_l(e,t),n),n}function bl(e,t){return e.get(_l(e,t))}function _l(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const vl=215;var Sl=new WeakMap,El=new WeakMap;class Cl{constructor(e,t){var n=this;pl(this,"hot",void 0),pl(this,"options",void 0),pl(this,"eventManager",new Ie["a"](this)),pl(this,"container",void 0),pl(this,"positioner",void 0),pl(this,"hotMenu",null),pl(this,"hotSubMenus",{}),pl(this,"parentMenu",void 0),pl(this,"menuItems",null),pl(this,"origOutsideClickDeselects",null),ml(this,Sl,void 0),ml(this,El,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:vl,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Ga(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;while(e)this.eventManager.addEventListener(e.document,"mousedown",e=>this.onDocumentMouseDown(e)),this.eventManager.addEventListener(e.document,"contextmenu",e=>this.onDocumentContextMenu(e)),e=Object(i["getParentWindow"])(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return bl(Sl,this)}getKeyboardShortcutsCtrl(){return bl(El,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=Object(ai["debounce"])(e=>this.openSubMenu(e),300),t=this.options.minWidth||vl;let n=!1,r=Object(h["arrayFilter"])(this.menuItems,e=>(e.key===ba&&(n=!0),nl(e,this.hot)));if(r.length<1&&!n)r.push(Ta()[ba]);else if(0===r.length)return;r=ol(r,Js);let i=!1;const o={data:r,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth(e){return Object(d["isDefined"])(e)&&e<t?t:e},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:dl(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{bl(Sl,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,n)=>{this.isAllSubMenusClosed()?e(n.row):this.openSubMenu(n.row)},rowHeights:e=>r[e].name===Js?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),Object(p["isWindowsOS"])()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,n,r,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(i=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{Object(p["isWindowsOS"])()&&Object(s["isRightClick"])(e)||!i||!this.hasSelectedItem()||(Object(p["isMobileBrowser"])()||Object(p["isIpadOS"])()?this.hot._registerTimeout(()=>this.close(!0),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,o),this.hotMenu.addHook("afterInit",()=>this.onAfterInit()),this.hotMenu.init(),wl(Sl,this,al(this.hotMenu)),wl(El,this,hl(this)),bl(El,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this)),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if(bl(Sl,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);Object(i["setAttribute"])(t,[Object(y["k"])(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!Za(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),r=new Cl(this.hot,{parent:this,name:n.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return r.setMenuItems(n.submenu.items),r.open(),r.setPosition(t.getBoundingClientRect()),this.hotSubMenus[n.key]=r,this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(t,[Object(y["k"])(!0)]),r}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];if(n){n.destroy(),delete this.hotSubMenus[t.key];const r=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(r,[Object(y["k"])(!1)])}}closeAllSubMenus(){Object(h["arrayEach"])(this.hotMenu.getData(),(e,t)=>this.closeSubMenu(t))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const n=this.hot.getSelectedRange(),r=n?Ka(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}isCommandPassive(e){return!1===e.isCommand||$a(e)||qa(e,this.hot)||Xa(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let n,r=e;return r&&(Object(ai["isFunction"])(r)&&(r=r.call(this.hot),r=null===r||Object(d["isUndefined"])(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r=`${this.options.className}Sub_${r}`,n=t.querySelector(`.${this.options.className}.${r}`)),n||(n=t.createElement("div"),Object(i["addClass"])(n,"htMenu "+this.options.className),r&&Object(i["addClass"])(n,r),this.options.container.appendChild(n)),n}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,s=parseInt(n.width,10),o=Object(h["arrayReduce"])(t,(e,t)=>e+(t.name===Js?1:26),0);r.width=s+3+"px",r.height=o+3+"px",n.height=r.height,this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.hotMenu.rootElement,[Object(y["s"])(),Object(y["K"])(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!Object(i["isChildOf"])(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||Object(i["isChildOf"])(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&Object(i["hasClass"])(e.target,"htCore")&&Object(i["isChildOf"])(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}function Tl(e,t){Ml(e,t),t.add(e)}function Ml(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rl(e,t,n){return t=Ol(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ol(e){var t=Nl(e,"string");return"symbol"==typeof t?t:t+""}function Nl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Al(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(Cl,Bs["a"]);const Ll="contextMenu",Il=70,xl=Ll;fe["a"].getSingleton().register("afterContextMenuDefaultOptions"),fe["a"].getSingleton().register("beforeContextMenuShow"),fe["a"].getSingleton().register("afterContextMenuShow"),fe["a"].getSingleton().register("afterContextMenuHide"),fe["a"].getSingleton().register("afterContextMenuExecute");var kl=new WeakSet;class Dl extends en["a"]{constructor(){super(...arguments),Tl(this,kl),Rl(this,"commandExecutor",new qo(this.hot)),Rl(this,"itemsFactory",null),Rl(this,"menu",null)}static get PLUGIN_KEY(){return Ll}static get PLUGIN_PRIORITY(){return Il}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[pa,ya,Js,na,ia,Js,ma,ha,Js,va,la,Js,oa,Js,Qo]}isEnabled(){return!!this.hot.getSettings()[Ll]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Ll];"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new Cl(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",()=>Al(kl,this,Pl).call(this)),this.menu.addLocalHook("afterOpen",()=>Al(kl,this,jl).call(this)),this.menu.addLocalHook("afterClose",()=>Al(kl,this,Fl).call(this)),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.executeCommand.call(e,...n)})),this.addHook("afterOnCellContextMenu",e=>Al(kl,this,Hl).call(this,e)),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),n=lo(this.menu.container,this.hot.rootDocument);this.open({left:t.left+n.left,top:t.top+n.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:xl})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(xl)}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),Object(o["objectEach"])(n,(e,t)=>{this.menu.setOffset(t,e)}),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.commandExecutor.execute(e,...n)}prepareMenuItems(){this.itemsFactory=new Na(this.hot,Dl.DEFAULT_ITEMS);const e=this.hot.getSettings()[Ll],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const n=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",n),this.menu.setMenuItems(n),Object(h["arrayEach"])(n,e=>this.commandExecutor.registerCommand(e.key,e))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function Hl(e){const t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders;function s(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}const o=e.target;if(this.close(),Object(i["hasClass"])(o,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!n&&!r&&!s(o)&&(!Object(i["hasClass"])(o,"current")||!Object(i["hasClass"])(o,"wtBorder")))return;const a=lo(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+a.top,left:e.clientX+a.left})}function Pl(){this.hot.runHooks("beforeContextMenuShow",this)}function jl(){this.hot.runHooks("afterContextMenuShow",this)}function Fl(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}Dl.SEPARATOR={name:Js};var Yl=n("3bc4");function Ul(e){return{key:"copy",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY"])},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Vl(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?Object(rt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"],t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Bl(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(rt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"],t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Wl(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(rt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"],t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Gl(e){return{key:"cut",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_CUT"])},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}class zl{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class Kl{constructor(){this.clipboardData=new zl}}function Xl(e,t){ql(e,t),t.add(e)}function $l(e,t,n){ql(e,t),t.set(e,n)}function ql(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jl(e,t){return e.get(Zl(e,t))}function Ql(e,t,n){return e.set(Zl(e,t),n),n}function Zl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ec=new WeakMap,tc=new WeakMap,nc=new WeakMap,rc=new WeakMap,ic=new WeakMap,sc=new WeakMap,oc=new WeakSet;class ac{constructor(e){let{countRows:t,countColumns:n,rowsLimit:r,columnsLimit:i,countColumnHeaders:s}=e;Xl(this,oc),$l(this,ec,void 0),$l(this,tc,void 0),$l(this,nc,void 0),$l(this,rc,void 0),$l(this,ic,void 0),$l(this,sc,void 0),Ql(tc,this,t),Ql(nc,this,n),Ql(rc,this,r),Ql(ic,this,i),Ql(sc,this,s)}setSelectedRange(e){Ql(ec,this,e)}getCellsRange(){if(0===Jl(tc,this).call(this)||0===Jl(nc,this).call(this))return null;const{row:e,col:t}=Jl(ec,this).getTopStartCorner(),{row:n,col:r}=Jl(ec,this).getBottomEndCorner(),i=Zl(oc,this,cc).call(this,e,n),s=Zl(oc,this,lc).call(this,t,r),o=n!==i||r!==s;return{isRangeTrimmed:o,startRow:e,startCol:t,endRow:i,endCol:s}}getMostBottomColumnHeadersRange(){if(0===Jl(nc,this).call(this)||0===Jl(sc,this).call(this))return null;const{col:e}=Jl(ec,this).getTopStartCorner(),{col:t}=Jl(ec,this).getBottomEndCorner(),n=Zl(oc,this,lc).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===Jl(nc,this).call(this)||0===Jl(sc,this).call(this))return null;const{col:e}=Jl(ec,this).getTopStartCorner(),{col:t}=Jl(ec,this).getBottomEndCorner(),n=Zl(oc,this,lc).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-Jl(sc,this).call(this),startCol:e,endRow:-1,endCol:n}}}function lc(e,t){return Math.min(t,Math.max(e+Jl(ic,this).call(this)-1,e))}function cc(e,t){return Math.min(t,Math.max(e+Jl(rc,this).call(this)-1,e))}function uc(e){const t=[],n=[];return Object(h["arrayEach"])(e,e=>{const r=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);Object(rt["rangeEach"])(r,i,e=>{-1===t.indexOf(e)&&t.push(e)});const s=Math.min(e.startCol,e.endCol),o=Math.max(e.startCol,e.endCol);Object(rt["rangeEach"])(s,o,e=>{-1===n.indexOf(e)&&n.push(e)})}),{rows:t,columns:n}}var hc=n("a776");function dc(e,t){fc(e,t),t.add(e)}function mc(e,t,n){fc(e,t),t.set(e,n)}function fc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pc(e,t,n){return t=gc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gc(e){var t=yc(e,"string");return"symbol"==typeof t?t:t+""}function yc(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function wc(e,t){return e.get(_c(e,t))}function bc(e,t,n){return e.set(_c(e,t),n),n}function _c(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("afterCopyLimit"),fe["a"].getSingleton().register("modifyCopyableRange"),fe["a"].getSingleton().register("beforeCut"),fe["a"].getSingleton().register("afterCut"),fe["a"].getSingleton().register("beforePaste"),fe["a"].getSingleton().register("afterPaste"),fe["a"].getSingleton().register("beforeCopy"),fe["a"].getSingleton().register("afterCopy");const vc="copyPaste",Sc=80,Ec=["fragmentSelection"],Cc=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var Tc=new WeakMap,Mc=new WeakMap,Rc=new WeakMap,Oc=new WeakMap,Nc=new WeakMap,Ac=new WeakMap,Lc=new WeakMap,Ic=new WeakMap,xc=new WeakSet;class kc extends en["a"]{constructor(){super(...arguments),dc(this,xc),pc(this,"columnsLimit",1/0),pc(this,"rowsLimit",1/0),pc(this,"pasteMode","overwrite"),pc(this,"uiContainer",this.hot.rootDocument.body),mc(this,Tc,!1),mc(this,Mc,!1),mc(this,Rc,!1),mc(this,Oc,"cells-only"),mc(this,Nc,!1),mc(this,Ac,!1),mc(this,Lc,new ac({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),mc(this,Ic,!1),pc(this,"copyableRanges",[])}static get PLUGIN_KEY(){return vc}static get SETTING_KEYS(){return[vc,...Ec]}static get PLUGIN_PRIORITY(){return Sc}isEnabled(){return!!this.hot.getSettings()[vc]}enablePlugin(){var e=this;if(this.enabled)return;const{[vc]:t}=this.hot.getSettings();var n,r;"object"===typeof t&&(this.pasteMode=null!==(n=t.pasteMode)&&void 0!==n?n:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,bc(Tc,this,!!t.copyColumnHeaders),bc(Mc,this,!!t.copyColumnGroupHeaders),bc(Rc,this,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(r=t.uiContainer)&&void 0!==r?r:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",e=>_c(xc,this,Fc).call(this,e)),this.addHook("afterSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _c(xc,e,Yc).call(e,...n)})),this.addHook("afterSelectionEnd",()=>_c(xc,this,Uc).call(this)),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),Object(p["isSafari"])()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _c(xc,e,Vc).call(e,...n)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _c(xc,e,Bc).call(e,...n)})),this.addHook("afterSelection",()=>_c(xc,this,Wc).call(this))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";bc(Oc,this,e),bc(Nc,this,!0),_c(xc,this,Dc).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){bc(Ac,this,!0),_c(xc,this,Dc).call(this,"cut")}getRangedCopyableData(e){return Object(Yl["b"])(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:r}=uc(e);return Object(h["arrayEach"])(n,e=>{const n=[];Object(h["arrayEach"])(r,t=>{e<0?n.push(this.hot.getColHeader(t,e)):n.push(this.hot.getCopyableData(e,t))}),t.push(n)}),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const n=new Kl;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.onPaste(n)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);wc(Lc,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===wc(Oc,this)?t.set("headers",wc(Lc,this).getMostBottomColumnHeadersRange()):("with-column-headers"===wc(Oc,this)?t.set("headers",wc(Lc,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===wc(Oc,this)&&t.set("headers",wc(Lc,this).getAllColumnHeadersRange()),t.set("cells",wc(Lc,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter(e=>null!==e).map(e=>{let{startRow:t,startCol:n,endRow:r,endCol:i}=e;return{startRow:t,startCol:n,endRow:r,endCol:i}}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const n=t.get("cells");if(null!==n&&n.isRangeTrimmed){const{startRow:e,startCol:t,endRow:r,endCol:i}=n;this.hot.runHooks("afterCopyLimit",r-e+1,i-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const n=e.length,r=e[0].length,i=[],{row:s,col:o}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let c=s,u=o,h=s,d=o;while(i.length<n||c<=a){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(c,o);if(c=a+1,!0===t)continue;h=a,u=o;const m=[],f=i.length%n;while(m.length<r||u<=l){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(s,u);if(u=n+1,!0===t)continue;d=n;const i=m.length%r;m.push(e[f][i])}i.push(m)}return bc(Ic,this,!0),this.hot.populateFromArray(s,o,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[s,o,h,d]}onCopy(e){if(!this.hot.isListening()&&!wc(Nc,this)||this.isEditorOpened())return;this.setCopyableText(),bc(Nc,this,!1);const t=this.getRangedData(this.copyableRanges),n=_c(xc,this,Hc).call(this,this.copyableRanges),r=!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,n);if(r){const r=Object(Yl["b"])(t);if(e&&e.clipboardData){const n=Object(hc["_dataToHTML"])(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[Cc,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.runHooks("afterCopy",t,this.copyableRanges,n)}bc(Oc,this,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!wc(Ac,this)||this.isEditorOpened())return;this.setCopyableText(),bc(Ac,this,!1);const t=this.getRangedData(this.copyableRanges),n=!!this.hot.runHooks("beforeCut",t,this.copyableRanges);if(n){const n=Object(Yl["b"])(t);if(e&&e.clipboardData){const r=Object(hc["_dataToHTML"])(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",[Cc,r].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",n);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&"undefined"!==typeof e.clipboardData){const n=Object(m["sanitize"])(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(n&&/(<table)|(<TABLE)/g.test(n)){const e=Object(hc["htmlToGridSettings"])(n,this.hot.rootDocument);t=e.data}else t=e.clipboardData.getData("text/plain")}else"undefined"===typeof ClipboardEvent&&"undefined"!==typeof this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"===typeof t&&(t=Object(Yl["a"])(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[n,r,i,s]=this.populateValues(t);this.hot.selectCell(n,r,Math.min(this.hot.countRows()-1,i),Math.min(this.hot.countCols()-1,s)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function Dc(e){if(Object(p["isSafari"])()){const t=this.hot.getSelectedRangeLast();if(t){const{row:n,col:r}=t.highlight,s=this.hot.getCell(n,r,!0);s&&Object(i["runWithSelectedContendEditableElement"])(s,()=>{this.hot.rootDocument.execCommand(e)})}}else this.hot.rootDocument.execCommand(e)}function Hc(e){const{rows:t}=uc(e);let n=0;for(let r=0;r<t.length;r++){if(t[r]>=0)break;n+=1}return{columnHeadersCount:n}}function Pc(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,r=this.hot.getCell(t,n,!0);r&&Object(i["makeElementContentEditableAndSelectItsContent"])(r)}}}function jc(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,r=this.hot.getCell(t,n,!0);null!==r&&void 0!==r&&r.hasAttribute("contenteditable")&&Object(i["removeContentEditableFromElementAndDeselect"])(r)}}}function Fc(e){e.items.push({name:"---------"},Ul(this)),wc(Tc,this)&&e.items.push(Wl(this)),wc(Mc,this)&&e.items.push(Bl(this)),wc(Rc,this)&&e.items.push(Vl(this)),e.items.push(Gl(this))}function Yc(e,t,n,r,i){wc(Ic,this)&&(i.value=!0),bc(Ic,this,!1)}function Uc(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Vc(){_c(xc,this,jc).call(this)}function Bc(){_c(xc,this,Pc).call(this)}function Wc(){_c(xc,this,jc).call(this)}function Gc(e,t){return`border_row${e}col${t}`}function zc(){return{width:1,color:"#000"}}function Kc(){return{hide:!0}}function Xc(){return{width:1,color:"#000",cornerVisible:!1}}function $c(e){var t,n;(Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);(Object(d["isDefined"])(e.end)||Object(d["isDefined"])(e.right))&&(e.end=null!==(n=e.end)&&void 0!==n?n:e.right);return delete e.left,delete e.right,e}function qc(e){return Object(d["isDefined"])(e.start)&&(e.left=e.start),Object(d["isDefined"])(e.end)&&(e.right=e.end),e}function Jc(e,t){return{id:Gc(e,t),border:Xc(),row:e,col:t,top:Kc(),bottom:Kc(),start:Kc(),end:Kc()}}function Qc(e,t){return Object(o["hasOwnProperty"])(t,"border")&&t.border&&(e.border=t.border),Object(o["hasOwnProperty"])(t,"top")&&Object(d["isDefined"])(t.top)&&(t.top?(Object(o["isObject"])(t.top)||(t.top=zc()),e.top=t.top):(t.top=Kc(),e.top=t.top)),Object(o["hasOwnProperty"])(t,"bottom")&&Object(d["isDefined"])(t.bottom)&&(t.bottom?(Object(o["isObject"])(t.bottom)||(t.bottom=zc()),e.bottom=t.bottom):(t.bottom=Kc(),e.bottom=t.bottom)),Object(o["hasOwnProperty"])(t,"start")&&Object(d["isDefined"])(t.start)&&(t.start?(Object(o["isObject"])(t.start)||(t.start=zc()),e.start=t.start):(t.start=Kc(),e.start=t.start)),Object(o["hasOwnProperty"])(t,"end")&&Object(d["isDefined"])(t.end)&&(t.end?(Object(o["isObject"])(t.end)||(t.end=zc()),e.end=t.end):(t.end=Kc(),e.end=t.end)),e}function Zc(e,t){let n=!1;return Object(h["arrayEach"])(e.getSelectedRange(),r=>{r.forAll((r,i)=>{if(r<0||i<0)return;const s=e.getCellMeta(r,i).borders;if(s){if(!t)return n=!0,!1;if(!Object(o["hasOwnProperty"])(s[t],"hide")||!1===s[t].hide)return n=!0,!1}})}),n}function eu(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function tu(e){return e.some(e=>Object(d["isDefined"])(e.left)||Object(d["isDefined"])(e.right))}function nu(e){return e.some(e=>Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.end))}const ru=new Map([["left","start"],["right","end"]]);function iu(e){var t;return null!==(t=ru.get(e))&&void 0!==t?t:e}function su(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_TOP"]);const t=Zc(this,"top");return t&&(e=eu(e)),e},callback(t,n){const r=Zc(this,"top");e.prepareBorder(n,"top",r)}}}function ou(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]);const n=Zc(this,t);return n&&(e=eu(e)),e},callback(n,r){const i=Zc(this,t);e.prepareBorder(r,t,i)}}}function au(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]);const t=Zc(this,"bottom");return t&&(e=eu(e)),e},callback(t,n){const r=Zc(this,"bottom");e.prepareBorder(n,"bottom",r)}}}function lu(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_LEFT"]);const n=Zc(this,t);return n&&(e=eu(e)),e},callback(n,r){const i=Zc(this,t);e.prepareBorder(r,t,i)}}}function cu(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_BORDERS"])},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!Zc(this)}}}function uu(e,t){hu(e,t),t.add(e)}function hu(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function du(e,t,n){return t=mu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mu(e){var t=fu(e,"string");return"symbol"==typeof t?t:t+""}function fu(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function pu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const gu="customBorders",yu=90;var wu=new WeakSet;class bu extends en["a"]{constructor(){super(...arguments),uu(this,wu),du(this,"savedBorders",[])}static get PLUGIN_KEY(){return gu}static get PLUGIN_PRIORITY(){return yu}isEnabled(){return!!this.hot.getSettings()[gu]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>pu(wu,this,_u).call(this,e)),this.addHook("init",()=>pu(wu,this,vu).call(this)),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let n=["top","bottom","start","end"],r=null;t&&(this.checkSettingsCohesion([t]),n=Object.keys(t),r=$c(t));const i=Object(ua["c"])(e),s=Object(ua["d"])(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});Object(h["arrayEach"])(e,e=>{s(e).forAll((e,t)=>{Object(h["arrayEach"])(n,n=>{this.prepareBorderFromCustomAdded(e,t,r,iu(n))})})}),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=Object(ua["c"])(e),n=Object(ua["d"])(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),r=[];return Object(h["arrayEach"])(e,e=>{n(e).forAll((e,t)=>{Object(h["arrayEach"])(this.savedBorders,n=>{n.row===e&&n.col===t&&r.push(qc(n))})})}),r}clearBorders(e){e?this.setBorders(e):(Object(h["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")}),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){const n=this.checkSavedBorders(e);n||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col)),i=this.checkCustomSelections(e,r,t);i||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,n,r){const i=this.hot.countRows(),s=this.hot.countCols();if(e>=i||t>=s)return;let o=Jc(e,t);n&&(o=Qc(o,n),Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,e=>{if(o.id===e.settings.id)return Object.assign(e.settings,n),o.id=e.settings.id,o.top=e.settings.top,o.bottom=e.settings.bottom,o.start=e.settings.start,o.end=e.settings.end,!1})),this.hot.setCellMeta(e,t,"borders",qc(o)),this.insertBorderIntoSettings(o,r)}prepareBorderFromCustomAddedRange(e,t){const n=Math.min(e.to.row,this.hot.countRows()-1),r=Math.min(e.to.col,this.hot.countCols()-1);Object(rt["rangeEach"])(e.from.row,n,n=>{Object(rt["rangeEach"])(e.from.col,r,r=>{const i=Jc(n,r);let s=0;n===e.from.row&&Object(o["hasOwnProperty"])(t,"top")&&(s+=1,i.top=t.top),n===e.to.row&&Object(o["hasOwnProperty"])(t,"bottom")&&(s+=1,i.bottom=t.bottom),r===e.from.col&&Object(o["hasOwnProperty"])(t,"start")&&(s+=1,i.start=t.start),r===e.to.col&&Object(o["hasOwnProperty"])(t,"end")&&(s+=1,i.end=t.end),s>0&&(this.hot.setCellMeta(n,r,"borders",qc(i)),this.insertBorderIntoSettings(i))})})}removeAllBorders(e,t){const n=Gc(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,n,r){let i=this.hot.getCellMeta(e,t).borders;if(i=i&&void 0!==i.border?$c(i):Jc(e,t),r){i[n]=Kc();const s=this.countHide(i);if(4===s)this.removeAllBorders(e,t);else{const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",qc(i))}}else{i[n]=zc();const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",qc(i))}}prepareBorder(e,t,n){Object(h["arrayEach"])(e,e=>{let{start:r,end:i}=e;if(r.row===i.row&&r.col===i.col)"noBorders"===t?this.removeAllBorders(r.row,r.col):this.setBorder(r.row,r.col,t,n);else switch(t){case"noBorders":Object(rt["rangeEach"])(r.col,i.col,e=>{Object(rt["rangeEach"])(r.row,i.row,t=>{this.removeAllBorders(t,e)})});break;case"top":Object(rt["rangeEach"])(r.col,i.col,e=>{this.setBorder(r.row,e,t,n)});break;case"bottom":Object(rt["rangeEach"])(r.col,i.col,e=>{this.setBorder(i.row,e,t,n)});break;case"start":Object(rt["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,r.col,t,n)});break;case"end":Object(rt["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,i.col,t,n)});break;default:break}})}createCustomBorders(e){Object(h["arrayEach"])(e,e=>{const t=$c(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)})}countHide(e){const{top:t,bottom:n,start:r,end:i}=e,s=[t,n,r,i];return Object(h["arrayReduce"])(s,(e,t)=>{let n=e;return t&&t.hide&&(n+=1),n},0)}clearBordersFromSelectionSettings(e){const t=Object(h["arrayMap"])(this.hot.selection.highlight.customSelections,e=>e.settings.id).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,(e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1})}hideBorders(){Object(h["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()})}spliceBorder(e){const t=Object(h["arrayMap"])(this.savedBorders,e=>e.id).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;const n=this.countHide(e);return 4===n?(this.spliceBorder(e.id),t=!0):Object(h["arrayEach"])(this.savedBorders,(n,r)=>{if(e.id===n.id)return this.savedBorders[r]=e,t=!0,!1}),t}checkCustomSelectionsFromContextMenu(e,t,n){let r=!1;return Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return Object(h["arrayEach"])(e,e=>{e.toggleHiddenClass(t,n)}),r=!0,!1}}),r}checkCustomSelections(e,t,n){const r=this.countHide(e);let i=!1;return 4===r?(this.removeAllBorders(e.row,e.col),i=!0):Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,r=>{if(e.id===r.settings.id){if(r.visualCellRange=t,r.commit(),n){const t=this.hot.view._wt.selectionManager.getBorderInstances(r);Object(h["arrayEach"])(t,t=>{t.changeBorderStyle(n,e)})}return i=!0,!1}}),i}changeBorderSettings(){const e=this.hot.getSettings()[gu];if(Array.isArray(e)){const t=Object(o["deepClone"])(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=tu(e),n=nu(e);if(t&&n)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function _u(e){this.hot.getSettings()[gu]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS"])},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[su(this),ou(this),au(this),lu(this),cu(this)]}})}function vu(){this.changeBorderSettings()}function Su(e,t){Eu(e,t),t.add(e)}function Eu(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cu(e,t,n){return t=Tu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tu(e){var t=Mu(e,"string");return"symbol"==typeof t?t:t+""}function Mu(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ru(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ou="dragToScroll",Nu=100;var Au=new WeakSet;class Lu extends en["a"]{constructor(){super(...arguments),Su(this,Au),Cu(this,"boundaries",null),Cu(this,"callback",null),Cu(this,"listening",!1)}static get PLUGIN_KEY(){return Ou}static get PLUGIN_PRIORITY(){return Nu}isEnabled(){return!!this.hot.getSettings()[Ou]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",e=>Ru(Au,this,Iu).call(this,e)),this.addHook("afterOnCellCornerMouseDown",e=>Ru(Au,this,Iu).call(this,e)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let n=0,r=0;t<this.boundaries.top?r=t-this.boundaries.top:t>this.boundaries.bottom&&(r=t-this.boundaries.bottom),e<this.boundaries.left?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,r)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;while(t)this.eventManager.addEventListener(t.document,"contextmenu",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mouseup",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mousemove",e=>this.onMouseMove(e)),t=Object(i["getParentWindow"])(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function Iu(e){if(Object(s["isRightClick"])(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback((e,n)=>{var r,i;const s=null!==(r=t.scrollLeft)&&void 0!==r?r:t.scrollX,o=null!==(i=t.scrollTop)&&void 0!==i?i:t.scrollY;t.scroll(s+50*Math.sign(e),o+20*Math.sign(n))}),this.listen()}function xu(e,t){Du(e,t),t.add(e)}function ku(e,t,n){Du(e,t),t.set(e,n)}function Du(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hu(e,t,n){return t=Pu(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pu(e){var t=ju(e,"string");return"symbol"==typeof t?t:t+""}function ju(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Fu(e,t){return e.get(Uu(e,t))}function Yu(e,t,n){return e.set(Uu(e,t),n),n}function Uu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("afterDropdownMenuDefaultOptions"),fe["a"].getSingleton().register("beforeDropdownMenuShow"),fe["a"].getSingleton().register("afterDropdownMenuShow"),fe["a"].getSingleton().register("afterDropdownMenuHide"),fe["a"].getSingleton().register("afterDropdownMenuExecute");const Vu="dropdownMenu",Bu=230,Wu="changeType",Gu=Vu;var zu=new WeakMap,Ku=new WeakSet;class Xu extends en["a"]{static get PLUGIN_KEY(){return Vu}static get PLUGIN_PRIORITY(){return Bu}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[na,ia,Js,ha,Js,ea,Js,oa,Js,Qo]}constructor(e){super(e),xu(this,Ku),Hu(this,"commandExecutor",new qo(this.hot)),Hu(this,"itemsFactory",null),Hu(this,"menu",null),ku(this,zu,!1),this.hot.addHook("afterGetColHeader",(e,t)=>Uu(Ku,this,Ju).call(this,e,t))}isEnabled(){return this.hot.getSettings()[Vu]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new Na(this.hot,Xu.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Uu(Ku,e,rh).call(e,...n)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Uu(Ku,e,nh).call(e,...n)}));const t=this.hot.getSettings()[Vu],n={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",n),this.itemsFactory.setPredefinedItems(n.items);const r=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new Cl(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",r),this.menu.setMenuItems(r),this.menu.addLocalHook("beforeOpen",()=>Uu(Ku,this,Qu).call(this)),this.menu.addLocalHook("afterOpen",()=>Uu(Ku,this,Zu).call(this)),this.menu.addLocalHook("afterSubmenuOpen",e=>Uu(Ku,this,eh).call(this,e)),this.menu.addLocalHook("afterClose",()=>Uu(Ku,this,th).call(this)),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.executeCommand.call(e,...n)})),Object(h["arrayEach"])(r,e=>this.commandExecutor.registerCommand(e.key,e))})}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),n=lo(this.menu.container,this.hot.rootDocument),r=this.hot.getCell(-1,t.col,!0),i=r.getBoundingClientRect();this.open({left:i.left+n.left,top:i.top+r.offsetHeight+n.top},{left:i.width}),this.menu.getNavigator().toFirstItem()}};e.addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:t,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:Gu},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:Gu}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Gu)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",e=>Uu(Ku,this,qu).call(this,e))}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),Object(o["objectEach"])(n,(e,t)=>{this.menu.setOffset(t,e)}),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.commandExecutor.execute(e,...n)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function $u(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function qu(e){if(Object(i["hasClass"])(e.target,Wu)){const t=lo(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),Yu(zu,this,!1),this.open({left:n.left+t.left,top:n.top+e.target.offsetHeight+3+t.top},{left:n.width})}}function Ju(e,t){const n=t.parentNode;if(!n)return;const r=n.parentNode.childNodes,s=Array.prototype.indexOf.call(r,n);if(e<0||s!==r.length-1)return;const o=t.querySelector("."+Wu);if(this.enabled&&o)return;if(!this.enabled)return void(o&&o.parentNode.removeChild(o));const a=this.hot.rootDocument.createElement("button");a.className=Wu,a.type="button",a.tabIndex=-1,this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(a,[Object(y["n"])(),Object(y["p"])(" ")]),Object(i["setAttribute"])(t,[Object(y["m"])("menu")])),a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}function Qu(){this.hot.runHooks("beforeDropdownMenuShow",this)}function Zu(){this.hot.runHooks("afterDropdownMenuShow",this),Uu(Ku,this,$u).call(this,this.menu)}function eh(e){Uu(Ku,this,$u).call(this,e)}function th(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function nh(e){return Fu(zu,this)?null:e}function rh(e){Object(i["hasClass"])(e.target,Wu)&&Yu(zu,this,!0)}function ih(e,t,n){return t=sh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sh(e){var t=oh(e,"string");return"symbol"==typeof t?t:t+""}function oh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Xu.SEPARATOR={name:Js};class ah{constructor(e){ih(this,"hot",void 0),ih(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:n,endCol:r}=this._getDataRange(),i=this.options,s=[];return Object(rt["rangeEach"])(e,n,e=>{const n=[];!i.exportHiddenRows&&this._isHiddenRow(e)||(Object(rt["rangeEach"])(t,r,t=>{!i.exportHiddenColumns&&this._isHiddenColumn(t)||n.push(this.hot.getDataAtCell(e,t))}),s.push(n))}),s}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:n}=this._getDataRange(),r=this.hot.getRowHeader();Object(rt["rangeEach"])(t,n,t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(r[t])})}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:n}=this._getDataRange(),r=this.hot.getColHeader();Object(rt["rangeEach"])(t,n,t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(r[t])})}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[n=0,r=0,i=t,s=e]=this.options.range;return n=Math.max(n,0),r=Math.max(r,0),i=Math.min(i,t),s=Math.min(s,e),{startRow:n,startCol:r,endRow:i,endCol:s}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}var lh=ah;function ch(e,t,n){return t=uh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uh(e){var t=hh(e,"string");return"symbol"==typeof t?t:t+""}function hh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class dh{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){ch(this,"dataProvider",void 0),ch(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=Object(o["clone"])(this.constructor.DEFAULT_OPTIONS);const n=new Date;return t=Object(o["extend"])(Object(o["clone"])(dh.DEFAULT_OPTIONS),t),t=Object(o["extend"])(t,e),t.filename=Object(m["substitute"])(t.filename,{YYYY:n.getFullYear(),MM:(""+(n.getMonth()+1)).padStart(2,"0"),DD:(""+n.getDate()).padStart(2,"0")}),t}}var mh=dh;const fh=String.fromCharCode(13),ph=String.fromCharCode(34),gh=String.fromCharCode(10);class yh extends mh{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const r=n.length>0,i=this.dataProvider.getRowHeaders(),s=i.length>0;let o=e.bom?String.fromCharCode(65279):"";return r&&(n=Object(h["arrayMap"])(n,e=>this._escapeCell(e,!0)),s&&(o+=e.columnDelimiter),o+=n.join(e.columnDelimiter),o+=e.rowDelimiter),Object(h["arrayEach"])(t,(t,n)=>{n>0&&(o+=e.rowDelimiter),s&&(o+=this._escapeCell(i[n])+e.columnDelimiter),o+=t.map(e=>this._escapeCell(e)).join(e.columnDelimiter)}),o}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object(d["stringify"])(e);return""!==n&&(t||n.indexOf(fh)>=0||n.indexOf(ph)>=0||n.indexOf(gh)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replace(new RegExp('"',"g"),'""'),n=`"${n}"`),n}}var wh=yh;const bh="csv",_h={[bh]:wh};function vh(e,t,n){return"function"===typeof _h[e]?new _h[e](t,n):null}const Sh="exportFile",Eh=240;class Ch extends en["a"]{static get PLUGIN_KEY(){return Sh}static get PLUGIN_PRIORITY(){return Eh}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:n,rootWindow:r}=this.hot,i=this._createTypeFormatter(e,t),s=this._createBlob(i),o=r.URL||r.webkitURL,a=n.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const e=o.createObjectURL(s);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),n.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),n.body.removeChild(a),setTimeout(()=>{o.revokeObjectURL(e)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(s,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!_h[e])throw new Error(`Export format type "${e}" is not supported.`);return vh(e,new lh(this.hot),t)}_createBlob(e){let t=null;return"undefined"!==typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}n("24b9e");function Th(e,t,n){return t=Mh(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mh(e){var t=Rh(e,"string");return"symbol"==typeof t?t:t+""}function Rh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Oh{constructor(e,t){let{id:n,stateless:r=!0}=t;Th(this,"hot",void 0),Th(this,"id",void 0),Th(this,"elements",[]),Th(this,"hidden",!1),Th(this,"stateId",""),Th(this,"state",void 0),this.hot=e,this.id=n,this.stateId="Filters.component."+this.id,this.state=r?null:this.hot.columnIndexMapper.registerMap(this.stateId,new ci["a"])}getElements(){return this.elements}reset(){Object(h["arrayEach"])(this.elements,e=>e.reset())}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),Object(h["arrayEach"])(this.elements,e=>e.destroy()),this.state=null,this.elements=null,this.hot=null}}Object(o["mixin"])(Oh,Bs["a"]);const Nh={};function Ah(e,t){if(!Nh[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:r}=Nh[e];let i=t;return r.inputValuesDecorator&&(i=r.inputValuesDecorator(i)),function(e){return n.apply(e.meta.instance,[].concat([e],[i]))}}function Lh(e){if(!Nh[e])throw Error(`Filter condition "${e}" does not exist.`);return Nh[e].descriptor}function Ih(e,t,n){n.key=e,Nh[e]={condition:t,descriptor:n}}const xh="none";function kh(){return!0}Ih(xh,kh,{name:je["FILTERS_CONDITIONS_NONE"],inputsCount:0,showOperators:!1});const Dh="empty";function Hh(e){return Object(d["isEmpty"])(e.value)}Ih(Dh,Hh,{name:je["FILTERS_CONDITIONS_EMPTY"],inputsCount:0,showOperators:!0});const Ph="not_empty";function jh(e,t){return!Ah(Dh,t)(e)}Ih(Ph,jh,{name:je["FILTERS_CONDITIONS_NOT_EMPTY"],inputsCount:0,showOperators:!0});const Fh="eq";function Yh(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale)===Object(d["stringify"])(n)}Ih(Fh,Yh,{name:je["FILTERS_CONDITIONS_EQUAL"],inputsCount:1,showOperators:!0});const Uh="neq";function Vh(e,t){return!Ah(Fh,t)(e)}Ih(Uh,Vh,{name:je["FILTERS_CONDITIONS_NOT_EQUAL"],inputsCount:1,showOperators:!0});const Bh="gt";function Wh(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>r}Ih(Bh,Wh,{name:je["FILTERS_CONDITIONS_GREATER_THAN"],inputsCount:1,showOperators:!0});const Gh="gte";function zh(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>=r}Ih(Gh,zh,{name:je["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Kh="lt";function Xh(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<r}Ih(Kh,Xh,{name:je["FILTERS_CONDITIONS_LESS_THAN"],inputsCount:1,showOperators:!0});const $h="lte";function qh(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<=r}Ih($h,qh,{name:je["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Jh="date_after";function Qh(e,t){let[n]=t;const r=L(e.value,e.meta.dateFormat),i=L(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)>=0}Ih(Jh,Qh,{name:je["FILTERS_CONDITIONS_AFTER"],inputsCount:1,showOperators:!0});const Zh="date_before";function ed(e,t){let[n]=t;const r=L(e.value,e.meta.dateFormat),i=L(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)<=0}Ih(Zh,ed,{name:je["FILTERS_CONDITIONS_BEFORE"],inputsCount:1,showOperators:!0});const td="between";function nd(e,t){let[n,r]=t,i=n,s=r;if("numeric"===e.meta.type){const e=parseFloat(i,10),t=parseFloat(s,10);i=Math.min(e,t),s=Math.max(e,t)}else if("date"===e.meta.type){const t=Ah(Zh,[s]),n=Ah(Jh,[i]);return t(e)&&n(e)}return e.value>=i&&e.value<=s}Ih(td,nd,{name:je["FILTERS_CONDITIONS_BETWEEN"],inputsCount:2,showOperators:!0});const rd="not_between";function id(e,t){return!Ah(td,t)(e)}Ih(rd,id,{name:je["FILTERS_CONDITIONS_NOT_BETWEEN"],inputsCount:2,showOperators:!0});const sd="begins_with";function od(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).startsWith(Object(d["stringify"])(n))}Ih(sd,od,{name:je["FILTERS_CONDITIONS_BEGINS_WITH"],inputsCount:1,showOperators:!0});const ad="ends_with";function ld(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).endsWith(Object(d["stringify"])(n))}Ih(ad,ld,{name:je["FILTERS_CONDITIONS_ENDS_WITH"],inputsCount:1,showOperators:!0});const cd="contains";function ud(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).indexOf(Object(d["stringify"])(n))>=0}Ih(cd,ud,{name:je["FILTERS_CONDITIONS_CONTAINS"],inputsCount:1,showOperators:!0});const hd="not_contains";function dd(e,t){return!Ah(cd,t)(e)}Ih(hd,dd,{name:je["FILTERS_CONDITIONS_NOT_CONTAIN"],inputsCount:1,showOperators:!0});const md="date_tomorrow";function fd(e){const t=L(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(L().subtract(-1,"days").startOf("day"),"d")}Ih(md,fd,{name:je["FILTERS_CONDITIONS_TOMORROW"],inputsCount:0});const pd="date_today";function gd(e){const t=L(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(L().startOf("day"),"d")}Ih(pd,gd,{name:je["FILTERS_CONDITIONS_TODAY"],inputsCount:0});const yd="date_yesterday";function wd(e){const t=L(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(L().subtract(1,"days").startOf("day"),"d")}Ih(yd,wd,{name:je["FILTERS_CONDITIONS_YESTERDAY"],inputsCount:0});const bd="numeric",_d="text",vd="date",Sd={[bd]:[xh,Js,Dh,Ph,Js,Fh,Uh,Js,Bh,Gh,Kh,$h,td,rd],[_d]:[xh,Js,Dh,Ph,Js,Fh,Uh,Js,sd,ad,Js,cd,hd],[vd]:[xh,Js,Dh,Ph,Js,Fh,Uh,Js,Zh,Jh,td,Js,md,pd,yd]};function Ed(e){const t=[];let n=e;return Sd[n]||(n=_d),Object(h["arrayEach"])(Sd[n],e=>{let n;n=e===Js?{name:Js}:Object(o["clone"])(Lh(e)),t.push(n)}),t}function Cd(e,t,n){return t=Td(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Td(e){var t=Md(e,"string");return"symbol"==typeof t?t:t+""}function Md(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Rd="built",Od="building",Nd=["click","input","keydown","keypress","keyup","focus","blur","change"];class Ad{static get DEFAULTS(){return Object(o["clone"])({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){Cd(this,"hot",void 0),Cd(this,"eventManager",new Ie["a"](this)),Cd(this,"options",void 0),Cd(this,"_element",void 0),Cd(this,"buildState",void 0),this.hot=e,this.options=Object(o["extend"])(Ad.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===Od?this._element:this.buildState===Rd?(this.update(),this._element):(this.buildState=Od,this.build(),this.buildState=Rd,this._element)}isBuilt(){return this.buildState===Rd}translateIfPossible(e){return"string"===typeof e&&e.startsWith(je["FILTERS_NAMESPACE"])?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,e=>this.runLocalHooks(t,e,this))};if(this.buildState||(this.buildState=Od),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&Object(i["addClass"])(this._element,this.options.className),this.options.children.length)Object(h["arrayEach"])(this.options.children,e=>this._element.appendChild(e.element));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),Object(o["objectEach"])(this.options,(e,n)=>{void 0!==t[n]&&"className"!==n&&"tagName"!==n&&"children"!==n&&(t[n]=this.translateIfPossible(e))}),this._element.appendChild(t),Object(h["arrayEach"])(Nd,n=>e(t,n))}else Object(h["arrayEach"])(Nd,t=>e(this._element,t))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}function Ld(e,t){xd(e,t),t.add(e)}function Id(e,t,n){xd(e,t),t.set(e,n)}function xd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kd(e,t){return e.get(Hd(e,t))}function Dd(e,t,n){return e.set(Hd(e,t),n),n}function Hd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(Ad,Bs["a"]);var Pd=new WeakMap,jd=new WeakSet;class Fd extends Ad{static get DEFAULTS(){return Object(o["clone"])({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(Fd.DEFAULTS,t)),Ld(this,jd),Id(this,Pd,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",e=>Hd(jd,this,Yd).call(this,e))}build(){super.build();const e=this.hot.rootDocument.createElement("div");Dd(Pd,this,this._element.firstChild),Object(i["addClass"])(this._element,"htUIInput"),Object(i["addClass"])(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(kd(Pd,this).type=this.options.type,kd(Pd,this).placeholder=this.translateIfPossible(this.options.placeholder),kd(Pd,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&kd(Pd,this).focus()}}function Yd(e){this.options.value=e.target.value}function Ud(e,t){Bd(e,t),t.add(e)}function Vd(e,t,n){Bd(e,t),t.set(e,n)}function Bd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wd(e,t,n){return e.set(zd(e,t),n),n}function Gd(e,t){return e.get(zd(e,t))}function zd(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Kd=new WeakMap,Xd=new WeakMap,$d=new WeakMap,qd=new WeakMap,Jd=new WeakMap,Qd=new WeakSet;class Zd extends Ad{static get DEFAULTS(){return Object(o["clone"])({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(Zd.DEFAULTS,t)),Ud(this,Qd),Vd(this,Kd,null),Vd(this,Xd,[]),Vd(this,$d,void 0),Vd(this,qd,void 0),Vd(this,Jd,void 0),this.registerHooks()}getMenu(){return Gd(Kd,this)}registerHooks(){this.addLocalHook("click",()=>zd(Qd,this,nm).call(this))}setItems(e){Wd(Xd,this,this.translateNames(e)),Gd(Kd,this)&&Gd(Kd,this).setMenuItems(Gd(Xd,this))}translateNames(e){return Object(h["arrayEach"])(e,e=>{e.name=this.translateIfPossible(e.name)}),e}build(){super.build(),Wd(Kd,this,new Cl(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),Gd(Kd,this).setMenuItems(Gd(Xd,this));const e=new Ad(this.hot,{className:"htUISelectCaption"}),t=new Ad(this.hot,{className:"htUISelectDropdown"});Wd($d,this,e),Wd(qd,this,e.element),Wd(Jd,this,t),this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(t.element,[Object(y["n"])()]),Object(i["setAttribute"])(this._element,[Object(y["q"])()])),Object(h["arrayEach"])([e,t],e=>this._element.appendChild(e.element)),Gd(Kd,this).addLocalHook("select",e=>zd(Qd,this,em).call(this,e)),Gd(Kd,this).addLocalHook("afterClose",()=>zd(Qd,this,tm).call(this)),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:Gd(Kd,this).hot.getTranslatedPhrase(je["FILTERS_CONDITIONS_NONE"]),Gd(qd,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();Gd(Kd,this)&&(Gd(Kd,this).open(),Gd(Kd,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),Gd(Kd,this).getNavigator().toFirstItem(),Gd(Kd,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){Gd(Kd,this)&&Gd(Kd,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){Gd(Kd,this)&&(Gd(Kd,this).destroy(),Wd(Kd,this,null)),Gd($d,this)&&Gd($d,this).destroy(),Gd(Jd,this)&&Gd(Jd,this).destroy(),super.destroy()}}function em(e){e.name!==Js&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function tm(){this.runLocalHooks("afterClose")}function nm(){this.openOptions()}function rm(e,t){im(e,t),t.add(e)}function im(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sm(e,t,n){return t=om(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function om(e){var t=am(e,"string");return"symbol"==typeof t?t:t+""}function am(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function lm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cm=new WeakSet;class um extends Oh{constructor(e,t){super(e,{id:t.id,stateless:!1}),rm(this,cm),sm(this,"name",""),sm(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new Zd(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new Fd(this.hot,{placeholder:je["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]})),this.elements.push(new Fd(this.hot,{placeholder:je["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",e=>lm(cm,this,hm).call(this,e)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",e=>this.runLocalHooks("selectTabKeydown",e)),Object(h["arrayEach"])(this.getInputElements(),e=>{e.addLocalHook("keydown",e=>lm(cm,this,dm).call(this,e))})}setState(e){if(this.reset(),!e)return;const t=Object(o["clone"])(e.command);t.name.startsWith(je["FILTERS_CONDITIONS_NAMESPACE"])&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),Object(h["arrayEach"])(e.args,(e,n)=>{if(n>t.inputsCount-1)return!1;const r=this.getInputElement(n);r.setValue(e),r[t.inputsCount>n?"show":"hide"](),n||this.hot._registerTimeout(()=>r.focus(),10)})}getState(){const e=this.getSelectElement().getValue()||Lh(xh),t=[];return Object(h["arrayEach"])(this.getInputElements(),(n,r)=>{e.inputsCount>r&&t.push(n.getValue())}),{command:e,args:t}}updateState(e,t){const n=Lh(e?e.name:xh);this.state.setValueAtIndex(t,{command:n,args:e?e.args:[]}),e||Object(h["arrayEach"])(this.getInputElements(),e=>e.setValue(null))}getSelectElement(){return this.elements.filter(e=>e instanceof Zd)[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter(e=>e instanceof Fd)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,s,o)=>{Object(i["addClass"])(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&Object(i["addClass"])(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return Object(i["addClass"])(a,"htFiltersMenuLabel"),a.textContent=o,t.appendChild(a),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[Lh(xh)];if(null!==e){const{visualIndex:n}=e;t=Ed(this.hot.getDataType(0,n,this.hot.countRows(),n))}Object(h["arrayEach"])(this.getInputElements(),e=>e.hide()),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function hm(e){Object(h["arrayEach"])(this.getInputElements(),(t,n)=>{t[e.inputsCount>n?"show":"hide"](),0===n&&this.hot._registerTimeout(()=>t.focus(),10)}),this.runLocalHooks("change",e)}function dm(e){Object(f["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}const mm={};function fm(e){if(!mm[e])throw Error(`Operation with id "${e}" does not exist.`);const t=mm[e].func;return function(e,n){return t(e,n)}}function pm(e){return mm[e].name}function gm(e,t,n){mm[e]={name:t,func:n}}const ym="conjunction",wm=je["FILTERS_LABELS_CONJUNCTION"];function bm(e,t){return e.every(e=>e.func(t))}gm(ym,wm,bm);const _m="disjunction",vm=je["FILTERS_LABELS_DISJUNCTION"];function Sm(e,t){return e.some(e=>e.func(t))}gm(_m,vm,Sm);const Em="disjunctionWithExtraCondition",Cm=je["FILTERS_LABELS_DISJUNCTION"];function Tm(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some(e=>e.func(t))&&e[e.length-1].func(t)}function Mm(e,t,n){Rm(e,t),t.set(e,n)}function Rm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Om(e,t){return e.get(Am(e,t))}function Nm(e,t,n){return e.set(Am(e,t),n),n}function Am(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}gm(Em,Cm,Tm);var Lm=new WeakMap,Im=new WeakMap;class xm extends Ad{static get DEFAULTS(){return Object(o["clone"])({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,Object(o["extend"])(xm.DEFAULTS,t)),Mm(this,Lm,void 0),Mm(this,Im,void 0)}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),Nm(Im,this,e),Nm(Lm,this,this._element.firstChild),Om(Lm,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(Om(Im,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&Om(Lm,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(Om(Lm,this).checked=e)}focus(){this.isBuilt()&&Om(Lm,this).focus()}}function km(e,t){Dm(e,t),t.add(e)}function Dm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hm(e,t,n){return t=Pm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pm(e){var t=jm(e,"string");return"symbol"==typeof t?t:t+""}function jm(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Fm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ym=0;var Um=new WeakSet;class Vm extends Oh{constructor(e,t){super(e,{id:t.id,stateless:!1}),km(this,Um),Hm(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(Object(i["addClass"])(t.parentNode,"htFiltersMenuOperators"),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}buildOperatorsElement(){const e=[ym,_m];Object(h["arrayEach"])(e,t=>{const n=new xm(this.hot,{name:"operator",label:{htmlFor:t,textContent:pm(t)},value:t,checked:t===e[Ym],id:t});n.addLocalHook("change",e=>Fm(Um,this,Bm).call(this,e)),this.elements.push(n)})}setChecked(e){if(this.elements.length<e)throw Error(Es["a"]`Radio button with index ${e} doesn't exist.`);Object(h["arrayEach"])(this.elements,(t,n)=>{t.setChecked(n===e)})}getActiveOperationId(){const e=this.elements.find(e=>e instanceof xm&&e.isChecked());return e?e.getValue():ym}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&Object(h["arrayEach"])(this.elements,t=>{t.setChecked(t.getValue()===e)})}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ym,t=arguments.length>1?arguments[1]:void 0,n=e;n===Em&&(n=_m),this.state.setValueAtIndex(t,n)}reset(){this.setChecked(Ym)}}function Bm(e){this.setState(e.target.value)}Object(tn["getComparisonFunction"])();function Wm(e,t){let n=e;return""===n&&(n=`(${t})`),n}const Gm=new Set([1]).has(1),zm=Gm&&"function"===typeof Array.from;function Km(e){let t=e;return Gm&&(t=new Set(t)),function(e){let n;return n=Gm?t.has(e):!!~t.indexOf(e),n}}function Xm(e){return null===e||void 0===e?"":e}function $m(e){let t=e;return t=zm?Array.from(new Set(t)):Object(h["arrayUnique"])(t),t=t.sort((e,t)=>"number"===typeof e&&"number"===typeof t?e-t:e===t?0:e>t?1:-1),t}function qm(e,t,n,r){const i=[],s=e===t;let o;return s||(o=Km(t)),Object(h["arrayEach"])(e,e=>{let t=!1;(s||o(e))&&(t=!0);const a={checked:t,value:e,visualValue:Wm(e,n)};r&&r(a),i.push(a)}),i}var Jm=n("480c");function Qm(e,t,n){Zm(e,t),t.set(e,n)}function Zm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ef(e,t){return e.get(nf(e,t))}function tf(e,t,n){return e.set(nf(e,t),n),n}function nf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var rf=new WeakMap;class sf extends Ad{static get DEFAULTS(){return Object(o["clone"])({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,Object(o["extend"])(sf.DEFAULTS,t)),Qm(this,rf,void 0)}build(){super.build(),tf(rf,this,this._element.firstChild)}update(){this.isBuilt()&&(ef(rf,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&ef(rf,this).focus()}activate(){ef(rf,this).click()}}function of(e,t){lf(e,t),t.add(e)}function af(e,t,n){lf(e,t),t.set(e,n)}function lf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cf(e,t){return e.get(hf(e,t))}function uf(e,t,n){return e.set(hf(e,t),n),n}function hf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const df="multipleSelect.itemBox";var mf=new WeakMap,ff=new WeakMap,pf=new WeakMap,gf=new WeakMap,yf=new WeakMap,wf=new WeakMap,bf=new WeakSet;class _f extends Ad{static get DEFAULTS(){return Object(o["clone"])({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,Object(o["extend"])(_f.DEFAULTS,t)),of(this,bf),af(this,mf,[]),af(this,ff,void 0),af(this,pf,void 0),af(this,gf,void 0),af(this,yf,void 0),af(this,wf,void 0),uf(gf,this,new Fd(this.hot,{placeholder:je["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"],className:"htUIMultipleSelectSearch"})),uf(yf,this,new sf(this.hot,{textContent:je["FILTERS_BUTTONS_SELECT_ALL"],className:"htUISelectAll"})),uf(wf,this,new sf(this.hot,{textContent:je["FILTERS_BUTTONS_CLEAR"],className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return cf(ff,this)}registerHooks(){cf(gf,this).addLocalHook("keydown",e=>hf(bf,this,Sf).call(this,e)),cf(gf,this).addLocalHook("input",e=>hf(bf,this,vf).call(this,e)),cf(yf,this).addLocalHook("click",e=>hf(bf,this,Ef).call(this,e)),cf(wf,this).addLocalHook("click",e=>hf(bf,this,Cf).call(this,e))}setItems(e){uf(mf,this,e),cf(ff,this)&&cf(ff,this).loadData(cf(mf,this))}setLocale(e){uf(pf,this,e)}getLocale(){return cf(pf,this)}getItems(){return[...cf(mf,this)]}getValue(){return Mf(cf(mf,this))}getSearchInputElement(){return cf(gf,this)}getSelectAllElement(){return cf(yf,this)}getClearAllElement(){return cf(wf,this)}isSelectedAllValues(){return cf(mf,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),n=new Ad(this.hot,{className:"htUISelectionControls",children:[cf(yf,this),cf(wf,this)]});this._element.appendChild(cf(gf,this).element),this._element.appendChild(n.element),this._element.appendChild(t);const r=t=>{if(!this._element)return;cf(ff,this)&&cf(ff,this).destroy(),Object(i["addClass"])(t,"htUIMultipleSelectHot"),uf(ff,this,new this.hot.constructor(t,{data:cf(mf,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,n,r,i,s)=>{e.title=s.instance.getDataAtRowProp(t,s.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{cf(ff,this).listen()},maxCols:1,autoWrapCol:!0,height:110,colWidths:()=>cf(ff,this).container.scrollWidth-Object(i["getScrollbarWidth"])(e),copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),cf(ff,this).init();const n=cf(ff,this).getShortcutManager(),r=n.getContext("grid");r.removeShortcutsByKeys(["Tab"]),r.removeShortcutsByKeys(["Shift","Tab"]),r.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:df}),r.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{cf(ff,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:df})};r(t),this.hot._registerTimeout(()=>r(t),100)}focus(){this.isBuilt()&&cf(ff,this).listen()}reset(){cf(gf,this).reset(),cf(yf,this).reset(),cf(wf,this).reset()}update(){this.isBuilt()&&(cf(ff,this).loadData(Tf(cf(mf,this),this.options.value)),super.update())}destroy(){cf(ff,this)&&cf(ff,this).destroy(),cf(gf,this).destroy(),cf(wf,this).destroy(),cf(yf,this).destroy(),uf(gf,this,null),uf(wf,this,null),uf(yf,this,null),uf(ff,this,null),uf(mf,this,null),super.destroy()}}function vf(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let n;n=""===t?[...cf(mf,this)]:Object(h["arrayFilter"])(cf(mf,this),e=>(""+e.value).toLocaleLowerCase(this.getLocale()).indexOf(t)>=0),cf(ff,this).loadData(n)}function Sf(e){this.runLocalHooks("keydown",e,this);const t=Object(ai["partial"])(f["isKey"],e.keyCode);t("ARROW_DOWN")&&(e.preventDefault(),Object(s["stopImmediatePropagation"])(e),cf(ff,this).listen(),cf(ff,this).selectCell(0,0))}function Ef(e){const t=[];e.preventDefault(),Object(h["arrayEach"])(cf(ff,this).getSourceData(),(e,n)=>{e.checked=!0,t.push(Object(Jm["dataRowToChangesArray"])(e,n)[0])}),cf(ff,this).setSourceDataAtCell(t)}function Cf(e){const t=[];e.preventDefault(),Object(h["arrayEach"])(cf(ff,this).getSourceData(),(e,n)=>{e.checked=!1,t.push(Object(Jm["dataRowToChangesArray"])(e,n)[0])}),cf(ff,this).setSourceDataAtCell(t)}function Tf(e,t){const n=Km(t);return Object(h["arrayMap"])(e,e=>(e.checked=n(e.value),e))}function Mf(e){const t=[];return Object(h["arrayEach"])(e,e=>{e.checked&&t.push(e.value)}),t}const Rf="by_value";function Of(e,t){let[n]=t;return n(e.value)}function Nf(e,t){Af(e,t),t.add(e)}function Af(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lf(e,t,n){return t=If(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function If(e){var t=xf(e,"string");return"symbol"==typeof t?t:t+""}function xf(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function kf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Ih(Rf,Of,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[Km(t)]},showOperators:!1});var Df,Hf=new WeakSet;class Pf extends Oh{constructor(e,t){super(e,{id:t.id,stateless:!1}),Nf(this,Hf),Lf(this,"name",""),this.name=t.name,this.elements.push(new _f(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",e=>kf(Hf,this,jf).call(this,e)).addLocalHook("listTabKeydown",e=>this.runLocalHooks("listTabKeydown",e)),this.hot.addHook("modifyFiltersMultiSelectValue",(e,t)=>kf(Hf,this,Yf).call(this,e,t))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===Rf){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?xh:Rf},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,r,i,s)=>{const[o]=Object(h["arrayFilter"])(n,e=>e.name===Rf),a={},l=this.hot.getTranslatedPhrase(je["FILTERS_VALUES_BLANK_CELLS"]);if(o){const n=i(t,s),c=Object(h["arrayMap"])(n,e=>e.value),u=new Map(n.map(e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)])),d=$m(c);r&&(o.args[0]=r);const m=[],f=qm(d,o.args[0],l,e=>{e.checked&&m.push(e.value),kf(Hf,this,Ff).call(this,e,u)}),p=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,p).locale,a.args=[m],a.command=Lh(Rf),a.itemsSnapshot=f}else a.args=[],a.command=Lh(xh);this.state.setValueAtIndex(t,a)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter(e=>e instanceof _f)[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,s,o)=>{Object(i["addClass"])(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return Object(i["addClass"])(a,"htFiltersMenuLabel"),a.textContent=o,t.appendChild(a),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getTranslatedPhrase(je["FILTERS_VALUES_BLANK_CELLS"]),t=this._getColumnVisibleValues(),n=t.map(e=>e.value),r=new Map(t.map(e=>[e.value,e.meta])),i=$m(n),s=qm(i,i,e,e=>{kf(Hf,this,Ff).call(this,e,r)});this.getMultipleSelectElement().setItems(s),super.reset(),this.getMultipleSelectElement().setValue(i);const o=this.hot.getPlugin("filters").getSelectedColumn();null!==o&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,o.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:Object(h["arrayMap"])(this.hot.getDataAtCol(e.visualIndex),(t,n)=>({value:Xm(t),meta:this.hot.getCellMeta(n,e.visualIndex)}))}}function jf(e){Object(f["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}function Ff(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function Yf(e,t){switch(t.type){case"numeric":return st(e,t);default:return e}}function Uf(e,t){Vf(e,t),t.add(e)}function Vf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bf(e,t,n){return t=Wf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wf(e){var t=Gf(e,"string");return"symbol"==typeof t?t:t+""}function Gf(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function zf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Kf=new WeakSet;class Xf extends Oh{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),Uf(this,Kf),Bf(this,"name",""),this.name=t.name,this.elements.push(new Fd(this.hot,{type:"button",value:je["FILTERS_BUTTONS_OK"],className:"htUIButton htUIButtonOK",identifier:Xf.BUTTON_OK})),this.elements.push(new Fd(this.hot,{type:"button",value:je["FILTERS_BUTTONS_CANCEL"],className:"htUIButton htUIButtonCancel",identifier:Xf.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){Object(h["arrayEach"])(this.elements,e=>{e.addLocalHook("click",(e,t)=>zf(Kf,this,$f).call(this,e,t))})}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(Object(i["addClass"])(t.parentNode,"htFiltersMenuActionBar"),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function $f(e,t){t.options.identifier===Df.BUTTON_OK?this.accept():this.cancel()}function qf(e,t,n){return t=Jf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jf(e){var t=Qf(e,"string");return"symbol"==typeof t?t:t+""}function Qf(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Df=Xf;const Zf="ConditionCollection.filteringStates";class ep{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];qf(this,"hot",void 0),qf(this,"isMapRegistrable",void 0),qf(this,"filteringStates",new ci["a"]),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(Zf,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var n;const r=this.filteringStates.getValueAtIndex(t),i=null!==(n=null===r||void 0===r?void 0:r.conditions)&&void 0!==n?n:[],s=null===r||void 0===r?void 0:r.operation;return this.isMatchInConditions(i,e,s)}isMatchInConditions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ym;return!e.length||fm(n)(e,t)}addCondition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ym,r=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,s=Object(h["arrayMap"])(t.args,e=>"string"===typeof e?e.toLocaleLowerCase(i):e),o=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(Es["a"]`The column of index ${e} has been already applied with a \`${a}\`\x20
- filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
- Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
- use it consequently for a particular column).`)}else if(Object(d["isUndefined"])(mm[n]))throw new Error(Es["a"]`Unexpected operation named \`${n}\`. Possible ones are\x20
- \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:o,args:s,func:Ah(o,s)}]},r):l.push({name:o,args:s,func:Ah(o,s)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,n;return null!==(t=null===(n=this.filteringStates.getValueAtIndex(e))||void 0===n?void 0:n.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map(e=>{let[t]=e;return t})}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return Object(h["arrayReduce"])(this.filteringStates.getEntries(),(e,t)=>{let[n,{operation:r,conditions:i}]=t;return e.push({column:n,operation:r,conditions:Object(h["arrayMap"])(i,e=>{let{name:t,args:n}=e;return{name:t,args:n}})}),e},[])}importAllConditions(e){this.clean(),Object(h["arrayEach"])(e,e=>{Object(h["arrayEach"])(e.conditions,t=>this.addCondition(e.column,t))})}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const n=this.getConditions(e);return t?n.some(e=>e.name===t):n.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(Zf),this.filteringStates=null,this.clearLocalHooks()}}Object(o["mixin"])(ep,Bs["a"]);var tp=ep;function np(e,t,n){return t=rp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rp(e){var t=ip(e,"string");return"symbol"==typeof t?t:t+""}function ip(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class sp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];np(this,"conditionCollection",void 0),np(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return Object(h["arrayEach"])(this.conditionCollection.getFilteredColumns(),(t,n)=>{let r=this.columnDataFactory(t);n&&(r=this._getIntersectData(r,e)),e=this.filterByColumn(t,r)}),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];return Object(h["arrayEach"])(t,t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&n.push(t)}),n}_getIntersectData(e,t){const n=[];return Object(h["arrayEach"])(t,t=>{const r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])}),n}}var op=sp;function ap(e,t){lp(e,t),t.add(e)}function lp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cp(e,t,n){return t=up(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function up(e){var t=hp(e,"string");return"symbol"==typeof t?t:t+""}function hp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function dp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var mp=new WeakSet;class fp{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];ap(this,mp),cp(this,"hot",void 0),cp(this,"conditionCollection",void 0),cp(this,"columnDataFactory",void 0),cp(this,"changes",[]),cp(this,"grouping",!1),cp(this,"latestEditedColumnPosition",-1),cp(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",e=>dp(mp,this,pp).call(this,e)),this.conditionCollection.addLocalHook("afterRemove",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("afterAdd",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("beforeClean",()=>dp(mp,this,gp).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>dp(mp,this,yp).call(this))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,Object(h["arrayEach"])(this.changes,e=>{this.updateStatesAtColumn(e)}),this.changes.length=0}updateStatesAtColumn(e,t){var n=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const r=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);-1===i&&(i=this.latestEditedColumnPosition);const s=r.slice(0,i),o=r.slice(i);o.length&&o[0].column===e&&o.shift();const a=Object(ai["curry"])((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new tp(n.hot,!1),s=[].concat(e,r);i.importAllConditions(s);const o=n.columnDataFactory(t);let a;a=i.isEmpty()?o:new op(i,e=>n.columnDataFactory(e)).filter(),a=Object(h["arrayMap"])(a,e=>e.meta.visualRow);const l=Km(a);return i.destroy(),Object(h["arrayFilter"])(o,e=>l(e.meta.visualRow))}))(s),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:o,filteredRowsFactory:a,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),Object(o["objectEach"])(this,(e,t)=>{this[t]=null})}}function pp(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function gp(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function yp(){Object(h["arrayEach"])(this.latestOrderStack,e=>{this.updateStatesAtColumn(e)})}Object(o["mixin"])(fp,Bs["a"]);var wp=fp;function bp(e){const t=za({initialPage:0,size:()=>e.length,onItemSelect:(t,n)=>{const r=e[t];return r instanceof _f?n:!(r.element&&!Object(i["isVisible"])(r.element))&&void r.focus()}});return t}const _p="filters";function vp(e,t){let n=-1;const r=bp(t),i=n=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(_p),r.setCurrentPage(t.indexOf(n))};function s(i){const s=e.getKeyboardShortcutsCtrl(),o=i.getKeyboardShortcutsCtrl();r.clear(),o.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:s.getContext(_p),callback:()=>{i.isSubMenu()&&i.close(),s.listen(_p)}}]),i.isSubMenu()||s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const i=e.getNavigator();i.getCurrentPage()>-1&&(n=i.getCurrentPage()),i.clear(),t.shiftKey?r.toPreviousItem():r.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const n=t[r.getCurrentPage()];n instanceof Zd&&(n.openOptions(),e.preventDefault()),n instanceof sf&&(n.activate(),e.preventDefault()),n instanceof Ad||e.preventDefault()}}],_p)}function o(){e.focus(),e.getKeyboardShortcutsCtrl().listen(_p)}function a(){return n}return t.forEach(e=>{e instanceof Ad&&(e.addLocalHook("click",i(e)),e.addLocalHook("focus",i(e)),e.addLocalHook("afterClose",i(e)))}),e.addLocalHook("afterSelectionChange",e=>{e.key.startsWith("filter_")||r.clear()}),e.addLocalHook("afterSubmenuOpen",s),e.addLocalHook("afterOpen",s),{...r,listen:o,getLastMenuPage:a}}var Sp=n("00fd");function Ep(e,t){Tp(e,t),t.add(e)}function Cp(e,t,n){Tp(e,t),t.set(e,n)}function Tp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mp(e,t,n){return t=Rp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rp(e){var t=Op(e,"string");return"symbol"==typeof t?t:t+""}function Op(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Np(e,t,n){return e.set(Lp(e,t),n),n}function Ap(e,t){return e.get(Lp(e,t))}function Lp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ip="filters",xp=250,kp=Ip;var Dp=new WeakMap,Hp=new WeakSet;class Pp extends en["a"]{static get PLUGIN_KEY(){return Ip}static get PLUGIN_PRIORITY(){return xp}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){super(e),Ep(this,Hp),Mp(this,"dropdownMenuPlugin",null),Mp(this,"conditionCollection",null),Mp(this,"conditionUpdateObserver",null),Mp(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),Mp(this,"filtersRowsMap",null),Cp(this,Dp,void 0),this.hot.addHook("afterGetColHeader",(e,t)=>Lp(Hp,this,Gp).call(this,e,t))}isEnabled(){return!!this.hot.getSettings()[Ip]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Sp["a"]),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,n=e=>(e.addLocalHook("accept",()=>Lp(Hp,this,Vp).call(this,"accept")),e.addLocalHook("cancel",()=>Lp(Hp,this,Vp).call(this,"cancel")),e.addLocalHook("change",t=>Lp(Hp,this,Bp).call(this,e,t)),e),r=()=>this.hot.getTranslatedPhrase(je["FILTERS_DIVS_FILTER_BY_CONDITION"])+":",i=()=>this.hot.getTranslatedPhrase(je["FILTERS_DIVS_FILTER_BY_VALUE"])+":";if(!this.components.get("filter_by_condition")){const e=new um(this.hot,{id:"filter_by_condition",name:r,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",()=>Lp(Hp,this,Wp).call(this)),this.components.set("filter_by_condition",n(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new Vm(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new um(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",()=>Lp(Hp,this,Wp).call(this)),this.components.set("filter_by_condition2",n(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",n(new Pf(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new Xf(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new tp(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new wp(this.hot,this.conditionCollection,e=>this.getDataMapAtColumn(e)),this.conditionUpdateObserver.addLocalHook("update",e=>Lp(Hp,this,zp).call(this,e))),this.components.forEach(e=>e.show()),this.addHook("afterDropdownMenuDefaultOptions",e=>Lp(Hp,this,Up).call(this,e)),this.addHook("afterDropdownMenuShow",()=>Lp(Hp,this,Fp).call(this)),this.addHook("afterDropdownMenuHide",()=>Lp(Hp,this,Yp).call(this)),this.addHook("afterChange",e=>Lp(Hp,this,jp).call(this,e)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!Ap(Dp,this)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),n=Ap(Dp,this).getLastMenuPage();e.focus(),n>0?t.setCurrentPage(n):t.toFirstItem()}},...Array.from(this.components).map(e=>{let[,t]=e;return t.getElements()}).flat()];Np(Dp,this,vp(e,t));const n=e=>{Ap(Dp,this).listen(),e.preventDefault(),Object(f["isKey"])(e.keyCode,"TAB")&&(e.shiftKey?Ap(Dp,this).toPreviousItem():Ap(Dp,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",n),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",n)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach((e,t)=>{e.destroy(),this.components.set(t,null)}),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:kp})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(kp)}addCondition(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ym;const i=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:n},r)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),n=!this.conditionCollection.isEmpty();let r=[];const i=this.conditionCollection.exportAllConditions(),s=this.hot.runHooks("beforeFilter",i);if(!1!==s)if(n){const n=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),r=Object(h["arrayMap"])(t.filter(),e=>e.meta.visualRow);const e=Km(r);Object(rt["rangeEach"])(this.hot.countSourceRows()-1,t=>{e(t)||n.push(t)}),Object(h["arrayEach"])(n,e=>{this.filtersRowsMap.setValueAtIndex(e,!0)})},!0),e||r.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",i),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),n=[];return Object(h["arrayEach"])(this.hot.getSourceDataAtCol(t),(e,r)=>{var i;const{row:s,col:o,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:h,locale:d}=this.hot.getCellMeta(r,t),m=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(r),t))&&void 0!==i?i:e;n.push({meta:{row:s,col:o,visualCol:a,visualRow:l,type:c,instance:u,dateFormat:h,locale:d},value:Xm(m)})}),n}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),n=$m(t);this.conditionUpdateObserver.updateStatesAtColumn(e,n)}restoreComponents(e){var t;const n=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach(e=>{e.isHidden()||e.restoreState(n)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,n,r){let i=e;return i===_m&&t.command.key!==xh&&n.command.key!==xh&&r.command.key!==xh?i=Em:r.command.key!==xh&&(t.command.key!==xh&&n.command.key!==xh||(i=ym)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),n=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...n):this.hideComponents(...n)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new op(e,e=>this.getDataMapAtColumn(e))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Object(h["arrayEach"])(r,n=>{Object(h["arrayEach"])(t.menuItems,(t,r)=>{t.key===n.getMenuItemDescriptor().key&&e.push(r)})}),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu,n=t.hotMenu,r=n.getPlugin("hiddenRows");for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];const a=this.getIndexesOfComponents(...s);e?r.showRows(a):r.hideRows(a),n.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function jp(e){e&&Object(h["arrayEach"])(e,e=>{const[,t]=e,n=this.hot.propToCol(t);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)})}function Fp(){this.restoreComponents(Array.from(this.components.values()))}function Yp(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function Up(e){e.items.push({name:Js}),this.components.forEach(t=>{e.items.push(t.getMenuItemDescriptor())})}function Vp(e){var t;if("accept"===e){const e=this.getSelectedColumn();var n;if(null===e)return void(null===(n=this.dropdownMenuPlugin)||void 0===n||n.close());const{physicalIndex:t}=e,r=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),s=this.components.get("filter_by_value").getState(),o=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,i,s);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),r.command.key!==xh&&(this.conditionCollection.addCondition(t,r,o,a),i.command.key!==xh&&this.conditionCollection.addCondition(t,i,o,a)),s.command.key!==xh&&this.conditionCollection.addCondition(t,s,o,a),this.conditionUpdateObserver.flush(),this.components.forEach(e=>e.saveState(t)),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function Bp(e,t){this.updateDependentComponentsVisibility(),e.constructor!==um||t.inputsCount||this.setListeningDropdownMenu()}function Wp(){this.setListeningDropdownMenu()}function Gp(e,t){const n=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(n)?Object(i["addClass"])(t,"htFiltersActive"):Object(i["removeClass"])(t,"htFiltersActive")}function zp(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:n,column:r}}=e,i=n.filter(e=>e.name===Rf),s=n.filter(e=>e.name!==Rf);if(i.length>=2||s.length>=3)Object(jr["b"])(Es["a"]`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
- The overall amount of conditions exceed the capability of the dropdown menu.\x20
- For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(r);this.components.get("filter_by_condition").updateState(s[0],r),this.components.get("filter_by_condition2").updateState(s[1],r),this.components.get("filter_operators").updateState(t,r),this.components.get("filter_by_value").updateState(e)}}n("5b82");const Kp="internal-use-in-handsontable",Xp={licenseKey:Kp,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function $p(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[oy])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function qp(e){return Object.keys(e).reduce((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t),{})}function Jp(e){var t;const n=e[oy],r=qp(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=$p(e);return{...Xp,...r,...i}}function Qp(e){var t;const n=e[oy],r=qp(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=$p(e);return{...r,...i}}function Zp(e,t){return Object.keys(t).some(n=>void 0!==t[n]&&t[n]!==e[n])}function eg(){const e="engine_relationship",t=Object(Ki["a"])(oy);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function tg(){const e="shared_engine_usage",t=Object(Ki["a"])(oy);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function ng(e){const t=e.getSettings(),n=t[oy],r=null===n||void 0===n?void 0:n.engine;if(!0===n)return null;if(Object(d["isUndefined"])(r))return null;var i;if("function"===typeof r.hyperformula||"function"===typeof r)return rg(null!==(i=r.hyperformula)&&void 0!==i?i:r,t,e);if("object"===typeof r&&Object(d["isUndefined"])(r.hyperformula)){const t=eg(),n=tg().get(r);return t.has(r)||t.set(r,[]),t.get(r).push(e),n&&n.push(e.guid),r.getConfig().licenseKey||r.updateConfig({licenseKey:Kp}),r.getConfig().leapYear1900===Xp.leapYear1900&&!1!==Object(o["isObjectEqual"])(r.getConfig().nullDate,Xp.nullDate)||Object(jr["b"])(Es["a"]`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
- settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),r}return null}function rg(e,t,n){const r=t[oy],i=Jp(t),s=eg(),o=tg();og(e,r.functions),ag(e,r.language);const a=e.buildEmpty(i);return s.set(a,[n]),o.set(a,[n.guid]),lg(a,r.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}function ig(e){var t;const n=eg(),r=0===n.size?[]:Array.from(null!==(t=n.get(e))&&void 0!==t?t:[]);return new Map(r.map(e=>[e.getPlugin("formulas").sheetId,e]))}function sg(e,t){if(e){const n=eg(),r=n.get(e),i=tg(),s=i.get(e);r&&r.includes(t)&&(r.splice(r.indexOf(t),1),0===r.length&&n.delete(e)),s&&s.includes(t.guid)&&(s.splice(s.indexOf(t.guid),1),0===s.length&&(i.delete(e),e.destroy()))}}function og(e,t){t&&t.forEach(t=>{const{name:n,plugin:r,translations:i}=t;try{e.registerFunction(n,r,i)}catch(s){Object(jr["b"])(s.message)}})}function ag(e,t){if(t){const{langCode:r}=t;try{e.registerLanguage(r,t)}catch(n){Object(jr["b"])(n.message)}}}function lg(e,t){t&&(e.suspendEvaluation(),t.forEach(t=>{const{name:n,expression:r,scope:i,options:s}=t;try{e.addNamedExpression(n,r,i,s)}catch(o){Object(jr["b"])(o.message)}}),e.resumeEvaluation())}function cg(e,t){return!Object(d["isUndefined"])(t)&&e.doesSheetExist(t)||(t=e.addSheet(t)),t}const ug="DD/MM/YYYY";function hg(e){return"string"===typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}function dg(e){return hg(e)?e.substr(1):e}function mg(e){return"string"===typeof e&&e.startsWith("=")}function fg(e,t){return"string"===typeof e&&"date"===t}function pg(e,t){return L(e,t,!0).isValid()}function gg(e,t){return L(e,t,!0).format(ug)}function yg(e,t){return L(e,ug,!0).format(t)}function wg(e,t){const n=-1,r=new Date(Date.UTC(0,0,e+n));return L(r).format(t)}function bg(e,t,n){const r=Array.from(Array(n).keys()).filter(t=>!1===e.includes(t));var i;return 0===t?null!==(i=r[t])&&void 0!==i?i:0:r[t-1]+1}function _g(e,t){const n=[];return e.forEach(e=>{const r={from:e,to:t};n.forEach(e=>{const t=e.from>e.to,n=e.to<=r.from,i=e.from>r.from;i&&n&&t&&(r.from+=1)}),r.from>=t&&(t+=1),n.push(r)}),n}function vg(e){return e.forEach((t,n)=>{const r=e.slice(n+1);r.forEach(e=>{const n=e.from<e.to;e.from>t.from&&n&&(e.from-=1)})}),e}function Sg(e,t,n){const r=_g(e,bg(e,t,n));return vg(r)}function Eg(e,t,n){Cg(e,t),t.set(e,n)}function Cg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tg(e,t){return e.get(Rg(e,t))}function Mg(e,t,n){return e.set(Rg(e,t),n),n}function Rg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Og=new WeakMap,Ng=new WeakMap,Ag=new WeakMap,Lg=new WeakMap,Ig=new WeakMap,xg=new WeakMap,kg=new WeakMap;class Dg{constructor(e,t,n){Eg(this,Og,void 0),Eg(this,Ng,void 0),Eg(this,Ag,void 0),Eg(this,Lg,[]),Eg(this,Ig,[]),Eg(this,xg,void 0),Eg(this,kg,[]),Mg(Og,this,e),Mg(Ng,this,t),Mg(Ag,this,n)}setRemovedHfIndexes(e){return Mg(kg,this,e.map(e=>{const t=Tg(Ng,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)})),Tg(kg,this)}getRemovedHfIndexes(){return Tg(kg,this)}getHfIndexFromVisualIndex(e){const t=Tg(Ng,this).getIndexesSequence(),n=Tg(Ng,this).getNotTrimmedIndexes();return t.indexOf(n[e])}syncMoves(e){const t=1,n=`move${Object(m["toUpperCaseFirst"])(Tg(Og,this))}s`;Tg(Ag,this).getEngine().batch(()=>{e.forEach(e=>{const r=e.from!==e.to,i=e.from+1!==e.to;r&&i&&Tg(Ag,this).getEngine()[n](Tg(Ag,this).getSheetId(),e.from,t,e.to)})})}storeMovesInformation(e,t,n){!1!==n&&(Mg(Ig,this,e.map(e=>this.getHfIndexFromVisualIndex(e))),Mg(xg,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(Tg(Ag,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=Sg(Tg(Ig,this),Tg(xg,this),Tg(Ng,this).getNumberOfIndexes());null===Tg(Ag,this).getSheetId()?Tg(Ag,this).getPostponeAction(()=>this.syncMoves(n)):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${Object(m["toUpperCaseFirst"])(Tg(Og,this))}Order`;return t=>{if(Tg(Ag,this).isPerformingUndoRedo())return;const n=Tg(Ng,this).getIndexesSequence();if("update"===t&&n.length>0){const t=Tg(Lg,this).map(e=>n.indexOf(e)),r=Tg(Ag,this).getEngine().getSheetDimensions(Tg(Ag,this).getSheetId());let i;i="row"===Tg(Og,this)?r.height:r.width;const s=t.length;for(let e=s;e<i;e+=1)t.push(e);Tg(Ag,this).getEngine()[e](Tg(Ag,this).getSheetId(),t)}Mg(Lg,this,n)}}init(){Mg(Lg,this,Tg(Ng,this).getIndexesSequence())}}var Hg=Dg;function Pg(e,t,n){jg(e,t),t.set(e,n)}function jg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fg(e,t){return e.get(Ug(e,t))}function Yg(e,t,n){return e.set(Ug(e,t),n),n}function Ug(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Vg=new WeakMap,Bg=new WeakMap,Wg=new WeakMap,Gg=new WeakMap,zg=new WeakMap,Kg=new WeakMap,Xg=new WeakMap;class $g{constructor(e,t,n){Pg(this,Vg,void 0),Pg(this,Bg,void 0),Pg(this,Wg,void 0),Pg(this,Gg,!1),Pg(this,zg,!1),Pg(this,Kg,null),Pg(this,Xg,null),Yg(Vg,this,new Hg("row",e,this)),Yg(Bg,this,new Hg("column",t,this)),Yg(Wg,this,n)}getForAxis(e){return Fg("row"===e?Vg:Bg,this)}setPerformUndo(e){Yg(Gg,this,e)}setPerformRedo(e){Yg(zg,this,e)}isPerformingUndoRedo(){return Fg(Gg,this)||Fg(zg,this)}getSheetId(){return Fg(Xg,this)}getEngine(){return Fg(Kg,this)}getPostponeAction(){return Fg(Wg,this)}setupSyncEndpoint(e,t){Yg(Kg,this,e),Yg(Xg,this,t),Fg(Vg,this).init(),Fg(Bg,this).init()}}var qg=$g;function Jg(e,t){ny(e,t),t.add(e)}function Qg(e,t,n){return t=Zg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zg(e){var t=ey(e,"string");return"symbol"==typeof t?t:t+""}function ey(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ty(e,t,n){ny(e,t),t.set(e,n)}function ny(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ry(e,t,n){return e.set(sy(e,t),n),n}function iy(e,t){return e.get(sy(e,t))}function sy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const oy="formulas",ay=["maxRows","maxColumns","language"],ly=260;fe["a"].getSingleton().register("afterNamedExpressionAdded"),fe["a"].getSingleton().register("afterNamedExpressionRemoved"),fe["a"].getSingleton().register("afterSheetAdded"),fe["a"].getSingleton().register("afterSheetRemoved"),fe["a"].getSingleton().register("afterSheetRenamed"),fe["a"].getSingleton().register("afterFormulasValuesUpdate");const cy=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var uy=new WeakMap,hy=new WeakMap,dy=new WeakMap,my=new WeakSet;class fy extends en["a"]{constructor(){var e;super(...arguments),e=this,Jg(this,my),ty(this,uy,!1),ty(this,hy,!1),ty(this,dy,[["valuesUpdated",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sy(my,e,xy).call(e,...n)}],["namedExpressionAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sy(my,e,ky).call(e,...n)}],["namedExpressionRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sy(my,e,Dy).call(e,...n)}],["sheetAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sy(my,e,Hy).call(e,...n)}],["sheetRenamed",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sy(my,e,Py).call(e,...n)}],["sheetRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sy(my,e,jy).call(e,...n)}]]),Qg(this,"staticRegister",Object(Ki["a"])("formulas")),Qg(this,"engine",null),Qg(this,"sheetName",null),Qg(this,"indexSyncer",null),Qg(this,"rowAxisSyncer",null),Qg(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return oy}static get PLUGIN_PRIORITY(){return ly}static get SETTING_KEYS(){return[oy,...ay]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[oy]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=ng(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,yy).call(t,...n)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,by).call(t,...n)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,yy).call(t,...n)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,by).call(t,...n)})),this.addHook("modifyData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,_y).call(t,...n)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,vy).call(t,...n)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,py).call(t,...n)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Ey).call(t,...n)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Sy).call(t,...n)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Sy).call(t,...n)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Cy).call(t,...n)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Ty).call(t,...n)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Oy).call(t,...n)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Ny).call(t,...n)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,My).call(t,...n)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Ry).call(t,...n)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Ay).call(t,...n)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Ly).call(t,...n)})),this.indexSyncer=new qg(this.hot.rowIndexMapper,this.hot.columnIndexMapper,e=>{this.hot.addHookOnce("init",()=>{e()})}),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",(e,t,n,r)=>{this.rowAxisSyncer.storeMovesInformation(e,t,r)}),this.hot.addHook("beforeColumnMove",(e,t,n,r)=>{this.columnAxisSyncer.storeMovesInformation(e,t,r)}),this.hot.addHook("afterRowMove",(e,t,n,r,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(r,i)}),this.hot.addHook("afterColumnMove",(e,t,n,r,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(r,i)}),this.hot.addHook("beforeColumnFreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)}),this.hot.addHook("afterColumnFreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.hot.addHook("beforeColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)}),this.hot.addHook("afterColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,wy).call(t,...n)})),this.addHook("beforeUndo",()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()}),this.addHook("beforeRedo",()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformUndo(!1)}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformRedo(!1)}),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,Iy).call(t,...n)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return sy(my,t,gy).call(t,...n)})),iy(dy,this).forEach(e=>{let[t,n]=e;return this.engine.on(t,n)}),super.enablePlugin()}else Object(jr["b"])("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){iy(dy,this).forEach(e=>{let[t,n]=e;return this.engine.off(t,n)}),sg(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=Qp(this.hot.getSettings());Zp(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const n=this.hot.getSettings()[oy];if(Object(d["isDefined"])(n)&&Object(d["isDefined"])(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[oy].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!==e&&void 0!==e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){iy(dy,this).forEach(e=>{var t;let[n,r]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(n,r)}),ry(dy,this,null),sg(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if(Object(d["isDefined"])(t)&&!Object(Jm["isArrayOfArrays"])(t))return Object(jr["b"])("The provided data should be an array of arrays."),!1;if(void 0!==e&&null!==e&&this.engine.doesSheetExist(e))return Object(jr["b"])("Sheet with the provided name already exists."),!1;try{const n=this.engine.addSheet(null!==e&&void 0!==e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(n),t),n}catch(n){return Object(jr["b"])(n.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void Object(jr["a"])(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,Object(m["toUpperCaseFirst"])(oy)+".switchSheet")}getCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const r=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);return null!==r&&null!==i?this.engine.getCellType({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Set;e.forEach(e=>{var t;const r=null===e||void 0===e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==r&&(n.has(r)||n.add(r))}),ig(this.engine).forEach((e,r)=>{var i;(t||r!==this.sheetId)&&n.has(r)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())})}validateDependentCells(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e=>{var t;const{row:n,col:r,sheet:i}=null!==(t=null===e||void 0===e?void 0:e.address)&&void 0!==t?t:{};return Object(d["isDefined"])(i)?`${i}:${n}x${r}`:""},r=new Set(t.map(e=>n(e)));e.forEach(e=>{var t,i;const{row:s,col:o}=null!==(t=e.address)&&void 0!==t?t:{};if(!1===Object(d["isDefined"])(s)||!1===Object(d["isDefined"])(o)||s>=this.hot.countRows()||o>=this.hot.countCols())return;const a=null===e||void 0===e||null===(i=e.address)||void 0===i?void 0:i.sheet,l=n(e);if(void 0!==a&&!r.has(l)){const e=ig(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(s,o),e.getCellMeta(s,o),()=>{})}})}syncChangeWithEngine(e,t,n){const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(r))return void Object(jr["b"])("Not possible to set cell data at "+JSON.stringify(r));const i=this.hot.getCellMeta(e,t);return fg(n,i.type)&&(pg(n,i.dateFormat)?n=gg(n,i.dateFormat):!1===mg(n)&&(n="'"+n)),this.engine.setCellContents(r,n)}}function py(e,t,n){const r=this.hot.propToCol(n);if(this.isFormulaCellType(t,r)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId},n=this.hot.getCellMeta(t,r);let i=this.engine.getCellValue(e);return"date"===n.type&&Object(rt["isNumeric"])(i)&&(i=wg(i,n.dateFormat)),"object"===typeof i&&null!==i?i.value:i}return e}function gy(e,t,n){const{row:r,col:i}=t.getTopStartCorner(),{row:s,col:o}=t.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:c,col:u}=n.getBottomEndCorner(),h={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId}},d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(c),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(u),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(d))return!1;const m=this.engine.getFillRangeData(h,d),{row:f,col:p}=h.start,{row:g,col:y}=h.end,w=g-f+1,b=y-p+1;for(let _=0;_<m.length;_+=1)for(let e=0;e<m[_].length;e+=1){const t=m[_][e],n=_%w,r=e%b,i=this.hot.getCellMeta(n,r);fg(t,i.type)&&(t.startsWith("'")?m[_][e]=t.slice(1):!1===this.isFormulaCellType(n,r,this.sheetId)&&(m[_][e]=yg(t,i.dateFormat)))}return m}function yy(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.includes(Object(m["toUpperCaseFirst"])(oy))||ry(hy,this,Object(d["isUndefined"])(this.hot.getSettings().data))}function wy(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach((n,r)=>{n.forEach((n,i)=>{const s=this.hot.getCellMeta(r,i),o=s.dateFormat;fg(n,s.type)&&(t=!0,pg(n,o)?e[r][i]=gg(n,o):!1===this.isFormulaCellType(r,i)&&(e[r][i]="'"+n))})}),!0===t&&(ry(uy,this,!0),this.engine.setSheetContent(this.sheetId,e),ry(uy,this,!1))}function by(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!n.includes(Object(m["toUpperCaseFirst"])(oy)))if(this.sheetName=cg(this.engine,this.hot.getSettings()[oy].sheetName),iy(hy,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){ry(uy,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),ry(uy,this,!1)}}}function _y(e,t,n,r){if("get"!==r||iy(uy,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e);if(null===i||null===t)return;const s=this.isFormulaCellType(i,t);if(!s){const e=this.getCellType(i,t);if("ARRAY"!==e)return void(hg(n.value)&&(n.value=dg(n.value)))}const o={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let a=this.engine.getCellValue(o),l=this.hot.getCellsMeta().find(e=>e.visualRow===i&&e.visualCol===t);void 0===l&&(l={}),"date"===l.type&&Object(rt["isNumeric"])(a)&&(a=wg(a,l.dateFormat));const c="object"===typeof a&&null!==a?a.value:a;n.value=c}function vy(e,t,n,r){if("get"!==r||iy(uy,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e),s=this.hot.propToCol(t);if(null===i||null===s)return;const o=this.isFormulaCellType(i,s);if(!o){const e=this.getCellType(i,s);if("ARRAY"!==e)return}const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function Sy(e,t){if(cy(t))return;const n=[],r=[],i=this.engine.batch(()=>{e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(o),c={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,o,s):n.push([t,o,s]),r.push({address:c})})});n.length&&this.hot.addHookOnce("afterChange",()=>{const e=this.engine.batch(()=>{n.forEach(e=>{let[t,n,r]=e;this.syncChangeWithEngine(t,n,r)})});this.renderDependentSheets(e,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,r)}function Ey(e,t){if(cy(t))return;const n=[],r=[];e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i);if(!Object(rt["isNumeric"])(o))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(r.push({address:a}),n.push(...this.engine.setCellContents(a,s))):Object(jr["b"])("Not possible to set source cell data at "+JSON.stringify(a))}),this.renderDependentSheets(n),this.validateDependentCells(n,r)}function Cy(e,t){let n=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[n,t]))return!1}function Ty(e,t){let n=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[n,t]))return!1}function My(e,t,n){const r=this.rowAxisSyncer.setRemovedHfIndexes(n),i=r.every(e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1]));return!1!==i&&void 0}function Ry(e,t,n){const r=this.columnAxisSyncer.setRemovedHfIndexes(n),i=r.every(e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1]));return!1!==i&&void 0}function Oy(e,t,n){if(cy(n))return;const r=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function Ny(e,t,n){if(cy(n))return;const r=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function Ay(e,t,n,r){if(cy(r))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeRows(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function Ly(e,t,n,r){if(cy(r))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeColumns(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function Iy(e,t,n){var r;ry(uy,this,!0);const i=this.hot.getSourceDataArray(n,0,n+((null===(r=t.__children)||void 0===r?void 0:r.length)||0),this.hot.countSourceCols());ry(uy,this,!1),i.forEach((e,t)=>{e.forEach((e,r)=>{this.engine.setCellContents({col:r,row:n+t,sheet:this.sheetId},[[e]])})})}function xy(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function ky(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Dy(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Hy(e){this.hot.runHooks("afterSheetAdded",e)}function Py(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function jy(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}function Fy(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,n,,r]=e;n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_HIDE_COLUMN"],t)},callback(){const{from:t,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(t.col,n.col),0),i=Math.max(t.col,n.col),s=[];for(let e=r;e<=i;e+=1)s.push(e);e.hideColumns(s);const o=s[s.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}}function Yy(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_SHOW_COLUMN"],e)},callback(){var n,r;if(0===t.length)return;let i=t[0],s=t[t.length-1];i=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,s=null!==(r=this.columnIndexMapper.getNearestNotHiddenIndex(s+1,1))&&void 0!==r?r:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);const o=s-i+1===this.countCols();o||this.selectColumns(i,s)},disabled:!1,hidden(){const n=Object(h["arrayMap"])(e.getHiddenColumns(),e=>this.toPhysicalColumn(e));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const r=this.getSelectedRangeLast(),i=r.getTopStartCorner().col,s=r.getBottomEndCorner().col,o=this.columnIndexMapper,a=o.getRenderableFromVisualIndex(i),l=o.getRenderableFromVisualIndex(s),c=o.getNotTrimmedIndexes(),u=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=c.slice(i,s+1);u.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countCols()));else{const e=this.countCols()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&u.push(...c.slice(s+1))}return Object(h["arrayEach"])(u,e=>{t.push(this.toVisualColumn(e))}),0===t.length}}}var Uy=n("cef7");function Vy(e,t){Wy(e,t),t.add(e)}function By(e,t,n){Wy(e,t),t.set(e,n)}function Wy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gy(e,t){return e.get(Ky(e,t))}function zy(e,t,n){return e.set(Ky(e,t),n),n}function Ky(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("beforeHideColumns"),fe["a"].getSingleton().register("afterHideColumns"),fe["a"].getSingleton().register("beforeUnhideColumns"),fe["a"].getSingleton().register("afterUnhideColumns");const Xy="hiddenColumns",$y=310;var qy=new WeakMap,Jy=new WeakMap,Qy=new WeakSet;class Zy extends en["a"]{constructor(){super(...arguments),Vy(this,Qy),By(this,qy,{}),By(this,Jy,null)}static get PLUGIN_KEY(){return Xy}static get PLUGIN_PRIORITY(){return $y}isEnabled(){return!!this.hot.getSettings()[Xy]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Xy];Object(o["isObject"])(t)&&(zy(qy,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),zy(Jy,this,new Uy["a"]),Gy(Jy,this).addLocalHook("init",()=>Ky(Qy,this,sw).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Gy(Jy,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ky(Qy,e,iw).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>Ky(Qy,this,tw).call(this,e,t,n)),this.addHook("modifyColWidth",(e,t)=>Ky(Qy,this,ew).call(this,e,t)),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ky(Qy,e,rw).call(e,...n)})),this.addHook("modifyCopyableRange",e=>Ky(Qy,this,nw).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),zy(qy,this,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;const i=Gy(Jy,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalColumn(e));Object(h["arrayEach"])(t,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(this.hot.toVisualColumn(n)),e),[])}const o=this.hot.runHooks("beforeUnhideColumns",t,r,n&&s);!1!==o&&(n&&s&&Gy(Jy,this).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,r,n&&s,n&&r.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeHideColumns",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{Gy(Jy,this).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)})},!0),this.hot.runHooks("afterHideColumns",t,r,n,n&&r.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideColumns(t)}getHiddenColumns(){return Object(h["arrayMap"])(Gy(Jy,this).getHiddenIndexes(),e=>this.hot.toVisualColumn(e))}isHidden(e){return Gy(Jy,this).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}resetCellsMeta(){Object(h["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipColumnOnPaste=!1)})}destroy(){zy(qy,this,null),zy(Jy,this,null),super.destroy()}}function ew(e,t){return this.isHidden(t)?0:Gy(qy,this).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"===typeof e&&this.hot.hasColHeaders()?e+15:void 0}function tw(e,t,n){if(!1===Gy(qy,this).copyPasteEnabled&&this.isHidden(t)&&(n.skipColumnOnPaste=!0),this.isHidden(t-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function nw(e){if(Gy(qy,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(h["arrayEach"])(e,e=>{let t=!0,r=0;Object(rt["rangeEach"])(e.startCol,e.endCol,i=>{this.isHidden(i)?(t||n(e.startRow,e.endRow,r,i-1),t=!0):(t&&(r=i),i===e.endCol&&n(e.startRow,e.endRow,r,i),t=!1)})}),t}function rw(e,t){if(!Gy(qy,this).indicators||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&n.push("beforeHiddenColumn"),Object(i["addClass"])(t,n)}function iw(e){e.items.push({name:Js},Fy(this),Yy(this))}function sw(){Array.isArray(Gy(qy,this).columns)&&this.hideColumns(Gy(qy,this).columns)}function ow(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[n,,r]=e;n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_HIDE_ROW"],t)},callback(){const{from:t,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(t.row,n.row),0),i=Math.max(t.row,n.row),s=[];for(let e=r;e<=i;e+=1)s.push(e);e.hideRows(s);const o=s[s.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}}function aw(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_SHOW_ROW"],e)},callback(){var n,r;if(0===t.length)return;let i=t[0],s=t[t.length-1];i=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,s=null!==(r=this.rowIndexMapper.getNearestNotHiddenIndex(s+1,1))&&void 0!==r?r:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);const o=s-i+1===this.countRows();o||this.selectRows(i,s)},disabled:!1,hidden(){const n=Object(h["arrayMap"])(e.getHiddenRows(),e=>this.toPhysicalRow(e));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const r=this.getSelectedRangeLast(),i=r.getTopStartCorner().row,s=r.getBottomEndCorner().row,o=this.rowIndexMapper,a=o.getRenderableFromVisualIndex(i),l=o.getRenderableFromVisualIndex(s),c=o.getNotTrimmedIndexes(),u=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=c.slice(i,s+1);u.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)u.push(...c.slice(0,i));else if(null===a)u.push(...c.slice(0,this.countRows()));else{const e=this.countRows()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&u.push(...c.slice(s+1))}return Object(h["arrayEach"])(u,e=>{t.push(this.toVisualRow(e))}),0===t.length}}}function lw(e,t){uw(e,t),t.add(e)}function cw(e,t,n){uw(e,t),t.set(e,n)}function uw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hw(e,t){return e.get(mw(e,t))}function dw(e,t,n){return e.set(mw(e,t),n),n}function mw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("beforeHideRows"),fe["a"].getSingleton().register("afterHideRows"),fe["a"].getSingleton().register("beforeUnhideRows"),fe["a"].getSingleton().register("afterUnhideRows");const fw="hiddenRows",pw=320;var gw=new WeakMap,yw=new WeakMap,ww=new WeakSet;class bw extends en["a"]{constructor(){super(...arguments),lw(this,ww),cw(this,gw,{}),cw(this,yw,null)}static get PLUGIN_KEY(){return fw}static get PLUGIN_PRIORITY(){return pw}isEnabled(){return!!this.hot.getSettings()[fw]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[fw];Object(o["isObject"])(t)&&(dw(gw,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),dw(yw,this,new Uy["a"]),hw(yw,this).addLocalHook("init",()=>mw(ww,this,Tw).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,hw(yw,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mw(ww,e,Cw).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>mw(ww,this,vw).call(this,e,t,n)),this.addHook("modifyRowHeight",(e,t)=>mw(ww,this,_w).call(this,e,t)),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mw(ww,e,Ew).call(e,...n)})),this.addHook("modifyCopyableRange",e=>mw(ww,this,Sw).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),dw(gw,this,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;const i=hw(yw,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalRow(e));Object(h["arrayEach"])(t,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(this.hot.toVisualRow(n)),e),[])}const o=this.hot.runHooks("beforeUnhideRows",t,r,n&&s);!1!==o&&(n&&s&&hw(yw,this).setValues(i),this.hot.runHooks("afterUnhideRows",t,r,n&&s,n&&r.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeHideRows",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{hw(yw,this).setValueAtIndex(this.hot.toPhysicalRow(e),!0)})},!0),this.hot.runHooks("afterHideRows",t,r,n,n&&r.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideRows(t)}getHiddenRows(){return Object(h["arrayMap"])(hw(yw,this).getHiddenIndexes(),e=>this.hot.toVisualRow(e))}isHidden(e){return hw(yw,this).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}resetCellsMeta(){Object(h["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipRowOnPaste=!1)})}destroy(){dw(gw,this,null),dw(yw,this,null),super.destroy()}}function _w(e,t){return this.isHidden(t)?0:e}function vw(e,t,n){if(!1===hw(gw,this).copyPasteEnabled&&this.isHidden(e)&&(n.skipRowOnPaste=!0),this.isHidden(e-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function Sw(e){if(hw(gw,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(h["arrayEach"])(e,e=>{let t=!0,r=0;Object(rt["rangeEach"])(e.startRow,e.endRow,i=>{this.isHidden(i)?(t||n(r,i-1,e.startCol,e.endCol),t=!0):(t&&(r=i),i===e.endRow&&n(r,i,e.startCol,e.endCol),t=!1)})}),t}function Ew(e,t){if(!hw(gw,this).indicators||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&n.push("beforeHiddenRow"),Object(i["addClass"])(t,n)}function Cw(e){e.items.push({name:Js},ow(this),aw(this))}function Tw(){Array.isArray(hw(gw,this).rows)&&this.hideRows(hw(gw,this).rows)}function Mw(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_FREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.freezeColumn(r),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}}function Rw(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.unfreezeColumn(r),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}}function Ow(e,t){Aw(e,t),t.add(e)}function Nw(e,t,n){Aw(e,t),t.set(e,n)}function Aw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lw(e,t){return e.get(xw(e,t))}function Iw(e,t,n){return e.set(xw(e,t),n),n}function xw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("beforeColumnFreeze"),fe["a"].getSingleton().register("afterColumnFreeze"),fe["a"].getSingleton().register("beforeColumnUnfreeze"),fe["a"].getSingleton().register("afterColumnUnfreeze");const kw="manualColumnFreeze",Dw=110;var Hw=new WeakMap,Pw=new WeakSet;class jw extends en["a"]{constructor(){super(...arguments),Ow(this,Pw),Nw(this,Hw,!1)}static get PLUGIN_KEY(){return kw}static get PLUGIN_PRIORITY(){return Dw}isEnabled(){return!!this.hot.getSettings()[kw]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>xw(Pw,this,Fw).call(this,e)),this.addHook("beforeColumnMove",(e,t)=>xw(Pw,this,Yw).call(this,e,t)),super.enablePlugin())}disablePlugin(){Iw(Hw,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;Lw(Hw,this)||Iw(Hw,this,!0);const r=this.hot.runHooks("beforeColumnFreeze",e,n);!1!==r&&(n&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,n))}unfreezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;Lw(Hw,this)||Iw(Hw,this,!0);const r=this.hot.runHooks("beforeColumnUnfreeze",e,n);!1!==r&&(n&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,n))}}function Fw(e){e.items.push({name:"---------"},Mw(this),Rw(this))}function Yw(e,t){if(Lw(Hw,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some(e=>e<n))return!1}}function Uw(e,t,n){return t=Vw(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vw(e){var t=Bw(e,"string");return"symbol"==typeof t?t:t+""}function Bw(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Ww=0,Gw=1,zw=2,Kw="px";class Xw{constructor(e){Uw(this,"hot",void 0),Uw(this,"_element",null),Uw(this,"state",Ww),Uw(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=zw}build(){this.state===Ww&&(this._element=this.hot.rootDocument.createElement("div"),this.state=Gw)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=Ww}isAppended(){return this.state===zw}isBuilt(){return this.state>=Gw}setPosition(e,t){Object(rt["isNumeric"])(e)&&(this._element.style.top=e+Kw),Object(rt["isNumeric"])(t)&&(this._element.style[this.inlineProperty]=t+Kw)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){Object(rt["isNumeric"])(e)&&(this._element.style.width=e+Kw),Object(rt["isNumeric"])(t)&&(this._element.style.height=t+Kw)}getSize(){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}}setOffset(e,t){Object(rt["isNumeric"])(e)&&(this._element.style.marginTop=e+Kw),Object(rt["isNumeric"])(t)&&(this._element.style["margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty)]=t+Kw)}getOffset(){const e=this._element.style,t="margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty);return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}var $w=Xw;const qw="ht__manualColumnMove--backlight";class Jw extends $w{build(){super.build(),Object(i["addClass"])(this._element,qw)}}var Qw=Jw;const Zw="ht__manualColumnMove--guideline";class eb extends $w{build(){super.build(),Object(i["addClass"])(this._element,Zw)}}var tb=eb;function nb(e,t){ib(e,t),t.add(e)}function rb(e,t,n){ib(e,t),t.set(e,n)}function ib(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sb(e,t,n){return e.set(ab(e,t),n),n}function ob(e,t){return e.get(ab(e,t))}function ab(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("beforeColumnMove"),fe["a"].getSingleton().register("afterColumnMove");const lb="manualColumnMove",cb=120,ub="ht__manualColumnMove",hb="show-ui",db="on-moving--columns",mb="after-selection--columns";var fb=new WeakMap,pb=new WeakMap,gb=new WeakMap,yb=new WeakMap,wb=new WeakMap,bb=new WeakMap,_b=new WeakMap,vb=new WeakMap,Sb=new WeakMap,Eb=new WeakMap,Cb=new WeakMap,Tb=new WeakSet;class Mb extends en["a"]{constructor(){super(...arguments),nb(this,Tb),rb(this,fb,new Qw(this.hot)),rb(this,pb,new tb(this.hot)),rb(this,gb,[]),rb(this,yb,0),rb(this,wb,!1),rb(this,bb,{}),rb(this,_b,void 0),rb(this,vb,void 0),rb(this,Sb,void 0),rb(this,Eb,void 0),rb(this,Cb,void 0)}static get PLUGIN_KEY(){return lb}static get PLUGIN_PRIORITY(){return cb}isEnabled(){return!!this.hot.getSettings()[lb]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ab(Tb,e,Rb).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ab(Tb,e,Nb).call(e,...n)})),this.addHook("afterScrollVertically",()=>ab(Tb,this,Lb).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ab(Tb,e,Ib).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,ub),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,ub),this.unregisterEvents(),ob(fb,this).destroy(),ob(pb,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=ob(_b,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeColumnMove",e,t,n,r);if(sb(_b,this,void 0),!1===i)return;r&&this.hot.columnIndexMapper.moveIndexes(e,t);const s=r&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,n,r,s),s}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const n=this.countFinalIndex(e,t);return sb(_b,this,t),this.moveColumns(e,n)}isMovePossible(e,t){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,i=t<0,s=e.some(e=>e<0),o=e.some(e=>e>=n);return!(r||i||s||o)}isColumnOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}countFinalIndex(e,t){const n=Object(h["arrayReduce"])(e,(e,n)=>(n<t&&(e+=1),e),0);return t-n}getColumnsWidth(e,t){const n=this.hot.columnIndexMapper;let r=0;for(let i=e;i<=t;i+=1){const e=n.getRenderableFromVisualIndex(i);i<0?r+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(r+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[lb];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const n=[];return Object(rt["rangeEach"])(e,t,e=>{n.push(e)}),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(ob(vb,this))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,n=this.hot.view._wt.wtOverlays.scrollableElement,r="number"===typeof n.scrollX?n.scrollX:n.scrollLeft;let s=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,ob(vb,this)-1);const o=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=ob(fb,this).getOffset().start,c=ob(fb,this).getSize().width;let u=0,h=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=Object(i["outerWidth"])(this.hot.rootElement),s=e.innerWidth-ob(Sb,this)-t;h=e.innerWidth-ob(bb,this).eventPageX-s-(void 0===n.scrollX?r:0)}else h=ob(bb,this).eventPageX-(ob(Sb,this)-(void 0===n.scrollX?r:0));if(ob(Eb,this)&&(u=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(ob(vb,this))&&(s+=r),s+=u,ob(vb,this)<0)ob(Cb,this)>0?ob(bb,this).col=0:ob(bb,this).col=e>0?e-1:e;else if(ob(bb,this).TD.offsetWidth/2+s<=h){const e=ob(vb,this)>=ob(yb,this)?ob(yb,this)-1:ob(vb,this);ob(bb,this).col=e+1,s+=ob(bb,this).TD.offsetWidth}else ob(bb,this).col=ob(vb,this);let d=h,m=s;h+c+l>=o?d=o-c-l:h+l<a+u&&(d=a+u+Math.abs(l)),s>=o-1?m=o-1:0===m?m=1:void 0!==n.scrollX&&ob(vb,this)<ob(Cb,this)&&(m-=ob(Sb,this)<=n.scrollX?ob(Sb,this):0),ob(fb,this).setPosition(null,d),ob(pb,this).setPosition(null,m)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>ab(Tb,this,Ob).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>ab(Tb,this,Ab).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){ob(fb,this).build(),ob(pb,this).build()}destroy(){ob(fb,this).destroy(),ob(pb,this).destroy(),super.destroy()}}function Rb(e,t,n,r){const o=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),c=Object(i["hasClass"])(e.target,"sortAction");if(!l||!a||ob(wb,this)||0!==e.button||c)return sb(wb,this,!1),ob(gb,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[db,hb]);const u=ob(pb,this).isBuilt()&&!ob(pb,this).isAppended(),h=ob(fb,this).isBuilt()&&!ob(fb,this).isAppended();u&&h&&(ob(pb,this).appendTo(o.hider),ob(fb,this).appendTo(o.hider));const{from:d,to:m}=l,f=Math.min(d.col,m.col),p=Math.max(d.col,m.col);if(t.row<0&&t.col>=f&&t.col<=p){r.column=!0,sb(wb,this,!0);const a=n.firstChild?Object(s["offsetRelativeTo"])(e,n.firstChild).x:e.offsetX;ob(bb,this).eventPageX=e.pageX,sb(vb,this,t.col),ob(bb,this).TD=n,ob(bb,this).col=t.col,sb(gb,this,this.prepareColumnsToMoving(f,p)),sb(Eb,this,!!this.hot.getSettings().rowHeaders),sb(yb,this,this.hot.countCols()),sb(Cb,this,this.hot.getSettings().fixedColumnsStart),sb(Sb,this,Object(i["offset"])(this.hot.rootElement).left);const l=ob(Eb,this)?-1:0,c=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,u=t.col<ob(Cb,this),h=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),d=Math.abs(a-(this.hot.isRtl()?n.offsetWidth:0)),m=this.getColumnsWidth(f,t.col-1)+d,g=this.getColumnsWidth(l,f-1)+(u?h:0)+m;ob(fb,this).setPosition(c,g),ob(fb,this).setSize(this.getColumnsWidth(f,p),o.hider.offsetHeight-c),ob(fb,this).setOffset(null,-m),Object(i["addClass"])(this.hot.rootElement,db)}else Object(i["removeClass"])(this.hot.rootElement,mb),sb(wb,this,!1),ob(gb,this).length=0}function Ob(e){ob(wb,this)&&(ob(bb,this).eventPageX=e.pageX,this.refreshPositions())}function Nb(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&ob(wb,this)&&(ob(gb,this).indexOf(t.col)>-1?Object(i["removeClass"])(this.hot.rootElement,hb):Object(i["addClass"])(this.hot.rootElement,hb),r.row=!0,r.column=!0,r.cell=!0,sb(vb,this,t.col),ob(bb,this).TD=n)}function Ab(){const e=ob(bb,this).col,t=ob(gb,this).length;if(sb(vb,this,void 0),sb(wb,this,!1),Object(i["removeClass"])(this.hot.rootElement,[db,hb,mb]),this.hot.selection.isSelectedByColumnHeader()&&Object(i["addClass"])(this.hot.rootElement,mb),t<1||void 0===e)return;const n=ob(gb,this)[0],r=this.hot.toPhysicalColumn(n),s=this.dragColumns(ob(gb,this),e);if(ob(gb,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(r),n=e+t-1;this.hot.selectColumns(e,n)}}function Lb(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1,n=e.holder.scrollTop,r=t+n;ob(fb,this).setPosition(r),ob(fb,this).setSize(null,e.hider.offsetHeight-r)}function Ib(){this.moveBySettingsOrLoad()}function xb(e,t){Db(e,t),t.add(e)}function kb(e,t,n){Db(e,t),t.set(e,n)}function Db(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hb(e,t,n){return e.set(jb(e,t),n),n}function Pb(e,t){return e.get(jb(e,t))}function jb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Fb="manualColumnResize",Yb=130,Ub="manualColumnWidths";var Vb=new WeakMap,Bb=new WeakMap,Wb=new WeakMap,Gb=new WeakMap,zb=new WeakMap,Kb=new WeakMap,Xb=new WeakMap,$b=new WeakMap,qb=new WeakMap,Jb=new WeakMap,Qb=new WeakMap,Zb=new WeakMap,e_=new WeakMap,t_=new WeakMap,n_=new WeakMap,r_=new WeakMap,i_=new WeakSet;class s_ extends en["a"]{static get PLUGIN_KEY(){return Fb}static get PLUGIN_PRIORITY(){return Yb}constructor(e){super(e),xb(this,i_),kb(this,Vb,null),kb(this,Bb,null),kb(this,Wb,[]),kb(this,Gb,null),kb(this,zb,null),kb(this,Kb,null),kb(this,Xb,null),kb(this,$b,null),kb(this,qb,this.hot.rootDocument.createElement("DIV")),kb(this,Jb,this.hot.rootDocument.createElement("DIV")),kb(this,Qb,null),kb(this,Zb,!1),kb(this,e_,0),kb(this,t_,null),kb(this,n_,void 0),kb(this,r_,void 0),Object(i["addClass"])(Pb(qb,this),"manualColumnResizer"),Object(i["addClass"])(Pb(Jb,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[Fb]}enablePlugin(){this.enabled||(Hb(n_,this,new un["a"]),Pb(n_,this).addLocalHook("init",()=>jb(i_,this,o_).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Pb(n_,this)),this.addHook("modifyColWidth",(e,t)=>jb(i_,this,d_).call(this,e,t)),this.addHook("beforeStretchingColumnWidth",(e,t)=>jb(i_,this,m_).call(this,e,t)),this.addHook("beforeColumnResize",(e,t,n)=>jb(i_,this,f_).call(this,e,t,n)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){Hb(r_,this,Pb(n_,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",Ub,Pb(n_,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",Ub,e),e.value}setManualSize(e,t){const n=Math.max(t,20),r=this.hot.toPhysicalColumn(e);return Pb(n_,this).setValueAtIndex(r,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);Pb(n_,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;Hb(Vb,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(Pb(Vb,this)),r=n.col;if(r<0)return;const s=Object(i["outerHeight"])(Pb(Vb,this)),o=Pb(Vb,this).getBoundingClientRect(),a=r<t.getSetting("fixedColumnsStart");let l;a&&(l=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(Pb(Vb,this),n.row,n.col)),l||(l=t.wtOverlays.topOverlay.getRelativeCellPosition(Pb(Vb,this),n.row,n.col)),Hb(Bb,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)),Hb(Wb,this,[]);const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&c){const e=this.hot.getSelectedRange();Object(h["arrayEach"])(e,e=>{const t=e.getTopStartCorner().col,n=e.getBottomEndCorner().col;Object(rt["rangeEach"])(t,n,e=>{Pb(Wb,this).includes(e)||Pb(Wb,this).push(e)})})}Pb(Wb,this).includes(Pb(Bb,this))||Hb(Wb,this,[Pb(Bb,this)]),Hb($b,this,l.start-6),Hb(Xb,this,parseInt(o.width,10)),Pb(qb,this).style.top=l.top+"px",Pb(qb,this).style[this.inlineDir]=Pb($b,this)+Pb(Xb,this)+"px",Pb(qb,this).style.height=s+"px",this.hot.rootElement.appendChild(Pb(qb,this))}refreshHandlePosition(){Pb(qb,this).style[this.inlineDir]=Pb($b,this)+Pb(Gb,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerHeight"])(Pb(qb,this)),10),t=parseInt(Pb(qb,this).style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);Object(i["addClass"])(Pb(qb,this),"active"),Object(i["addClass"])(Pb(Jb,this),"active"),Pb(Jb,this).style.top=t+"px",this.refreshGuidePosition(),Pb(Jb,this).style.height=n-e+"px",this.hot.rootElement.appendChild(Pb(Jb,this))}refreshGuidePosition(){Pb(Jb,this).style[this.inlineDir]=Pb(qb,this).style[this.inlineDir]}hideHandleAndGuide(){Object(i["removeClass"])(Pb(qb,this),"active"),Object(i["removeClass"])(Pb(Jb,this),"active")}checkIfColumnHeader(e){const t=Object(i["closest"])(e,["THEAD"],this.hot.rootElement),{topOverlay:n,topInlineStartCornerOverlay:r}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.THEAD,r.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,n)=>{const r=this.hot.runHooks("beforeColumnResize",Pb(zb,this),t,!0);void 0!==r&&Hb(zb,this,r),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,Pb(zb,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",Pb(zb,this),t,!0),n&&e()};if(Pb(e_,this)>=2){const n=Pb(Wb,this).length;n>1?(Object(h["arrayEach"])(Pb(Wb,this),e=>{t(e)}),e()):Object(h["arrayEach"])(Pb(Wb,this),e=>{t(e,!0)})}Hb(e_,this,0),Hb(t_,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",e=>jb(i_,this,a_).call(this,e)),this.eventManager.addEventListener(t,"mousedown",e=>jb(i_,this,l_).call(this,e)),this.eventManager.addEventListener(e,"mousemove",e=>jb(i_,this,c_).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>jb(i_,this,u_).call(this)),this.eventManager.addEventListener(Pb(qb,this),"contextmenu",()=>jb(i_,this,h_).call(this))}destroy(){super.destroy()}}function o_(){const e=this.hot.getSettings()[Fb],t=this.loadManualColumnWidths();"undefined"!==typeof t?this.hot.batchExecution(()=>{t.forEach((e,t)=>{Pb(n_,this).setValueAtIndex(t,e)})},!0):Array.isArray(e)?(this.hot.batchExecution(()=>{e.forEach((e,t)=>{Pb(n_,this).setValueAtIndex(t,e)})},!0),Hb(r_,this,e)):!0===e&&Array.isArray(Pb(r_,this))&&this.hot.batchExecution(()=>{Pb(r_,this).forEach((e,t)=>{Pb(n_,this).setValueAtIndex(t,e)})},!0)}function a_(e){if(!Object(i["isDetached"])(e.target)&&!0!==Pb(Zb,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||Pb(Qb,this)||this.setupHandlePosition(t)}}function l_(e){e.target.parentNode===this.hot.rootElement&&Object(i["hasClass"])(e.target,"manualColumnResizer")&&(this.setupHandlePosition(Pb(Vb,this)),this.setupGuidePosition(),Hb(Qb,this,!0),null===Pb(t_,this)&&(Hb(t_,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(Pb(t_,this))),Hb(e_,this,Pb(e_,this)+1),this.startX=e.pageX,Hb(zb,this,Pb(Xb,this)))}function c_(e){if(Pb(Qb,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();Hb(Gb,this,Pb(Xb,this)+t),Object(h["arrayEach"])(Pb(Wb,this),e=>{Hb(zb,this,this.setManualSize(e,Pb(Gb,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function u_(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",Pb(zb,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",Pb(zb,this),t,!1)};if(Pb(Qb,this)){if(this.hideHandleAndGuide(),Hb(Qb,this,!1),Pb(zb,this)!==Pb(Xb,this)){const n=Pb(Wb,this).length;n>1?(Object(h["arrayEach"])(Pb(Wb,this),e=>{t(e)}),e()):Object(h["arrayEach"])(Pb(Wb,this),e=>{t(e,!0)})}this.setupHandlePosition(Pb(Vb,this))}}function h_(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(Pb(qb,this)),this.hot.rootElement.removeChild(Pb(Jb,this)),Hb(Qb,this,!1),Hb(Zb,this,!0),this.hot._registerImmediate(()=>{Hb(Zb,this,!1)})}function d_(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),r=Pb(n_,this).getValueAtIndex(e);this.hot.getSettings()[Fb]&&r&&(n=r)}return n}function m_(e,t){let n=Pb(n_,this).getValueAtIndex(t);return null===n&&(n=e),n}function f_(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function p_(e,t,n){return t=g_(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g_(e){var t=y_(e,"string");return"symbol"==typeof t?t:t+""}function y_(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const w_=0,b_=1,__=2,v_="px";class S_{constructor(e){p_(this,"hot",void 0),p_(this,"_element",null),p_(this,"state",w_),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=__}build(){this.state===w_&&(this._element=this.hot.rootDocument.createElement("div"),this.state=b_)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=w_}isAppended(){return this.state===__}isBuilt(){return this.state>=b_}setPosition(e,t){void 0!==e&&(this._element.style.top=e+v_),void 0!==t&&(this._element.style.left=t+v_)}getPosition(){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}}setSize(e,t){e&&(this._element.style.width=e+v_),t&&(this._element.style.height=t+v_)}getSize(){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}}setOffset(e,t){e&&(this._element.style.marginTop=e+v_),t&&(this._element.style.marginLeft=t+v_)}getOffset(){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}}}var E_=S_;const C_="ht__manualRowMove--backlight";class T_ extends E_{build(){super.build(),Object(i["addClass"])(this._element,C_)}}var M_=T_;const R_="ht__manualRowMove--guideline";class O_ extends E_{build(){super.build(),Object(i["addClass"])(this._element,R_)}}var N_=O_;function A_(e,t){I_(e,t),t.add(e)}function L_(e,t,n){I_(e,t),t.set(e,n)}function I_(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function x_(e,t,n){return e.set(D_(e,t),n),n}function k_(e,t){return e.get(D_(e,t))}function D_(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("beforeRowMove"),fe["a"].getSingleton().register("afterRowMove");const H_="manualRowMove",P_=140,j_="ht__manualRowMove",F_="show-ui",Y_="on-moving--rows",U_="after-selection--rows";var V_=new WeakMap,B_=new WeakMap,W_=new WeakMap,G_=new WeakMap,z_=new WeakMap,K_=new WeakMap,X_=new WeakSet;class $_ extends en["a"]{constructor(){super(...arguments),A_(this,X_),L_(this,V_,new M_(this.hot)),L_(this,B_,new N_(this.hot)),L_(this,W_,[]),L_(this,G_,void 0),L_(this,z_,{}),L_(this,K_,void 0)}static get PLUGIN_KEY(){return H_}static get PLUGIN_PRIORITY(){return P_}isEnabled(){return!!this.hot.getSettings()[H_]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return D_(X_,e,q_).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return D_(X_,e,Q_).call(e,...n)})),this.addHook("afterScrollHorizontally",()=>D_(X_,this,ev).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return D_(X_,e,tv).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,j_),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,j_),this.unregisterEvents(),k_(V_,this).destroy(),k_(B_,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=k_(K_,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeRowMove",e,t,n,r);if(x_(K_,this,void 0),!1===i)return;r&&this.hot.rowIndexMapper.moveIndexes(e,t);const s=r&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,n,r,s),s}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const n=this.countFinalIndex(e,t);return x_(K_,this,t),this.moveRows(e,n)}isMovePossible(e,t){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,i=t<0,s=e.some(e=>e<0),o=e.some(e=>e>=n);return!(r||i||s||o)}isRowOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}countFinalIndex(e,t){const n=Object(h["arrayReduce"])(e,(e,n)=>(n<t&&(e+=1),e),0);return t-n}getRowsHeight(e,t){const n=this.hot.rowIndexMapper;let r=0;for(let i=e;i<=t;i++){const e=n.getRenderableFromVisualIndex(i);null!==e&&(r+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[H_];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:n,to:r}=e,i=Math.min(n.row,r.row),s=Math.max(n.row,r.row);return Object(rt["rangeEach"])(i,s,e=>{t.push(e)}),t}refreshPositions(){const e=k_(z_,this).coords,t=this.hot.view.getFirstFullyVisibleRow(),n=this.hot.view.getLastFullyVisibleRow(),r=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&n<r&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(n+1,1),void 0,!0);const s=this.hot.view._wt.wtTable,o=k_(z_,this).TD,a=this.hot.rootElement,l=Object(i["offset"])(a),c=Object(i["getTrimmingContainer"])(a),u=s.holder.scrollTop,h=this.hot.rootWindow!==c?c.scrollTop:0,d=l.top-h,m=k_(z_,this).eventPageY-d+u,f=s.hider.offsetHeight,p=s.TBODY.offsetTop,g=k_(V_,this).getOffset().top,y=k_(V_,this).getSize().height,w=o.offsetHeight/2,b=o.offsetHeight;let _=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const v=m>=_+w;this.isFixedRowTop(e.row)&&(_+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?k_(z_,this).row=t>0?t-1:t:v?(k_(z_,this).row=e.row+1,_+=0===e.row?b-1:b):k_(z_,this).row=e.row;let S=m,E=_;m+y+g>=f?S=f-y-g:m+g<p&&(S=p+Math.abs(g)),_>=f-1&&(E=f-1),k_(V_,this).setPosition(S),k_(B_,this).setPosition(E)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>D_(X_,this,J_).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>D_(X_,this,Z_).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){k_(V_,this).build(),k_(B_,this).build()}destroy(){k_(V_,this).destroy(),k_(B_,this).destroy(),super.destroy()}}function q_(e,t,n,r){const{wtTable:s,wtViewport:o}=this.hot.view._wt,a=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast();if(!l||!a||k_(G_,this)||0!==e.button)return x_(G_,this,!1),k_(W_,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[Y_,F_]);const c=k_(B_,this).isBuilt()&&!k_(B_,this).isAppended(),u=k_(V_,this).isBuilt()&&!k_(V_,this).isAppended();c&&u&&(k_(B_,this).appendTo(s.hider),k_(V_,this).appendTo(s.hider));const{from:h,to:d}=l,m=Math.min(h.row,d.row),f=Math.max(h.row,d.row);if(t.col<0&&t.row>=m&&t.row<=f){r.row=!0,x_(G_,this,!0),k_(z_,this).eventPageY=e.pageY,k_(z_,this).coords=t,k_(z_,this).TD=n,x_(W_,this,this.prepareRowsToMoving());const a=s.holder.scrollLeft+o.getRowHeaderWidth(),l=this.getRowsHeight(m,t.row-1)+e.offsetY;k_(V_,this).setPosition(null,a),k_(V_,this).setSize(s.hider.offsetWidth-a,this.getRowsHeight(m,f)),k_(V_,this).setOffset(-l,null),Object(i["addClass"])(this.hot.rootElement,Y_),this.refreshPositions()}else Object(i["removeClass"])(this.hot.rootElement,U_),x_(G_,this,!1),k_(W_,this).length=0}function J_(e){k_(G_,this)&&(k_(z_,this).eventPageY=e.pageY,this.refreshPositions())}function Q_(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&k_(G_,this)&&(k_(W_,this).indexOf(t.row)>-1?Object(i["removeClass"])(this.hot.rootElement,F_):Object(i["addClass"])(this.hot.rootElement,F_),r.row=!0,r.column=!0,r.cell=!0,k_(z_,this).coords=t,k_(z_,this).TD=n)}function Z_(){const e=k_(z_,this).row,t=k_(W_,this).length;if(x_(G_,this,!1),Object(i["removeClass"])(this.hot.rootElement,[Y_,F_,U_]),this.hot.selection.isSelectedByRowHeader()&&Object(i["addClass"])(this.hot.rootElement,U_),t<1||void 0===e)return;const n=k_(W_,this)[0],r=this.hot.toPhysicalRow(n),s=this.dragRows(k_(W_,this),e);if(k_(W_,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(r),n=e+t-1;this.hot.selectRows(e,n)}}function ev(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth(),n=e.holder.scrollLeft,r=t+n;k_(V_,this).setPosition(null,r),k_(V_,this).setSize(e.hider.offsetWidth-r)}function tv(){this.moveBySettingsOrLoad()}var nv=n("eb36");function rv(e,t){sv(e,t),t.add(e)}function iv(e,t,n){sv(e,t),t.set(e,n)}function sv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ov(e,t,n){return e.set(lv(e,t),n),n}function av(e,t){return e.get(lv(e,t))}function lv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const cv="manualRowResize",uv=30,hv="manualRowHeights";var dv=new WeakMap,mv=new WeakMap,fv=new WeakMap,pv=new WeakMap,gv=new WeakMap,yv=new WeakMap,wv=new WeakMap,bv=new WeakMap,_v=new WeakMap,vv=new WeakMap,Sv=new WeakMap,Ev=new WeakMap,Cv=new WeakMap,Tv=new WeakMap,Mv=new WeakMap,Rv=new WeakMap,Ov=new WeakSet;class Nv extends en["a"]{static get PLUGIN_KEY(){return cv}static get PLUGIN_PRIORITY(){return uv}constructor(e){super(e),rv(this,Ov),iv(this,dv,null),iv(this,mv,null),iv(this,fv,[]),iv(this,pv,null),iv(this,gv,null),iv(this,yv,null),iv(this,wv,null),iv(this,bv,null),iv(this,_v,this.hot.rootDocument.createElement("DIV")),iv(this,vv,this.hot.rootDocument.createElement("DIV")),iv(this,Sv,!1),iv(this,Ev,!1),iv(this,Cv,0),iv(this,Tv,null),iv(this,Mv,void 0),iv(this,Rv,void 0),Object(i["addClass"])(av(_v,this),"manualRowResizer"),Object(i["addClass"])(av(vv,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[cv]}enablePlugin(){this.enabled||(ov(Mv,this,new un["a"]),av(Mv,this).addLocalHook("init",()=>lv(Ov,this,Hv).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,av(Mv,this)),this.addHook("modifyRowHeight",(e,t)=>lv(Ov,this,Dv).call(this,e,t)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){ov(Rv,this,av(Mv,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",hv,av(Mv,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",hv,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),r=Math.max(t,nv["a"].DEFAULT_HEIGHT);return av(Mv,this).setValueAtIndex(n,r),r}setupHandlePosition(e){ov(dv,this,e);const{view:t}=this.hot,{_wt:n}=t,r=n.wtTable.getCoords(av(dv,this)),s=r.row;if(s<0)return;const o=Object(i["outerWidth"])(av(dv,this)),a=av(dv,this).getBoundingClientRect(),l=s<n.getSetting("fixedRowsTop"),c=s>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let u;l?u=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(av(dv,this),r.row,r.col):c&&(u=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(av(dv,this),r.row,r.col)),u||(u=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(av(dv,this),r.row,r.col)),ov(mv,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(s)),ov(fv,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();Object(h["arrayEach"])(e,e=>{const t=e.getTopStartCorner().row,n=e.getBottomStartCorner().row;Object(rt["rangeEach"])(t,n,e=>{av(fv,this).includes(e)||av(fv,this).push(e)})})}av(fv,this).includes(av(mv,this))||ov(fv,this,[av(mv,this)]),ov(bv,this,u.top-6),ov(wv,this,parseInt(a.height,10)),av(_v,this).style.top=av(bv,this)+av(wv,this)+"px",av(_v,this).style[this.inlineDir]=u.start+"px",av(_v,this).style.width=o+"px",this.hot.rootElement.appendChild(av(_v,this))}refreshHandlePosition(){av(_v,this).style.top=av(bv,this)+av(pv,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerWidth"])(av(_v,this)),10),t=parseInt(av(_v,this).style[this.inlineDir],10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);Object(i["addClass"])(av(_v,this),"active"),Object(i["addClass"])(av(vv,this),"active"),av(vv,this).style.top=av(_v,this).style.top,av(vv,this).style[this.inlineDir]=t+"px",av(vv,this).style.width=n-e+"px",this.hot.rootElement.appendChild(av(vv,this))}refreshGuidePosition(){av(vv,this).style.top=av(_v,this).style.top}hideHandleAndGuide(){Object(i["removeClass"])(av(_v,this),"active"),Object(i["removeClass"])(av(vv,this),"active")}checkIfRowHeader(e){const t=Object(i["closest"])(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,r.clone.wtTable.TBODY,s.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&av(gv,this)<t?t:av(gv,this)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,n)=>{const r=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==r&&ov(gv,this,r),this.setManualSize(t,av(gv,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};if(av(Cv,this)>=2){const n=av(fv,this).length;n>1?(Object(h["arrayEach"])(av(fv,this),e=>{t(e)}),e()):Object(h["arrayEach"])(av(fv,this),e=>{t(e,!0)})}ov(Cv,this,0),ov(Tv,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",e=>lv(Ov,this,Av).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>lv(Ov,this,Lv).call(this,e)),this.eventManager.addEventListener(t,"mousemove",e=>lv(Ov,this,Iv).call(this,e)),this.eventManager.addEventListener(t,"mouseup",()=>lv(Ov,this,xv).call(this)),this.eventManager.addEventListener(av(_v,this),"contextmenu",()=>lv(Ov,this,kv).call(this))}destroy(){super.destroy()}}function Av(e){if(!Object(i["isDetached"])(e.target)&&!0!==av(Ev,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(av(Sv,this)||this.setupHandlePosition(t))}}function Lv(e){Object(i["hasClass"])(e.target,"manualRowResizer")&&(this.setupHandlePosition(av(dv,this)),this.setupGuidePosition(),ov(Sv,this,!0),null===av(Tv,this)&&(ov(Tv,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(av(Tv,this))),ov(Cv,this,av(Cv,this)+1),ov(yv,this,e.pageY),ov(gv,this,av(wv,this)))}function Iv(e){av(Sv,this)&&(ov(pv,this,av(wv,this)+(e.pageY-av(yv,this))),Object(h["arrayEach"])(av(fv,this),e=>{ov(gv,this,this.setManualSize(e,av(pv,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition())}function xv(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,n)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),n&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(av(Sv,this)){if(this.hideHandleAndGuide(),ov(Sv,this,!1),av(gv,this)!==av(wv,this)){const n=av(fv,this).length;n>1?(Object(h["arrayEach"])(av(fv,this),e=>{t(e)}),e()):Object(h["arrayEach"])(av(fv,this),e=>{t(e,!0)})}this.setupHandlePosition(av(dv,this))}}function kv(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(av(_v,this)),this.hot.rootElement.removeChild(av(vv,this)),ov(Sv,this,!1),ov(Ev,this,!0),this.hot._registerImmediate(()=>{ov(Ev,this,!1)})}function Dv(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),r=av(Mv,this).getValueAtIndex(e);this.hot.getSettings()[cv]&&r&&(n=r)}return n}function Hv(){const e=this.hot.getSettings()[cv],t=this.loadManualRowHeights();this.hot.batchExecution(()=>{"undefined"!==typeof t?t.forEach((e,t)=>{av(Mv,this).setValueAtIndex(t,e)}):Array.isArray(e)?(e.forEach((e,t)=>{av(Mv,this).setValueAtIndex(t,e)}),ov(Rv,this,e)):!0===e&&Array.isArray(av(Rv,this))&&av(Rv,this).forEach((e,t)=>{av(Mv,this).setValueAtIndex(t,e)})},!0)}n("4cd6");function Pv(e,t,n){return t=jv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jv(e){var t=Fv(e,"string");return"symbol"==typeof t?t:t+""}function Fv(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Yv{constructor(e,t,n,r,i,s){Pv(this,"row",void 0),Pv(this,"col",void 0),Pv(this,"rowspan",void 0),Pv(this,"colspan",void 0),Pv(this,"removed",!1),Pv(this,"cellCoordsFactory",void 0),Pv(this,"cellRangeFactory",void 0),this.row=e,this.col=t,this.rowspan=n,this.colspan=r,this.cellCoordsFactory=i,this.cellRangeFactory=s}static NEGATIVE_VALUES_WARNING(e){return Es["a"]`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
- rowspan: ${e.rowspan}, colspan: ${e.colspan}} contains negative values, which is\x20
- not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){return Es["a"]`The merged cell declared at [${e.row}, ${e.col}] is positioned\x20
- (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){return Es["a"]`The merged cell declared at [${e.row}, ${e.col}] has both "rowspan"\x20
- and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){return Es["a"]`The merged cell declared at [${e.row}, ${e.col}] has "rowspan"\x20
- or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}static isSingleCell(e){return 1===e.colspan&&1===e.rowspan}static containsZeroSpan(e){return 0===e.colspan||0===e.rowspan}static isOutOfBounds(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}normalize(e){const t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-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)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,i=e[0]?"colspan":"rowspan",s=e[0]?"col":"row",o=Math.min(t,r),a=Math.max(t,r),l=this[s],c=this[s]+this[i]-1;if(l>=t&&(this[s]+=n),n>0)t<=c&&t>l&&(this[i]+=n);else if(n<0){if(o<=l&&a>=c)return this.removed=!0,!1;if(l>=o&&l<=a){const e=a-l+1,t=Math.abs(n)-e;this[s]-=t+n,this[i]-=e}else if(l<=o&&c>=a)this[i]+=n;else if(l<=o&&c>=o&&c<a){const e=c-o+1;this[i]-=e}}return!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))}}var Uv=Yv;function Vv(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 Bv(e,t){Wv(e,t),t.add(e)}function Wv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gv(e,t,n){return t=zv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zv(e){var t=Kv(e,"string");return"symbol"==typeof t?t:t+""}function Kv(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Xv(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var $v=new WeakSet;class qv{constructor(e){Bv(this,$v),Gv(this,"plugin",void 0),Gv(this,"mergedCells",[]),Gv(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){return Es["a"]`The merged cell declared at [${e.row}, ${e.col}], overlaps\x20
- with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
- fix your setup.`}get(e,t){const n=this.mergedCells;let r=!1;return Object(h["arrayEach"])(n,n=>!(n.row<=e&&n.row+n.rowspan-1>=e&&n.col<=t&&n.col+n.colspan-1>=t)||(r=n,!1)),r}getByRange(e){const t=this.mergedCells;let n=!1;return Object(h["arrayEach"])(t,t=>!(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)),n}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.mergedCells,r=[];let i=e;if(!i.includesRange){const e=this.hot._createCellCoords(i.from.row,i.from.col),t=this.hot._createCellCoords(i.to.row,i.to.col);i=this.hot._createCellRange(e,e,t)}return Object(h["arrayEach"])(n,e=>{const n=this.hot._createCellCoords(e.row,e.col),s=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),o=this.hot._createCellRange(n,n,s);t?i.overlaps(o)&&r.push(e):i.includesRange(o)&&r.push(e)}),!!r.length&&r}add(e){const t=this.mergedCells,n=e.row,r=e.col,i=e.rowspan,s=e.colspan,o=new Uv(n,r,i,s,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,r),l=this.isOverlapping(o);return a||l?(Object(jr["b"])(qv.IS_OVERLAPPING_WARNING(o)),!1):(this.hot&&o.normalize(this.hot),t.push(o),o)}remove(e,t){const n=this.mergedCells,r=this.get(e,t),i=r?this.mergedCells.indexOf(r):-1;return!(!r||-1===i)&&(n.splice(i,1),r)}clear(){const e=this.mergedCells,t=[],n=[];Object(h["arrayEach"])(e,e=>{const n=this.hot.getCell(e.row,e.col);n&&t.push([n,this.get(e.row,e.col),e.row,e.col])}),this.mergedCells.length=0,Object(h["arrayEach"])(t,(e,r)=>{Object(rt["rangeEach"])(0,e.rowspan-1,t=>{Object(rt["rangeEach"])(0,e.colspan-1,r=>{if(0!==r||0!==t){const i=this.hot.getCell(e.row+t,e.col+r);i&&n.push([i,null,null,null])}})}),t[r][1]=null}),Object(h["arrayEach"])(t,e=>{Vv(...e)}),Object(h["arrayEach"])(n,e=>{Vv(...e)})}isOverlapping(e){const t=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));let n=!1;return Object(h["arrayEach"])(this.mergedCells,e=>{const r=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));return!r.overlaps(t)||(n=!0,!1)}),n}isFirstRenderableMergedCell(e,t){const n=this.get(e,t);return n&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1)===t}getFirstRenderableCoords(e,t){const n=this.get(e,t);if(!n||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const r=this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(r,i)}getStartMostColumnIndex(e,t){const n=Xv($v,this,Jv).call(this,e,"col",-1);let r=t;for(let i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r}getEndMostColumnIndex(e,t){const n=Xv($v,this,Jv).call(this,e,"col",1);let r=t;for(let i=0;i<n.length;i++)if(n[i]>=t){r=n[i];break}return r}getTopMostRowIndex(e,t){const n=Xv($v,this,Jv).call(this,e,"row",-1);let r=t;for(let i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r}getBottomMostRowIndex(e,t){const n=Xv($v,this,Jv).call(this,e,"row",1);let r=t;for(let i=0;i<n.length;i++)if(n[i]>=t){r=n[i];break}return r}shiftCollections(e,t,n){const r=[0,0];switch(e){case"right":r[0]+=n;break;case"left":r[0]-=n;break;case"down":r[1]+=n;break;case"up":r[1]-=n;break;default:}Object(h["arrayEach"])(this.mergedCells,e=>{e.shift(r,t)}),Object(rt["rangeEachReverse"])(this.mergedCells.length-1,0,e=>{const t=this.mergedCells[e];t&&t.removed&&this.mergedCells.splice(this.mergedCells.indexOf(t),1)})}}function Jv(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=new Map,i=1===n?e.getTopStartCorner():e.getBottomEndCorner(),s=1===n?e.getBottomEndCorner():e.getTopStartCorner();for(let o=i.row;1===n?o<=s.row:o>=s.row;o+=n)for(let e=i.col;1===n?e<=s.col:e>=s.col;e+=n){const i="row"===t?o:e,s=this.get(o,e);let a=i;s&&(a=1===n?s[t]+s[t+"span"]-1:s[t]),r.has(i)||r.set(i,new Set),r.get(i).add(a)}return Array.from(new Set(Array.from(r.entries()).filter(e=>{let[,t]=e;return 1===t.size}).flatMap(e=>{let[,t]=e;return Array.from(t)})))}var Qv=qv;function Zv(e,t,n){return t=eS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eS(e){var t=tS(e,"string");return"symbol"==typeof t?t:t+""}function tS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class nS{constructor(e){Zv(this,"plugin",void 0),Zv(this,"mergedCellsCollection",void 0),Zv(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let n=null;return n=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",n}snapDragArea(e,t,n,r){const i=t.slice(0),s=this.getAutofillSize(e,t,n),[o,a,l,c]=e,u=["up","down"].indexOf(n)>-1,h=u?l-o+1:c-a+1,d=Math.floor(s/h)*h,m=s-d,f=this.getFarthestCollection(e,t,n,r);if(f)if("down"===n){const e=f.row+f.rowspan-o-m,t=i[2]+e;t>=this.plugin.hot.countRows()?i[2]-=m:i[2]+=m?e:0}else if("right"===n){const e=f.col+f.colspan-a-m,t=i[3]+e;t>=this.plugin.hot.countCols()?i[3]-=m:i[3]+=m?e:0}else if("up"===n){const e=l-m-f.row+1,t=i[0]+e;t<0?i[0]+=m:i[0]-=m?e:0}else if("left"===n){const e=c-m-f.col+1,t=i[1]+e;t<0?i[1]+=m:i[1]-=m?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:s,dragArea:i,cycleLength:h}),i}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),Object(o["extend"])(this.currentFillData,e)}getAutofillSize(e,t,n){const[r,i,s,o]=e,[a,l,c,u]=t;switch(n){case"up":return r-a;case"down":return c-s;case"left":return i-l;case"right":return u-o;default:return null}}getDragArea(e,t,n){const[r,i,s,o]=e,[a,l,c,u]=t;switch(n){case"up":return[a,l,r-1,o];case"down":return[s+1,i,c,o];case"left":return[a,l,s,i-1];case"right":return[r,o+1,c,u];default:return null}}getFarthestCollection(e,t,n,r){const[i,s,o,a]=e,l=["up","down"].indexOf(n)>-1,c=l?o:a,u=l?i:s,d=this.getAutofillSize(e,t,n),m=l?o-i+1:a-s+1,f=Math.floor(d/m)*m,p=d-f;let g=null,y=null,w=null;switch(n){case"up":g="includesVertically",w=c-p+1;break;case"left":g="includesHorizontally",w=c-p+1;break;case"down":g="includesVertically",w=u+p-1;break;case"right":g="includesHorizontally",w=u+p-1;break;default:}return Object(h["arrayEach"])(r,e=>{e[g](w)&&e.isFarther(y,n)&&(y=e)}),y}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,i=(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}};let s=0,o=null,a=1;do{for(let e=0;e<n.length;e+=1){if(o=n[e],s=a*this.currentFillData.cycleLength,i(o,s))switch(r){case"up":this.plugin.mergedCellsCollection.add({row:o.row-s,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:o.row+s,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col-s,colspan:o.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col+s,colspan:o.colspan});break;default:}e===n.length-1&&(a+=1)}}while(i(o,s));this.currentFillData=null,this.plugin.hot.render(),n.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},n={min:null,max:null};return Object(h["arrayEach"])(e,e=>{const r=e[0],i=this.plugin.hot.propToCol(e[1]);(null===t.min||r<t.min)&&(t.min=r),(null===t.max||r>t.max)&&(t.max=r),(null===n.min||i<n.min)&&(n.min=i),(null===n.max||i>n.max)&&(n.max=i)}),{from:{row:t.min,column:n.min},to:{row:t.max,column:n.max}}}dragAreaOverlapsCollections(e,t,n){const r=this.getDragArea(e,t,n),[i,s,o,a]=r,l=this.plugin.hot._createCellCoords(i,s),c=this.plugin.hot._createCellCoords(o,a),u=this.plugin.hot._createCellRange(l,l,c);return!!this.mergedCellsCollection.getWithinRange(u,!0)}}var rS=nS;function iS(e,t,n){return t=sS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sS(e){var t=oS(e,"string");return"symbol"==typeof t?t:t+""}function oS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class aS{constructor(e){iS(this,"plugin",void 0),iS(this,"hot",void 0),iS(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,n,r){const i=Math.min(n[0],n[2]),s=Math.min(n[1],n[3]),o=Math.max(n[0],n[2]),a=Math.max(n[1],n[3]);if(void 0===r)return;const l=this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t);if(!l)return;const c=this.plugin.mergedCellsCollection.get(e,t);if(!c)return;const u=c.getLastRow(),h=c.getLastColumn(),d=i<=c.row&&s<=c.col&&o>=u&&a>=h;return d?`${this.fullySelectedMergedCellClassName}-${r}`:this.isMergeCellFullySelected(c,this.plugin.hot.getSelectedRange())?this.fullySelectedMergedCellClassName+"-multiple":void 0}isMergeCellFullySelected(e,t){const n=[];if(!t||!e)return!1;for(let r=0;r<e.rowspan;r+=1)for(let t=0;t<e.colspan;t+=1)n.push(this.hot._createCellCoords(e.row+r,e.col+t));for(let r=0;r<n.length;r+=1){const e=[];for(let i=0;i<t.length;i+=1)e[i]=t[i].includes(n[r]);if(!e.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(this.fullySelectedMergedCellClassName+"-multiple"),e}}var lS=aS;function cS(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const n=e.mergedCellsCollection.get(t[0],t[1]);if(n.row===t[0]&&n.col===t[1]&&n.row+n.rowspan-1===t[2]&&n.col+n.colspan-1===t[3])return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_UNMERGE_CELLS"])}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_MERGE_CELLS"])},callback(){const t=this.getSelectedRangeLast();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:n,to:r}=t;e.toggleMerge(t),this.selectCell(n.row,n.col,r.row,r.col,!1)},disabled(){const e=this.getSelectedLast();if(!e)return!0;const t=Uv.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1});return t||this.selection.isSelectedByCorner()},hidden:!1}}function uS(e,t,n){return t=hS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hS(e){var t=dS(e,"string");return"symbol"==typeof t?t:t+""}function dS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class mS{constructor(e){uS(this,"data",void 0),uS(this,"next",null),uS(this,"prev",null),this.data=e}}class fS{constructor(){uS(this,"first",null),uS(this,"last",null)}push(e){const t=new mS(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new mS(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;while(t){const n=e(t);if(t===this.last||!0===n)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,n,r=this.first;while(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}hasCycle(){let e=this.first,t=this.first;while(1){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){function e(t,n){n&&(e(n,n.next),n.next=t)}if(!this.first)return;e(this.first,this.first.next),this.first.next=null;const t=this.first;this.first=this.last,this.last=t}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,n=this.first;while(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}}var pS=fS;function gS(e,t){wS(e,t),t.add(e)}function yS(e,t,n){wS(e,t),t.set(e,n)}function wS(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bS(e,t){return e.get(vS(e,t))}function _S(e,t,n){return e.set(vS(e,t),n),n}function vS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var SS=new WeakMap,ES=new WeakMap,CS=new WeakMap,TS=new WeakMap,MS=new WeakMap,RS=new WeakMap,OS=new WeakMap,NS=new WeakSet;class AS{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:r}=e;gS(this,NS),yS(this,SS,new pS),yS(this,ES,new pS),yS(this,CS,null),yS(this,TS,null),yS(this,MS,null),yS(this,RS,null),yS(this,OS,null),_S(MS,this,t),_S(RS,this,n),_S(OS,this,r)}getCurrentVerticalNode(){return bS(TS,this).data}getFirstVerticalNode(){return bS(ES,this).first.data}getNextVerticalNode(){return bS(TS,this).next.data}getPrevVerticalNode(){return bS(TS,this).prev.data}getCurrentHorizontalNode(){return bS(CS,this).data}getFirstHorizontalNode(){return bS(SS,this).first.data}getNextHorizontalNode(){return bS(CS,this).next.data}getPrevHorizontalNode(){return bS(CS,this).prev.data}setPrevNodeAsActive(){_S(TS,this,bS(TS,this).prev),_S(CS,this,bS(CS,this).prev)}setNextNodeAsActive(){_S(TS,this,bS(TS,this).next),_S(CS,this,bS(CS,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),r=new WeakSet;_S(SS,this,new pS);for(let s=t.row;s<=n.row;s++)if(!bS(RS,this).isHidden(s))for(let i=t.col;i<=n.col;i++){if(bS(OS,this).isHidden(i))continue;const t=vS(NS,this,LS).call(this,e,bS(SS,this),r,s,i);t&&_S(CS,this,t)}bS(SS,this).first&&(bS(SS,this).first.prev=bS(SS,this).last,bS(SS,this).last.next=bS(SS,this).first);const i=new WeakSet;_S(ES,this,new pS);for(let s=t.col;s<=n.col;s++)if(!bS(OS,this).isHidden(s))for(let r=t.row;r<=n.row;r++){if(bS(RS,this).isHidden(r))continue;const t=vS(NS,this,LS).call(this,e,bS(ES,this),i,r,s);t&&_S(TS,this,t)}bS(ES,this).first&&(bS(ES,this).first.prev=bS(ES,this).last,bS(ES,this).last.next=bS(ES,this).first)}setActiveNode(e,t){return bS(SS,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return _S(CS,this,n),!1}),bS(ES,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return _S(TS,this,n),!1}),this}}function LS(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=bS(MS,this).call(this,r,i);if(l&&n.has(l))return null;const c={colStart:i,colEnd:i,rowStart:r,rowEnd:r};if(l){if(n.add(l),l.row<s.row||l.row+l.rowspan-1>o.row||l.col<s.col||l.col+l.colspan-1>o.col)return null;c.colStart=l.col,c.colEnd=l.col+l.colspan-1,c.rowStart=l.row,c.rowEnd=l.row+l.rowspan-1}const u=t.push(c);return r===a.row&&i===a.col||l&&a.row>=l.row&&a.row<=l.row+l.rowspan-1&&a.col>=l.col&&a.col<=l.col+l.colspan-1?u:null}function IS(e,t){kS(e,t),t.add(e)}function xS(e,t,n){kS(e,t),t.set(e,n)}function kS(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DS(e,t,n){return t=HS(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HS(e){var t=PS(e,"string");return"symbol"==typeof t?t:t+""}function PS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function jS(e,t,n){return e.set(YS(e,t),n),n}function FS(e,t){return e.get(YS(e,t))}function YS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}fe["a"].getSingleton().register("beforeMergeCells"),fe["a"].getSingleton().register("afterMergeCells"),fe["a"].getSingleton().register("beforeUnmergeCells"),fe["a"].getSingleton().register("afterUnmergeCells");const US="mergeCells",VS=150,BS=US;var WS=new WeakMap,GS=new WeakMap,zS=new WeakMap,KS=new WeakSet;class XS extends en["a"]{constructor(){super(...arguments),IS(this,KS),DS(this,"mergedCellsCollection",null),DS(this,"autofillCalculations",null),DS(this,"selectionCalculations",null),xS(this,WS,null),xS(this,GS,{row:0,col:0}),xS(this,zS,new AS({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper}))}static get PLUGIN_KEY(){return US}static get PLUGIN_PRIORITY(){return VS}isEnabled(){return!!this.hot.getSettings()[US]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new Qv(this),this.autofillCalculations=new rS(this),this.selectionCalculations=new lS(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,$S).call(e,...n)})),this.addHook("modifyTransformFocus",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,JS).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,QS).call(e,...n)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,ZS).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,eE).call(e,...n)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,iE).call(e,...n)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,iE).call(e,...n)})),this.addHook("beforeSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,sE).call(e,...n)})),this.addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,oE).call(e,...n)})),this.addHook("afterSelectionEnd",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,aE).call(e,...n)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,tE).call(e,...n)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,qS).call(e,...n)})),this.addHook("afterRenderer",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,rE).call(e,...n)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,nE).call(e,...n)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,lE).call(e,...n)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,cE).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,uE).call(e,...n)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,hE).call(e,...n)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,dE).call(e,...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,mE).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,fE).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,pE).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,gE).call(e,...n)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,yE).call(e,...n)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,wE).call(e,...n)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,bE).call(e,...n)})),this.addHook("beforeBeginEditing",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return YS(KS,e,_E).call(e,...n)})),this.addHook("beforeUndoStackChange",(e,t)=>{if("MergeCells"===t)return!1}),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[US];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!Object(p["isChrome"])())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach(e=>{const{row:n,rowspan:r}=e;for(let i=n+1;i<n+r;i++)t.push(i)}),t=[...new Set(t)],t.forEach(t=>{const n=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map(e=>"master"===(null===e||void 0===e?void 0:e.name)?e:e.clone.wtTable).forEach(t=>{const r=t.getRow(n);r&&(r.style.background=Object(i["getStyle"])(r,"backgroundColor").replace(")",", 0.99)"),e.push(r))})}),this.hot._registerTimeout(()=>{e.forEach(e=>{e.style.background=Object(i["getStyle"])(e,"backgroundColor").replace(", 0.99)",")")})},1)}validateSetting(e){let t=!0;return!!e&&(Uv.containsNegativeValues(e)?(Object(jr["b"])(Uv.NEGATIVE_VALUES_WARNING(e)),t=!1):Uv.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?(Object(jr["b"])(Uv.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):Uv.isSingleCell(e)?(Object(jr["b"])(Uv.IS_SINGLE_CELL(e)),t=!1):Uv.containsZeroSpan(e)&&(Object(jr["b"])(Uv.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if(Object(h["arrayEach"])(e,e=>{if(!this.validateSetting(e))return;const n=this.hot._createCellCoords(e.row,e.col),r=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=this.hot._createCellRange(n,n,r);this.mergeRange(i,!0,!0),Object(rt["rangeEach"])(e.row,e.row+e.rowspan-1,n=>{Object(rt["rangeEach"])(e.col,e.col+e.colspan-1,r=>{!1===(n===e.row&&r===e.col)&&t.push([n,r,null])})})}),0===t.length)return;this.hot.setDataAtCell(t,void 0,void 0,this.pluginName)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!t||this.validateSetting(e)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:n}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:n}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.getTopStartCorner(),i=e.getBottomEndCorner(),s={row:r.row,col:r.col,rowspan:i.row-r.row+1,colspan:i.col-r.col+1},o=[];let a=null;if(!this.canMergeRange(s,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),Object(rt["rangeEach"])(0,s.rowspan-1,e=>{Object(rt["rangeEach"])(0,s.colspan-1,t=>{let n=null;o[e]||(o[e]=[]),0===e&&0===t?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s.row),this.hot.toPhysicalColumn(s.col)):this.hot.setCellMeta(s.row+e,s.col+t,"hidden",!0),o[e][t]=n})}),this.hot.setCellMeta(s.row,s.col,"spanned",!0);const l=this.mergedCellsCollection.add(s);return!l||(n?a=[s.row,s.col,o]:this.hot.populateFromArray(s.row,s.col,o,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,s,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.mergedCellsCollection.getWithinRange(e);n&&(this.hot.runHooks("beforeUnmergeCells",e,t),Object(h["arrayEach"])(n,e=>{this.mergedCellsCollection.remove(e.row,e.col),Object(rt["rangeEach"])(0,e.rowspan-1,t=>{Object(rt["rangeEach"])(0,e.colspan-1,n=>{this.hot.removeCellMeta(e.row+t,e.col+n,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+n,"copyable")})}),this.hot.removeCellMeta(e.row,e.col,"spanned")}),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col),n=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;n?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,n,r){const i=this.hot._createCellCoords(e,t),s=this.hot._createCellCoords(n,r);this.mergeRange(this.hot._createCellRange(i,i,s))}unmerge(e,t,n,r){const i=this.hot._createCellCoords(e,t),s=this.hot._createCellCoords(n,r);this.unmergeRange(this.hot._createCellRange(i,i,s))}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:BS})}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(BS)}modifyViewportRowStart(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.startRow);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(r,i);if(Object(o["isObject"])(s)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.row,1));if(r<e.startRow)return e.startRow=r,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.endRow);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(r,i);if(Object(o["isObject"])(s)){const r=s.row+s.rowspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(i>e.endRow)return e.endRow=i,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.startColumn);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(i,r);if(Object(o["isObject"])(s)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.col,1));if(r<e.startColumn)return e.startColumn=r,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.endColumn);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(i,r);if(Object(o["isObject"])(s)){const r=s.col+s.colspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(i>e.endColumn)return e.endColumn=i,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,n,r){const{rowIndexMapper:i,columnIndexMapper:s}=this.hot;let o,a;o=0===t?i.getNearestNotHiddenIndex(e,1):i.getNearestNotHiddenIndex(e+t-1,-1),a=0===r?s.getNearestNotHiddenIndex(n,1):s.getNearestNotHiddenIndex(n+r-1,-1);const l=e>=0?i.getRenderableFromVisualIndex(o):e,c=n>=0?s.getRenderableFromVisualIndex(a):n;return[l,c]}}function $S(){this.generateFromSettings(this.hot.getSettings()[US]),this.hot.render()}function qS(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner(),r=t.getBottomEndCorner();for(let i=0;i<e.length;i+=1)if(n.row===e[i].row&&n.col===e[i].col&&r.row===e[i].row+e[i].rowspan-1&&r.col===e[i].col+e[i].colspan-1)return!1}return e}function JS(e){FS(GS,this).row=e.row,FS(GS,this).col=e.col}function QS(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:r,rowIndexMapper:i}=this.hot;FS(WS,this)&&(null!==i.getRenderableFromVisualIndex(FS(WS,this).row)&&(n.row=FS(WS,this).row),null!==r.getRenderableFromVisualIndex(FS(WS,this).col)&&(n.col=FS(WS,this).col),jS(WS,this,null));const s=this.mergedCellsCollection.get(n.row,n.col);if(!s)return;const o=s.col,a=s.col+s.colspan-1;if(e.col<0){const t=n.col>=o&&n.col<=a?o-1:a,i=r.getNearestNotHiddenIndex(t,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,n.col)-1,1)}else if(e.col>0){const t=n.col>=o&&n.col<=a?a+1:o,i=r.getNearestNotHiddenIndex(t,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,i)-1,1)}const l=s.row,c=s.row+s.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=c?l-1:c,r=i.getNearestNotHiddenIndex(t,-1);e.row=null===r?-this.hot.view.countRenderableRowsInRange(0,n.row):-Math.max(this.hot.view.countRenderableRowsInRange(r,n.row)-1,1)}else if(e.row>0){const t=n.row>=l&&n.row<=c?c+1:l,r=i.getNearestNotHiddenIndex(t,1);e.row=null===r?this.hot.view.countRenderableRowsInRange(n.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(n.row,r)-1,1)}}function ZS(e){const t=this.hot.getSelectedRangeLast(),n=t.clone(),{to:r}=t,{columnIndexMapper:i,rowIndexMapper:s}=this.hot,o=(e,t)=>{n.expand(this.hot._createCellCoords(e,t));for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange())};if(e.col<0){let s=this.mergedCellsCollection.getStartMostColumnIndex(t,r.col)+e.col;o(r.row,s),"E-W"===t.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(s=n.getTopStartCorner().col);const a=i.getNearestNotHiddenIndex(s,1);null!==a&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,r.col)-1,1))}else if(e.col>0){let s=this.mergedCellsCollection.getEndMostColumnIndex(t,r.col)+e.col;o(r.row,s),"W-E"===t.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(s=n.getBottomEndCorner().col);const a=i.getNearestNotHiddenIndex(s,-1);null!==a&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(r.col,a)-1,1))}if(e.row<0){let i=this.mergedCellsCollection.getTopMostRowIndex(t,r.row)+e.row;o(i,r.col),"S-N"===t.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(i=n.getTopStartCorner().row);const a=s.getNearestNotHiddenIndex(i,1);null!==a&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,r.row)-1,1))}else if(e.row>0){let i=this.mergedCellsCollection.getBottomMostRowIndex(t,r.row)+e.row;o(i,r.col),"N-S"===t.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(i=n.getBottomStartCorner().row);const a=s.getNearestNotHiddenIndex(i,-1);null!==a&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(r.row,a)-1,1))}}function eE(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void jS(WS,this,t.clone());for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange(),!1);for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange(),!1);const n=this.mergedCellsCollection.get(t.row,t.col);jS(WS,this,t.clone()),n&&t.assign(n)}function tE(e,t){if(e<0||t<0)return;const n=this.mergedCellsCollection.get(e,t);if(!n)return;const{row:r,col:i,colspan:s,rowspan:o}=n;return[r,i,r+o-1,i+s-1]}function nE(e){e.items.push({name:"---------"},cS(this))}function rE(e,t,n){const r=this.mergedCellsCollection.get(t,n),i=Object(o["isObject"])(r)?Object(o["clone"])(r):void 0;if(Object(o["isObject"])(i)){const{rowIndexMapper:e,columnIndexMapper:r}=this.hot,{row:s,col:o,colspan:a,rowspan:l}=i,[c,u]=this.translateMergedCellToRenderable(s,l,o,a),h=e.getRenderableFromVisualIndex(t),d=r.getRenderableFromVisualIndex(n),m=c-h+1,f=u-d+1;i.row=e.getNearestNotHiddenIndex(i.row,1),i.col=r.getNearestNotHiddenIndex(i.col,1),i.rowspan=Math.min(i.rowspan,m),i.colspan=Math.min(i.colspan,f)}Vv(e,i,t,n)}function iE(){jS(WS,this,null)}function sE(){if(FS(WS,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),n=e.getHorizontalDirection(),r=FS(WS,this).clone().normalize();FS(zS,this).setActiveNode(r.row,r.col),FS(GS,this).row>0||FS(GS,this).col>0?FS(zS,this).setPrevNodeAsActive():("E-W"===n&&FS(GS,this).col<0||"S-N"===t&&FS(GS,this).row<0)&&FS(zS,this).setNextNodeAsActive()}function oE(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:r,rowIndexMapper:i}=this.hot;let s=null,o=null;if(FS(GS,this).col<0){const{rowEnd:e,colEnd:t}=FS(zS,this).getPrevHorizontalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(FS(GS,this).col>0){const{rowStart:e,colStart:t}=FS(zS,this).getNextHorizontalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}else if(FS(GS,this).row<0){const{rowEnd:e,colEnd:t}=FS(zS,this).getPrevVerticalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(FS(GS,this).row>0){const{rowStart:e,colStart:t}=FS(zS,this).getNextVerticalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}if(null!==s||null!==o){const r=this.hot._createCellCoords(s,o),i=this.mergedCellsCollection.get(r.row,r.col),a=this.hot.selection.highlight.getFocus();e=r.row,t=r.col,i?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(i.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(i.col,1)}):n.highlight.assign(r),a.clear(),a.add(r).commit()}FS(zS,this).setActiveNode(e,t),jS(GS,this,{row:0,col:0})}function aE(){const e=this.hot.getSelectedRangeLast();e.isHeader()||FS(zS,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function lE(e,t,n){const r=this.mergedCellsCollection.get(e,t);r&&(r.row!==e||r.col!==t?n.copyable=!1:(n.rowspan=r.rowspan,n.colspan=r.colspan))}function cE(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function uE(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function hE(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const n=this.autofillCalculations.getDirection(t,e);let r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,r,n))return r=t,r;const i=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return i?(r=this.autofillCalculations.snapDragArea(t,r,n,i),r):r}function dE(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function mE(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function fE(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}function pE(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function gE(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function yE(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),n=this.mergedCellsCollection.getWithinRange(t);Object(h["arrayEach"])(n,n=>{t.getBottomEndCorner().row===n.getLastRow()&&t.getBottomEndCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)})}}function wE(e,t,n,r){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}function bE(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function _E(e,t,n,r){if(!(r instanceof MouseEvent))return;const i=this.hot.getSelectedRangeLast(),s=this.mergedCellsCollection.getByRange(i);if(!s)return;const o=this.hot._createCellCoords(s.row,s.col),a=this.hot._createCellCoords(s.row+s.rowspan-1,s.col+s.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(o,o,a))}function vE(e,t){return function(n,r){const[,...i]=n,[,...s]=r;return function n(r){const o=e[r],a=t[r],l=i[r],c=s[r],u=a.multiColumnSorting,h=u.compareFunctionFactory?u.compareFunctionFactory:Zi(a.type),d=h(o,a,u)(l,c);if(d===Di){const e=r+1;if("undefined"!==typeof t[e])return n(e)}return d}(0)}}function SE(){Object(jr["b"])(Es["a"]`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
- Only \`multiColumnSorting\` will work.`)}const EE="sort";function CE(e,t,n){const r=[];return!1===n||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&r.push(`${EE}-${e.getIndexOfColumnInSortQueue(t)+1}`),r}function TE(e){const t=e.className.split(" "),n=new RegExp(`^${EE}-[0-9]{1,2}$`);return t.filter(e=>n.test(e))}function ME(e,t,n){return t=RE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RE(e){var t=OE(e,"string");return"symbol"==typeof t?t:t+""}function OE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const NE="multiColumnSorting",AE=170,LE="columnSorting",IE=NE;Ji(NE,vE);class xE extends ms{constructor(){super(...arguments),ME(this,"pluginKey",NE)}static get PLUGIN_KEY(){return NE}static get PLUGIN_PRIORITY(){return AE}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[LE]&&SE(),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,cs)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&n.isHeader()},relativeToGroup:Pe["a"],position:"before",group:IE})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(IE)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];super.updateHeaderClasses(e,...n),Object(i["removeClass"])(e,TE(e)),!1!==this.enabled&&Object(i["addClass"])(e,CE(...n))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[LE]&&SE(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==Mi(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,cs))):this.sort(this.getColumnNextConfig(t.col)))}}function kE(e,t,n){return t=DE(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DE(e){var t=HE(e,"string");return"symbol"==typeof t?t:t+""}function HE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const PE="multipleSelectionHandles",jE=160;class FE extends en["a"]{constructor(){super(...arguments),kE(this,"dragged",[]),kE(this,"lastSetCell",null)}static get PLUGIN_KEY(){return PE}static get PLUGIN_PRIORITY(){return jE}isEnabled(){return Object(p["isMobileBrowser"])()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function n(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const n=e.dragged.indexOf(t);if(-1===n)return!1;0===n?e.dragged=e.dragged.slice(0,1):1===n&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",t=>{let n;return Object(i["hasClass"])(t.target,"topSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):Object(i["hasClass"])(t.target,"bottomSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):void 0}),this.eventManager.addEventListener(t,"touchend",t=>Object(i["hasClass"])(t.target,"topSelectionHandle-HitArea")?(n.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):Object(i["hasClass"])(t.target,"bottomSelectionHandle-HitArea")?(n.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0),this.eventManager.addEventListener(t,"touchmove",t=>{const{rootDocument:n}=this.hot;let r,i,s,o,a,l;if(0===e.dragged.length)return;const c=n.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);c&&c!==e.lastSetCell&&("TD"!==c.nodeName&&"TH"!==c.nodeName||(r=e.hot.getCoords(c),-1===r.col&&(r.col=0),i=e.hot.getSelectedRangeLast(),s=i.getWidth(),o=i.getHeight(),a=i.getDirection(),1===s&&1===o&&e.hot.selection.setRangeEnd(r),l=e.getCurrentRangeCoords(i,r,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=c),t.preventDefault())})}getCurrentRangeCoords(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let c={start:null,end:null};switch(n){case"NE-SW":switch(r){case"NE-SW":case"NW-SE":c="top"===i?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,s.col)};break;case"SE-NW":"bottom"===i&&(c={start:this.hot._createCellCoords(o.row,t.col),end:this.hot._createCellCoords(t.row,s.col)});break;default:break}break;case"NW-SE":switch(r){case"NE-SW":"top"===i?c={start:t,end:a}:c.end=t;break;case"NW-SE":"top"===i?c={start:t,end:o}:c.end=t;break;case"SE-NW":"top"===i?c={start:t,end:s}:c.end=t;break;case"SW-NE":"top"===i?c={start:t,end:l}:c.end=t;break;default:break}break;case"SW-NE":switch(r){case"NW-SE":c="bottom"===i?{start:this.hot._createCellCoords(t.row,s.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(s.row,t.col),end:this.hot._createCellCoords(t.row,o.col)};break;case"SW-NE":c="top"===i?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,o.col)}:{start:this.hot._createCellCoords(t.row,s.col),end:this.hot._createCellCoords(s.row,t.col)};break;case"SE-NW":"bottom"===i?c={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(s.row,t.col)}:"top"===i&&(c={start:a,end:t});break;default:break}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(c.end=t);break;case"SE-NW":"top"===i?c.end=t:c={start:t,end:s};break;default:break}break;default:break}return c}isDragged(){return this.dragged.length>0}}var YE=n("a309");function UE(){let{label:e="",colspan:t=1,origColspan:n=1,collapsible:r=!1,crossHiddenColumns:i=[],isCollapsed:s=!1,isHidden:o=!1,isRoot:a=!1,isPlaceholder:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:n,collapsible:r,isCollapsed:s,crossHiddenColumns:i,isHidden:o,isRoot:a,isPlaceholder:l}}function VE(){return{label:"",isPlaceholder:!0}}function BE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===t)return n;Object(h["arrayEach"])(e,e=>{const r=[];let i=0;n.push(r),Object(h["arrayEach"])(e,e=>{const n=UE();if(Object(o["isObject"])(e)){const{label:t,colspan:r}=e;n.label=Object(d["stringify"])(t),"number"===typeof r&&r>1&&(n.colspan=r,n.origColspan=r)}else n.label=Object(d["stringify"])(e);i+=n.origColspan;let s=!1;if(i>=t&&(n.colspan=n.origColspan-(i-t),n.origColspan=n.colspan,s=!0),r.push(n),n.colspan>1)for(let t=0;t<n.colspan-1;t++)r.push(VE());return!s})});const r=Math.max(...Object(h["arrayMap"])(n,e=>e.length));return Object(h["arrayEach"])(n,e=>{if(e.length<r){const t=Object(h["arrayMap"])(new Array(r-e.length),()=>UE());e.splice(e.length,0,...t)}}),n}function WE(e,t,n){GE(e,t),t.set(e,n)}function GE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zE(e,t){return e.get(XE(e,t))}function KE(e,t,n){return e.set(XE(e,t),n),n}function XE(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const $E=["label","collapsible"];var qE=new WeakMap,JE=new WeakMap,QE=new WeakMap;class ZE{constructor(){WE(this,qE,[]),WE(this,JE,0),WE(this,QE,1/0)}setColumnsLimit(e){KE(QE,this,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];KE(qE,this,BE(e,zE(QE,this))),KE(JE,this,zE(qE,this).length)}getData(){return zE(qE,this)}mergeWith(e){Object(h["arrayEach"])(e,e=>{let{row:t,col:n,...r}=e;const i=this.getHeaderSettings(t,n);null!==i&&Object(o["extend"])(i,r,$E)})}map(e){Object(h["arrayEach"])(zE(qE,this),t=>{Object(h["arrayEach"])(t,t=>{const n=e({...t});Object(o["isObject"])(n)&&Object(o["extend"])(t,n,$E)})})}getHeaderSettings(e,t){var n;if(e>=zE(JE,this)||e<0)return null;const r=zE(qE,this)[e];return!1===Array.isArray(r)||t>=r.length?null:null!==(n=r[t])&&void 0!==n?n:null}getHeadersSettings(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=[];if(e>=zE(JE,this)||e<0)return r;const i=zE(qE,this)[e];let s=0;for(let o=t;o<i.length;o++){const e=i[o];if(e.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(s+=e.colspan,r.push(e),e.colspan>1&&(o+=e.colspan-1),s===n)break;if(s>n)throw new Error("The last column settings cannot overlap the other header layers")}return r}getLayersCount(){return zE(JE,this)}getColumnsCount(){return zE(JE,this)>0?zE(qE,this)[0].length:0}clear(){KE(qE,this,[]),KE(JE,this,0)}}function eC(e,t,n){return t=tC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tC(e){var t=nC(e,"string");return"symbol"==typeof t?t:t+""}function nC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const rC="DF-pre-order";function iC(e,t){let n=e.call(t,this);for(let r=0;r<this.childs.length;r++){if(!1===n)return!1;n=iC.call(this.childs[r],e,t)}return n}const sC="DF-post-order";function oC(e,t){for(let n=0;n<this.childs.length;n++){const r=oC.call(this.childs[n],e,t);if(!1===r)return!1}return e.call(t,this)}const aC="BF";function lC(e,t){const n=[this];function r(){if(0===n.length)return;const i=n.shift();n.push(...i.childs),!1!==e.call(t,i)&&r()}r()}const cC=aC,uC=new Map([[rC,iC],[sC,oC],[aC,lC]]);class hC{constructor(e){eC(this,"data",{}),eC(this,"parent",null),eC(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new hC({...e.data});for(let n=0;n<e.childs.length;n++)t.addChild(this.cloneTree(e.childs[n]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cC;if(!uC.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);uC.get(t).call(this,e,this)}walkUp(e){const t=this,n=r=>{const i=e.call(t,r);!1!==i&&null!==r.parent&&n(r.parent)};n(this)}}function dC(e,t,n){mC(e,t),t.set(e,n)}function mC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fC(e,t){return e.get(gC(e,t))}function pC(e,t,n){return e.set(gC(e,t),n),n}function gC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var yC=new WeakMap,wC=new WeakMap,bC=new WeakMap;class _C{constructor(e){dC(this,yC,new Map),dC(this,wC,new Map),dC(this,bC,null),pC(bC,this,e)}getRoots(){return Array.from(fC(yC,this).values())}getRootByColumn(e){let t;return fC(wC,this).has(e)&&(t=fC(yC,this).get(fC(wC,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const r=t-fC(wC,this).get(t);let i,s=0;return n.walkDown(n=>{const{data:{origColspan:o,headerLevel:a}}=n;if(e===a){if(r>=s&&r<=s+o-1)return i=n,i.data.isRoot=t===i.data.columnIndex,!1;s+=o}}),i}rebuildTreeIndex(){let e=0;fC(wC,this).clear(),Object(h["arrayEach"])(fC(yC,this),t=>{let[,{data:{colspan:n}}]=t;for(let r=e;r<e+n;r++)fC(wC,this).set(r,e);e+=n})}buildTree(){this.clear();const e=fC(bC,this).getColumnsCount();let t=0;while(t<e){const e=fC(bC,this).getHeaderSettings(0,t),n=new hC;fC(yC,this).set(t,n),this.buildLeaves(n,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=fC(bC,this).getHeadersSettings(n,t,r);n+=1,Object(h["arrayEach"])(i,r=>{const i={...r,headerLevel:n-1,columnIndex:t};let s;1===n?(e.data=i,s=e):(s=new hC(i),e.addChild(s)),n<fC(bC,this).getLayersCount()&&this.buildLeaves(s,t,n,r.origColspan),t+=r.origColspan})}clear(){fC(yC,this).clear(),fC(wC,this).clear()}}function vC(e,t){e.walkDown(e=>{let{data:n,childs:r}=e;if(!n.isHidden&&(t(n.columnIndex),0===r.length))for(let i=1;i<n.colspan;i++)t(n.columnIndex+i)})}function SC(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function EC(e){return SC(e,"origColspan")===e.data.origColspan}function CC(e){const{data:t,childs:n}=e;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const r=EC(e);if(r)return CC(n[0]);t.isCollapsed=!1;const i=n.slice(1),s=new Set;let o=0;if(i.length>0)Object(h["arrayEach"])(i,e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;o+=t.colspan,vC(e,e=>{s.add(e)})});else{const{colspan:e,origColspan:n,columnIndex:r}=t;o=n-e;for(let t=1;t<n;t++)s.add(r+t)}return e.walkUp(e=>{const{data:t}=e;t.colspan+=o,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):EC(e)&&(t.isCollapsed=SC(e,"isCollapsed"))}),{rollbackModification:()=>TC(e),affectedColumns:Array.from(s),colspanCompensation:o}}function TC(e){var t;const{data:n,childs:r}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const i=EC(e);if(i)return TC(r[0]);n.isCollapsed=!0;const s=r.slice(1),o=new Set;if(s.length>0)Object(h["arrayEach"])(s,e=>{vC(e,e=>{o.add(e)}),e.data.clonedTree=e.cloneTree(),e.walkDown(e=>{let{data:t}=e;t.isHidden=!0})});else{const{origColspan:e,columnIndex:t}=n;for(let n=1;n<e;n++){const e=t+n;o.add(e)}}const a=n.colspan-(null!==(t=SC(e,"colspan"))&&void 0!==t?t:1);return e.walkUp(e=>{const{data:t}=e;t.colspan-=a,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):EC(e)&&(t.isCollapsed=SC(e,"isCollapsed"))}),{rollbackModification:()=>CC(e),affectedColumns:Array.from(o),colspanCompensation:a}}function MC(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Es["a"]`The passed node is not the last node on the tree. Only for\x20
- the last node, the hide column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(n.includes(t))return;let r=!1;e.walkUp(e=>{const{data:{collapsible:t}}=e;if(t)return r=!0,!1}),r||e.walkUp(e=>{const{data:n}=e;n.crossHiddenColumns.push(t),n.colspan>1?n.colspan-=1:n.isHidden=!0})}function RC(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Es["a"]`The passed node is not the last node on the tree. Only for\x20
- the last node, the show column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(!n.includes(t))return;let r=!1;e.walkUp(e=>{const{data:{collapsible:t}}=e;if(t)return r=!0,!1}),r||e.walkUp(e=>{const{data:n}=e;n.crossHiddenColumns.splice(n.crossHiddenColumns.indexOf(t),1),!n.isHidden&&n.colspan<n.origColspan&&(n.colspan+=1),n.isHidden=!1})}const OC=new Map([["collapse",TC],["expand",CC],["hide-column",MC],["show-column",RC]]);function NC(e,t,n){if(!OC.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return OC.get(e)(t,n)}function AC(e){const t=[];return Object(h["arrayEach"])(e,e=>{e.walkDown(e=>{const n=e.data,{origColspan:r,columnIndex:i,headerLevel:s,crossHiddenColumns:o}=n,a=IC(t,s);let l=!1;for(let t=i;t<i+r;t++){const e=o.includes(t);if(e||l)a.push(VE(n));else{const e=LC(n);e.isRoot=!0,a.push(e),l=!0}}})}),t}function LC(e){const{crossHiddenColumns:t,...n}=UE(e);return n}function IC(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}function xC(e,t,n){kC(e,t),t.set(e,n)}function kC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DC(e,t,n){return e.set(PC(e,t),n),n}function HC(e,t){return e.get(PC(e,t))}function PC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var jC=new WeakMap,FC=new WeakMap,YC=new WeakMap;class UC{constructor(){xC(this,jC,new ZE),xC(this,FC,new _C(HC(jC,this))),xC(this,YC,[[]])}setState(e){HC(jC,this).setData(e);let t=!1;try{HC(FC,this).buildTree()}catch(n){HC(FC,this).clear(),HC(jC,this).clear(),t=!0}return DC(YC,this,AC(HC(FC,this).getRoots())),t}setColumnsLimit(e){HC(jC,this).setColumnsLimit(e)}mergeStateWith(e){const t=Object(h["arrayMap"])(e,e=>{let{row:t,...n}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...n}});HC(jC,this).mergeWith(t),HC(FC,this).buildTree(),DC(YC,this,AC(HC(FC,this).getRoots()))}mapState(e){HC(jC,this).map(e),HC(FC,this).buildTree(),DC(YC,this,AC(HC(FC,this).getRoots()))}mapNodes(e){return Object(h["arrayReduce"])(HC(FC,this).getRoots(),(t,n)=>(n.walkDown(n=>{const r=e(n.data);void 0!==r&&t.push(r)}),t),[])}triggerNodeModification(e,t,n){t<0&&(t=this.rowCoordsToLevel(t));const r=HC(FC,this).getNode(t,n);let i;return r&&(i=NC(e,r,n),DC(YC,this,AC(HC(FC,this).getRoots()))),i}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var n,r;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(n=null===(r=HC(YC,this)[e])||void 0===r?void 0:r[t])&&void 0!==n?n:null}getHeaderTreeNodeData(e,t){const n=this.getHeaderTreeNode(e,t);return n?{...n.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const n=HC(FC,this).getNode(e,t);return n||null}findTopMostEntireHeaderLevel(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=n-e+1;let i=!1,s=null;for(let o=e;o<=n;o++){const t=HC(FC,this).getRootByColumn(o);if(!t)break;i=!0,t.walkDown(t=>{const{columnIndex:i,headerLevel:o,origColspan:a,isHidden:l}=t.data;l||a<=r&&i>=e&&i+a-1<=n&&(null===s||o<s)&&(s=o)},rC)}return i&&null===s?-1:this.levelToRowCoords(null!==(t=s)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var n;const{isRoot:r}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0};if(r)return t;let i=t-1;while(i>=0){var s;const{isRoot:t}=null!==(s=this.getHeaderSettings(e,i))&&void 0!==s?s:{isRoot:!0};if(t)break;i-=1}return i}findRightMostColumnIndex(e,t){var n;const{isRoot:r,origColspan:i}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(r)return t+i-1;let s=t+1;while(s<this.getColumnsCount()){var o;const{isRoot:t}=null!==(o=this.getHeaderSettings(e,s))&&void 0!==o?o:{isRoot:!0};if(t)break;s+=1}return s-1}getLayersCount(){return HC(jC,this).getLayersCount()}getColumnsCount(){return HC(jC,this).getColumnsCount()}clear(){DC(YC,this,[]),HC(jC,this).clear(),HC(FC,this).clear()}}function VC(e,t,n){return t=BC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(e){var t=WC(e,"string");return"symbol"==typeof t?t:t+""}function WC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class GC{constructor(e,t){VC(this,"hot",void 0),VC(this,"nestedHeaderSettingsGetter",void 0),VC(this,"layersCount",0),VC(this,"container",void 0),VC(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let n=0;n<t;n++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),r=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(r,e[n].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:n}=this.hot,r=t.createDocumentFragment(),s=t.createElement("table"),o=!!this.hot.getSettings().dropdownMenu,a=n.getRenderableIndexesLength();for(let l=0;l<this.layersCount;l++){const e=t.createElement("tr");for(let r=0;r<a;r++){let s=n.getVisualFromRenderableIndex(r);null===s&&(s=r);const a=t.createElement("th"),c=this.nestedHeaderSettingsGetter(l,s);if(c&&(!c.isPlaceholder||c.isHidden)){let t=c.label;o&&(t+='<button class="changeType"></button>'),Object(i["fastInnerHTML"])(a,t),a.colSpan=c.colspan,e.appendChild(a)}}s.appendChild(e)}r.appendChild(s),e.appendChild(r)}clear(){this.widthsMap.clear(),this.container=null}}var zC=GC;function KC(e,t){QC(e,t),t.add(e)}function XC(e,t,n){return t=$C(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $C(e){var t=qC(e,"string");return"symbol"==typeof t?t:t+""}function qC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function JC(e,t,n){QC(e,t),t.set(e,n)}function QC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ZC(e,t,n){return e.set(tT(e,t),n),n}function eT(e,t){return e.get(tT(e,t))}function tT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const nT="nestedHeaders",rT=280;var iT=new WeakMap,sT=new WeakMap,oT=new WeakMap,aT=new WeakMap,lT=new WeakSet;class cT extends en["a"]{constructor(){super(...arguments),KC(this,lT),JC(this,iT,new UC),JC(this,sT,null),JC(this,oT,null),JC(this,aT,!1),XC(this,"ghostTable",new zC(this.hot,(e,t)=>this.getHeaderSettings(e,t))),XC(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return nT}static get PLUGIN_PRIORITY(){return rT}isEnabled(){return!!this.hot.getSettings()[nT]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||Object(jr["b"])(Es["a"]`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
- passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>tT(lT,this,MT).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,RT).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,fT).call(e,...n)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,pT).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,gT).call(e,...n)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,yT).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,wT).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,bT).call(e,...n)})),this.addHook("afterSelection",()=>tT(lT,this,uT).call(this)),this.addHook("afterSelectionFocusSet",()=>tT(lT,this,uT).call(this)),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,hT).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",e=>tT(lT,this,vT).call(this,e)),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,ET).call(e,...n)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,CT).call(e,...n)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,dT).call(e,...n)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,mT).call(e,...n)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,_T).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,ST).call(e,...n)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tT(lT,e,TT).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",()=>tT(lT,this,uT).call(this)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",()=>tT(lT,this,uT).call(this)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();eT(iT,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=eT(iT,this).setState(e)),this.detectedOverlappedHeaders&&Object(jr["b"])(Es["a"]`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
- is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((e,t)=>{const n=!0===e?"hide-column":"show-column";eT(iT,this).triggerColumnModification(n,t)}),!eT(sT,this)&&this.enabled&&ZC(sT,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(e=>{e.forEach(e=>{let{op:t,index:n,newValue:r}=e;if("replace"===t){const e=!0===r?"hide-column":"show-column";eT(iT,this).triggerColumnModification(e,n)}}),this.ghostTable.buildWidthsMap()})),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),eT(iT,this).clear(),eT(sT,this).unsubscribe(),ZC(sT,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return eT(iT,this)}getLayersCount(){return eT(iT,this).getLayersCount()}getHeaderSettings(e,t){return eT(iT,this).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,n=e.wtTable.THEAD,r=e.wtOverlays.topOverlay.clone.wtTable.THEAD,s=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let o=0;o<t;o++){const e=n.childNodes[o];if(!e)break;const t=r.childNodes[o],a=s?s.childNodes[o]:null;for(let n=0,r=e.childNodes.length;n<r;n++)e.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(e.childNodes[n],"hiddenHeader"),t&&t.childNodes[n]&&(t.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(t.childNodes[n],"hiddenHeader")),s&&a&&a.childNodes[n]&&(a.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(a.childNodes[n],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(r,s)=>{var o;const{columnIndexMapper:a,view:l}=this.hot;let c=a.getVisualFromRenderableIndex(r);null===c&&(c=r),s.removeAttribute("colspan"),Object(i["removeClass"])(s,"hiddenHeader");const{colspan:u,isHidden:h,isPlaceholder:d}=null!==(o=eT(iT,this).getHeaderSettings(e,c))&&void 0!==o?o:{label:""};if(d||h)Object(i["addClass"])(s,"hiddenHeader");else if(u>1){var m,f;const{wtOverlays:e}=l._wt,t=null===(m=e.topInlineStartCornerOverlay)||void 0===m?void 0:m.clone.wtTable.THEAD.contains(s),i=null===(f=e.inlineStartOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(s),o=t||i?Math.min(u,n-r):u;o>1&&s.setAttribute("colspan",o)}this.hot.view.appendColHeader(c,s,(function(){return t.getColumnHeaderValue(...arguments)}),e)}}getColumnHeaderValue(e,t){var n;const{isHidden:r,isPlaceholder:i}=null!==(n=eT(iT,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return i||r?"":this.hot.getColHeader(e,t)}destroy(){ZC(iT,this,null),null!==eT(sT,this)&&(eT(sT,this).unsubscribe(),ZC(sT,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return eT(iT,this).getHeaderTreeNodeData(e.row,e.col)}}function uT(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:n}=t,r=n.isHeader()&&n.col>=0;if(r){const e=eT(iT,this).findLeftMostColumnIndex(n.row,n.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function hT(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:n}=t,r=n.isHeader()&&n.col>=0;if(!r)return e;const i=this.hot.view.getFirstFullyVisibleColumn(),s=this.hot.view.getLastFullyVisibleColumn(),o=eT(iT,this).findLeftMostColumnIndex(n.row,n.col),a=eT(iT,this).findRightMostColumnIndex(n.row,n.col);return o<i&&a>s?e:o<i?o:a}function dT(e,t,n){const r=eT(iT,this).getHeaderTreeNodeData(t,e);if(!r)return e;const{columnCursor:i,selectionType:s,selectionWidth:o}=n,{isRoot:a,colspan:l}=eT(iT,this).getHeaderSettings(t,e);if(s===YE["g"]){if(!a)return r.columnIndex}else if(s===YE["a"]&&(l>o-i||!a))return null;return e}function mT(e,t,n){let{columnHeadersCount:r}=n;if(0!==r)for(let s=0;s<t.length;s++){const{startRow:n,startCol:r,endRow:o,endCol:a}=t[s],l=o-n+1,c=r-a+1;if(n>=0||1===c)break;for(let t=r;t<=a;t++)for(let s=n;s<=o;s++){var i;const n=l+s,o=t-r;if(0===o)continue;const a=null===(i=eT(iT,this).getHeaderTreeNodeData(s,t))||void 0===i?void 0:i.isRoot;!1===a&&(e[n][o]="")}}}function fT(e,t,n,r){const i=this._getHeaderTreeNodeDataByCoords(t);i&&(r.column=!0)}function pT(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;ZC(oT,this,t.clone()),ZC(aT,this,!0);const{selection:r}=this.hot,i=r.isSelected()?r.getSelectedRange().current():null,o=[],{columnIndex:a,origColspan:l}=n,c=!r.inInSelection(t);e.shiftKey&&i?t.col<i.from.col?o.push(i.getTopEndCorner().col,a,t.row):t.col>i.from.col?o.push(i.getTopStartCorner().col,a+l-1,t.row):o.push(a,a+l-1,t.row):(Object(s["isLeftClick"])(e)||Object(s["isRightClick"])(e)&&c)&&o.push(a,a+l-1,t.row),r.selectColumns(...o)}function gT(e,t,n,r){if(!this.hot.view.isMouseDown())return;const i=this._getHeaderTreeNodeDataByCoords(t);if(!i)return;const{columnIndex:s,origColspan:o}=i,a=this.hot.getSelectedRangeLast(),l=a.getTopStartCorner(),c=a.getBottomEndCorner(),{from:u}=a;r.column=!0,r.cell=!0;const h=[],d=Object(rt["clamp"])(t.row,-1/0,-1);t.col<u.col?h.push(c.col,s,d):t.col>u.col?h.push(l.col,s+o-1,d):h.push(s,s+o-1,d),this.hot.selection.selectColumns(...h)}function yT(){ZC(aT,this,!1)}function wT(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!eT(aT,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,r=t.getBottomEndCorner().col,{columnIndex:i,origColspan:s}=eT(iT,this).getHeaderTreeNodeData(eT(oT,this).row,eT(oT,this).col);if(t.setHighlight(eT(oT,this)),s>t.getWidth()||i<n||i+s-1>r){const e=eT(iT,this).findTopMostEntireHeaderLevel(Object(rt["clamp"])(n,i,i+s-1),Object(rt["clamp"])(r,i,i+s-1));t.highlight.row=e,t.highlight.col=t.from.col}}function bT(e){const{highlight:t}=this.hot.getSelectedRangeLast(),n=this.hot._createCellCoords(t.row+e.row,t.col+e.col),r=n.isHeader()&&n.col>=0;if(!r)return;const i=eT(iT,this).findLeftMostColumnIndex(n.row,n.col),s=eT(iT,this).findRightMostColumnIndex(n.row,n.col);if(e.col<0){const n=t.col>=i&&t.col<=s?i-1:s,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,t.col)-1,1)}else if(e.col>0){const n=t.col>=i&&t.col<=s?s+1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,r)-1,1)}}function _T(e,t){const n=e.row,r=this._getHeaderTreeNodeDataByCoords({row:n,col:e.col}),i=this._getHeaderTreeNodeDataByCoords({row:n,col:t.col});t.col<e.col?(r&&(e.col=r.columnIndex+r.origColspan-1),i&&(t.col=i.columnIndex)):t.col>=e.col&&(r&&(e.col=r.columnIndex),i&&(t.col=i.columnIndex+i.origColspan-1))}function vT(e){e.length=0;for(let t=0;t<eT(iT,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function ST(e){const t=eT(iT,this).getLayersCount();let n=e.startColumn,r=!!t;for(let i=0;i<t;i++){const t=eT(iT,this).findLeftMostColumnIndex(i,e.startColumn),s=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(r=!1),Object(rt["isNumeric"])(s)&&s<e.startColumn){n=s;break}}e.startColumn=r?eT(iT,this).getHeaderTreeNodeData(0,n).columnIndex:n}function ET(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function CT(e,t,n){var r;const{label:i}=null!==(r=eT(iT,this).getHeaderTreeNodeData(n,t))&&void 0!==r?r:{label:""};return i}function TT(e,t){if(e<0)return this.hot.getCell(e,eT(iT,this).findLeftMostColumnIndex(e,t),!0)}function MT(){this.updatePlugin()}function RT(e,t){t||this.updatePlugin()}function OT(e,t,n){return t=NT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NT(e){var t=AT(e,"string");return"symbol"==typeof t?t:t+""}function AT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class LT{constructor(e,t){OT(this,"hot",void 0),OT(this,"data",null),OT(this,"plugin",void 0),OT(this,"parentReference",new WeakMap),OT(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},Object(rt["rangeEach"])(0,this.data.length-1,e=>{this.cacheNode(this.data[e],0,null)})}cacheNode(e,t,n){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:n,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&Object(h["arrayEach"])(e.__children,n=>{this.cacheNode(n,t+1,e)})}getDataObject(e){return null===e||void 0===e?null:this.cache.rows[e]}readTreeNodes(e,t,n,r){let i=!1,s=t;if(isNaN(s)&&s.end)return s;let o=e;return o||(o={__children:this.data},i=!0,s-=1),null!==n&&void 0!==n&&s===n?{result:o,end:!0}:null!==r&&void 0!==r&&o===r?{result:s,end:!0}:(s+=1,o.__children&&Object(h["arrayEach"])(o.__children,e=>{if(this.parentReference.set(e,i?null:o),s=this.readTreeNodes(e,s,n,r),isNaN(s)&&s.end)return!1}),s)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return Object(o["objectEach"])(this.data[0],(t,n)=>{e[n]=null}),e}getRowIndex(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const n=this.getRowParent(e);return null===n||void 0===n?this.data.indexOf(t):n.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&n.__children?(Object(h["arrayEach"])(n.__children,e=>{t+=1,e.__children&&(t+=this.countChildren(e))}),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"===typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var n;return(null===(n=e.__children)||void 0===n?void 0:n[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&!!n.__children&&0!==(null===(t=n.__children)||void 0===t?void 0:t.length)}addChild(e,t){let n=t;this.hot.runHooks("beforeAddChild",e,n);let r=null;e&&(r=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",r+this.countChildren(e)+1,1);let i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),n||(n=this.mockNode()),i.__children.push(n),this.rewriteCache();const s=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(s,1),this.hot.runHooks("afterCreateRow",s,1),this.hot.runHooks("afterAddChild",e,n)}addChildAtIndex(e,t,n){let r,i=n;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const n=this.getRowIndex(e),s=n+t+1;this.hot.runHooks("beforeCreateRow",s,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(s,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",s,1),r=s}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),r=this.getRowIndex(this.data[t]);i=this.getDataObject(r),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(e),r=this.getRowParent(n),i=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(r,i+1,null);break;case"above":this.addChildAtIndex(r,i,null);break;default:break}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const r=[];Array.isArray(e)?(Object(rt["rangeEach"])(e[0],e[2],e=>{const t=this.translateTrimmedRow(e);r.push(this.getDataObject(t))}),Object(rt["rangeEach"])(0,r.length-2,e=>{this.detachFromParent(r[e],!1)}),n=r[r.length-1]):n=e;const i=this.getRowIndex(n),s=this.countChildren(n),o=this.getRowIndexWithinParent(n),a=this.getRowParent(n),l=this.getRowParent(a),c=this.getRowIndex(l);let u=null;if(this.hot.runHooks("beforeDetachChild",a,n),null!==o&&void 0!==o){const e=Array.from(new Array(i+s+1).keys()).splice(-1*(s+1));if(this.hot.runHooks("beforeRemoveRow",i,s+1,e,this.plugin.pluginName),a.__children.splice(o,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,s+1,e,this.plugin.pluginName),l){u=c+this.countChildren(l);const e=this.getChild(l,this.countChildren(l)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,s+1,this.plugin.pluginName),l.__children.push(n)}else u=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",u-2,s+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",u-2,s+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,n,this.getRowIndex(n)),t&&this.hot.render()}filterData(e,t,n){const r=[];Object(h["arrayEach"])(n,e=>{r.push(this.getDataObject(e))}),Object(h["arrayEach"])(r,e=>{const t=this.getRowIndexWithinParent(e),n=this.getRowParent(e);null===n?this.data.splice(t,1):n.__children.splice(t,1)}),this.rewriteCache()}spliceData(e,t,n){const r=this.getDataObject(e-1);let i=null,s=e;r&&r.__children&&0===r.__children.length?(i=r,s=0):e<this.countAllRows()&&(i=this.getRowParent(e),s=this.getRowIndexWithinParent(e)),i?n?i.__children.splice(s,t,...n):i.__children.splice(s,t):n?this.data.splice(s,t,...n):this.data.splice(s,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,n=null;do{n=this.getRowParent(n),null!==n&&(t=n)}while(null!==n);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,n,r){const i=t===this.hot.countRows(),s=this.getRowParent(e),o=this.getRowIndexWithinParent(e),a=s.__children.slice(o,o+1),l=e>t;let c=i?this.getRowParent(t-1):this.getRowParent(t);null!==c&&void 0!==c||(c=this.getRowParent(t-1)),null!==c&&void 0!==c||(c=this.getDataObject(t-1)),c?c.__children||(c.__children=[]):(c=this.getDataObject(t),c.__children=[]);const u=i||n||r?c.__children.length:this.getRowIndexWithinParent(t),h=s===c;c.__children.splice(u,0,a[0]),s.__children.splice(o+(l&&h?1:0),1),this.syncRowWithRawSource(s),h||this.syncRowWithRawSource(c)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}var IT=LT;function xT(e,t,n){return t=kT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kT(e){var t=DT(e,"string");return"symbol"==typeof t?t:t+""}function DT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class HT{constructor(e,t){xT(this,"hot",void 0),xT(this,"plugin",void 0),this.hot=t,this.plugin=e}}var PT=HT;class jT extends PT{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const n=this.hot.toPhysicalRow(e),r=this.dataManager.getRowLevel(n),s=this.dataManager.getDataObject(n),o=t.getElementsByTagName("DIV")[0],a=o.querySelector("span.rowHeader"),l=o.querySelectorAll('[class^="ht_nesting"]'),c=this.hot.getSettings().ariaTags;if(Object(h["arrayEach"])(l,e=>{e&&o.removeChild(e)}),Object(i["addClass"])(t,jT.CSS_CLASSES.indicatorContainer),r){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);o.innerHTML="",Object(rt["rangeEach"])(0,r-1,()=>{const t=e.createElement("SPAN");Object(i["addClass"])(t,jT.CSS_CLASSES.emptyIndicator),o.appendChild(t)}),o.appendChild(t)}if(this.dataManager.hasChildren(s)){const e=this.hot.rootDocument.createElement("DIV");c&&Object(i["setAttribute"])(e,[Object(y["n"])()]),Object(i["addClass"])(t,jT.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(Object(i["addClass"])(e,`${jT.CSS_CLASSES.button} ${jT.CSS_CLASSES.expandButton}`),c&&Object(i["setAttribute"])(t,[Object(y["k"])(!1)])):(Object(i["addClass"])(e,`${jT.CSS_CLASSES.button} ${jT.CSS_CLASSES.collapseButton}`),c&&Object(i["setAttribute"])(t,[Object(y["k"])(!0)])),o.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}var FT=jT;class YT extends PT{constructor(e,t){var n;super(e,t),n=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.lastCollapsedRows=n.collapsedRows.slice(0),n.expandMultipleChildren(n.lastCollapsedRows,e)},shiftStash:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null!==t&&void 0!==t||(t=1/0),Object(h["arrayEach"])(n.lastCollapsedRows,(i,s)=>{i>=e&&i<t&&(n.lastCollapsedRows[s]=i+r)})},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.collapseMultipleChildren(n.lastCollapsedRows,e),n.lastCollapsedRows=void 0},trimStash:(e,t)=>{Object(rt["rangeEach"])(e,e+t-1,e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)})}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];let i=null,s=null,o=null;return isNaN(e)?(i=e,s=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),s=e),this.dataManager.hasChildren(i)&&Object(h["arrayEach"])(i.__children,e=>{r.push(this.dataManager.getRowIndex(e))}),o=this.collapseRows(r,!0,!1),n&&this.trimRows(o),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(s)&&this.collapsedRows.push(s),o}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];Object(h["arrayEach"])(e,e=>{r.push(...this.collapseChildren(e,!1,!1))}),n&&this.trimRows(r),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];return Object(h["arrayEach"])(e,e=>{r.push(e),t&&this.collapseChildRows(e,r)}),n&&this.trimRows(r),r}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);Object(h["arrayEach"])(n.__children,e=>{const n=this.dataManager.getRowIndex(e);t.push(n),this.collapseChildRows(n,t)})}n&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];return Object(h["arrayEach"])(e,e=>{r.push(e),t&&this.expandChildRows(e,r)}),n&&this.untrimRows(r),r}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);Object(h["arrayEach"])(n.__children,e=>{if(!this.isAnyParentCollapsed(e)){const n=this.dataManager.getRowIndex(e);t.push(n),this.expandChildRows(n,t)}})}n&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];let i=null,s=null,o=null;return isNaN(e)?(i=e,s=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),s=e),this.collapsedRows.splice(this.collapsedRows.indexOf(s),1),this.dataManager.hasChildren(i)&&Object(h["arrayEach"])(i.__children,e=>{const t=this.dataManager.getRowIndex(e);r.push(t)}),o=this.expandRows(r,!0,!1),n&&this.untrimRows(o),t&&this.renderAndAdjust(),o}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];Object(h["arrayEach"])(e,e=>{r.push(...this.expandChildren(e,!1,!1))}),n&&this.untrimRows(r),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];Object(h["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];Object(h["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)})},!0)}untrimRows(e){this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)})},!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),n=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&Object(h["arrayEach"])(t.__children,e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return n=!1,!1}),n}isAnyParentCollapsed(e){let t=e;while(null!==t){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const n=this.translateTrimmedRow(t.row);Object(i["hasClass"])(e.target,FT.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),Object(s["stopImmediatePropagation"])(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}var UT=YT;function VT(e,t,n){BT(e,t),t.set(e,n)}function BT(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function WT(e,t,n){return t=GT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GT(e){var t=zT(e,"string");return"symbol"==typeof t?t:t+""}function zT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function KT(e,t){return e.get(XT(e,t))}function XT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var $T=new WeakMap;class qT extends PT{constructor(){super(...arguments),WT(this,"dataManager",this.plugin.dataManager),VT(this,$T,{row_above:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"above")},row_below:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"below")}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"])},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"])},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]),n=this.dataManager.getRowParent(t);return!n||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return Object(rt["rangeEach"])(0,e.items.length-1,n=>{if(0===n)return Object(h["arrayEach"])(t,(t,r)=>{e.items.splice(n+r,0,t)}),!1}),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return Object(rt["rangeEach"])(0,e.items.length-1,t=>{const n=KT($T,this)[e.items[t].key];null!==n&&void 0!==n&&(e.items[t].callback=n)}),e}}var JT=qT;function QT(e,t,n){return t=ZT(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZT(e){var t=eM(e,"string");return"symbol"==typeof t?t:t+""}function eM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class tM{constructor(e){QT(this,"plugin",void 0),QT(this,"hot",void 0),QT(this,"dataManager",void 0),QT(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,n,r){const i=this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:n,movePossible:r});if(i)return!1;this.movedToCollapsed=!1;const s=n===this.hot.countRows(),o=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let a=!0;const l=e.map(e=>{if(!a)return!1;const t=this.dataManager.translateTrimmedRow(e);return a=this.shouldAllowMoving(t,o),t}),c=-1===l.indexOf(o);if(!a||!c)return!1;const u=this.getBaseParent(l),h=this.getTargetParent(s,o),d=u===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,o,d),this.moveRows(l,o,h),this.dataManager.rewriteCache(),this.moveCellsMeta(l,o),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,n,r,r&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,n),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:n,dropIndex:r,movePossible:i}=e;let s=!1;return Object(d["isUndefined"])(r)&&(Object(jr["b"])(Es["a"]`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,n,r,i,!1),s=!0),s}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let n=this.dataManager.getRowParent(e?t-1:t);return null!==n&&void 0!==n||(n=this.dataManager.getRowParent(t-1)),n}shiftCollapsibleParentsLocations(e,t,n){n||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,n){const r=t===this.dataManager.getRowIndex(n)+this.dataManager.countChildren(n)+1;this.hot.batchRender(()=>{e.forEach(e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,r)})})}moveCellsMeta(e,t){const n=[],r=Math.max(...e)<t;e.forEach(e=>{n.push(this.hot.getCellMetaAtRow(e))}),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(r?n.length:0),0,...n)}selectCells(e,t){const n=e.length;let r=0,i=0,s=null,o=null;if(this.movedToCollapsed){let s=null;s=e[n-1]<t?this.dataManager.translateTrimmedRow(t-n):this.dataManager.translateTrimmedRow(t);const o=this.dataManager.getRowParent(null===s?this.hot.countSourceRows()-1:s-1),a=this.dataManager.getRowIndex(o);r=this.dataManager.untranslateTrimmedRow(a),i=r}else e[n-1]<t?(i=t-1,r=i-n+1):(r=t,i=r+n-1);s=this.hot.selection,o=this.hot.countCols()-1,s.setRangeStart(this.hot._createCellCoords(r,0)),s.setRangeEnd(this.hot._createCellCoords(i,o),!0)}isRowOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}}function nM(e,t){iM(e,t),t.add(e)}function rM(e,t,n){iM(e,t),t.set(e,n)}function iM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sM(e,t,n){return t=oM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oM(e){var t=aM(e,"string");return"symbol"==typeof t?t:t+""}function aM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function lM(e,t){return e.get(uM(e,t))}function cM(e,t,n){return e.set(uM(e,t),n),n}function uM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const hM="nestedRows",dM=300,mM=hM,fM="The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled.";var pM=new WeakMap,gM=new WeakMap,yM=new WeakSet;class wM extends en["a"]{constructor(){super(...arguments),nM(this,yM),sM(this,"dataManager",null),sM(this,"headersUI",null),sM(this,"collapsedRowsMap",null),rM(this,pM,!1),rM(this,gM,!1)}static get PLUGIN_KEY(){return hM}static get PLUGIN_PRIORITY(){return dM}isEnabled(){return!!this.hot.getSettings()[hM]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Sp["a"]),this.dataManager=new IT(this,this.hot),this.collapsingUI=new UT(this,this.hot),this.headersUI=new FT(this,this.hot),this.contextMenuUI=new JT(this,this.hot),this.rowMoveController=new tM(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,IM).call(e,...n)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,xM).call(e,...n)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,vM).call(e,...n)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,SM).call(e,...n)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,EM).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,_M).call(e,...n)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,MM).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,TM).call(e,...n)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,RM).call(e,...n)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,OM).call(e,...n)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,NM).call(e,...n)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,AM).call(e,...n)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,CM).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,LM).call(e,...n)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return uM(yM,e,bM).call(e,...n)})),this.addHook("beforeLoadData",e=>uM(yM,this,kM).call(this,e)),this.addHook("beforeUpdateData",e=>uM(yM,this,kM).call(this,e)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.col&&n.row>=0},group:mM,relativeToGroup:Pe["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(mM)}disableCoreAPIModifiers(){cM(gM,this,!0)}enableCoreAPIModifiers(){cM(gM,this,!1)}onModifyRowData(e){if(!lM(gM,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!lM(gM,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!lM(gM,this)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,n),!1)}destroy(){super.destroy()}}function bM(e,t,n,r){return this.rowMoveController.onBeforeRowMove(e,t,n,r)}function _M(e,t,n){this.collapsingUI.toggleState(e,t,n)}function vM(e,t,n){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(n[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(n[0],null,-1*t),this.dataManager.filterData(e,t,n),cM(pM,this,!0),this.dataManager.getData().slice()}function SM(e){return this.contextMenuUI.appendOptions(e)}function EM(e,t){this.headersUI.appendLevelIndicators(e,t)}function CM(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function TM(e,t,n,r){r!==this.pluginName&&this.hot._registerTimeout(()=>{cM(pM,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function MM(e,t,n){const r=Array.from(n.reduce((e,t)=>{if(this.dataManager.isParent(t)){const n=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(n)&&n.forEach(t=>e.add(this.dataManager.getRowIndex(t))),e}return e.add(t)},new Set));n.length=0,n.push(...r)}function RM(){this.collapsingUI.collapsedRowsStash.stash()}function OM(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function NM(){this.collapsingUI.collapsedRowsStash.stash()}function AM(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function LM(){this.dataManager.rewriteCache()}function IM(){this.headersUI.updateRowHeaderWidth()}function xM(e,t){lM(pM,this)&&(t.skipRender=!0)}function kM(e){if(!Object(Jm["isArrayOfObjects"])(e))return Object(jr["a"])(fM),this.hot.getSettings()[hM]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function DM(e,t,n){return t=HM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HM(e){var t=PM(e,"string");return"symbol"==typeof t?t:t+""}function PM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class jM{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;DM(this,"rootWindow",void 0),DM(this,"prefix",void 0),DM(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const n="undefined"===typeof e?t:e,r=this.rootWindow.localStorage.getItem(`${this.prefix}_${n}`);return null===r?void 0:JSON.parse(r)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){Object(h["arrayEach"])(this.savedKeys,(e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)}),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(this.prefix+"__persistentStateKeys"),t="string"===typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(this.prefix+"__persistentStateKeys",JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}var FM=jM;function YM(e,t,n){return t=UM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UM(e){var t=VM(e,"string");return"symbol"==typeof t?t:t+""}function VM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}fe["a"].getSingleton().register("persistentStateSave"),fe["a"].getSingleton().register("persistentStateLoad"),fe["a"].getSingleton().register("persistentStateReset");const BM="persistentState",WM=0;class GM extends en["a"]{constructor(){super(...arguments),YM(this,"storage",void 0)}static get PLUGIN_KEY(){return BM}static get PLUGIN_PRIORITY(){return WM}isEnabled(){return!!this.hot.getSettings()[BM]}enablePlugin(){this.enabled||(this.storage||(this.storage=new FM(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",(e,t)=>this.saveValue(e,t)),this.addHook("persistentStateLoad",(e,t)=>this.loadValue(e,t)),this.addHook("persistentStateReset",()=>this.resetValue()),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){"undefined"===typeof e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}function zM(e,t){KM(e,t),t.add(e)}function KM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function XM(e,t,n){return t=$M(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $M(e){var t=qM(e,"string");return"symbol"==typeof t?t:t+""}function qM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function JM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const QM="search",ZM=190,eR="htSearchResult",tR=function(e,t,n,r,i){e.getCellMeta(t,n).isSearchResult=i},nR=function(e,t,n){return!(Object(d["isUndefined"])(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!Object(d["isUndefined"])(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(n.locale).indexOf(e.toLocaleLowerCase(n.locale)))};var rR=new WeakSet;class iR extends en["a"]{constructor(){super(...arguments),zM(this,rR),XM(this,"callback",tR),XM(this,"queryMethod",nR),XM(this,"searchResultClass",eR)}static get PLUGIN_KEY(){return QM}static get PLUGIN_PRIORITY(){return ZM}isEnabled(){return this.hot.getSettings()[QM]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[QM];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return JM(rR,e,sR).call(e,...n)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return JM(rR,e,sR).call(e,...n)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("beforeRenderer",t)}),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const r=this.hot.countRows(),i=this.hot.countCols(),s=[],o=this.hot;return Object(rt["rangeEach"])(0,r-1,r=>{Object(rt["rangeEach"])(0,i-1,i=>{const a=this.hot.getDataAtCell(r,i),l=this.hot.getCellMeta(r,i),c=l.search.callback||t,u=l.search.queryMethod||n,h=u(e,a,l);if(h){const e={row:r,col:i,data:a};s.push(e)}c&&c(o,r,i,a,h)})}),s}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){Object(o["isObject"])(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function sR(e,t,n,r,i,s){const o=s.className||[];let a=[];"string"===typeof o?a=o.split(" "):a.push(...o),this.isEnabled()&&s.isSearchResult?a.includes(this.searchResultClass)||a.push(""+this.searchResultClass):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),s.className=a.join(" ")}function oR(e,t){aR(e,t),t.add(e)}function aR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lR(e,t,n){return t=cR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cR(e){var t=uR(e,"string");return"symbol"==typeof t?t:t+""}function uR(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function hR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const dR="touchScroll",mR=200;var fR=new WeakSet;class pR extends en["a"]{constructor(){super(...arguments),oR(this,fR),lR(this,"scrollbars",[]),lR(this,"clones",[]),lR(this,"lockedCollection",!1),lR(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return dR}static get PLUGIN_PRIORITY(){return mR}static get SETTING_KEYS(){return!0}isEnabled(){return Object(tn["isTouchSupported"])()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",()=>hR(fR,this,gR).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>hR(fR,this,yR).call(this)),this.addHook("afterMomentumScroll",()=>hR(fR,this,wR).call(this))}}function gR(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(n),r&&this.scrollbars.push(r),i&&i.clone&&this.scrollbars.push(i),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),r&&this.clones.push(r.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function yR(){this.freezeOverlays=!0,Object(h["arrayEach"])(this.clones,e=>{Object(i["addClass"])(e,"hide-tween")})}function wR(){this.freezeOverlays=!1,Object(h["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"hide-tween"),Object(i["addClass"])(e,"show-tween")}),this.hot._registerTimeout(()=>{Object(h["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"show-tween")})},400),Object(h["arrayEach"])(this.scrollbars,e=>{e.refresh(),e.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}function bR(e,t){_R(e,t),t.add(e)}function _R(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vR(e,t,n){return t=SR(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SR(e){var t=ER(e,"string");return"symbol"==typeof t?t:t+""}function ER(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function CR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const TR="trimRows",MR=330;var RR=new WeakSet;class OR extends en["a"]{constructor(){super(...arguments),bR(this,RR),vR(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return TR}static get PLUGIN_PRIORITY(){return MR}isEnabled(){return!!this.hot.getSettings()[TR]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Sp["a"]),this.trimmedRowsMap.addLocalHook("init",()=>CR(RR,this,NR).call(this)),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[TR];Array.isArray(e)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeTrimRow",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0),this.hot.runHooks("afterTrimRow",t,r,n,n&&r.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let r=t;const i=this.trimmedRowsMap.getValues().slice(),s=e.length>0;n&&s&&(Object(h["arrayEach"])(e,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(n),e),[]));const o=this.hot.runHooks("beforeUntrimRow",t,r,n&&s);!1!==o&&(n&&s&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",t,r,n&&s,n&&r.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}destroy(){super.destroy()}}function NR(){const e=this.hot.getSettings()[TR];Array.isArray(e)&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0)}n("8e39");const AR="undoRedo",LR="undoRedo";function IR(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(n,r){const i=n&&n.length;if(!i)return;const s=n.find(e=>{const[,,t,n]=e;return t!==n});if(!s)return;const o=()=>{const t=n.reduce((e,t)=>(e.push([...t]),e),[]);Object(h["arrayEach"])(t,t=>{t[1]=e.propToCol(t[1])});const r=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new IR.ChangeAction(t,r)};t.done(o,r)})),e.addHook("afterCreateRow",(e,n,r)=>{t.done(()=>new IR.CreateRowAction(e,n),r)});const n=(t,n,r,i)=>{const s=["visualRow","visualCol","row","col","prop"],o=s.length,a=[];return Object(rt["rangeEach"])(r,i,r=>{Object(rt["rangeEach"])(t,n,t=>{const n=e.getCellMeta(t,r);if(Object.keys(n).length!==o){const e=Object.fromEntries(Object.entries(n).filter(e=>{let[t]=e;return!1===s.includes(t)}));a.push([n.visualRow,n.visualCol,e])}})}),a};e.addHook("beforeRemoveRow",(r,i,s,a)=>{const l=()=>{const s=e.toPhysicalRow(r),a=s+i-1,l=Object(o["deepClone"])(t.instance.getSourceData(s,0,s+i-1,t.instance.countSourceCols()-1));return new IR.RemoveRowAction(s,l,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),n(s,a,0,e.countCols()-1))};t.done(l,a)}),e.addHook("afterCreateCol",(e,n,r)=>{t.done(()=>new IR.CreateColumnAction(e,n),r)}),e.addHook("beforeRemoveCol",(r,i,s,o)=>{const a=()=>{const s=t.instance.getSourceDataArray(),o=(t.instance.countCols()+r)%t.instance.countCols(),a=o+i-1,l=[],c=[],u=[];Object(rt["rangeEach"])(s.length-1,t=>{const n=[],r=s[t];Object(rt["rangeEach"])(o,a,t=>{n.push(r[e.toPhysicalColumn(t)])}),l.push(n)}),Object(rt["rangeEach"])(i-1,t=>{u.push(e.toPhysicalColumn(o+t))}),Array.isArray(e.getSettings().colHeaders)&&Object(rt["rangeEach"])(i-1,t=>{c.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)});const h=e.columnIndexMapper.getIndexesSequence(),d=e.rowIndexMapper.getIndexesSequence();return new IR.RemoveColumnAction(o,u,l,c,h,d,e.getSettings().fixedColumnsStart,n(0,e.countRows(),o,a))};t.done(a,o)}),e.addHook("beforeCellAlignment",(e,n,r,i)=>{t.done(()=>new IR.CellAlignmentAction(e,n,r,i))}),e.addHook("beforeFilter",e=>{t.done(()=>new IR.FiltersAction(e))}),e.addHook("beforeRowMove",(e,n)=>{!1!==e&&t.done(()=>new IR.RowMoveAction(e,n))}),e.addHook("beforeColumnMove",(e,n)=>{!1!==e&&t.done(()=>new IR.ColumnMoveAction(e,n))}),e.addHook("beforeMergeCells",(n,r)=>{r||t.done(()=>new IR.MergeCellsAction(e,n))}),e.addHook("afterUnmergeCells",(n,r)=>{r||t.done(()=>new IR.UnmergeCellsAction(e,n))}),e.addHook("afterInit",()=>{t.init()})}IR.prototype.done=function(e,t){if(this.ignoreNewActions)return;const n="UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t;if(n)return;const r=this.doneActions.slice(),i=this.instance.runHooks("beforeUndoStackChange",r,t);if(!1===i)return;const s=e(),o=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",o),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",o,this.undoneActions.slice())},IR.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const n=Object(o["deepClone"])(t),r=this.instance.runHooks("beforeUndo",n);if(!1===r)return;this.ignoreNewActions=!0;const i=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,()=>{i.ignoreNewActions=!1,i.undoneActions.push(t)}),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",n)}},IR.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const n=Object(o["deepClone"])(t),r=this.instance.runHooks("beforeRedo",n);if(!1===r)return;this.ignoreNewActions=!0;const i=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,()=>{i.ignoreNewActions=!1,i.doneActions.push(t)}),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",n)}},IR.prototype.isUndoAvailable=function(){return this.doneActions.length>0},IR.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},IR.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},IR.prototype.isEnabled=function(){return this.enabled},IR.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;this.enabled=!0,HR(e),this.registerShortcuts(),e.addHook("afterChange",DR)},IR.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;this.enabled=!1,PR(e),this.unregisterShortcuts(),e.removeHook("afterChange",DR)},IR.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},IR.Action=function(){},IR.Action.prototype.undo=function(){},IR.Action.prototype.redo=function(){},IR.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},Object(o["inherit"])(IR.ChangeAction,IR.Action),IR.ChangeAction.prototype.undo=function(e,t){const n=Object(o["deepClone"])(this.changes),r=e.countEmptyRows(!0),i=e.countEmptyCols(!0);for(let o=0,a=n.length;o<a;o++)n[o].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.undo");for(let o=0,a=n.length;o<a;o++){const[t,s]=n[o];e.getSettings().minSpareRows&&t+1+e.getSettings().minSpareRows===e.countRows()&&r===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(t+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&s+1+e.getSettings().minSpareCols===e.countCols()&&i===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(s+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const s=e.getSelectedLast();if(void 0!==s){const[t,r]=n[0],[i,o]=s,a=e.view.getFirstFullyVisibleRow(),l=e.view.getFirstFullyVisibleColumn(),c=t>=a,u=r>=l,h=c&&u,d=i!==t||o!==r;if(!1===h&&!0===d){const n={row:t,col:r};!1===c&&(n.verticalSnap="top"),!1===u&&(n.horizontalSnap="start"),e.scrollViewportTo(n)}}e.selectCells(this.selected,!1,!1)},IR.ChangeAction.prototype.redo=function(e,t){const n=Object(o["deepClone"])(this.changes);for(let r=0,i=n.length;r<i;r++)n[r].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},IR.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},Object(o["inherit"])(IR.CreateRowAction,IR.Action),IR.CreateRowAction.prototype.undo=function(e,t){const n=e.countRows(),r=e.getSettings().minSpareRows;this.index>=n&&this.index-r<n&&(this.index-=r),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},IR.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},IR.RemoveRowAction=function(e,t,n,r,i,s){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=n,this.fixedRowsTop=r,this.rowIndexesSequence=i,this.removedCellMetas=s},Object(o["inherit"])(IR.RemoveRowAction,IR.Action),IR.RemoveRowAction.prototype.undo=function(e,t){const n=e.getSettings(),r=[];n.fixedRowsBottom=this.fixedRowsBottom,n.fixedRowsTop=this.fixedRowsTop,this.data.forEach((e,t)=>{Object.keys(e).forEach(n=>{const i=parseInt(n,10);r.push([this.index+t,isNaN(i)?n:i,e[n]])})}),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach(t=>{let[n,r,i]=t;e.setCellMetaObject(n,r,i)}),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(r,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},IR.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},IR.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},Object(o["inherit"])(IR.CreateColumnAction,IR.Action),IR.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},IR.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},IR.RemoveColumnAction=function(e,t,n,r,i,s,o,a){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=r,this.columnPositions=i.slice(0),this.rowPositions=s.slice(0),this.actionType="remove_col",this.fixedColumnsStart=o,this.removedCellMetas=a},Object(o["inherit"])(IR.RemoveColumnAction,IR.Action),IR.RemoveColumnAction.prototype.undo=function(e,t){const n=e.getSettings();n.fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),i=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,o=[];for(let c=0;c<s;c++)o.push(Object(h["arrayMap"])(this.data[c],i));const a=Object(h["arrayMap"])(this.headers,i),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),Object(h["arrayEach"])(e.getSourceDataArray(),(e,t)=>{Object(h["arrayEach"])(r,(n,r)=>{e[n]=o[t][r],l.push([t,n,e[n]])})}),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),"undefined"!==typeof this.headers&&Object(h["arrayEach"])(a,(t,n)=>{e.getSettings().colHeaders[r[n]]=t}),this.removedCellMetas.forEach(t=>{let[n,r,i]=t;e.setCellMetaObject(n,r,i)}),e.batchExecution(()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)},!0),e.addHookOnce("afterViewRender",t),e.render()},IR.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},IR.CellAlignmentAction=function(e,t,n,r){this.stateBefore=e,this.range=t,this.type=n,this.alignment=r},IR.CellAlignmentAction.prototype.undo=function(e,t){Object(h["arrayEach"])(this.range,t=>{t.forAll((t,n)=>{t>=0&&n>=0&&e.setCellMeta(t,n,"className",this.stateBefore[t][n]||" htLeft")})}),e.addHookOnce("afterViewRender",t),e.render()},IR.CellAlignmentAction.prototype.redo=function(e,t){io(this.range,this.type,this.alignment,(t,n)=>e.getCellMeta(t,n),(t,n,r,i)=>e.setCellMeta(t,n,r,i)),e.addHookOnce("afterViewRender",t),e.render()},IR.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},Object(o["inherit"])(IR.FiltersAction,IR.Action),IR.FiltersAction.prototype.undo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),n.filter()},IR.FiltersAction.prototype.redo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()};class xR extends IR.Action{constructor(e,t){super(),this.cellRange=t;const n=this.cellRange.getTopStartCorner(),r=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(n.row,n.col,r.row,r.col)}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0);const r=this.cellRange.getTopStartCorner();e.populateFromArray(r.row,r.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange)}}IR.MergeCellsAction=xR;class kR extends IR.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange,!0)}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}function DR(e,t){const n=this;if("loadData"===t)return n.undoRedo.clear()}function HR(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function PR(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}IR.UnmergeCellsAction=kR,IR.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},Object(o["inherit"])(IR.RowMoveAction,IR.Action),IR.RowMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);const r=Sg(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes());r.reverse().forEach(e=>{let{from:t,to:r}=e;t<r&&(r-=1),n.moveRow(r,t)}),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},IR.RowMoveAction.prototype.redo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),n.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)},IR.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},Object(o["inherit"])(IR.ColumnMoveAction,IR.Action),IR.ColumnMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);const r=Sg(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes());r.reverse().forEach(e=>{let{from:t,to:r}=e;t<r&&(r-=1),n.moveColumn(r,t)}),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)},IR.ColumnMoveAction.prototype.redo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),n.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)},IR.prototype.init=function(){const e=this.instance.getSettings().undo,t="undefined"===typeof e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},IR.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid"),n=e=>!e.altKey,r={runOnlyIf:n,group:AR};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],r)},IR.prototype.unregisterShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(AR)};const jR=fe["a"].getSingleton();jR.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),jR.register("beforeUndo"),jR.register("afterUndo"),jR.register("beforeRedo"),jR.register("afterRedo"),IR.PLUGIN_KEY=LR,IR.SETTING_KEYS=!0;var FR=IR,YR=n("24b5");function UR(){Object(YR["d"])(Tn),Object(YR["d"])(Kn),Object(YR["d"])(cr),Object(YR["d"])(Hr),Object(YR["d"])(ni),Object(YR["d"])(ms),Object(YR["d"])(ks),Object(YR["d"])(Ho),Object(YR["d"])(Dl),Object(YR["d"])(kc),Object(YR["d"])(bu),Object(YR["d"])(Lu),Object(YR["d"])(Xu),Object(YR["d"])(Ch),Object(YR["d"])(Pp),Object(YR["d"])(fy),Object(YR["d"])(Zy),Object(YR["d"])(bw),Object(YR["d"])(jw),Object(YR["d"])(Mb),Object(YR["d"])(s_),Object(YR["d"])($_),Object(YR["d"])(Nv),Object(YR["d"])(XS),Object(YR["d"])(xE),Object(YR["d"])(FE),Object(YR["d"])(cT),Object(YR["d"])(wM),Object(YR["d"])(GM),Object(YR["d"])(iR),Object(YR["d"])(pR),Object(YR["d"])(OR),Object(YR["d"])(FR)}function VR(){Oe(),ft(),At(),Zt(),UR()}},"8d47":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var n=e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"===typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,n){var r=this._calendarEl[e],i=n&&n.hours();return t(r)&&(r=r.apply(n)),r.replace("{}",i%12===1?"στη":"στις")},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η",week:{dow:1,doy:4}});return n}))},"8d57":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function s(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"ww":return r+(i(e)?"tygodnie":"tygodni");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}var o=e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".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:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:s,M:"miesiąc",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},"8df48":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},r=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}});return r}))},"8e39":function(e,t,n){"use strict";var r=n("ac4f"),i=n("d3e6"),s=n("cac7");r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){s(t,e,n)}),{AS_ENTRIES:!0}),t}})},"8e73":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(t,n,s,o){var a=r(t),l=i[e][r(t)];return 2===a&&(l=l[n?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a=e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/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:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},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,"،")},week:{dow:6,doy:12}});return a}))},9043:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r=e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),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 বছর"},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||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});return r}))},9046:function(e,t,n){"use strict";var r=n("939b"),i=n("fd18");e.exports=function(e){if("Function"===r(e))return i(e)}},9056:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n("7a89");var r=n("1096"),i=n("e90f"),s=n("3d57"),o=n("a73f"),a=n("97b9");function l(e,t,n){return t=c(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class h extends r["a"]{constructor(){super(...arguments),l(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map(e=>this.indexedValues[e])}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(n,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=Object(s["b"])(this.orderOfIndexes,[e]),Object(a["isFunction"])(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=Object(i["a"])(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=Object(o["b"])(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=Object(i["b"])(this.indexedValues,e),this.orderOfIndexes=Object(s["b"])(this.orderOfIndexes,e),this.orderOfIndexes=Object(o["a"])(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map(e=>[e,this.getValueAtIndex(e)])}}},"90ea":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-tw",{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:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",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 年"}});return t}))},9394:function(e,t,n){"use strict";var r=n("81b7"),i=n("bf78");e.exports=function(e){return r(i(e))}},"939b":function(e,t,n){"use strict";var r=n("fd18"),i=r({}.toString),s=r("".slice);e.exports=function(e){return s(i(e),8,-1)}},"956b":function(e,t,n){"use strict";var r=n("ac4f"),i=n("fc2d"),s=n("7dcf4"),o=n("2349"),a=n("bf80"),l=n("ae20"),c=1!==[].unshift(0),u=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},h=c||!u();r({target:"Array",proto:!0,arity:1,forced:h},{unshift:function(e){var t=i(this),n=s(t),r=arguments.length;if(r){l(n+r);var c=n;while(c--){var u=c+r;c in t?t[u]=t[c]:a(t,u)}for(var h=0;h<r;h++)t[h]=arguments[h]}return o(t,n+r)}})},"957c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?n?"минута":"минуту":e+" "+t(i[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],i=e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,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",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,w:"неделя",ww:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});return i}))},9582:function(e,t,n){"use strict";var r=n("e156"),i=n("2471"),s=n("022b"),o=n("c272"),a=n("80dd"),l=a("iterator");e.exports=function(e){if(!s(e))return i(e,l)||i(e,"@@iterator")||o[r(e)]}},"958b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var n=e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,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:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});return n}))},9609:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},n=e.defineLocale("ky",{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){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},9674:function(e,t,n){"use strict";var r=n("fd18");e.exports=r([].slice)},9686:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r=e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),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 বছর"},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||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}});return r}))},9718:function(e,t,n){"use strict";var r=n("8793"),i=n("2d2d");e.exports=function(e,t){r(t)&&"cause"in t&&i(e,"cause",t.cause)}},"972c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},i=" ";return(e%100>=20||e>=100&&e%100===0)&&(i=" de "),e+i+r[n]}var n=e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".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:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return n}))},9797:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".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"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,n="",r=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?n=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(n=r[t]),e+n},week:{dow:1,doy:4}});return t}))},"97b9":function(e,t,n){"use strict";n.r(t),n.d(t,"isFunction",(function(){return s})),n.d(t,"throttle",(function(){return o})),n.d(t,"throttleAfterHits",(function(){return a})),n.d(t,"debounce",(function(){return l})),n.d(t,"pipe",(function(){return c})),n.d(t,"partial",(function(){return u})),n.d(t,"curry",(function(){return h})),n.d(t,"curryRight",(function(){return d})),n.d(t,"fastCall",(function(){return m}));var r=n("81ea"),i=n("7b9c");function s(e){return"function"===typeof e}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0;const r={lastCallThrottled:!0};let i=null;function s(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];const l=Date.now();let c=!1;r.lastCallThrottled=!0,n||(n=l,c=!0);const u=t-(l-n);return c?(r.lastCallThrottled=!1,e.apply(this,o)):(i&&clearTimeout(i),i=setTimeout(()=>{r.lastCallThrottled=!1,e.apply(this,o),n=0,i=void 0},u)),r}return s}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=o(e,t);let i=n;function s(){i=n}function a(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return i?(i-=1,e.apply(this,n)):r.apply(this,n)}return a.clearHits=s,a}function l(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;function i(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return r&&clearTimeout(r),r=setTimeout(()=>{t=e.apply(this,s)},n),t}return i}function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[i,...s]=t;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(r["arrayReduce"])(s,(e,t)=>t(e),i.apply(this,t))}}function u(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.apply(this,n.concat(r))}}function h(e){const t=e.length;function n(r){return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const a=r.concat(s);let l;return l=a.length>=t?e.apply(this,a):n(a),l}}return n([])}function d(e){const t=e.length;function n(r){return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const a=r.concat(s.reverse());let l;return l=a.length>=t?e.apply(this,a):n(a),l}}return n([])}function m(e,t,n,r,s,o,a,l){return Object(i["isDefined"])(l)?e.call(t,n,r,s,o,a,l):Object(i["isDefined"])(a)?e.call(t,n,r,s,o,a):Object(i["isDefined"])(o)?e.call(t,n,r,s,o):Object(i["isDefined"])(s)?e.call(t,n,r,s):Object(i["isDefined"])(r)?e.call(t,n,r):Object(i["isDefined"])(n)?e.call(t,n):e.call(t)}},"97dc":function(e,t,n){"use strict";var r=n("088f");e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},"9acd":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=new Map;function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);const t=r.get(e);function n(e,n){t.set(e,n)}function i(e){return t.get(e)}function s(e){return t.has(e)}function o(){return[...t.keys()]}function a(){return[...t.values()]}return{register:n,getItem:i,hasItem:s,getNames:o,getValues:a}}},"9c76":function(e,t,n){"use strict";var r=n("7b7f");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"9e75":function(e,t,n){"use strict";var r=n("b2ae");e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},"9f10":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("1096"),i=n("e90f");class s extends r["a"]{insert(e,t){this.indexedValues=Object(i["a"])(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=Object(i["b"])(this.indexedValues,e),super.remove(e)}}},"9f26":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,r=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],s=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".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"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return s}))},a309:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"d",(function(){return u}));const r="active-header",i="header",s="area",o="focus",a="fill",l="row",c="column",u="custom-selection"},a356:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,i,s,o){var a=t(r),l=n[e][t(r)];return 2===a&&(l=l[i?0:1]),l.replace(/%d/i,r)}},i=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],s=e.defineLocale("ar-dz",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/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:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}});return s}))},a357c:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("d06e");var r=n("5d7f"),i=n("8828");const s="base";function o(e,t,n,s,o,a,l){const c=l.ariaTags,u=[],h=[],d=[],m=[];l.className&&Object(r["addClass"])(t,l.className),l.readOnly?(u.push(l.readOnlyCellClassName),c&&m.push(Object(i["y"])())):c&&d.push(Object(i["y"])()[0]),!1===l.valid&&l.invalidCellClassName?(u.push(l.invalidCellClassName),c&&m.push(Object(i["o"])())):(h.push(l.invalidCellClassName),c&&d.push(Object(i["o"])()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&u.push(l.noWordWrapClassName),!a&&l.placeholder&&u.push(l.placeholderCellClassName),Object(r["removeClass"])(t,h),Object(r["addClass"])(t,u),Object(r["removeAttribute"])(t,d),Object(r["setAttribute"])(t,m)}o.RENDERER_TYPE=s},a45f:function(e,t,n){"use strict";var r=n("2408");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},a60d:function(e,t,n){"use strict";var r=n("d128"),i=n("d435"),s=n("2b75"),o=n("088f"),a=n("24d5"),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",m="writable";t.f=r?s?function(e,t,n){if(o(e),t=a(t),o(n),"function"===typeof e&&"prototype"===t&&"value"in n&&m in n&&!n[m]){var r=u(e,t);r&&r[m]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:h in n?n[h]:r[h],writable:!1})}return c(e,t,n)}:c:function(e,t,n){if(o(e),t=a(t),o(n),i)try{return c(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},a68d:function(e,t,n){"use strict";var r,i,s,o=n("bbc8"),a=n("f2e8"),l=n("8793"),c=n("2d2d"),u=n("69ba"),h=n("54d7"),d=n("ab25"),m=n("861e"),f="Object already initialized",p=a.TypeError,g=a.WeakMap,y=function(e){return s(e)?i(e):r(e,{})},w=function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}};if(o||h.state){var b=h.state||(h.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new p(f);return t.facade=e,b.set(e,t),t},i=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var _=d("state");m[_]=!0,r=function(e,t){if(u(e,_))throw new p(f);return t.facade=e,c(e,_,t),t},i=function(e){return u(e,_)?e[_]:{}},s=function(e){return u(e,_)}}e.exports={set:r,get:i,has:s,enforce:y,getterFor:w}},a6de:function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));const r=1,i=2,s=3},a73f:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("81ea");function i(e,t){return Object(r["arrayMap"])(e,e=>e-t.filter(t=>t<e).length)}function s(e,t){const n=t[0],i=t.length;return Object(r["arrayMap"])(e,e=>e>=n?e+i:e)}},a776:function(e,t,n){"use strict";n.r(t),n.d(t,"instanceToHTML",(function(){return a})),n.d(t,"_dataToHTML",(function(){return l})),n.d(t,"htmlToGridSettings",(function(){return c}));n("d06e"),n("70f9");var r=n("7b9c");const i={" ":" ","&":"&","<":"<",">":">"},s=new RegExp(Object.keys(i).map(e=>`(${e})`).join("|"),"gi");function o(e){return"TABLE"===(e&&e.nodeName||"")}function a(e){const t=e.hasColHeaders(),n=e.hasRowHeaders(),i=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],s=e.getData(...i),o=s.length,a=o>0?s[0].length:0,l=["<table>","</table>"],c=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],h=n?1:0,d=t?1:0;for(let m=0;m<o;m+=1){const i=t&&0===m,o=[];for(let t=0;t<a;t+=1){const a=!i&&n&&0===t;let l="";if(i)l=`<th>${e.getColHeader(t-h)}</th>`;else if(a)l=`<th>${e.getRowHeader(m-d)}</th>`;else{const n=s[m][t],{hidden:i,rowspan:o,colspan:a}=e.getCellMeta(m-d,t-h);if(!i){const e=[];if(o&&e.push(`rowspan="${o}"`),a&&e.push(`colspan="${a}"`),Object(r["isEmpty"])(n))l=`<td ${e.join(" ")}></td>`;else{const t=n.toString().replace("<","<").replace(">",">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");l=`<td ${e.join(" ")}>${t}</td>`}}}o.push(l)}const l=["<tr>",...o,"</tr>"].join("");i?c.splice(1,0,l):u.splice(-1,0,l)}return l.splice(1,0,c.join(""),u.join("")),l.join("")}function l(e){const t=e.length,n=["<table>"];for(let i=0;i<t;i+=1){const s=e[i],o=s.length,a=[];0===i&&n.push("<tbody>");for(let e=0;e<o;e+=1){const t=s[e],n=Object(r["isEmpty"])(t)?"":t.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${" ".repeat(e.length-1)} </span>`).replace(/\t/gi,"	");a.push(`<td>${n}</td>`)}n.push("<tr>",...a,"</tr>"),i+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const n={},r=t.createDocumentFragment(),a=t.createElement("div");r.appendChild(a);let l=e;if("string"===typeof l){const e=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,e=>{const t=e.match(/<td\b[^>]*?>/g)[0],n=/<p.*?>/g,r=e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(n,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^ $/gm,""),i="</td>";return`${t}${r}${i}`});a.insertAdjacentHTML("afterbegin",""+e),l=a.querySelector("table")}if(!l||!o(l))return;const c=a.querySelector('meta[name$="enerator"]'),u=null!==l.querySelector("tbody th"),h=l.querySelector("tr"),d=h?Array.from(h.cells).reduce((e,t)=>e+t.colSpan,0)-(u?1:0):0,m=l.tFoot&&Array.from(l.tFoot.rows)||[],f=[];let p=!1,g=0,y=0;if(l.tHead){const e=Array.from(l.tHead.rows).filter(e=>{const t=null!==e.querySelector("td");return t&&f.push(e),!t});g=e.length,p=g>0,g>1?n.nestedHeaders=Array.from(e).reduce((e,t)=>{const n=Array.from(t.cells).reduce((e,t,n)=>{if(u&&0===n)return e;const{colSpan:r,innerHTML:i}=t,s=r>1?{label:i,colspan:r}:i;return e.push(s),e},[]);return e.push(n),e},[]):p&&(n.colHeaders=Array.from(e[0].children).reduce((e,t,n)=>(u&&0===n||e.push(t.innerHTML),e),[]))}f.length&&(n.fixedRowsTop=f.length),m.length&&(n.fixedRowsBottom=m.length);const w=[...f,...Array.from(l.tBodies).reduce((e,t)=>(e.push(...Array.from(t.rows)),e),[]),...m];y=w.length;const b=new Array(y);for(let i=0;i<y;i++)b[i]=new Array(d);const _=[],v=[];for(let o=0;o<y;o++){const e=w[o],t=Array.from(e.cells),n=t.length;for(let r=0;r<n;r++){const e=t[r],{nodeName:n,innerHTML:a,rowSpan:l,colSpan:u}=e,h=b[o].findIndex(e=>void 0===e);if("TD"===n){if(l>1||u>1){for(let e=o;e<o+l;e++)if(e<y)for(let t=h;t<h+u;t++)b[e][t]=null;const t=e.getAttribute("style"),n=t&&t.includes("mso-ignore:colspan");n||_.push({col:h,row:o,rowspan:l,colspan:u})}let t="";t=c&&/excel/gi.test(c.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),b[o][h]=t.replace(s,e=>i[e])}else v.push(a)}}return _.length&&(n.mergeCells=_),v.length&&(n.rowHeaders=v),b.length&&(n.data=b),n}},a7fa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t}))},a952:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return y}));n("7a89"),n("d06e");var r=n("d852"),i=n("81ea"),s=n("7b9c");const o=0,a=1,l=2,c=3,u=[c,l],h=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),m=Symbol("child");function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==m)throw new Error("The second argument is used internally only and cannot be overwritten.");const n=Array.isArray(e),i=t===d;let s=o;if(n){const t=e[0];if(0===e.length)s=a;else if(i&&t instanceof r["a"])s=c;else if(i&&Array.isArray(t))s=f(t,m);else if(e.length>=2&&e.length<=4){const t=!e.some((e,t)=>!h[t].includes(typeof e));t&&(s=l)}}return s}function p(e){let{createCellCoords:t,createCellRange:n,keepDirection:r=!1,propToCol:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!u.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(o){const a=e===c;let l=a?o.from.row:o[0],u=a?o.from.col:o[1],h=a?o.to.row:o[2],d=a?o.to.col:o[3];if("function"===typeof i&&("string"===typeof u&&(u=i(u)),"string"===typeof d&&(d=i(d))),Object(s["isUndefined"])(h)&&(h=l),Object(s["isUndefined"])(d)&&(d=u),!r){const e=l,t=u,n=h,r=d;l=Math.min(e,n),u=Math.min(t,r),h=Math.max(e,n),d=Math.max(t,r)}const m=t(l,u),f=t(h,d);return n(m,m,f)}}function g(e){const t=f(e.getSelected());if(t===o||t===a)return[];const n=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;Object(i["arrayEach"])(e.getSelected(),e=>{const{from:t,to:s}=n(e),o=Math.max(t.col,0),a=s.col-o+1;Object(i["arrayEach"])(Array.from(new Array(a),(e,t)=>o+t),e=>{r.has(e)||r.add(e)})});const s=Array.from(r).sort((e,t)=>e-t),l=Object(i["arrayReduce"])(s,(e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e),[]);return l}function y(e){const t=f(e.getSelected());if(t===o||t===a)return[];const n=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;Object(i["arrayEach"])(e.getSelected(),e=>{const{from:t,to:s}=n(e),o=Math.max(t.row,0),a=s.row-o+1;Object(i["arrayEach"])(Array.from(new Array(a),(e,t)=>o+t),e=>{r.has(e)||r.add(e)})});const s=Array.from(r).sort((e,t)=>e-t),l=Object(i["arrayReduce"])(s,(e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e),[]);return l}},aa44:function(e,t,n){"use strict";var r=n("fd18"),i=n("fc2d"),s=Math.floor,o=r("".charAt),a=r("".replace),l=r("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,h,d){var m=n+e.length,f=r.length,p=u;return void 0!==h&&(h=i(h),p=c),a(d,p,(function(i,a){var c;switch(o(a,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,m);case"<":c=h[l(a,1,-1)];break;default:var u=+a;if(0===u)return i;if(u>f){var d=s(u/10);return 0===d?i:d<=f?void 0===r[d-1]?o(a,1):r[d-1]+o(a,1):i}c=r[u-1]}return void 0===c?"":c}))}},aaf2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?i[n][0]:i[n][1]}var n=e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},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, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM 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:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}});return n}))},ab25:function(e,t,n){"use strict";var r=n("de26"),i=n("592a"),s=r("keys");e.exports=function(e){return s[e]||(s[e]=i(e))}},ac4f:function(e,t,n){"use strict";var r=n("f2e8"),i=n("485c").f,s=n("2d2d"),o=n("0e87"),a=n("3df8"),l=n("1d07"),c=n("0c0f");e.exports=function(e,t){var n,u,h,d,m,f,p=e.target,g=e.global,y=e.stat;if(u=g?r:y?r[p]||a(p,{}):r[p]&&r[p].prototype,u)for(h in t){if(m=t[h],e.dontCallGetSet?(f=i(u,h),d=f&&f.value):d=u[h],n=c(g?h:p+(y?".":"#")+h,e.forced),!n&&void 0!==d){if(typeof m==typeof d)continue;l(m,d)}(e.sham||d&&d.sham)&&s(m,"sham",!0),o(u,h,m,e)}}},ada2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":e+" "+t(i[r],+e)}function r(e,t){var n,r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?r["nominative"].slice(1,7).concat(r["nominative"].slice(0,1)):e?(n=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative",r[n][e.day()]):r["nominative"]}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var s=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,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:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return s}))},ae20:function(e,t,n){"use strict";var r=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw r("Maximum allowed index exceeded");return e}},b29d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("lo",{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"ຕອນແລງ"===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:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t}))},b2ae:function(e,t,n){"use strict";var r=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?i:r)(t)}},b2c9:function(e,t,n){"use strict";var r=n("8793");e.exports=function(e){return r(e)||null===e}},b343:function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},b384:function(e,t,n){"use strict";var r=n("fd18"),i=n("b343"),s=n("73fa"),o=n("69ba"),a=n("d128"),l=n("0a73").CONFIGURABLE,c=n("f072"),u=n("a68d"),h=u.enforce,d=u.get,m=String,f=Object.defineProperty,p=r("".slice),g=r("".replace),y=r([].join),w=a&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),_=e.exports=function(e,t,n){"Symbol("===p(m(t),0,7)&&(t="["+g(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!o(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),w&&n&&o(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=h(e);return o(r,"source")||(r.source=y(b,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return s(this)&&d(this).source||c(this)}),"toString")},b3eb:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".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"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b469:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".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"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b46a:function(e,t,n){"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},b53d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".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:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t}))},b540a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t}))},b5b7:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"});return s}))},b7e9:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".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:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},b84c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},b879:function(e,t,n){"use strict";var r=n("ac4f"),i=n("fc2d"),s=n("7dcf4"),o=n("9e75"),a=n("f41c");r({target:"Array",proto:!0},{at:function(e){var t=i(this),n=s(t),r=o(e),a=r>=0?r:n+r;return a<0||a>=n?void 0:t[a]}}),a("at")},b97c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10===1&&t%100!==11?e[2]:e[3]:t%10===1&&t%100!==11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}function s(e,t){return t?"dažas sekundes":"dažām sekundēm"}var o=e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:s,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},ba51:function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,s=i&&!r.call({1:2},1);t.f=s?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},bb2a:function(e,t,n){"use strict";var r=n("7b69"),i=n("2aac"),s=n("088f"),o=n("71ca"),a=n("9582"),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(i(n))return s(r(n,e));throw new l(o(e)+" is not iterable")}},bb71:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".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"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},bbc8:function(e,t,n){"use strict";var r=n("f2e8"),i=n("73fa"),s=r.WeakMap;e.exports=i(s)&&/native code/.test(String(s))},bd5e:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));var r=n("7b9c");function i(){Object(r["isDefined"])(console)&&console.warn(...arguments)}function s(){Object(r["isDefined"])(console)&&console.error(...arguments)}},bdd7:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("7a89");var r=n("3d57"),i=n("e90f");const s=new Map([["indexesSequence",{getListWithInsertedItems:r["a"],getListWithRemovedItems:r["b"]}],["physicallyIndexed",{getListWithInsertedItems:i["a"],getListWithRemovedItems:i["b"]}]]),o=e=>{if(!1===s.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return s.get(e)}},bdfe:function(e,t,n){"use strict";var r=n("939b");e.exports=Array.isArray||function(e){return"Array"===r(e)}},bef1:function(e,t,n){"use strict";var r=n("652d"),i=n("e1c6"),s=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,s)}},bf78:function(e,t,n){"use strict";var r=n("022b"),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},bf80:function(e,t,n){"use strict";var r=n("71ca"),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},c041:function(e,t,n){"use strict";var r=n("652d"),i=n("e1c6");e.exports=Object.keys||function(e){return r(e,i)}},c0c4:function(e,t,n){
- /*! @license DOMPurify 2.5.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.3/LICENSE */
- (function(t,n){e.exports=n()})(0,(function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,s){return r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var s=Function.bind.apply(e,i),o=new s;return r&&t(o,r.prototype),o},r.apply(null,arguments)}function i(e){return s(e)||o(e)||a(e)||c()}function s(e){if(Array.isArray(e))return l(e)}function o(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u=Object.hasOwnProperty,h=Object.setPrototypeOf,d=Object.isFrozen,m=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,p=Object.freeze,g=Object.seal,y=Object.create,w="undefined"!==typeof Reflect&&Reflect,b=w.apply,_=w.construct;b||(b=function(e,t,n){return e.apply(t,n)}),p||(p=function(e){return e}),g||(g=function(e){return e}),_||(_=function(e,t){return r(e,i(t))});var v=x(Array.prototype.forEach),S=x(Array.prototype.pop),E=x(Array.prototype.push),C=x(String.prototype.toLowerCase),T=x(String.prototype.toString),M=x(String.prototype.match),R=x(String.prototype.replace),O=x(String.prototype.indexOf),N=x(String.prototype.trim),A=x(RegExp.prototype.test),L=k(TypeError),I=x(Number.isNaN);function x(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return b(e,t,r)}}function k(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _(e,n)}}function D(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:C,h&&h(e,null);var i=t.length;while(i--){var s=t[i];if("string"===typeof s){var o=n(s);o!==s&&(d(t)||(t[i]=o),s=o)}e[s]=!0}return e}function H(e){var t,n=y(null);for(t in e)!0===b(u,e,[t])&&(n[t]=e[t]);return n}function P(e,t){while(null!==e){var n=f(e,t);if(n){if(n.get)return x(n.get);if("function"===typeof n.value)return x(n.value)}e=m(e)}function r(e){return console.warn("fallback value for",e),null}return r}var j=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Y=p(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),U=p(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),V=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),B=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),W=p(["#text"]),G=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),z=p(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),K=p(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),X=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=g(/<%[\w\W]*|[\w\W]*%>/gm),J=g(/\${[\w\W]*}/gm),Q=g(/^data-[\-\w.\u00B7-\uFFFF]/),Z=g(/^aria-[\-\w]+$/),ee=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),te=g(/^(?:\w+script|data):/i),ne=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),re=g(/^html$/i),ie=g(/^[a-z][.\w]*(-[.\w]+)+$/i),se=function(){return"undefined"===typeof window?null:window},oe=function(t,n){if("object"!==e(t)||"function"!==typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(o){return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function ae(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:se(),n=function(e){return ae(e)};if(n.version="2.5.3",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,s=t.document,o=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,h=t.NamedNodeMap,d=void 0===h?t.NamedNodeMap||t.MozNamedAttrMap:h,m=t.HTMLFormElement,f=t.DOMParser,g=t.trustedTypes,y=c.prototype,w=P(y,"cloneNode"),b=P(y,"nextSibling"),_=P(y,"childNodes"),x=P(y,"parentNode");if("function"===typeof a){var k=s.createElement("template");k.content&&k.content.ownerDocument&&(s=k.content.ownerDocument)}var le=oe(g,r),ce=le?le.createHTML(""):"",ue=s,he=ue.implementation,de=ue.createNodeIterator,me=ue.createDocumentFragment,fe=ue.getElementsByTagName,pe=r.importNode,ge={};try{ge=H(s).documentMode?s.documentMode:{}}catch(jt){}var ye={};n.isSupported="function"===typeof x&&he&&void 0!==he.createHTMLDocument&&9!==ge;var we,be,_e=$,ve=q,Se=J,Ee=Q,Ce=Z,Te=te,Me=ne,Re=ie,Oe=ee,Ne=null,Ae=D({},[].concat(i(j),i(F),i(Y),i(V),i(W))),Le=null,Ie=D({},[].concat(i(G),i(z),i(K),i(X))),xe=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ke=null,De=null,He=!0,Pe=!0,je=!1,Fe=!0,Ye=!1,Ue=!0,Ve=!1,Be=!1,We=!1,Ge=!1,ze=!1,Ke=!1,Xe=!0,$e=!1,qe="user-content-",Je=!0,Qe=!1,Ze={},et=null,tt=D({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),nt=null,rt=D({},["audio","video","img","source","image","track"]),it=null,st=D({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ot="http://www.w3.org/1998/Math/MathML",at="http://www.w3.org/2000/svg",lt="http://www.w3.org/1999/xhtml",ct=lt,ut=!1,ht=null,dt=D({},[ot,at,lt],T),mt=["application/xhtml+xml","text/html"],ft="text/html",pt=null,gt=255,yt=s.createElement("form"),wt=function(e){return e instanceof RegExp||e instanceof Function},bt=function(t){pt&&pt===t||(t&&"object"===e(t)||(t={}),t=H(t),we=we=-1===mt.indexOf(t.PARSER_MEDIA_TYPE)?ft:t.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===we?T:C,Ne="ALLOWED_TAGS"in t?D({},t.ALLOWED_TAGS,be):Ae,Le="ALLOWED_ATTR"in t?D({},t.ALLOWED_ATTR,be):Ie,ht="ALLOWED_NAMESPACES"in t?D({},t.ALLOWED_NAMESPACES,T):dt,it="ADD_URI_SAFE_ATTR"in t?D(H(st),t.ADD_URI_SAFE_ATTR,be):st,nt="ADD_DATA_URI_TAGS"in t?D(H(rt),t.ADD_DATA_URI_TAGS,be):rt,et="FORBID_CONTENTS"in t?D({},t.FORBID_CONTENTS,be):tt,ke="FORBID_TAGS"in t?D({},t.FORBID_TAGS,be):{},De="FORBID_ATTR"in t?D({},t.FORBID_ATTR,be):{},Ze="USE_PROFILES"in t&&t.USE_PROFILES,He=!1!==t.ALLOW_ARIA_ATTR,Pe=!1!==t.ALLOW_DATA_ATTR,je=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Ye=t.SAFE_FOR_TEMPLATES||!1,Ue=!1!==t.SAFE_FOR_XML,Ve=t.WHOLE_DOCUMENT||!1,Ge=t.RETURN_DOM||!1,ze=t.RETURN_DOM_FRAGMENT||!1,Ke=t.RETURN_TRUSTED_TYPE||!1,We=t.FORCE_BODY||!1,Xe=!1!==t.SANITIZE_DOM,$e=t.SANITIZE_NAMED_PROPS||!1,Je=!1!==t.KEEP_CONTENT,Qe=t.IN_PLACE||!1,Oe=t.ALLOWED_URI_REGEXP||Oe,ct=t.NAMESPACE||lt,xe=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&wt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&wt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xe.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ye&&(Pe=!1),ze&&(Ge=!0),Ze&&(Ne=D({},i(W)),Le=[],!0===Ze.html&&(D(Ne,j),D(Le,G)),!0===Ze.svg&&(D(Ne,F),D(Le,z),D(Le,X)),!0===Ze.svgFilters&&(D(Ne,Y),D(Le,z),D(Le,X)),!0===Ze.mathMl&&(D(Ne,V),D(Le,K),D(Le,X))),t.ADD_TAGS&&(Ne===Ae&&(Ne=H(Ne)),D(Ne,t.ADD_TAGS,be)),t.ADD_ATTR&&(Le===Ie&&(Le=H(Le)),D(Le,t.ADD_ATTR,be)),t.ADD_URI_SAFE_ATTR&&D(it,t.ADD_URI_SAFE_ATTR,be),t.FORBID_CONTENTS&&(et===tt&&(et=H(et)),D(et,t.FORBID_CONTENTS,be)),Je&&(Ne["#text"]=!0),Ve&&D(Ne,["html","head","body"]),Ne.table&&(D(Ne,["tbody"]),delete ke.tbody),p&&p(t),pt=t)},_t=D({},["mi","mo","mn","ms","mtext"]),vt=D({},["foreignobject","annotation-xml"]),St=D({},["title","style","font","a","script"]),Et=D({},F);D(Et,Y),D(Et,U);var Ct=D({},V);D(Ct,B);var Tt=function(e){var t=x(e);t&&t.tagName||(t={namespaceURI:ct,tagName:"template"});var n=C(e.tagName),r=C(t.tagName);return!!ht[e.namespaceURI]&&(e.namespaceURI===at?t.namespaceURI===lt?"svg"===n:t.namespaceURI===ot?"svg"===n&&("annotation-xml"===r||_t[r]):Boolean(Et[n]):e.namespaceURI===ot?t.namespaceURI===lt?"math"===n:t.namespaceURI===at?"math"===n&&vt[r]:Boolean(Ct[n]):e.namespaceURI===lt?!(t.namespaceURI===at&&!vt[r])&&(!(t.namespaceURI===ot&&!_t[r])&&(!Ct[n]&&(St[n]||!Et[n]))):!("application/xhtml+xml"!==we||!ht[e.namespaceURI]))},Mt=function(e){E(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(jt){try{e.outerHTML=ce}catch(jt){e.remove()}}},Rt=function(e,t){try{E(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(jt){E(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Le[e])if(Ge||ze)try{Mt(t)}catch(jt){}else try{t.setAttribute(e,"")}catch(jt){}},Ot=function(e){var t,n;if(We)e="<remove></remove>"+e;else{var r=M(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===we&&ct===lt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=le?le.createHTML(e):e;if(ct===lt)try{t=(new f).parseFromString(i,we)}catch(jt){}if(!t||!t.documentElement){t=he.createDocument(ct,"template",null);try{t.documentElement.innerHTML=ut?ce:i}catch(jt){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(s.createTextNode(n),o.childNodes[0]||null),ct===lt?fe.call(t,Ve?"html":"body")[0]:Ve?t.documentElement:o},Nt=function(e){return de.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null,!1)},At=function(e){return e instanceof m&&("undefined"!==typeof e.__depth&&"number"!==typeof e.__depth||"undefined"!==typeof e.__removalCount&&"number"!==typeof e.__removalCount||"string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof d)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore||"function"!==typeof e.hasChildNodes)},Lt=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},It=function(e,t,r){ye[e]&&v(ye[e],(function(e){e.call(n,t,r,pt)}))},xt=function(e){var t;if(It("beforeSanitizeElements",e,null),At(e))return Mt(e),!0;if(A(/[\u0080-\uFFFF]/,e.nodeName))return Mt(e),!0;var r=be(e.nodeName);if(It("uponSanitizeElement",e,{tagName:r,allowedTags:Ne}),e.hasChildNodes()&&!Lt(e.firstElementChild)&&(!Lt(e.content)||!Lt(e.content.firstElementChild))&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Mt(e),!0;if("select"===r&&A(/<template/i,e.innerHTML))return Mt(e),!0;if(7===e.nodeType)return Mt(e),!0;if(Ue&&8===e.nodeType&&A(/<[/\w]/g,e.data))return Mt(e),!0;if(!Ne[r]||ke[r]){if(!ke[r]&&Dt(r)){if(xe.tagNameCheck instanceof RegExp&&A(xe.tagNameCheck,r))return!1;if(xe.tagNameCheck instanceof Function&&xe.tagNameCheck(r))return!1}if(Je&&!et[r]){var i=x(e)||e.parentNode,s=_(e)||e.childNodes;if(s&&i)for(var o=s.length,a=o-1;a>=0;--a){var l=w(s[a],!0);l.__removalCount=(e.__removalCount||0)+1,i.insertBefore(l,b(e))}}return Mt(e),!0}return e instanceof c&&!Tt(e)?(Mt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ye&&3===e.nodeType&&(t=e.textContent,t=R(t,_e," "),t=R(t,ve," "),t=R(t,Se," "),e.textContent!==t&&(E(n.removed,{element:e.cloneNode()}),e.textContent=t)),It("afterSanitizeElements",e,null),!1):(Mt(e),!0)},kt=function(e,t,n){if(Xe&&("id"===t||"name"===t)&&(n in s||n in yt||"__depth"===n||"__removalCount"===n))return!1;if(Pe&&!De[t]&&A(Ee,t));else if(He&&A(Ce,t));else if(!Le[t]||De[t]){if(!(Dt(e)&&(xe.tagNameCheck instanceof RegExp&&A(xe.tagNameCheck,e)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(e))&&(xe.attributeNameCheck instanceof RegExp&&A(xe.attributeNameCheck,t)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(t))||"is"===t&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&A(xe.tagNameCheck,n)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(n))))return!1}else if(it[t]);else if(A(Oe,R(n,Me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(n,"data:")||!nt[e]){if(je&&!A(Te,R(n,Me,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&M(e,Re)},Ht=function(t){var r,i,s,o;It("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Le};o=a.length;while(o--){r=a[o];var c=r,u=c.name,h=c.namespaceURI;if(i="value"===u?r.value:N(r.value),s=be(u),l.attrName=s,l.attrValue=i,l.keepAttr=!0,l.forceKeepAttr=void 0,It("uponSanitizeAttribute",t,l),i=l.attrValue,!l.forceKeepAttr&&(Rt(u,t),l.keepAttr))if(Fe||!A(/\/>/i,i))if(Ue&&A(/((--!?|])>)|<\/(style|title)/i,i))Rt(u,t);else{Ye&&(i=R(i,_e," "),i=R(i,ve," "),i=R(i,Se," "));var d=be(t.nodeName);if(kt(d,s,i)){if(!$e||"id"!==s&&"name"!==s||(Rt(u,t),i=qe+i),le&&"object"===e(g)&&"function"===typeof g.getAttributeType)if(h);else switch(g.getAttributeType(d,s)){case"TrustedHTML":i=le.createHTML(i);break;case"TrustedScriptURL":i=le.createScriptURL(i);break}try{h?t.setAttributeNS(h,u,i):t.setAttribute(u,i),At(t)?Mt(t):S(n.removed)}catch(jt){}}}else Rt(u,t)}It("afterSanitizeAttributes",t,null)}},Pt=function e(t){var n,r=Nt(t);It("beforeSanitizeShadowDOM",t,null);while(n=r.nextNode())if(It("uponSanitizeShadowNode",n,null),!xt(n)){var i=x(n);1===n.nodeType&&(i&&i.__depth?n.__depth=(n.__removalCount||0)+i.__depth+1:n.__depth=1),(n.__depth>=gt||I(n.__depth))&&Mt(n),n.content instanceof o&&(n.content.__depth=n.__depth,e(n.content)),Ht(n)}It("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(i){var s,a,c,u,h,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ut=!i,ut&&(i="\x3c!--\x3e"),"string"!==typeof i&&!Lt(i)){if("function"!==typeof i.toString)throw L("toString is not a function");if(i=i.toString(),"string"!==typeof i)throw L("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"===typeof t.toStaticHTML){if("string"===typeof i)return t.toStaticHTML(i);if(Lt(i))return t.toStaticHTML(i.outerHTML)}return i}if(Be||bt(d),n.removed=[],"string"===typeof i&&(Qe=!1),Qe){if(i.nodeName){var m=be(i.nodeName);if(!Ne[m]||ke[m])throw L("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof l)s=Ot("\x3c!----\x3e"),a=s.ownerDocument.importNode(i,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?s=a:s.appendChild(a);else{if(!Ge&&!Ye&&!Ve&&-1===i.indexOf("<"))return le&&Ke?le.createHTML(i):i;if(s=Ot(i),!s)return Ge?null:Ke?ce:""}s&&We&&Mt(s.firstChild);var f=Nt(Qe?i:s);while(c=f.nextNode())if((3!==c.nodeType||c!==u)&&!xt(c)){var p=x(c);1===c.nodeType&&(p&&p.__depth?c.__depth=(c.__removalCount||0)+p.__depth+1:c.__depth=1),(c.__depth>=gt||I(c.__depth))&&Mt(c),c.content instanceof o&&(c.content.__depth=c.__depth,Pt(c.content)),Ht(c),u=c}if(u=null,Qe)return i;if(Ge){if(ze){h=me.call(s.ownerDocument);while(s.firstChild)h.appendChild(s.firstChild)}else h=s;return(Le.shadowroot||Le.shadowrootmod)&&(h=pe.call(r,h,!0)),h}var g=Ve?s.outerHTML:s.innerHTML;return Ve&&Ne["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&A(re,s.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+s.ownerDocument.doctype.name+">\n"+g),Ye&&(g=R(g,_e," "),g=R(g,ve," "),g=R(g,Se," ")),le&&Ke?le.createHTML(g):g},n.setConfig=function(e){bt(e),Be=!0},n.clearConfig=function(){pt=null,Be=!1},n.isValidAttribute=function(e,t,n){pt||bt({});var r=be(e),i=be(t);return kt(r,i,n)},n.addHook=function(e,t){"function"===typeof t&&(ye[e]=ye[e]||[],E(ye[e],t))},n.removeHook=function(e){if(ye[e])return S(ye[e])},n.removeHooks=function(e){ye[e]&&(ye[e]=[])},n.removeAllHooks=function(){ye={}},n}var le=ae();return le}))},c0d8:function(e,t,n){"use strict";n("7a89"),n("d06e"),n("f4db");var r=n("5d7f"),i=n("97b9"),s=n("7b9c"),o=n("63d8"),a=n("c5c4"),l=n("87d6"),c=n("351d"),u=n("bd5e");function h(e,t){m(e,t),t.add(e)}function d(e,t,n){m(e,t),t.set(e,n)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t){return e.get(g(e,t))}function p(e,t,n){return e.set(g(e,t),n),n}function g(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const y=Object.freeze({CELL:"cell",MIXED:"mixed"});var w=new WeakMap,b=new WeakMap,_=new WeakMap,v=new WeakMap,S=new WeakMap,E=new WeakSet;class C{constructor(e){var t=this;h(this,E),d(this,w,void 0),d(this,b,void 0),d(this,_,50),d(this,v,null),d(this,S,new Map);const n=e.getSettings();p(w,this,e),p(b,this,n.imeFastEdit?y.MIXED:y.CELL),f(w,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(E,t,O).call(t,...n)})),f(w,this).addHook("afterSelection",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(E,t,M).call(t,...n)})),f(w,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(E,t,M).call(t,...n)})),f(w,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return g(E,t,R).call(t,...n)}))}getFocusMode(){return f(b,this)}setFocusMode(e){Object.values(y).includes(e)?p(b,this,e):Object(u["b"])(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return f(_,this)}setRefocusDelay(e){p(_,this,e)}setRefocusElementGetter(e){p(v,this,e)}getRefocusElement(){return"function"===typeof f(v,this)?f(v,this).call(this):null===(e=f(w,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,n;const r=null===(t=f(w,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r)return;let i=f(w,this).runHooks("modifyFocusedElement",r.row,r.col,e);i instanceof HTMLElement||(i=e),!i||null!==(n=f(w,this).getActiveEditor())&&void 0!==n&&n.isOpened()||i.focus({preventScroll:!0})};e?t(e):g(E,this,T).call(this,e=>t(e))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f(_,this);const n=this.getRefocusElement();!f(w,this).getSettings().imeFastEdit||null!==(e=f(w,this).getActiveEditor())&&void 0!==e&&e.isOpened()||!n||(f(S,this).has(t)||f(S,this).set(t,Object(i["debounce"])(()=>{n.select()},t)),f(S,this).get(t)())}}function T(e){var t;const n=null===(t=f(w,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n||!f(w,this).selection.isCellVisible(n))return void e(null);const r=f(w,this).getCell(n.row,n.col,!0);null===r?f(w,this).addHookOnce("afterScroll",()=>{e(f(w,this).getCell(n.row,n.col,!0))}):e(r)}function M(){g(E,this,T).call(this,e=>{const{activeElement:t}=f(w,this).rootDocument;t&&Object(r["isOutsideInput"])(t)&&t.blur(),this.focusOnHighlightedCell(e)})}function R(){g(E,this,T).call(this,e=>{this.getFocusMode()===y.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()})}function O(e){e.imeFastEdit&&this.getFocusMode()!==y.MIXED?this.setFocusMode(y.MIXED):e.imeFastEdit||this.getFocusMode()===y.CELL||this.setFocusMode(y.CELL)}var N=n("81ea"),A=n("a776"),L=n("24b5"),I=n("3d76"),x=n("491c"),k=n("169f"),D=n("29b0"),H=n("ffec"),P=n("de3b"),j=n("7dd09");function F(e,t,n){Y(e,t),t.set(e,n)}function Y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function U(e,t){return e.get(B(e,t))}function V(e,t,n){return e.set(B(e,t),n),n}function B(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var W=new WeakMap,G=new WeakMap,z=new WeakMap,K=new WeakMap,X=new WeakMap,$=new WeakMap,q=new WeakMap,J=new WeakMap,Q=new WeakMap,Z=new WeakMap;class ee{constructor(e,t,n,r,i,s){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;F(this,W,void 0),F(this,G,void 0),F(this,z,void 0),F(this,K,void 0),F(this,X,void 0),F(this,$,void 0),F(this,q,void 0),F(this,J,void 0),F(this,Q,[null,null]),F(this,Z,[null,null]),V(W,this,n),V(G,this,t),V(z,this,i),V(K,this,s),V(X,this,o),V($,this,r),V(q,this,e),this.registerEvents()}registerEvents(){U($,this).addEventListener(U(z,this).holder,"contextmenu",e=>this.onContextMenu(e)),U($,this).addEventListener(U(z,this).TABLE,"mouseover",e=>this.onMouseOver(e)),U($,this).addEventListener(U(z,this).TABLE,"mouseout",e=>this.onMouseOut(e));const e=()=>{U($,this).addEventListener(U(z,this).holder,"touchstart",e=>this.onTouchStart(e)),U($,this).addEventListener(U(z,this).holder,"touchend",e=>this.onTouchEnd(e)),this.momentumScrolling||(this.momentumScrolling={}),U($,this).addEventListener(U(z,this).holder,"scroll",()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||U(W,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,U(W,this).getSetting("onAfterMomentumScroll"))},200)})},t=()=>{U($,this).addEventListener(U(z,this).holder,"mouseup",e=>this.onMouseUp(e)),U($,this).addEventListener(U(z,this).holder,"mousedown",e=>this.onMouseDown(e))};Object(o["isMobileBrowser"])()?e():(Object(j["isTouchSupported"])()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e),n=t.coords;if(U(J,this)&&n){const[e,t]=[n.row,U(J,this).from.row],[r,i]=[n.col,U(J,this).from.col];return e===t&&r===i}return!1}parentCell(e){const t={},n=U(z,this).TABLE,i=Object(r["closestDown"])(e,["TD","TH"],n);return i?(t.coords=U(z,this).getCoords(i),t.TD=i):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"current")?(t.coords=U(K,this).getFocusSelection().cellRange.highlight,t.TD=U(z,this).getCell(t.coords)):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"area")&&U(K,this).getAreaSelection().cellRange&&(t.coords=U(K,this).getAreaSelection().cellRange.to,t.TD=U(z,this).getCell(t.coords)),t}onMouseDown(e){const t=U(G,this).rootDocument.activeElement,n=Object(i["partial"])(r["getParent"],e.target),s=e.target;if(!["TD","TH"].includes(t.nodeName)&&(s===t||n(0)===t||n(1)===t))return;const o=this.parentCell(s);Object(r["hasClass"])(s,"corner")?U(W,this).getSetting("onCellCornerMouseDown",e,s):o.TD&&U(W,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&o.TD&&(U(Z,this)[0]=o.TD,clearTimeout(U(Q,this)[0]),U(Q,this)[0]=setTimeout(()=>{U(Z,this)[0]=null},1e3))}onContextMenu(e){if(U(W,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!U(W,this).has("onCellMouseOver"))return;const t=U(z,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=U(X,this)||this;n&&n!==i.lastMouseOver&&Object(r["isChildOf"])(n,t)&&(i.lastMouseOver=n,this.callListener("onCellMouseOver",e,U(z,this).getCoords(n),n))}onMouseOut(e){if(!U(W,this).has("onCellMouseOut"))return;const t=U(z,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=Object(r["closestDown"])(e.relatedTarget,["TD","TH"],t),s=U(X,this)||this;n&&n!==i&&Object(r["isChildOf"])(n,t)&&(this.callListener("onCellMouseOut",e,U(z,this).getCoords(n),n),null===i&&(s.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&U(W,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===U(Z,this)[0]&&t.TD===U(Z,this)[1]?(Object(r["hasClass"])(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),U(Z,this)[0]=null,U(Z,this)[1]=null):t.TD===U(Z,this)[0]&&(U(Z,this)[1]=t.TD,clearTimeout(U(Q,this)[1]),U(Q,this)[1]=setTimeout(()=>{U(Z,this)[1]=null},500)))}onTouchStart(e){V(J,this,U(K,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const n=e.target,r=null===(t=this.parentCell(n))||void 0===t?void 0:t.coords,i=Object(s["isDefined"])(r)&&r.row>=0&&r.col>=0,a=e.cancelable&&i&&U(W,this).getSetting("isDataViewInstance");if(a){const t=["A","BUTTON","INPUT"];Object(o["isIOS"])()&&(Object(o["isChromeWebKit"])()||Object(o["isFirefoxWebKit"])())&&this.selectedCellWasTouched(n)&&!t.includes(n.tagName)?e.preventDefault():this.selectedCellWasTouched(n)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,n,r){const i=U(W,this).getSettingPure(e);i&&i(t,n,r,U(q,this).call(this))}destroy(){clearTimeout(U(Q,this)[0]),clearTimeout(U(Q,this)[1]),U($,this).destroy()}}var te=ee,ne=n("f938");function re(e,t,n){return t=ie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(e){var t=se(e,"string");return"symbol"==typeof t?t:t+""}function se(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class oe{constructor(e,t,n){re(this,"offset",void 0),re(this,"total",void 0),re(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=n}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}}var ae=oe;function le(e,t,n){return t=ce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e){var t=ue(e,"string");return"symbol"==typeof t?t:t+""}function ue(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class he{constructor(e,t,n){le(this,"offset",void 0),le(this,"total",void 0),le(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=n}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}}var de=he;const me=0,fe=1,pe=2;function ge(e,t,n){return t=ye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(e){var t=we(e,"string");return"symbol"==typeof t?t:t+""}function we(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class be{constructor(){ge(this,"currentSize",0),ge(this,"nextSize",0),ge(this,"currentOffset",0),ge(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}function _e(e,t,n){return t=ve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){var t=Se(e,"string");return"symbol"==typeof t?t:t+""}function Se(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ee{constructor(){_e(this,"size",new be),_e(this,"workingSpace",me),_e(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof be}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=fe,e.workingSpace=pe,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=pe,e.workingSpace=fe,this.sharedSize=e.getViewSize()}}function Ce(e,t,n){return t=Te(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Te(e){var t=Me(e,"string");return"symbol"==typeof t?t:t+""}function Me(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Re{constructor(e,t,n){Ce(this,"rootNode",void 0),Ce(this,"nodesPool",void 0),Ce(this,"sizeSet",new Ee),Ce(this,"childNodeType",void 0),Ce(this,"visualIndex",0),Ce(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=n.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let n=0;if(this.isSharedViewSet()){let r=e.firstElementChild;while(r){if(r.tagName===this.childNodeType)n+=1;else if(t.isPlaceOn(fe))break;r=r.nextElementSibling}}else n=e.childElementCount;return n}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,n=this.isSharedViewSet(),{nextSize:r}=t.getViewSize();let i=this.getRenderedChildCount();while(i<r){const r=this.nodesPool();!n||n&&t.isPlaceOn(pe)?e.appendChild(r):e.insertBefore(r,e.firstChild),i+=1}const s=n&&t.isPlaceOn(fe);while(i>r)e.removeChild(s?e.firstChild:e.lastChild),i-=1}render(){const{rootNode:e,sizeSet:t}=this;let n=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(pe)&&(n+=t.sharedSize.nextSize);let r=e.childNodes[n];if(r.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,r),r=t}this.collectedNodes.push(r),this.visualIndex+=1}end(){}}class Oe extends Re{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}function Ne(e,t,n){return t=Ae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(e){var t=Le(e,"string");return"symbol"==typeof t?t:t+""}function Le(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ie{constructor(e){Ne(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}function xe(e,t,n){return t=ke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(e){var t=De(e,"string");return"symbol"==typeof t?t:t+""}function De(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class He{constructor(e,t){xe(this,"nodesPool",null),xe(this,"nodeType",void 0),xe(this,"rootNode",void 0),xe(this,"table",null),xe(this,"renderedNodes",0),this.nodesPool="string"===typeof e?new Ie(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}var Pe=n("8828");function je(e,t,n){return t=Fe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e){var t=Ye(e,"string");return"symbol"==typeof t?t:t+""}function Ye(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ue extends He{constructor(){super("TH"),je(this,"orderViews",new WeakMap),je(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Oe(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:n,rows:i,cells:s}=this.table;for(let o=0;o<e;o++){const e=this.table.renderedRowToSource(o),a=i.getRenderedNode(o);this.sourceRowIndex=e;const l=this.obtainOrderView(a),c=s.obtainOrderView(a);l.appendView(c).setSize(n).setOffset(this.table.renderedColumnToSource(0)).start();for(let i=0;i<n;i++){l.render();const n=l.getCurrentNode();n.className="",n.removeAttribute("style"),Object(r["removeAttribute"])(n,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&Object(r["setAttribute"])(n,[Object(Pe["D"])(),Object(Pe["G"])(),Object(Pe["f"])(i+1),Object(Pe["K"])(-1)]),t[i](e,n,i)}l.end()}}}class Ve extends He{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let n=this.rootNode.firstChild;if(e){const{columnsToRender:r}=this.table,i=r+t;for(let t=0,o=e;t<o;t++){n=this.rootNode.childNodes[t],n||(n=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(n)),this.renderedNodes=n.childNodes.length;while(this.renderedNodes<i)n.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;while(this.renderedNodes>i)n.removeChild(n.lastChild),this.renderedNodes-=1}const s=this.rootNode.childNodes.length;if(s>e)for(let t=e;t<s;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else n&&Object(r["empty"])(n)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Pe["C"])()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:n,rowHeadersCount:i}=this.table,s=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&Object(r["setAttribute"])(s,[Object(Pe["A"])(),Object(Pe["E"])(t+1)]);for(let o=-1*i;o<n;o+=1){const n=this.table.renderedColumnToSource(o),a=s.childNodes[o+i];a.className="",a.removeAttribute("style"),Object(r["removeAttribute"])(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&Object(r["setAttribute"])(a,[Object(Pe["f"])(o+1+this.table.rowHeadersCount),Object(Pe["K"])(-1),Object(Pe["g"])(),...o>=0?[Object(Pe["F"])()]:[Object(Pe["A"])()]]),e[t](n,a,t)}}}}var Be=n("67a87");let We=!1;class Ge extends He{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,n=e+t;while(this.renderedNodes<n)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;while(this.renderedNodes>n)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;!We&&e>1e3&&(We=!0,Object(u["b"])(Be["a"]`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
- Consider limiting the number of rendered columns by specifying the table width and/or\x20
- turning off the "renderAllColumns" option.`));for(let r=0;r<t;r++){const e=this.table.renderedColumnToSource(r),t=this.table.columnUtils.getHeaderWidth(e);this.rootNode.childNodes[r].style.width=t+"px"}for(let r=0;r<e;r++){const e=this.table.renderedColumnToSource(r),n=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[r+t].style.width=n+"px"}const n=this.rootNode.firstChild;n&&Object(r["addClass"])(n,"rowHeader")}}function ze(e,t,n){return t=Ke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ke(e){var t=Xe(e,"string");return"symbol"==typeof t?t:t+""}function Xe(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let $e=!1;class qe extends He{constructor(e){super("TR",e),ze(this,"orderView",void 0),this.orderView=new Re(e,e=>this.nodesPool.obtain(e),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!$e&&e>1e3&&($e=!0,Object(u["b"])(Be["a"]`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
- Consider limiting the number of rendered rows by specifying the table height and/or\x20
- turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Pe["C"])()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let i=0;i<e;i++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(i);var t,n;if(this.table.isAriaEnabled())Object(r["setAttribute"])(e,[Object(Pe["A"])(),Object(Pe["E"])(s+(null!==(t=null===(n=this.table.rowUtils)||void 0===n||null===(n=n.dataAccessObject)||void 0===n?void 0:n.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}function Je(e,t,n){return t=Qe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qe(e){var t=Ze(e,"string");return"symbol"==typeof t?t:t+""}function Ze(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class et extends He{constructor(){super("TD"),Je(this,"orderViews",new WeakMap),Je(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Oe(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:n,rowHeaders:i}=this.table;for(let a=0;a<e;a++){const e=this.table.renderedRowToSource(a),l=n.getRenderedNode(a);this.sourceRowIndex=e;const c=this.obtainOrderView(l),u=i.obtainOrderView(l);c.prependView(u).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<t;n++){c.render();const t=c.getCurrentNode(),i=this.table.renderedColumnToSource(n);var s,o;if(Object(r["hasClass"])(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),Object(r["removeAttribute"])(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,i,t),this.table.isAriaEnabled())Object(r["setAttribute"])(t,[...t.hasAttribute("role")?[]:[Object(Pe["l"])()],Object(Pe["K"])(-1),Object(Pe["f"])(i+(null!==(s=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.rowHeaders.length)&&void 0!==s?s:0)+1)])}c.end()}}}function tt(e,t,n){return t=nt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e){var t=rt(e,"string");return"symbol"==typeof t?t:t+""}function rt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class it{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};tt(this,"rootNode",void 0),tt(this,"rootDocument",void 0),tt(this,"rowHeaders",null),tt(this,"columnHeaders",null),tt(this,"colGroup",null),tt(this,"rows",null),tt(this,"cells",null),tt(this,"rowFilter",null),tt(this,"columnFilter",null),tt(this,"rowUtils",null),tt(this,"columnUtils",null),tt(this,"rowsToRender",0),tt(this,"columnsToRender",0),tt(this,"rowHeaderFunctions",[]),tt(this,"rowHeadersCount",0),tt(this,"columnHeaderFunctions",[]),tt(this,"columnHeadersCount",0),tt(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:n,rows:r,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),n.setTable(this),r.setTable(this),i.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=n,this.rows=r,this.cells=i}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){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();const{rowsToRender:e,rows:t}=this;for(let n=0;n<e;n++){const e=t.getRenderedNode(n);if(e.firstChild){const t=this.renderedRowToSource(n),r=this.rowUtils.getHeight(t);e.firstChild.style.height=r?r-1+"px":""}}}}class st{constructor(){let{TABLE:e,THEAD:t,COLGROUP:n,TBODY:r,rowUtils:i,columnUtils:s,cellRenderer:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new it(e,{cellRenderer:o}),this.renderer.setRenderers({rowHeaders:new Ue,columnHeaders:new Ve(t),colGroup:new Ge(n),rows:new qe(r),cells:new et}),this.renderer.setAxisUtils(i,s)}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}function ot(e,t,n){at(e,t),t.set(e,n)}function at(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lt(e,t,n){return t=ct(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e){var t=ut(e,"string");return"symbol"==typeof t?t:t+""}function ut(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ht(e,t){return e.get(mt(e,t))}function dt(e,t,n){return e.set(mt(e,t),n),n}function mt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,yt=new WeakMap,wt=new WeakMap;class bt{static get DEFAULT_WIDTH(){return 50}constructor(e){let{totalColumns:t,stretchMode:n,stretchingColumnWidthFn:r,columnWidthFn:i}=e;lt(this,"stretchAllRatio",0),lt(this,"stretchLastWidth",0),lt(this,"stretchAllColumnsWidth",[]),ot(this,ft,0),lt(this,"needVerifyLastColumnWidth",!0),ot(this,pt,()=>0),ot(this,gt,e=>e),ot(this,yt,e=>e),ot(this,wt,()=>"none"),dt(pt,this,t),dt(wt,this,n),dt(gt,this,null!==r&&void 0!==r?r:ht(gt,this)),dt(yt,this,null!==i&&void 0!==i?i:ht(yt,this))}refreshStretching(e){if("none"===ht(wt,this).call(this))return;dt(ft,this,e);let t=0;for(let r=0;r<ht(pt,this).call(this);r++){const n=this._getColumnWidth(r),i=ht(gt,this).call(this,void 0,r);"number"===typeof i?e-=i:t+=n}const n=e-t;if("all"===ht(wt,this).call(this)&&n>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===ht(wt,this).call(this)&&e!==1/0){const e=this._getColumnWidth(ht(pt,this).call(this)-1),t=n+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let n=null;return"all"===ht(wt,this).call(this)&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===ht(wt,this).call(this)&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}_getStretchedAllColumnWidth(e,t){let n=0;if(!this.stretchAllColumnsWidth[e]){const n=Math.round(t*this.stretchAllRatio),r=ht(gt,this).call(this,n,e);this.stretchAllColumnsWidth[e]=void 0===r?n:isNaN(r)?this._getColumnWidth(e):r}if(this.stretchAllColumnsWidth.length===ht(pt,this).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)n+=this.stretchAllColumnsWidth[e];n!==ht(ft,this)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=ht(ft,this)-n)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===ht(pt,this).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=ht(yt,this).call(this,e);return isNaN(t)&&(t=bt.DEFAULT_WIDTH),t}}function _t(e,t,n){return t=vt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vt(e){var t=St(e,"string");return"symbol"==typeof t?t:t+""}function St(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Et{constructor(e,t){_t(this,"dataAccessObject",void 0),_t(this,"wtSettings",void 0),_t(this,"headerWidths",new Map),_t(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new bt({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){let t=this.getWidth(e);const n=this.stretching.getStretchedColumnWidth(e,t);return n&&(t=n),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const n=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:n}=this.dataAccessObject,i=n?n.wtTable.holder:e.holder,s=i.offsetHeight<i.scrollHeight?Object(r["getScrollbarWidth"])():0;this.stretching.refreshStretching(t.getViewportWidth()-s)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!==t&&void 0!==t){const n=e.getSetting("rowHeaders").length,r=e.getSetting("defaultColumnWidth");for(let e=0;e<n;e++){let n=Array.isArray(t)?t[e]:t;n=null===n||void 0===n?r:n,this.headerWidths.set(e,n)}}}}function Ct(e,t,n){return t=Tt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tt(e){var t=Mt(e,"string");return"symbol"==typeof t?t:t+""}function Mt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Rt{constructor(e,t){Ct(this,"dataAccessObject",void 0),Ct(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const n=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}}const Ot="top",Nt="bottom",At="inline_start",Lt="top_inline_start_corner",It="bottom_inline_start_corner",xt=[Ot,Nt,At,Lt,It],kt=new Map([[Ot,"ht_clone_"+Ot],[Nt,"ht_clone_"+Nt],[At,`ht_clone_${At} ht_clone_left`],[Lt,`ht_clone_${Lt} ht_clone_top_left_corner`],[It,`ht_clone_${It} ht_clone_bottom_left_corner`]]);function Dt(e,t,n){return t=Ht(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e){var t=Pt(e,"string");return"symbol"==typeof t?t:t+""}function Pt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class jt{constructor(e,t,n,i,s){Dt(this,"wtSettings",null),Dt(this,"domBindings",void 0),Dt(this,"TBODY",null),Dt(this,"THEAD",null),Dt(this,"COLGROUP",null),Dt(this,"hasTableHeight",!0),Dt(this,"hasTableWidth",!0),Dt(this,"isTableVisible",!1),Dt(this,"tableOffset",0),Dt(this,"holderOffset",0),this.domBindings=n,this.isMaster="master"===s,this.name=s,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=i,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=n.rootTable,Object(r["removeTextNodes"])(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const o=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(o)),this.rowUtils=new Rt(this.dataAccessObject,this.wtSettings),this.columnUtils=new Et(this.dataAccessObject,this.wtSettings),this.tableRenderer=new st({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtSpreader",t&&t.insertBefore(n,e),n.appendChild(e)),n.style.position="relative",this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Pe["x"])()]),n}createHider(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Pe["x"])()]),n}createHolder(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.style.position="relative",n.className="wtHolder",t&&t.insertBefore(n,e),this.isMaster&&(n.parentNode.className+="ht_master handsontable",n.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n.parentNode,[Object(Pe["x"])()])),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Pe["x"])()]),n}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:n,wtViewport:i}=this.dataAccessObject,s=t.getSetting("totalRows"),o=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),l=a.length,c=t.getSetting("columnHeaders"),u=c.length;let h=!1,d=e;if(this.isMaster&&(this.holderOffset=Object(r["offset"])(this.holder),d=i.createRenderCalculators(d),l&&!t.getSetting("fixedColumnsStart"))){const e=n.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(d=!1)}if(this.isMaster&&(h=n.updateStateOfRendering()),d)this.isMaster&&(i.createVisibleCalculators(),i.createPartiallyVisibleCalculators()),n&&n.refresh(!0);else{this.isMaster?this.tableOffset=Object(r["offset"])(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=o>0?this.getFirstRenderedColumn():0;this.rowFilter=new de(e,s,u),this.columnFilter=new ae(t,o,l);let n=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),n=!0!==e.skipRender}if(n){let e;if(this.tableRenderer.setHeaderContentRenderers(a,c),(this.is(Nt)||this.is(It))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(Nt))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtViewport.createPartiallyVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=Object(r["outerWidth"])(this.hider),n=Object(r["outerWidth"])(this.TABLE);0!==t&&n!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(Nt)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&(m=n.bottomOverlay.resetFixedPosition()||m),m=n.inlineStartOverlay.resetFixedPosition()||m,n.topInlineStartCornerOverlay&&n.topInlineStartCornerOverlay.resetFixedPosition(),n.bottomInlineStartCornerOverlay&&n.bottomInlineStartCornerOverlay.clone&&n.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(n.refreshAll(),n.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(d),h&&n.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let n=this.wtSettings.getSetting("columnHeaders").length;const i=this.wtSettings.getSetting("defaultRowHeight");let s,o,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];while(n)n-=1,s=this.getColumnHeaderHeight(n),o=this.getColumnHeader(t,n),o&&(a=Object(r["innerHeight"])(o),(!s&&i<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=a),Array.isArray(l)?null!==l[n]&&void 0!==l[n]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l[n]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]<(l[n]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l[n]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,n=this.dataAccessObject.wtViewport.oversizedColumnHeaders,r=e.getSetting("columnHeaders");for(let i=0,s=r.length;i<s;i++)if(n[i]){if(!t[i]||0===t[i].childNodes.length)return;t[i].childNodes[0].style.height=n[i]+"px"}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(Nt))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let n=0;n<e;n++){const e=this.rowFilter.renderedToSource(n);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,n=e.col;const r=this.wtSettings.getSetting("onModifyGetCellCoords",t,n);if(r&&Array.isArray(r)&&([t,n]=r),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(n))return-3;if(this.isColumnAfterRenderedColumns(n))return-4;const i=this.getRow(t);if(!i&&t>=0)throw new Error("TR was expected to be rendered but is not");const s=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];if(!s&&n>=0)throw new Error("TD or TH was expected to be rendered but is not");return s}getRow(e){let t=null,n=null;var r,i;e<0?(t=null===(r=this.rowFilter)||void 0===r?void 0:r.sourceRowToVisibleColHeadedRow(e),n=this.THEAD):(t=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(e),n=this.TBODY);return void 0!==t&&void 0!==n&&(!(n.childNodes.length<t+1)&&n.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.THEAD.childNodes[t];return null===n||void 0===n?void 0:n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],n=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach(e=>{const r=e.childNodes[n];r&&t.push(r)}),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.wtSettings.getSetting("rowHeaders").length;if(t>=n)return;const r=this.rowFilter.sourceToRendered(e),i=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=r<0?this.THEAD:this.TBODY,o=s.childNodes[i];return null===o||void 0===o?void 0:o.childNodes[t]}getRowHeaders(e){const t=[],n=this.wtSettings.getSetting("rowHeaders").length;for(let r=0;r<n;r++){const n=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null===n||void 0===n?void 0:n.childNodes[r];i&&t.push(i)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=Object(r["closest"])(t,["TD","TH"])),null===t)return null;const n=t.parentNode,i=n.parentNode;let s=Object(r["index"])(n),o=t.cellIndex;if(Object(r["overlayContainsElement"])(Lt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Ot,t,this.wtRootElement))"THEAD"===i.nodeName&&(s-=i.childNodes.length);else if(Object(r["overlayContainsElement"])(It,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Nt,t,this.wtRootElement)){const e=this.wtSettings.getSetting("totalRows");s=e-i.childNodes.length+s}else s=i===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return o=Object(r["overlayContainsElement"])(Lt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(At,t,this.wtRootElement)||Object(r["overlayContainsElement"])(It,t,this.wtRootElement)?this.columnFilter.offsettedTH(o):this.columnFilter.visibleRowHeadedColumnToSourceColumn(o),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=e*this.wtSettings.getSetting("defaultRowHeight"),n=Object(r["innerHeight"])(this.TBODY)-1;let i,s,o,a,l;if(t!==n||this.wtSettings.getSetting("fixedRowsBottom"))while(e)e-=1,o=this.rowFilter.renderedToSource(e),i=this.getRowHeight(o),a=this.getTrForRow(o),l=a.querySelector("th"),s=l?Object(r["innerHeight"])(l):Object(r["innerHeight"])(a)-1,(!i&&this.wtSettings.getSetting("defaultRowHeight")<s||i<s)&&(s+=1,this.dataAccessObject.wtViewport.oversizedRows[o]=s)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders"),n=t.length;return Math.abs(e)<=n}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders"),n=t.length;return Math.abs(e)<=n}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return Object(r["outerWidth"])(this.TABLE)}getHeight(){return Object(r["outerHeight"])(this.TABLE)}getTotalWidth(){const e=Object(r["outerWidth"])(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=Object(r["outerHeight"])(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return Object(r["isVisible"])(this.TABLE)}_modifyRowHeaderWidth(e){let t=Object(i["isFunction"])(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!==typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}var Ft=jt;const Yt="stickyRowsTop",Ut={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows");return 0===e?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Object(c["defineGetter"])(Ut,"MIXIN_NAME",Yt,{writable:!1,enumerable:!1});var Vt=Ut;const Bt="calculatedColumns",Wt={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Object(c["defineGetter"])(Wt,"MIXIN_NAME",Bt,{writable:!1,enumerable:!1});var Gt=Wt;class zt extends Ft{constructor(e,t,n,r){super(e,t,n,r,Ot)}}Object(c["mixin"])(zt,Vt),Object(c["mixin"])(zt,Gt);var Kt=zt;function Xt(e,t){$t(e,t),t.add(e)}function $t(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qt(e,t,n){return t=Jt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jt(e){var t=Qt(e,"string");return"symbol"==typeof t?t:t+""}function Qt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Zt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var en=new WeakSet;class tn{constructor(e){Xt(this,en),qt(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,n,r,i){const s=this.scrollViewportHorizontally(e.col,n,i),o=this.scrollViewportVertically(e.row,t,r);return s||o}scrollViewportHorizontally(e,t,n){const{drawn:r,totalColumns:i}=this.dataAccessObject;if(!r||!Number.isInteger(e)||e<0||e>i)return!1;const s=void 0===t&&void 0===n,{fixedColumnsStart:o,inlineStartOverlay:a}=this.dataAccessObject;if(s&&e<o)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>i)return!1;const l=this.getFirstVisibleColumn(),c=this.getLastVisibleColumn();let u=!1;return(s&&(e<l||e>c)||!s)&&(u=a.scrollTo(e,s?e>=this.getLastPartiallyVisibleColumn():t)),u}scrollViewportVertically(e,t,n){const{drawn:r,totalRows:i}=this.dataAccessObject;if(!r||!Number.isInteger(e)||e<0||e>i)return!1;const s=void 0===t&&void 0===n,{fixedRowsBottom:o,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject;if(s&&(e<a||e>i-o-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>i)return!1;const c=this.getFirstVisibleRow(),u=this.getLastVisibleRow();let h=!1;return(s&&(e<c||e>u)||!s)&&(h=l.scrollTo(e,s?e>=this.getLastPartiallyVisibleRow():n)),h}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return Zt(en,this,rn).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return Zt(en,this,rn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return Zt(en,this,nn).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return Zt(en,this,nn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}function nn(e){const{wtSettings:t,inlineStartOverlay:n,wtTable:i,wtViewport:s,totalColumns:o,rootWindow:a}=this.dataAccessObject;if(n.mainTableScrollableElement===a){const l=t.getSetting("rtlMode");let c=null;if(l){const e=i.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document,n=t.documentElement.offsetWidth;c=Math.abs(e.right-n)}else{const e=Object(r["offset"])(i.wtRootElement);c=e.left}const u=Math.abs(Object(r["getScrollLeft"])(a,a));if(c>u){const t=Object(r["innerWidth"])(a);let i=s.getRowHeaderWidth();for(let r=1;r<=o;r++)if(i+=n.sumCellSizes(r-1,r),c+i-u>=t){e=r-2;break}}}return e}function rn(e){const{topOverlay:t,wtTable:n,wtViewport:i,totalRows:s,rootWindow:o}=this.dataAccessObject;if(t.mainTableScrollableElement===o){const a=Object(r["offset"])(n.wtRootElement),l=Object(r["getScrollTop"])(o,o);if(a.top>l){const n=Object(r["innerHeight"])(o);let c=i.getColumnHeaderHeight();for(let r=1;r<=s;r++)if(c+=t.sumCellSizes(r-1,r),a.top+c-l>=n){e=r-2;break}}}return e}var sn=tn,on=n("0716"),an=n("d852");function ln(e,t,n){return t=cn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e){var t=un(e,"string");return"symbol"==typeof t?t:t+""}function un(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class hn{get eventManager(){return new l["a"](this)}constructor(e,t){ln(this,"wtTable",void 0),ln(this,"wtScroll",void 0),ln(this,"wtViewport",void 0),ln(this,"wtOverlays",void 0),ln(this,"selectionManager",void 0),ln(this,"wtEvent",void 0),ln(this,"guid","wt_"+Object(D["randomString"])()),ln(this,"drawInterrupted",!1),ln(this,"drawn",!1),ln(this,"domBindings",void 0),ln(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new sn(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,n=this.wtTable.THEAD.childNodes[0].childNodes.length;t<n;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,n){Object(r["fastInnerText"])(n,e[t])}])}}createCellCoords(e,t){return new on["a"](e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,n){return new an["a"](e,t,n,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.wtTable.getCell(e);const n=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsTop"),i=this.wtSettings.getSetting("fixedRowsBottom"),s=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<r&&e.col<s)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<r)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<s&&e.row>=n-i){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<s)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<n&&e.row>=n-i&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,n,r,i){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,n)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}function dn(e,t,n){return t=mn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mn(e){var t=fn(e,"string");return"symbol"==typeof t?t:t+""}function fn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class pn extends hn{constructor(e,t,n){super(e,t),dn(this,"cloneSource",void 0),dn(this,"cloneOverlay",void 0);const r=this.wtSettings.getSetting("facade",this);this.cloneSource=n.source,this.cloneOverlay=n.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),r,this.domBindings,this.wtSettings),this.wtViewport=n.viewport,this.selectionManager=n.selectionManager,this.wtEvent=new te(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}function gn(e,t,n){return t=yn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yn(e){var t=wn(e,"string");return"symbol"==typeof t?t:t+""}function wn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class bn{constructor(e,t,n,i,s){gn(this,"wtSettings",null),Object(c["defineGetter"])(this,"wot",e,{writable:!1}),this.domBindings=s,this.facadeGetter=t,this.wtSettings=i;const{TABLE:o,hider:a,spreader:l,holder:u,wtRootElement:h}=this.wot.wtTable;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=o,this.hider=a,this.spreader=l,this.holder=u,this.wtRootElement=h,this.trimmingContainer=Object(r["getTrimmingContainer"])(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=Object(r["getTrimmingContainer"])(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE)}getRelativeCellPosition(e,t,n){if(!1===this.clone.wtTable.holder.contains(e))return void Object(u["b"])(`The provided element is not a child of the ${this.type} overlay`);const r=this.mainTableScrollableElement===this.domBindings.rootWindow,i=n<this.wtSettings.getSetting("fixedColumnsStart"),s=t<this.wtSettings.getSetting("fixedRowsTop"),o=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,l={start:this.getRelativeStartPosition(a),top:a.offsetTop},c={start:this.getRelativeStartPosition(e),top:e.offsetTop};let h=null;return h=r?this.getRelativeCellPositionWithinWindow(s,i,c,l):this.getRelativeCellPositionWithinHolder(s,o,i,c,l),h}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,n,i){const s=this.wot.wtTable.wtRootElement.getBoundingClientRect();let o=0,a=0;if(t){let e=s.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(s.left+s.width+Object(r["getScrollbarWidth"])())),o=e<=0?-1*e:0}else o=i.start;if(e){const e=this.clone.wtTable.TABLE.getBoundingClientRect();a=e.top-s.top}else a=i.top;return{start:n.start+o,top:n.top+a}}getRelativeCellPositionWithinHolder(e,t,n,r,i){const s={horizontal:this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),vertical:this.wot.wtOverlays.topOverlay.getScrollPosition()};let o=0,a=0;if(n||(o=s.horizontal-i.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect(),t=this.clone.wtTable.TABLE.getBoundingClientRect();a=-1*t.top+e.top}else e||(a=s.vertical-i.top);return{start:r.start-o,top:r.top-a}}makeClone(){if(-1===xt.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:n,rootWindow:i}=this.domBindings,s=n.createElement("div"),o=n.createElement("table"),a=e.wtRootElement.parentNode;s.className=kt.get(this.type)+" handsontable",s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,t.getSetting("ariaTags")&&Object(r["setAttribute"])(s,[Object(Pe["x"])()]),o.className=e.TABLE.className;const l=e.TABLE.getAttribute("role");l&&o.setAttribute("role",e.TABLE.getAttribute("role")),s.appendChild(o),a.appendChild(s);const c=this.wtSettings.getSetting("preventOverflow");return!0===c||"horizontal"===c&&this.type===Ot||"vertical"===c&&this.type===At?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE),new pn(o,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,i=e.parentNode.style;Object(N["arrayEach"])([n,r,i],e=>{e.width="",e.height=""})}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}const _n=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});function vn(e,t,n){return t=Sn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sn(e){var t=En(e,"string");return"symbol"==typeof t?t:t+""}function En(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Cn extends bn{constructor(e,t,n,r){super(e,t,Ot,n,r),vn(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Kt(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,n=this.wtSettings.getSetting("preventOverflow");let i=0,s=!1;if(this.trimmingContainer!==t||n&&"vertical"===n)i=this.getScrollPosition(),Object(r["resetCssTransform"])(e);else{const{wtTable:t}=this.wot,n=t.hider.getBoundingClientRect(),o=Math.ceil(n.bottom),a=e.offsetHeight;s=o===a,i=this.getOverlayOffset(),Object(r["setOverlayPosition"])(e,"0px",i+"px")}const o=this.adjustHeaderBordersPosition(i,s);return this.adjustElementsSize(),o}setScrollPosition(e){const t=this.domBindings.rootWindow;let n=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo(Object(r["getWindowScrollLeft"])(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultRowHeight");let r=e,i=0;while(r<t){const e=this.wot.wtTable.getRowHeight(r);i+=void 0===e?n:e,r+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:n}=this.domBindings,i=Object(r["getScrollbarWidth"])(t),s=this.clone.wtTable.holder.parentNode,o=s.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"horizontal"===a){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=i),t=Math.min(t,e.wtRootElement.scrollWidth),o.width=t+"px"}else o.width="";this.clone.wtTable.holder.style.width=o.width;let l=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),o.height=l+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(_n.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=parseInt(e.parentNode.style.height,10)+t+"px"}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=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()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":t.style[e]=""}scrollTo(e,t){const{wot:n,wtSettings:i}=this,s=n.cloneSource?n.cloneSource:n,o=s.wtTable.holder,a=i.getSetting("columnHeaders"),l=i.getSetting("fixedRowsTop"),c=0===l&&a.length>0&&!Object(r["hasClass"])(o.parentNode,"innerBorderTop")?1:0;let u=this.getTableParentOffset(),h=0;if(t){const n=this.wot.wtTable.getRowHeight(e),r=this.wot.wtViewport.getViewportHeight();n>r&&(t=!1)}if(t&&o.offsetHeight!==o.clientHeight&&(h=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t){const t=i.getSetting("fixedRowsBottom"),r=i.getSetting("totalRows");u+=this.sumCellSizes(0,e+1),u-=n.wtViewport.getViewportHeight()-this.sumCellSizes(r-t,r),u+=1,u+=c}else u+=this.sumCellSizes(i.getSetting("fixedRowsTop"),e);return u+=h,Object(r["getMaximumScrollTop"])(this.mainTableScrollableElement)===u-c&&c>0&&this.wot.wtOverlays.expandHiderVerticallyBy(c),this.setScrollPosition(u)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Object(r["getScrollTop"])(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=this.clone.wtTable.getTotalHeight(),r=e-t;n=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.wot.wtTable.holder.parentNode,i=this.wtSettings.getSetting("totalColumns");i?Object(r["removeClass"])(n,"emptyColumns"):Object(r["addClass"])(n,"emptyColumns");let s=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==t,o=this.wtSettings.getSetting("columnHeaders");if((i||0===t)&&o.length>0){const t=Object(r["hasClass"])(n,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?(Object(r["addClass"])(n,"innerBorderTop"),s=!t):(Object(r["removeClass"])(n,"innerBorderTop"),s=t)}}return s}}const Tn="stickyRowsBottom",Mn={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),n=e-t;return 0===e||0===t?-1:n<0?0:n},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return 0}};Object(c["defineGetter"])(Mn,"MIXIN_NAME",Tn,{writable:!1,enumerable:!1});var Rn=Mn;class On extends Ft{constructor(e,t,n,r){super(e,t,n,r,Nt)}}Object(c["mixin"])(On,Rn),Object(c["mixin"])(On,Gt);var Nn=On;function An(e,t,n){return t=Ln(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e){var t=In(e,"string");return"symbol"==typeof t?t:t+""}function In(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class xn extends bn{constructor(e,t,n,r){super(e,t,Nt,n,r),An(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Nn(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let n=0;const r=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||r&&"vertical"===r?(n=this.getScrollPosition(),this.repositionOverlay()):(n=this.getOverlayOffset(),t.style.bottom=n+"px");const i=this.adjustHeaderBordersPosition(n);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=Object(r["getScrollbarWidth"])(n)),i.style.bottom=s+"px"}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;return this.mainTableScrollableElement===t?(t.scrollTo(Object(r["getWindowScrollLeft"])(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:n,wtSettings:r}=this.wot,i=r.getSetting("defaultRowHeight");let s=e,o=0;while(s<t){const e=n.getRowHeight(s);o+=void 0===e?i:e,s+=1}return o}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n,rootWindow:i}=this.domBindings,s=Object(r["getScrollbarWidth"])(n),o=this.clone.wtTable.holder.parentNode,a=o.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||"horizontal"===l){let n=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(n-=s),n=Math.min(n,e.wtRootElement.scrollWidth),a.width=n+"px"}else a.width="";this.clone.wtTable.holder.style.width=a.width;let c=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(c=0),a.height=c+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=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()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":t.style[e]=""}scrollTo(e,t){let n=this.getTableParentOffset();const i=this.wot.cloneSource?this.wot.cloneSource:this.wot,s=i.wtTable.holder;let o=0;t&&s.offsetHeight!==s.clientHeight&&(o=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),n+=o,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Object(r["getScrollTop"])(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=this.clone.wtTable.getTotalHeight(),r=e-t,i=this.domBindings.rootDocument.documentElement.clientHeight;n=Math.max(this.getTableParentOffset()-this.getScrollPosition()-i+e,0),n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),n=this.cachedFixedRowsBottom!==t,i=this.wtSettings.getSetting("columnHeaders");let s=!1;if((n||0===t)&&i.length>0){const t=this.wot.wtTable.holder.parentNode,n=Object(r["hasClass"])(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?(Object(r["addClass"])(t,"innerBorderBottom"),s=!n):(Object(r["removeClass"])(t,"innerBorderBottom"),s=n)}return s}}const kn="calculatedRows",Dn={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Object(c["defineGetter"])(Dn,"MIXIN_NAME",kn,{writable:!1,enumerable:!1});var Hn=Dn;const Pn="stickyColumnsStart",jn={getFirstRenderedColumn(){const e=this.wtSettings.getSetting("totalColumns");return 0===e?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Object(c["defineGetter"])(jn,"MIXIN_NAME",Pn,{writable:!1,enumerable:!1});var Fn=jn;class Yn extends Ft{constructor(e,t,n,r){super(e,t,n,r,At)}}Object(c["mixin"])(Yn,Hn),Object(c["mixin"])(Yn,Fn);var Un=Yn;class Vn extends bn{constructor(e,t,n,r){super(e,t,At,n,r)}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Un(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,n=this.clone.wtTable.holder.parentNode,i=this.wtSettings.getSetting("preventOverflow");let s=0;this.trimmingContainer!==t||i&&"horizontal"===i?(s=this.getScrollPosition(),Object(r["resetCssTransform"])(n)):(s=this.getOverlayOffset()*(this.isRtl()?-1:1),Object(r["setOverlayPosition"])(n,s+"px","0px"));const o=this.adjustHeaderBordersPosition(s);return this.adjustElementsSize(),o}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,Object(r["getWindowScrollTop"])(t)),n=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultColumnWidth");let r=e,i=0;while(r<t)i+=this.wot.wtTable.getStretchedColumnWidth(r)||n,r+=1;return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:n}=this.domBindings,i=Object(r["getScrollbarWidth"])(t),s=this.clone.wtTable.holder.parentNode,o=s.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"vertical"===a){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=i),t=Math.min(t,e.wtRootElement.scrollHeight),o.height=t+"px"}else o.height="";this.clone.wtTable.holder.style.height=o.height;const l=Object(r["outerWidth"])(this.clone.wtTable.TABLE);o.width=l+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(_n.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=parseInt(e.parentNode.style.width,10)+t+"px"}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){const{wtSettings:n}=this,i=n.getSetting("rowHeaders"),s=n.getSetting("fixedColumnsStart"),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,a=o.wtTable.holder,l=0===s&&i.length>0&&!Object(r["hasClass"])(a.parentNode,"innerBorderInlineStart")?1:0;let c=this.getTableParentOffset(),u=0;if(t){const n=this.wot.wtTable.getColumnWidth(e),r=this.wot.wtViewport.getViewportWidth();n>r&&(t=!1)}return t&&a.offsetWidth!==a.clientWidth&&(u=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(c+=this.sumCellSizes(0,e+1),c-=this.wot.wtViewport.getViewportWidth(),c+=l):c+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),c+=u,Object(r["getMaximumScrollLeft"])(this.mainTableScrollableElement)===c-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(c)}getTableParentOffset(){const e=this.wtSettings.getSetting("preventOverflow");let t=0;return e||this.trimmingContainer!==this.domBindings.rootWindow||(t=this.wot.wtTable.holderOffset.left),t}getScrollPosition(){return Math.abs(Object(r["getScrollLeft"])(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){n=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);const e=this.wot.wtTable.getTotalWidth(),t=this.clone.wtTable.getTotalWidth(),r=e-t;n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,n=this.wtSettings.getSetting("rowHeaders"),i=this.wtSettings.getSetting("fixedColumnsStart"),s=this.wtSettings.getSetting("totalRows");s?Object(r["removeClass"])(t,"emptyRows"):Object(r["addClass"])(t,"emptyRows");let o=!1;if(i&&!n.length)Object(r["addClass"])(t,"innerBorderLeft innerBorderInlineStart");else if(!i&&n.length){const n=Object(r["hasClass"])(t,"innerBorderInlineStart");e?(Object(r["addClass"])(t,"innerBorderLeft innerBorderInlineStart"),o=!n):(Object(r["removeClass"])(t,"innerBorderLeft innerBorderInlineStart"),o=n)}return o}}class Bn extends Ft{constructor(e,t,n,r){super(e,t,n,r,Lt)}}Object(c["mixin"])(Bn,Vt),Object(c["mixin"])(Bn,Fn);var Wn=Bn;function Gn(e,t,n){return t=zn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zn(e){var t=Kn(e,"string");return"symbol"==typeof t?t:t+""}function Kn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Xn extends bn{constructor(e,t,n,r,i,s){super(e,t,Lt,n,r),Gn(this,"topOverlay",void 0),Gn(this,"inlineStartOverlay",void 0),this.topOverlay=i,this.inlineStartOverlay=s}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Wn(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),n=this.topOverlay.getOverlayOffset();Object(r["setOverlayPosition"])(e,t+"px",n+"px")}else Object(r["resetCssTransform"])(e);let t=Object(r["outerHeight"])(this.clone.wtTable.TABLE);const n=Object(r["outerWidth"])(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=t+"px",e.style.width=n+"px",!1}}class $n extends Ft{constructor(e,t,n,r){super(e,t,n,r,It)}}Object(c["mixin"])($n,Rn),Object(c["mixin"])($n,Fn);var qn=$n;class Jn extends bn{constructor(e,t,n,r,i,s){super(e,t,It,n,r),this.bottomOverlay=i,this.inlineStartOverlay=s}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new qn(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),n=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=e+"px",t.style.bottom=n+"px"}else Object(r["resetCssTransform"])(t),this.repositionOverlay();let n=Object(r["outerHeight"])(this.clone.wtTable.TABLE);const i=Object(r["outerWidth"])(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(n=0),t.style.height=n+"px",t.style.width=i+"px",!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=Object(r["getScrollbarWidth"])(n)),i.style.bottom=s+"px"}}function Qn(e,t,n){return t=Zn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zn(e){var t=er(e,"string");return"symbol"==typeof t?t:t+""}function er(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class tr{constructor(e,t,n,i,s,o){Qn(this,"wot",null),Qn(this,"topOverlay",null),Qn(this,"bottomOverlay",null),Qn(this,"inlineStartOverlay",null),Qn(this,"topInlineStartCornerOverlay",null),Qn(this,"bottomInlineStartCornerOverlay",null),Qn(this,"browserLineHeight",void 0),Qn(this,"wtSettings",null),Qn(this,"resizeObserver",new ResizeObserver(e=>{Object(j["requestAnimationFrame"])(()=>{Array.isArray(e)&&e.length&&this.wtSettings.getSetting("onContainerElementResize")})})),this.wot=e,this.wtSettings=i,this.domBindings=n,this.facadeGetter=t,this.wtTable=o;const{rootDocument:a,rootWindow:l}=this.domBindings;this.instance=this.wot,this.eventManager=s,this.scrollbarSize=Object(r["getScrollbarWidth"])(a);const c="hidden"===l.getComputedStyle(o.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=c?o.holder:Object(r["getScrollableElement"])(o.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=l.scrollX,this.lastScrollY=l.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,n=e.getComputedStyle(t.body),r=parseInt(n.lineHeight,10),i=1.2*parseInt(n.fontSize,10);this.browserLineHeight=r||i}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new Cn(...e),this.bottomOverlay=new xn(...e),this.inlineStartOverlay=new Vn(...e),this.topInlineStartCornerOverlay=new Xn(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new Jn(...e,this.bottomOverlay,this.inlineStartOverlay)}updateStateOfRendering(){let e=this.topOverlay.updateStateOfRendering();return e=this.bottomOverlay.updateStateOfRendering()||e,e=this.inlineStartOverlay.updateStateOfRendering()||e,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(e=this.topInlineStartCornerOverlay.updateStateOfRendering()||e),this.bottomOverlay.needFullRender&&(e=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||e)),e}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:n}=this.topOverlay,{mainTableScrollableElement:r}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",e=>this.onKeyDown(e)),this.eventManager.addEventListener(e.documentElement,"keyup",()=>this.onKeyUp()),this.eventManager.addEventListener(e,"visibilitychange",()=>this.onKeyUp()),this.eventManager.addEventListener(n,"scroll",e=>this.onTableScroll(e),{passive:!0}),n!==r&&this.eventManager.addEventListener(r,"scroll",e=>this.onTableScroll(e),{passive:!0});const i=t.devicePixelRatio&&t.devicePixelRatio>1,s=this.scrollableElement===t,a=this.wtSettings.getSetting("preventWheel"),l={passive:s};(a||i||!Object(o["isChrome"])())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",e=>this.onCloneWheel(e,a),l);const c=[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let u;c.forEach(e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",e=>this.onCloneWheel(e,a),l)}}),this.eventManager.addEventListener(t,"resize",()=>{clearTimeout(u),u=setTimeout(()=>{this.wtSettings.getSetting("onWindowResize")},200)}),s||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,n=this.inlineStartOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,i=e.target;this.keyPressed&&(r!==t&&i!==t&&!e.target.contains(r)||n!==t&&i!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:n}=this.domBindings,r=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,s=e.target,o=i!==n&&s!==n&&!s.contains(i),a=r!==n&&s!==n&&!s.contains(r);if(this.keyPressed&&(o||a))return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=Object(ne["isKey"])(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,n=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(n+=n*this.browserLineHeight,t+=t*this.browserLineHeight);const r=this.scrollVertically(t),i=this.scrollHorizontally(n);return r||i}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,n=this.inlineStartOverlay.clone.wtTable.holder,[r,i]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==r||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=r;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=r)}this.verticalScrolling&&(n.scrollTop=i),this.refreshAll()}syncScrollWithMaster(){const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:n}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=n)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=Object(r["getScrollableElement"])(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.updateLastSpreaderSize();t&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,n=e.clientHeight,r=t!==this.spreaderLastSize.width||n!==this.spreaderLastSize.height;return r&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=n),r}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtViewport:t}=this.wot,{wtTable:n}=this,{rootWindow:r}=this.domBindings,i=this.scrollableElement===r,s=this.wtSettings.getSetting("totalColumns"),o=this.wtSettings.getSetting("totalRows"),a=t.getRowHeaderWidth(),l=t.getColumnHeaderHeight(),c=l+this.topOverlay.sumCellSizes(0,o)+1,u=a+this.inlineStartOverlay.sumCellSizes(0,s),h=n.hider,d=h.style,m=()=>!i&&this.scrollableElement.scrollTop>Math.max(0,c-n.holder.clientHeight),f=()=>!i&&this.scrollableElement.scrollLeft>Math.max(0,u-n.holder.clientWidth),p=m()?1:0,g=f()?1:0;if(d.width=u+g+"px",d.height=c+p+"px",this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:t}=n.wtRootElement,{scrollHeight:r,scrollWidth:i}=n.holder;this.hasScrollbarRight=e<r,this.hasScrollbarBottom=t<i,this.hasScrollbarRight&&n.hider.scrollWidth+this.scrollbarSize>t?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&n.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.inlineStartOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}expandHiderVerticallyBy(e){const{wtTable:t}=this;t.hider.style.height=parseInt(t.hider.style.height,10)+e+"px"}expandHiderHorizontallyBy(e){const{wtTable:t}=this;t.hider.style.width=parseInt(t.hider.style.width,10)+e+"px"}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let n=null;return Object(N["arrayEach"])(t,t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)}),n}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];Object(N["arrayEach"])(t,t=>{t&&(t.clone.wtTable.TABLE.className=e.className)})}}var nr=tr;function rr(e,t,n){return t=ir(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ir(e){var t=sr(e,"string");return"symbol"==typeof t?t:t+""}function sr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class or{constructor(e){rr(this,"settings",{}),rr(this,"defaults",Object.freeze(this.getDefaults())),Object(c["objectEach"])(this.defaults,(t,n)=>{if(void 0!==e[n])this.settings[n]=e[n];else{if(void 0===t)throw new Error(`A required setting "${n}" was not provided`);this.settings[n]=t}})}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow(){return!1},preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders(){return[]},columnHeaders(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,n)=>{const i=this.getSetting("data",e,t);Object(r["fastInnerText"])(n,void 0===i||null===i?"":i)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?Object(c["objectEach"])(e,(e,t)=>{this.settings[t]=e}):this.settings[e]=t,this}getSetting(e,t,n,r,i){return"function"===typeof this.settings[e]?this.settings[e](t,n,r,i):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}class ar extends Ft{constructor(e,t,n,r){super(e,t,n,r,"master")}alignOverlaysWithTrimmingContainer(){const e=Object(r["getTrimmingContainer"])(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){const e=this.wtSettings.getSetting("preventOverflow");e||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const n=e.parentElement,i=Object(r["getStyle"])(e,"height",t),s=Object(r["getStyle"])(e,"overflow",t),o=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let c=e.offsetWidth,u=e.offsetHeight;const h=["auto","hidden","scroll"];if(n&&h.includes(s)){const i=e.cloneNode(!1);i.style.overflow="auto",i.style.position="absolute",e.nextElementSibling?n.insertBefore(i,e.nextElementSibling):n.appendChild(i);const s=parseInt(Object(r["getComputedStyle"])(i,t).height,10);n.removeChild(i),0===s&&(u=0)}u=Math.min(u,l),o.height="auto"===i?"auto":u+"px",c=Math.min(c,a),o.width=c+"px",o.overflow="",this.hasTableHeight="auto"===o.height||u>0,this.hasTableWidth=c>0}this.isTableVisible=Object(r["isVisible"])(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,n="master",r=e.getSetting("columnHeaders"),i=r.length;if(i&&!t.hasOversizedColumnHeadersMarked[n]){const r=e.getSetting("rowHeaders"),s=r.length,o=this.getRenderedColumnsCount();for(let e=0;e<i;e++)for(let t=-1*s;t<o;t++)this.markIfOversizedColumnHeader(t);t.hasOversizedColumnHeadersMarked[n]=!0}}}Object(c["mixin"])(ar,Hn),Object(c["mixin"])(ar,Gt);var lr=ar,cr=n("a6de");function ur(e,t,n){return t=hr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hr(e){var t=dr(e,"string");return"symbol"==typeof t?t:t+""}function dr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class mr{constructor(e){ur(this,"count",0),ur(this,"startRow",0),ur(this,"endRow",0),ur(this,"startPosition",0),this.count=e.totalRows,this.endRow=this.count-1}}var fr=n("eb36");function pr(e,t,n){return t=gr(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gr(e){var t=yr(e,"string");return"symbol"==typeof t?t:t+""}function yr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class wr{constructor(e){pr(this,"count",0),pr(this,"startColumn",0),pr(this,"endColumn",0),pr(this,"startPosition",0),this.count=e.totalColumns,this.endColumn=this.count-1}}var br=n("861dd");class _r{constructor(e,t,n,r,i){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=n,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=r,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight()})}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let n=0;if(t===this.domBindings.rootWindow)n=e.documentElement.clientHeight;else{const e=Object(r["outerHeight"])(t);n=e>0&&t.clientHeight>0?t.clientHeight:1/0}return n}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:n}=this.domBindings,i=this.dataAccessObject.inlineStartOverlayTrimmingContainer,s=t.documentElement.offsetWidth,o=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),c=this.wtTable.TABLE.getBoundingClientRect(),u=l?c.right-s:c.left,h=s-u;let d,m;if(a)return Object(r["outerWidth"])(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(h,s):Math.min(this.getContainerFillWidth(),h,s),i===n&&o>0&&this.sumColumnWidths(0,o-1)>d)return t.documentElement.clientWidth;if(i!==n&&(m=Object(r["getStyle"])(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",n),"scroll"===m||"hidden"===m||"auto"===m))return Math.max(d,i.clientWidth);const f=e.getSetting("stretchH");return"none"!==f&&f?d:Math.max(d,Object(r["outerWidth"])(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let n=0,r=e;while(r<t)n+=this.wtTable.getColumnWidth(r),r+=1;return n}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const n=t.offsetWidth;return this.containerWidth=n,e.removeChild(t),n}getWorkspaceOffset(){return Object(r["offset"])(this.wtTable.TABLE)}getColumnHeaderHeight(){const e=this.wtSettings.getSetting("columnHeaders");return e.length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Object(r["outerHeight"])(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let n=0,r=t.length;n<r;n++)this.rowHeaderWidth+=e[n]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let n=0,i=t.length;n<i;n++)e?(this.rowHeaderWidth+=Object(r["outerWidth"])(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cr["c"];const{wtSettings:t,wtTable:n}=this;if(t.getSetting("renderAllRows")&&e===cr["c"])return new mr({totalRows:t.getSetting("totalRows")});let i,s,o=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const l=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom"),u=t.getSetting("totalRows");return l&&a>=0&&(s=this.dataAccessObject.topOverlay.sumCellSizes(0,l),a+=s,o-=s),c&&this.dataAccessObject.bottomOverlay.clone&&(s=this.dataAccessObject.bottomOverlay.sumCellSizes(u-c,u),o-=s),i=n.holder.clientHeight===n.holder.offsetHeight?0:Object(r["getScrollbarWidth"])(this.domBindings.rootDocument),new fr["a"]({viewportHeight:o,scrollOffset:a,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>n.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:cr["c"];const{wtSettings:t,wtTable:n}=this;if(t.getSetting("renderAllColumns")&&e===cr["c"])return new wr({totalColumns:t.getSetting("totalColumns")});let i=this.getViewportWidth(),s=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const o=t.getSetting("fixedColumnsStart");if(o&&s>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,o);s+=e,i-=e}return n.holder.clientWidth!==n.holder.offsetWidth&&(i-=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),new br["a"]({viewportWidth:i,scrollOffset:s,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>n.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this;if(e&&!t.getSetting("renderAllRows")){const t=this.createRowsCalculator(cr["a"]);e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=this.createColumnsCalculator(cr["a"]);e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(cr["c"]),this.columnsRenderCalculator=this.createColumnsCalculator(cr["c"])),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(cr["a"]),this.columnsVisibleCalculator=this.createColumnsCalculator(cr["a"])}createPartiallyVisibleCalculators(){this.rowsPartiallyVisibleCalculator=this.createRowsCalculator(cr["b"]),this.columnsPartiallyVisibleCalculator=this.createColumnsCalculator(cr["b"])}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:n,isVisibleInTrimmingContainer:r}=e;if(null===t&&null===n)return!r;const{startRow:i,endRow:s}=this.rowsRenderCalculator;return!(t<i||t===i&&t>0)&&!(n>s||n===s&&n<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:n,isVisibleInTrimmingContainer:r}=e;if(null===t&&null===n)return!r;const{startColumn:i,endColumn:s}=this.columnsRenderCalculator;return!(t<i||t===i&&t>0)&&!(n>s||n===s&&n<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){Object(c["objectEach"])(this.hasOversizedColumnHeadersMarked,(e,t,n)=>{n[t]=void 0})}}var vr=_r;n("24b9e");function Sr(e,t){Cr(e,t),t.add(e)}function Er(e,t,n){Cr(e,t),t.set(e,n)}function Cr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tr(e,t){return e.get(Rr(e,t))}function Mr(e,t,n){return e.set(Rr(e,t),n),n}function Rr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Or=new WeakMap,Nr=new WeakMap,Ar=new WeakSet;class Lr{constructor(){Sr(this,Ar),Er(this,Or,void 0),Er(this,Nr,void 0)}setActiveOverlay(e){return Mr(Nr,this,e),this}setActiveSelection(e){return Mr(Or,this,e),this}scan(){const e=Tr(Or,this).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e))):"area"===e?this.scanCellsRange(e=>t.add(e)):"focus"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e)),this.scanCellsRange(e=>t.add(e))):"fill"===e?this.scanCellsRange(e=>t.add(e)):"header"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e))):"row"===e?(this.scanRowsInHeadersRange(e=>t.add(e)),this.scanRowsInCellsRange(e=>t.add(e))):"column"===e&&(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanColumnsInCellsRange(e=>t.add(e))),t}scanColumnsInHeadersRange(e){const[t,n,r,i]=Tr(Or,this).getCorners(),{wtTable:s}=Tr(Nr,this),o=s.getRenderedColumnsCount(),a=s.getColumnHeadersCount();let l=0;for(let c=-s.getRowHeadersCount();c<o;c++){const o=s.columnFilter.renderedToSource(c);if(!(o<n||o>i)){for(let c=-a;c<0;c++){if(c<t||c>r)continue;const u=c+a;let h=s.getColumnHeader(o,u);const d=Tr(Nr,this).getSetting("onBeforeHighlightingColumnHeader",o,u,{selectionType:Tr(Or,this).settings.selectionType,columnCursor:l,selectionWidth:i-n+1});null!==d&&(d!==o&&(h=s.getColumnHeader(d,u)),e(h))}l+=1}}}scanRowsInHeadersRange(e){const[t,n,r,i]=Tr(Or,this).getCorners(),{wtTable:s}=Tr(Nr,this),o=s.getRenderedRowsCount(),a=s.getRowHeadersCount();let l=0;for(let c=-s.getColumnHeadersCount();c<o;c++){const o=s.rowFilter.renderedToSource(c);if(!(o<t||o>r)){for(let c=-a;c<0;c++){if(c<n||c>i)continue;const u=c+a;let h=s.getRowHeader(o,u);const d=Tr(Nr,this).getSetting("onBeforeHighlightingRowHeader",o,u,{selectionType:Tr(Or,this).settings.selectionType,rowCursor:l,selectionHeight:r-t+1});null!==d&&(d!==o&&(h=s.getRowHeader(d,u)),e(h))}l+=1}}}scanCellsRange(e){const[t,n,i,s]=Tr(Or,this).getCorners(),{wtTable:o}=Tr(Nr,this);Rr(Ar,this,Ir).call(this,(a,l)=>{if(a>=t&&a<=i&&l>=n&&l<=s){const t=o.getCell(Tr(Nr,this).createCellCoords(a,l)),n=Tr(Nr,this).getSetting("onAfterDrawSelection",a,l,Tr(Or,this).settings.layerLevel);"string"===typeof n&&Object(r["addClass"])(t,n),e(t)}})}scanRowsInCellsRange(e){const[t,,n]=Tr(Or,this).getCorners(),{wtTable:r}=Tr(Nr,this);Rr(Ar,this,Ir).call(this,(i,s)=>{if(i>=t&&i<=n){const t=r.getCell(Tr(Nr,this).createCellCoords(i,s));e(t)}})}scanColumnsInCellsRange(e){const[,t,,n]=Tr(Or,this).getCorners(),{wtTable:r}=Tr(Nr,this);Rr(Ar,this,Ir).call(this,(i,s)=>{if(s>=t&&s<=n){const t=r.getCell(Tr(Nr,this).createCellCoords(i,s));e(t)}})}}function Ir(e){const{wtTable:t}=Tr(Nr,this),n=t.getRenderedRowsCount(),r=t.getRenderedColumnsCount();for(let i=0;i<n;i+=1){const n=t.rowFilter.renderedToSource(i);for(let i=0;i<r;i+=1)e(n,t.columnFilter.renderedToSource(i))}}class xr{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=_n,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",()=>this.onMouseDown()),this.eventManager.addEventListener(e,"mouseup",()=>this.onMouseUp());for(let t=0,n=this.main.childNodes.length;t<n;t++){const e=this.main.childNodes[t];this.eventManager.addEventListener(e,"mouseenter",e=>this.onMouseEnter(e,this.main.childNodes[t]))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),Object(P["stopImmediatePropagation"])(e);const n=this,r=this.wot.rootDocument.body,i=t.getBoundingClientRect();function s(e){return e.clientY<Math.floor(i.top)||(e.clientY>Math.ceil(i.top+i.height)||(e.clientX<Math.floor(i.left)||(e.clientX>Math.ceil(i.left+i.width)||void 0)))}function o(e){s(e)&&(n.eventManager.removeEventListener(r,"mousemove",o),t.style.display="block")}t.style.display="none",this.eventManager.addEventListener(r,"mousemove",o)}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const n=["top","start","bottom","end","corner"];let r=this.main.style;r.position="absolute",r.top=0,r.left=0;for(let o=0;o<5;o++){const i=n[o],s=t.createElement("div");s.className="wtBorder "+(this.settings.className||""),this.settings[i]&&this.settings[i].hide&&(s.className+=" hidden"),r=s.style,r.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,r.height=this.settings[i]&&this.settings[i].width?this.settings[i].width+"px":e.border.width+"px",r.width=this.settings[i]&&this.settings[i].width?this.settings[i].width+"px":e.border.width+"px",this.main.appendChild(s)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.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(" "),Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let s=i.bordersHolder;s||(s=t.createElement("div"),s.className="htBorders",i.bordersHolder=s,i.spreader.appendChild(s)),s.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};const t=10,n=40;this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const r={position:"absolute",height:n+"px",width:n+"px","border-radius":parseInt(n/1.5,10)+"px"};Object(c["objectEach"])(r,(e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e});const i={position:"absolute",height:t+"px",width:t+"px","border-radius":parseInt(t/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};Object(c["objectEach"])(i,(e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e}),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const n=this.wot.selectionManager.getAreaSelection();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,n,r,i,s){const o=this.wot.wtSettings.getSetting("rtlMode"),a=o?"right":"left",{top:l,topHitArea:c,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),m=parseInt(l.width,10),f=parseInt(c.width,10),p=this.wot.wtTable.getWidth(),g=this.wot.wtTable.getHeight();l.top=parseInt(n-m-1,10)+"px",l[a]=parseInt(r-m-1,10)+"px",c.top=parseInt(n-f/4*3,10)+"px",c[a]=parseInt(r-f/4*3,10)+"px";const y=Math.min(parseInt(r+i,10),p-m-2*d),w=Math.min(parseInt(r+i-f/4,10),p-f-2*d);u[a]=y+"px",h[a]=w+"px";const b=Math.min(parseInt(n+s,10),g-m-2*d),_=Math.min(parseInt(n+s-f/4,10),g-f-2*d);u.top=b+"px",h.top=_+"px",this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",c.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(l.display="none",u.display="none",c.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",c.zIndex="9999"):(l.zIndex="",c.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:n,rootWindow:i}=this.wot;let s,a,l,c,u,h;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){s=n,u=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const m=t.getRenderedColumnsCount();for(let r=0;r<m;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,h=e[1];break}}for(let r=m-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){c=n;break}}if(void 0===s||void 0===l)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(s,l));const p=s!==a||l!==c,g=p?t.getCell(this.wot.createCellCoords(a,c)):f,y=Object(r["offset"])(f),w=p?Object(r["offset"])(g):y,b=Object(r["offset"])(t.TABLE),_=Object(r["outerWidth"])(t.TABLE),v=y.top,S=y.left,E=this.wot.wtSettings.getSetting("rtlMode");let C=0,T=0;if(E){const e=Object(r["outerWidth"])(f),t=i.innerWidth-b.left-_;T=S+e-w.left,C=i.innerWidth-S-e-t-1}else T=w.left+Object(r["outerWidth"])(g)-S,C=S-b.left-1;if(this.isEntireColumnSelected(s,a)){const e=this.getDimensionsFromHeader("columns",l,c,u,b);let t=null;e&&([t,C,T]=e),t&&(f=t)}let M=v-b.top-1,R=w.top+Object(r["outerHeight"])(g)-v;if(this.isEntireRowSelected(l,c)){const e=this.getDimensionsFromHeader("rows",s,a,h,b);let t=null;e&&([t,M,R]=e),t&&(f=t)}const O=Object(r["getComputedStyle"])(f,i);parseInt(O.borderTopWidth,10)>0&&(M+=1,R=R>0?R-1:0),parseInt(O[E?"borderRightWidth":"borderLeftWidth"],10)>0&&(C+=1,T=T>0?T-1:0);const N=E?"right":"left";this.topStyle.top=M+"px",this.topStyle[N]=C+"px",this.topStyle.width=T+"px",this.topStyle.display="block",this.startStyle.top=M+"px",this.startStyle[N]=C+"px",this.startStyle.height=R+"px",this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=M+R-A+"px",this.bottomStyle[N]=C+"px",this.bottomStyle.width=T+"px",this.bottomStyle.display="block",this.endStyle.top=M+"px",this.endStyle[N]=C+T-A+"px",this.endStyle.height=R+1+"px",this.endStyle.display="block";let L=this.settings.border.cornerVisible;L="function"===typeof L?L(this.settings.layerLevel):L;const I=this.wot.getSetting("onModifyGetCellCoords",a,c);let[x,k]=[a,c];if(I&&Array.isArray(I)&&([,,x,k]=I),Object(o["isMobileBrowser"])()||!L||this.isPartRange(x,k))this.cornerStyle.display="none";else{this.cornerStyle.top=M+R+this.cornerCenterPointOffset-1+"px",this.cornerStyle[N]=C+T+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=Object(r["getTrimmingContainer"])(t.TABLE);const s=e===i;s&&(e=n.documentElement);const o=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(c===this.wot.getSetting("totalColumns")-1){const t=s?g.getBoundingClientRect().left:g.offsetLeft;let n=!1,i=0;E?(i=t-parseInt(this.cornerDefaultStyle.width,10)/2,n=i<0):(i=t+Object(r["outerWidth"])(g)+parseInt(this.cornerDefaultStyle.width,10)/2,n=i>=Object(r["innerWidth"])(e)),n&&(this.cornerStyle[N]=Math.floor(C+T+this.cornerCenterPointOffset-o)+"px",this.cornerStyle[E?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){const t=s?g.getBoundingClientRect().top:g.offsetTop,n=t+Object(r["outerHeight"])(g)+parseInt(this.cornerDefaultStyle.height,10)/2,i=n>=Object(r["innerHeight"])(e);i&&(this.cornerStyle.top=Math.floor(M+R+this.cornerCenterPointOffset-l)+"px",this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(a,c,M,C,T,R)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,n,i,s){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,c=null,u=null,h=null,d=null,m=null,f=null,p=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},c=function(){return Object(r["outerHeight"])(...arguments)},u="ht__selection--rows",m="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},c=function(){return Object(r["outerWidth"])(...arguments)},u="ht__selection--columns",m="left";break;default:}if(a.classList.contains(u)){const e=this.wot.getSetting("columnHeaders").length;if(f=l(t,e-i),p=l(n,e-i),!f||!p)return!1;const o=Object(r["offset"])(f),a=Object(r["offset"])(p);return f&&p&&(h=o[m]-s[m]-1,d=a[m]+c(p)-o[m]),[f,h,d]}return!1}changeBorderStyle(e,t){const n=this[e].style,i=t[e];!i||i.hide?Object(r["addClass"])(this[e],"hidden"):(Object(r["hasClass"])(this[e],"hidden")&&Object(r["removeClass"])(this[e],"hidden"),n.backgroundColor=i.color,"top"!==e&&"bottom"!==e||(n.height=i.width+"px"),"start"!==e&&"end"!==e||(n.width=i.width+"px"))}changeBorderToDefaultStyle(e){const t={width:1,color:"#000"},n=this[e].style;n.backgroundColor=t.color,n.width=t.width+"px",n.height=t.width+"px"}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?Object(r["addClass"])(this[e],"hidden"):Object(r["removeClass"])(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}var kr=xr;function Dr(e,t){Pr(e,t),t.add(e)}function Hr(e,t,n){Pr(e,t),t.set(e,n)}function Pr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jr(e,t){return e.get(Yr(e,t))}function Fr(e,t,n){return e.set(Yr(e,t),n),n}function Yr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ur=new WeakMap,Vr=new WeakMap,Br=new WeakMap,Wr=new WeakMap,Gr=new WeakMap,zr=new WeakMap,Kr=new WeakSet;class Xr{constructor(e){Dr(this,Kr),Hr(this,Ur,void 0),Hr(this,Vr,void 0),Hr(this,Br,new Lr),Hr(this,Wr,new WeakMap),Hr(this,Gr,new WeakSet),Hr(this,zr,new Map),Fr(Vr,this,e)}setActiveOverlay(e){return Fr(Ur,this,e),jr(Br,this).setActiveOverlay(jr(Ur,this)),jr(Wr,this).has(jr(Ur,this))||jr(Wr,this).set(jr(Ur,this),new Set),this}getFocusSelection(){return null!==jr(Vr,this)?jr(Vr,this).getFocus():null}getAreaSelection(){return null!==jr(Vr,this)?jr(Vr,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(jr(zr,this).has(e)){const t=jr(zr,this).get(e);if(t.has(jr(Ur,this)))return t.get(jr(Ur,this));const n=new kr(jr(Ur,this),e.settings);return t.set(jr(Ur,this),n),n}const t=new kr(jr(Ur,this),e.settings);return jr(zr,this).set(e,new Map([[jr(Ur,this),t]])),t}getBorderInstances(e){var t,n;return Array.from(null!==(t=null===(n=jr(zr,this).get(e))||void 0===n?void 0:n.values())&&void 0!==t?t:[])}destroyBorders(e){jr(zr,this).get(e).forEach(e=>e.destroy()),jr(zr,this).delete(e)}render(e){if(null===jr(Vr,this))return;e&&Yr(Kr,this,$r).call(this);const t=Array.from(jr(Vr,this)),n=new Map,i=new Map;for(let r=0;r<t.length;r++){const e=t[r],{className:s,headerAttributes:o,createLayers:a,selectionType:l}=e.settings;jr(Gr,this).has(e)||(jr(Gr,this).add(e),e.addLocalHook("destroy",()=>this.destroyBorders(e)));const c=this.getBorderInstance(e);if(e.isEmpty()){null===c||void 0===c||c.disappear();continue}if(s){const t=jr(Br,this).setActiveSelection(e).scan();t.forEach(e=>{if(n.has(e)){const t=n.get(e);t.has(s)&&!0===a?t.set(s,t.get(s)+1):t.set(s,1)}else n.set(e,new Map([[s,1]]));o&&(i.has(e)||i.set(e,[]),"TH"===e.nodeName&&i.get(e).push(...o))})}const u=e.getCorners();jr(Ur,this).getSetting("onBeforeDrawBorders",u,l),null===c||void 0===c||c.appear(u)}n.forEach((e,t)=>{var n;const i=Array.from(e).map(e=>{let[t,n]=e;return 1===n?t:[t,...Array.from({length:n-1},(e,n)=>`${t}-${n+1}`)]}).flat();i.forEach(e=>jr(Wr,this).get(jr(Ur,this)).add(e)),Object(r["addClass"])(t,i),"TD"===t.nodeName&&Array.isArray(null===(n=jr(Vr,this).options)||void 0===n?void 0:n.cellAttributes)&&Object(r["setAttribute"])(t,jr(Vr,this).options.cellAttributes)}),Array.from(i.keys()).forEach(e=>{Object(r["setAttribute"])(e,[...i.get(e)])})}}function $r(){const e=jr(Wr,this).get(jr(Ur,this)),t=jr(Ur,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let n=0;n<t.length;n++)e.add(t[n]);e.forEach(e=>{var t,n;const i=jr(Ur,this).wtTable.TABLE.querySelectorAll("."+e);let s=[];Array.isArray(null===(t=jr(Vr,this).options)||void 0===t?void 0:t.cellAttributes)&&(s=jr(Vr,this).options.cellAttributes.map(e=>e[0])),Array.isArray(null===(n=jr(Vr,this).options)||void 0===n?void 0:n.headerAttributes)&&(s=[...s,...jr(Vr,this).options.headerAttributes.map(e=>e[0])]);for(let o=0,a=i.length;o<a;o++)Object(r["removeClass"])(i[o],e),Object(r["removeAttribute"])(i[o],s)}),e.clear()}class qr extends hn{constructor(e,t){super(e,new or(t));const n=this.wtSettings.getSetting("facade",this);this.wtTable=new lr(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=new vr(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Xr(this.wtSettings.getSetting("selections")),this.wtEvent=new te(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new nr(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e={rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},t=[],n=[];Object(c["objectEach"])(e,(e,r)=>{this.wtSettings.getSetting(r).length&&n.push(e),t.push(e)}),Object(r["removeClass"])(this.wtTable.wtRootElement.parentNode,t),Object(r["addClass"])(this.wtTable.wtRootElement.parentNode,n)}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}class Jr{constructor(e){e instanceof hn?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new Jr(e);return()=>t},this._wot=new qr(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,n){return this._wot.createCellRange(e,t,n)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,n,r,i){return this._wot.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return this._wot.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return this._wot.scrollViewportVertically(e,t,n)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,n,r,i){return this._wot.wtSettings.getSetting(e,t,n,r,i)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}function Qr(e){let{isShiftKey:t,isLeftClick:n,isRightClick:r,coords:i,selection:s,controller:o,cellCoordsFactory:a}=e;const l=s.isSelected()?s.getSelectedRange().current():null,c=s.isSelectedByCorner(),u=s.isSelectedByRowHeader();if(s.markSource("mouse"),t&&l)i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(i):(c||u)&&i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(a(i.row,i.col)):c&&i.row<0&&!o.column?s.setRangeEnd(a(l.to.row,i.col)):u&&i.col<0&&!o.row?s.setRangeEnd(a(i.row,l.to.col)):(!c&&!u&&i.col<0||c&&i.col<0)&&!o.row?s.selectRows(Math.max(l.from.row,0),i.row,i.col):(!c&&!u&&i.row<0||u&&i.row<0)&&!o.column&&s.selectColumns(Math.max(l.from.col,0),i.col,i.row);else{const e=!s.inInSelection(i),t=n||r&&e;i.row<0&&i.col>=0&&!o.column?t&&s.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!o.row?t&&s.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!o.cell?t&&s.setRangeStart(i):i.col<0&&i.row<0&&s.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}s.markEndSource()}function Zr(e){let{isLeftClick:t,coords:n,selection:r,controller:i,cellCoordsFactory:s}=e;if(!t)return;const o=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),l=r.tableProps.countCols(),c=r.tableProps.countRows();r.markSource("mouse"),a&&!i.column?r.setRangeEnd(s(c-1,n.col)):o&&!i.row?r.setRangeEnd(s(n.row,l-1)):i.cell||r.setRangeEnd(n),r.markEndSource()}const ei=new Map([["mousedown",Qr],["mouseover",Zr],["touchstart",Qr]]);function ti(e,t){let{coords:n,selection:r,controller:i,cellCoordsFactory:s}=t;ei.get(e.type)({coords:n,selection:r,controller:i,cellCoordsFactory:s,isShiftKey:e.shiftKey,isLeftClick:Object(P["isLeftClick"])(e)||"touchstart"===e.type,isRightClick:Object(P["isRightClick"])(e)})}const ni=new WeakMap,ri=Symbol("rootInstance");function ii(e){ni.set(e,!0)}function si(e){return e===ri}function oi(e){return ni.has(e)}function ai(e,t){ci(e,t),t.add(e)}function li(e,t,n){ci(e,t),t.set(e,n)}function ci(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ui(e,t,n){return t=hi(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hi(e){var t=di(e,"string");return"symbol"==typeof t?t:t+""}function di(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function mi(e,t){return e.get(pi(e,t))}function fi(e,t,n){return e.set(pi(e,t),n),n}function pi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var gi=new WeakMap,yi=new WeakMap,wi=new WeakMap,bi=new WeakMap,_i=new WeakMap,vi=new WeakMap,Si=new WeakMap,Ei=new WeakSet;class Ci{constructor(e){ai(this,Ei),ui(this,"hot",void 0),ui(this,"eventManager",void 0),ui(this,"settings",void 0),ui(this,"THEAD",void 0),ui(this,"TBODY",void 0),ui(this,"_wt",void 0),ui(this,"activeWt",void 0),li(this,gi,0),li(this,yi,0),ui(this,"postponedAdjustElementsSize",!1),li(this,wi,!1),li(this,bi,void 0),li(this,_i,void 0),li(this,vi,0),li(this,Si,0),this.hot=e,this.eventManager=new l["a"](this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize(e)}getCellAtCoords(e,t){const n=this._wt.getCell(e,t);return n<0?null:n}scrollViewport(e,t,n,r,i){return this._wt.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return this._wt.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return this._wt.scrollViewportVertically(e,t,n)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,n=e.getAttribute("style");n&&e.setAttribute("data-originalstyle",n),Object(r["addClass"])(e,"handsontable"),fi(_i,this,t.createElement("TABLE")),Object(r["addClass"])(mi(_i,this),"htCore"),this.hot.getSettings().tableClassName&&Object(r["addClass"])(mi(_i,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(Object(r["setAttribute"])(mi(_i,this),[Object(Pe["x"])()]),Object(r["setAttribute"])(e,[Object(Pe["M"])(),Object(Pe["B"])(-1),Object(Pe["e"])(this.hot.countCols()),Object(Pe["u"])()])),this.THEAD=t.createElement("THEAD"),mi(_i,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),mi(_i,this).appendChild(this.TBODY),this.hot.table=mi(_i,this),this.hot.container.insertBefore(mi(_i,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:n,rootWindow:i}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",e=>{fi(wi,this,!0),this.isTextSelectionAllowed(e.target)||(Object(r["clearTextSelection"])(i),e.preventDefault(),i.focus())}),this.eventManager.addEventListener(e,"mouseup",()=>{fi(wi,this,!1)}),this.eventManager.addEventListener(e,"mousemove",e=>{mi(wi,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&Object(r["clearTextSelection"])(i),e.preventDefault())}),this.eventManager.addEventListener(s,"keyup",e=>{n.isInProgress()&&!e.shiftKey&&n.finish()}),this.eventManager.addEventListener(s,"mouseup",i=>{n.isInProgress()&&Object(P["isLeftClick"])(i)&&n.finish(),fi(bi,this,!1);const s=Object(r["isOutsideInput"])(t.activeElement);Object(r["isInput"])(t.activeElement)&&!s||!s&&(n.isSelected()||n.isSelectedByAnyHeader()||e.contains(i.target)||Object(P["isRightClick"])(i))||this.hot.unlisten()}),this.eventManager.addEventListener(s,"contextmenu",e=>{n.isInProgress()&&Object(P["isRightClick"])(e)&&(n.finish(),fi(bi,this,!1))}),this.eventManager.addEventListener(s,"touchend",()=>{n.isInProgress()&&n.finish(),fi(bi,this,!1)}),this.eventManager.addEventListener(s,"mousedown",n=>{const i=n.target,o=n.x||n.clientX,a=n.y||n.clientY;let l=n.target;if(mi(bi,this)||!e||!this.hot.view)return;const{holder:c}=this.hot.view._wt.wtTable;if(l===c){const e=Object(r["getScrollbarWidth"])(t);if(t.elementFromPoint(o+e,a)!==c||t.elementFromPoint(o,a+e)!==c)return}else while(l!==s){if(null===l){if(n.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}const u="function"===typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects;u?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)});let o=Object(r["getParentWindow"])(i);while(null!==o)this.eventManager.addEventListener(o.document.documentElement,"click",()=>{this.hot.unlisten()}),o=Object(r["getParentWindow"])(o);this.eventManager.addEventListener(mi(_i,this),"selectstart",e=>{this.settings.fragmentSelection||Object(r["isInput"])(e.target)||e.preventDefault()})}translateFromRenderableToVisualCoords(e){let{row:t,col:n}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,n))}translateFromRenderableToVisualIndex(e,t){let n=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,r=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===n&&(n=e),null===r&&(r=t),[n,r]}countRenderableIndexes(e,t){const n=Math.min(e.getNotTrimmedIndexesLength(),t),r=e.getNearestNotHiddenIndex(n-1,-1);return null===r?0:e.getRenderableFromVisualIndex(r)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,n,r){if(isNaN(e)||e<0)return 0;const i=n.getNearestNotHiddenIndex(e,t),s=n.getRenderableFromVisualIndex(i);if(!Number.isInteger(s))return 0;let o=0;return t<0?o=s+1:t>0&&(o=r-s),o}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let n=0;for(let r=e;r<=t;r++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(r)&&(n+=1);return n}countRenderableRowsInRange(e,t){let n=0;for(let r=e;r<=t;r++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(r)&&(n+=1);return n}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:mi(_i,this),isDataViewInstance:()=>oi(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push((e,t)=>{const n=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(n,t)}),this.hot.runHooks("afterGetRowHeaderRenderers",e),fi(yi,this,e.length),this.hot.getSettings().ariaTags&&pi(Ei,this,Ti).call(this)===this.hot.countCols()&&pi(Ei,this,Mi).call(this,mi(yi,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push((e,t)=>{const n=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(n,t)}),this.hot.runHooks("afterGetColumnHeaderRenderers",e),fi(gi,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},cellRenderer:(e,t,n)=>{const[r,i]=this.translateFromRenderableToVisualIndex(e,t),s=this.hot.runHooks("modifyGetCellCoords",r,i);let o=r,a=i;Array.isArray(s)&&([o,a]=s);const l=this.hot.getCellMeta(o,a),c=this.hot.colToProp(a);let u=this.hot.getDataAtRowProp(o,c);this.hot.hasHook("beforeValueRender")&&(u=this.hot.runHooks("beforeValueRender",u,l)),this.hot.runHooks("beforeRenderer",n,r,i,c,u,l),this.hot.getCellRenderer(l)(this.hot,n,r,i,c,u,l),this.hot.runHooks("afterRenderer",n,r,i,c,u,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&Object(r["isVisible"])(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t),s={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=r,fi(bi,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,i,n,s),Object(P["isImmediatePropagationStopped"])(e)||(ti(e,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,i,n),this.activeWt=this._wt)},onCellContextMenu:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,fi(bi,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,i,n),Object(P["isImmediatePropagationStopped"])(e)||(this.hot.runHooks("afterOnCellContextMenu",e,i,n),this.activeWt=this._wt)},onCellMouseOut:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOut",e,i,n),Object(P["isImmediatePropagationStopped"])(e)||(this.hot.runHooks("afterOnCellMouseOut",e,i,n),this.activeWt=this._wt)},onCellMouseOver:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t),s={row:!1,column:!1,cell:!1};this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOver",e,i,n,s),Object(P["isImmediatePropagationStopped"])(e)||(mi(bi,this)&&ti(e,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,i,n),this.activeWt=this._wt)},onCellMouseUp:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseUp",e,i,n),Object(P["isImmediatePropagationStopped"])(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,i,n),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,n=e<0;let r=e;return n||(r=t.getVisualFromRenderableIndex(e),null!==r)?(r=this.hot.runHooks("beforeViewportScrollVertically",r),this.hot.runHooks("beforeViewportScroll"),n?r:t.getRenderableFromVisualIndex(r)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,n=e<0;let r=e;return n||(r=t.getVisualFromRenderableIndex(e),null!==r)?(r=this.hot.runHooks("beforeViewportScrollHorizontally",r),this.hot.runHooks("beforeViewportScroll"),n?r:t.getRenderableFromVisualIndex(r)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,n)=>{const r=this.hot.rowIndexMapper,i=e<0;let s=e;i||(s=r.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingRowHeader",s,t,n);return i?o:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,1))},onBeforeHighlightingColumnHeader:(e,t,n)=>{const r=this.hot.columnIndexMapper,i=e<0;let s=e;i||(s=r.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingColumnHeader",s,t,n);return i?o:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,1))},onAfterDrawSelection:(e,t,n)=>{let r;const[i,s]=this.translateFromRenderableToVisualIndex(e,t),o=this.hot.selection.getSelectedRange(),a=o.size();if(a>0){const e=o.peekByIndex(null!==n&&void 0!==n?n:0);r=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",i,s,r,n)},onBeforeDrawBorders:(e,t)=>{const[n,r,i,s]=e,o=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)];return this.hot.runHooks("beforeDrawBorders",o,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,n)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,n)=>{const r=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,s=t>=0?i.getVisualFromRenderableIndex(t):t,o=e>=0?r.getVisualFromRenderableIndex(e):e,a=this.hot.runHooks("modifyGetCellCoords",o,s,n);if(Array.isArray(a)){const[e,t,n,s]=a;return[e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,n>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1)):n,s>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(s,-1)):s]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const n=this.countRenderableRows(),r=e.startRow,i=e.endRow;if("number"===typeof t)e.startRow=Math.max(r-t,0),e.endRow=Math.min(i+t,n-1);else if("auto"===t){const t=Math.ceil(i/n*12);e.startRow=Math.max(r-t,0),e.endRow=Math.min(i+t,n-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const n=this.countRenderableColumns(),r=e.startColumn,i=e.endColumn;if("number"===typeof t&&(e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(i+t,n-1)),"auto"===t){const t=Math.ceil(i/n*6);e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(i+t,n-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new Jr(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:n,height:i}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(n,i),this.eventManager.addEventListener(t,"mousedown",e=>{e.target===t&&3===e.which&&e.stopPropagation()}),this.eventManager.addEventListener(t,"contextmenu",e=>{e.target===t&&3===e.which&&e.stopPropagation()}),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())})}isTextSelectionAllowed(e){if(Object(r["isInput"])(e))return!0;const t=Object(r["isChildOf"])(e,this.hot.view._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return mi(bi,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const n=t.firstChild;if(!Object(r["hasClass"])(n,"relative"))return Object(r["empty"])(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:n,getRowHeader:r}=this.hot,i=n.createElement("div"),s=n.createElement("span");i.className="relative",s.className="rowHeader",this.updateCellHeader(s,e,r),i.appendChild(s),t.appendChild(i)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t.firstChild){const s=t.firstChild;Object(r["hasClass"])(s,"relative")?this.updateCellHeader(s.querySelector(".colHeader"),e,n,i):(Object(r["empty"])(t),this.appendColHeader(e,t,n,i))}else{const{rootDocument:s}=this.hot,o=s.createElement("div"),a=s.createElement("span");o.className="relative",a.className="colHeader",this.settings.ariaTags&&(Object(r["setAttribute"])(o,...Object(Pe["x"])()),Object(r["setAttribute"])(a,...Object(Pe["x"])())),this.updateCellHeader(a,e,n,i),o.appendChild(a),t.appendChild(o)}this.hot.runHooks("afterGetColHeader",e,t,i)}updateCellHeader(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t;const o=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&(Object(r["hasClass"])(e,"colHeader")?s=o.wtTable.columnFilter.sourceToRendered(t):Object(r["hasClass"])(e,"rowHeader")&&(s=o.wtTable.rowFilter.sourceToRendered(t))),s>-1?Object(r["fastInnerHTML"])(e,n(t,i)):(Object(r["fastInnerText"])(e,String.fromCharCode(160)),Object(r["addClass"])(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth(),n=t-e;return n>0?n:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight(),n=t-e;return n>0?n:0}setLastSize(e,t){fi(vi,this,e),fi(Si,this,t)}getLastSize(){return{width:mi(vi,this),height:mi(Si,this)}}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return mi(gi,this)}getRowHeadersCount(){return mi(yi,this)}getViewportWidth(){return this.hot.view._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this.hot.view._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this.hot.view._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this.hot.view._wt.wtViewport.getWorkspaceHeight()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}function Ti(){return parseInt(this.hot.rootElement.getAttribute(Object(Pe["e"])()[0]),10)}function Mi(e){const t=pi(Ei,this,Ti).call(this)+e;Object(r["setAttribute"])(this.hot.rootElement,...Object(Pe["e"])(t))}var Ri=Ci,Oi=n("480c");function Ni(e,t,n){return t=Ai(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ai(e){var t=Li(e,"string");return"symbol"==typeof t?t:t+""}function Li(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ii{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Ni(this,"hot",void 0),Ni(this,"data",void 0),Ni(this,"dataType","array"),Ni(this,"colToProp",()=>{}),Ni(this,"propToCol",()=>{}),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return Object(N["arrayEach"])(this.data,(n,r)=>{const i=this.getAtCell(r,e);t.push(i)}),t}getAtRow(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===n;let o=null,a=null;if(o=this.modifyRowData(e),Array.isArray(o))a=[],s?o.forEach((t,n)=>{a[n]=this.getAtPhysicalCell(e,n,o)}):Object(H["rangeEach"])(t,n,n=>{a[n-t]=this.getAtPhysicalCell(e,n,o)});else if(Object(c["isObject"])(o)||Object(i["isFunction"])(o))if(a=r?[]:{},!s||r){const i=0,s=this.countFirstRowKeys()-1;Object(H["rangeEach"])(i,s,l=>{const u=this.colToProp(l);if(l>=(t||i)&&l<=(n||s)&&!Number.isInteger(u)){const t=this.getAtPhysicalCell(e,u,o);r?a.push(t):Object(c["setProperty"])(a,u,t)}})}else Object(c["objectEach"])(o,(t,n)=>{Object(c["setProperty"])(a,n,this.getAtPhysicalCell(e,n,o))});return a}setAtCell(e,t,n){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const r=Object(c["createObjectPropListener"])(n);this.hot.runHooks("modifySourceData",e,t,r,"set"),r.isTouched()&&(n=r.value)}Number.isInteger(t)?this.data[e][t]=n:Object(c["setProperty"])(this.data[e],t,n)}}getAtPhysicalCell(e,t,n){let r=null;if(n&&(r="string"===typeof t?Object(c["getProperty"])(n,t):"function"===typeof t?t(n):n[t]),this.hot.hasHook("modifySourceData")){const n=Object(c["createObjectPropListener"])(r);this.hot.runHooks("modifySourceData",e,t,n,"get"),n.isTouched()&&(r=n.value)}return r}getAtCell(e,t){const n=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),n)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i=null,s=null,o=null,a=null;null===e||null===t?(r=!0,i=0,o=this.countRows()-1):(i=Math.min(e.row,t.row),s=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const l=[];return Object(H["rangeEach"])(i,o,e=>{l.push(r?this.getAtRow(e,void 0,void 0,n):this.getAtRow(e,s,a,n))}),l}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return Object(Oi["countFirstRowKeys"])(this.data)}destroy(){this.data=null,this.hot=null}}var xi=Ii,ki=n("1b1a"),Di=n("cef7"),Hi=n("1096"),Pi=n("9056"),ji=n("9f10"),Fi=n("00fd");const Yi=new Map([["hiding",Di["a"]],["index",Hi["a"]],["linkedPhysicalIndexToValue",Pi["a"]],["physicalIndexToValue",ji["a"]],["trimming",Fi["a"]]]);function Ui(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Yi.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(Yi.get(e))(t)}var Vi=n("3d57"),Bi=n("c5cd");function Wi(e,t,n){return t=Gi(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gi(e){var t=zi(e,"string");return"symbol"==typeof t?t:t+""}function zi(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ki extends Bi["a"]{constructor(e,t){super(),Wi(this,"mergedValuesCache",[]),Wi(this,"aggregationFunction",void 0),Wi(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.mergedValuesCache;if(0===this.getLength())return[];const t=Object(N["arrayMap"])(this.get(),e=>e.getValues()),n=[],r=Object(s["isDefined"])(t[0])&&t[0].length||0;for(let i=0;i<r;i+=1){const e=[];for(let n=0;n<this.getLength();n+=1)e.push(t[n][i]);n.push(e)}return Object(N["arrayMap"])(n,this.aggregationFunction)}getMergedValueAtIndex(e,t){const n=this.getMergedValues(t)[e];return Object(s["isDefined"])(n)?n:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}var Xi=n("7ae0");function $i(e,t,n){qi(e,t),t.set(e,n)}function qi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ji(e,t,n){return e.set(Zi(e,t),n),n}function Qi(e,t){return e.get(Zi(e,t))}function Zi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var es=new WeakMap;class ts{constructor(){$i(this,es,[])}subscribe(e){return this.addLocalHook("change",e),this._write(Qi(es,this)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){Ji(es,this,e)}}function ns(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;r++,i++)e[r]!==t[i]&&n.push({op:"replace",index:i,oldValue:e[r],newValue:t[i]});for(;r<t.length;r++)n.push({op:"insert",index:r,oldValue:void 0,newValue:t[r]});for(;i<e.length;i++)n.push({op:"remove",index:i,oldValue:e[i],newValue:void 0});return n}function rs(e,t,n){is(e,t),t.set(e,n)}function is(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ss(e,t){return e.get(as(e,t))}function os(e,t,n){return e.set(as(e,t),n),n}function as(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(c["mixin"])(ts,Xi["a"]);var ls=new WeakMap,cs=new WeakMap,us=new WeakMap,hs=new WeakMap,ds=new WeakMap;class ms{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};rs(this,ls,new Set),rs(this,cs,[]),rs(this,us,[]),rs(this,hs,!1),rs(this,ds,!1),os(ds,this,null!==e&&void 0!==e&&e)}createObserver(){const e=new ts;return ss(ls,this).add(e),e.addLocalHook("unsubscribe",()=>{ss(ls,this).delete(e)}),e._writeInitialChanges(ns(ss(cs,this),ss(us,this))),e}emit(e){let t=ss(us,this);ss(hs,this)&&ss(cs,this).length===e.length||(0===e.length?e=new Array(t.length).fill(ss(ds,this)):os(cs,this,new Array(e.length).fill(ss(ds,this))),ss(hs,this)||(os(hs,this,!0),t=ss(cs,this)));const n=ns(t,e);ss(ls,this).forEach(e=>e._write(n)),os(us,this,e)}}function fs(e,t,n){return t=ps(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ps(e){var t=gs(e,"string");return"symbol"==typeof t?t:t+""}function gs(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}new Set;class ys{constructor(){fs(this,"indexesSequence",new ki["a"]),fs(this,"trimmingMapsCollection",new Ki(e=>e.some(e=>!0===e),!1)),fs(this,"hidingMapsCollection",new Ki(e=>e.some(e=>!0===e),!1)),fs(this,"variousMapsCollection",new Bi["a"]),fs(this,"hidingChangesObservable",new ms({initialIndexValue:!1})),fs(this,"notTrimmedIndexesCache",[]),fs(this,"notHiddenIndexesCache",[]),fs(this,"isBatched",!1),fs(this,"indexesSequenceChanged",!1),fs(this,"indexesChangeSource",void 0),fs(this,"trimmedIndexesChanged",!1),fs(this,"hiddenIndexesChanged",!1),fs(this,"renderablePhysicalIndexesCache",[]),fs(this,"fromPhysicalToVisualIndexesCache",new Map),fs(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)}),this.trimmingMapsCollection.addLocalHook("change",e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)}),this.hidingMapsCollection.addLocalHook("change",e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)}),this.variousMapsCollection.addLocalHook("change",e=>{this.runLocalHooks("change",e,this.variousMapsCollection)})}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,n){return this.registerMap(e,Ui(t,n))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof Fi["a"]?this.trimmingMapsCollection.register(e,t):t instanceof Di["a"]?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const n=this.getNumberOfIndexes();return n>0&&t.init(n),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return Object(s["isDefined"])(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return Object(s["isDefined"])(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return Object(s["isDefined"])(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return Object(s["isDefined"])(t)?t:null}getNearestNotHiddenIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.getPhysicalFromVisualIndex(e);if(null===r)return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const i=Array.from(this.fromVisualToRenderableIndexesCache.keys());let s=-1;return s=t>0?i.findIndex(t=>t>e):i.reverse().findIndex(t=>t<e),-1===s?n?this.getNearestNotHiddenIndex(e,-t,!1):null:i[s]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map(t=>t+e);this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.notTrimmedIndexesCache;const t=this.getIndexesSequence();return t.filter(e=>!1===this.isTrimmed(e))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.notHiddenIndexesCache;const t=this.getIndexesSequence();return t.filter(e=>!1===this.isHidden(e))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.renderablePhysicalIndexesCache;const t=this.getNotTrimmedIndexes();return t.filter(e=>!1===this.isHidden(e))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"===typeof e&&(e=[e]);const n=Object(N["arrayMap"])(e,e=>this.getPhysicalFromVisualIndex(e)),r=this.getNotTrimmedIndexesLength(),i=e.length,s=Object(Vi["b"])(this.getIndexesSequence(),n),o=s.filter(e=>!1===this.isTrimmed(e));let a=s.indexOf(o[o.length-1])+1;if(t+i<r){const e=o[t];a=s.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence(Object(Vi["a"])(s,a,n)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const n=this.getNotTrimmedIndexes()[e],r=Object(s["isDefined"])(n)?n:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(n)?this.getIndexesSequence().indexOf(n):this.getNumberOfIndexes(),o=Object(N["arrayMap"])(new Array(t).fill(r),(e,t)=>e+t);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(i,o),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(i,o),this.hidingMapsCollection.insertToEvery(i,o),this.variousMapsCollection.insertToEvery(i,o),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),n=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(n,t)}}}Object(c["mixin"])(ys,Xi["a"]);var ws=n("1004");function bs(e,t){return Object(c["objectEach"])(t,(t,n)=>{Object(s["isUndefined"])(e[n])&&(e[n]=t)}),e}function _s(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/,n=t.exec(e);return n?`${n[1].toLowerCase()}-${n[2].toUpperCase()}`:e}function vs(e){Object(s["isDefined"])(e)&&Object(u["a"])(Be["a"]`Language with code "${e}" was not found. You should register particular language\x20
- before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}var Ss=n("9acd");function Es(e,t){const n=Array.isArray(e)&&Number.isInteger(t);return n?e[t]:e}const{register:Cs,getValues:Ts}=Object(Ss["a"])("phraseFormatters");function Ms(e,t){Cs(e,t)}function Rs(){return Ts()}Ms("pluralize",Es);var Os=n("0283");
- /**
- * @preserve
- * Authors: Handsoncode
- * Last updated: Nov 15, 2017
- *
- * Description: Definition file for English - United States language-country.
- */const Ns={languageCode:"en-US",[Os["CONTEXTMENU_ITEMS_NO_ITEMS"]]:"No available options",[Os["CONTEXTMENU_ITEMS_ROW_ABOVE"]]:"Insert row above",[Os["CONTEXTMENU_ITEMS_ROW_BELOW"]]:"Insert row below",[Os["CONTEXTMENU_ITEMS_INSERT_LEFT"]]:"Insert column left",[Os["CONTEXTMENU_ITEMS_INSERT_RIGHT"]]:"Insert column right",[Os["CONTEXTMENU_ITEMS_REMOVE_ROW"]]:["Remove row","Remove rows"],[Os["CONTEXTMENU_ITEMS_REMOVE_COLUMN"]]:["Remove column","Remove columns"],[Os["CONTEXTMENU_ITEMS_UNDO"]]:"Undo",[Os["CONTEXTMENU_ITEMS_REDO"]]:"Redo",[Os["CONTEXTMENU_ITEMS_READ_ONLY"]]:"Read only",[Os["CONTEXTMENU_ITEMS_CLEAR_COLUMN"]]:"Clear column",[Os["CONTEXTMENU_ITEMS_ALIGNMENT"]]:"Alignment",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]]:"Left",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]]:"Center",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]]:"Right",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]]:"Justify",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]]:"Top",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]]:"Middle",[Os["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]]:"Bottom",[Os["CONTEXTMENU_ITEMS_FREEZE_COLUMN"]]:"Freeze column",[Os["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"]]:"Unfreeze column",[Os["CONTEXTMENU_ITEMS_BORDERS"]]:"Borders",[Os["CONTEXTMENU_ITEMS_BORDERS_TOP"]]:"Top",[Os["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]]:"Right",[Os["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]]:"Bottom",[Os["CONTEXTMENU_ITEMS_BORDERS_LEFT"]]:"Left",[Os["CONTEXTMENU_ITEMS_REMOVE_BORDERS"]]:"Remove border(s)",[Os["CONTEXTMENU_ITEMS_ADD_COMMENT"]]:"Add comment",[Os["CONTEXTMENU_ITEMS_EDIT_COMMENT"]]:"Edit comment",[Os["CONTEXTMENU_ITEMS_REMOVE_COMMENT"]]:"Delete comment",[Os["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]]:"Read-only comment",[Os["CONTEXTMENU_ITEMS_MERGE_CELLS"]]:"Merge cells",[Os["CONTEXTMENU_ITEMS_UNMERGE_CELLS"]]:"Unmerge cells",[Os["CONTEXTMENU_ITEMS_COPY"]]:"Copy",[Os["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"]]:["Copy with header","Copy with headers"],[Os["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"]]:["Copy with group header","Copy with group headers"],[Os["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"]]:["Copy header only","Copy headers only"],[Os["CONTEXTMENU_ITEMS_CUT"]]:"Cut",[Os["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"]]:"Insert child row",[Os["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"]]:"Detach from parent",[Os["CONTEXTMENU_ITEMS_HIDE_COLUMN"]]:["Hide column","Hide columns"],[Os["CONTEXTMENU_ITEMS_SHOW_COLUMN"]]:["Show column","Show columns"],[Os["CONTEXTMENU_ITEMS_HIDE_ROW"]]:["Hide row","Hide rows"],[Os["CONTEXTMENU_ITEMS_SHOW_ROW"]]:["Show row","Show rows"],[Os["FILTERS_CONDITIONS_NONE"]]:"None",[Os["FILTERS_CONDITIONS_EMPTY"]]:"Is empty",[Os["FILTERS_CONDITIONS_NOT_EMPTY"]]:"Is not empty",[Os["FILTERS_CONDITIONS_EQUAL"]]:"Is equal to",[Os["FILTERS_CONDITIONS_NOT_EQUAL"]]:"Is not equal to",[Os["FILTERS_CONDITIONS_BEGINS_WITH"]]:"Begins with",[Os["FILTERS_CONDITIONS_ENDS_WITH"]]:"Ends with",[Os["FILTERS_CONDITIONS_CONTAINS"]]:"Contains",[Os["FILTERS_CONDITIONS_NOT_CONTAIN"]]:"Does not contain",[Os["FILTERS_CONDITIONS_GREATER_THAN"]]:"Greater than",[Os["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"]]:"Greater than or equal to",[Os["FILTERS_CONDITIONS_LESS_THAN"]]:"Less than",[Os["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"]]:"Less than or equal to",[Os["FILTERS_CONDITIONS_BETWEEN"]]:"Is between",[Os["FILTERS_CONDITIONS_NOT_BETWEEN"]]:"Is not between",[Os["FILTERS_CONDITIONS_AFTER"]]:"After",[Os["FILTERS_CONDITIONS_BEFORE"]]:"Before",[Os["FILTERS_CONDITIONS_TODAY"]]:"Today",[Os["FILTERS_CONDITIONS_TOMORROW"]]:"Tomorrow",[Os["FILTERS_CONDITIONS_YESTERDAY"]]:"Yesterday",[Os["FILTERS_VALUES_BLANK_CELLS"]]:"Blank cells",[Os["FILTERS_DIVS_FILTER_BY_CONDITION"]]:"Filter by condition",[Os["FILTERS_DIVS_FILTER_BY_VALUE"]]:"Filter by value",[Os["FILTERS_LABELS_CONJUNCTION"]]:"And",[Os["FILTERS_LABELS_DISJUNCTION"]]:"Or",[Os["FILTERS_BUTTONS_SELECT_ALL"]]:"Select all",[Os["FILTERS_BUTTONS_CLEAR"]]:"Clear",[Os["FILTERS_BUTTONS_OK"]]:"OK",[Os["FILTERS_BUTTONS_CANCEL"]]:"Cancel",[Os["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"]]:"Search",[Os["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]]:"Value",[Os["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]]:"Second value",[Os["CHECKBOX_CHECKED"]]:"Checked",[Os["CHECKBOX_UNCHECKED"]]:"Unchecked"};var As=Ns;const Ls=Os,Is=As.languageCode,{register:xs,getItem:ks,hasItem:Ds,getValues:Hs}=Object(Ss["a"])("languagesDictionaries");function Ps(e,t){let n=e,r=t;return Object(c["isObject"])(e)&&(r=e,n=r.languageCode),js(n,r),xs(n,Object(c["deepClone"])(r)),Object(c["deepClone"])(r)}function js(e,t){e!==Is&&bs(t,ks(Is))}function Fs(e){return Ys(e)?Object(c["deepClone"])(ks(e)):null}function Ys(e){return Ds(e)}function Us(){return Hs()}function Vs(e,t,n){const r=Fs(e);if(null===r)return null;const i=r[t];if(Object(s["isUndefined"])(i))return null;const o=Bs(i,n);return Array.isArray(o)?o[0]:o}function Bs(e,t){let n=e;return Object(N["arrayEach"])(Rs(),r=>{n=r(e,t)}),n}function Ws(e){let t=_s(e);return Ys(t)||(t=Is,vs(e)),t}Ps(As);var Gs=n("a309");class zs{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}Object(c["mixin"])(zs,Xi["a"]);var Ks=zs;function Xs(e,t,n){return t=$s(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $s(e){var t=qs(e,"string");return"symbol"==typeof t?t:t+""}function qs(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Js extends Ks{constructor(e,t){super(e,null),Xs(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:n}=e,r=this.getNearestNotHiddenCoords(t,1),i=this.getNearestNotHiddenCoords(n,-1);return null===r||null===i?null:((r.row>i.row||r.col>i.col)&&(r=t,i=n),this.settings.createCellRange(r,r,i))}getNearestNotHiddenCoords(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const r=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===r)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,n);return null===i?null:this.settings.createCellCoords(r,i)}getNearestNotHiddenIndex(e,t,n){return t<0?t:e.getNearestNotHiddenIndex(t,n)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),n="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let s=null;if(null!==i&&null!==i.col&&null!==i.row||(s=this.getNearestNotHiddenCoords(t,n,r)),null!==s&&e.overlaps(s)){const t=e.highlight.clone();if(t.row>=0&&(t.row=s.row),t.col>=0&&(t.col=s.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==i&&null===s&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const n=this.settings.visualToRenderableCoords(e),r=this.settings.visualToRenderableCoords(t);return null===n.row||null===n.col||null===r.row||null===r.col?null:this.settings.createCellRange(n,n,r)}}var Qs=Js;function Zs(e){let{activeHeaderClassName:t,...n}=e;return new Qs({className:t,...n,selectionType:Gs["a"]})}function eo(e){let{areaCornerVisible:t,...n}=e;return new Qs({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...n,selectionType:Gs["b"]})}function to(e){let{...t}=e;return new Qs({className:"highlight",...t,selectionType:Gs["b"]})}function no(e){let{columnClassName:t,...n}=e;return new Qs({className:t,...n,selectionType:Gs["c"]})}function ro(e){let{cellCornerVisible:t,...n}=e;return new Qs({className:"current",headerAttributes:[Object(Pe["H"])()],border:{width:2,color:"#4b89ff",cornerVisible:t},...n,selectionType:Gs["f"]})}function io(e){let{border:t,visualCellRange:n,...r}=e;return new Qs({...t,...r,selectionType:Gs["d"]},n)}function so(e){let{...t}=e;return new Qs({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:Gs["e"]})}function oo(e){let{headerClassName:t,...n}=e;return new Qs({className:t,...n,selectionType:Gs["g"]})}function ao(e){let{rowClassName:t,...n}=e;return new Qs({className:t,...n,selectionType:Gs["h"]})}function lo(e,t){co(e,t),t.add(e)}function co(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function uo(e,t,n){return t=ho(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ho(e){var t=mo(e,"string");return"symbol"==typeof t?t:t+""}function mo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function fo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var po=new WeakSet;class go{constructor(e){lo(this,po),uo(this,"options",void 0),uo(this,"layerLevel",0),uo(this,"focus",void 0),uo(this,"fill",void 0),uo(this,"layeredAreas",new Map),uo(this,"areas",new Map),uo(this,"rowHeaders",new Map),uo(this,"columnHeaders",new Map),uo(this,"activeRowHeaders",new Map),uo(this,"activeColumnHeaders",new Map),uo(this,"activeCornerHeaders",new Map),uo(this,"rowHighlights",new Map),uo(this,"columnHighlights",new Map),uo(this,"customSelections",[]),this.options=e,this.focus=ro(e),this.fill=so(e)}isEnabledFor(e,t){let n=e;e===Gs["f"]&&(n="current");let r=this.options.disabledCellSelection(t.row,t.col);return"string"===typeof r&&(r=[r]),!1===r||Array.isArray(r)&&!r.includes(n)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return fo(po,this,yo).call(this,this.layeredAreas,eo)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return fo(po,this,yo).call(this,this.areas,to)}getAreas(){return[...this.areas.values()]}createRowHeader(){return fo(po,this,yo).call(this,this.rowHeaders,oo)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return fo(po,this,yo).call(this,this.columnHeaders,oo)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return fo(po,this,yo).call(this,this.activeRowHeaders,Zs)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return fo(po,this,yo).call(this,this.activeColumnHeaders,Zs)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return fo(po,this,yo).call(this,this.activeCornerHeaders,Zs)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return fo(po,this,yo).call(this,this.rowHighlights,ao)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return fo(po,this,yo).call(this,this.columnHighlights,no)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(io({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),Object(N["arrayEach"])(this.areas.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.layeredAreas.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.rowHeaders.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.columnHeaders.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.activeRowHeaders.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.activeColumnHeaders.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.activeCornerHeaders.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.rowHighlights.values(),e=>{e.clear()}),Object(N["arrayEach"])(this.columnHighlights.values(),e=>{e.clear()})}[Symbol.iterator](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}function yo(e,t){const n=this.layerLevel;if(e.has(n))return e.get(n);const r=t({layerLevel:n,...this.options});return e.set(n,r),r}var wo=go;function bo(e,t,n){return t=_o(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _o(e){var t=vo(e,"string");return"symbol"==typeof t?t:t+""}function vo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class So{constructor(e){bo(this,"ranges",[]),bo(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some(t=>t.includes(e))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}var Eo=So;function Co(e,t){Mo(e,t),t.add(e)}function To(e,t,n){Mo(e,t),t.set(e,n)}function Mo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ro(e,t){return e.get(No(e,t))}function Oo(e,t,n){return e.set(No(e,t),n),n}function No(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ao=new WeakMap,Lo=new WeakMap,Io=new WeakMap,xo=new WeakSet;class ko{constructor(e,t){Co(this,xo),To(this,Ao,void 0),To(this,Lo,void 0),To(this,Io,{x:0,y:0}),Oo(Ao,this,e),Oo(Lo,this,t)}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=Ro(Lo,this).createCellCoords(e,t);let i=Ro(Ao,this).current().highlight;const s=Ro(Lo,this).visualToRenderableCoords(i);let o=0,a=0;if(this.runLocalHooks("beforeTransformStart",r),null!==s.row&&null!==s.col){const{width:e,height:t}=No(xo,this,Ho).call(this),{row:s,col:l}=No(xo,this,Fo).call(this,i),u=Ro(Lo,this).fixedRowsBottom(),h=Ro(Lo,this).minSpareRows(),d=Ro(Lo,this).minSpareCols(),m=Ro(Lo,this).autoWrapRow(),f=Ro(Lo,this).autoWrapCol(),p=Ro(Lo,this).createCellCoords(s+r.row,l+r.col);if(p.row>=t){const r=Object(c["createObjectPropListener"])(n&&h>0&&0===u),i=p.col+1,s=Ro(Lo,this).createCellCoords(p.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",r,No(xo,this,Yo).call(this,s),i>=e),r.value?this.runLocalHooks("insertRowRequire",Ro(Lo,this).countRenderableRows()):f&&p.assign(s)}else if(p.row<0){const n=Object(c["createObjectPropListener"])(f),r=p.col-1,i=Ro(Lo,this).createCellCoords(t+p.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",n,No(xo,this,Yo).call(this,i),r<0),f&&p.assign(i)}if(p.col>=e){const r=Object(c["createObjectPropListener"])(n&&d>0),i=p.row+1,s=Ro(Lo,this).createCellCoords(i>=t?i-t:i,p.col-e);this.runLocalHooks("beforeRowWrap",r,No(xo,this,Yo).call(this,s),i>=t),r.value?this.runLocalHooks("insertColRequire",Ro(Lo,this).countRenderableColumns()):m&&p.assign(s)}else if(p.col<0){const n=Object(c["createObjectPropListener"])(m),r=p.row-1,i=Ro(Lo,this).createCellCoords(r<0?t+r:r,e+p.col);this.runLocalHooks("beforeRowWrap",n,No(xo,this,Yo).call(this,i),r<0),m&&p.assign(i)}const{rowDir:g,colDir:y}=No(xo,this,Do).call(this,p);o=g,a=y,i=No(xo,this,Yo).call(this,p)}return this.runLocalHooks("afterTransformStart",i,o,a),i}transformEnd(e,t){const n=Ro(Lo,this).createCellCoords(e,t),r=Ro(Ao,this).current(),i=Ro(Lo,this).visualToRenderableCoords(r.highlight),s=No(xo,this,Po).call(this,r.to.row,r.from.row),o=No(xo,this,jo).call(this,r.to.col,r.from.col),a=r.to.clone();let l=0,c=0;if(this.runLocalHooks("beforeTransformEnd",n),null!==i.row&&null!==i.col&&null!==s&&null!==o){const{row:e,col:t}=No(xo,this,Fo).call(this,r.highlight),i=Ro(Lo,this).createCellCoords(s+n.row,o+n.col),u=r.getTopStartCorner(),h=r.getTopEndCorner(),d=r.getBottomEndCorner(),m={row:i.row-e,col:i.col-t};n.col<0?o>=t&&i.col<t&&(i.col=No(xo,this,jo).call(this,u.col,h.col)+m.col):n.col>0&&o<=t&&i.col>t&&(i.col=No(xo,this,jo).call(this,h.col,u.col)+m.col),n.row<0?s>=e&&i.row<e&&(i.row=No(xo,this,Po).call(this,u.row,d.row)+m.row):n.row>0&&s<=e&&i.row>e&&(i.row=No(xo,this,Po).call(this,d.row,u.row)+m.row);const{rowDir:f,colDir:p}=No(xo,this,Do).call(this,i);l=f,c=p;const g=No(xo,this,Yo).call(this,i);0===n.row&&0!==n.col?a.col=g.col:0!==n.row&&0===n.col?a.row=g.row:(a.row=g.row,a.col=g.col)}return this.runLocalHooks("afterTransformEnd",a,l,c),a}setOffsetSize(e){let{x:t,y:n}=e;Oo(Io,this,{x:t,y:n})}}function Do(e){const{width:t,height:n}=No(xo,this,Ho).call(this);let r=0,i=0;return e.row<0?(r=-1,e.row=0):e.row>0&&e.row>=n&&(r=1,e.row=n-1),e.col<0?(i=-1,e.col=0):e.col>0&&e.col>=t&&(i=1,e.col=t-1),{rowDir:r,colDir:i}}function Ho(){return{width:Ro(Io,this).x+Ro(Lo,this).countRenderableColumns(),height:Ro(Io,this).y+Ro(Lo,this).countRenderableRows()}}function Po(e,t){const n=Ro(Lo,this).findFirstNonHiddenRenderableRow(e,t);return null===n?null:Ro(Io,this).y+n}function jo(e,t){const n=Ro(Lo,this).findFirstNonHiddenRenderableColumn(e,t);return null===n?null:Ro(Io,this).x+n}function Fo(e){const{row:t,col:n}=Ro(Lo,this).visualToRenderableCoords(e);if(null===t||null===n)throw new Error("Renderable coords are not visible.");return Ro(Lo,this).createCellCoords(Ro(Io,this).y+t,Ro(Io,this).x+n)}function Yo(e){const t=e.clone();return t.col=e.col-Ro(Io,this).x,t.row=e.row-Ro(Io,this).y,Ro(Lo,this).renderableToVisualCoords(t)}Object(c["mixin"])(ko,Xi["a"]);var Uo=ko,Vo=n("a952");function Bo(e,t,n){Wo(e,t),t.set(e,n)}function Wo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Go(e,t,n){return t=zo(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zo(e){var t=Ko(e,"string");return"symbol"==typeof t?t:t+""}function Ko(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Xo(e,t){return e.get(qo(e,t))}function $o(e,t,n){return e.set(qo(e,t),n),n}function qo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Jo=new WeakMap,Qo=new WeakMap,Zo=new WeakMap,ea=new WeakMap,ta=new WeakMap,na=new WeakMap;class ra{constructor(e,t){var n=this;Go(this,"settings",void 0),Go(this,"tableProps",void 0),Go(this,"inProgress",!1),Go(this,"selectedRange",new Eo((e,t,n)=>this.tableProps.createCellRange(e,t,n))),Go(this,"highlight",void 0),Bo(this,Jo,void 0),Bo(this,Qo,void 0),Go(this,"selectedByRowHeader",new Set),Go(this,"selectedByColumnHeader",new Set),Bo(this,Zo,!1),Bo(this,ea,!1),Bo(this,ta,"unknown"),Bo(this,na,-1),this.settings=e,this.tableProps=t,this.highlight=new wo({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[Object(Pe["H"])()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return n.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return n.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,n)=>this.tableProps.createCellRange(e,t,n)}),$o(Jo,this,new Uo(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return n.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return n.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol})),$o(Qo,this,new Uo(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableRowsInRange(0,e.getOuterBottomEndCorner().row)},countRenderableColumns:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableColumnsInRange(0,e.getOuterBottomEndCorner().col)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return n.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return n.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),Xo(Jo,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformStart",...t)})),Xo(Jo,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformStart",...t)})),Xo(Jo,this).addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformEnd",...t)})),Xo(Jo,this).addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformEnd",...t)})),Xo(Jo,this).addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("insertRowRequire",...t)})),Xo(Jo,this).addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("insertColRequire",...t)})),Xo(Jo,this).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeRowWrap",...t)})),Xo(Jo,this).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeColumnWrap",...t)})),Xo(Qo,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformFocus",...t)})),Xo(Qo,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformFocus",...t)}))}getSelectedRange(){return this.selectedRange}markSource(e){$o(ta,this,e)}markEndSource(){$o(ta,this,"unknown")}getSelectionSource(){return Xo(ta,this)}setExpectedLayers(e){$o(na,this,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,$o(na,this,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const i="multiple"===this.settings.selectionMode,o=Object(s["isUndefined"])(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,a=e.clone();$o(Zo,this,!1),this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),a),(!i||i&&!o&&Object(s["isUndefined"])(t))&&this.selectedRange.clear(),this.selectedRange.add(a).current().setHighlight(r.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),n||this.setRangeEnd(e)}setRangeStartOnly(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,n)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),n=this.tableProps.countRows(),r=this.tableProps.countCols(),i=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((n>0||r>0)&&(0===n&&t.col<0&&!i||0===r&&t.row<0&&!i))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const s=this.selectedRange.current();if(this.settings.navigableHeaders||s.highlight.normalize(),"single"===this.settings.selectionMode)s.setFrom(s.highlight),s.setTo(s.highlight);else{const e=s.getHorizontalDirection(),n=s.getVerticalDirection(),r=this.isMultiple();s.setTo(t),r&&(e!==s.getHorizontalDirection()||1===s.getWidth()&&!s.includes(s.highlight))&&s.from.assign({col:s.highlight.col}),r&&(n!==s.getVerticalDirection()||1===s.getHeight()&&!s.includes(s.highlight))&&s.from.assign({row:s.highlight.row})}n>0&&r>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!s.isSingleHeader())&&s.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.selectedRange.current().highlight);const o=this.getLayerLevel();o<this.highlight.layerLevel&&(Object(N["arrayEach"])(this.highlight.getAreas(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getLayeredAreas(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getRowHeaders(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getColumnHeaders(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getActiveRowHeaders(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getActiveColumnHeaders(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getActiveCornerHeaders(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getRowHighlights(),e=>{e.clear()}),Object(N["arrayEach"])(this.highlight.getColumnHighlights(),e=>{e.clear()})),this.highlight.useLayerLevel(o);const a=this.highlight.createArea(),l=this.highlight.createLayeredArea(),c=this.highlight.createRowHeader(),u=this.highlight.createColumnHeader(),h=this.highlight.createActiveRowHeader(),d=this.highlight.createActiveColumnHeader(),m=this.highlight.createActiveCornerHeader(),f=this.highlight.createRowHighlight(),p=this.highlight.createColumnHighlight();if(a.clear(),l.clear(),c.clear(),u.clear(),h.clear(),d.clear(),m.clear(),f.clear(),p.clear(),this.highlight.isEnabledFor(Gs["b"],s.highlight)&&(this.isMultiple()||o>=1)&&(a.add(s.from).add(s.to).commit(),l.add(s.from).add(s.to).commit(),1===o)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(o-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(o)}if(this.highlight.isEnabledFor(Gs["g"],s.highlight)){if(!s.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(s.from.row,0),-1),t=this.tableProps.createCellCoords(s.to.row,-1),n=this.tableProps.createCellCoords(-1,Math.max(s.from.col,0)),r=this.tableProps.createCellCoords(-1,s.to.col);"single"===this.settings.selectionMode?(c.add(e).commit(),u.add(n).commit(),f.add(e).commit(),p.add(n).commit()):(c.add(e).add(t).commit(),u.add(n).add(r).commit(),f.add(e).add(t).commit(),p.add(n).add(r).commit())}const e=!Xo(ea,this)&&this.isEntireRowSelected()&&(r>0&&r===s.getWidth()||0===r&&this.isSelectedByRowHeader()),t=!Xo(ea,this)&&this.isEntireColumnSelected()&&(n>0&&n===s.getHeight()||0===n&&this.isSelectedByColumnHeader());e&&h.add(this.tableProps.createCellCoords(Math.max(s.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(s.to.row,0),-1)).commit(),t&&d.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(s.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(s.to.col,0))).commit(),e&&t&&m.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}const g=-1===Xo(na,this)||this.selectedRange.size()===Xo(na,this);this.runLocalHooks("afterSetRangeEnd",e,g)}setRangeFocus(e){if(this.selectedRange.isEmpty())return;const t=this.selectedRange.current();this.inProgress||this.runLocalHooks("beforeSetFocus",e);const n=this.highlight.getFocus();n.clear(),t.setHighlight(e),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(Gs["f"],t.highlight)&&n.add(t.highlight).commit().syncWith(t),this.inProgress||($o(Zo,this,!0),this.runLocalHooks("afterSetFocus",t.highlight))}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders&&Xo(Jo,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}),this.setRangeStart(Xo(Jo,this).transformStart(e,t,n))}transformEnd(e,t){this.settings.navigableHeaders&&Xo(Jo,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}),this.setRangeEnd(Xo(Jo,this).transformEnd(e,t))}transformFocus(e,t){const n=this.selectedRange.current(),{row:r,col:i}=n.getOuterTopStartCorner(),s=this.tableProps.countRenderableColumnsInRange(0,i-1),o=this.tableProps.countRenderableRowsInRange(0,r-1);n.highlight.isHeader()?Xo(Qo,this).setOffsetSize({x:i<0?Math.abs(i):-s,y:r<0?Math.abs(r):-o}):Xo(Qo,this).setOffsetSize({x:i<0?0:-s,y:r<0?0:-o});const a=Xo(Qo,this).transformStart(e,t);this.setRangeFocus(a.normalize())}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){if(!this.isSelected())return!1;const e=Object(c["createObjectPropListener"])(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&Xo(Zo,this)}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),n=this.tableProps.countRowHeaders(),r=this.tableProps.countCols();return(n>0&&t<0||0===n)&&e.getWidth()===r};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));const n=this.selectedRange.peekByIndex(e);return!!n&&t(n)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),n=this.tableProps.countColHeaders(),r=this.tableProps.countRows();return(n>0&&t<0||0===n)&&e.getHeight()===r};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));const n=this.selectedRange.peekByIndex(e);return!!n&&t(n)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),s=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),l=n?-a:0,c=t?-o:0;if(0===l&&0===c&&(0===i||0===s))return;let u=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:h,disableHeadersHighlight:d}=r;$o(ea,this,d),h&&Number.isInteger(null===h||void 0===h?void 0:h.row)&&Number.isInteger(null===h||void 0===h?void 0:h.col)&&(u=this.tableProps.createCellCoords(Object(H["clamp"])(h.row,l,i-1),Object(H["clamp"])(h.col,c,s-1)));const m=this.tableProps.createCellCoords(l,c),f=this.tableProps.createCellCoords(i-1,s-1);this.clear(),this.setRangeStartOnly(m,void 0,u),c<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.finish(),$o(ea,this,!1)}selectCells(e){var t=this;const n=Object(Vo["c"])(e);if(n===Vo["a"])return!1;if(n===Vo["b"])throw new Error(Be["a"]`Unsupported format of the selection ranges was passed. To select cells pass\x20
- the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
- columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const r=Object(Vo["d"])(n,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),i=this.settings.navigableHeaders,s={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},o=!e.some(e=>{const t=r(e),n=t.isValid(s);return!(n&&!t.containsHeaders()||n&&t.containsHeaders()&&t.isSingleHeader())});return o&&(this.clear(),this.setExpectedLayers(e.length),Object(N["arrayEach"])(e,e=>{const{from:t,to:n}=r(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(n.clone())}),this.finish()),o}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r="string"===typeof e?this.tableProps.propToCol(e):e,i="string"===typeof t?this.tableProps.propToCol(t):t,s=this.tableProps.countRows(),o=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,c=this.tableProps.createCellCoords(l,r),u=this.tableProps.createCellCoords(s-1,i),h=this.tableProps.createCellRange(c,c,u).isValid({countRows:s,countCols:o,countRowHeaders:0,countColHeaders:a});if(h){let e=0,t=0;Number.isInteger(null===n||void 0===n?void 0:n.row)&&Number.isInteger(null===n||void 0===n?void 0:n.col)?(e=Object(H["clamp"])(n.row,l,s-1),t=Object(H["clamp"])(n.col,Math.min(r,i),Math.max(r,i))):(e=Object(H["clamp"])(n,l,s-1),t=r);const o=this.tableProps.createCellCoords(e,t),c=0===a?0:Object(H["clamp"])(o.row,l,-1),u=s-1,h=this.tableProps.createCellCoords(c,r),d=this.tableProps.createCellCoords(u,i);this.runLocalHooks("beforeSelectColumns",h,d,o),h.row=c,d.row=u,this.setRangeStartOnly(h,void 0,o),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectColumns",h,d,o),this.finish()}return h}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),o=0===s?0:-s,a=this.tableProps.createCellCoords(e,o),l=this.tableProps.createCellCoords(t,i-1),c=this.tableProps.createCellRange(a,a,l).isValid({countRows:r,countCols:i,countRowHeaders:s,countColHeaders:0});if(c){let r=0,a=0;Number.isInteger(null===n||void 0===n?void 0:n.row)&&Number.isInteger(null===n||void 0===n?void 0:n.col)?(r=Object(H["clamp"])(n.row,Math.min(e,t),Math.max(e,t)),a=Object(H["clamp"])(n.col,o,i-1)):(r=e,a=Object(H["clamp"])(n,o,i-1));const l=this.tableProps.createCellCoords(r,a),c=0===s?0:Object(H["clamp"])(l.col,o,-1),u=i-1,h=this.tableProps.createCellCoords(e,c),d=this.tableProps.createCellCoords(t,u);this.runLocalHooks("beforeSelectRows",h,d,l),h.col=c,d.col=u,this.setRangeStartOnly(h,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectRows",h,d,l),this.finish()}return c}refresh(){const e=this.highlight.getCustomSelections();if(e.forEach(e=>{e.commit()}),!this.isSelected())return;const t=this.highlight.getFocus(),n=this.getLayerLevel();t.commit().syncWith(this.selectedRange.current());for(let r=0;r<this.selectedRange.size();r+=1){this.highlight.useLayerLevel(r);const e=this.highlight.createArea(),t=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),s=this.highlight.createActiveRowHeader(),o=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),c=this.highlight.createColumnHighlight();e.commit(),t.commit(),n.commit(),i.commit(),s.commit(),o.commit(),a.commit(),l.commit(),c.commit()}this.highlight.useLayerLevel(n)}}Object(c["mixin"])(ra,Xi["a"]);var ia=ra,sa=n("76ab");function oa(e,t){var n;return"CELL_TYPE"!==e&&((null===(n=t._automaticallyAssignedMetaProps)||void 0===n?void 0:n.has(e))||!Object(c["hasOwnProperty"])(t,e))}function aa(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"===typeof t.type?Object(sa["a"])(t.type):t.type;if(e._automaticallyAssignedMetaProps&&Object(c["objectEach"])(t,(t,n)=>{e._automaticallyAssignedMetaProps.delete(n)}),!Object(c["isObject"])(r))return;n!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};Object(c["objectEach"])(r,(t,r)=>{var s;oa(r,n)&&(i[r]=t,null===(s=e._automaticallyAssignedMetaProps)||void 0===s||s.add(r))}),Object(c["extend"])(e,i)}function la(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}Object(c["inherit"])(n,e);for(let r=0;r<t.length;r++)n.prototype[t[r]]=void 0;return n}function ca(e){return Number.isInteger(e)&&e>=0}function ua(e,t){if(!e())throw new Error("Assertion failed: "+t)}function ha(e){return null===e||void 0===e}var da=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,n,r;for(t=0,n=this.countRows();t<n;t++)if(r=this.getDataAtCell(t,e),!1===Object(s["isEmpty"])(r))return!1;return!0},isEmptyRow(e){let t,n,r,i;for(t=0,n=this.countCols();t<n;t++)if(r=this.getDataAtCell(e,t),!1===Object(s["isEmpty"])(r))return"object"===typeof r&&(i=this.getCellMeta(e,t),Object(c["isObjectEqual"])(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0});function ma(e,t,n){return t=fa(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fa(e){var t=pa(e,"string");return"symbol"==typeof t?t:t+""}function pa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ga(){return class{}}class ya{constructor(e){ma(this,"metaCtor",ga()),ma(this,"meta",void 0),this.meta=this.metaCtor.prototype,Object(c["extend"])(this.meta,da()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;Object(c["extend"])(this.meta,e),aa(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}function wa(e,t,n){return t=ba(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ba(e){var t=_a(e,"string");return"symbol"==typeof t?t:t+""}function _a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class va{constructor(e){wa(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){Object(c["extend"])(this.meta,e),aa(this.meta,e,e)}}function Sa(e,t,n){return t=Ea(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ea(e){var t=Ca(e,"string");return"symbol"==typeof t?t:t+""}function Ca(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ta{constructor(e){Sa(this,"valueFactory",void 0),Sa(this,"data",[]),Sa(this,"index",[]),Sa(this,"holes",new Set),this.valueFactory=e}obtain(e){ua(()=>ca(e),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let n;if(t>=0)n=this.data[t],void 0===n&&(n=this.valueFactory(e),this.data[t]=n);else if(n=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=n,this.index[e]=t}else this.data.push(n),this.index[e]=this.data.length-1;return n}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;ua(()=>ca(e)||ha(e),"Expecting an unsigned number or null/undefined argument.");const n=[],r=this.data.length;for(let s=0;s<t;s++)n.push(r+s),this.data.push(void 0);const i=ha(e)?this.index.length:e;this.index=[...this.index.slice(0,i),...n,...this.index.slice(i)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;ua(()=>ca(e)||ha(e),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice(ha(e)?this.index.length-t:e,t);for(let r=0;r<n.length;r++){const e=n[r];"number"===typeof e&&this.holes.add(e)}}size(){return this.data.length-this.holes.size}values(){return Object(N["arrayFilter"])(this.data,(e,t)=>!this.holes.has(t))[Symbol.iterator]()}entries(){const e=[];for(let n=0;n<this.data.length;n++){const t=this._getKeyByStorageIndex(n);-1!==t&&e.push([t,this.data[n]])}let t=0;return{next:()=>{if(t<e.length){const n=e[t];return t+=1,{value:n,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}function Ma(e,t,n){return t=Ra(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ra(e){var t=Oa(e,"string");return"symbol"==typeof t?t:t+""}function Oa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Na=["data","width"];class Aa{constructor(e){Ma(this,"globalMeta",void 0),Ma(this,"metas",new Ta(()=>this._createMeta())),this.globalMeta=e,this.metas=new Ta(()=>this._createMeta())}updateMeta(e,t){const n=this.getMeta(e);Object(c["extend"])(n,t),aa(n,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return la(this.globalMeta.getMetaConstructor(),Na).prototype}}function La(e,t,n){return t=Ia(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ia(e){var t=xa(e,"string");return"symbol"==typeof t?t:t+""}function xa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ka{constructor(e){La(this,"columnMeta",void 0),La(this,"metas",new Ta(()=>this._createRow())),this.columnMeta=e}updateMeta(e,t,n){const r=this.getMeta(e,t);Object(c["extend"])(r,n),aa(r,n)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).remove(e,t)}getMeta(e,t,n){const r=this.metas.obtain(e).obtain(t);return void 0===n?r:r[n]}setMeta(e,t,n,r){var i;const s=this.metas.obtain(e).obtain(t);null===(i=s._automaticallyAssignedMetaProps)||void 0===i||i.delete(n),s[n]=r}removeMeta(e,t,n){const r=this.metas.obtain(e).obtain(t);delete r[n]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let n=0;n<t.length;n++)Object(s["isDefined"])(t[n])&&e.push(...t[n].values());return e}getMetasAtRow(e){ua(()=>ca(e),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new Ta(e=>this._createMeta(e))}_createMeta(e){const t=this.columnMeta.getMetaConstructor(e);return new t}}class Da{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new ya(e),this.tableMeta=new va(this.globalMeta),this.columnMeta=new Aa(this.globalMeta),this.cellMeta=new ka(this.columnMeta),n.forEach(e=>new e(this)),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,n){let{visualRow:r,visualColumn:i}=n;const s=this.cellMeta.getMeta(e,t);return s.visualRow=r,s.visualCol=i,s.row=e,s.col=t,this.runLocalHooks("afterGetCellMeta",s),s}getCellMetaKeyValue(e,t,n){if("string"!==typeof n)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,n)}setCellMeta(e,t,n,r){this.cellMeta.setMeta(e,t,n,r)}updateCellMeta(e,t,n){this.cellMeta.updateMeta(e,t,n)}removeCellMeta(e,t,n){this.cellMeta.removeMeta(e,t,n)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}function Ha(e,t,n){return t=Pa(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pa(e){var t=ja(e,"string");return"symbol"==typeof t?t:t+""}function ja(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object(c["mixin"])(Da,Xi["a"]);class Fa{constructor(e){Ha(this,"metaManager",void 0),Ha(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>this.extendCellMeta(e)),ws["a"].getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot)}extendCellMeta(e){var t;const{row:n,col:r}=e;if(null!==(t=this.metaSyncMemo.get(n))&&void 0!==t&&t.has(r))return;const{visualRow:s,visualCol:o}=e,a=this.metaManager.hot,l=a.colToProp(o);e.prop=l,a.runHooks("beforeGetCellMeta",s,o,e);const u=Object(c["hasOwnProperty"])(e,"type")?e.type:null;let h=Object(i["isFunction"])(e.cells)?e.cells(n,r,l):null;var d;u&&(h?h.type=null!==(d=h.type)&&void 0!==d?d:u:h={type:u});h&&this.metaManager.updateCellMeta(n,r,h),a.runHooks("afterGetCellMeta",s,o,e),this.metaSyncMemo.has(n)||this.metaSyncMemo.set(n,new Set),this.metaSyncMemo.get(n).add(r)}}function Ya(e,t,n){return t=Ua(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ua(e){var t=Va(e,"string");return"symbol"==typeof t?t:t+""}function Va(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ba{constructor(e){Ya(this,"metaManager",void 0),Ya(this,"usageTracker",new Set),Ya(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,n){if(!n)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){const t=this.metaManager.hot.isRtl();if(t&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,n){if(!n)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach((e,t)=>{const{target:n,onChange:r=(()=>{})}=e,i="string"===typeof n,s=i?n:t,o="_"+s;this.metaManager.globalMeta.meta[o]=this.metaManager.globalMeta.meta[s],this.installPropWatcher(t,o,r),i&&this.installPropWatcher(n,o,r)})}installPropWatcher(e,t,n){const r=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(i){const s=!r.usageTracker.has(e);r.usageTracker.add(e),n.call(r,e,i,s),this[t]=i},enumerable:!0,configurable:!0})}}var Wa=n("3bc4");function Ga(e,t,n){return t=za(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function za(e){var t=Ka(e,"string");return"symbol"==typeof t?t:t+""}function Ka(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Xa{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,n){Ga(this,"hot",void 0),Ga(this,"metaManager",void 0),Ga(this,"tableMeta",void 0),Ga(this,"dataSource",void 0),Ga(this,"duckSchema",void 0),Ga(this,"colToPropCache",void 0),Ga(this,"propToColCache",void 0),this.hot=e,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if("undefined"===typeof e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let n;if(this.colToPropCache=[],this.propToColCache=new Map,t){let r=0,i=0,s=!1;if("function"===typeof t){const t=Object(c["deepObjectSize"])(e);r=t>0?t:this.countFirstRowKeys(),s=!0}else{const e=this.tableMeta.maxCols;r=Math.min(e,t.length)}for(n=0;n<r;n++){const e=s?t(n):t[n];if(Object(c["isObject"])(e)){if("undefined"!==typeof e.data){const t=s?i:n;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}i+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return Object(Oi["countFirstRowKeys"])(this.dataSource)}recursiveDuckColumns(e,t,n){let r,i=t,s=n;return"undefined"===typeof i&&(i=0,s=""),"object"!==typeof e||Array.isArray(e)||Object(c["objectEach"])(e,(e,t)=>{null===e?(r=s+t,this.colToPropCache.push(r),this.propToColCache.set(r,i),i+=1):i=this.recursiveDuckColumns(e,i,t+".")}),i}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&Object(s["isDefined"])(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if(Object(s["isDefined"])(t))return this.hot.toVisualColumn(t);const n=this.hot.toVisualColumn(e);return null===n?e:n}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"===typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?Object(c["duckSchema"])(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:r="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let s=i,o=0,a=e;("number"!==typeof a||a>=i)&&(a=i),a<this.hot.countRows()&&(s=this.hot.toPhysicalRow(a));const l=this.hot.runHooks("beforeCreateRow",a,t,n);if(!1===l||null===s)return{delta:0};const u=this.tableMeta.maxRows,h=this.getSchema().length,d=[];while(o<t&&i+o<u){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=Object(c["deepClone"])(this.getSchema()):(e=[],Object(H["rangeEach"])(h-1,()=>e.push(null))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+o):(e={},Object(c["deepExtend"])(e,this.getSchema())),d.push(e),o+=1}this.hot.rowIndexMapper.insertIndexes(a,o),"below"===r&&(s=Math.min(s+1,i)),this.spliceData(s,0,d);const m=this.hot.toVisualRow(s);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),o>0&&(void 0===e||null===e?this.metaManager.createRow(null,o):"auto"!==n&&this.metaManager.createRow(s,t)),this.hot.runHooks("afterCreateRow",m,o,n),this.hot.forceFullRender=!0,{delta:o,startPhysicalIndex:s}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:r="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.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.");const i=this.dataSource,s=this.tableMeta.maxCols,o=this.hot.countSourceCols();let a=e;("number"!==typeof a||a>=o)&&(a=o);const l=this.hot.runHooks("beforeCreateCol",a,t,n);if(!1===l)return{delta:0};let c=o;a<this.hot.countCols()&&(c=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),d=0,m=c;"end"===r&&(m=Math.min(m+1,o));const f=m;while(d<t&&h<s){if("number"!==typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)"undefined"===typeof i[e]&&(i[e]=[]),i[e].push(null);else i.push([null]);else for(let e=0;e<u;e++)i[e].splice(m,0,null);d+=1,m+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,d),d>0&&(void 0===e||null===e?this.metaManager.createColumn(null,d):"auto"!==n&&this.metaManager.createColumn(f,t));const p=this.hot.toVisualColumn(f);return this.hot.runHooks("afterCreateCol",p,d,n),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:f}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r=Number.isInteger(e)?e:-t;const i=this.visualRowsToPhysical(r,t),o=this.hot.countSourceRows();r=(o+r)%o;const a=this.hot.runHooks("beforeRemoveRow",r,i.length,i,n);if(!1===a)return!1;const l=i.length;if(this.filterData(r,l,i),r<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const e=Object(s["isDefined"])(this.tableMeta.columns)||Object(s["isDefined"])(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}const c=i.slice(0).sort((e,t)=>t-e);return c.forEach(e=>{this.metaManager.removeRow(e,1)}),this.hot.runHooks("afterRemoveRow",r,l,i,n),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let r="number"!==typeof e?-t:e;r=(this.hot.countCols()+r)%this.hot.countCols();const i=this.visualColumnsToPhysical(r,t),s=i.slice(0).sort((e,t)=>t-e),o=this.hot.runHooks("beforeRemoveCol",r,t,i,n);if(!1===o)return!1;let a=!0;const l=s.length,c=this.dataSource;for(let u=0;u<l;u++)a&&i[0]!==i[u]-u&&(a=!1);if(a)for(let u=0,h=this.hot.countSourceRows();u<h;u++)c[u].splice(i[0],t),0===u&&this.metaManager.removeColumn(i[0],t);else for(let u=0,h=this.hot.countSourceRows();u<h;u++)for(let e=0;e<l;e++)c[u].splice(s[e],1),0===u&&this.metaManager.removeColumn(s[e],1);return r<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",r,t,i,n),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,n){const r=this.hot.getDataAtCol(e),i=r.slice(t,t+n),s=r.slice(t+n);for(var o=arguments.length,a=new Array(o>3?o-3:0),l=3;l<o;l++)a[l-3]=arguments[l];Object(N["extendArray"])(a,s);let c=0;while(c<n)a.push(null),c+=1;return Object(N["to2dArray"])(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),i}spliceRow(e,t,n){const r=this.hot.getSourceDataAtRow(e),i=r.slice(t,t+n),s=r.slice(t+n);for(var o=arguments.length,a=new Array(o>3?o-3:0),l=3;l<o;l++)a[l-3]=arguments[l];Object(N["extendArray"])(a,s);let c=0;while(c<n)a.push(null),c+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),i}spliceData(e,t,n){const r=this.hot.runHooks("beforeDataSplice",e,t,n);if(!1!==r){const t=[...this.dataSource.slice(0,e),...n,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach(e=>this.dataSource.push(e))}}filterData(e,t,n){let r=this.hot.runHooks("filterData",e,t,n);!1===Array.isArray(r)&&(r=this.dataSource.filter((e,t)=>-1===n.indexOf(t))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,r)}get(e,t){const n=this.hot.toPhysicalRow(e);let r=this.dataSource[n];const i=this.hot.runHooks("modifyRowData",n);r=isNaN(i)?i:r;let s=null;if(r&&r.hasOwnProperty&&Object(c["hasOwnProperty"])(r,t))s=r[t];else if("string"===typeof t&&t.indexOf(".")>-1){const e=t.split(".");let n=r;if(!n)return null;for(let t=0,r=e.length;t<r;t++)if(n=n[e[t]],"undefined"===typeof n)return null;s=n}else"function"===typeof t&&(s=t(this.dataSource.slice(n,n+1)[0]));if(this.hot.hasHook("modifyData")){const e=Object(c["createObjectPropListener"])(s);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"get"),e.isTouched()&&(s=e.value)}return s}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,n){const r=this.hot.toPhysicalRow(e);let i=n,s=this.dataSource[r];const o=this.hot.runHooks("modifyRowData",r);if(s=isNaN(o)?o:s,this.hot.hasHook("modifyData")){const e=Object(c["createObjectPropListener"])(i);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"set"),e.isTouched()&&(i=e.value)}if(s&&s.hasOwnProperty&&Object(c["hasOwnProperty"])(s,t))s[t]=i;else if("string"===typeof t&&t.indexOf(".")>-1){const e=t.split(".");let n,r=s,o=0;for(o=0,n=e.length-1;o<n;o++)"undefined"===typeof r[e[o]]&&(r[e[o]]={}),r=r[e[o]];r[e[o]]=i}else"function"===typeof t?t(this.dataSource.slice(r,r+1)[0],i):s[t]=i}visualRowsToPhysical(e,t){const n=this.hot.countSourceRows(),r=[];let i,s=(n+e)%n,o=t;while(s<n&&o)i=this.hot.toPhysicalRow(s),r.push(i),o-=1,s+=1;return r}visualColumnsToPhysical(e,t){const n=this.hot.countCols(),r=[];let i=(n+e)%n,s=t;while(i<n&&s){const e=this.hot.toPhysicalColumn(i);r.push(e),s-=1,i+=1}return r}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(n,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!==0||this.hot.countSourceRows()?this.getRange(e,t,Xa.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,n){const r=[];let i,s,o;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const c=n===Xa.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,u=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),h=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=u;i++){o=[];const n=i>=0?this.hot.toPhysicalRow(i):i;for(s=Math.min(e.col,t.col);s<=h;s++){if(null===n)break;o.push(c.call(this,i,this.colToProp(s)))}null!==n&&r.push(o)}return r}getText(e,t){return Object(Wa["b"])(this.getRange(e,t,Xa.DESTINATION_RENDERER))}getCopyableText(e,t){return Object(Wa["b"])(this.getRange(e,t,Xa.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var $a=Xa;function qa(e,t,n,s){const{hotInstance:o,dataMap:a,dataSource:l,internalSource:u,source:h,metaManager:d,firstRun:m}=s,f=Object(D["toUpperCaseFirst"])(u),p=o.getSettings();Array.isArray(p.dataSchema)?o.dataType="array":Object(i["isFunction"])(p.dataSchema)?o.dataType="function":o.dataType="object",a&&a.destroy(),e=o.runHooks("before"+f,e,m,h);const g=new $a(o,e,d);if(t(g),"object"===typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${u} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=g.getSchema();let n;e=[];let r=0,i=0;for(r=0,i=p.startRows;r<i;r++)if("object"!==o.dataType&&"function"!==o.dataType||!p.dataSchema)if("array"===o.dataType)n=Object(c["deepClone"])(t[0]),e.push(n);else{n=[];for(let e=0,t=p.startCols;e<t;e++)n.push(null);e.push(n)}else n=Object(c["deepClone"])(t),e.push(n)}}Array.isArray(e[0])&&(o.dataType="array"),p.data=e,g.dataSource=e,l.data=e,l.dataType=o.dataType,l.colToProp=g.colToProp.bind(g),l.propToCol=g.propToCol.bind(g),l.countCachedColumns=g.countCachedColumns.bind(g),n(g),o.runHooks("after"+f,e,m,h),m||(o.runHooks("afterChange",null,u),o.render()),o.getSettings().ariaTags&&Object(r["setAttribute"])(o.rootElement,[Object(Pe["B"])(-1),Object(Pe["e"])(o.countCols()+(o.view?o.countRowHeaders():0))])}function Ja(e){return t=>{let{col:n}=t;e.scrollViewportTo({col:n})}}function Qa(){return()=>{}}function Za(e){return t=>{e.scrollViewportTo(t.toObject())}}function el(e){return t=>{e.scrollViewportTo(t.toObject())}}function tl(e){return t=>{e.scrollViewportTo(t.toObject())}}function nl(e){return t=>{let{row:n}=t;e.scrollViewportTo({row:n})}}function rl(e){return t=>{const n=e.selection.getSelectionSource(),{row:r,col:i}=t;if(r<0&&i>=0)e.scrollViewportTo({col:i});else if(i<0&&r>=0)e.scrollViewportTo({row:r});else{if("mouse"===n&&(i===e.view.getLastPartiallyVisibleColumn()||r===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:r,col:i})}}}function il(e){const{selection:t}=e;let n=!1,r=!1;return{resume(){r=!1},suspend(){r=!0},skipNextScrollCycle(){n=!0},scrollTo(i){var s;if(n||r)return void(n=!1);let o;t.isFocusSelectionChanged()?o=Za(e):t.isSelectedByCorner()?o=Qa(e):t.isSelectedByRowHeader()?o=nl(e):t.isSelectedByColumnHeader()?o=Ja(e):1===t.getSelectedRange().size()&&t.isMultiple()?o=el(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(o=tl(e)):o=rl(e),null===(s=o)||void 0===s||s(i)}}}var sl=n("c4fa");function ol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.rootElement,r=al(e),i=al(e);return r.addEventListener("focus",()=>null===t||void 0===t?void 0:t.onFocusFromTop()),i.addEventListener("focus",()=>null===t||void 0===t?void 0:t.onFocusFromBottom()),n.firstChild.before(r),n.lastChild.after(i),{activate(){e._registerTimeout(()=>{r.tabIndex=0,i.tabIndex=0},10)},deactivate(){e._registerTimeout(()=>{r.tabIndex=-1,i.tabIndex=-1},10)}}}function al(e){const t=e.rootDocument,n=t.createElement("input");return n.type="text",n.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&Object(r["setAttribute"])(n,[Object(Pe["x"])(),Object(Pe["n"])()]),n}function ll(e){const t=hl(e);let n;const{activate:r,deactivate:i}=ol(e,{onFocusFromTop(){var r;const i=null!==(r=t(n))&&void 0!==r?r:cl(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_above",i),e.selectCell(i.row,i.col)),e.listen()},onFocusFromBottom(){var r;const i=null!==(r=t(n))&&void 0!==r?r:ul(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_below",i),e.selectCell(i.row,i.col)),e.listen()}}),s={wrapped:!1,flipped:!1};let o=!0,a=!1,l=!1;function c(){s.wrapped=!1,s.flipped=!1,e.deselectCell(),e.unlisten()}e.addHook("afterListen",()=>i()),e.addHook("afterUnlisten",()=>r()),e.addHook("afterSelection",(t,r,i,c,u)=>{var h;(a&&(s.wrapped&&s.flipped||l)&&(l=!1,u.value=!0),o)&&(n=null===(h=e.getSelectedRangeLast())||void 0===h?void 0:h.highlight)}),e.addHook("beforeRowWrap",(e,t,n)=>{s.wrapped=!0,s.flipped=n});const u={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:sl["b"],group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...u,callback:()=>{const{tabNavigation:t}=e.getSettings();a=!0,e.getSelectedRangeLast()&&!t&&(o=!1),t||(l=!0)},position:"before"},{...u,callback:t=>{const{tabNavigation:r,autoWrapRow:i}=e.getSettings();if(a=!1,o=!0,!r||!e.selection.isSelected()||i&&s.wrapped&&s.flipped||!i&&s.wrapped)return i&&s.wrapped&&s.flipped&&(n=t.shiftKey?cl(e):ul(e)),c(),!1;t.preventDefault()},position:"after"}])}function cl(e){const{rowIndexMapper:t,columnIndexMapper:n}=e,{navigableHeaders:r}=e.getSettings();let i=r&&e.countColHeaders()>0?-e.countColHeaders():0,s=r&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===i&&(i=t.getVisualFromRenderableIndex(i)),0===s&&(s=n.getVisualFromRenderableIndex(s)),null===i||null===s?null:e._createCellCoords(i,s)}function ul(e){var t,n;const{rowIndexMapper:r,columnIndexMapper:i}=e,{navigableHeaders:s}=e.getSettings();let o=r.getRenderableIndexesLength()-1,a=i.getRenderableIndexesLength()-1;if(o<0){if(!s||0===e.countColHeaders())return null;o=-1}if(a<0){if(!s||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=r.getVisualFromRenderableIndex(o))&&void 0!==t?t:o,null!==(n=i.getVisualFromRenderableIndex(a))&&void 0!==n?n:a)}function hl(e){return t=>{if(!t)return null;const n=cl(e),r=ul(e);return t.col<n.col&&(t.col=n.col),t.col>r.col&&(t.col=r.col),t.row<n.row&&(t.row=n.row),t.row>r.row&&(t.row=r.row),t}}var dl=n("6906");const ml=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]),fl=e=>e.map(e=>{const t=e.toLowerCase();return ml.has(t)?ml.get(t):t}).sort().join("+"),pl=e=>e.split("+"),gl=new RegExp("^(?:Key|Digit)([A-Z0-9])$"),yl=new Set(["Backquote","Minus","Equal","BracketLeft","BracketRight","Backslash","Semicolon","Quote","Comma","Period","Slash"]),wl=e=>{let{key:t,code:n}=e,r=t;return gl.test(n)?r=n.replace(gl,"$1"):yl.has(n)&&(r=n),r.toLowerCase()},bl=Symbol("shortcut-context");function _l(e){return Object(c["isObject"])(e)&&e.__kindOf===bl}const vl=e=>{const t=Object(dl["a"])({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),n=function(){let{keys:e,callback:n,group:r,runOnlyIf:o=(()=>!0),captureCtrl:a=!1,preventDefault:l=!0,stopPropagation:c=!1,relativeToGroup:u,position:h,forwardToContext:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(s["isUndefined"])(r))throw new Error("You need to define the shortcut's group.");if(!1===Object(i["isFunction"])(n))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(Be["a"]`Pass the shortcut\'s keys as an array of arrays,\x20
- using the KeyboardEvent.key properties:\x20
- https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:n,group:r,runOnlyIf:o,captureCtrl:a,preventDefault:l,stopPropagation:c};Object(s["isDefined"])(u)&&(m.relativeToGroup=u,m.position=h),_l(d)&&(m.forwardToContext=d),e.forEach(e=>{const n=fl(e),r=t.hasItem(n);if(r){const e=t.getItem(n);let r=e.findIndex(e=>e.group===u);-1!==r?"before"===h?r-=1:r+=1:r=e.length,e.splice(r,0,m)}else t.addItem(n,[m])})},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{Object(c["objectEach"])(t,(n,r)=>{!1===Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=t[r])}),n(e)})},o=e=>{const n=fl(e);t.removeItem(n)},a=e=>{const n=t.getItems();n.forEach(t=>{let[n,r]=t;const i=r.filter(t=>t.group!==e);0===i.length?o(pl(n)):(r.length=0,r.push(...i))})},l=e=>{const n=fl(e),r=t.getItem(n);return Object(s["isDefined"])(r)?r.slice():[]},u=e=>{const n=fl(e);return t.hasItem(n)};return{__kindOf:bl,addShortcut:n,addShortcuts:r,getShortcuts:l,hasShortcut:u,removeShortcutsByKeys:o,removeShortcutsByGroup:a}};function Sl(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed(t){return e.has(t)}}}const El=["meta","alt","shift","control"],Cl=Sl(),Tl=[];let Ml=0;function Rl(e,t,n,i,s){const a=e=>El.includes(e),l=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[];return e.altKey&&n.push("alt"),t&&(e.ctrlKey||e.metaKey)?n.push("control/meta"):(e.ctrlKey&&n.push("control"),e.metaKey&&n.push("meta")),e.shiftKey&&n.push("shift"),n},c=e=>{if(!1===t(e))return;const r=n(e);if(229===e.keyCode||!1===r||Object(P["isImmediatePropagationStopped"])(e))return;const c=wl(e);let u=[];a(c)||(u=l(e));const h=[c].concat(u),d=s(e,h);!d&&(Object(o["isMacOS"])()&&u.includes("meta")||!Object(o["isMacOS"])()&&u.includes("control"))&&s(e,[c].concat(l(e,!0))),i(e)},u=e=>{if(e.key){const t=wl(e);a(t)&&Cl.press(t)}},h=e=>{if(e.key){const t=wl(e);a(t)&&Cl.release(t)}},d=()=>{Cl.releaseAll()},m=()=>{let t=e;Ml+=1;while(t)1===Ml&&(t.document.documentElement.addEventListener("keydown",u),Tl.push({event:"keydown",listener:u}),t.document.documentElement.addEventListener("keyup",h),Tl.push({event:"keyup",listener:h})),t.document.documentElement.addEventListener("keydown",c),t.document.documentElement.addEventListener("blur",d),t=Object(r["getParentWindow"])(t)},f=()=>{let t=e;Ml-=1;while(t){if(0===Ml){for(let e=0;e<Tl.length;e++){const{event:n,listener:r}=Tl[e];t.document.documentElement.removeEventListener(n,r)}Tl.length=0}t.document.documentElement.removeEventListener("keydown",c),t.document.documentElement.removeEventListener("blur",d),t=Object(r["getParentWindow"])(t)}};return{mount:m,unmount:f,isPressed:e=>Cl.isPressed(e),releasePressedKeys:()=>Cl.releaseAll()}}const Ol=e=>{let{ownerWindow:t,handleEvent:n,beforeKeyDown:r,afterKeyDown:i}=e;const s=Object(dl["a"])({errorIdExists:e=>`The "${e}" context name is already registered.`});let o="grid";const a=e=>{const t=vl(e);return s.addItem(e,t),t},l=()=>o,c=e=>s.getItem(e),u=e=>{if(!s.hasItem(e))throw new Error(Be["a"]`You've tried to activate the "${e}" shortcut context\x20
- that does not exist. Before activation, register the context using the "addContext" method.`);o=e};let h=!1;const d=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l();const r=_l(n)?n:c(n);let i=!1;if(!r.hasShortcut(t))return i;const s=r.getShortcuts(t);for(let o=0;o<s.length;o++){const{callback:n,runOnlyIf:r,preventDefault:a,stopPropagation:l,captureCtrl:c,forwardToContext:u}=s[o];if(!0===r(e)){if(h=c,i=!1===n(e,t),h=!1,a&&e.preventDefault(),l&&(Object(P["stopImmediatePropagation"])(e),e.stopPropagation()),i)break;u&&d(e,t,u)}}return i},m=Rl(t,n,r,i,d);return m.mount(),{addContext:a,getActiveContextName:l,getContext:c,setActiveContextName:u,isCtrlPressed:()=>!h&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}};var Nl=n("1e8c");let Al=null;const Ll=new Map;new Set;function Il(e,t){var n,u=this;let h=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=this;const m=new l["a"](d);let f,p,g,y,w,b,_=!0;si(h)&&ii(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const v=null!==(n=null===t||void 0===t?void 0:t.layoutDirection)&&void 0!==n?n:"inherit",S=["rtl","ltr"].includes(v)?v:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",S),this.isRtl=function(){return"rtl"===S},this.isLtr=function(){return!d.isRtl()},this.getDirectionFactor=function(){return d.isLtr()?1:-1},t.language=Ws(t.language);const E=new Da(d,t,[Fa,Ba]),T=E.getTableMeta(),M=E.getGlobalMeta(),R=Object(dl["a"])();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),oi(this)&&Object(s["_injectProductInfo"])(t.licenseKey,e),this.guid="ht_"+Object(D["randomString"])(),Ll.set(this.guid,this),this.columnIndexMapper=new ys,this.rowIndexMapper=new ys,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{d.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{d.runHooks("afterRowSequenceChange",e)}),p=new xi(d),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const O=e=>{const{row:t,col:n}=e;return d._createCellCoords(t>=0?d.rowIndexMapper.getRenderableFromVisualIndex(t):t,n>=0?d.columnIndexMapper.getRenderableFromVisualIndex(n):n)},P=e=>{const{row:t,col:n}=e;return d._createCellCoords(t>=0?d.rowIndexMapper.getVisualFromRenderableIndex(t):t,n>=0?d.columnIndexMapper.getVisualFromRenderableIndex(n):n)},j=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=d.rowIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?d.rowIndexMapper.getRenderableFromVisualIndex(s):s},F=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=d.columnIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?d.columnIndexMapper.getRenderableFromVisualIndex(s):s};let Y=new ia(T,{rowIndexMapper:d.rowIndexMapper,columnIndexMapper:d.columnIndexMapper,countCols:()=>d.countCols(),countRows:()=>d.countRows(),propToCol:e=>f.propToCol(e),isEditorOpened:()=>!!d.getActiveEditor()&&d.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return u.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return u.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>d.getShortcutManager(),createCellCoords:(e,t)=>d._createCellCoords(e,t),createCellRange:(e,t,n)=>d._createCellRange(e,t,n),visualToRenderableCoords:O,renderableToVisualCoords:P,findFirstNonHiddenRenderableRow:j,findFirstNonHiddenRenderableColumn:F,isDisabledCellSelection:(e,t)=>e<0||t<0?d.getSettings().disableVisualSelection:d.getCellMeta(e,t).disableVisualSelection});this.selection=Y;const U=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function V(e){const t=_s(e);Ys(t)?(d.runHooks("beforeLanguageChange",t),M.language=t,d.runHooks("afterLanguageChange",t)):vs(e)}function B(e,t){const n="className"===e?d.rootElement:d.table;if(_)Object(r["addClass"])(n,t);else{let i=[],s=[];M[e]&&(i=Array.isArray(M[e])?M[e]:Object(N["stringToArray"])(M[e])),t&&(s=Array.isArray(t)?t:Object(N["stringToArray"])(t));const o=Object(N["getDifferenceOfArrays"])(i,s),a=Object(N["getDifferenceOfArrays"])(s,i);o.length&&Object(r["removeClass"])(n,o),a.length&&Object(r["addClass"])(n,a)}M[e]=t}function W(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function G(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function z(e,t,n){if(!e.length)return;const i=d.getActiveEditor(),s=new W;let o=!0;s.onQueueEmpty=e=>{i&&o&&i.cancelChanges(),n(e)};for(let a=e.length-1;a>=0;a--){const[n,i,,l]=e[a],c=f.propToCol(i),u=d.getCellMeta(n,c);"numeric"===u.type&&"string"===typeof l&&Object(H["isNumericLike"])(l)&&(e[a][3]=G(l)),d.getCellValidator(u)&&(s.addValidatorToQueue(),d.validateCell(e[a][3],u,function(t,n){return function(i){if("boolean"!==typeof i)throw new Error("Validation error: result is not boolean");if(!1===i&&!1===n.allowInvalid){o=!1,e.splice(t,1),n.valid=!0;const i=d.getCell(n.visualRow,n.visualCol);null!==i&&Object(r["removeClass"])(i,T.invalidCellClassName)}s.removeValidatorFormQueue()}}(a,u),t))}s.checkIfQueueIsEmpty()}function K(e,t){let n=e.length-1;if(n<0)return;for(;n>=0;n--){let r=!1;if(null!==e[n]){if(null!==e[n][2]&&void 0!==e[n][2]||null!==e[n][3]&&void 0!==e[n][3]){if(T.allowInsertRow)while(e[n][0]>d.countRows()-1){const{delta:e}=f.createRow(void 0,void 0,{source:t});if(0===e){r=!0;break}}if("array"===d.dataType&&(!T.columns||0===T.columns.length)&&T.allowInsertColumn)while(f.propToCol(e[n][1])>d.countCols()-1){const{delta:e}=f.createCol(void 0,void 0,{source:t});if(0===e){r=!0;break}}r||f.set(e[n][0],e[n][1],e[n][3])}}else e.splice(n,1)}d.forceFullRender=!0,g.adjustRowsAndCols(),d.runHooks("beforeChangeRender",e,t),y.lockEditor(),d._refreshBorders(null),y.unlockEditor(),d.view.adjustElementsSize(),d.runHooks("afterChange",e,t||"edit");const r=d.getActiveEditor();r&&Object(s["isDefined"])(r.refreshValue)&&r.refreshValue()}function X(e,t,n){return Array.isArray(e)?e:[[e,t,n]]}function $(e,t){const n=d.getActiveEditor(),r=d.runHooks("beforeChange",e,t||"edit"),i=e.filter(e=>null!==e);return!1===r||0===i.length?(n&&n.cancelChanges(),[]):i}this.columnIndexMapper.addLocalHook("cacheUpdated",U),this.rowIndexMapper.addLocalHook("cacheUpdated",U),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{const n=Object(c["createObjectPropListener"])(!1),i=this.selection.getSelectedRange(),{from:s,to:o}=i.current(),a=i.size()-1;this.runHooks("afterSelection",s.row,s.col,o.row,o.col,n,a),this.runHooks("afterSelectionByProp",s.row,d.colToProp(s.col),o.row,d.colToProp(o.col),n,a),t&&(!n.isTouched()||n.isTouched()&&!n.value)&&b.scrollTo(e);const l=Y.isSelectedByRowHeader(),u=Y.isSelectedByColumnHeader();l&&u?Object(r["addClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?(Object(r["removeClass"])(this.rootElement,"ht__selection--columns"),Object(r["addClass"])(this.rootElement,"ht__selection--rows")):u?(Object(r["removeClass"])(this.rootElement,"ht__selection--rows"),Object(r["addClass"])(this.rootElement,"ht__selection--columns")):Object(r["removeClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{const t=Object(c["createObjectPropListener"])(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&b.scrollTo(e),this._refreshBorders(null)}),this.selection.addLocalHook("afterSelectionFinished",e=>{const t=e.length-1,{from:n,to:r}=e[t];this.runHooks("afterSelectionEnd",n.row,n.col,r.row,r.col,t),this.runHooks("afterSelectionEndByProp",n.row,d.colToProp(n.col),r.row,d.colToProp(r.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{y.destroyEditor(),this._refreshBorders(),Object(r["removeClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>this.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("afterModifyTransformFocus",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",e=>this.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>this.alter("insert_col_start",e,1,"auto")),g={alter(e,t){var n,r;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort((e,t)=>{let[n]=e,[r]=t;return n===r?0:n>r?1:-1});const n=Object(N["arrayReduce"])(t,(e,t)=>{let[n,r]=t;const i=e[e.length-1],[s,o]=i,a=s+o;if(n<=a){const e=Math.max(r-(a-n),0);i[1]+=e}else e.push([n,r]);return e},[t[0]]);return n};switch(e){case"insert_row_below":case"insert_row_above":const a=d.countSourceRows();if(T.maxRows===a)return;const c="insert_row_below"===e?"below":"above";t=null!==(n=t)&&void 0!==n?n:"below"===c?a:0;const{delta:u,startPhysicalIndex:h}=f.createRow(t,i,{source:o,mode:c});if(u){const e=Y.selectedRange.current(),t=null===e||void 0===e?void 0:e.from,n=null===t||void 0===t?void 0:t.row,r=d.toVisualRow(h);if(Y.isSelectedByCorner())Y.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(Object(s["isDefined"])(n)&&n>=r){const{row:r,col:i}=e.to;let s=t.col;Y.isSelectedByRowHeader()&&(s=-1),Y.getSelectedRange().pop(),Y.setRangeStartOnly(d._createCellCoords(n+u,s),!0),Y.setRangeEnd(d._createCellCoords(r+u,i))}else d._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const m="insert_col_end"===e?"end":"start";t=null!==(r=t)&&void 0!==r?r:"end"===m?d.countSourceCols():0;const{delta:p,startPhysicalIndex:y}=f.createCol(t,i,{source:o,mode:m});if(p){if(Array.isArray(T.colHeaders)){const e=[d.toVisualColumn(y),0];e.length+=p,Array.prototype.splice.apply(T.colHeaders,e)}const e=Y.selectedRange.current(),t=null===e||void 0===e?void 0:e.from,n=null===t||void 0===t?void 0:t.col,r=d.toVisualColumn(y);if(Y.isSelectedByCorner())Y.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(Object(s["isDefined"])(n)&&n>=r){const{row:r,col:i}=e.to;let s=t.row;Y.isSelectedByColumnHeader()&&(s=-1),Y.getSelectedRange().pop(),Y.setRangeStartOnly(d._createCellCoords(s,n+p),!0),Y.setRangeEnd(d._createCellCoords(r,i+p))}else d._refreshBorders()}break;case"remove_row":const w=e=>{let t=0;Object(N["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?d.countRows()-1:Math.max(n-t,0);Number.isInteger(n)&&(n=Math.max(n-t,0));const a=f.removeRow(n,r,o);if(!a)return;const l=d.countRows(),c=T.fixedRowsTop;c>=i+1&&(T.fixedRowsTop-=Math.min(r,c-i));const u=T.fixedRowsBottom;u&&i>=l-u&&(T.fixedRowsBottom-=Math.min(r,u)),t+=r})};Array.isArray(t)?w(l(t)):w([[t,i]]),g.adjustRowsAndCols(),d._refreshBorders();break;case"remove_col":const b=e=>{let t=0;Object(N["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?d.countCols()-1:Math.max(n-t,0);let a=d.toPhysicalColumn(i);Number.isInteger(n)&&(n=Math.max(n-t,0));const l=f.removeCol(n,r,o);if(!l)return;const c=T.fixedColumnsStart;c>=i+1&&(T.fixedColumnsStart-=Math.min(r,c-i)),Array.isArray(T.colHeaders)&&("undefined"===typeof a&&(a=-1),T.colHeaders.splice(a,r)),t+=r})};Array.isArray(t)?b(l(t)):b([[t,i]]),g.adjustRowsAndCols(),d._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||g.adjustRowsAndCols()},adjustRowsAndCols(){const e=T.minRows,t=T.minSpareRows,n=T.minCols,r=T.minSpareCols;if(0===d.countRows()&&0===d.countCols()&&Y.deselect(),e){const t=d.countRows();t<e&&f.createRow(t,e-t,{source:"auto"})}if(t){const e=d.countEmptyRows(!0);if(e<t){const n=t-e,r=Math.min(n,T.maxRows-d.countSourceRows());f.createRow(d.countRows(),r,{source:"auto"})}}{let e;(n||r)&&(e=d.countEmptyCols(!0));let t=d.countCols();if(n&&!T.columns&&t<n){const r=n-t;e+=r,f.createCol(t,r,{source:"auto"})}if(r&&!T.columns&&"array"===d.dataType&&e<r){t=d.countCols();const n=r-e,i=Math.min(n,T.maxCols-t);f.createCol(t,i,{source:"auto"})}}if(Y.isSelected()){const e=d.countRows(),t=d.countCols();Object(N["arrayEach"])(Y.selectedRange,n=>{let r=!1,i=n.from.row,s=n.from.col,o=n.to.row,a=n.to.col;i>e-1?(i=e-1,r=!0,o>i&&(o=i)):o>e-1&&(o=e-1,r=!0,i>o&&(i=o)),s>t-1?(s=t-1,r=!0,a>s&&(a=s)):a>t-1&&(a=t-1,r=!0,s>a&&(s=a)),r&&(s<0?d.selectRows(i,o,s):i<0?d.selectColumns(s,a,i):d.selectCell(i,s,o,a))})}d.view&&d.view.adjustElementsSize()},populateFromArray(e,t,n,r,i){let s,o,a,l;const u=[],h={},m=[],f=e.row,p=e.col;if(o=t.length,0===o)return!1;let g=0,y=0;switch(Object(c["isObject"])(n)&&(g=n.col-p+1,y=n.row-f+1),i){case"shift_down":const i=Object(N["pivot"])(t),w=i.length,b=Math.max(w,g),_=d.getData().slice(f),v=Object(N["pivot"])(_).slice(p,p+b);for(a=0;a<b;a+=1)if(a<w){for(s=0,o=i[a].length;s<y-o;s+=1)i[a].push(i[a][s%o]);a<v.length?m.push(i[a].concat(v[a])):m.push(i[a].concat(new Array(_.length).fill(null)))}else m.push(i[a%w].concat(v[a]));d.populateFromArray(f,p,Object(N["pivot"])(m));break;case"shift_right":const S=t.length,E=Math.max(S,y),C=d.getData().slice(f).map(e=>e.slice(p));for(s=0;s<E;s+=1)if(s<S){for(a=0,l=t[s].length;a<g-l;a+=1)t[s].push(t[s][a%l]);if(s<C.length)for(let e=0;e<C[s].length;e+=1)t[s].push(C[s][e]);else t[s].push(...new Array(C[0].length).fill(null))}else t.push(t[s%o].slice(0,E).concat(C[s]));d.populateFromArray(f,p,t);break;case"overwrite":default:h.row=e.row,h.col=e.col;let M,R=0,O=0,A=!0;const L=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=t[e%t.length];return null!==n?r[n%r.length]:r},I=t.length,x=n?n.row-e.row+1:0;for(o=n?x:Math.max(I,x),s=0;s<o;s++){if(n&&h.row>n.row&&x>I||!T.allowInsertRow&&h.row>d.countRows()-1||h.row>=T.maxRows)break;const t=s-R,i=L(t).length,m=n?n.col-e.col+1:0;if(l=n?m:Math.max(i,m),h.col=e.col,M=d.getCellMeta(h.row,h.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!M.skipRowOnPaste){for(O=0,a=0;a<l;a++){if(n&&h.col>n.col&&m>i||!T.allowInsertColumn&&h.col>d.countCols()-1||h.col>=T.maxCols)break;if(M=d.getCellMeta(h.row,h.col),("CopyPaste.paste"===r||"Autofill.fill"===r)&&M.skipColumnOnPaste){O+=1,h.col+=1,l+=1;continue}if(M.readOnly&&"UndoRedo.undo"!==r){h.col+=1;continue}const e=a-O;let s=L(t,e),o=d.getDataAtCell(h.row,h.col);if(null!==s&&"object"===typeof s)if(Array.isArray(s)&&null===o&&(o=[]),null===o||"object"!==typeof o)A=!1;else{const e=Object(c["duckSchema"])(Array.isArray(o)?o:o[0]||o),t=Object(c["duckSchema"])(Array.isArray(s)?s:s[0]||s);Object(c["isObjectEqual"])(e,t)||Array.isArray(e)&&Array.isArray(t)?s=Object(c["deepClone"])(s):A=!1}else null!==o&&"object"===typeof o&&(A=!1);A&&u.push([h.row,h.col,s]),A=!0,h.col+=1}h.row+=1}else R+=1,h.row+=1,o+=1}d.setDataAtCell(u,null,null,r||"populateFromArray");break}}},this.init=function(){p.setData(T.data),d.runHooks("beforeInit"),(Object(o["isMobileBrowser"])()||Object(o["isIpadOS"])())&&Object(r["addClass"])(d.rootElement,"mobile"),this.updateSettings(T,!0),this.view=new Ri(this),y=a["b"].getInstance(d,T,Y),b=il(d),w=new C(d),oi(this)&&ll(d),d.runHooks("init"),this.forceFullRender=!0,this.view.render(),_&&null===d.rootElement.offsetParent&&Object(r["observeVisibilityChangeOnce"])(d.rootElement,()=>{d.view._wt.wtOverlays.updateLastSpreaderSize(),d.render(),d.view.adjustElementsSize()}),"object"===typeof _&&(d.runHooks("afterChange",_[0],_[1]),_=!1),d.runHooks("afterInit")},this._createCellCoords=function(e,t){return d.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,n){return d.view._wt.createCellRange(e,t,n)},this.validateCell=function(e,t,n,r){let o=d.getCellValidator(t);function a(e){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!r||!0===t.hidden)return void n(e);const i=t.visualCol,s=t.visualRow,o=d.getCell(s,i,!0);if(o&&"TH"!==o.nodeName){const e=d.rowIndexMapper.getRenderableFromVisualIndex(s),t=d.columnIndexMapper.getRenderableFromVisualIndex(i);d.view._wt.getSetting("cellRenderer",e,t,o)}n(e)}Object(s["isRegExp"])(o)&&(o=function(e){return function(t,n){n(e.test(t))}}(o)),Object(i["isFunction"])(o)?(e=d.runHooks("beforeValidate",e,t.visualRow,t.prop,r),d._registerImmediate(()=>{o.call(t,e,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(()=>{t.valid=!0,a(t.valid,!1)})},this.setDataAtCell=function(e,t,n,r){const i=X(e,t,n),s=[];let o,a,l,c=r;for(o=0,a=i.length;o<a;o++){if("object"!==typeof i[o])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!==typeof i[o][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=i[o][1]>=this.countCols()?i[o][1]:f.colToProp(i[o][1]),s.push([i[o][0],l,p.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]])}c||"object"!==typeof e||(c=t);const u=$(s,r);d.runHooks("afterSetDataAtCell",u,c),z(u,c,()=>{K(u,c)})},this.setDataAtRowProp=function(e,t,n,r){const i=X(e,t,n),s=[];let o,a,l=r;for(o=0,a=i.length;o<a;o++)s.push([i[o][0],i[o][1],p.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]]);l||"object"!==typeof e||(l=t);const c=$(s,r);d.runHooks("afterSetDataAtRowProp",c,l),z(c,l,()=>{K(c,l)})},this.listen=function(){d&&!d.isListening()&&(Ll.forEach(e=>{d!==e&&e.unlisten()}),Al=d.guid,d.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(Al=null,d.runHooks("afterUnlisten"))},this.isListening=function(){return Al===d.guid},this.destroyEditor=function(){let 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,i,s,o){if("object"!==typeof n||"object"!==typeof n[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"===typeof r?d._createCellCoords(r,i):null;return g.populateFromArray(d._createCellCoords(e,t),n,a,s,o)},this.spliceCol=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return f.spliceCol(e,t,n,...i)},this.spliceRow=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return f.spliceRow(e,t,n,...i)},this.getSelected=function(){if(Y.isSelected())return Object(N["arrayMap"])(Y.getSelectedRange(),e=>{let{from:t,to:n}=e;return[t.row,t.col,n.row,n.col]})},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Y.isSelected())return Array.from(Y.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!Y.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];Object(N["arrayEach"])(Y.getSelectedRange(),e=>{if(e.isSingleHeader())return;const n=e.getTopStartCorner(),r=e.getBottomEndCorner();Object(H["rangeEach"])(n.row,r.row,e=>{Object(H["rangeEach"])(n.col,r.col,n=>{this.getCellMeta(e,n).readOnly||t.push([e,n,null])})})}),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(y.lockEditor(),this._refreshBorders(null),y.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const n=e();return this.resumeExecution(t),n},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!d.view)return;const{width:e,height:t}=d.view.getLastSize(),{width:n,height:r}=d.rootElement.getBoundingClientRect(),i=n!==e||r!==t,s=!1===d.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:n,height:r},i);s||((i||d.view._wt.wtOverlays.scrollableElement===d.rootWindow)&&(d.view.setLastSize(n,r),d.render()),d.runHooks("afterRefreshDimensions",{width:e,height:t},{width:n,height:r},i))},this.updateData=function(e,t){qa(e,e=>{f=e},e=>{f=e,d.columnIndexMapper.fitToLength(this.getInitialColumnCount()),d.rowIndexMapper.fitToLength(this.countSourceRows()),g.adjustRowsAndCols()},{hotInstance:d,dataMap:f,dataSource:p,internalSource:"updateData",source:t,metaManager:E,firstRun:_})},this.loadData=function(e,t){qa(e,e=>{f=e},()=>{E.clearCellsCache(),d.initIndexMappers(),g.adjustRowsAndCols(),_&&(_=[null,"loadData"])},{hotInstance:d,dataMap:f,dataSource:p,internalSource:"loadData",source:t,metaManager:E,firstRun:_})},this.getInitialColumnCount=function(){const e=T.columns;let t=0;if(Array.isArray(e))t=e.length;else if(Object(i["isFunction"])(e))if("array"===d.dataType){const n=this.countSourceCols();for(let r=0;r<n;r+=1)e(r)&&(t+=1)}else"object"!==d.dataType&&"function"!==d.dataType||(t=f.colToPropCache.length);else if(Object(s["isDefined"])(T.dataSchema)){const e=f.getSchema();t=Array.isArray(e)?e.length:Object(c["deepObjectSize"])(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,n,r){return Object(s["isUndefined"])(e)?f.getAll():f.getRange(d._createCellCoords(e,t),d._createCellCoords(n,r),f.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return f.getCopyableText(d._createCellCoords(e,t),d._createCellCoords(n,r))},this.getCopyableData=function(e,t){return f.getCopyable(e,f.colToProp(t))},this.getSchema=function(){return f.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(_?d.loadData:d.updateData).bind(this);let r,o,a=!1;if(Object(s["isDefined"])(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if(Object(s["isDefined"])(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if(Object(s["isDefined"])(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(r in e)"data"===r||("language"===r?V(e.language):"className"===r?B("className",e.className):"tableClassName"===r&&d.table?(B("tableClassName",e.tableClassName),d.view._wt.wtOverlays.syncOverlayTableClassNames()):ws["a"].getSingleton().isRegistered(r)||ws["a"].getSingleton().isDeprecated(r)?(Object(i["isFunction"])(e[r])||Array.isArray(e[r]))&&(e[r].initialHook=!0,d.addHook(r,e[r])):!t&&Object(c["hasOwnProperty"])(e,r)&&(M[r]=e[r]));void 0===e.data&&void 0===T.data?n(null,"updateSettings"):void 0!==e.data?n(e.data,"updateSettings"):void 0!==e.columns&&(f.createMap(),d.initIndexMappers());const l=d.countCols(),u=T.columns;if(u&&Object(i["isFunction"])(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||E.clearCache(),l>0)for(r=0,o=0;r<l;r++){if(u){const e=a?u(r):u[o];e&&E.updateColumnMeta(o,e)}o+=1}Object(s["isDefined"])(e.cell)&&Object(c["objectEach"])(e.cell,e=>{d.setCellMetaObject(e.row,e.col,e)}),d.runHooks("afterCellMetaReset");let h=d.rootElement.style.height;""!==h&&(h=parseInt(d.rootElement.style.height,10));let m=e.height;if(Object(i["isFunction"])(m)&&(m=m()),t){const e=d.rootElement.getAttribute("style");e&&d.rootElement.setAttribute("data-initialstyle",d.rootElement.getAttribute("style"))}if(null===m){const e=d.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?d.rootElement.setAttribute("style",e):(d.rootElement.style.height="",d.rootElement.style.overflow="")}else void 0!==m&&(d.rootElement.style.height=isNaN(m)?""+m:m+"px",d.rootElement.style.overflow="hidden");if("undefined"!==typeof e.width){let t=e.width;Object(i["isFunction"])(t)&&(t=t()),d.rootElement.style.width=isNaN(t)?""+t:t+"px"}t||(d.view&&(d.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),d.view._wt.exportSettingsAsClassNames()),d.runHooks("afterUpdateSettings",e)),g.adjustRowsAndCols(),d.view&&!_&&(d.forceFullRender=!0,y.lockEditor(),d._refreshBorders(null),d.view._wt.wtOverlays.adjustElementsSize(),y.unlockEditor()),t||!d.view||""!==h&&""!==m&&void 0!==m||h===m||d.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=d.getSelectedLast();if(T.getValue){if(Object(i["isFunction"])(T.getValue))return T.getValue.call(d);if(e)return d.getData()[e[0][0]][T.getValue]}else if(e)return d.getDataAtCell(e[0],e[1])},this.getSettings=function(){return T},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,i){g.alter(e,t,n,r,i)},this.getCell=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,i=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;r=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===i||null===r?null:d.view.getCellAtCoords(d._createCellCoords(i,r),n)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:n,col:r}=t;let i=n,s=r;return n>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(n)),r>=0&&(s=this.columnIndexMapper.getVisualFromRenderableIndex(r)),d._createCellCoords(i,s)},this.colToProp=function(e){return f.colToProp(e)},this.propToCol=function(e){return f.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return f.get(e,f.colToProp(t))},this.getDataAtRowProp=function(e,t){return f.get(e,t)},this.getDataAtCol=function(e){const t=[],n=f.getRange(d._createCellCoords(0,e),d._createCellCoords(T.data.length-1,e),f.DESTINATION_RENDERER);for(let r=0;r<n.length;r+=1)for(let e=0;e<n[r].length;e+=1)t.push(n[r][e]);return t},this.getDataAtProp=function(e){const t=[],n=f.getRange(d._createCellCoords(0,f.propToCol(e)),d._createCellCoords(T.data.length-1,f.propToCol(e)),f.DESTINATION_RENDERER);for(let r=0;r<n.length;r+=1)for(let e=0;e<n[r].length;e+=1)t.push(n[r][e]);return t},this.getSourceData=function(e,t,n,r){let i;return i=void 0===e?p.getData():p.getByRange(d._createCellCoords(e,t),d._createCellCoords(n,r)),i},this.getSourceDataArray=function(e,t,n,r){let i;return i=void 0===e?p.getData(!0):p.getByRange(d._createCellCoords(e,t),d._createCellCoords(n,r),!0),i},this.getSourceDataAtCol=function(e){return p.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,n,r){const i=X(e,t,n),o=this.hasHook("afterSetSourceDataAtCell"),a=[];o&&Object(N["arrayEach"])(i,e=>{let[t,n,r]=e;a.push([t,n,p.getAtCell(t,n),r])}),Object(N["arrayEach"])(i,e=>{let[t,n,r]=e;p.setAtCell(t,n,r)}),o&&this.runHooks("afterSetSourceDataAtCell",a,r),this.render();const l=d.getActiveEditor();l&&Object(s["isDefined"])(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return p.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return p.getAtCell(e,t)},this.getDataAtRow=function(e){const t=f.getRange(d._createCellCoords(e,0),d._createCellCoords(e,this.countCols()-1),f.DESTINATION_RENDERER);return t[0]||[]},this.getDataType=function(e,t,n,r){const i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],[s,o]=i;let[,,a,l]=i,c=null,u=null;void 0===a&&(a=s),void 0===l&&(l=o);let h="mixed";return Object(H["rangeEach"])(Math.max(Math.min(s,a),0),Math.max(s,a),e=>{let t=!0;return Object(H["rangeEach"])(Math.max(Math.min(o,l),0),Math.max(o,l),n=>{const r=this.getCellMeta(e,n);return u=r.type,c?t=c===u:c=u,t}),h=t?u:"mixed",t}),h},this.removeCellMeta=function(e,t,n){const[r,i]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let s=E.getCellMetaKeyValue(r,i,n);const o=d.runHooks("beforeRemoveCellMeta",e,t,n,s);!1!==o&&(E.removeCellMeta(r,i,n),d.runHooks("afterRemoveCellMeta",e,t,n,s)),s=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(r.length>0&&!Array.isArray(r[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&E.removeRow(this.toPhysicalRow(e),t),r.length>0&&Object(N["arrayEach"])(r.reverse(),t=>{E.createRow(this.toPhysicalRow(e)),Object(N["arrayEach"])(t,(t,n)=>this.setCellMetaObject(e,n,t))}),d.render()},this.setCellMetaObject=function(e,t,n){"object"===typeof n&&Object(c["objectEach"])(n,(n,r)=>{this.setCellMeta(e,t,r,n)})},this.setCellMeta=function(e,t,n,r){const i=d.runHooks("beforeSetCellMeta",e,t,n,r);if(!1===i)return;let s=e,o=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(o=this.toPhysicalColumn(t)),E.setCellMeta(s,o,n,r),d.runHooks("afterSetCellMeta",e,t,n,r)},this.getCellsMeta=function(){return E.getCellsMeta()},this.getCellMeta=function(e,t){let n=this.toPhysicalRow(e),r=this.toPhysicalColumn(t);return null===n&&(n=e),null===r&&(r=t),E.getCellMeta(n,r,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return E.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===d.dataType||T.columns)},this.getCellRenderer=function(e,t){const n="number"===typeof e?d.getCellMeta(e,t).renderer:e.renderer;return"string"===typeof n?Object(I["b"])(n):Object(s["isUndefined"])(n)?Object(I["b"])("text"):n},this.getCellEditor=function(e,t){const n="number"===typeof e?d.getCellMeta(e,t).editor:e.editor;return"string"===typeof n?Object(x["a"])(n):Object(s["isUndefined"])(n)?Object(x["a"])("text"):n},this.getCellValidator=function(e,t){const n="number"===typeof e?d.getCellMeta(e,t).validator:e.validator;return"string"===typeof n?Object(k["b"])(n):n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){const r=new W;e&&(r.onQueueEmpty=e);let i=d.countRows()-1;while(i>=0){if(void 0!==t&&-1===t.indexOf(i)){i-=1;continue}let e=d.countCols()-1;while(e>=0)void 0===n||-1!==n.indexOf(e)?(r.addValidatorToQueue(),d.validateCell(d.getDataAtCell(i,e),d.getCellMeta(i,e),e=>{if("boolean"!==typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells"),e-=1):e-=1;i-=1}r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=T.rowHeaders,n=e;return void 0!==n&&(n=d.runHooks("modifyRowHeader",n)),void 0===n?(t=[],Object(H["rangeEach"])(d.countRows()-1,e=>{t.push(d.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[n]?t=t[n]:Object(i["isFunction"])(t)?t=t(n):t&&"string"!==typeof t&&"number"!==typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!T.rowHeaders},this.hasColHeaders=function(){if(void 0!==T.colHeaders&&null!==T.colHeaders)return!!T.colHeaders;for(let e=0,t=d.countCols();e<t;e++)if(d.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=d.runHooks("modifyColHeader",e);if(void 0===n){const e=[],t=d.countCols();for(let n=0;n<t;n++)e.push(d.getColHeader(n));return e}let r=T.colHeaders;const s=function(e){const t=[],n=d.countCols();let r=0;for(;r<n;r++)Object(i["isFunction"])(T.columns)&&T.columns(r)&&t.push(r);return t[e]},o=d.toPhysicalColumn(n),a=s(o);return!1===T.colHeaders?r=null:T.columns&&Object(i["isFunction"])(T.columns)&&T.columns(a)&&T.columns(a).title?r=T.columns(a).title:T.columns&&T.columns[o]&&T.columns[o].title?r=T.columns[o].title:Array.isArray(T.colHeaders)&&void 0!==T.colHeaders[o]?r=T.colHeaders[o]:Object(i["isFunction"])(T.colHeaders)?r=T.colHeaders(o):T.colHeaders&&"string"!==typeof T.colHeaders&&"number"!==typeof T.colHeaders&&(r=Object(Oi["spreadsheetColumnLabel"])(n)),r=d.runHooks("modifyColumnHeaderValue",r,e,t),r},this._getColWidthFromSettings=function(e){let t;if(e>=0){const n=d.getCellMeta(0,e);t=n.width}if(void 0!==t&&t!==T.width||(t=T.colWidths),void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e);break;default:break}"string"===typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=d._getColWidthFromSettings(e);return t=d.runHooks("modifyColWidth",t,e),void 0===t&&(t=br["a"].DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=T.rowHeights;if(void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e);break;default:break}"string"===typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=d._getRowHeightFromSettings(e);return t=d.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return p.countRows()},this.countSourceCols=function(){return p.countFirstRowKeys()},this.countRows=function(){return f.getLength()},this.countCols=function(){const e=T.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return d.view._wt.drawn?d.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return d.view._wt.drawn?d.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return d.view._wt.drawn?d.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return d.view._wt.drawn?d.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return Object(H["rangeEachReverse"])(d.countRows()-1,n=>{if(d.isEmptyRow(n))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return Object(H["rangeEachReverse"])(d.countCols()-1,n=>{if(d.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return T.isEmptyRow.call(d,e)},this.isEmptyCol=function(e){return T.isEmptyCol.call(d,e)},this.selectCell=function(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!Object(s["isUndefined"])(e)&&!Object(s["isUndefined"])(t)&&this.selectCells([[e,t,n,r]],i,o)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&b.suspend();const r=Y.selectCells(e);return r&&n&&d.listen(),b.resume(),r},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;return Y.selectColumns(e,t,n)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;return Y.selectRows(e,t,n)},this.deselectCell=function(){Y.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;b.skipNextScrollCycle(),Y.selectAll(e,t,n)};const q=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);function J(e){return()=>{throw new Error(`The "${e}" method cannot be called because this Handsontable instance has been destroyed`)}}this.scrollViewportTo=function(e){var t,n;"number"===typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(n=arguments[4])||void 0===n||n});const{row:r,col:i,verticalSnap:s,horizontalSnap:o,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,c,u,h;void 0!==s&&(l="top"===s,c=!l),void 0!==o&&(u="start"===o,h=!u);let m=r,f=i;if(void 0===a||a){const e=Number.isInteger(r)&&r>=0,t=Number.isInteger(i)&&i>=0,n=e?q(this.rowIndexMapper,r):void 0,s=t?q(this.columnIndexMapper,i):void 0;if(null===n||null===s)return!1;m=e?d.rowIndexMapper.getRenderableFromVisualIndex(n):r,f=t?d.columnIndexMapper.getRenderableFromVisualIndex(s):i}const p=Number.isInteger(m),g=Number.isInteger(f);return p&&m>=0&&g&&f>=0?d.view.scrollViewport(d._createCellCoords(m,f),l,h,c,u):p&&m>=0&&(g&&f<0||!g)?d.view.scrollViewportVertically(m,l,c):!!(g&&f>=0&&(p&&m<0||!p))&&d.view.scrollViewportHorizontally(f,h,u)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast(),n=this.scrollViewportTo(t.toObject());n?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate(()=>e()))},this.destroy=function(){if(d._clearTimeouts(),d._clearImmediates(),d.view&&d.view.destroy(),p&&p.destroy(),p=null,this.getShortcutManager().destroy(),E.clearCache(),Ll.delete(this.guid),oi(d)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}Object(r["empty"])(d.rootElement),m.destroy(),y&&y.destroy(),d.batchExecution(()=>{d.rowIndexMapper.unregisterAll(),d.columnIndexMapper.unregisterAll(),R.getItems().forEach(e=>{let[,t]=e;t.destroy()}),R.clear(),d.runHooks("afterDestroy")},!0),ws["a"].getSingleton().destroy(d),Object(c["objectEach"])(d,(e,t,n)=>{Object(i["isFunction"])(e)?n[t]=J(t):"guid"!==t&&(n[t]=null)}),d.isDestroyed=!0,f&&f.destroy(),f=null,g=null,Y=null,y=null,d=null},this.getActiveEditor=function(){return y.getActiveEditor()},this.getPlugin=function(e){const t=Object(D["toUpperCaseFirst"])(e);return"UndoRedo"===t?this.undoRedo:R.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:R.getId(e)},this.getInstance=function(){return d},this.addHook=function(e,t){ws["a"].getSingleton().add(e,t,d)},this.hasHook=function(e){return ws["a"].getSingleton().has(e,d)||ws["a"].getSingleton().has(e)},this.addHookOnce=function(e,t){ws["a"].getSingleton().once(e,t,d)},this.removeHook=function(e,t){ws["a"].getSingleton().remove(e,t,d)},this.runHooks=function(e,t,n,r,i,s,o){return ws["a"].getSingleton().run(d,e,t,n,r,i,s,o)},this.getTranslatedPhrase=function(e,t){return Vs(T.language,e,t)},this.toHTML=()=>Object(A["instanceToHTML"])(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",Object(A["instanceToHTML"])(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"===typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){Object(N["arrayEach"])(this.timeouts,e=>{clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){Object(N["arrayEach"])(this.immediates,e=>{clearImmediate(e)})},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];y.destroyEditor(e),d.view.render(),t&&Y.isSelected()&&y.prepareEditor()},this._getEditorManager=function(){return y},this.isRtl=function(){return"rtl"===d.rootWindow.getComputedStyle(d.rootElement).direction},this.isLtr=function(){return!d.isRtl()},this.getDirectionFactor=function(){return d.isLtr()?1:-1};const Q=Ol({handleEvent(){return d.isListening()},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||d.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&Q.releasePressedKeys()}),this.getShortcutManager=function(){return Q},this.getFocusManager=function(){return w},Object(L["b"])().forEach(e=>{const t=Object(L["a"])(e);R.addItem(e,new t(this))}),Object(Nl["a"])(d),Q.setActiveContextName("grid"),ws["a"].getSingleton().run(d,"construct")}var xl=n("ef07"),kl=n("13e1");function Dl(e,t){const n=new Il(e,t||{},ri);return n.init(),n}Object(sa["d"])(xl["a"]),Dl.editors={BaseEditor:kl["a"]},Dl.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Il(e,t,ri)},Dl.DefaultSettings=da(),Dl.hooks=ws["a"].getSingleton(),Dl.CellCoords=on["a"],Dl.CellRange=an["a"],Dl.packageName="handsontable",Dl.buildDate="16/04/2024 10:23:22",Dl.version="14.3.0",Dl.languages={dictionaryKeys:Ls,getLanguageDictionary:Fs,getLanguagesDictionaries:Us,registerLanguageDictionary:Ps,getTranslatedPhrase:Vs};t["a"]=Dl},c0e2:function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;for(r;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var s=0,o=r.length;s<o;s++)r[s].fn!==t&&r[s].fn._!==t&&i.push(r[s]);return i.length?n[e]=i:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},c109:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzm",{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 oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return t}))},c1cf:function(e,t,n){"use strict";var r=n("e437");
- /**
- * @preserve
- * Authors: soakit, HChenZi
- * Last updated: Mar 09, 2023
- *
- * Description: Definition file for Chinese - China language-country.
- */const i=r["a"].languages.dictionaryKeys,s={languageCode:"zh-CN",[i.CONTEXTMENU_ITEMS_ROW_ABOVE]:"上方插入行",[i.CONTEXTMENU_ITEMS_ROW_BELOW]:"下方插入行",[i.CONTEXTMENU_ITEMS_INSERT_LEFT]:"左方插入列",[i.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"右方插入列",[i.CONTEXTMENU_ITEMS_REMOVE_ROW]:["移除该行","移除多行"],[i.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["移除该列","移除多列"],[i.CONTEXTMENU_ITEMS_UNDO]:"撤销",[i.CONTEXTMENU_ITEMS_REDO]:"恢复",[i.CONTEXTMENU_ITEMS_READ_ONLY]:"只读",[i.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"清空该列",[i.CONTEXTMENU_ITEMS_ALIGNMENT]:"对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"左对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"水平居中",[i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"右对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"两端对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"顶端对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"垂直居中",[i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"底端对齐",[i.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"冻结该列",[i.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"取消冻结",[i.CONTEXTMENU_ITEMS_BORDERS]:"边框",[i.CONTEXTMENU_ITEMS_BORDERS_TOP]:"上",[i.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"右",[i.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"下",[i.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"左",[i.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"移除边框",[i.CONTEXTMENU_ITEMS_ADD_COMMENT]:"插入批注",[i.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"编辑批注",[i.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"删除批注",[i.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"只读批注",[i.CONTEXTMENU_ITEMS_MERGE_CELLS]:"合并",[i.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"取消合并",[i.CONTEXTMENU_ITEMS_COPY]:"复制",[i.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:"带标题的复制",[i.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:"带标题组的复制",[i.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:"仅复制标题",[i.CONTEXTMENU_ITEMS_CUT]:"剪切",[i.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"插入子行",[i.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"与母行分离",[i.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["隐藏该列","隐藏多列"],[i.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["显示该列","显示多列"],[i.CONTEXTMENU_ITEMS_HIDE_ROW]:["隐藏该行","隐藏多行"],[i.CONTEXTMENU_ITEMS_SHOW_ROW]:["显示该行","显示多行"],[i.FILTERS_CONDITIONS_NONE]:"无",[i.FILTERS_CONDITIONS_EMPTY]:"为空",[i.FILTERS_CONDITIONS_NOT_EMPTY]:"不为空",[i.FILTERS_CONDITIONS_EQUAL]:"等于",[i.FILTERS_CONDITIONS_NOT_EQUAL]:"不等于",[i.FILTERS_CONDITIONS_BEGINS_WITH]:"开头是",[i.FILTERS_CONDITIONS_ENDS_WITH]:"结尾是",[i.FILTERS_CONDITIONS_CONTAINS]:"包含",[i.FILTERS_CONDITIONS_NOT_CONTAIN]:"不包含",[i.FILTERS_CONDITIONS_GREATER_THAN]:"大于",[i.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"大于或等于",[i.FILTERS_CONDITIONS_LESS_THAN]:"小于",[i.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"小于或等于",[i.FILTERS_CONDITIONS_BETWEEN]:"在此范围",[i.FILTERS_CONDITIONS_NOT_BETWEEN]:"不在此范围",[i.FILTERS_CONDITIONS_AFTER]:"之后",[i.FILTERS_CONDITIONS_BEFORE]:"之前",[i.FILTERS_CONDITIONS_TODAY]:"今天",[i.FILTERS_CONDITIONS_TOMORROW]:"明天",[i.FILTERS_CONDITIONS_YESTERDAY]:"昨天",[i.FILTERS_VALUES_BLANK_CELLS]:"空白单元格",[i.FILTERS_DIVS_FILTER_BY_CONDITION]:"按条件过滤",[i.FILTERS_DIVS_FILTER_BY_VALUE]:"按值过滤",[i.FILTERS_LABELS_CONJUNCTION]:"且",[i.FILTERS_LABELS_DISJUNCTION]:"或",[i.FILTERS_BUTTONS_SELECT_ALL]:"全选",[i.FILTERS_BUTTONS_CLEAR]:"清除",[i.FILTERS_BUTTONS_OK]:"确认",[i.FILTERS_BUTTONS_CANCEL]:"取消",[i.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"搜索",[i.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"值",[i.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"第二值"};r["a"].languages.registerLanguageDictionary(s)},c1df:function(e,t,n){(function(e){var t;//! moment.js
- //! version : 2.29.4
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- (function(t,n){e.exports=n()})(0,(function(){"use strict";var r,i;function s(){return r.apply(null,arguments)}function o(e){r=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(c(e,t))return!1;return!0}function h(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function m(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,n,r){return qn(e,t,n,r,!0).utc()}function y(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function w(e){return null==e._pf&&(e._pf=y()),e._pf}function b(e){if(null==e._isValid){var t=w(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function _(e){var t=g(NaN);return null!=e?p(w(t),e):w(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=s.momentProperties=[],S=!1;function E(e,t){var n,r,i,s=v.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=w(t)),h(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=v[n],i=t[r],h(i)||(e[r]=i);return e}function C(e){E(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===S&&(S=!0,s.updateOffset(this),S=!1)}function T(e){return e instanceof C||null!=e&&null!=e._isAMomentObject}function M(e){!1===s.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function R(e,t){var n=!0;return p((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),n){var r,i,o,a=[],l=arguments.length;for(i=0;i<l;i++){if(r="","object"===typeof arguments[i]){for(o in r+="\n["+i+"] ",arguments[0])c(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];a.push(r)}M(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var O,N={};function A(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),N[e]||(M(t),N[e]=!0)}function L(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e){var t,n;for(n in e)c(e,n)&&(t=e[n],L(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function x(e,t){var n,r=p({},e);for(n in t)c(t,n)&&(l(e[n])&&l(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)c(e,n)&&!c(t,n)&&l(e[n])&&(r[n]=p({},r[n]));return r}function k(e){null!=e&&this.set(e)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,O=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n};var D={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function H(e,t,n){var r=this._calendar[e]||this._calendar["sameElse"];return L(r)?r.call(t,n):r}function P(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},U={};function V(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t,n,r=e.match(j);for(t=0,n=r.length;t<n;t++)U[r[t]]?r[t]=U[r[t]]:r[t]=B(r[t]);return function(t){var i,s="";for(i=0;i<n;i++)s+=L(r[i])?r[i].call(t,e):r[i];return s}}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),Y[t]=Y[t]||W(t),Y[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}F.lastIndex=0;while(n>=0&&F.test(e))e=e.replace(F,r),F.lastIndex=0,n-=1;return e}var K={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function X(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(j).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var $="Invalid date";function q(){return this._invalidDate}var J="%d",Q=/\d{1,2}/;function Z(e){return this._ordinal.replace("%d",e)}var ee={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,n,r){var i=this._relativeTime[n];return L(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ne(e,t){var n=this._relativeTime[e>0?"future":"past"];return L(n)?n(t):n.replace(/%s/i,t)}var re={};function ie(e,t){var n=e.toLowerCase();re[n]=re[n+"s"]=re[t]=e}function se(e){return"string"===typeof e?re[e]||re[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)c(e,n)&&(t=se(n),t&&(r[t]=e[n]));return r}var ae={};function le(e,t){ae[e]=t}function ce(e){var t,n=[];for(t in e)c(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ue(e){return e%4===0&&e%100!==0||e%400===0}function he(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=he(t)),n}function me(e,t){return function(n){return null!=n?(pe(this,e,n),s.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function pe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(n=de(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),tt(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function ge(e){return e=se(e),L(this[e])?this[e]():this}function ye(e,t){if("object"===typeof e){e=oe(e);var n,r=ce(e),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(e=se(e),L(this[e]))return this[e](t);return this}var we,be=/\d/,_e=/\d\d/,ve=/\d{3}/,Se=/\d{4}/,Ee=/[+-]?\d{6}/,Ce=/\d\d?/,Te=/\d\d\d\d?/,Me=/\d\d\d\d\d\d?/,Re=/\d{1,3}/,Oe=/\d{1,4}/,Ne=/[+-]?\d{1,6}/,Ae=/\d+/,Le=/[+-]?\d+/,Ie=/Z|[+-]\d\d:?\d\d/gi,xe=/Z|[+-]\d\d(?::?\d\d)?/gi,ke=/[+-]?\d+(\.\d{1,3})?/,De=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function He(e,t,n){we[e]=L(t)?t:function(e,r){return e&&n?n:t}}function Pe(e,t){return c(we,e)?we[e](t._strict,t._locale):new RegExp(je(e))}function je(e){return Fe(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Fe(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}we={};var Ye={};function Ue(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=de(e)}),r=e.length,n=0;n<r;n++)Ye[e[n]]=i}function Ve(e,t){Ue(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Be(e,t,n){null!=t&&c(Ye,e)&&Ye[e](t,n._a,n,e)}var We,Ge=0,ze=1,Ke=2,Xe=3,$e=4,qe=5,Je=6,Qe=7,Ze=8;function et(e,t){return(e%t+t)%t}function tt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=et(t,12);return e+=(t-n)/12,1===n?ue(e)?29:28:31-n%7%2}We=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),V("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ie("month","M"),le("month",8),He("M",Ce),He("MM",Ce,_e),He("MMM",(function(e,t){return t.monthsShortRegex(e)})),He("MMMM",(function(e,t){return t.monthsRegex(e)})),Ue(["M","MM"],(function(e,t){t[ze]=de(e)-1})),Ue(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[ze]=i:w(n).invalidMonth=e}));var nt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),rt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),it=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,st=De,ot=De;function at(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||it).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months["standalone"]}function lt(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[it.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function ct(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=g([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?(i=We.call(this._shortMonthsParse,o),-1!==i?i:null):(i=We.call(this._longMonthsParse,o),-1!==i?i:null):"MMM"===t?(i=We.call(this._shortMonthsParse,o),-1!==i?i:(i=We.call(this._longMonthsParse,o),-1!==i?i:null)):(i=We.call(this._longMonthsParse,o),-1!==i?i:(i=We.call(this._shortMonthsParse,o),-1!==i?i:null))}function ut(e,t,n){var r,i,s;if(this._monthsParseExact)return ct.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=g([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ht(e,t){var n;if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=de(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;return n=Math.min(e.date(),tt(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function dt(e){return null!=e?(ht(this,e),s.updateOffset(this,!0),this):fe(this,"Month")}function mt(){return tt(this.year(),this.month())}function ft(e){return this._monthsParseExact?(c(this,"_monthsRegex")||gt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=st),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pt(e){return this._monthsParseExact?(c(this,"_monthsRegex")||gt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function gt(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],s=[];for(t=0;t<12;t++)n=g([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),s.push(this.months(n,"")),s.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),s.sort(e),t=0;t<12;t++)r[t]=Fe(r[t]),i[t]=Fe(i[t]);for(t=0;t<24;t++)s[t]=Fe(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function yt(e){return ue(e)?366:365}V("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),ie("year","y"),le("year",1),He("Y",Le),He("YY",Ce,_e),He("YYYY",Oe,Se),He("YYYYY",Ne,Ee),He("YYYYYY",Ne,Ee),Ue(["YYYYY","YYYYYY"],Ge),Ue("YYYY",(function(e,t){t[Ge]=2===e.length?s.parseTwoDigitYear(e):de(e)})),Ue("YY",(function(e,t){t[Ge]=s.parseTwoDigitYear(e)})),Ue("Y",(function(e,t){t[Ge]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var wt=me("FullYear",!0);function bt(){return ue(this.year())}function _t(e,t,n,r,i,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,s,o),a}function vt(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function St(e,t,n){var r=7+t-n,i=(7+vt(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Et(e,t,n,r,i){var s,o,a=(7+n-r)%7,l=St(e,r,i),c=1+7*(t-1)+a+l;return c<=0?(s=e-1,o=yt(s)+c):c>yt(e)?(s=e+1,o=c-yt(e)):(s=e,o=c),{year:s,dayOfYear:o}}function Ct(e,t,n){var r,i,s=St(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?(i=e.year()-1,r=o+Tt(i,t,n)):o>Tt(e.year(),t,n)?(r=o-Tt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function Tt(e,t,n){var r=St(e,t,n),i=St(e+1,t,n);return(yt(e)-r+i)/7}function Mt(e){return Ct(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),ie("week","w"),ie("isoWeek","W"),le("week",5),le("isoWeek",5),He("w",Ce),He("ww",Ce,_e),He("W",Ce),He("WW",Ce,_e),Ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=de(e)}));var Rt={dow:0,doy:6};function Ot(){return this._week.dow}function Nt(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Lt(e){var t=Ct(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function xt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function kt(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),V("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),V("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),ie("day","d"),ie("weekday","e"),ie("isoWeekday","E"),le("day",11),le("weekday",11),le("isoWeekday",11),He("d",Ce),He("e",Ce),He("E",Ce),He("dd",(function(e,t){return t.weekdaysMinRegex(e)})),He("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),He("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ve(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:w(n).invalidWeekday=e})),Ve(["d","e","E"],(function(e,t,n,r){t[r]=de(e)}));var Dt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ht="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Pt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jt=De,Ft=De,Yt=De;function Ut(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?kt(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return!0===e?kt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Bt(e){return!0===e?kt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Wt(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=g([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?(i=We.call(this._weekdaysParse,o),-1!==i?i:null):"ddd"===t?(i=We.call(this._shortWeekdaysParse,o),-1!==i?i:null):(i=We.call(this._minWeekdaysParse,o),-1!==i?i:null):"dddd"===t?(i=We.call(this._weekdaysParse,o),-1!==i?i:(i=We.call(this._shortWeekdaysParse,o),-1!==i?i:(i=We.call(this._minWeekdaysParse,o),-1!==i?i:null))):"ddd"===t?(i=We.call(this._shortWeekdaysParse,o),-1!==i?i:(i=We.call(this._weekdaysParse,o),-1!==i?i:(i=We.call(this._minWeekdaysParse,o),-1!==i?i:null))):(i=We.call(this._minWeekdaysParse,o),-1!==i?i:(i=We.call(this._weekdaysParse,o),-1!==i?i:(i=We.call(this._shortWeekdaysParse,o),-1!==i?i:null)))}function Gt(e,t,n){var r,i,s;if(this._weekdaysParseExact)return Wt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=g([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function zt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Xt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=xt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=jt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Jt(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Yt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,o=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=g([2e3,1]).day(t),r=Fe(this.weekdaysMin(n,"")),i=Fe(this.weekdaysShort(n,"")),s=Fe(this.weekdays(n,"")),o.push(r),a.push(i),l.push(s),c.push(r),c.push(i),c.push(s);o.sort(e),a.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Zt(){return this.hours()%12||12}function en(){return this.hours()||24}function tn(e,t){V(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function nn(e,t){return t._meridiemParse}function rn(e){return"p"===(e+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Zt),V("k",["kk",2],0,en),V("hmm",0,0,(function(){return""+Zt.apply(this)+P(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Zt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),tn("a",!0),tn("A",!1),ie("hour","h"),le("hour",13),He("a",nn),He("A",nn),He("H",Ce),He("h",Ce),He("k",Ce),He("HH",Ce,_e),He("hh",Ce,_e),He("kk",Ce,_e),He("hmm",Te),He("hmmss",Me),He("Hmm",Te),He("Hmmss",Me),Ue(["H","HH"],Xe),Ue(["k","kk"],(function(e,t,n){var r=de(e);t[Xe]=24===r?0:r})),Ue(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Ue(["h","hh"],(function(e,t,n){t[Xe]=de(e),w(n).bigHour=!0})),Ue("hmm",(function(e,t,n){var r=e.length-2;t[Xe]=de(e.substr(0,r)),t[$e]=de(e.substr(r)),w(n).bigHour=!0})),Ue("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Xe]=de(e.substr(0,r)),t[$e]=de(e.substr(r,2)),t[qe]=de(e.substr(i)),w(n).bigHour=!0})),Ue("Hmm",(function(e,t,n){var r=e.length-2;t[Xe]=de(e.substr(0,r)),t[$e]=de(e.substr(r))})),Ue("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Xe]=de(e.substr(0,r)),t[$e]=de(e.substr(r,2)),t[qe]=de(e.substr(i))}));var sn=/[ap]\.?m?\.?/i,on=me("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var ln,cn={calendar:D,longDateFormat:K,invalidDate:$,ordinal:J,dayOfMonthOrdinalParse:Q,relativeTime:ee,months:nt,monthsShort:rt,week:Rt,weekdays:Dt,weekdaysMin:Pt,weekdaysShort:Ht,meridiemParse:sn},un={},hn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function mn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){var t,n,r,i,s=0;while(s<e.length){i=mn(e[s]).split("-"),t=i.length,n=mn(e[s+1]),n=n?n.split("-"):null;while(t>0){if(r=gn(i.slice(0,t).join("-")),r)return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}s++}return ln}function pn(e){return null!=e.match("^[^/\\\\]*$")}function gn(r){var i=null;if(void 0===un[r]&&"undefined"!==typeof e&&e&&e.exports&&pn(r))try{i=ln._abbr,t,n("4678")("./"+r),yn(i)}catch(s){un[r]=null}return un[r]}function yn(e,t){var n;return e&&(n=h(t)?_n(e):wn(e,t),n?ln=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ln._abbr}function wn(e,t){if(null!==t){var n,r=cn;if(t.abbr=e,null!=un[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])r=un[t.parentLocale]._config;else{if(n=gn(t.parentLocale),null==n)return hn[t.parentLocale]||(hn[t.parentLocale]=[]),hn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return un[e]=new k(x(r,t)),hn[e]&&hn[e].forEach((function(e){wn(e.name,e.config)})),yn(e),un[e]}return delete un[e],null}function bn(e,t){if(null!=t){var n,r,i=cn;null!=un[e]&&null!=un[e].parentLocale?un[e].set(x(un[e]._config,t)):(r=gn(e),null!=r&&(i=r._config),t=x(i,t),null==r&&(t.abbr=e),n=new k(t),n.parentLocale=un[e],un[e]=n),yn(e)}else null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===yn()&&yn(e)):null!=un[e]&&delete un[e]);return un[e]}function _n(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ln;if(!a(e)){if(t=gn(e),t)return t;e=[e]}return fn(e)}function vn(){return O(un)}function Sn(e){var t,n=e._a;return n&&-2===w(e).overflow&&(t=n[ze]<0||n[ze]>11?ze:n[Ke]<1||n[Ke]>tt(n[Ge],n[ze])?Ke:n[Xe]<0||n[Xe]>24||24===n[Xe]&&(0!==n[$e]||0!==n[qe]||0!==n[Je])?Xe:n[$e]<0||n[$e]>59?$e:n[qe]<0||n[qe]>59?qe:n[Je]<0||n[Je]>999?Je:-1,w(e)._overflowDayOfYear&&(t<Ge||t>Ke)&&(t=Ke),w(e)._overflowWeeks&&-1===t&&(t=Qe),w(e)._overflowWeekday&&-1===t&&(t=Ze),w(e).overflow=t),e}var En=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tn=/Z|[+-]\d\d(?::?\d\d)?/,Mn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Rn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],On=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,An={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ln(e){var t,n,r,i,s,o,a=e._i,l=En.exec(a)||Cn.exec(a),c=Mn.length,u=Rn.length;if(l){for(w(e).iso=!0,t=0,n=c;t<n;t++)if(Mn[t][1].exec(l[1])){i=Mn[t][0],r=!1!==Mn[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(Rn[t][1].exec(l[3])){s=(l[2]||" ")+Rn[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(l[4]){if(!Tn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=i+(s||"")+(o||""),Bn(e)}else e._isValid=!1}function In(e,t,n,r,i,s){var o=[xn(e),rt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function xn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function kn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dn(e,t,n){if(e){var r=Ht.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return w(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Hn(e,t,n){if(e)return An[e];if(t)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return 60*s+i}function Pn(e){var t,n=Nn.exec(kn(e._i));if(n){if(t=In(n[4],n[3],n[2],n[5],n[6],n[7]),!Dn(n[1],t,e))return;e._a=t,e._tzm=Hn(n[8],n[9],n[10]),e._d=vt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),w(e).rfc2822=!0}else e._isValid=!1}function jn(e){var t=On.exec(e._i);null===t?(Ln(e),!1===e._isValid&&(delete e._isValid,Pn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Fn(e,t,n){return null!=e?e:null!=t?t:n}function Yn(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Un(e){var t,n,r,i,s,o=[];if(!e._d){for(r=Yn(e),e._w&&null==e._a[Ke]&&null==e._a[ze]&&Vn(e),null!=e._dayOfYear&&(s=Fn(e._a[Ge],r[Ge]),(e._dayOfYear>yt(s)||0===e._dayOfYear)&&(w(e)._overflowDayOfYear=!0),n=vt(s,0,e._dayOfYear),e._a[ze]=n.getUTCMonth(),e._a[Ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Xe]&&0===e._a[$e]&&0===e._a[qe]&&0===e._a[Je]&&(e._nextDay=!0,e._a[Xe]=0),e._d=(e._useUTC?vt:_t).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Xe]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(w(e).weekdayMismatch=!0)}}function Vn(e){var t,n,r,i,s,o,a,l,c;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,o=4,n=Fn(t.GG,e._a[Ge],Ct(Jn(),1,4).year),r=Fn(t.W,1),i=Fn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,c=Ct(Jn(),s,o),n=Fn(t.gg,e._a[Ge],c.year),r=Fn(t.w,c.week),null!=t.d?(i=t.d,(i<0||i>6)&&(l=!0)):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>Tt(n,s,o)?w(e)._overflowWeeks=!0:null!=l?w(e)._overflowWeekday=!0:(a=Et(n,r,i,s,o),e._a[Ge]=a.year,e._dayOfYear=a.dayOfYear)}function Bn(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],w(e).empty=!0;var t,n,r,i,o,a,l,c=""+e._i,u=c.length,h=0;for(r=z(e._f,e._locale).match(j)||[],l=r.length,t=0;t<l;t++)i=r[t],n=(c.match(Pe(i,e))||[])[0],n&&(o=c.substr(0,c.indexOf(n)),o.length>0&&w(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),h+=n.length),U[i]?(n?w(e).empty=!1:w(e).unusedTokens.push(i),Be(i,n,e)):e._strict&&!n&&w(e).unusedTokens.push(i);w(e).charsLeftOver=u-h,c.length>0&&w(e).unusedInput.push(c),e._a[Xe]<=12&&!0===w(e).bigHour&&e._a[Xe]>0&&(w(e).bigHour=void 0),w(e).parsedDateParts=e._a.slice(0),w(e).meridiem=e._meridiem,e._a[Xe]=Wn(e._locale,e._a[Xe],e._meridiem),a=w(e).era,null!==a&&(e._a[Ge]=e._locale.erasConvertYear(a,e._a[Ge])),Un(e),Sn(e)}else Pn(e);else Ln(e)}function Wn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Gn(e){var t,n,r,i,s,o,a=!1,l=e._f.length;if(0===l)return w(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)s=0,o=!1,t=E({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Bn(t),b(t)&&(o=!0),s+=w(t).charsLeftOver,s+=10*w(t).unusedTokens.length,w(t).score=s,a?s<r&&(r=s,n=t):(null==r||s<r||o)&&(r=s,n=t,o&&(a=!0));p(e,n||t)}function zn(e){if(!e._d){var t=oe(e._i),n=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Un(e)}}function Kn(e){var t=new C(Sn(Xn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Xn(e){var t=e._i,n=e._f;return e._locale=e._locale||_n(e._l),null===t||void 0===n&&""===t?_({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),T(t)?new C(Sn(t)):(m(t)?e._d=t:a(n)?Gn(e):n?Bn(e):$n(e),b(e)||(e._d=null),e))}function $n(e){var t=e._i;h(t)?e._d=new Date(s.now()):m(t)?e._d=new Date(t.valueOf()):"string"===typeof t?jn(e):a(t)?(e._a=f(t.slice(0),(function(e){return parseInt(e,10)})),Un(e)):l(t)?zn(e):d(t)?e._d=new Date(t):s.createFromInputFallback(e)}function qn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(l(e)&&u(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Kn(s)}function Jn(e,t,n,r){return qn(e,t,n,r,!1)}s.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),s.ISO_8601=function(){},s.RFC_2822=function(){};var Qn=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Jn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:_()})),Zn=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Jn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:_()}));function er(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Jn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function tr(){var e=[].slice.call(arguments,0);return er("isBefore",e)}function nr(){var e=[].slice.call(arguments,0);return er("isAfter",e)}var rr=function(){return Date.now?Date.now():+new Date},ir=["year","quarter","month","week","day","hour","minute","second","millisecond"];function sr(e){var t,n,r=!1,i=ir.length;for(t in e)if(c(e,t)&&(-1===We.call(ir,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[ir[n]]){if(r)return!1;parseFloat(e[ir[n]])!==de(e[ir[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Ar(NaN)}function lr(e){var t=oe(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=sr(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*a*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=_n(),this._bubble()}function cr(e){return e instanceof lr}function ur(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function hr(e,t,n){var r,i=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&de(e[r])!==de(t[r]))&&o++;return o+s}function dr(e,t){V(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}dr("Z",":"),dr("ZZ",""),He("Z",xe),He("ZZ",xe),Ue(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(xe,e)}));var mr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,i,s=(t||"").match(e);return null===s?null:(n=s[s.length-1]||[],r=(n+"").match(mr)||["-",0,0],i=60*r[1]+de(r[2]),0===i?0:"+"===r[0]?i:-i)}function pr(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(T(e)||m(e)?e.valueOf():Jn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),s.updateOffset(n,!1),n):Jn(e).local()}function gr(e){return-Math.round(e._d.getTimezoneOffset())}function yr(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=fr(xe,e),null===e)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=gr(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Dr(this,Ar(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:gr(this)}function wr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function br(e){return this.utcOffset(0,e)}function _r(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gr(this),"m")),this}function vr(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=fr(Ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Sr(e){return!!this.isValid()&&(e=e?Jn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function Er(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Cr(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e,t={};return E(t,this),t=Xn(t),t._a?(e=t._isUTC?g(t._a):Jn(t._a),this._isDSTShifted=this.isValid()&&hr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Tr(){return!!this.isValid()&&!this._isUTC}function Mr(){return!!this.isValid()&&this._isUTC}function Rr(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}s.updateOffset=function(){};var Or=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ar(e,t){var n,r,i,s=e,o=null;return cr(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(o=Or.exec(e))?(n="-"===o[1]?-1:1,s={y:0,d:de(o[Ke])*n,h:de(o[Xe])*n,m:de(o[$e])*n,s:de(o[qe])*n,ms:de(ur(1e3*o[Je]))*n}):(o=Nr.exec(e))?(n="-"===o[1]?-1:1,s={y:Lr(o[2],n),M:Lr(o[3],n),w:Lr(o[4],n),d:Lr(o[5],n),h:Lr(o[6],n),m:Lr(o[7],n),s:Lr(o[8],n)}):null==s?s={}:"object"===typeof s&&("from"in s||"to"in s)&&(i=xr(Jn(s.from),Jn(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new lr(s),cr(e)&&c(e,"_locale")&&(r._locale=e._locale),cr(e)&&c(e,"_isValid")&&(r._isValid=e._isValid),r}function Lr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ir(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function xr(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Ir(e,t):(n=Ir(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function kr(e,t){return function(n,r){var i,s;return null===r||isNaN(+r)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=Ar(n,r),Dr(this,i,e),this}}function Dr(e,t,n,r){var i=t._milliseconds,o=ur(t._days),a=ur(t._months);e.isValid()&&(r=null==r||r,a&&ht(e,fe(e,"Month")+a*n),o&&pe(e,"Date",fe(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&s.updateOffset(e,o||a))}Ar.fn=lr.prototype,Ar.invalid=ar;var Hr=kr(1,"add"),Pr=kr(-1,"subtract");function jr(e){return"string"===typeof e||e instanceof String}function Fr(e){return T(e)||m(e)||jr(e)||d(e)||Ur(e)||Yr(e)||null===e||void 0===e}function Yr(e){var t,n,r=l(e)&&!u(e),i=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=s.length;for(t=0;t<o;t+=1)n=s[t],i=i||c(e,n);return r&&i}function Ur(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!d(t)&&jr(e)})).length),t&&n}function Vr(e){var t,n,r=l(e)&&!u(e),i=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)n=s[t],i=i||c(e,n);return r&&i}function Br(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Wr(e,t){1===arguments.length&&(arguments[0]?Fr(arguments[0])?(e=arguments[0],t=void 0):Vr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Jn(),r=pr(n,this).startOf("day"),i=s.calendarFormat(this,r)||"sameElse",o=t&&(L(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Jn(n)))}function Gr(){return new C(this)}function zr(e,t){var n=T(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&(t=se(t)||"millisecond","millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Kr(e,t){var n=T(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&(t=se(t)||"millisecond","millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Xr(e,t,n,r){var i=T(e)?e:Jn(e),s=T(t)?t:Jn(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&(r=r||"()",("("===r[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n)))}function $r(e,t){var n,r=T(e)?e:Jn(e);return!(!this.isValid()||!r.isValid())&&(t=se(t)||"millisecond","millisecond"===t?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Jr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qr(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(r=pr(e,this),!r.isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=se(t),t){case"year":s=Zr(this,r)/12;break;case"month":s=Zr(this,r);break;case"quarter":s=Zr(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:he(s)}function Zr(e,t){if(e.date()<t.date())return-Zr(t,e);var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(i,"months");return t-s<0?(n=e.clone().add(i-1,"months"),r=(t-s)/(s-n)):(n=e.clone().add(i+1,"months"),r=(t-s)/(n-s)),-(i+r)||0}function ei(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ti(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ni(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=s+'[")]',this.format(e+t+n+r)}function ri(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function ii(e,t){return this.isValid()&&(T(e)&&e.isValid()||Jn(e).isValid())?Ar({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(Jn(),e)}function oi(e,t){return this.isValid()&&(T(e)&&e.isValid()||Jn(e).isValid())?Ar({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Jn(),e)}function li(e){var t;return void 0===e?this._locale._abbr:(t=_n(e),null!=t&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ci=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ui(){return this._locale}var hi=1e3,di=60*hi,mi=60*di,fi=3506328*mi;function pi(e,t){return(e%t+t)%t}function gi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function yi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function wi(e){var t,n;if(e=se(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yi:gi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pi(t+(this._isUTC?0:this.utcOffset()*di),mi);break;case"minute":t=this._d.valueOf(),t-=pi(t,di);break;case"second":t=this._d.valueOf(),t-=pi(t,hi);break}return this._d.setTime(t),s.updateOffset(this,!0),this}function bi(e){var t,n;if(e=se(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yi:gi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=mi-pi(t+(this._isUTC?0:this.utcOffset()*di),mi)-1;break;case"minute":t=this._d.valueOf(),t+=di-pi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=hi-pi(t,hi)-1;break}return this._d.setTime(t),s.updateOffset(this,!0),this}function _i(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function Si(){return new Date(this.valueOf())}function Ei(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ci(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Ti(){return this.isValid()?this.toISOString():null}function Mi(){return b(this)}function Ri(){return p({},w(this))}function Oi(){return w(this).overflow}function Ni(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(e,t){var n,r,i,o=this._eras||_n("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":i=s(o[n].since).startOf("day"),o[n].since=i.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":i=s(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf();break}}return o}function Li(e,t,n){var r,i,s,o,a,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(s=l[r].name.toUpperCase(),o=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[r];break;case"NNNN":if(s===e)return l[r];break;case"NNNNN":if(a===e)return l[r];break}else if([s,o,a].indexOf(e)>=0)return l[r]}function Ii(e,t){var n=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*n}function xi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function ki(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Di(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Hi(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-s(i[e].since).year())*n+i[e].offset;return this.year()}function Pi(e){return c(this,"_erasNameRegex")||Wi.call(this),e?this._erasNameRegex:this._erasRegex}function ji(e){return c(this,"_erasAbbrRegex")||Wi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fi(e){return c(this,"_erasNarrowRegex")||Wi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Yi(e,t){return t.erasAbbrRegex(e)}function Ui(e,t){return t.erasNameRegex(e)}function Vi(e,t){return t.erasNarrowRegex(e)}function Bi(e,t){return t._eraYearOrdinalRegex||Ae}function Wi(){var e,t,n=[],r=[],i=[],s=[],o=this.eras();for(e=0,t=o.length;e<t;++e)r.push(Fe(o[e].name)),n.push(Fe(o[e].abbr)),i.push(Fe(o[e].narrow)),s.push(Fe(o[e].name)),s.push(Fe(o[e].abbr)),s.push(Fe(o[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function Gi(e,t){V(0,[e,e.length],0,t)}function zi(e){return Qi.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ki(e){return Qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Xi(){return Tt(this.year(),1,4)}function $i(){return Tt(this.isoWeekYear(),1,4)}function qi(){var e=this.localeData()._week;return Tt(this.year(),e.dow,e.doy)}function Ji(){var e=this.localeData()._week;return Tt(this.weekYear(),e.dow,e.doy)}function Qi(e,t,n,r,i){var s;return null==e?Ct(this,r,i).year:(s=Tt(e,r,i),t>s&&(t=s),Zi.call(this,e,t,n,r,i))}function Zi(e,t,n,r,i){var s=Et(e,t,n,r,i),o=vt(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function es(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),He("N",Yi),He("NN",Yi),He("NNN",Yi),He("NNNN",Ui),He("NNNNN",Vi),Ue(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?w(n).era=i:w(n).invalidEra=e})),He("y",Ae),He("yy",Ae),He("yyy",Ae),He("yyyy",Ae),He("yo",Bi),Ue(["y","yy","yyy","yyyy"],Ge),Ue(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ge]=n._locale.eraYearOrdinalParse(e,i):t[Ge]=parseInt(e,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Gi("gggg","weekYear"),Gi("ggggg","weekYear"),Gi("GGGG","isoWeekYear"),Gi("GGGGG","isoWeekYear"),ie("weekYear","gg"),ie("isoWeekYear","GG"),le("weekYear",1),le("isoWeekYear",1),He("G",Le),He("g",Le),He("GG",Ce,_e),He("gg",Ce,_e),He("GGGG",Oe,Se),He("gggg",Oe,Se),He("GGGGG",Ne,Ee),He("ggggg",Ne,Ee),Ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=de(e)})),Ve(["gg","GG"],(function(e,t,n,r){t[r]=s.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),ie("quarter","Q"),le("quarter",7),He("Q",be),Ue("Q",(function(e,t){t[ze]=3*(de(e)-1)})),V("D",["DD",2],"Do","date"),ie("date","D"),le("date",9),He("D",Ce),He("DD",Ce,_e),He("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Ue(["D","DD"],Ke),Ue("Do",(function(e,t){t[Ke]=de(e.match(Ce)[0])}));var ts=me("Date",!0);function ns(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),ie("dayOfYear","DDD"),le("dayOfYear",4),He("DDD",Re),He("DDDD",ve),Ue(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=de(e)})),V("m",["mm",2],0,"minute"),ie("minute","m"),le("minute",14),He("m",Ce),He("mm",Ce,_e),Ue(["m","mm"],$e);var rs=me("Minutes",!1);V("s",["ss",2],0,"second"),ie("second","s"),le("second",15),He("s",Ce),He("ss",Ce,_e),Ue(["s","ss"],qe);var is,ss,os=me("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ie("millisecond","ms"),le("millisecond",16),He("S",Re,be),He("SS",Re,_e),He("SSS",Re,ve),is="SSSS";is.length<=9;is+="S")He(is,Ae);function as(e,t){t[Je]=de(1e3*("0."+e))}for(is="S";is.length<=9;is+="S")Ue(is,as);function ls(){return this._isUTC?"UTC":""}function cs(){return this._isUTC?"Coordinated Universal Time":""}ss=me("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var us=C.prototype;function hs(e){return Jn(1e3*e)}function ds(){return Jn.apply(null,arguments).parseZone()}function ms(e){return e}us.add=Hr,us.calendar=Wr,us.clone=Gr,us.diff=Qr,us.endOf=bi,us.format=ri,us.from=ii,us.fromNow=si,us.to=oi,us.toNow=ai,us.get=ge,us.invalidAt=Oi,us.isAfter=zr,us.isBefore=Kr,us.isBetween=Xr,us.isSame=$r,us.isSameOrAfter=qr,us.isSameOrBefore=Jr,us.isValid=Mi,us.lang=ci,us.locale=li,us.localeData=ui,us.max=Zn,us.min=Qn,us.parsingFlags=Ri,us.set=ye,us.startOf=wi,us.subtract=Pr,us.toArray=Ei,us.toObject=Ci,us.toDate=Si,us.toISOString=ti,us.inspect=ni,"undefined"!==typeof Symbol&&null!=Symbol.for&&(us[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),us.toJSON=Ti,us.toString=ei,us.unix=vi,us.valueOf=_i,us.creationData=Ni,us.eraName=xi,us.eraNarrow=ki,us.eraAbbr=Di,us.eraYear=Hi,us.year=wt,us.isLeapYear=bt,us.weekYear=zi,us.isoWeekYear=Ki,us.quarter=us.quarters=es,us.month=dt,us.daysInMonth=mt,us.week=us.weeks=At,us.isoWeek=us.isoWeeks=Lt,us.weeksInYear=qi,us.weeksInWeekYear=Ji,us.isoWeeksInYear=Xi,us.isoWeeksInISOWeekYear=$i,us.date=ts,us.day=us.days=zt,us.weekday=Kt,us.isoWeekday=Xt,us.dayOfYear=ns,us.hour=us.hours=on,us.minute=us.minutes=rs,us.second=us.seconds=os,us.millisecond=us.milliseconds=ss,us.utcOffset=yr,us.utc=br,us.local=_r,us.parseZone=vr,us.hasAlignedHourOffset=Sr,us.isDST=Er,us.isLocal=Tr,us.isUtcOffset=Mr,us.isUtc=Rr,us.isUTC=Rr,us.zoneAbbr=ls,us.zoneName=cs,us.dates=R("dates accessor is deprecated. Use date instead.",ts),us.months=R("months accessor is deprecated. Use month instead",dt),us.years=R("years accessor is deprecated. Use year instead",wt),us.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",wr),us.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Cr);var fs=k.prototype;function ps(e,t,n,r){var i=_n(),s=g().set(r,t);return i[n](s,e)}function gs(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return ps(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ps(e,r,n,"month");return i}function ys(e,t,n,r){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,s=_n(),o=e?s._week.dow:0,a=[];if(null!=n)return ps(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=ps(t,(i+o)%7,r,"day");return a}function ws(e,t){return gs(e,t,"months")}function bs(e,t){return gs(e,t,"monthsShort")}function _s(e,t,n){return ys(e,t,n,"weekdays")}function vs(e,t,n){return ys(e,t,n,"weekdaysShort")}function Ss(e,t,n){return ys(e,t,n,"weekdaysMin")}fs.calendar=H,fs.longDateFormat=X,fs.invalidDate=q,fs.ordinal=Z,fs.preparse=ms,fs.postformat=ms,fs.relativeTime=te,fs.pastFuture=ne,fs.set=I,fs.eras=Ai,fs.erasParse=Li,fs.erasConvertYear=Ii,fs.erasAbbrRegex=ji,fs.erasNameRegex=Pi,fs.erasNarrowRegex=Fi,fs.months=at,fs.monthsShort=lt,fs.monthsParse=ut,fs.monthsRegex=pt,fs.monthsShortRegex=ft,fs.week=Mt,fs.firstDayOfYear=Nt,fs.firstDayOfWeek=Ot,fs.weekdays=Ut,fs.weekdaysMin=Bt,fs.weekdaysShort=Vt,fs.weekdaysParse=Gt,fs.weekdaysRegex=$t,fs.weekdaysShortRegex=qt,fs.weekdaysMinRegex=Jt,fs.isPM=rn,fs.meridiem=an,yn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),s.lang=R("moment.lang is deprecated. Use moment.locale instead.",yn),s.langData=R("moment.langData is deprecated. Use moment.localeData instead.",_n);var Es=Math.abs;function Cs(){var e=this._data;return this._milliseconds=Es(this._milliseconds),this._days=Es(this._days),this._months=Es(this._months),e.milliseconds=Es(e.milliseconds),e.seconds=Es(e.seconds),e.minutes=Es(e.minutes),e.hours=Es(e.hours),e.months=Es(e.months),e.years=Es(e.years),this}function Ts(e,t,n,r){var i=Ar(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ms(e,t){return Ts(this,e,t,1)}function Rs(e,t){return Ts(this,e,t,-1)}function Os(e){return e<0?Math.floor(e):Math.ceil(e)}function Ns(){var e,t,n,r,i,s=this._milliseconds,o=this._days,a=this._months,l=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*Os(Ls(a)+o),o=0,a=0),l.milliseconds=s%1e3,e=he(s/1e3),l.seconds=e%60,t=he(e/60),l.minutes=t%60,n=he(t/60),l.hours=n%24,o+=he(n/24),i=he(As(o)),a+=i,o-=Os(Ls(i)),r=he(a/12),a%=12,l.days=o,l.months=a,l.years=r,this}function As(e){return 4800*e/146097}function Ls(e){return 146097*e/4800}function Is(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=se(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+As(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ls(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function xs(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*de(this._months/12):NaN}function ks(e){return function(){return this.as(e)}}var Ds=ks("ms"),Hs=ks("s"),Ps=ks("m"),js=ks("h"),Fs=ks("d"),Ys=ks("w"),Us=ks("M"),Vs=ks("Q"),Bs=ks("y");function Ws(){return Ar(this)}function Gs(e){return e=se(e),this.isValid()?this[e+"s"]():NaN}function zs(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ks=zs("milliseconds"),Xs=zs("seconds"),$s=zs("minutes"),qs=zs("hours"),Js=zs("days"),Qs=zs("months"),Zs=zs("years");function eo(){return he(this.days()/7)}var to=Math.round,no={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ro(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function io(e,t,n,r){var i=Ar(e).abs(),s=to(i.as("s")),o=to(i.as("m")),a=to(i.as("h")),l=to(i.as("d")),c=to(i.as("M")),u=to(i.as("w")),h=to(i.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||u<=1&&["w"]||u<n.w&&["ww",u]),d=d||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],d[2]=t,d[3]=+e>0,d[4]=r,ro.apply(null,d)}function so(e){return void 0===e?to:"function"===typeof e&&(to=e,!0)}function oo(e,t){return void 0!==no[e]&&(void 0===t?no[e]:(no[e]=t,"s"===e&&(no.ss=t-1),!0))}function ao(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=no;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(s=Object.assign({},no,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),n=this.localeData(),r=io(this,!i,s,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var lo=Math.abs;function co(e){return(e>0)-(e<0)||+e}function uo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,o,a,l=lo(this._milliseconds)/1e3,c=lo(this._days),u=lo(this._months),h=this.asSeconds();return h?(e=he(l/60),t=he(e/60),l%=60,e%=60,n=he(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",s=co(this._months)!==co(h)?"-":"",o=co(this._days)!==co(h)?"-":"",a=co(this._milliseconds)!==co(h)?"-":"",i+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(c?o+c+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var ho=lr.prototype;return ho.isValid=or,ho.abs=Cs,ho.add=Ms,ho.subtract=Rs,ho.as=Is,ho.asMilliseconds=Ds,ho.asSeconds=Hs,ho.asMinutes=Ps,ho.asHours=js,ho.asDays=Fs,ho.asWeeks=Ys,ho.asMonths=Us,ho.asQuarters=Vs,ho.asYears=Bs,ho.valueOf=xs,ho._bubble=Ns,ho.clone=Ws,ho.get=Gs,ho.milliseconds=Ks,ho.seconds=Xs,ho.minutes=$s,ho.hours=qs,ho.days=Js,ho.weeks=eo,ho.months=Qs,ho.years=Zs,ho.humanize=ao,ho.toISOString=uo,ho.toString=uo,ho.toJSON=uo,ho.locale=li,ho.localeData=ui,ho.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",uo),ho.lang=ci,V("X",0,0,"unix"),V("x",0,0,"valueOf"),He("x",Le),He("X",ke),Ue("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Ue("x",(function(e,t,n){n._d=new Date(de(e))})),
- //! moment.js
- s.version="2.29.4",o(Jn),s.fn=us,s.min=tr,s.max=nr,s.now=rr,s.utc=g,s.unix=hs,s.months=ws,s.isDate=m,s.locale=yn,s.invalid=_,s.duration=Ar,s.isMoment=T,s.weekdays=_s,s.parseZone=ds,s.localeData=_n,s.isDuration=cr,s.monthsShort=bs,s.weekdaysMin=Ss,s.defineLocale=wn,s.updateLocale=bn,s.locales=vn,s.weekdaysShort=vs,s.normalizeUnits=se,s.relativeTimeRounding=so,s.relativeTimeThreshold=oo,s.calendarFormat=Br,s.prototype=us,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}))}).call(this,n("62e4")(e))},c24d:function(e,t,n){"use strict";n.d(t,"a",(function(){return G}));var r=n("c0d8"),i=n("2b0e");function s(e,t,n){return t=y(t),_(e,o()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function h(e){return h="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},h(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function f(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t,n){return t=u(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t){if(t&&("object"===typeof t||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return b(e)}var v=Symbol("unassigned"),S=null,E="The Handsontable instance bound to this component was destroyed and cannot be used properly.";function C(e){e.hotInstance&&(e.hotInstance.addHook("beforeChange",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeCreateRow",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeCreateCol",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeRemoveRow",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeRemoveCol",(function(){e.__internalEdit=!0})))}function T(e){var t=r["a"].hooks.getRegistered(),n={};for(var i in Object.assign(n,r["a"].DefaultSettings),n)n[i]={default:v};for(var s=0;s<t.length;s++)n[t[s]]={default:v};return n.settings={default:v},"HotTable"===e&&(n.id={type:String,default:"hot-"+Math.random().toString(36).substring(5)},n.wrapperRendererCacheSize={type:Number,default:3e3}),n}function M(e){var t={},n=e["settings"];if(n!==v)for(var r in n)n.hasOwnProperty(r)&&n[r]!==v&&(t[r]=n[r]);for(var i in e)e.hasOwnProperty(i)&&"settings"!==i&&e[i]!==v&&(t[i]=e[i]);return t}function R(e,t){var n=M(e),r=e.settings?e.settings:n,i=e.settings?n:null,s={};for(var o in r)!r.hasOwnProperty(o)||void 0===r[o]||t&&"data"!==o&&L(t[o],r[o])||(s[o]=r[o]);for(var a in i)!i.hasOwnProperty(a)||"id"===a||"settings"===a||"wrapperRendererCacheSize"===a||void 0===i[a]||t&&"data"!==a&&L(t[a],i[a])||(s[a]=i[a]);return s}function O(e,t){var n=null;return e.every((function(e,r){return!e.data||!e.data.attrs||void 0===e.data.attrs[t]||(n=e,!1)})),n}function N(e){return e.filter((function(e){return"HotColumn"===e.$options.name}))}function A(e,t,n,r){var i=t.$el?t.$el.ownerDocument:document,s={propsData:n,parent:t,data:r};S||(S=i.createElement("DIV"),S.id="vueHotComponents",i.body.appendChild(S));var o=i.createElement("DIV");return S.appendChild(o),new e.componentOptions.Ctor(s).$mount(o)}function L(e,t){var n=function(e){var t=function(){var e=new WeakSet;return function(t,n){if("object"===h(n)&&null!==n){if(e.has(n))return;e.add(n)}return n}}();return JSON.stringify(e,t)};return"function"===typeof e&&"function"===typeof t?e.toString()===t.toString():h(e)===h(t)&&n(e)===n(t)}var I="14.3.0";"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self&&self;function x(e,t){return t={exports:{}},e(t,t.exports),t.exports}var k=x((function(e,t){(function(e,n){var r=t;n(r)})(0,(function(e){var t=Symbol("newer"),n=Symbol("older");function r(e,t){"number"!==typeof e&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}e.LRUMap=r,r.prototype._markEntryAsUsed=function(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)},r.prototype.assign=function(e){var r,s=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var o=e[Symbol.iterator](),a=o.next();!a.done;a=o.next()){var l=new i(a.value[0],a.value[1]);if(this._keymap.set(l.key,l),r?(r[t]=l,l[n]=r):this.oldest=l,r=l,0==s--)throw new Error("overflow")}this.newest=r,this.size=this._keymap.size},r.prototype.get=function(e){var t=this._keymap.get(e);if(t)return this._markEntryAsUsed(t),t.value},r.prototype.set=function(e,r){var s=this._keymap.get(e);return s?(s.value=r,this._markEntryAsUsed(s),this):(this._keymap.set(e,s=new i(e,r)),this.newest?(this.newest[t]=s,s[n]=this.newest):this.oldest=s,this.newest=s,++this.size,this.size>this.limit&&this.shift(),this)},r.prototype.shift=function(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap["delete"](e.key),--this.size,[e.key,e.value]},r.prototype.has=function(e){return this._keymap.has(e)}}))})),D=k.LRUMap,H={name:"HotTable",props:T("HotTable"),watch:{mergedHotSettings:function(e){this.hotInstance&&void 0!==e&&(e.data&&(this.hotInstance.isColumnModificationAllowed()||!this.hotInstance.isColumnModificationAllowed()&&this.hotInstance.countSourceCols()===this.miscCache.currentSourceColumns)&&(this.matchHotMappersSize(),delete e.data),Object.keys(e).length?this.hotInstance.updateSettings(e):this.hotInstance.render(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols())}},data:function(){var e=this,t=new D(this.wrapperRendererCacheSize);return t.shift=function(){var e=D.prototype.shift.call(this);return e[1].component.$destroy(),e},{__internalEdit:!1,miscCache:{currentSourceColumns:null},__hotInstance:null,columnSettings:null,rendererCache:t,editorCache:new Map,get hotInstance(){return!e.__hotInstance||e.__hotInstance&&!e.__hotInstance.isDestroyed?e.__hotInstance:(console.warn(E),null)},set hotInstance(t){e.__hotInstance=t}}},computed:{mergedHotSettings:function(){return R(this.$props,this.hotInstance?this.hotInstance.getSettings():void 0)}},methods:{hotInit:function(){var e=this.getGlobalRendererVNode(),t=this.getGlobalEditorVNode(),n=R(this.$props);n.columns=this.columnSettings?this.columnSettings:n.columns,t&&(n.editor=this.getEditorClass(t,this),t.child.$destroy()),e&&(n.renderer=this.getRendererWrapper(e,this),e.child.$destroy()),this.hotInstance=new r["a"].Core(this.$el,n),this.hotInstance.init(),C(this),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols()},matchHotMappersSize:function(){var e=this;if(this.hotInstance){var t,n=this.hotInstance.getSourceData(),r=[],i=[],s=this.hotInstance.rowIndexMapper.getNumberOfIndexes(),o=this.hotInstance.isColumnModificationAllowed(),a=0;if(n&&n.length!==s&&n.length<s)for(var l=n.length;l<s;l++)r.push(l);if(o)if(a=this.hotInstance.columnIndexMapper.getNumberOfIndexes(),n&&n[0]&&(null===(t=n[0])||void 0===t?void 0:t.length)!==a&&n[0].length<a)for(var c=n[0].length;c<a;c++)i.push(c);this.hotInstance.batch((function(){r.length>0?e.hotInstance.rowIndexMapper.removeIndexes(r):e.hotInstance.rowIndexMapper.insertIndexes(s-1,n.length-s),o&&0!==n.length&&(i.length>0?e.hotInstance.columnIndexMapper.removeIndexes(i):e.hotInstance.columnIndexMapper.insertIndexes(a-1,n[0].length-a))}))}},getGlobalRendererVNode:function(){var e=this.$slots["default"]||[];return O(e,"hot-renderer")},getGlobalEditorVNode:function(){var e=this.$slots["default"]||[];return O(e,"hot-editor")},getColumnSettings:function(){var e=N(this.$children),t=!1,n=e.map((function(e){return e.usesRendererComponent&&(t=!0),l({},e.columnSettings)}));return t&&this.settings&&(!1!==this.settings.autoColumnSize||this.settings.autoRowSize)&&(!1!==this.autoColumnSize||this.autoRowSize)&&console.warn("Your `hot-table` configuration includes both `hot-column` and `autoRowSize`/`autoColumnSize`, which are not compatible with each other in this version of `@handsontable/vue`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment."),n.length?n:void 0},getRendererWrapper:function(e,t){var n=this;return function(r,i,s,o,a,l,c){if(i&&!i.getAttribute("ghost-table")){var u=n.rendererCache,h={hotInstance:r,TD:i,row:s,col:o,prop:a,value:l,cellProperties:c,isRenderer:!0};if(u&&!u.has("".concat(s,"-").concat(o))){var d=A(e,t,e.componentOptions.propsData,h);u.set("".concat(s,"-").concat(o),{component:d,lastUsedTD:null})}var m=u.get("".concat(s,"-").concat(o)),f=m.component,p=m.lastUsedTD;if(Object.assign(f.$data,h),!f.$el.parentElement||p!==i){while(i.firstChild)i.removeChild(i.firstChild);i.appendChild(f.$el),m.lastUsedTD=i}}return i}},getEditorClass:function(e,t){var n=e.key?e.key.toString():null,r=e.componentOptions.Ctor.options.name,i=n?"".concat(r,":").concat(n):r,s=this.editorCache,o=null;return s.has(i)?o=s.get(i):(o=A(e,t,e.componentOptions.propsData,{isEditor:!0}),s.set(i,o)),o.$data.hotCustomEditorClass}},mounted:function(){return this.columnSettings=this.getColumnSettings(),this.hotInit()},beforeDestroy:function(){this.hotInstance&&this.hotInstance.destroy()},version:I};function P(e,t,n,r,i,s,o,a,l,c){"boolean"!==typeof o&&(l=a,a=o,o=!1);const u="function"===typeof n?n.options:n;let h;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),s?(h=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,l(e)),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=h):t&&(h=o?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),h)if(u.functional){const e=u.render;u.render=function(t,n){return h.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,h):[h]}return n}var j=H,F=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:e.id}},[e._t("default")],2)},Y=[],U=void 0,V=void 0,B=void 0,W=!1,G=P({render:F,staticRenderFns:Y},U,j,V,W,B,!1,void 0,void 0,void 0);T("HotColumn");
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of the
- License at http://www.apache.org/licenses/LICENSE-2.0
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
- MERCHANTABLITY OR NON-INFRINGEMENT.
- See the Apache Version 2.0 License for specific language governing permissions
- and limitations under the License.
- ***************************************************************************** */
- function z(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function K(e){return K="function"===typeof Symbol&&"symbol"===h(Symbol.iterator)?function(e){return h(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":h(e)},K(e)}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e){return q(e)||J(e)||Q()}function q(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function J(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function Q(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Z(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function ee(e,t){te(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){te(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){te(e,t,n)}))}function te(e,t,n){var r=n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t);r.forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}var ne={__proto__:[]},re=ne instanceof Array;function ie(e){var t=K(e);return null==e||"object"!==t&&"function"!==t}function se(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var r=new t;t.prototype._init=n;var i={};return Object.keys(r).forEach((function(e){void 0!==r[e]&&(i[e]=r[e])})),i}var oe=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(oe.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"===typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return X({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return se(this,e)}});var r=e.__decorators__;r&&(r.forEach((function(e){return e(t)})),delete e.__decorators__);var s=Object.getPrototypeOf(e.prototype),o=s instanceof i["default"]?s.constructor:i["default"],a=o.extend(t);return ce(a,e,o),Z()&&ee(a,e),a}var le={prototype:!0,arguments:!0,callee:!0,caller:!0};function ce(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!le[r]){var i=Object.getOwnPropertyDescriptor(e,r);if(!i||i.configurable){var s=Object.getOwnPropertyDescriptor(t,r);if(!re){if("cid"===r)return;var o=Object.getOwnPropertyDescriptor(n,r);if(!ie(s.value)&&o&&o.value===s.value)return}Object.defineProperty(e,r,s)}}}))}function ue(e){return"function"===typeof e?ae(e):function(t){return ae(t,e)}}ue.registerHooks=function(e){oe.push.apply(oe,$(e))};var he=function(e){function t(){var e;return d(this,t),e=s(this,t,arguments),e.name="BaseEditorComponent",e.instance=null,e.row=null,e.col=null,e.prop=null,e.TD=null,e.originalValue=null,e.cellProperties=null,e.state=null,e.hot=null,e}return g(t,e),f(t,[{key:"mounted",value:function(){var e=this;this.$data.hotCustomEditorClass=function(){var t=function(t){function n(t){var r;return d(this,n),r=s(this,n,[t]),e.$data.hotCustomEditorInstance=r,r}return g(n,t),f(n,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(r["a"].editors.BaseEditor);return Object.getOwnPropertyNames(r["a"].editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(t.prototype[n]=function(){for(var t,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(t=e[n]).call.apply(t,[this].concat(i))})})),t}()}},{key:"_fireCallbacks",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];(e=r["a"].editors.BaseEditor.prototype._fireCallbacks).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.beginEditing).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.cancelChanges).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.checkEditorSection).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.close).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.discardEditor).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.enableFullEditMode).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.extend).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.finishEditing).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.focus).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.init).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isInFullEditMode).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isOpened).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isWaiting).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.open).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(e,t,n,i,s,o){return this.$data.hotInstance=o.instance,this.$data.row=e,this.$data.col=t,this.$data.prop=n,this.$data.TD=i,this.$data.originalValue=s,this.$data.cellProperties=o,r["a"].editors.BaseEditor.prototype.prepare.call(this.$data.hotCustomEditorInstance,e,t,n,i,s,o)}},{key:"saveValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.saveValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.setValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.addHook).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.removeHooksByKey).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.clearHooks).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCell).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellRect).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsLayerClass",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellsLayerClass).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}}])}(i["default"]);he=z([ue({})],he)},c272:function(e,t,n){"use strict";e.exports={}},c4fa:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));const r="gridDefault",i="editorManager.handlingEditor"},c5ae:function(e,t,n){"use strict";var r=n("9e75"),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},c5c4:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));n("7a89");var r=n("f938"),i=n("de3b"),s=n("491c"),o=n("87d6"),a=n("7b9c");function l(e,t){c(e,t),t.add(e)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,n){return t=h(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function m(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const f="editorManager.navigation";var p=new WeakSet;class g{constructor(e,t,n){l(this,p),u(this,"hot",void 0),u(this,"tableMeta",void 0),u(this,"selection",void 0),u(this,"eventManager",void 0),u(this,"destroyed",!1),u(this,"lock",!1),u(this,"activeEditor",void 0),u(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=n,this.eventManager=new o["a"](e),this.hot.addHook("afterDocumentKeyDown",e=>m(p,this,y).call(this,e)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)}),this.hot.view._wt.update("onCellDblClick",(e,t,n)=>m(p,this,w).call(this,e,t,n))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,e=>{e&&this.prepareEditor()});const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:n,col:r}=t,i=this.hot.runHooks("modifyGetCellCoords",n,r);let o=n,a=r;if(Array.isArray(i)&&([o,a]=i),this.cellProperties=this.hot.getCellMeta(o,a),!this.isCellEditable())return void this.clearActiveEditor();const l=this.hot.getCell(n,r,!0);if(l){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(a),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(o),a);this.activeEditor=Object(s["b"])(e,this.hot),this.activeEditor.prepare(n,r,t,l,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const r=this.hot.getSelectedRangeLast();let i=this.hot.runHooks("beforeBeginEditing",r.highlight.row,r.highlight.col,e,t,n);t instanceof MouseEvent&&"boolean"!==typeof i&&(i=0===this.hot.selection.getLayerLevel()&&r.isSingle()),!1!==i?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(n&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,n){this.activeEditor?this.activeEditor.finishEditing(e,t,n):n&&n(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:n,col:r}=e.highlight,{rowIndexMapper:i,columnIndexMapper:s}=this.hot,o=i.isHidden(this.hot.toPhysicalRow(n))||s.isHidden(this.hot.toPhysicalColumn(r));return!(this.cellProperties.readOnly||!t||o)}moveSelectionAfterEnter(e){const t={..."function"===typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function y(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||Object(i["isImmediatePropagationStopped"])(e))return;const{keyCode:n}=e,s=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!Object(r["isFunctionKey"])(n)&&!Object(r["isCtrlMetaKey"])(n)&&!s&&!this.isEditorOpened()){const t=this.hot.getShortcutManager(),n=t.getContext("editor"),r={runOnlyIf:()=>Object(a["isDefined"])(this.hot.getSelected()),group:f};n.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],r),this.openEditor("",e)}}function w(e,t){t.isCell()&&this.openEditor(null,e,!0)}const b=new WeakMap;g.getInstance=function(e,t,n){let r=b.get(e);return r||(r=new g(e,t,n),b.set(e,r)),r},t["b"]=g},c5cd:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return h}));n("7a89");var r=n("7b9c"),i=n("351d"),s=n("7ae0");function o(e,t,n){return t=a(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let c=0;class u{constructor(){o(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",()=>this.runLocalHooks("change",t)),c+=1)}unregister(e){const t=this.collection.get(e);Object(r["isDefined"])(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),c-=1)}unregisterAll(){this.collection.forEach((e,t)=>this.unregister(t)),this.collection.clear()}get(e){return Object(r["isUndefined"])(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach(t=>{t.remove(e)})}insertToEvery(e,t){this.collection.forEach(n=>{n.insert(e,t)})}initEvery(e){this.collection.forEach(t=>{t.init(e)})}}function h(){return c}Object(i["mixin"])(u,s["a"])},c7aa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=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?'אחה"צ':"אחרי הצהריים":"בערב"}});return t}))},c8f3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},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:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},cac7:function(e,t,n){"use strict";var r=n("d128"),i=n("a60d"),s=n("1caf");e.exports=function(e,t,n){r?i.f(e,t,s(0,n)):e[t]=n}},cbf2:function(e,t,n){"use strict";var r=n("80dd"),i=n("c272"),s=r("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[s]===e)}},cc6f:function(e,t,n){"use strict";n.d(t,"a",(function(){return ha})),n.d(t,"b",(function(){return Vt}));var r,i,s={};n.r(s),n.d(s,"AddressPlugin",(function(){return ba})),n.d(s,"ArrayPlugin",(function(){return _a})),n.d(s,"AbsPlugin",(function(){return va})),n.d(s,"BitShiftPlugin",(function(){return Ta})),n.d(s,"BitwiseLogicOperationsPlugin",(function(){return Na})),n.d(s,"BooleanPlugin",(function(){return Aa})),n.d(s,"CharPlugin",(function(){return La})),n.d(s,"CodePlugin",(function(){return Ia})),n.d(s,"CountBlankPlugin",(function(){return xa})),n.d(s,"CountUniquePlugin",(function(){return ka})),n.d(s,"DateTimePlugin",(function(){return Da})),n.d(s,"DegreesPlugin",(function(){return Ya})),n.d(s,"DeltaPlugin",(function(){return Ua})),n.d(s,"ExpPlugin",(function(){return Va})),n.d(s,"FinancialPlugin",(function(){return Ba})),n.d(s,"FormulaTextPlugin",(function(){return $a})),n.d(s,"HyperlinkPlugin",(function(){return qa})),n.d(s,"InformationPlugin",(function(){return Ja})),n.d(s,"IsEvenPlugin",(function(){return Qa})),n.d(s,"IsOddPlugin",(function(){return Za})),n.d(s,"LogarithmPlugin",(function(){return el})),n.d(s,"MathConstantsPlugin",(function(){return nl})),n.d(s,"MatrixPlugin",(function(){return sl})),n.d(s,"MedianPlugin",(function(){return ol})),n.d(s,"ModuloPlugin",(function(){return al})),n.d(s,"NumericAggregationPlugin",(function(){return ul})),n.d(s,"PowerPlugin",(function(){return ml})),n.d(s,"RadiansPlugin",(function(){return fl})),n.d(s,"RadixConversionPlugin",(function(){return _l})),n.d(s,"RandomPlugin",(function(){return Ol})),n.d(s,"RoundingPlugin",(function(){return Ll})),n.d(s,"SqrtPlugin",(function(){return Il})),n.d(s,"ConditionalAggregationPlugin",(function(){return Gl})),n.d(s,"SumprodPlugin",(function(){return zl})),n.d(s,"TextPlugin",(function(){return Kl})),n.d(s,"TrigonometryPlugin",(function(){return Xl})),n.d(s,"LookupPlugin",(function(){return ql})),n.d(s,"RomanPlugin",(function(){return Jl})),n.d(s,"SimpleArithmerticPlugin",(function(){return tc})),n.d(s,"StatisticalPlugin",(function(){return Jc})),n.d(s,"MathPlugin",(function(){return Qc})),n.d(s,"ComplexPlugin",(function(){return nu})),n.d(s,"StatisticalAggregationPlugin",(function(){return pu})),function(e){e["RELATIVE"]="RELATIVE",e["ABSOLUTE"]="ABSOLUTE"}(r||(r={}));class o{constructor(e,t,n){this.type=e,this.col=t,this.sheet=n}static absolute(e,t){return new o(r.ABSOLUTE,e,t)}static relative(e,t){return new o(r.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,n)=>t.toSimpleColumnAddress(e).col-n.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===r.ABSOLUTE}isColumnRelative(){return this.type===r.RELATIVE}isAbsolute(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new o(this.type,this.col+t,r)}shiftedByColumns(e){return new o(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){const t=wr(this,e);let n=this.col;return this.isColumnRelative()&&(n=e.col+this.col),hr(t,n)}shiftRelativeDimensions(e,t){const n=this.isColumnRelative()?this.col+e:this.col;return new o(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnAbsolute()?this.col+e:this.col;return new o(this.type,n,this.sheet)}withSheet(e){return new o(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case r.RELATIVE:return`${t}#COLR${this.col}`;case r.ABSOLUTE:return`${t}#COLA${this.col}`}}unparse(e){const t=this.toSimpleColumnAddress(e);if(dr(t))return;const n=j(t.col),i=this.type===r.ABSOLUTE?"$":"";return`${i}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class a{constructor(e,t,n){this.type=e,this.row=t,this.sheet=n}static absolute(e,t){return new a(r.ABSOLUTE,e,t)}static relative(e,t){return new a(r.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,n)=>t.toSimpleRowAddress(e).row-n.toSimpleRowAddress(e).row}isRowAbsolute(){return this.type===r.ABSOLUTE}isRowRelative(){return this.type===r.RELATIVE}isAbsolute(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new a(this.type,this.row+n,r)}shiftedByRows(e){return new a(this.type,this.row+e,this.sheet)}toSimpleRowAddress(e){const t=wr(this,e);let n=this.row;return this.isRowRelative()&&(n=e.row+this.row),cr(t,n)}shiftRelativeDimensions(e,t){const n=this.isRowRelative()?this.row+t:this.row;return new a(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isRowAbsolute()?this.row+t:this.row;return new a(this.type,n,this.sheet)}withSheet(e){return new a(this.type,this.row,e)}isInvalid(e){return this.toSimpleRowAddress(e).row<0}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case r.RELATIVE:return`${t}#ROWR${this.row}`;case r.ABSOLUTE:return`${t}#ROWA${this.row}`}}unparse(e){const t=this.toSimpleRowAddress(e);if(ur(t))return;const n=this.type===r.ABSOLUTE?"$":"";return`${n}${t.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["CELL_REFERENCE_RELATIVE"]="CELL_REFERENCE",e["CELL_REFERENCE_ABSOLUTE"]="CELL_REFERENCE_ABSOLUTE",e["CELL_REFERENCE_ABSOLUTE_COL"]="CELL_REFERENCE_ABSOLUTE_COL",e["CELL_REFERENCE_ABSOLUTE_ROW"]="CELL_REFERENCE_ABSOLUTE_ROW"})(i||(i={}));class l{constructor(e,t,n,r){this.col=e,this.row=t,this.type=n,this.sheet=r}static fromColAndRow(e,t,n){const r=e.isColumnAbsolute()&&t.isRowAbsolute()?l.absolute.bind(this):e.isColumnAbsolute()?l.absoluteCol.bind(this):t.isRowAbsolute()?l.absoluteRow.bind(this):l.relative.bind(this);return r(e.col,t.row,n)}static relative(e,t,n){return new l(e,t,i.CELL_REFERENCE_RELATIVE,n)}static absolute(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){const t=wr(this,e);return this.type===i.CELL_REFERENCE_ABSOLUTE?mr(t,this.col,this.row):this.type===i.CELL_REFERENCE_ABSOLUTE_ROW?mr(t,e.col+this.col,this.row):this.type===i.CELL_REFERENCE_ABSOLUTE_COL?mr(t,this.col,e.row+this.row):mr(t,e.col+this.col,e.row+this.row)}toColumnAddress(){const e=this.isColumnRelative()?r.RELATIVE:r.ABSOLUTE;return new o(e,this.col,this.sheet)}toRowAddress(){const e=this.isRowRelative()?r.RELATIVE:r.ABSOLUTE;return new a(e,this.row,this.sheet)}toSimpleColumnAddress(e){const t=wr(this,e);let n=this.col;return this.isColumnRelative()&&(n+=e.col),hr(t,n)}toSimpleRowAddress(e){const t=wr(this,e);let n=this.row;return this.isRowRelative()&&(n+=e.row),cr(t,n)}isRowAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW}isColumnAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL}isColumnRelative(){return this.type===i.CELL_REFERENCE_RELATIVE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW}isRowRelative(){return this.type===i.CELL_REFERENCE_RELATIVE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL}isAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE&&void 0!==this.sheet}shiftedByRows(e){return new l(this.col,this.row+e,this.type,this.sheet)}shiftedByColumns(e){return new l(this.col+e,this.row,this.type,this.sheet)}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new l(this.col+t,this.row+n,this.type,r)}withSheet(e){return new l(this.col,this.row,this.type,e)}isInvalid(e){return fr(this.toSimpleCellAddress(e))}shiftRelativeDimensions(e,t){const n=this.isColumnAbsolute()?this.col:this.col+e,r=this.isRowAbsolute()?this.row:this.row+t;return new l(n,r,this.type,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnRelative()?this.col:this.col+e,r=this.isRowRelative()?this.row:this.row+t;return new l(n,r,this.type,this.sheet)}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case i.CELL_REFERENCE_RELATIVE:return`${t}#${this.row}R${this.col}`;case i.CELL_REFERENCE_ABSOLUTE:return`${t}#${this.row}A${this.col}`;case i.CELL_REFERENCE_ABSOLUTE_COL:return`${t}#${this.row}AC${this.col}`;case i.CELL_REFERENCE_ABSOLUTE_ROW:return`${t}#${this.row}AR${this.col}`}}unparse(e){const t=this.toSimpleCellAddress(e);if(fr(t))return;const n=j(t.col),r=this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",s=this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return`${s}${n}${r}${t.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const c=":",u="$",h="\\s+",d="[ \\t\\n\\r]+",m="A-Za-zÀ-ʯ",f=m+"0-9_.",p=`[${m}0-9_]+`,g="'(((?!').|'')*)'",y=`(${p}|${g})!`,w=`(${y})?\\${u}?[A-Za-z]+\\${u}?[0-9]+`,b=`(${y})?\\${u}?[A-Za-z]+`,_=`(${y})?\\${u}?[0-9]+`,v="[rR][0-9]*[cC][0-9]*",S=`(${w})[^${f}]`,E=`[${m}_][${f}]*`,C=["0","1","2","3","4","5","6","7","8","9"],T=[...Array.from(Array(26)).map((e,t)=>t+"A".charCodeAt(0)),...Array.from(Array(26)).map((e,t)=>t+"a".charCodeAt(0)),...Array.from(Array(496)).map((e,t)=>t+192)].map(e=>String.fromCharCode(e)),M=new RegExp(`^(${y})?(\\${u}?)([A-Za-z]+)(\\${u}?)([0-9]+)$`),R=new RegExp(`^(${y})?(\\${u}?)([A-Za-z]+)$`),O=new RegExp(`^(${y})?(\\${u}?)([0-9]+)$`),N=new RegExp(`^${p}$`),A=(e,t,n)=>{const r=M.exec(t),i=P(r[6]);let s=Y(r,e);if(void 0===s)return;null===s&&(s=void 0);const o=Number(r[8])-1;return r[5]===u&&r[7]===u?l.absolute(i,o,s):r[5]===u?l.absoluteCol(i,o-n.row,s):r[7]===u?l.absoluteRow(i-n.col,o,s):l.relative(i-n.col,o-n.row,s)},L=(e,t,n)=>{const r=R.exec(t);let i=Y(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=P(r[6]);return r[5]===u?o.absolute(s,i):o.relative(s-n.col,i)},I=(e,t,n)=>{const r=O.exec(t);let i=Y(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=Number(r[6])-1;return r[5]===u?a.absolute(s,i):a.relative(s-n.row,i)},x=(e,t,n)=>{const r=M.exec(t);if(!r)return;const i=P(r[6]);let s=Y(r,e);if(void 0===s)return;null===s&&(s=n);const o=Number(r[8])-1;return mr(s,i,o)},k=(e,t,n)=>{const r=t.split(c);if(2!==r.length)return;const[i,s]=r,o=x(e,i,n);if(void 0===o)return;const a=x(e,s,o.sheet);return void 0!==a&&o.sheet===a.sheet?Sr(o,a):void 0},D=(e,t,n)=>{const r=j(t.col),i=F(t.sheet,e);if(void 0!==i)return n!==t.sheet?`${i}!${r}${t.row+1}`:`${r}${t.row+1}`},H=(e,t,n)=>{const r=D(e,t.start,n),i=D(e,t.end,t.start.sheet);return void 0===r||void 0===i?void 0:`${r}${c}${i}`};function P(e){return 1===e.length?e.toUpperCase().charCodeAt(0)-65:e.split("").reduce((e,t)=>26*e+(t.toUpperCase().charCodeAt(0)-64),0)-1}function j(e){let t="";while(e>=0)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function F(e,t){let n=t(e);if(void 0!==n)return N.test(n)?n:(n=n.replace(/'/g,"''"),`'${n}'`)}function Y(e,t){var n;let r=null!==(n=e[3])&&void 0!==n?n:e[2];return r?(r=r.replace(/''/g,"'"),t(r)):null}var U=n("fa83");
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const V=(e,t)=>({type:e,message:t});var B,W,G;(function(e){e["LexingError"]="LexingError",e["ParserError"]="ParsingError",e["StaticOffsetError"]="StaticOffsetError",e["StaticOffsetOutOfRangeError"]="StaticOffsetOutOfRangeError",e["RangeOffsetNotAllowed"]="RangeOffsetNotAllowed",e["InvalidRangeSize"]="InvalidRangeSize"})(B||(B={})),function(e){e["EMPTY"]="EMPTY",e["NUMBER"]="NUMBER",e["STRING"]="STRING",e["MINUS_UNARY_OP"]="MINUS_UNARY_OP",e["PLUS_UNARY_OP"]="PLUS_UNARY_OP",e["PERCENT_OP"]="PERCENT_OP",e["CONCATENATE_OP"]="CONCATENATE_OP",e["EQUALS_OP"]="EQUALS_OP",e["NOT_EQUAL_OP"]="NOT_EQUAL_OP",e["GREATER_THAN_OP"]="GREATER_THAN_OP",e["LESS_THAN_OP"]="LESS_THAN_OP",e["GREATER_THAN_OR_EQUAL_OP"]="GREATER_THAN_OR_EQUAL_OP",e["LESS_THAN_OR_EQUAL_OP"]="LESS_THAN_OR_EQUAL_OP",e["PLUS_OP"]="PLUS_OP",e["MINUS_OP"]="MINUS_OP",e["TIMES_OP"]="TIMES_OP",e["DIV_OP"]="DIV_OP",e["POWER_OP"]="POWER_OP",e["FUNCTION_CALL"]="FUNCTION_CALL",e["NAMED_EXPRESSION"]="NAMED_EXPRESSION",e["PARENTHESIS"]="PARENTHESES",e["CELL_REFERENCE"]="CELL_REFERENCE",e["CELL_RANGE"]="CELL_RANGE",e["COLUMN_RANGE"]="COLUMN_RANGE",e["ROW_RANGE"]="ROW_RANGE",e["ERROR"]="ERROR",e["ERROR_WITH_RAW_INPUT"]="ERROR_WITH_RAW_INPUT",e["ARRAY"]="ARRAY"}(W||(W={})),function(e){e[e["RELATIVE"]=0]="RELATIVE",e[e["START_ABSOLUTE"]=1]="START_ABSOLUTE",e[e["BOTH_ABSOLUTE"]=2]="BOTH_ABSOLUTE"}(G||(G={}));const z=e=>({type:W.EMPTY,leadingWhitespace:null===e||void 0===e?void 0:e.image}),K=(e,t)=>({type:W.NUMBER,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),X=e=>{var t;return{type:W.STRING,value:e.image.slice(1,-1),leadingWhitespace:null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image}},$=(e,t)=>({type:W.CELL_REFERENCE,reference:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),q=(e,t,n,r)=>(ve(e,t,n),{type:W.CELL_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:r}),J=(e,t,n,r)=>(ve(e,t,n),{type:W.COLUMN_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null===r||void 0===r?void 0:r.image}),Q=(e,t,n,r)=>(ve(e,t,n),{type:W.ROW_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null===r||void 0===r?void 0:r.image}),Z=(e,t,n)=>({type:W.CONCATENATE_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ee=(e,t,n)=>({type:W.EQUALS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),te=(e,t,n)=>({type:W.NOT_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ne=(e,t,n)=>({type:W.GREATER_THAN_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),re=(e,t,n)=>({type:W.LESS_THAN_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ie=(e,t,n)=>({type:W.GREATER_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),se=(e,t,n)=>({type:W.LESS_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),oe=(e,t,n)=>({type:W.PLUS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ae=(e,t,n)=>({type:W.MINUS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),le=(e,t,n)=>({type:W.TIMES_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ce=(e,t,n)=>({type:W.DIV_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ue=(e,t,n)=>({type:W.POWER_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),he=(e,t)=>({type:W.MINUS_UNARY_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),de=(e,t)=>({type:W.PLUS_UNARY_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),me=(e,t)=>({type:W.PERCENT_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),fe=(e,t,n,r,i)=>({type:W.FUNCTION_CALL,procedureName:e,args:t,leadingWhitespace:null===n||void 0===n?void 0:n.image,internalWhitespace:null===r||void 0===r?void 0:r.image,hyperlink:i}),pe=(e,t,n)=>({type:W.ARRAY,args:e,leadingWhitespace:null===t||void 0===t?void 0:t.image,internalWhitespace:null===n||void 0===n?void 0:n.image}),ge=(e,t)=>({type:W.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),ye=(e,t,n)=>({type:W.PARENTHESIS,expression:e,leadingWhitespace:null===t||void 0===t?void 0:t.image,internalWhitespace:null===n||void 0===n?void 0:n.image}),we=(e,t)=>({type:W.ERROR,error:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),be=(e,t,n)=>({type:W.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null===n||void 0===n?void 0:n.image}),_e=()=>({type:W.ERROR,error:lr.parsingError()});function ve(e,t,n){if(void 0!==e.sheet&&void 0===t.sheet||void 0===e.sheet&&void 0!==t.sheet)throw new Error("Start address inconsistent with end address");if(void 0===e.sheet&&n!==G.RELATIVE||void 0!==e.sheet&&n===G.RELATIVE)throw new Error("Sheet address inconsistent with sheet reference type")}function Se(e,t){return(null!==t&&void 0!==t?t:"")+e}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Ee={[W.PLUS_OP]:"+",[W.MINUS_OP]:"-",[W.TIMES_OP]:"*",[W.DIV_OP]:"/",[W.CONCATENATE_OP]:"&",[W.POWER_OP]:"^",[W.EQUALS_OP]:"=",[W.NOT_EQUAL_OP]:"<>",[W.GREATER_THAN_OP]:">",[W.GREATER_THAN_OR_EQUAL_OP]:">=",[W.LESS_THAN_OP]:"<",[W.LESS_THAN_OR_EQUAL_OP]:"<="},Ce=(e,t,n,r)=>({ast:e,relativeDependencies:t,hasVolatileFunction:n,hasStructuralChangeFunction:r});
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Te{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){const n=mt(t,this.functionRegistry),r=Ce(t,n,Me(t,this.functionRegistry.isFunctionVolatile),Me(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange));return this.cache.set(e,r),r}get(e){return this.cache.get(e)}maybeSetAndThenGet(e,t){const n=this.cache.get(e);return void 0!==n?n.ast:(this.set(e,t),t)}}const Me=(e,t)=>{switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:case W.ERROR_WITH_RAW_INPUT:case W.CELL_REFERENCE:case W.CELL_RANGE:case W.COLUMN_RANGE:case W.ROW_RANGE:case W.NAMED_EXPRESSION:return!1;case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:return Me(e.value,t);case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:return Me(e.left,t)||Me(e.right,t);case W.PARENTHESIS:return Me(e.expression,t);case W.FUNCTION_CALL:return!!t(e.procedureName)||e.args.some(e=>Me(e,t));case W.ARRAY:return e.args.some(e=>e.some(e=>Me(e,t)))}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Re{}Re.DistinctSigns="Distinct signs.",Re.WrongArgNumber="Wrong number of arguments.",Re.EmptyArg="Empty function argument.",Re.EmptyArray="Empty array not allowed.",Re.ArrayDimensions="Array dimensions are not compatible.",Re.NoSpaceForArrayResult="No space for array result.",Re.ValueSmall="Value too small.",Re.ValueLarge="Value too large.",Re.BadCriterion="Incorrect criterion.",Re.RangeManySheets="Range spans more than one sheet.",Re.CellRangeExpected="Cell range expected.",Re.WrongDimension="Wrong range dimension.",Re.ScalarExpected="Cell range not allowed.",Re.NumberCoercion="Value cannot be coerced to number.",Re.NumberExpected="Number argument expected.",Re.IntegerExpected="Value needs to be an integer.",Re.BadMode="Mode not recognized.",Re.DateBounds="Date outside of bounds.",Re.OutOfSheet="Resulting reference is out of the sheet.",Re.WrongType="Wrong type of argument.",Re.NaN="NaN or infinite value encountered.",Re.EqualLength="Ranges need to be of equal length.",Re.Negative="Value cannot be negative.",Re.NotBinary="String does not represent a binary number.",Re.NotOctal="String does not represent an octal number.",Re.NotHex="String does not represent a hexadecimal number.",Re.EndStartPeriod="End period needs to be at least start period.",Re.CellRefExpected="Cell reference expected.",Re.EmptyRange="Empty range not allowed.",Re.BadRef="Address is not correct.",Re.NumberRange="Number-only range expected.",Re.ValueNotFound="Value not found.",Re.ValueBaseLarge="Value in base too large.",Re.ValueBaseSmall="Value in base too small.",Re.ValueBaseLong="Value in base too long.",Re.NegativeLength="Length cannot be negative.",Re.PatternNotFound="Pattern not found.",Re.OneValue="Needs at least one value.",Re.TwoValues="Range needs to contain at least two elements.",Re.ThreeValues="Range needs to contain at least three elements.",Re.IndexBounds="Index out of bounds.",Re.IndexLarge="Index too large.",Re.Formula="Expected formula.",Re.NegativeCount="Count cannot be negative.",Re.ParseError="Parsing error.",Re.SheetRef="Sheet does not exist.",Re.PeriodLong="Period number cannot exceed life length.",Re.InvalidDate="Invalid date.",Re.BitshiftLong="Result of bitshift is too long.",Re.EmptyString="Empty-string argument not allowed.",Re.LengthBounds="Length out of bounds.",Re.NegativeTime="Time cannot be negative.",Re.NoDefault="No default option.",Re.NoConditionMet="None of the conditions were met.",Re.Selector="Selector cannot exceed the number of arguments.",Re.StartEndDate="Start date needs to be earlier than end date.",Re.IncorrectDateTime="String does not represent correct DateTime.",Re.CharacterCodeBounds="Character code out of bounds.",Re.NonZero="Argument cannot be 0.",Re.LessThanOne="Argument cannot be less than 1.",Re.WeekendString="Incorrect weekend bitmask string.",Re.InvalidRoman="Invalid roman numeral.",Re.WrongOrder="Wrong order of values.",Re.ComplexNumberExpected="Complex number expected.",Re.ShouldBeIorJ="Should be 'i' or 'j'.",Re.SizeMismatch="Array dimensions mismatched.",Re.FunctionName=e=>`Function name ${e} not recognized.`,Re.NamedExpressionName=e=>`Named expression ${e} not recognized.`,Re.LicenseKey=e=>`License key is ${e}.`
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */;class Oe{constructor(){this.POSSIBLE_START_CHARACTERS=[...T,...C,u,"'","_"],this.cellReferenceRegexp=new RegExp(S,"y")}match(e,t){this.cellReferenceRegexp.lastIndex=t;const n=this.cellReferenceRegexp.exec(e+"@");return null==n||null==n[1]?null:(n[0]=n[1],n)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ne{constructor(){this.POSSIBLE_START_CHARACTERS=[...T,"_"],this.namedExpressionRegexp=new RegExp(E,"y"),this.r1c1CellRefRegexp=new RegExp(`^${v}$`)}match(e,t){this.namedExpressionRegexp.lastIndex=t;const n=this.namedExpressionRegexp.exec(e);return null==n||null==n[0]||this.r1c1CellRefRegexp.test(n[0])?null:n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Ae=Object(U["createToken"])({name:"AdditionOp",pattern:U["Lexer"].NA}),Le=Object(U["createToken"])({name:"PlusOp",pattern:/\+/,categories:Ae}),Ie=Object(U["createToken"])({name:"MinusOp",pattern:/-/,categories:Ae}),xe=Object(U["createToken"])({name:"MultiplicationOp",pattern:U["Lexer"].NA}),ke=Object(U["createToken"])({name:"TimesOp",pattern:/\*/,categories:xe}),De=Object(U["createToken"])({name:"DivOp",pattern:/\//,categories:xe}),He=Object(U["createToken"])({name:"PowerOp",pattern:/\^/}),Pe=Object(U["createToken"])({name:"PercentOp",pattern:/%/}),je=Object(U["createToken"])({name:"BooleanOp",pattern:U["Lexer"].NA}),Fe=Object(U["createToken"])({name:"EqualsOp",pattern:/=/,categories:je}),Ye=Object(U["createToken"])({name:"NotEqualOp",pattern:/<>/,categories:je}),Ue=Object(U["createToken"])({name:"GreaterThanOp",pattern:/>/,categories:je}),Ve=Object(U["createToken"])({name:"LessThanOp",pattern:/</,categories:je}),Be=Object(U["createToken"])({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:je}),We=Object(U["createToken"])({name:"LessThanOrEqualOp",pattern:/<=/,categories:je}),Ge=Object(U["createToken"])({name:"ConcatenateOp",pattern:/&/}),ze=Object(U["createToken"])({name:"LParen",pattern:/\(/}),Ke=Object(U["createToken"])({name:"RParen",pattern:/\)/}),Xe=Object(U["createToken"])({name:"ArrayLParen",pattern:/{/}),$e=Object(U["createToken"])({name:"ArrayRParen",pattern:/}/}),qe=Object(U["createToken"])({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),Je=Object(U["createToken"])({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),Qe=Object(U["createToken"])({name:"RangeSeparator",pattern:new RegExp(c)}),Ze=Object(U["createToken"])({name:"ColumnRange",pattern:new RegExp(`${b}${c}${b}`)}),et=Object(U["createToken"])({name:"RowRange",pattern:new RegExp(`${_}${c}${_}`)}),tt=Object(U["createToken"])({name:"ProcedureName",pattern:new RegExp(`([${m}][${f}]*)\\(`)}),nt=new Oe,rt=Object(U["createToken"])({name:"CellReference",pattern:nt.match.bind(nt),start_chars_hint:nt.POSSIBLE_START_CHARACTERS,line_breaks:!1}),it=new Ne,st=Object(U["createToken"])({name:"NamedExpression",pattern:it.match.bind(it),start_chars_hint:it.POSSIBLE_START_CHARACTERS,line_breaks:!1}),ot=e=>{const t=e.translationPackage.getFunctionTranslation("OFFSET"),n=e.errorMapping,r=e.translationPackage.buildFunctionMapping(),i=new RegExp("standard"===e.ignoreWhiteSpace?d:h),s=Object(U["createToken"])({name:"WhiteSpace",pattern:i}),o=Object(U["createToken"])({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),a=Object(U["createToken"])({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),l=Object(U["createToken"])({name:"NumberLiteral",pattern:new RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),c=Object(U["createToken"])({name:"OffsetProcedureName",pattern:new RegExp(t,"i")});let u,m;e.functionArgSeparator===e.arrayColumnSeparator?(u=a,m=[]):e.functionArgSeparator===e.arrayRowSeparator?(u=o,m=[]):(u=Object(U["createToken"])({name:"ArgSeparator",pattern:e.functionArgSeparator}),m=[u]);const f=[s,Le,Ie,ke,De,He,Fe,Ye,Pe,Be,We,Ue,Ve,ze,Ke,Xe,$e,c,tt,Qe,...m,Ze,et,l,qe,Je,Ge,je,Ae,xe,rt,st,o,a];return{ArgSeparator:u,NumberLiteral:l,OffsetProcedureName:c,ArrayRowSeparator:o,ArrayColSeparator:a,WhiteSpace:s,allTokens:f,errorMapping:n,functionMapping:r,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class at extends U["EmbeddedActionsParser"]{constructor(e,t){super(e.allTokens,{outputCst:!1,maxLookahead:7}),this.booleanExpressionOrEmpty=this.RULE("booleanExpressionOrEmpty",()=>this.OR([{ALT:()=>this.SUBRULE(this.booleanExpression)},{ALT:Object(U["EMPTY_ALT"])(z())}])),this.procedureExpression=this.RULE("procedureExpression",()=>{var e;const t=this.CONSUME(tt),n=t.image.toUpperCase().slice(0,-1),r=null!==(e=this.lexerConfig.functionMapping[n])&&void 0!==e?e:n,i=[];let s=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY(()=>{var e;const t=this.CONSUME(this.lexerConfig.ArgSeparator);s.type===W.EMPTY&&(s.leadingWhitespace=null===(e=t.leadingWhitespace)||void 0===e?void 0:e.image),i.push(s),s=this.SUBRULE2(this.booleanExpressionOrEmpty)}),i.push(s),1===i.length&&i[0].type===W.EMPTY&&(i.length=0);const o=this.CONSUME(Ke);return fe(r,i,t.leadingWhitespace,o.leadingWhitespace)}),this.namedExpressionExpression=this.RULE("namedExpressionExpression",()=>{const e=this.CONSUME(st);return ge(e.image,e.leadingWhitespace)}),this.offsetProcedureExpression=this.RULE("offsetProcedureExpression",()=>{const e=[];return this.CONSUME(this.lexerConfig.OffsetProcedureName),this.CONSUME(ze),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(Ke),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{const e=this.CONSUME(Ze),[t,n]=e.image.split(":"),r=this.ACTION(()=>L(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>L(this.sheetMapping,n,this.formulaAddress));if(void 0===r||void 0===i)return we(new lr(Vn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return be(e.image,new lr(Vn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==i.sheet)return this.parsingError(B.ParserError,"Malformed range expression");const{firstEnd:s,secondEnd:o,sheetRefType:a}=at.fixSheetIdsForRangeEnds(r,i);return J(s,o,a,e.leadingWhitespace)}),this.rowRangeExpression=this.RULE("rowRangeExpression",()=>{const e=this.CONSUME(et),[t,n]=e.image.split(":"),r=this.ACTION(()=>I(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>I(this.sheetMapping,n,this.formulaAddress));if(void 0===r||void 0===i)return we(new lr(Vn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return be(e.image,new lr(Vn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==i.sheet)return this.parsingError(B.ParserError,"Malformed range expression");const{firstEnd:s,secondEnd:o,sheetRefType:a}=at.fixSheetIdsForRangeEnds(r,i);return Q(s,o,a,e.leadingWhitespace)}),this.cellReference=this.RULE("cellReference",()=>{const e=this.CONSUME(rt),t=this.ACTION(()=>A(this.sheetMapping,e.image,this.formulaAddress));return void 0===t?be(e.image,new lr(Vn.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?be(e.image,new lr(Vn.NAME),e.leadingWhitespace):$(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;const n=this.CONSUME(rt),r=this.ACTION(()=>A(this.sheetMapping,e.image,this.formulaAddress)),i=this.ACTION(()=>A(this.sheetMapping,n.image,this.formulaAddress));return void 0===r||void 0===i?this.ACTION(()=>be(`${e.image}:${n.image}`,new lr(Vn.REF),e.leadingWhitespace)):r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>be(`${e.image}:${n.image}`,new lr(Vn.NAME),e.leadingWhitespace)):this.buildCellRange(r,i,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)}),this.endOfRangeExpression=this.RULE("endOfRangeExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeReference,{ARGS:[e]})},{ALT:()=>{var t;const n=this.SUBRULE(this.offsetProcedureExpression),r=this.ACTION(()=>A(this.sheetMapping,e.image,this.formulaAddress));return void 0===r?we(new lr(Vn.REF)):n.type===W.CELL_REFERENCE?this.buildCellRange(r,n.reference,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image):this.parsingError(B.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.cellRangeExpression=this.RULE("cellRangeExpression",()=>{const e=this.CONSUME(rt);return this.CONSUME2(Qe),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{const t=this.CONSUME(rt),n=this.ACTION(()=>A(this.sheetMapping,t.image,this.formulaAddress));return void 0===n?this.ACTION(()=>we(new lr(Vn.REF))):this.buildCellRange(e.reference,n,e.leadingWhitespace)}),this.endOfRangeWithOffsetStartExpression=this.RULE("endOfRangeWithOffsetStartExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeWithOffsetStartReference,{ARGS:[e]})},{ALT:()=>{const t=this.SUBRULE(this.offsetProcedureExpression);return t.type===W.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(B.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.offsetExpression=this.RULE("offsetExpression",()=>{const e=this.SUBRULE(this.offsetProcedureExpression);let t;return this.OPTION(()=>{this.CONSUME(Qe),t=e.type===W.CELL_RANGE?this.parsingError(B.RangeOffsetNotAllowed,"Range offset not allowed here"):this.SUBRULE(this.endOfRangeWithOffsetStartExpression,{ARGS:[e]})}),void 0!==t?t:e}),this.insideArrayExpression=this.RULE("insideArrayExpression",()=>{const e=[[]];return e[e.length-1].push(this.SUBRULE(this.booleanExpression)),this.MANY(()=>{this.OR([{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayColSeparator),e[e.length-1].push(this.SUBRULE2(this.booleanExpression))}},{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayRowSeparator),e.push([]),e[e.length-1].push(this.SUBRULE3(this.booleanExpression))}}])}),pe(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{const e=this.CONSUME(ze),t=this.SUBRULE(this.booleanExpression),n=this.CONSUME(Ke);return ye(t,e.leadingWhitespace,n.leadingWhitespace)}),this.arrayExpression=this.RULE("arrayExpression",()=>this.OR([{ALT:()=>{const e=this.CONSUME(Xe),t=this.SUBRULE(this.insideArrayExpression),n=this.CONSUME($e);return pe(t.args,e.leadingWhitespace,n.leadingWhitespace)}},{ALT:()=>this.SUBRULE(this.parenthesisExpression)}])),this.numericStringToNumber=e=>{const t=e.replace(this.lexerConfig.decimalSeparator,".");return Number(t)},this.positiveAtomicExpression=this.RULE("positiveAtomicExpression",()=>{var e;return this.OR(null!==(e=this.atomicExpCache)&&void 0!==e?e:this.atomicExpCache=[{ALT:()=>this.SUBRULE(this.arrayExpression)},{ALT:()=>this.SUBRULE(this.cellRangeExpression)},{ALT:()=>this.SUBRULE(this.columnRangeExpression)},{ALT:()=>this.SUBRULE(this.rowRangeExpression)},{ALT:()=>this.SUBRULE(this.offsetExpression)},{ALT:()=>this.SUBRULE(this.cellReference)},{ALT:()=>this.SUBRULE(this.procedureExpression)},{ALT:()=>this.SUBRULE(this.namedExpressionExpression)},{ALT:()=>{const e=this.CONSUME(this.lexerConfig.NumberLiteral);return K(this.numericStringToNumber(e.image),e.leadingWhitespace)}},{ALT:()=>{const e=this.CONSUME(qe);return X(e)}},{ALT:()=>{const e=this.CONSUME(Je),t=e.image.toUpperCase(),n=this.lexerConfig.errorMapping[t];return n?we(new lr(n),e.leadingWhitespace):this.parsingError(B.ParserError,"Unknown error literal")}}])}),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",()=>{const e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION(()=>this.CONSUME(Pe));return t?me(e,t.leadingWhitespace):e}),this.atomicExpression=this.RULE("atomicExpression",()=>this.OR([{ALT:()=>{const e=this.CONSUME(Ae),t=this.SUBRULE(this.atomicExpression);return Object(U["tokenMatcher"])(e,Le)?de(t,e.leadingWhitespace):Object(U["tokenMatcher"])(e,Ie)?he(t,e.leadingWhitespace):(this.customParsingError=V(B.ParserError,"Mismatched token type"),this.customParsingError)}},{ALT:()=>this.SUBRULE2(this.rightUnaryOpAtomicExpression)}])),this.powerExpression=this.RULE("powerExpression",()=>{let e=this.SUBRULE(this.atomicExpression);return this.MANY(()=>{const t=this.CONSUME(He),n=this.SUBRULE2(this.atomicExpression);Object(U["tokenMatcher"])(t,He)?e=ue(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.multiplicationExpression=this.RULE("multiplicationExpression",()=>{let e=this.SUBRULE(this.powerExpression);return this.MANY(()=>{const t=this.CONSUME(xe),n=this.SUBRULE2(this.powerExpression);Object(U["tokenMatcher"])(t,ke)?e=le(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,De)?e=ce(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.additionExpression=this.RULE("additionExpression",()=>{let e=this.SUBRULE(this.multiplicationExpression);return this.MANY(()=>{const t=this.CONSUME(Ae),n=this.SUBRULE2(this.multiplicationExpression);Object(U["tokenMatcher"])(t,Le)?e=oe(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ie)?e=ae(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.concatenateExpression=this.RULE("concatenateExpression",()=>{let e=this.SUBRULE(this.additionExpression);return this.MANY(()=>{const t=this.CONSUME(Ge),n=this.SUBRULE2(this.additionExpression);e=Z(e,n,t.leadingWhitespace)}),e}),this.booleanExpression=this.RULE("booleanExpression",()=>{let e=this.SUBRULE(this.concatenateExpression);return this.MANY(()=>{const t=this.CONSUME(je),n=this.SUBRULE2(this.concatenateExpression);Object(U["tokenMatcher"])(t,Fe)?e=ee(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ye)?e=te(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ue)?e=ne(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ve)?e=re(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Be)?e=ie(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,We)?e=se(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.formula=this.RULE("formula",()=>(this.CONSUME(Fe),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.sheetMapping=t,this.formulaAddress=mr(0,0,0),this.performSelfAnalysis()}parseFromTokens(e,t){this.input=e;let n=this.formulaWithContext(t),r=[];return this.customParsingError&&r.push(this.customParsingError),r=r.concat(this.errors.map(e=>({type:B.ParserError,message:e.message}))),r.length>0&&(n=_e()),{ast:n,errors:r}}reset(){super.reset(),this.customParsingError=void 0}formulaWithContext(e){return this.formulaAddress=e,this.formula()}buildCellRange(e,t,n){if(void 0===e.sheet&&void 0!==t.sheet)return this.parsingError(B.ParserError,"Malformed range expression");const{firstEnd:r,secondEnd:i,sheetRefType:s}=at.fixSheetIdsForRangeEnds(e,t);return q(r,i,s,n)}static fixSheetIdsForRangeEnds(e,t){const n=at.rangeSheetReferenceType(e.sheet,t.sheet),r=void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t;return{firstEnd:e,secondEnd:r,sheetRefType:n}}handleOffsetHeuristic(e){const t=e[0];if(t.type!==W.CELL_REFERENCE)return this.parsingError(B.StaticOffsetError,"First argument to OFFSET is not a reference");const n=e[1];let r;if(n.type===W.NUMBER&&Number.isInteger(n.value))r=n.value;else if(n.type===W.PLUS_UNARY_OP&&n.value.type===W.NUMBER&&Number.isInteger(n.value.value))r=n.value.value;else{if(n.type!==W.MINUS_UNARY_OP||n.value.type!==W.NUMBER||!Number.isInteger(n.value.value))return this.parsingError(B.StaticOffsetError,"Second argument to OFFSET is not a static number");r=-n.value.value}const s=e[2];let o;if(s.type===W.NUMBER&&Number.isInteger(s.value))o=s.value;else if(s.type===W.PLUS_UNARY_OP&&s.value.type===W.NUMBER&&Number.isInteger(s.value.value))o=s.value.value;else{if(s.type!==W.MINUS_UNARY_OP||s.value.type!==W.NUMBER||!Number.isInteger(s.value.value))return this.parsingError(B.StaticOffsetError,"Third argument to OFFSET is not a static number");o=-s.value.value}const a=e[3];let c;if(void 0===a)c=1;else{if(a.type!==W.NUMBER)return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if(c=a.value,c<1)return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(c))return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is not integer")}const u=e[4];let h;if(void 0===u)h=1;else{if(u.type!==W.NUMBER)return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if(h=u.value,h<1)return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is not integer")}const d=new l(t.reference.col+o,t.reference.row+r,t.reference.type);let m=d.col,f=d.row;if(t.reference.type!==i.CELL_REFERENCE_RELATIVE&&t.reference.type!==i.CELL_REFERENCE_ABSOLUTE_COL||(f+=this.formulaAddress.row),t.reference.type!==i.CELL_REFERENCE_RELATIVE&&t.reference.type!==i.CELL_REFERENCE_ABSOLUTE_ROW||(m+=this.formulaAddress.col),m<0||f<0)return we(new lr(Vn.REF,Re.OutOfSheet));if(1===h&&1===c)return $(d);{const e=new l(d.col+h-1,d.row+c-1,d.type);return q(d,e,G.RELATIVE)}}parsingError(e,t){return this.customParsingError=V(e,t),_e()}static rangeSheetReferenceType(e,t){return void 0===e?G.RELATIVE:void 0===t?G.START_ABSOLUTE:G.BOTH_ABSOLUTE}}class lt{constructor(e){this.lexerConfig=e,this.lexer=new U["Lexer"](e.allTokens,{ensureOptimizations:!0})}tokenizeFormula(e){const t=this.lexer.tokenize(e);let n=t.tokens;return n=this.trimTrailingWhitespaces(n),n=this.skipWhitespacesInsideRanges(n),n=this.skipWhitespacesBeforeArgSeparators(n),t.tokens=n,t}skipWhitespacesInsideRanges(e){return lt.filterTokensByNeighbors(e,(e,t,n)=>(Object(U["tokenMatcher"])(e,rt)||Object(U["tokenMatcher"])(e,Qe))&&Object(U["tokenMatcher"])(t,this.lexerConfig.WhiteSpace)&&(Object(U["tokenMatcher"])(n,rt)||Object(U["tokenMatcher"])(n,Qe)))}skipWhitespacesBeforeArgSeparators(e){return lt.filterTokensByNeighbors(e,(e,t,n)=>!Object(U["tokenMatcher"])(e,this.lexerConfig.ArgSeparator)&&Object(U["tokenMatcher"])(t,this.lexerConfig.WhiteSpace)&&Object(U["tokenMatcher"])(n,this.lexerConfig.ArgSeparator))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let n=0;const r=[e[n++]];while(n<e.length-1)t(e[n-1],e[n],e[n+1])||r.push(e[n]),++n;return r.push(e[n]),r}trimTrailingWhitespaces(e){return e.length>0&&Object(U["tokenMatcher"])(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ct{constructor(e,t,n,r){this.config=e,this.lexerConfig=t,this.sheetMappingFn=n,this.namedExpressions=r}unparse(e,t){return"="+this.unparseAst(e,t)}unparseAst(e,t){var n,r;switch(e.type){case W.EMPTY:return Se("",e.leadingWhitespace);case W.NUMBER:return Se(ut(e.value,this.config.decimalSeparator),e.leadingWhitespace);case W.STRING:return Se('"'+e.value+'"',e.leadingWhitespace);case W.FUNCTION_CALL:{const n=e.args.map(e=>void 0!==e?this.unparseAst(e,t):"").join(this.config.functionArgSeparator),r=this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName,i=r+"("+n+Se(")",e.internalWhitespace);return Se(i,e.leadingWhitespace)}case W.NAMED_EXPRESSION:{const r=null===(n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))||void 0===n?void 0:n.displayName;return Se(r||e.expressionName,e.leadingWhitespace)}case W.CELL_REFERENCE:{let n;return n=void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"",n+=null!==(r=e.reference.unparse(t))&&void 0!==r?r:this.config.translationPackage.getErrorTranslation(Vn.REF),Se(n,e.leadingWhitespace)}case W.COLUMN_RANGE:case W.ROW_RANGE:case W.CELL_RANGE:return Se(this.formatRange(e,t),e.leadingWhitespace);case W.PLUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return Se("+",e.leadingWhitespace)+n}case W.MINUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return Se("-",e.leadingWhitespace)+n}case W.PERCENT_OP:return this.unparseAst(e.value,t)+Se("%",e.leadingWhitespace);case W.ERROR:{const t=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:Vn.ERROR);return Se(t,e.leadingWhitespace)}case W.ERROR_WITH_RAW_INPUT:return Se(e.rawInput,e.leadingWhitespace);case W.PARENTHESIS:{const n=this.unparseAst(e.expression,t),r="("+n+Se(")",e.internalWhitespace);return Se(r,e.leadingWhitespace)}case W.ARRAY:{const n="{"+e.args.map(e=>e.map(e=>this.unparseAst(e,t)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator)+Se("}",e.internalWhitespace);return Se(n,e.leadingWhitespace)}default:{const n=this.unparseAst(e.left,t),r=this.unparseAst(e.right,t);return n+Se(Ee[e.type],e.leadingWhitespace)+r}}}unparseSheetName(e){const t=F(e,this.sheetMappingFn);if(void 0===t)throw new Vt(e);return t}formatRange(e,t){let n="",r="";void 0!==e.start.sheet&&e.sheetReferenceType!==G.RELATIVE&&(n=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===G.BOTH_ABSOLUTE&&(r=this.unparseSheetName(e.end.sheet)+"!");const i=e.start.unparse(t),s=e.end.unparse(t);return void 0===i||void 0===s?this.config.translationPackage.getErrorTranslation(Vn.REF):`${n}${i}:${r}${s}`}}function ut(e,t){const n=e.toString();return n.replace(".",t)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ht{constructor(e,t,n){this.config=e,this.functionRegistry=t,this.sheetMapping=n,this.statsCacheUsed=0,this.lexerConfig=ot(e),this.lexer=new lt(this.lexerConfig),this.formulaParser=new at(this.lexerConfig,this.sheetMapping),this.cache=new Te(this.functionRegistry)}parse(e,t){this.formulaAddress=t;const n=this.tokenizeFormula(e);if(n.errors.length>0){const e=n.errors.map(e=>({type:B.LexingError,message:e.message}));return{ast:_e(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}const r=this.computeHashFromTokens(n.tokens,t);let i=this.cache.get(r);if(void 0!==i)++this.statsCacheUsed;else{const e=this.bindWhitespacesToTokens(n.tokens),s=this.formulaParser.parseFromTokens(e,t);if(s.errors.length>0)return Object.assign(Object.assign({},s),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});i=this.cache.set(r,s.ast)}const{ast:s,hasVolatileFunction:o,hasStructuralChangeFunction:a}=i,l=this.convertReversedRangesToRegularRanges(s),c=mt(l,this.functionRegistry);return{ast:l,errors:[],hasVolatileFunction:o,hasStructuralChangeFunction:a,dependencies:c}}convertReversedRangesToRegularRanges(e){switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:case W.ERROR_WITH_RAW_INPUT:case W.CELL_REFERENCE:case W.NAMED_EXPRESSION:return e;case W.CELL_RANGE:{const{start:t,end:n}=e,r=this.orderCellRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case W.COLUMN_RANGE:{const{start:t,end:n}=e,r=this.orderColumnRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case W.ROW_RANGE:{const{start:t,end:n}=e,r=this.orderRowRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:{const t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:{const t=this.convertReversedRangesToRegularRanges(e.left),n=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:n})}case W.PARENTHESIS:{const t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case W.FUNCTION_CALL:{const t=e.args.map(e=>this.convertReversedRangesToRegularRanges(e));return Object.assign(Object.assign({},e),{args:t})}case W.ARRAY:{const t=e.args.map(e=>e.map(e=>this.convertReversedRangesToRegularRanges(e)));return Object.assign(Object.assign({},e),{args:t})}}}orderCellRangeEnds(e,t){const n=[e,t],[r,i]=n.map(e=>e.toColumnAddress()).sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,c]=n.map(e=>e.toRowAddress()).sort(a.compareByAbsoluteAddress(this.formulaAddress)),[u,h]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:l.fromColAndRow(r,s,u),end:l.fromColAndRow(i,c,h)}}orderColumnRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,a]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:new o(r.type,r.col,s),end:new o(i.type,i.col,a)}}orderRowRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(a.compareByAbsoluteAddress(this.formulaAddress)),[s,o]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:new a(r.type,r.row,s),end:new a(i.type,i.row,o)}}static compareSheetIds(e,t){return e=null!=e?e:1/0,t=null!=t?t:1/0,e-t}fetchCachedResultForAst(e){const t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}fetchCachedResult(e){const t=this.cache.get(e);if(void 0===t)throw new Error("There is no AST with such key in the cache");{const{ast:e,hasVolatileFunction:n,hasStructuralChangeFunction:r,relativeDependencies:i}=t;return{ast:e,errors:[],hasVolatileFunction:n,hasStructuralChangeFunction:r,dependencies:i}}}computeHashFromTokens(e,t){var n;let r="",i=0;while(i<e.length){const s=e[i];if(Object(U["tokenMatcher"])(s,rt)){const e=A(this.sheetMapping,s.image,t);r=void 0===e?r.concat(s.image):r.concat(e.hash(!0))}else if(Object(U["tokenMatcher"])(s,tt)){const e=s.image.toUpperCase().slice(0,-1),t=null!==(n=this.lexerConfig.functionMapping[e])&&void 0!==n?n:e;r=r.concat(t,"(")}else if(Object(U["tokenMatcher"])(s,Ze)){const[e,n]=s.image.split(":"),i=L(this.sheetMapping,e,t),o=L(this.sheetMapping,n,t);r=void 0===i||void 0===o?r.concat("!REF"):r.concat(i.hash(!0),":",o.hash(!0))}else if(Object(U["tokenMatcher"])(s,et)){const[e,n]=s.image.split(":"),i=I(this.sheetMapping,e,t),o=I(this.sheetMapping,n,t);r=void 0===i||void 0===o?r.concat("!REF"):r.concat(i.hash(!0),":",o.hash(!0))}else r=r.concat(s.image);i++}return r}rememberNewAst(e){const t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}computeHashFromAst(e){return"="+this.computeHashOfAstNode(e)}computeHashOfAstNode(e){switch(e.type){case W.EMPTY:return e.leadingWhitespace||"";case W.NUMBER:return Se(ut(e.value,this.config.decimalSeparator),e.leadingWhitespace);case W.STRING:return Se('"'+e.value+'"',e.leadingWhitespace);case W.NAMED_EXPRESSION:return Se(e.expressionName,e.leadingWhitespace);case W.FUNCTION_CALL:{const t=e.args.map(e=>this.computeHashOfAstNode(e)).join(this.config.functionArgSeparator),n=e.procedureName+"("+t+Se(")",e.internalWhitespace);return Se(n,e.leadingWhitespace)}case W.CELL_REFERENCE:return Se(e.reference.hash(!0),e.leadingWhitespace);case W.COLUMN_RANGE:case W.ROW_RANGE:case W.CELL_RANGE:{const t=e.start.hash(e.sheetReferenceType!==G.RELATIVE),n=e.end.hash(e.sheetReferenceType===G.BOTH_ABSOLUTE);return Se(t+":"+n,e.leadingWhitespace)}case W.MINUS_UNARY_OP:return Se("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case W.PLUS_UNARY_OP:return Se("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case W.PERCENT_OP:return this.computeHashOfAstNode(e.value)+Se("%",e.leadingWhitespace);case W.ERROR:{const t=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:Vn.ERROR);return Se(t,e.leadingWhitespace)}case W.ERROR_WITH_RAW_INPUT:return Se(e.rawInput,e.leadingWhitespace);case W.ARRAY:{const t=e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";");return Se("{"+t+Se("}",e.internalWhitespace),e.leadingWhitespace)}case W.PARENTHESIS:{const t=this.computeHashOfAstNode(e.expression),n="("+t+Se(")",e.internalWhitespace);return Se(n,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+Se(Ee[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){const t=[],n=e[0];Object(U["tokenMatcher"])(n,this.lexerConfig.WhiteSpace)||t.push(n);for(let r=1;r<e.length;++r){const n=e[r];if(Object(U["tokenMatcher"])(n,this.lexerConfig.WhiteSpace))continue;const i=e[r-1];Object(U["tokenMatcher"])(i,this.lexerConfig.WhiteSpace)&&(n.leadingWhitespace=i),t.push(n)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const dt=(e,t,n,r)=>{switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:return;case W.NAMED_EXPRESSION:return void(r&&n.push(new wt(e.expressionName)));case W.CELL_REFERENCE:return void(r&&n.push(new ft(e.reference)));case W.CELL_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new pt(e.start,e.end)));case W.COLUMN_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new gt(e.start,e.end)));case W.ROW_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new yt(e.start,e.end)));case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:return void dt(e.value,t,n,!0);case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:return dt(e.left,t,n,!0),void dt(e.right,t,n,!0);case W.PARENTHESIS:return void dt(e.expression,t,n,r);case W.FUNCTION_CALL:{const r=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);return void e.args.forEach(e=>dt(e,t,n,r))}}},mt=(e,t)=>{const n=new Array;return dt(e,t,n,!0),n};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class ft{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class pt{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new Er(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class gt{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleColumnAddress(e),n=this.end.toSimpleColumnAddress(e);return new Cr(t.sheet,t.col,n.col)}}class yt{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleRowAddress(e),n=this.end.toSimpleRowAddress(e);return new Tr(t.sheet,t.row,n.row)}}class wt{constructor(e){this.name=e}absolutize(e){return this}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const bt=(e,t)=>e.map(e=>e.absolutize(t)),_t=e=>e.filter(e=>e instanceof wt||(e instanceof Er?!(fr(e.start)||fr(e.end)):!fr(e))),vt=Symbol("Empty value");function St(e){return e instanceof Et?e.val:e}class Et{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function Ct(e,t){if("number"===typeof e)return t;{const n=e.fromNumber(t);return n.format=e.format,n}}class Tt extends Et{getDetailedType(){return Lt.NUMBER_DATE}}class Mt extends Et{getDetailedType(){return Lt.NUMBER_CURRENCY}}class Rt extends Et{getDetailedType(){return Lt.NUMBER_TIME}}class Ot extends Et{getDetailedType(){return Lt.NUMBER_DATETIME}}class Nt extends Et{getDetailedType(){return Lt.NUMBER_PERCENT}}function At(e){return"number"===typeof e||e instanceof Et}var Lt,It;function xt(e){return e instanceof Et?e.getDetailedType():Lt.NUMBER_RAW}function kt(e){return e instanceof Et?e.format:void 0}function Dt(e){return e instanceof Et?{type:e.getDetailedType(),format:e.format}:{type:Lt.NUMBER_RAW}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["NUMBER_RAW"]="NUMBER_RAW",e["NUMBER_DATE"]="NUMBER_DATE",e["NUMBER_TIME"]="NUMBER_TIME",e["NUMBER_DATETIME"]="NUMBER_DATETIME",e["NUMBER_CURRENCY"]="NUMBER_CURRENCY",e["NUMBER_PERCENT"]="NUMBER_PERCENT"})(Lt||(Lt={}));class Ht{constructor(e,t,n,r){this._data=e,this.range=t,this.dependencyGraph=n,this._hasOnlyNumbers=r,this.size=void 0===e?new ei(t.effectiveWidth(n),t.effectiveHeight(n)):new ei(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,n){return new Ht(e,t,n,!0)}static onlyNumbers(e){return new Ht(e,void 0,void 0,!0)}static onlyValues(e){return new Ht(e,void 0,void 0,void 0)}static onlyRange(e,t){return new Ht(void 0,e,t,void 0)}static fromScalar(e){return new Ht([[e]],void 0,void 0,void 0)}isAdHoc(){return void 0===this.range}width(){return this.size.width}height(){return this.size.height}valuesFromTopLeftCorner(){this.ensureThatComputed();const e=[];for(let t=0;t<this._data.length;t++)for(let n=0;n<this._data[0].length;n++)e.push(this._data[t][n]);return e}*effectiveAddressesFromData(e){for(let t=0;t<this.data.length;++t){const n=this.data[t];for(let r=0;r<n.length;++r)yield mr(e.sheet,e.col+r,e.row+t)}}*entriesFromTopLeftCorner(e){this.ensureThatComputed();for(let t=0;t<this.size.height;++t)for(let n=0;n<this.size.width;++n)yield[this._data[t][n],mr(e.sheet,e.col+n,e.row+t)]}*iterateValuesFromTopLeftCorner(){yield*this.valuesFromTopLeftCorner()}numberOfElements(){return this.size.width*this.size.height}hasOnlyNumbers(){if(void 0===this._hasOnlyNumbers){this._hasOnlyNumbers=!0;for(const e of this.data)for(const t of e)if("number"!==typeof t)return this._hasOnlyNumbers=!1,!1}return this._hasOnlyNumbers}rawNumbers(){return this._data}rawData(){var e;return this.ensureThatComputed(),null!==(e=this._data)&&void 0!==e?e:[]}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}ensureThatComputed(){void 0===this._data&&(this._hasOnlyNumbers=!0,this._data=this.range.addressesArrayMap(this.dependencyGraph,e=>{const t=this.dependencyGraph.getCellValue(e);return t instanceof Ht?(this._hasOnlyNumbers=!1,new lr(Vn.VALUE,Re.ScalarExpected)):(At(t)||(this._hasOnlyNumbers=!1),t)}))}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Pt{constructor(){this.changes=new Map}static empty(){return new Pt}addAll(e){for(const t of e.changes.values())this.add(t.address,t);return this}addChange(e,t,n){this.addInterpreterValue(e,t,n)}exportChanges(e){let t=[];return this.changes.forEach(n=>{const r=e.exportChange(n);Array.isArray(r)?t=t.concat(r):t.push(r)}),t}getChanges(){return Array.from(this.changes.values())}isEmpty(){return 0===this.changes.size}add(e,t){const n=t.value;if(n instanceof Ht)for(const r of n.effectiveAddressesFromData(e))this.changes.delete(gr(r));this.changes.set(gr(e),t)}addInterpreterValue(e,t,n){this.add(t,{address:t,value:e,oldValue:n})}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class jt{constructor(e,t,n){if(this.sheet=e,this.rowStart=t,this.rowEnd=n,t<0)throw Error("Starting row cant be less than 0");if(n<t)throw Error("Row span cant end before start")}get numberOfRows(){return this.rowEnd-this.rowStart+1}get start(){return this.rowStart}get end(){return this.rowEnd}static fromNumberOfRows(e,t,n){return new jt(e,t,t+n-1)}static fromRowStartAndEnd(e,t,n){return new jt(e,t,n)}*rows(){for(let e=this.rowStart;e<=this.rowEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");const t=Math.max(this.rowStart,e.rowStart),n=Math.min(this.rowEnd,e.rowEnd);return t>n?null:new jt(this.sheet,t,n)}firstRow(){return new jt(this.sheet,this.rowStart,this.rowStart)}}class Ft{constructor(e,t,n){if(this.sheet=e,this.columnStart=t,this.columnEnd=n,t<0)throw Error("Starting column cant be less than 0");if(n<t)throw Error("Column span cant end before start")}get numberOfColumns(){return this.columnEnd-this.columnStart+1}get start(){return this.columnStart}get end(){return this.columnEnd}static fromNumberOfColumns(e,t,n){return new Ft(e,t,t+n-1)}static fromColumnStartAndEnd(e,t,n){return new Ft(e,t,n)}*columns(){for(let e=this.columnStart;e<=this.columnEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");const t=Math.max(this.columnStart,e.columnStart),n=Math.min(this.columnEnd,e.columnEnd);return t>n?null:new Ft(this.sheet,t,n)}firstColumn(){return new Ft(this.sheet,this.columnStart,this.columnStart)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["BUILD_ENGINE_TOTAL"]="BUILD_ENGINE_TOTAL",e["PARSER"]="PARSER",e["GRAPH_BUILD"]="GRAPH_BUILD",e["COLLECT_DEPENDENCIES"]="COLLECT_DEPENDENCIES",e["PROCESS_DEPENDENCIES"]="PROCESS_DEPENDENCIES",e["TOP_SORT"]="TOP_SORT",e["BUILD_COLUMN_INDEX"]="BUILD_COLUMN_INDEX",e["EVALUATION"]="EVALUATION",e["VLOOKUP"]="VLOOKUP",e["TRANSFORM_ASTS"]="TRANSFORM_ASTS",e["TRANSFORM_ASTS_POSTPONED"]="TRANSFORM_ASTS_POSTPONED",e["ADJUSTING_ADDRESS_MAPPING"]="ADJUSTING_ADDRESS_MAPPING",e["ADJUSTING_ARRAY_MAPPING"]="ADJUSTING_ARRAY_MAPPING",e["ADJUSTING_RANGES"]="ADJUSTING_RANGES",e["ADJUSTING_GRAPH"]="ADJUSTING_GRAPH",e["CRITERION_FUNCTION_FULL_CACHE_USED"]="CRITERION_FUNCTION_FULL_CACHE_USED",e["CRITERION_FUNCTION_PARTIAL_CACHE_USED"]="CRITERION_FUNCTION_PARTIAL_CACHE_USED"})(It||(It={}));
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Yt{constructor(){this.stats=new Map([[It.CRITERION_FUNCTION_FULL_CACHE_USED,0],[It.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;const t=(null!==(e=this.stats.get(It.CRITERION_FUNCTION_FULL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(It.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;const t=(null!==(e=this.stats.get(It.CRITERION_FUNCTION_PARTIAL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(It.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(It.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(It.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0)}start(e){if(this.startTimes.get(e))throw Error(`Statistics ${e} already started`);this.startTimes.set(e,Date.now())}end(e){var t;const n=Date.now(),r=this.startTimes.get(e);if(!r)throw Error(`Statistics ${e} not started`);{let i=null!==(t=this.stats.get(e))&&void 0!==t?t:0;i+=n-r,this.stats.set(e,i),this.startTimes.delete(e)}}measure(e,t){this.start(e);const n=t();return this.end(e),n}snapshot(){return new Map(this.stats)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ut extends Yt{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Vt extends Error{constructor(e){super("There's no sheet with id = "+e)}}class Bt extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class Wt extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class Gt extends Error{constructor(){super("Sheet size limit exceeded")}}class zt extends Error{constructor(){super("This is not a formula")}}class Kt extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class Xt extends Error{constructor(e){super("Invalid arguments, expected "+e)}}class $t extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class qt extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class Jt extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class Qt extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class Zt extends Error{constructor(){super("There is no operation to undo")}}class en extends Error{constructor(){super("There is no operation to redo")}}class tn extends Error{constructor(){super("There is nothing to paste")}}function nn(e,t){switch(typeof t){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:return t instanceof RegExp?"RegExp("+t.toString()+")":t}}class rn extends Error{constructor(e){super("Unable to parse value: "+JSON.stringify(e,nn,4))}}class sn extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class on extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class an extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class ln extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class cn extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class un extends Error{constructor(){super("Computations are suspended")}}class hn extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class dn extends Error{constructor(e){super("Cannot register translation for function with id: "+e)}}class mn extends Error{constructor(){super("Language not registered.")}}class fn extends Error{constructor(){super("Language already registered.")}}class pn extends Error{static functionNotDeclaredInPlugin(e,t){return new pn(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new pn(`Function method ${e} not found in plugin ${t}`)}}class gn extends Error{static cannotRegisterFunctionWithId(e){return new gn("Cannot register function with id "+e)}static cannotUnregisterFunctionWithId(e){return new gn("Cannot unregister function with id "+e)}static cannotUnregisterProtectedPlugin(){return new gn("Cannot unregister protected plugin")}}class yn extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class wn extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class bn extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class _n extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class vn{constructor(e){this.policy=e,this.mapping=new Map}getCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);return t.getCell(e)}fetchCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);const n=t.getCell(e);if(!n)throw Error("Vertex for address missing in AddressMapping");return n}strategyFor(e){const t=this.mapping.get(e);if(void 0===t)throw new Vt(e);return t}addSheet(e,t){if(this.mapping.has(e))throw Error("Sheet already added");this.mapping.set(e,t)}autoAddSheet(e,t){const{height:n,width:r,fill:i}=t,s=this.policy.call(i);this.addSheet(e,new s(r,n))}getCellValue(e){const t=this.getCell(e);return void 0===t?vt:t instanceof Rn?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){const t=this.getCell(e);return t instanceof $n?t.getValues().rawValue:t instanceof Rn?t.getArrayCellRawValue(e):null}setCell(e,t){const n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized");n.setCell(e,t)}moveCell(e,t){const n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized.");if(e.sheet!==t.sheet)throw Error("Cannot move cells between sheets.");if(n.has(t))throw new Error("Cannot move cell. Destination already occupied.");const r=n.getCell(e);if(void 0===r)throw new Error("Cannot move cell. No cell with such address.");this.setCell(t,r),this.removeCell(e)}removeCell(e){const t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}has(e){const t=this.mapping.get(e.sheet);return void 0!==t&&t.has(e)}getHeight(e){const t=this.mapping.get(e);if(void 0===t)throw new Vt(e);return t.getHeight()}getWidth(e){const t=this.mapping.get(e);if(!t)throw new Vt(e);return t.getWidth()}addRows(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new Vt(e);r.addRows(t,n)}removeRows(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);t.removeRows(e)}removeSheet(e){this.mapping.delete(e)}addColumns(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new Vt(e);r.addColumns(t,n)}removeColumns(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);t.removeColumns(e)}*verticesFromRowsSpan(e){yield*this.mapping.get(e.sheet).verticesFromRowsSpan(e)}*verticesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).verticesFromColumnsSpan(e)}*entriesFromRowsSpan(e){yield*this.mapping.get(e.sheet).entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).entriesFromColumnsSpan(e)}*entries(){for(const[e,t]of this.mapping.entries())yield*t.getEntries(e)}*sheetEntries(e){const t=this.mapping.get(e);if(void 0===t)throw new Vt(e);yield*t.getEntries(e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Sn{constructor(){this.arrayMapping=new Map}getArray(e){const t=this.getArrayByCorner(e.start);if(null===t||void 0===t?void 0:t.getRange().sameAs(e))return t}getArrayByCorner(e){return this.arrayMapping.get(gr(e))}setArray(e,t){this.arrayMapping.set(gr(e.start),t)}removeArray(e){"string"===typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(gr(e.start))}count(){return this.arrayMapping.size}*arraysInRows(e){for(const[t,n]of this.arrayMapping.entries())n.spansThroughSheetRows(e.sheet,e.rowStart,e.rowEnd)&&(yield[t,n])}*arraysInCols(e){for(const[t,n]of this.arrayMapping.entries())n.spansThroughSheetColumn(e.sheet,e.columnStart,e.columnEnd)&&(yield[t,n])}isFormulaArrayInRow(e,t){for(const n of this.arrayMapping.values())if(n.spansThroughSheetRows(e,t))return!0;return!1}isFormulaArrayInAllRows(e){let t=!0;for(const n of e.rows())this.isFormulaArrayInRow(e.sheet,n)||(t=!1);return t}isFormulaArrayInColumn(e,t){for(const n of this.arrayMapping.values())if(n.spansThroughSheetColumn(e,t))return!0;return!1}isFormulaArrayInAllColumns(e){let t=!0;for(const n of e.columns())this.isFormulaArrayInColumn(e.sheet,n)||(t=!1);return t}isFormulaArrayInRange(e){for(const t of this.arrayMapping.values())if(t.getRange().doesOverlap(e))return!0;return!1}isFormulaArrayAtAddress(e){for(const t of this.arrayMapping.values())if(t.getRange().addressInRange(e))return!0;return!1}moveArrayVerticesAfterRowByRows(e,t,n){this.updateArrayVerticesInSheet(e,(e,r)=>{const i=r.getRange();return t<=i.start.row?[i.shifted(0,n),r]:void 0})}moveArrayVerticesAfterColumnByColumns(e,t,n){this.updateArrayVerticesInSheet(e,(e,r)=>{const i=r.getRange();return t<=i.start.col?[i.shifted(n,0),r]:void 0})}updateArrayVerticesInSheet(e,t){const n=Array();for(const[r,i]of this.arrayMapping.entries()){if(i.sheet!==e)continue;const s=t(r,i);void 0!==s&&(this.removeArray(r),n.push(s))}n.forEach(([e,t])=>{this.setArray(e,t)})}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class En{constructor(e){this.size=e}width(){return this.size.width}height(){return this.size.height}get(e,t){throw Error("Array not computed yet.")}simpleRangeValue(){throw Error("Array not computed yet.")}}class Cn{constructor(e){if(this.size=new ei(e.length>0?e[0].length:0,e.length),this.array=e,this.size.width<=0||this.size.height<=0)throw Error("Incorrect array size")}static fromInterpreterValue(e){return new Cn(e instanceof Ht?e.data:[[e]])}simpleRangeValue(){return Ht.onlyValues(this.array)}addRows(e,t){this.array.splice(e,0,...this.nullArrays(t,this.width())),this.size.height+=t}addColumns(e,t){for(let n=0;n<this.height();n++)this.array[n].splice(e,0,...new Array(t).fill(vt));this.size.width+=t}removeRows(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Array index out of bound");const n=t-e+1;this.array.splice(e,n),this.size.height-=n}removeColumns(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Array index out of bound");const n=t-e+1;for(const r of this.array)r.splice(e,n);this.size.width-=n}nullArrays(e,t){const n=[];for(let r=0;r<e;++r)n.push(new Array(t).fill(vt));return n}get(e,t){if(this.outOfBound(e,t))throw Error("Array index out of bound");return this.array[t][e]}set(e,t,n){if(this.outOfBound(e,t))throw Error("Array index out of bound");this.array[t][e]=n}width(){return this.size.width}height(){return this.size.height}raw(){return this.array}resize(e){if(this.height()<e.height&&isFinite(e.height)&&this.addRows(this.height(),e.height-this.height()),this.height()>e.height)throw Error("Resizing to smaller array");if(this.width()<e.width&&isFinite(e.width)&&this.addColumns(this.width(),e.width-this.width()),this.width()>e.width)throw Error("Resizing to smaller array")}outOfBound(e,t){return e<0||t<0||t>this.size.height-1||e>this.size.width-1}}class Tn{constructor(e,t){this.error=e,this.size=t}get(e,t){return this.error}width(){return this.size.width}height(){return this.size.height}simpleRangeValue(){return this.error}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Mn{constructor(e,t,n){this.formula=e,this.cellAddress=t,this.version=n}get width(){return 1}get height(){return 1}static fromAst(e,t,n,r){return n.isScalar()?new On(e,t,r):new Rn(e,t,n,r)}getFormula(e){return this.ensureRecentData(e),this.formula}ensureRecentData(e){if(this.version!=e.version()){const[t,n,r]=e.applyTransformations(this.formula,this.cellAddress,this.version);this.formula=t,this.cellAddress=n,this.version=r}}getAddress(e){return this.ensureRecentData(e),this.cellAddress}}class Rn extends Mn{constructor(e,t,n,r=0){super(e,t,r),n.isRef?this.array=new Tn(new lr(Vn.REF,Re.NoSpaceForArrayResult),ei.error()):this.array=new En(n)}get width(){return this.array.width()}get height(){return this.array.height()}get sheet(){return this.cellAddress.sheet}get leftCorner(){return this.cellAddress}setCellValue(e){if(e instanceof lr)return this.setErrorValue(e),e;const t=Cn.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof En)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof En))return this.array.simpleRangeValue()}getArrayCellValue(e){const t=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;try{return this.array.get(t,n)}catch(r){return new lr(Vn.REF)}}getArrayCellRawValue(e){const t=this.getArrayCellValue(e);return t instanceof lr||t===vt?void 0:St(t)}setArrayCellValue(e,t){const n=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;this.array instanceof Cn&&this.array.set(n,r,t)}setNoSpace(){return this.array=new Tn(new lr(Vn.SPILL,Re.NoSpaceForArrayResult),ei.error()),this.getCellValue()}getRange(){return Er.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return Er.spanFromOrUndef(this.cellAddress,this.width,this.height)}setAddress(e){this.cellAddress=e}setFormula(e){this.formula=e}spansThroughSheetRows(e,t,n=t){return this.cellAddress.sheet===e&&this.cellAddress.row<=n&&t<this.cellAddress.row+this.height}spansThroughSheetColumn(e,t,n=t){return this.cellAddress.sheet===e&&this.cellAddress.col<=n&&t<this.cellAddress.col+this.width}isComputed(){return!(this.array instanceof En)}columnsFromArray(){return Ft.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return jt.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return br(this.cellAddress,e)}setErrorValue(e){this.array=new Tn(e,this.array.size)}}class On extends Mn{constructor(e,t,n){super(e,t,n)}valueOrUndef(){return this.cachedCellValue}setCellValue(e){return this.cachedCellValue=e,this.cachedCellValue}getCellValue(){if(void 0!==this.cachedCellValue)return this.cachedCellValue;throw Error("Value of the formula cell is not computed.")}isComputed(){return void 0!==this.cachedCellValue}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Nn{constructor(e){this.range=e,this.functionCache=new Map,this.criterionFunctionCache=new Map,this.dependentCacheRanges=new Set,this.bruteForce=!1}get start(){return this.range.start}get end(){return this.range.end}get sheet(){return this.range.start.sheet}getFunctionValue(e){return this.functionCache.get(e)}setFunctionValue(e,t){this.functionCache.set(e,t)}getCriterionFunctionValue(e,t){var n;return null===(n=this.getCriterionFunctionValues(e).get(t))||void 0===n?void 0:n[0]}getCriterionFunctionValues(e){var t;return null!==(t=this.criterionFunctionCache.get(e))&&void 0!==t?t:new Map}setCriterionFunctionValues(e,t){this.criterionFunctionCache.set(e,t)}addDependentCacheRange(e){e!==this&&this.dependentCacheRanges.add(e)}clearCache(){this.functionCache.clear(),this.criterionFunctionCache.clear(),this.dependentCacheRanges.forEach(e=>e.criterionFunctionCache.clear()),this.dependentCacheRanges.clear()}getStart(){return this.start}getEnd(){return this.end}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const An=(e,t,n,r,i)=>{if(t instanceof Nn){const e=t.range.intersectionWith(n);return void 0!==e?Array.from(e.addresses(i)):[]}let s,o;return t instanceof Mn?(s=t.getFormula(r),o=t.getAddress(r),mt(s,e).filter(e=>e instanceof ft).map(e=>e.dependency.toSimpleCellAddress(o)).filter(e=>n.addressInRange(e))):[]};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var Ln;(function(e){e[e["ON_STACK"]=0]="ON_STACK",e[e["PROCESSED"]=1]="PROCESSED",e[e["POPPED"]=2]="POPPED"})(Ln||(Ln={}));class In{constructor(e=[],t=[]){this.nodesSparseArray=e,this.edgesSparseArray=t,this.entranceTime=[],this.low=[],this.parent=[],this.inSCC=[],this.nodeStatus=[],this.order=[],this.sccNonSingletons=[],this.timeCounter=0}getTopSortedWithSccSubgraphFrom(e,t,n){const r=e.reverse();return r.forEach(e=>this.runDFS(e)),this.postprocess(r,n,t)}getAdjacentNodeIds(e){return this.edgesSparseArray[e].filter(e=>void 0!==e&&this.nodesSparseArray[e])}runDFS(e){if(void 0!==this.nodeStatus[e])return;this.nodeStatus[e]=Ln.ON_STACK;const t=[e],n=[];while(t.length>0){const e=t[t.length-1];switch(this.nodeStatus[e]){case Ln.ON_STACK:this.handleOnStack(e,n,t);break;case Ln.PROCESSED:this.handleProcessed(e,n,t);break;case Ln.POPPED:t.pop();break}}}handleOnStack(e,t,n){this.entranceTime[e]=this.timeCounter,this.low[e]=this.timeCounter,this.timeCounter++,t.push(e),this.getAdjacentNodeIds(e).forEach(t=>{void 0===this.entranceTime[t]&&(n.push(t),this.parent[t]=e,this.nodeStatus[t]=Ln.ON_STACK)}),this.nodeStatus[e]=Ln.PROCESSED}handleProcessed(e,t,n){let r=this.entranceTime[e];if(this.getAdjacentNodeIds(e).forEach(t=>{this.inSCC[t]||(r=this.parent[t]===e?Math.min(r,this.low[t]):Math.min(r,this.entranceTime[t]))}),this.low[e]=r,r===this.entranceTime[e]){const n=[];do{n.push(t[t.length-1]),t.pop()}while(n[n.length-1]!==e);n.forEach(e=>{this.inSCC[e]=!0}),this.order.push(...n),n.length>1&&n.forEach(e=>{this.sccNonSingletons[e]=!0})}n.pop(),this.nodeStatus[e]=Ln.POPPED}postprocess(e,t,n){const r=[];e.forEach(e=>{r[e]=!0});const i=[],s=[];return this.order.reverse(),this.order.forEach(e=>{const o=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||o.includes(e)?(s.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),o.forEach(e=>r[e]=!0)):(i.push(this.nodesSparseArray[e]),r[e]&&n(this.nodesSparseArray[e])&&o.forEach(e=>r[e]=!0))}),{sorted:i,cycled:s}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class xn{constructor(e,t){this.rawValue=e,this.processFn=t,this.processedValue=null}getProcessedValue(){return null===this.processedValue&&(this.processedValue=this.processFn(this.rawValue)),this.processedValue}markAsModified(){this.processedValue=null}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class kn{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.nodesIds=new Map,this.dirtyAndVolatileNodeIds=new xn({dirty:[],volatile:[]},e=>this.processDirtyAndVolatileNodeIds(e)),this.infiniteRangeIds=new Set,this.changingWithStructureNodeIds=[],this.nextId=0}getNodes(){return this.nodesSparseArray.filter(e=>void 0!==e)}hasNode(e){return this.nodesIds.has(e)}existsEdge(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);return void 0!==n&&void 0!==r&&this.edgesSparseArray[n].includes(r)}adjacentNodes(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);return new Set(this.edgesSparseArray[t].filter(e=>void 0!==e).map(e=>this.nodesSparseArray[e]))}adjacentNodesCount(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);return this.fixEdgesArrayForNode(t).length}addNodeAndReturnId(e){const t=this.nodesIds.get(e);if(void 0!==t)return t;const n=this.nextId;return this.nextId++,this.nodesSparseArray[n]=e,this.edgesSparseArray[n]=[],this.nodesIds.set(e,n),n}addEdge(e,t){const n=this.getNodeIdIfNotNumber(e),r=this.getNodeIdIfNotNumber(t);if(void 0===n)throw this.missingNodeError(e);if(void 0===r)throw this.missingNodeError(t);this.edgesSparseArray[n].includes(r)||this.edgesSparseArray[n].push(r)}removeNode(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);this.edgesSparseArray[t].length>0&&(this.edgesSparseArray[t].forEach(e=>this.dirtyAndVolatileNodeIds.rawValue.dirty.push(e)),this.dirtyAndVolatileNodeIds.markAsModified());const n=this.removeDependencies(e);return delete this.nodesSparseArray[t],delete this.edgesSparseArray[t],this.infiniteRangeIds.delete(t),this.nodesIds.delete(e),n}removeEdge(e,t){const n=this.getNodeIdIfNotNumber(e),r=this.getNodeIdIfNotNumber(t);if(void 0===n)throw this.missingNodeError(e);if(void 0===r)throw this.missingNodeError(t);const i=this.edgesSparseArray[n].indexOf(r);if(-1===i)throw new Error("Edge does not exist");delete this.edgesSparseArray[n][i]}removeEdgeIfExists(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);if(void 0===n)return;if(void 0===r)return;const i=this.edgesSparseArray[n].indexOf(r);-1!==i&&delete this.edgesSparseArray[n][i]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),()=>!0,()=>{})}getTopSortedWithSccSubgraphFrom(e,t,n){const r=new In(this.nodesSparseArray,this.edgesSparseArray),i=e.map(e=>this.getNodeId(e)).filter(e=>void 0!==e);return r.getTopSortedWithSccSubgraphFrom(i,t,n)}markNodeAsVolatile(e){const t=this.getNodeId(e);void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.volatile.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsDirty(e){const t=this.getNodeId(e);void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.dirty.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}getDirtyAndVolatileNodes(){return this.dirtyAndVolatileNodeIds.getProcessedValue()}clearDirtyNodes(){this.dirtyAndVolatileNodeIds.rawValue.dirty=[],this.dirtyAndVolatileNodeIds.markAsModified()}markNodeAsChangingWithStructure(e){const t=this.getNodeId(e);void 0!==t&&this.changingWithStructureNodeIds.push(t)}markChangingWithStructureNodesAsDirty(){this.changingWithStructureNodeIds.length<=0||(this.dirtyAndVolatileNodeIds.rawValue.dirty=[...this.dirtyAndVolatileNodeIds.rawValue.dirty,...this.changingWithStructureNodeIds],this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsInfiniteRange(e){const t=this.getNodeIdIfNotNumber(e);void 0!==t&&this.infiniteRangeIds.add(t)}getInfiniteRanges(){return[...this.infiniteRangeIds].map(e=>({node:this.nodesSparseArray[e],id:e}))}getNodeId(e){return this.nodesIds.get(e)}getNodeIdIfNotNumber(e){return"number"===typeof e?e:this.nodesIds.get(e)}fixEdgesArrayForNode(e){const t=this.edgesSparseArray[e];return this.edgesSparseArray[e]=t.filter(e=>void 0!==e&&this.nodesSparseArray[e]),this.edgesSparseArray[e]}removeDependencies(e){const t=this.dependencyQuery(e);return t.forEach(([t,n])=>{this.removeEdgeIfExists(n,e)}),t}processDirtyAndVolatileNodeIds({dirty:e,volatile:t}){return[...new Set([...e,...t])].map(e=>this.nodesSparseArray[e]).filter(e=>void 0!==e)}missingNodeError(e){return new Error("Unknown node "+e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Dn{constructor(){this.rangeMapping=new Map}getMappingSize(e){var t,n;return null!==(n=null===(t=this.rangeMapping.get(e))||void 0===t?void 0:t.size)&&void 0!==n?n:0}setRange(e){let t=this.rangeMapping.get(e.getStart().sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.getStart().sheet,t));const n=Hn(e.getStart(),e.getEnd());t.set(n,e)}removeRange(e){const t=e.getStart().sheet,n=this.rangeMapping.get(t);if(void 0===n)return;const r=Hn(e.getStart(),e.getEnd());n.delete(r),0===n.size&&this.rangeMapping.delete(t)}getRange(e,t){const n=this.rangeMapping.get(e.sheet),r=Hn(e,t);return null===n||void 0===n?void 0:n.get(r)}fetchRange(e,t){const n=this.getRange(e,t);if(!n)throw Error("Range does not exist");return n}truncateRanges(e,t){const n=Array(),r=Array(),i=Array(),s=e.sheet;for(const[a,l]of this.entriesFromSheet(e.sheet)){const o=l.range;e.start<=t(l.range.end)&&(o.removeSpan(e),o.shouldBeRemoved()?(this.removeByKey(s,a),n.push(l)):r.push([a,l]),i.push(l))}const o=[];r.sort((e,n)=>jn(e[1],n[1],t));for(const[a,l]of r){const e=Pn(l.range);if(e===a)continue;const t=this.getByKey(s,e);this.removeByKey(s,a),void 0!==t&&l!=t?o.push([t,l]):this.setRange(l)}return{verticesToRemove:n,verticesToMerge:o,verticesWithChangedSize:i}}moveAllRangesInSheetAfterRowByRows(e,t,n){return this.updateVerticesFromSheet(e,(e,r)=>t<=r.start.row?(r.range.shiftByRows(n),{changedSize:!1,vertex:r}):t>r.start.row&&t<=r.end.row?(r.range.expandByRows(n),{changedSize:!0,vertex:r}):void 0)}moveAllRangesInSheetAfterColumnByColumns(e,t,n){return this.updateVerticesFromSheet(e,(e,r)=>t<=r.start.col?(r.range.shiftByColumns(n),{changedSize:!1,vertex:r}):t>r.start.col&&t<=r.end.col?(r.range.expandByColumns(n),{changedSize:!0,vertex:r}):void 0)}moveRangesInsideSourceRange(e,t,n,r){this.updateVerticesFromSheet(e.sheet,(i,s)=>e.containsRange(s.range)?(s.range.shiftByColumns(t),s.range.shiftByRows(n),s.range.moveToSheet(r),{changedSize:!1,vertex:s}):void 0)}removeRangesInSheet(e){if(this.rangeMapping.has(e)){const t=this.rangeMapping.get(e).values();return this.rangeMapping.delete(e),t}return[][Symbol.iterator]()}*rangesInSheet(e){const t=this.rangeMapping.get(e);t&&(yield*t.values())}*rangeVerticesContainedInRange(e){for(const t of this.rangesInSheet(e.sheet))e.containsRange(t.range)&&(yield t)}findSmallerRange(e){if(e.height()>1&&Number.isFinite(e.height())){const t=mr(e.end.sheet,e.end.col,e.end.row-1),n=this.getRange(e.start,t);if(void 0!==n){const t=Er.fromSimpleCellAddresses(mr(e.start.sheet,e.start.col,e.end.row),e.end);return{smallerRangeVertex:n,restRange:t}}}return{restRange:e}}*entriesFromSheet(e){const t=this.rangeMapping.get(e);t&&(yield*t.entries())}removeByKey(e,t){this.rangeMapping.get(e).delete(t)}getByKey(e,t){var n;return null===(n=this.rangeMapping.get(e))||void 0===n?void 0:n.get(t)}updateVerticesFromSheet(e,t){const n=Array();for(const[r,i]of this.entriesFromSheet(e)){const s=t(r,i);void 0!==s&&(this.removeByKey(e,r),n.push(s))}return n.forEach(e=>{this.setRange(e.vertex)}),{verticesWithChangedSize:n.filter(e=>e.changedSize).map(e=>e.vertex)}}}function Hn(e,t){return`${e.col},${e.row},${t.col},${t.row}`}function Pn(e){return Hn(e.start,e.end)}const jn=(e,t,n)=>{const r=n(e.range.start),i=n(e.range.start);if(r===i){const r=n(e.range.end),i=n(t.range.end);return r-i}return r-i};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Fn{constructor(e,t,n){this.functions=e,this.errors=t,this.ui=n,this._protectedTranslations={VERSION:"VERSION"},this.checkUI(),this.checkErrors(),this.checkFunctionTranslations(this.functions),Object.assign(this.functions,this._protectedTranslations)}extendFunctions(e){this.checkFunctionTranslations(e),Object.assign(this.functions,e)}buildFunctionMapping(){return Object.keys(this.functions).reduce((e,t)=>(e[this.functions[t]]=t,e),{})}buildErrorMapping(){return Object.keys(this.errors).reduce((e,t)=>(e[this.errors[t]]=t,e),{})}isFunctionTranslated(e){return void 0!==this.functions[e]}getFunctionTranslations(e){const t=[];for(const n of e)this.isFunctionTranslated(n)&&t.push(this.functions[n]);return t}getFunctionTranslation(e){const t=this.functions[e];if(void 0===t)throw new hn("functions."+e);return t}getMaybeFunctionTranslation(e){return this.functions[e]}getErrorTranslation(e){if(e===Vn.LIC)return`#${Vn.LIC}!`;const t=this.errors[e];if(void 0===t)throw new hn("errors."+e);return t}getUITranslation(e){const t=this.ui[e];if(void 0===t)throw new hn("ui."+e);return t}checkUI(){for(const e of Object.values(Un))if(!(e in this.ui))throw new hn("ui."+e)}checkErrors(){for(const e of Object.values(Vn))if(!(e in this.errors)&&e!==Vn.LIC)throw new hn("errors."+e)}checkFunctionTranslations(e){const t=new Set(Object.getOwnPropertyNames(e));for(const n of Object.getOwnPropertyNames(this._protectedTranslations))if(t.has(n))throw new dn(n)}}function Yn(e){return new Fn(Object.assign({},e.functions),Object.assign({},e.errors),Object.assign({},e.ui))}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var Un,Vn,Bn;
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function Wn(e){return e.toLowerCase()}(function(e){e["NEW_SHEET_PREFIX"]="NEW_SHEET_PREFIX"})(Un||(Un={}));class Gn{constructor(e,t){this.id=e,this.displayName=t}get canonicalName(){return Wn(this.displayName)}}class zn{constructor(e){this.languages=e,this.mappingFromCanonicalName=new Map,this.mappingFromId=new Map,this.lastSheetId=-1,this.fetch=e=>{const t=this.mappingFromCanonicalName.get(Wn(e));if(void 0===t)throw new Bt(e);return t.id},this.get=e=>{var t;return null===(t=this.mappingFromCanonicalName.get(Wn(e)))||void 0===t?void 0:t.id},this.fetchDisplayName=e=>this.fetchSheetById(e).displayName,this.sheetNamePrefix=e.getUITranslation(Un.NEW_SHEET_PREFIX)}addSheet(e=`${this.sheetNamePrefix}${this.lastSheetId+2}`){const t=Wn(e);if(this.mappingFromCanonicalName.has(t))throw new Wt(e);this.lastSheetId++;const n=new Gn(this.lastSheetId,e);return this.store(n),n.id}removeSheet(e){const t=this.fetchSheetById(e);e==this.lastSheetId&&--this.lastSheetId,this.mappingFromCanonicalName.delete(t.canonicalName),this.mappingFromId.delete(t.id)}getDisplayName(e){var t;return null===(t=this.mappingFromId.get(e))||void 0===t?void 0:t.displayName}*displayNames(){for(const e of this.mappingFromCanonicalName.values())yield e.displayName}numberOfSheets(){return this.mappingFromCanonicalName.size}hasSheetWithId(e){return this.mappingFromId.has(e)}hasSheetWithName(e){return this.mappingFromCanonicalName.has(Wn(e))}renameSheet(e,t){const n=this.fetchSheetById(e),r=n.displayName;if(r===t)return;const i=this.mappingFromCanonicalName.get(Wn(t));if(void 0!==i&&i.id!==n.id)throw new Wt(t);const s=n.canonicalName;return this.mappingFromCanonicalName.delete(s),n.displayName=t,this.store(n),r}sheetNames(){return Array.from(this.mappingFromId.values()).map(e=>e.displayName)}store(e){this.mappingFromId.set(e.id,e),this.mappingFromCanonicalName.set(e.canonicalName,e)}fetchSheetById(e){const t=this.mappingFromId.get(e);if(void 0===t)throw new Vt(e);return t}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Kn{constructor(e,t,n,r,i,s,o,a){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=n,this.arrayMapping=r,this.stats=i,this.lazilyTransformingAstService=s,this.functionRegistry=o,this.namedExpressions=a,this.changes=Pt.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof Nn)return this.rangeDependencyQuery(e).map(([e,t])=>e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map(t=>t instanceof wt?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:yr(t)?t:Sr(t.start,t.end))}return[]}},this.dependencyQueryVertices=e=>{if(e instanceof Nn)return this.rangeDependencyQuery(e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map(t=>{if(t instanceof Er)return[t.start,this.rangeMapping.fetchRange(t.start,t.end)];if(t instanceof wt){const n=this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet);return[n.address,this.addressMapping.fetchCell(n.address)]}return[t,this.addressMapping.fetchCell(t)]})}return[]}},this.rangeDependencyQuery=e=>{const t=[],{smallerRangeVertex:n,restRange:r}=this.rangeMapping.findSmallerRange(e.range);let i;void 0!==n&&this.graph.adjacentNodes(n).has(e)?(i=r,t.push([new Er(n.start,n.end),n])):i=e.range;for(const s of i.addresses(this)){const e=this.addressMapping.getCell(s);void 0!==e&&t.push([s,e])}return t},this.formulaDependencyQuery=e=>{let t,n;if(!(e instanceof Mn))return;n=e.getAddress(this.lazilyTransformingAstService),t=e.getFormula(this.lazilyTransformingAstService);const r=mt(t,this.functionRegistry);return[n,bt(r,n)]},this.graph=new kn(this.dependencyQueryVertices)}static buildEmpty(e,t,n,r,i){return new Kn(new vn(t.chooseAddressMappingPolicy),new Dn,new zn(t.translationPackage),new Sn,i,e,n,r)}setFormulaToCell(e,t,n,r,i,s){const o=Mn.fromAst(t,e,r,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(o),this.processCellDependencies(n,o),this.graph.markNodeAsDirty(o),i&&this.markAsVolatile(o),s&&this.markAsDependentOnStructureChange(o),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setParsingErrorToCell(e,t){const n=this.shrinkPossibleArrayAndGetCell(e);return this.exchangeOrAddGraphNode(n,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setValueToCell(e,t){const n=this.shrinkPossibleArrayAndGetCell(e);if(n instanceof Rn&&this.arrayMapping.removeArray(n.getRange()),n instanceof $n){const e=n.getValues();e.rawValue!==t.rawValue&&(n.setValues(t),this.graph.markNodeAsDirty(n))}else{const r=new $n(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(n,r),this.addressMapping.setCell(e,r),this.graph.markNodeAsDirty(r)}return this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setCellEmpty(e){const t=this.shrinkPossibleArrayAndGetCell(e);if(void 0===t)return Pt.empty();if(this.graph.adjacentNodes(t).size>0){const n=new Xn;this.exchangeGraphNode(t,n),0===this.graph.adjacentNodesCount(n)?(this.removeVertex(n),this.addressMapping.removeCell(e)):(this.graph.markNodeAsDirty(n),this.addressMapping.setCell(e,n))}else this.removeVertex(t),this.addressMapping.removeCell(e);return this.getAndClearContentChanges()}clearDirtyVertices(){this.graph.clearDirtyNodes()}verticesToRecompute(){return this.graph.getDirtyAndVolatileNodes()}processCellDependencies(e,t){const n=this.graph.getNodeId(t);e.forEach(e=>{if(e instanceof Er){const t=e;let r=this.getRange(t.start,t.end);void 0===r&&(r=new Nn(t),this.rangeMapping.setRange(r)),this.graph.addNodeAndReturnId(r);const i=this.graph.getNodeId(r);t.isFinite()||this.graph.markNodeAsInfiniteRange(i);const{smallerRangeVertex:s,restRange:o}=this.rangeMapping.findSmallerRange(t);if(void 0!==s){if(this.graph.addEdge(s,i),r.bruteForce){r.bruteForce=!1;for(const e of t.addresses(this))this.graph.removeEdge(this.fetchCell(e),i)}}else r.bruteForce=!0;const a=this.arrayMapping.getArray(o);if(void 0!==a)this.graph.addEdge(a,i);else for(const e of o.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,i)}this.graph.addEdge(i,n),t.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(r)}else if(e instanceof wt){const r=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:i,id:s}=this.fetchNamedExpressionVertex(e.name,r);this.graph.addEdge(null!==s&&void 0!==s?s:i,n)}else{const{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:t,n)}})}fetchNamedExpressionVertex(e,t){const n=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(n.address)}exchangeNode(e,t){const n=this.fetchCellOrCreateEmpty(e).vertex,r=this.fetchCellOrCreateEmpty(t).vertex;this.addressMapping.removeCell(e),this.exchangeGraphNode(n,r)}fetchCellOrCreateEmpty(e){const t=this.addressMapping.getCell(e);if(void 0!==t)return{vertex:t,id:void 0};const n=new Xn,r=this.graph.addNodeAndReturnId(n);return this.addressMapping.setCell(e,n),{vertex:n,id:r}}removeRows(e){this.stats.measure(It.ADJUSTING_GRAPH,()=>{for(const[t,n]of this.addressMapping.entriesFromRowsSpan(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);if(n instanceof Rn){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}}),this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeRows(e)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.truncateRanges(e,e=>e.row);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)}),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}removeSheet(e){this.clearSheet(e);for(const[t,n]of this.addressMapping.sheetEntries(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);this.removeVertex(n),this.addressMapping.removeCell(t)}this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.removeRangesInSheet(e);for(const e of t)this.removeVertex(e);this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeSheet(e)})})}clearSheet(e){const t=new Set;for(const[n,r]of this.addressMapping.sheetEntries(e))r instanceof Rn?t.add(r):this.setCellEmpty(n);for(const n of t.values())this.setArrayEmpty(n);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(It.ADJUSTING_GRAPH,()=>{for(const[t,n]of this.addressMapping.entriesFromColumnsSpan(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);if(n instanceof Rn){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}}),this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeColumns(e)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.truncateRanges(e,e=>e.col);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.moveAllRangesInSheetAfterRowByRows(e.sheet,e.rowStart,e.numberOfRows);return this.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)});for(const n of this.addressMapping.verticesFromRowsSpan(e))this.graph.markNodeAsDirty(n);return this.addStructuralNodesToChangeSet(),{affectedArrays:t}}addColumns(e){this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.moveAllRangesInSheetAfterColumnByColumns(e.sheet,e.columnStart,e.numberOfColumns);return this.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns));for(const n of this.addressMapping.verticesFromColumnsSpan(e))this.graph.markNodeAsDirty(n);return this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}isThereSpaceForArray(e){const t=e.getRangeOrUndef();if(void 0===t)return!1;for(const n of t.addresses(this)){const t=this.addressMapping.getCell(n);if(void 0!==t&&!(t instanceof Xn)&&t!==e)return!1}return!0}moveCells(e,t,n,r){for(const i of e.addressesWithDirection(t,n,this)){const s=mr(r,i.col+t,i.row+n);let o=this.addressMapping.getCell(i);const a=this.addressMapping.getCell(s);if(this.addressMapping.removeCell(i),void 0!==o){this.graph.markNodeAsDirty(o),this.addressMapping.setCell(s,o);let t=void 0;for(const n of this.graph.adjacentNodes(o))n instanceof Nn&&!e.containsRange(n.range)&&(t=null!==t&&void 0!==t?t:this.fetchCellOrCreateEmpty(i).vertex,this.graph.addEdge(t,n),this.graph.removeEdge(o,n));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(i,t))}if(void 0!==a){void 0===o&&this.addressMapping.removeCell(s);for(const e of this.graph.adjacentNodes(a))o=null!==o&&void 0!==o?o:this.fetchCellOrCreateEmpty(s).vertex,this.graph.addEdge(o,e),this.graph.markNodeAsDirty(o);this.removeVertex(a)}}for(const i of this.rangeMapping.rangeVerticesContainedInRange(e))for(const t of this.graph.adjacentNodes(i))if(t instanceof Nn&&!e.containsRange(t.range)){this.graph.removeEdge(i,t);for(const e of i.range.addresses(this)){const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:n,t),this.addressMapping.setCell(e,n),this.graph.markNodeAsDirty(n)}}this.rangeMapping.moveRangesInsideSourceRange(e,t,n,r)}setArrayEmpty(e){const t=Er.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),n=this.graph.adjacentNodes(e);for(const r of t.addresses(this))this.addressMapping.removeCell(r);for(const r of n.values()){const t=An(this.functionRegistry,r,e.getRange(),this.lazilyTransformingAstService,this);for(const e of t){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,r)}t.length>0&&this.graph.markNodeAsDirty(r)}this.removeVertex(e),this.arrayMapping.removeArray(e.getRange())}addVertex(e,t){this.graph.addNodeAndReturnId(t),this.addressMapping.setCell(e,t)}addArrayVertex(e,t){this.graph.addNodeAndReturnId(t),this.setAddressMappingForArrayVertex(t,e)}*arrayFormulaNodes(){for(const e of this.graph.getNodes())e instanceof Rn&&(yield e)}*entriesFromRowsSpan(e){yield*this.addressMapping.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.addressMapping.entriesFromColumnsSpan(e)}fetchCell(e){return this.addressMapping.fetchCell(e)}getCell(e){return this.addressMapping.getCell(e)}getCellValue(e){return this.addressMapping.getCellValue(e)}getRawValue(e){return this.addressMapping.getRawValue(e)}getScalarValue(e){const t=this.addressMapping.getCellValue(e);return t instanceof Ht?new lr(Vn.VALUE,Re.ScalarExpected):t}existsEdge(e,t){return this.graph.existsEdge(e,t)}getSheetId(e){return this.sheetMapping.fetch(e)}getSheetHeight(e){return this.addressMapping.getHeight(e)}getSheetWidth(e){return this.addressMapping.getWidth(e)}getArray(e){return this.arrayMapping.getArray(e)}getRange(e,t){return this.rangeMapping.getRange(e,t)}topSortWithScc(){return this.graph.topSortWithScc()}markAsVolatile(e){this.graph.markNodeAsVolatile(e)}markAsDependentOnStructureChange(e){this.graph.markNodeAsChangingWithStructure(e)}forceApplyPostponedTransformations(){for(const e of this.graph.getNodes())e instanceof On&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(const t of e.addresses(this)){const e=this.getScalarValue(t);e!==vt&&(yield[St(e),t])}}computeListOfValuesInRange(e){const t=[];for(const n of e.addresses(this)){const e=this.getScalarValue(n);t.push(e)}return t}shrinkArrayToCorner(e){this.cleanAddressMappingUnderArray(e);for(const t of this.adjacentArrayVertices(e)){let n;n=t instanceof Mn?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let r=!1;for(const[i,s]of n)e.isLeftCorner(i)&&(r=!0),this.graph.addEdge(s,t),this.graph.markNodeAsDirty(s);r||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){const t=this.getCell(e);return t instanceof Rn&&!t.isLeftCorner(e)}getAndClearContentChanges(){const e=this.changes;return this.changes=Pt.empty(),e}getAdjacentNodesAddresses(e){const t=this.graph.adjacentNodes(e),n=[];return t.forEach(e=>{const t=e;t instanceof Nn?n.push(Sr(t.start,t.end)):n.push(t.getAddress(this.lazilyTransformingAstService))}),n}exchangeGraphNode(e,t){this.graph.addNodeAndReturnId(t);const n=this.graph.adjacentNodes(e);this.removeVertex(e),n.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}setArray(e,t){this.arrayMapping.setArray(e,t)}correctInfiniteRangesDependency(e){const t=this.graph.getInfiniteRanges().filter(({node:t})=>t.range.addressInRange(e));if(t.length<=0)return;const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e),i=null!==r&&void 0!==r?r:this.graph.getNodeId(n);t.forEach(({id:e})=>{this.graph.addEdge(i,e)})}exchangeOrAddGraphNode(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNodeAndReturnId(t)}getArrayVerticesRelatedToRanges(e){const t=new Set;return e.forEach(e=>{this.graph.hasNode(e)&&this.graph.adjacentNodes(e).forEach(e=>{e instanceof Rn&&t.add(e)})}),t}correctInfiniteRangesDependenciesByRangeVertex(e){this.graph.getInfiniteRanges().forEach(({id:t,node:n})=>{const r=e.range.intersectionWith(n.range);void 0!==r&&r.addresses(this).forEach(e=>{const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:n,t)})})}cleanAddressMappingUnderArray(e){const t=e.getRange();for(const n of t.addresses(this)){const t=e.getArrayCellValue(n);this.getCell(n)===e?e.isLeftCorner(n)?this.changes.addChange(new lr(Vn.REF),n,t):(this.addressMapping.removeCell(n),this.changes.addChange(vt,n,t)):this.changes.addChange(vt,n,t)}}*formulaDirectDependenciesToArray(e,t){var n;const[,r]=null!==(n=this.formulaDependencyQuery(e))&&void 0!==n?n:[];if(void 0!==r)for(const i of r)if(!(i instanceof wt||i instanceof Er)&&t.getRange().addressInRange(i)){const e=this.fetchCellOrCreateEmpty(i).vertex;yield[i,e]}}*rangeDirectDependenciesToArray(e,t){const{restRange:n}=this.rangeMapping.findSmallerRange(e.range);for(const r of n.addresses(this))if(t.getRange().addressInRange(r)){const e=this.fetchCellOrCreateEmpty(r).vertex;yield[r,e]}}*adjacentArrayVertices(e){const t=this.graph.adjacentNodes(e);for(const n of t)(n instanceof Mn||n instanceof Nn)&&(yield n)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,n){const r=Array.from(this.rangeMapping.rangesInSheet(e));for(const i of r)if(i.range.includesRow(t+n))if(i.bruteForce){const e=i.range.rangeWithSameWidth(t,n);for(const t of e.addresses(this)){const{vertex:e,id:n}=this.fetchCellOrCreateEmpty(t);this.graph.addEdge(null!==n&&void 0!==n?n:e,i)}}else{let e=i,t=this.rangeMapping.findSmallerRange(e.range);if(void 0!==t.smallerRangeVertex)continue;while(void 0===t.smallerRangeVertex){const n=new Nn(Er.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.setRange(n),this.graph.addNodeAndReturnId(n);const r=new Er(mr(e.range.start.sheet,e.range.start.col,e.range.end.row),e.range.end);this.addAllFromRange(r,e),this.graph.addEdge(n,e),e=n,t=this.rangeMapping.findSmallerRange(e.range)}this.graph.addEdge(t.smallerRangeVertex,e),this.addAllFromRange(t.restRange,e),this.graph.removeEdge(t.smallerRangeVertex,i)}}addAllFromRange(e,t){for(const n of e.addresses(this)){const{vertex:e,id:r}=this.fetchCellOrCreateEmpty(n);this.graph.addEdge(null!==r&&void 0!==r?r:e,t)}}fixRangesWhenAddingColumns(e,t,n){for(const r of this.rangeMapping.rangesInSheet(e))if(r.range.includesColumn(t+n)){let i;i=r.bruteForce?r.range.rangeWithSameHeight(t,n):Er.spanFrom(mr(e,t,r.range.end.row),n,1);for(const e of i.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,r)}}}exchangeOrAddFormulaVertex(e){const t=e.getAddress(this.lazilyTransformingAstService),n=Er.spanFrom(t,e.width,e.height),r=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof Rn&&this.setArray(n,e),this.exchangeOrAddGraphNode(r,e),this.addressMapping.setCell(t,e),e instanceof Rn){if(!this.isThereSpaceForArray(e))return;for(const t of n.addresses(this)){if(e.isLeftCorner(t))continue;const n=this.getCell(t);this.exchangeOrAddGraphNode(n,e)}}for(const i of n.addresses(this))this.addressMapping.setCell(i,e)}setAddressMappingForArrayVertex(e,t){if(this.addressMapping.setCell(t,e),!(e instanceof Rn))return;const n=Er.spanFromOrUndef(t,e.width,e.height);if(void 0!==n&&(this.setArray(n,e),this.isThereSpaceForArray(e)))for(const r of n.addresses(this))this.addressMapping.setCell(r,e)}truncateRanges(e,t){const{verticesToRemove:n,verticesToMerge:r,verticesWithChangedSize:i}=this.rangeMapping.truncateRanges(e,t);for(const[s,o]of r)this.mergeRangeVertices(s,o);for(const s of n)this.removeVertexAndCleanupDependencies(s);return i}fixArraysAfterAddingRow(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(jt.fromRowStartAndEnd(e,t-1,t-1))){const i=r.getRange();for(let s=i.start.col;s<=i.end.col;++s)for(let o=t;o<=i.end.row;++o){const t=mr(e,s,o),i=mr(e,s,o+n),a=r.getArrayCellValue(t);this.addressMapping.moveCell(i,t),this.changes.addChange(vt,i,a)}}}fixArraysAfterRemovingRows(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(jt.fromRowStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(const e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}fixArraysAfterAddingColumn(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(Ft.fromColumnStartAndEnd(e,t-1,t-1))){const i=r.getRange();for(let s=i.start.row;s<=i.end.row;++s)for(let o=t;o<=i.end.col;++o){const t=mr(e,o,s),i=mr(e,o+n,s),a=r.getArrayCellValue(t);this.addressMapping.moveCell(i,t),this.changes.addChange(vt,i,a)}}}fixArraysAfterRemovingColumns(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(Ft.fromColumnStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(const e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}shrinkPossibleArrayAndGetCell(e){const t=this.getCell(e);return t instanceof Rn?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof Rn&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof Nn&&this.rangeMapping.removeRange(e)}mergeRangeVertices(e,t){const n=this.graph.adjacentNodes(t);this.removeVertexAndCleanupDependencies(t),this.graph.removeEdgeIfExists(e,t),n.forEach(t=>{this.graph.hasNode(t)&&this.graph.addEdge(e,t)})}removeVertexAndCleanupDependencies(e){const t=new Set(this.graph.removeNode(e));while(t.size>0){const e=t.values().next().value;t.delete(e);const[n,r]=e;this.graph.hasNode(r)&&0===this.graph.adjacentNodesCount(r)&&((r instanceof Nn||r instanceof Xn)&&this.graph.removeNode(r).forEach(e=>t.add(e)),r instanceof Nn?this.rangeMapping.removeRange(r):r instanceof Xn&&this.addressMapping.removeCell(n))}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Xn{constructor(){}getCellValue(){return vt}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class $n{constructor(e,t){this.parsedValue=e,this.rawValue=t}getValues(){return{parsedValue:this.parsedValue,rawValue:this.rawValue}}setValues(e){this.parsedValue=e.parsedValue,this.rawValue=e.rawValue}getCellValue(){return this.parsedValue}setCellValue(e){throw Error("SetCellValue is deprecated for ValueCellVertex")}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class qn{constructor(e,t){this.errors=e,this.rawInput=t}getCellValue(){const e=this.errors.map(e=>e.message).find(e=>e);return lr.parsingError(e)}getFormula(){return this.rawInput}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Jn{constructor(e,t){this.width=e,this.height=t,this.mapping=new Map}getCell(e){var t;return null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);let n=this.mapping.get(e.col);n||(n=new Map,this.mapping.set(e.col,n)),n.set(e.row,t)}has(e){var t;return!!(null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row))}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){var t;null===(t=this.mapping.get(e.col))||void 0===t||t.delete(e.row)}addRows(e,t){this.mapping.forEach(n=>{const r=new Map;n.forEach((i,s)=>{s>=e&&(r.set(s+t,i),n.delete(s))}),r.forEach((e,t)=>{n.set(t,e)})}),this.height+=t}addColumns(e,t){const n=new Map;this.mapping.forEach((r,i)=>{i>=e&&(n.set(i+t,r),this.mapping.delete(i))}),n.forEach((e,t)=>{this.mapping.set(t,e)}),this.width+=t}removeRows(e){this.mapping.forEach(t=>{const n=new Map;t.forEach((r,i)=>{i>=e.rowStart&&(t.delete(i),i>e.rowEnd&&n.set(i-e.numberOfRows,r))}),n.forEach((e,n)=>{t.set(n,e)})});const t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}removeColumns(e){const t=new Map;this.mapping.forEach((n,r)=>{r>=e.columnStart&&(this.mapping.delete(r),r>e.columnEnd&&t.set(r-e.numberOfColumns,n))}),t.forEach((e,t)=>{this.mapping.set(t,e)});const n=Math.min(this.width-1,e.columnEnd),r=Math.max(0,n-e.columnStart+1);this.width=Math.max(0,this.width-r)}*getEntries(e){for(const[t,n]of this.mapping)for(const[r,i]of n)yield[mr(e,t,r),i]}*verticesFromColumn(e){const t=this.mapping.get(e);if(void 0!==t)for(const[n,r]of t)yield r}*verticesFromRow(e){for(const t of this.mapping.values()){const n=t.get(e);void 0!==n&&(yield n)}}*verticesFromColumnsSpan(e){for(const t of e.columns()){const e=this.mapping.get(t);if(void 0!==e)for(const[t,n]of e)yield n}}*verticesFromRowsSpan(e){for(const t of this.mapping.values())for(const n of e.rows()){const e=t.get(n);void 0!==e&&(yield e)}}*entriesFromRowsSpan(e){for(const[t,n]of this.mapping.entries())for(const r of e.rows()){const i=n.get(r);void 0!==i&&(yield[mr(e.sheet,t,r),i])}}*entriesFromColumnsSpan(e){for(const t of e.columns()){const n=this.mapping.get(t);if(void 0!==n)for(const[r,i]of n.entries())yield[mr(e.sheet,t,r),i]}}*vertices(){for(const[e,t]of this.mapping)for(const[n,r]of t)void 0!==r&&(yield r)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Qn{constructor(e,t){this.width=e,this.height=t,this.mapping=new Array(t);for(let n=0;n<t;n++)this.mapping[n]=new Array(e)}getCell(e){return this.getCellVertex(e.col,e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);const n=this.mapping[e.row];n||(this.mapping[e.row]=new Array(this.width)),this.mapping[e.row][e.col]=t}has(e){const t=this.mapping[e.row];return!!t&&!!t[e.col]}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){void 0!==this.mapping[e.row]&&delete this.mapping[e.row][e.col]}addRows(e,t){const n=[];for(let r=0;r<t;r++)n.push(new Array(this.width));this.mapping.splice(e,0,...n),this.height+=t}addColumns(e,t){for(let n=0;n<this.height;n++)this.mapping[n].splice(e,0,...new Array(t));this.width+=t}removeRows(e){this.mapping.splice(e.rowStart,e.numberOfRows);const t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}removeColumns(e){for(let r=0;r<this.height;r++)this.mapping[r].splice(e.columnStart,e.numberOfColumns);const t=Math.min(this.width-1,e.columnEnd),n=Math.max(0,t-e.columnStart+1);this.width=Math.max(0,this.width-n)}*getEntries(e){for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n){const r=this.getCellVertex(n,t);r&&(yield[mr(e,n,t),r])}}*verticesFromColumn(e){for(let t=0;t<this.height;++t){const n=this.getCellVertex(e,t);n&&(yield n)}}*verticesFromRow(e){for(let t=0;t<this.width;++t){const n=this.getCellVertex(t,e);n&&(yield n)}}*verticesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let e=0;e<this.height;++e){const n=this.getCellVertex(t,e);n&&(yield n)}}*verticesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let n=e.rowStart;n<=e.rowEnd;++n){const e=this.getCellVertex(t,n);e&&(yield e)}}*entriesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let n=e.rowStart;n<=e.rowEnd;++n){const r=this.getCellVertex(t,n);r&&(yield[mr(e.sheet,t,n),r])}}*entriesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let n=0;n<this.height;++n){const r=this.getCellVertex(t,n);r&&(yield[mr(e.sheet,t,n),r])}}*vertices(){for(let e=0;e<this.height;++e)for(let t=0;t<this.width;++t){const n=this.getCellVertex(t,e);n&&(yield n)}}getCellVertex(e,t){var n;return null===(n=this.mapping[t])||void 0===n?void 0:n[e]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["DIV_BY_ZERO"]="DIV_BY_ZERO",e["NAME"]="NAME",e["VALUE"]="VALUE",e["NUM"]="NUM",e["NA"]="NA",e["CYCLE"]="CYCLE",e["REF"]="REF",e["SPILL"]="SPILL",e["LIC"]="LIC",e["ERROR"]="ERROR"})(Vn||(Vn={})),function(e){e["FORMULA"]="FORMULA",e["VALUE"]="VALUE",e["ARRAY"]="ARRAY",e["EMPTY"]="EMPTY",e["ARRAYFORMULA"]="ARRAYFORMULA"}(Bn||(Bn={}));const Zn=(e,t)=>e instanceof Rn?e.isLeftCorner(t)?Bn.ARRAYFORMULA:Bn.ARRAY:e instanceof On||e instanceof qn?Bn.FORMULA:e instanceof $n?Bn.VALUE:Bn.EMPTY;var er,tr;(function(e){e["EMPTY"]="EMPTY",e["NUMBER"]="NUMBER",e["STRING"]="STRING",e["BOOLEAN"]="BOOLEAN",e["ERROR"]="ERROR"})(er||(er={})),function(e){e["NUMBER"]="NUMBER"}(tr||(tr={}));const nr=Object.assign(Object.assign({},er),tr),rr=Object.assign(Object.assign({},er),Lt),ir=e=>{switch(e){case nr.EMPTY:return 0;case nr.NUMBER:return 1;case nr.STRING:return 2;case nr.BOOLEAN:return 3;case nr.ERROR:return 4}throw new Error("Cell value not computed")},sr=e=>{if(e===vt)return nr.EMPTY;if(e instanceof lr||e instanceof Ht)return nr.ERROR;if("string"===typeof e)return nr.STRING;if(At(e))return nr.NUMBER;if("boolean"===typeof e)return nr.BOOLEAN;throw new Error("Cell value not computed")},or=e=>At(e)?xt(e):sr(e),ar=e=>At(e)?kt(e):void 0;class lr{constructor(e,t,n){this.type=e,this.message=t,this.root=n}static parsingError(e){return new lr(Vn.ERROR,`${Re.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new lr(this.type,this.message,e):this}}const cr=(e,t)=>({sheet:e,row:t}),ur=e=>e.row<0,hr=(e,t)=>({sheet:e,col:t}),dr=e=>e.col<0,mr=(e,t,n)=>({sheet:e,col:t,row:n}),fr=e=>e.col<0||e.row<0,pr=(e,t,n,r)=>mr(t,e.col+n,e.row+r),gr=e=>`${e.sheet},${e.row},${e.col}`;function yr(e){var t,n,r;return e&&("object"===typeof e||"function"===typeof e)&&"number"===typeof(null===(t=e)||void 0===t?void 0:t.sheet)&&"number"===typeof(null===(n=e)||void 0===n?void 0:n.col)&&"number"===typeof(null===(r=e)||void 0===r?void 0:r.row)}const wr=(e,t)=>{var n;return null!==(n=e.sheet)&&void 0!==n?n:t.sheet},br=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row,_r="AbsoluteCellRange: Wrong range size";function vr(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("start"in e&&yr(e.start)&&"end"in e&&yr(e.end))}const Sr=(e,t)=>({start:e,end:t});class Er{constructor(e,t){if(e.sheet!==t.sheet)throw new $t(e.sheet,t.sheet);this.start=mr(e.sheet,e.col,e.row),this.end=mr(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new $t(e.sheet,t.sheet);const n=t.col-e.col,r=t.row-e.row;return Number.isFinite(r)&&Number.isFinite(n)?new Er(e,t):Number.isFinite(r)?new Tr(e.sheet,e.row,t.row):new Cr(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===W.CELL_RANGE?Er.fromCellRange(e,t):e.type===W.COLUMN_RANGE?Cr.fromColumnRange(e,t):Tr.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return Er.fromAst(e,t)}catch(n){return}}static fromCellRange(e,t){return new Er(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,n){const r=Er.spanFromOrUndef(e,t,n);if(void 0===r)throw new Error(_r);return r}static spanFromOrUndef(e,t,n){if(!Number.isFinite(t)&&Number.isFinite(n)){if(0!==e.col)return;return new Tr(e.sheet,e.row,e.row+n-1)}if(!Number.isFinite(n)&&Number.isFinite(t)){if(0!==e.row)return;return new Cr(e.sheet,e.col,e.col+t-1)}if(Number.isFinite(n)&&Number.isFinite(t))return new Er(e,mr(e.sheet,e.col+t-1,e.row+n-1))}static fromCoordinates(e,t,n,r,i){return new Er(mr(e,t,n),mr(e,r,i))}isFinite(){return Number.isFinite(this.size())}doesOverlap(e){return this.start.sheet==e.start.sheet&&(!(this.end.row<e.start.row||this.start.row>e.end.row)&&!(this.end.col<e.start.col||this.start.col>e.end.col))}addressInRange(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row&&this.start.col<=e.col&&this.end.col>=e.col)}columnInRange(e){return this.sheet===e.sheet&&(this.start.col<=e.col&&this.end.col>=e.col)}rowInRange(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row)}containsRange(e){return this.addressInRange(e.start)&&this.addressInRange(e.end)}intersectionWith(e){if(this.sheet!==e.start.sheet)return;const t=Math.max(this.start.row,e.start.row),n=Math.min(this.end.row,e.end.row),r=Math.max(this.start.col,e.start.col),i=Math.min(this.end.col,e.end.col);return t>n||r>i?void 0:new Er(mr(this.sheet,r,t),mr(this.sheet,i,n))}includesRow(e){return this.start.row<e&&this.end.row>=e}includesColumn(e){return this.start.col<e&&this.end.col>=e}shiftByRows(e){this.start.row+=e,this.end.row+=e}expandByRows(e){this.end.row+=e}shiftByColumns(e){this.start.col+=e,this.end.col+=e}shifted(e,t){return Er.spanFrom(mr(this.sheet,this.start.col+e,this.start.row+t),this.width(),this.height())}expandByColumns(e){this.end.col+=e}moveToSheet(e){this.start.sheet=e,this.end.sheet=e}removeSpan(e){e instanceof jt?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return this.width()<=0||this.height()<=0}rangeWithSameWidth(e,t){return Er.spanFrom(mr(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return Er.spanFrom(mr(this.sheet,e,this.start.row),t,this.height())}toString(){return`${this.start.sheet},${this.start.col},${this.start.row},${this.end.col},${this.end.row}`}width(){return this.end.col-this.start.col+1}height(){return this.end.row-this.start.row+1}size(){return this.height()*this.width()}arrayOfAddressesInRange(){const e=[];for(let t=0;t<this.height();++t){e[t]=[];for(let n=0;n<this.width();++n){const r=mr(this.sheet,this.start.col+n,this.start.row+t);e[t].push(r)}}return e}withStart(e){return new Er(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return br(this.start,e.start)&&br(this.end,e.end)}addressesArrayMap(e,t){const n=[];let r=this.start.row;while(r<=this.effectiveEndRow(e)){let i=this.start.col;const s=[];while(i<=this.effectiveEndColumn(e))s.push(t(mr(this.start.sheet,i,r))),i++;n.push(s),r++}return n}addresses(e){const t=[];let n=this.start.row;const r=this.effectiveEndRow(e),i=this.effectiveEndColumn(e);while(n<=r){let e=this.start.col;while(e<=i)t.push(mr(this.start.sheet,e,n)),e++;n++}return t}*addressesWithDirection(e,t,n){if(e>0)if(t>0){let e=this.effectiveEndRow(n);while(e>=this.start.row){let t=this.effectiveEndColumn(n);while(t>=this.start.col)yield mr(this.start.sheet,t,e),t-=1;e-=1}}else{let e=this.start.row;while(e<=this.effectiveEndRow(n)){let t=this.effectiveEndColumn(n);while(t>=this.start.col)yield mr(this.start.sheet,t,e),t-=1;e+=1}}else if(t>0){let e=this.effectiveEndRow(n);while(e>=this.start.row){let t=this.start.col;while(t<=this.effectiveEndColumn(n))yield mr(this.start.sheet,t,e),t+=1;e-=1}}else{let e=this.start.row;while(e<=this.effectiveEndRow(n)){let t=this.start.col;while(t<=this.effectiveEndColumn(n))yield mr(this.start.sheet,t,e),t+=1;e+=1}}}getAddress(e,t){if(e<0||t<0||t>this.height()-1||e>this.width()-1)throw Error("Index out of bound");return mr(this.start.sheet,this.start.col+e,this.start.row+t)}exceedsSheetSizeLimits(e,t){return this.end.col>=e||this.end.row>=t}effectiveEndColumn(e){return this.end.col}effectiveEndRow(e){return this.end.row}effectiveWidth(e){return this.width()}effectiveHeight(e){return this.height()}removeRows(e,t){if(!(e>this.end.row)){if(t<this.start.row){const n=t-e+1;return this.shiftByRows(-n)}e<=this.start.row&&(this.start.row=e),this.end.row-=Math.min(t,this.end.row)-e+1}}removeColumns(e,t){if(!(e>this.end.col)){if(t<this.start.col){const n=t-e+1;return this.shiftByColumns(-n)}e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}}class Cr extends Er{constructor(e,t,n){super(mr(e,t,0),mr(e,n,Number.POSITIVE_INFINITY))}static fromColumnRange(e,t){const n=e.start.toSimpleColumnAddress(t),r=e.end.toSimpleColumnAddress(t);if(n.sheet!==r.sheet)throw new $t(n.sheet,r.sheet);return new Cr(n.sheet,n.col,r.col)}shouldBeRemoved(){return this.width()<=0}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new Cr(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new Cr(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.col>=e}effectiveEndRow(e){return this.effectiveHeight(e)-1}effectiveHeight(e){return e.getSheetHeight(this.sheet)}removeRows(e,t){}}class Tr extends Er{constructor(e,t,n){super(mr(e,0,t),mr(e,Number.POSITIVE_INFINITY,n))}static fromRowRangeAst(e,t){const n=e.start.toSimpleRowAddress(t),r=e.end.toSimpleRowAddress(t);if(n.sheet!==r.sheet)throw new $t(n.sheet,r.sheet);return new Tr(n.sheet,n.row,r.row)}shouldBeRemoved(){return this.height()<=0}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new Tr(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new Tr(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.row>=t}effectiveEndColumn(e){return this.effectiveWidth(e)-1}effectiveWidth(e){return e.getSheetWidth(this.sheet)}removeColumns(e,t){}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Mr{constructor(e,t,n){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function Rr(e){const t=e.caseSensitive?e.accentSensitive?"variant":"case":e.accentSensitive?"accent":"base",n=e.caseFirst,r=e.ignorePunctuation;return new Intl.Collator(e.localeLang,{sensitivity:t,caseFirst:n,ignorePunctuation:r})}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Or="i",Nr=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class Ar{constructor(e,t,n){this.config=e,this.dateTimeHelper=t,this.numberLiteralsHelper=n,this.lt=(e,t)=>this.compare(e,t)<0,this.leq=(e,t)=>this.compare(e,t)<=0,this.gt=(e,t)=>this.compare(e,t)>0,this.geq=(e,t)=>this.compare(e,t)>=0,this.eq=(e,t)=>0===this.compare(e,t),this.neq=(e,t)=>0!==this.compare(e,t),this.pow=(e,t)=>Math.pow(St(e),St(t)),this.addWithEpsilonRaw=(e,t)=>{const n=e+t;return Math.abs(n)<this.actualEps*Math.abs(e)?0:n},this.addWithEpsilon=(e,t)=>{const n=Kr(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(St(e),St(t)),n)},this.unaryMinus=e=>Ct(e,-St(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new Nt(St(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>e instanceof lr?e:t instanceof lr?t:"number"===typeof e?"number"===typeof t?this.addWithEpsilonRaw(e,t):e:"number"===typeof t?t:0,this.subtract=(e,t)=>{const n=Kr(e,t),r=St(e),i=St(t);let s=r-i;return Math.abs(s)<this.actualEps*Math.abs(r)&&(s=0),this.ExtendedNumberFactory(s,n)},this.divide=(e,t)=>{const n=St(e),r=St(t);if(0===r)return new lr(Vn.DIV_BY_ZERO);{const i=Xr(e,t);return this.ExtendedNumberFactory(n/r,i)}},this.multiply=(e,t)=>{const n=Xr(e,t);return this.ExtendedNumberFactory(St(e)*St(t),n)},this.manyToExactComplex=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(At(n)||"string"===typeof n){const e=this.coerceScalarToComplex(n);e instanceof lr||t.push(e)}}return t},this.coerceNumbersExactRanges=e=>this.manyToNumbers(e,this.manyToExactNumbers),this.coerceNumbersCoerceRangesDropNulls=e=>this.manyToNumbers(e,this.manyToCoercedNumbersDropNulls),this.manyToExactNumbers=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;At(n)&&t.push(St(n))}return t},this.manyToOnlyNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(At(n))t.push(St(n));else if(n!==vt)return new lr(Vn.VALUE,Re.NumberExpected)}return t},this.manyToCoercedNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(n===vt)continue;const e=this.coerceScalarToNumberOrError(n);At(e)&&t.push(St(e))}return t},this.collator=Rr(e),this.actualEps=e.smartRounding?e.precisionEpsilon:0}eqMatcherFunction(e){const t=this.buildRegex(e);return e=>"string"===typeof e&&t.test(this.normalizeString(e))}neqMatcherFunction(e){const t=this.buildRegex(e);return e=>!("string"===typeof e)||!t.test(this.normalizeString(e))}searchString(e,t){var n;const r=this.buildRegex(e,!1),i=r.exec(t);return null!==(n=null===i||void 0===i?void 0:i.index)&&void 0!==n?n:-1}requiresRegex(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(let t=0;t<e.length;t++){const n=e.charAt(t);if(Ur(n)||this.config.useRegularExpressions&&Br(n))return!0}return!1}floatCmp(e,t){const n=St(e),r=St(t),i=1+this.actualEps;return r>=0&&n*i>=r&&n<=r*i||r<=0&&n*i<=r&&n>=r*i?0:n>r?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof lr?e:null!==(t=this.coerceToMaybeNumber(e))&&void 0!==t?t:new lr(Vn.VALUE,Re.NumberCoercion)}coerceToMaybeNumber(e){var t;return null!==(t=this.coerceNonDateScalarToMaybeNumber(e))&&void 0!==t?t:"string"===typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}coerceNonDateScalarToMaybeNumber(e){if(e===vt)return 0;if("string"===typeof e){if(""===e)return 0;const t=this.coerceStringToMaybePercentNumber(e);if(void 0!==t)return t;const n=this.coerceStringToMaybeCurrencyNumber(e);return void 0!==n?n:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim())}return At(e)?e:"boolean"===typeof e?Number(e):void 0}coerceStringToMaybePercentNumber(e){const t=e.trim();if(t.endsWith("%")){const e=t.slice(0,t.length-1).trim(),n=this.numberLiteralsHelper.numericStringToMaybeNumber(e);if(void 0!==n)return new Nt(n/100)}}coerceStringToMaybeCurrencyNumber(e){const t=this.currencyMatcher(e.trim());if(void 0!==t){const[e,n]=t,r=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==r)return new Mt(r,e)}}currencyMatcher(e){for(const t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length).trim()];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length).trim()]}}coerceComplexExactRanges(e){const t=[];for(const r of e)if(r instanceof Ht)t.push(r);else if(r!==vt){const e=this.coerceScalarToComplex(r);if(e instanceof lr)return e;t.push(e)}const n=[];for(const r of t)if(r instanceof Ht){const e=this.manyToExactComplex(r.valuesFromTopLeftCorner());if(e instanceof lr)return e;n.push(...e)}else n.push(r);return n}coerceScalarToComplex(e){return e instanceof lr?e:e===vt?[0,0]:At(e)?[St(e),0]:"string"===typeof e?this.coerceStringToComplex(e):new lr(Vn.NUM,Re.ComplexNumberExpected)}ExtendedNumberFactory(e,t){const{type:n,format:r}=t;switch(n){case Lt.NUMBER_RAW:return e;case Lt.NUMBER_CURRENCY:return new Mt(e,null!==r&&void 0!==r?r:this.config.currencySymbol[0]);case Lt.NUMBER_DATE:return new Tt(e,r);case Lt.NUMBER_DATETIME:return new Ot(e,r);case Lt.NUMBER_TIME:return new Rt(e,r);case Lt.NUMBER_PERCENT:return new Nt(e,r)}}buildRegex(e,t=!0){let n;e=this.normalizeString(e);let r=this.config.useWildcards,i=this.config.useRegularExpressions;if(i)try{RegExp(e)}catch(s){i=!1,r=!1}return n=i?zr(e,this.config.caseSensitive):r?Wr(e,this.config.caseSensitive):Gr(e,this.config.caseSensitive),this.config.matchWholeCell&&t?RegExp("^("+n+")$"):RegExp(n)}normalizeString(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=Jr(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}compare(e,t){if("string"===typeof e||"string"===typeof t){const n="string"===typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,r="string"===typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(At(n)&&At(r))return this.floatCmp(n,r)}return e===vt?e=kr(t):t===vt&&(t=kr(e)),"string"===typeof e&&"string"===typeof t?this.stringCmp(e,t):"boolean"===typeof e&&"boolean"===typeof t?jr(xr(e),xr(t)):At(e)&&At(t)?this.floatCmp(e,t):e===vt&&t===vt?0:jr(ir(sr(e)),ir(sr(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){const n=[];for(const i of e)if(i instanceof Ht)n.push(i);else{const e=St(this.coerceScalarToNumberOrError(i));if(e instanceof lr)return e;n.push(e)}const r=[];for(const i of n)if(i instanceof Ht){const e=t(i.valuesFromTopLeftCorner());if(e instanceof lr)return e;r.push(...e)}else r.push(i);return r}coerceStringToComplex(e){const t=Nr.exec(e);if(null===t)return new lr(Vn.NUM,Re.ComplexNumberExpected);let n,r;return n=void 0!==t[6]?"-"===t[1]?[0,-1]:[0,1]:this.parseComplexToken(t[1]+t[3],t[5]),n instanceof lr||void 0===t[8]?n:(r=void 0!==t[14]?"-"===t[9]?[0,-1]:[0,1]:this.parseComplexToken(t[9]+t[11],t[13]),r instanceof lr?r:""!==t[5]||""===t[13]?new lr(Vn.NUM,Re.ComplexNumberExpected):"+"===t[8]?[n[0]+r[0],n[1]+r[1]]:[n[0]-r[0],n[1]-r[1]])}parseComplexToken(e,t){const n=St(this.coerceNonDateScalarToMaybeNumber(e));return void 0===n?new lr(Vn.NUM,Re.ComplexNumberExpected):""===t?[n,0]:[0,n]}}function Lr([e,t],n){if(!isFinite(e)||!isFinite(t))return new lr(Vn.NUM,Re.NaN);if(n=null!==n&&void 0!==n?n:Or,0===t)return""+e;const r=`${-1===t||1===t?"":Math.abs(t)}${n}`;return 0===e?`${t<0?"-":""}${r}`:`${e}${t<0?"-":"+"}${r}`}function Ir(e){return e instanceof Ht?e:Ht.fromScalar(e)}function xr(e){return Number(e)}function kr(e){return"string"===typeof e?"":At(e)?0:"boolean"!==typeof e&&vt}function Dr(e){if(e instanceof lr||"boolean"===typeof e)return e;if(e===vt)return!1;if(At(e))return 0!==St(e);{const t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&(""!==t&&void 0)}}function Hr(e){return e instanceof lr||"string"===typeof e?e:e===vt?"":At(e)?St(e).toString():e?"TRUE":"FALSE"}function Pr(e){return e===vt?0:e}function jr(e,t){const n=St(e),r=St(t);return n>r?1:n<r?-1:0}function Fr(e){return isNaN(e)||e===1/0||e===-1/0}function Yr(e){return 0===e?0:e}function Ur(e){return["*","?"].includes(e)}const Vr=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function Br(e){return Vr.includes(e)}function Wr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);if("~"===i){if(r==e.length-1){n+="~";continue}const t=e.charAt(r+1);Ur(t)||Br(t)?(n+="\\"+t,r++):(n+=t,r++)}else Ur(i)?n+="."+i:Br(i)?n+="\\"+i:n+=t?i:i.toLowerCase()}return n}function Gr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);Ur(i)||Br(i)?n+="\\"+i:n+=t?i:i.toLowerCase()}return n}function zr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);Ur(i)||Br(i)?n+=i:n+=t?i:i.toLowerCase()}return n}function Kr(e,t){const{type:n,format:r}=Dt(e),{type:i,format:s}=Dt(t);if(n===Lt.NUMBER_RAW)return{type:i,format:s};if(i===Lt.NUMBER_RAW)return{type:n,format:r};if((n===Lt.NUMBER_DATETIME||n===Lt.NUMBER_DATE)&&(i===Lt.NUMBER_DATETIME||i===Lt.NUMBER_DATE))return{type:Lt.NUMBER_RAW};if(n===Lt.NUMBER_TIME){if(i===Lt.NUMBER_DATE)return{type:Lt.NUMBER_DATETIME,format:`${s} ${r}`};if(i===Lt.NUMBER_DATETIME)return{type:Lt.NUMBER_DATETIME,format:s}}if(i===Lt.NUMBER_TIME){if(n===Lt.NUMBER_DATE)return{type:Lt.NUMBER_DATETIME,format:`${r} ${s}`};if(n===Lt.NUMBER_DATETIME)return{type:Lt.NUMBER_DATETIME,format:r}}return{type:n,format:r}}function Xr(e,t){let{type:n,format:r}=Dt(e),{type:i,format:s}=Dt(t);return n===Lt.NUMBER_PERCENT&&(n=Lt.NUMBER_RAW,r=void 0),i===Lt.NUMBER_PERCENT&&(i=Lt.NUMBER_RAW,s=void 0),n===Lt.NUMBER_RAW?{type:i,format:s}:i===Lt.NUMBER_RAW?{type:n,format:r}:{type:Lt.NUMBER_RAW}}function $r(e){return Jr(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function qr(e,t){var n;if(e.isAdHoc())return null===(n=e.data[0])||void 0===n?void 0:n[0];const r=e.range;if(t.formulaAddress.sheet===r.sheet)if(1===r.width()){const n=t.formulaAddress.row-r.start.row;if(n>=0&&n<r.height())return e.data[n][0]}else if(1===r.height()){const n=t.formulaAddress.col-r.start.col;if(n>=0&&n<r.width())return e.data[0][n]}}function Jr(e,t){return e.normalize(t.toUpperCase())}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var Qr;(function(e){e["STRING"]="STRING",e["NUMBER"]="NUMBER",e["BOOLEAN"]="BOOLEAN",e["SCALAR"]="SCALAR",e["NOERROR"]="NOERROR",e["RANGE"]="RANGE",e["INTEGER"]="INTEGER",e["COMPLEX"]="COMPLEX",e["ANY"]="ANY"})(Qr||(Qr={}));class Zr{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,n,r)=>{const i=this.evaluateArguments(e,t,n),s=i.map(([e,t])=>e),o=i.map(([e,t])=>t),a=this.buildMetadataForEachArgumentValue(s.length,n),l=t.arraysFlag&&!n.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(a,s.length))return new lr(Vn.NA,Re.WrongArgNumber);const[c,u]=l?this.calculateSizeOfVectorizedResultArray(s,a):[1,1];if(1===c&&1===u){const e=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,o,r,n.returnNumberType)}const h=[...Array(c).keys()].map(e=>[...Array(u).keys()].map(i=>{const c=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,e,i),u=this.calculateSingleCellOfResultArray(t,c,a,o,r,n.returnNumberType);if(u instanceof Ht)throw new Error("Function returning array cannot be vectorized.");return u}));return Ht.onlyValues(h)},this.runFunctionWithReferenceArgument=(e,t,n,r,i,s=(()=>new lr(Vn.NA,Re.CellRefExpected)))=>{if(0===e.length)return this.returnNumberWrapper(r(),n.returnNumberType);if(e.length>1)return new lr(Vn.NA,Re.WrongArgNumber);let o,a=e[0];while(a.type===W.PARENTHESIS)a=a.expression;if(a.type===W.CELL_REFERENCE)o=a.reference.toSimpleCellAddress(t.formulaAddress);else if(a.type===W.CELL_RANGE||a.type===W.COLUMN_RANGE||a.type===W.ROW_RANGE)try{o=Er.fromAst(a,t.formulaAddress).start}catch(l){return new lr(Vn.REF,Re.CellRefExpected)}return void 0!==o?this.returnNumberWrapper(i(o),n.returnNumberType):this.runFunction(e,t,n,s)},this.interpreter=e,this.dependencyGraph=e.dependencyGraph,this.columnSearch=e.columnSearch,this.config=e.config,this.serialization=e.serialization,this.arraySizePredictor=e.arraySizePredictor,this.dateTimeHelper=e.dateTimeHelper,this.arithmeticHelper=e.arithmeticHelper}evaluateAst(e,t){return this.interpreter.evaluateAst(e,t)}arraySizeForAst(e,t){return this.arraySizePredictor.checkArraySizeForAst(e,t)}listOfScalarValues(e,t){const n=[];for(const r of e){const e=this.evaluateAst(r,t);if(e instanceof Ht)for(const t of e.valuesFromTopLeftCorner())n.push([t,!0]);else n.push([e,!1])}return n}coerceToType(e,t,n){let r;if(e instanceof Ht)switch(t.argumentType){case Qr.RANGE:case Qr.ANY:r=e;break;default:{const t=qr(e,n);if(void 0===t)return;e=t}}if(!(e instanceof Ht))switch(t.argumentType){case Qr.INTEGER:case Qr.NUMBER:const n=this.coerceScalarToNumberOrError(e);if(!At(n)){r=n;break}const i=St(n);if(void 0!==t.maxValue&&i>t.maxValue)return new lr(Vn.NUM,Re.ValueLarge);if(void 0!==t.minValue&&i<t.minValue)return new lr(Vn.NUM,Re.ValueSmall);if(void 0!==t.lessThan&&i>=t.lessThan)return new lr(Vn.NUM,Re.ValueLarge);if(void 0!==t.greaterThan&&i<=t.greaterThan)return new lr(Vn.NUM,Re.ValueSmall);if(t.argumentType===Qr.INTEGER&&!Number.isInteger(i))return new lr(Vn.NUM,Re.IntegerExpected);r=n;break;case Qr.STRING:r=Hr(e);break;case Qr.BOOLEAN:r=Dr(e);break;case Qr.SCALAR:case Qr.NOERROR:case Qr.ANY:r=e;break;case Qr.RANGE:if(e instanceof lr)return e;r=Ir(e);break;case Qr.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(St(e))}return t.passSubtype||void 0===r?r:St(r)}calculateSingleCellOfResultArray(e,t,n,r,i,s){const o=this.coerceArgumentsToRequiredTypes(e,t,n,r);if(o instanceof lr)return o;const a=i(...o);return this.returnNumberWrapper(a,s)}coerceArgumentsToRequiredTypes(e,t,n,r){const i=[];for(let s=0;s<n.length;s++){const o=n[s],a=void 0!==t[s]?t[s]:null===o||void 0===o?void 0:o.defaultValue;if(void 0===a){i.push(void 0);continue}const l=this.coerceToType(a,o,e);if(void 0===l&&!r[s])return new lr(Vn.VALUE,Re.WrongType);if(l instanceof lr&&o.argumentType!==Qr.SCALAR)return l;i.push(l)}return i}vectorizeAndBroadcastArgumentsIfNecessary(e,t,n,r,i){return t.map((t,s)=>e&&this.isRangePassedAsAScalarArgument(t,n[s])?this.vectorizeAndBroadcastRangeArgument(t,r,i):t)}vectorizeAndBroadcastRangeArgument(e,t,n){var r;const i=1===e.height()?0:t,s=1===e.width()?0:n;return null===(r=e.data[i])||void 0===r?void 0:r[s]}evaluateArguments(e,t,n){return n.expandRanges?this.listOfScalarValues(e,t):e.map(e=>[this.evaluateAst(e,t),!1])}buildMetadataForEachArgumentValue(e,t){const n=t.parameters?[...t.parameters]:[],r=void 0!==t.repeatLastArgs&&Number.isInteger(t.repeatLastArgs)&&t.repeatLastArgs>0;if(r)while(e>n.length)n.push(...n.slice(n.length-t.repeatLastArgs));return n}isNumberOfArgumentValuesValid(e,t){if(t>e.length)return!1;if(t<e.length){const n=e.slice(t),r=n.every(e=>(null===e||void 0===e?void 0:e.optionalArg)||void 0!==(null===e||void 0===e?void 0:e.defaultValue));return r}return!0}calculateSizeOfVectorizedResultArray(e,t){const n=e.filter((e,n)=>this.isRangePassedAsAScalarArgument(e,t[n])),r=Math.max(1,...n.map(e=>e.height())),i=Math.max(1,...n.map(e=>e.width()));return[r,i]}isRangePassedAsAScalarArgument(e,t){return null!=e&&null!=t&&(e instanceof Ht&&![Qr.RANGE,Qr.ANY].includes(t.argumentType))}metadata(e){const t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw new Error(`No metadata for function ${e}.`)}returnNumberWrapper(e,t,n){return void 0!==t&&At(e)?this.arithmeticHelper.ExtendedNumberFactory(St(e),{type:t,format:n}):e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ei{constructor(e,t,n=!1){this.width=e,this.height=t,this.isRef=n}static error(){return new ei(1,1,!0)}static scalar(){return new ei(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}function ti(e,t){return new ei(Math.max(e.width,t.width),Math.max(e.height,t.height))}function ni(e){return new ei(e.width,e.height)}class ri{constructor(e,t){this.config=e,this.functionRegistry=t}checkArraySize(e,t){return this.checkArraySizeForAst(e,{formulaAddress:t,arraysFlag:this.config.useArrayArithmetic})}checkArraySizeForAst(e,t){switch(e.type){case W.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case W.COLUMN_RANGE:case W.ROW_RANGE:case W.CELL_RANGE:{const n=Er.fromAstOrUndef(e,t.formulaAddress);return void 0===n?ei.error():new ei(n.width(),n.height(),!0)}case W.ARRAY:{const n=[],r=[];for(const o of e.args){const e=o.map(e=>this.checkArraySizeForAst(e,t)),i=Math.min(...e.map(e=>e.height)),s=e.reduce((e,t)=>e+t.width,0);n.push(i),r.push(s)}const i=n.reduce((e,t)=>e+t,0),s=Math.min(...r);return new ei(s,i)}case W.STRING:case W.NUMBER:return ei.scalar();case W.CELL_REFERENCE:return new ei(1,1,!0);case W.DIV_OP:case W.CONCATENATE_OP:case W.EQUALS_OP:case W.GREATER_THAN_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.LESS_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.NOT_EQUAL_OP:case W.PLUS_OP:case W.POWER_OP:case W.TIMES_OP:{const n=this.checkArraySizeForAst(e.left,t),r=this.checkArraySizeForAst(e.right,t);return!t.arraysFlag&&(n.height>1||n.width>1||r.height>1||r.width>1)?ei.error():ti(n,r)}case W.MINUS_UNARY_OP:case W.PLUS_UNARY_OP:case W.PERCENT_OP:{const n=this.checkArraySizeForAst(e.value,t);return!t.arraysFlag&&(n.height>1||n.width>1)?ei.error():ni(n)}case W.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case W.EMPTY:return ei.error();default:return ei.error()}}checkArraySizeForFunction(e,t){const n=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==n)return n(e,t);const r=this.functionRegistry.getMetadata(e.procedureName);if(void 0===r||r.expandRanges||!t.arraysFlag||r.vectorizationForbidden||void 0===r.parameters)return new ei(1,1);const i=e.args.map(e=>{var n;return this.checkArraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(n=null===r||void 0===r?void 0:r.arrayFunction)&&void 0!==n&&n))}),s=[...r.parameters];if(void 0!==r.repeatLastArgs&&s.length<i.length&&(i.length-s.length)%r.repeatLastArgs!==0)return ei.error();while(s.length<i.length){if(void 0===r.repeatLastArgs)return ei.error();s.push(...s.slice(s.length-r.repeatLastArgs))}let o=1,a=1;for(let l=0;l<i.length;l++)s[l].argumentType!==Qr.RANGE&&s[l].argumentType!==Qr.ANY&&(a=Math.max(a,i[l].height),o=Math.max(o,i[l].width));return new ei(o,a)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ii{constructor(e,t,n){var r;this.value=t,this.address=n,this.type=e.type,this.message=null!==(r=e.message)&&void 0!==r?r:""}toString(){return this.value}valueOf(){return this.value}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function si(e,t,n){if("undefined"===typeof e)return ma.defaultConfig[n];if("string"===typeof t){if(typeof e===t)return e;throw new sn(t,n)}if(t.includes(e))return e;throw new cn(t.map(e=>`'${e}'`).join(" "),n)}function oi(e,t,n){if(e<n)throw new an(t,n)}function ai(e,t,n){if(e>n)throw new ln(t,n)}function li(e,t,n,r){if(t(e))return e;if("undefined"===typeof e)return ma.defaultConfig[r];throw new sn(n,r)}function ci(...e){const t=new Map;e.forEach(e=>{const n=t.get(e.value)||[];n.push(e.name),t.set(e.value,n)});const n=[];for(const r of t.values())r.length>1&&n.push(r);if(n.length>0){n.forEach(e=>e.sort());const e=n.map(e=>`[${e}]`).join("; ");throw new Error("Config initialization failed. Parameters in conflict: "+e)}}function ui(e,t,n){if(typeof e!==t)throw new sn(t,n)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const hi=new RegExp("^ss(\\.(s+|0+))?$"),di=new RegExp("^[0-9/.\\-: ]+[ap]?m?$"),mi=new RegExp("\\s+"),fi=new RegExp("[ /.-]"),pi=":",gi=1e3,yi=Ti(Si),wi=Ti(Ei);function bi(e,t,n){if(void 0===t&&void 0===n)return;let r=e.replace(mi," ").trim().toLowerCase();if(!Ci(r))return;let i=r.substring(r.length-2);"am"===i||"pm"===i?r=r.substring(0,r.length-2).trim():(i=r.substring(r.length-1),"a"===i||"p"===i?r=r.substring(0,r.length-1).trim():i=void 0);const s=r.split(fi);s.length>=2&&s[s.length-2].includes(pi)&&(s[s.length-2]=s[s.length-2]+"."+s[s.length-1],s.pop());const o=s[s.length-1].split(pi);if(void 0!==i&&o.push(i),1===s.length)return _i(o,n);if(1===o.length)return vi(s,t);const a=vi(s.slice(0,s.length-1),t),l=_i(o,n);return void 0===a||void 0===l?void 0:Object.assign(Object.assign({},a),l)}function _i(e,t){var n,r,i;if(void 0===t)return;const{itemsCount:s,hourItem:o,minuteItem:a,secondItem:l}=yi(t);let c=void 0;if("am"===e[e.length-1]||"a"===e[e.length-1]?(c=!1,e.pop()):"pm"!==e[e.length-1]&&"p"!==e[e.length-1]||(c=!0,e.pop()),e.length!==s)return;const u=Number(null!==(n=e[l])&&void 0!==n?n:"0");if(!Number.isFinite(u))return;const h=Math.round(u*gi)/gi,d=Number(null!==(r=e[a])&&void 0!==r?r:"0");if(!Number.isFinite(d)||!Number.isInteger(d))return;const m=Number(null!==(i=e[o])&&void 0!==i?i:"0");if(!Number.isFinite(m)||!Number.isInteger(m))return;if(void 0!==c&&(m<0||m>12))return;const f=void 0!==c?m%12+(c?12:0):m;return{hours:f,minutes:d,seconds:h}}function vi(e,t){var n;if(void 0===t)return;const{itemsCount:r,dayItem:i,monthItem:s,shortYearItem:o,longYearItem:a}=wi(t);if(e.length!==r)return;const l=Number(e[i]);if(!Number.isFinite(l)||!Number.isInteger(l))return;const c=Number(e[s]);if(!Number.isFinite(c)||!Number.isInteger(c))return;if(e[a]&&e[o])return;const u=Number(null!==(n=e[a])&&void 0!==n?n:e[o]);return!Number.isFinite(u)||!Number.isInteger(u)||e[a]&&(u<1e3||u>9999)||e[o]&&(u<0||u>99)?void 0:{year:u,month:c,day:l}}function Si(e){const t=e.toLowerCase().trim(),n=t.endsWith("am/pm")?t.substring(0,t.length-5):t.endsWith("a/p")?t.substring(0,e.length-3):t,r=n.trim().split(pi);return{itemsCount:r.length,hourItem:r.indexOf("hh"),minuteItem:r.indexOf("mm"),secondItem:r.findIndex(e=>hi.test(e))}}function Ei(e){const t=e.toLowerCase().trim().split(fi);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}}function Ci(e){return di.test(e)}function Ti(e){const t={};return n=>{const r=t[n];if(void 0!==r)return r;const i=e(n);return t[n]=i,i}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Mi=[31,28,31,30,31,30,31,31,30,31,30,31],Ri=[0,31,59,90,120,151,181,212,243,273,304,334],Oi=60,Ni=60,Ai=24;function Li(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("year"in e&&"number"===typeof e.year&&"month"in e&&"number"===typeof e.month&&"day"in e&&"number"===typeof e.day)}function Ii(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("hours"in e&&"number"===typeof e.hours&&"minutes"in e&&"number"===typeof e.minutes&&"seconds"in e&&"number"===typeof e.seconds)}const xi={year:9999,month:12,day:31};class ki{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(xi),this.leapYear1900=e.leapYear1900,!this.leapYear1900&&0<=this.dateToNumber({year:1900,month:2,day:28})?this.epochYearZero=this.numberToSimpleDate(2).year:this.epochYearZero=this.numberToSimpleDate(1).year,this.parseDateTime=e.parseDateTime}getWithinBounds(e){return e<=this.maxDateValue&&e>=0?e:void 0}dateStringToDateNumber(e){const{dateTime:t,dateFormat:n="",timeFormat:r=""}=this.parseDateTimeFromConfigFormats(e);if(void 0!==t)return Ii(t)?Li(t)?new Ot(Ui(t)+this.dateToNumber(t),n+" "+r):new Rt(Ui(t),r):Li(t)?new Tt(this.dateToNumber(t),n):0}parseDateTimeFromConfigFormats(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}getNullYear(){return this.config.nullYear}getEpochYearZero(){return this.epochYearZero}isValidDate(e){return!(isNaN(e.year)||isNaN(e.month)||isNaN(e.day))&&(e.day===Math.round(e.day)&&e.month===Math.round(e.month)&&e.year===Math.round(e.year)&&(!(e.year<1582)&&(!(e.month<1||e.month>12)&&(!(e.day<1)&&(this.isLeapYear(e.year)&&2===e.month?e.day<=29:e.day<=Mi[e.month-1])))))}dateToNumber(e){return this.dateToNumberFromZero(e)-this.minDateAbsoluteValue}relativeNumberToAbsoluteNumber(e){return e+this.minDateAbsoluteValue-(this.leapYear1900?1:0)}numberToSimpleDate(e){const t=Math.floor(e)+this.minDateAbsoluteValue;let n=Math.floor(t/365.2425);this.dateToNumberFromZero({year:n+1,month:1,day:1})<=t?n++:this.dateToNumberFromZero({year:n-1,month:1,day:1})>t&&n--;const r=t-this.dateToNumberFromZero({year:n,month:1,day:1}),i=Di(r-(this.isLeapYear(n)&&r>=59?1:0)),s=r-Ri[i]-(this.isLeapYear(n)&&i>1?1:0);return{year:n,month:i+1,day:s+1}}numberToSimpleDateTime(e){const t=Yi(e%1),n=Math.floor(t.hours/Ai);t.hours=t.hours%Ai;const r=this.numberToSimpleDate(Math.floor(e)+n);return Object.assign(Object.assign({},r),t)}leapYearsCount(e){return Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)+(this.config.leapYear1900&&e>=1900?1:0)}daysInMonth(e,t){return this.isLeapYear(e)&&2===t?29:Mi[t-1]}endOfMonth(e){return{year:e.year,month:e.month,day:this.daysInMonth(e.year,e.month)}}toBasisUS(e,t){return 31===e.day&&(e.day=30),30===e.day&&31===t.day&&(t.day=30),2===e.month&&e.day===this.daysInMonth(e.year,e.month)&&(e.day=30,2===t.month&&t.day===this.daysInMonth(t.year,t.month)&&(t.day=30)),[e,t]}yearLengthForBasis(e,t){return e.year!==t.year?e.year+1!==t.year||e.month<t.month||e.month===t.month&&e.day<t.day?(this.leapYearsCount(t.year)-this.leapYearsCount(e.year-1))/(t.year-e.year+1)+365:this.countLeapDays(t)!==this.countLeapDays({year:e.year,month:e.month,day:e.day-1})?366:365:this.isLeapYear(e.year)?366:365}parseSingleFormat(e,t,n){const r=this.parseDateTime(e,t,n);if(!Li(r)||(r.year>=0&&r.year<100&&(r.year<this.getNullYear()?r.year+=2e3:r.year+=1900),this.isValidDate(r)))return r}parseDateTimeFromFormats(e,t,n){const r=0===t.length?[void 0]:t,i=0===n.length?[void 0]:n;for(const s of r)for(const t of i){const n=this.parseSingleFormat(e,s,t);if(void 0!==n)return{dateTime:n,timeFormat:t,dateFormat:s}}return{}}countLeapDays(e){return e.month>2||2===e.month&&e.day>=29?this.leapYearsCount(e.year):this.leapYearsCount(e.year-1)}dateToNumberFromZero(e){return 365*e.year+Ri[e.month-1]+e.day-1+(e.month<=2?this.leapYearsCount(e.year-1):this.leapYearsCount(e.year))}isLeapYear(e){return!(e%4)&&(!!(e%100)||(!(e%400)||1900===e&&this.config.leapYear1900))}}function Di(e){let t=0;return Ri[t+6]<=e&&(t+=6),Ri[t+3]<=e&&(t+=3),Ri[t+2]<=e?t+=2:Ri[t+1]<=e&&(t+=1),t}function Hi(e,t){const n=12*e.year+e.month-1+t;return{year:Math.floor(n/12),month:n%12+1,day:e.day}}function Pi(e){return{year:e.year,month:e.month,day:Math.min(e.day,Mi[e.month-1])}}function ji(e){return Math.round(3600*e*24)/86400}function Fi(e,t=1){return Math.round(e*t)/t}function Yi(e){const t=e*Ai*Ni*Oi,n=Fi(t%Oi,1e5)%Oi,r=(t-n)/Oi,i=Math.round(r%Ni)%Ni,s=(r-i)/Ni,o=Math.round(s);return{hours:o,minutes:i,seconds:n}}function Ui(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function Vi(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Bi{call(){return Qn}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Wi=/(\\.|dd|DD|d|D|mm|MM|m|M|YYYY|YY|yyyy|yy|HH|hh|H|h|ss(\.(0+|s+))?|s|AM\/PM|am\/pm|A\/P|a\/p|\[mm]|\[MM]|\[hh]|\[HH])/g,Gi=/(\\.|[#0]+(\.[#0]*)?)/g;var zi,Ki;function Xi(e,t){return{type:e,value:t}}function $i(e){Wi.lastIndex=0;const t=[];let n;do{n=Wi.exec(e),null!==n&&t.push(n)}while(n);return t}function qi(e){Gi.lastIndex=0;const t=Gi.exec(e);return null!==t?[t]:[]}function Ji(e,t){const n=[];let r=0;for(let s=0;s<e.length;++s){const i=e[s];if(i.index!==r){const e=t.substr(r,i.index-r);n.push(Xi(zi.FREE_TEXT,e))}i[0].startsWith("\\")?n.push(Xi(zi.FREE_TEXT,i[0])):n.push(Xi(zi.FORMAT,i[0])),r=i.index+i[0].length}const i=e[e.length-1];if(i.index+i[0].length<t.length){const e=t.substr(i.index+i[0].length,t.length);n.push(Xi(zi.FREE_TEXT,e))}return n}function Qi(e){const t=$i(e);return t.every(e=>es(e))?void 0:{type:Ki.DATE,tokens:Ji(t,e)}}function Zi(e){const t=qi(e);return t.every(e=>es(e))?void 0:{type:Ki.NUMBER,tokens:Ji(t,e)}}function es(e){return e[0].startsWith("\\")}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function ts(e,t,n,r){const i=n.stringifyDateTime(r.numberToSimpleDateTime(e),t);if(void 0!==i)return i;const s=n.stringifyDuration(Yi(e),t);if(void 0!==s)return s;const o=Zi(t);return void 0!==o?ss(o.tokens,e):t}function ns(e,t){let n=""+e;while(n.length<t)n="0"+n;return n}function rs(e,t){let n=""+e;while(n.length<t)n+="0";return n}function is(e,t){return e.split(t).length-1}function ss(e,t){let n="";for(let r=0;r<e.length;++r){const i=e[r];if(i.type===zi.FREE_TEXT){n+=i.value;continue}const s=i.value.split("."),o=s[0],a=s[1]||"",l=s[1]?".":"",c=Number(t.toFixed(a.length)).toString().split(".");let u=c[0]||"",h=c[1]||"";if(o.length>u.length){const e=is(o.substr(0,o.length-u.length),"0");u=ns(u,e+u.length)}const d=is(a.substr(h.length,a.length-h.length),"0");h=rs(h,d+h.length),n+=u+l+h}return n}function os(e,t){const n=Qi(t);if(void 0===n)return;const r=n.tokens;let i="";for(const s of r)if(s.type!==zi.FREE_TEXT)switch(s.value.toLowerCase()){case"h":case"hh":i+=ns(e.hours,s.value.length),e.hours=0;break;case"[hh]":i+=ns(e.hours,s.value.length-2),e.hours=0;break;case"m":case"mm":i+=ns(e.minutes,s.value.length),e.minutes=0;break;case"[mm]":i+=ns(e.minutes+60*e.hours,s.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":i+=ns(Math.floor(e.seconds),s.value.length);break;default:if(hi.test(s.value)){const t=Math.max(s.value.length-3,0);i+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}else i+=s.value;return i}function as(e,t){const n=Qi(t);if(void 0===n)return;const r=n.tokens;let i="",s=!1;const o=r.some(e=>e.type===zi.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value));for(let a=0;a<r.length;a++){const t=r[a];if(t.type!==zi.FREE_TEXT)switch(t.value.toLowerCase()){case"h":case"hh":s=!0,i+=ns(o?(e.hours+11)%12+1:e.hours,t.value.length);break;case"d":case"dd":i+=ns(e.day,t.value.length);break;case"s":case"ss":i+=ns(Math.floor(e.seconds),t.value.length);break;case"m":case"mm":a+1<r.length&&r[a+1].value.startsWith(":")&&(s=!0),i+=ns(s?e.minutes:e.month,t.value.length),s=!0;break;case"yy":i+=ns(e.year%100,t.value.length);break;case"yyyy":i+=e.year;break;case"am/pm":case"a/p":{const[n,r]=t.value.split("/");i+=e.hours<12?n:r;break}default:if(hi.test(t.value)){const n=t.value.length-3;i+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,n))/Math.pow(10,n)}`;continue}return}else i+=t.value}return i}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["FORMAT"]="FORMAT",e["FREE_TEXT"]="FREE_TEXT"})(zi||(zi={})),function(e){e["DATE"]="DATE",e["NUMBER"]="NUMBER",e["STRING"]="STRING"}(Ki||(Ki={}));const ls="length",cs=e=>parseInt(e,16),us=e=>parseInt(e,10),hs=e=>(e+"").replace(/\-/g,""),ds=(e,t,n)=>e["substr"](t,n),ms=e=>e["codePointAt"](0)-65;function fs(e){return 25===hs(e)[ls]?cs(ds(hs(e),cs("12"),ms("F")))/(cs(ds(hs(e),ms("C"),ms("Y")>>4))||1+(~~![][ls]<<3)):0}function ps(e){if(e=(e+"").replace(/\-/g,""),e[ls]!==ms("Z"))return!1;let t=0;return[[0,ms("G")+1],[ms("H"),ms("H")-1],[ms("G")+ms("H"),ms("G")]].reduce((n,[r,i],s)=>(n|=(us(""+us(cs(ds(e,t+r-(0===s?0:2),i+(s?2:0)))+(cs(ds(e,t+r+i,2))+[]).padStart(2,"0")))%97||2)>>1,t+=2,n),ms("A"))===[]+1>>1}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const gs={invalid:()=>"The license key for HyperFormula is invalid.",expired:({keyValidityDate:e})=>`The license key for HyperFormula expired on ${e}, and is not valid for the installed version.`,missing:()=>"The license key for HyperFormula is missing."};let ys=!1;function ws(e){const t={template:"missing",vars:{}};if("gpl-v3"===e||"internal-use-in-handsontable"===e)t.template="valid";else if("string"===typeof e&&ps(e)){const[n,r,i]="10/04/2024".split("/"),s=Math.floor(new Date(`${r}/${n}/${i}`).getTime()/864e5),o=fs(e);t.vars.keyValidityDate=bs(new Date(864e5*(o+1))),t.template=s>o?"expired":"valid"}else""!==e&&(t.template="invalid");return ys||"valid"===t.template||(console.warn(gs[t.template](t.vars)),ys=!0),t.template}function bs(e){const t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=t[e.getMonth()],r=e.getDate(),i=e.getFullYear();return`${n} ${r}, ${i}`}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var _s,vs,Ss;function Es(e){return e.startsWith("=")}function Cs(e){const t=e.toLowerCase();return"true"===t||"false"===t}function Ts(e,t){const n=e.toUpperCase(),r=/#[A-Za-z0-9\/]+[?!]?/;return r.test(n)&&Object.prototype.hasOwnProperty.call(t,n)}(function(e){class t{constructor(e){this.value=e,this.value=Ct(this.value,Yr(St(this.value)))}}e.Number=t;class n{constructor(e){this.value=e}}e.String=n;class r{constructor(e){this.value=e}}e.Boolean=r;class i{static getSingletonInstance(){return i.instance||(i.instance=new i),i.instance}}e.Empty=i;class s{constructor(e){this.formula=e}}e.Formula=s;class o{constructor(e,t){this.value=new lr(e,t)}}e.Error=o})(_s||(_s={}));class Ms{constructor(e,t,n){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=n}parse(e){if(void 0===e||null===e)return _s.Empty.getSingletonInstance();if("number"===typeof e)return Fr(e)?new _s.Error(Vn.NUM,Re.ValueLarge):new _s.Number(e);if("boolean"===typeof e)return new _s.Boolean(e);if(e instanceof Date){const t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}),n=Ui({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3}),r=t+n;return r<0?new _s.Error(Vn.NUM,Re.DateBounds):r%1===0?new _s.Number(new Tt(r,"Date()")):r<1?new _s.Number(new Rt(r,"Date()")):new _s.Number(new Ot(r,"Date()"))}if("string"===typeof e){if(Cs(e))return new _s.Boolean("true"===e.toLowerCase());if(Es(e))return new _s.Formula(e);if(Ts(e,this.config.errorMapping))return new _s.Error(this.config.errorMapping[e.toUpperCase()]);{let t,n=e.trim(),r=0;if(n.endsWith("%"))r=1,n=n.slice(0,n.length-1);else{const e=this.currencyMatcher(n);void 0!==e&&(r=2,[t,n]=e)}const i=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==i){let e;return e=1===r?new Nt(i/100):2===r?new Mt(i,t):i,new _s.Number(e)}const s=this.dateHelper.dateStringToDateNumber(n);return void 0!==s?new _s.Number(s):new _s.String(e.startsWith("'")?e.slice(1):e)}}throw new rn(e)}currencyMatcher(e){for(const t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length)];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length)]}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e[e["COPY"]=0]="COPY",e[e["CUT"]=1]="CUT"})(vs||(vs={})),function(e){e[e["VALUE"]=0]="VALUE",e[e["EMPTY"]=1]="EMPTY",e[e["FORMULA"]=2]="FORMULA",e[e["PARSING_ERROR"]=3]="PARSING_ERROR"}(Ss||(Ss={}));class Rs{constructor(e,t,n,r,i){this.sourceLeftCorner=e,this.width=t,this.height=n,this.type=r,this.content=i}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n)yield[mr(e.sheet,e.col+n,e.row+t),this.content[t][n]]}}class Os{constructor(e,t,n){this.dependencyGraph=t,this.operations=n,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}cut(e,t,n){this.clipboard=new Rs(e,t,n,vs.CUT)}copy(e,t,n){const r=[];for(let i=0;i<n;++i){r[i]=[];for(let n=0;n<t;++n){const t=this.operations.getClipboardCell(mr(e.sheet,e.col+n,e.row+i));r[i].push(t)}}this.clipboard=new Rs(e,t,n,vs.COPY,r)}abortCut(){this.clipboard&&this.clipboard.type===vs.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(fr(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new Xt("a valid target address.");const t=Er.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new Gt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Error("It is not possible to paste onto an array")}isCutClipboard(){return void 0!==this.clipboard&&this.clipboard.type===vs.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===vs.COPY}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ns{constructor(e,t,n,r){this.displayName=e,this.address=t,this.added=n,this.options=r}normalizeExpressionName(){return this.displayName.toLowerCase()}copy(){return new Ns(this.displayName,this.address,this.added,this.options)}}class As{constructor(){this.mapping=new Map}has(e){return this.mapping.has(this.normalizeExpressionName(e))}isNameAvailable(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);return!(n&&n.added)}add(e){this.mapping.set(e.normalizeExpressionName(),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}getExisting(e){const t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}remove(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&(n.added=!1)}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}normalizeExpressionName(e){return e.toLowerCase()}}class Ls{constructor(){this.mapping=new Map}add(e){this.mapping.set(this.normalizeExpressionName(e.displayName),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}has(e){return this.mapping.has(this.normalizeExpressionName(e))}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}isNameAvailable(e){const t=this.normalizeExpressionName(e);return!this.mapping.has(t)}remove(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&this.mapping.delete(t)}normalizeExpressionName(e){return e.toLowerCase()}}class Is{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new As,this.worksheetStores=new Map,this.addressCache=new Map}isNameAvailable(e,t){var n,r;return void 0===t?this.workbookStore.isNameAvailable(e):null===(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.isNameAvailable(e))||void 0===r||r}namedExpressionInAddress(e){const t=this.addressCache.get(e);return t&&t.added?t:void 0}namedExpressionForScope(e,t){var n;return void 0===t?this.workbookStore.getExisting(e):null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e)}nearestNamedExpression(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e))&&void 0!==r?r:this.workbookStore.getExisting(e)}isExpressionInScope(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.has(e))&&void 0!==r&&r}isNameValid(e){const t=new RegExp(`^${w}$`),n=new RegExp(`^${v}$`),r=new RegExp(`^${E}$`);return!t.test(e)&&!n.test(e)&&r.test(e)}addNamedExpression(e,t,n){const r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);let i=r.get(e);return void 0!==i?(i.added=!0,i.displayName=e,i.options=n):(i=new Ns(e,this.nextAddress(),!0,n),r.add(i)),this.addressCache.set(i.address.row,i),i}restoreNamedExpression(e,t){const n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,n.add(e),this.addressCache.set(e.address.row,e),e}namedExpressionOrPlaceholder(e,t){var n;return null!==(n=this.worksheetStoreOrCreate(t).get(e))&&void 0!==n?n:this.workbookNamedExpressionOrPlaceholder(e)}workbookNamedExpressionOrPlaceholder(e){let t=this.workbookStore.get(e);return void 0===t&&(t=new Ns(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}remove(e,t){let n;n=void 0===t?this.workbookStore:this.worksheetStore(t);const r=null===n||void 0===n?void 0:n.get(e);if(void 0===n||void 0===r||!r.added)throw Error("Named expression does not exist");n.remove(e),n instanceof Ls&&0===n.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(r.address.row)}getAllNamedExpressionsNamesInScope(e){return this.getAllNamedExpressions().filter(({scope:t})=>t===e).map(e=>e.expression.displayName)}getAllNamedExpressionsNames(){return this.getAllNamedExpressions().map(e=>e.expression.displayName)}getAllNamedExpressions(){const e=[];return this.workbookStore.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:void 0})}),this.worksheetStores.forEach((t,n)=>{t.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:n})})}),e}getAllNamedExpressionsForScope(e){var t,n;return void 0===e?this.workbookStore.getAllNamedExpressions():null!==(n=null===(t=this.worksheetStores.get(e))||void 0===t?void 0:t.getAllNamedExpressions())&&void 0!==n?n:[]}worksheetStoreOrCreate(e){let t=this.worksheetStores.get(e);return t||(t=new Ls,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return mr(Is.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}Is.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;const xs=e=>{switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:case W.ERROR_WITH_RAW_INPUT:return!1;case W.CELL_REFERENCE:return!e.reference.isAbsolute();case W.CELL_RANGE:case W.COLUMN_RANGE:case W.ROW_RANGE:return!e.start.isAbsolute();case W.NAMED_EXPRESSION:return!1;case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:return xs(e.value);case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:return xs(e.left)||xs(e.right);case W.PARENTHESIS:return xs(e.expression);case W.FUNCTION_CALL:return e.args.some(e=>xs(e));case W.ARRAY:return e.args.some(e=>e.some(e=>xs(e)))}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ks{performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[r,i]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService)),s=t.rememberNewAst(r);n.setFormula(s),n.setAddress(i)}}transformSingleAst(e,t){const n=this.transformAst(e,t),r=this.fixNodeAddress(t);return[n,r]}transformAst(e,t){switch(e.type){case W.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case W.CELL_RANGE:return this.transformCellRangeAst(e,t);case W.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case W.ROW_RANGE:return this.transformRowRangeAst(e,t);case W.EMPTY:case W.ERROR:case W.NUMBER:case W.NAMED_EXPRESSION:case W.ERROR_WITH_RAW_INPUT:case W.STRING:return e;case W.PERCENT_OP:case W.MINUS_UNARY_OP:case W.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case W.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map(e=>this.transformAst(e,t))});case W.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case W.ARRAY:return Object.assign(Object.assign({},e),{args:e.args.map(e=>e.map(e=>this.transformAst(e,t)))});default:return Object.assign(Object.assign({},e),{left:this.transformAst(e.left,t),right:this.transformAst(e.right,t)})}}transformCellReferenceAst(e,t){const n=this.transformCellAddress(e.reference,t);return n instanceof l?Object.assign(Object.assign({},e),{reference:n}):n===Vn.REF?we(new lr(Vn.REF)):e}transformCellRangeAst(e,t){const n=this.transformCellRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Vn.REF?we(new lr(Vn.REF)):e}transformColumnRangeAst(e,t){const n=this.transformColumnRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Vn.REF?we(new lr(Vn.REF)):e}transformRowRangeAst(e,t){const n=this.transformRowRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Vn.REF?we(new lr(Vn.REF)):e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ds extends ks{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!1}transformRowRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){throw Error("Not implemented")}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformCellAddress(e,t){const n=wr(e,t);if(n!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;const r=e.toSimpleColumnAddress(t);if(n===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return this.columnsSpan.columnStart<=r.col&&e.shiftedByColumns(this.columnsSpan.numberOfColumns);if(t.sheet===this.columnsSpan.sheet&&n!==this.columnsSpan.sheet)return!e.isColumnAbsolute()&&(!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns));if(e.isColumnAbsolute())return!(e.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(this.columnsSpan.numberOfColumns);{const n=e.toSimpleColumnAddress(t);return n.col<this.columnsSpan.columnStart?!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns):t.col<this.columnsSpan.columnStart&&e.shiftedByColumns(this.columnsSpan.numberOfColumns)}}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col+this.columnsSpan.numberOfColumns}):e}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return r===Vn.REF||i===Vn.REF?Vn.REF:!(!r&&!i)&&[r||e,i||t]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Hs extends ks{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!1}transformColumnRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){throw Error("Not implemented")}transformCellAddress(e,t){const n=wr(e,t);if(n!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;const r=e.toSimpleRowAddress(t);return n===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet?this.rowsSpan.rowStart<=r.row&&e.shiftedByRows(this.rowsSpan.numberOfRows):t.sheet===this.rowsSpan.sheet&&n!==this.rowsSpan.sheet?!e.isRowAbsolute()&&(!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows)):e.isRowAbsolute()?!(e.row<this.rowsSpan.rowStart)&&e.shiftedByRows(this.rowsSpan.numberOfRows):r.row<this.rowsSpan.rowStart?!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):t.row<this.rowsSpan.rowStart&&e.shiftedByRows(this.rowsSpan.numberOfRows)}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row+this.rowsSpan.numberOfRows}):e}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return r===Vn.REF||i===Vn.REF?Vn.REF:!(!r&&!i)&&[r||e,i||t]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ps extends ks{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!e.isInvalid(t)&&Vn.REF}transformCellRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Vn.REF}transformColumnRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Vn.REF}transformRowRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Vn.REF}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class js extends ks{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r,this.dependentFormulaTransformer=new Fs(e,t,n,r)}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}transformSingleAst(e,t){if(this.sourceRange.addressInRange(t)){const n=this.transformAst(e,t);return[n,this.fixNodeAddress(t)]}return this.dependentFormulaTransformer.transformSingleAst(e,t)}fixNodeAddress(e){return mr(this.toSheet,e.col+this.toRight,e.row+this.toBottom)}transformCellAddress(e,t){return this.transformAddress(e,t)}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformAddress(e,t){const n=this.sourceRange;if(e instanceof l){const r=e.toSimpleCellAddress(t);if(n.addressInRange(r))return e.shiftAbsoluteDimensions(this.toRight,this.toBottom)}return e.shiftRelativeDimensions(-this.toRight,-this.toBottom)}transformRange(e,t,n){const r=this.sourceRange;if(e instanceof l&&t instanceof l){const i=e.toSimpleCellAddress(n),s=t.toSimpleCellAddress(n);if(r.addressInRange(i)&&r.addressInRange(s))return[e.shiftAbsoluteDimensions(this.toRight,this.toBottom),t.shiftAbsoluteDimensions(this.toRight,this.toBottom)]}return[e.shiftRelativeDimensions(-this.toRight,-this.toBottom),t.shiftRelativeDimensions(-this.toRight,-this.toBottom)]}}class Fs extends ks{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!this.shouldMove(e,t)&&e.moved(this.toSheet,this.toRight,this.toBottom)}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}shouldMove(e,t){return e instanceof l?this.sourceRange.addressInRange(e.toSimpleCellAddress(t)):e instanceof a?this.sourceRange.rowInRange(e.toSimpleRowAddress(t))&&!this.sourceRange.isFinite():this.sourceRange.columnInRange(e.toSimpleColumnAddress(t))&&!this.sourceRange.isFinite()}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return!(!r||!i)&&[r,i]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ys extends ks{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!0}transformRowRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){throw Error("Not implemented")}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformCellAddress(e,t){const n=wr(e,t);if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet!==n)return!1;if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet===n){const n=e.toSimpleColumnAddress(t);if(n.col<this.columnsSpan.columnStart)return!1;if(n.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet!==n){if(e.isColumnAbsolute())return!1;if(t.col<this.columnsSpan.columnStart)return!1;if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet===n)if(e.isColumnAbsolute()){if(e.col<this.columnsSpan.columnStart)return!1;if(e.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}else{const n=e.toSimpleColumnAddress(t);if(n.col<this.columnsSpan.columnStart){if(t.col<this.columnsSpan.columnStart)return!1;if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}else if(n.col>this.columnsSpan.columnEnd){if(t.col<this.columnsSpan.columnStart)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);if(t.col>this.columnsSpan.columnEnd)return!1}}return Vn.REF}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col-this.columnsSpan.numberOfColumns}):e}transformRange(e,t,n){const r=wr(e,n);let i=e,s=t;if(this.columnsSpan.sheet===r){const r=e.toSimpleColumnAddress(n),o=t.toSimpleColumnAddress(n);if(this.columnsSpan.columnStart<=r.col&&this.columnsSpan.columnEnd>=o.col)return Vn.REF;r.col>=this.columnsSpan.columnStart&&r.col<=this.columnsSpan.columnEnd&&(i=e.shiftedByColumns(this.columnsSpan.columnEnd-r.col+1)),o.col>=this.columnsSpan.columnStart&&o.col<=this.columnsSpan.columnEnd&&(s=t.shiftedByColumns(-(o.col-this.columnsSpan.columnStart+1)))}const o=this.transformCellAddress(i,n),a=this.transformCellAddress(s,n);if(!1===o&&!1===a)return[i,s];if(o===Vn.REF||a===Vn.REF)throw Error("Cannot happen");return[o||i,a||s]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Us extends ks{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!0}transformColumnRangeAst(e,t){return e}transformCellAddress(e,t){const n=wr(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==n)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===n){const n=e.toSimpleRowAddress(t);if(n.row<this.rowsSpan.rowStart)return!1;if(n.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==n){if(e.isRowAbsolute())return!1;if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===n)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{const n=e.toSimpleRowAddress(t);if(n.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(n.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);if(t.row>this.rowsSpan.rowEnd)return!1}}return Vn.REF}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){throw Error("Not implemented")}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row-this.rowsSpan.numberOfRows}):e}transformRange(e,t,n){const r=wr(e,n);let i=e,s=t;if(this.rowsSpan.sheet===r){const r=e.toSimpleRowAddress(n),o=t.toSimpleRowAddress(n);if(this.rowsSpan.rowStart<=r.row&&this.rowsSpan.rowEnd>=o.row)return Vn.REF;r.row>=this.rowsSpan.rowStart&&r.row<=this.rowsSpan.rowEnd&&(i=e.shiftedByRows(this.rowsSpan.rowEnd-r.row+1)),o.row>=this.rowsSpan.rowStart&&o.row<=this.rowsSpan.rowEnd&&(s=t.shiftedByRows(-(o.row-this.rowsSpan.rowStart+1)))}const o=this.transformCellAddress(i,n),a=this.transformCellAddress(s,n);return!1===o&&!1===a?[i,s]:o===Vn.REF||a===Vn.REF?Vn.REF:[o||i,a||s]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Vs extends ks{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[t]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService));n.setFormula(t)}}fixNodeAddress(e){return e}transformCellAddress(e,t){return this.transformAddress(e)}transformCellRange(e,t,n){return this.transformAddress(e)}transformColumnRange(e,t,n){return this.transformAddress(e)}transformRowRange(e,t,n){return this.transformAddress(e)}transformAddress(e){return e.sheet===this.sheet&&Vn.REF}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function Bs(e){if(!Array.isArray(e))throw new Xt("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new Xt("an array of arrays.")}function Ws(e){let t=0,n=0,r=0;for(let s=0;s<e.length;s++){let i=0;for(let t=0;t<e[s].length;t++){const n=e[s][t];void 0!==n&&null!==n&&(i=t+1,++r)}t=Math.max(t,i),i>0&&(n=s+1)}const i=t*n;return{height:n,width:t,fill:0===i?0:r/i}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Gs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return qs(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>jt.fromNumberOfRows(this.sheet,e[0],e[1]))}}class zs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Js(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>jt.fromNumberOfRows(this.sheet,e[0],e[1]))}}class Ks{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Js(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>Ft.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class Xs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return qs(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>Ft.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class $s{constructor(e,t,n,r,i,s,o,a,l){this.dependencyGraph=t,this.columnSearch=n,this.cellContentParser=r,this.parser=i,this.stats=s,this.lazilyTransformingAstService=o,this.namedExpressions=a,this.arraySizePredictor=l,this.changes=Pt.empty(),this.allocateNamedExpressionAddressSpace(),this.maxColumns=e.maxColumns,this.maxRows=e.maxRows}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}removeRows(e){const t=[];for(const n of e.rowsSpans()){const e=this.doRemoveRows(n);e&&t.push(e)}return t}addRows(e){for(const t of e.rowsSpans())this.doAddRows(t)}addColumns(e){for(const t of e.columnsSpans())this.doAddColumns(t)}removeColumns(e){const t=[];for(const n of e.columnsSpans()){const e=this.doRemoveColumns(n);e&&t.push(e)}return t}removeSheet(e){this.dependencyGraph.removeSheet(e);let t=0;this.stats.measure(It.TRANSFORM_ASTS,()=>{const n=new Vs(e);n.performEagerTransformations(this.dependencyGraph,this.parser),t=this.lazilyTransformingAstService.addTransformation(n)}),this.sheetMapping.removeSheet(e),this.columnSearch.removeSheet(e);const n=this.namedExpressions.getAllNamedExpressionsForScope(e).map(t=>this.removeNamedExpression(t.normalizeExpressionName(),e));return{version:t,scopedNamedExpressions:n}}removeSheetByName(e){const t=this.sheetMapping.fetch(e);return this.removeSheet(t)}clearSheet(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}addSheet(e){const t=this.sheetMapping.addSheet(e),n=[];return this.dependencyGraph.addressMapping.autoAddSheet(t,Ws(n)),this.sheetMapping.fetchDisplayName(t)}renameSheet(e,t){return this.sheetMapping.renameSheet(e,t)}moveRows(e,t,n,r){const i=jt.fromNumberOfRows(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(i),r<t&&(t+=n);const s=mr(e,0,t),o=mr(e,0,r);this.moveCells(s,Number.POSITIVE_INFINITY,n,o);const a=jt.fromNumberOfRows(e,t,n);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,n,r){const i=Ft.fromNumberOfColumns(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(i),r<t&&(t+=n);const s=mr(e,t,0),o=mr(e,r,0);this.moveCells(s,n,Number.POSITIVE_INFINITY,o);const a=Ft.fromNumberOfColumns(e,t,n);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,n,r){this.ensureItIsPossibleToMoveCells(e,t,n,r);const i=Er.spanFrom(e,t,n),s=Er.spanFrom(r,t,n),o=r.col-e.col,a=r.row-e.row,l=r.sheet,c=this.getRangeClipboardCells(s),u=this.dependencyGraph.rawValuesFromRange(s);this.columnSearch.removeValues(u);const h=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.moveValues(h,o,a,l);let d=0;this.stats.measure(It.TRANSFORM_ASTS,()=>{const e=new js(i,o,a,l);e.performEagerTransformations(this.dependencyGraph,this.parser),d=this.lazilyTransformingAstService.addTransformation(e)}),this.dependencyGraph.moveCells(i,o,a,l);const m=this.updateNamedExpressionsForMovedCells(e,t,n,r);return{version:d,overwrittenCellsData:c,addedGlobalNamedExpressions:m}}setRowOrder(e,t){const n=[];let r=[];for(const[i,s]of t)if(i!==s){const t=Er.spanFrom({sheet:e,col:0,row:i},1/0,1),o=this.getRangeClipboardCells(t);r=r.concat(o),n.push(o.map(([{sheet:e,col:t},n])=>[{sheet:e,col:t,row:s},n]))}return n.forEach(t=>this.restoreClipboardCells(e,t.values())),r}setColumnOrder(e,t){const n=[];let r=[];for(const[i,s]of t)if(i!==s){const t=Er.spanFrom({sheet:e,col:i,row:0},1,1/0),o=this.getRangeClipboardCells(t);r=r.concat(o),n.push(o.map(([{sheet:e,col:t,row:n},r])=>[{sheet:e,col:s,row:n},r]))}return n.forEach(t=>this.restoreClipboardCells(e,t.values())),r}addNamedExpression(e,t,n,r){const i=this.namedExpressions.addNamedExpression(e,n,r);this.storeNamedExpressionInCell(i.address,t),this.adjustNamedExpressionEdges(i,e,n)}restoreNamedExpression(e,t,n){const r=e.displayName;this.restoreCell(e.address,t);const i=this.namedExpressions.restoreNamedExpression(e,n);this.adjustNamedExpressionEdges(i,r,n)}changeNamedExpressionExpression(e,t,n,r){const i=this.namedExpressions.namedExpressionForScope(e,n);if(!i)throw new Qt(e);const s=i.copy();i.options=r;const o=this.getClipboardCell(i.address);return this.storeNamedExpressionInCell(i.address,t),[s,o]}removeNamedExpression(e,t){const n=this.namedExpressions.namedExpressionForScope(e,t);if(!n)throw new Qt(e);this.namedExpressions.remove(n.displayName,t);const r=this.getClipboardCell(n.address);if(void 0!==t){const t=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(n.address,t.address)}else this.dependencyGraph.setCellEmpty(n.address);return[n,r]}ensureItIsPossibleToMoveCells(e,t,n,r){if(fr(e)||!(Qs(t)&&Qs(n)||Zs(e,t,n))||fr(r)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(r.sheet))throw new Xt("a valid range of cells to move.");const i=Er.spanFrom(e,t,n),s=Er.spanFrom(r,t,n);if(s.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new Gt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(i))throw new yn;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(s))throw new wn}restoreClipboardCells(e,t){const n=[];for(const[r,i]of t)if(this.restoreCell(r,i),i.type===Ss.FORMULA){const{dependencies:t}=this.parser.fetchCachedResult(i.hash);n.push(...this.updateNamedExpressionsForTargetAddress(e,r,t))}return n}restoreCell(e,t){switch(t.type){case Ss.VALUE:this.setValueToCell(t,e);break;case Ss.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case Ss.EMPTY:this.setCellEmpty(e);break;case Ss.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e);break}}getOldContent(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof Xn)return[e,{type:Ss.EMPTY}];if(t instanceof $n)return[e,Object.assign({type:Ss.VALUE},t.getValues())];if(t instanceof Mn)return[t.getAddress(this.lazilyTransformingAstService),{type:Ss.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof qn)return[e,{type:Ss.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors}];throw Error("Trying to copy unsupported type")}getClipboardCell(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof Xn)return{type:Ss.EMPTY};if(t instanceof $n)return Object.assign({type:Ss.VALUE},t.getValues());if(t instanceof Rn){const n=t.getArrayCellValue(e);return n===vt?{type:Ss.EMPTY}:{type:Ss.VALUE,parsedValue:n,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof On)return{type:Ss.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof qn)return{type:Ss.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}getSheetClipboardCells(e){const t=this.dependencyGraph.getSheetHeight(e),n=this.dependencyGraph.getSheetWidth(e),r=new Array(t);for(let i=0;i<t;i++){r[i]=new Array(n);for(let t=0;t<n;t++){const n=mr(e,t,i);r[i][t]=this.getClipboardCell(n)}}return r}getRangeClipboardCells(e){const t=[];for(const n of e.addresses(this.dependencyGraph))t.push([n,this.getClipboardCell(n)]);return t}setCellContent(e,t){const n=this.cellContentParser.parse(t),r=this.getOldContent(e);if(n instanceof _s.Formula){const t=this.parser.parse(n.formula,e),{ast:r,errors:s}=t;if(s.length>0)this.setParsingErrorToCell(n.formula,s,e);else try{const n=this.arraySizePredictor.checkArraySize(r,e);if(n.width<=0||n.height<=0)throw Error("Incorrect array size");this.setFormulaToCell(e,n,t)}catch(i){if(!i.message)throw i;const t={type:B.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(n.formula,[t],e)}}else n instanceof _s.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e);return r}setSheetContent(e,t){this.clearSheet(e);for(let n=0;n<t.length;n++)for(let r=0;r<t[n].length;r++){const i=mr(e,r,n);this.setCellContent(i,t[n][r])}}setParsingErrorToCell(e,t,n){const r=this.dependencyGraph.getCellValue(n),i=new qn(t,e),s=this.dependencyGraph.setParsingErrorToCell(n,i);this.columnSearch.remove(St(r),n),this.columnSearch.applyChanges(s.getChanges()),this.changes.addAll(s),this.changes.addChange(i.getCellValue(),n)}setFormulaToCell(e,t,{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:s}){const o=this.dependencyGraph.getCellValue(e),a=this.dependencyGraph.setFormulaToCell(e,n,bt(s,e),t,r,i);this.columnSearch.remove(St(o),e),this.columnSearch.applyChanges(a.getChanges()),this.changes.addAll(a)}setValueToCell(e,t){const n=this.dependencyGraph.getCellValue(t),r=this.dependencyGraph.setValueToCell(t,e);this.columnSearch.change(St(n),St(e.parsedValue),t),this.columnSearch.applyChanges(r.getChanges().filter(e=>!br(e.address,t))),this.changes.addAll(r),this.changes.addChange(e.parsedValue,t)}setCellEmpty(e){if(this.dependencyGraph.isArrayInternalCell(e))return;const t=this.dependencyGraph.getCellValue(e),n=this.dependencyGraph.setCellEmpty(e);this.columnSearch.remove(St(t),e),this.columnSearch.applyChanges(n.getChanges()),this.changes.addAll(n),this.changes.addChange(vt,e)}setFormulaToCellFromCache(e,t){const{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:s}=this.parser.fetchCachedResult(e),o=bt(s,t),[a]=new Ps(t.sheet).transformSingleAst(n,t);this.parser.rememberNewAst(a);const l=_t(o),c=this.arraySizePredictor.checkArraySize(n,t);this.dependencyGraph.setFormulaToCell(t,a,l,c,r,i)}rowEffectivelyNotInSheet(e,t){const n=this.dependencyGraph.addressMapping.getHeight(t);return e>=n}getAndClearContentChanges(){const e=this.changes;return this.changes=Pt.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations()}doRemoveRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const t=[];for(const[s]of this.dependencyGraph.entriesFromRowsSpan(e))t.push({address:s,cellType:this.getClipboardCell(s)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(r.getChanges());let i=0;return this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Us(e);t.performEagerTransformations(this.dependencyGraph,this.parser),i=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(n),{version:i,removedCells:t,rowFrom:e.rowStart,rowCount:e.numberOfRows}}doRemoveColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const t=[];for(const[s]of this.dependencyGraph.entriesFromColumnsSpan(e))t.push({address:s,cellType:this.getClipboardCell(s)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(r.getChanges()),this.columnSearch.removeColumns(e);let i=0;return this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Ys(e);t.performEagerTransformations(this.dependencyGraph,this.parser),i=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(n),{version:i,removedCells:t,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}doAddRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const{affectedArrays:t}=this.dependencyGraph.addRows(e);this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Hs(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}rewriteAffectedArrays(e){for(const t of e.values()){if(t.array.size.isRef)continue;const e=t.getFormula(this.lazilyTransformingAstService),n=t.getAddress(this.lazilyTransformingAstService),r=this.parser.computeHashFromAst(e);this.setFormulaToCellFromCache(r,n)}}doAddColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const{affectedArrays:t,contentChanges:n}=this.dependencyGraph.addColumns(e);this.columnSearch.addColumns(e),this.columnSearch.applyChanges(n.getChanges()),this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Ds(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}columnEffectivelyNotInSheet(e,t){const n=this.dependencyGraph.addressMapping.getWidth(t);return e>=n}adjustNamedExpressionEdges(e,t,n){if(void 0===n)return;const{vertex:r,id:i}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),s=null!==i&&void 0!==i?i:this.dependencyGraph.graph.getNodeId(r),o=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:a,id:l}=this.dependencyGraph.fetchCellOrCreateEmpty(o.address),c=null!==l&&void 0!==l?l:this.dependencyGraph.graph.getNodeId(a);for(const u of this.dependencyGraph.graph.adjacentNodes(a))if(u instanceof On&&u.getAddress(this.lazilyTransformingAstService).sheet===n){const t=u.getFormula(this.lazilyTransformingAstService),n=u.getAddress(this.lazilyTransformingAstService),{dependencies:r}=this.parser.fetchCachedResultForAst(t);for(const i of bt(r,n))i instanceof wt&&i.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdge(c,u),this.dependencyGraph.graph.addEdge(s,u))}}storeNamedExpressionInCell(e,t){const n=this.cellContentParser.parse(t);if(n instanceof _s.Formula){const t=this.parser.parse(n.formula,mr(-1,0,0));if(xs(t.ast))throw new bn;const{ast:r,hasVolatileFunction:i,hasStructuralChangeFunction:s,dependencies:o}=t;this.dependencyGraph.setFormulaToCell(e,r,bt(o,e),ei.scalar(),i,s)}else n instanceof _s.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,n,r){if(e.sheet===r.sheet)return[];const i=[],s=Er.spanFrom(r,t,n);for(const o of s.addresses(this.dependencyGraph)){const t=this.addressMapping.fetchCell(o);if(t instanceof On&&o.sheet!==e.sheet){const n=t.getFormula(this.lazilyTransformingAstService),{dependencies:r}=this.parser.fetchCachedResultForAst(n);i.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,o,r))}}return i}updateNamedExpressionsForTargetAddress(e,t,n){if(e===t.sheet)return[];const r=[],i=this.addressMapping.fetchCell(t);for(const s of bt(n,t)){if(!(s instanceof wt))continue;const n=s.name,o=this.dependencyGraph.fetchNamedExpressionVertex(n,e).vertex,a=this.namedExpressions.isExpressionInScope(n,t.sheet),l=a?this.dependencyGraph.fetchNamedExpressionVertex(n,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(n,o,r);l!==o&&(this.dependencyGraph.graph.removeEdgeIfExists(o,i),this.dependencyGraph.graph.addEdge(l,i))}return r}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheet(Is.SHEET_FOR_WORKBOOK_EXPRESSIONS,new Jn(0,0))}copyOrFetchGlobalNamedExpressionVertex(e,t,n){let r=this.namedExpressions.namedExpressionForScope(e);if(void 0===r)if(r=this.namedExpressions.addNamedExpression(e),n.push(r.normalizeExpressionName()),t instanceof On){const e=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService)),{ast:n,hasVolatileFunction:i,hasStructuralChangeFunction:s,dependencies:o}=e;this.dependencyGraph.setFormulaToCell(r.address,n,bt(o,r.address),ei.scalar(),i,s)}else t instanceof Xn?this.setCellEmpty(r.address):t instanceof $n&&this.setValueToCell(t.getValues(),r.address);return this.dependencyGraph.fetchCellOrCreateEmpty(r.address).vertex}}function qs(e){if(e.length<=1)return e;const t=[...e].sort(([e],[t])=>e-t),n=t.reduce((e,[t,n])=>{const r=e[e.length-1],i=r[0]+r[1];return t<=i?r[1]+=Math.max(0,n-(i-t)):e.push([t,n]),e},[t[0]]);let r=0;for(let i=0;i<n.length;++i)n[i][0]-=r,r+=n[i][1];return n}function Js(e){if(e.length<=1)return e;const t=[...e].sort(([e],[t])=>e-t),n=t.reduce((e,[t,n])=>{const r=e[e.length-1];return t===r[0]?r[1]=Math.max(r[1],n):e.push([t,n]),e},[t[0]]);let r=0;for(let i=0;i<n.length;++i)n[i][0]+=r,r+=n[i][1];return n}function Qs(e){return Number.isInteger(e)&&e>0}function Zs(e,t,n){return 0===e.row&&Qs(t)&&n===Number.POSITIVE_INFINITY||0===e.col&&Qs(n)&&t===Number.POSITIVE_INFINITY}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class eo{}class to extends eo{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}}class no extends eo{constructor(e,t,n,r,i,s,o){super(),this.sourceLeftCorner=e,this.width=t,this.height=n,this.destinationLeftCorner=r,this.overwrittenCellsData=i,this.addedGlobalNamedExpressions=s,this.version=o}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}}class ro extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class io extends eo{constructor(e,t,n){super(),this.sheetId=e,this.rowMapping=t,this.oldContent=n}doUndo(e){e.undoSetRowOrder(this)}doRedo(e){e.redoSetRowOrder(this)}}class so extends eo{constructor(e,t,n){super(),this.sheetId=e,this.columnMapping=t,this.oldContent=n}doUndo(e){e.undoSetColumnOrder(this)}doRedo(e){e.redoSetColumnOrder(this)}}class oo extends eo{constructor(e,t,n){super(),this.sheetId=e,this.oldSheetContent=t,this.newSheetContent=n}doUndo(e){e.undoSetSheetContent(this)}doRedo(e){e.redoSetSheetContent(this)}}class ao extends eo{constructor(e,t,n,r,i){super(),this.sheet=e,this.startRow=t,this.numberOfRows=n,this.targetRow=r,this.version=i,this.undoStart=this.startRow<this.targetRow?this.targetRow-this.numberOfRows:this.targetRow,this.undoEnd=this.startRow>this.targetRow?this.startRow+this.numberOfRows:this.startRow}doUndo(e){e.undoMoveRows(this)}doRedo(e){e.redoMoveRows(this)}}class lo extends eo{constructor(e,t,n,r,i){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=n,this.targetColumn=r,this.version=i,this.undoStart=this.startColumn<this.targetColumn?this.targetColumn-this.numberOfColumns:this.targetColumn,this.undoEnd=this.startColumn>this.targetColumn?this.startColumn+this.numberOfColumns:this.startColumn}doUndo(e){e.undoMoveColumns(this)}doRedo(e){e.redoMoveColumns(this)}}class co extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class uo extends eo{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}}class ho extends eo{constructor(e){super(),this.sheetName=e}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class mo extends eo{constructor(e,t,n,r,i){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=n,this.scopedNamedExpressions=r,this.version=i}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class fo extends eo{constructor(e,t,n){super(),this.sheetId=e,this.oldName=t,this.newName=n}doUndo(e){e.undoRenameSheet(this)}doRedo(e){e.redoRenameSheet(this)}}class po extends eo{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class go extends eo{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class yo extends eo{constructor(e,t,n,r){super(),this.targetLeftCorner=e,this.oldContent=t,this.newContent=n,this.addedGlobalNamedExpressions=r}doUndo(e){e.undoPaste(this)}doRedo(e){e.redoPaste(this)}}class wo extends eo{constructor(e,t,n,r){super(),this.name=e,this.newContent=t,this.scope=n,this.options=r}doUndo(e){e.undoAddNamedExpression(this)}doRedo(e){e.redoAddNamedExpression(this)}}class bo extends eo{constructor(e,t,n){super(),this.namedExpression=e,this.content=t,this.scope=n}doUndo(e){e.undoRemoveNamedExpression(this)}doRedo(e){e.redoRemoveNamedExpression(this)}}class _o extends eo{constructor(e,t,n,r,i){super(),this.namedExpression=e,this.newContent=t,this.oldContent=n,this.scope=r,this.options=i}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class vo extends eo{constructor(){super(...arguments),this.operations=[]}add(e){this.operations.push(e)}*reversedOperations(){for(let e=this.operations.length-1;e>=0;e--)yield this.operations[e]}doUndo(e){e.undoBatch(this)}doRedo(e){e.redoBatch(this)}}class So{constructor(e,t){this.operations=t,this.oldData=new Map,this.undoStack=[],this.redoStack=[],this.undoLimit=e.undoLimit}saveOperation(e){void 0!==this.batchUndoEntry?this.batchUndoEntry.add(e):this.addUndoEntry(e)}beginBatchMode(){this.batchUndoEntry=new vo}commitBatchMode(){if(void 0===this.batchUndoEntry)throw Error("Batch mode wasn't started");this.addUndoEntry(this.batchUndoEntry),this.batchUndoEntry=void 0}storeDataForVersion(e,t,n){this.oldData.has(e)||this.oldData.set(e,[]);const r=this.oldData.get(e);r.push([t,n])}clearRedoStack(){this.redoStack=[]}clearUndoStack(){this.undoStack=[]}isUndoStackEmpty(){return 0===this.undoStack.length}isRedoStackEmpty(){return 0===this.redoStack.length}undo(){const e=this.undoStack.pop();if(!e)throw Error("Attempted to undo without operation on stack");this.undoEntry(e),this.redoStack.push(e)}undoBatch(e){for(const t of e.reversedOperations())this.undoEntry(t)}undoRemoveRows(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},rowsRemovals:n}=e;for(let r=n.length-1;r>=0;--r){const e=n[r];this.operations.addRows(new zs(t,[[e.rowFrom,e.rowCount]]));for(const{address:t,cellType:n}of e.removedCells)this.operations.restoreCell(t,n);this.restoreOldDataFromVersion(e.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},columnsRemovals:n}=e;for(let r=n.length-1;r>=0;--r){const e=n[r];this.operations.addColumns(new Ks(t,[[e.columnFrom,e.columnCount]]));for(const{address:t,cellType:n}of e.removedCells)this.operations.restoreCell(t,n);this.restoreOldDataFromVersion(e.version-1)}}undoAddRows(e){const t=e.command.rowsSpans();for(let n=t.length-1;n>=0;--n){const r=t[n];this.operations.removeRows(new Gs(e.command.sheet,[[r.rowStart,r.numberOfRows]]))}}undoAddColumns(e){const t=e.command.columnsSpans();for(let n=t.length-1;n>=0;--n){const r=t[n];this.operations.removeColumns(new Xs(e.command.sheet,[[r.columnStart,r.numberOfColumns]]))}}undoSetCellContents(e){for(const t of e.cellContents){const e=t.address,[n,r]=t.oldContent;br(e,n)||this.operations.setCellEmpty(e),this.operations.restoreCell(n,r)}}undoPaste(e){this.restoreOperationOldContent(e.oldContent);for(const t of e.addedGlobalNamedExpressions)this.operations.removeNamedExpression(t)}undoMoveRows(e){const{sheet:t}=e;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveColumns(e){const{sheet:t}=e;this.operations.moveColumns(t,e.undoStart,e.numberOfColumns,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveCells(e){this.operations.forceApplyPostponedTransformations(),this.operations.moveCells(e.destinationLeftCorner,e.width,e.height,e.sourceLeftCorner),this.restoreOperationOldContent(e.overwrittenCellsData),this.restoreOldDataFromVersion(e.version-1);for(const t of e.addedGlobalNamedExpressions)this.operations.removeNamedExpression(t)}undoAddSheet(e){const{sheetName:t}=e;this.operations.removeSheetByName(t)}undoRemoveSheet(e){this.operations.forceApplyPostponedTransformations();const{oldSheetContent:t,sheetId:n}=e;this.operations.addSheet(e.sheetName);for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}for(const[r,i]of e.scopedNamedExpressions)this.operations.restoreNamedExpression(r,i,n);this.restoreOldDataFromVersion(e.version-1)}undoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.oldName)}undoClearSheet(e){const{oldSheetContent:t,sheetId:n}=e;for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}}undoSetSheetContent(e){const{oldSheetContent:t,sheetId:n}=e;this.operations.clearSheet(n);for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}}undoAddNamedExpression(e){this.operations.removeNamedExpression(e.name,e.scope)}undoRemoveNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.content,e.scope)}undoChangeNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.oldContent,e.scope)}undoSetRowOrder(e){this.restoreOperationOldContent(e.oldContent)}undoSetColumnOrder(e){this.restoreOperationOldContent(e.oldContent)}redo(){const e=this.redoStack.pop();if(!e)throw Error("Attempted to redo without operation on stack");this.redoEntry(e),this.undoStack.push(e)}redoBatch(e){for(const t of e.operations)this.redoEntry(t)}redoRemoveRows(e){this.operations.removeRows(e.command)}redoMoveCells(e){this.operations.moveCells(e.sourceLeftCorner,e.width,e.height,e.destinationLeftCorner)}redoRemoveColumns(e){this.operations.removeColumns(e.command)}redoPaste(e){const{targetLeftCorner:t,newContent:n}=e,r=n.length,i=n[0].length;for(let s=0;s<r;++s)for(let e=0;e<i;++e){const r=mr(t.sheet,t.col+e,t.row+s);this.operations.restoreCell(r,n[s][e])}}redoSetCellContents(e){for(const t of e.cellContents)this.operations.setCellContent(t.address,t.newContent)}redoAddRows(e){this.operations.addRows(e.command)}redoAddColumns(e){this.operations.addColumns(e.command)}redoRemoveSheet(e){this.operations.removeSheetByName(e.sheetName)}redoAddSheet(e){this.operations.addSheet(e.sheetName)}redoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.newName)}redoMoveRows(e){this.operations.moveRows(e.sheet,e.startRow,e.numberOfRows,e.targetRow)}redoMoveColumns(e){this.operations.moveColumns(e.sheet,e.startColumn,e.numberOfColumns,e.targetColumn)}redoClearSheet(e){this.operations.clearSheet(e.sheetId)}redoSetSheetContent(e){const{sheetId:t,newSheetContent:n}=e;this.operations.setSheetContent(t,n)}redoAddNamedExpression(e){this.operations.addNamedExpression(e.name,e.newContent,e.scope,e.options)}redoRemoveNamedExpression(e){this.operations.removeNamedExpression(e.namedExpression.displayName,e.scope)}redoChangeNamedExpression(e){this.operations.changeNamedExpressionExpression(e.namedExpression.displayName,e.newContent,e.scope,e.options)}redoSetRowOrder(e){this.operations.setRowOrder(e.sheetId,e.rowMapping)}redoSetColumnOrder(e){this.operations.setColumnOrder(e.sheetId,e.columnMapping)}addUndoEntry(e){this.undoStack.push(e),this.undoStack.splice(0,Math.max(0,this.undoStack.length-this.undoLimit))}undoEntry(e){e.doUndo(this)}restoreOperationOldContent(e){for(const[t,n]of e)this.operations.restoreCell(t,n)}redoEntry(e){e.doRedo(this)}restoreOldDataFromVersion(e){const t=this.oldData.get(e)||[];for(const n of t){const[e,t]=n;this.operations.setFormulaToCellFromCache(t,e)}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Eo{constructor(e,t,n,r,i,s,o,a,l,c){this.operations=t,this.undoRedo=n,this.clipboardOperations=r,this.dependencyGraph=i,this.columnSearch=s,this.parser=o,this.cellContentParser=a,this.lazilyTransformingAstService=l,this.namedExpressions=c,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}get sheetMapping(){return this.dependencyGraph.sheetMapping}addRows(e,...t){const n=new zs(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(n),this.undoRedo.saveOperation(new ro(n))}removeRows(e,...t){const n=new Gs(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeRows(n);this.undoRedo.saveOperation(new to(n,r))}addColumns(e,...t){const n=new Ks(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(n),this.undoRedo.saveOperation(new co(n))}removeColumns(e,...t){const n=new Xs(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeColumns(n);this.undoRedo.saveOperation(new uo(n,r))}moveCells(e,t,n,r){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const{version:i,overwrittenCellsData:s,addedGlobalNamedExpressions:o}=this.operations.moveCells(e,t,n,r);this.undoRedo.saveOperation(new no(e,t,n,r,s,o,i))}moveRows(e,t,n,r){this.ensureItIsPossibleToMoveRows(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const i=this.operations.moveRows(e,t,n,r);this.undoRedo.saveOperation(new ao(e,t,n,r,i))}moveColumns(e,t,n,r){this.ensureItIsPossibleToMoveColumns(e,t,n,r),this.undoRedo.clearRedoStack();const i=this.operations.moveColumns(e,t,n,r);this.undoRedo.saveOperation(new lo(e,t,n,r,i))}cut(e,t,n){this.clipboardOperations.cut(e,t,n)}ensureItIsPossibleToCopy(e,t,n){if(!Co(t))throw new Xt("width to be positive integer.");if(!Co(n))throw new Xt("height to be positive integer.")}copy(e,t,n){this.ensureItIsPossibleToCopy(e,t,n),this.clipboardOperations.copy(e,t,n)}paste(e){const t=this.clipboardOperations.clipboard;if(void 0===t)throw new tn;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);const n=Er.spanFrom(e,t.width,t.height),r=this.operations.getRangeClipboardCells(n);this.undoRedo.clearRedoStack();const i=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new yo(e,r,t.content,i))}}beginUndoRedoBatchMode(){this.undoRedo.beginBatchMode()}commitUndoRedoBatchMode(){this.undoRedo.commitBatchMode()}isClipboardEmpty(){return void 0===this.clipboardOperations.clipboard}clearClipboard(){this.clipboardOperations.clear()}addSheet(e){void 0!==e&&this.ensureItIsPossibleToAddSheet(e),this.undoRedo.clearRedoStack();const t=this.operations.addSheet(e);return this.undoRedo.saveOperation(new ho(t)),t}removeSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const t=this.sheetMapping.fetchDisplayName(e),n=this.operations.getSheetClipboardCells(e),{version:r,scopedNamedExpressions:i}=this.operations.removeSheet(e);this.undoRedo.saveOperation(new mo(t,e,n,i,r))}renameSheet(e,t){this.ensureItIsPossibleToRenameSheet(e,t);const n=this.operations.renameSheet(e,t);return void 0!==n&&(this.undoRedo.clearRedoStack(),this.undoRedo.saveOperation(new fo(e,n,t))),n}clearSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const t=this.operations.getSheetClipboardCells(e);this.operations.clearSheet(e),this.undoRedo.saveOperation(new po(e,t))}setCellContents(e,t){if(t instanceof Array){for(let r=0;r<t.length;r++)if(!(t[r]instanceof Array))throw new Xt("an array of arrays or a raw cell value.")}else t=[[t]];this.ensureItIsPossibleToChangeCellContents(e,t),this.undoRedo.clearRedoStack();const n=[];for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++){const s={sheet:e.sheet,row:e.row+r,col:e.col+i},o=t[r][i];this.clipboardOperations.abortCut();const a=this.operations.setCellContent(s,o);n.push({address:s,newContent:o,oldContent:a})}this.undoRedo.saveOperation(new go(n))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),Bs(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new oo(e,n,t))}setRowOrder(e,t){this.validateSwapRowIndexes(e,t),this.testRowOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.setRowOrder(e,t);this.undoRedo.saveOperation(new io(e,t,n))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Er.spanFrom({sheet:e,col:n,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new yn}}setColumnOrder(e,t){this.validateSwapColumnIndexes(e,t),this.testColumnOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.setColumnOrder(e,t);this.undoRedo.saveOperation(new so(e,t,n))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Er.spanFrom({sheet:e,col:0,row:n},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new yn}}mappingFromOrder(e,t,n){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==r)throw new Xt(`number of ${n}s provided to be sheet ${"row"===n?"height":"width"}.`);const i=[];for(let s=0;s<r;s++)t[s]!==s&&i.push([s,t[s]]);return i}undo(){if(this.undoRedo.isUndoStackEmpty())throw new Zt;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new en;this.clipboardOperations.abortCut(),this.undoRedo.redo()}addNamedExpression(e,t,n,r){this.ensureItIsPossibleToAddNamedExpression(e,t,n),this.operations.addNamedExpression(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new wo(e,t,n,r))}changeNamedExpressionExpression(e,t,n,r){this.ensureItIsPossibleToChangeNamedExpression(e,n,t);const[i,s]=this.operations.changeNamedExpressionExpression(e,n,t,r);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new _o(i,n,s,t,r))}removeNamedExpression(e,t){this.ensureScopeIdIsValid(t);const[n,r]=this.operations.removeNamedExpression(e,t);return this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new bo(n,r,t)),n}ensureItIsPossibleToAddNamedExpression(e,t,n){this.ensureScopeIdIsValid(n),this.ensureNamedExpressionNameIsValid(e,n),this.ensureNamedExpressionIsValid(t)}ensureItIsPossibleToChangeNamedExpression(e,t,n){if(this.ensureScopeIdIsValid(n),void 0===this.namedExpressions.namedExpressionForScope(e,n))throw new Qt(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new Qt(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const n=this.dependencyGraph.getSheetHeight(e),r=t.map(e=>e[1]).reduce((e,t)=>e+t,0);if(n+r>this.maxRows)throw new Gt;for(const[i,s]of t)if(!To(i)||!Co(s))throw new Xt("row number to be nonnegative and number of rows to add to be positive.")}ensureItIsPossibleToRemoveRows(e,...t){for(const[n,r]of t){const t=n+r-1;if(!To(n)||!To(t))throw new Xt("starting and ending row to be nonnegative.");if(t<n)throw new Xt("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const n=this.dependencyGraph.getSheetWidth(e),r=t.map(e=>e[1]).reduce((e,t)=>e+t,0);if(n+r>this.maxColumns)throw new Gt;for(const[i,s]of t)if(!To(i)||!Co(s))throw new Xt("column number to be nonnegative and number of columns to add to be positive.")}ensureItIsPossibleToRemoveColumns(e,...t){for(const[n,r]of t){const t=n+r-1;if(!To(n)||!To(t))throw new Xt("starting and ending column to be nonnegative.");if(t<n)throw new Xt("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e)}}ensureItIsPossibleToMoveRows(e,t,n,r){this.ensureItIsPossibleToAddRows(e,[r,n]);const i=mr(e,0,t),s=mr(e,0,r);if(!this.sheetMapping.hasSheetWithId(e)||fr(i)||fr(s)||!Co(n)||r<=t+n&&r>=t)throw new Xt("a valid range of rows to move.");const o=this.dependencyGraph.getSheetWidth(e),a=Er.spanFrom(i,o,n);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new yn;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(jt.fromNumberOfRows(e,r-1,2)))throw new wn}ensureItIsPossibleToMoveColumns(e,t,n,r){this.ensureItIsPossibleToAddColumns(e,[r,n]);const i=mr(e,t,0),s=mr(e,r,0);if(!this.sheetMapping.hasSheetWithId(e)||fr(i)||fr(s)||!Co(n)||r<=t+n&&r>=t)throw new Xt("a valid range of columns to move.");const o=this.dependencyGraph.getSheetHeight(e),a=Er.spanFrom(i,n,o);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new yn;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(Ft.fromNumberOfColumns(e,r-1,2)))throw new wn}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new Wt(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const n=this.sheetMapping.get(t);if(void 0!==n&&n!==e)throw new Wt(t)}ensureItIsPossibleToChangeContent(e){if(fr(e))throw new Kt(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new Vt(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){const n=Ws(t),r=Er.spanFrom(e,n.width,n.height);this.ensureRangeInSizeLimits(r);for(const i of r.addresses(this.dependencyGraph))this.ensureItIsPossibleToChangeContent(i)}ensureItIsPossibleToChangeSheetContents(e,t){const n=Ws(t),r=Er.spanFrom(mr(e,0,0),n.width,n.height);this.ensureRangeInSizeLimits(r)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new Gt}isThereSomethingToUndo(){return!this.undoRedo.isUndoStackEmpty()}isThereSomethingToRedo(){return!this.undoRedo.isRedoStackEmpty()}getAndClearContentChanges(){return this.operations.getAndClearContentChanges()}ensureScopeIdIsValid(e){if(void 0!==e&&!this.sheetMapping.hasSheetWithId(e))throw new Vt(e)}validateRowOrColumnMapping(e,t,n){const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e),i=t.map(([e,t])=>e).sort((e,t)=>e-t),s=t.map(([e,t])=>t).sort((e,t)=>e-t);for(let o=0;o<i.length;o++){if(!To(i[o])||i[o]>=r)throw new Xt(`${n} numbers to be nonnegative integers and less than sheet ${"row"===n?"height":"width"}.`);if(i[o]===i[o+1])throw new Xt(`source ${n} numbers to be unique.`);if(i[o]!==s[o])throw new Xt(`target ${n} numbers to be permutation of source ${n} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new Jt(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new qt(e)}ensureNamedExpressionIsValid(e){const t=this.cellContentParser.parse(e);if(t instanceof _s.Formula){const e=this.parser.parse(t.formula,mr(-1,0,0));if(xs(e.ast))throw new bn}}}function Co(e){return Number.isInteger(e)&&e>0}function To(e){return Number.isInteger(e)&&e>=0}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Mo{constructor(e,t,n,r,i,s){this.config=e,this.stats=t,this.interpreter=n,this.lazilyTransformingAstService=r,this.dependencyGraph=i,this.columnSearch=s}run(){this.stats.start(It.TOP_SORT);const{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(It.TOP_SORT),this.stats.measure(It.EVALUATION,()=>{this.recomputeFormulas(t,e)})}partialRun(e){const t=Pt.empty();return this.stats.measure(It.EVALUATION,()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,e=>{if(e instanceof Mn){const n=e.isComputed()?e.getCellValue():void 0,r=this.recomputeFormulaVertexValue(e);if(r!==n){const i=e.getAddress(this.lazilyTransformingAstService);return t.addChange(r,i),this.columnSearch.change(St(n),St(r),i),!0}return!1}return!(e instanceof Nn)||(e.clearCache(),!0)},e=>{if(e instanceof Nn)e.clearCache();else if(e instanceof Mn){const n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(St(e.valueOrUndef()),n);const r=new lr(Vn.CYCLE,void 0,e);e.setCellValue(r),t.addChange(r,n)}})}),t}runAndForget(e,t,n){const r=[];for(const s of bt(n,t))if(s instanceof Er){const e=s;if(void 0===this.dependencyGraph.getRange(e.start,e.end)){const t=new Nn(e);this.dependencyGraph.rangeMapping.setRange(t),r.push(t)}}const i=this.evaluateAstToCellValue(e,new Mr(t,this.config.useArrayArithmetic));return r.forEach(e=>{this.dependencyGraph.rangeMapping.removeRange(e)}),i}recomputeFormulas(e,t){e.forEach(e=>{e instanceof Mn&&e.setCellValue(new lr(Vn.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof Mn){const t=this.recomputeFormulaVertexValue(e),n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(St(t),n)}else e instanceof Nn&&e.clearCache()})}recomputeFormulaVertexValue(e){const t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof Rn&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{const n=e.getFormula(this.lazilyTransformingAstService),r=this.evaluateAstToCellValue(n,new Mr(t,this.config.useArrayArithmetic,e));return e.setCellValue(r)}}evaluateAstToCellValue(e,t){const n=this.interpreter.evaluateAst(e,t);return n instanceof Ht?n:n===vt&&this.config.evaluateNullToZero?0:n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ro{constructor(e,t){this.address=e,this.newValue=t}get col(){return this.address.col}get row(){return this.address.row}get sheet(){return this.address.sheet}get value(){return this.newValue}}class Oo{constructor(e,t){this.name=e,this.newValue=t}}class No{constructor(e,t,n,r){this.config=e,this.namedExpressions=t,this.sheetIndexMapping=n,this.lazilyTransformingService=r}exportChange(e){const t=e.value,n=e.address;if(n.sheet===Is.SHEET_FOR_WORKBOOK_EXPRESSIONS){const e=this.namedExpressions.namedExpressionInAddress(n.row);if(!e)throw new Error("Missing named expression");return new Oo(e.displayName,this.exportScalarOrRange(t))}if(t instanceof Ht){const e=[];for(const[r,i]of t.entriesFromTopLeftCorner(n))e.push(new Ro(i,this.exportValue(r)));return e}return new Ro(n,this.exportValue(t))}exportValue(e){return e instanceof Ht?this.detailedError(new lr(Vn.VALUE,Re.ScalarExpected)):this.config.smartRounding&&At(e)?this.cellValueRounding(St(e)):e instanceof lr?this.detailedError(e):e===vt?null:St(e)}exportScalarOrRange(e){return e instanceof Ht?e.rawData().map(e=>e.map(e=>this.exportValue(e))):this.exportValue(e)}detailedError(e){var t,n;let r=void 0;const i=null===(t=e.root)||void 0===t?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==i&&(r=i.sheet===Is.SHEET_FOR_WORKBOOK_EXPRESSIONS?null===(n=this.namedExpressions.namedExpressionInAddress(i.row))||void 0===n?void 0:n.displayName:D(this.sheetIndexMapping,i,-1)),new ii(e,this.config.translationPackage.getErrorTranslation(e.type),r)}cellValueRounding(e){if(0===e)return e;const t=Math.floor(Math.log10(Math.abs(e))),n=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ao{constructor(e,t,n,r,i,s){this.dependencyGraph=e,this.columnSearch=t,this.parser=n,this.cellContentParser=r,this.stats=i,this.arraySizePredictor=s,this.buildStrategy=new Lo(e,t,n,i,r,s)}buildGraph(e,t){const n=t.measure(It.COLLECT_DEPENDENCIES,()=>this.buildStrategy.run(e));this.dependencyGraph.getAndClearContentChanges(),t.measure(It.PROCESS_DEPENDENCIES,()=>this.processDependencies(n))}processDependencies(e){e.forEach((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)})}}class Lo{constructor(e,t,n,r,i,s){this.dependencyGraph=e,this.columnIndex=t,this.parser=n,this.stats=r,this.cellContentParser=i,this.arraySizePredictor=s}run(e){const t=new Map;for(const n in e){const r=this.dependencyGraph.getSheetId(n),i=e[n];for(let e=0;e<i.length;++e){const n=i[e];for(let i=0;i<n.length;++i){const s=n[i],o=mr(r,i,e),a=this.cellContentParser.parse(s);if(a instanceof _s.Formula){const e=this.stats.measure(It.PARSER,()=>this.parser.parse(a.formula,o));if(e.errors.length>0){this.shrinkArrayIfNeeded(o);const t=new qn(e.errors,a.formula);this.dependencyGraph.addVertex(o,t)}else{this.shrinkArrayIfNeeded(o);const n=this.arraySizePredictor.checkArraySize(e.ast,o);if(n.isScalar()){const n=new On(e.ast,o,0);t.set(n,bt(e.dependencies,o)),this.dependencyGraph.addVertex(o,n),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(n),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(n)}else{const r=new Rn(e.ast,o,new ei(n.width,n.height));t.set(r,bt(e.dependencies,o)),this.dependencyGraph.addArrayVertex(o,r)}}}else if(a instanceof _s.Empty);else{this.shrinkArrayIfNeeded(o);const e=new $n(a.value,s);this.columnIndex.add(St(a.value),o),this.dependencyGraph.addVertex(o,e)}}}}return t}shrinkArrayIfNeeded(e){const t=this.dependencyGraph.getCell(e);t instanceof Rn&&this.dependencyGraph.shrinkArrayToCorner(t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Io=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class xo extends Zr{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{const{licenseKeyValidityState:e,licenseKey:t}=this.config;let n;return Io.has(t)?n=Io.get(t):Io.has(e)?n=Io.get(e):"valid"===e&&(n=t.slice(-5)),`HyperFormula v${ha.version}, ${n}`})}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function ko(e,t){var n;let r=t.implementedFunctions[e];const i=null===(n=t.aliases)||void 0===n?void 0:n[e];if(void 0!==i){if(void 0!==r)throw new _n(e,t.name);r=t.implementedFunctions[i]}if(void 0===r)throw pn.functionNotDeclaredInPlugin(e,t.name);return r}xo.implementedFunctions={VERSION:{method:"version",parameters:[]}};class Do{constructor(e){if(this.config=e,this.functions=new Map,this.arraySizeFunctions=new Map,this.volatileFunctions=new Set,this.arrayFunctions=new Set,this.structuralChangeFunctions=new Set,this.functionsWhichDoesNotNeedArgumentsToBeComputed=new Set,this.functionsMetadata=new Map,this.doesFunctionNeedArgumentToBeComputed=e=>this.functionsWhichDoesNotNeedArgumentsToBeComputed.has(e),this.isFunctionVolatile=e=>this.volatileFunctions.has(e),this.isArrayFunction=e=>this.arrayFunctions.has(e),this.isFunctionDependentOnSheetStructureChange=e=>this.structuralChangeFunctions.has(e),e.functionPlugins.length>0){this.instancePlugins=new Map;for(const t of e.functionPlugins)Do.loadPluginFunctions(t,this.instancePlugins)}else this.instancePlugins=new Map(Do.plugins);for(const[t,n]of Do.protectedFunctions())Do.loadFunctionUnprotected(n,t,this.instancePlugins);for(const[t,n]of this.instancePlugins.entries())this.categorizeFunction(t,ko(t,n))}static registerFunctionPlugin(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}static registerFunction(e,t,n){this.loadPluginFunction(t,e,this.plugins),void 0!==n&&this.loadTranslations(n)}static unregisterFunction(e){if(this.functionIsProtected(e))throw gn.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(const t of this.protectedPlugins())if(t===e)throw gn.cannotUnregisterProtectedPlugin();for(const[t,n]of this.plugins.entries())n===e&&this.plugins.delete(t)}static unregisterAll(){this.plugins.clear()}static getRegisteredFunctionIds(){return[...Array.from(this.plugins.keys()),...Array.from(this._protectedPlugins.keys())]}static getPlugins(){return Array.from(new Set(this.plugins.values()).values())}static getFunctionPlugin(e){return this.functionIsProtected(e)?void 0:this.plugins.get(e)}static functionIsProtected(e){return this._protectedPlugins.has(e)}static loadTranslations(e){const t=new Set(ha.getRegisteredLanguagesCodes());Object.keys(e).forEach(n=>{t.has(n)&&ha.getLanguage(n).extendFunctions(e[n])})}static loadPluginFunctions(e,t){Object.keys(e.implementedFunctions).forEach(n=>{this.loadPluginFunction(e,n,t)}),void 0!==e.aliases&&Object.keys(e.aliases).forEach(n=>{this.loadPluginFunction(e,n,t)})}static loadPluginFunction(e,t,n){if(this.functionIsProtected(t))throw gn.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,n)}static loadFunctionUnprotected(e,t,n){const r=ko(t,e).method;if(!Object.prototype.hasOwnProperty.call(e.prototype,r))throw pn.functionMethodNotFound(r,e.name);n.set(t,e)}static*protectedFunctions(){for(const[e,t]of this._protectedPlugins)void 0!==t&&(yield[e,t])}static*protectedPlugins(){for(const[,e]of this._protectedPlugins)void 0!==e&&(yield e)}initializePlugins(e){const t=[];for(const[n,r]of this.instancePlugins.entries()){let i=t.find(e=>e instanceof r);void 0===i&&(i=new r(e),t.push(i));const s=ko(n,r),o=s.method;this.functions.set(n,[o,i]);const a=s.arraySizeMethod;void 0!==a&&this.arraySizeFunctions.set(n,[a,i])}}getFunctionPlugin(e){if(!Do.functionIsProtected(e))return this.instancePlugins.get(e)}getFunction(e){const t=this.functions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){const[e,n]=t;return(t,r)=>n[e](t,r)}}getArraySizeFunction(e){const t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){const[e,n]=t;return(t,r)=>n[e](t,r)}}getMetadata(e){return this.functionsMetadata.get(e)}getPlugins(){const e=new Set;for(const[t,n]of this.instancePlugins)Do.functionIsProtected(t)||e.add(n);return Array.from(e)}getRegisteredFunctionIds(){return Array.from(this.functions.keys())}categorizeFunction(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.arrayFunction&&this.arrayFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e),this.functionsMetadata.set(e,t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- var Ho;Do.plugins=new Map,Do._protectedPlugins=new Map([["VERSION",xo],["OFFSET",void 0]]),function(e){e["GREATER_THAN"]="GREATER_THAN",e["GREATER_THAN_OR_EQUAL"]="GREATER_THAN_OR_EQUAL",e["LESS_THAN"]="LESS_THAN",e["LESS_THAN_OR_EQUAL"]="LESS_THAN_OR_EQUAL",e["NOT_EQUAL"]="NOT_EQUAL",e["EQUAL"]="EQUAL"}(Ho||(Ho={}));const Po=(e,t)=>({operator:e,value:t});class jo{constructor(e){var t,n,r,i;this.trueString=null!==(n=null===(t=e.translationPackage.getMaybeFunctionTranslation("TRUE"))||void 0===t?void 0:t.toLowerCase())&&void 0!==n?n:"true",this.falseString=null!==(i=null===(r=e.translationPackage.getMaybeFunctionTranslation("FALSE"))||void 0===r?void 0:r.toLowerCase())&&void 0!==i?i:"false"}fromCellValue(e,t){if("string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e)return;const n=this.parseCriterion(e,t);return void 0!==n?{raw:e,lambda:Uo(n,t)}:void 0}parseCriterion(e,t){if("number"===typeof e||"boolean"===typeof e)return Po(Ho.EQUAL,e);if("string"===typeof e){const n=Fo.exec(e);let r,i;n?(i=Yo(n[1]),r=n[2]):(i=Ho.EQUAL,r=e);const s=t.coerceToMaybeNumber(r),o=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===i)return;if(""===r)return Po(i,null);if(void 0!==s)return Po(i,St(s));if(i===Ho.EQUAL||i===Ho.NOT_EQUAL)return Po(i,null!==o&&void 0!==o?o:r)}}}const Fo=/([<>=]+)(.*)/;function Yo(e){switch(e){case">":return Ho.GREATER_THAN;case">=":return Ho.GREATER_THAN_OR_EQUAL;case"<":return Ho.LESS_THAN;case"<=":return Ho.LESS_THAN_OR_EQUAL;case"<>":return Ho.NOT_EQUAL;case"=":return Ho.EQUAL;default:return}}const Uo=(e,t)=>{switch(e.operator){case Ho.GREATER_THAN:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)>0:e=>!1;case Ho.GREATER_THAN_OR_EQUAL:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)>=0:e=>!1;case Ho.LESS_THAN:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)<0:e=>!1;case Ho.LESS_THAN_OR_EQUAL:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)<=0:e=>!1;case Ho.EQUAL:return"number"===typeof e.value?n=>{if("number"===typeof n)return 0===t.floatCmp(n,e.value);if("string"===typeof n){if(""===n)return!1;const r=t.coerceToMaybeNumber(n);return void 0!==r&&0===t.floatCmp(r,e.value)}return!1}:"string"===typeof e.value?t.eqMatcherFunction(e.value):"boolean"===typeof e.value?t=>"boolean"===typeof t&&t===e.value:e=>e===vt;case Ho.NOT_EQUAL:return"number"===typeof e.value?n=>{if("number"===typeof n)return 0!==t.floatCmp(n,e.value);if("string"===typeof n){if(""===n)return!0;const r=t.coerceToMaybeNumber(n);return void 0===r||0!==t.floatCmp(r,e.value)}return!0}:"string"===typeof e.value?t.neqMatcherFunction(e.value):"boolean"===typeof e.value?t=>"boolean"!==typeof t||t!==e.value:e=>e!==vt}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Vo{constructor(e,t,n,r,i,s,o,a,l,c){this.config=e,this.dependencyGraph=t,this.columnSearch=n,this.stats=r,this.arithmeticHelper=i,this.functionRegistry=s,this.namedExpressions=o,this.serialization=a,this.arraySizePredictor=l,this.dateTimeHelper=c,this.equalOp=(e,t)=>Wo(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>Wo(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>Wo(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>Wo(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>Wo(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>Wo(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>Wo(this.arithmeticHelper.concat,Hr(e),Hr(t)),this.plusOp=(e,t)=>Wo(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>Wo(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>Wo(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>Wo(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>Wo(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>Bo(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>Bo(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new jo(e)}evaluateAst(e,t){let n=this.evaluateAstWithoutPostprocessing(e,t);if(At(n)){if(Fr(St(n)))return new lr(Vn.NUM,Re.NaN);n=Ct(n,Yr(St(n)))}return n instanceof Ht&&1===n.height()&&1===n.width()&&([[n]]=n.data),Go(n,t.formulaVertex)}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case W.EMPTY:return vt;case W.CELL_REFERENCE:{const n=e.reference.toSimpleCellAddress(t.formulaAddress);return fr(n)?new lr(Vn.REF,Re.BadRef):this.dependencyGraph.getCellValue(n)}case W.NUMBER:case W.STRING:return e.value;case W.CONCATENATE_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,n,r,t)}case W.EQUALS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,n,r,t)}case W.NOT_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.notEqualOp,n,r,t)}case W.GREATER_THAN_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOp,n,r,t)}case W.LESS_THAN_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOp,n,r,t)}case W.GREATER_THAN_OR_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOrEqualOp,n,r,t)}case W.LESS_THAN_OR_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOrEqualOp,n,r,t)}case W.PLUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,n,r,t)}case W.MINUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,n,r,t)}case W.TIMES_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,n,r,t)}case W.POWER_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,n,r,t)}case W.DIV_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,n,r,t)}case W.PLUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,n,t)}case W.MINUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,n,t)}case W.PERCENT_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,n,t)}case W.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!Do.functionIsProtected(e.procedureName))return new lr(Vn.LIC,Re.LicenseKey(this.config.licenseKeyValidityState));const n=this.functionRegistry.getFunction(e.procedureName);return void 0!==n?n(e,new Mr(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex)):new lr(Vn.NAME,Re.FunctionName(e.procedureName))}case W.NAMED_EXPRESSION:{const n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);return n?this.dependencyGraph.getCellValue(n.address):new lr(Vn.NAME,Re.NamedExpressionName(e.expressionName))}case W.CELL_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Vn.REF,Re.RangeManySheets);const n=Er.fromCellRange(e,t.formulaAddress),r=this.dependencyGraph.getArray(n);if(r){const e=r.array;if(e instanceof En)throw new Error("Array should be already computed");if(e instanceof lr)return e;if(e instanceof Cn)return Ht.fromRange(e.raw(),n,this.dependencyGraph);throw new Error("Unknown array")}return Ht.onlyRange(n,this.dependencyGraph)}case W.COLUMN_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Vn.REF,Re.RangeManySheets);const n=Cr.fromColumnRange(e,t.formulaAddress);return Ht.onlyRange(n,this.dependencyGraph)}case W.ROW_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Vn.REF,Re.RangeManySheets);const n=Tr.fromRowRangeAst(e,t.formulaAddress);return Ht.onlyRange(n,this.dependencyGraph)}case W.PARENTHESIS:return this.evaluateAst(e.expression,t);case W.ARRAY:{let n=void 0;const r=[];for(const i of e.args){let e=void 0;const s=[];for(const n of i){const r=Ir(this.evaluateAst(n,t)),i=r.height();if(void 0===e)e=i,s.push(...r.data);else{if(e!==i)return new lr(Vn.REF,Re.SizeMismatch);for(let e=0;e<i;e++)s[e].push(...r.data[e])}}const o=s[0].length;if(void 0===n)n=o,r.push(...s);else{if(n!==o)return new lr(Vn.REF,Re.SizeMismatch);r.push(...s)}}return Ht.onlyValues(r)}case W.ERROR_WITH_RAW_INPUT:case W.ERROR:return e.error}}rangeSpansOneSheet(e){return e.start.sheet===e.end.sheet}unaryRangeWrapper(e,t,n){var r;if(t instanceof Ht&&!n.arraysFlag&&(t=null!==(r=qr(t,n))&&void 0!==r?r:new lr(Vn.VALUE,Re.ScalarExpected)),t instanceof lr)return t;if(t instanceof Ht){const n=t.data.map(t=>t.map(e));return Ht.onlyValues(n)}return e(t)}binaryRangeWrapper(e,t,n,r){var i,s;if(t instanceof Ht&&!r.arraysFlag&&(t=null!==(i=qr(t,r))&&void 0!==i?i:new lr(Vn.VALUE,Re.ScalarExpected)),t instanceof lr)return t;if(n instanceof Ht&&!r.arraysFlag&&(n=null!==(s=qr(n,r))&&void 0!==s?s:new lr(Vn.VALUE,Re.ScalarExpected)),n instanceof lr)return n;if(t instanceof Ht||n instanceof Ht){if(!(t instanceof Ht)){if(n.isAdHoc()){const r=n.data;for(let n=0;n<r.length;n++)for(let i=0;i<r[0].length;i++)r[n][i]=e(t,r[n][i]);return Ht.onlyValues(r)}t=Ht.fromScalar(t)}if(!(n instanceof Ht)){if(t.isAdHoc()){const r=t.data;for(let t=0;t<r.length;t++)for(let i=0;i<r[0].length;i++)r[t][i]=e(r[t][i],n);return Ht.onlyValues(r)}n=Ht.fromScalar(n)}if(t.width()===n.width()&&t.height()===n.height()){if(t.isAdHoc()){const r=t.data,i=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)r[t][n]=e(r[t][n],i[t][n]);return Ht.onlyValues(r)}if(n.isAdHoc()){const r=t.data,i=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)i[t][n]=e(r[t][n],i[t][n]);return Ht.onlyValues(i)}}const r=Math.max(t.width(),n.width()),i=Math.max(t.height(),n.height()),s=Array(i);for(let e=0;e<i;e++)s[e]=Array(r);for(let o=0;o<i;o++){const i=1!==t.height()?o:0,a=1!==n.height()?o:0;for(let l=0;l<r;l++){const r=1!==t.width()?l:0,c=1!==n.width()?l:0;i<t.height()&&a<n.height()&&r<t.width()&&c<n.width()?s[o][l]=e(t.data[i][r],n.data[a][c]):s[o][l]=new lr(Vn.NA)}}return Ht.onlyValues(s)}return e(t,n)}}function Bo(e,t){return t instanceof lr?t:e(t)}function Wo(e,t,n){return t instanceof lr?t:n instanceof lr?n:e(t,n)}function Go(e,t){return e instanceof lr&&void 0!==t?e.attachRootVertex(t):e}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class zo{constructor(e){this.sheet=e,this.transformations=[]}add(e){this.transformations.push(e)}performEagerTransformations(e,t){this.transformations.forEach(n=>n.performEagerTransformations(e,t))}transformSingleAst(e,t){let[n,r]=[e,t];return this.transformations.forEach(e=>{[n,r]=e.transformSingleAst(n,r)}),[n,r]}isIrreversible(){return!0}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ko{constructor(e){this.stats=e,this.transformations=[]}version(){return this.transformations.length}addTransformation(e){return void 0!==this.combinedTransformer?this.combinedTransformer.add(e):this.transformations.push(e),this.version()}beginCombinedMode(e){this.combinedTransformer=new zo(e)}commitCombinedMode(){if(void 0===this.combinedTransformer)throw Error("Combined mode wasn't started");return this.transformations.push(this.combinedTransformer),this.combinedTransformer=void 0,this.version()}applyTransformations(e,t,n){this.stats.start(It.TRANSFORM_ASTS_POSTPONED);for(let i=n;i<this.transformations.length;i++){const n=this.transformations[i];n.isIrreversible()&&(this.undoRedo.storeDataForVersion(i,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));const[r,s]=n.transformSingleAst(e,t);e=r,t=s}const r=this.parser.rememberNewAst(e);return this.stats.end(It.TRANSFORM_ASTS_POSTPONED),[r,t,this.transformations.length]}*getTransformationsFrom(e,t){for(let n=e;n<this.transformations.length;n++){const e=this.transformations[n];t&&!t(e)||(yield e)}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Xo=-1;function $o(e,t,{searchCoordinate:n,orderingDirection:r,matchExactly:i},s){const o=t.start[n],a="col"===n?t.effectiveEndColumn(s):t.effectiveEndRow(s),l="col"===n?e=>St(s.getCellValue(mr(t.sheet,e,t.start.row))):e=>St(s.getCellValue(mr(t.sheet,t.start.col,e))),c="asc"===r?(e,t)=>Jo(e,t):(e,t)=>-Jo(e,t),u=qo(t=>c(e,l(t))>=0,o,a),h=l(u);return u===Xo||typeof h!==typeof e||i&&h!==e?Xo:u-o}function qo(e,t,n){let r=t,i=n;while(r<i){const t=Math.ceil((r+i)/2);e(t)?r=t:i=t-1}return r===i&&e(r)?r:Xo}function Jo(e,t){return typeof e===typeof t?e===vt?0:e<t?-1:e>t?1:0:e===vt?-1:t===vt?1:t instanceof lr||"number"===typeof e&&"string"===typeof t||"number"===typeof e&&"boolean"===typeof t?-1:"string"===typeof e&&"number"===typeof t?1:"string"===typeof e&&"boolean"===typeof t?-1:1}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Qo{constructor(e){this.dependencyGraph=e}advancedFind(e,t){let n;const r=t.range;n=void 0===r?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(r);for(let i=0;i<n.length;i++)if(e(St(n[i])))return i;return-1}basicFind(e,t,n,{ordering:r,matchExactly:i}){const s="string"===typeof e?$r(e):e,o=t.range;return void 0===o?this.findNormalizedValue(s,t.valuesFromTopLeftCorner()):"none"===r?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(o)):$o(s,o,{searchCoordinate:n,orderingDirection:r,matchExactly:i},this.dependencyGraph)}findNormalizedValue(e,t){return t.map(St).map(e=>"string"===typeof e?$r(e):e).indexOf(e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Zo extends Qo{constructor(e){super(e),this.dependencyGraph=e}add(e,t){}remove(e,t){}change(e,t,n){}applyChanges(e){}addColumns(e){}removeColumns(e){}removeSheet(e){}moveValues(e,t,n,r){}removeValues(e){}find(e,t,n){return this.basicFind(e,t,"row",n)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ea{constructor(e,t,n){this.dependencyGraph=e,this.config=t,this.stats=n,this.index=new Map,this.transformingService=this.dependencyGraph.lazilyTransformingAstService,this.binarySearchStrategy=new Zo(e)}add(e,t){if(!(e===vt||e instanceof lr))if(e instanceof Ht)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(St(n),r);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof Ht)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(St(n),r);else this.removeSingleValue(e,t)}change(e,t,n){e!==t&&(this.remove(e,n),this.add(t,n))}applyChanges(e){for(const t of e)void 0!==t.oldValue&&this.change(St(t.oldValue),St(t.value),t.address)}moveValues(e,t,n,r){for(const[i,s]of e){const e=pr(s,r,t,n);this.remove(i,s),this.add(i,e)}}removeValues(e){for(const[t,n]of e)this.remove(t,n)}find(e,t,{ordering:n,matchExactly:r}){const i=!0===r?"findFirst":"findLast",s=this.findUsingColumnIndex(e,t,i);return void 0!==s?s:this.binarySearchStrategy.find(e,t,{ordering:n,matchExactly:r})}findUsingColumnIndex(e,t,n){const r=t.range;if(void 0===r)return;this.ensureRecentData(r.sheet,r.start.col,e);const i=this.getColumnMap(r.sheet,r.start.col);if(!i)return-1;const s="string"===typeof e?$r(e):e,o=i.get(s);if(!o||!o.index||0===o.index.length)return;const a=ea.findRowBelongingToRange(o,r,n);return void 0!==a?a-r.start.row:void 0}static findRowBelongingToRange(e,t,n){const r=t.start.row,i=t.end.row,s="findFirst"===n?ta(r,e.index,"upperBound"):ta(i,e.index,"lowerBound");if(-1===s)return;const o=e.index[s],a=o>=r&&o<=i;return a?o:void 0}advancedFind(e,t){return this.binarySearchStrategy.advancedFind(e,t)}addColumns(e){const t=this.index.get(e.sheet);t&&t.splice(e.columnStart,0,...Array(e.numberOfColumns))}removeColumns(e){const t=this.index.get(e.sheet);t&&t.splice(e.columnStart,e.numberOfColumns)}removeSheet(e){this.index.delete(e)}getColumnMap(e,t){this.index.has(e)||this.index.set(e,[]);const n=this.index.get(e);let r=n[t];return r||(r=new Map,n[t]=r),r}getValueIndex(e,t,n){const r=this.getColumnMap(e,t);let i=this.getColumnMap(e,t).get(n);return i||(i={version:this.transformingService.version(),index:[]},r.set(n,i)),i}ensureRecentData(e,t,n){const r=this.getValueIndex(e,t,n),i=this.transformingService.version();if(r.version===i)return;const s=this.transformingService.getTransformationsFrom(r.version,t=>t.sheet===e&&(t instanceof Hs||t instanceof Us));for(const o of s)o instanceof Hs?this.addRows(t,o.rowsSpan,n):o instanceof Us&&this.removeRows(t,o.rowsSpan,n);r.version=i}addSingleCellValue(e,t){this.stats.measure(It.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e),"string"===typeof e&&(e=$r(e));const n=this.getValueIndex(t.sheet,t.col,e);ea.addValue(n,t.row)})}removeSingleValue(e,t){this.stats.measure(It.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e);const n=this.getColumnMap(t.sheet,t.col);"string"===typeof e&&(e=$r(e));const r=n.get(e);if(!r)return;const i=ta(t.row,r.index);i>-1&&r.index.splice(i,1),0===r.index.length&&n.delete(e),0===n.size&&delete this.index.get(t.sheet)[t.col]})}addRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);ea.shiftRows(r,t.rowStart,t.numberOfRows)}removeRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);ea.removeRowsFromValues(r,t),ea.shiftRows(r,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){const n=ta(t,e.index,"lowerBound"),r=e.index[n]===t;r||e.index.splice(n+1,0,t)}static removeRowsFromValues(e,t){const n=ta(t.rowStart,e.index,"upperBound"),r=ta(t.rowEnd,e.index,"lowerBound"),i=n>-1&&r>-1&&n<=r&&e.index[n]<=t.rowEnd;i&&e.index.splice(n,r-n+1)}static shiftRows(e,t,n){const r=ta(t,e.index,"upperBound");if(-1!==r)for(let i=r;i<e.index.length;++i)e.index[i]+=n}}function ta(e,t,n="upperBound"){let r=0,i=t.length-1;while(r<=i){const n=Math.floor((r+i)/2);if(e>t[n])r=n+1;else{if(!(e<t[n]))return n;i=n-1}}const s="lowerBound"===n?i:r,o=s>=0&&s<=t.length;return o?s:-1}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function na(e,t,n){return t.useColumnIndex?new ea(e,t,n):new Zo(e)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ra{constructor(e){this.config=e;const t="."===this.config.thousandSeparator?"\\"+this.config.thousandSeparator:this.config.thousandSeparator,n="."===this.config.decimalSeparator?"\\"+this.config.decimalSeparator:this.config.decimalSeparator;this.numberPattern=new RegExp(`^([+-]?((${n}\\d+)|(\\d+(${t}\\d{3,})*(${n}\\d*)?)))(e[+-]?\\d+)?$`),this.allThousandSeparatorsRegex=new RegExp(""+t,"g")}numericStringToMaybeNumber(e){if(this.numberPattern.test(e)){const t=this.numericStringToNumber(e);if(isNaN(t))return;return t}}numericStringToNumber(e){const t=e.replace(this.allThousandSeparatorsRegex,"").replace(this.config.decimalSeparator,".");return Number(t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ia{constructor(e,t,n){this.dependencyGraph=e,this.unparser=t,this.exporter=n}getCellHyperlink(e){const t=this.dependencyGraph.getCell(e);if(t instanceof On){const e=t.getFormula(this.dependencyGraph.lazilyTransformingAstService);if("HYPERLINK"===e.procedureName)return e.hyperlink}}getCellFormula(e,t){const n=this.dependencyGraph.getCell(e);if(n instanceof On){const r=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!==t&&void 0!==t?t:e,this.unparser.unparse(r,t)}if(n instanceof Rn){const r=n.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(r.row!==e.row||r.col!==e.col||r.sheet!==e.sheet)return;t=null!==t&&void 0!==t?t:e;const i=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==i)return this.unparser.unparse(i,t)}else if(n instanceof qn)return n.getFormula()}getCellSerialized(e,t){var n;return null!==(n=this.getCellFormula(e,t))&&void 0!==n?n:this.getRawValue(e)}getCellValue(e){return this.exporter.exportValue(this.dependencyGraph.getScalarValue(e))}getRawValue(e){return this.dependencyGraph.getRawValue(e)}getSheetValues(e){return this.genericSheetGetter(e,e=>this.getCellValue(e))}getSheetFormulas(e){return this.genericSheetGetter(e,e=>this.getCellFormula(e))}genericSheetGetter(e,t){const n=this.dependencyGraph.getSheetHeight(e),r=this.dependencyGraph.getSheetWidth(e),i=new Array(n);for(let s=0;s<n;s++){i[s]=new Array(r);for(let n=0;n<r;n++){const r=mr(e,n,s);i[s][n]=t(r)}for(let e=r-1;e>=0;e--){if(null!==i[s][e]&&void 0!==i[s][e])break;i[s].pop()}}for(let s=n-1;s>=0;s--){if(0!==i[s].length)break;i.pop()}return i}genericAllSheetsGetter(e){const t={};for(const n of this.dependencyGraph.sheetMapping.displayNames()){const r=this.dependencyGraph.sheetMapping.fetch(n);t[n]=e(r)}return t}getSheetSerialized(e){return this.genericSheetGetter(e,e=>this.getCellSerialized(e))}getAllSheetsValues(){return this.genericAllSheetsGetter(e=>this.getSheetValues(e))}getAllSheetsFormulas(){return this.genericAllSheetsGetter(e=>this.getSheetFormulas(e))}getAllSheetsSerialized(){return this.genericAllSheetsGetter(e=>this.getSheetSerialized(e))}getAllNamedExpressionsSerialized(){const e=[];let t=0;for(const n of this.dependencyGraph.sheetMapping.displayNames()){const r=this.dependencyGraph.sheetMapping.fetch(n);e[r]=t,t++}return this.dependencyGraph.namedExpressions.getAllNamedExpressions().map(t=>({name:t.expression.displayName,expression:this.getCellSerialized(t.expression.address),scope:void 0!==t.scope?e[t.scope]:void 0,options:t.expression.options}))}withNewConfig(e,t){const n=new ct(e,ot(e),this.dependencyGraph.sheetMapping.fetchDisplayName,t);return new ia(this.dependencyGraph,n,this.exporter)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class sa{static buildFromSheets(e,t={},n=[]){const r=new ma(t);return this.buildEngine(r,e,n)}static buildFromSheet(e,t={},n=[]){const r=new ma(t),i=r.translationPackage.getUITranslation(Un.NEW_SHEET_PREFIX)+"1";return this.buildEngine(r,{[i]:e},n)}static buildEmpty(e={},t=[]){return this.buildEngine(new ma(e),{},t)}static rebuildWithConfig(e,t,n,r){return this.buildEngine(e,t,n,r)}static buildEngine(e,t={},n=[],r=(e.useStats?new Yt:new Ut)){r.start(It.BUILD_ENGINE_TOTAL);const i=new Is,s=new Do(e),o=new Ko(r),a=Kn.buildEmpty(o,e,s,i,r),l=na(a,e,r),c=a.sheetMapping,u=a.addressMapping;for(const M in t)if(Object.prototype.hasOwnProperty.call(t,M)){const n=t[M];Bs(n);const r=Ws(n);if(r.height>e.maxRows||r.width>e.maxColumns)throw new Gt;const i=c.addSheet(M);u.autoAddSheet(i,r)}const h=new ht(e,s,c.get);o.parser=h;const d=new ct(e,ot(e),c.fetchDisplayName,i),m=new ki(e),f=new ra(e),p=new Ar(e,m,f),g=new Ms(e,m,f),y=new ri(e,s),w=new $s(e,a,l,g,h,r,o,i,y),b=new So(e,w);o.undoRedo=b;const _=new Os(e,a,w),v=new Eo(e,w,b,_,a,l,h,g,o,i);n.forEach(e=>{v.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),v.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});const S=new No(e,i,c.fetchDisplayName,o),E=new ia(a,d,S),C=new Vo(e,a,l,r,p,s,i,E,y,m);r.measure(It.GRAPH_BUILD,()=>{const e=new Ao(a,l,h,g,r,y);e.buildGraph(t,r)});const T=new Mo(e,r,C,o,a,l);return T.run(),r.end(It.BUILD_ENGINE_TOTAL),{config:e,stats:r,dependencyGraph:a,columnSearch:l,parser:h,unparser:d,cellContentParser:g,evaluator:T,lazilyTransformingAstService:o,crudOperations:v,exporter:S,namedExpressions:i,serialization:E,functionRegistry:s}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function oa(e){for(const[t,n]of Object.entries(e))n instanceof Function?e[t]=aa(n):delete e[t]}function aa(e){return()=>{throw new Error(`The "${e}" method cannot be called because this HyperFormula instance has been destroyed`)}}var la,ca=n("c0e2");
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["SheetAdded"]="sheetAdded",e["SheetRemoved"]="sheetRemoved",e["SheetRenamed"]="sheetRenamed",e["NamedExpressionAdded"]="namedExpressionAdded",e["NamedExpressionRemoved"]="namedExpressionRemoved",e["ValuesUpdated"]="valuesUpdated",e["EvaluationSuspended"]="evaluationSuspended",e["EvaluationResumed"]="evaluationResumed"})(la||(la={}));class ua extends ca["TinyEmitter"]{emit(e,...t){return super.emit(e,...t),this}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ha{constructor(e,t,n,r,i,s,o,a,l,c,u,h,d,m){this._config=e,this._stats=t,this._dependencyGraph=n,this._columnSearch=r,this._parser=i,this._unparser=s,this._cellContentParser=o,this._evaluator=a,this._lazilyTransformingAstService=l,this._crudOperations=c,this._exporter=u,this._namedExpressions=h,this._serialization=d,this._functionRegistry=m,this._emitter=new ua,this._evaluationSuspended=!1}static get defaultConfig(){return pa()}get graph(){return this.dependencyGraph.graph}get rangeMapping(){return this.dependencyGraph.rangeMapping}get arrayMapping(){return this.dependencyGraph.arrayMapping}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}get dependencyGraph(){return this._dependencyGraph}get evaluator(){return this._evaluator}get columnSearch(){return this._columnSearch}get lazilyTransformingAstService(){return this._lazilyTransformingAstService}get licenseKeyValidityState(){return this._config.licenseKeyValidityState}static buildFromArray(e,t={},n=[]){return this.buildFromEngineState(sa.buildFromSheet(e,t,n))}static buildFromSheets(e,t={},n=[]){return this.buildFromEngineState(sa.buildFromSheets(e,t,n))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(sa.buildEmpty(e,t))}static getLanguage(e){ui(e,"string","languageCode");const t=this.registeredLanguages.get(e);if(void 0===t)throw new mn;return t}static registerLanguage(e,t){if(ui(e,"string","languageCode"),this.registeredLanguages.has(e))throw new fn;this.registeredLanguages.set(e,Yn(t))}static unregisterLanguage(e){if(ui(e,"string","languageCode"),!this.registeredLanguages.has(e))throw new mn;this.registeredLanguages.delete(e)}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){Do.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){Do.unregisterFunctionPlugin(e)}static registerFunction(e,t,n){ui(e,"string","functionId"),Do.registerFunction(e,t,n)}static unregisterFunction(e){ui(e,"string","functionId"),Do.unregisterFunction(e)}static unregisterAllFunctions(){Do.unregisterAll()}static getRegisteredFunctionNames(e){ui(e,"string","code");const t=Do.getRegisteredFunctionIds(),n=this.getLanguage(e);return n.getFunctionTranslations(t)}static getFunctionPlugin(e){return ui(e,"string","functionId"),Do.getFunctionPlugin(e)}static getAllFunctionPlugins(){return Do.getPlugins()}static buildFromEngineState(e){return new ha(e.config,e.stats,e.dependencyGraph,e.columnSearch,e.parser,e.unparser,e.cellContentParser,e.evaluator,e.lazilyTransformingAstService,e.crudOperations,e.exporter,e.namedExpressions,e.serialization,e.functionRegistry)}getCellValue(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return ui(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return ui(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return ui(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return ui(e,"number","sheetId"),{width:this.dependencyGraph.getSheetWidth(e),height:this.dependencyGraph.getSheetHeight(e)}}getAllSheetsValues(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsValues()}getAllSheetsFormulas(){return this._serialization.getAllSheetsFormulas()}getAllSheetsSerialized(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsSerialized()}updateConfig(e){const t=Object.entries(e).every(([e,t])=>this._config[e]===t);t||this.rebuildWithConfig(e)}getConfig(){return this._config.getConfig()}rebuildAndRecalculate(){this.rebuildWithConfig({})}getStats(){return this._stats.snapshot()}undo(){return this._crudOperations.undo(),this.recomputeIfDependencyGraphNeedsIt()}redo(){return this._crudOperations.redo(),this.recomputeIfDependencyGraphNeedsIt()}isThereSomethingToUndo(){return this._crudOperations.isThereSomethingToUndo()}isThereSomethingToRedo(){return this._crudOperations.isThereSomethingToRedo()}isItPossibleToSetCellContents(e){let t;if(yr(e))t=new Er(e,e);else{if(!vr(e))throw new sn("SimpleCellAddress | SimpleCellRange","address");t=new Er(e.start,e.end)}try{this._crudOperations.ensureRangeInSizeLimits(t);for(const e of t.addresses(this._dependencyGraph))this._crudOperations.ensureItIsPossibleToChangeContent(e)}catch(n){return!1}return!0}setCellContents(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}swapRowIndexes(e,t){return ui(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){ui(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(n){return!1}}setRowOrder(e,t){ui(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}isItPossibleToSetRowOrder(e,t){ui(e,"number","sheetId");try{const n=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,n),this._crudOperations.testRowOrderForArrays(e,n),!0}catch(n){return!1}}swapColumnIndexes(e,t){return ui(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){ui(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(n){return!1}}setColumnOrder(e,t){ui(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}isItPossibleToSetColumnOrder(e,t){ui(e,"number","sheetId");try{const n=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,n),this._crudOperations.testColumnOrderForArrays(e,n),!0}catch(n){return!1}}isItPossibleToAddRows(e,...t){ui(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...n),!0}catch(r){return!1}}addRows(e,...t){return ui(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){ui(e,"number","sheetId");const n=qs(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...n),!0}catch(r){return!1}}removeRows(e,...t){return ui(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){ui(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...n),!0}catch(r){return!1}}addColumns(e,...t){return ui(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){ui(e,"number","sheetId");const n=qs(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...n),!0}catch(r){return!1}}removeColumns(e,...t){return ui(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!yr(t))throw new sn("SimpleCellAddress","destinationLeftCorner");if(!vr(e))throw new sn("SimpleCellRange","source");try{const n=new Er(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(n.start,n.width(),n.height(),t),!0}catch(n){return!1}}moveCells(e,t){if(!yr(t))throw new sn("SimpleCellAddress","destinationLeftCorner");if(!vr(e))throw new sn("SimpleCellRange","source");const n=new Er(e.start,e.end);return this._crudOperations.moveCells(n.start,n.width(),n.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,n,r){ui(e,"number","sheetId"),ui(t,"number","startRow"),ui(n,"number","numberOfRows"),ui(r,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(i){return!1}}moveRows(e,t,n,r){return ui(e,"number","sheetId"),ui(t,"number","startRow"),ui(n,"number","numberOfRows"),ui(r,"number","targetRow"),this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,n,r){ui(e,"number","sheetId"),ui(t,"number","startColumn"),ui(n,"number","numberOfColumns"),ui(r,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(i){return!1}}moveColumns(e,t,n,r){return ui(e,"number","sheetId"),ui(t,"number","startColumn"),ui(n,"number","numberOfColumns"),ui(r,"number","targetColumn"),this._crudOperations.moveColumns(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!vr(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!vr(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!yr(e))throw new sn("SimpleCellAddress","targetLeftCorner");return this.ensureEvaluationIsNotSuspended(),this._crudOperations.paste(e),this.recomputeIfDependencyGraphNeedsIt()}isClipboardEmpty(){return this._crudOperations.isClipboardEmpty()}clearClipboard(){this._crudOperations.clearClipboard()}clearRedoStack(){this._crudOperations.undoRedo.clearRedoStack()}clearUndoStack(){this._crudOperations.undoRedo.clearUndoStack()}getRangeValues(e){if(!vr(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!vr(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!vr(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,n=!1){if(!vr(e))throw new sn("SimpleCellRange","source");if(!vr(t))throw new sn("SimpleCellRange","target");const r=new Er(e.start,e.end),i=new Er(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),i.arrayOfAddressesInRange().map(i=>i.map(i=>{const s=((i.row-(n?t:e).start.row)%r.height()+r.height())%r.height()+e.start.row,o=((i.col-(n?t:e).start.col)%r.width()+r.width())%r.width()+e.start.col;return this._serialization.getCellSerialized({row:s,col:o,sheet:r.sheet},i)}))}isItPossibleToAddSheet(e){ui(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(t){return!1}}addSheet(e){void 0!==e&&ui(e,"string","sheetName");const t=this._crudOperations.addSheet(e);return this._emitter.emit(la.SheetAdded,t),t}isItPossibleToRemoveSheet(e){ui(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}removeSheet(e){ui(e,"number","sheetId");const t=this.sheetMapping.getDisplayName(e);this._crudOperations.removeSheet(e);const n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.SheetRemoved,t,n),n}isItPossibleToClearSheet(e){ui(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}clearSheet(e){return ui(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){ui(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(n){return!1}}setSheetContent(e,t){return ui(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return ui(e,"string","cellAddress"),ui(t,"number","sheetId"),x(this.sheetMapping.get,e,t)}simpleCellRangeFromString(e,t){return ui(e,"string","cellRange"),ui(t,"number","sheetId"),k(this.sheetMapping.get,e,t)}simpleCellAddressToString(e,t){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return ui(t,"number","sheetId"),D(this.sheetMapping.fetchDisplayName,e,t)}simpleCellRangeToString(e,t){if(!vr(e))throw new sn("SimpleCellRange","cellRange");return ui(t,"number","sheetId"),H(this.sheetMapping.fetchDisplayName,e,t)}getCellDependents(e){let t;if(yr(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!vr(e))throw new sn("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(yr(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!vr(e))throw new sn("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return ui(e,"number","sheetId"),this.sheetMapping.getDisplayName(e)}getSheetNames(){return this.sheetMapping.sheetNames()}getSheetId(e){return ui(e,"string","sheetName"),this.sheetMapping.get(e)}doesSheetExist(e){return ui(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.dependencyGraph.getCell(e);return Zn(t,e)}doesCellHaveSimpleValue(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.getCellType(e)===Bn.VALUE}doesCellHaveFormula(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===Bn.FORMULA||t===Bn.ARRAYFORMULA}isCellEmpty(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.getCellType(e)===Bn.EMPTY}isCellPartOfArray(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===Bn.ARRAY||t===Bn.ARRAYFORMULA}getCellValueType(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return sr(t)}getCellValueDetailedType(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return or(t)}getCellValueFormat(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return ar(t)}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){ui(e,"number","sheetId"),ui(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(n){return!1}}renameSheet(e,t){ui(e,"number","sheetId"),ui(t,"string","newName");const n=this._crudOperations.renameSheet(e,t);void 0!==n&&this._emitter.emit(la.SheetRenamed,n,t)}batch(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(t){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),t}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}suspendEvaluation(){this._evaluationSuspended=!0,this._emitter.emit(la.EvaluationSuspended)}resumeEvaluation(){this._evaluationSuspended=!1;const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.EvaluationResumed,e),e}isEvaluationSuspended(){return this._evaluationSuspended}isItPossibleToAddNamedExpression(e,t,n){ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(r){return!1}}addNamedExpression(e,t,n,r){ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope"),this._crudOperations.addNamedExpression(e,t,n,r);const i=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.NamedExpressionAdded,e,i),i}getNamedExpressionValue(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope"),this.ensureEvaluationIsNotSuspended(),this._crudOperations.ensureScopeIdIsValid(t);const n=this._namedExpressions.namedExpressionForScope(e,t);return n?this._serialization.getCellValue(n.address):void 0}getNamedExpressionFormula(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope"),this._crudOperations.ensureScopeIdIsValid(t);const n=this._namedExpressions.namedExpressionForScope(e,t);return void 0===n?void 0:this._serialization.getCellFormula(n.address)}getNamedExpression(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope");const n=this._namedExpressions.namedExpressionForScope(e,t);if(void 0===n)return;const r=this._serialization.getCellFormula(n.address);return{name:e,scope:t,expression:r,options:n.options}}isItPossibleToChangeNamedExpression(e,t,n){ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(r){return!1}}changeNamedExpression(e,t,n,r){return ui(e,"string","expressionName"),void 0!==n&&ui(n,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(n){return!1}}removeNamedExpression(e,t){ui(e,"string","expressionName"),void 0!==t&&ui(t,"number","scope");const n=this._crudOperations.removeNamedExpression(e,t);if(n){const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.NamedExpressionRemoved,n.displayName,e),e}return[]}listNamedExpressions(e){return void 0!==e&&ui(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){ui(e,"string","formulaString");const{ast:t,address:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new zt;return this._unparser.unparse(t,n)}calculateFormula(e,t){ui(e,"string","formulaString"),ui(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);const{ast:n,address:r,dependencies:i}=this.extractTemporaryFormula(e,t);if(void 0===n)throw new zt;const s=this.evaluator.runAndForget(n,r,i);return this._exporter.exportScalarOrRange(s)}getNamedExpressionsFromFormula(e){ui(e,"string","formulaString");const{ast:t,dependencies:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new zt;const r=n.filter(e=>e instanceof wt).map(e=>e.name),i=[...new Set(r)];return i}validateFormula(e){ui(e,"string","formulaString");const{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){const e=ha.getLanguage(this._config.language);return e.getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return ui(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return ui(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return ui(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return ui(e,"number","val"),Yi(e)}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}destroy(){oa(this)}ensureEvaluationIsNotSuspended(){if(this._evaluationSuspended)throw new un}extractTemporaryFormula(e,t=1){const n=this._cellContentParser.parse(e),r={sheet:t,col:0,row:0};if(!(n instanceof _s.Formula))return{address:r,dependencies:[]};const{ast:i,errors:s,dependencies:o}=this._parser.parse(n.formula,r);return s.length>0?{address:r,dependencies:[]}:{ast:i,address:r,dependencies:o}}rebuildWithConfig(e){const t=this._config.mergeConfig(e),n=this._config.mergeConfig({language:e.language}),r=this._serialization.withNewConfig(n,this._namedExpressions).getAllSheetsSerialized(),i=this._serialization.getAllNamedExpressionsSerialized(),s=sa.rebuildWithConfig(t,r,i,this._stats);this._config=s.config,this._stats=s.stats,this._dependencyGraph=s.dependencyGraph,this._columnSearch=s.columnSearch,this._parser=s.parser,this._unparser=s.unparser,this._cellContentParser=s.cellContentParser,this._evaluator=s.evaluator,this._lazilyTransformingAstService=s.lazilyTransformingAstService,this._crudOperations=s.crudOperations,this._exporter=s.exporter,this._namedExpressions=s.namedExpressions,this._serialization=s.serialization,this._functionRegistry=s.functionRegistry}recomputeIfDependencyGraphNeedsIt(){if(this._evaluationSuspended)return[];{const e=this._crudOperations.getAndClearContentChanges(),t=this.dependencyGraph.verticesToRecompute();this.dependencyGraph.clearDirtyVertices(),t.length>0&&e.addAll(this.evaluator.partialRun(t));const n=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(la.ValuesUpdated,n),n}}}ha.version="2.7.0",ha.buildDate="10/04/2024 11:28:07",ha.releaseDate="10/04/2024",ha.languages={},ha.registeredLanguages=new Map;
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const da=new WeakMap;class ma{constructor(e={},t=!0){const{accentSensitive:n,binarySearchThreshold:r,caseSensitive:i,caseFirst:s,chooseAddressMappingPolicy:o,context:a,currencySymbol:l,dateFormats:c,decimalSeparator:u,evaluateNullToZero:h,functionArgSeparator:d,functionPlugins:m,ignorePunctuation:f,leapYear1900:p,localeLang:g,language:y,ignoreWhiteSpace:w,licenseKey:b,matchWholeCell:_,arrayColumnSeparator:v,arrayRowSeparator:S,maxRows:E,maxColumns:C,nullYear:T,nullDate:M,parseDateTime:R,precisionEpsilon:O,precisionRounding:N,stringifyDateTime:A,stringifyDuration:L,smartRounding:I,timeFormats:x,thousandSeparator:k,useArrayArithmetic:D,useStats:H,undoLimit:P,useColumnIndex:j,useRegularExpressions:F,useWildcards:Y}=e;t&&ma.warnDeprecatedOptions(e),this.useArrayArithmetic=si(D,"boolean","useArrayArithmetic"),this.accentSensitive=si(n,"boolean","accentSensitive"),this.caseSensitive=si(i,"boolean","caseSensitive"),this.caseFirst=si(s,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=si(f,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!==o&&void 0!==o?o:ma.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...li(c,Array.isArray,"array","dateFormats")],this.timeFormats=[...li(x,Array.isArray,"array","timeFormats")],this.functionArgSeparator=si(d,"string","functionArgSeparator"),this.decimalSeparator=si(u,[".",","],"decimalSeparator"),this.language=si(y,"string","language"),this.ignoreWhiteSpace=si(w,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=si(b,"string","licenseKey"),this.thousandSeparator=si(k,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=si(v,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=si(S,[";","|"],"arrayRowSeparator"),this.localeLang=si(g,"string","localeLang"),this.functionPlugins=[...null!==m&&void 0!==m?m:ma.defaultConfig.functionPlugins],this.smartRounding=si(I,"boolean","smartRounding"),this.evaluateNullToZero=si(h,"boolean","evaluateNullToZero"),this.nullYear=si(T,"number","nullYear"),oi(this.nullYear,"nullYear",0),ai(this.nullYear,"nullYear",100),this.precisionRounding=si(N,"number","precisionRounding"),oi(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=si(O,"number","precisionEpsilon"),oi(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=si(j,"boolean","useColumnIndex"),this.useStats=si(H,"boolean","useStats"),this.binarySearchThreshold=null!==r&&void 0!==r?r:ma.defaultConfig.binarySearchThreshold,this.parseDateTime=si(R,"function","parseDateTime"),this.stringifyDateTime=si(A,"function","stringifyDateTime"),this.stringifyDuration=si(L,"function","stringifyDuration"),this.translationPackage=ha.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=li(M,Li,"IDate","nullDate"),this.leapYear1900=si(p,"boolean","leapYear1900"),this.undoLimit=si(P,"number","undoLimit"),this.useRegularExpressions=si(F,"boolean","useRegularExpressions"),this.useWildcards=si(Y,"boolean","useWildcards"),this.matchWholeCell=si(_,"boolean","matchWholeCell"),oi(this.undoLimit,"undoLimit",0),this.maxRows=si(E,"number","maxRows"),oi(this.maxRows,"maxRows",1),this.maxColumns=si(C,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(l),oi(this.maxColumns,"maxColumns",1),this.context=a,da.set(this,{licenseKeyValidityState:ws(this.licenseKey)}),ci({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),ci({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){const t=[...li(e,Array.isArray,"array","currencySymbol")];return t.forEach(e=>{if("string"!==typeof e)throw new sn("string[]","currencySymbol");if(""===e)throw new on("currencySymbol")}),t}get licenseKeyValidityState(){return da.get(this).licenseKeyValidityState}getConfig(){return fa(this)}mergeConfig(e){const t=Object.assign({},this.getConfig(),e);return ma.warnDeprecatedOptions(e),new ma(t,!1)}static warnDeprecatedOptions(e){ma.warnDeprecatedIfUsed(e.binarySearchThreshold,"binarySearchThreshold","1.1")}static warnDeprecatedIfUsed(e,t,n,r){void 0!==e&&(void 0===r?console.warn(`${t} option is deprecated since ${n}`):console.warn(`${t} option is deprecated since ${n}, please use ${r}`))}}function fa(e){var t;const n={};for(const r in ma.defaultConfig){const i=null!==(t=e[r])&&void 0!==t?t:ma.defaultConfig[r];Array.isArray(i)?n[r]=[...i]:n[r]=i}return n}function pa(){return fa({})}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */ma.defaultConfig={accentSensitive:!1,binarySearchThreshold:20,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new Bi,dateFormats:["DD/MM/YYYY","DD/MM/YY"],decimalSeparator:".",evaluateNullToZero:!1,functionArgSeparator:",",functionPlugins:[],ignorePunctuation:!1,language:"enGB",ignoreWhiteSpace:"standard",licenseKey:"",leapYear1900:!1,localeLang:"en",matchWholeCell:!0,arrayColumnSeparator:",",arrayRowSeparator:";",maxRows:4e4,maxColumns:18278,nullYear:30,nullDate:{year:1899,month:12,day:30},parseDateTime:bi,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,stringifyDateTime:as,stringifyDuration:os,timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};const ga={errors:{CYCLE:"#CYCLE!",DIV_BY_ZERO:"#DIV/0!",ERROR:"#ERROR!",NA:"#N/A",NAME:"#NAME?",NUM:"#NUM!",REF:"#REF!",SPILL:"#SPILL!",VALUE:"#VALUE!"},functions:{FILTER:"FILTER",ADDRESS:"ADDRESS",ARRAY_CONSTRAIN:"ARRAY_CONSTRAIN",ARRAYFORMULA:"ARRAYFORMULA",ABS:"ABS",ACOS:"ACOS",ACOSH:"ACOSH",ACOT:"ACOT",ACOTH:"ACOTH",AND:"AND",ARABIC:"ARABIC",ASIN:"ASIN",ASINH:"ASINH",ATAN2:"ATAN2",ATAN:"ATAN",ATANH:"ATANH",AVERAGE:"AVERAGE",AVERAGEA:"AVERAGEA",AVERAGEIF:"AVERAGEIF",BASE:"BASE",BIN2DEC:"BIN2DEC",BIN2HEX:"BIN2HEX",BIN2OCT:"BIN2OCT",BITAND:"BITAND",BITLSHIFT:"BITLSHIFT",BITOR:"BITOR",BITRSHIFT:"BITRSHIFT",BITXOR:"BITXOR",CEILING:"CEILING",CHAR:"CHAR",CHOOSE:"CHOOSE",CLEAN:"CLEAN",CODE:"CODE",COLUMN:"COLUMN",COLUMNS:"COLUMNS",CONCATENATE:"CONCATENATE",CORREL:"CORREL",COS:"COS",COSH:"COSH",COT:"COT",COTH:"COTH",COUNT:"COUNT",COUNTA:"COUNTA",COUNTBLANK:"COUNTBLANK",COUNTIF:"COUNTIF",COUNTIFS:"COUNTIFS",COUNTUNIQUE:"COUNTUNIQUE",CSC:"CSC",CSCH:"CSCH",CUMIPMT:"CUMIPMT",CUMPRINC:"CUMPRINC",DATE:"DATE",DATEDIF:"DATEDIF",DATEVALUE:"DATEVALUE",DAY:"DAY",DAYS360:"DAYS360",DAYS:"DAYS",DB:"DB",DDB:"DDB",DEC2BIN:"DEC2BIN",DEC2HEX:"DEC2HEX",DEC2OCT:"DEC2OCT",DECIMAL:"DECIMAL",DEGREES:"DEGREES",DELTA:"DELTA",DOLLARDE:"DOLLARDE",DOLLARFR:"DOLLARFR",EDATE:"EDATE",EFFECT:"EFFECT",EOMONTH:"EOMONTH",ERF:"ERF",ERFC:"ERFC",EVEN:"EVEN",EXACT:"EXACT",EXP:"EXP",FALSE:"FALSE",FIND:"FIND",FORMULATEXT:"FORMULATEXT",FV:"FV",FVSCHEDULE:"FVSCHEDULE",HEX2BIN:"HEX2BIN",HEX2DEC:"HEX2DEC",HEX2OCT:"HEX2OCT",HLOOKUP:"HLOOKUP",HOUR:"HOUR",HYPERLINK:"HYPERLINK",IF:"IF",IFERROR:"IFERROR",IFNA:"IFNA",IFS:"IFS",INDEX:"INDEX",INT:"INT",INTERVAL:"INTERVAL",IPMT:"IPMT",ISBINARY:"ISBINARY",ISBLANK:"ISBLANK",ISERR:"ISERR",ISERROR:"ISERROR",ISEVEN:"ISEVEN",ISFORMULA:"ISFORMULA",ISLOGICAL:"ISLOGICAL",ISNA:"ISNA",ISNONTEXT:"ISNONTEXT",ISNUMBER:"ISNUMBER",ISODD:"ISODD",ISOWEEKNUM:"ISOWEEKNUM",ISPMT:"ISPMT",ISREF:"ISREF",ISTEXT:"ISTEXT",LEFT:"LEFT",LEN:"LEN",LN:"LN",LOG10:"LOG10",LOG:"LOG",LOWER:"LOWER",MATCH:"MATCH",MAX:"MAX",MAXA:"MAXA",MAXIFS:"MAXIFS",MAXPOOL:"MAXPOOL",MEDIAN:"MEDIAN",MEDIANPOOL:"MEDIANPOOL",MID:"MID",MIN:"MIN",MINA:"MINA",MINIFS:"MINIFS",MINUTE:"MINUTE",MIRR:"MIRR",MMULT:"MMULT",MOD:"MOD",MONTH:"MONTH",NA:"NA",NETWORKDAYS:"NETWORKDAYS","NETWORKDAYS.INTL":"NETWORKDAYS.INTL",NOMINAL:"NOMINAL",NOT:"NOT",NOW:"NOW",NPER:"NPER",NPV:"NPV",OCT2BIN:"OCT2BIN",OCT2DEC:"OCT2DEC",OCT2HEX:"OCT2HEX",ODD:"ODD",OFFSET:"OFFSET",OR:"OR",PI:"PI",PMT:"PMT",PDURATION:"PDURATION",PRODUCT:"PRODUCT",POWER:"POWER",PPMT:"PPMT",PROPER:"PROPER",PV:"PV",RADIANS:"RADIANS",RAND:"RAND",RATE:"RATE",REPLACE:"REPLACE",REPT:"REPT",RIGHT:"RIGHT",ROMAN:"ROMAN",ROUND:"ROUND",ROUNDDOWN:"ROUNDDOWN",ROUNDUP:"ROUNDUP",ROW:"ROW",ROWS:"ROWS",RRI:"RRI",SEARCH:"SEARCH",SEC:"SEC",SECH:"SECH",SECOND:"SECOND",SHEET:"SHEET",SHEETS:"SHEETS",SIN:"SIN",SINH:"SINH",SLN:"SLN",SPLIT:"SPLIT",SQRT:"SQRT",STDEVA:"STDEVA","STDEV.P":"STDEV.P",STDEVPA:"STDEVPA","STDEV.S":"STDEV.S",SUBSTITUTE:"SUBSTITUTE",SUBTOTAL:"SUBTOTAL",SUM:"SUM",SUMIF:"SUMIF",SUMIFS:"SUMIFS",SUMPRODUCT:"SUMPRODUCT",SUMSQ:"SUMSQ",SWITCH:"SWITCH",SYD:"SYD",T:"T",TAN:"TAN",TANH:"TANH",TBILLEQ:"TBILLEQ",TBILLPRICE:"TBILLPRICE",TBILLYIELD:"TBILLYIELD",TEXT:"TEXT",TIME:"TIME",TIMEVALUE:"TIMEVALUE",TODAY:"TODAY",TRANSPOSE:"TRANSPOSE",TRIM:"TRIM",TRUE:"TRUE",TRUNC:"TRUNC",UNICHAR:"UNICHAR",UNICODE:"UNICODE",UPPER:"UPPER",VARA:"VARA","VAR.P":"VAR.P",VARPA:"VARPA","VAR.S":"VAR.S",VLOOKUP:"VLOOKUP",WEEKDAY:"WEEKDAY",WEEKNUM:"WEEKNUM",WORKDAY:"WORKDAY","WORKDAY.INTL":"WORKDAY.INTL",XNPV:"XNPV",XOR:"XOR",YEAR:"YEAR",YEARFRAC:"YEARFRAC","HF.ADD":"HF.ADD","HF.CONCAT":"HF.CONCAT","HF.DIVIDE":"HF.DIVIDE","HF.EQ":"HF.EQ","HF.GT":"HF.GT","HF.GTE":"HF.GTE","HF.LT":"HF.LT","HF.LTE":"HF.LTE","HF.MINUS":"HF.MINUS","HF.MULTIPLY":"HF.MULTIPLY","HF.NE":"HF.NE","HF.POW":"HF.POW","HF.UMINUS":"HF.UMINUS","HF.UNARY_PERCENT":"HF.UNARY_PERCENT","HF.UPLUS":"HF.UPLUS",VARP:"VARP",VAR:"VAR",STDEVP:"STDEVP",STDEV:"STDEV","EXPON.DIST":"EXPON.DIST",FISHER:"FISHER",FISHERINV:"FISHERINV",GAMMA:"GAMMA","GAMMA.DIST":"GAMMA.DIST",GAMMALN:"GAMMALN","GAMMALN.PRECISE":"GAMMALN.PRECISE","GAMMA.INV":"GAMMA.INV",GAUSS:"GAUSS",FACT:"FACT",FACTDOUBLE:"FACTDOUBLE",COMBIN:"COMBIN",COMBINA:"COMBINA",GCD:"GCD",LCM:"LCM",MROUND:"MROUND",MULTINOMIAL:"MULTINOMIAL",QUOTIENT:"QUOTIENT",RANDBETWEEN:"RANDBETWEEN",SERIESSUM:"SERIESSUM",SIGN:"SIGN",SQRTPI:"SQRTPI",SUMX2MY2:"SUMX2MY2",SUMX2PY2:"SUMX2PY2",SUMXMY2:"SUMXMY2",EXPONDIST:"EXPONDIST",GAMMADIST:"GAMMADIST",GAMMAINV:"GAMMAINV","BETA.DIST":"BETA.DIST",BETADIST:"BETADIST","BETA.INV":"BETA.INV",BETAINV:"BETAINV","BINOM.DIST":"BINOM.DIST",BINOMDIST:"BINOMDIST","BINOM.INV":"BINOM.INV",BESSELI:"BESSELI",BESSELJ:"BESSELJ",BESSELK:"BESSELK",BESSELY:"BESSELY","CHISQ.DIST":"CHISQ.DIST","CHISQ.DIST.RT":"CHISQ.DIST.RT","CHISQ.INV":"CHISQ.INV","CHISQ.INV.RT":"CHISQ.INV.RT",CHIDIST:"CHIDIST",CHIINV:"CHIINV","F.DIST":"F.DIST","F.DIST.RT":"F.DIST.RT","F.INV":"F.INV","F.INV.RT":"F.INV.RT",FDIST:"FDIST",FINV:"FINV",WEIBULL:"WEIBULL","WEIBULL.DIST":"WEIBULL.DIST",POISSON:"POISSON","POISSON.DIST":"POISSON.DIST","HYPGEOM.DIST":"HYPGEOM.DIST",HYPGEOMDIST:"HYPGEOMDIST","T.DIST":"T.DIST","T.DIST.2T":"T.DIST.2T","T.DIST.RT":"T.DIST.RT","T.INV":"T.INV","T.INV.2T":"T.INV.2T",TDIST:"TDIST",TINV:"TINV",LOGINV:"LOGINV","LOGNORM.DIST":"LOGNORM.DIST","LOGNORM.INV":"LOGNORM.INV",LOGNORMDIST:"LOGNORMDIST","NORM.DIST":"NORM.DIST","NORM.INV":"NORM.INV","NORM.S.DIST":"NORM.S.DIST","NORM.S.INV":"NORM.S.INV",NORMDIST:"NORMDIST",NORMINV:"NORMINV",NORMSDIST:"NORMSDIST",NORMSINV:"NORMSINV",PHI:"PHI","NEGBINOM.DIST":"NEGBINOM.DIST",NEGBINOMDIST:"NEGBINOMDIST",COMPLEX:"COMPLEX",IMABS:"IMABS",IMAGINARY:"IMAGINARY",IMARGUMENT:"IMARGUMENT",IMCONJUGATE:"IMCONJUGATE",IMCOS:"IMCOS",IMCOSH:"IMCOSH",IMCOT:"IMCOT",IMCSC:"IMCSC",IMCSCH:"IMCSCH",IMDIV:"IMDIV",IMEXP:"IMEXP",IMLN:"IMLN",IMLOG10:"IMLOG10",IMLOG2:"IMLOG2",IMPOWER:"IMPOWER",IMPRODUCT:"IMPRODUCT",IMREAL:"IMREAL",IMSEC:"IMSEC",IMSECH:"IMSECH",IMSIN:"IMSIN",IMSINH:"IMSINH",IMSQRT:"IMSQRT",IMSUB:"IMSUB",IMSUM:"IMSUM",IMTAN:"IMTAN",LARGE:"LARGE",SMALL:"SMALL",AVEDEV:"AVEDEV",CONFIDENCE:"CONFIDENCE","CONFIDENCE.NORM":"CONFIDENCE.NORM","CONFIDENCE.T":"CONFIDENCE.T",DEVSQ:"DEVSQ",GEOMEAN:"GEOMEAN",HARMEAN:"HARMEAN",CRITBINOM:"CRITBINOM","COVARIANCE.P":"COVARIANCE.P","COVARIANCE.S":"COVARIANCE.S",COVAR:"COVAR",PEARSON:"PEARSON",RSQ:"RSQ",STANDARDIZE:"STANDARDIZE","Z.TEST":"Z.TEST",ZTEST:"ZTEST","F.TEST":"F.TEST",FTEST:"FTEST",STEYX:"STEYX",SLOPE:"SLOPE","CHISQ.TEST":"CHISQ.TEST",CHITEST:"CHITEST","T.TEST":"T.TEST",TTEST:"TTEST",SKEW:"SKEW","SKEW.P":"SKEW.P",WEIBULLDIST:"WEIBULLDIST",VARS:"VARS",TINV2T:"TINV2T",TDISTRT:"TDISTRT",TDIST2T:"TDIST2T",STDEVS:"STDEVS",FINVRT:"FINVRT",FDISTRT:"FDISTRT",CHIDISTRT:"CHIDISTRT",CHIINVRT:"CHIINVRT",COVARIANCEP:"COVARIANCEP",COVARIANCES:"COVARIANCES",LOGNORMINV:"LOGNORMINV",POISSONDIST:"POISSONDIST",SKEWP:"SKEWP","CEILING.MATH":"CEILING.MATH",FLOOR:"FLOOR","FLOOR.MATH":"FLOOR.MATH","CEILING.PRECISE":"CEILING.PRECISE","FLOOR.PRECISE":"FLOOR.PRECISE","ISO.CEILING":"ISO.CEILING"},langCode:"enGB",ui:{NEW_SHEET_PREFIX:"Sheet"}};var ya,wa=ga;
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e[e["FullyAbsolute"]=1]="FullyAbsolute",e[e["RowAbsoluteColRelative"]=2]="RowAbsoluteColRelative",e[e["RowRelativeColAbsolute"]=3]="RowRelativeColAbsolute",e[e["FullyRelative"]=4]="FullyRelative"})(ya||(ya={}));class ba extends Zr{verifyAddressArguments(e,t,n,r){if(r){if(e<1||t<1)return new lr(Vn.VALUE,Re.LessThanOne)}else if(ya.FullyAbsolute==n){if(e<1||t<1)return new lr(Vn.VALUE,Re.LessThanOne)}else if(ya.RowAbsoluteColRelative==n){if(e<1)return new lr(Vn.VALUE,Re.LessThanOne)}else if(ya.RowRelativeColAbsolute==n&&t<1)return new lr(Vn.VALUE,Re.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),(e,t,n,r,i)=>{const s=this.verifyAddressArguments(e,t,n,r);if(void 0!==s)return s;const o=j(t-1);let a="";void 0!==i&&null!==i&&(a=i+"!");const l=0==t?"C":`C[${t}]`,c=0==e?"R":`R[${e}]`;return ya.FullyRelative==n?r?`${a}${o}${e}`:`${a}${c}${l}`:ya.RowRelativeColAbsolute==n?r?`${a}$${o}${e}`:`${a}${c}C${t}`:ya.RowAbsoluteColRelative==n?r?`${a}${o}$${e}`:`${a}R${e}${l}`:r?`${a}$${o}$${e}`:`${a}R${e}C${t}`})}}ba.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4},{argumentType:Qr.BOOLEAN,optionalArg:!0,defaultValue:!0},{argumentType:Qr.STRING,optionalArg:!0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class _a extends Zr{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return ei.error();const n=this.metadata("ARRAYFORMULA"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))});return r[0]}arrayconstrain(e,t){return this.runFunction(e.args,t,this.metadata("ARRAY_CONSTRAIN"),(e,t,n)=>{t=Math.min(t,e.height()),n=Math.min(n,e.width());const r=e.data,i=[];for(let s=0;s<t;s++)i.push(r[s].slice(0,n));return Ht.onlyValues(i)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return ei.error();const n=this.metadata("ARRAY_CONSTRAIN"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))});let{height:i,width:s}=r[0];return e.args[1].type===W.NUMBER&&(i=Math.min(i,e.args[1].value)),e.args[2].type===W.NUMBER&&(s=Math.min(s,e.args[2].value)),i<1||s<1||!Number.isInteger(i)||!Number.isInteger(s)?ei.error():new ei(s,i)}filter(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),(e,...t)=>{for(const i of t)if(e.width()!==i.width()||e.height()!==i.height())return new lr(Vn.NA,Re.EqualLength);if(e.width()>1&&e.height()>1)return new lr(Vn.NA,Re.WrongDimension);const n=e.data,r=[];for(let i=0;i<e.height();i++){const s=[];for(let r=0;r<e.width();r++){let e=!0;for(const n of t){const t=Dr(n.data[i][r]);if(!0!==t){e=!1;break}}e&&s.push(n[i][r])}s.length>0&&r.push(s)}return r.length>0?Ht.onlyValues(r):new lr(Vn.NA,Re.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return ei.error();const n=this.metadata("FILTER"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),i=Math.max(...r.map(e=>e.width)),s=Math.max(...r.map(e=>e.height));return new ei(i,s)}}_a.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",arraySizeMethod:"arrayformulaArraySize",arrayFunction:!0,parameters:[{argumentType:Qr.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",arraySizeMethod:"arrayconstrainArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",arraySizeMethod:"filterArraySize",arrayFunction:!0,parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}],repeatLastArgs:1}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class va extends Zr{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}va.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const Sa=0xffffffffffff,Ea=-53,Ca=53;class Ta extends Zr{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),Ma)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),Ra)}}function Ma(e,t){return t<0?Ra(e,-t):Oa(e*Math.pow(2,t))}function Ra(e,t){return t<0?Ma(e,-t):Oa(Math.floor(e/Math.pow(2,t)))}function Oa(e){return e>Sa?new lr(Vn.NUM,Re.BitshiftLong):e}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Ta.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:Ea,maxValue:Ca}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:Ea,maxValue:Ca}]}};class Na extends Zr{bitand(e,t){return this.runFunction(e.args,t,this.metadata("BITAND"),(e,t)=>e&t)}bitor(e,t){return this.runFunction(e.args,t,this.metadata("BITOR"),(e,t)=>e|t)}bitxor(e,t){return this.runFunction(e.args,t,this.metadata("BITXOR"),(e,t)=>e^t)}}Na.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Aa extends Zr{literalTrue(e,t){return this.runFunction(e.args,t,this.metadata("TRUE"),()=>!0)}literalFalse(e,t){return this.runFunction(e.args,t,this.metadata("FALSE"),()=>!1)}conditionalIf(e,t){return this.runFunction(e.args,t,this.metadata("IF"),(e,t,n)=>e?t:n)}ifs(e,t){return this.runFunction(e.args,t,this.metadata("IFS"),(...e)=>{for(let t=0;t<e.length;t+=2)if(e[t])return e[t+1];return new lr(Vn.NA,Re.NoConditionMet)})}and(e,t){return this.runFunction(e.args,t,this.metadata("AND"),(...e)=>e.filter(e=>void 0!==e).every(e=>!!e))}or(e,t){return this.runFunction(e.args,t,this.metadata("OR"),(...e)=>e.filter(e=>void 0!==e).some(e=>e))}not(e,t){return this.runFunction(e.args,t,this.metadata("NOT"),e=>!e)}xor(e,t){return this.runFunction(e.args,t,this.metadata("XOR"),(...e)=>{let t=0;return e.filter(e=>void 0!==e).forEach(e=>{e&&t++}),t%2===1})}switch(e,t){return this.runFunction(e.args,t,this.metadata("SWITCH"),(e,...t)=>{const n=t.length;let r=0;for(;r+1<n;r+=2)if(!(t[r]instanceof lr)&&this.arithmeticHelper.eq(e,t[r]))return t[r+1];return r<n?t[r]:new lr(Vn.NA,Re.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof lr?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof lr&&e.type===Vn.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new lr(Vn.NUM,Re.Selector):t[e-1])}}Aa.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:Qr.BOOLEAN},{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,defaultValue:!1,passSubtype:!0}]},IFS:{method:"ifs",parameters:[{argumentType:Qr.BOOLEAN},{argumentType:Qr.SCALAR,passSubtype:!0}],repeatLastArgs:2},AND:{method:"and",parameters:[{argumentType:Qr.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:Qr.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:Qr.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:Qr.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.SCALAR,passSubtype:!0}],repeatLastArgs:1}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class La extends Zr{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new lr(Vn.VALUE,Re.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new lr(Vn.VALUE,Re.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e)))}}La.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:Qr.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ia extends Zr{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new lr(Vn.VALUE,Re.EmptyString):e.charCodeAt(0))}unicode(e,t){return this.runFunction(e.args,t,this.metadata("UNICODE"),e=>{var t;return null!==(t=e.codePointAt(0))&&void 0!==t?t:new lr(Vn.VALUE,Re.EmptyString)})}}Ia.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:Qr.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:Qr.STRING}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class xa extends Zr{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===vt&&t++}),t})}}xa.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:Qr.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class ka extends Zr{countunique(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(...e)=>{const t=new Set,n=new Set;for(const r of e)r instanceof lr?n.add(r.type):""!==r&&t.add(r);return t.size+n.size})}}ka.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:Qr.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Da extends Zr{constructor(){super(...arguments),this.isoweeknumCore=e=>{const t=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),n=this.dateTimeHelper.numberToSimpleDate(e),r=this.dateTimeHelper.dateToNumber({year:n.year,month:1,day:1}),i=this.dateTimeHelper.relativeNumberToAbsoluteNumber(r),s=i+((4-i)%7+7)%7,o=Math.floor((t-1)/7)-Math.floor((s-1)/7)+1;return 0===o?this.isoweeknumCore(e-7)+1:o},this.days360Core=(e,t,n)=>{const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);let s,o;return n?(s=Vi(r),o=Vi(i)):[s,o]=this.dateTimeHelper.toBasisUS(r,i),360*(o.year-s.year)+30*(o.month-s.month)+o.day-s.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),(e,t,n)=>{const r=Math.trunc(n);let i=Math.trunc(t),s=Math.trunc(e);s<this.dateTimeHelper.getEpochYearZero()&&(s+=this.dateTimeHelper.getEpochYearZero());const o=Math.floor((i-1)/12);s+=o,i-=12*o;const a={year:s,month:i,day:1};if(this.dateTimeHelper.isValidDate(a)){let e=this.dateTimeHelper.dateToNumber(a)+(r-1);return e=this.dateTimeHelper.getWithinBounds(e),void 0===e?new lr(Vn.NUM,Re.DateBounds):e}return new lr(Vn.VALUE,Re.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,n)=>{const r=Ui({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(n)});return r<0?new lr(Vn.NUM,Re.NegativeTime):r%1})}eomonth(e,t){return this.runFunction(e.args,t,this.metadata("EOMONTH"),(e,t)=>{const n=this.dateTimeHelper.numberToSimpleDate(e);let r=this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(Hi(n,t)));return r=this.dateTimeHelper.getWithinBounds(r),void 0===r?new lr(Vn.NUM,Re.DateBounds):r})}day(e,t){return this.runFunction(e.args,t,this.metadata("DAY"),e=>this.dateTimeHelper.numberToSimpleDate(e).day)}days(e,t){return this.runFunction(e.args,t,this.metadata("DAYS"),(e,t)=>Math.trunc(e)-Math.trunc(t))}month(e,t){return this.runFunction(e.args,t,this.metadata("MONTH"),e=>this.dateTimeHelper.numberToSimpleDate(e).month)}year(e,t){return this.runFunction(e.args,t,this.metadata("YEAR"),e=>this.dateTimeHelper.numberToSimpleDate(e).year)}hour(e,t){return this.runFunction(e.args,t,this.metadata("HOUR"),e=>Yi(ji(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>Yi(ji(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>Yi(ji(e)%1).seconds)}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),(e,t)=>ts(e,t,this.config,this.dateTimeHelper))}weekday(e,t){return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(e,t)=>{const n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(n-1)%7;const r=ja.get(t);return void 0===r?new lr(Vn.NUM,Re.BadMode):(n-r)%7+1})}weeknum(e,t){return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(e,t)=>{const n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),s=this.dateTimeHelper.relativeNumberToAbsoluteNumber(i);if(21===t)return this.isoweeknumCore(e);const o=ja.get(t);return void 0===o?new lr(Vn.NUM,Re.BadMode):Math.floor((n-o)/7)-Math.floor((s-o)/7)+1})}isoweeknum(e,t){return this.runFunction(e.args,t,this.metadata("ISOWEEKNUM"),this.isoweeknumCore)}datevalue(e,t){return this.runFunction(e.args,t,this.metadata("DATEVALUE"),e=>{const{dateTime:t}=this.dateTimeHelper.parseDateTimeFromConfigFormats(e);return void 0===t?new lr(Vn.VALUE,Re.IncorrectDateTime):Li(t)?(Ii(t)?Math.trunc(Ui(t)):0)+this.dateTimeHelper.dateToNumber(t):0})}timevalue(e,t){return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),e=>{const t=this.dateTimeHelper.dateStringToDateNumber(e);return void 0===t?new lr(Vn.VALUE,Re.IncorrectDateTime):St(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{const e=new Date(Date.now());return Ui({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()})+this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}today(e,t){return this.runFunction(e.args,t,this.metadata("TODAY"),()=>{const e=new Date(Date.now());return this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}edate(e,t){return this.runFunction(e.args,t,this.metadata("EDATE"),(e,t)=>{const n=this.dateTimeHelper.numberToSimpleDate(e),r=Pi(Hi(n,t));let i=this.dateTimeHelper.dateToNumber(r);return i=this.dateTimeHelper.getWithinBounds(i),void 0===i?new lr(Vn.NUM,Re.DateBounds):i})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,n)=>{if(e>t)return new lr(Vn.NUM,Re.StartEndDate);if("D"===n)return Math.floor(t)-Math.floor(e);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);switch(n){case"M":return 12*(i.year-r.year)+(i.month-r.month)-(i.day<r.day?1:0);case"YM":return(i.month-r.month+12-(i.day<r.day?1:0))%12;case"Y":return i.month>r.month||i.month===r.month&&i.day>=r.day?i.year-r.year:i.year-r.year-1;case"MD":if(i.day>=r.day)return i.day-r.day;{const e=1===i.month?12:i.month-1,t=1===i.month?i.year-1:i.year;return this.dateTimeHelper.daysInMonth(t,e)+i.day-r.day}case"YD":return i.month>r.month||i.month===r.month&&i.day>=r.day?Math.floor(t)-this.dateTimeHelper.dateToNumber({year:i.year,month:r.month,day:r.day}):Math.floor(t)-Math.floor(e)-365*(i.year-r.year-1)-this.dateTimeHelper.leapYearsCount(i.year-1)+this.dateTimeHelper.leapYearsCount(r.year);default:return new lr(Vn.NUM,Re.BadMode)}})}days360(e,t){return this.runFunction(e.args,t,this.metadata("DAYS360"),this.days360Core)}yearfrac(e,t){return this.runFunction(e.args,t,this.metadata("YEARFRAC"),(e,t,n)=>{switch(e=Math.trunc(e),t=Math.trunc(t),e>t&&([e,t]=[t,e]),n){case 0:return this.days360Core(e,t,!1)/360;case 1:return(t-e)/this.dateTimeHelper.yearLengthForBasis(this.dateTimeHelper.numberToSimpleDate(e),this.dateTimeHelper.numberToSimpleDate(t));case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return this.days360Core(e,t,!0)/360}throw new Error("Should not be reachable.")})}interval(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),e=>{e=Math.trunc(e);const t=e%60;e=Math.trunc(e/60);const n=e%60;e=Math.trunc(e/60);const r=e%24;e=Math.trunc(e/24);const i=e%30;e=Math.trunc(e/30);const s=e%12,o=Math.trunc(e/12);return"P"+(o>0?o+"Y":"")+(s>0?s+"M":"")+(i>0?i+"D":"")+"T"+(r>0?r+"H":"")+(n>0?n+"M":"")+(t>0?t+"S":"")})}networkdays(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(e,t,n)=>this.networkdayscore(e,t,1,n))}networkdaysintl(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(e,t,n,r)=>this.networkdayscore(e,t,n,r))}workday(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY"),(e,t,n)=>this.workdaycore(e,t,1,n))}workdayintl(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(e,t,n,r)=>this.workdaycore(e,t,n,r))}networkdayscore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);let i=1;e>t&&([e,t]=[t,e],i=-1);const s=Pa(n);if(s instanceof lr)return s;const o=this.simpleRangeToFilteredHolidays(s,r);return o instanceof lr?o:i*this.countWorkdays(e,t,s,o)}workdaycore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);const i=Pa(n);if(i instanceof lr)return i;const s=this.simpleRangeToFilteredHolidays(i,r);if(s instanceof lr)return s;if(t>0){let n=1;while(this.countWorkdays(e+1,e+n,i,s)<t)n*=2;let r=1;while(r+1<n){const o=Math.trunc((r+n)/2);this.countWorkdays(e+1,e+o,i,s)<t?r=o:n=o}return e+n}if(t<0){t*=-1;let n=1;while(this.countWorkdays(e-n,e-1,i,s)<t)n*=2;let r=1;while(r+1<n){const o=Math.trunc((r+n)/2);this.countWorkdays(e-o,e-1,i,s)<t?r=o:n=o}return e-n}return e}countWorkdays(e,t,n,r){const i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),s=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));let o=0;for(let a=0;a<7;a++)"0"===n.charAt(a)&&(o+=Math.floor((i+6-a)/7),o-=Math.floor((s-1+6-a)/7));return o-=Ha(t+1,r)-Ha(e,r),o}simpleRangeToFilteredHolidays(e,t){var n;const r=null!==(n=null===t||void 0===t?void 0:t.valuesFromTopLeftCorner())&&void 0!==n?n:[];for(const s of r)if(s instanceof lr)return s;const i=[];for(const s of r)if(s!==vt){if(!At(s))return new lr(Vn.VALUE,Re.WrongType);i.push(Math.trunc(St(s)))}return[...new Set(i)].sort((e,t)=>e-t).filter(t=>{const n=this.dateTimeHelper.relativeNumberToAbsoluteNumber(t),r=(n-1)%7;return"0"===e.charAt(r)})}}function Ha(e,t){if(0===t.length)return 0;if(e<=t[0])return 0;if(t[t.length-1]<e)return t.length;let n=0,r=t.length-1;while(n+1<r){const i=Math.floor((r+n)/2);t[i]>=e?r=i:n=i}return r}function Pa(e){var t;return"number"!==typeof e&&"string"!==typeof e?new lr(Vn.VALUE,Re.WrongType):"string"===typeof e?7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new lr(Vn.NUM,Re.WeekendString):null!==(t=Fa.get(e))&&void 0!==t?t:new lr(Vn.NUM,Re.BadMode)}Da.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:Qr.STRING}],returnNumberType:Lt.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:Qr.STRING}],returnNumberType:Lt.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:Lt.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:Lt.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NOERROR,defaultValue:1},{argumentType:Qr.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NOERROR,defaultValue:1},{argumentType:Qr.RANGE,optionalArg:!0}]}};const ja=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),Fa=new Map([[1,"0000011"],[2,"1000001"],[3,"1100000"],[4,"0110000"],[5,"0011000"],[6,"0001100"],[7,"0000110"],[11,"0000001"],[12,"1000000"],[13,"0100000"],[14,"0010000"],[15,"0001000"],[16,"0000100"],[17,"0000010"]]);
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ya extends Zr{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>e*(180/Math.PI))}}Ya.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ua extends Zr{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>e===t?1:0)}}Ua.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Va extends Zr{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}Va.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ba extends Zr{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),Wa)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),Ga)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),Ka)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),za)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,n,r,i,s)=>{if(r>i)return new lr(Vn.NUM,Re.EndStartPeriod);let o=0;for(let a=r;a<=i;a++)o+=Ga(e,a,t,n,0,s);return o})}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(e,t,n,r,i,s)=>{if(r>i)return new lr(Vn.NUM,Re.EndStartPeriod);let o=0;for(let a=r;a<=i;a++)o+=Ka(e,a,t,n,0,s);return o})}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(e,t,n,r,i)=>{if(12===i&&r>n||r>n+1)return new lr(Vn.NUM,Re.PeriodLong);if(t>=e)return 0;const s=Math.round(1e3*(1-Math.pow(t/e,1/n)))/1e3,o=e*s*i/12;if(1===r)return o;let a=o;for(let l=0;l<r-2;l++)a+=(e-a)*s;return r===n+1?(e-a)*s*(12-i)/12:(e-a)*s})}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(e,t,n,r,i)=>{if(r>n)return new lr(Vn.NUM);let s,o=i/n;o>=1?(o=1,s=1===r?e:0):s=e*Math.pow(1-o,r-1);const a=e*Math.pow(1-o,r);return Math.max(s-Math.max(t,a),0)})}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(e,t)=>{if(t<1)return new lr(Vn.DIV_BY_ZERO);t=Math.trunc(t);while(t>10)t/=10;return Math.trunc(e)+10*(e-Math.trunc(e))/t})}dollarfr(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(e,t)=>{if(t<1)return new lr(Vn.DIV_BY_ZERO);t=Math.trunc(t);while(t>10)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*t/10})}effect(e,t){return this.runFunction(e.args,t,this.metadata("EFFECT"),(e,t)=>(t=Math.trunc(t),Math.pow(1+e/t,t)-1))}ispmt(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(e,t,n,r)=>0===n?new lr(Vn.DIV_BY_ZERO):r*e*(t/n-1))}nominal(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(e,t)=>(t=Math.trunc(t),(Math.pow(e+1,1/t)-1)*t))}nper(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(e,t,n,r,i)=>0===e?0===t?new lr(Vn.DIV_BY_ZERO):(-n-r)/t:(i&&(t*=1+e),Math.log((t-r*e)/(n*e+t))/Math.log(1+e)))}rate(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(e,t,n,r,i,s)=>{if(s<=-1)return new lr(Vn.VALUE);const o=1e-7,a=50;let l=s;i=i?1:0;for(let c=0;c<a;c++){if(l<=-1)return new lr(Vn.NUM);let s,a;if(Math.abs(l)<o)s=n*(1+e*l)+t*(1+l*i)*e+r;else{const o=Math.pow(1+l,e);s=n*o+t*(1/l+i)*(o-1)+r}if(Math.abs(s)<o)return l;if(Math.abs(l)<o)a=n*e+t*i*e;else{const r=Math.pow(1+l,e),s=e*Math.pow(1+l,e-1);a=n*s+t*(1/l+i)*s+t*(-1/(l*l))*(r-1)}l-=s/a}return new lr(Vn.NUM)})}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(e,t,n,r,i)=>(i=i?1:0,-1===e?new lr(0===t?Vn.NUM:Vn.DIV_BY_ZERO):0===e?-n*t-r:((1-Math.pow(1+e,t))*n*(1+e*i)/e-r)/Math.pow(1+e,t)))}rri(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(e,t,n)=>0===t||n<0&&t>0||n>0&&t<0?new lr(Vn.NUM):Math.pow(n/t,1/e)-1)}sln(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(e,t,n)=>0===n?new lr(Vn.DIV_BY_ZERO):(e-t)/n)}syd(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(e,t,n,r)=>r>n?new lr(Vn.NUM):(e-t)*(n-r+1)*2/(n*(n+1)))}tbilleq(e,t){return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Vn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);if(i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day))return new lr(Vn.NUM);const s=360-n*(t-e);return 0===s?0:s<0?new lr(Vn.NUM):365*n/s})}tbillprice(e,t){return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Vn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);if(i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day))return new lr(Vn.NUM);const s=360-n*(t-e);return 0===s?0:s<0?new lr(Vn.NUM):100*(1-n*(t-e)/360)})}tbillyield(e,t){return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Vn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);return i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day)?new lr(Vn.NUM):360*(100-n)/(n*(t-e))})}fvschedule(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(e,t)=>{const n=t.valuesFromTopLeftCorner();for(const r of n)if(r instanceof lr)return r;for(const r of n)if(At(r))e*=1+St(r);else if(r!==vt)return new lr(Vn.VALUE,Re.NumberExpected);return e})}npv(e,t){return this.runFunction(e.args,t,this.metadata("NPV"),(e,...t)=>{const n=this.arithmeticHelper.coerceNumbersExactRanges(t);return n instanceof lr?n:Xa(e,n)})}mirr(e,t){return this.runFunction(e.args,t,this.metadata("MIRR"),(e,t,n)=>{const r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof lr)return r;let i=!1,s=!1;const o=[],a=[];for(const h of r)h>0?(i=!0,o.push(h),a.push(0)):h<0?(s=!0,a.push(h),o.push(0)):(a.push(0),o.push(0));if(!i||!s)return new lr(Vn.DIV_BY_ZERO);const l=r.length,c=Xa(n,o);if(c instanceof lr)return c;const u=Xa(t,a);return u instanceof lr?u:Math.pow(-c*Math.pow(1+n,l)/u/(1+t),1/(l-1))-1})}pduration(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(e,t,n)=>(Math.log(n)-Math.log(t))/Math.log(1+e))}xnpv(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(e,t,n)=>{const r=t.valuesFromTopLeftCorner();for(const c of r)if("number"!==typeof c)return new lr(Vn.VALUE,Re.NumberExpected);const i=r,s=n.valuesFromTopLeftCorner();for(const c of s)if("number"!==typeof c)return new lr(Vn.VALUE,Re.NumberExpected);const o=s;if(o.length!==i.length)return new lr(Vn.NUM,Re.EqualLength);const a=o.length;let l=0;if(o[0]<0)return new lr(Vn.NUM,Re.ValueSmall);for(let c=0;c<a;c++){if(o[c]=Math.floor(o[c]),o[c]<o[0])return new lr(Vn.NUM,Re.ValueSmall);l+=i[c]/Math.pow(1+e,(o[c]-o[0])/365)}return l})}}function Wa(e,t,n,r,i){if(0===e)return(-n-r)/t;{const s=Math.pow(1+e,t);return(r*e+n*e*s)*(i?1/(1+e):1)/(1-s)}}function Ga(e,t,n,r,i,s){const o=Wa(e,n,r,i,s);return 1===t?e*(s?0:-r):e*(s?za(e,t-2,o,r,s)-o:za(e,t-1,o,r,s))}function za(e,t,n,r,i){if(0===e)return-r-n*t;{const s=Math.pow(1+e,t);return n*(i?1+e:1)*(1-s)/e-r*s}}function Ka(e,t,n,r,i,s){return Wa(e,n,r,i,s)-Ga(e,t,n,r,i,s)}function Xa(e,t){let n=0;for(let r=t.length-1;r>=0;r--){if(n+=t[r],-1===e){if(0===n)continue;return new lr(Vn.DIV_BY_ZERO)}n/=1+e}return n}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Ba.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:0,maxValue:1}],returnNumberType:Lt.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:0,maxValue:1}],returnNumberType:Lt.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:Lt.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:Lt.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1}],returnNumberType:Lt.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1}],returnNumberType:Lt.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:.1}],returnNumberType:Lt.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE}],returnNumberType:Lt.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.ANY}],repeatLastArgs:1,returnNumberType:Lt.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:Qr.NUMBER,greaterThan:-1},{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]}};class $a extends Zr{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new lr(Vn.NA,Re.WrongArgNumber),e=>{var t;return null!==(t=this.serialization.getCellFormula(e))&&void 0!==t?t:new lr(Vn.NA,Re.Formula)})}}$a.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:Qr.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class qa extends Zr{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,n)=>(e.hyperlink=t,null!==n&&void 0!==n?n:t))}}qa.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING,optionalArg:!0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ja extends Zr{isbinary(e,t){return this.runFunction(e.args,t,this.metadata("ISBINARY"),e=>/^[01]{1,10}$/.test(e))}iserr(e,t){return this.runFunction(e.args,t,this.metadata("ISERR"),e=>e instanceof lr&&e.type!==Vn.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof lr)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new lr(Vn.NA,Re.WrongArgNumber),e=>{const t=this.dependencyGraph.addressMapping.getCell(e);return t instanceof Mn})}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===vt)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof lr&&e.type==Vn.NA)}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),At)}islogical(e,t){return this.runFunction(e.args,t,this.metadata("ISLOGICAL"),e=>"boolean"===typeof e)}isref(e,t){return this.runFunction(e.args,t,this.metadata("ISREF"),e=>e instanceof lr&&(e.type==Vn.REF||e.type==Vn.CYCLE))}istext(e,t){return this.runFunction(e.args,t,this.metadata("ISTEXT"),e=>"string"===typeof e)}isnontext(e,t){return this.runFunction(e.args,t,this.metadata("ISNONTEXT"),e=>!("string"===typeof e))}column(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("COLUMN"),()=>t.formulaAddress.col+1,e=>e.col+1)}columns(e,t){if(1!==e.args.length)return new lr(Vn.NA,Re.WrongArgNumber);if(e.args.some(e=>e.type===W.EMPTY))return new lr(Vn.NUM,Re.EmptyArg);let n=e.args[0];while(n.type===W.PARENTHESIS)n=n.expression;if(n.type===W.CELL_RANGE||n.type===W.COLUMN_RANGE)return n.end.col-n.start.col+1;if(n.type===W.CELL_REFERENCE)return 1;if(n.type===W.ROW_RANGE)return this.config.maxColumns;{const e=this.evaluateAst(n,t);return e instanceof Ht?e.width():e instanceof lr?e:1}}row(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ROW"),()=>t.formulaAddress.row+1,e=>e.row+1)}rows(e,t){if(1!==e.args.length)return new lr(Vn.NA,Re.WrongArgNumber);if(e.args.some(e=>e.type===W.EMPTY))return new lr(Vn.NUM,Re.EmptyArg);let n=e.args[0];while(n.type===W.PARENTHESIS)n=n.expression;if(n.type===W.CELL_RANGE||n.type===W.ROW_RANGE)return n.end.row-n.start.row+1;if(n.type===W.CELL_REFERENCE)return 1;if(n.type===W.COLUMN_RANGE)return this.config.maxRows;{const e=this.evaluateAst(n,t);return e instanceof Ht?e.height():e instanceof lr?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(e,t,n)=>{var r,i,s,o,a,l;return n<1||t<1?new lr(Vn.VALUE,Re.LessThanOne):n>e.width()||t>e.height()?new lr(Vn.NUM,Re.ValueLarge):null!==(l=null!==(s=null===(i=null===(r=null===e||void 0===e?void 0:e.data)||void 0===r?void 0:r[t-1])||void 0===i?void 0:i[n-1])&&void 0!==s?s:null===(a=null===(o=null===e||void 0===e?void 0:e.data)||void 0===o?void 0:o[0])||void 0===a?void 0:a[0])&&void 0!==l?l:new lr(Vn.VALUE,Re.CellRangeExpected)})}na(e,t){return new lr(Vn.NA)}sheet(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEET"),()=>t.formulaAddress.sheet+1,e=>e.sheet+1,e=>{const t=this.dependencyGraph.sheetMapping.get(e);return void 0!==t?t+1:new lr(Vn.NA,Re.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new lr(Vn.VALUE,Re.CellRefExpected))}}Ja.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:Qr.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:Qr.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:Qr.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:Qr.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:Qr.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:Qr.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:Qr.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:Qr.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:Qr.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:Qr.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:Qr.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:Qr.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:Qr.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:Qr.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:Qr.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:Qr.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:Qr.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Qa extends Zr{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2===0)}}Qa.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Za extends Zr{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2===1)}}Za.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class el extends Zr{log10(e,t){return this.runFunction(e.args,t,this.metadata("LOG10"),Math.log10)}log(e,t){return this.runFunction(e.args,t,this.metadata("LOG"),(e,t)=>Math.log(e)/Math.log(t))}ln(e,t){return this.runFunction(e.args,t,this.metadata("LN"),Math.log)}}el.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:Qr.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const tl=parseFloat(Math.PI.toFixed(14));class nl extends Zr{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>tl)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(tl*e))}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function rl(e,t){return new ei(t.width,e.height)}function il(e,t,n){return new ei(1+(e.width-t)/n,1+(e.height-t)/n)}nl.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:Qr.NUMBER,minValue:0}]}};class sl extends Zr{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new lr(Vn.VALUE,Re.NumberRange);if(t.height()!==e.width())return new lr(Vn.VALUE,Re.ArrayDimensions);const n=rl(e.size,t.size),r=this.createKernel((function(e,t,n){let r=0;for(let i=0;i<n;++i)r+=e[this.thread.y][i]*t[i][this.thread.x];return r}),n)(e.rawNumbers(),t.rawNumbers(),e.width());return Ht.onlyNumbers(r)})}mmultArraySize(e,t){if(2!==e.args.length)return ei.error();const n=this.metadata("MMULT"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),[i,s]=r;return rl(i,s)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,n=t)=>{if(!e.hasOnlyNumbers())return new lr(Vn.VALUE,Re.NumberRange);const r=il(e.size,t,n),i=this.createKernel((function(e,t,n){const r=this.thread.x*n,i=this.thread.y*n;let s=e[i][r];for(let o=0;o<t;o++)for(let n=0;n<t;n++)s=Math.max(s,e[i+o][r+n]);return s}),r)(e.rawNumbers(),t,n);return Ht.onlyNumbers(i)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,n=t)=>{if(!e.hasOnlyNumbers())return new lr(Vn.VALUE,Re.NumberRange);const r=il(e.size,t,n),i=this.createKernel((function(e,t,n){const r=this.thread.x*n,i=this.thread.y*n;let s=e[i][r];for(let h=0;h<t;h++)for(let n=0;n<t;n++)s=Math.max(s,e[i+h][r+n]);let o=e[i][r];for(let h=0;h<t;h++)for(let n=0;n<t;n++)o=Math.min(o,e[i+h][r+n]);const a=t*t;let l=o,c=s,u=42;for(let h=0;h<32;h++){const n=(l+c)/2;let s=0;for(let o=0;o<t;o++)for(let a=0;a<t;a++)e[i+o][r+a]>n&&s++;if(t%2===0){if(s===a/2){u=n;break}s>a/2?l=n:c=n}else{if(s===(a-1)/2){u=n;break}s>(a-1)/2?l=n:c=n}}return u}),r)(e.rawNumbers(),t,n);return Ht.onlyNumbers(i)})}maxpoolArraySize(e,t){if(e.args.length<2||e.args.length>3)return ei.error();const n=this.metadata("MAXPOOL"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),i=r[0],s=e.args[1];let o;o=s.type===W.NUMBER?s.value:1;let a=o;if(3===e.args.length){const t=e.args[2];a=t.type===W.NUMBER?t.value:1}return o>i.width||o>i.height||a>o||(i.width-o)%a!==0||(i.height-o)%a!==0?ei.error():il(i,o,a)}medianpoolArraySize(e,t){return this.maxpoolArraySize(e,t)}transpose(e,t){return this.runFunction(e.args,t,this.metadata("TRANSPOSE"),e=>{const t=e.rawData(),n=e.size,r=[];for(let i=0;i<n.width;++i){r[i]=[];for(let e=0;e<n.height;++e)r[i][e]=t[e][i]}return Ht.onlyValues(r)})}transposeArraySize(e,t){if(1!==e.args.length)return ei.error();const n=this.metadata("TRANSPOSE"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Mr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),[i]=r;return new ei(i.height,i.width)}createKernel(e,t){return function(...n){const r=[];for(let i=0;i<t.height;++i){r.push([]);for(let s=0;s<t.width;++s)r[i][s]=e.apply({thread:{x:s,y:i}},n)}return r}}}sl.implementedFunctions={MMULT:{method:"mmult",arraySizeMethod:"mmultArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",arraySizeMethod:"transposeArraySize",parameters:[{argumentType:Qr.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",arraySizeMethod:"maxpoolArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",arraySizeMethod:"medianpoolArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class ol extends Zr{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof lr?t:0===t.length?new lr(Vn.NUM,Re.OneValue):(t.sort((e,t)=>e-t),t.length%2===0?(t[t.length/2-1]+t[t.length/2])/2:t[Math.floor(t.length/2)])})}large(e,t){return this.runFunction(e.args,t,this.metadata("LARGE"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return n instanceof lr?n:(n.sort((e,t)=>e-t),t=Math.trunc(t),t>n.length?new lr(Vn.NUM,Re.ValueLarge):n[n.length-t])})}small(e,t){return this.runFunction(e.args,t,this.metadata("SMALL"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return n instanceof lr?n:(n.sort((e,t)=>e-t),t=Math.trunc(t),t>n.length?new lr(Vn.NUM,Re.ValueLarge):n[t-1])})}}ol.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER,minValue:1}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class al extends Zr{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new lr(Vn.DIV_BY_ZERO):e%t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function ll(e){return At(e)&&!Number.isFinite(St(e))?0:e}al.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]}};class cl{constructor(e,t,n){this.sumsq=e,this.sum=t,this.count=n}static single(e){return new cl(e*e,e,1)}compose(e){return new cl(this.sumsq+e.sumsq,this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}varSValue(){return this.count>1?(this.sumsq-this.sum*this.sum/this.count)/(this.count-1):void 0}varPValue(){return this.count>0?(this.sumsq-this.sum*this.sum/this.count)/this.count:void 0}}cl.empty=new cl(0,0,0);class ul extends Zr{constructor(){super(...arguments),this.addWithEpsilonRaw=(e,t)=>this.arithmeticHelper.addWithEpsilonRaw(e,t)}sum(e,t){return this.doSum(e.args,t)}sumsq(e,t){return this.reduce(e.args,t,0,"SUMSQ",this.addWithEpsilonRaw,e=>Math.pow(St(e),2),hl)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){const n=this.reduce(e.args,t,Number.NEGATIVE_INFINITY,"MAXA",(e,t)=>Math.max(e,t),St,dl);return ll(n)}min(e,t){return this.doMin(e.args,t)}mina(e,t){const n=this.reduce(e.args,t,Number.POSITIVE_INFINITY,"MINA",(e,t)=>Math.min(e,t),St,dl);return ll(n)}count(e,t){return this.doCount(e.args,t)}counta(e,t){return this.doCounta(e.args,t)}average(e,t){return this.doAverage(e.args,t)}averagea(e,t){var n;const r=this.reduce(e.args,t,cl.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>cl.single(St(e)),dl);return r instanceof lr?r:null!==(n=r.averageValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}vars(e,t){return this.doVarS(e.args,t)}varp(e,t){return this.doVarP(e.args,t)}vara(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof lr?r:null!==(n=r.varSValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}varpa(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof lr?r:null!==(n=r.varPValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}stdevs(e,t){return this.doStdevS(e.args,t)}stdevp(e,t){return this.doStdevP(e.args,t)}stdeva(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof lr)return n;{const e=n.varSValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof lr)return n;{const e=n.varPValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}product(e,t){return this.doProduct(e.args,t)}subtotal(e,t){if(e.args.length<2)return new lr(Vn.NA,Re.WrongArgNumber);const n=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:Qr.NUMBER},t),r=e.args.slice(1);switch(n){case 1:case 101:return this.doAverage(r,t);case 2:case 102:return this.doCount(r,t);case 3:case 103:return this.doCounta(r,t);case 4:case 104:return this.doMax(r,t);case 5:case 105:return this.doMin(r,t);case 6:case 106:return this.doProduct(r,t);case 7:case 107:return this.doStdevS(r,t);case 8:case 108:return this.doStdevP(r,t);case 9:case 109:return this.doSum(r,t);case 10:case 110:return this.doVarS(r,t);case 11:case 111:return this.doVarP(r,t);default:return new lr(Vn.VALUE,Re.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,cl.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>cl.single(St(e)),hl)}reduceAggregateA(e,t){return this.reduce(e,t,cl.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>cl.single(St(e)),dl)}doAverage(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.averageValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}doVarS(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.varSValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}doVarP(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.varPValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}doStdevS(e,t){const n=this.reduceAggregate(e,t);if(n instanceof lr)return n;{const e=n.varSValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){const n=this.reduceAggregate(e,t);if(n instanceof lr)return n;{const e=n.varPValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,St,e=>At(e)?1:0)}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,St,e=>e===vt?0:1)}doMax(e,t){const n=this.reduce(e,t,Number.NEGATIVE_INFINITY,"MAX",(e,t)=>Math.max(e,t),St,hl);return ll(n)}doMin(e,t){const n=this.reduce(e,t,Number.POSITIVE_INFINITY,"MIN",(e,t)=>Math.min(e,t),St,hl);return ll(n)}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,St,hl)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,St,hl)}reduce(e,t,n,r,i,s,o){return e.length<1?new lr(Vn.NA,Re.WrongArgNumber):e.reduce((e,a)=>{if(e instanceof lr)return e;if(a.type===W.CELL_RANGE||a.type===W.COLUMN_RANGE||a.type===W.ROW_RANGE){const l=this.evaluateRange(a,t,n,r,i,s,o);return l instanceof lr?l:i(l,e)}let l;if(l=this.evaluateAst(a,t),l instanceof Ht){const t=Array.from(l.valuesFromTopLeftCorner()).map(o).filter(e=>void 0!==e);return t.map(e=>e instanceof lr?e:s(e)).reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),e)}if(a.type===W.CELL_REFERENCE){if(l=o(l),void 0===l)return e}else if(l=this.coerceScalarToNumberOrError(l),l=o(l),void 0===l)return e;return l instanceof lr?l:i(e,s(l))},n)}evaluateRange(e,t,n,r,i,s,o){let a;try{a=Er.fromAst(e,t.formulaAddress)}catch(u){if(u instanceof $t)return new lr(Vn.REF,Re.RangeManySheets);throw u}const l=this.dependencyGraph.getRange(a.start,a.end);if(void 0===l)throw new Error("Range does not exists in graph");let c=l.getFunctionValue(r);if(void 0===c){const e=this.getRangeValues(r,a,l,s,o);c=e.reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),n),l.setFunctionValue(r,c)}return c}getRangeValues(e,t,n,r,i){const s=[],{smallerRangeVertex:o,restRange:a}=this.dependencyGraph.rangeMapping.findSmallerRange(t);let l;if(void 0!==o&&this.dependencyGraph.existsEdge(o,n)){const t=o.getFunctionValue(e);if(void 0!==t)s.push(t);else for(const e of o.range.addresses(this.dependencyGraph)){const t=i(this.dependencyGraph.getScalarValue(e));t instanceof lr?s.push(t):void 0!==t&&s.push(r(t))}l=a}else l=t;for(const c of l.addresses(this.dependencyGraph)){const e=i(this.dependencyGraph.getScalarValue(c));e instanceof lr?s.push(e):void 0!==e&&s.push(r(e))}return s}}function hl(e){return At(e)||e instanceof lr?e:void 0}function dl(e){return"boolean"===typeof e?xr(e):At(e)||e instanceof lr?e:"string"===typeof e?0:void 0}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */ul.implementedFunctions={SUM:{method:"sum",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},SUMSQ:{method:"sumsq",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MAX:{method:"max",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MIN:{method:"min",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MAXA:{method:"maxa",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MINA:{method:"mina",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},COUNT:{method:"count",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},COUNTA:{method:"counta",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},AVERAGE:{method:"average",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},AVERAGEA:{method:"averagea",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},PRODUCT:{method:"product",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"VAR.S":{method:"vars",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"VAR.P":{method:"varp",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},VARA:{method:"vara",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},VARPA:{method:"varpa",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"STDEV.S":{method:"stdevs",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"STDEV.P":{method:"stdevp",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},STDEVA:{method:"stdeva",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},STDEVPA:{method:"stdevpa",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},SUBTOTAL:{method:"subtotal",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.ANY}],repeatLastArgs:1}},ul.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class ml extends Zr{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}ml.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class fl extends Zr{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>e*(Math.PI/180))}}fl.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const pl=10,gl=255,yl=2,wl=36,bl="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";class _l extends Zr{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>Sl(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>Sl(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>Sl(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{const t=vl(e,2,pl);return void 0===t?new lr(Vn.NUM,Re.NotBinary):Rl(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{const n=vl(e,2,pl);return void 0===n?new lr(Vn.NUM,Re.NotBinary):Sl(Rl(n,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{const n=vl(e,2,pl);return void 0===n?new lr(Vn.NUM,Re.NotBinary):Sl(Rl(n,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{const t=vl(e,8,pl);return void 0===t?new lr(Vn.NUM,Re.NotOctal):Rl(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{const n=vl(e,8,pl);return void 0===n?new lr(Vn.NUM,Re.NotOctal):Sl(Rl(n,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{const n=vl(e,8,pl);return void 0===n?new lr(Vn.NUM,Re.NotOctal):Sl(Rl(n,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{const t=vl(e,16,pl);return void 0===t?new lr(Vn.NUM,Re.NotHex):Rl(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{const n=vl(e,16,pl);return void 0===n?new lr(Vn.NUM,Re.NotHex):Sl(Rl(n,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{const n=vl(e,16,pl);return void 0===n?new lr(Vn.NUM,Re.NotHex):Sl(Rl(n,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),Tl)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{const n=vl(e,t,gl);return void 0===n?new lr(Vn.NUM,Re.NotHex):parseInt(n,t)})}}function vl(e,t,n){const r=bl.substr(0,t),i=new RegExp(`^[${r}]+$`);if(!(e.length>n)&&i.test(e))return e}function Sl(e,t,n){if(e>Cl(t))return new lr(Vn.NUM,Re.ValueBaseLarge);if(e<El(t))return new lr(Vn.NUM,Re.ValueBaseSmall);const r=Ml(e,t);return void 0===n||e<0?r:r.length>n?new lr(Vn.NUM,Re.ValueBaseLong):ns(r,n)}function El(e){return-Math.pow(e,pl)/2}function Cl(e){return-El(e)-1}function Tl(e,t,n){const r=Ml(e,t);return void 0!==n&&n>r.length?ns(r,n):r}function Ml(e,t){const n=e<0?Math.pow(t,pl):0;return(e+n).toString(t).toUpperCase()}function Rl(e,t){const n=parseInt(e,t),r=Math.pow(t,pl);return n>=r/2?n-r:n}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */_l.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:Qr.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:Qr.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:Qr.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},DECIMAL:{method:"decimal",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,minValue:yl,maxValue:wl}]},BASE:{method:"base",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:yl,maxValue:wl},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:gl}]}};class Ol extends Zr{rand(e,t){return this.runFunction(e.args,t,this.metadata("RAND"),Math.random)}randbetween(e,t){return this.runFunction(e.args,t,this.metadata("RANDBETWEEN"),(e,t)=>t<e?new lr(Vn.NUM,Re.WrongOrder):(e=Math.ceil(e),t=Math.floor(t)+1,e===t&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function Nl(e){const t=Math.ceil(e);return t%2===1?t:t+1}function Al(e){const t=Math.ceil(e);return t%2===0?t:t+1}Ol.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],isVolatile:!0}};class Ll extends Zr{roundup(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.ceil(-e*n)/n:Math.ceil(e*n)/n})}rounddown(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.floor(-e*n)/n:Math.floor(e*n)/n})}round(e,t){return this.runFunction(e.args,t,this.metadata("ROUND"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n})}intFunc(e,t){return this.runFunction(e.args,t,this.metadata("INT"),e=>e<0?-Math.floor(-e):Math.floor(e))}even(e,t){return this.runFunction(e.args,t,this.metadata("EVEN"),e=>e<0?-Al(-e):Al(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-Nl(-e):Nl(e))}ceilingmath(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.MATH"),(e,t,n)=>0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t=-t),Math.ceil(e/t)*t))}ceiling(e,t){return this.runFunction(e.args,t,this.metadata("CEILING"),(e,t)=>0===e?0:0===t?new lr(Vn.DIV_BY_ZERO):e>0&&t<0?new lr(Vn.NUM,Re.DistinctSigns):Math.ceil(e/t)*t)}ceilingprecise(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.PRECISE"),(e,t)=>0===t||0===e?0:(t=Math.abs(t),Math.ceil(e/t)*t))}floormath(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.MATH"),(e,t,n)=>0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t*=-1),Math.floor(e/t)*t))}floor(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR"),(e,t)=>0===e?0:0===t?new lr(Vn.DIV_BY_ZERO):e>0&&t<0?new lr(Vn.NUM,Re.DistinctSigns):Math.floor(e/t)*t)}floorprecise(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.PRECISE"),(e,t)=>0===t||0===e?0:(t=Math.abs(t),Math.floor(e/t)*t))}}Ll.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:Qr.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:Qr.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:Qr.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1},{argumentType:Qr.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1},{argumentType:Qr.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1}]}},Ll.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Il extends Zr{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function*xl(){}function kl(e){const t=e[Symbol.iterator](),{done:n,value:r}=t.next();return n?{rest:xl()}:{value:r,rest:t}}Il.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const Dl=(e,t,n)=>{if(n.end.row>n.start.row){const r=mr(n.end.sheet,n.end.col,n.end.row-1),i=e.getRange(n.start,r);if(void 0!==i)return{smallerRangeVertex:i,restValuesRange:n.withStart(mr(n.start.sheet,n.start.col,n.end.row)),restConditionRanges:t.map(e=>e.withStart(mr(e.start.sheet,e.start.col,e.end.row)))}}return{restValuesRange:n,restConditionRanges:t}};class Hl{constructor(e,t,n,r,i){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=n,this.composeFunction=r,this.mapFunction=i,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(const i of t)if(!i.conditionRange.sameDimensionsAs(e))return new lr(Vn.VALUE,Re.EqualLength);const n=this.tryToGetRangeVertexForRangeValue(e),r=t.map(e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange));if(n&&r.every(e=>void 0!==e)){const i=t.map(e=>e.criterionPackage.raw).join(","),s=this.findAlreadyComputedValueInCache(n,this.cacheKey(t),i);if(void 0!==s)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),s;const o=this.buildNewCriterionCache(this.cacheKey(t),t.map(e=>e.conditionRange.range),e.range);return o.has(i)||o.set(i,[this.evaluateRangeValue(e,t),t.map(e=>e.criterionPackage.lambda)]),n.setCriterionFunctionValues(this.cacheKey(t),o),r.forEach(e=>{void 0!==e&&e.addDependentCacheRange(n)}),o.get(i)[0]}return this.evaluateRangeValue(e,t)}tryToGetRangeVertexForRangeValue(e){const t=e.range;return void 0===t?void 0:this.dependencyGraph.getRange(t.start,t.end)}reduceFunction(e){let t=this.reduceInitialValue;for(const n of e)t=this.composeFunction(t,n);return t}findAlreadyComputedValueInCache(e,t,n){return e.getCriterionFunctionValue(t,n)}evaluateRangeValue(e,t){const n=t.map(e=>e.criterionPackage.lambda),r=Array.from(e.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator](),i=t.map(e=>e.conditionRange.iterateValuesFromTopLeftCorner()),s=Fl(n,i,r);return this.reduceFunction(s)}buildNewCriterionCache(e,t,n){const r=this.dependencyGraph.getRange(n.start,n.end),{smallerRangeVertex:i,restConditionRanges:s,restValuesRange:o}=Dl(this.dependencyGraph,t,n);let a;a=void 0!==i&&this.dependencyGraph.existsEdge(i,r)?i.getCriterionFunctionValues(e):new Map;const l=new Map;return a.forEach(([e,t],n)=>{const r=Fl(t,s.map(e=>jl(this.dependencyGraph,e)),Array.from(jl(this.dependencyGraph,o)).map(this.mapFunction)[Symbol.iterator]()),i=this.composeFunction(e,this.reduceFunction(r));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),l.set(n,[i,t])}),l}}class Pl{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*jl(e,t){for(const n of t.addresses(e))yield St(e.getScalarValue(n))}function*Fl(e,t,n){for(const r of n){const n=t.map(e=>kl(e));if(!n.every(e=>Object.prototype.hasOwnProperty.call(e,"value")))return;const i=n.map(e=>St(e.value));Yl(i,e).every(([e,t])=>t(e))&&(yield r),t=n.map(e=>e.rest)}}function Yl(e,t){const n=[];for(let r=0;r<Math.min(e.length,t.length);r++)n.push([e[r],t[r]]);return n}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ul{constructor(e,t){this.sum=e,this.count=t}static single(e){return new Ul(e,1)}compose(e){return new Ul(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function Vl(e){return t=>{const n=t.map(e=>`${e.conditionRange.range.sheet},${e.conditionRange.range.start.col},${e.conditionRange.range.start.row}`);return[e,...n].join(",")}}function Bl(e){return At(e)&&!Number.isFinite(St(e))?0:e}function Wl(e){return e instanceof lr?e:At(e)?St(e):void 0}Ul.empty=new Ul(0,0);class Gl extends Zr{sumif(e,t){const n="SUMIF",r=(e,t,r)=>this.computeConditionalAggregationFunction(null!==r&&void 0!==r?r:e,[e,t],n,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),Wl);return this.runFunction(e.args,t,this.metadata(n),r)}sumifs(e,t){const n="SUMIFS",r=(e,...t)=>this.computeConditionalAggregationFunction(e,t,n,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),Wl);return this.runFunction(e.args,t,this.metadata(n),r)}averageif(e,t){const n="AVERAGEIF",r=(e,t,r)=>{const i=this.computeConditionalAggregationFunction(null!==r&&void 0!==r?r:e,[e,t],n,Ul.empty,(e,t)=>e.compose(t),e=>At(e)?Ul.single(St(e)):Ul.empty);return i instanceof lr?i:i.averageValue()||new lr(Vn.DIV_BY_ZERO)};return this.runFunction(e.args,t,this.metadata(n),r)}countif(e,t){const n="COUNTIF",r=(e,t)=>this.computeConditionalAggregationFunction(e,[e,t],n,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(n),r)}countifs(e,t){const n="COUNTIFS",r=(...e)=>this.computeConditionalAggregationFunction(e[0],e,n,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(n),r)}minifs(e,t){const n="MINIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t),i=(e,...t)=>{const i=this.computeConditionalAggregationFunction(e,t,n,Number.POSITIVE_INFINITY,r,Wl);return Bl(i)};return this.runFunction(e.args,t,this.metadata(n),i)}maxifs(e,t){const n="MAXIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t),i=(e,...t)=>{const i=this.computeConditionalAggregationFunction(e,t,n,Number.NEGATIVE_INFINITY,r,Wl);return Bl(i)};return this.runFunction(e.args,t,this.metadata(n),i)}computeConditionalAggregationFunction(e,t,n,r,i,s){const o=[];for(let a=0;a<t.length;a+=2){const e=t[a],n=this.interpreter.criterionBuilder.fromCellValue(t[a+1],this.arithmeticHelper);if(void 0===n)return new lr(Vn.VALUE,Re.BadCriterion);o.push(new Pl(e,n))}return new Hl(this.interpreter,Vl(n),r,i,s).compute(e,o)}}Gl.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2},MINIFS:{method:"minifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2},MAXIFS:{method:"maxifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class zl extends Zr{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(...e)=>{const t=e[0].width(),n=e[0].height();for(const s of e)if(s.width()!==t||s.height()!==n)return new lr(Vn.VALUE,Re.EqualLength);let r=0;const i=e.map(e=>e.iterateValuesFromTopLeftCorner());for(let s=0;s<t*n;s++){let e=1;for(const t of i){const n=t.next().value;if(n instanceof lr)return n;const r=this.coerceScalarToNumberOrError(n);At(r)?e*=St(r):e=0}r+=e}return r})}}zl.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:Qr.RANGE}],repeatLastArgs:1}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Kl extends Zr{concatenate(e,t){return this.runFunction(e.args,t,this.metadata("CONCATENATE"),(...e)=>"".concat(...e))}split(e,t){return this.runFunction(e.args,t,this.metadata("SPLIT"),(e,t)=>{const n=e.split(" ");return t>=n.length||t<0?new lr(Vn.VALUE,Re.IndexBounds):n[t]})}len(e,t){return this.runFunction(e.args,t,this.metadata("LEN"),e=>e.length)}lower(e,t){return this.runFunction(e.args,t,this.metadata("LOWER"),e=>e.toLowerCase())}trim(e,t){return this.runFunction(e.args,t,this.metadata("TRIM"),e=>e.replace(/^ +| +$/g,"").replace(/ +/g," "))}proper(e,t){return this.runFunction(e.args,t,this.metadata("PROPER"),e=>e.replace(/\p{L}+/gu,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()))}clean(e,t){return this.runFunction(e.args,t,this.metadata("CLEAN"),e=>e.replace(/[\u0000-\u001F]/g,""))}exact(e,t){return this.runFunction(e.args,t,this.metadata("EXACT"),(e,t)=>e===t)}rept(e,t){return this.runFunction(e.args,t,this.metadata("REPT"),(e,t)=>t<0?new lr(Vn.VALUE,Re.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new lr(Vn.VALUE,Re.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new lr(Vn.VALUE,Re.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,n)=>t<1?new lr(Vn.VALUE,Re.LessThanOne):n<0?new lr(Vn.VALUE,Re.NegativeLength):e.substring(t-1,t+n-1))}replace(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(e,t,n,r)=>t<1?new lr(Vn.VALUE,Re.LessThanOne):n<0?new lr(Vn.VALUE,Re.NegativeLength):e.substring(0,t-1)+r+e.substring(t+n-1))}search(e,t){return this.runFunction(e.args,t,this.metadata("SEARCH"),(e,t,n)=>{if(n<1||n>t.length)return new lr(Vn.VALUE,Re.LengthBounds);const r=e.toLowerCase(),i=t.substring(n-1).toLowerCase(),s=this.arithmeticHelper.requiresRegex(r)?this.arithmeticHelper.searchString(r,i):i.indexOf(r);return s>-1?s+n:new lr(Vn.VALUE,Re.PatternNotFound)})}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(e,t,n,r)=>{const i=this.escapeRegExpSpecialCharacters(t),s=new RegExp(i,"g");if(void 0===r)return e.replace(s,n);if(r<1)return new lr(Vn.VALUE,Re.LessThanOne);let o,a=0;while(null!==(o=s.exec(e)))if(r===++a)return e.substring(0,o.index)+n+e.substring(s.lastIndex);return e})}find(e,t){return this.runFunction(e.args,t,this.metadata("FIND"),(e,t,n)=>{if(n<1||n>t.length)return new lr(Vn.VALUE,Re.IndexBounds);const r=t.substring(n-1),i=r.indexOf(e)+n;return i>0?i:new lr(Vn.VALUE,Re.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof lr||"string"===typeof e?e:"")}upper(e,t){return this.runFunction(e.args,t,this.metadata("UPPER"),e=>e.toUpperCase())}escapeRegExpSpecialCharacters(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}Kl.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:Qr.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:Qr.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:Qr.STRING}]},MID:{method:"mid",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:Qr.STRING}]},T:{method:"t",parameters:[{argumentType:Qr.SCALAR}]},PROPER:{method:"proper",parameters:[{argumentType:Qr.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:Qr.STRING}]},REPT:{method:"rept",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:Qr.STRING}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Xl extends Zr{acos(e,t){return this.runFunction(e.args,t,this.metadata("ACOS"),Math.acos)}asin(e,t){return this.runFunction(e.args,t,this.metadata("ASIN"),Math.asin)}cos(e,t){return this.runFunction(e.args,t,this.metadata("COS"),Math.cos)}sin(e,t){return this.runFunction(e.args,t,this.metadata("SIN"),Math.sin)}tan(e,t){return this.runFunction(e.args,t,this.metadata("TAN"),Math.tan)}atan(e,t){return this.runFunction(e.args,t,this.metadata("ATAN"),Math.atan)}atan2(e,t){return this.runFunction(e.args,t,this.metadata("ATAN2"),(e,t)=>0===e&&0===t?new lr(Vn.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?tl/2:Math.atan(1/e))}sec(e,t){return this.runFunction(e.args,t,this.metadata("SEC"),e=>1/Math.cos(e))}csc(e,t){return this.runFunction(e.args,t,this.metadata("CSC"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.sin(e))}sinh(e,t){return this.runFunction(e.args,t,this.metadata("SINH"),Math.sinh)}asinh(e,t){return this.runFunction(e.args,t,this.metadata("ASINH"),Math.asinh)}cosh(e,t){return this.runFunction(e.args,t,this.metadata("COSH"),Math.cosh)}acosh(e,t){return this.runFunction(e.args,t,this.metadata("ACOSH"),Math.acosh)}tanh(e,t){return this.runFunction(e.args,t,this.metadata("TANH"),Math.tanh)}atanh(e,t){return this.runFunction(e.args,t,this.metadata("ATANH"),Math.atanh)}coth(e,t){return this.runFunction(e.args,t,this.metadata("COTH"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new lr(Vn.NUM,Re.NonZero):Math.atanh(1/e))}sech(e,t){return this.runFunction(e.args,t,this.metadata("SECH"),e=>1/Math.cosh(e))}csch(e,t){return this.runFunction(e.args,t,this.metadata("CSCH"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.sinh(e))}}Xl.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:Qr.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:Qr.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:Qr.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:Qr.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:Qr.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:Qr.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:Qr.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:Qr.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:Qr.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:Qr.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:Qr.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:Qr.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:Qr.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:Qr.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:Qr.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:Qr.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:Qr.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:Qr.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:Qr.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class $l extends Qo{constructor(e){super(e),this.dependencyGraph=e}find(e,t,n){return this.basicFind(e,t,"col",n)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ql extends Zr{constructor(){super(...arguments),this.rowSearch=new $l(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(e,t,n,r)=>{const i=t.range;return void 0===i?new lr(Vn.VALUE,Re.WrongType):n<1?new lr(Vn.VALUE,Re.LessThanOne):n>i.width()?new lr(Vn.REF,Re.IndexLarge):this.doVlookup(Pr(e),t,n-1,r)})}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(e,t,n,r)=>{const i=t.range;return void 0===i?new lr(Vn.VALUE,Re.WrongType):n<1?new lr(Vn.VALUE,Re.LessThanOne):n>i.height()?new lr(Vn.REF,Re.IndexLarge):this.doHlookup(Pr(e),t,n-1,r)})}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,n)=>this.doMatch(Pr(e),t,n))}searchInRange(e,t,n,r){if(!n&&"string"===typeof e&&this.arithmeticHelper.requiresRegex(e))return r.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t);{const i=n?{ordering:"asc"}:{ordering:"none",matchExactly:!0};return r.find(e,t,i)}}doVlookup(e,t,n,r){this.dependencyGraph.stats.start(It.VLOOKUP);const i=t.range;let s;s=void 0===i?Ht.onlyValues(t.data.map(e=>[e[0]])):Ht.onlyRange(Er.spanFrom(i.start,1,i.height()),this.dependencyGraph);const o=this.searchInRange(e,s,r,this.columnSearch);if(this.dependencyGraph.stats.end(It.VLOOKUP),-1===o)return new lr(Vn.NA,Re.ValueNotFound);let a;if(void 0===i)a=t.data[o][n];else{const e=mr(i.sheet,i.start.col+n,i.start.row+o);a=this.dependencyGraph.getCellValue(e)}return a instanceof Ht?new lr(Vn.VALUE,Re.WrongType):a}doHlookup(e,t,n,r){const i=t.range;let s;s=void 0===i?Ht.onlyValues([t.data[0]]):Ht.onlyRange(Er.spanFrom(i.start,i.width(),1),this.dependencyGraph);const o=this.searchInRange(e,s,r,this.rowSearch);if(-1===o)return new lr(Vn.NA,Re.ValueNotFound);let a;if(void 0===i)a=t.data[n][o];else{const e=mr(i.sheet,i.start.col+o,i.start.row+n);a=this.dependencyGraph.getCellValue(e)}return a instanceof Ht?new lr(Vn.VALUE,Re.WrongType):a}doMatch(e,t,n){if(![-1,0,1].includes(n))return new lr(Vn.VALUE,Re.BadMode);if(t.width()>1&&t.height()>1)return new lr(Vn.NA);const r=1===t.width()?this.columnSearch:this.rowSearch,i=0===n?{ordering:"none",matchExactly:!0}:{ordering:-1===n?"desc":"asc"},s=r.find(e,t,i);return-1===s?new lr(Vn.NA,Re.ValueNotFound):s+1}}ql.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.BOOLEAN,defaultValue:!0}]},MATCH:{method:"match",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER,defaultValue:1}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Jl extends Zr{roman(e,t){return this.runFunction(e.args,t,this.metadata("ROMAN"),(e,t)=>(e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),t=St(this.coerceScalarToNumberOrError(t)),t instanceof lr?t:(t=Math.trunc(t),t<0?new lr(Vn.VALUE,Re.ValueSmall):t>4?new lr(Vn.VALUE,Re.ValueLarge):Zl(e,t))))}arabic(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),e=>{e=e.trim().toUpperCase();let t=!1;if(e.startsWith("-")&&(e=e.slice(1),t=!0,""===e))return new lr(Vn.VALUE,Re.InvalidRoman);const n={input:e,acc:0};return Ql(n,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),Ql(n,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),Ql(n,{token:"D",val:500},{token:"ID",val:499},{token:"VD",val:495},{token:"XD",val:490},{token:"LD",val:450},{token:"CD",val:400}),Ql(n,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),Ql(n,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),Ql(n,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),Ql(n,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),Ql(n,{token:"IX",val:9}),Ql(n,{token:"V",val:5},{token:"IV",val:4}),Ql(n,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==n.input?new lr(Vn.VALUE,Re.InvalidRoman):t?-n.acc:n.acc})}}function Ql(e,...t){for(const n of t)if(e.input.startsWith(n.token)){e.input=e.input.slice(n.token.length),e.acc+=n.val;break}}function Zl(e,t){const n={val:e%1e3,acc:"M".repeat(Math.floor(e/1e3))};return 4===t&&(ec(n,"IM",999,1e3),ec(n,"ID",499,500)),t>=3&&(ec(n,"VM",995,1e3),ec(n,"VD",495,500)),t>=2&&(ec(n,"XM",990,1e3),ec(n,"XD",490,500)),t>=1&&(ec(n,"LM",950,1e3),ec(n,"LD",450,500)),ec(n,"CM",900,1e3),ec(n,"CD",400,500),ec(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,t>=2&&(ec(n,"IC",99,100),ec(n,"IL",49,50)),t>=1&&(ec(n,"VC",95,100),ec(n,"VL",45,50)),ec(n,"XC",90,100),ec(n,"XL",40,50),ec(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,ec(n,"IX",9,10),ec(n,"IV",4,5),ec(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc}function ec(e,t,n,r){e.val>=n&&e.val<r&&(e.val-=n,e.acc+=t)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Jl.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:Qr.NUMBER,minValue:1,lessThan:4e3},{argumentType:Qr.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:Qr.STRING}]}};class tc extends Zr{add(e,t){return this.runFunction(e.args,t,this.metadata("HF.ADD"),this.arithmeticHelper.addWithEpsilon)}concat(e,t){return this.runFunction(e.args,t,this.metadata("HF.CONCAT"),this.arithmeticHelper.concat)}divide(e,t){return this.runFunction(e.args,t,this.metadata("HF.DIVIDE"),this.arithmeticHelper.divide)}eq(e,t){return this.runFunction(e.args,t,this.metadata("HF.EQ"),this.arithmeticHelper.eq)}gt(e,t){return this.runFunction(e.args,t,this.metadata("HF.GT"),this.arithmeticHelper.gt)}gte(e,t){return this.runFunction(e.args,t,this.metadata("HF.GTE"),this.arithmeticHelper.geq)}lt(e,t){return this.runFunction(e.args,t,this.metadata("HF.LT"),this.arithmeticHelper.lt)}lte(e,t){return this.runFunction(e.args,t,this.metadata("HF.LTE"),this.arithmeticHelper.leq)}minus(e,t){return this.runFunction(e.args,t,this.metadata("HF.MINUS"),this.arithmeticHelper.subtract)}multiply(e,t){return this.runFunction(e.args,t,this.metadata("HF.MULTIPLY"),this.arithmeticHelper.multiply)}ne(e,t){return this.runFunction(e.args,t,this.metadata("HF.NE"),this.arithmeticHelper.neq)}pow(e,t){return this.runFunction(e.args,t,this.metadata("HF.POW"),this.arithmeticHelper.pow)}uminus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UMINUS"),this.arithmeticHelper.unaryMinus)}upercent(e,t){return this.runFunction(e.args,t,this.metadata("HF.UNARY_PERCENT"),this.arithmeticHelper.unaryPercent)}uplus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UPLUS"),this.arithmeticHelper.unaryPlus)}}tc.implementedFunctions={"HF.ADD":{method:"add",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.CONCAT":{method:"concat",parameters:[{argumentType:Qr.STRING,passSubtype:!0},{argumentType:Qr.STRING,passSubtype:!0}]},"HF.DIVIDE":{method:"divide",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.EQ":{method:"eq",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.GT":{method:"gt",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.GTE":{method:"gte",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.LT":{method:"lt",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.LTE":{method:"lte",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.MINUS":{method:"minus",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.MULTIPLY":{method:"multiply",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.NE":{method:"ne",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.POW":{method:"pow",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.UMINUS":{method:"uminus",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.UNARY_PERCENT":{method:"upercent",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.UPLUS":{method:"uplus",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0}]}};
- /**
- * @license
- bessel.js (C) 2013-present SheetJS -- http://sheetjs.com
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- 1. Definitions.
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
- END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
- Copyright (C) 2013-present SheetJS LLC
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
- var nc=Math;function rc(e,t){for(var n=0,r=0;n<e.length;++n)r=t*r+e[n];return r}function ic(e,t,n,r,i){if(0===t)return n;if(1===t)return r;for(var s=2/e,o=r,a=1;a<t;++a)o=r*a*s+i*n,n=r,r=o;return o}function sc(e,t,n,r,i){return function(n,s){if(r){if(0===n)return 1==r?-1/0:1/0;if(n<0)return NaN}if(0===s)return e(n);if(1===s)return t(n);if(s<0)return NaN;s|=0;var o=e(n),a=t(n);return ic(n,s,o,a,i)}}var oc=function(){var e=.636619772,t=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),n=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse();function s(s){var o=0,a=0,l=0,c=s*s;if(s<8)a=rc(t,c),l=rc(n,c),o=a/l;else{var u=s-.785398164;c=64/c,a=rc(r,c),l=rc(i,c),o=nc.sqrt(e/s)*(nc.cos(u)*a-nc.sin(u)*l*8/s)}return o}var o=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),a=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),c=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function u(t){var n=0,r=0,i=0,s=t*t,u=nc.abs(t)-2.356194491;return Math.abs(t)<8?(r=t*rc(o,s),i=rc(a,s),n=r/i):(s=64/s,r=rc(l,s),i=rc(c,s),n=nc.sqrt(e/nc.abs(t))*(nc.cos(u)*r-nc.sin(u)*i*8/nc.abs(t)),t<0&&(n=-n)),n}return function e(t,n){if(n=Math.round(n),!isFinite(t))return isNaN(t)?t:0;if(n<0)return(n%2?-1:1)*e(t,-n);if(t<0)return(n%2?-1:1)*e(-t,n);if(0===n)return s(t);if(1===n)return u(t);if(0===t)return 0;var r=0;if(t>n)r=ic(t,n,s(t),u(t),-1);else{for(var i=2*nc.floor((n+nc.floor(nc.sqrt(40*n)))/2),o=!1,a=0,l=0,c=1,h=0,d=2/t,m=i;m>0;m--)h=m*d*c-a,a=c,c=h,nc.abs(c)>1e10&&(c*=1e-10,a*=1e-10,r*=1e-10,l*=1e-10),o&&(l+=c),o=!o,m==n&&(r=a);l=2*l-c,r/=l}return r}}(),ac=function(){var e=.636619772,t=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),n=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse();function s(s){var o=0,a=0,l=0,c=s*s,u=s-.785398164;return s<8?(a=rc(t,c),l=rc(n,c),o=a/l+e*oc(s,0)*nc.log(s)):(c=64/c,a=rc(r,c),l=rc(i,c),o=nc.sqrt(e/s)*(nc.sin(u)*a+nc.cos(u)*l*8/s)),o}var o=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),a=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),c=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function u(t){var n=0,r=0,i=0,s=t*t,u=t-2.356194491;return t<8?(r=t*rc(o,s),i=rc(a,s),n=r/i+e*(oc(t,1)*nc.log(t)-1/t)):(s=64/s,r=rc(l,s),i=rc(c,s),n=nc.sqrt(e/t)*(nc.sin(u)*r+nc.cos(u)*i*8/t)),n}return sc(s,u,"BESSELY",1,-1)}(),lc=function(){var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),t=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse();function n(n){return n<=3.75?rc(e,n*n/14.0625):nc.exp(nc.abs(n))/nc.sqrt(nc.abs(n))*rc(t,3.75/nc.abs(n))}var r=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),i=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();function s(e){return e<3.75?e*rc(r,e*e/14.0625):(e<0?-1:1)*nc.exp(nc.abs(e))/nc.sqrt(nc.abs(e))*rc(i,3.75/nc.abs(e))}return function e(t,r){if(r=Math.round(r),0===r)return n(t);if(1===r)return s(t);if(r<0)return NaN;if(0===nc.abs(t))return 0;if(t==1/0)return 1/0;var i,o=0,a=2/nc.abs(t),l=0,c=1,u=0,h=2*nc.round((r+nc.round(nc.sqrt(40*r)))/2);for(i=h;i>0;i--)u=i*a*c+l,l=c,c=u,nc.abs(c)>1e10&&(c*=1e-10,l*=1e-10,o*=1e-10),i==r&&(o=l);return o*=e(t,0)/c,t<0&&r%2?-o:o}}(),cc=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse();function n(n){return n<=2?-nc.log(n/2)*lc(n,0)+rc(e,n*n/4):nc.exp(-n)/nc.sqrt(n)*rc(t,2/n)}var r=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),i=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();function s(e){return e<=2?nc.log(e/2)*lc(e,1)+1/e*rc(r,e*e/4):nc.exp(-e)/nc.sqrt(e)*rc(i,2/e)}return sc(n,s,"BESSELK",2,1)}();
- /**
- * @license
- Copyright (c) 2013 jStat
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
- function uc(e){const t=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18];let n,r,i,s,o=t.length-1,a=!1,l=0,c=0;if(0===e)return 0;for(e<0&&(e=-e,a=!0),n=2/(2+e),r=4*n-2;o>0;o--)i=l,l=r*l-c+t[o],c=i;return s=n*Math.exp(-e*e+.5*(t[0]+r*l)-c),a?s-1:1-s}function hc(e){return 1-uc(e)}function dc(e){let t,n,r,i,s=0;if(e>=2)return-100;if(e<=0)return 100;for(i=e<1?e:2-e,r=Math.sqrt(-2*Math.log(i/2)),t=-.70711*((2.30753+.27061*r)/(1+r*(.99229+.04481*r))-r);s<2;s++)n=hc(t)-i,t+=n/(1.1283791670955126*Math.exp(-t*t)-t*n);return e<1?t:-t}const mc={pdf:(e,t)=>e<0?0:t*Math.exp(-t*e),cdf:(e,t)=>e<0?0:1-Math.exp(-t*e)};function fc(e){const t=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],n=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535];let r,i,s,o,a=!1,l=0,c=0,u=0,h=e;if(e>171.6243769536076)return 1/0;if(h<=0){if(o=h%1,!o)return 1/0;a=(1&h?-1:1)*Math.PI/Math.sin(Math.PI*o),h=1-h}for(s=h,i=h<1?h++:(h-=l=(0|h)-1)-1,r=0;r<8;++r)u=(u+t[r])*i,c=c*i+n[r];if(o=u/c+1,s<h)o/=s;else if(s>h)for(r=0;r<l;++r)o*=h,h++;return a&&(o=a/o),o}const pc={pdf:function(e,t,n){return e<0?0:0===e&&1===t?1/n:Math.exp((t-1)*Math.log(e)-e/n-gc(t)-t*Math.log(n))},cdf:function(e,t,n){return e<0?0:yc(t,e/n)},inv:function(e,t,n){return wc(e,t)*n}};function gc(e){let t=0;const n=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];let r,i,s,o=1.000000000190015;for(s=(i=r=e)+5.5,s-=(r+.5)*Math.log(s);t<6;t++)o+=n[t]/++i;return Math.log(2.5066282746310007*o/r)-s}function yc(e,t){const n=gc(e);let r=e,i=1/e,s=i,o=t+1-e,a=1/1e-30,l=1/o,c=l,u=1;const h=-~(8.5*Math.log(e>=1?e:1/e)+.4*e+17);let d;if(t<0||e<=0)return NaN;if(t<e+1){for(;u<=h;u++)i+=s*=t/++r;return i*Math.exp(-t+e*Math.log(t)-n)}for(;u<=h;u++)d=-u*(u-e),o+=2,l=d*l+o,a=o+d/a,l=1/l,c*=l*a;return 1-c*Math.exp(-t+e*Math.log(t)-n)}function wc(e,t){let n=0;const r=t-1,i=1e-8,s=gc(t);let o,a,l,c,u,h,d;if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(h=Math.log(r),d=Math.exp(r*(h-1)-s),u=e<.5?e:1-e,l=Math.sqrt(-2*Math.log(u)),o=(2.30753+.27061*l)/(1+l*(.99229+.04481*l))-l,e<.5&&(o=-o),o=Math.max(.001,t*Math.pow(1-1/(9*t)-o/(3*Math.sqrt(t)),3))):(l=1-t*(.253+.12*t),o=e<l?Math.pow(e/l,1/t):1-Math.log(1-(e-l)/(1-l)));n<12;n++){if(o<=0)return 0;if(a=yc(t,o)-e,l=t>1?d*Math.exp(-(o-r)+r*(Math.log(o)-h)):Math.exp(-o+r*Math.log(o)-s),c=a/l,o-=l=c/(1-.5*Math.min(1,c*((t-1)/o-1))),o<=0&&(o=.5*(o+l)),Math.abs(l)<i*o)break}return o}const bc={pdf:function(e,t,n){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(e-t,2)/(2*n*n))},cdf:function(e,t,n){return.5*(1+uc((e-t)/Math.sqrt(2*n*n)))},inv:function(e,t,n){return-1.4142135623730951*n*dc(2*e)+t}},_c={pdf:function(e,t,n){return e>1||e<0?0:1==t&&1==n?1:t<512&&n<512?Math.pow(e,t-1)*Math.pow(1-e,n-1)/vc(t,n):Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-Sc(t,n))},cdf:function(e,t,n){return e>1||e<0?+(e>1):Cc(e,t,n)},inv:function(e,t,n){return Ec(e,t,n)}};function vc(e,t){if(!(e<=0||t<=0))return e+t>170?Math.exp(Sc(e,t)):fc(e)*fc(t)/fc(e+t)}function Sc(e,t){return gc(e)+gc(t)-gc(e+t)}function Ec(e,t,n){var r,i,s,o,a,l,c,u,h,d,m,f=1e-8,p=t-1,g=n-1,y=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&n>=1?(s=e<.5?e:1-e,o=Math.sqrt(-2*Math.log(s)),c=(2.30753+.27061*o)/(1+o*(.99229+.04481*o))-o,e<.5&&(c=-c),u=(c*c-3)/6,h=2/(1/(2*t-1)+1/(2*n-1)),d=c*Math.sqrt(u+h)/h-(1/(2*n-1)-1/(2*t-1))*(u+5/6-2/(3*h)),c=t/(t+n*Math.exp(2*d))):(r=Math.log(t/(t+n)),i=Math.log(n/(t+n)),o=Math.exp(t*r)/t,a=Math.exp(n*i)/n,d=o+a,c=e<o/d?Math.pow(t*d*e,1/t):1-Math.pow(n*d*(1-e),1/n)),m=-gc(t)-gc(n)+gc(t+n);y<10;y++){if(0===c||1===c)return c;if(l=Cc(c,t,n)-e,o=Math.exp(p*Math.log(c)+g*Math.log(1-c)+m),a=l/o,c-=o=a/(1-.5*Math.min(1,a*(p/c-g/(1-c)))),c<=0&&(c=.5*(c+o)),c>=1&&(c=.5*(c+o+1)),Math.abs(o)<f*c&&y>0)break}return c}function Cc(e,t,n){var r=0===e||1===e?0:Math.exp(gc(t+n)-gc(t)-gc(n)+t*Math.log(e)+n*Math.log(1-e));return!(e<0||e>1)&&(e<(t+1)/(t+n+2)?r*Tc(e,t,n)/t:1-r*Tc(1-e,n,t)/n)}function Tc(e,t,n){var r,i,s,o,a=1e-30,l=1,c=t+n,u=t+1,h=t-1,d=1,m=1-c*e/u;for(Math.abs(m)<a&&(m=a),m=1/m,o=m;l<=100;l++)if(r=2*l,i=l*(n-l)*e/((h+r)*(t+r)),m=1+i*m,Math.abs(m)<a&&(m=a),d=1+i/d,Math.abs(d)<a&&(d=a),m=1/m,o*=m*d,i=-(t+l)*(c+l)*e/((t+r)*(u+r)),m=1+i*m,Math.abs(m)<a&&(m=a),d=1+i/d,Math.abs(d)<a&&(d=a),m=1/m,s=m*d,o*=s,Math.abs(s-1)<3e-7)break;return o}const Mc={pdf:function(e,t,n){return 0===n||1===n?t*n===e?1:0:Oc(t,e)*Math.pow(n,e)*Math.pow(1-n,t-e)},cdf:function(e,t,n){var r,i=1e-10;if(e<0)return 0;if(e>=t)return 1;if(n<0||n>1||t<=0)return NaN;e=Math.floor(e);var s=n,o=e+1,a=t-e,l=o+a,c=Math.exp(gc(l)-gc(a)-gc(o)+o*Math.log(s)+a*Math.log(1-s));return r=s<(o+1)/(l+2)?c*Rc(s,o,a,i):1-c*Rc(1-s,a,o,i),Math.round(1/i*(1-r))/(1/i)}};function Rc(e,t,n,r){var i,s=0,o=1,a=1,l=1,c=0,u=0;while(Math.abs((a-u)/a)>r)u=a,i=-(t+c)*(t+n+c)*e/(t+2*c)/(t+2*c+1),s=a+i*s,o=l+i*o,c+=1,i=c*(n-c)*e/(t+2*c-1)/(t+2*c),a=s+i*a,l=o+i*l,s/=l,o/=l,a/=l,l=1;return a/t}function Oc(e,t){return e>170||t>170?Math.exp(Nc(e,t)):Lc(e)/Lc(t)/Lc(e-t)}function Nc(e,t){return Ac(e)-Ac(t)-Ac(e-t)}function Ac(e){return e<0?NaN:gc(e+1)}function Lc(e){return e<0?NaN:fc(e+1)}const Ic={pdf:function(e,t){return e<0?0:0===e&&2===t?.5:Math.exp((t/2-1)*Math.log(e)-e/2-t/2*Math.log(2)-gc(t/2))},cdf:function(e,t){return e<0?0:yc(t/2,e/2)},inv:function(e,t){return 2*wc(e,.5*t)}},xc={pdf:function(e,t,n){var r,i,s;return e<0?0:t<=2?0===e&&t<2?1/0:0===e&&2===t?1:1/vc(t/2,n/2)*Math.pow(t/n,t/2)*Math.pow(e,t/2-1)*Math.pow(1+t/n*e,-(t+n)/2):(r=t*e/(n+e*t),i=n/(n+e*t),s=t*i/2,s*Mc.pdf((t-2)/2,(t+n-2)/2,r))},cdf:function(e,t,n){return e<0?0:Cc(t*e/(t*e+n),t/2,n/2)},inv:function(e,t,n){return n/(t*(1/Ec(e,t/2,n/2)-1))}},kc={pdf:function(e,t,n){return e<0||t<0||n<0?0:n/t*Math.pow(e/t,n-1)*Math.exp(-Math.pow(e/t,n))},cdf:function(e,t,n){return e<0?0:1-Math.exp(-Math.pow(e/t,n))}},Dc={pdf:function(e,t){return t<0||e%1!==0||e<0?0:Math.pow(t,e)*Math.exp(-t)/Lc(e)},cdf:function(e,t){var n=0;if(e<0)return 0;for(var r=0;n<=e;n++)r+=Dc.pdf(n,t);return r}},Hc={pdf:function(e,t,n,r){if(e<0||e<n-(t-r))return 0;if(e>r||e>n)return 0;if(2*n>t)return 2*r>t?Hc.pdf(t-n-r+e,t,t-n,t-r):Hc.pdf(r-e,t,t-n,r);if(2*r>t)return Hc.pdf(n-e,t,n,t-r);if(n<r)return Hc.pdf(e,t,r,n);for(var i=1,s=0,o=0;o<e;o++){while(i>1&&s<r)i*=1-n/(t-s),s++;i*=(r-o)*(n-o)/((o+1)*(t-n-r+o+1))}for(;s<r;s++)i*=1-n/(t-s);return Math.min(1,Math.max(0,i))},cdf:function e(t,n,r,i){if(t<0||t<r-(n-i))return 0;if(t>=i||t>=r)return 1;if(2*r>n)return 2*i>n?e(n-r-i+t,n,n-r,n-i):1-Hc.cdf(i-t-1,n,n-r,i);if(2*i>n)return 1-Hc.cdf(r-t-1,n,r,n-i);if(r<i)return Hc.cdf(t,n,i,r);for(var s=1,o=1,a=0,l=0;l<t;l++){while(s>1&&a<i){var c=1-r/(n-a);o*=c,s*=c,a++}o*=(i-l)*(r-l)/((l+1)*(n-r-i+l+1)),s+=o}for(;a<i;a++)s*=1-r/(n-a);return Math.min(1,Math.max(0,s))}},Pc={pdf:function(e,t){return t=t>1e100?1e100:t,1/(Math.sqrt(t)*vc(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)},cdf:function(e,t){var n=t/2;return Cc((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),n,n)},inv:function(e,t){var n=Ec(2*Math.min(e,1-e),.5*t,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}},jc={pdf:function(e,t,n){return e<=0?0:Math.exp(-Math.log(e)-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(Math.log(e)-t,2)/(2*n*n))},cdf:function(e,t,n){return e<0?0:.5+.5*uc((Math.log(e)-t)/Math.sqrt(2*n*n))},inv:function(e,t,n){return Math.exp(-1.4142135623730951*n*dc(2*e)+t)}},Fc={pdf:function(e,t,n){return e===e>>>0&&(e<0?0:Oc(e+t-1,t-1)*Math.pow(1-n,e)*Math.pow(n,t))},cdf:function(e,t,n){var r=0,i=0;if(e<0)return 0;for(;i<=e;i++)r+=Fc.pdf(i,t,n);return r}};function Yc(e){var t=0,n=e.length;while(--n>=0)t+=e[n];return t}function Uc(e){return Yc(e)/e.length}function Vc(e){var t,n=Uc(e),r=0,i=e.length;while(--i>=0)t=e[i]-n,r+=t*t;return r}function Bc(e,t){return Vc(e)/(e.length-(t?1:0))}function Wc(e,t){return Math.sqrt(Bc(e,t))}function Gc(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(bc.inv(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(bc.inv(t[1]/2,0,1)*Wc(t[2])/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function zc(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(Pc.inv(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(Pc.inv(t[1]/2,t[2].length-1)*Wc(t[2],!0)/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function Kc(e){var t=1,n=e.length;while(--n>=0)t*=e[n];return t}function Xc(e){return Math.pow(Kc(e),1/e.length)}function $c(e,t){var n,r=Uc(e),i=Uc(t),s=e.length,o=new Array(s);for(n=0;n<s;n++)o[n]=(e[n]-r)*(t[n]-i);return Yc(o)/(s-1)}function qc(e,t){return $c(e,t)/Wc(e,1)/Wc(t,1)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Jc extends Zr{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?uc(e):uc(t)-uc(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),hc)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,n)=>n?mc.cdf(e,t):mc.pdf(e,t))}fisher(e,t){return this.runFunction(e.args,t,this.metadata("FISHER"),e=>Math.log((1+e)/(1-e))/2)}fisherinv(e,t){return this.runFunction(e.args,t,this.metadata("FISHERINV"),e=>1-2/(Math.exp(2*e)+1))}gamma(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA"),fc)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),(e,t,n,r)=>r?pc.cdf(e,t,n):pc.pdf(e,t,n))}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),gc)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),pc.inv)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>bc.cdf(e,0,1)-.5)}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),(e,t,n,r,i,s)=>e<=i?new lr(Vn.NUM,Re.ValueSmall):e>=s?new lr(Vn.NUM,Re.ValueLarge):(e=(e-i)/(s-i),r?_c.cdf(e,t,n):_c.pdf(e,t,n)))}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,n,r,i)=>r>=i?new lr(Vn.NUM,Re.WrongOrder):_c.inv(e,t,n)*(i-r)+r)}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),(e,t,n,r)=>e>t?new lr(Vn.NUM,Re.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),r?Mc.cdf(e,t,n):Mc.pdf(e,t,n)))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),(e,t,n)=>{e=Math.trunc(e);let r=-1,i=e;while(i>r+1){const s=Math.trunc((r+i)/2);Mc.cdf(s,e,t)>=n?i=s:r=s}return i})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>lc(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>oc(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>cc(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>ac(e,Math.trunc(t)))}chisqdist(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST"),(e,t,n)=>(t=Math.trunc(t),n?Ic.cdf(e,t):Ic.pdf(e,t)))}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-Ic.cdf(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>Ic.inv(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>Ic.inv(1-e,Math.trunc(t)))}fdist(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST"),(e,t,n,r)=>(t=Math.trunc(t),n=Math.trunc(n),r?xc.cdf(e,t,n):xc.pdf(e,t,n)))}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,n)=>1-xc.cdf(e,Math.trunc(t),Math.trunc(n)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,n)=>xc.inv(e,Math.trunc(t),Math.trunc(n)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,n)=>xc.inv(1-e,Math.trunc(t),Math.trunc(n)))}weibulldist(e,t){return this.runFunction(e.args,t,this.metadata("WEIBULL.DIST"),(e,t,n,r)=>r?kc.cdf(e,n,t):kc.pdf(e,n,t))}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),(e,t,n)=>(e=Math.trunc(e),n?Dc.cdf(e,t):Dc.pdf(e,t)))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),(e,t,n,r,i)=>e>t||e>n||t>r||n>r||e+r<n+t?new lr(Vn.NUM,Re.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),n=Math.trunc(n),r=Math.trunc(r),i?Hc.cdf(e,r,n,t):Hc.pdf(e,r,n,t)))}tdist(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST"),(e,t,n)=>(t=Math.trunc(t),n?Pc.cdf(e,t):Pc.pdf(e,t)))}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>2*(1-Pc.cdf(e,Math.trunc(t))))}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-Pc.cdf(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,n)=>n*(1-Pc.cdf(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>Pc.inv(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>Pc.inv(1-e/2,Math.trunc(t)))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),(e,t,n,r)=>r?jc.cdf(e,t,n):jc.pdf(e,t,n))}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,n)=>jc.inv(e,t,n))}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,n,r)=>r?bc.cdf(e,t,n):bc.pdf(e,t,n))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,n)=>bc.inv(e,t,n))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?bc.cdf(e,0,1):bc.pdf(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>bc.inv(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>bc.pdf(e,0,1))}negbinomdist(e,t){return this.runFunction(e.args,t,this.metadata("NEGBINOM.DIST"),(e,t,n,r)=>(e=Math.trunc(e),t=Math.trunc(t),r?Fc.cdf(e,t,n):Fc.pdf(e,t,n)))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),(e,t,n)=>Gc(1,e,t,Math.trunc(n))[1]-1)}confidencet(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.T"),(e,t,n)=>(n=Math.trunc(n),1===n?new lr(Vn.DIV_BY_ZERO):zc(1,e,t,n)[1]-1))}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),(e,t,n)=>(e-t)/n)}}Jc.implementedFunctions={ERF:{method:"erf",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}]},ERFC:{method:"erfc",parameters:[{argumentType:Qr.NUMBER}]},"EXPON.DIST":{method:"expondist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},FISHER:{method:"fisher",parameters:[{argumentType:Qr.NUMBER,greaterThan:-1,lessThan:1}]},FISHERINV:{method:"fisherinv",parameters:[{argumentType:Qr.NUMBER}]},GAMMA:{method:"gamma",parameters:[{argumentType:Qr.NUMBER}]},"GAMMA.DIST":{method:"gammadist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},GAMMALN:{method:"gammaln",parameters:[{argumentType:Qr.NUMBER,greaterThan:0}]},"GAMMA.INV":{method:"gammainv",parameters:[{argumentType:Qr.NUMBER,minValue:0,lessThan:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}]},GAUSS:{method:"gauss",parameters:[{argumentType:Qr.NUMBER}]},"BETA.DIST":{method:"betadist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},"BETA.INV":{method:"betainv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,maxValue:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},"BINOM.DIST":{method:"binomialdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.BOOLEAN}]},"BINOM.INV":{method:"binomialinv",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1}]},BESSELI:{method:"besselifn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},BESSELJ:{method:"besseljfn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},BESSELK:{method:"besselkfn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},BESSELY:{method:"besselyfn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},"CHISQ.DIST":{method:"chisqdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1,maxValue:1e10},{argumentType:Qr.BOOLEAN}]},"CHISQ.DIST.RT":{method:"chisqdistrt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV":{method:"chisqinv",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV.RT":{method:"chisqinvrt",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"F.DIST":{method:"fdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.BOOLEAN}]},"F.DIST.RT":{method:"fdistrt",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"F.INV":{method:"finv",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"F.INV.RT":{method:"finvrt",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"WEIBULL.DIST":{method:"weibulldist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"POISSON.DIST":{method:"poissondist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.BOOLEAN}]},"HYPGEOM.DIST":{method:"hypgeomdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"T.DIST":{method:"tdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.BOOLEAN}]},"T.DIST.2T":{method:"tdist2t",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1}]},"T.DIST.RT":{method:"tdistrt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1}]},TDIST:{method:"tdistold",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.INTEGER,minValue:1,maxValue:2}]},"T.INV":{method:"tinv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER,minValue:1}]},"T.INV.2T":{method:"tinv2t",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"LOGNORM.DIST":{method:"lognormdist",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"LOGNORM.INV":{method:"lognorminv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0}]},"NORM.DIST":{method:"normdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"NORM.INV":{method:"norminv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0}]},"NORM.S.DIST":{method:"normsdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.BOOLEAN}]},"NORM.S.INV":{method:"normsinv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1}]},PHI:{method:"phi",parameters:[{argumentType:Qr.NUMBER}]},"NEGBINOM.DIST":{method:"negbinomdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.BOOLEAN}]},"CONFIDENCE.NORM":{method:"confidencenorm",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,minValue:1}]},"CONFIDENCE.T":{method:"confidencet",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,minValue:1}]},STANDARDIZE:{method:"standardize",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0}]}},Jc.aliases={NEGBINOMDIST:"NEGBINOM.DIST",EXPONDIST:"EXPON.DIST",BETADIST:"BETA.DIST",NORMDIST:"NORM.DIST",NORMINV:"NORM.INV",NORMSDIST:"NORM.S.DIST",NORMSINV:"NORM.S.INV",LOGNORMDIST:"LOGNORM.DIST",LOGINV:"LOGNORM.INV",TINV:"T.INV.2T",HYPGEOMDIST:"HYPGEOM.DIST",POISSON:"POISSON.DIST",WEIBULL:"WEIBULL.DIST",FINV:"F.INV.RT",FDIST:"F.DIST.RT",CHIDIST:"CHISQ.DIST.RT",CHIINV:"CHISQ.INV.RT",GAMMADIST:"GAMMA.DIST","GAMMALN.PRECISE":"GAMMALN",GAMMAINV:"GAMMA.INV",BETAINV:"BETA.INV",BINOMDIST:"BINOM.DIST",CONFIDENCE:"CONFIDENCE.NORM",CRITBINOM:"BINOM.INV",WEIBULLDIST:"WEIBULL.DIST",TINV2T:"T.INV.2T",TDISTRT:"T.DIST.RT",TDIST2T:"T.DIST.2T",FINVRT:"F.INV.RT",FDISTRT:"F.DIST.RT",CHIDISTRT:"CHISQ.DIST.RT",CHIINVRT:"CHISQ.INV.RT",LOGNORMINV:"LOGNORM.INV",POISSONDIST:"POISSON.DIST"};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Qc extends Zr{fact(e,t){return this.runFunction(e.args,t,this.metadata("FACT"),e=>{e=Math.trunc(e);let t=1;for(let n=1;n<=e;n++)t*=n;return t})}factdouble(e,t){return this.runFunction(e.args,t,this.metadata("FACTDOUBLE"),e=>{e=Math.trunc(e);let t=1;for(let n=e;n>=1;n-=2)t*=n;return t})}combin(e,t){return this.runFunction(e.args,t,this.metadata("COMBIN"),(e,t)=>t>e?new lr(Vn.NUM,Re.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),Zc(e,t)))}combina(e,t){return this.runFunction(e.args,t,this.metadata("COMBINA"),(e,t)=>(e=Math.trunc(e),t=Math.trunc(t),e+t-1>=1030?new lr(Vn.NUM,Re.ValueLarge):0===e&&0===t?1:Zc(e+t-1,t)))}gcd(e,t){return this.runFunction(e.args,t,this.metadata("GCD"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof lr)return t;let n=0;for(const r of t){if(r<0)return new lr(Vn.NUM,Re.ValueSmall);n=eu(n,Math.trunc(r))}return n>Number.MAX_SAFE_INTEGER?new lr(Vn.NUM,Re.ValueLarge):n})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof lr)return t;let n=1;for(const r of t){if(r<0)return new lr(Vn.NUM,Re.ValueSmall);n=tu(n,Math.trunc(r))}return n>Number.MAX_SAFE_INTEGER?new lr(Vn.NUM,Re.ValueLarge):n})}mround(e,t){return this.runFunction(e.args,t,this.metadata("MROUND"),(e,t)=>0===t?0:e>0&&t<0||e<0&&t>0?new lr(Vn.NUM,Re.DistinctSigns):Math.round(e/t)*t)}multinomial(e,t){return this.runFunction(e.args,t,this.metadata("MULTINOMIAL"),(...e)=>{let t=0,n=1;for(let r of e){if(r<0)return new lr(Vn.NUM,Re.ValueSmall);r=Math.trunc(r);for(let e=1;e<=r;e++)n*=(t+e)/e;t+=r}return Math.round(n)})}quotient(e,t){return this.runFunction(e.args,t,this.metadata("QUOTIENT"),(e,t)=>0===t?new lr(Vn.DIV_BY_ZERO):Math.trunc(e/t))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),(e,t,n,r)=>{const i=this.arithmeticHelper.manyToOnlyNumbersDropNulls(r.valuesFromTopLeftCorner());if(i instanceof lr)return i;let s=0;i.reverse();for(const o of i)s*=Math.pow(e,n),s+=o;return s*Math.pow(e,t)})}sign(e,t){return this.runFunction(e.args,t,this.metadata("SIGN"),e=>e>0?1:e<0?-1:0)}sumx2my2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2MY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Vn.NA,Re.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e,2)-Math.pow(t,2))}return s})}sumx2py2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2PY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Vn.NA,Re.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e,2)+Math.pow(t,2))}return s})}sumxmy2(e,t){return this.runFunction(e.args,t,this.metadata("SUMXMY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Vn.NA,Re.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e-t,2))}return s})}}function Zc(e,t){2*t>e&&(t=e-t);let n=1;for(let r=1;r<=t;r++)n*=(e-t+r)/r;return Math.round(n)}function eu(e,t){e<t&&([e,t]=[t,e]);while(t>0)[e,t]=[t,e%t];return e}function tu(e,t){return 0===e||0===t?0:e*(t/eu(e,t))}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Qc.implementedFunctions={FACT:{method:"fact",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:170}]},FACTDOUBLE:{method:"factdouble",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:288}]},COMBIN:{method:"combin",parameters:[{argumentType:Qr.NUMBER,minValue:0,lessThan:1030},{argumentType:Qr.NUMBER,minValue:0}]},COMBINA:{method:"combina",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0}]},GCD:{method:"gcd",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},LCM:{method:"lcm",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MROUND:{method:"mround",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},MULTINOMIAL:{method:"multinomial",parameters:[{argumentType:Qr.NUMBER}],repeatLastArgs:1,expandRanges:!0},QUOTIENT:{method:"quotient",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},SERIESSUM:{method:"seriessum",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE}]},SIGN:{method:"sign",parameters:[{argumentType:Qr.NUMBER}]},SUMX2MY2:{method:"sumx2my2",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},SUMX2PY2:{method:"sumx2py2",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},SUMXMY2:{method:"sumxmy2",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]}};class nu extends Zr{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,n)=>"i"!==n&&"j"!==n?new lr(Vn.VALUE,Re.ShouldBeIorJ):Lr([e,t],n))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),du)}imaginary(e,t){return this.runFunction(e.args,t,this.metadata("IMAGINARY"),([e,t])=>t)}imreal(e,t){return this.runFunction(e.args,t,this.metadata("IMREAL"),([e,t])=>e)}imargument(e,t){return this.runFunction(e.args,t,this.metadata("IMARGUMENT"),([e,t])=>0===e&&0===t?new lr(Vn.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>Lr([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>Lr(au(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>Lr(lu(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>Lr(ou(au(e),cu(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>Lr(ou([1,0],cu(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>Lr(ou([1,0],uu(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>Lr(ou([1,0],au(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>Lr(ou([1,0],lu(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>Lr(cu(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>Lr(uu(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>Lr(ou(cu(e),au(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>Lr(ou(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof lr)return t;let n=[1,0];for(const r of t)n=su(n,r);return Lr(n)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof lr)return t;let n=[0,0];for(const r of t)n=ru(n,r);return Lr(n)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>Lr(iu(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>Lr(hu(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>Lr(mu(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{const[t,n]=mu(e),r=Math.log(10);return Lr([t/r,n/r])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{const[t,n]=mu(e),r=Math.log(2);return Lr([t/r,n/r])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>Lr(fu(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>Lr(fu(e,.5)))}}function ru([e,t],[n,r]){return[e+n,t+r]}function iu([e,t],[n,r]){return[e-n,t-r]}function su([e,t],[n,r]){return[e*n-t*r,e*r+n*t]}function ou([e,t],[n,r]){const i=Math.pow(n,2)+Math.pow(r,2),[s,o]=su([e,t],[n,-r]);return[s/i,o/i]}function au([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function lu([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function cu([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function uu([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function hu([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function du([e,t]){return Math.sqrt(e*e+t*t)}function mu([e,t]){return[Math.log(du([e,t])),Math.atan2(t,e)]}function fu(e,t){const[n,r]=mu(e);return hu([t*n,t*r])}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */nu.implementedFunctions={COMPLEX:{method:"complex",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.STRING,defaultValue:"i"}]},IMABS:{method:"imabs",parameters:[{argumentType:Qr.COMPLEX}]},IMAGINARY:{method:"imaginary",parameters:[{argumentType:Qr.COMPLEX}]},IMREAL:{method:"imreal",parameters:[{argumentType:Qr.COMPLEX}]},IMARGUMENT:{method:"imargument",parameters:[{argumentType:Qr.COMPLEX}]},IMCONJUGATE:{method:"imconjugate",parameters:[{argumentType:Qr.COMPLEX}]},IMCOS:{method:"imcos",parameters:[{argumentType:Qr.COMPLEX}]},IMCOSH:{method:"imcosh",parameters:[{argumentType:Qr.COMPLEX}]},IMCOT:{method:"imcot",parameters:[{argumentType:Qr.COMPLEX}]},IMCSC:{method:"imcsc",parameters:[{argumentType:Qr.COMPLEX}]},IMCSCH:{method:"imcsch",parameters:[{argumentType:Qr.COMPLEX}]},IMSEC:{method:"imsec",parameters:[{argumentType:Qr.COMPLEX}]},IMSECH:{method:"imsech",parameters:[{argumentType:Qr.COMPLEX}]},IMSIN:{method:"imsin",parameters:[{argumentType:Qr.COMPLEX}]},IMSINH:{method:"imsinh",parameters:[{argumentType:Qr.COMPLEX}]},IMTAN:{method:"imtan",parameters:[{argumentType:Qr.COMPLEX}]},IMDIV:{method:"imdiv",parameters:[{argumentType:Qr.COMPLEX},{argumentType:Qr.COMPLEX}]},IMPRODUCT:{method:"improduct",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},IMSUM:{method:"imsum",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},IMSUB:{method:"imsub",parameters:[{argumentType:Qr.COMPLEX},{argumentType:Qr.COMPLEX}]},IMEXP:{method:"imexp",parameters:[{argumentType:Qr.COMPLEX}]},IMLN:{method:"imln",parameters:[{argumentType:Qr.COMPLEX}]},IMLOG10:{method:"imlog10",parameters:[{argumentType:Qr.COMPLEX}]},IMLOG2:{method:"imlog2",parameters:[{argumentType:Qr.COMPLEX}]},IMPOWER:{method:"impower",parameters:[{argumentType:Qr.COMPLEX},{argumentType:Qr.NUMBER}]},IMSQRT:{method:"imsqrt",parameters:[{argumentType:Qr.COMPLEX}]}};class pu extends Zr{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Vn.DIV_BY_ZERO);const n=Uc(t);return t.reduce((e,t)=>e+Math.abs(t-n),0)/t.length})}devsq(e,t){return this.runFunction(e.args,t,this.metadata("DEVSQ"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof lr?t:0===t.length?0:Vc(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Vn.NUM,Re.OneValue);for(const n of t)if(n<=0)return new lr(Vn.NUM,Re.ValueSmall);return Xc(t)})}harmean(e,t){return this.runFunction(e.args,t,this.metadata("HARMEAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Vn.NUM,Re.OneValue);for(const n of t)if(n<=0)return new lr(Vn.NUM,Re.ValueSmall);return t.length/t.reduce((e,t)=>e+1/t,0)})}correl(e,t){return this.runFunction(e.args,t,this.metadata("CORREL"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):qc(n[0],n[1])})}rsq(e,t){return this.runFunction(e.args,t,this.metadata("RSQ"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):Math.pow(qc(n[0],n[1]),2)})}covariancep(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.P"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<1?new lr(Vn.DIV_BY_ZERO,Re.OneValue):1===r?0:$c(n[0],n[1])*(r-1)/r})}covariances(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.S"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):$c(n[0],n[1])})}ztest(e,t){return this.runFunction(e.args,t,this.metadata("Z.TEST"),(e,t,n)=>{const r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof lr)return r;const i=r.length;if(void 0===n){if(i<2)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);n=Wc(r,!0)}return i<1?new lr(Vn.NA,Re.OneValue):0===n?new lr(Vn.DIV_BY_ZERO):1-bc.cdf((Uc(r)-t)/(n/Math.sqrt(i)),0,1)})}ftest(e,t){return this.runFunction(e.args,t,this.metadata("F.TEST"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),r=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(n instanceof lr)return n;if(r instanceof lr)return r;if(n.length<=1||r.length<=1)return new lr(Vn.DIV_BY_ZERO);const i=Bc(n,!0),s=Bc(r,!0);if(0===i||0===s)return new lr(Vn.DIV_BY_ZERO);const o=i/s,a=xc.cdf(o,n.length-1,r.length-1);return 2*Math.min(a,1-a)})}steyx(e,t){return this.runFunction(e.args,t,this.metadata("STEYX"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=2?new lr(Vn.DIV_BY_ZERO,Re.ThreeValues):Math.sqrt((Vc(n[0])-Math.pow($c(n[0],n[1])*(r-1),2)/Vc(n[1]))/(r-2))})}slope(e,t){return this.runFunction(e.args,t,this.metadata("SLOPE"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gu(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):$c(n[0],n[1])*(r-1)/Vc(n[1])})}chisqtest(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.TEST"),(e,t)=>{const n=e.height(),r=e.width();if(t.height()!==n||t.width()!==r)return new lr(Vn.NA,Re.EqualLength);const i=gu(e,t);if(i instanceof lr)return i;if(i[0].length<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);let s=0;for(let o=0;o<i[0].length;o++){if(0===i[1][o])return new lr(Vn.DIV_BY_ZERO);s+=Math.pow(i[0][o]-i[1][o],2)/i[1][o]}return s<0?new lr(Vn.NUM,Re.NaN):1-Ic.cdf(s,n>1&&r>1?(n-1)*(r-1):n*r-1)})}ttest(e,t){return this.runFunction(e.args,t,this.metadata("T.TEST"),(e,t,n,r)=>{const i=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),s=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(i instanceof lr)return i;if(s instanceof lr)return s;const o=i.length,a=s.length;if(1===r){if(a!==o)return new lr(Vn.NA,Re.EqualLength);if(o<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=Array(o);for(let n=0;n<o;n++)e[n]=i[n]-s[n];const t=Wc(e,!0);if(0===t)return new lr(Vn.DIV_BY_ZERO);const r=Math.abs(Math.sqrt(o)*Uc(e)/t);return n*(1-Pc.cdf(r,o-1))}if(2===r){if(o<=1||a<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=(Vc(i)+Vc(s))/(o+a-2);if(0===e)return new lr(Vn.DIV_BY_ZERO);const t=Math.abs((Uc(i)-Uc(s))/Math.sqrt(e*(1/o+1/a)));return n*(1-Pc.cdf(t,o+a-2))}{if(o<=1||a<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=Bc(i,!0),t=Bc(s,!0);if(0===e&&0===t)return new lr(Vn.DIV_BY_ZERO);const r=Math.abs((Uc(i)-Uc(s))/Math.sqrt(e/o+t/a)),l=Math.pow(e/o+t/a,2)/(Math.pow(e/o,2)/(o-1)+Math.pow(t/a,2)/(a-1));return n*(1-Pc.cdf(r,l))}})}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;const n=t.length;if(n<3)return new lr(Vn.DIV_BY_ZERO,Re.ThreeValues);const r=Uc(t),i=Wc(t,!0);return 0===i?new lr(Vn.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-r)/i,3),0)*n/(n-1)/(n-2)})}skewp(e,t){return this.runFunction(e.args,t,this.metadata("SKEW.P"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;const n=t.length;if(n<3)return new lr(Vn.DIV_BY_ZERO,Re.ThreeValues);const r=Uc(t),i=Wc(t,!1);return 0===i?new lr(Vn.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-r)/i,3),0)/n})}}function gu(e,t){const n=e.iterateValuesFromTopLeftCorner(),r=t.iterateValuesFromTopLeftCorner();let i,s;const o=[],a=[];while(i=n.next(),s=r.next(),!i.done&&!s.done){const e=i.value,t=s.value;if(e instanceof lr)return e;if(t instanceof lr)return t;At(e)&&At(t)&&(o.push(St(e)),a.push(St(t)))}return[o,a]}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */pu.implementedFunctions={AVEDEV:{method:"avedev",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},DEVSQ:{method:"devsq",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},GEOMEAN:{method:"geomean",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},HARMEAN:{method:"harmean",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},CORREL:{method:"correl",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},RSQ:{method:"rsq",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"COVARIANCE.P":{method:"covariancep",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"COVARIANCE.S":{method:"covariances",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"Z.TEST":{method:"ztest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}]},"F.TEST":{method:"ftest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},STEYX:{method:"steyx",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},SLOPE:{method:"slope",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"CHISQ.TEST":{method:"chisqtest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"T.TEST":{method:"ttest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.INTEGER,minValue:1,maxValue:2},{argumentType:Qr.INTEGER,minValue:1,maxValue:3}]},SKEW:{method:"skew",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"SKEW.P":{method:"skewp",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1}},pu.aliases={COVAR:"COVARIANCE.P",FTEST:"F.TEST",PEARSON:"CORREL",ZTEST:"Z.TEST",CHITEST:"CHISQ.TEST",TTEST:"T.TEST",COVARIANCEP:"COVARIANCE.P",COVARIANCES:"COVARIANCE.S",SKEWP:"SKEW.P"};class yu extends ha{}yu.HyperFormula=ha,yu.ErrorType=Vn,yu.CellError=lr,yu.CellType=Bn,yu.CellValueType=nr,yu.CellValueDetailedType=rr,yu.DetailedCellError=ii,yu.ExportedCellChange=Ro,yu.ExportedNamedExpressionChange=Oo,yu.ConfigValueTooBigError=ln,yu.ConfigValueTooSmallError=an,yu.EvaluationSuspendedError=un,yu.ExpectedOneOfValuesError=cn,yu.ExpectedValueOfTypeError=sn,yu.ArraySize=ei,yu.SimpleRangeValue=Ht,yu.EmptyValue=vt,yu.FunctionPlugin=Zr,yu.FunctionArgumentType=Qr,yu.FunctionPluginValidationError=pn,yu.InvalidAddressError=Kt,yu.InvalidArgumentsError=Xt,yu.LanguageNotRegisteredError=mn,yu.LanguageAlreadyRegisteredError=fn,yu.MissingTranslationError=hn,yu.NamedExpressionDoesNotExistError=Qt,yu.NamedExpressionNameIsAlreadyTakenError=qt,yu.NamedExpressionNameIsInvalidError=Jt,yu.NoOperationToRedoError=en,yu.NoOperationToUndoError=Zt,yu.NoRelativeAddressesAllowedError=bn,yu.NoSheetWithIdError=Vt,yu.NoSheetWithNameError=Bt,yu.NotAFormulaError=zt,yu.NothingToPasteError=tn,yu.ProtectedFunctionTranslationError=dn,yu.SheetNameAlreadyTakenError=Wt,yu.SheetSizeLimitExceededError=Gt,yu.SourceLocationHasArrayError=yn,yu.TargetLocationHasArrayError=wn,yu.UnableToParseError=rn;const wu=ma.defaultConfig.language;ha.registerLanguage(wu,wa),ha.languages[wa.langCode]=wa;for(const bu of Object.getOwnPropertyNames(s))bu.startsWith("_")||ha.registerFunctionPlugin(s[bu])},cef7:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("d06e");var r=n("9f10"),i=n("81ea");class s extends r["a"]{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super(e)}getHiddenIndexes(){return Object(i["arrayReduce"])(this.getValues(),(e,t,n)=>(t&&e.push(n),e),[])}}},cf1e9:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,n,r,i){var s,o=t.words[r];return 1===r.length?"y"===r&&n?"jedna godina":i||n?o[0]:o[1]:(s=t.correctGrammaticalCase(e,o),"yy"===r&&n&&"godinu"===s?e+" godina":e+" "+s)}},n=e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},cf36:function(e,t,n){"use strict";var r=n("b343"),i=n("1caf");e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},cf51:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function n(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?i[n][0]:i[n][1]}return t}))},cf75:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq",t}function r(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret",t}function i(e,t,n,r){var i=s(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}function s(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,s="";return n>0&&(s+=t[n]+"vatlh"),r>0&&(s+=(""!==s?" ":"")+t[r]+"maH"),i>0&&(s+=(""!==s?" ":"")+t[i]),""===s?"pagh":s}var o=e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".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:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:r,s:"puS lup",ss:i,m:"wa’ tup",mm:i,h:"wa’ rep",hh:i,d:"wa’ jaj",dd:i,M:"wa’ jar",MM:i,y:"wa’ DIS",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},d06e:function(e,t,n){"use strict";var r=n("ac4f"),i=n("fc2d"),s=n("7dcf4"),o=n("2349"),a=n("ae20"),l=n("b343"),c=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),u=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},h=c||!u();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(e){var t=i(this),n=s(t),r=arguments.length;a(n+r);for(var l=0;l<r;l++)t[n]=arguments[l],n++;return o(t,n),n}})},d128:function(e,t,n){"use strict";var r=n("b343");e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},d26a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},r=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,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:"[བདུན་ཕྲག་རྗེས་མ], 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]}))},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||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return r}))},d2d4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});return t}))},d2e4:function(e,t,n){"use strict";var r,i,s,o,a=n("f2e8"),l=n("0204"),c=n("7d61"),u=n("73fa"),h=n("69ba"),d=n("b343"),m=n("f808"),f=n("9674"),p=n("2179"),g=n("6038"),y=n("dd8d"),w=n("5bc5"),b=a.setImmediate,_=a.clearImmediate,v=a.process,S=a.Dispatch,E=a.Function,C=a.MessageChannel,T=a.String,M=0,R={},O="onreadystatechange";d((function(){r=a.location}));var N=function(e){if(h(R,e)){var t=R[e];delete R[e],t()}},A=function(e){return function(){N(e)}},L=function(e){N(e.data)},I=function(e){a.postMessage(T(e),r.protocol+"//"+r.host)};b&&_||(b=function(e){g(arguments.length,1);var t=u(e)?e:E(e),n=f(arguments,1);return R[++M]=function(){l(t,void 0,n)},i(M),M},_=function(e){delete R[e]},w?i=function(e){v.nextTick(A(e))}:S&&S.now?i=function(e){S.now(A(e))}:C&&!y?(s=new C,o=s.port2,s.port1.onmessage=L,i=c(o.postMessage,o)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!d(I)?(i=I,a.addEventListener("message",L,!1)):i=O in p("script")?function(e){m.appendChild(p("script"))[O]=function(){m.removeChild(this),N(e)}}:function(e){setTimeout(A(e),0)}),e.exports={set:b,clear:_}},d3c5:function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));n("7a89"),n("d06e");var r=n("351d"),i=n("81ea"),s=n("24b5"),o=n("76ab"),a=n("491c"),l=n("3d76"),c=n("169f"),u=n("87d6");function h(e,t){m(e,t),t.add(e)}function d(e,t,n){m(e,t),t.set(e,n)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,n){return t=p(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e,t){return e.get(w(e,t))}function w(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const b=new Map([["plugin",s["c"]],["cell-type",o["c"]],["editor",a["d"]],["renderer",l["c"]],["validator",c["c"]]]),_="base",v=[];let S=null;var E=new WeakMap,C=new WeakSet;class T{static get PLUGIN_KEY(){return _}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){h(this,C),f(this,"eventManager",new u["a"](this)),f(this,"pluginName",null),f(this,"pluginsInitializedCallbacks",[]),f(this,"isPluginsReady",!1),f(this,"enabled",!1),f(this,"initialized",!1),d(this,E,{}),Object(r["defineGetter"])(this,"hot",e,{writable:!1}),S=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",e=>this.onUpdateSettings(e)),this.hot.addHook("beforeInit",()=>this.init())}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach(t=>{const[n,r]=t.split(":");if(!b.has(n))throw new Error(`Unknown plugin dependency type "${n}" was found.`);b.get(n)(r)||e.push(` - ${r} (${n})`)}),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,e.join("\n")+"\n"].join("");v.push(t)}}S||(S=Object(s["b"])()),S.indexOf("UndoRedo")>=0&&S.splice(S.indexOf("UndoRedo"),1),S.indexOf(this.pluginName)>=0&&S.splice(S.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()});const n=0===S.length;if(n){if(v.length>0){const e=[v.join("\n")+"\n","You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){y(E,this)[e]=y(E,this)[e]||[];const n=y(E,this)[e];this.hot.addHook(e,t),n.push(t),y(E,this)[e]=n}removeHooks(e){Object(i["arrayEach"])(y(E,this)[e]||[],t=>{this.hot.removeHook(e,t)})}clearHooks(){const e=y(E,this);Object(r["objectEach"])(e,(e,t)=>this.removeHooks(t)),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){Object(i["arrayEach"])(this.pluginsInitializedCallbacks,e=>e()),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=w(C,this,M).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),Object(r["objectEach"])(this,(e,t)=>{"hot"!==t&&(this[t]=null)}),delete this.t,delete this.hot}}function M(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"===typeof t)return t;for(let n=0;n<t.length;n++)if(void 0!==e[t[n]])return!0;return!1}},d3e6:function(e,t,n){"use strict";var r=n("7d61"),i=n("7b69"),s=n("088f"),o=n("71ca"),a=n("cbf2"),l=n("7dcf4"),c=n("1e92"),u=n("bb2a"),h=n("9582"),d=n("142d"),m=TypeError,f=function(e,t){this.stopped=e,this.result=t},p=f.prototype;e.exports=function(e,t,n){var g,y,w,b,_,v,S,E=n&&n.that,C=!(!n||!n.AS_ENTRIES),T=!(!n||!n.IS_RECORD),M=!(!n||!n.IS_ITERATOR),R=!(!n||!n.INTERRUPTED),O=r(t,E),N=function(e){return g&&d(g,"normal",e),new f(!0,e)},A=function(e){return C?(s(e),R?O(e[0],e[1],N):O(e[0],e[1])):R?O(e,N):O(e)};if(T)g=e.iterator;else if(M)g=e;else{if(y=h(e),!y)throw new m(o(e)+" is not iterable");if(a(y)){for(w=0,b=l(e);b>w;w++)if(_=A(e[w]),_&&c(p,_))return _;return new f(!1)}g=u(e,y)}v=T?e.next:g.next;while(!(S=i(v,g)).done){try{_=A(S.value)}catch(L){d(g,"throw",L)}if("object"==typeof _&&_&&c(p,_))return _}return new f(!1)}},d435:function(e,t,n){"use strict";var r=n("d128"),i=n("b343"),s=n("2179");e.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},d62b:function(e,t,n){"use strict";e.exports=!1},d69a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},d6b6:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".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",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] 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 տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});return t}))},d7167:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=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}});return t}))},d852:function(e,t,n){"use strict";n("7a89"),n("d06e");var r=n("0716");function i(e,t,n){s(e,t),t.set(e,n)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,n){return t=a(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e,t){return e.get(h(e,t))}function u(e,t,n){return e.set(h(e,t),n),n}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var d=new WeakMap;class m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];o(this,"highlight",null),o(this,"from",null),o(this,"to",null),i(this,d,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=n.clone(),u(d,this,r)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}isHeader(){return!(!this.from.isHeader()||!this.to.isHeader())||(this.from.col<0&&this.to.col<0||this.from.row<0&&this.to.row<0)}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:n}=e,r=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return r.row<=t&&i.row>=t&&r.col<=n&&i.col>=n}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(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)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopEndCorner().col>=e.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=e.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=e.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=e.getOuterTopStartCorner().col}isOverlappingVertically(e){return this.getOuterBottomStartCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=e.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=e.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>n.row||e.col>n.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}expandByRange(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.includesRange(e)||!this.overlaps(e))return!1;const n=this.getOuterTopStartCorner(),r=this.getOuterBottomEndCorner(),i=this.getDirection(),s=e.getOuterTopStartCorner(),o=e.getOuterBottomEndCorner(),a=Math.min(n.row,s.row),l=Math.min(n.col,s.col),c=Math.max(r.row,o.row),u=Math.max(r.col,o.col),h=this._createCellCoords(a,l),d=this._createCellCoords(c,u);return this.from=h,this.to=d,this.setDirection(i),t&&(this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally()),!0}getDirection(){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}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()];break;default:break}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){const e=this.getDirection();switch(e){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");break;default:break}}flipDirectionHorizontally(){const e=this.getDirection();switch(e){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");break;default:break}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return c(d,this)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return c(d,this)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return c(d,this)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return c(d,this)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return c(d,this)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return c(d,this)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return c(d,this)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return c(d,this)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e){return e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(e){return e instanceof r["a"]&&(e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},n={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},r=[];return t.top===n.top&&r.push("top"),t.right===n.right&&r.push(c(d,this)?"left":"right"),t.bottom===n.bottom&&r.push("bottom"),t.left===n.left&&r.push(c(d,this)?"right":"left"),r}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)this.from.row===r&&this.from.col===i||this.to.row===r&&this.to.col===i||n.push(this._createCellCoords(r,i));return n}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)e.row===r&&e.col===i?n.push(e):t.row===r&&t.col===i?n.push(t):n.push(this._createCellCoords(r,i));return n}forAll(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();for(let r=t.row;r<=n.row;r++)for(let i=t.col;i<=n.col;i++){const t=e(r,i);if(!1===t)return}}clone(){return new m(this.highlight,this.from,this.to,c(d,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new r["a"](e,t,c(d,this))}}t["a"]=m},d9f8:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});return t}))},db29:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".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"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},dc4d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],i=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],s=e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),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 बजे"},monthsParse:r,longMonthsParse:r,shortMonthsParse:i,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,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]}))},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<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return s}))},dd49:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("a357c"),i=n("5d7f"),s=n("7b9c");const o="text";function a(e,t,n,o,a,l,c){r["a"].apply(this,[e,t,n,o,a,l,c]);let u=l;if(!u&&c.placeholder&&(u=c.placeholder),u=Object(s["stringify"])(u),c.trimWhitespace&&(u=u.trim()),c.rendererTemplate){Object(i["empty"])(t);const r=e.rootDocument.createElement("TEMPLATE");r.setAttribute("bind","{{}}"),r.innerHTML=c.rendererTemplate,HTMLTemplateElement.decorate(r),r.model=e.getSourceDataAtRow(n),t.appendChild(r)}else Object(i["fastInnerText"])(t,u)}a.RENDERER_TYPE=o},dd8d:function(e,t,n){"use strict";var r=n("65c6");e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},de26:function(e,t,n){"use strict";var r=n("54d7");e.exports=function(e,t){return r[e]||(r[e]=t||{})}},de3b:function(e,t,n){"use strict";function r(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function i(e){return!1===e.isImmediatePropagationEnabled}function s(e){return 2===e.button}function o(e){return 0===e.button}function a(e,t){const n={x:e.offsetX,y:e.offsetY};let r=e.target;if(!(t instanceof HTMLElement)||r!==t&&r.contains(t))return n;while(r!==t)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;return n}n.r(t),n.d(t,"stopImmediatePropagation",(function(){return r})),n.d(t,"isImmediatePropagationStopped",(function(){return i})),n.d(t,"isRightClick",(function(){return s})),n.d(t,"isLeftClick",(function(){return o})),n.d(t,"offsetRelativeTo",(function(){return a}))},e0c5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},r=e.defineLocale("gu",{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 વર્ષ"},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<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}});return r}))},e156:function(e,t,n){"use strict";var r=n("12e9"),i=n("73fa"),s=n("939b"),o=n("80dd"),a=o("toStringTag"),l=Object,c="Arguments"===s(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(n){}};e.exports=r?s:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(t=l(e),a))?n:c?s(t):"Object"===(r=s(t))&&i(t.callee)?"Arguments":r}},e1c6:function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},e1d3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".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:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},e437:function(e,t,n){"use strict";var r=n("c0d8"),i=n("8c7e"),s=n("87d6"),o=n("c5cd");n("7a89");function a(e){const t="undefined"!==typeof window&&window.jQuery;t&&(t.fn.handsontable=function(t){const n=this.first();let r,i=n.data("handsontable");if("string"!==typeof t){const r=t||{};return i?i.updateSettings(r):(i=new e.Core(n[0],r),n.data("handsontable",i),i.init()),n}if(i){if("undefined"===typeof i[t])throw new Error("Handsontable do not provide action: "+t);for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];r=i[t].call(i,...o),"destroy"===t&&n.removeData()}return r})}var l,c,u,h,d,m=n("220a"),f=n("a776"),p=n("81ea"),g=n("63d8"),y=n("480c"),w=n("3eb5"),b=n("7dd09"),_=n("97b9"),v=n("7b9c"),S=n("ffec"),E=n("351d"),C=n("29b0"),T=n("f938"),M=n("5d7f"),R=n("de3b"),O=n("491c"),N=n("3d76"),A=n("169f"),L=n("76ab"),I=n("24b5"),x=n("d3c5");Object(i["a"])(),a(r["a"]),r["a"].__GhostTable=m["a"],r["a"]._getListenersCounter=s["b"],r["a"]._getRegisteredMapsCounter=o["b"],r["a"].EventManager=s["a"];const k=[p,g,y,w,b,_,v,S,E,C,T,f],D=[M,R];r["a"].helper={},r["a"].dom={},p["arrayEach"](k,e=>{p["arrayEach"](Object.getOwnPropertyNames(e),t=>{"_"!==t.charAt(0)&&(r["a"].helper[t]=e[t])})}),p["arrayEach"](D,e=>{p["arrayEach"](Object.getOwnPropertyNames(e),t=>{"_"!==t.charAt(0)&&(r["a"].dom[t]=e[t])})}),r["a"].cellTypes=null!==(l=r["a"].cellTypes)&&void 0!==l?l:{},p["arrayEach"](Object(L["b"])(),e=>{r["a"].cellTypes[e]=Object(L["a"])(e)}),r["a"].cellTypes.registerCellType=L["d"],r["a"].cellTypes.getCellType=L["a"],r["a"].editors=null!==(c=r["a"].editors)&&void 0!==c?c:{},p["arrayEach"](Object(O["c"])(),e=>{r["a"].editors[C["toUpperCaseFirst"](e)+"Editor"]=Object(O["a"])(e)}),r["a"].editors.registerEditor=O["e"],r["a"].editors.getEditor=O["a"],r["a"].renderers=null!==(u=r["a"].renderers)&&void 0!==u?u:{},p["arrayEach"](Object(N["a"])(),e=>{const t=Object(N["b"])(e);"base"===e&&(r["a"].renderers.cellDecorator=t),r["a"].renderers[C["toUpperCaseFirst"](e)+"Renderer"]=t}),r["a"].renderers.registerRenderer=N["d"],r["a"].renderers.getRenderer=N["b"],r["a"].validators=null!==(h=r["a"].validators)&&void 0!==h?h:{},p["arrayEach"](Object(A["a"])(),e=>{r["a"].validators[C["toUpperCaseFirst"](e)+"Validator"]=Object(A["b"])(e)}),r["a"].validators.registerValidator=A["d"],r["a"].validators.getValidator=A["b"],r["a"].plugins=null!==(d=r["a"].plugins)&&void 0!==d?d:{},p["arrayEach"](Object(I["b"])(),e=>{r["a"].plugins[e]=Object(I["a"])(e)}),r["a"].plugins[C["toUpperCaseFirst"](x["a"].PLUGIN_KEY)+"Plugin"]=x["a"],r["a"].plugins.registerPlugin=I["d"],r["a"].plugins.getPlugin=I["a"];t["a"]=r["a"]},e81d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},r=e.defineLocale("km",{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"ល្ងាច"===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 ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",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]}))},week:{dow:1,doy:4}});return r}))},e90f:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var r=n("97b9"),i=n("81ea");function s(e,t,n,i){const s=n.length?n[0]:void 0;return[...e.slice(0,s),...n.map((e,t)=>Object(r["isFunction"])(i)?i(e,t):i),...void 0===s?[]:e.slice(s)]}function o(e,t){return Object(i["arrayFilter"])(e,(e,n)=>!1===t.includes(n))}},eb36:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));n("7a89"),n("b879"),n("d06e");var r=n("a6de");function i(e,t,n){s(e,t),t.set(e,n)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,n){return t=a(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function c(e,t){return e.get(h(e,t))}function u(e,t,n){return e.set(h(e,t),n),n}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var d=new WeakMap;class m{static get DEFAULT_HEIGHT(){return 23}constructor(e){o(this,"count",0),o(this,"startRow",null),o(this,"endRow",null),o(this,"startPosition",null),o(this,"isVisibleInTrimmingContainer",!1),i(this,d,void 0),u(d,this,e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,rowHeightFn:n,scrollOffset:i,totalRows:s,viewportHeight:o}=c(d,this),a=Math.max(c(d,this).scrollOffset,0),l=c(d,this).horizontalScrollbarHeight||0;let u=0,h=!0;const f=[];let p,g=0,y=0;for(let c=0;c<s;c++)if(p=n(c),isNaN(p)&&(p=m.DEFAULT_HEIGHT),u<=a&&e!==r["a"]&&(this.startRow=c,g=p),u>=a&&u+(e===r["a"]?p:0)<=a+o-l&&(null===this.startRow&&(this.startRow=c,g=p),this.endRow=c),f.push(u),u+=p,y=p,e!==r["a"]&&(this.endRow=c),u>=a+o-l){h=!1;break}const w=i+o-l,b=e===r["a"]?g:0,_=e===r["a"]?0:y;if(w<b||i>f.at(-1)+_?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===s-1&&h){this.startRow=this.endRow;while(this.startRow>0){const t=f[this.endRow]+p-f[this.startRow-1];if((t<=o-l||e!==r["a"])&&(this.startRow-=1),t>=o-l)break}}e===r["c"]&&null!==this.startRow&&t&&t(this),this.startPosition=f[this.startRow],void 0===this.startPosition&&(this.startPosition=null),s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}},ebe4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},ec18:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={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?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}var n=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}});return n}))},ec2e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:0,doy:6}});return t}))},eda5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},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+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}});return t}))},ef07:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("03529"),i=n("dd49");const s="text",o={CELL_TYPE:s,editor:r["a"],renderer:i["a"]}},f072:function(e,t,n){"use strict";var r=n("fd18"),i=n("73fa"),s=n("54d7"),o=r(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return o(e)}),e.exports=s.inspectSource},f260:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},f2e8:function(e,t,n){"use strict";(function(t){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},f3ff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},r=e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),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 ਸਾਲ"},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<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return r}))},f41c:function(e,t,n){"use strict";var r=n("80dd"),i=n("0ad8"),s=n("a60d").f,o=r("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:i(null)}),e.exports=function(e){a[o][e]=!0}},f4db:function(e,t,n){"use strict";n("0eec"),n("59a2")},f6b46:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],n=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],r=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],i=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],s=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],o=e.defineLocale("gd",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:s,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:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return o}))},f6cb:function(e,t,n){"use strict";var r=n("f2e8"),i=n("0204"),s=n("73fa"),o=n("b46a"),a=n("65c6"),l=n("9674"),c=n("6038"),u=r.Function,h=/MSIE .\./.test(a)||o&&function(){var e=r.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var n=t?2:1;return h?function(r,o){var a=c(arguments.length,1)>n,h=s(r)?r:u(r),d=a?l(arguments,n):[],m=a?function(){i(h,this,d)}:h;return t?e(m,o):e(m)}:e}},f808:function(e,t,n){"use strict";var r=n("0227");e.exports=r("document","documentElement")},f938:function(e,t,n){"use strict";n.r(t),n.d(t,"KEY_CODES",(function(){return s})),n.d(t,"isPrintableChar",(function(){return a})),n.d(t,"isFunctionKey",(function(){return l})),n.d(t,"isCtrlKey",(function(){return c})),n.d(t,"isCtrlMetaKey",(function(){return u})),n.d(t,"isKey",(function(){return h}));n("d06e");var r=n("81ea"),i=n("63d8");const s={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:Object(i["isFirefox"])()?182:174,AUDIO_MUTE:Object(i["isFirefox"])()?181:173,AUDIO_UP:Object(i["isFirefox"])()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90},o=[s.ALT,s.ARROW_DOWN,s.ARROW_LEFT,s.ARROW_RIGHT,s.ARROW_UP,s.AUDIO_DOWN,s.AUDIO_MUTE,s.AUDIO_UP,s.BACKSPACE,s.CAPS_LOCK,s.DELETE,s.END,s.ENTER,s.ESCAPE,s.F1,s.F2,s.F3,s.F4,s.F5,s.F6,s.F7,s.F8,s.F9,s.F10,s.F11,s.F12,s.F13,s.F14,s.F15,s.F16,s.F17,s.F18,s.F19,s.HOME,s.INSERT,s.MEDIA_NEXT,s.MEDIA_PLAY_PAUSE,s.MEDIA_PREV,s.MEDIA_STOP,s.NULL,s.NUM_LOCK,s.PAGE_DOWN,s.PAGE_UP,s.PAUSE,s.SCROLL_LOCK,s.SHIFT,s.TAB];function a(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function l(e){return o.includes(e)}function c(e){const t=[];return Object(i["isMacOS"])()?t.push(s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX):t.push(s.CONTROL),t.includes(e)}function u(e){return[s.CONTROL,s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX].includes(e)}function h(e,t){const n=t.split("|");let i=!1;return Object(r["arrayEach"])(n,t=>{if(e===s[t])return i=!0,!1}),i}},fa83:function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return r})),n.d(t,"Parser",(function(){return qr})),n.d(t,"CstParser",(function(){return Jr})),n.d(t,"EmbeddedActionsParser",(function(){return Qr})),n.d(t,"ParserDefinitionErrorType",(function(){return zr})),n.d(t,"EMPTY_ALT",(function(){return $r})),n.d(t,"Lexer",(function(){return Ee})),n.d(t,"LexerDefinitionErrorType",(function(){return _e})),n.d(t,"createToken",(function(){return He})),n.d(t,"createTokenInstance",(function(){return Fe})),n.d(t,"EOF",(function(){return je})),n.d(t,"tokenLabel",(function(){return Ce})),n.d(t,"tokenMatcher",(function(){return Ye})),n.d(t,"tokenName",(function(){return Te})),n.d(t,"defaultGrammarResolverErrorProvider",(function(){return Bn})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return Wn})),n.d(t,"defaultParserErrorProvider",(function(){return Vn})),n.d(t,"EarlyExitException",(function(){return or})),n.d(t,"isRecognitionException",(function(){return nr})),n.d(t,"MismatchedTokenException",(function(){return rr})),n.d(t,"NotAllInputParsedException",(function(){return sr})),n.d(t,"NoViableAltException",(function(){return ir})),n.d(t,"defaultLexerErrorProvider",(function(){return ve})),n.d(t,"Alternation",(function(){return Je})),n.d(t,"Flat",(function(){return Ge})),n.d(t,"NonTerminal",(function(){return Be})),n.d(t,"Option",(function(){return ze})),n.d(t,"Repetition",(function(){return $e})),n.d(t,"RepetitionMandatory",(function(){return Ke})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return Xe})),n.d(t,"RepetitionWithSeparator",(function(){return qe})),n.d(t,"Rule",(function(){return We})),n.d(t,"Terminal",(function(){return Qe})),n.d(t,"serializeGrammar",(function(){return Ze})),n.d(t,"serializeProduction",(function(){return et})),n.d(t,"GAstVisitor",(function(){return rt})),n.d(t,"assignOccurrenceIndices",(function(){return qn})),n.d(t,"resolveGrammar",(function(){return Xn})),n.d(t,"validateGrammar",(function(){return $n})),n.d(t,"clearCache",(function(){return yi})),n.d(t,"createSyntaxDiagramsCode",(function(){return Zr})),n.d(t,"generateParserFactory",(function(){return pi})),n.d(t,"generateParserModule",(function(){return gi}));var r="6.5.0",i=n("77aa"),s=n("890f"),o={},a=new s["RegExpParser"];function l(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var n=a.pattern(t);return o[t]=n,n}function c(){o={}}var u=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h="Complement Sets are not supported for first char optimization",d='Unable to use "first char" lexer optimizations:\n';function m(e,t){void 0===t&&(t=!1);try{var n=l(e),r=f(n.value,{},n.flags.ignoreCase);return r}catch(a){if(a.message===h)t&&Object(i["d"])(d+"\tUnable to optimize: < "+e.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var o="";t&&(o="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i["c"])(d+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+s["VERSION"]+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+o)}}return[]}function f(e,t,n){switch(e.type){case"Disjunction":for(var r=0;r<e.value.length;r++)f(e.value[r],t,n);break;case"Alternative":var s=e.value;for(r=0;r<s.length;r++){var o=s[r];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=o;switch(a.type){case"Character":p(a.value,t,n);break;case"Set":if(!0===a.complement)throw Error(h);Object(i["u"])(a.value,(function(e){if("number"===typeof e)p(e,t,n);else{var r=e;if(!0===n)for(var i=r.from;i<=r.to;i++)p(i,t,n);else{for(i=r.from;i<=r.to&&i<te;i++)p(i,t,n);if(r.to>=te)for(var s=r.from>=te?r.from:te,o=r.to,a=ne(s),l=ne(o),c=a;c<=l;c++)t[c]=c}}}));break;case"Group":f(a.value,t,n);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===w(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return Object(i["U"])(t)}function p(e,t,n){var r=ne(e);t[r]=r,!0===n&&g(e,t)}function g(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){var i=ne(r.charCodeAt(0));t[i]=i}else{var s=n.toLowerCase();if(s!==n){i=ne(s.charCodeAt(0));t[i]=i}}}function y(e,t){return Object(i["q"])(e.value,(function(e){if("number"===typeof e)return Object(i["j"])(t,e);var n=e;return void 0!==Object(i["q"])(t,(function(e){return n.from<=e&&e<=n.to}))}))}function w(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&(Object(i["y"])(e.value)?Object(i["o"])(e.value,w):w(e.value))}var b=function(e){function t(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return u(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){Object(i["j"])(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===y(e,this.targetCharCodes)&&(this.found=!0):void 0!==y(e,this.targetCharCodes)&&(this.found=!0)},t}(s["BaseRegExpVisitor"]);function _(e,t){if(t instanceof RegExp){var n=l(t),r=new b(e);return r.visit(n),r.found}return void 0!==Object(i["q"])(t,(function(t){return Object(i["j"])(e,t.charCodeAt(0))}))}var v=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S="PATTERN",E="defaultMode",C="modes",T="boolean"===typeof new RegExp("(?:)").sticky;function M(e,t){t=Object(i["k"])(t,{useSticky:T,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}});var n,r=t.tracer;r("initCharCodeToOptimizedIndexMap",(function(){ie()})),r("Reject Lexer.NA",(function(){n=Object(i["P"])(e,(function(e){return e[S]===Ee.NA}))}));var s,o,a,l,c,u,h,f,p,g,y,w=!1;r("Transform Patterns",(function(){w=!1,s=Object(i["I"])(n,(function(e){var n=e[S];if(Object(i["D"])(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||Object(i["j"])(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?t.useSticky?W(n):B(n):r[1]}if(Object(i["B"])(n))return w=!0,{exec:n};if(Object(i["w"])(n,"exec"))return w=!0,n;if("string"===typeof n){if(1===n.length)return n;var s=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),o=new RegExp(s);return t.useSticky?W(o):B(o)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){o=Object(i["I"])(n,(function(e){return e.tokenTypeIdx})),a=Object(i["I"])(n,(function(e){var t=e.GROUP;if(t!==Ee.SKIPPED){if(Object(i["E"])(t))return t;if(Object(i["F"])(t))return!1;throw Error("non exhaustive match")}})),l=Object(i["I"])(n,(function(e){var t=e.LONGER_ALT;if(t){var r=Object(i["x"])(n,t);return r}})),c=Object(i["I"])(n,(function(e){return e.PUSH_MODE})),u=Object(i["I"])(n,(function(e){return Object(i["w"])(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=Z(t.lineTerminatorCharacters);h=Object(i["I"])(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(h=Object(i["I"])(n,(function(t){return Object(i["w"])(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===J(t,e)?_(e,t.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){f=Object(i["I"])(n,X),p=Object(i["I"])(s,$),g=Object(i["O"])(n,(function(e,t){var n=t.GROUP;return Object(i["E"])(n)&&n!==Ee.SKIPPED&&(e[n]=[]),e}),{}),y=Object(i["I"])(s,(function(e,t){return{pattern:s[t],longerAlt:l[t],canLineTerminator:h[t],isCustom:f[t],short:p[t],group:a[t],push:c[t],pop:u[t],tokenTypeIdx:o[t],tokenType:n[t]}}))}));var b=!0,v=[];return t.safeMode||r("First Char Optimization",(function(){v=Object(i["O"])(n,(function(e,n,r){if("string"===typeof n.PATTERN){var s=n.PATTERN.charCodeAt(0),o=ne(s);ee(e,o,y[r])}else if(Object(i["y"])(n.START_CHARS_HINT)){var a;Object(i["u"])(n.START_CHARS_HINT,(function(t){var n="string"===typeof t?t.charCodeAt(0):t,i=ne(n);a!==i&&(a=i,ee(e,i,y[r]))}))}else if(Object(i["D"])(n.PATTERN))if(n.PATTERN.unicode)b=!1,t.ensureOptimizations&&Object(i["c"])(d+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var l=m(n.PATTERN,t.ensureOptimizations);Object(i["A"])(l)&&(b=!1),Object(i["u"])(l,(function(t){ee(e,t,y[r])}))}else t.ensureOptimizations&&Object(i["c"])(d+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),b=!1;return e}),[])})),r("ArrayPacking",(function(){v=Object(i["L"])(v)})),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:v,hasCustom:w,canBeOptimized:b}}function R(e,t){var n=[],r=N(e);n=n.concat(r.errors);var i=A(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(O(s)),n=n.concat(j(s)),n=n.concat(F(s,t)),n=n.concat(Y(s)),n}function O(e){var t=[],n=Object(i["p"])(e,(function(e){return Object(i["D"])(e[S])}));return t=t.concat(I(n)),t=t.concat(D(n)),t=t.concat(H(n)),t=t.concat(P(n)),t=t.concat(x(n)),t}function N(e){var t=Object(i["p"])(e,(function(e){return!Object(i["w"])(e,S)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:_e.MISSING_PATTERN,tokenTypes:[e]}})),r=Object(i["l"])(e,t);return{errors:n,valid:r}}function A(e){var t=Object(i["p"])(e,(function(e){var t=e[S];return!Object(i["D"])(t)&&!Object(i["B"])(t)&&!Object(i["w"])(t,"exec")&&!Object(i["E"])(t)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:_e.INVALID_PATTERN,tokenTypes:[e]}})),r=Object(i["l"])(e,t);return{errors:n,valid:r}}var L=/[^\\][\$]/;function I(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return v(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(s["BaseRegExpVisitor"]),n=Object(i["p"])(e,(function(e){var n=e[S];try{var r=l(n),i=new t;return i.visit(r),i.found}catch(s){return L.test(n.source)}})),r=Object(i["I"])(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:_e.EOI_ANCHOR_FOUND,tokenTypes:[e]}}));return r}function x(e){var t=Object(i["p"])(e,(function(e){var t=e[S];return t.test("")})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:_e.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}));return n}var k=/[^\\[][\^]|^\^/;function D(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return v(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(s["BaseRegExpVisitor"]),n=Object(i["p"])(e,(function(e){var n=e[S];try{var r=l(n),i=new t;return i.visit(r),i.found}catch(s){return k.test(n.source)}})),r=Object(i["I"])(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:_e.SOI_ANCHOR_FOUND,tokenTypes:[e]}}));return r}function H(e){var t=Object(i["p"])(e,(function(e){var t=e[S];return t instanceof RegExp&&(t.multiline||t.global)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:_e.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}));return n}function P(e){var t=[],n=Object(i["I"])(e,(function(n){return Object(i["O"])(e,(function(e,r){return n.PATTERN.source!==r.PATTERN.source||Object(i["j"])(t,r)||r.PATTERN===Ee.NA||(t.push(r),e.push(r)),e}),[])}));n=Object(i["i"])(n);var r=Object(i["p"])(n,(function(e){return e.length>1})),s=Object(i["I"])(r,(function(e){var t=Object(i["I"])(e,(function(e){return e.name})),n=Object(i["s"])(e).PATTERN;return{message:"The same RegExp pattern ->"+n+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:_e.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return s}function j(e){var t=Object(i["p"])(e,(function(e){if(!Object(i["w"])(e,"GROUP"))return!1;var t=e.GROUP;return t!==Ee.SKIPPED&&t!==Ee.NA&&!Object(i["E"])(t)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:_e.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}));return n}function F(e,t){var n=Object(i["p"])(e,(function(e){return void 0!==e.PUSH_MODE&&!Object(i["j"])(t,e.PUSH_MODE)})),r=Object(i["I"])(n,(function(e){var t="Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist";return{message:t,type:_e.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return r}function Y(e){var t=[],n=Object(i["O"])(e,(function(e,t,n){var r=t.PATTERN;return r===Ee.NA||(Object(i["E"])(r)?e.push({str:r,idx:n,tokenType:t}):Object(i["D"])(r)&&V(r)&&e.push({str:r.source,idx:n,tokenType:t})),e}),[]);return Object(i["u"])(e,(function(e,r){Object(i["u"])(n,(function(n){var i=n.str,s=n.idx,o=n.tokenType;if(r<s&&U(i,e.PATTERN)){var a="Token: ->"+o.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:a,type:_e.UNREACHABLE_PATTERN,tokenTypes:[e,o]})}}))})),t}function U(e,t){if(Object(i["D"])(t)){var n=t.exec(e);return null!==n&&0===n.index}if(Object(i["B"])(t))return t(e,0,[],{});if(Object(i["w"])(t,"exec"))return t.exec(e,0,[],{});if("string"===typeof t)return t===e;throw Error("non exhaustive match")}function V(e){var t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===Object(i["q"])(t,(function(t){return-1!==e.source.indexOf(t)}))}function B(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function W(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function G(e,t,n){var r=[];return Object(i["w"])(e,E)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+E+"> property in its definition\n",type:_e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i["w"])(e,C)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+C+"> property in its definition\n",type:_e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i["w"])(e,C)&&Object(i["w"])(e,E)&&!Object(i["w"])(e.modes,e.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a "+E+": <"+e.defaultMode+">which does not exist\n",type:_e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i["w"])(e,C)&&Object(i["u"])(e.modes,(function(e,t){Object(i["u"])(e,(function(e,n){Object(i["F"])(e)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+t+"> at index: <"+n+">\n",type:_e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}function z(e,t,n){var r=[],s=!1,o=Object(i["i"])(Object(i["t"])(Object(i["J"])(e.modes,(function(e){return e})))),a=Object(i["P"])(o,(function(e){return e[S]===Ee.NA})),l=Z(n);return t&&Object(i["u"])(a,(function(e){var t=J(e,l);if(!1!==t){var n=Q(e,t),o={message:n,type:t.issue,tokenType:e};r.push(o)}else Object(i["w"])(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):_(l,e.PATTERN)&&(s=!0)})),t&&!s&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:_e.NO_LINE_BREAKS_FLAGS}),r}function K(e){var t={},n=Object(i["G"])(e);return Object(i["u"])(n,(function(n){var r=e[n];if(!Object(i["y"])(r))throw Error("non exhaustive match");t[n]=[]})),t}function X(e){var t=e.PATTERN;if(Object(i["D"])(t))return!1;if(Object(i["B"])(t))return!0;if(Object(i["w"])(t,"exec"))return!0;if(Object(i["E"])(t))return!1;throw Error("non exhaustive match")}function $(e){return!(!Object(i["E"])(e)||1!==e.length)&&e.charCodeAt(0)}var q={test:function(e){for(var t=e.length,n=this.lastIndex;n<t;n++){var r=e.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function J(e,t){if(Object(i["w"])(e,"LINE_BREAKS"))return!1;if(Object(i["D"])(e.PATTERN)){try{_(t,e.PATTERN)}catch(n){return{issue:_e.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}if(Object(i["E"])(e.PATTERN))return!1;if(X(e))return{issue:_e.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Q(e,t){if(t.issue===_e.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===_e.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}function Z(e){var t=Object(i["I"])(e,(function(e){return Object(i["E"])(e)&&e.length>0?e.charCodeAt(0):e}));return t}function ee(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var te=256;function ne(e){return e<te?e:re[e]}var re=[];function ie(){if(Object(i["A"])(re)){re=new Array(65536);for(var e=0;e<65536;e++)re[e]=e>255?255+~~(e/255):e}}function se(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function oe(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ae=1,le={};function ce(e){var t=ue(e);he(t),me(t),de(t),Object(i["u"])(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function ue(e){var t=Object(i["g"])(e),n=e,r=!0;while(r){n=Object(i["i"])(Object(i["t"])(Object(i["I"])(n,(function(e){return e.CATEGORIES}))));var s=Object(i["l"])(n,t);t=t.concat(s),Object(i["A"])(s)?r=!1:n=s}return t}function he(e){Object(i["u"])(e,(function(e){pe(e)||(le[ae]=e,e.tokenTypeIdx=ae++),ge(e)&&!Object(i["y"])(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ge(e)||(e.CATEGORIES=[]),ye(e)||(e.categoryMatches=[]),we(e)||(e.categoryMatchesMap={})}))}function de(e){Object(i["u"])(e,(function(e){e.categoryMatches=[],Object(i["u"])(e.categoryMatchesMap,(function(t,n){e.categoryMatches.push(le[n].tokenTypeIdx)}))}))}function me(e){Object(i["u"])(e,(function(e){fe([],e)}))}function fe(e,t){Object(i["u"])(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),Object(i["u"])(t.CATEGORIES,(function(n){var r=e.concat(t);Object(i["j"])(r,n)||fe(r,n)}))}function pe(e){return Object(i["w"])(e,"tokenTypeIdx")}function ge(e){return Object(i["w"])(e,"CATEGORIES")}function ye(e){return Object(i["w"])(e,"categoryMatches")}function we(e){return Object(i["w"])(e,"categoryMatchesMap")}function be(e){return Object(i["w"])(e,"tokenTypeIdx")}var _e,ve={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,n,r,i){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+n+" characters."}};(function(e){e[e["MISSING_PATTERN"]=0]="MISSING_PATTERN",e[e["INVALID_PATTERN"]=1]="INVALID_PATTERN",e[e["EOI_ANCHOR_FOUND"]=2]="EOI_ANCHOR_FOUND",e[e["UNSUPPORTED_FLAGS_FOUND"]=3]="UNSUPPORTED_FLAGS_FOUND",e[e["DUPLICATE_PATTERNS_FOUND"]=4]="DUPLICATE_PATTERNS_FOUND",e[e["INVALID_GROUP_TYPE_FOUND"]=5]="INVALID_GROUP_TYPE_FOUND",e[e["PUSH_MODE_DOES_NOT_EXIST"]=6]="PUSH_MODE_DOES_NOT_EXIST",e[e["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"]=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"]=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"]=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"]=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e["SOI_ANCHOR_FOUND"]=11]="SOI_ANCHOR_FOUND",e[e["EMPTY_MATCH_PATTERN"]=12]="EMPTY_MATCH_PATTERN",e[e["NO_LINE_BREAKS_FLAGS"]=13]="NO_LINE_BREAKS_FLAGS",e[e["UNREACHABLE_PATTERN"]=14]="UNREACHABLE_PATTERN",e[e["IDENTIFY_TERMINATOR"]=15]="IDENTIFY_TERMINATOR",e[e["CUSTOM_LINE_BREAK"]=16]="CUSTOM_LINE_BREAK"})(_e||(_e={}));var Se={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ve,traceInitPerf:!1,skipValidations:!1};Object.freeze(Se);var Ee=function(){function e(e,t){var n=this;if(void 0===t&&(t=Se),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"===typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i["K"])(Se,t);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"===typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,s=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===Se.lineTerminatorsPattern)n.config.lineTerminatorsPattern=q;else if(n.config.lineTerminatorCharacters===Se.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i["y"])(e)?(r={modes:{}},r.modes[E]=Object(i["g"])(e),r[E]=E):(s=!1,r=Object(i["h"])(e))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(G(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(z(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i["u"])(r.modes,(function(e,t){r.modes[t]=Object(i["P"])(e,(function(e){return Object(i["F"])(e)}))}));var o=Object(i["G"])(r.modes);if(Object(i["u"])(r.modes,(function(e,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var s;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(R(e,o))})),Object(i["A"])(n.lexerDefinitionErrors))&&(ce(e),n.TRACE_INIT("analyzeTokenTypes",(function(){s=M(e,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=s.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=s.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i["K"])(n.emptyGroups,s.emptyGroups),n.hasCustom=s.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=s.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i["A"])(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var a=Object(i["I"])(n.lexerDefinitionErrors,(function(e){return e.message})),l=a.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}Object(i["u"])(n.lexerDefinitionWarning,(function(e){Object(i["d"])(e.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(T?(n.chopInput=i["a"],n.match=n.matchWithTest):(n.updateLastIndex=i["b"],n.match=n.matchWithExec),s&&(n.handleModes=i["b"]),!1===n.trackStartLines&&(n.computeNewColumn=i["a"]),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i["b"]),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var e=Object(i["O"])(n.canModeBeOptimized,(function(e,t,n){return!1===t&&e.push(n),e}),[]);if(t.ensureOptimizations&&!Object(i["A"])(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){c()})),n.TRACE_INIT("toFastProperties",(function(){Object(i["S"])(n)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!Object(i["A"])(this.lexerDefinitionErrors)){var n=Object(i["I"])(this.lexerDefinitionErrors,(function(e){return e.message})),r=n.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+r)}var s=this.tokenizeInternal(e,t);return s},e.prototype.tokenizeInternal=function(e,t){var n,r,s,o,a,l,c,u,h,d,m,f,p,g,y=this,w=e,b=w.length,_=0,v=0,S=this.hasCustom?0:Math.floor(e.length/10),E=new Array(S),C=[],T=this.trackStartLines?1:void 0,M=this.trackStartLines?1:void 0,R=K(this.emptyGroups),O=this.trackStartLines,N=this.config.lineTerminatorsPattern,A=0,L=[],I=[],x=[],k=[];Object.freeze(k);var D=void 0;function H(){return L}function P(e){var t=ne(e),n=I[t];return void 0===n?k:n}var j,F=function(e){if(1===x.length&&void 0===e.tokenType.PUSH_MODE){var t=y.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{x.pop();var n=Object(i["H"])(x);L=y.patternIdxToConfig[n],I=y.charCodeToPatternIdxToConfig[n],A=L.length;var r=y.canModeBeOptimized[n]&&!1===y.config.safeMode;D=I&&r?P:H}};function Y(e){x.push(e),I=this.charCodeToPatternIdxToConfig[e],L=this.patternIdxToConfig[e],A=L.length,A=L.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=I&&t?P:H}Y.call(this,t);while(_<b){a=null;var U=w.charCodeAt(_),V=D(U),B=V.length;for(n=0;n<B;n++){j=V[n];var W=j.pattern;l=null;var G=j.short;if(!1!==G?U===G&&(a=W):!0===j.isCustom?(g=W.exec(w,_,E,R),null!==g?(a=g[0],void 0!==g.payload&&(l=g.payload)):a=null):(this.updateLastIndex(W,_),a=this.match(W,e,_)),null!==a){if(o=j.longerAlt,void 0!==o){var z=L[o],X=z.pattern;c=null,!0===z.isCustom?(g=X.exec(w,_,E,R),null!==g?(s=g[0],void 0!==g.payload&&(c=g.payload)):s=null):(this.updateLastIndex(X,_),s=this.match(X,e,_)),s&&s.length>a.length&&(a=s,l=c,j=z)}break}}if(null!==a){if(u=a.length,h=j.group,void 0!==h&&(d=j.tokenTypeIdx,m=this.createTokenInstance(a,_,d,j.tokenType,T,M,u),this.handlePayload(m,l),!1===h?v=this.addToken(E,v,m):R[h].push(m)),e=this.chopInput(e,u),_+=u,M=this.computeNewColumn(M,u),!0===O&&!0===j.canLineTerminator){var $=0,q=void 0,J=void 0;N.lastIndex=0;do{q=N.test(a),!0===q&&(J=N.lastIndex-1,$++)}while(!0===q);0!==$&&(T+=$,M=u-J,this.updateTokenEndLineColumnLocation(m,h,J,$,T,M,u))}this.handleModes(j,F,Y,m)}else{var Q=_,Z=T,ee=M,te=!1;while(!te&&_<b)for(w.charCodeAt(_),e=this.chopInput(e,1),_++,r=0;r<A;r++){var re=L[r];W=re.pattern,G=re.short;if(!1!==G?w.charCodeAt(_)===G&&(te=!0):!0===re.isCustom?te=null!==W.exec(w,_,E,R):(this.updateLastIndex(W,_),te=null!==W.exec(e)),!0===te)break}f=_-Q,p=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,Q,f,Z,ee),C.push({offset:Q,line:Z,column:ee,length:f,message:p})}}return this.hasCustom||(E.length=v),{tokens:E,groups:R,errors:C}},e.prototype.handleModes=function(e,t,n,r){if(!0===e.pop){var i=e.push;t(r),void 0!==i&&n.call(this,i)}else void 0!==e.push&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,i,s,o){var a,l;void 0!==t&&(a=n===o-1,l=a?-1:0,1===r&&!0===a||(e.endLine=i+l,e.endColumn=s-1-l))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,i,s,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,t++,t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){var r=e.test(t);return!0===r?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return null!==n?n[0]:n},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i["R"])(t),s=r.time,o=r.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function Ce(e){return Me(e)?e.LABEL:e.name}function Te(e){return e.name}function Me(e){return Object(i["E"])(e.LABEL)&&""!==e.LABEL}var Re="parent",Oe="categories",Ne="label",Ae="group",Le="push_mode",Ie="pop_mode",xe="longer_alt",ke="line_breaks",De="start_chars_hint";function He(e){return Pe(e)}function Pe(e){var t=e.pattern,n={};if(n.name=e.name,Object(i["F"])(t)||(n.PATTERN=t),Object(i["w"])(e,Re))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return Object(i["w"])(e,Oe)&&(n.CATEGORIES=e[Oe]),ce([n]),Object(i["w"])(e,Ne)&&(n.LABEL=e[Ne]),Object(i["w"])(e,Ae)&&(n.GROUP=e[Ae]),Object(i["w"])(e,Ie)&&(n.POP_MODE=e[Ie]),Object(i["w"])(e,Le)&&(n.PUSH_MODE=e[Le]),Object(i["w"])(e,xe)&&(n.LONGER_ALT=e[xe]),Object(i["w"])(e,ke)&&(n.LINE_BREAKS=e[ke]),Object(i["w"])(e,De)&&(n.START_CHARS_HINT=e[De]),n}var je=He({name:"EOF",pattern:Ee.NA});function Fe(e,t,n,r,i,s,o,a){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Ye(e,t){return se(e,t)}ce([je]);var Ue=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),Object(i["u"])(this.definition,(function(t){t.accept(e)}))},e}(),Be=function(e){function t(t){var n=e.call(this,[])||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(Ve),We=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.orgText="",Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Ge=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.ignoreAmbiguities=!1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),ze=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Ke=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Xe=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),$e=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),qe=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Je=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Qe=function(){function e(e){this.idx=1,Object(i["f"])(this,Object(i["N"])(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function Ze(e){return Object(i["I"])(e,et)}function et(e){function t(e){return Object(i["I"])(e,et)}if(e instanceof Be)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof Ge)return{type:"Flat",definition:t(e.definition)};if(e instanceof ze)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ke)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Xe)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:et(new Qe({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof qe)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:et(new Qe({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof $e)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Je)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Qe){var n={type:"Terminal",name:e.terminalType.name,label:Ce(e.terminalType),idx:e.idx},r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=Object(i["D"])(r)?r.source:r),n}if(e instanceof We)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var tt=function(){function e(){}return e.prototype.walk=function(e,t){var n=this;void 0===t&&(t=[]),Object(i["u"])(e.definition,(function(r,s){var o=Object(i["m"])(e.definition,s+1);if(r instanceof Be)n.walkProdRef(r,o,t);else if(r instanceof Qe)n.walkTerminal(r,o,t);else if(r instanceof Ge)n.walkFlat(r,o,t);else if(r instanceof ze)n.walkOption(r,o,t);else if(r instanceof Ke)n.walkAtLeastOne(r,o,t);else if(r instanceof Xe)n.walkAtLeastOneSep(r,o,t);else if(r instanceof qe)n.walkManySep(r,o,t);else if(r instanceof $e)n.walkMany(r,o,t);else{if(!(r instanceof Je))throw Error("non exhaustive match");n.walkOr(r,o,t)}}))},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,n){var r=[new ze({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkAtLeastOneSep=function(e,t,n){var r=nt(e,t,n);this.walk(e,r)},e.prototype.walkMany=function(e,t,n){var r=[new ze({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkManySep=function(e,t,n){var r=nt(e,t,n);this.walk(e,r)},e.prototype.walkOr=function(e,t,n){var r=this,s=t.concat(n);Object(i["u"])(e.definition,(function(e){var t=new Ge({definition:[e]});r.walk(t,s)}))},e}();function nt(e,t,n){var r=[new ze({definition:[new Qe({terminalType:e.separator})].concat(e.definition)})],i=r.concat(t,n);return i}var rt=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case Be:return this.visitNonTerminal(t);case Ge:return this.visitFlat(t);case ze:return this.visitOption(t);case Ke:return this.visitRepetitionMandatory(t);case Xe:return this.visitRepetitionMandatoryWithSeparator(t);case qe:return this.visitRepetitionWithSeparator(t);case $e:return this.visitRepetition(t);case Je:return this.visitAlternation(t);case Qe:return this.visitTerminal(t);case We:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),it=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function st(e){return e instanceof Ge||e instanceof ze||e instanceof $e||e instanceof Ke||e instanceof Xe||e instanceof qe||e instanceof Qe||e instanceof We}function ot(e,t){void 0===t&&(t=[]);var n=e instanceof ze||e instanceof $e||e instanceof qe;return!!n||(e instanceof Je?Object(i["Q"])(e.definition,(function(e){return ot(e,t)})):!(e instanceof Be&&Object(i["j"])(t,e))&&(e instanceof Ve&&(e instanceof Be&&t.push(e),Object(i["o"])(e.definition,(function(e){return ot(e,t)})))))}function at(e){return e instanceof Je}function lt(e){if(e instanceof Be)return"SUBRULE";if(e instanceof ze)return"OPTION";if(e instanceof Je)return"OR";if(e instanceof Ke)return"AT_LEAST_ONE";if(e instanceof Xe)return"AT_LEAST_ONE_SEP";if(e instanceof qe)return"MANY_SEP";if(e instanceof $e)return"MANY";if(e instanceof Qe)return"CONSUME";throw Error("non exhaustive match")}var ct=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return it(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";Object(i["w"])(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";Object(i["w"])(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(rt),ut=new ct;function ht(e){ut.reset(),e.accept(ut);var t=ut.dslMethods;return ut.reset(),t}function dt(e){if(e instanceof Be)return dt(e.referencedRule);if(e instanceof Qe)return pt(e);if(st(e))return mt(e);if(at(e))return ft(e);throw Error("non exhaustive match")}function mt(e){var t,n=[],r=e.definition,s=0,o=r.length>s,a=!0;while(o&&a)t=r[s],a=ot(t),n=n.concat(dt(t)),s+=1,o=r.length>s;return Object(i["T"])(n)}function ft(e){var t=Object(i["I"])(e.definition,(function(e){return dt(e)}));return Object(i["T"])(Object(i["t"])(t))}function pt(e){return[e.terminalType]}var gt="_~IN~_",yt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return yt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,n){},t.prototype.walkProdRef=function(e,t,n){var r=_t(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(n),s=new Ge({definition:i}),o=dt(s);this.follows[r]=o},t}(tt);function bt(e){var t={};return Object(i["u"])(e,(function(e){var n=new wt(e).startWalking();Object(i["f"])(t,n)})),t}function _t(e,t){return e.name+t+gt}var vt=4,St=8,Et=8,Ct=1<<St,Tt=2<<St,Mt=3<<St,Rt=4<<St,Ot=5<<St,Nt=6<<St;function At(e,t,n){return n|t|e}var Lt=32-Et;function It(e,t,n,r){var i=r+1<<Lt;return At(e,t,n)|i}var xt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function kt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset===!0&&(e.endOffset=t.endOffset)}function Dt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset===!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Ht(e,t,n){void 0===e.children[n]?e.children[n]=[t]:e.children[n].push(t)}function Pt(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}var jt=function(e){function t(t){var n=e.call(this)||this;return n.result=[],n.ruleIdx=t,n}return xt(t,e),t.prototype.collectNamedDSLMethod=function(e,t,n){if(!Object(i["F"])(e.name)){var r=void 0;if(e instanceof ze||e instanceof $e||e instanceof Ke||e instanceof Je)r=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof Xe||e instanceof qe))throw Error("non exhaustive match");r=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var s=[r],o=At(this.ruleIdx,n,e.idx);this.result.push({def:s,key:o,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,ze,Tt)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,$e,Mt)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,Ke,Rt)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,Xe,Nt)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,qe,Ot)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,Je,Ct);var n=e.definition.length>1;Object(i["u"])(e.definition,(function(r,s){if(!Object(i["F"])(r.name)){var o=r.definition;o=n?[new ze({definition:r.definition})]:r.definition;var a=It(t.ruleIdx,Ct,e.idx,s);t.result.push({def:o,key:a,name:r.name,orgProd:r})}}))},t}(rt);function Ft(e,t){var n={allRuleNames:[]};return Object(i["u"])(e,(function(e){var r=t[e.name];n.allRuleNames.push(e.name);var s=new jt(r);e.accept(s),Object(i["u"])(s.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n}var Yt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(e){function t(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Yt(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i["g"])(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i["g"])(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,n){void 0===n&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},t.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},t.prototype.updateExpectedNext=function(){Object(i["A"])(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(tt),Vt=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Yt(t,e),t.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),i=new Ge({definition:r});this.possibleTokTypes=dt(i),this.found=!0}},t}(Ut),Bt=function(e){function t(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Yt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(tt),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkMany=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkMany.call(this,t,n,r)},t}(Bt),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkManySep=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkManySep.call(this,t,n,r)},t}(Bt),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkAtLeastOne=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,r)},t}(Bt),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkAtLeastOneSep=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,r)},t}(Bt);function Xt(e,t,n){void 0===n&&(n=[]),n=Object(i["g"])(n);var r=[],s=0;function o(t){return t.concat(Object(i["m"])(e,s+1))}function a(e){var i=Xt(o(e),t,n);return r.concat(i)}while(n.length<t&&s<e.length){var l=e[s];if(l instanceof Ge)return a(l.definition);if(l instanceof Be)return a(l.definition);if(l instanceof ze)r=a(l.definition);else{if(l instanceof Ke){var c=l.definition.concat([new $e({definition:l.definition})]);return a(c)}if(l instanceof Xe){c=[new Ge({definition:l.definition}),new $e({definition:[new Qe({terminalType:l.separator})].concat(l.definition)})];return a(c)}if(l instanceof qe){c=l.definition.concat([new $e({definition:[new Qe({terminalType:l.separator})].concat(l.definition)})]);r=a(c)}else if(l instanceof $e){c=l.definition.concat([new $e({definition:l.definition})]);r=a(c)}else{if(l instanceof Je)return Object(i["u"])(l.definition,(function(e){r=a(e.definition)})),r;if(!(l instanceof Qe))throw Error("non exhaustive match");n.push(l.terminalType)}}s++}return r.push({partialPath:n,suffixDef:Object(i["m"])(e,s)}),r}function $t(e,t,n,r){var s="EXIT_NONE_TERMINAL",o=[s],a="EXIT_ALTERNATIVE",l=!1,c=t.length,u=c-r-1,h=[],d=[];d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!Object(i["A"])(d)){var m=d.pop();if(m!==a){var f=m.def,p=m.idx,g=m.ruleStack,y=m.occurrenceStack;if(!Object(i["A"])(f)){var w=f[0];if(w===s){var b={idx:p,def:Object(i["m"])(f),ruleStack:Object(i["n"])(g),occurrenceStack:Object(i["n"])(y)};d.push(b)}else if(w instanceof Qe)if(p<c-1){var _=p+1,v=t[_];if(n(v,w.terminalType)){b={idx:_,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(b)}}else{if(p!==c-1)throw Error("non exhaustive match");h.push({nextTokenType:w.terminalType,nextTokenOccurrence:w.idx,ruleStack:g,occurrenceStack:y}),l=!0}else if(w instanceof Be){var S=Object(i["g"])(g);S.push(w.nonTerminalName);var E=Object(i["g"])(y);E.push(w.idx);b={idx:p,def:w.definition.concat(o,Object(i["m"])(f)),ruleStack:S,occurrenceStack:E};d.push(b)}else if(w instanceof ze){var C={idx:p,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(C),d.push(a);var T={idx:p,def:w.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y};d.push(T)}else if(w instanceof Ke){var M=new $e({definition:w.definition,idx:w.idx}),R=w.definition.concat([M],Object(i["m"])(f));b={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(b)}else if(w instanceof Xe){var O=new Qe({terminalType:w.separator});M=new $e({definition:[O].concat(w.definition),idx:w.idx}),R=w.definition.concat([M],Object(i["m"])(f)),b={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(b)}else if(w instanceof qe){C={idx:p,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(C),d.push(a);O=new Qe({terminalType:w.separator});var N=new $e({definition:[O].concat(w.definition),idx:w.idx});R=w.definition.concat([N],Object(i["m"])(f)),T={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(T)}else if(w instanceof $e){C={idx:p,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(C),d.push(a);N=new $e({definition:w.definition,idx:w.idx}),R=w.definition.concat([N],Object(i["m"])(f)),T={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(T)}else if(w instanceof Je)for(var A=w.definition.length-1;A>=0;A--){var L=w.definition[A],I={idx:p,def:L.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y};d.push(I),d.push(a)}else if(w instanceof Ge)d.push({idx:p,def:w.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y});else{if(!(w instanceof We))throw Error("non exhaustive match");d.push(qt(w,p,g,y))}}}else l&&Object(i["H"])(d).idx<=u&&d.pop()}return h}function qt(e,t,n,r){var s=Object(i["g"])(n);s.push(e.name);var o=Object(i["g"])(r);return o.push(1),{idx:t,def:e.definition,ruleStack:s,occurrenceStack:o}}var Jt,Qt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Zt(e){if(e instanceof ze)return Jt.OPTION;if(e instanceof $e)return Jt.REPETITION;if(e instanceof Ke)return Jt.REPETITION_MANDATORY;if(e instanceof Xe)return Jt.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof qe)return Jt.REPETITION_WITH_SEPARATOR;if(e instanceof Je)return Jt.ALTERNATION;throw Error("non exhaustive match")}function en(e,t,n,r,i,s){var o=hn(e,t,n),a=pn(o)?oe:se;return s(o,r,a,i)}function tn(e,t,n,r,i,s){var o=dn(e,t,i,n),a=pn(o)?oe:se;return s(o[0],a,r)}function nn(e,t,n,r){var s=e.length,o=Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var r=Object(i["I"])(t,(function(e){return e.GATE})),o=0;o<s;o++){var a=e[o],l=a.length,c=r[o];if(void 0===c||!1!==c.call(this))e:for(var u=0;u<l;u++){for(var h=a[u],d=h.length,m=0;m<d;m++){var f=this.LA(m+1);if(!1===n(f,h[m]))continue e}return o}}};if(o&&!r){var a=Object(i["I"])(e,(function(e){return Object(i["t"])(e)})),l=Object(i["O"])(a,(function(e,t,n){return Object(i["u"])(t,(function(t){Object(i["w"])(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),Object(i["u"])(t.categoryMatches,(function(t){Object(i["w"])(e,t)||(e[t]=n)}))})),e}),[]);return function(){var e=this.LA(1);return l[e.tokenTypeIdx]}}return function(){for(var t=0;t<s;t++){var r=e[t],i=r.length;e:for(var o=0;o<i;o++){for(var a=r[o],l=a.length,c=0;c<l;c++){var u=this.LA(c+1);if(!1===n(u,a[c]))continue e}return t}}}}function rn(e,t,n){var r=Object(i["o"])(e,(function(e){return 1===e.length})),s=e.length;if(r&&!n){var o=Object(i["t"])(e);if(1===o.length&&Object(i["A"])(o[0].categoryMatches)){var a=o[0],l=a.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}var c=Object(i["O"])(o,(function(e,t,n){return e[t.tokenTypeIdx]=!0,Object(i["u"])(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===c[e.tokenTypeIdx]}}return function(){e:for(var n=0;n<s;n++){for(var r=e[n],i=r.length,o=0;o<i;o++){var a=this.LA(o+1);if(!1===t(a,r[o]))continue e}return!0}return!1}}(function(e){e[e["OPTION"]=0]="OPTION",e[e["REPETITION"]=1]="REPETITION",e[e["REPETITION_MANDATORY"]=2]="REPETITION_MANDATORY",e[e["REPETITION_MANDATORY_WITH_SEPARATOR"]=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e["REPETITION_WITH_SEPARATOR"]=4]="REPETITION_WITH_SEPARATOR",e[e["ALTERNATION"]=5]="ALTERNATION"})(Jt||(Jt={}));var sn=function(e){function t(t,n,r){var i=e.call(this)||this;return i.topProd=t,i.targetOccurrence=n,i.targetProdType=r,i}return Qt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)},t.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,Jt.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t}(tt),on=function(e){function t(t,n,r){var i=e.call(this)||this;return i.targetOccurrence=t,i.targetProdType=n,i.targetRef=r,i.result=[],i}return Qt(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,Jt.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,Jt.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,Jt.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,Jt.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,Jt.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,Jt.ALTERNATION)},t}(rt);function an(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}function ln(e){for(var t=[""],n=0;n<e.length;n++){for(var r=e[n],i=[],s=0;s<t.length;s++){var o=t[s];i.push(o+"_"+r.tokenTypeIdx);for(var a=0;a<r.categoryMatches.length;a++){var l="_"+r.categoryMatches[a];i.push(o+l)}}t=i}return t}function cn(e,t,n){for(var r=0;r<e.length;r++)if(r!==n)for(var i=e[r],s=0;s<t.length;s++){var o=t[s];if(!0===i[o])return!1}return!0}function un(e,t){for(var n=Object(i["I"])(e,(function(e){return Xt([e],1)})),r=an(n.length),s=Object(i["I"])(n,(function(e){var t={};return Object(i["u"])(e,(function(e){var n=ln(e.partialPath);Object(i["u"])(n,(function(e){t[e]=!0}))})),t})),o=n,a=1;a<=t;a++){var l=o;o=an(l.length);for(var c=function(e){for(var n=l[e],c=0;c<n.length;c++){var u=n[c].partialPath,h=n[c].suffixDef,d=ln(u),m=cn(s,d,e);if(m||Object(i["A"])(h)||u.length===t){var f=r[e];if(!1===mn(f,u)){f.push(u);for(var p=0;p<d.length;p++){var g=d[p];s[e][g]=!0}}}else{var y=Xt(h,a+1,u);o[e]=o[e].concat(y),Object(i["u"])(y,(function(t){var n=ln(t.partialPath);Object(i["u"])(n,(function(t){s[e][t]=!0}))}))}}},u=0;u<l.length;u++)c(u)}return r}function hn(e,t,n,r){var i=new on(e,Jt.ALTERNATION,r);return t.accept(i),un(i.result,n)}function dn(e,t,n,r){var i=new on(e,n);t.accept(i);var s=i.result,o=new sn(t,e,n),a=o.startWalking(),l=new Ge({definition:s}),c=new Ge({definition:a});return un([l,c],r)}function mn(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var i=0;i<r.length;i++){var s=t[i],o=r[i],a=s===o||void 0!==o.categoryMatchesMap[s.tokenTypeIdx];if(!1===a)continue e}return!0}}return!1}function fn(e,t){return e.length<t.length&&Object(i["o"])(e,(function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function pn(e){return Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return Object(i["A"])(e.categoryMatches)}))}))}))}var gn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function yn(e,t,n,r,s,o){var a=i["I"](e,(function(e){return bn(e,s)})),l=i["I"](e,(function(e){return An(e,e,s)})),c=[],u=[],h=[];Object(i["o"])(l,i["A"])&&(c=Object(i["I"])(e,(function(e){return xn(e,s)})),u=Object(i["I"])(e,(function(e){return kn(e,t,r,s)})),h=Pn(e,t,s));var d=Yn(e,n,s),m=i["I"](n,(function(e){return Rn(e,s)})),f=wn(e,s),p=Un(e,s),g=Object(i["I"])(e,(function(e){return Hn(e,s)})),y=Object(i["I"])(e,(function(e){return Tn(e,s)})),w=Object(i["I"])(e,(function(t){return On(t,e,o,s)}));return i["t"](a.concat(m,f,p,h,l,c,u,d,g,y,w))}function wn(e,t){var n=[];return Object(i["u"])(e,(function(e){var r=new jt("");e.accept(r);var s=Object(i["I"])(r.result,(function(e){return e.orgProd}));n.push(Object(i["I"])(s,(function(n){return Mn(e,n,t)})))})),Object(i["t"])(n)}function bn(e,t){var n=new Sn;e.accept(n);var r=n.allProductions,s=i["v"](r,_n),o=i["N"](s,(function(e){return e.length>1})),a=i["I"](i["U"](o),(function(n){var r=i["s"](n),s=t.buildDuplicateFoundError(e,n),o=lt(r),a={message:s,type:zr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:r.idx},l=vn(r);return l&&(a.parameter=l),a}));return a}function _n(e){return lt(e)+"_#_"+e.idx+"_#_"+vn(e)}function vn(e){return e instanceof Qe?e.terminalType.name:e instanceof Be?e.nonTerminalName:""}var Sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return gn(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(rt),En=/^[a-zA-Z_]\w*$/,Cn=new RegExp(En.source.replace("^","^\\$"));function Tn(e,t){var n=[],r=e.name;return r.match(En)||n.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:En}),type:zr.INVALID_RULE_NAME,ruleName:r}),n}function Mn(e,t,n){var r,i=[];return t.name.match(Cn)||(r=n.buildInvalidNestedRuleNameError(e,t),i.push({message:r,type:zr.INVALID_NESTED_RULE_NAME,ruleName:e.name})),i}function Rn(e,t){var n=[],r=e.name;return r.match(En)||n.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:En}),type:zr.INVALID_TOKEN_NAME}),n}function On(e,t,n,r){var s=[],o=Object(i["O"])(t,(function(t,n){return n.name===e.name?t+1:t}),0);if(o>1){var a=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});s.push({message:a,type:zr.DUPLICATE_RULE_NAME,ruleName:e.name})}return s}function Nn(e,t,n){var r,s=[];return i["j"](t,e)||(r="Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+n+"<-as it is not defined in any of the super grammars ",s.push({message:r,type:zr.INVALID_RULE_OVERRIDE,ruleName:e})),s}function An(e,t,n,r){void 0===r&&(r=[]);var s=[],o=Ln(t.definition);if(i["A"](o))return[];var a=e.name,l=i["j"](o,e);l&&s.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:zr.LEFT_RECURSION,ruleName:a});var c=i["l"](o,r.concat([e])),u=i["I"](c,(function(t){var s=i["g"](r);return s.push(t),An(e,t,n,s)}));return s.concat(i["t"](u))}function Ln(e){var t=[];if(i["A"](e))return t;var n=i["s"](e);if(n instanceof Be)t.push(n.referencedRule);else if(n instanceof Ge||n instanceof ze||n instanceof Ke||n instanceof Xe||n instanceof qe||n instanceof $e)t=t.concat(Ln(n.definition));else if(n instanceof Je)t=i["t"](i["I"](n.definition,(function(e){return Ln(e.definition)})));else if(!(n instanceof Qe))throw Error("non exhaustive match");var r=ot(n),s=e.length>1;if(r&&s){var o=i["m"](e);return t.concat(Ln(o))}return t}var In=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return gn(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(rt);function xn(e,t){var n=new In;e.accept(n);var r=n.alternations,s=i["O"](r,(function(n,r){var s=i["n"](r.definition),o=i["I"](s,(function(n,s){var o=$t([n],[],null,1);return i["A"](o)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:s}),type:zr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:s+1}:null}));return n.concat(i["i"](o))}),[]);return s}function kn(e,t,n,r){var s=new In;e.accept(s);var o=s.alternations,a=n[e.name];a&&(o=Object(i["P"])(o,(function(e){return a[lt(e)+(0===e.idx?"":e.idx)]}))),o=Object(i["P"])(o,(function(e){return!0===e.ignoreAmbiguities}));var l=i["O"](o,(function(n,i){var s=i.idx,o=i.maxLookahead||t,a=hn(s,e,o,i),l=jn(a,i,e,r),c=Fn(a,i,e,r);return n.concat(l,c)}),[]);return l}var Dn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return gn(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(rt);function Hn(e,t){var n=new In;e.accept(n);var r=n.alternations,s=i["O"](r,(function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:zr.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n}),[]);return s}function Pn(e,t,n){var r=[];return Object(i["u"])(e,(function(e){var s=new Dn;e.accept(s);var o=s.allProductions;Object(i["u"])(o,(function(s){var o=Zt(s),a=s.maxLookahead||t,l=s.idx,c=dn(l,e,o,a),u=c[0];if(Object(i["A"])(Object(i["t"])(u))){var h=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});r.push({message:h,type:zr.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}function jn(e,t,n,r){var s=[],o=Object(i["O"])(e,(function(n,r,o){return!0===t.definition[o].ignoreAmbiguities||Object(i["u"])(r,(function(r){var a=[o];Object(i["u"])(e,(function(e,n){o!==n&&mn(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!mn(s,r)&&(s.push(r),n.push({alts:a,path:r}))})),n}),[]),a=i["I"](o,(function(e){var s=Object(i["I"])(e.alts,(function(e){return e+1})),o=r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:s,prefixPath:e.path});return{message:o,type:zr.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:[e.alts]}}));return a}function Fn(e,t,n,r){var s=[],o=Object(i["O"])(e,(function(e,t,n){var r=Object(i["I"])(t,(function(e){return{idx:n,path:e}}));return e.concat(r)}),[]);return Object(i["u"])(o,(function(e){var a=t.definition[e.idx];if(!0!==a.ignoreAmbiguities){var l=e.idx,c=e.path,u=Object(i["r"])(o,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<l&&fn(e.path,c)})),h=Object(i["I"])(u,(function(e){var i=[e.idx+1,l+1],s=0===t.idx?"":t.idx,o=r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:o,type:zr.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}));s=s.concat(h)}})),s}function Yn(e,t,n){var r=[],s=Object(i["I"])(t,(function(e){return e.name}));return Object(i["u"])(e,(function(e){var t=e.name;if(Object(i["j"])(s,t)){var o=n.buildNamespaceConflictError(e);r.push({message:o,type:zr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}function Un(e,t){var n=[];return Object(i["u"])(e,(function(e){var r=new jt("");e.accept(r);var s=Object(i["v"])(r.result,(function(e){return e.name})),o=Object(i["N"])(s,(function(e){return e.length>1}));Object(i["u"])(Object(i["U"])(o),(function(r){var s=Object(i["I"])(r,(function(e){return e.orgProd})),o=t.buildDuplicateNestedRuleNameError(e,s);n.push({message:o,type:zr.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),n}var Vn={buildMismatchTokenMessage:function(e){var t=e.expected,n=e.actual,r=(e.previous,e.ruleName,Me(t)),i=r?"--\x3e "+Ce(t)+" <--":"token of type --\x3e "+t.name+" <--",s="Expecting "+i+" but found --\x3e '"+n.image+"' <--";return s},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,n=e.actual,r=(e.previous,e.customUserDescription),s=(e.ruleName,"Expecting: "),o=Object(i["s"])(n).image,a="\nbut found: '"+o+"'";if(r)return s+r+a;var l=Object(i["O"])(t,(function(e,t){return e.concat(t)}),[]),c=Object(i["I"])(l,(function(e){return"["+Object(i["I"])(e,(function(e){return Ce(e)})).join(", ")+"]"})),u=Object(i["I"])(c,(function(e,t){return" "+(t+1)+". "+e})),h="one of these possible Token sequences:\n"+u.join("\n");return s+h+a},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,n=e.actual,r=e.customUserDescription,s=(e.ruleName,"Expecting: "),o=Object(i["s"])(n).image,a="\nbut found: '"+o+"'";if(r)return s+r+a;var l=Object(i["I"])(t,(function(e){return"["+Object(i["I"])(e,(function(e){return Ce(e)})).join(",")+"]"})),c="expecting at least one iteration which starts with one of these possible Token sequences::\n <"+l.join(" ,")+">";return s+c+a}};Object.freeze(Vn);var Bn={buildRuleNotFoundError:function(e,t){var n="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-";return n}},Wn={buildDuplicateFoundError:function(e,t){function n(e){return e instanceof Qe?e.terminalType.name:e instanceof Be?e.nonTerminalName:""}var r=e.name,s=Object(i["s"])(t),o=s.idx,a=lt(s),l=n(s),c=o>0,u="->"+a+(c?o:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,"\n"),u},buildInvalidNestedRuleNameError:function(e,t){var n="Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+Cn.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign.";return n},buildDuplicateNestedRuleNameError:function(e,t){var n=Object(i["s"])(t).name,r="Duplicate nested rule name: ->"+n+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule.";return r},buildNamespaceConflictError:function(e){var t="Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.";return t},buildAlternationPrefixAmbiguityError:function(e){var t=Object(i["I"])(e.prefixPath,(function(e){return Ce(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r="Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.";return r},buildAlternationAmbiguityError:function(e){var t=Object(i["I"])(e.prefixPath,(function(e){return Ce(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError:function(e){var t=lt(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);var n="The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop.";return n},buildTokenNameError:function(e){var t=e.tokenType.name,n="Invalid Grammar Token name: ->"+t+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-";return n},buildEmptyAlternationError:function(e){var t="Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative.";return t},buildTooManyAlternativesError:function(e){var t="An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives.";return t},buildLeftRecursionError:function(e){var t=e.topLevelRule.name,n=i["I"](e.leftRecursionPath,(function(e){return e.name})),r=t+" --\x3e "+n.concat([t]).join(" --\x3e "),s="Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+r+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.";return s},buildInvalidRuleNameError:function(e){var t=e.topLevelRule.name,n=e.expectedPattern.toString(),r="Invalid grammar rule name: ->"+t+"<- it must match the pattern: ->"+n+"<-";return r},buildDuplicateRuleNameError:function(e){var t;t=e.topLevelRule instanceof We?e.topLevelRule.name:e.topLevelRule;var n="Duplicate definition, rule: ->"+t+"<- is already defined in the grammar: ->"+e.grammarName+"<-";return n}},Gn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function zn(e,t){var n=new Kn(e,t);return n.resolveRefs(),n.errors}var Kn=function(e){function t(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return Gn(t,e),t.prototype.resolveRefs=function(){var e=this;Object(i["u"])(Object(i["U"])(this.nameToTopRule),(function(t){e.currTopLevel=t,t.accept(e)}))},t.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:zr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(rt);function Xn(e){e=Object(i["k"])(e,{errMsgProvider:Bn});var t={};return Object(i["u"])(e.rules,(function(e){t[e.name]=e})),zn(t,e.errMsgProvider)}function $n(e){return e=Object(i["k"])(e,{errMsgProvider:Wn,ignoredIssues:{}}),yn(e.rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function qn(e){Object(i["u"])(e.rules,(function(e){var t=new ct;e.accept(t),Object(i["u"])(t.dslMethods,(function(e){Object(i["u"])(e,(function(e,t){e.idx=t+1}))}))}))}var Jn="MismatchedTokenException",Qn="NoViableAltException",Zn="EarlyExitException",er="NotAllInputParsedException",tr=[Jn,Qn,Zn,er];function nr(e){return Object(i["j"])(tr,e.name)}function rr(e,t,n){this.name=Jn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function ir(e,t,n){this.name=Qn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function sr(e,t){this.name=er,this.message=e,this.token=t,this.resyncedTokens=[]}function or(e,t,n){this.name=Zn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(tr),rr.prototype=Error.prototype,ir.prototype=Error.prototype,sr.prototype=Error.prototype,or.prototype=Error.prototype;var ar={},lr="InRuleRecoveryException";function cr(e){this.name=lr,this.message=e}cr.prototype=Error.prototype;var ur=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i["w"])(e,"recoveryEnabled")?e.recoveryEnabled:Kr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=hr)},e.prototype.getTokenToInsert=function(e){var t=Fe(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,n,r){var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),h=this.LA(1),d=function(){var e=s.LA(0),t=s.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:e,ruleName:s.getCurrRuleFullName()}),n=new rr(t,u,s.LA(0));n.resyncedTokens=Object(i["n"])(l),s.SAVE_ERROR(n)};while(!c){if(this.tokenMatcher(h,r))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(h,o)?c=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(a)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!1!==n&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t),r=this.getNextPossibleTokenTypes(n);return r},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var n=this.getTokenToInsert(e);return n}if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new cr("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Object(i["A"])(t))return!1;var r=this.LA(1),s=void 0!==Object(i["q"])(t,(function(e){return n.tokenMatcher(r,e)}));return s},e.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return Object(i["j"])(n,e)},e.prototype.findReSyncTokenType=function(){var e=this.flattenFollowSet(),t=this.LA(1),n=2;while(1){var r=t.tokenType;if(Object(i["j"])(e,r))return r;t=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ar;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i["A"])(this.LAST_EXPLICIT_RULE_STACK)||(t=Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),n=Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),Object(i["I"])(t,(function(r,i){return 0===i?ar:{ruleName:e.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:e.shortRuleNameToFullName(t[i-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=Object(i["I"])(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return Object(i["t"])(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===ar)return[je];var t=e.ruleName+e.idxInCallingRule+gt+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,je)||t.push(e),t},e.prototype.reSyncTo=function(e){var t=[],n=this.LA(1);while(!1===this.tokenMatcher(n,e))n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Object(i["n"])(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,n,r,i,s,o){},e.prototype.getCurrentGrammarPath=function(e,t){var n=this.getHumanReadableRuleStack(),r=Object(i["g"])(this.RULE_OCCURRENCE_STACK),s={ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t};return s},e.prototype.getHumanReadableRuleStack=function(){var e=this;return Object(i["A"])(this.LAST_EXPLICIT_RULE_STACK)?Object(i["I"])(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function hr(e,t,n,r,i,s,o){var a=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[a];if(void 0===l){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],h=new s(u,i);l=h.startWalking(),this.firstAfterRepMap[a]=l}var d=l.token,m=l.occurrence,f=l.isEndOfRule;1===this.RULE_STACK.length&&f&&void 0===d&&(d=je,m=1),this.shouldInRepetitionRecoveryBeTried(d,m,o)&&this.tryInRepetitionRecovery(e,t,n,d)}var dr=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=Object(i["w"])(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Kr.dynamicTokensEnabled,this.maxLookahead=Object(i["w"])(e,"maxLookahead")?e.maxLookahead:Kr.maxLookahead,this.lookAheadFuncsCache=Object(i["z"])()?new Map:[],Object(i["z"])()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;Object(i["u"])(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var n=ht(e),r=n.alternation,s=n.repetition,o=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,c=n.repetitionWithSeparator;Object(i["u"])(r,(function(n){var r=0===n.idx?"":n.idx;t.TRACE_INIT(""+lt(n)+r,(function(){var r=en(n.idx,e,n.maxLookahead||t.maxLookahead,n.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),i=At(t.fullRuleNameToShort[e.name],Ct,n.idx);t.setLaFuncCache(i,r)}))})),Object(i["u"])(s,(function(n){t.computeLookaheadFunc(e,n.idx,Mt,Jt.REPETITION,n.maxLookahead,lt(n))})),Object(i["u"])(o,(function(n){t.computeLookaheadFunc(e,n.idx,Tt,Jt.OPTION,n.maxLookahead,lt(n))})),Object(i["u"])(a,(function(n){t.computeLookaheadFunc(e,n.idx,Rt,Jt.REPETITION_MANDATORY,n.maxLookahead,lt(n))})),Object(i["u"])(l,(function(n){t.computeLookaheadFunc(e,n.idx,Nt,Jt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,lt(n))})),Object(i["u"])(c,(function(n){t.computeLookaheadFunc(e,n.idx,Ot,Jt.REPETITION_WITH_SEPARATOR,n.maxLookahead,lt(n))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,n,r,i,s){var o=this;this.TRACE_INIT(""+s+(0===t?"":t),(function(){var s=tn(t,e,i||o.maxLookahead,o.dynamicTokensEnabled,r,o.lookAheadBuilderForOptional),a=At(o.fullRuleNameToShort[e.name],n,t);o.setLaFuncCache(a,s)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,n){return rn(e,t,n)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,n,r){return nn(e,t,n,r)},e.prototype.getKeyForAutomaticLookahead=function(e,t){var n=this.getLastExplicitRuleShortName();return At(n,e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}();function mr(e){return yr(e.constructor)}var fr,pr=/^\s*function\s*(\S*)\s*\(/,gr="name";function yr(e){var t=e.name;if(t)return t;var n=e.toString().match(pr)[1];return n}function wr(e,t){var n=Object.getOwnPropertyDescriptor(e,gr);return!(!Object(i["F"])(n)&&!n.configurable)&&(Object.defineProperty(e,gr,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function br(e,t){for(var n=Object(i["G"])(e),r=n.length,s=0;s<r;s++)for(var o=n[s],a=e[o],l=a.length,c=0;c<l;c++){var u=a[c];void 0===u.tokenTypeIdx&&(void 0!==u.fullName?this[u.fullName](u.children,t):this[u.name](u.children,t))}}function _r(e,t){var n=function(){};wr(n,e+"BaseSemantics");var r={visit:function(e,t){if(Object(i["y"])(e)&&(e=e[0]),!Object(i["F"])(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=Sr(this,t);if(!Object(i["A"])(e)){var n=Object(i["I"])(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+yr(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=t,n}function vr(e,t,n){var r=function(){};wr(r,e+"BaseSemanticsWithDefaults");var s=Object.create(n.prototype);return Object(i["u"])(t,(function(e){s[e]=br})),r.prototype=s,r.prototype.constructor=r,r}function Sr(e,t){var n=Er(e,t),r=Tr(e,t);return n.concat(r)}function Er(e,t){var n=Object(i["I"])(t,(function(t){if(!Object(i["B"])(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+yr(e.constructor)+" CST Visitor.",type:fr.MISSING_METHOD,methodName:t}}));return Object(i["i"])(n)}(function(e){e[e["REDUNDANT_METHOD"]=0]="REDUNDANT_METHOD",e[e["MISSING_METHOD"]=1]="MISSING_METHOD"})(fr||(fr={}));var Cr=["constructor","visit","validateVisitor"];function Tr(e,t){var n=[];for(var r in e)En.test(r)&&Object(i["B"])(e[r])&&!Object(i["j"])(Cr,r)&&!Object(i["j"])(t,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+yr(e.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+En.source+"/.",type:fr.REDUNDANT_METHOD,methodName:r});return n}var Mr=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=Object(i["w"])(e,"outputCst")?e.outputCst:Kr.outputCst,this.nodeLocationTracking=Object(i["w"])(e,"nodeLocationTracking")?e.nodeLocationTracking:Kr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Dt,this.setNodeLocationFromNode=Dt,this.cstPostRule=i["b"],this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=kt,this.setNodeLocationFromNode=kt,this.cstPostRule=i["b"],this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=i["b"],this.setInitialNodeLocation=i["b"]}else this.cstInvocationStateUpdate=i["b"],this.cstFinallyStateUpdate=i["b"],this.cstPostTerminal=i["b"],this.cstPostNonTerminal=i["b"],this.cstPostRule=i["b"],this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstNestedInvocationStateUpdate=function(e,t){var n={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},e.prototype.cstNestedFinallyStateUpdate=function(){var e=this.CST_STACK.pop();this.cstPostRule(e)},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset===!0?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset===!0?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var n=this.CST_STACK[this.CST_STACK.length-1];Ht(n,t,e),this.setNodeLocationFromToken(n.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var n=this.CST_STACK[this.CST_STACK.length-1];Pt(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if(Object(i["F"])(this.baseCstVisitorConstructor)){var e=_r(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i["F"])(this.baseCstVisitorWithDefaultsConstructor)){var e=vr(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var n;return void 0!==e.NAME?(n=e.NAME,this.nestedRuleInvocationStateUpdate(n,t),n):void 0},e.prototype.nestedAltBeforeClause=function(e,t,n,r){var i,s=this.getLastExplicitRuleShortName(),o=It(s,n,t,r);return void 0!==e.NAME?(i=e.NAME,this.nestedRuleInvocationStateUpdate(i,o),{shortName:o,nestedName:i}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var n=this.CST_STACK,r=n[n.length-1];this.nestedRuleFinallyStateUpdate();var i=n[n.length-1];Pt(i,t,r),this.setNodeLocationFromNode(i.location,r.location)},e.prototype.getLastExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[e]},e.prototype.getLastExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[e]},e.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[e]},e.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e.prototype.nestedRuleInvocationStateUpdate=function(e,t){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(t),this.cstNestedInvocationStateUpdate(e,t)},e.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},e}(),Rr=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!0,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Gr},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Gr:this.tokVector[t]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}(),Or=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,n){return this.consumeInternal(t,e,n)},e.prototype.subrule=function(e,t,n){return this.subruleInternal(t,e,n)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,t,n){if(void 0===n&&(n=Xr),Object(i["j"])(this.definedRulesNames,e)){var r=Wn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:r,type:zr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,n);return this[e]=o,o},e.prototype.OVERRIDE_RULE=function(e,t,n){void 0===n&&(n=Xr);var r=[];r=r.concat(Nn(e,this.definedRulesNames,this.className)),this.definitionErrors.push.apply(this.definitionErrors,r);var i=this.defineRule(e,t,n);return this[e]=i,i},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(nr(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return Ze(Object(i["U"])(this.gastProductionsCache))},e}(),Nr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=mr(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=oe,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i["w"])(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i["y"])(e)){if(Object(i["A"])(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"===typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i["y"])(e))this.tokensMap=Object(i["O"])(e,(function(e,t){return e[t.name]=t,e}),{});else if(Object(i["w"])(e,"modes")&&Object(i["o"])(Object(i["t"])(Object(i["U"])(e.modes)),be)){var n=Object(i["t"])(Object(i["U"])(e.modes)),r=Object(i["T"])(n);this.tokensMap=Object(i["O"])(r,(function(e,t){return e[t.name]=t,e}),{})}else{if(!Object(i["C"])(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i["h"])(e)}this.tokensMap["EOF"]=je;var s=Object(i["o"])(Object(i["U"])(e),(function(e){return Object(i["A"])(e.categoryMatches)}));this.tokenMatcher=s?oe:se,ce(Object(i["U"])(this.tokensMap))},e.prototype.defineRule=function(e,t,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,s=Object(i["w"])(n,"resyncEnabled")?n.resyncEnabled:Xr.resyncEnabled,o=Object(i["w"])(n,"recoveryValueFunc")?n.recoveryValueFunc:Xr.recoveryValueFunc,a=this.ruleShortNameIdx<<vt+St;function l(e){try{if(!0===this.outputCst){t.apply(this,e);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return t.apply(this,e)}catch(r){return this.invokeRuleCatch(r,s,o)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a,r=function(t,n){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(a,e,t),l.call(this,n)};var c="ruleName";return r[c]=e,r["originalGrammarAction"]=t,r},e.prototype.invokeRuleCatch=function(e,t,n){var r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(nr(e)){var s=e;if(i){var o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o)){if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){var a=this.CST_STACK[this.CST_STACK.length-1];return a.recoveredNode=!0,a}return n()}if(this.outputCst){a=this.CST_STACK[this.CST_STACK.length-1];a.recoveredNode=!0,s.partialCstResult=a}throw s}if(r)return this.moveToTerminatedState(),n();throw s}throw e},e.prototype.optionInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Tt,t),r=this.nestedRuleBeforeClause(e,n);try{return this.optionInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.optionInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Tt,t);return this.optionInternalLogic(e,t,n)},e.prototype.optionInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,i=e.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=e;if(!0===o.call(this))return r.call(this)},e.prototype.atLeastOneInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Rt,e),r=this.nestedRuleBeforeClause(t,n);try{return this.atLeastOneInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Rt,e);this.atLeastOneInternalLogic(e,t,n)},e.prototype.atLeastOneInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,i=t.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=t;if(!0!==o.call(this))throw this.raiseEarlyExitException(e,Jt.REPETITION_MANDATORY,t.ERR_MSG);var l=this.doSingleRepetition(r);while(!0===o.call(this)&&!0===l)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],o,Rt,e,zt)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Nt,e),r=this.nestedRuleBeforeClause(t,n);try{this.atLeastOneSepFirstInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Nt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,n){var r=this,i=t.DEF,s=t.SEP,o=this.getLaFuncFromCache(n);if(!0!==o.call(this))throw this.raiseEarlyExitException(e,Jt.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);i.call(this);var a=function(){return r.tokenMatcher(r.LA(1),s)};while(!0===this.tokenMatcher(this.LA(1),s))this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,Kt],a,Nt,e,Kt)},e.prototype.manyInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Mt,e),r=this.nestedRuleBeforeClause(t,n);try{return this.manyInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.manyInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Mt,e);return this.manyInternalLogic(e,t,n)},e.prototype.manyInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,i=t.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=t;var l=!0;while(!0===o.call(this)&&!0===l)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,Mt,e,Wt,l)},e.prototype.manySepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ot,e),r=this.nestedRuleBeforeClause(t,n);try{this.manySepFirstInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Ot,e);this.manySepFirstInternalLogic(e,t,n)},e.prototype.manySepFirstInternalLogic=function(e,t,n){var r=this,i=t.DEF,s=t.SEP,o=this.getLaFuncFromCache(n);if(!0===o.call(this)){i.call(this);var a=function(){return r.tokenMatcher(r.LA(1),s)};while(!0===this.tokenMatcher(this.LA(1),s))this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,Gt],a,Ot,e,Gt)}},e.prototype.repetitionSepSecondInternal=function(e,t,n,r,i){while(n())this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Nt,e,i)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();e.call(this);var n=this.getLexerPosition();return n>t},e.prototype.orInternalNoCst=function(e,t){var n=Object(i["y"])(e)?e:e.DEF,r=this.getKeyForAutomaticLookahead(Ct,t),s=this.getLaFuncFromCache(r),o=s.call(this,n);if(void 0!==o){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ct,t),r=this.nestedRuleBeforeClause(e,n);try{var s=Object(i["y"])(e)?e:e.DEF,o=this.getLaFuncFromCache(n),a=o.call(this,s);if(void 0!==a){var l=s[a],c=this.nestedAltBeforeClause(l,t,Ct,a);try{return l.ALT.call(this)}finally{void 0!==c&&this.nestedRuleFinallyClause(c.shortName,c.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new sr(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=e.call(this,t,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(s){this.subruleInternalError(s,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw nr(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,e)?(this.consumeToken(),r=i):this.consumeInternalError(e,i,n)}catch(s){r=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r},e.prototype.consumeInternalError=function(e,t,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new rr(r,t,i))},e.prototype.consumeInternalRecovery=function(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(i){throw i.name===lr?n:i}},e.prototype.saveRecogState=function(){var e=this.errors,t=Object(i["g"])(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),je)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}(),Ar=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=Object(i["k"])(e.errorMessageProvider,Kr.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(nr(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i["g"])(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return Object(i["g"])(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,n){for(var r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=dn(e,i,t,this.maxLookahead),o=s[0],a=[],l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));var c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new or(c,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=hn(e,r,this.maxLookahead),s=[],o=1;o<=this.maxLookahead;o++)s.push(this.LA(o));var a=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ir(l,this.LA(1),a))},e}(),Lr=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var n=this.gastProductionsCache[e];if(Object(i["F"])(n))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return $t([n],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=Object(i["s"])(e.ruleStack),n=this.getGAstProductions(),r=n[t],s=new Vt(r,e).startWalking();return s},e}(),Ir={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ir);var xr=!0,kr=Math.pow(2,St)-1,Dr=He({name:"RECORDING_PHASE_TOKEN",pattern:Ee.NA});ce([Dr]);var Hr=Fe(Dr,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Hr);var Pr={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},jr=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var t=function(t){var n=t>0?t:"";e["CONSUME"+n]=function(e,n){return this.consumeInternalRecord(e,t,n)},e["SUBRULE"+n]=function(e,n){return this.subruleInternalRecord(e,t,n)},e["OPTION"+n]=function(e){return this.optionInternalRecord(e,t)},e["OR"+n]=function(e){return this.orInternalRecord(e,t)},e["MANY"+n]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+n]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+n]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+n]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},n=0;n<10;n++)t(n);e["consume"]=function(e,t,n){return this.consumeInternalRecord(t,e,n)},e["subrule"]=function(e,t,n){return this.subruleInternalRecord(t,e,n)},e["option"]=function(e,t){return this.optionInternalRecord(t,e)},e["or"]=function(e,t){return this.orInternalRecord(t,e)},e["many"]=function(e,t){this.manyInternalRecord(e,t)},e["atLeastOne"]=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD}))},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var t=0;t<10;t++){var n=t>0?t:"";delete e["CONSUME"+n],delete e["SUBRULE"+n],delete e["OPTION"+n],delete e["OR"+n],delete e["MANY"+n],delete e["MANY_SEP"+n],delete e["AT_LEAST_ONE"+n],delete e["AT_LEAST_ONE_SEP"+n]}delete e["consume"],delete e["subrule"],delete e["option"],delete e["or"],delete e["many"],delete e["atLeastOne"],delete e.ACTION,delete e.BACKTRACK,delete e.LA}))},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return Gr},e.prototype.topLevelRuleRecord=function(e,t){try{var n=new We({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(i){throw r}throw r}},e.prototype.optionInternalRecord=function(e,t){return Fr.call(this,ze,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){Fr.call(this,Ke,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Fr.call(this,Xe,t,e,xr)},e.prototype.manyInternalRecord=function(e,t){Fr.call(this,$e,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){Fr.call(this,qe,t,e,xr)},e.prototype.orInternalRecord=function(e,t){return Yr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,n){if(Vr(t),!e||!1===Object(i["w"])(e,"ruleName")){var r=new Error("<SUBRULE"+Ur(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var s=Object(i["M"])(this.recordingProdStack),o=e["ruleName"],a=new Be({idx:t,nonTerminalName:o,referencedRule:void 0});return s.definition.push(a),this.outputCst?Pr:Ir},e.prototype.consumeInternalRecord=function(e,t,n){if(Vr(t),!pe(e)){var r=new Error("<CONSUME"+Ur(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var s=Object(i["M"])(this.recordingProdStack),o=new Qe({idx:t,terminalType:e});return s.definition.push(o),Hr},e}();function Fr(e,t,n,r){void 0===r&&(r=!1),Vr(n);var s=Object(i["M"])(this.recordingProdStack),o=Object(i["B"])(t)?t:t.DEF,a=new e({definition:[],idx:n});return Object(i["w"])(t,"NAME")&&(a.name=t.NAME),r&&(a.separator=t.SEP),Object(i["w"])(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),s.definition.push(a),this.recordingProdStack.pop(),Ir}function Yr(e,t){var n=this;Vr(t);var r=Object(i["M"])(this.recordingProdStack),s=!1===Object(i["y"])(e),o=!1===s?e:e.DEF,a=new Je({definition:[],idx:t,ignoreAmbiguities:s&&!0===e.IGNORE_AMBIGUITIES});Object(i["w"])(e,"NAME")&&(a.name=e.NAME),Object(i["w"])(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);var l=Object(i["Q"])(o,(function(e){return Object(i["B"])(e.GATE)}));return a.hasPredicates=l,r.definition.push(a),Object(i["u"])(o,(function(e){var t=new Ge({definition:[]});a.definition.push(t),Object(i["w"])(e,"NAME")&&(t.name=e.NAME),Object(i["w"])(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object(i["w"])(e,"GATE")&&(t.ignoreAmbiguities=!0),n.recordingProdStack.push(t),e.ALT.call(n),n.recordingProdStack.pop()})),Ir}function Ur(e){return 0===e?"":""+e}function Vr(e){if(e<0||e>kr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(kr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var Br=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(Object(i["w"])(e,"traceInitPerf")){var t=e.traceInitPerf,n="number"===typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Kr.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i["R"])(t),s=r.time,o=r.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}return t()},e}(),Wr=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gr=Fe(je,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Gr);var zr,Kr=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Vn,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Xr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function $r(e){return void 0===e&&(e=void 0),function(){return e}}(function(e){e[e["INVALID_RULE_NAME"]=0]="INVALID_RULE_NAME",e[e["DUPLICATE_RULE_NAME"]=1]="DUPLICATE_RULE_NAME",e[e["INVALID_RULE_OVERRIDE"]=2]="INVALID_RULE_OVERRIDE",e[e["DUPLICATE_PRODUCTIONS"]=3]="DUPLICATE_PRODUCTIONS",e[e["UNRESOLVED_SUBRULE_REF"]=4]="UNRESOLVED_SUBRULE_REF",e[e["LEFT_RECURSION"]=5]="LEFT_RECURSION",e[e["NONE_LAST_EMPTY_ALT"]=6]="NONE_LAST_EMPTY_ALT",e[e["AMBIGUOUS_ALTS"]=7]="AMBIGUOUS_ALTS",e[e["CONFLICT_TOKENS_RULES_NAMESPACE"]=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e["INVALID_TOKEN_NAME"]=9]="INVALID_TOKEN_NAME",e[e["INVALID_NESTED_RULE_NAME"]=10]="INVALID_NESTED_RULE_NAME",e[e["DUPLICATE_NESTED_NAME"]=11]="DUPLICATE_NESTED_NAME",e[e["NO_NON_EMPTY_LOOKAHEAD"]=12]="NO_NON_EMPTY_LOOKAHEAD",e[e["AMBIGUOUS_PREFIX_ALTS"]=13]="AMBIGUOUS_PREFIX_ALTS",e[e["TOO_MANY_ALTS"]=14]="TOO_MANY_ALTS"})(zr||(zr={}));var qr=function(){function e(e,t){void 0===t&&(t=Kr),this.ignoredIssues=Kr.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var n=this;n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),Object(i["w"])(t,"ignoredIssues")&&t.ignoredIssues!==Kr.ignoredIssues&&Object(i["d"])("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=Object(i["w"])(t,"ignoredIssues")?t.ignoredIssues:Kr.ignoredIssues,this.skipValidations=Object(i["w"])(t,"skipValidations")?t.skipValidations:Kr.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",(function(){Object(i["S"])(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),Object(i["u"])(t.definedRulesNames,(function(e){var n=t[e],r=n["originalGrammarAction"],i=void 0;t.TRACE_INIT(e+" Rule",(function(){i=t.topLevelRuleRecord(e,r)})),t.gastProductionsCache[e]=i}))}finally{t.disableRecording()}}));var s=[];if(t.TRACE_INIT("Grammar Resolving",(function(){s=Xn({rules:Object(i["U"])(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,s)})),t.TRACE_INIT("Grammar Validations",(function(){if(Object(i["A"])(s)&&!1===t.skipValidations){var e=$n({rules:Object(i["U"])(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:Object(i["U"])(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:Wn,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}})),Object(i["A"])(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e=bt(Object(i["U"])(t.gastProductionsCache));t.resyncFollows=e})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions(Object(i["U"])(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e=Ft(Object(i["U"])(t.gastProductionsCache),t.fullRuleNameToShort);t.allRuleNames=e.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i["A"])(t.definitionErrors))throw n=Object(i["I"])(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();Object(i["e"])(qr,[ur,dr,Mr,Rr,Nr,Or,Ar,Lr,jr,Br]);var Jr=function(e){function t(t,n){void 0===n&&(n=Kr);var r=this,s=Object(i["h"])(n);return s.outputCst=!0,r=e.call(this,t,s)||this,r}return Wr(t,e),t}(qr),Qr=function(e){function t(t,n){void 0===n&&(n=Kr);var r=this,s=Object(i["h"])(n);return s.outputCst=!1,r=e.call(this,t,s)||this,r}return Wr(t,e),t}(qr);function Zr(e,t){var n=void 0===t?{}:t,i=n.resourceBase,s=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,o=n.css,a=void 0===o?"https://unpkg.com/chevrotain@"+r+"/diagrams/diagrams.css":o,l='\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n',c="\n<link rel='stylesheet' href='"+a+"'>\n",u="\n<script src='"+s+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+s+"src/diagrams_builder.js'><\/script>\n<script src='"+s+"src/diagrams_behavior.js'><\/script>\n<script src='"+s+"src/main.js'><\/script>\n",h='\n<div id="diagrams" align="center"></div> \n',d="\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n",m='\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n';return l+c+u+h+d+m}var ei="\n";function ti(e){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+ri(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}function ni(e){return" \n"+ri(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}function ri(e){var t="\nfunction "+e.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+ii(e.rules)+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n"+e.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+e.name+".prototype.constructor = "+e.name+" \n ";return t}function ii(e){var t=Object(i["I"])(e,(function(e){return si(e,1)}));return t.join("\n")}function si(e,t){var n=fi(t,'$.RULE("'+e.name+'", function() {')+ei;return n+=mi(e.definition,t+1),n+=fi(t+1,"})")+ei,n}function oi(e,t){var n=e.terminalType.name;return fi(t,"$.CONSUME"+e.idx+"(this.tokensMap."+n+")"+ei)}function ai(e,t){return fi(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+ei)}function li(e,t){var n=fi(t,"$.OR"+e.idx+"([")+ei,r=Object(i["I"])(e.definition,(function(e){return ci(e,t+1)}));return n+=r.join(","+ei),n+=ei+fi(t,"])"+ei),n}function ci(e,t){var n=fi(t,"{")+ei;return e.name&&(n+=fi(t+1,'NAME: "'+e.name+'",')+ei),n+=fi(t+1,"ALT: function() {")+ei,n+=mi(e.definition,t+1),n+=fi(t+1,"}")+ei,n+=fi(t,"}"),n}function ui(e,t){if(e instanceof Be)return ai(e,t);if(e instanceof ze)return hi("OPTION",e,t);if(e instanceof Ke)return hi("AT_LEAST_ONE",e,t);if(e instanceof Xe)return hi("AT_LEAST_ONE_SEP",e,t);if(e instanceof qe)return hi("MANY_SEP",e,t);if(e instanceof $e)return hi("MANY",e,t);if(e instanceof Je)return li(e,t);if(e instanceof Qe)return oi(e,t);if(e instanceof Ge)return mi(e.definition,t);throw Error("non exhaustive match")}function hi(e,t,n){var r=fi(n,"$."+(e+t.idx)+"(");return t.name||t.separator?(r+="{"+ei,t.name&&(r+=fi(n+1,'NAME: "'+t.name+'"')+","+ei),t.separator&&(r+=fi(n+1,"SEP: this.tokensMap."+t.separator.name)+","+ei),r+="DEF: "+di(t.definition,n+2)+ei,r+=fi(n,"}")+ei):r+=di(t.definition,n+1),r+=fi(n,")")+ei,r}function di(e,t){var n="function() {"+ei;return n+=mi(e,t),n+=fi(t,"}")+ei,n}function mi(e,t){var n="";return Object(i["u"])(e,(function(e){n+=ui(e,t+1)})),n}function fi(e,t){var n=Array(4*e+1).join(" ");return n+t}function pi(e){var t=ni({name:e.name,rules:e.rules}),r=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return r(e.tokenVocabulary,t,n("fa83"))}}function gi(e){return ti({name:e.name,rules:e.rules})}function yi(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},facd:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".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"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},fb46:function(e,t,n){"use strict";var r=n("0227"),i=n("fd18"),s=n("bef1"),o=n("4aa5"),a=n("088f"),l=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=s.f(a(e)),n=o.f;return n?l(t,n(e)):t}},fc2d:function(e,t,n){"use strict";var r=n("bf78"),i=Object;e.exports=function(e){return i(r(e))}},fd18:function(e,t,n){"use strict";var r=n("48ab"),i=Function.prototype,s=i.call,o=r&&i.bind.bind(s,s);e.exports=r?o:function(e){return function(){return s.apply(e,arguments)}}},fd7e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},fdba:function(e,t,n){"use strict";var r=n("d128"),i=n("2b75"),s=n("a60d"),o=n("088f"),a=n("9394"),l=n("c041");t.f=r&&!i?Object.defineProperties:function(e,t){o(e);var n,r=a(t),i=l(t),c=i.length,u=0;while(c>u)s.f(e,n=i[u++],r[n]);return e}},ffec:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=typeof e;if("number"===n)return!isNaN(e)&&isFinite(e);if("string"===n){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);const n=Array.from(new Set([".",...t])).map(e=>"\\"+e).join("|");return new RegExp(`^[+-]?\\s*(((${n})?\\d+((${n})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(e.trim())}return"object"===n&&(!!e&&"number"===typeof e.valueOf()&&!(e instanceof Date))}function i(e){return r(e,[","])}function s(e,t,n){let r=-1;"function"===typeof t?(n=t,t=e):r=e-1;while(++r<=t)if(!1===n(r))break}function o(e,t,n){let r=e+1;"function"===typeof t&&(n=t,t=0);while(--r>=t)if(!1===n(r))break}function a(e,t){return t=parseInt(t.toString().replace("%",""),10),t=isNaN(t)?0:t,parseInt(e*t/100,10)}function l(e,t,n){return Math.min(e,t)===e?t:Math.max(e,n)===e?n:e}n.r(t),n.d(t,"isNumeric",(function(){return r})),n.d(t,"isNumericLike",(function(){return i})),n.d(t,"rangeEach",(function(){return s})),n.d(t,"rangeEachReverse",(function(){return o})),n.d(t,"valueAccordingPercent",(function(){return a})),n.d(t,"clamp",(function(){return l}))},ffff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))}}]);
|