chunk-e7e0bc78.dc2b56fb.js 1.8 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e7e0bc78"],{"00fd":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("14d9");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";
  2. //! moment.js locale configuration
  3. 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}))},"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 u})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_ROW",(function(){return h})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COLUMN",(function(){return c})),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 M})),n.d(t,"CONTEXTMENU_ITEMS_EDIT_COMMENT",(function(){return T})),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 L})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_CENTER",(function(){return A})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT",(function(){return I})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY",(function(){return k})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_TOP",(function(){return x})),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 ue})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL",(function(){return he})),n.d(t,"FILTERS_CONDITIONS_BETWEEN",(function(){return ce})),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 Me})),n.d(t,"FILTERS_BUTTONS_CANCEL",(function(){return Te})),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 Le})),n.d(t,"CHECKBOX_CHECKED",(function(){return Ae})),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",u=i+".insertColumnOnTheRight",h=i+".removeRow",c=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",M=i+".addComment",T=i+".editComment",R=i+".removeComment",O=i+".readOnlyComment",N=i+".align",L=i+".align.left",A=i+".align.center",I=i+".align.right",k=i+".align.justify",x=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",ue=q+".lessThan",he=q+".lessThanOrEqualTo",ce=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",Me=$+"buttons.ok",Te=$+"buttons.cancel",Re=$+"buttons.placeholder.search",Oe=$+"buttons.placeholder.value",Ne=$+"buttons.placeholder.secondValue",Le="CheckboxRenderer:",Ae=Le+"checked",Ie=Le+"unchecked"},"02fb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  4. //! moment.js locale configuration
  5. 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}))},"0352":function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));n("d9e2");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 u(e,t,n){e.removeEventListener(t,n,!1)}function h(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function c(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=h(s).fontSize,i.style.fontFamily=h(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 c(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,c(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(){u(s,"input",o),u(s,"keydown",a)}}}var d=n("7b9c");function m(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 f=n("8828");function p(e,t,n){return(t=g(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="ht_editor_visible",b="ht_editor_hidden",_="textEditor",v="text";class S extends r["a"]{static get EDITOR_TYPE(){return v}constructor(e){super(e),p(this,"eventManager",new i["a"](this)),p(this,"autoResize",c(this.hot.rootDocument)),p(this,"TEXTAREA",void 0),p(this,"textareaStyle",void 0),p(this,"TEXTAREA_PARENT",void 0),p(this,"textareaParentStyle",void 0),p(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.isOpened()&&(this.TEXTAREA.value=""),a===r["b"].FINISHED||this.isOpened()||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(f["L"])(-1)]),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,b),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,b)}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,b)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,b),t?(this.layerClass=w,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 u=Object(o["getComputedStyle"])(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=u.fontSize,this.TEXTAREA.style.fontFamily=u.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=Object(o["getComputedStyle"])(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),d=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),m=i-c,f=a-d,p=s-c,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={runOnlyIf:()=>Object(d["isDefined"])(this.hot.getSelected()),group:_},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[n]=t;m(n,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[n]=t;m(n,this.TEXTAREA)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(_)}}},"03ec":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  6. //! moment.js locale configuration
  7. 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}))},"0402":function(e,t,n){"use strict";var r=n("23e7"),i=n("da84"),s=n("2cf4").set,o=n("20cc"),a=i.setImmediate?o(s,!1):s;r({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})},"0558":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  8. //! moment.js locale configuration
  9. 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("d9e2");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))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(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 c=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,c,!1),u(c,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(c,this)}isSouthEastOf(e){return this.row>=e.row&&(l(c,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(l(c,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(l(c,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(l(c,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&&u(c,this,e.isRtl()),this}clone(){return new d(this.row,this.col,l(c,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";
  10. //! moment.js locale configuration
  11. 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";
  12. //! moment.js locale configuration
  13. 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}))},"0a3c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  14. //! moment.js locale configuration
  15. 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}))},"0a84":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  16. //! moment.js locale configuration
  17. 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}))},"0caa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  18. //! moment.js locale configuration
  19. 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";
  20. //! moment.js locale configuration
  21. 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";
  22. //! moment.js locale configuration
  23. 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";
  24. //! moment.js locale configuration
  25. 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}))},"0f14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  26. //! moment.js locale configuration
  27. 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";
  28. //! moment.js locale configuration
  29. 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";
  30. //! moment.js locale configuration
  31. 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("d9e2"),n("14d9"),n("73d9");var r=n("81ea"),i=n("351d"),s=n("29b0"),o=n("bd5e"),a=n("67a8"),l=n("97b9");function u(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(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)}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","modifyRowHeightByOverlayName","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
  32. Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
  33. 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([[]]),g=new WeakMap;class y{static getSingleton(){return b()}constructor(){u(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return Object(r["arrayEach"])(d,t=>{e[t]=[],this.initOrderMap(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,i=arguments.length>3?arguments[3]:void 0;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 a=this.getBucket(n);if("undefined"===typeof a[e]&&(this.register(e),a[e]=[],this.initOrderMap(a,e)),t.skip=!1,-1===a[e].indexOf(t)){let n=!1;t.initialHook&&Object(r["arrayEach"])(a[e],(r,i)=>{if(r.initialHook)return a[e][i]=t,n=!0,!1}),n||a[e].push(t)}this.setCallbackOrderIndex(a,e,t,i),this.orderBucketByOrderIndex(a,e)}return this}once(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;Array.isArray(t)?Object(r["arrayEach"])(t,t=>this.once(e,t,n)):(t.runOnce=!0,this.add(e,t,n,i))}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 u=this.globalBucket[t],h=u?u.length:0;let c=0;if(h)while(c<h){if(!u[c]||u[c].skip){c+=1;continue}const h=Object(l["fastCall"])(u[c],e,n,r,i,s,o,a);void 0!==h&&(n=h),u[c]&&u[c].runOnce&&this.remove(t,u[c]),c+=1}}{const u=this.getBucket(e)[t],h=u?u.length:0;let c=0;if(h)while(c<h){if(!u[c]||u[c].skip){c+=1;continue}const h=Object(l["fastCall"])(u[c],e,n,r,i,s,o,a);void 0!==h&&(n=h),u[c]&&u[c].runOnce&&this.remove(t,u[c],e),c+=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}setCallbackOrderIndex(e,t,n,r){const i=Number.isInteger(r)?r:0,s=this.getCallbackOrderMap(e,t);s.set(i,[...s.get(i)||[],n])}orderBucketByOrderIndex(e,t){const n=this.getCallbackOrderMap(e,t);void 0===n||0===n.size||1===n.size&&n.has(0)||(e[t]=[...n].sort((e,t)=>e[0]-t[0]).flatMap(e=>{let[,t]=e;return t}))}initOrderMap(e,t){g.has(e)||g.set(e,[]),g.get(e)[t]=new Map}getCallbackOrderMap(e,t){return g.get(e)[t]}}const w=new y;function b(){return w}t["a"]=y},1096:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n("d9e2"),n("14d9");var r=n("ffec"),i=n("351d"),s=n("97b9"),o=n("7ae0");function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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{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"])(h,o["a"])},"10e8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  34. //! moment.js locale configuration
  35. 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}))},"130f":function(e,t,n){"use strict";n("e20c"),n("0402")},"13e1":function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));n("d9e2");var r=n("7b9c"),i=n("351d"),s=(n("14d9"),n("81ea"));const o="hooksRefRegisterer",a={_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(s["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"])(a,"MIXIN_NAME",o,{writable:!1,enumerable:!1});var l=a,u=n("5d7f");function h(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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)}const m="base",f=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class p{static get EDITOR_TYPE(){return m}constructor(e){h(this,"hot",void 0),h(this,"state",f.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=this.isOpened()?this.state:f.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let n,r,i,s;if(t){const e=this.hot.getSelectedLast();n=Math.max(Math.min(e[0],e[2]),0),r=Math.max(Math.min(e[1],e[3]),0),i=Math.max(e[0],e[2]),s=Math.max(e[1],e[3])}else[n,r,i,s]=[this.row,this.col,null,null];const o=this.hot.runHooks("modifyGetCellCoords",n,r);Array.isArray(o)&&([n,r]=o),this.hot.populateFromArray(n,r,e,i,s,"edit")}beginEditing(e,t){if(this.state!==f.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=f.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())if(this.state!==f.VIRGIN){if(this.state===f.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=f.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=f.FINISHED,this.discardEditor(e)}):(this.state=f.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=f.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===f.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=f.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=f.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===f.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),h=n.topOverlay.holder,c=n.inlineStartOverlay.holder,d=h!==i?h.scrollTop:0,m=c!==i?c.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),M=this.hot.rowIndexMapper.getRenderableIndexesLength(),T=M-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&E<=0||E===T)&&(_+=1),C<=0&&(v+=1);const R=r.rowsRenderCalculator.startPosition,O=r.columnsRenderCalculator.startPosition,N=Math.abs(n.inlineStartOverlay.getScrollPosition()),L=n.topOverlay.getScrollPosition(),A=Object(u["getScrollbarWidth"])(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(g)&&(I+=R-L),["bottom","bottom_inline_start_corner"].includes(g)){const{wtViewport:e,wtTable:t}=n.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-A}let k=t.offsetLeft;this.hot.isRtl()?(k=k>=0?p.getWidth()-t.offsetLeft:Math.abs(k),k+=O-N-o):["top","master","bottom"].includes(g)&&(k+=O-N);const x=Object(u["getComputedStyle"])(this.TD,this.hot.rootWindow),D=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",H=parseInt(x[D],10)>0?0:1,P=parseInt(x.borderTopWidth,10)>0?0:1,j=Object(u["outerWidth"])(t)+H,F=Object(u["outerHeight"])(t)+P,Y=Object(u["hasVerticalScrollbar"])(h)?A:0,U=Object(u["hasHorizontalScrollbar"])(c)?A:0,V=this.hot.view.maximumVisibleElementWidth(k)-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"])(p,l)},"13e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  36. //! moment.js locale configuration
  37. 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}))},"167b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  38. //! moment.js locale configuration
  39. 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 h})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("d9e2");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("validators");function u(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered validator found under "${e}" name`);return s(e)}function h(e,t){"string"!==typeof e&&(t=e,e=t.VALIDATOR_TYPE),i(e,t)}},"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";
  40. //! moment.js locale configuration
  41. 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}))},"1cfd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  42. //! moment.js locale configuration
  43. 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}))},"1e5a":function(e,t,n){"use strict";var r=n("23e7"),i=n("9961"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("symmetricDifference")},{symmetricDifference:i})},"1e70":function(e,t,n){"use strict";var r=n("23e7"),i=n("a5f7"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("difference")},{difference:i})},"1e8c":function(e,t,n){"use strict";n.d(t,"a",(function(){return te}));var r=n("c4fa");const i={name:"editorCloseAndSave",callback(e){const t=e._getEditorManager();t.closeEditorAndSaveChanges()}};var s=n("13e1");const o={name:"editorCloseAndSaveByArrowKeys",callback(e,t,n){const r=e._getEditorManager(),i=r.getActiveEditor();i.isInFullEditMode()&&i.state===s["b"].EDITING||(r.closeEditorAndSaveChanges(),e.getSelected()&&(n.includes("arrowdown")?e.selection.transformStart(1,0):n.includes("arrowup")?e.selection.transformStart(-1,0):n.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):n.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}},a={name:"editorCloseAndSaveByEnter",callback(e,t){const n=e._getEditorManager();n.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),n.moveSelectionAfterEnter(t)}},l={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},u={name:"editorFastOpen",callback(e,t){const{highlight:n}=e.getSelectedRangeLast();n.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};var h=n("de3b");const c={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(h["stopImmediatePropagation"])(t))}};function d(){return[i,o,a,l,u,c]}const m={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)}},f={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"})}}},p={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())}},g={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())}},y={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)}},w={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))}}},b={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))}}},_={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))}}},v={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))}}},S={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))}}},E={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))}}},C={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)}},M={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)}},T={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 R(){return[m,f,p,g,y,w,b,_,v,S,E,C,M,T]}const O={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}},N={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})}},L={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)}},A={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)}},I={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}},k={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}},x={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))}},D={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))}},H={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,n.getNearestNotHiddenIndex(e.countCols()-1,-1)))}},P={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))}},j={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))}},F={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))}},Y={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))}},U={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))}},V={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}},B={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 W(){return[O,N,L,A,I,k,x,D,H,P,j,F,Y,U,V,B]}const G={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},z={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"})}}},K={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}},X={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}},$={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()))}},q=[...d(),...R(),...W(),G,z,K,X,$];function J(e){const t={};return q.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 Q(e){const t=e.getShortcutManager().addContext("editor"),n=J(e),i={group:r["a"]};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>n.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>n.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>n.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>n.editorCloseWithoutSaving()}],i)}var Z=n("7b9c");function ee(e){const t=e.getShortcutManager().addContext("grid"),n=J(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return Object(Z["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(Z["isDefined"])(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>{var t;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader()},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>{var t,n;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())&&(null===(n=e.getSelectedRangeLast())||void 0===n?void 0:n.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 te(e){[ee,Q].forEach(t=>t(e))}},"1fc1":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  44. //! moment.js locale configuration
  45. 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";
  46. //! moment.js locale configuration
  47. 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}))},"20cc":function(e,t,n){"use strict";var r=n("da84"),i=n("2ba4"),s=n("1626"),o=n("c6a7"),a=n("342f"),l=n("f36a"),u=n("d6d6"),h=r.Function,c=/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 c?function(r,o){var a=u(arguments.length,1)>n,c=s(r)?r:h(r),d=a?l(arguments,n):[],m=a?function(){i(c,this,d)}:c;return t?e(m,o):e(m)}:e}},"220a":function(e,t,n){"use strict";n("d9e2"),n("14d9");var r=n("5d7f"),i=n("81ea");function s(e,t,n){return(t=o(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=>{const{height:n}=t.table.getBoundingClientRect();e(t.row,Math.ceil(n)-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),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),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"),u=t.createElement("th");return this.isVertical()&&i.appendChild(a),this.isHorizontal()&&(l.appendChild(u),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:u}}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";
  48. //! moment.js locale configuration
  49. 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}))},2421:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  50. //! moment.js locale configuration
  51. 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}))},"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("d9e2");var r=n("29b0"),i=n("ffec"),s=n("97b9");const o="asc",a="desc",l=new Map([[o,[-1,1]],[a,[1,-1]]]),u=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`;function c(){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:u,t=Object(s["isFunction"])(t)?t:h,{addItem:r,getItems:a}}var d=n("6906");n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");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=c({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]=T(e,t,n),void 0===S(e)&&M(e,t,n)}function M(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 T(e,t,n){return"function"===typeof e&&(t=e,e=t.PLUGIN_KEY,n=t.PLUGIN_PRIORITY),[e,t,n]}},25548:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  52. //! moment.js locale configuration
  53. function t(e,t,n,r){switch(n){case"m":return t?"jedna minuta":r?"jednu minutu":"jedne minute"}}function n(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"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return"jedan sat";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 r=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:n,m:t,mm:n,h:n,hh:n,d:"dan",dd:n,M:"mjesec",MM:n,y:"godinu",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return r}))},"26f9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  54. //! moment.js locale configuration
  55. 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}))},2921:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  56. //! moment.js locale configuration
  57. 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";
  58. //! moment.js locale configuration
  59. 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 u})),n.d(t,"stripTags",(function(){return h})),n.d(t,"sanitize",(function(){return c}));n("14d9");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 u(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 h(e){return c(""+e,{ALLOWED_TAGS:[]})}function c(e,t){return r.sanitize(e,t)}},"2bfb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  60. //! moment.js locale configuration
  61. 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}))},"2e8c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  62. //! moment.js locale configuration
  63. 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}))},"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 u})),n.d(t,"mixin",(function(){return h})),n.d(t,"isObjectEqual",(function(){return c})),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("d9e2"),n("14d9"),n("e9c4");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 u(e){const t={};return f(e,(e,n)=>{t[n]=e}),t}function h(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 c(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)}},"384f":function(e,t,n){"use strict";var r=n("e330"),i=n("5388"),s=n("cb27"),o=s.Set,a=s.proto,l=r(a.forEach),u=r(a.keys),h=u(new o).next;e.exports=function(e,t,n){return n?i({iterator:u(e),next:h},t):l(e,t)}},3886:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  64. //! moment.js locale configuration
  65. 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}))},"395e":function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27").has,s=n("8e16"),o=n("7f65"),a=n("5388"),l=n("2a62");e.exports=function(e){var t=r(this),n=o(e);if(s(t)<n.size)return!1;var u=n.getIterator();return!1!==a(u,(function(e){if(!i(t,e))return l(u,"normal",!1)}))}},"39a6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  66. //! moment.js locale configuration
  67. 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";
  68. //! moment.js locale configuration
  69. 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";
  70. //! moment.js locale configuration
  71. 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";
  72. //! moment.js locale configuration
  73. 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";
  74. //! moment.js locale configuration
  75. 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";
  76. //! moment.js locale configuration
  77. var t={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},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}))},"3c65":function(e,t,n){"use strict";var r=n("23e7"),i=n("7b0b"),s=n("07fa"),o=n("3a34"),a=n("083a"),l=n("3511"),u=1!==[].unshift(0),h=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},c=u||!h();r({target:"Array",proto:!0,arity:1,forced:c},{unshift:function(e){var t=i(this),n=s(t),r=arguments.length;if(r){l(n+r);var u=n;while(u--){var h=u+r;u in t?t[h]=t[u]:a(t,h)}for(var c=0;c<r;c++)t[c]=arguments[c]}return o(t,n+r)}})},"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 h})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("d9e2");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("renderers");function u(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered renderer found under "${e}" name`);return s(e)}function h(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";
  78. //! moment.js locale configuration
  79. 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}))},"3e92":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  80. //! moment.js locale configuration
  81. 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}))},4069:function(e,t,n){"use strict";var r=n("44d2");r("flat")},"423e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  82. //! moment.js locale configuration
  83. 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";
  84. //! moment.js locale configuration
  85. 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}))},"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 u})),n.d(t,"createEmptySpreadsheetData",(function(){return h})),n.d(t,"dataRowToChangesArray",(function(){return c})),n.d(t,"countFirstRowKeys",(function(){return d})),n.d(t,"isArrayOfArrays",(function(){return m})),n.d(t,"isArrayOfObjects",(function(){return f}));n("14d9");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 u(){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 h(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 c(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){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  86. //! moment.js locale configuration
  87. 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}))},"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 u}));n("d9e2");var r=n("1004"),i=n("9acd");const s=new WeakMap,{register:o,getItem:a,hasItem:l,getNames:u,getValues:h}=Object(i["a"])("editors");function c(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 c(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";
  88. //! moment.js locale configuration
  89. 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}))},"4ba9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  90. //! moment.js locale configuration
  91. 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}))},"4c98":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  92. //! moment.js locale configuration
  93. 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-ps",{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]})).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,(function(e){return n[e]})).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return r}))},5038:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  94. //! moment.js locale configuration
  95. 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}))},5120:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  96. //! moment.js locale configuration
  97. 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";
  98. //! moment.js locale configuration
  99. 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";
  100. //! moment.js locale configuration
  101. 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}))},5388:function(e,t,n){"use strict";var r=n("c65b");e.exports=function(e,t,n){var i,s,o=n?e:e.iterator,a=e.next;while(!(i=r(a,o)).done)if(s=t(i.value),void 0!==s)return s}},"55c9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  102. //! moment.js locale configuration
  103. 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}))},5714:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("d9e2");function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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 o{constructor(e){r(this,"calculationTypes",[]),r(this,"calculationResults",new Map),this.calculationTypes=e}_initialize(e){this.calculationTypes.forEach(t=>{let[n,r]=t;this.calculationResults.set(n,r),r.initialize(e)})}_process(e,t){this.calculationTypes.forEach(n=>{let[,r]=n;return r.process(e,t)})}_finalize(e){this.calculationTypes.forEach(t=>{let[,n]=t;return n.finalize(e)})}getResultsFor(e){return this.calculationResults.get(e)}}},"576c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  104. //! moment.js locale configuration
  105. 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}))},"598a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  106. //! moment.js locale configuration
  107. 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}))},"5aff":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  108. //! moment.js locale configuration
  109. 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";
  110. //! moment.js locale configuration
  111. 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}))},"5b81":function(e,t,n){"use strict";var r=n("23e7"),i=n("c65b"),s=n("e330"),o=n("1d80"),a=n("1626"),l=n("7234"),u=n("44e7"),h=n("577e"),c=n("dc4a"),d=n("90d8"),m=n("0cb2"),f=n("b622"),p=n("c430"),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,M,T,R=o(this),O=0,N=0,L="";if(!l(e)){if(n=u(e),n&&(r=h(o(d(e))),!~w(r,"g")))throw new y("`.replaceAll` does not allow non-global regexes");if(s=c(e,g),s)return i(s,e,R,t);if(p&&n)return b(h(R),e,t)}f=h(R),S=h(e),E=a(t),E||(t=h(t)),C=S.length,M=v(1,C),O=w(f,S);while(-1!==O)T=E?h(t(S,O,f)):m(S,f,O,[],void 0,t),L+=_(f,N,O)+T,N=O+C,O=O+M>f.length?-1:w(f,S,O+M);return N<f.length&&(L+=_(f,N)),L}})},"5c3a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  112. //! moment.js locale configuration
  113. 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";
  114. //! moment.js locale configuration
  115. 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 u})),n.d(t,"closest",(function(){return h})),n.d(t,"closestDown",(function(){return c})),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 M})),n.d(t,"fastInnerText",(function(){return T})),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 L})),n.d(t,"getScrollTop",(function(){return A})),n.d(t,"getScrollLeft",(function(){return I})),n.d(t,"getScrollableElement",(function(){return k})),n.d(t,"getMaximumScrollTop",(function(){return x})),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 ue})),n.d(t,"makeElementContentEditableAndSelectItsContent",(function(){return he})),n.d(t,"removeContentEditableFromElementAndDeselect",(function(){return ce})),n.d(t,"runWithSelectedContendEditableElement",(function(){return de}));n("d9e2"),n("14d9");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 u(e){return!!Object.getPrototypeOf(e.parent)}function h(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 c(e,t,n){const r=[];let i=e;while(i){if(i=h(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 M(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];C.test(t)?e.innerHTML=n?Object(r["sanitize"])(t):t:T(e,t)}function T(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 L(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function A(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?L(t):e.scrollLeft}function k(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 x(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 ue(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 he(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 ce(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];he(e,n),t(),ce(e,n)}},"5fbd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  116. //! moment.js locale configuration
  117. 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}))},6117:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  118. //! moment.js locale configuration
  119. 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}))},"63d8":function(e,t,n){"use strict";n.r(t),n.d(t,"setBrowserMeta",(function(){return l})),n.d(t,"setPlatformMeta",(function(){return u})),n.d(t,"isChrome",(function(){return h})),n.d(t,"isChromeWebKit",(function(){return c})),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("7dd0");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 u(){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 h(){return o.chrome.value}function c(){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(),u())},6403:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  120. //! moment.js locale configuration
  121. 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}))},"65db":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  122. //! moment.js locale configuration
  123. 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";
  124. //! moment.js locale configuration
  125. 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}))},"67a8":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";
  126. //! moment.js locale configuration
  127. 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,u=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,h=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],c=[/^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:h,shortWeekdaysParse:c,minWeekdaysParse:d,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:l,monthsShortStrictRegex:u,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";
  128. //! moment.js locale configuration
  129. 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}))},"68df":function(e,t,n){"use strict";var r=n("dc19"),i=n("8e16"),s=n("384f"),o=n("7f65");e.exports=function(e){var t=r(this),n=o(e);return!(i(t)>n.size)&&!1!==s(t,(function(e){if(!n.includes(e))return!1}),!0)}},6906:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("d9e2");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(h(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]=u().find(t=>{let[n,r]=t;return e===r&&n})||[null];return t}function l(e){return t.get(e)}function u(){return[...t]}function h(e){return t.has(e)}return e=Object(r["isFunction"])(e)?e:i,{addItem:n,clear:o,getId:a,getItem:l,getItems:u,hasItem:h,removeItem:s}}},6909:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  130. //! moment.js locale configuration
  131. 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}))},"6ce3":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  132. //! moment.js locale configuration
  133. 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:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én 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";
  134. //! moment.js locale configuration
  135. 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";
  136. //! moment.js locale configuration
  137. 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";
  138. //! moment.js locale configuration
  139. 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";
  140. //! moment.js locale configuration
  141. 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";
  142. //! moment.js locale configuration
  143. 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}))},7118:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  144. //! moment.js locale configuration
  145. 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}))},"72c3":function(e,t,n){"use strict";var r=n("23e7"),i=n("e9bc"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("union")},{union:i})},7333:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  146. //! moment.js locale configuration
  147. 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("44d2");r("flatMap")},"74dc":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  148. //! moment.js locale configuration
  149. 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}))},7558:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  150. //! moment.js locale configuration
  151. function t(e,t,n,r){var i={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return t?i[n][0]:i[n][1]}function n(e){e=""+e;var t=e.substring(e.length-1),n=e.length>1?e.substring(e.length-2):"";return 12==n||13==n||"2"!=t&&"3"!=t&&"50"!=n&&"70"!=t&&"80"!=t?"ê":"yê"}var r=e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,t,n){return e<12?n?"bn":"BN":n?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,w:t,ww:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,t){var r=t.toLowerCase();return r.includes("w")||r.includes("m")?e+".":e+n(e)},week:{dow:1,doy:4}});return r}))},"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 u})),n.d(t,"b",(function(){return h}));n("d9e2");var r=n("9acd"),i=n("491c"),s=n("3d76"),o=n("169f");const{register:a,getItem:l,hasItem:u,getNames:h,getValues:c}=Object(r["a"])("cellTypes");function d(e){if(!u(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 u(e){return r(e)?void 0:e[0]}function h(e){var t=e&&e.length;return t?e[t-1]:void 0}function c(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 M(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 T(e,t,n){for(var r=Array.isArray(e),o=r?e:s(e),a=r?[]:i(e),l=n,u=0;u<o.length;u++)l=t.call(null,l,o[u],r?u:a[u]);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 T(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 L(e){return Array.isArray(e)}function A(e){return e instanceof RegExp}function I(e){return e instanceof Object}function k(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function x(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 c(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 u})),n.d(t,"H",(function(){return h})),n.d(t,"u",(function(){return c})),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 M})),n.d(t,"O",(function(){return T})),n.d(t,"i",(function(){return R})),n.d(t,"T",(function(){return O})),n.d(t,"y",(function(){return L})),n.d(t,"D",(function(){return A})),n.d(t,"C",(function(){return I})),n.d(t,"o",(function(){return k})),n.d(t,"l",(function(){return x})),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}))},"79a4":function(e,t,n){"use strict";var r=n("23e7"),i=n("d039"),s=n("953b"),o=n("dad2"),a=!o("intersection")||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}));r({target:"Set",proto:!0,real:!0,forced:a},{intersection:s})},"7ae0":function(e,t,n){"use strict";n("14d9");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 u=0;u<l;u++)Object(i["fastCall"])(this._localHooks[e][u],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},"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 u})),n.d(t,"_injectProductInfo",(function(){return v}));var r=n("c1df"),i=n("67a8");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 u(e){return"[object RegExp]"===Object.prototype.toString.call(e)}const h="length",c=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=>c(m(p(e),c("12"),f("F")))/(c(m(p(e),f("B"),~~![][h]))||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"]`
  152. The license key for Handsontable is invalid.\x20
  153. If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return i["a"]`
  154. The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
  155. version ${n}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
  156. to ${t}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>i["a"]`
  157. The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
  158. Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
  159. passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
  160. us at support@handsontable.com.`,non_commercial:()=>""},_={invalid:()=>i["a"]`
  161. The license key for Handsontable is invalid.\x20
  162. <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
  163. 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"]`
  164. The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
  165. version ${n}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
  166. license key or downgrade to a version released prior to ${t}. If you need any\x20
  167. help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>i["a"]`
  168. The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
  169. Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
  170. passing the key: 'non-commercial-and-evaluation'.\x20
  171. <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
  172. 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.6.1";let o,a="invalid",u="invalid";e=p(e||"");const h=S(e);if(n||i||h)if(h){const t=r("17/10/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",u="expired"):(a="valid",u="valid")}else i?(a="non_commercial",u="valid"):(a="invalid",u="invalid");else a="missing",u="missing";if(y()&&(a="valid",u="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"!==u&&t.parentNode){const e=_[u]({keyValidityDate:o,hotVersion:s});if(e){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=_[u]({keyValidityDate:o,hotVersion:s}),t.parentNode.insertBefore(e,t.nextSibling)}}}function S(e){let t=[][h],n=t;if(e[h]!==f("Z"))return!1;for(let r="",i="B<H4P+".split(""),s=f(i.shift());s;s=f(i.shift()||"A"))--s<""[h]?n|=(d(""+d(c(r)+(c(m(e,Math.abs(s),2))+[]).padStart(2,"0")))%97||2)>>1:r=m(e,s,s?1===i[h]?9:8:6);return n===t}},"7be6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  173. //! moment.js locale configuration
  174. 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}))},"7dd0":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";
  175. //! moment.js locale configuration
  176. 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}))},"7f65":function(e,t,n){"use strict";var r=n("59ed"),i=n("825a"),s=n("c65b"),o=n("5926"),a=n("46c4"),l="Invalid size",u=RangeError,h=TypeError,c=Math.max,d=function(e,t){this.set=e,this.size=c(t,0),this.has=r(e.has),this.keys=r(e.keys)};d.prototype={getIterator:function(){return a(i(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){i(e);var t=+e.size;if(t!==t)throw new h(l);var n=o(t);if(n<0)throw new u(l);return new d(e,n)}},8033:function(e,t,n){},8155:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  177. //! moment.js locale configuration
  178. 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}))},"81e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  179. //! moment.js locale configuration
  180. 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 u})),n.d(t,"arraySum",(function(){return h})),n.d(t,"arrayMax",(function(){return c})),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("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");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 u(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 h(e){return o(e,(e,t)=>e+t,0)}function c(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?h(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 u(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 u(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 u(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 u(i,e=>{u(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";
  181. //! moment.js locale configuration
  182. 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}))},"83b9e":function(e,t,n){"use strict";var r=n("cb27"),i=n("384f"),s=r.Set,o=r.add;e.exports=function(e){var t=new s;return i(e,(function(e){o(t,e)})),t}},"84aa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  183. //! moment.js locale configuration
  184. 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}))},"861dd":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));n("d9e2"),n("14d9");var r=n("5714");function i(e,t,n){return(t=s(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)}const a=50;class l extends r["a"]{constructor(e){let{calculationTypes:t,viewportWidth:n,scrollOffset:r,totalColumns:s,columnWidthFn:o,overrideFn:a,inlineStartOffset:l}=e;super(t),i(this,"viewportWidth",0),i(this,"scrollOffset",0),i(this,"zeroBasedScrollOffset",0),i(this,"totalColumns",0),i(this,"columnWidthFn",null),i(this,"columnWidth",0),i(this,"overrideFn",null),i(this,"inlineStartOffset",0),i(this,"totalCalculatedWidth",0),i(this,"startPositions",[]),i(this,"needReverse",!0),this.viewportWidth=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalColumns=s,this.columnWidthFn=o,this.overrideFn=a,this.inlineStartOffset=l,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalColumns;e++)if(this.columnWidth=this.getColumnWidth(e),this._process(e,this),this.startPositions.push(this.totalCalculatedWidth),this.totalCalculatedWidth+=this.columnWidth,this.totalCalculatedWidth>=this.zeroBasedScrollOffset+this.viewportWidth){this.needReverse=!1;break}this._finalize(this)}getColumnWidth(e){const t=this.columnWidthFn(e);return isNaN(t)?a:t}}},8689:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  185. //! moment.js locale configuration
  186. 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}))},8722: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 u="function"==typeof r&&r;if(!l&&u)return r(a,!0);if(o)return o(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var c=n[a]={exports:{}};t[a][0].call(c.exports,(function(e){return s(t[a][1][e]||e)}),c,c.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,u=14,h=9007199254740991,c=[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=u-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,u=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==u,!i||!s)return r?0:!i^n?1:-1;if(!r)return u<l^n?1:-1;for(a=(l=i.length)<(u=s.length)?l:u,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^n?1:-1;return l==u?0:u<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/u)==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,M,T,R,O,N,L=B.prototype={constructor:B,toString:null,valueOf:null},A=new B(1),I=20,k=4,x=-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,c,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,c=e;10<=c;c/=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<(c=f.search(/e/i))?(l<0&&(l=c),l+=+f.slice(c+1),f=f.substring(0,c)):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,k);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=c=0,m=f.length;c<m;c++)if(n.indexOf(i=f.charAt(c))<0){if("."==i){if(l<c){l=m;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,c=-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(c=0;48===f.charCodeAt(c);c++);for(m=f.length;48===f.charCodeAt(--m););if(f=f.slice(c,++m)){if(m-=c,d&&B.DEBUG&&15<m&&(h<e||e!==s(e)))throw Error(a+p.s*e);if(P<(l=l-c-1))p.c=p.e=null;else if(l<H)p.c=[p.e=0];else{if(p.e=l,p.c=[],c=(l+1)%u,l<0&&(c+=u),c<m){for(c&&p.c.push(+f.slice(0,c)),m-=u;c<m;)p.c.push(+f.slice(c,c+=u));f=f.slice(c),c=u-f.length}else c-=m;for(;c--;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=k: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<=x||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<=x)){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*u-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,h,d,m,f,p,g=e.c,y=c;if(g){e:{for(o=1,d=g[0];10<=d;d/=10,o++);if((a=t-o)<0)a+=u,h=t,p=(m=g[f=0])/y[o-h-1]%10|0;else if((f=i((a+1)/u))>=g.length){if(!r)break e;for(;g.length<=f;g.push(0));m=p=0,h=(a%=u)-u+(o=1)}else{for(m=d=g[f],o=1;10<=d;d/=10,o++);p=(h=(a%=u)-u+o)<0?0:m/y[o-h-1]%10|0}if(r=r||t<0||null!=g[f+1]||(h<0?m:m%y[o-h-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<h?m/y[o-h]: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[(u-t%u)%u],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[u-a],g[f]=0<h?s(m/y[o-h]%y[h])*d:0),r)for(;;){if(0==f){for(a=1,h=g[0];10<=h;h/=10,a++);for(h=g[0]+=d,d=1;10<=h;h/=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<=x||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),k=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-m,0,t),y(n[1],0,m,t),x=n[0],D=n[1]):(y(n,-m,m,t),x=-(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:k,EXPONENTIAL_AT:[x,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,L.lt)},B.minimum=B.min=function(){return G(arguments,L.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,h=0,d=[],f=new B(A);if(null==e?e=I:y(e,0,m),a=i(e/u),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));h<a;)9e15<=(l=131072*t[h]+(t[h+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[h]=n[0],t[h+1]=n[1]):(d.push(l%1e14),h+=2);h=a/2}else{if(!crypto.randomBytes)throw j=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(a*=7);h<a;)9e15<=(l=281474976710656*(31&t[h])+1099511627776*t[h+1]+4294967296*t[h+2]+16777216*t[h+3]+(t[h+4]<<16)+(t[h+5]<<8)+t[h+6])?crypto.randomBytes(7).copy(t,h):(d.push(l%1e14),h+=7);h=a/7}if(!j)for(;h<a;)(l=C())<9e15&&(d[h++]=l%1e14);for(a=d[--h],e%=u,a&&e&&(l=c[u-e],d[h]=s(a/l)*l);0===d[h];d.pop(),h--);if(h<0)d=[r=0];else{for(r=-1;0===d[0];d.splice(0,1),r-=u);for(h=1,l=d[0];10<=l;l/=10,h++);h<u&&(r-=u-h)}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,u,h,c,d,m,f,g,y=r.indexOf("."),w=I,b=k;for(0<=y&&(c=Y,Y=0,r=r.replace(".",""),m=(g=new B(i)).pow(r.length-y),Y=c,g.c=t(_(p(m.c),m.e,"0"),10,s,e),g.e=g.c.length),h=c=(f=t(r,i,s,a?(l=V,e):(l=e,V))).length;0==f[--c];f.pop());if(!f[0])return l.charAt(0);if(y<0?--h:(m.c=f,m.e=h,m.s=o,f=(m=n(m,g,w,b,s)).c,d=m.r,h=m.e),y=f[u=h+w+1],c=s/2,d=d||u<0||null!=f[u+1],d=b<4?(null!=y||d)&&(0==b||b==(m.s<0?3:2)):c<y||y==c&&(4==b||d||6==b&&1&f[u-1]||b==(m.s<0?8:7)),u<1||!f[0])r=d?_(l.charAt(1),-w,l.charAt(0)):l.charAt(0);else{if(f.length=u,d)for(--s;++f[--u]>s;)f[u]=0,u||(++h,f=[1].concat(f));for(c=f.length;!f[--c];);for(y=0,r="";y<=c;r+=l.charAt(f[y++]));r=_(r,h,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,s,o,a=0,l=e.length,u=t%d,h=t/d|0;for(e=e.slice();l--;)a=((i=u*(s=e[l]%d)+(r=h*s+(o=e[l]/d|0)*u)%d*d+a)/n|0)+(r/d|0)+h*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,h){var c,d,m,p,g,y,w,b,_,v,S,E,C,M,T,R,O,N=r.s==i.s?1:-1,L=r.c,A=i.c;if(!(L&&L[0]&&A&&A[0]))return new B(r.s&&i.s&&(L?!A||L[0]!=A[0]:A)?L&&0==L[0]||!A?0*N:N/0:NaN);for(_=(b=new B(N)).c=[],N=o+(d=r.e-i.e)+1,h||(h=l,d=f(r.e/u)-f(i.e/u),N=N/u|0),m=0;A[m]==(L[m]||0);m++);if(A[m]>(L[m]||0)&&d--,N<0)_.push(1),p=!0;else{for(M=L.length,R=A.length,N+=2,1<(g=s(h/(A[m=0]+1)))&&(A=e(A,g,h),L=e(L,g,h),R=A.length,M=L.length),C=R,S=(v=L.slice(0,R)).length;S<R;v[S++]=0);O=A.slice(),O=[0].concat(O),T=A[0],A[1]>=h/2&&T++;do{if(g=0,(c=t(A,v,R,S))<0){if(E=v[0],R!=S&&(E=E*h+(v[1]||0)),1<(g=s(E/T)))for(h<=g&&(g=h-1),w=(y=e(A,g,h)).length,S=v.length;1==t(y,v,w,S);)g--,n(y,R<w?O:A,w,h),w=y.length,c=1;else 0==g&&(c=g=1),w=(y=A.slice()).length;if(w<S&&(y=[0].concat(y)),n(v,y,S,h),S=v.length,-1==c)for(;t(A,v,R,S)<1;)g++,n(v,R<S?O:A,S,h),S=v.length}else 0===c&&(g++,v=[0]);_[m++]=g,v[0]?v[S++]=L[C]||0:(v=[L[C]],S=1)}while((C++<M||null!=v[0])&&N--);p=null!=v[0],_[0]||_.splice(0,1)}if(h==l){for(m=1,N=_[0];10<=N;N/=10,m++);K(b,o+(b.e=m+d*u-1)+1,a,p)}else b.e=d,b.r=+p;return b}}(),M=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,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(M,(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(T,"$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}},L.absoluteValue=L.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},L.comparedTo=function(e,t){return g(this,new B(e,t))},L.decimalPlaces=L.dp=function(e,t){var n,r,i;if(null!=e)return y(e,0,m),null==t?t=k: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/u))*u,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},L.dividedBy=L.div=function(e,t){return n(this,new B(e,t),I,k)},L.dividedToIntegerBy=L.idiv=function(e,t){return n(this,new B(e,t),0,1)},L.exponentiatedBy=L.pow=function(e,t){var n,r,a,l,h,c,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)),h=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),h?2-w(e):+X(e))),t?m.mod(t):m;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!c&&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]||h&&24e7<=f.c[1]:f.c[0]<8e13||h&&f.c[0]<=9999975e7)))return l=f.s<0&&w(e)?-0:0,-1<f.e&&(l=1/l),new B(c?1/l:l);Y&&(l=i(Y/u+2))}for(d=h?(n=new B(.5),c&&(e.s=1),w(e)):(a=Math.abs(+X(e)))%2,m=new B(A);;){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:(c&&(m=A.div(m)),t?m.mod(t):l?K(m,Y,k,void 0):m)},L.integerValue=function(e){var t=new B(this);return null==e?e=k:y(e,0,8),K(t,t.e+1,e)},L.isEqualTo=L.eq=function(e,t){return 0===g(this,new B(e,t))},L.isFinite=function(){return!!this.c},L.isGreaterThan=L.gt=function(e,t){return 0<g(this,new B(e,t))},L.isGreaterThanOrEqualTo=L.gte=function(e,t){return 1===(t=g(this,new B(e,t)))||0===t},L.isInteger=function(){return!!this.c&&f(this.e/u)>this.c.length-2},L.isLessThan=L.lt=function(e,t){return g(this,new B(e,t))<0},L.isLessThanOrEqualTo=L.lte=function(e,t){return-1===(t=g(this,new B(e,t)))||0===t},L.isNaN=function(){return!this.s},L.isNegative=function(){return this.s<0},L.isPositive=function(){return 0<this.s},L.isZero=function(){return!!this.c&&0==this.c[0]},L.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 h=o.e/u,c=e.e/u,d=o.c,m=e.c;if(!h||!c){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==k?-0:0)}if(h=f(h),c=f(c),d=d.slice(),a=h-c){for((i=(s=a<0)?(a=-a,d):(c=h,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),--c);return d[0]?z(e,d,c):(e.s=3==k?-1:1,e.c=[e.e=0],e)},L.modulo=L.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)},L.multipliedBy=L.times=function(e,t){var n,r,i,s,o,a,h,c,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/u)+f(e.e/u),e.s*=v.s,(h=S.length)<(p=E.length)&&(w=S,S=E,E=w,i=h,h=p,p=i),i=h+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=h);i<s;)n=((c=g*(c=S[--o]%_)+(a=y*c+(m=S[o]/_|0)*g)%_*_+w[s]+n)/b|0)+(a/_|0)+y*m,w[s--]=c%b;w[s]=n}return n?++r:w.splice(0,1),z(e,w,r)},L.negated=function(){var e=new B(this);return e.s=-e.s||null,e},L.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/u,o=e.e/u,a=r.c,h=e.c;if(!s||!o){if(!a||!h)return new B(i/0);if(!a[0]||!h[0])return h[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,h):(i=-i,a)).reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=h.length)<0&&(n=h,h=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+h[t]+i)/l|0,a[t]=l===a[t]?0:a[t]%l;return i&&(a=[i].concat(a),++o),z(e,a,o)},L.precision=L.sd=function(e,t){var n,r,i;if(null!=e&&e!==!!e)return y(e,1,m),null==t?t=k:y(t,0,8),K(new B(this),e,t);if(!(n=this.c))return null;if(r=(i=n.length-1)*u+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},L.shiftedBy=function(e){return y(e,-h,h),this.times("1e"+e)},L.squareRoot=L.sqrt=function(){var e,t,r,i,s,o=this,a=o.c,l=o.s,u=o.e,h=I+4,c=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+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=f((u+1)/2)-(u<0||u%2),new B(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new B(l+"")).c[0])for((l=(u=r.e)+h)<3&&(l=0);;)if(s=r,r=c.times(s.plus(n(o,s,h,1))),p(s.c).slice(0,l)===(t=p(r.c)).slice(0,l)){if(r.e<u&&--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}h+=4,l+=4,i=1}return K(r,r.e+I+1,k,e)},L.toExponential=function(e,t){return null!=e&&(y(e,0,m),e++),W(this,e,t,1)},L.toFixed=function(e,t){return null!=e&&(y(e,0,m),e=e+this.e+1),W(this,e,t)},L.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,u=n.groupSeparator||"",h=s[0],c=s[1],d=this.s<0,m=d?h.slice(1):h,f=m.length;if(l&&(i=a,a=l,f-=l=i),0<a&&0<f){for(i=f%a||a,h=m.substr(0,i);i<f;i+=a)h+=u+m.substr(i,a);0<l&&(h+=u+m.slice(i)),d&&(h="-"+h)}r=c?h+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?c.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):c):h}return(n.prefix||"")+r+(n.suffix||"")},L.toFraction=function(e){var t,r,i,s,a,l,h,d,m,f,g,y,w=this,b=w.c;if(null!=e&&(!(h=new B(e)).isInteger()&&(h.c||1!==h.s)||h.lt(A)))throw Error(o+"Argument "+(h.isInteger()?"out of range: ":"not an integer: ")+X(h));if(!b)return new B(w);for(t=new B(A),m=r=new B(A),i=d=new B(A),y=p(b),a=t.e=y.length-w.e-1,t.c[0]=c[(l=a%u)<0?u+l:l],e=!e||0<h.comparedTo(t)?0<a?t:m:h,l=P,P=1/0,h=new B(y),d.c[0]=0;f=n(h,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=h.minus(f.times(s=t)),h=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,k).minus(w).abs().comparedTo(n(d,r,a,k).minus(w).abs())<1?[m,i]:[d,r],P=l,g},L.toNumber=function(){return+X(this)},L.toPrecision=function(e,t){return null!=e&&y(e,1,m),W(this,e,t,2)},L.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<=x||D<=i?b(p(n.c),i):_(p(n.c),i,"0"):10===e?_(p((n=K(new B(n),I+i+1,k)).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},L.valueOf=L.toJSON=function(){return X(this)},L._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(L[Symbol.toStringTag]="BigNumber",L[Symbol.for("nodejs.util.inspect.custom")]=L.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"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function h(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||"",h=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({},u,t),s=void 0,o="",a=!!i.totalLength||!!i.forceAverage||i.average,l=t.currencyPosition||r.position,h=t.currencySymbol||r.symbol;i.spaceSeparated&&(o=" "),"infix"===l&&(s=o+h+o);var c=f({instance:e,providedFormat:t,state:n,decimalSeparator:s});return"prefix"===l&&(c=e._value<0&&"sign"===i.negative?"-".concat(o).concat(h).concat(c.slice(1)):h+o+c),l&&"postfix"!==l||(c=c+(o=a?"":o)+h),c}(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({},u,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",M=l[C],T=c(_._value,M.suffixes,M.scale),R=T.value,O=T.suffix,N=f({instance:E(R),providedFormat:v,state:S,defaults:S.currentByteDefaultFormat()}),L=S.currentAbbreviations(),"".concat(N).concat(L.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(),h=Object.assign({},u,s),d=f({instance:r,providedFormat:s,state:o}),m=a(r._value),"".concat(d).concat(h.spaceSeparated?" ":"").concat(m);case"number":default:return f({instance:e,providedFormat:t,numbro:n})}var r,s,o,a,h,d,m,g,y,w,b,_,v,S,E,C,M,T,R,O,N,L}(e,t,n);return(h=r+h)+a}function c(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],u=a[1],h=void 0===u?"":u;if(0<+o)n=l+h+d(o-h.length);else{var c=".";c=+l<0?"-0".concat(c):"0".concat(c);var m=(d(-o-1)+Math.abs(l)+h).substr(0,t);m.length<t&&(m+=d(t-m.length)),n=c+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,h=void 0===l?o.currentDefaults():l,c=t._value;if(0===c&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(c))return c.toString();var d,f,p,g,y,w,b,_,v=Object.assign({},u,h,n),S=v.totalLength,E=S?0:v.characteristic,C=v.optionalCharacteristic,M=v.forceAverage,T=!!S||!!M||v.average,R=S?-1:T&&void 0===n.mantissa?0:v.mantissa,O=!S&&(void 0===n.optionalMantissa?-1===R:v.optionalMantissa),N=v.trimMantissa,L=v.thousandSeparated,A=v.spaceSeparated,I=v.negative,k=v.forceSign,x=v.exponential,D="";if(T){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="",u=Math.abs(t),h=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(s?" ":"")+l),a){var c=t.toString().split(".")[0];h=Math.max(a-c.length,0)}return{value:t,abbreviation:l,mantissaPrecision:h}}({value:c,forceAverage:M,abbreviations:o.currentAbbreviations(),spaceSeparated:A,totalLength:S});c=H.value,D+=H.abbreviation,S&&(R=H.mantissaPrecision)}if(x){var P=(f=(d={value:c,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)});c=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],u=a[1],h=void 0===u?"":u;if(h.match(/^0+$/)&&(n||s))return l;var c=h.match(/0+$/);return s&&c?"".concat(l,".").concat(h.toString().slice(0,c.index)):o.toString()}(c.toString(),c,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(),u=l.split(".")[0],h=l.split(".")[1];return n&&(t<0&&(u=u.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}(u.length,a).forEach((function(e,t){u=u.slice(0,e+t)+o+u.slice(e+t)})),t<0&&(u="-".concat(u))),h?u+i+h:u}(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 u=i-a.length,h=0;h<u;h++)s="0".concat(s);return s.toString()}(U,0,C,E),c,L,o,a),(T||x)&&(U+=D),(k||c<0)&&(j=U,Y=I,U=0===(F=c)?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 h.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 c(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 c(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 c(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={},u=null,h={};function c(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,h)},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)&&(h=e)},o.getZeroFormat=function(){return u},o.setZeroFormat=function(e){return u="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==u},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&&c(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 c(i):void c(t)}c(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),u=e("./manipulating")(m),h=e("./parsing"),c=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=h.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 u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.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 c(d(e))}m.version="2.1.2",m.isNumbro=function(e){return e instanceof c},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,u,h,c,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]),u=v,(h=e.split(".")[0].match(/0+/))&&(u.characteristic=h[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,v),c=v,-1!==e.indexOf("a")&&(c.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,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var h="",c=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(c!==t)return-1*e(c,n,s,o,a,l,u);for(var d=0;d<r.length;d++){var m=r[d];if((h=t.replace(m.key,""))!==t)return e(h,n,s,o,a,l,u)*m.factor}if((h=t.replace("%",""))!==t)return e(h,n,s,o,a,l,u)/100;var f=parseFloat(t);if(!isNaN(f)){var p=o(f);if(p&&"."!==p&&(h=t.replace(new RegExp("".concat(i(p),"$")),""))!==t)return e(h,n,s,o,a,l,u);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((h=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(h,n,s,o,a,l,u)*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(),u=a.currentCurrency().symbol,h=a.currentOrdinal(),c=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,u,h,c,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 u(e){return!!s.unformat(e)}function h(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(!h(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,u=0;u<l;u++){var c=o.restrictions[u],d=c.restriction,m=c.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&&!h(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 c(e){return h(e,a,"[Validate format]")}t.exports={validate:function(e,t){var n=u(e),r=c(t);return n&&r},validateFormat:c,validateInput:u,validateLanguage:function(e){return h(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)}))},"87d6":function(e,t,n){"use strict";n.d(t,"b",(function(){return h}));n("d9e2"),n("14d9");var r=n("de3b");function i(e,t,n){return(t=s(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,u(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 u(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),Object(r["stopImmediatePropagation"])(this)},e}function h(){return a}t["a"]=l},8828:function(e,t,n){"use strict";n.d(t,"L",(function(){return r})),n.d(t,"N",(function(){return i})),n.d(t,"y",(function(){return s})),n.d(t,"l",(function(){return o})),n.d(t,"E",(function(){return a})),n.d(t,"D",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"B",(function(){return h})),n.d(t,"s",(function(){return c})),n.d(t,"t",(function(){return d})),n.d(t,"u",(function(){return m})),n.d(t,"h",(function(){return f})),n.d(t,"q",(function(){return p})),n.d(t,"w",(function(){return g})),n.d(t,"c",(function(){return y})),n.d(t,"G",(function(){return w})),n.d(t,"H",(function(){return b})),n.d(t,"M",(function(){return _})),n.d(t,"p",(function(){return v})),n.d(t,"n",(function(){return S})),n.d(t,"j",(function(){return E})),n.d(t,"v",(function(){return C})),n.d(t,"m",(function(){return M})),n.d(t,"C",(function(){return T})),n.d(t,"e",(function(){return R})),n.d(t,"F",(function(){return O})),n.d(t,"f",(function(){return N})),n.d(t,"k",(function(){return L})),n.d(t,"K",(function(){return A})),n.d(t,"z",(function(){return I})),n.d(t,"o",(function(){return k})),n.d(t,"d",(function(){return x})),n.d(t,"I",(function(){return D})),n.d(t,"b",(function(){return H})),n.d(t,"i",(function(){return P})),n.d(t,"a",(function(){return j})),n.d(t,"r",(function(){return F})),n.d(t,"A",(function(){return Y})),n.d(t,"J",(function(){return U})),n.d(t,"x",(function(){return V}));const r=e=>["tabindex",e],i=()=>["role","treegrid"],s=()=>["role","presentation"],o=()=>["role","gridcell"],a=()=>["role","rowheader"],l=()=>["role","rowgroup"],u=()=>["role","columnheader"],h=()=>["role","row"],c=()=>["role","menu"],d=()=>["role","menuitem"],m=()=>["role","menuitemcheckbox"],f=()=>["role","combobox"],p=()=>["role","listbox"],g=()=>["role","option"],y=()=>["role","checkbox"],w=()=>["scope","col"],b=()=>["scope","row"],_=()=>["type","text"],v=e=>["aria-label",e],S=()=>["aria-hidden","true"],E=()=>["aria-disabled","true"],C=()=>["aria-multiselectable","true"],M=e=>["aria-haspopup",e],T=e=>["aria-rowcount",e],R=e=>["aria-colcount",e],O=e=>["aria-rowindex",e],N=e=>["aria-colindex",e],L=e=>["aria-expanded",e],A=e=>["aria-sort",e],I=()=>["aria-readonly","true"],k=()=>["aria-invalid","true"],x=e=>["aria-checked",e],D=()=>["aria-selected","true"],H=()=>["aria-autocomplete","list"],P=e=>["aria-controls",e],j=e=>["aria-activedescendant",e],F=e=>["aria-live",e],Y=e=>["aria-relevant",e],U=e=>["aria-setsize",e],V=e=>["aria-posinset",e]},8840:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  187. //! moment.js locale configuration
  188. 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}}u()},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=h;break;case"D":e=h,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=c;break;case"W":e=c,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 u(){throw Error("Internal Error - Should never get here!")}var h=[];for(t=s("0");t<=s("9");t++)h.push(t);var c=[s("_")].concat(h);for(t=s("a");t<=s("z");t++)c.push(t);for(t=s("A");t<=s("Z");t++)c.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";
  189. //! moment.js locale configuration
  190. 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}))},"8b00":function(e,t,n){"use strict";var r=n("23e7"),i=n("68df"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("isSubsetOf")},{isSubsetOf:i})},"8c7e":function(e,t,n){"use strict";n.d(t,"a",(function(){return kO}));n("d9e2"),n("14d9");var r=n("0352"),i=n("5d7f"),s=n("de3b"),o=n("351d"),a=n("c4fa");const l="handsontableEditor",u="handsontable";class h extends r["a"]{static get EDITOR_TYPE(){return u}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 c=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))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 M="autocomplete";var T=new WeakMap;class R extends h{constructor(){super(...arguments),_(this,"query",null),_(this,"strippedChoices",[]),_(this,"rawChoices",[]),w(this,T,this.hot.guid.slice(0,9)),_(this,"sortByRelevance",(function(e,t,n){const r=[],i=[],s=e.length;let o,a,l,u,h=t.length;if(0===s){for(l=0;l<h;l++)i.push(l);return i}for(l=0;l<h;l++){if(a=Object(m["stripTags"])(Object(d["stringify"])(t[l])),n)u=a.indexOf(e);else{const t=this.cellProperties.locale;u=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==u&&(o=a.length-u-s,r.push({baseIndex:l,index:u,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,h=r.length;l<h;l++)i.push(r[l].baseIndex);return i}))}static get EDITOR_TYPE(){return M}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["M"])(),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(T,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,u,h)=>{Object(g["a"])(e,s,o,a,l,u,h);const{filteringCaseSensitive:c,allowHtml:m,locale:f}=this.cellProperties,p=this.query;let w,b,_=Object(d["stringify"])(u);_&&!m&&(w=!0===c?_.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["w"])(),...n?[Object(y["J"])(r)]:[],...n?[Object(y["x"])(n.indexOf(u)+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["I"])()]),Object(i["setAttribute"])(this.TEXTAREA,...Object(y["a"])(t.id))}}}),t&&(Object(i["setAttribute"])(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...Object(y["y"])()),Object(i["setAttribute"])(this.htEditor.rootElement,[Object(y["q"])(),Object(y["r"])("polite"),Object(y["A"])("text"),["id",`${E(T,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 u=Array.isArray(o)?o.length:0;if(!1===s)u&&(a=o[0]);else{const e=[];for(let t=0,n=l.length;t<n;t++){if(r&&u<=t)break;u?e.push(l[o[t]]):e.push(l[t])}a=0,l=e}this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(Object(c["pivot"])([l])),l.length>0&&(this.updateDropdownDimensions(),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),u=Object(i["offset"])(e),h=r.top-u.top-l+a,c=e.scrollHeight-h-l-s,d=o>c&&h>c;return d?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(d?h:c,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}updateDropdownDimensions(){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(c["arrayMap"])(e,e=>Object(d["stringify"])(e)),r=Object(c["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 L 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 A=n("c1df");
  191. /*!
  192. * Pikaday
  193. *
  194. * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
  195. */const I=()=>window,k=()=>window.document,x=(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=k().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),u=864e5,h=(e.getTime()-l.getTime())/u,c=1+Math.round((h-s+a(l.getDay()))/o);return c},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,u,h,c=e._o,d=n===c.minYear,m=n===c.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<c.minMonth||m&&o>c.maxMonth?' disabled="disabled"':"")+">"+c.i18n.months[o]+"</option>");for(u='<div class="pika-label">'+c.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",U(c.yearRange)?(o=c.yearRange[0],a=c.yearRange[1]+1):(o=n-c.yearRange,a=1+n+c.yearRange),l=[];o<a&&o<=c.maxYear;o++)o>=c.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return h='<div class="pika-label">'+n+c.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",c.showMonthAfterYear?f+=h+u:f+=u+h,d&&(0===r||c.minMonth>=r)&&(p=!1),m&&(11===r||c.maxMonth<=r)&&(g=!1),0===t&&(f+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+c.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(g?"":" is-disabled")+'" type="button">'+c.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&&x((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=k().activeElement;do{if(j(e,"pika-single"))return}while(e=e.parentNode);t._c||(t._b=x((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=k().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(k(),"keydown",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?k().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=ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(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)}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&&x((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,u,h;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,n=this.el.offsetHeight,r=I().innerWidth||k().documentElement.clientWidth,i=I().innerHeight||k().documentElement.clientHeight,s=k().body.scrollTop||k().documentElement.scrollTop,u=!0,h=!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,u=!1),(this._o.reposition&&a+n>i+s||this._o.position.indexOf("top")>-1&&a-n-e.offsetHeight>0)&&(a=a-n-e.offsetHeight,h=!1),o<0&&(o=0),a<0&&(a=0),this.el.style.left=o+"px",this.el.style.top=a+"px",F(this.el,u?"left-aligned":"right-aligned"),F(this.el,h?"bottom-aligned":"top-aligned"),Y(this.el,u?"right-aligned":"left-aligned"),Y(this.el,h?"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 u=0===t?11:t-1,h=11===t?0:t+1,c=0===t?e-1:e,d=11===t?e+1:e,m=G(c,u),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),M=r.endRange&&K(r.endRange,n),T=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=u,E=c):(v-=s,S=h,E=d));let O={day:v,month:S,year:E,hasEvent:b,isSelected:f,isToday:p,isDisabled:R,isEmpty:_,isStartRange:C,isEndRange:M,isInRange:T,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(k(),"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(k(),"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(k(),"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 ce="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 ce}init(){if("function"!==typeof A)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(()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()});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(A),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,A(i,t,!0).isValid()&&this.$datePicker.setMoment(A(i,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),r||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,A(i,t,!0).isValid()&&this.$datePicker.setMoment(A(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=A(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()),u=r.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleColumn()),h=r.getVisualFromRenderableIndex(o.getLastPartiallyVisibleColumn());if(this.row>=a&&this.row<=l&&this.col>=u&&this.col<=h){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.propToCol(n);if(Number.isInteger(r)){const e=this.getCellMeta(t,r);e.editor===ge&&void 0===e.strict&&(e.filter=!1,e.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,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 u;u="function"===typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),Object(i["empty"])(this.select),Object(o["objectEach"])(u,(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={group:Se};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)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(Se)}}const Me="time";class Te extends r["a"]{static get EDITOR_TYPE(){return Me}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"])(L),Object(Re["e"])(me),Object(Re["e"])(ge),Object(Re["e"])(h),Object(Re["e"])(we),Object(Re["e"])(_e),Object(Re["e"])(Ce),Object(Re["e"])(r["a"]),Object(Re["e"])(Te)}var Ne=n("a357");const Le="html";function Ae(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)}Ae.RENDERER_TYPE=Le;var Ie=n("87d6");const ke="autocomplete";function xe(e,t,n,r,s,o,a){const{rootDocument:l}=e,u=a.allowHtml?Ae:g["a"],h=l.createElement("DIV"),c=e.getSettings().ariaTags;if(h.className="htAutocompleteArrow",c&&h.setAttribute(...Object(y["n"])()),h.appendChild(l.createTextNode(String.fromCharCode(9660))),u.apply(this,[e,t,n,r,s,o,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(h,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()})}}xe.RENDERER_TYPE=ke;const De="dropdown";function He(e,t,n,r,i,s,o){xe.apply(this,[e,t,n,r,i,s,o])}He.RENDERER_TYPE=De;var Pe=n("0283");const je=new WeakMap,Fe=new WeakMap,Ye="htBadValue",Ue="data-row",Ve="data-col",Be="checkboxRenderer",We="checkbox";function Ge(e,t,n,r,s,o,l){const{rootDocument:u}=e,h=e.getSettings().ariaTags;Ne["a"].apply(this,[e,t,n,r,s,o,l]),ze(e);let c=Ke(u);const m=l.label;let f=!1;if("undefined"===typeof l.checkedTemplate&&(l.checkedTemplate=!0),"undefined"===typeof l.uncheckedTemplate&&(l.uncheckedTemplate=!1),Object(i["empty"])(t),o===l.checkedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(l.locale)===Object(d["stringify"])(l.checkedTemplate).toLocaleLowerCase(l.locale)?c.checked=!0:o===l.uncheckedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(l.locale)===Object(d["stringify"])(l.uncheckedTemplate).toLocaleLowerCase(l.locale)?c.checked=!1:Object(d["isEmpty"])(o)?Object(i["addClass"])(c,"noValue"):(c.style.display="none",Object(i["addClass"])(c,Ye),f=!0),Object(i["setAttribute"])(c,[[Ue,n],[Ve,r]]),h&&Object(i["setAttribute"])(c,[Object(y["p"])(c.checked?e.getTranslatedPhrase(Pe["CHECKBOX_CHECKED"]):e.getTranslatedPhrase(Pe["CHECKBOX_UNCHECKED"])),Object(y["d"])(c.checked),Object(y["c"])()]),!f&&m){let i="";if(m.value)i="function"===typeof m.value?m.value.call(this,n,r,s,o):m.value;else if(m.property){const t=e.getDataAtRowProp(n,m.property);i=null!==t?t:""}const a=Xe(u,i,!0!==m.separated);"before"===m.position?m.separated?(t.appendChild(a),t.appendChild(c)):(a.appendChild(c),c=a):m.position&&"after"!==m.position||(m.separated?(t.appendChild(c),t.appendChild(a)):(a.insertBefore(c,a.firstChild),c=a))}function p(){const t=e.getShortcutManager(),n=t.getContext("grid"),r={group:Be,relativeToGroup:a["a"],position:"before"};n.addShortcuts([{keys:[["space"]],callback:()=>(g(),!w()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(g(),!w()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null===t||void 0===t?void 0:t.isSingle())&&t.highlight.isCell()}},{keys:[["delete"],["backspace"]],callback:()=>(g(!0),!w()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],r)}function g(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),r=[],i=new Map;let s=[],o=0;if(n){for(let a=0;a<n.length;a++){const{row:l,col:u}=n[a].getTopStartCorner(),{row:h,col:c}=n[a].getBottomEndCorner();for(let n=l;n<=h;n+=1)for(let a=u;a<=c;a+=1){const l=e.getCellMeta(n,a),u={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(i.has(r.length)?i.set(r.length,[...i.get(r.length),[n,a,null]]):i.set(r.length,[[n,a,null]]));continue}if(!0===l.readOnly)continue;"undefined"===typeof l.checkedTemplate&&(l.checkedTemplate=!0),"undefined"===typeof l.uncheckedTemplate&&(l.uncheckedTemplate=!1);const h=e.getDataAtCell(n,a);!1===t?[l.checkedTemplate,l.checkedTemplate.toString()].includes(h)?s.push([n,a,l.uncheckedTemplate,u]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(h)&&s.push([n,a,l.checkedTemplate,u]):s.push([n,a,l.uncheckedTemplate,u]),o+=1}r.push(o),o=0}s=s.every(e=>{let[,,t]=e;return t===s[0][2]})?s.map(e=>{let[t,n,r]=e;return[t,n,r]}):s.map(e=>{let[t,n,,r]=e;return[t,n,r.checkedTemplate]}),s.length>0&&r.forEach((t,n)=>{let r=s.splice(0,t);i.size&&i.has(n)&&(r=[...r,...i.get(n)]),e.setDataAtCell(r)})}}function w(){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),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}}(!m||m&&!m.separated)&&t.appendChild(c),f&&t.appendChild(u.createTextNode("#bad-value#")),je.has(e)||(je.set(e,!0),p())}function ze(e){let t=Fe.get(e);if(!t){const{rootElement:n}=e;t=new Ie["a"](e),t.addEventListener(n,"click",t=>qe(t,e)),t.addEventListener(n,"mouseup",t=>$e(t,e)),t.addEventListener(n,"change",t=>Je(t,e)),Fe.set(e,t)}return t}function Ke(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}function Xe(e,t,n){const r=e.createElement("label");return r.className="htCheckboxRendererLabel "+(n?"fullWidth":""),r.appendChild(e.createTextNode(t)),r.cloneNode(!0)}function $e(e,t){const{target:n}=e;Qe(n)&&n.hasAttribute(Ue)&&n.hasAttribute(Ve)&&setTimeout(t.listen,10)}function qe(e,t){const{target:n}=e;if(!Qe(n))return;if(!n.hasAttribute(Ue)||!n.hasAttribute(Ve))return;const r=parseInt(n.getAttribute(Ue),10),i=parseInt(n.getAttribute(Ve),10),s=t.getCellMeta(r,i);s.readOnly&&e.preventDefault()}function Je(e,t){const{target:n}=e;if(!Qe(n))return;if(!n.hasAttribute(Ue)||!n.hasAttribute(Ve))return;const r=parseInt(n.getAttribute(Ue),10),i=parseInt(n.getAttribute(Ve),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 Qe(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===We){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}})),Ge.RENDERER_TYPE=We;const Ze="handsontable";function et(e,t,n,r,i,s,o){xe.apply(this,[e,t,n,r,i,s,o])}et.RENDERER_TYPE=Ze;var tt=n("8722"),nt=n("ffec");const rt="numeric";function it(e,t){if(Object(nt["isNumeric"])(e)){const n=t.numericFormat,r=n&&n.culture||"-",i=n&&n.pattern;if("undefined"!==typeof r&&!tt.languages()[r]){const e=r.replace("-",""),t=tt.allLanguages?tt.allLanguages[r]:tt[e];t&&tt.registerLanguage(t)}tt.setLanguage(r),e=tt(e).format(i||"0")}return e}function st(e,t,n,r,i,s,o){let a=s;if(Object(nt["isNumeric"])(a)){const e=o.className||"",n=e.length?e.split(" "):[];a=it(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)}st.RENDERER_TYPE=rt;const ot="password";function at(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,u=a.hashSymbol||"*";let h="";Object(nt["rangeEach"])(l-1,()=>{h+=u}),Object(i["fastInnerHTML"])(t,h)}at.RENDERER_TYPE=ot;const lt="select";function ut(e,t,n,r,i,s,o){g["a"].apply(this,[e,t,n,r,i,s,o])}ut.RENDERER_TYPE=lt;const ht="time";function ct(e,t,n,r,i,s,o){g["a"].apply(this,[e,t,n,r,i,s,o]),t.dir="ltr"}ct.RENDERER_TYPE=ht;var dt=n("3d76");function mt(){Object(dt["d"])(xe),Object(dt["d"])(Ne["a"]),Object(dt["d"])(Ge),Object(dt["d"])(He),Object(dt["d"])(et),Object(dt["d"])(Ae),Object(dt["d"])(st),Object(dt["d"])(at),Object(dt["d"])(ut),Object(dt["d"])(g["a"]),Object(dt["d"])(ct)}const ft="autocomplete";function pt(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,gt(n,t)):gt(n,t)(this.source):t(!0)}function gt(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)}}pt.VALIDATOR_TYPE=ft;var yt=n("3eb5");const wt="date";function bt(e,t){const n=Object(Re["b"])(ce,this.instance);let r=e,i=!0;null!==r&&void 0!==r||(r="");let s=A(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),o=A(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=_t(r,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),i=!0}else i=!1;t(i)}function _t(e,t){const n=A(Object(yt["getNormalizedDate"])(e)),r=A(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)}bt.VALIDATOR_TYPE=wt;const vt="dropdown";function St(e,t){pt.apply(this,[e,t])}St.VALIDATOR_TYPE=vt;const Et="numeric";function Ct(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&Object(nt["isNumeric"])(e))}Ct.VALIDATOR_TYPE=Et;const Mt=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],Tt="time";function Rt(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=A(i,Mt,!0).isValid()?A(i):A(i,n);let a=o.isValid(),l=A(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);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),r=!0}else r=!1;t(r)}Rt.VALIDATOR_TYPE=Tt;var Ot=n("169f");function Nt(){Object(Ot["d"])(pt),Object(Ot["d"])(St),Object(Ot["d"])(bt),Object(Ot["d"])(Ct),Object(Ot["d"])(Rt)}const Lt="autocomplete",At={CELL_TYPE:Lt,editor:R,renderer:xe,validator:pt},It="checkbox",kt={CELL_TYPE:It,editor:L,renderer:Ge},xt="date";function Dt(e,t,n,r,i,s,o){xe.apply(this,[e,t,n,r,i,s,o])}Dt.RENDERER_TYPE=xt;const Ht="date",Pt={CELL_TYPE:Ht,editor:me,renderer:Dt,validator:bt},jt="dropdown",Ft={CELL_TYPE:jt,editor:ge,renderer:He,validator:St},Yt="handsontable",Ut={CELL_TYPE:Yt,editor:h,renderer:et},Vt="numeric",Bt={CELL_TYPE:Vt,editor:we,renderer:st,validator:Ct,dataType:"number"},Wt="password",Gt={CELL_TYPE:Wt,editor:_e,renderer:at,copyable:!1},zt="select",Kt={CELL_TYPE:zt,editor:Ce,renderer:ut};var Xt=n("ef07");const $t="time",qt={CELL_TYPE:$t,editor:Te,renderer:ct,validator:Rt};var Jt=n("76ab");function Qt(){Object(Jt["d"])(At),Object(Jt["d"])(kt),Object(Jt["d"])(Pt),Object(Jt["d"])(Ft),Object(Jt["d"])(Ut),Object(Jt["d"])(Bt),Object(Jt["d"])(Gt),Object(Jt["d"])(Kt),Object(Jt["d"])(Xt["a"]),Object(Jt["d"])(qt)}var Zt=n("d3c5"),en=n("7dd0"),tn=n("220a");function nn(e,t,n){return(t=rn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rn(e){var t=sn(e,"string");return"symbol"==typeof t?t:t+""}function sn(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 on{static get SAMPLE_COUNT(){return 3}constructor(e){nn(this,"samples",null),nn(this,"dataFactory",null),nn(this,"customSampleCount",null),nn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:on.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(nt["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(nt["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:u}=a,h="string"===typeof u&&u.length>0;let c;c=h?u:Object(o["isObject"])(l)?""+Object.keys(l).length:Array.isArray(l)?""+l.length:""+Object(d["stringify"])(l).length,r.has(c)||r.set(c,{needed:this.getSampleCount(),strings:[]});const m=r.get(c);if(m.needed){const e=s.indexOf(l)>-1;(!e||this.allowDuplicates||h)&&(m.strings.push({value:l,[i]:t}),s.push(l),m.needed-=1)}}),r}}var an=on,ln=n("861dd"),un=n("9f10");function hn(e,t){dn(e,t),t.add(e)}function cn(e,t,n){dn(e,t),t.set(e,n)}function dn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mn(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){var t=pn(e,"string");return"symbol"==typeof t?t:t+""}function pn(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 gn(e,t){return e.get(wn(e,t))}function yn(e,t,n){return e.set(wn(e,t),n),n}function wn(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 bn="autoColumnSize",_n=10,vn="autoColumnSize";var Sn=new WeakMap,En=new WeakMap,Cn=new WeakSet;class Mn extends Zt["a"]{static get PLUGIN_KEY(){return bn}static get PLUGIN_PRIORITY(){return _n}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),mn(this,"ghostTable",new tn["a"](this.hot)),mn(this,"samplesGenerator",new an((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}})),mn(this,"inProgress",!1),mn(this,"measuredColumns",0),mn(this,"columnWidthsMap",new un["a"]),cn(this,Sn,[]),cn(this,En,[]),this.hot.columnIndexMapper.registerMap(vn,this.columnWidthsMap),this.addHook("beforeColumnResize",(e,t,n)=>wn(Cn,this,Ln).call(this,e,t,n))}isEnabled(){return!1!==this.hot.getSettings()[bn]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[bn];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 wn(Cn,e,On).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return wn(Cn,e,Nn).call(e,...n)})),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return wn(Cn,e,In).call(e,...n)})),this.addHook("beforeRender",()=>wn(Cn,this,Rn).call(this)),this.addHook("modifyColWidth",(e,t)=>this.getColumnWidth(t,e)),this.addHook("init",()=>wn(Cn,this,An).call(this)),super.enablePlugin()}updatePlugin(){yn(En,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",(e,t,n)=>wn(Cn,this,Ln).call(this,e,t,n))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(-1===e||-1===t)return;const n=this.hot.renderCall;this.calculateColumnsWidth({from:e,to:t},void 0,n)}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(nt["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);t.forEach((e,t)=>this.ghostTable.addColumn(t,e))}}),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=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this.hot.countCols()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Object(en["cancelAnimationFrame"])(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+Mn.CALCULATION_STEP,r)},e,t),n=n+Mn.CALCULATION_STEP+1,n<r?i=Object(en["requestAnimationFrame"])(s):(Object(en["cancelAnimationFrame"])(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},o=this.getSyncCalculationLimit();o>=0&&(this.calculateColumnsWidth({from:0,to:o},e,t),n=o+1),n<r?s():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[bn],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.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[bn];let t=Mn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(nt["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getColumnWidth(e,t){let 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,ln["a"]))),r}getFirstVisibleColumn(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleColumn())&&void 0!==e?e:-1}getLastVisibleColumn(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleColumn())&&void 0!==e?e:-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader(),t=e.reduce((e,t,n)=>{const r=gn(Sn,this).length;return(r-1<n||gn(Sn,this)[n]!==t)&&e.push(this.hot.toVisualColumn(n)),r-1<n?gn(Sn,this).push(t):gn(Sn,this)[n]=t,e},[]);return t}clearCache(e){Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.columnWidthsMap.setValueAtIndex(e,null)})},!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function Tn(e){const t={from:0,to:this.hot.countRows()-1};e.forEach(e=>{const n=this.hot.toPhysicalColumn(e);if(null!==n&&!this.hot._getColWidthFromSettings(n)){const n=this.samplesGenerator.generateColumnSamples(e,t);n.forEach((e,t)=>this.ghostTable.addColumn(t,e))}}),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.ghostTable.clean())}function Rn(){this.calculateVisibleColumnsWidth(),this.inProgress||(wn(Cn,this,Tn).call(this,gn(En,this)),yn(En,this,[]))}function On(e,t){t||this.recalculateAllColumnsWidth()}function Nn(e){const t=e.reduce((e,t)=>{let[,n]=t;const r=this.hot.propToCol(n);return Number.isInteger(r)&&-1===e.indexOf(r)&&e.push(r),e},[]);gn(En,this).push(...t)}function Ln(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(Sn,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth()}function In(e){const t=e.reduce((e,t)=>{var n;const r=null===(n=t.address)||void 0===n?void 0:n.col;if(Number.isInteger(r)){const t=this.hot.toVisualColumn(r);-1===e.indexOf(t)&&e.push(t)}return e},[]);gn(En,this).push(...t)}const kn={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 Dn(e){const t={};return!0===e?(t.directions=Object.keys(kn),t.autoInsertRow=!0):Object(o["isObject"])(e)?(Object(d["isDefined"])(e.autoInsertRow)?e.direction===kn.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,Object(d["isDefined"])(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(kn)):"string"===typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}function Hn(e,t){Pn(e,t),t.add(e)}function Pn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jn(e,t,n){return(t=Fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fn(e){var t=Yn(e,"string");return"symbol"==typeof t?t:t+""}function Yn(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 Un(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 Vn="autofill",Bn=20,Wn=["fillHandle"],Gn="insert_row_below",zn=200;var Kn=new WeakSet;class Xn extends Zt["a"]{constructor(){super(...arguments),Hn(this,Kn),jn(this,"addingStarted",!1),jn(this,"mouseDownOnCellCorner",!1),jn(this,"mouseDragOutside",!1),jn(this,"handleDraggedCells",0),jn(this,"directions",[]),jn(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Vn}static get PLUGIN_PRIORITY(){return Bn}static get SETTING_KEYS(){return[Vn,...Wn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",e=>Un(Kn,this,qn).call(this,e)),this.addHook("afterOnCellCornerDblClick",e=>Un(Kn,this,$n).call(this,e)),this.addHook("beforeOnCellMouseOver",(e,t)=>Un(Kn,this,Jn).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(c["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(c["arrayEach"])(o,e=>{const t=[];Object(c["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:u,startOfDragCoords:h,endOfDragCoords:c}=xn(a,l,(e,t)=>this.hot._createCellCoords(e,t));if(h&&h.row>-1&&h.col>-1){const e=this.getSelectionData(),t=i.clone(),n=this.hot._createCellRange(h,h,c),r=this.hot.runHooks("beforeAutofill",e,t,n,u);if(!1===r)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let s=r;const o=r;if(["up","left"].indexOf(u)>-1&&(1!==o.length||0!==o[0].length))if(s=[],"up"===u){const e=c.row-h.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=c.col-h.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(h.row,h.col,s,c.row,c.col,this.pluginName+".fill",null),this.setSelection(l),this.hot.runHooks("afterAutofill",s,t,n,u),this.hot.render()}else this.hot.view.render();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(kn.vertical)&&this.directions.includes(kn.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(kn.vertical))r=this.hot._createCellCoords(e.row,n.col);else{if(!this.directions.includes(kn.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(Gn,void 0,1,this.pluginName+".fill"),this.addingStarted=!1},zn)}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(c["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",()=>Un(Kn,this,Qn).call(this)),this.eventManager.addEventListener(e,"mousemove",e=>Un(Kn,this,Zn).call(this,e))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=Dn(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function $n(){const e=this.selectAdjacent();e&&this.fillIn()}function qn(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function Jn(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function Qn(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function Zn(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 er(e,t){nr(e,t),t.add(e)}function tr(e,t,n){nr(e,t),t.set(e,n)}function nr(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=ir(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)}function or(e,t,n){return e.set(lr(e,t),n),n}function ar(e,t){return e.get(lr(e,t))}function lr(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 ur="autoRowSize",hr=40,cr="autoRowSize";var dr=new WeakMap,mr=new WeakSet;class fr extends Zt["a"]{static get PLUGIN_KEY(){return ur}static get PLUGIN_PRIORITY(){return hr}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),er(this,mr),rr(this,"headerHeight",null),rr(this,"ghostTable",new tn["a"](this.hot)),rr(this,"samplesGenerator",new an((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}})),rr(this,"inProgress",!1),rr(this,"measuredRows",0),rr(this,"rowHeightsMap",new un["a"]),tr(this,dr,[]),this.hot.rowIndexMapper.registerMap(cr,this.rowHeightsMap),this.addHook("beforeRowResize",(e,t,n)=>lr(mr,this,yr).call(this,e,t,n))}isEnabled(){const e=this.hot.getSettings()[ur];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 lr(mr,e,wr).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lr(mr,e,br).call(e,...n)})),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lr(mr,e,vr).call(e,...n)})),this.addHook("beforeRender",()=>lr(mr,this,gr).call(this)),this.addHook("modifyRowHeight",(e,t)=>this.getRowHeight(t,e)),this.addHook("init",()=>lr(mr,this,_r).call(this)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",(e,t,n)=>lr(mr,this,yr).call(this,e,t,n))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(-1===e||-1===t)return;const n=this.hot.renderCall;this.calculateRowsHeight({from:e,to:t},void 0,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(nt["rangeEach"])(r.from,r.to,e=>{let t=this.hot.toPhysicalRow(e);if(null===t&&(t=e),n||null===this.rowHeightsMap.getValueAtIndex(t)){const t=this.samplesGenerator.generateRowSamples(e,i);t.forEach((e,t)=>this.ghostTable.addRow(t,e))}}),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=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this.hot.countRows()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Object(en["cancelAnimationFrame"])(i),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+fr.CALCULATION_STEP,r)},e,t),n=n+fr.CALCULATION_STEP+1,n<r?i=Object(en["requestAnimationFrame"])(s):(Object(en["cancelAnimationFrame"])(i),this.inProgress=!1,this.hot.view.adjustElementsSize(),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},o=this.getSyncCalculationLimit();o>=0&&(this.calculateRowsHeight({from:0,to:o},e,t),n=o+1),n<r?s():(this.inProgress=!1,this.hot.view.adjustElementsSize())}setSamplingOptions(){const e=this.hot.getSettings()[ur],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(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[ur];let t=fr.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(nt["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getRowHeight(e,t){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(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleRow())&&void 0!==e?e:-1}getLastVisibleRow(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleRow())&&void 0!==e?e:-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0):this.rowHeightsMap.clear()}clearCacheByRange(e){const{from:t,to:n}="number"===typeof e?{from:e,to:e}:e;this.hot.batchExecution(()=>{Object(nt["rangeEach"])(Math.min(t,n),Math.max(t,n),e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter(e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function pr(e){const t={from:0,to:this.hot.countCols()-1};e.forEach(e=>{const n=this.samplesGenerator.generateRowSamples(e,t);n.forEach((e,t)=>this.ghostTable.addRow(t,e))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{const n=this.hot.toPhysicalRow(e);this.rowHeightsMap.setValueAtIndex(n,t)})},!0),this.ghostTable.clean())}function gr(){this.calculateVisibleRowsHeight(),this.inProgress||(lr(mr,this,pr).call(this,ar(dr,this)),or(dr,this,[]))}function yr(e,t,n){let r=e;return n&&(this.calculateRowsHeight(t,void 0,!0),r=this.getRowHeight(t)),r}function wr(e,t){t||this.recalculateAllRowsHeight()}function br(e){const t=e.reduce((e,t)=>{let[n]=t;return-1===e.indexOf(n)&&e.push(n),e},[]);ar(dr,this).push(...t)}function _r(){this.recalculateAllRowsHeight()}function vr(e){const t=e.reduce((e,t)=>{var n;const r=null===(n=t.address)||void 0===n?void 0:n.row;if(Number.isInteger(r)){const t=this.hot.toVisualRow(r);-1===e.indexOf(t)&&e.push(t)}return e},[]);ar(dr,this).push(...t)}var Sr=n("bdd7"),Er=n("1096"),Cr=n("a73f");const{getListWithInsertedItems:Mr,getListWithRemovedItems:Tr}=Object(Sr["a"])("physicallyIndexed");class Rr extends Er["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(Cr["b"])(this.indexedValues,t);this.indexedValues=Mr(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=Tr(this.indexedValues,e);this.indexedValues=Object(Cr["a"])(t,e),super.remove(e)}}var Or=Rr;const{getListWithInsertedItems:Nr,getListWithRemovedItems:Lr}=Object(Sr["a"])("physicallyIndexed");class Ar extends Er["a"]{constructor(){super(e=>e)}insert(e,t){this.indexedValues=Nr(this.indexedValues,e,t,(e,t)=>this.getNextValue(t)),super.insert(e,t)}remove(e){this.indexedValues=Lr(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var Ir=Ar;function kr(e,t){xr(e,t),t.add(e)}function xr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dr(e,t,n){return(t=Hr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hr(e){var t=Pr(e,"string");return"symbol"==typeof t?t:t+""}function Pr(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 jr(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 Fr="bindRowsWithHeaders",Yr=210,Ur="loose",Vr=new Map([["loose",Or],["strict",Ir]]);var Br=new WeakSet;class Wr extends Zt["a"]{constructor(){super(...arguments),kr(this,Br),Dr(this,"headerIndexes",null)}static get PLUGIN_KEY(){return Fr}static get PLUGIN_PRIORITY(){return Yr}isEnabled(){return!!this.hot.getSettings()[Fr]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[Fr];"string"!==typeof e&&(e=Ur);const t=Vr.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",e=>jr(Br,this,Gr).call(this,e)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function Gr(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}var zr=n("bd5e");function Kr(e,t){$r(e,t),t.add(e)}function Xr(e,t,n){$r(e,t),t.set(e,n)}function $r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qr(e,t,n){return(t=Jr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e){var t=Qr(e,"string");return"symbol"==typeof t?t:t+""}function Qr(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 Zr(e,t){return e.get(ti(e,t))}function ei(e,t,n){return e.set(ti(e,t),n),n}function ti(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 ni="collapsibleColumns",ri=290,ii=["nestedHeaders"],si="collapsibleIndicator",oi=ni,ai=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var li=new WeakMap,ui=new WeakSet;class hi extends Zt["a"]{constructor(){super(...arguments),Kr(this,ui),qr(this,"nestedHeadersPlugin",null),qr(this,"headerStateManager",null),Xr(this,li,null)}static get PLUGIN_KEY(){return ni}static get PLUGIN_PRIORITY(){return ri}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[ni,...ii]}isEnabled(){return!!this.hot.getSettings()[ni]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||Object(zr["b"])("You need to configure the Nested Headers plugin in order to use collapsible headers."),ei(li,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>ti(ui,this,mi).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 ti(ui,e,fi).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 ti(ui,e,ci).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(e,t,n)=>ti(ui,this,di).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),ei(li,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:oi,relativeToGroup:a["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(oi)}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(nt["rangeEach"])(0,e-1,e=>{const s=t.childNodes[e],o=n.childNodes[e],a=r?r.childNodes[e]:null;Object(nt["rangeEach"])(0,s.childNodes.length-1,e=>{let t=s.childNodes[e].querySelector("."+si);i(t),o&&o.childNodes[e]&&(t=o.childNodes[e].querySelector("."+si),i(t)),r&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector("."+si),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(!ai.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const n=Object(c["arrayFilter"])(e,e=>{let{row:t}=e;return t<0});let r=n.length>0;Object(c["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(c["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(c["arrayUnique"])([...o,...s]):"expand"===t&&(a=Object(c["arrayFilter"])(o,e=>!s.includes(e)));const l=ai.get(t),u=this.hot.runHooks(l.beforeHook,o,a,r);if(!1===u)return void Object(c["arrayEach"])(i,e=>{e()});this.hot.batchExecution(()=>{Object(c["arrayEach"])(s,e=>{Zr(li,this).setValueAtIndex(this.hot.toPhysicalColumn(e),l.hideColumn)})},!0);const h=this.getCollapsedColumns().length!==o.length,d=this.hot.getSelectedRangeLast();if("collapse"===t&&h&&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,h),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return Zr(li,this).getHiddenIndexes()}destroy(){ei(li,this,null),super.destroy()}}function ci(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,u=this.hot.getSettings().ariaTags;let h=t.querySelector("."+si);var c;(Object(i["removeAttribute"])(t,[Object(y["k"])("")[0]]),l)?(h||(h=this.hot.rootDocument.createElement("div"),Object(i["addClass"])(h,si),t.querySelector("div:first-child").appendChild(h)),Object(i["removeClass"])(h,["collapsed","expanded"]),a?(Object(i["addClass"])(h,"collapsed"),Object(i["fastInnerText"])(h,"+"),u&&Object(i["setAttribute"])(t,...Object(y["k"])(!1))):(Object(i["addClass"])(h,"expanded"),Object(i["fastInnerText"])(h,"-"),u&&Object(i["setAttribute"])(t,...Object(y["k"])(!0))),u&&Object(i["setAttribute"])(h,...Object(y["n"])())):null===(c=h)||void 0===c||c.remove()}function di(e,t){Object(i["hasClass"])(e.target,si)&&(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 mi(){this.updatePlugin()}function fi(e,t){t||this.updatePlugin()}var pi=n("97b9"),gi=n("1b1a"),yi=n("9056");function wi(e,t,n){return(t=bi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(e){var t=_i(e,"string");return"symbol"==typeof t?t:t+""}function _i(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 vi=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],Si=!1,Ei=!0,Ci=!0;class Mi{constructor(e,t){wi(this,"hot",void 0),wi(this,"sortingStates",new yi["a"]),wi(this,"sortEmptyCells",Si),wi(this,"indicator",Ei),wi(this,"headerAction",Ci),wi(this,"compareFunctionFactory",void 0),wi(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)=>{vi.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}}n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");function Ti(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?Bi:Object(d["isEmpty"])(t)?Object(d["isEmpty"])(i)?Bi:s&&"asc"===e?Wi:Gi:Object(d["isEmpty"])(i)?s&&"asc"===e?Gi:Wi:isNaN(t)&&!isNaN(i)?"asc"===e?Gi:Wi:!isNaN(t)&&isNaN(i)?"asc"===e?Wi:Gi:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?Wi:Gi:t>i?"asc"===e?Gi:Wi:Bi)}}const Ri="default";function Oi(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 Bi;if(o){if(Object(d["isEmpty"])(t))return"asc"===e?Wi:Gi;if(Object(d["isEmpty"])(r))return"asc"===e?Gi:Wi}return isNaN(i)?Gi:isNaN(s)?Wi:i<s?"asc"===e?Wi:Gi:i>s?"asc"===e?Gi:Wi:Bi}}const Ni="numeric";function Li(e,t,n){const r=t.checkedTemplate,i=t.uncheckedTemplate,{sortEmptyCells:s}=n;return function(o,a){const l=Object(d["isEmpty"])(o),u=Object(d["isEmpty"])(a),h=l?i:o,c=u?i:a,m=h===i||h===r,f=c===i||c===r;if(!1===s){if(l&&!1===u)return Gi;if(!1===l&&u)return Wi}return!1===m&&f?"asc"===e?Wi:Gi:m&&!1===f?"asc"===e?Gi:Wi:!1===m&&!1===f?Ti(e,t,n)(o,a):h===i&&c===r?"asc"===e?Wi:Gi:h===r&&c===i?"asc"===e?Gi:Wi:Bi}}const Ai="checkbox";function Ii(e,t,n){return ns(e,t.dateFormat,n)}const ki="date";function xi(e,t,n){return ns(e,t.timeFormat,n)}const Di="time";var Hi=n("9acd");const{register:Pi,getItem:ji,hasItem:Fi}=Object(Hi["a"])("sorting.compareFunctionFactory"),{register:Yi,getItem:Ui}=Object(Hi["a"])("sorting.mainSortComparator");function Vi(e){return Fi(e)?ji(e):ji(Ri)}Pi(Ai,Li),Pi(ki,Ii),Pi(Ri,Ti),Pi(Ni,Oi),Pi(Di,xi);const Bi=0,Wi=-1,Gi=1;function zi(e,t){const n=Ui(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))}const Ki="asc",Xi="desc",$i="colHeader";function qi(e){if(!1===Object(o["isObject"])(e))return!1;const{column:t,sortOrder:n}=e;return Number.isInteger(t)&&[Ki,Xi].includes(n)}function Ji(e){if(e.some(e=>!1===qi(e)))return!1;const t=e.map(e=>{let{column:t}=e;return t});return new Set(t).size===t.length}function Qi(e){if(e!==Xi)return e===Ki?Xi:Ki}function Zi(e){const t=e.querySelector("."+$i);return t}function es(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 ts(e,t,n){return-1===e&&t>=0&&!1===Object(s["isRightClick"])(n)}function ns(e,t,n){return function(r,i){const{sortEmptyCells:s}=n;if(r===i)return Bi;if(Object(d["isEmpty"])(r))return Object(d["isEmpty"])(i)?Bi:s&&"asc"===e?Wi:Gi;if(Object(d["isEmpty"])(i))return s&&"asc"===e?Gi:Wi;const o=A(r,t),a=A(i,t);return o.isValid()?a.isValid()?a.isAfter(o)?"asc"===e?Wi:Gi:a.isBefore(o)?"asc"===e?Gi:Wi:Bi:Wi:Gi}}const rs="ascending",is="descending",ss="indicatorDisabled",os="columnSorting",as="sortAction",ls=new Map([[Ki,rs],[Xi,is]]);function us(e,t,n,r){const i=[os];if(r&&i.push(as),!1===n)return i.push(ss),i;const s=e.getSortOrderOfColumn(t);return Object(d["isDefined"])(s)&&i.push(ls.get(s)),i}function hs(){return Array.from(ls.values()).concat(as,ss,os)}function cs(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],u=o.columnSorting,h=u.compareFunctionFactory?u.compareFunctionFactory:Vi(o.type),c=h(r,o,u)(a,l);return c}(0)}}function ds(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 fs(e,t,n){return(t=ps(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)}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")}const ws="columnSorting",bs=50,_s="append",vs="replace",Ss=ws;Yi(ws,cs),fe["a"].getSingleton().register("beforeColumnSort"),fe["a"].getSingleton().register("afterColumnSort");var Es=new WeakSet;class Cs extends Zt["a"]{constructor(){super(...arguments),ds(this,Es),fs(this,"columnStatesManager",null),fs(this,"columnMetaCache",null),fs(this,"pluginKey",ws),fs(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return ws}static get PLUGIN_PRIORITY(){return bs}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new Mi(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)=>ys(Es,this,Ts).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 ys(Es,e,Os).call(e,...n)})),this.addHook("afterOnCellMouseDown",(e,t)=>this.onAfterOnCellMouseDown(e,t)),this.addHook("afterInit",()=>ys(Es,this,Ms).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 ys(Es,e,Rs).call(e,...n)})),this.hot.view&&ys(Es,this,Ms).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=Zi(t);!1!==es(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),this.indexesSequenceCache=null)},!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:a["a"],position:"before",group:Ss})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Ss)}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 gi["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 Ji(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(c["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(c["arrayMap"])(t.initialConfig,n)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t)){const n=Qi(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:Qi()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_s;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===_s)return[...i.slice(0,n),...i.slice(n+1),s];if(t===vs)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(pi["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(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===e.length)return;const t=[],n=this.hot.countRows(),r=t=>Object(c["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(c["arrayMap"])(t,e=>e[0]);zi(t,this.pluginKey,Object(c["arrayMap"])(e,e=>e.sortOrder),Object(c["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(c["arrayMap"])(t,e=>e[0]),o=new Map(Object(c["arrayMap"])(i,(e,t)=>[e,s[t]])),a=Object(c["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,hs(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,us(...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){if(!1!==ts(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col));const e=this.hot.getActiveEditor(),n=this.getColumnNextConfig(t.col);null!==e&&void 0!==e&&e.isOpened()&&this.hot.getCellValidator(e.row,e.col)?this.hot.addHookOnce("postAfterValidate",()=>{this.sort(n)}):this.sort(n)}}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function Ms(){const e=this.getAllSavedSortSettings();if(Object(o["isObject"])(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function Ts(e,t){const n=Zi(t);if(!1===es(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["K"])(n?n+"ending":"none"))}}function Rs(e){!0===e&&this.hot.view&&ys(Es,this,Ms).call(this)}function Os(e,t,n,r){!1!==ts(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(r.column=!0)}function Ns(e,t,n){return(t=Ls(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ls(e){var t=As(e,"string");return"symbol"==typeof t?t:t+""}function As(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 Is{constructor(e,t){Ns(this,"plugin",void 0),Ns(this,"hot",void 0),Ns(this,"endpoints",[]),Ns(this,"settings",void 0),Ns(this,"settingsType","array"),Ns(this,"currentEndpoint",null),Ns(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(c["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(c["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(),u=0===e.indexOf("move_row"),h=t;Object(c["arrayEach"])(l,e=>{"row"===o&&e.destinationRow>=h&&(e.alterRowOffset=a*n),"col"===o&&e.destinationColumn>=h&&(e.alterColumnOffset=a*n)}),this.resetAllEndpoints(l,!u),u?Object(c["arrayEach"])(l,e=>{this.extendEndpointRanges(e,h,r[0],r.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)}):Object(c["arrayEach"])(l,e=>{this.shiftEndpointCoordinates(e,h)}),s&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,n,r){Object(c["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(c["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(c["arrayEach"])(r,e=>{let t=[];Object(c["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(c["arrayEach"])(e.ranges,n=>{Object(c["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(c["arrayEach"])(e,e=>{this.resetEndpointValue(e,t)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],Object(c["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(c["arrayEach"])(e,(e,n,r)=>{""+(e[2]||"")!==""+e[3]&&Object(c["arrayEach"])(this.getAllEndpoints(),(e,i)=>{this.hot.propToCol(r[n][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)})}),Object(c["arrayEach"])(t,e=>{this.refreshEndpoint(this.getEndpoint(e))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach(e=>{const t=this.hot.toVisualRow(e.destinationRow);if(null!==t){const n=this.hot.getCellMeta(t,e.destinationColumn);n.readOnly=e.readOnly,n.className="columnSummaryResult"}})}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(zr["b"])("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}var ks=Is,xs=n("67a8");function Ds(e){return null===e||void 0===e||isNaN(e)}function Hs(e,t){Ps(e,t),t.add(e)}function Ps(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function js(e,t,n){return(t=Fs(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)}function Us(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 Vs="columnSummary",Bs=220;var Ws=new WeakSet;class Gs extends Zt["a"]{constructor(){super(...arguments),Hs(this,Ws),js(this,"endpoints",null)}static get PLUGIN_KEY(){return Vs}static get PLUGIN_PRIORITY(){return Bs}isEnabled(){return!!this.hot.getSettings()[Vs]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Vs],this.endpoints=new ks(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 Us(Ws,e,zs).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 Us(Ws,e,Xs).call(e,...n)})),this.addHook("afterUpdateSettings",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Us(Ws,e,Ks).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 Us(Ws,e,$s).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=Ds(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=Ds(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=Ds(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(xs["a"]`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
  196. numeric format. Cannot do the calculation.`);return i}}function zs(){this.endpoints.initEndpoints()}function Ks(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function Xs(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function $s(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)}var qs=n("7ae0");function Js(e,t){Zs(e,t),t.add(e)}function Qs(e,t,n){Zs(e,t),t.set(e,n)}function Zs(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function eo(e,t){return e.get(no(e,t))}function to(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 ro=new WeakMap,io=new WeakMap,so=new WeakMap,oo=new WeakSet;class ao{constructor(){Js(this,oo),Qs(this,ro,!0),Qs(this,io,null),Qs(this,so,new ResizeObserver(e=>no(oo,this,lo).call(this,e)))}setObservedElement(e){to(io,this,e)}unobserve(){eo(so,this).unobserve(eo(io,this))}observe(){to(ro,this,!0),eo(so,this).observe(eo(io,this))}destroy(){eo(so,this).disconnect()}}function lo(e){!eo(ro,this)&&Array.isArray(e)&&e.length?e.forEach(e=>{let{borderBoxSize:t}=e;const{inlineSize:n,blockSize:r}=t[0];this.runLocalHooks("resize",n,r)}):to(ro,this,!1)}function uo(e,t,n){ho(e,t),t.set(e,n)}function ho(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function co(e,t){return e.get(fo(e,t))}function mo(e,t,n){return e.set(fo(e,t),n),n}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")}Object(o["mixin"])(ao,qs["a"]);var po=new WeakMap,go=new WeakMap,yo=new WeakMap,wo=new WeakMap,bo=new WeakMap,_o=new WeakMap,vo=new WeakMap;class So{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){var n=this;uo(this,po,void 0),uo(this,go,!1),uo(this,yo,null),uo(this,wo,void 0),uo(this,bo,void 0),uo(this,_o,!0),uo(this,vo,new ao),mo(po,this,e),mo(go,this,t),mo(wo,this,this.createEditor()),mo(bo,this,co(wo,this).style),co(vo,this).setObservedElement(this.getInputElement()),co(vo,this).addLocalHook("resize",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("resize",...t)})),this.hide()}setPosition(e,t){co(bo,this).left=e+"px",co(bo,this).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())}}observeSize(){co(vo,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){const t=this.getInputElement();t.readOnly=e}show(){co(bo,this).display="block",mo(_o,this,!1)}hide(){co(vo,this).unobserve(),co(_o,this)||(co(bo,this).display="none"),mo(_o,this,!0)}isVisible(){return"block"===co(bo,this).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 co(po,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=co(po,this).createElement("div"),t=co(po,this).createElement("textarea");return e.style.display="none",mo(yo,this,co(po,this).createElement("div")),co(yo,this).setAttribute("dir",co(go,this)?"rtl":"ltr"),Object(i["addClass"])(co(yo,this),So.CLASS_EDITOR_CONTAINER),co(po,this).body.appendChild(co(yo,this)),Object(i["addClass"])(e,So.CLASS_EDITOR),Object(i["addClass"])(t,So.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),co(yo,this).appendChild(e),e}getInputElement(){return co(wo,this).querySelector("."+So.CLASS_INPUT)}destroy(){const e=co(yo,this)?co(yo,this).parentNode:null;co(wo,this).parentNode.removeChild(co(wo,this)),mo(wo,this,null),mo(bo,this,null),co(vo,this).destroy(),e&&e.removeChild(co(yo,this))}}Object(o["mixin"])(So,qs["a"]);var Eo=So;function Co(e,t,n){return(t=Mo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e){var t=To(e,"string");return"symbol"==typeof t?t:t+""}function To(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 Ro=250,Oo=250;class No{constructor(e){Co(this,"wasLastActionShow",!0),Co(this,"showDebounced",null),Co(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout(()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")},Oo)}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]:Ro;this.showDebounced=Object(pi["debounce"])(e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)},e)}destroy(){this.clearLocalHooks()}}Object(o["mixin"])(No,qs["a"]);var Lo=No;const Ao="---------";function Io(){return{name:Ao}}function ko(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(Pe["CONTEXTMENU_ITEMS_EDIT_COMMENT"]):this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ADD_COMMENT"])},callback(){const t=this.getSelectedRangeLast();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 xo(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(Pe["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 Do(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return`${n} ${t}`}function Ho(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 Po(e,t){const n={};return Object(c["arrayEach"])(e,e=>{e.forAll((e,r)=>{e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))})}),n}function jo(e,t,n,r,i){Object(c["arrayEach"])(e,e=>{e.forAll((e,s)=>{e>=0&&s>=0&&Fo(e,s,t,n,r,i)})})}function Fo(e,t,n,r,i,s){const o=i(e,t);let a=r;o.className&&(a="vertical"===n?Do(o.className,r):Ho(o.className,r)),s(e,t,"className",a)}function Yo(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Uo(e,t){let n=!1;return Array.isArray(e)&&Object(c["arrayEach"])(e,e=>(e.forAll((e,r)=>{if(e>=0&&r>=0&&t(e,r))return n=!0,!1}),n)),n}function Vo(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 Bo(e){return function(t,n){const r=this.getCellMeta(t,n).className;return r&&-1!==r.indexOf(e)}}function Wo(e,t){return Uo(e.getSelectedRange(),Bo(t).bind(e))}function Go(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]),n=Uo(this.getSelectedRange(),(t,n)=>e.getCommentMeta(t,n,oa));return n?Yo(t):t},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{if(t>=0&&n>=0){const r=!!e.getCommentMeta(t,n,oa);e.updateCommentMeta(t,n,{[oa]:!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 zo(e,t){Xo(e,t),t.add(e)}function Ko(e,t,n){Xo(e,t),t.set(e,n)}function Xo(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=qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qo(e){var t=Jo(e,"string");return"symbol"==typeof t?t:t+""}function Jo(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 Qo(e,t,n){return e.set(ea(e,t),n),n}function Zo(e,t){return e.get(ea(e,t))}function ea(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 ta="comments",na=60,ra="comment",ia="value",sa="style",oa="readOnly",aa=ta,la="plugin:"+ta;var ua=new WeakMap,ha=new WeakMap,ca=new WeakMap,da=new WeakMap,ma=new WeakMap,fa=new WeakMap,pa=new WeakSet;class ga extends Zt["a"]{constructor(){super(...arguments),zo(this,pa),$o(this,"range",{}),Ko(this,ua,null),Ko(this,ha,null),Ko(this,ca,!1),Ko(this,da,!1),Ko(this,ma,null),Ko(this,fa,"")}static get PLUGIN_KEY(){return ta}static get PLUGIN_PRIORITY(){return na}isEnabled(){return!!this.hot.getSettings()[ta]}enablePlugin(){var e=this;this.enabled||(Zo(ua,this)||(Qo(ua,this,new Eo(this.hot.rootDocument,this.hot.isRtl())),Zo(ua,this).addLocalHook("resize",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ea(pa,e,Ea).call(e,...n)}))),Zo(ha,this)||Qo(ha,this,new Lo(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",e=>this.addToContextMenu(e)),this.addHook("afterRenderer",(e,t,n,r,i,s)=>ea(pa,this,_a).call(this,e,s)),this.addHook("afterScroll",()=>ea(pa,this,Ma).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",e=>ea(pa,this,Ca).call(this,e)),Zo(ha,this).addLocalHook("hide",()=>this.hide()),Zo(ha,this).addLocalHook("show",(e,t)=>this.showAtCell(e,t)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){Zo(ha,this).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),n=e.addContext(la);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();Qo(da,this,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(la),this.hot._registerTimeout(()=>{Qo(da,this,!1)})})},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!Zo(ua,this).isVisible()},group:aa}),n.addShortcut({keys:[["Escape"]],callback:()=>{Zo(ua,this).setValue(Zo(fa,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Zo(ua,this).isVisible()&&Zo(ua,this).isFocused(),group:aa}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Zo(ua,this).isVisible()&&Zo(ua,this).isFocused(),group:aa})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(aa)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",e=>ea(pa,this,wa).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>ea(pa,this,ya).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>ea(pa,this,ba).call(this)),this.eventManager.addEventListener(t,"focus",()=>ea(pa,this,Sa).call(this)),this.eventManager.addEventListener(t,"blur",()=>ea(pa,this,va).call(this))}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=Zo(ua,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,{[ia]: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,ra),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,ia)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,ia)}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 Zo(ha,this).cancelHiding(),Zo(ua,this).setValue(null!==(e=r[ra]?r[ra][ia]:null)&&void 0!==e?e:""),Zo(ua,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){Zo(ua,this).hide()}refreshEditor(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!n&&(!this.range.from||!Zo(ua,this).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:s}=this.hot,{row:o,col:a}=this.range.from;let l=r.getRenderableFromVisualIndex(o),u=s.getRenderableFromVisualIndex(a);const h=null===l;Zo(ua,this).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,-1))),null===u&&(u=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(a,-1)));const c=null===l,d=null===u;l=null!==(e=l)&&void 0!==e?e:0,u=null!==(t=u)&&void 0!==t?t:0;const{rootWindow:m,view:{_wt:f}}=this.hot,{wtTable:p}=f,g=f.getCell({row:l,col:u},!0),y=this.getCommentMeta(o,a,sa);y?Zo(ua,this).setSize(y.width,y.height):Zo(ua,this).resetSize();const w=d?0:p.getStretchedColumnWidth(u),b=h&&!c?Object(i["outerHeight"])(g):0,{left:_,top:v,width:S,height:E}=g.getBoundingClientRect(),{width:C,height:M}=Zo(ua,this).getSize(),{innerWidth:T,innerHeight:R}=this.hot.rootWindow,O=this.hot.rootDocument.documentElement;let N=_+m.scrollX+w,L=v+m.scrollY+b;this.hot.isRtl()&&(N-=C+w),this.hot.isLtr()&&_+S+C>T?N=_+m.scrollX-C-1:this.hot.isRtl()&&N<-(O.scrollWidth-O.clientWidth)&&(N=_+m.scrollX+w+1),v+M>R&&(L-=M-E+1),Zo(ua,this).setPosition(N,L),Zo(ua,this).setReadOnlyState(this.getCommentMeta(o,a,oa)),Zo(ua,this).observeSize()}focusEditor(){Zo(ua,this).focus()}updateCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t)[ra];let i;r?(i=Object(o["deepClone"])(r),Object(o["deepExtend"])(i,n)):i=n,this.hot.setCellMeta(e,t,ra,i)}getCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t);if(r[ra])return r[ra][n]}addToContextMenu(e){e.items.push({name:Ao},ko(this),xo(this),Go(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[ta];if(Object(o["isObject"])(e))return e.displayDelay}getEditorInputElement(){return Zo(ua,this).getInputElement()}destroy(){var e,t;null===(e=Zo(ua,this))||void 0===e||e.destroy(),null===(t=Zo(ha,this))||void 0===t||t.destroy(),super.destroy()}}function ya(e){if(this.hot.view&&this.hot.view._wt&&!Zo(ca,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 wa(e){const{rootDocument:t}=this.hot;if(!(Zo(ca,this)||Zo(ua,this).isFocused()||Object(i["hasClass"])(e.target,"wtBorder")||Zo(ma,this)===e.target)&&Zo(ua,this))if(Qo(ma,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));Zo(ha,this).show(t)}else Object(i["isChildOf"])(e.target,t)&&!this.targetIsCommentTextArea(e)&&Zo(ha,this).hide()}function ba(){Qo(ca,this,!1)}function _a(e,t){t[ra]&&t[ra][ia]&&Object(i["addClass"])(e,t.commentedCellClassName)}function va(){Qo(fa,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Sa(){Qo(fa,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(la)}function Ea(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[sa]:{width:e,height:t}})}function Ca(e){Zo(ua,this).isVisible()&&Object(s["stopImmediatePropagation"])(e)}function Ma(){Zo(da,this)||this.hide()}n("3c65");function Ta(e,t,n){return(t=Ra(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){Ta(this,"hot",void 0),Ta(this,"commands",{}),Ta(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=La(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 u=[];"function"===typeof l.callback&&u.push(l.callback),"function"===typeof this.commonCallback&&u.push(this.commonCallback),n.unshift(i.join(":")),Object(c["arrayEach"])(u,e=>e.apply(this.hot,n))}}function La(e,t){let n;return Object(c["arrayEach"])(t,t=>{const r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1}),n}const Aa="alignment";function Ia(){return{key:Aa,name(){return this.getTranslatedPhrase(Pe["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:Aa+":left",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"])},ariaChecked(){return Wo(this,"htLeft")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]);return Wo(this,"htLeft")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htLeft";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Aa+":center",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"])},ariaChecked(){return Wo(this,"htCenter")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]);return Wo(this,"htCenter")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htCenter";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Aa+":right",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"])},ariaChecked(){return Wo(this,"htRight")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]);return Wo(this,"htRight")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htRight";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Aa+":justify",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"])},ariaChecked(){return Wo(this,"htJustify")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]);return Wo(this,"htJustify")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htJustify";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{name:Ao},{key:Aa+":top",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"])},ariaChecked(){return Wo(this,"htTop")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]);return Wo(this,"htTop")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htTop";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Aa+":middle",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"])},ariaChecked(){return Wo(this,"htMiddle")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]);return Wo(this,"htMiddle")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:Aa+":bottom",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"])},ariaChecked(){return Wo(this,"htBottom")},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]);return Wo(this,"htBottom")&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Po(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htBottom";this.runHooks("beforeCellAlignment",t,e,n,r),jo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1}]}}}const ka="clear_column";function xa(){return{key:ka,name(){return this.getTranslatedPhrase(Pe["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 Da="col_left";function Ha(){return{key:Da,name(){return this.getTranslatedPhrase(Pe["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 Pa="col_right";function ja(){return{key:Pa,name(){return this.getTranslatedPhrase(Pe["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 Fa="make_read_only";function Ya(){return{key:Fa,checkable:!0,ariaChecked(){const e=Uo(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return e},ariaLabel(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_READ_ONLY"])},name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_READ_ONLY"]);const t=Uo(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return t&&(e=Yo(e)),e},callback(){const e=this.getSelectedRange(),t=Uo(e,(e,t)=>this.getCellMeta(e,t).readOnly);Object(c["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 Ua="redo";function Va(){return{key:Ua,name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_REDO"])},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}}var Ba=n("a952");const Wa="remove_col";function Ga(){return{key:Wa,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(Pe["CONTEXTMENU_ITEMS_REMOVE_COLUMN"],t)},callback(){this.alter("remove_col",Object(Ba["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 za="remove_row";function Ka(){return{key:za,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(Pe["CONTEXTMENU_ITEMS_REMOVE_ROW"],t)},callback(){this.alter("remove_row",Object(Ba["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 Xa="row_above";function $a(){return{key:Xa,name(){return this.getTranslatedPhrase(Pe["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 qa="row_below";function Ja(){return{key:qa,name(){return this.getTranslatedPhrase(Pe["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 Qa="no_items";function Za(){return{key:Qa,name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_NO_ITEMS"])},disabled:!0,isCommand:!1}}const el="undo";function tl(){return{key:el,name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_UNDO"])},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}}const nl=[Xa,qa,Da,Pa,ka,za,Wa,el,Ua,Fa,Aa,Ao,Qa],rl={[Ao]:Io,[Qa]:Za,[Xa]:$a,[qa]:Ja,[Da]:Ha,[Pa]:ja,[ka]:xa,[za]:Ka,[Wa]:Ga,[el]:tl,[Ua]:Va,[Fa]:Ya,[Aa]:Ia};function il(){const e={};return Object(o["objectEach"])(rl,(t,n)=>{e[n]=t()}),e}function sl(e,t,n){return(t=ol(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ol(e){var t=al(e,"string");return"symbol"==typeof t?t:t+""}function al(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 ll{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;sl(this,"hot",void 0),sl(this,"predefinedItems",il()),sl(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===Ao?(t[Ao]=e,r=Ao):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 ul(e,this.defaultOrderPattern,this.predefinedItems)}}function ul(){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(c["arrayEach"])(i,(e,t)=>{let i=n[e];!i&&nl.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 hl(e,t,n){return(t=cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cl(e){var t=dl(e,"string");return"symbol"==typeof t?t:t+""}function dl(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 ml{constructor(e,t){hl(this,"top",void 0),hl(this,"topRelative",void 0),hl(this,"left",void 0),hl(this,"leftRelative",void 0),hl(this,"scrollTop",void 0),hl(this,"scrollLeft",void 0),hl(this,"cellHeight",void 0),hl(this,"cellWidth",void 0);const n=t.scrollY,r=t.scrollX;let i,s,o,a,l,u;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,u=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,u=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=u}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 fl(e,t,n){pl(e,t),t.set(e,n)}function pl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gl(e,t){return e.get(wl(e,t))}function yl(e,t,n){return e.set(wl(e,t),n),n}function wl(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 bl=new WeakMap,_l=new WeakMap,vl=new WeakMap,Sl=new WeakMap,El=new WeakMap;class Cl{constructor(e){fl(this,bl,void 0),fl(this,_l,void 0),fl(this,vl,void 0),fl(this,Sl,!1),fl(this,El,{above:0,below:0,left:0,right:0}),yl(Sl,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return gl(El,this)[e]=t,this}setElement(e){return yl(bl,this,e),this}setParentElement(e){return yl(_l,this,e),this}updatePosition(e){yl(vl,this,new ml(e,gl(bl,this).ownerDocument.defaultView)),gl(Sl,this)?(gl(vl,this).fitsBelow(gl(bl,this))?this.setPositionBelowCursor():gl(vl,this).fitsAbove(gl(bl,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===gl(bl,this).dir?gl(vl,this).fitsOnLeft(gl(bl,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():gl(vl,this).fitsOnRight(gl(bl,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=gl(El,this).above+gl(vl,this).top-gl(bl,this).offsetHeight;gl(_l,this)&&(e=gl(vl,this).top+gl(vl,this).cellHeight-gl(bl,this).offsetHeight+3),gl(bl,this).style.top=e+"px"}setPositionBelowCursor(){let e=gl(El,this).below+gl(vl,this).top+1;gl(_l,this)&&(e=gl(vl,this).top-1),gl(bl,this).style.top=e+"px"}setPositionOnRightOfCursor(){let e=gl(vl,this).left;if(gl(_l,this)){const t=Number.parseInt(getComputedStyle(gl(_l,this).querySelector(".htCore")).borderRightWidth,10);e+=gl(vl,this).cellWidth+t}else e+=gl(El,this).right;gl(bl,this).style.left=e+"px"}setPositionOnLeftOfCursor(){let e=gl(El,this).left+gl(vl,this).left-gl(bl,this).offsetWidth;if(gl(_l,this)){const t=Number.parseInt(getComputedStyle(gl(_l,this).querySelector(".htCore")).borderLeftWidth,10);e-=t}gl(bl,this).style.left=e+"px"}}function Ml(e){let{initialPage:t=-1,size:n=(()=>0),onItemSelect:r=(()=>{}),onClear:i=(()=>{})}=e;const s=new Set;let o=Object(nt["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 u(){return o}function h(){f()>0&&(s.clear(),o=a(0,1))}function c(){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:u,toFirstItem:h,toLastItem:c,toNextItem:d,toPreviousItem:m,getSize:f,clear:p}}function Tl(e){return Object(c["arrayMap"])(e,e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()}))}function Rl(e){return Object(o["hasOwnProperty"])(e,"submenu")}function Ol(e){return new RegExp(Ao,"i").test(e.name)}function Nl(e,t){return!0===e.disabled||"function"===typeof e.disabled&&!0===e.disabled.call(t)}function Ll(e){return Object(o["hasOwnProperty"])(e,"disableSelection")}function Al(e){return Object(i["hasClass"])(e,"htSeparator")}function Il(e){return Object(i["hasClass"])(e,"htSubmenu")}function kl(e){return Object(i["hasClass"])(e,"htDisabled")}function xl(e){return Object(i["hasClass"])(e,"htSelectionDisabled")}function Dl(e,t){return!e.hidden||!("function"===typeof e.hidden&&e.hidden.call(t))}function Hl(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 Pl(e,t){let n=e.slice(0);return n.reverse(),n=Hl(n,t),n.reverse(),n}function jl(e){const t=[];return Object(c["arrayEach"])(e,(e,n)=>{n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function Fl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ao,n=e.slice(0);return n=Hl(n,t),n=Pl(n,t),n=jl(n),n}function Yl(e){return!0===e.checkable}function Ul(e){return Ml({size:()=>e.countRows(),onItemSelect(t,n){const r=e.getCell(t,0);if(!r||Al(r)||kl(r)||xl(r))return!1;e.selectCell(t,0,...n?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})}function Vl(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 Bl="menu",Wl=Bl;function Gl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function r(e,t){a(t).addShortcuts(e,{group:Bl})}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?`${Wl}:${e}`:Wl}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(Vl(e)),t.forEach(e=>{let{shortcuts:t,contextName:n}=e;i(t,n)}),{addCustomShortcuts:i,getCustomShortcuts:s,getContext:a,listen:l}}function zl(e){return(t,n,r,s,o,a)=>{const l=t.getSourceDataAtRow(r),u=e.rootDocument.createElement("div"),h="function"===typeof a?a.call(e):a,c="function"===typeof l.ariaLabel?l.ariaLabel.call(e):l.ariaLabel,d="function"===typeof l.ariaChecked?l.ariaChecked.call(e):l.ariaChecked;if(Object(i["empty"])(n),Object(i["addClass"])(u,"htItemWrapper"),e.getSettings().ariaTags){const t=!Nl(l,e)&&!Ll(l)&&!Ol(l);Object(i["setAttribute"])(n,[...Yl(l)?[Object(y["u"])(),Object(y["p"])(c),Object(y["d"])(d)]:[Object(y["t"])(),Object(y["p"])(h)],...t?[Object(y["L"])(-1)]:[],...Nl(l,e)?[Object(y["j"])()]:[],...Rl(l)?[Object(y["k"])(!1)]:[]])}n.className="",n.appendChild(u),Ol(l)?Object(i["addClass"])(n,"htSeparator"):"function"===typeof l.renderer?(Object(i["addClass"])(n,"htCustomMenuRenderer"),n.appendChild(l.renderer(t,u,r,s,o,h))):Object(i["fastInnerHTML"])(u,h),Nl(l,e)?Object(i["addClass"])(n,"htDisabled"):Ll(l)?Object(i["addClass"])(n,"htSelectionDisabled"):Rl(l)&&Object(i["addClass"])(n,"htSubmenu")}}function Kl(e,t,n){Xl(e,t),t.set(e,n)}function Xl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $l(e,t,n){return(t=ql(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ql(e){var t=Jl(e,"string");return"symbol"==typeof t?t:t+""}function Jl(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 Ql(e,t,n){return e.set(eu(e,t),n),n}function Zl(e,t){return e.get(eu(e,t))}function eu(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 tu=215;var nu=new WeakMap,ru=new WeakMap,iu=new WeakMap;class su{get tableBorderWidth(){return void 0===Zl(iu,this)&&this.hotMenu&&Ql(iu,this,parseInt(Object(i["getComputedStyle"])(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),Zl(iu,this)}constructor(e,t){var n=this;$l(this,"hot",void 0),$l(this,"options",void 0),$l(this,"eventManager",new Ie["a"](this)),$l(this,"container",void 0),$l(this,"positioner",void 0),$l(this,"hotMenu",null),$l(this,"hotSubMenus",{}),$l(this,"parentMenu",void 0),$l(this,"menuItems",null),$l(this,"origOutsideClickDeselects",null),Kl(this,nu,void 0),Kl(this,ru,void 0),Kl(this,iu,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:tu,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Cl(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,"touchstart",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 Zl(nu,this)}getKeyboardShortcutsCtrl(){return Zl(ru,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(pi["debounce"])(e=>this.openSubMenu(e),300),t=this.options.minWidth||tu;let n=!1,r=Object(c["arrayFilter"])(this.menuItems,e=>(e.key===Qa&&(n=!0),Dl(e,this.hot)));if(r.length<1&&!n)r.push(il()[Qa]);else if(0===r.length)return;r=Fl(r,Ao);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:zl(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{Zl(nu,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,n)=>{this.isAllSubMenusClosed()?e(n.row):this.openSubMenu(n.row)},rowHeights:e=>r[e].name===Ao?1:void 0,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(),Ql(nu,this,Ul(this.hotMenu)),Ql(ru,this,Gl(this)),Zl(ru,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(Zl(nu,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||!Il(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),r=new su(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(c["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?Tl(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}isCommandPassive(e){return!1===e.isCommand||Ol(e)||Nl(e,this.hot)||Rl(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)}updateMenuDimensions(){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(c["arrayReduce"])(t,(e,t,n)=>{const r=this.hotMenu.getCell(n,0),s=r?Object(i["outerHeight"])(this.hotMenu.getCell(n,0)):0;return e+(t.name===Ao?1:s)},0);r.width=s+3+"px",r.height=o+3+"px",n.height=r.height}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(pi["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(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.hotMenu.rootElement,[Object(y["s"])(),Object(y["L"])(-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 ou(e,t){au(e,t),t.add(e)}function au(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lu(e,t,n){return(t=uu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uu(e){var t=hu(e,"string");return"symbol"==typeof t?t:t+""}function hu(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 cu(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"])(su,qs["a"]);const du="contextMenu",mu=70,fu=du;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 pu=new WeakSet;class gu extends Zt["a"]{constructor(){super(...arguments),ou(this,pu),lu(this,"commandExecutor",new Na(this.hot)),lu(this,"itemsFactory",null),lu(this,"menu",null)}static get PLUGIN_KEY(){return du}static get PLUGIN_PRIORITY(){return mu}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Xa,qa,Ao,Da,Pa,Ao,za,Wa,Ao,el,Ua,Ao,Fa,Ao,Aa]}isEnabled(){return!!this.hot.getSettings()[du]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[du];"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new su(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",()=>cu(pu,this,wu).call(this)),this.menu.addLocalHook("afterOpen",()=>cu(pu,this,bu).call(this)),this.menu.addLocalHook("afterClose",()=>cu(pu,this,_u).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=>cu(pu,this,yu).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=Vo(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:fu})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(fu)}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(t=this.menu)&&void 0!==t&&t.isOpened())return;this.prepareMenuItems(),this.menu.open();const r=this.menu.tableBorderWidth>0;r||(n.below+=1,n.right+=1,n.above-=1,n.left-=1),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 ll(this.hot,gu.DEFAULT_ITEMS);const e=this.hot.getSettings()[du],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(c["arrayEach"])(n,e=>this.commandExecutor.registerCommand(e.key,e))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function yu(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=Vo(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+a.top,left:e.clientX+a.left})}function wu(){this.hot.runHooks("beforeContextMenuShow",this)}function bu(){this.hot.runHooks("afterContextMenuShow",this)}function _u(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}gu.SEPARATOR={name:Ao};var vu=n("3bc4");function Su(e){return{key:"copy",name(){return this.getTranslatedPhrase(Pe["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 Eu(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?Object(nt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Pe["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 Cu(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(nt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Pe["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 Mu(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(nt["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Pe["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 Tu(e){return{key:"cut",name(){return this.getTranslatedPhrase(Pe["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 Ru{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class Ou{constructor(){this.clipboardData=new Ru}preventDefault(){}}function Nu(e,t){Au(e,t),t.add(e)}function Lu(e,t,n){Au(e,t),t.set(e,n)}function Au(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Iu(e,t){return e.get(xu(e,t))}function ku(e,t,n){return e.set(xu(e,t),n),n}function xu(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 Du=new WeakMap,Hu=new WeakMap,Pu=new WeakMap,ju=new WeakMap,Fu=new WeakMap,Yu=new WeakMap,Uu=new WeakSet;class Vu{constructor(e){let{countRows:t,countColumns:n,rowsLimit:r,columnsLimit:i,countColumnHeaders:s}=e;Nu(this,Uu),Lu(this,Du,void 0),Lu(this,Hu,void 0),Lu(this,Pu,void 0),Lu(this,ju,void 0),Lu(this,Fu,void 0),Lu(this,Yu,void 0),ku(Hu,this,t),ku(Pu,this,n),ku(ju,this,r),ku(Fu,this,i),ku(Yu,this,s)}setSelectedRange(e){ku(Du,this,e)}getCellsRange(){if(0===Iu(Hu,this).call(this)||0===Iu(Pu,this).call(this))return null;const{row:e,col:t}=Iu(Du,this).getTopStartCorner(),{row:n,col:r}=Iu(Du,this).getBottomEndCorner(),i=xu(Uu,this,Wu).call(this,e,n),s=xu(Uu,this,Bu).call(this,t,r),o=n!==i||r!==s;return{isRangeTrimmed:o,startRow:e,startCol:t,endRow:i,endCol:s}}getMostBottomColumnHeadersRange(){if(0===Iu(Pu,this).call(this)||0===Iu(Yu,this).call(this))return null;const{col:e}=Iu(Du,this).getTopStartCorner(),{col:t}=Iu(Du,this).getBottomEndCorner(),n=xu(Uu,this,Bu).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===Iu(Pu,this).call(this)||0===Iu(Yu,this).call(this))return null;const{col:e}=Iu(Du,this).getTopStartCorner(),{col:t}=Iu(Du,this).getBottomEndCorner(),n=xu(Uu,this,Bu).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-Iu(Yu,this).call(this),startCol:e,endRow:-1,endCol:n}}}function Bu(e,t){return Math.min(t,Math.max(e+Iu(Fu,this).call(this)-1,e))}function Wu(e,t){return Math.min(t,Math.max(e+Iu(ju,this).call(this)-1,e))}function Gu(e){const t=[],n=[];return Object(c["arrayEach"])(e,e=>{const r=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);Object(nt["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(nt["rangeEach"])(s,o,e=>{-1===n.indexOf(e)&&n.push(e)})}),{rows:t,columns:n}}var zu=n("a776");function Ku(e,t){$u(e,t),t.add(e)}function Xu(e,t,n){$u(e,t),t.set(e,n)}function $u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qu(e,t,n){return(t=Ju(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ju(e){var t=Qu(e,"string");return"symbol"==typeof t?t:t+""}function Qu(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 Zu(e,t){return e.get(th(e,t))}function eh(e,t,n){return e.set(th(e,t),n),n}function th(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 nh="copyPaste",rh=80,ih=["fragmentSelection"],sh=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var oh=new WeakMap,ah=new WeakMap,lh=new WeakMap,uh=new WeakMap,hh=new WeakMap,ch=new WeakMap,dh=new WeakMap,mh=new WeakMap,fh=new WeakSet;class ph extends Zt["a"]{constructor(){super(...arguments),Ku(this,fh),qu(this,"columnsLimit",1/0),qu(this,"rowsLimit",1/0),qu(this,"pasteMode","overwrite"),qu(this,"uiContainer",this.hot.rootDocument.body),Xu(this,oh,!1),Xu(this,ah,!1),Xu(this,lh,!1),Xu(this,uh,"cells-only"),Xu(this,hh,!1),Xu(this,ch,!1),Xu(this,dh,new Vu({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),Xu(this,mh,!1),qu(this,"copyableRanges",[])}static get PLUGIN_KEY(){return nh}static get SETTING_KEYS(){return[nh,...ih]}static get PLUGIN_PRIORITY(){return rh}isEnabled(){return!!this.hot.getSettings()[nh]}enablePlugin(){var e=this;if(this.enabled)return;const{[nh]: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,eh(oh,this,!!t.copyColumnHeaders),eh(ah,this,!!t.copyColumnGroupHeaders),eh(lh,this,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(r=t.uiContainer)&&void 0!==r?r:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",e=>th(fh,this,_h).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 th(fh,e,vh).call(e,...n)})),this.addHook("afterSelectionEnd",()=>th(fh,this,Sh).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 th(fh,e,Eh).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 th(fh,e,Ch).call(e,...n)})),this.addHook("afterSelection",()=>th(fh,this,Mh).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";eh(uh,this,e),eh(hh,this,!0),th(fh,this,gh).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(){eh(ch,this,!0),th(fh,this,gh).call(this,"cut")}getRangedCopyableData(e){return Object(vu["b"])(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:r}=Gu(e);return Object(c["arrayEach"])(n,e=>{const n=[];Object(c["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 Ou;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=[]);Zu(dh,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===Zu(uh,this)?t.set("headers",Zu(dh,this).getMostBottomColumnHeadersRange()):("with-column-headers"===Zu(uh,this)?t.set("headers",Zu(dh,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===Zu(uh,this)&&t.set("headers",Zu(dh,this).getAllColumnHeadersRange()),t.set("cells",Zu(dh,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 u=s,h=o,c=s,d=o;while(i.length<n||u<=a){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(u,o);if(u=a+1,!0===t)continue;c=a,h=o;const m=[],f=i.length%n;while(m.length<r||h<=l){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(s,h);if(h=n+1,!0===t)continue;d=n;const i=m.length%r;m.push(e[f][i])}i.push(m)}return eh(mh,this,!0),this.hot.populateFromArray(s,o,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[s,o,c,d]}onCopy(e){var t;const n=this.hot.getFocusManager().getRefocusElement(),r=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Zu(hh,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(r&&e.target!==n||!r&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),eh(hh,this,!1);const i=this.getRangedData(this.copyableRanges),s=th(fh,this,yh).call(this,this.copyableRanges),o=!!this.hot.runHooks("beforeCopy",i,this.copyableRanges,s);if(o){const t=Object(vu["b"])(i);if(e&&e.clipboardData){const n=Object(zu["_dataToHTML"])(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[sh,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",i,this.copyableRanges,s)}eh(uh,this,"cells-only")}onCut(e){var t;const n=this.hot.getFocusManager().getRefocusElement(),r=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Zu(ch,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(r&&e.target!==n||!r&&e.target!==this.hot.rootDocument.body))return;e.preventDefault(),this.setCopyableText(),eh(ch,this,!1);const i=this.getRangedData(this.copyableRanges),s=!!this.hot.runHooks("beforeCut",i,this.copyableRanges);if(s){const t=Object(vu["b"])(i);if(e&&e.clipboardData){const n=Object(zu["_dataToHTML"])(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[sh,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,this.copyableRanges)}}onPaste(e){var t;const n=this.hot.getFocusManager().getRefocusElement(),r=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||e.target instanceof HTMLElement&&(r&&e.target!==n||!r&&e.target!==this.hot.rootDocument.body))return;let i;if(e.preventDefault(),e&&"undefined"!==typeof e.clipboardData){const t=Object(m["sanitize"])(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(t&&/(<table)|(<TABLE)/g.test(t)){const e=Object(zu["htmlToGridSettings"])(t,this.hot.rootDocument);i=e.data}else i=e.clipboardData.getData("text/plain")}else"undefined"===typeof ClipboardEvent&&"undefined"!==typeof this.hot.rootWindow.clipboardData&&(i=this.hot.rootWindow.clipboardData.getData("Text"));if("string"===typeof i&&(i=Object(vu["a"])(i)),void 0===i||i&&0===i.length)return;if(!1===this.hot.runHooks("beforePaste",i,this.copyableRanges))return;const[s,o,a,l]=this.populateValues(i);this.hot.selectCell(s,o,Math.min(this.hot.countRows()-1,a),Math.min(this.hot.countCols()-1,l)),this.hot.runHooks("afterPaste",i,this.copyableRanges)}destroy(){super.destroy()}}function gh(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 yh(e){const{rows:t}=Gu(e);let n=0;for(let r=0;r<t.length;r++){if(t[r]>=0)break;n+=1}return{columnHeadersCount:n}}function wh(){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 bh(){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 _h(e){e.items.push({name:"---------"},Su(this)),Zu(oh,this)&&e.items.push(Mu(this)),Zu(ah,this)&&e.items.push(Cu(this)),Zu(lh,this)&&e.items.push(Eu(this)),e.items.push(Tu(this))}function vh(e,t,n,r,i){Zu(mh,this)&&(i.value=!0),eh(mh,this,!1)}function Sh(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Eh(){th(fh,this,bh).call(this)}function Ch(){th(fh,this,wh).call(this)}function Mh(){th(fh,this,bh).call(this)}function Th(e,t){return`border_row${e}col${t}`}function Rh(){return{width:1,color:"#000"}}function Oh(){return{hide:!0}}function Nh(){return{width:1,color:"#000",cornerVisible:!1}}function Lh(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 Ah(e){return Object(d["isDefined"])(e.start)&&(e.left=e.start),Object(d["isDefined"])(e.end)&&(e.right=e.end),e}function Ih(e,t){return{id:Th(e,t),border:Nh(),row:e,col:t,top:Oh(),bottom:Oh(),start:Oh(),end:Oh()}}function kh(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=Rh()),e.top=t.top):(t.top=Oh(),e.top=t.top)),Object(o["hasOwnProperty"])(t,"bottom")&&Object(d["isDefined"])(t.bottom)&&(t.bottom?(Object(o["isObject"])(t.bottom)||(t.bottom=Rh()),e.bottom=t.bottom):(t.bottom=Oh(),e.bottom=t.bottom)),Object(o["hasOwnProperty"])(t,"start")&&Object(d["isDefined"])(t.start)&&(t.start?(Object(o["isObject"])(t.start)||(t.start=Rh()),e.start=t.start):(t.start=Oh(),e.start=t.start)),Object(o["hasOwnProperty"])(t,"end")&&Object(d["isDefined"])(t.end)&&(t.end?(Object(o["isObject"])(t.end)||(t.end=Rh()),e.end=t.end):(t.end=Oh(),e.end=t.end)),e}function xh(e,t){let n=!1;return Object(c["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 Dh(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Hh(e){return e.some(e=>Object(d["isDefined"])(e.left)||Object(d["isDefined"])(e.right))}function Ph(e){return e.some(e=>Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.end))}const jh=new Map([["left","start"],["right","end"]]);function Fh(e){var t;return null!==(t=jh.get(e))&&void 0!==t?t:e}function Yh(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_BORDERS_TOP"]);const t=xh(this,"top");return t&&(e=Dh(e)),e},callback(t,n){const r=xh(this,"top");e.prepareBorder(n,"top",r)}}}function Uh(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]);const n=xh(this,t);return n&&(e=Dh(e)),e},callback(n,r){const i=xh(this,t);e.prepareBorder(r,t,i)}}}function Vh(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]);const t=xh(this,"bottom");return t&&(e=Dh(e)),e},callback(t,n){const r=xh(this,"bottom");e.prepareBorder(n,"bottom",r)}}}function Bh(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_BORDERS_LEFT"]);const n=xh(this,t);return n&&(e=Dh(e)),e},callback(n,r){const i=xh(this,t);e.prepareBorder(r,t,i)}}}function Wh(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_REMOVE_BORDERS"])},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!xh(this)}}}function Gh(e,t){zh(e,t),t.add(e)}function zh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Kh(e,t,n){return(t=Xh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xh(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)}function qh(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 Jh="customBorders",Qh=90;var Zh=new WeakSet;class ec extends Zt["a"]{constructor(){super(...arguments),Gh(this,Zh),Kh(this,"savedBorders",[])}static get PLUGIN_KEY(){return Jh}static get PLUGIN_PRIORITY(){return Qh}isEnabled(){return!!this.hot.getSettings()[Jh]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>qh(Zh,this,tc).call(this,e)),this.addHook("init",()=>qh(Zh,this,nc).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=Lh(t));const i=Object(Ba["c"])(e),s=Object(Ba["d"])(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});Object(c["arrayEach"])(e,e=>{s(e).forAll((e,t)=>{Object(c["arrayEach"])(n,n=>{this.prepareBorderFromCustomAdded(e,t,r,Fh(n))})})}),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=Object(Ba["c"])(e),n=Object(Ba["d"])(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),r=[];return Object(c["arrayEach"])(e,e=>{n(e).forAll((e,t)=>{Object(c["arrayEach"])(this.savedBorders,n=>{n.row===e&&n.col===t&&r.push(Ah(n))})})}),r}clearBorders(e){e?this.setBorders(e):(Object(c["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=Ih(e,t);n&&(o=kh(o,n),Object(c["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",Ah(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(nt["rangeEach"])(e.from.row,n,n=>{Object(nt["rangeEach"])(e.from.col,r,r=>{const i=Ih(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",Ah(i)),this.insertBorderIntoSettings(i))})})}removeAllBorders(e,t){const n=Th(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?Lh(i):Ih(e,t),r){i[n]=Oh();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",Ah(i))}}else{i[n]=Rh();const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",Ah(i))}}prepareBorder(e,t,n){Object(c["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(nt["rangeEach"])(r.col,i.col,e=>{Object(nt["rangeEach"])(r.row,i.row,t=>{this.removeAllBorders(t,e)})});break;case"top":Object(nt["rangeEach"])(r.col,i.col,e=>{this.setBorder(r.row,e,t,n)});break;case"bottom":Object(nt["rangeEach"])(r.col,i.col,e=>{this.setBorder(i.row,e,t,n)});break;case"start":Object(nt["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,r.col,t,n)});break;case"end":Object(nt["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,i.col,t,n)});break;default:break}})}createCustomBorders(e){Object(c["arrayEach"])(e,e=>{const t=Lh(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(c["arrayReduce"])(s,(e,t)=>{let n=e;return t&&t.hide&&(n+=1),n},0)}clearBordersFromSelectionSettings(e){const t=Object(c["arrayMap"])(this.hot.selection.highlight.customSelections,e=>e.settings.id).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){Object(c["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(c["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()})}spliceBorder(e){const t=Object(c["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(c["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(c["arrayEach"])(this.hot.selection.highlight.customSelections,i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return Object(c["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(c["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(c["arrayEach"])(t,t=>{t.changeBorderStyle(n,e)})}return i=!0,!1}}),i}changeBorderSettings(){const e=this.hot.getSettings()[Jh];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=Hh(e),n=Ph(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 tc(e){this.hot.getSettings()[Jh]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_BORDERS"])},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[Yh(this),Uh(this),Vh(this),Bh(this),Wh(this)]}})}function nc(){this.changeBorderSettings()}function rc(e,t){ic(e,t),t.add(e)}function ic(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sc(e,t,n){return(t=oc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oc(e){var t=ac(e,"string");return"symbol"==typeof t?t:t+""}function ac(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 lc(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 uc="dragToScroll",hc=100;var cc=new WeakSet;class dc extends Zt["a"]{constructor(){super(...arguments),rc(this,cc),sc(this,"boundaries",null),sc(this,"callback",null),sc(this,"listening",!1)}static get PLUGIN_KEY(){return uc}static get PLUGIN_PRIORITY(){return hc}isEnabled(){return!!this.hot.getSettings()[uc]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",e=>lc(cc,this,mc).call(this,e)),this.addHook("afterOnCellCornerMouseDown",e=>lc(cc,this,mc).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 mc(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 fc(e,t){gc(e,t),t.add(e)}function pc(e,t,n){gc(e,t),t.set(e,n)}function gc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yc(e,t,n){return(t=wc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wc(e){var t=bc(e,"string");return"symbol"==typeof t?t:t+""}function bc(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(Sc(e,t))}function vc(e,t,n){return e.set(Sc(e,t),n),n}function Sc(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 Ec="dropdownMenu",Cc=230,Mc="changeType",Tc=Ec;var Rc=new WeakMap,Oc=new WeakSet;class Nc extends Zt["a"]{static get PLUGIN_KEY(){return Ec}static get PLUGIN_PRIORITY(){return Cc}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Da,Pa,Ao,Wa,Ao,ka,Ao,Fa,Ao,Aa]}constructor(e){super(e),fc(this,Oc),yc(this,"commandExecutor",new Na(this.hot)),yc(this,"itemsFactory",null),yc(this,"menu",null),pc(this,Rc,!1),this.hot.addHook("afterGetColHeader",(e,t)=>Sc(Oc,this,Ic).call(this,e,t))}isEnabled(){return this.hot.getSettings()[Ec]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new ll(this.hot,Nc.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 Sc(Oc,e,jc).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 Sc(Oc,e,Pc).call(e,...n)}));const t=this.hot.getSettings()[Ec],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 su(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",()=>Sc(Oc,this,kc).call(this)),this.menu.addLocalHook("afterOpen",()=>Sc(Oc,this,xc).call(this)),this.menu.addLocalHook("afterSubmenuOpen",e=>Sc(Oc,this,Dc).call(this,e)),this.menu.addLocalHook("afterClose",()=>Sc(Oc,this,Hc).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(c["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=Vo(this.menu.container,this.hot.rootDocument),r=this.hot.getCell(-1,t.col,!0).querySelector("."+Mc),i=r.getBoundingClientRect();this.open({left:i.left+n.left,top:i.top+r.offsetHeight+n.top},{left:i.width,right:0,above:0,below:3}),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:Tc},{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:Tc}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Tc)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",e=>Sc(Oc,this,Ac).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 Lc(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function Ac(e){if(Object(i["hasClass"])(e.target,Mc)){const t=Vo(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),vc(Rc,this,!1),this.open({left:n.left+t.left,top:n.top+e.target.offsetHeight+t.top},{left:n.width,right:0,above:0,below:3})}}function Ic(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("."+Mc);if(this.enabled&&o)return;if(!this.enabled)return void(o&&o.parentNode.removeChild(o));const a=this.hot.rootDocument.createElement("button");a.className=Mc,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 kc(){this.hot.runHooks("beforeDropdownMenuShow",this)}function xc(){this.hot.runHooks("afterDropdownMenuShow",this),Sc(Oc,this,Lc).call(this,this.menu)}function Dc(e){Sc(Oc,this,Lc).call(this,e)}function Hc(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Pc(e){return _c(Rc,this)?null:e}function jc(e){Object(i["hasClass"])(e.target,Mc)&&vc(Rc,this,!0)}function Fc(e,t,n){return(t=Yc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yc(e){var t=Uc(e,"string");return"symbol"==typeof t?t:t+""}function Uc(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)}Nc.SEPARATOR={name:Ao};class Vc{constructor(e){Fc(this,"hot",void 0),Fc(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(nt["rangeEach"])(e,n,e=>{const n=[];!i.exportHiddenRows&&this._isHiddenRow(e)||(Object(nt["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(nt["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(nt["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 Bc=Vc;function Wc(e,t,n){return(t=Gc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gc(e){var t=zc(e,"string");return"symbol"==typeof t?t:t+""}function zc(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 Kc{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){Wc(this,"dataProvider",void 0),Wc(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"])(Kc.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 Xc=Kc;const $c=String.fromCharCode(13),qc=String.fromCharCode(34),Jc=String.fromCharCode(10);class Qc extends Xc{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(c["arrayMap"])(n,e=>this._escapeCell(e,!0)),s&&(o+=e.columnDelimiter),o+=n.join(e.columnDelimiter),o+=e.rowDelimiter),Object(c["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($c)>=0||n.indexOf(qc)>=0||n.indexOf(Jc)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replace(new RegExp('"',"g"),'""'),n=`"${n}"`),n}}var Zc=Qc;const ed="csv",td={[ed]:Zc};function nd(e,t,n){return"function"===typeof td[e]?new td[e](t,n):null}const rd="exportFile",id=240;class sd extends Zt["a"]{static get PLUGIN_KEY(){return rd}static get PLUGIN_PRIORITY(){return id}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(!td[e])throw new Error(`Export format type "${e}" is not supported.`);return nd(e,new Bc(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("4069");function od(e,t,n){return(t=ad(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ad(e){var t=ld(e,"string");return"symbol"==typeof t?t:t+""}function ld(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 ud{constructor(e,t){let{id:n,stateless:r=!0}=t;od(this,"hot",void 0),od(this,"id",void 0),od(this,"elements",[]),od(this,"hidden",!1),od(this,"stateId",""),od(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 yi["a"])}getElements(){return this.elements}reset(){Object(c["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(c["arrayEach"])(this.elements,e=>e.destroy()),this.state=null,this.elements=null,this.hot=null}}Object(o["mixin"])(ud,qs["a"]);const hd={};function cd(e,t){if(!hd[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:r}=hd[e];let i=t;return r.inputValuesDecorator&&(i=r.inputValuesDecorator(i)),function(e){return n.apply(e.meta.instance,[].concat([e],[i]))}}function dd(e){if(!hd[e])throw Error(`Filter condition "${e}" does not exist.`);return hd[e].descriptor}function md(e,t,n){n.key=e,hd[e]={condition:t,descriptor:n}}const fd="none";function pd(){return!0}md(fd,pd,{name:Pe["FILTERS_CONDITIONS_NONE"],inputsCount:0,showOperators:!1});const gd="empty";function yd(e){return Object(d["isEmpty"])(e.value)}md(gd,yd,{name:Pe["FILTERS_CONDITIONS_EMPTY"],inputsCount:0,showOperators:!0});const wd="not_empty";function bd(e,t){return!cd(gd,t)(e)}md(wd,bd,{name:Pe["FILTERS_CONDITIONS_NOT_EMPTY"],inputsCount:0,showOperators:!0});const _d="eq";function vd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale)===Object(d["stringify"])(n)}md(_d,vd,{name:Pe["FILTERS_CONDITIONS_EQUAL"],inputsCount:1,showOperators:!0});const Sd="neq";function Ed(e,t){return!cd(_d,t)(e)}md(Sd,Ed,{name:Pe["FILTERS_CONDITIONS_NOT_EQUAL"],inputsCount:1,showOperators:!0});const Cd="gt";function Md(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>r}md(Cd,Md,{name:Pe["FILTERS_CONDITIONS_GREATER_THAN"],inputsCount:1,showOperators:!0});const Td="gte";function Rd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>=r}md(Td,Rd,{name:Pe["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Od="lt";function Nd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<r}md(Od,Nd,{name:Pe["FILTERS_CONDITIONS_LESS_THAN"],inputsCount:1,showOperators:!0});const Ld="lte";function Ad(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<=r}md(Ld,Ad,{name:Pe["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Id="date_after";function kd(e,t){let[n]=t;const r=A(e.value,e.meta.dateFormat),i=A(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)>=0}md(Id,kd,{name:Pe["FILTERS_CONDITIONS_AFTER"],inputsCount:1,showOperators:!0});const xd="date_before";function Dd(e,t){let[n]=t;const r=A(e.value,e.meta.dateFormat),i=A(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)<=0}md(xd,Dd,{name:Pe["FILTERS_CONDITIONS_BEFORE"],inputsCount:1,showOperators:!0});const Hd="between";function Pd(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=cd(xd,[s]),n=cd(Id,[i]);return t(e)&&n(e)}return e.value>=i&&e.value<=s}md(Hd,Pd,{name:Pe["FILTERS_CONDITIONS_BETWEEN"],inputsCount:2,showOperators:!0});const jd="not_between";function Fd(e,t){return!cd(Hd,t)(e)}md(jd,Fd,{name:Pe["FILTERS_CONDITIONS_NOT_BETWEEN"],inputsCount:2,showOperators:!0});const Yd="begins_with";function Ud(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).startsWith(Object(d["stringify"])(n))}md(Yd,Ud,{name:Pe["FILTERS_CONDITIONS_BEGINS_WITH"],inputsCount:1,showOperators:!0});const Vd="ends_with";function Bd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).endsWith(Object(d["stringify"])(n))}md(Vd,Bd,{name:Pe["FILTERS_CONDITIONS_ENDS_WITH"],inputsCount:1,showOperators:!0});const Wd="contains";function Gd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).indexOf(Object(d["stringify"])(n))>=0}md(Wd,Gd,{name:Pe["FILTERS_CONDITIONS_CONTAINS"],inputsCount:1,showOperators:!0});const zd="not_contains";function Kd(e,t){return!cd(Wd,t)(e)}md(zd,Kd,{name:Pe["FILTERS_CONDITIONS_NOT_CONTAIN"],inputsCount:1,showOperators:!0});const Xd="date_tomorrow";function $d(e){const t=A(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(A().subtract(-1,"days").startOf("day"),"d")}md(Xd,$d,{name:Pe["FILTERS_CONDITIONS_TOMORROW"],inputsCount:0});const qd="date_today";function Jd(e){const t=A(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(A().startOf("day"),"d")}md(qd,Jd,{name:Pe["FILTERS_CONDITIONS_TODAY"],inputsCount:0});const Qd="date_yesterday";function Zd(e){const t=A(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(A().subtract(1,"days").startOf("day"),"d")}md(Qd,Zd,{name:Pe["FILTERS_CONDITIONS_YESTERDAY"],inputsCount:0});const em="numeric",tm="text",nm="date",rm={[em]:[fd,Ao,gd,wd,Ao,_d,Sd,Ao,Cd,Td,Od,Ld,Hd,jd],[tm]:[fd,Ao,gd,wd,Ao,_d,Sd,Ao,Yd,Vd,Ao,Wd,zd],[nm]:[fd,Ao,gd,wd,Ao,_d,Sd,Ao,xd,Id,Hd,Ao,Xd,qd,Qd]};function im(e){const t=[];let n=e;return rm[n]||(n=tm),Object(c["arrayEach"])(rm[n],e=>{let n;n=e===Ao?{name:Ao}:Object(o["clone"])(dd(e)),t.push(n)}),t}function sm(e,t,n){return(t=om(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)}const lm="built",um="building",hm=["click","input","keydown","keypress","keyup","focus","blur","change"];class cm{static get DEFAULTS(){return Object(o["clone"])({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){sm(this,"hot",void 0),sm(this,"eventManager",new Ie["a"](this)),sm(this,"options",void 0),sm(this,"_element",void 0),sm(this,"buildState",void 0),this.hot=e,this.options=Object(o["extend"])(cm.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===um?this._element:this.buildState===lm?(this.update(),this._element):(this.buildState=um,this.build(),this.buildState=lm,this._element)}isBuilt(){return this.buildState===lm}translateIfPossible(e){return"string"===typeof e&&e.startsWith(Pe["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=um),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(c["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(c["arrayEach"])(hm,n=>e(t,n))}else Object(c["arrayEach"])(hm,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 dm(e,t){fm(e,t),t.add(e)}function mm(e,t,n){fm(e,t),t.set(e,n)}function fm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pm(e,t){return e.get(ym(e,t))}function gm(e,t,n){return e.set(ym(e,t),n),n}function ym(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"])(cm,qs["a"]);var wm=new WeakMap,bm=new WeakSet;class _m extends cm{static get DEFAULTS(){return Object(o["clone"])({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(_m.DEFAULTS,t)),dm(this,bm),mm(this,wm,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",e=>ym(bm,this,vm).call(this,e))}build(){super.build();const e=this.hot.rootDocument.createElement("div");gm(wm,this,this._element.firstChild),Object(i["addClass"])(this._element,"htUIInput"),Object(i["addClass"])(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(pm(wm,this).type=this.options.type,pm(wm,this).placeholder=this.translateIfPossible(this.options.placeholder),pm(wm,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&pm(wm,this).focus()}}function vm(e){this.options.value=e.target.value}function Sm(e,t){Cm(e,t),t.add(e)}function Em(e,t,n){Cm(e,t),t.set(e,n)}function Cm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mm(e,t,n){return e.set(Rm(e,t),n),n}function Tm(e,t){return e.get(Rm(e,t))}function Rm(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 Om=new WeakMap,Nm=new WeakMap,Lm=new WeakMap,Am=new WeakMap,Im=new WeakMap,km=new WeakSet;class xm extends cm{static get DEFAULTS(){return Object(o["clone"])({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(xm.DEFAULTS,t)),Sm(this,km),Em(this,Om,null),Em(this,Nm,[]),Em(this,Lm,void 0),Em(this,Am,void 0),Em(this,Im,void 0),this.registerHooks()}getMenu(){return Tm(Om,this)}registerHooks(){this.addLocalHook("click",()=>Rm(km,this,Pm).call(this))}setItems(e){Mm(Nm,this,this.translateNames(e)),Tm(Om,this)&&Tm(Om,this).setMenuItems(Tm(Nm,this))}translateNames(e){return Object(c["arrayEach"])(e,e=>{e.name=this.translateIfPossible(e.name)}),e}build(){super.build(),Mm(Om,this,new su(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),Tm(Om,this).setMenuItems(Tm(Nm,this));const e=new cm(this.hot,{className:"htUISelectCaption"}),t=new cm(this.hot,{className:"htUISelectDropdown"});Mm(Lm,this,e),Mm(Am,this,e.element),Mm(Im,this,t),this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(t.element,[Object(y["n"])()]),Object(i["setAttribute"])(this._element,[Object(y["q"])()])),Object(c["arrayEach"])([e,t],e=>this._element.appendChild(e.element)),Tm(Om,this).addLocalHook("select",e=>Rm(km,this,Dm).call(this,e)),Tm(Om,this).addLocalHook("afterClose",()=>Rm(km,this,Hm).call(this)),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:Tm(Om,this).hot.getTranslatedPhrase(Pe["FILTERS_CONDITIONS_NONE"]),Tm(Am,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();Tm(Om,this)&&(Tm(Om,this).open(),Tm(Om,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),Tm(Om,this).getNavigator().toFirstItem(),Tm(Om,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){Tm(Om,this)&&Tm(Om,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){Tm(Om,this)&&(Tm(Om,this).destroy(),Mm(Om,this,null)),Tm(Lm,this)&&Tm(Lm,this).destroy(),Tm(Im,this)&&Tm(Im,this).destroy(),super.destroy()}}function Dm(e){e.name!==Ao&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function Hm(){this.runLocalHooks("afterClose")}function Pm(){this.openOptions()}function jm(e,t){Fm(e,t),t.add(e)}function Fm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ym(e,t,n){return(t=Um(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)}function Bm(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 Wm=new WeakSet;class Gm extends ud{constructor(e,t){super(e,{id:t.id,stateless:!1}),jm(this,Wm),Ym(this,"name",""),Ym(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new xm(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new _m(this.hot,{placeholder:Pe["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]})),this.elements.push(new _m(this.hot,{placeholder:Pe["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",e=>Bm(Wm,this,zm).call(this,e)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",e=>this.runLocalHooks("selectTabKeydown",e)),Object(c["arrayEach"])(this.getInputElements(),e=>{e.addLocalHook("keydown",e=>Bm(Wm,this,Km).call(this,e))})}setState(e){if(this.reset(),!e)return;const t=Object(o["clone"])(e.command);t.name.startsWith(Pe["FILTERS_CONDITIONS_NAMESPACE"])&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),Object(c["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()||dd(fd),t=[];return Object(c["arrayEach"])(this.getInputElements(),(n,r)=>{e.inputsCount>r&&t.push(n.getValue())}),{command:e,args:t}}updateState(e,t){const n=dd(e?e.name:fd);this.state.setValueAtIndex(t,{command:n,args:e?e.args:[]}),e||Object(c["arrayEach"])(this.getInputElements(),e=>e.setValue(null))}getSelectElement(){return this.elements.filter(e=>e instanceof xm)[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 _m)}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),t.parentElement.hasAttribute("ghost-table")||Object(c["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[dd(fd)];if(null!==e){const{visualIndex:n}=e;t=im(this.hot.getDataType(0,n,this.hot.countRows(),n))}Object(c["arrayEach"])(this.getInputElements(),e=>e.hide()),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function zm(e){Object(c["arrayEach"])(this.getInputElements(),(t,n)=>{t[e.inputsCount>n?"show":"hide"](),0===n&&this.hot._registerTimeout(()=>t.focus(),10)}),this.runLocalHooks("change",e)}function Km(e){Object(f["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}const Xm={};function $m(e){if(!Xm[e])throw Error(`Operation with id "${e}" does not exist.`);const t=Xm[e].func;return function(e,n){return t(e,n)}}function qm(e){return Xm[e].name}function Jm(e,t,n){Xm[e]={name:t,func:n}}const Qm="conjunction",Zm=Pe["FILTERS_LABELS_CONJUNCTION"];function ef(e,t){return e.every(e=>e.func(t))}Jm(Qm,Zm,ef);const tf="disjunction",nf=Pe["FILTERS_LABELS_DISJUNCTION"];function rf(e,t){return e.some(e=>e.func(t))}Jm(tf,nf,rf);const sf="disjunctionWithExtraCondition",of=Pe["FILTERS_LABELS_DISJUNCTION"];function af(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 lf(e,t,n){uf(e,t),t.set(e,n)}function uf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hf(e,t){return e.get(df(e,t))}function cf(e,t,n){return e.set(df(e,t),n),n}function df(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")}Jm(sf,of,af);var mf=new WeakMap,ff=new WeakMap;class pf extends cm{static get DEFAULTS(){return Object(o["clone"])({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,Object(o["extend"])(pf.DEFAULTS,t)),lf(this,mf,void 0),lf(this,ff,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),cf(ff,this,e),cf(mf,this,this._element.firstChild),hf(mf,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(hf(ff,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&hf(mf,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(hf(mf,this).checked=e)}focus(){this.isBuilt()&&hf(mf,this).focus()}}function gf(e,t){yf(e,t),t.add(e)}function yf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wf(e,t,n){return(t=bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(e){var t=_f(e,"string");return"symbol"==typeof t?t:t+""}function _f(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 vf(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 Sf=0;var Ef=new WeakSet;class Cf extends ud{constructor(e,t){super(e,{id:t.id,stateless:!1}),gf(this,Ef),wf(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(c["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}buildOperatorsElement(){const e=[Qm,tf];Object(c["arrayEach"])(e,t=>{const n=new pf(this.hot,{name:"operator",label:{htmlFor:t,textContent:qm(t)},value:t,checked:t===e[Sf],id:t});n.addLocalHook("change",e=>vf(Ef,this,Mf).call(this,e)),this.elements.push(n)})}setChecked(e){if(this.elements.length<e)throw Error(xs["a"]`Radio button with index ${e} doesn't exist.`);Object(c["arrayEach"])(this.elements,(t,n)=>{t.setChecked(n===e)})}getActiveOperationId(){const e=this.elements.find(e=>e instanceof pf&&e.isChecked());return e?e.getValue():Qm}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&Object(c["arrayEach"])(this.elements,t=>{t.setChecked(t.getValue()===e)})}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qm,t=arguments.length>1?arguments[1]:void 0,n=e;n===sf&&(n=tf),this.state.setValueAtIndex(t,n)}reset(){this.setChecked(Sf)}}function Mf(e){this.setState(e.target.value)}Object(en["getComparisonFunction"])();function Tf(e,t){let n=e;return""===n&&(n=`(${t})`),n}const Rf=new Set([1]).has(1),Of=Rf&&"function"===typeof Array.from;function Nf(e){let t=e;return Rf&&(t=new Set(t)),function(e){let n;return n=Rf?t.has(e):!!~t.indexOf(e),n}}function Lf(e){return null===e||void 0===e?"":e}function Af(e){let t=e;return t=Of?Array.from(new Set(t)):Object(c["arrayUnique"])(t),t=t.sort((e,t)=>"number"===typeof e&&"number"===typeof t?e-t:e===t?0:e>t?1:-1),t}function If(e,t,n,r){const i=[],s=e===t;let o;return s||(o=Nf(t)),Object(c["arrayEach"])(e,e=>{let t=!1;(s||o(e))&&(t=!0);const a={checked:t,value:e,visualValue:Tf(e,n)};r&&r(a),i.push(a)}),i}var kf=n("480c");function xf(e,t,n){Df(e,t),t.set(e,n)}function Df(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hf(e,t){return e.get(jf(e,t))}function Pf(e,t,n){return e.set(jf(e,t),n),n}function jf(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 Ff=new WeakMap;class Yf extends cm{static get DEFAULTS(){return Object(o["clone"])({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,Object(o["extend"])(Yf.DEFAULTS,t)),xf(this,Ff,void 0)}build(){super.build(),Pf(Ff,this,this._element.firstChild)}update(){this.isBuilt()&&(Hf(Ff,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&Hf(Ff,this).focus()}activate(){Hf(Ff,this).click()}}function Uf(e,t){Bf(e,t),t.add(e)}function Vf(e,t,n){Bf(e,t),t.set(e,n)}function Bf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wf(e,t){return e.get(zf(e,t))}function Gf(e,t,n){return e.set(zf(e,t),n),n}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")}const Kf="multipleSelect.itemBox";var Xf=new WeakMap,$f=new WeakMap,qf=new WeakMap,Jf=new WeakMap,Qf=new WeakMap,Zf=new WeakMap,ep=new WeakSet;class tp extends cm{static get DEFAULTS(){return Object(o["clone"])({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,Object(o["extend"])(tp.DEFAULTS,t)),Uf(this,ep),Vf(this,Xf,[]),Vf(this,$f,void 0),Vf(this,qf,void 0),Vf(this,Jf,void 0),Vf(this,Qf,void 0),Vf(this,Zf,void 0),Gf(Jf,this,new _m(this.hot,{placeholder:Pe["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"],className:"htUIMultipleSelectSearch"})),Gf(Qf,this,new Yf(this.hot,{textContent:Pe["FILTERS_BUTTONS_SELECT_ALL"],className:"htUISelectAll"})),Gf(Zf,this,new Yf(this.hot,{textContent:Pe["FILTERS_BUTTONS_CLEAR"],className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Wf($f,this)}registerHooks(){Wf(Jf,this).addLocalHook("keydown",e=>zf(ep,this,rp).call(this,e)),Wf(Jf,this).addLocalHook("input",e=>zf(ep,this,np).call(this,e)),Wf(Qf,this).addLocalHook("click",e=>zf(ep,this,ip).call(this,e)),Wf(Zf,this).addLocalHook("click",e=>zf(ep,this,sp).call(this,e))}setItems(e){var t;Gf(Xf,this,e),null===(t=Wf($f,this))||void 0===t||t.loadData(Wf(Xf,this))}setLocale(e){Gf(qf,this,e)}getLocale(){return Wf(qf,this)}getItems(){return[...Wf(Xf,this)]}getValue(){return ap(Wf(Xf,this))}getSearchInputElement(){return Wf(Jf,this)}getSelectAllElement(){return Wf(Qf,this)}getClearAllElement(){return Wf(Zf,this)}isSelectedAllValues(){return Wf(Xf,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),n=new cm(this.hot,{className:"htUISelectionControls",children:[Wf(Qf,this),Wf(Zf,this)]});this._element.appendChild(Wf(Jf,this).element),this._element.appendChild(n.element),this._element.appendChild(t);const r=t=>{var n;if(!this._element)return;null===(n=Wf($f,this))||void 0===n||n.destroy(),Object(i["addClass"])(t,"htUIMultipleSelectHot"),Gf($f,this,new this.hot.constructor(t,{data:Wf(Xf,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:()=>{Wf($f,this).listen()},colWidths:()=>Wf($f,this).container.scrollWidth-Object(i["getScrollbarWidth"])(e),maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Wf($f,this).init();const r=Wf($f,this).getShortcutManager(),s=r.getContext("grid");s.removeShortcutsByKeys(["Tab"]),s.removeShortcutsByKeys(["Shift","Tab"]),s.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:Kf}),s.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{Wf($f,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:Kf})};r(t),this.hot._registerTimeout(()=>r(t),100)}focus(){this.isBuilt()&&Wf($f,this).listen()}reset(){Wf(Jf,this).reset(),Wf(Qf,this).reset(),Wf(Zf,this).reset()}update(){this.isBuilt()&&(Wf($f,this).loadData(op(Wf(Xf,this),this.options.value)),super.update())}destroy(){var e;null===(e=Wf($f,this))||void 0===e||e.destroy(),Wf(Jf,this).destroy(),Wf(Zf,this).destroy(),Wf(Qf,this).destroy(),Gf(Jf,this,null),Gf(Zf,this,null),Gf(Qf,this,null),Gf($f,this,null),Gf(Xf,this,null),super.destroy()}}function np(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let n;n=""===t?[...Wf(Xf,this)]:Wf(Xf,this).filter(e=>(""+e.value).toLocaleLowerCase(this.getLocale()).indexOf(t)>=0),Wf($f,this).loadData(n)}function rp(e){this.runLocalHooks("keydown",e,this);const t=Object(pi["partial"])(f["isKey"],e.keyCode);t("ARROW_DOWN")&&(e.preventDefault(),Object(s["stopImmediatePropagation"])(e),Wf($f,this).listen(),Wf($f,this).selectCell(0,0))}function ip(e){const t=[];e.preventDefault(),Wf($f,this).getSourceData().forEach((e,n)=>{e.checked=!0,t.push(Object(kf["dataRowToChangesArray"])(e,n)[0])}),Wf($f,this).setSourceDataAtCell(t)}function sp(e){const t=[];e.preventDefault(),Wf($f,this).getSourceData().forEach((e,n)=>{e.checked=!1,t.push(Object(kf["dataRowToChangesArray"])(e,n)[0])}),Wf($f,this).setSourceDataAtCell(t)}function op(e,t){const n=Nf(t);return e.map(e=>(e.checked=n(e.value),e))}function ap(e){const t=[];return e.forEach(e=>{e.checked&&t.push(e.value)}),t}const lp="by_value";function up(e,t){let[n]=t;return n(e.value)}function hp(e,t){cp(e,t),t.add(e)}function cp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dp(e,t,n){return(t=mp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mp(e){var t=fp(e,"string");return"symbol"==typeof t?t:t+""}function fp(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 pp(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")}md(lp,up,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[Nf(t)]},showOperators:!1});var gp,yp=new WeakSet;class wp extends ud{constructor(e,t){super(e,{id:t.id,stateless:!1}),hp(this,yp),dp(this,"name",""),this.name=t.name,this.elements.push(new tp(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",e=>pp(yp,this,bp).call(this,e)).addLocalHook("listTabKeydown",e=>this.runLocalHooks("listTabKeydown",e)),this.hot.addHook("modifyFiltersMultiSelectValue",(e,t)=>pp(yp,this,vp).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===lp){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?fd:lp},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,r,i,s)=>{const[o]=Object(c["arrayFilter"])(n,e=>e.name===lp),a={},l=this.hot.getTranslatedPhrase(Pe["FILTERS_VALUES_BLANK_CELLS"]);if(o){const n=i(t,s),u=Object(c["arrayMap"])(n,e=>e.value),h=new Map(n.map(e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)])),d=Af(u);r&&(o.args[0]=r);const m=[],f=If(d,o.args[0],l,e=>{e.checked&&m.push(e.value),pp(yp,this,_p).call(this,e,h)}),p=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,p).locale,a.args=[m],a.command=dd(lp),a.itemsSnapshot=f}else a.args=[],a.command=dd(fd);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 tp)[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),t.parentElement.hasAttribute("ghost-table")||Object(c["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getTranslatedPhrase(Pe["FILTERS_VALUES_BLANK_CELLS"]),t=this._getColumnVisibleValues(),n=t.map(e=>e.value),r=new Map(t.map(e=>[e.value,e.meta])),i=Af(n),s=If(i,i,e,e=>{pp(yp,this,_p).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(c["arrayMap"])(this.hot.getDataAtCol(e.visualIndex),(t,n)=>({value:Lf(t),meta:this.hot.getCellMeta(n,e.visualIndex)}))}}function bp(e){Object(f["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}function _p(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function vp(e,t){switch(t.type){case"numeric":return it(e,t);default:return e}}function Sp(e,t){Ep(e,t),t.add(e)}function Ep(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=Mp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mp(e){var t=Tp(e,"string");return"symbol"==typeof t?t:t+""}function Tp(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 Rp(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 Op=new WeakSet;class Np extends ud{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),Sp(this,Op),Cp(this,"name",""),this.name=t.name,this.elements.push(new _m(this.hot,{type:"button",value:Pe["FILTERS_BUTTONS_OK"],className:"htUIButton htUIButtonOK",identifier:Np.BUTTON_OK})),this.elements.push(new _m(this.hot,{type:"button",value:Pe["FILTERS_BUTTONS_CANCEL"],className:"htUIButton htUIButtonCancel",identifier:Np.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){Object(c["arrayEach"])(this.elements,e=>{e.addLocalHook("click",(e,t)=>Rp(Op,this,Lp).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(c["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function Lp(e,t){t.options.identifier===gp.BUTTON_OK?this.accept():this.cancel()}function Ap(e,t,n){return(t=Ip(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ip(e){var t=kp(e,"string");return"symbol"==typeof t?t:t+""}function kp(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)}gp=Np;const xp="ConditionCollection.filteringStates";class Dp{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Ap(this,"hot",void 0),Ap(this,"isMapRegistrable",void 0),Ap(this,"filteringStates",new yi["a"]),Ap(this,"previousConditionStack",null),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(xp,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]:Qm;return!e.length||$m(n)(e,t)}addCondition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Qm,r=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,s=Object(c["arrayMap"])(t.args,e=>"string"===typeof e?e.toLocaleLowerCase(i):e),o=t.name||t.command.key;null===this.previousConditionStack&&this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(xs["a"]`The column of index ${e} has been already applied with a \`${a}\`\x20
  197. filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
  198. Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
  199. use it consequently for a particular column).`)}else if(Object(d["isUndefined"])(Xm[n]))throw new Error(xs["a"]`Unexpected operation named \`${n}\`. Possible ones are\x20
  200. \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:o,args:s,func:cd(o,s)}]},r):l.push({name:o,args:s,func:cd(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(c["arrayReduce"])(this.filteringStates.getEntries(),(e,t)=>{let[n,{operation:r,conditions:i}]=t;return e.push({column:n,operation:r,conditions:Object(c["arrayMap"])(i,e=>{let{name:t,args:n}=e;return{name:t,args:n}})}),e},[])}importAllConditions(e){this.clean(),Object(c["arrayEach"])(e,e=>{Object(c["arrayEach"])(e.conditions,t=>this.addCondition(e.column,t))})}removeConditions(e){this.setPreviousConditionStack(this.exportAllConditions()),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}setPreviousConditionStack(e){this.previousConditionStack=e}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(xp),this.filteringStates=null,this.clearLocalHooks()}}Object(o["mixin"])(Dp,qs["a"]);var Hp=Dp;function Pp(e,t,n){return(t=jp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jp(e){var t=Fp(e,"string");return"symbol"==typeof t?t:t+""}function Fp(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 Yp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];Pp(this,"conditionCollection",void 0),Pp(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return Object(c["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(c["arrayEach"])(t,t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&n.push(t)}),n}_getIntersectData(e,t){const n=[];return Object(c["arrayEach"])(t,t=>{const r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])}),n}}var Up=Yp;function Vp(e,t){Bp(e,t),t.add(e)}function Bp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wp(e,t,n){return(t=Gp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gp(e){var t=zp(e,"string");return"symbol"==typeof t?t:t+""}function zp(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 Kp(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 Xp=new WeakSet;class $p{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];Vp(this,Xp),Wp(this,"hot",void 0),Wp(this,"conditionCollection",void 0),Wp(this,"columnDataFactory",void 0),Wp(this,"changes",[]),Wp(this,"grouping",!1),Wp(this,"latestEditedColumnPosition",-1),Wp(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",e=>Kp(Xp,this,qp).call(this,e)),this.conditionCollection.addLocalHook("afterRemove",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("afterAdd",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("beforeClean",()=>Kp(Xp,this,Jp).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>Kp(Xp,this,Qp).call(this))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,Object(c["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(pi["curry"])((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new Hp(n.hot,!1),s=[].concat(e,r);i.importAllConditions(s);const o=n.columnDataFactory(t);let a;a=i.isEmpty()?o:new Up(i,e=>n.columnDataFactory(e)).filter(),a=Object(c["arrayMap"])(a,e=>e.meta.visualRow);const l=Nf(a);return i.destroy(),Object(c["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 qp(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function Jp(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function Qp(){Object(c["arrayEach"])(this.latestOrderStack,e=>{this.updateStatesAtColumn(e)})}Object(o["mixin"])($p,qs["a"]);var Zp=$p;function eg(e){const t=Ml({initialPage:0,size:()=>e.length,onItemSelect:(t,n)=>{const r=e[t];return r instanceof tp?n:!(r.element&&!Object(i["isVisible"])(r.element))&&void r.focus()}});return t}const tg="filters";function ng(e,t){let n=-1;const r=eg(t),i=n=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(tg),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(tg),callback:()=>{i.isSubMenu()&&i.close(),s.listen(tg)}}]),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 xm&&(n.openOptions(),e.preventDefault()),n instanceof Yf&&(n.activate(),e.preventDefault()),n instanceof cm||e.preventDefault()}}],tg)}function o(){e.focus(),e.getKeyboardShortcutsCtrl().listen(tg)}function a(){return n}return t.forEach(e=>{e instanceof cm&&(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 rg=n("00fd");function ig(e,t){og(e,t),t.add(e)}function sg(e,t,n){og(e,t),t.set(e,n)}function og(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ag(e,t,n){return(t=lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lg(e){var t=ug(e,"string");return"symbol"==typeof t?t:t+""}function ug(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 hg(e,t,n){return e.set(dg(e,t),n),n}function cg(e,t){return e.get(dg(e,t))}function dg(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 mg="filters",fg=250,pg=mg;var gg=new WeakMap,yg=new WeakSet;class wg extends Zt["a"]{static get PLUGIN_KEY(){return mg}static get PLUGIN_PRIORITY(){return fg}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){super(e),ig(this,yg),ag(this,"dropdownMenuPlugin",null),ag(this,"conditionCollection",null),ag(this,"conditionUpdateObserver",null),ag(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),ag(this,"filtersRowsMap",null),sg(this,gg,void 0),this.hot.addHook("afterGetColHeader",(e,t)=>dg(yg,this,Tg).call(this,e,t))}isEnabled(){return!!this.hot.getSettings()[mg]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new rg["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",()=>dg(yg,this,Eg).call(this,"accept")),e.addLocalHook("cancel",()=>dg(yg,this,Eg).call(this,"cancel")),e.addLocalHook("change",t=>dg(yg,this,Cg).call(this,e,t)),e),r=()=>this.hot.getTranslatedPhrase(Pe["FILTERS_DIVS_FILTER_BY_CONDITION"])+":",i=()=>this.hot.getTranslatedPhrase(Pe["FILTERS_DIVS_FILTER_BY_VALUE"])+":";if(!this.components.get("filter_by_condition")){const e=new Gm(this.hot,{id:"filter_by_condition",name:r,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",()=>dg(yg,this,Mg).call(this)),this.components.set("filter_by_condition",n(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new Cf(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new Gm(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",()=>dg(yg,this,Mg).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 wp(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new Np(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new Hp(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new Zp(this.hot,this.conditionCollection,e=>this.getDataMapAtColumn(e)),this.conditionUpdateObserver.addLocalHook("update",e=>dg(yg,this,Rg).call(this,e))),this.components.forEach(e=>e.show()),this.addHook("afterDropdownMenuDefaultOptions",e=>dg(yg,this,Sg).call(this,e)),this.addHook("afterDropdownMenuShow",()=>dg(yg,this,_g).call(this)),this.addHook("afterDropdownMenuHide",()=>dg(yg,this,vg).call(this)),this.addHook("afterChange",e=>dg(yg,this,bg).call(this,e)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!cg(gg,this)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),n=cg(gg,this).getLastMenuPage();e.focus(),n>0?t.setCurrentPage(n):t.toFirstItem()}},...Array.from(this.components).map(e=>{let[,t]=e;return t.getElements()}).flat()];hg(gg,this,ng(e,t));const n=e=>{cg(gg,this).listen(),e.preventDefault(),Object(f["isKey"])(e.keyCode,"TAB")&&(e.shiftKey?cg(gg,this).toPreviousItem():cg(gg,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:pg})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(pg)}addCondition(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Qm;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,this.conditionCollection.previousConditionStack);if(!1!==s)if(n){const n=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),r=Object(c["arrayMap"])(t.filter(),e=>e.meta.visualRow);const e=Nf(r);Object(nt["rangeEach"])(this.hot.countSourceRows()-1,t=>{e(t)||n.push(t)}),Object(c["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.conditionCollection.setPreviousConditionStack(null),this.hot.view.adjustElementsSize(),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(c["arrayEach"])(this.hot.getSourceDataAtCol(t),(e,r)=>{var i;const{row:s,col:o,visualCol:a,visualRow:l,type:u,instance:h,dateFormat:c,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:u,instance:h,dateFormat:c,locale:d},value:Lf(m)})}),n}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),n=Af(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===tf&&t.command.key!==fd&&n.command.key!==fd&&r.command.key!==fd?i=sf:r.command.key!==fd&&(t.command.key!==fd&&n.command.key!==fd||(i=Qm)),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 Up(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(c["arrayEach"])(r,n=>{Object(c["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 bg(e){e&&Object(c["arrayEach"])(e,e=>{const[,t]=e,n=this.hot.propToCol(t);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)})}function _g(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function vg(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function Sg(e){e.items.push({name:Ao}),this.components.forEach(t=>{e.items.push(t.getMenuItemDescriptor())})}function Eg(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!==fd&&(this.conditionCollection.addCondition(t,r,o,a),i.command.key!==fd&&this.conditionCollection.addCondition(t,i,o,a)),s.command.key!==fd&&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 Cg(e,t){this.updateDependentComponentsVisibility(),e.constructor!==Gm||t.inputsCount||this.setListeningDropdownMenu()}function Mg(){this.setListeningDropdownMenu()}function Tg(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 Rg(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===lp),s=n.filter(e=>e.name!==lp);if(i.length>=2||s.length>=3)Object(zr["b"])(xs["a"]`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
  201. The overall amount of conditions exceed the capability of the dropdown menu.\x20
  202. 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("e9c4");const Og="internal-use-in-handsontable",Ng={licenseKey:Og,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 Lg(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[Uy])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function Ag(e){return Object.keys(e).reduce((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t),{})}function Ig(e){var t;const n=e[Uy],r=Ag(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=Lg(e);return{...Ng,...r,...i}}function kg(e){var t;const n=e[Uy],r=Ag(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=Lg(e);return{...r,...i}}function xg(e,t){return Object.keys(t).some(n=>void 0!==t[n]&&t[n]!==e[n])}function Dg(){const e="engine_relationship",t=Object(Hi["a"])(Uy);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function Hg(){const e="shared_engine_usage",t=Object(Hi["a"])(Uy);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function Pg(e){const t=e.getSettings(),n=t[Uy],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 jg(null!==(i=r.hyperformula)&&void 0!==i?i:r,t,e);if("object"===typeof r&&Object(d["isUndefined"])(r.hyperformula)){const t=Dg(),n=Hg().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:Og}),r.getConfig().leapYear1900===Ng.leapYear1900&&!1!==Object(o["isObjectEqual"])(r.getConfig().nullDate,Ng.nullDate)||Object(zr["b"])(xs["a"]`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
  203. settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),r}return null}function jg(e,t,n){const r=t[Uy],i=Ig(t),s=Dg(),o=Hg();Ug(e,r.functions),Vg(e,r.language);const a=e.buildEmpty(i);return s.set(a,[n]),o.set(a,[n.guid]),Bg(a,r.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}function Fg(e){var t;const n=Dg(),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 Yg(e,t){if(e){const n=Dg(),r=n.get(e),i=Hg(),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 Ug(e,t){t&&t.forEach(t=>{const{name:n,plugin:r,translations:i}=t;try{e.registerFunction(n,r,i)}catch(s){Object(zr["b"])(s.message)}})}function Vg(e,t){if(t){const{langCode:r}=t;try{e.registerLanguage(r,t)}catch(n){Object(zr["b"])(n.message)}}}function Bg(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(zr["b"])(o.message)}}),e.resumeEvaluation())}function Wg(e,t){return!Object(d["isUndefined"])(t)&&e.doesSheetExist(t)||(t=e.addSheet(t)),t}const Gg="DD/MM/YYYY";function zg(e){return"string"===typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}function Kg(e){return zg(e)?e.substr(1):e}function Xg(e){return"string"===typeof e&&e.startsWith("=")}function $g(e,t){return"string"===typeof e&&"date"===t}function qg(e,t){return A(e,t,!0).isValid()}function Jg(e,t){return A(e,t,!0).format(Gg)}function Qg(e,t){return A(e,Gg,!0).format(t)}function Zg(e,t){const n=-1,r=new Date(Date.UTC(0,0,e+n));return A(r).format(t)}function ey(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 ty(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 ny(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 ry(e,t,n){const r=ty(e,ey(e,t,n));return ny(r)}function iy(e,t,n){sy(e,t),t.set(e,n)}function sy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oy(e,t){return e.get(ly(e,t))}function ay(e,t,n){return e.set(ly(e,t),n),n}function ly(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 uy=new WeakMap,hy=new WeakMap,cy=new WeakMap,dy=new WeakMap,my=new WeakMap,fy=new WeakMap,py=new WeakMap;class gy{constructor(e,t,n){iy(this,uy,void 0),iy(this,hy,void 0),iy(this,cy,void 0),iy(this,dy,[]),iy(this,my,[]),iy(this,fy,void 0),iy(this,py,[]),ay(uy,this,e),ay(hy,this,t),ay(cy,this,n)}setRemovedHfIndexes(e){return ay(py,this,e.map(e=>{const t=oy(hy,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)})),oy(py,this)}getRemovedHfIndexes(){return oy(py,this)}getHfIndexFromVisualIndex(e){const t=oy(hy,this).getIndexesSequence(),n=oy(hy,this).getNotTrimmedIndexes();return t.indexOf(n[e])}syncMoves(e){const t=1,n=`move${Object(m["toUpperCaseFirst"])(oy(uy,this))}s`;oy(cy,this).getEngine().batch(()=>{e.forEach(e=>{const r=e.from!==e.to,i=e.from+1!==e.to;r&&i&&oy(cy,this).getEngine()[n](oy(cy,this).getSheetId(),e.from,t,e.to)})})}storeMovesInformation(e,t,n){!1!==n&&(ay(my,this,e.map(e=>this.getHfIndexFromVisualIndex(e))),ay(fy,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(oy(cy,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=ry(oy(my,this),oy(fy,this),oy(hy,this).getNumberOfIndexes());null===oy(cy,this).getSheetId()?oy(cy,this).getPostponeAction(()=>this.syncMoves(n)):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${Object(m["toUpperCaseFirst"])(oy(uy,this))}Order`;return t=>{if(oy(cy,this).isPerformingUndoRedo())return;const n=oy(hy,this).getIndexesSequence();if("update"===t&&n.length>0){const t=oy(dy,this).map(e=>n.indexOf(e)),r=oy(cy,this).getEngine().getSheetDimensions(oy(cy,this).getSheetId());let i;i="row"===oy(uy,this)?r.height:r.width;const s=t.length;for(let e=s;e<i;e+=1)t.push(e);oy(cy,this).getEngine()[e](oy(cy,this).getSheetId(),t)}ay(dy,this,n)}}init(){ay(dy,this,oy(hy,this).getIndexesSequence())}}var yy=gy;function wy(e,t,n){by(e,t),t.set(e,n)}function by(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _y(e,t){return e.get(Sy(e,t))}function vy(e,t,n){return e.set(Sy(e,t),n),n}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")}var Ey=new WeakMap,Cy=new WeakMap,My=new WeakMap,Ty=new WeakMap,Ry=new WeakMap,Oy=new WeakMap,Ny=new WeakMap;class Ly{constructor(e,t,n){wy(this,Ey,void 0),wy(this,Cy,void 0),wy(this,My,void 0),wy(this,Ty,!1),wy(this,Ry,!1),wy(this,Oy,null),wy(this,Ny,null),vy(Ey,this,new yy("row",e,this)),vy(Cy,this,new yy("column",t,this)),vy(My,this,n)}getForAxis(e){return _y("row"===e?Ey:Cy,this)}setPerformUndo(e){vy(Ty,this,e)}setPerformRedo(e){vy(Ry,this,e)}isPerformingUndoRedo(){return _y(Ty,this)||_y(Ry,this)}getSheetId(){return _y(Ny,this)}getEngine(){return _y(Oy,this)}getPostponeAction(){return _y(My,this)}setupSyncEndpoint(e,t){vy(Oy,this,e),vy(Ny,this,t),_y(Ey,this).init(),_y(Cy,this).init()}}var Ay=Ly;function Iy(e,t){Py(e,t),t.add(e)}function ky(e,t,n){return(t=xy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xy(e){var t=Dy(e,"string");return"symbol"==typeof t?t:t+""}function Dy(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 Hy(e,t,n){Py(e,t),t.set(e,n)}function Py(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jy(e,t,n){return e.set(Yy(e,t),n),n}function Fy(e,t){return e.get(Yy(e,t))}function Yy(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 Uy="formulas",Vy=["maxRows","maxColumns","language"],By=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 Wy=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var Gy=new WeakMap,zy=new WeakMap,Ky=new WeakMap,Xy=new WeakSet;class $y extends Zt["a"]{constructor(){var e;super(...arguments),e=this,Iy(this,Xy),Hy(this,Gy,!1),Hy(this,zy,!1),Hy(this,Ky,[["valuesUpdated",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yy(Xy,e,fw).call(e,...n)}],["namedExpressionAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yy(Xy,e,pw).call(e,...n)}],["namedExpressionRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yy(Xy,e,gw).call(e,...n)}],["sheetAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yy(Xy,e,yw).call(e,...n)}],["sheetRenamed",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yy(Xy,e,ww).call(e,...n)}],["sheetRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Yy(Xy,e,bw).call(e,...n)}]]),ky(this,"staticRegister",Object(Hi["a"])("formulas")),ky(this,"engine",null),ky(this,"sheetName",null),ky(this,"indexSyncer",null),ky(this,"rowAxisSyncer",null),ky(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return Uy}static get PLUGIN_PRIORITY(){return By}static get SETTING_KEYS(){return[Uy,...Vy]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[Uy]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=Pg(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 Yy(Xy,t,Qy).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 Yy(Xy,t,ew).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 Yy(Xy,t,Qy).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 Yy(Xy,t,ew).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 Yy(Xy,t,tw).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 Yy(Xy,t,nw).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 Yy(Xy,t,qy).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 Yy(Xy,t,iw).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 Yy(Xy,t,rw).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 Yy(Xy,t,rw).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 Yy(Xy,t,sw).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 Yy(Xy,t,ow).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 Yy(Xy,t,uw).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 Yy(Xy,t,hw).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 Yy(Xy,t,aw).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 Yy(Xy,t,lw).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 Yy(Xy,t,cw).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 Yy(Xy,t,dw).call(t,...n)})),this.indexSyncer=new Ay(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 Yy(Xy,t,Zy).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 Yy(Xy,t,mw).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 Yy(Xy,t,Jy).call(t,...n)})),Fy(Ky,this).forEach(e=>{let[t,n]=e;return this.engine.on(t,n)}),super.enablePlugin()}else Object(zr["b"])("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){Fy(Ky,this).forEach(e=>{let[t,n]=e;return this.engine.off(t,n)}),Yg(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=kg(this.hot.getSettings());xg(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const n=this.hot.getSettings()[Uy];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()[Uy].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(){Fy(Ky,this).forEach(e=>{var t;let[n,r]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(n,r)}),jy(Ky,this,null),Yg(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if(Object(d["isDefined"])(t)&&!Object(kf["isArrayOfArrays"])(t))return Object(zr["b"])("The provided data should be an array of arrays."),!1;if(void 0!==e&&null!==e&&this.engine.doesSheetExist(e))return Object(zr["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(zr["b"])(n.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void Object(zr["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"])(Uy)+".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))}),Fg(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=Fg(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(zr["b"])("Not possible to set cell data at "+JSON.stringify(r));const i=this.hot.getCellMeta(e,t);return $g(n,i.type)&&(qg(n,i.dateFormat)?n=Jg(n,i.dateFormat):!1===Xg(n)&&(n="'"+n)),this.engine.setCellContents(r,n)}}function qy(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(nt["isNumeric"])(i)&&(i=Zg(i,n.dateFormat)),"object"===typeof i&&null!==i?i.value:i}return e}function Jy(e,t,n){const{row:r,col:i}=t.getTopStartCorner(),{row:s,col:o}=t.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:u,col:h}=n.getBottomEndCorner(),c={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(u),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(h),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(d))return!1;const m=this.engine.getFillRangeData(c,d),{row:f,col:p}=c.start,{row:g,col:y}=c.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=f+_%w,r=p+e%b,i=this.hot.getCellMeta(n,r);$g(t,i.type)&&(t.startsWith("'")?m[_][e]=t.slice(1):!1===this.isFormulaCellType(n,r,this.sheetId)&&(m[_][e]=Qg(t,i.dateFormat)))}return m}function Qy(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.includes(Object(m["toUpperCaseFirst"])(Uy))||jy(zy,this,Object(d["isUndefined"])(this.hot.getSettings().data))}function Zy(){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;$g(n,s.type)&&(t=!0,qg(n,o)?e[r][i]=Jg(n,o):!1===this.isFormulaCellType(r,i)&&(e[r][i]="'"+n))})}),!0===t&&(jy(Gy,this,!0),this.engine.setSheetContent(this.sheetId,e),jy(Gy,this,!1))}function ew(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!n.includes(Object(m["toUpperCaseFirst"])(Uy)))if(this.sheetName=Wg(this.engine,this.hot.getSettings()[Uy].sheetName),Fy(zy,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){jy(Gy,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),jy(Gy,this,!1)}}}function tw(e,t,n,r){if("get"!==r||Fy(Gy,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(zg(n.value)&&(n.value=Kg(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(nt["isNumeric"])(a)&&(a=Zg(a,l.dateFormat));const u="object"===typeof a&&null!==a?a.value:a;n.value=u}function nw(e,t,n,r){if("get"!==r||Fy(Gy,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 rw(e,t){if(Wy(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),u={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:u})})});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 iw(e,t){if(Wy(t))return;const n=[],r=[];e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i);if(!Object(nt["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(zr["b"])("Not possible to set source cell data at "+JSON.stringify(a))}),this.renderDependentSheets(n),this.validateDependentCells(n,r)}function sw(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 ow(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 aw(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 lw(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 uw(e,t,n){if(Wy(n))return;const r=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function hw(e,t,n){if(Wy(n))return;const r=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function cw(e,t,n,r){if(Wy(r))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort((e,t)=>t-e),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeRows(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function dw(e,t,n,r){if(Wy(r))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort((e,t)=>t-e),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeColumns(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function mw(e,t,n){var r;jy(Gy,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());jy(Gy,this,!1),i.forEach((e,t)=>{e.forEach((e,r)=>{this.engine.setCellContents({col:r,row:n+t,sheet:this.sheetId},[[e]])})})}function fw(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function pw(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function gw(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function yw(e){this.hot.runHooks("afterSheetAdded",e)}function ww(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function bw(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}function _w(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(Pe["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()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}}function vw(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Pe["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();const o=s-i+1===this.countCols();o||this.selectColumns(i,s)},disabled:!1,hidden(){const n=Object(c["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),u=o.getNotTrimmedIndexes(),h=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=u.slice(i,s+1);h.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)h.push(...u.slice(0,i));else if(null===a)h.push(...u.slice(0,this.countCols()));else{const e=this.countCols()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&h.push(...u.slice(s+1))}return Object(c["arrayEach"])(h,e=>{t.push(this.toVisualColumn(e))}),0===t.length}}}var Sw=n("cef7");function Ew(e,t){Mw(e,t),t.add(e)}function Cw(e,t,n){Mw(e,t),t.set(e,n)}function Mw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tw(e,t){return e.get(Ow(e,t))}function Rw(e,t,n){return e.set(Ow(e,t),n),n}function Ow(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 Nw="hiddenColumns",Lw=310;var Aw=new WeakMap,Iw=new WeakMap,kw=new WeakSet;class xw extends Zt["a"]{constructor(){super(...arguments),Ew(this,kw),Cw(this,Aw,{}),Cw(this,Iw,null)}static get PLUGIN_KEY(){return Nw}static get PLUGIN_PRIORITY(){return Lw}isEnabled(){return!!this.hot.getSettings()[Nw]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Nw];Object(o["isObject"])(t)&&(Rw(Aw,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),Rw(Iw,this,new Sw["a"]),Tw(Iw,this).addLocalHook("init",()=>Ow(kw,this,Yw).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Tw(Iw,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ow(kw,e,Fw).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>Ow(kw,this,Hw).call(this,e,t,n)),this.addHook("modifyColWidth",(e,t)=>Ow(kw,this,Dw).call(this,e,t),2),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ow(kw,e,jw).call(e,...n)})),this.addHook("modifyCopyableRange",e=>Ow(kw,this,Pw).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Rw(Aw,this,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;const i=Tw(Iw,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalColumn(e));Object(c["arrayEach"])(t,e=>{i[e]=!1}),r=Object(c["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&&Tw(Iw,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(c["arrayEach"])(e,e=>{Tw(Iw,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(c["arrayMap"])(Tw(Iw,this).getHiddenIndexes(),e=>this.hot.toVisualColumn(e))}isHidden(e){return Tw(Iw,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(c["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipColumnOnPaste=!1)})}destroy(){Rw(Aw,this,null),Rw(Iw,this,null),super.destroy()}}function Dw(e,t){return this.isHidden(t)?0:Tw(Aw,this).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"===typeof e&&this.hot.hasColHeaders()?e+15:void 0}function Hw(e,t,n){if(!1===Tw(Aw,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 Pw(e){if(Tw(Aw,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(c["arrayEach"])(e,e=>{let t=!0,r=0;Object(nt["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 jw(e,t){if(!Tw(Aw,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 Fw(e){e.items.push({name:Ao},_w(this),vw(this))}function Yw(){Array.isArray(Tw(Aw,this).columns)&&this.hideColumns(Tw(Aw,this).columns)}function Uw(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(Pe["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()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}}function Vw(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Pe["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();const o=s-i+1===this.countRows();o||this.selectRows(i,s)},disabled:!1,hidden(){const n=Object(c["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),u=o.getNotTrimmedIndexes(),h=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=u.slice(i,s+1);h.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)h.push(...u.slice(0,i));else if(null===a)h.push(...u.slice(0,this.countRows()));else{const e=this.countRows()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&h.push(...u.slice(s+1))}return Object(c["arrayEach"])(h,e=>{t.push(this.toVisualRow(e))}),0===t.length}}}function Bw(e,t){Gw(e,t),t.add(e)}function Ww(e,t,n){Gw(e,t),t.set(e,n)}function Gw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zw(e,t){return e.get(Xw(e,t))}function Kw(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("beforeHideRows"),fe["a"].getSingleton().register("afterHideRows"),fe["a"].getSingleton().register("beforeUnhideRows"),fe["a"].getSingleton().register("afterUnhideRows");const $w="hiddenRows",qw=320;var Jw=new WeakMap,Qw=new WeakMap,Zw=new WeakSet;class eb extends Zt["a"]{constructor(){super(...arguments),Bw(this,Zw),Ww(this,Jw,{}),Ww(this,Qw,null)}static get PLUGIN_KEY(){return $w}static get PLUGIN_PRIORITY(){return qw}isEnabled(){return!!this.hot.getSettings()[$w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[$w];Object(o["isObject"])(t)&&(Kw(Jw,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),Kw(Qw,this,new Sw["a"]),zw(Qw,this).addLocalHook("init",()=>Xw(Zw,this,ob).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,zw(Qw,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Xw(Zw,e,sb).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>Xw(Zw,this,nb).call(this,e,t,n)),this.addHook("modifyRowHeight",(e,t)=>Xw(Zw,this,tb).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 Xw(Zw,e,ib).call(e,...n)})),this.addHook("modifyCopyableRange",e=>Xw(Zw,this,rb).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),Kw(Jw,this,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;const i=zw(Qw,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalRow(e));Object(c["arrayEach"])(t,e=>{i[e]=!1}),r=Object(c["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&&zw(Qw,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(c["arrayEach"])(e,e=>{zw(Qw,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(c["arrayMap"])(zw(Qw,this).getHiddenIndexes(),e=>this.hot.toVisualRow(e))}isHidden(e){return zw(Qw,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(c["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipRowOnPaste=!1)})}destroy(){Kw(Jw,this,null),Kw(Qw,this,null),super.destroy()}}function tb(e,t){return this.isHidden(t)?0:e}function nb(e,t,n){if(!1===zw(Jw,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 rb(e){if(zw(Jw,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(c["arrayEach"])(e,e=>{let t=!0,r=0;Object(nt["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 ib(e,t){if(!zw(Jw,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 sb(e){e.items.push({name:Ao},Uw(this),Vw(this))}function ob(){Array.isArray(zw(Jw,this).rows)&&this.hideRows(zw(Jw,this).rows)}function ab(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_FREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.freezeColumn(r),this.render(),this.view.adjustElementsSize()},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 lb(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(Pe["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.unfreezeColumn(r),this.render(),this.view.adjustElementsSize()},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 ub(e,t){cb(e,t),t.add(e)}function hb(e,t,n){cb(e,t),t.set(e,n)}function cb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function db(e,t){return e.get(fb(e,t))}function mb(e,t,n){return e.set(fb(e,t),n),n}function fb(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 pb="manualColumnFreeze",gb=110;var yb=new WeakMap,wb=new WeakSet;class bb extends Zt["a"]{constructor(){super(...arguments),ub(this,wb),hb(this,yb,!1)}static get PLUGIN_KEY(){return pb}static get PLUGIN_PRIORITY(){return gb}isEnabled(){return!!this.hot.getSettings()[pb]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>fb(wb,this,_b).call(this,e)),this.addHook("beforeColumnMove",(e,t)=>fb(wb,this,vb).call(this,e,t)),super.enablePlugin())}disablePlugin(){mb(yb,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;db(yb,this)||mb(yb,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;db(yb,this)||mb(yb,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 _b(e){e.items.push({name:"---------"},ab(this),lb(this))}function vb(e,t){if(db(yb,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some(e=>e<n))return!1}}function Sb(e,t,n){return(t=Eb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eb(e){var t=Cb(e,"string");return"symbol"==typeof t?t:t+""}function Cb(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 Mb=0,Tb=1,Rb=2,Ob="px";class Nb{constructor(e){Sb(this,"hot",void 0),Sb(this,"_element",null),Sb(this,"state",Mb),Sb(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=Rb}build(){this.state===Mb&&(this._element=this.hot.rootDocument.createElement("div"),this.state=Tb)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=Mb}isAppended(){return this.state===Rb}isBuilt(){return this.state>=Tb}setPosition(e,t){Object(nt["isNumeric"])(e)&&(this._element.style.top=e+Ob),Object(nt["isNumeric"])(t)&&(this._element.style[this.inlineProperty]=t+Ob)}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(nt["isNumeric"])(e)&&(this._element.style.width=e+Ob),Object(nt["isNumeric"])(t)&&(this._element.style.height=t+Ob)}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(nt["isNumeric"])(e)&&(this._element.style.marginTop=e+Ob),Object(nt["isNumeric"])(t)&&(this._element.style["margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty)]=t+Ob)}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 Lb=Nb;const Ab="ht__manualColumnMove--backlight";class Ib extends Lb{build(){super.build(),Object(i["addClass"])(this._element,Ab)}}var kb=Ib;const xb="ht__manualColumnMove--guideline";class Db extends Lb{build(){super.build(),Object(i["addClass"])(this._element,xb)}}var Hb=Db;function Pb(e,t){Fb(e,t),t.add(e)}function jb(e,t,n){Fb(e,t),t.set(e,n)}function Fb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yb(e,t,n){return e.set(Vb(e,t),n),n}function Ub(e,t){return e.get(Vb(e,t))}function Vb(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 Bb="manualColumnMove",Wb=120,Gb="ht__manualColumnMove",zb="show-ui",Kb="on-moving--columns",Xb="after-selection--columns";var $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 WeakMap,s_=new WeakMap,o_=new WeakSet;class a_ extends Zt["a"]{constructor(){super(...arguments),Pb(this,o_),jb(this,$b,new kb(this.hot)),jb(this,qb,new Hb(this.hot)),jb(this,Jb,[]),jb(this,Qb,0),jb(this,Zb,!1),jb(this,e_,{}),jb(this,t_,void 0),jb(this,n_,void 0),jb(this,r_,void 0),jb(this,i_,void 0),jb(this,s_,void 0)}static get PLUGIN_KEY(){return Bb}static get PLUGIN_PRIORITY(){return Wb}isEnabled(){return!!this.hot.getSettings()[Bb]}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 Vb(o_,e,l_).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 Vb(o_,e,h_).call(e,...n)})),this.addHook("afterScrollVertically",()=>Vb(o_,this,d_).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 Vb(o_,e,m_).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,Gb),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,Gb),this.unregisterEvents(),Ub($b,this).destroy(),Ub(qb,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=Ub(t_,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeColumnMove",e,t,n,r);if(Yb(t_,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 Yb(t_,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(c["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()[Bb];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(nt["rangeEach"])(e,t,e=>{n.push(e)}),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(Ub(n_,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,Ub(n_,this)-1);const o=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=Ub($b,this).getOffset().start,u=Ub($b,this).getSize().width;let h=0,c=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=Object(i["outerWidth"])(this.hot.rootElement),s=e.innerWidth-Ub(r_,this)-t;c=e.innerWidth-Ub(e_,this).eventPageX-s-(void 0===n.scrollX?r:0)}else c=Ub(e_,this).eventPageX-(Ub(r_,this)-(void 0===n.scrollX?r:0));if(Ub(i_,this)&&(h=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(Ub(n_,this))&&(s+=r),s+=h,Ub(n_,this)<0)Ub(s_,this)>0?Ub(e_,this).col=0:Ub(e_,this).col=e>0?e-1:e;else if(Ub(e_,this).TD.offsetWidth/2+s<=c){const e=Ub(n_,this)>=Ub(Qb,this)?Ub(Qb,this)-1:Ub(n_,this);Ub(e_,this).col=e+1,s+=Ub(e_,this).TD.offsetWidth}else Ub(e_,this).col=Ub(n_,this);let d=c,m=s;c+u+l>=o?d=o-u-l:c+l<a+h&&(d=a+h+Math.abs(l)),s>=o-1?m=o-1:0===m?m=1:void 0!==n.scrollX&&Ub(n_,this)<Ub(s_,this)&&(m-=Ub(r_,this)<=n.scrollX?Ub(r_,this):0),Ub($b,this).setPosition(null,d),Ub(qb,this).setPosition(null,m)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>Vb(o_,this,u_).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>Vb(o_,this,c_).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Ub($b,this).build(),Ub(qb,this).build()}destroy(){Ub($b,this).destroy(),Ub(qb,this).destroy(),super.destroy()}}function l_(e,t,n,r){const o=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),u=Object(i["hasClass"])(e.target,"sortAction");if(!l||!a||Ub(Zb,this)||0!==e.button||u)return Yb(Zb,this,!1),Ub(Jb,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[Kb,zb]);const h=Ub(qb,this).isBuilt()&&!Ub(qb,this).isAppended(),c=Ub($b,this).isBuilt()&&!Ub($b,this).isAppended();h&&c&&(Ub(qb,this).appendTo(o.hider),Ub($b,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,Yb(Zb,this,!0);const a=n.firstChild?Object(s["offsetRelativeTo"])(e,n.firstChild).x:e.offsetX;Ub(e_,this).eventPageX=e.pageX,Yb(n_,this,t.col),Ub(e_,this).TD=n,Ub(e_,this).col=t.col,Yb(Jb,this,this.prepareColumnsToMoving(f,p)),Yb(i_,this,!!this.hot.getSettings().rowHeaders),Yb(Qb,this,this.hot.countCols()),Yb(s_,this,this.hot.getSettings().fixedColumnsStart),Yb(r_,this,Object(i["offset"])(this.hot.rootElement).left);const l=Ub(i_,this)?-1:0,u=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,h=t.col<Ub(s_,this),c=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)+(h?c:0)+m;Ub($b,this).setPosition(u,g),Ub($b,this).setSize(this.getColumnsWidth(f,p),o.hider.offsetHeight-u),Ub($b,this).setOffset(null,-m),Object(i["addClass"])(this.hot.rootElement,Kb)}else Object(i["removeClass"])(this.hot.rootElement,Xb),Yb(Zb,this,!1),Ub(Jb,this).length=0}function u_(e){Ub(Zb,this)&&(Ub(e_,this).eventPageX=e.pageX,this.refreshPositions())}function h_(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&Ub(Zb,this)&&(Ub(Jb,this).indexOf(t.col)>-1?Object(i["removeClass"])(this.hot.rootElement,zb):Object(i["addClass"])(this.hot.rootElement,zb),r.row=!0,r.column=!0,r.cell=!0,Yb(n_,this,t.col),Ub(e_,this).TD=n)}function c_(){const e=Ub(e_,this).col,t=Ub(Jb,this).length;if(Yb(n_,this,void 0),Yb(Zb,this,!1),Object(i["removeClass"])(this.hot.rootElement,[Kb,zb,Xb]),this.hot.selection.isSelectedByColumnHeader()&&Object(i["addClass"])(this.hot.rootElement,Xb),t<1||void 0===e)return;const n=Ub(Jb,this)[0],r=this.hot.toPhysicalColumn(n),s=this.dragColumns(Ub(Jb,this),e);if(Ub(Jb,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualColumn(r),n=e+t-1;this.hot.selectColumns(e,n)}}function d_(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1,n=e.holder.scrollTop,r=t+n;Ub($b,this).setPosition(r),Ub($b,this).setSize(null,e.hider.offsetHeight-r)}function m_(){this.moveBySettingsOrLoad()}function f_(e,t){g_(e,t),t.add(e)}function p_(e,t,n){g_(e,t),t.set(e,n)}function g_(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y_(e,t,n){return e.set(b_(e,t),n),n}function w_(e,t){return e.get(b_(e,t))}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")}const __="manualColumnResize",v_=130,S_="manualColumnWidths";var E_=new WeakMap,C_=new WeakMap,M_=new WeakMap,T_=new WeakMap,R_=new WeakMap,O_=new WeakMap,N_=new WeakMap,L_=new WeakMap,A_=new WeakMap,I_=new WeakMap,k_=new WeakMap,x_=new WeakMap,D_=new WeakMap,H_=new WeakMap,P_=new WeakMap,j_=new WeakMap,F_=new WeakSet;class Y_ extends Zt["a"]{static get PLUGIN_KEY(){return __}static get PLUGIN_PRIORITY(){return v_}constructor(e){super(e),f_(this,F_),p_(this,E_,null),p_(this,C_,null),p_(this,M_,[]),p_(this,T_,null),p_(this,R_,null),p_(this,O_,null),p_(this,N_,null),p_(this,L_,null),p_(this,A_,this.hot.rootDocument.createElement("DIV")),p_(this,I_,this.hot.rootDocument.createElement("DIV")),p_(this,k_,null),p_(this,x_,!1),p_(this,D_,0),p_(this,H_,null),p_(this,P_,void 0),p_(this,j_,void 0),Object(i["addClass"])(w_(A_,this),"manualColumnResizer"),Object(i["addClass"])(w_(I_,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[__]}enablePlugin(){this.enabled||(y_(P_,this,new un["a"]),w_(P_,this).addLocalHook("init",()=>b_(F_,this,U_).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,w_(P_,this)),this.addHook("modifyColWidth",(e,t)=>b_(F_,this,K_).call(this,e,t),1),this.addHook("beforeStretchingColumnWidth",(e,t)=>b_(F_,this,X_).call(this,e,t)),this.addHook("beforeColumnResize",(e,t,n)=>b_(F_,this,$_).call(this,e,t,n)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){y_(j_,this,w_(P_,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",S_,w_(P_,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",S_,e),e.value}setManualSize(e,t){const n=Math.max(t,20),r=this.hot.toPhysicalColumn(e);return w_(P_,this).setValueAtIndex(r,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);w_(P_,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;y_(E_,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(w_(E_,this)),r=n.col;if(r<0)return;const s=Object(i["outerHeight"])(w_(E_,this)),o=w_(E_,this).getBoundingClientRect(),a=r<t.getSetting("fixedColumnsStart");let l;a&&(l=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(w_(E_,this),n.row,n.col)),l||(l=t.wtOverlays.topOverlay.getRelativeCellPosition(w_(E_,this),n.row,n.col)),y_(C_,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)),y_(M_,this,[]);const u=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&u){const e=this.hot.getSelectedRange();Object(c["arrayEach"])(e,e=>{const t=e.getTopStartCorner().col,n=e.getBottomEndCorner().col;Object(nt["rangeEach"])(t,n,e=>{w_(M_,this).includes(e)||w_(M_,this).push(e)})})}w_(M_,this).includes(w_(C_,this))||y_(M_,this,[w_(C_,this)]),y_(L_,this,l.start-6),y_(N_,this,parseInt(o.width,10)),w_(A_,this).style.top=l.top+"px",w_(A_,this).style[this.inlineDir]=w_(L_,this)+w_(N_,this)+"px",w_(A_,this).style.height=s+"px",this.hot.rootElement.appendChild(w_(A_,this))}refreshHandlePosition(){w_(A_,this).style[this.inlineDir]=w_(L_,this)+w_(T_,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerHeight"])(w_(A_,this)),10),t=parseInt(w_(A_,this).style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);Object(i["addClass"])(w_(A_,this),"active"),Object(i["addClass"])(w_(I_,this),"active"),w_(I_,this).style.top=t+"px",this.refreshGuidePosition(),w_(I_,this).style.height=n-e+"px",this.hot.rootElement.appendChild(w_(I_,this))}refreshGuidePosition(){w_(I_,this).style[this.inlineDir]=w_(A_,this).style[this.inlineDir]}hideHandleAndGuide(){Object(i["removeClass"])(w_(A_,this),"active"),Object(i["removeClass"])(w_(I_,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()},t=(t,n)=>{const r=this.hot.runHooks("beforeColumnResize",w_(R_,this),t,!0);void 0!==r&&y_(R_,this,r),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,w_(R_,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",w_(R_,this),t,!0),n&&e()};if(w_(D_,this)>=2){const n=w_(M_,this).length;n>1?(Object(c["arrayEach"])(w_(M_,this),e=>{t(e)}),e()):Object(c["arrayEach"])(w_(M_,this),e=>{t(e,!0)})}y_(D_,this,0),y_(H_,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",e=>b_(F_,this,V_).call(this,e)),this.eventManager.addEventListener(t,"mousedown",e=>b_(F_,this,B_).call(this,e)),this.eventManager.addEventListener(e,"mousemove",e=>b_(F_,this,W_).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>b_(F_,this,G_).call(this)),this.eventManager.addEventListener(w_(A_,this),"contextmenu",()=>b_(F_,this,z_).call(this))}destroy(){super.destroy()}}function U_(){const e=this.hot.getSettings()[__],t=this.loadManualColumnWidths();"undefined"!==typeof t?this.hot.batchExecution(()=>{t.forEach((e,t)=>{w_(P_,this).setValueAtIndex(t,e)})},!0):Array.isArray(e)?(this.hot.batchExecution(()=>{e.forEach((e,t)=>{w_(P_,this).setValueAtIndex(t,e)})},!0),y_(j_,this,e)):!0===e&&Array.isArray(w_(j_,this))&&this.hot.batchExecution(()=>{w_(j_,this).forEach((e,t)=>{w_(P_,this).setValueAtIndex(t,e)})},!0)}function V_(e){if(!Object(i["isDetached"])(e.target)&&!0!==w_(x_,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||w_(k_,this)||this.setupHandlePosition(t)}}function B_(e){e.target.parentNode===this.hot.rootElement&&Object(i["hasClass"])(e.target,"manualColumnResizer")&&(this.setupHandlePosition(w_(E_,this)),this.setupGuidePosition(),y_(k_,this,!0),null===w_(H_,this)&&(y_(H_,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(w_(H_,this))),y_(D_,this,w_(D_,this)+1),this.startX=e.pageX,y_(R_,this,w_(N_,this)))}function W_(e){if(w_(k_,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();y_(T_,this,w_(N_,this)+t),Object(c["arrayEach"])(w_(M_,this),e=>{y_(R_,this,this.setManualSize(e,w_(T_,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function G_(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",w_(R_,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",w_(R_,this),t,!1)};if(w_(k_,this)){if(this.hideHandleAndGuide(),y_(k_,this,!1),w_(R_,this)!==w_(N_,this)){const n=w_(M_,this).length;n>1?(Object(c["arrayEach"])(w_(M_,this),e=>{t(e)}),e()):Object(c["arrayEach"])(w_(M_,this),e=>{t(e,!0)})}this.setupHandlePosition(w_(E_,this))}}function z_(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(w_(A_,this)),this.hot.rootElement.removeChild(w_(I_,this)),y_(k_,this,!1),y_(x_,this,!0),this.hot._registerImmediate(()=>{y_(x_,this,!1)})}function K_(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),r=w_(P_,this).getValueAtIndex(e);this.hot.getSettings()[__]&&r&&(n=r)}return n}function X_(e,t){let n=w_(P_,this).getValueAtIndex(t);return null===n&&(n=e),n}function $_(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function q_(e,t,n){return(t=J_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J_(e){var t=Q_(e,"string");return"symbol"==typeof t?t:t+""}function Q_(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 Z_=0,ev=1,tv=2,nv="px";class rv{constructor(e){q_(this,"hot",void 0),q_(this,"_element",null),q_(this,"state",Z_),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=tv}build(){this.state===Z_&&(this._element=this.hot.rootDocument.createElement("div"),this.state=ev)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=Z_}isAppended(){return this.state===tv}isBuilt(){return this.state>=ev}setPosition(e,t){void 0!==e&&(this._element.style.top=e+nv),void 0!==t&&(this._element.style.left=t+nv)}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+nv),t&&(this._element.style.height=t+nv)}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+nv),t&&(this._element.style.marginLeft=t+nv)}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 iv=rv;const sv="ht__manualRowMove--backlight";class ov extends iv{build(){super.build(),Object(i["addClass"])(this._element,sv)}}var av=ov;const lv="ht__manualRowMove--guideline";class uv extends iv{build(){super.build(),Object(i["addClass"])(this._element,lv)}}var hv=uv;function cv(e,t){mv(e,t),t.add(e)}function dv(e,t,n){mv(e,t),t.set(e,n)}function mv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fv(e,t,n){return e.set(gv(e,t),n),n}function pv(e,t){return e.get(gv(e,t))}function gv(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 yv="manualRowMove",wv=140,bv="ht__manualRowMove",_v="show-ui",vv="on-moving--rows",Sv="after-selection--rows";var Ev=new WeakMap,Cv=new WeakMap,Mv=new WeakMap,Tv=new WeakMap,Rv=new WeakMap,Ov=new WeakMap,Nv=new WeakSet;class Lv extends Zt["a"]{constructor(){super(...arguments),cv(this,Nv),dv(this,Ev,new av(this.hot)),dv(this,Cv,new hv(this.hot)),dv(this,Mv,[]),dv(this,Tv,void 0),dv(this,Rv,{}),dv(this,Ov,void 0)}static get PLUGIN_KEY(){return yv}static get PLUGIN_PRIORITY(){return wv}isEnabled(){return!!this.hot.getSettings()[yv]}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 gv(Nv,e,Av).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 gv(Nv,e,kv).call(e,...n)})),this.addHook("afterScrollHorizontally",()=>gv(Nv,this,Dv).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 gv(Nv,e,Hv).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,bv),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,bv),this.unregisterEvents(),pv(Ev,this).destroy(),pv(Cv,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=pv(Ov,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeRowMove",e,t,n,r);if(fv(Ov,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 fv(Ov,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(c["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()[yv];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(nt["rangeEach"])(i,s,e=>{t.push(e)}),t}refreshPositions(){const e=pv(Rv,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=pv(Rv,this).TD,a=this.hot.rootElement,l=Object(i["offset"])(a),u=Object(i["getTrimmingContainer"])(a),h=s.holder.scrollTop,c=this.hot.rootWindow!==u?u.scrollTop:0,d=l.top-c,m=pv(Rv,this).eventPageY-d+h,f=s.hider.offsetHeight,p=s.TBODY.offsetTop,g=pv(Ev,this).getOffset().top,y=pv(Ev,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?pv(Rv,this).row=t>0?t-1:t:v?(pv(Rv,this).row=e.row+1,_+=0===e.row?b-1:b):pv(Rv,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),pv(Ev,this).setPosition(S),pv(Cv,this).setPosition(E)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>gv(Nv,this,Iv).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>gv(Nv,this,xv).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){pv(Ev,this).build(),pv(Cv,this).build()}destroy(){pv(Ev,this).destroy(),pv(Cv,this).destroy(),super.destroy()}}function Av(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||pv(Tv,this)||0!==e.button)return fv(Tv,this,!1),pv(Mv,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[vv,_v]);const u=pv(Cv,this).isBuilt()&&!pv(Cv,this).isAppended(),h=pv(Ev,this).isBuilt()&&!pv(Ev,this).isAppended();u&&h&&(pv(Cv,this).appendTo(s.hider),pv(Ev,this).appendTo(s.hider));const{from:c,to:d}=l,m=Math.min(c.row,d.row),f=Math.max(c.row,d.row);if(t.col<0&&t.row>=m&&t.row<=f){r.row=!0,fv(Tv,this,!0),pv(Rv,this).eventPageY=e.pageY,pv(Rv,this).coords=t,pv(Rv,this).TD=n,fv(Mv,this,this.prepareRowsToMoving());const a=s.holder.scrollLeft+o.getRowHeaderWidth(),l=this.getRowsHeight(m,t.row-1)+e.offsetY;pv(Ev,this).setPosition(null,a),pv(Ev,this).setSize(s.hider.offsetWidth-a,this.getRowsHeight(m,f)),pv(Ev,this).setOffset(-l,null),Object(i["addClass"])(this.hot.rootElement,vv),this.refreshPositions()}else Object(i["removeClass"])(this.hot.rootElement,Sv),fv(Tv,this,!1),pv(Mv,this).length=0}function Iv(e){pv(Tv,this)&&(pv(Rv,this).eventPageY=e.pageY,this.refreshPositions())}function kv(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&pv(Tv,this)&&(pv(Mv,this).indexOf(t.row)>-1?Object(i["removeClass"])(this.hot.rootElement,_v):Object(i["addClass"])(this.hot.rootElement,_v),r.row=!0,r.column=!0,r.cell=!0,pv(Rv,this).coords=t,pv(Rv,this).TD=n)}function xv(){const e=pv(Rv,this).row,t=pv(Mv,this).length;if(fv(Tv,this,!1),Object(i["removeClass"])(this.hot.rootElement,[vv,_v,Sv]),this.hot.selection.isSelectedByRowHeader()&&Object(i["addClass"])(this.hot.rootElement,Sv),t<1||void 0===e)return;const n=pv(Mv,this)[0],r=this.hot.toPhysicalRow(n),s=this.dragRows(pv(Mv,this),e);if(pv(Mv,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualRow(r),n=e+t-1;this.hot.selectRows(e,n)}}function Dv(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth(),n=e.holder.scrollLeft,r=t+n;pv(Ev,this).setPosition(null,r),pv(Ev,this).setSize(e.hider.offsetWidth-r)}function Hv(){this.moveBySettingsOrLoad()}var Pv=n("eb36");function jv(e,t){Yv(e,t),t.add(e)}function Fv(e,t,n){Yv(e,t),t.set(e,n)}function Yv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uv(e,t,n){return e.set(Bv(e,t),n),n}function Vv(e,t){return e.get(Bv(e,t))}function Bv(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 Wv="manualRowResize",Gv=30,zv="manualRowHeights";var Kv=new WeakMap,Xv=new WeakMap,$v=new WeakMap,qv=new WeakMap,Jv=new WeakMap,Qv=new WeakMap,Zv=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap,rS=new WeakMap,iS=new WeakMap,sS=new WeakMap,oS=new WeakMap,aS=new WeakMap,lS=new WeakMap,uS=new WeakSet;class hS extends Zt["a"]{static get PLUGIN_KEY(){return Wv}static get PLUGIN_PRIORITY(){return Gv}constructor(e){super(e),jv(this,uS),Fv(this,Kv,null),Fv(this,Xv,null),Fv(this,$v,[]),Fv(this,qv,null),Fv(this,Jv,null),Fv(this,Qv,null),Fv(this,Zv,null),Fv(this,eS,null),Fv(this,tS,this.hot.rootDocument.createElement("DIV")),Fv(this,nS,this.hot.rootDocument.createElement("DIV")),Fv(this,rS,!1),Fv(this,iS,!1),Fv(this,sS,0),Fv(this,oS,null),Fv(this,aS,void 0),Fv(this,lS,void 0),Object(i["addClass"])(Vv(tS,this),"manualRowResizer"),Object(i["addClass"])(Vv(nS,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[Wv]}enablePlugin(){this.enabled||(Uv(aS,this,new un["a"]),Vv(aS,this).addLocalHook("init",()=>Bv(uS,this,yS).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,Vv(aS,this)),this.addHook("modifyRowHeight",(e,t)=>Bv(uS,this,gS).call(this,e,t)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){Uv(lS,this,Vv(aS,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",zv,Vv(aS,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",zv,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),r=Math.max(t,Pv["a"]);return Vv(aS,this).setValueAtIndex(n,r),r}getLastDesiredRowHeight(){return Vv(qv,this)}setupHandlePosition(e){Uv(Kv,this,e);const{view:t}=this.hot,{_wt:n}=t,r=n.wtTable.getCoords(Vv(Kv,this)),s=r.row;if(s<0)return;const o=Object(i["outerWidth"])(Vv(Kv,this)),a=Vv(Kv,this).getBoundingClientRect(),l=s<n.getSetting("fixedRowsTop"),u=s>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let h;l?h=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(Vv(Kv,this),r.row,r.col):u&&(h=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(Vv(Kv,this),r.row,r.col)),h||(h=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(Vv(Kv,this),r.row,r.col)),Uv(Xv,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(s)),Uv($v,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();Object(c["arrayEach"])(e,e=>{const t=e.getTopStartCorner().row,n=e.getBottomStartCorner().row;Object(nt["rangeEach"])(t,n,e=>{Vv($v,this).includes(e)||Vv($v,this).push(e)})})}Vv($v,this).includes(Vv(Xv,this))||Uv($v,this,[Vv(Xv,this)]),Uv(eS,this,h.top-6),Uv(Zv,this,parseInt(a.height,10)),Vv(tS,this).style.top=Vv(eS,this)+Vv(Zv,this)+"px",Vv(tS,this).style[this.inlineDir]=h.start+"px",Vv(tS,this).style.width=o+"px",this.hot.rootElement.appendChild(Vv(tS,this))}refreshHandlePosition(){Vv(tS,this).style.top=Vv(eS,this)+Vv(qv,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerWidth"])(Vv(tS,this)),10),t=parseInt(Vv(tS,this).style[this.inlineDir],10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);Object(i["addClass"])(Vv(tS,this),"active"),Object(i["addClass"])(Vv(nS,this),"active"),Vv(nS,this).style.top=Vv(tS,this).style.top,Vv(nS,this).style[this.inlineDir]=t+"px",Vv(nS,this).style.width=n-e+"px",this.hot.rootElement.appendChild(Vv(nS,this))}refreshGuidePosition(){Vv(nS,this).style.top=Vv(tS,this).style.top}hideHandleAndGuide(){Object(i["removeClass"])(Vv(tS,this),"active"),Object(i["removeClass"])(Vv(nS,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&&Vv(Jv,this)<t?t:Vv(Jv,this)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==r&&Uv(Jv,this,r),this.setManualSize(t,Vv(Jv,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};if(Vv(sS,this)>=2){const n=Vv($v,this).length;n>1?(Object(c["arrayEach"])(Vv($v,this),e=>{t(e)}),e()):Object(c["arrayEach"])(Vv($v,this),e=>{t(e,!0)})}Uv(sS,this,0),Uv(oS,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",e=>Bv(uS,this,cS).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>Bv(uS,this,dS).call(this,e)),this.eventManager.addEventListener(t,"mousemove",e=>Bv(uS,this,mS).call(this,e)),this.eventManager.addEventListener(t,"mouseup",()=>Bv(uS,this,fS).call(this)),this.eventManager.addEventListener(Vv(tS,this),"contextmenu",()=>Bv(uS,this,pS).call(this))}destroy(){super.destroy()}}function cS(e){if(!Object(i["isDetached"])(e.target)&&!0!==Vv(iS,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(Vv(rS,this)||this.setupHandlePosition(t))}}function dS(e){Object(i["hasClass"])(e.target,"manualRowResizer")&&(this.setupHandlePosition(Vv(Kv,this)),this.setupGuidePosition(),Uv(rS,this,!0),null===Vv(oS,this)&&(Uv(oS,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(Vv(oS,this))),Uv(sS,this,Vv(sS,this)+1),Uv(Qv,this,e.pageY),Uv(Jv,this,Vv(Zv,this)))}function mS(e){Vv(rS,this)&&(Uv(qv,this,Vv(Zv,this)+(e.pageY-Vv(Qv,this))),Object(c["arrayEach"])(Vv($v,this),e=>{Uv(Jv,this,this.setManualSize(e,Vv(qv,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition())}function fS(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},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(Vv(rS,this)){if(this.hideHandleAndGuide(),Uv(rS,this,!1),Vv(Jv,this)!==Vv(Zv,this)){const n=Vv($v,this).length;n>1?(Object(c["arrayEach"])(Vv($v,this),e=>{t(e)}),e()):Object(c["arrayEach"])(Vv($v,this),e=>{t(e,!0)})}this.setupHandlePosition(Vv(Kv,this))}}function pS(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(Vv(tS,this)),this.hot.rootElement.removeChild(Vv(nS,this)),Uv(rS,this,!1),Uv(iS,this,!0),this.hot._registerImmediate(()=>{Uv(iS,this,!1)})}function gS(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),r=Vv(aS,this).getValueAtIndex(e);this.hot.getSettings()[Wv]&&r&&(n=r)}return n}function yS(){const e=this.hot.getSettings()[Wv],t=this.loadManualRowHeights();this.hot.batchExecution(()=>{"undefined"!==typeof t?t.forEach((e,t)=>{Vv(aS,this).setValueAtIndex(t,e)}):Array.isArray(e)?(e.forEach((e,t)=>{Vv(aS,this).setValueAtIndex(t,e)}),Uv(lS,this,e)):!0===e&&Array.isArray(Vv(lS,this))&&Vv(lS,this).forEach((e,t)=>{Vv(aS,this).setValueAtIndex(t,e)})},!0)}n("73d9");function wS(e,t,n){bS(e,t),t.set(e,n)}function bS(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=vS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vS(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 ES(e,t){return e.get(MS(e,t))}function CS(e,t,n){return e.set(MS(e,t),n),n}function MS(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 TS=new WeakMap;class RS{constructor(e,t,n,r,i,s){_S(this,"row",void 0),_S(this,"col",void 0),_S(this,"rowspan",void 0),_S(this,"colspan",void 0),_S(this,"removed",!1),_S(this,"cellCoordsFactory",void 0),_S(this,"cellRangeFactory",void 0),wS(this,TS,null),this.row=e,this.col=t,this.rowspan=n,this.colspan=r,this.cellCoordsFactory=i,this.cellRangeFactory=s}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:n,rowspan:r,colspan:i}=e;return xs["a"]`The merged cell declared with {row: ${t}, col: ${n},\x20
  204. rowspan: ${r}, colspan: ${i}} contains negative values, which is\x20
  205. not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:n}=e;return xs["a"]`The merged cell declared at [${t}, ${n}] is positioned\x20
  206. (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){let{row:t,col:n}=e;return xs["a"]`The merged cell declared at [${t}, ${n}] has both "rowspan"\x20
  207. and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){let{row:t,col:n}=e;return xs["a"]`The merged cell declared at [${t}, ${n}] has "rowspan"\x20
  208. or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){let{row:t,col:n,rowspan:r,colspan:i}=e;return t<0||n<0||r<0||i<0}static isSingleCell(e){let{rowspan:t,colspan:n}=e;return 1===n&&1===t}static containsZeroSpan(e){let{rowspan:t,colspan:n}=e;return 0===n||0===t}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),CS(TS,this,null)}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],u=this[s]+this[i]-1;if(l>=t&&(this[s]+=n),n>0)t<=u&&t>l&&(this[i]+=n);else if(n<0){if(o<=l&&a>=u)return this.removed=!0,CS(TS,this,null),!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&&u>=a)this[i]+=n;else if(l<=o&&u>=o&&u<a){const e=u-o+1;this[i]-=e}}return CS(TS,this,null),!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 ES(TS,this)||CS(TS,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),ES(TS,this)}}var OS=RS;function NS(e,t){LS(e,t),t.add(e)}function LS(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function AS(e,t,n){return(t=IS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IS(e){var t=kS(e,"string");return"symbol"==typeof t?t:t+""}function kS(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 xS(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 DS=new WeakSet;class HS{constructor(e){NS(this,DS),AS(this,"plugin",void 0),AS(this,"mergedCells",[]),AS(this,"mergedCellsMatrix",new Map),AS(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:n}=e;return xs["a"]`The merged cell declared at [${t}, ${n}], overlaps\x20
  209. with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
  210. fix your setup.`}get(e,t){var n;return!!this.mergedCellsMatrix.has(e)&&(null!==(n=this.mergedCellsMatrix.get(e).get(t))&&void 0!==n&&n)}getByRange(e){let t=!1;return Object(c["arrayEach"])(this.mergedCells,n=>!(n.row<=e.from.row&&n.row+n.rowspan-1>=e.to.row&&n.col<=e.from.col&&n.col+n.colspan-1>=e.to.col)||(t=n,t)),t}filterOverlappingMergeCells(e){const t=new Set;this.mergedCells.forEach(e=>{const{row:n,col:r,colspan:i,rowspan:s}=e;for(let o=n;o<n+s;o++)for(let e=r;e<r+i;e++)t.add(`r${o},c${e}`)});const n=e.filter(e=>{const{row:n,col:r,colspan:i,rowspan:s}=e,o=new Set;let a=!1;for(let l=n;l<n+s;l++){for(let n=r;n<r+i;n++){const r=`r${l},c${n}`;if(t.has(r)){Object(zr["b"])(HS.IS_OVERLAPPING_WARNING(e)),a=!0;break}o.add(r)}if(a)break}return a||t.add(...o),!a});return n}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:n,col:r}=e.getTopStartCorner(),{row:i,col:s}=e.getBottomEndCorner(),o=[];for(let a=n;a<=i;a++)for(let e=r;e<=s;e++){const n=this.get(a,e);n&&(t||!t&&n.row===a&&n.col===e)&&o.push(n)}return o}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.row,r=e.col,i=e.rowspan,s=e.colspan,o=new OS(n,r,i,s,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,r),l=!t&&this.isOverlapping(o);return a||l?(Object(zr["b"])(HS.IS_OVERLAPPING_WARNING(o)),!1):(this.hot&&o.normalize(this.hot),this.mergedCells.push(o),xS(DS,this,jS).call(this,o),o)}remove(e,t){const n=this.get(e,t),r=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===r)&&(this.mergedCells.splice(r,1),xS(DS,this,FS).call(this,n),n)}clear(){Object(c["arrayEach"])(this.mergedCells,e=>{let{row:t,col:n,rowspan:r,colspan:i}=e;Object(nt["rangeEach"])(t,t+r,e=>{Object(nt["rangeEach"])(n,n+i,t=>{const n=this.hot.getCell(e,t);n&&(n.removeAttribute("rowspan"),n.removeAttribute("colspan"),n.style.display="")})})}),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let n=0;n<this.mergedCells.length;n++){const e=this.mergedCells[n],r=e.getRange();if(r.overlaps(t))return!0}return!1}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=xS(DS,this,PS).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=xS(DS,this,PS).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=xS(DS,this,PS).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=xS(DS,this,PS).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:}const i=[];this.mergedCells.forEach(e=>{e.shift(r,t),e.removed&&i.push(e)}),i.forEach(e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)}),this.mergedCellsMatrix.clear(),this.mergedCells.forEach(e=>{xS(DS,this,jS).call(this,e)})}}function PS(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)})))}function jS(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.has(t)||this.mergedCellsMatrix.set(t,new Map),this.mergedCellsMatrix.get(t).set(n,e)}function FS(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.get(t).delete(n)}var YS=HS;function US(e,t,n){return(t=VS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VS(e){var t=BS(e,"string");return"symbol"==typeof t?t:t+""}function BS(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 WS{constructor(e){US(this,"plugin",void 0),US(this,"mergedCellsCollection",void 0),US(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,u]=e,h=["up","down"].indexOf(n)>-1,c=h?l-o+1:u-a+1,d=Math.floor(s/c)*c,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=u-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:c}),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,u,h]=t;switch(n){case"up":return r-a;case"down":return u-s;case"left":return i-l;case"right":return h-o;default:return null}}getDragArea(e,t,n){const[r,i,s,o]=e,[a,l,u,h]=t;switch(n){case"up":return[a,l,r-1,o];case"down":return[s+1,i,u,o];case"left":return[a,l,s,i-1];case"right":return[r,o+1,u,h];default:return null}}getFarthestCollection(e,t,n,r){const[i,s,o,a]=e,l=["up","down"].indexOf(n)>-1,u=l?o:a,h=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=u-p+1;break;case"left":g="includesHorizontally",w=u-p+1;break;case"down":g="includesVertically",w=h+p-1;break;case"right":g="includesHorizontally",w=h+p-1;break;default:}return Object(c["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(c["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),u=this.plugin.hot._createCellCoords(o,a),h=this.plugin.hot._createCellRange(l,l,u);return this.mergedCellsCollection.getWithinRange(h,!0).length>0}}var GS=WS;function zS(e,t,n){return(t=KS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KS(e){var t=XS(e,"string");return"symbol"==typeof t?t:t+""}function XS(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 $S{constructor(e){zS(this,"plugin",void 0),zS(this,"hot",void 0),zS(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 u=this.plugin.mergedCellsCollection.get(e,t);if(!u)return;const h=u.getLastRow(),c=u.getLastColumn(),d=i<=u.row&&s<=u.col&&o>=h&&a>=c;return d?`${this.fullySelectedMergedCellClassName}-${r}`:this.isMergeCellFullySelected(u,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 qS=$S;function JS(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(Pe["CONTEXTMENU_ITEMS_UNMERGE_CELLS"])}return this.getTranslatedPhrase(Pe["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=OS.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 QS(e,t,n){return(t=ZS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZS(e){var t=eE(e,"string");return"symbol"==typeof t?t:t+""}function eE(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 tE{constructor(e){QS(this,"data",void 0),QS(this,"next",null),QS(this,"prev",null),this.data=e}}class nE{constructor(){QS(this,"first",null),QS(this,"last",null)}push(e){const t=new tE(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 tE(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 rE=nE;function iE(e,t){oE(e,t),t.add(e)}function sE(e,t,n){oE(e,t),t.set(e,n)}function oE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aE(e,t){return e.get(uE(e,t))}function lE(e,t,n){return e.set(uE(e,t),n),n}function uE(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 hE=new WeakMap,cE=new WeakMap,dE=new WeakMap,mE=new WeakMap,fE=new WeakMap,pE=new WeakMap,gE=new WeakMap,yE=new WeakSet;class wE{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:r}=e;iE(this,yE),sE(this,hE,new rE),sE(this,cE,new rE),sE(this,dE,null),sE(this,mE,null),sE(this,fE,null),sE(this,pE,null),sE(this,gE,null),lE(fE,this,t),lE(pE,this,n),lE(gE,this,r)}getCurrentVerticalNode(){return aE(mE,this).data}getFirstVerticalNode(){return aE(cE,this).first.data}getNextVerticalNode(){return aE(mE,this).next.data}getPrevVerticalNode(){return aE(mE,this).prev.data}getCurrentHorizontalNode(){return aE(dE,this).data}getFirstHorizontalNode(){return aE(hE,this).first.data}getNextHorizontalNode(){return aE(dE,this).next.data}getPrevHorizontalNode(){return aE(dE,this).prev.data}setPrevNodeAsActive(){lE(mE,this,aE(mE,this).prev),lE(dE,this,aE(dE,this).prev)}setNextNodeAsActive(){lE(mE,this,aE(mE,this).next),lE(dE,this,aE(dE,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),r=new WeakSet;lE(hE,this,new rE);for(let s=t.row;s<=n.row;s++)if(!aE(pE,this).isHidden(s))for(let i=t.col;i<=n.col;i++){if(aE(gE,this).isHidden(i))continue;const t=uE(yE,this,bE).call(this,e,aE(hE,this),r,s,i);t&&lE(dE,this,t)}aE(hE,this).first&&(aE(hE,this).first.prev=aE(hE,this).last,aE(hE,this).last.next=aE(hE,this).first);const i=new WeakSet;lE(cE,this,new rE);for(let s=t.col;s<=n.col;s++)if(!aE(gE,this).isHidden(s))for(let r=t.row;r<=n.row;r++){if(aE(pE,this).isHidden(r))continue;const t=uE(yE,this,bE).call(this,e,aE(cE,this),i,r,s);t&&lE(mE,this,t)}aE(cE,this).first&&(aE(cE,this).first.prev=aE(cE,this).last,aE(cE,this).last.next=aE(cE,this).first)}setActiveNode(e,t){return aE(hE,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return lE(dE,this,n),!1}),aE(cE,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return lE(mE,this,n),!1}),this}}function bE(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=aE(fE,this).call(this,r,i);if(l&&n.has(l))return null;const u={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;u.colStart=l.col,u.colEnd=l.col+l.colspan-1,u.rowStart=l.row,u.rowEnd=l.row+l.rowspan-1}const h=t.push(u);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?h:null}function _E(e){const{hot:t}=e,{rowIndexMapper:n,columnIndexMapper:r}=t;function i(){}function s(t,i,s){const a=e.mergedCellsCollection.get(i,s);if(!Object(o["isObject"])(a))return t.removeAttribute("rowspan"),t.removeAttribute("colspan"),void(t.style.display="");const{row:l,col:u,colspan:h,rowspan:c}=a,[d,m]=e.translateMergedCellToRenderable(l,c,u,h),f=n.getRenderableFromVisualIndex(i),p=r.getRenderableFromVisualIndex(s),g=d-f+1,y=m-p+1,w=n.getNearestNotHiddenIndex(l,1),b=r.getNearestNotHiddenIndex(u,1),_=Math.min(c,g),v=Math.min(h,y);w===i&&b===s?(t.setAttribute("rowspan",_),t.setAttribute("colspan",v)):(t.removeAttribute("rowspan"),t.removeAttribute("colspan"),t.style.display="none")}return{before:i,after:s}}function vE(e,t){EE(e,t),t.add(e)}function SE(e,t,n){EE(e,t),t.set(e,n)}function EE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function CE(e,t,n){return(t=ME(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ME(e){var t=TE(e,"string");return"symbol"==typeof t?t:t+""}function TE(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 RE(e,t,n){return e.set(NE(e,t),n),n}function OE(e,t){return e.get(NE(e,t))}function NE(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 LE="mergeCells",AE=150,IE=LE;var kE=new WeakMap,xE=new WeakMap,DE=new WeakMap,HE=new WeakMap,PE=new WeakSet;class jE extends Zt["a"]{constructor(){super(...arguments),vE(this,PE),CE(this,"mergedCellsCollection",null),CE(this,"autofillCalculations",null),CE(this,"selectionCalculations",null),SE(this,kE,null),SE(this,xE,{row:0,col:0}),SE(this,DE,new wE({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),SE(this,HE,_E(this))}static get PLUGIN_KEY(){return LE}static get PLUGIN_PRIORITY(){return AE}isEnabled(){return!!this.hot.getSettings()[LE]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new YS(this),this.autofillCalculations=new GS(this),this.selectionCalculations=new qS(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NE(PE,e,FE).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 NE(PE,e,UE).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 NE(PE,e,VE).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 NE(PE,e,BE).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 NE(PE,e,WE).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 NE(PE,e,KE).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 NE(PE,e,KE).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 NE(PE,e,XE).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 NE(PE,e,$E).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 NE(PE,e,qE).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 NE(PE,e,GE).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 NE(PE,e,YE).call(e,...n)})),this.addHook("afterRenderer",(function(){return OE(HE,e).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NE(PE,e,zE).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 NE(PE,e,JE).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 NE(PE,e,QE).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 NE(PE,e,ZE).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 NE(PE,e,eC).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 NE(PE,e,tC).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 NE(PE,e,nC).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 NE(PE,e,rC).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 NE(PE,e,iC).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 NE(PE,e,sC).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 NE(PE,e,oC).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 NE(PE,e,aC).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 NE(PE,e,lC).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 NE(PE,e,uC).call(e,...n)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return NE(PE,e,hC).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()[LE];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){return!!e&&(OS.containsNegativeValues(e)?(Object(zr["b"])(OS.NEGATIVE_VALUES_WARNING(e)),!1):OS.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?(Object(zr["b"])(OS.IS_OUT_OF_BOUNDS_WARNING(e)),!1):OS.isSingleCell(e)?(Object(zr["b"])(OS.IS_SINGLE_CELL(e)),!1):!OS.containsZeroSpan(e)||(Object(zr["b"])(OS.ZERO_SPAN_WARNING(e)),!1))}generateFromSettings(e){if(!Array.isArray(e))return;const t=e.filter(e=>this.validateSetting(e)),n=this.mergedCellsCollection.filterOverlappingMergeCells(t),r=[];n.forEach(e=>{const{row:t,col:n,rowspan:i,colspan:s}=e,o=this.hot._createCellCoords(t,n),a=this.hot._createCellCoords(t+i-1,n+s-1),l=this.hot._createCellRange(o,o,a);this.mergeRange(l,!0,!0);for(let u=t;u<t+i;u++)for(let e=n;e<n+s;e++)u===t&&e===n||r.push([u,e,null])}),0!==r.length&&this.hot.setDataAtCell(r,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(nt["rangeEach"])(0,s.rowspan-1,e=>{Object(nt["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,t);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);0!==n.length&&(this.hot.runHooks("beforeUnmergeCells",e,t),Object(c["arrayEach"])(n,e=>{this.mergedCellsCollection.remove(e.row,e.col),Object(nt["rangeEach"])(0,e.rowspan-1,t=>{Object(nt["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:IE})}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(IE)}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,u=n>=0?s.getRenderableFromVisualIndex(a):n;return[l,u]}}function FE(){this.generateFromSettings(this.hot.getSettings()[LE]),this.hot.render()}function YE(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 UE(e){OE(xE,this).row=e.row,OE(xE,this).col=e.col}function VE(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:r,rowIndexMapper:i}=this.hot;OE(kE,this)&&(null!==i.getRenderableFromVisualIndex(OE(kE,this).row)&&(n.row=OE(kE,this).row),null!==r.getRenderableFromVisualIndex(OE(kE,this).col)&&(n.col=OE(kE,this).col),RE(kE,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,u=s.row+s.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=u?l-1:u,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<=u?u+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 BE(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 WE(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void RE(kE,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);RE(kE,this,t.clone()),n&&t.assign(n)}function GE(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 zE(e){e.items.push({name:"---------"},JS(this))}function KE(){RE(kE,this,null)}function XE(){if(OE(kE,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),n=e.getHorizontalDirection(),r=OE(kE,this).clone().normalize();OE(DE,this).setActiveNode(r.row,r.col),OE(xE,this).row>0||OE(xE,this).col>0?OE(DE,this).setPrevNodeAsActive():("E-W"===n&&OE(xE,this).col<0||"S-N"===t&&OE(xE,this).row<0)&&OE(DE,this).setNextNodeAsActive()}function $E(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:r,rowIndexMapper:i}=this.hot;let s=null,o=null;if(OE(xE,this).col<0){const{rowEnd:e,colEnd:t}=OE(DE,this).getPrevHorizontalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(OE(xE,this).col>0){const{rowStart:e,colStart:t}=OE(DE,this).getNextHorizontalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}else if(OE(xE,this).row<0){const{rowEnd:e,colEnd:t}=OE(DE,this).getPrevVerticalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(OE(xE,this).row>0){const{rowStart:e,colStart:t}=OE(DE,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()}OE(DE,this).setActiveNode(e,t),RE(xE,this,{row:0,col:0})}function qE(){const e=this.hot.getSelectedRangeLast();e.isHeader()||OE(DE,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function JE(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 QE(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function ZE(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function eC(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.hot._createCellCoords(t[0],t[1]),s=this.hot._createCellCoords(t[2],t[3]),o=this.hot._createCellRange(i,i,s),a=this.mergedCellsCollection.getWithinRange(o);return 0===a.length||(r=this.autofillCalculations.snapDragArea(t,r,n,a)),r}function tC(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function nC(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function rC(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}function iC(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function sC(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function oC(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),n=this.mergedCellsCollection.getWithinRange(t);Object(c["arrayEach"])(n,n=>{t.getBottomEndCorner().row===n.getLastRow()&&t.getBottomEndCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)})}}function aC(e,t,n,r){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}function lC(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function uC(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 hC(e,t,n){if(this.hot.getSettings().rowHeaders||"bottom"===n||"bottom_inline_start_corner"===n)return e;let r,i;if("master"===n)r=this.hot.view.getFirstRenderedVisibleColumn(),i=this.hot.view.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(n);r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}const s=this.mergedCellsCollection.get(t,r);if(!s)return e;const o=this.hot._createCellCoords(t,r),a=this.hot._createCellCoords(t,i),l=this.hot._createCellRange(o,o,a),u=this.mergedCellsCollection.getWithinRange(l),h=u.reduce((e,t)=>{let{rowspan:n}=t;return Math.max(e,n)},1);let c=0;return u.length>1&&u[0].rowspan<h&&(c=h-u[0].rowspan),u.forEach(r=>{var i;let{rowspan:s}=r,o=0;o="top"===n||"top_inline_start_corner"===n?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-t):s-c,e=Math.max(null!==(i=e)&&void 0!==i?i:0,NE(PE,this,cC).call(this,t,o))}),e}function cC(e,t){const n=this.hot.view._wt.wtSettings.getSettingPure("defaultRowHeight"),r=this.hot.getPlugin("autoRowSize");let i=0;for(let o=e;o<e+t;o++){var s;if(!this.hot.rowIndexMapper.isHidden(o))i+=null!==(s=null===r||void 0===r?void 0:r.getRowHeight(o))&&void 0!==s?s:n}return i}function dC(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],u=s[r],h=a.multiColumnSorting,c=h.compareFunctionFactory?h.compareFunctionFactory:Vi(a.type),d=c(o,a,h)(l,u);if(d===Bi){const e=r+1;if("undefined"!==typeof t[e])return n(e)}return d}(0)}}function mC(){Object(zr["b"])(xs["a"]`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
  211. Only \`multiColumnSorting\` will work. The \`columnSorting\` plugin will be disabled.`)}const fC="sort";function pC(e,t,n){const r=[];return!1===n||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&r.push(`${fC}-${e.getIndexOfColumnInSortQueue(t)+1}`),r}function gC(e){const t=e.className.split(" "),n=new RegExp(`^${fC}-[0-9]{1,2}$`);return t.filter(e=>n.test(e))}function yC(e,t,n){return(t=wC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wC(e){var t=bC(e,"string");return"symbol"==typeof t?t:t+""}function bC(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 _C="multiColumnSorting",vC=170,SC="columnSorting",EC=_C;Yi(_C,dC);class CC extends Cs{constructor(){super(...arguments),yC(this,"pluginKey",_C)}static get PLUGIN_KEY(){return _C}static get PLUGIN_PRIORITY(){return vC}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[SC]&&(mC(),this.hot.getPlugin(SC).disablePlugin()),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,_s)),!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:a["a"],position:"before",group:EC})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(EC)}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,gC(e)),!1!==this.enabled&&Object(i["addClass"])(e,pC(...n))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[SC]&&mC(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==ts(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,_s))):this.sort(this.getColumnNextConfig(t.col)))}}function MC(e,t,n){return(t=TC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TC(e){var t=RC(e,"string");return"symbol"==typeof t?t:t+""}function RC(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 OC="multipleSelectionHandles",NC=160;class LC extends Zt["a"]{constructor(){super(...arguments),MC(this,"dragged",[]),MC(this,"lastSetCell",null)}static get PLUGIN_KEY(){return OC}static get PLUGIN_PRIORITY(){return NC}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 u=n.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);u&&u!==e.lastSetCell&&("TD"!==u.nodeName&&"TH"!==u.nodeName||(r=e.hot.getCoords(u),-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=u),t.preventDefault())})}getCurrentRangeCoords(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let u={start:null,end:null};switch(n){case"NE-SW":switch(r){case"NE-SW":case"NW-SE":u="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&&(u={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?u={start:t,end:a}:u.end=t;break;case"NW-SE":"top"===i?u={start:t,end:o}:u.end=t;break;case"SE-NW":"top"===i?u={start:t,end:s}:u.end=t;break;case"SW-NE":"top"===i?u={start:t,end:l}:u.end=t;break;default:break}break;case"SW-NE":switch(r){case"NW-SE":u="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":u="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?u={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(s.row,t.col)}:"top"===i&&(u={start:a,end:t});break;default:break}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(u.end=t);break;case"SE-NW":"top"===i?u.end=t:u={start:t,end:s};break;default:break}break;default:break}return u}isDragged(){return this.dragged.length>0}}var AC=n("a309");function IC(){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,headerClassNames:u=[]}=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,headerClassNames:u}}function kC(){return{label:"",isPlaceholder:!0}}function xC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===t)return n;Object(c["arrayEach"])(e,e=>{const r=[];let i=0;n.push(r),Object(c["arrayEach"])(e,e=>{const n=IC();if(Object(o["isObject"])(e)){const{label:t,colspan:r,headerClassName:i}=e;n.label=Object(d["stringify"])(t),"number"===typeof r&&r>1&&(n.colspan=r,n.origColspan=r),"string"===typeof i&&(n.headerClassNames=[...i.split(" ")])}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(kC());return!s})});const r=Math.max(...Object(c["arrayMap"])(n,e=>e.length));return Object(c["arrayEach"])(n,e=>{if(e.length<r){const t=Object(c["arrayMap"])(new Array(r-e.length),()=>IC());e.splice(e.length,0,...t)}}),n}function DC(e,t,n){HC(e,t),t.set(e,n)}function HC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function PC(e,t){return e.get(FC(e,t))}function jC(e,t,n){return e.set(FC(e,t),n),n}function FC(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 YC=["label","collapsible"];var UC=new WeakMap,VC=new WeakMap,BC=new WeakMap;class WC{constructor(){DC(this,UC,[]),DC(this,VC,0),DC(this,BC,1/0)}setColumnsLimit(e){jC(BC,this,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];jC(UC,this,xC(e,PC(BC,this))),jC(VC,this,PC(UC,this).length)}getData(){return PC(UC,this)}mergeWith(e){Object(c["arrayEach"])(e,e=>{let{row:t,col:n,...r}=e;const i=this.getHeaderSettings(t,n);null!==i&&Object(o["extend"])(i,r,YC)})}map(e){Object(c["arrayEach"])(PC(UC,this),t=>{Object(c["arrayEach"])(t,t=>{const n=e({...t});Object(o["isObject"])(n)&&Object(o["extend"])(t,n,YC)})})}getHeaderSettings(e,t){var n;if(e>=PC(VC,this)||e<0)return null;const r=PC(UC,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>=PC(VC,this)||e<0)return r;const i=PC(UC,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 PC(VC,this)}getColumnsCount(){return PC(VC,this)>0?PC(UC,this)[0].length:0}clear(){jC(UC,this,[]),jC(VC,this,0)}}function GC(e,t,n){return(t=zC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zC(e){var t=KC(e,"string");return"symbol"==typeof t?t:t+""}function KC(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 XC="DF-pre-order";function $C(e,t){let n=e.call(t,this);for(let r=0;r<this.childs.length;r++){if(!1===n)return!1;n=$C.call(this.childs[r],e,t)}return n}const qC="DF-post-order";function JC(e,t){for(let n=0;n<this.childs.length;n++){const r=JC.call(this.childs[n],e,t);if(!1===r)return!1}return e.call(t,this)}const QC="BF";function ZC(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 eM=QC,tM=new Map([[XC,$C],[qC,JC],[QC,ZC]]);class nM{constructor(e){GC(this,"data",{}),GC(this,"parent",null),GC(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 nM({...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]:eM;if(!tM.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);tM.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 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){return e.get(aM(e,t))}function oM(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")}var lM=new WeakMap,uM=new WeakMap,hM=new WeakMap;class cM{constructor(e){rM(this,lM,new Map),rM(this,uM,new Map),rM(this,hM,null),oM(hM,this,e)}getRoots(){return Array.from(sM(lM,this).values())}getRootByColumn(e){let t;return sM(uM,this).has(e)&&(t=sM(lM,this).get(sM(uM,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const r=t-sM(uM,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;sM(uM,this).clear(),Object(c["arrayEach"])(sM(lM,this),t=>{let[,{data:{colspan:n}}]=t;for(let r=e;r<e+n;r++)sM(uM,this).set(r,e);e+=n})}buildTree(){this.clear();const e=sM(hM,this).getColumnsCount();let t=0;while(t<e){const e=sM(hM,this).getHeaderSettings(0,t),n=new nM;sM(lM,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=sM(hM,this).getHeadersSettings(n,t,r);n+=1,Object(c["arrayEach"])(i,r=>{const i={...r,headerLevel:n-1,columnIndex:t};let s;1===n?(e.data=i,s=e):(s=new nM(i),e.addChild(s)),n<sM(hM,this).getLayersCount()&&this.buildLeaves(s,t,n,r.origColspan),t+=r.origColspan})}clear(){sM(lM,this).clear(),sM(uM,this).clear()}}function dM(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 mM(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function fM(e){return mM(e,"origColspan")===e.data.origColspan}function pM(e){const{data:t,childs:n}=e;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const r=fM(e);if(r)return pM(n[0]);t.isCollapsed=!1;const i=n.slice(1),s=new Set;let o=0;if(i.length>0)Object(c["arrayEach"])(i,e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;o+=t.colspan,dM(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):fM(e)&&(t.isCollapsed=mM(e,"isCollapsed"))}),{rollbackModification:()=>gM(e),affectedColumns:Array.from(s),colspanCompensation:o}}function gM(e){var t;const{data:n,childs:r}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const i=fM(e);if(i)return gM(r[0]);n.isCollapsed=!0;const s=r.slice(1),o=new Set;if(s.length>0)Object(c["arrayEach"])(s,e=>{dM(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=mM(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):fM(e)&&(t.isCollapsed=mM(e,"isCollapsed"))}),{rollbackModification:()=>pM(e),affectedColumns:Array.from(o),colspanCompensation:a}}function yM(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(xs["a"]`The passed node is not the last node on the tree. Only for\x20
  212. 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 wM(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(xs["a"]`The passed node is not the last node on the tree. Only for\x20
  213. 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 bM=new Map([["collapse",gM],["expand",pM],["hide-column",yM],["show-column",wM]]);function _M(e,t,n){if(!bM.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return bM.get(e)(t,n)}function vM(e){const t=[];return Object(c["arrayEach"])(e,e=>{e.walkDown(e=>{const n=e.data,{origColspan:r,columnIndex:i,headerLevel:s,crossHiddenColumns:o}=n,a=EM(t,s);let l=!1;for(let t=i;t<i+r;t++){const e=o.includes(t);if(e||l)a.push(kC(n));else{const e=SM(n);e.isRoot=!0,a.push(e),l=!0}}})}),t}function SM(e){const{crossHiddenColumns:t,...n}=IC(e);return n}function EM(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}function CM(e,t,n){MM(e,t),t.set(e,n)}function MM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function TM(e,t,n){return e.set(OM(e,t),n),n}function RM(e,t){return e.get(OM(e,t))}function OM(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 NM=new WeakMap,LM=new WeakMap,AM=new WeakMap;class IM{constructor(){CM(this,NM,new WC),CM(this,LM,new cM(RM(NM,this))),CM(this,AM,[[]])}setState(e){RM(NM,this).setData(e);let t=!1;try{RM(LM,this).buildTree()}catch(n){RM(LM,this).clear(),RM(NM,this).clear(),t=!0}return TM(AM,this,vM(RM(LM,this).getRoots())),t}setColumnsLimit(e){RM(NM,this).setColumnsLimit(e)}mergeStateWith(e){const t=Object(c["arrayMap"])(e,e=>{let{row:t,...n}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...n}});RM(NM,this).mergeWith(t),RM(LM,this).buildTree(),TM(AM,this,vM(RM(LM,this).getRoots()))}mapState(e){RM(NM,this).map(e),RM(LM,this).buildTree(),TM(AM,this,vM(RM(LM,this).getRoots()))}mapNodes(e){return Object(c["arrayReduce"])(RM(LM,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=RM(LM,this).getNode(t,n);let i;return r&&(i=_M(e,r,n),TM(AM,this,vM(RM(LM,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=RM(AM,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=RM(LM,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=RM(LM,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)},XC)}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 RM(NM,this).getLayersCount()}getColumnsCount(){return RM(NM,this).getColumnsCount()}clear(){TM(AM,this,[]),RM(NM,this).clear(),RM(LM,this).clear()}}function kM(e,t,n){return(t=xM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xM(e){var t=DM(e,"string");return"symbol"==typeof t?t:t+""}function DM(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 HM{constructor(e,t){kM(this,"hot",void 0),kM(this,"nestedHeaderSettingsGetter",void 0),kM(this,"layersCount",0),kM(this,"container",void 0),kM(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"),u=this.nestedHeaderSettingsGetter(l,s);if(u&&(!u.isPlaceholder||u.isHidden)){let t=u.label;o&&(t+='<button class="changeType"></button>'),Object(i["fastInnerHTML"])(a,t),a.colSpan=u.colspan,e.appendChild(a)}}s.appendChild(e)}r.appendChild(s),e.appendChild(r)}clear(){this.widthsMap.clear(),this.container=null}}var PM=HM;function jM(e,t){BM(e,t),t.add(e)}function FM(e,t,n){return(t=YM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YM(e){var t=UM(e,"string");return"symbol"==typeof t?t:t+""}function UM(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 VM(e,t,n){BM(e,t),t.set(e,n)}function BM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function WM(e,t,n){return e.set(zM(e,t),n),n}function GM(e,t){return e.get(zM(e,t))}function zM(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 KM="nestedHeaders",XM=280;var $M=new WeakMap,qM=new WeakMap,JM=new WeakMap,QM=new WeakMap,ZM=new WeakSet;class eT extends Zt["a"]{constructor(){super(...arguments),jM(this,ZM),VM(this,$M,new IM),VM(this,qM,null),VM(this,JM,null),VM(this,QM,!1),FM(this,"ghostTable",new PM(this.hot,(e,t)=>this.getHeaderSettings(e,t))),FM(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return KM}static get PLUGIN_PRIORITY(){return XM}isEnabled(){return!!this.hot.getSettings()[KM]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||Object(zr["b"])(xs["a"]`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
  214. passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>zM(ZM,this,yT).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 zM(ZM,e,wT).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 zM(ZM,e,sT).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 zM(ZM,e,oT).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 zM(ZM,e,aT).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 zM(ZM,e,lT).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 zM(ZM,e,uT).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 zM(ZM,e,hT).call(e,...n)})),this.addHook("afterSelection",()=>zM(ZM,this,tT).call(this)),this.addHook("afterSelectionFocusSet",()=>zM(ZM,this,tT).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 zM(ZM,e,nT).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",e=>zM(ZM,this,dT).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 zM(ZM,e,fT).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 zM(ZM,e,pT).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 zM(ZM,e,rT).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 zM(ZM,e,iT).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 zM(ZM,e,cT).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 zM(ZM,e,mT).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 zM(ZM,e,gT).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",()=>zM(ZM,this,tT).call(this)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",()=>zM(ZM,this,tT).call(this)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();GM($M,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=GM($M,this).setState(e)),this.detectedOverlappedHeaders&&Object(zr["b"])(xs["a"]`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
  215. is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((e,t)=>{const n=!0===e?"hide-column":"show-column";GM($M,this).triggerColumnModification(n,t)}),!GM(qM,this)&&this.enabled&&WM(qM,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";GM($M,this).triggerColumnModification(e,n)}}),this.ghostTable.buildWidthsMap()})),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),GM($M,this).clear(),GM(qM,this).unsubscribe(),WM(qM,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return GM($M,this)}getLayersCount(){return GM($M,this).getLayersCount()}getHeaderSettings(e,t){return GM($M,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 u=a.getVisualFromRenderableIndex(r);null===u&&(u=r),s.removeAttribute("colspan"),Object(i["removeClass"])(s,"hiddenHeader");const{colspan:h,isHidden:c,isPlaceholder:d,headerClassNames:m}=null!==(o=GM($M,this).getHeaderSettings(e,u))&&void 0!==o?o:{label:""};if(d||c)Object(i["addClass"])(s,"hiddenHeader");else if(h>1){var f,p;const{wtOverlays:e}=l._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(s),i=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(s),o=t||i?Math.min(h,n-r):h;o>1&&s.setAttribute("colspan",o)}if(this.hot.view.appendColHeader(u,s,(function(){return t.getColumnHeaderValue(...arguments)}),e),!d&&!c){const e=s.querySelector("div.relative");e&&m&&m.length>0&&(Object(i["removeClass"])(e,this.hot.getColumnMeta(u).headerClassName),Object(i["addClass"])(e,m))}}}getColumnHeaderValue(e,t){var n;const{isHidden:r,isPlaceholder:i}=null!==(n=GM($M,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return i||r?"":this.hot.getColHeader(e,t)}destroy(){WM($M,this,null),null!==GM(qM,this)&&(GM(qM,this).unsubscribe(),WM(qM,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return GM($M,this).getHeaderTreeNodeData(e.row,e.col)}}function tT(){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=GM($M,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 nT(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=GM($M,this).findLeftMostColumnIndex(n.row,n.col),a=GM($M,this).findRightMostColumnIndex(n.row,n.col);return o<i&&a>s?e:o<i?o:a}function rT(e,t,n){const r=GM($M,this).getHeaderTreeNodeData(t,e);if(!r)return e;const{columnCursor:i,selectionType:s,selectionWidth:o}=n,{isRoot:a,colspan:l}=GM($M,this).getHeaderSettings(t,e);if(s===AC["g"]){if(!a)return r.columnIndex}else if(s===AC["a"]&&(l>o-i||!a))return null;return e}function iT(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,u=r-a+1;if(n>=0||1===u)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=GM($M,this).getHeaderTreeNodeData(s,t))||void 0===i?void 0:i.isRoot;!1===a&&(e[n][o]="")}}}function sT(e,t,n,r){const i=this._getHeaderTreeNodeDataByCoords(t);i&&(r.column=!0)}function oT(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;WM(JM,this,t.clone()),WM(QM,this,!0);const{selection:r}=this.hot,i=r.isSelected()?r.getSelectedRange().current():null,o=[],{columnIndex:a,origColspan:l}=n,u=!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)&&u||Object(s["isTouchEvent"])(e))&&o.push(a,a+l-1,t.row),r.selectColumns(...o)}function aT(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(),u=a.getBottomEndCorner(),{from:h}=a;r.column=!0,r.cell=!0;const c=[],d=Object(nt["clamp"])(t.row,-1/0,-1);t.col<h.col?c.push(u.col,s,d):t.col>h.col?c.push(l.col,s+o-1,d):c.push(s,s+o-1,d),this.hot.selection.selectColumns(...c)}function lT(){WM(QM,this,!1)}function uT(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!GM(QM,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,r=t.getBottomEndCorner().col,{columnIndex:i,origColspan:s}=GM($M,this).getHeaderTreeNodeData(GM(JM,this).row,GM(JM,this).col);if(t.setHighlight(GM(JM,this)),s>t.getWidth()||i<n||i+s-1>r){const e=GM($M,this).findTopMostEntireHeaderLevel(Object(nt["clamp"])(n,i,i+s-1),Object(nt["clamp"])(r,i,i+s-1));t.highlight.row=e,t.highlight.col=t.from.col}}function hT(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=GM($M,this).findLeftMostColumnIndex(n.row,n.col),s=GM($M,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 cT(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 dT(e){e.length=0;for(let t=0;t<GM($M,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function mT(e){const t=GM($M,this).getLayersCount();let n=e.startColumn,r=!!t;for(let i=0;i<t;i++){const t=GM($M,this).findLeftMostColumnIndex(i,e.startColumn),s=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(r=!1),Object(nt["isNumeric"])(s)&&s<e.startColumn){n=s;break}}e.startColumn=r?GM($M,this).getHeaderTreeNodeData(0,n).columnIndex:n}function fT(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function pT(e,t,n){var r;const{label:i}=null!==(r=GM($M,this).getHeaderTreeNodeData(n,t))&&void 0!==r?r:{label:""};return i}function gT(e,t){if(e<0)return this.hot.getCell(e,GM($M,this).findLeftMostColumnIndex(e,t),!0)}function yT(){this.updatePlugin()}function wT(e,t){t||this.updatePlugin()}function bT(e,t,n){return(t=_T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _T(e){var t=vT(e,"string");return"symbol"==typeof t?t:t+""}function vT(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 ST{constructor(e,t){bT(this,"hot",void 0),bT(this,"data",null),bT(this,"plugin",void 0),bT(this,"parentReference",new WeakMap),bT(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(nt["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(c["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(c["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(c["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(nt["rangeEach"])(e[0],e[2],e=>{const t=this.translateTrimmedRow(e);r.push(this.getDataObject(t))}),Object(nt["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),u=this.getRowIndex(l);let h=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){h=u+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 h=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",h-2,s+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",h-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(c["arrayEach"])(n,e=>{r.push(this.getDataObject(e))}),Object(c["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 u=i?this.getRowParent(t-1):this.getRowParent(t);null!==u&&void 0!==u||(u=this.getRowParent(t-1)),null!==u&&void 0!==u||(u=this.getDataObject(t-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(t),u.__children=[]);const h=i||n||r?u.__children.length:this.getRowIndexWithinParent(t),c=s===u;u.__children.splice(h,0,a[0]),s.__children.splice(o+(l&&c?1:0),1),this.syncRowWithRawSource(s),c||this.syncRowWithRawSource(u)}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 ET=ST;function CT(e,t,n){return(t=MT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MT(e){var t=TT(e,"string");return"symbol"==typeof t?t:t+""}function TT(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,"hot",void 0),CT(this,"plugin",void 0),this.hot=t,this.plugin=e}}var OT=RT;class NT extends OT{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"]'),u=this.hot.getSettings().ariaTags;if(Object(c["arrayEach"])(l,e=>{e&&o.removeChild(e)}),Object(i["addClass"])(t,NT.CSS_CLASSES.indicatorContainer),r){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);o.innerHTML="",Object(nt["rangeEach"])(0,r-1,()=>{const t=e.createElement("SPAN");Object(i["addClass"])(t,NT.CSS_CLASSES.emptyIndicator),o.appendChild(t)}),o.appendChild(t)}if(this.dataManager.hasChildren(s)){const e=this.hot.rootDocument.createElement("DIV");u&&Object(i["setAttribute"])(e,[Object(y["n"])()]),Object(i["addClass"])(t,NT.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(Object(i["addClass"])(e,`${NT.CSS_CLASSES.button} ${NT.CSS_CLASSES.expandButton}`),u&&Object(i["setAttribute"])(t,[Object(y["k"])(!1)])):(Object(i["addClass"])(e,`${NT.CSS_CLASSES.button} ${NT.CSS_CLASSES.collapseButton}`),u&&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 LT=NT;class AT extends OT{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(c["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(nt["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(c["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(c["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(c["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(c["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(c["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(c["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(c["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(c["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(c["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];Object(c["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution(()=>{Object(c["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)})},!0)}untrimRows(e){this.hot.batchExecution(()=>{Object(c["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(c["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,LT.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 IT=AT;function kT(e,t,n){xT(e,t),t.set(e,n)}function xT(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DT(e,t,n){return(t=HT(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)}function jT(e,t){return e.get(FT(e,t))}function FT(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 YT=new WeakMap;class UT extends OT{constructor(){super(...arguments),DT(this,"dataManager",this.plugin.dataManager),kT(this,YT,{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(Pe["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(Pe["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(nt["rangeEach"])(0,e.items.length-1,n=>{if(0===n)return Object(c["arrayEach"])(t,(t,r)=>{e.items.splice(n+r,0,t)}),!1}),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return Object(nt["rangeEach"])(0,e.items.length-1,t=>{const n=jT(YT,this)[e.items[t].key];null!==n&&void 0!==n&&(e.items[t].callback=n)}),e}}var VT=UT;function BT(e,t,n){return(t=WT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WT(e){var t=GT(e,"string");return"symbol"==typeof t?t:t+""}function GT(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 zT{constructor(e){BT(this,"plugin",void 0),BT(this,"hot",void 0),BT(this,"dataManager",void 0),BT(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}),u=-1===l.indexOf(o);if(!a||!u)return!1;const h=this.getBaseParent(l),c=this.getTargetParent(s,o),d=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,o,d),this.moveRows(l,o,c),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(zr["b"])(xs["a"]`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
  216. 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 KT(e,t){$T(e,t),t.add(e)}function XT(e,t,n){$T(e,t),t.set(e,n)}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))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){return e.get(tR(e,t))}function eR(e,t,n){return e.set(tR(e,t),n),n}function tR(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 nR="nestedRows",rR=300,iR=nR,sR="The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled.";var oR=new WeakMap,aR=new WeakMap,lR=new WeakSet;class uR extends Zt["a"]{constructor(){super(...arguments),KT(this,lR),qT(this,"dataManager",null),qT(this,"headersUI",null),qT(this,"collapsedRowsMap",null),XT(this,oR,!1),XT(this,aR,!1)}static get PLUGIN_KEY(){return nR}static get PLUGIN_PRIORITY(){return rR}isEnabled(){return!!this.hot.getSettings()[nR]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new rg["a"]),this.dataManager=new ET(this,this.hot),this.collapsingUI=new IT(this,this.hot),this.headersUI=new LT(this,this.hot),this.contextMenuUI=new VT(this,this.hot),this.rowMoveController=new zT(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return tR(lR,e,ER).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 tR(lR,e,CR).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 tR(lR,e,dR).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 tR(lR,e,mR).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 tR(lR,e,fR).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 tR(lR,e,cR).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 tR(lR,e,yR).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 tR(lR,e,gR).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 tR(lR,e,wR).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 tR(lR,e,bR).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 tR(lR,e,_R).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 tR(lR,e,vR).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 tR(lR,e,pR).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 tR(lR,e,SR).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 tR(lR,e,hR).call(e,...n)})),this.addHook("beforeLoadData",e=>tR(lR,this,MR).call(this,e)),this.addHook("beforeUpdateData",e=>tR(lR,this,MR).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:iR,relativeToGroup:a["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(iR)}disableCoreAPIModifiers(){eR(aR,this,!0)}enableCoreAPIModifiers(){eR(aR,this,!1)}onModifyRowData(e){if(!ZT(aR,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!ZT(aR,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!ZT(aR,this)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,n),!1)}destroy(){super.destroy()}}function hR(e,t,n,r){return this.rowMoveController.onBeforeRowMove(e,t,n,r)}function cR(e,t,n){this.collapsingUI.toggleState(e,t,n)}function dR(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),eR(oR,this,!0),this.dataManager.getData().slice()}function mR(e){return this.contextMenuUI.appendOptions(e)}function fR(e,t){this.headersUI.appendLevelIndicators(e,t)}function pR(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function gR(e,t,n,r){r!==this.pluginName&&this.hot._registerTimeout(()=>{eR(oR,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function yR(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 wR(){this.collapsingUI.collapsedRowsStash.stash()}function bR(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function _R(){this.collapsingUI.collapsedRowsStash.stash()}function vR(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function SR(){this.dataManager.rewriteCache()}function ER(){this.headersUI.updateRowHeaderWidth()}function CR(e,t){ZT(oR,this)&&(t.skipRender=!0)}function MR(e){if(!Object(kf["isArrayOfObjects"])(e))return Object(zr["a"])(sR),this.hot.getSettings()[nR]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function TR(e,t,n){return(t=RR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RR(e){var t=OR(e,"string");return"symbol"==typeof t?t:t+""}function OR(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 NR{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;TR(this,"rootWindow",void 0),TR(this,"prefix",void 0),TR(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(c["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 LR=NR;function AR(e,t,n){return(t=IR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IR(e){var t=kR(e,"string");return"symbol"==typeof t?t:t+""}function kR(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 xR="persistentState",DR=0;class HR extends Zt["a"]{constructor(){super(...arguments),AR(this,"storage",void 0)}static get PLUGIN_KEY(){return xR}static get PLUGIN_PRIORITY(){return DR}isEnabled(){return!!this.hot.getSettings()[xR]}enablePlugin(){this.enabled||(this.storage||(this.storage=new LR(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 PR(e,t){jR(e,t),t.add(e)}function jR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FR(e,t,n){return(t=YR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YR(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 VR(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 BR="search",WR=190,GR="htSearchResult",zR=function(e,t,n,r,i){e.getCellMeta(t,n).isSearchResult=i},KR=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 XR=new WeakSet;class $R extends Zt["a"]{constructor(){super(...arguments),PR(this,XR),FR(this,"callback",zR),FR(this,"queryMethod",KR),FR(this,"searchResultClass",GR)}static get PLUGIN_KEY(){return BR}static get PLUGIN_PRIORITY(){return WR}isEnabled(){return this.hot.getSettings()[BR]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[BR];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 VR(XR,e,qR).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 VR(XR,e,qR).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(nt["rangeEach"])(0,r-1,r=>{Object(nt["rangeEach"])(0,i-1,i=>{const a=this.hot.getDataAtCell(r,i),l=this.hot.getCellMeta(r,i),u=l.search.callback||t,h=l.search.queryMethod||n,c=h(e,a,l);if(c){const e={row:r,col:i,data:a};s.push(e)}u&&u(o,r,i,a,c)})}),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 qR(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 JR(e,t){QR(e,t),t.add(e)}function QR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ZR(e,t,n){return(t=eO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eO(e){var t=tO(e,"string");return"symbol"==typeof t?t:t+""}function tO(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 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")}const rO="touchScroll",iO=200;var sO=new WeakSet;class oO extends Zt["a"]{constructor(){super(...arguments),JR(this,sO),ZR(this,"scrollbars",[]),ZR(this,"clones",[]),ZR(this,"lockedCollection",!1),ZR(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return rO}static get PLUGIN_PRIORITY(){return iO}static get SETTING_KEYS(){return!0}isEnabled(){return Object(en["isTouchSupported"])()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",()=>nO(sO,this,aO).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>nO(sO,this,lO).call(this)),this.addHook("afterMomentumScroll",()=>nO(sO,this,uO).call(this))}}function aO(){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 lO(){this.freezeOverlays=!0,Object(c["arrayEach"])(this.clones,e=>{Object(i["addClass"])(e,"hide-tween")})}function uO(){this.freezeOverlays=!1,Object(c["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"hide-tween"),Object(i["addClass"])(e,"show-tween")}),this.hot._registerTimeout(()=>{Object(c["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"show-tween")})},400),Object(c["arrayEach"])(this.scrollbars,e=>{e.refresh(),e.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}function hO(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 dO(e,t,n){return(t=mO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mO(e){var t=fO(e,"string");return"symbol"==typeof t?t:t+""}function fO(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 pO(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 gO="trimRows",yO=330;var wO=new WeakSet;class bO extends Zt["a"]{constructor(){super(...arguments),hO(this,wO),dO(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return gO}static get PLUGIN_PRIORITY(){return yO}isEnabled(){return!!this.hot.getSettings()[gO]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new rg["a"]),this.trimmedRowsMap.addLocalHook("init",()=>pO(wO,this,_O).call(this)),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[gO];Array.isArray(e)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),Object(c["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(c["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(c["arrayEach"])(e,e=>{i[e]=!1}),r=Object(c["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 _O(){const e=this.hot.getSettings()[gO];Array.isArray(e)&&this.hot.batchExecution(()=>{Object(c["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0)}n("c1f9");const vO="undoRedo",SO="undoRedo";function EO(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(c["arrayEach"])(t,t=>{t[1]=e.propToCol(t[1])});const r=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new EO.ChangeAction(t,r)};t.done(o,r)})),e.addHook("afterCreateRow",(e,n,r)=>{t.done(()=>new EO.CreateRowAction(e,n),r)});const n=(t,n,r,i)=>{const s=["visualRow","visualCol","row","col","prop"],o=s.length,a=[];return Object(nt["rangeEach"])(r,i,r=>{Object(nt["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 EO.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 EO.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=[],u=[],h=[];Object(nt["rangeEach"])(s.length-1,t=>{const n=[],r=s[t];Object(nt["rangeEach"])(o,a,t=>{n.push(r[e.toPhysicalColumn(t)])}),l.push(n)}),Object(nt["rangeEach"])(i-1,t=>{h.push(e.toPhysicalColumn(o+t))}),Array.isArray(e.getSettings().colHeaders)&&Object(nt["rangeEach"])(i-1,t=>{u.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)});const c=e.columnIndexMapper.getIndexesSequence(),d=e.rowIndexMapper.getIndexesSequence();return new EO.RemoveColumnAction(o,h,l,u,c,d,e.getSettings().fixedColumnsStart,n(0,e.countRows(),o,a))};t.done(a,o)}),e.addHook("beforeCellAlignment",(e,n,r,i)=>{t.done(()=>new EO.CellAlignmentAction(e,n,r,i))}),e.addHook("beforeFilter",(e,n)=>{t.done(()=>new EO.FiltersAction(e,n))}),e.addHook("beforeRowMove",(e,n)=>{!1!==e&&t.done(()=>new EO.RowMoveAction(e,n))}),e.addHook("beforeColumnMove",(e,n)=>{!1!==e&&t.done(()=>new EO.ColumnMoveAction(e,n))}),e.addHook("beforeMergeCells",(n,r)=>{r||t.done(()=>new EO.MergeCellsAction(e,n))}),e.addHook("afterUnmergeCells",(n,r)=>{r||t.done(()=>new EO.UnmergeCellsAction(e,n))}),e.addHook("beforeColumnSort",(e,n,r)=>{r&&t.done(()=>new EO.ColumnSortAction(e,n))}),e.addHook("afterInit",()=>{t.init()})}EO.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())},EO.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)}},EO.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)}},EO.prototype.isUndoAvailable=function(){return this.doneActions.length>0},EO.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},EO.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},EO.prototype.isEnabled=function(){return this.enabled},EO.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;this.enabled=!0,RO(e),this.registerShortcuts(),e.addHook("afterChange",TO)},EO.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;this.enabled=!1,OO(e),this.unregisterShortcuts(),e.removeHook("afterChange",TO)},EO.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},EO.Action=function(){},EO.Action.prototype.undo=function(){},EO.Action.prototype.redo=function(){},EO.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},Object(o["inherit"])(EO.ChangeAction,EO.Action),EO.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(),u=t>=a,h=r>=l,c=u&&h,d=i!==t||o!==r;if(!1===c&&!0===d){const n={row:t,col:r};!1===u&&(n.verticalSnap="top"),!1===h&&(n.horizontalSnap="start"),e.scrollViewportTo(n)}}e.selectCells(this.selected,!1,!1)},EO.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)},EO.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},Object(o["inherit"])(EO.CreateRowAction,EO.Action),EO.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")},EO.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},EO.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"])(EO.RemoveRowAction,EO.Action),EO.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)},EO.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},EO.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},Object(o["inherit"])(EO.CreateColumnAction,EO.Action),EO.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},EO.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},EO.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"])(EO.RemoveColumnAction,EO.Action),EO.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 u=0;u<s;u++)o.push(Object(c["arrayMap"])(this.data[u],i));const a=Object(c["arrayMap"])(this.headers,i),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),Object(c["arrayEach"])(e.getSourceDataArray(),(e,t)=>{Object(c["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(c["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()},EO.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},EO.CellAlignmentAction=function(e,t,n,r){this.stateBefore=e,this.range=t,this.type=n,this.alignment=r},EO.CellAlignmentAction.prototype.undo=function(e,t){Object(c["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()},EO.CellAlignmentAction.prototype.redo=function(e,t){jo(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()},EO.FiltersAction=function(e,t){this.previousConditionsStack=t,this.conditionsStack=e,this.actionType="filter"},Object(o["inherit"])(EO.FiltersAction,EO.Action),EO.FiltersAction.prototype.undo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),this.previousConditionsStack&&n.conditionCollection.importAllConditions(this.previousConditionsStack),n.filter()},EO.FiltersAction.prototype.redo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()};class CO extends EO.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)}}EO.MergeCellsAction=CO;class MO extends EO.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 TO(e,t){const n=this;if("loadData"===t)return n.undoRedo.clear()}function RO(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 OO(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}EO.UnmergeCellsAction=MO,EO.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},Object(o["inherit"])(EO.RowMoveAction,EO.Action),EO.RowMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);const r=ry(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)},EO.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)},EO.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},Object(o["inherit"])(EO.ColumnMoveAction,EO.Action),EO.ColumnMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);const r=ry(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)},EO.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)},EO.ColumnSortAction=function(e,t){this.previousSortState=e,this.nextSortState=t},Object(o["inherit"])(EO.ColumnSortAction,EO.Action),EO.ColumnSortAction.prototype.undo=function(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),i=r.isEnabled()?r:n;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),t()},EO.ColumnSortAction.prototype.redo=function(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),i=r.isEnabled()?r:n;i.sort(this.nextSortState),t()},EO.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()},EO.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid"),n=e=>!e.altKey,r={runOnlyIf:n,group:vO};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],r)},EO.prototype.unregisterShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(vO)};const NO=fe["a"].getSingleton();NO.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),NO.register("beforeUndo"),NO.register("afterUndo"),NO.register("beforeRedo"),NO.register("afterRedo"),EO.PLUGIN_KEY=SO,EO.SETTING_KEYS=!0;var LO=EO,AO=n("24b5");function IO(){Object(AO["d"])(Mn),Object(AO["d"])(Xn),Object(AO["d"])(fr),Object(AO["d"])(Wr),Object(AO["d"])(hi),Object(AO["d"])(Cs),Object(AO["d"])(Gs),Object(AO["d"])(ga),Object(AO["d"])(gu),Object(AO["d"])(ph),Object(AO["d"])(ec),Object(AO["d"])(dc),Object(AO["d"])(Nc),Object(AO["d"])(sd),Object(AO["d"])(wg),Object(AO["d"])($y),Object(AO["d"])(xw),Object(AO["d"])(eb),Object(AO["d"])(bb),Object(AO["d"])(a_),Object(AO["d"])(Y_),Object(AO["d"])(Lv),Object(AO["d"])(hS),Object(AO["d"])(jE),Object(AO["d"])(CC),Object(AO["d"])(LC),Object(AO["d"])(eT),Object(AO["d"])(uR),Object(AO["d"])(HR),Object(AO["d"])($R),Object(AO["d"])(oO),Object(AO["d"])(bO),Object(AO["d"])(LO)}function kO(){Oe(),mt(),Nt(),Qt(),IO()}},"8d47":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  217. //! moment.js locale configuration
  218. 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";
  219. //! moment.js locale configuration
  220. 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";
  221. //! moment.js locale configuration
  222. 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}))},"8e16":function(e,t,n){"use strict";var r=n("7282"),i=n("cb27");e.exports=r(i.proto,"size","get")||function(e){return e.size}},"8e73":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  223. //! moment.js locale configuration
  224. 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";
  225. //! moment.js locale configuration
  226. 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}))},9056:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n("d9e2");var r=n("1096"),i=n("e90f"),s=n("3d57"),o=n("a73f"),a=n("97b9");function l(e,t,n){return(t=u(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)}class c 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";
  227. //! moment.js locale configuration
  228. 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}))},"953b":function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27"),s=n("8e16"),o=n("7f65"),a=n("384f"),l=n("5388"),u=i.Set,h=i.add,c=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new u;return s(t)>n.size?l(n.getIterator(),(function(e){c(t,e)&&h(i,e)})):a(t,(function(e){n.includes(e)&&h(i,e)})),i}},"957c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  229. //! moment.js locale configuration
  230. 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}))},"958b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  231. //! moment.js locale configuration
  232. 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";
  233. //! moment.js locale configuration
  234. 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}))},9686:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  235. //! moment.js locale configuration
  236. 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}))},"972c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  237. //! moment.js locale configuration
  238. 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";
  239. //! moment.js locale configuration
  240. 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 u})),n.d(t,"partial",(function(){return h})),n.d(t,"curry",(function(){return c})),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 u=!1;r.lastCallThrottled=!0,n||(n=l,u=!0);const h=t-(l-n);return u?(r.lastCallThrottled=!1,e.apply(this,o)):(i&&clearTimeout(i),i=setTimeout(()=>{r.lastCallThrottled=!1,e.apply(this,o),n=0,i=void 0},h)),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 u(){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 h(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 c(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)}},9961:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27"),s=n("83b9e"),o=n("7f65"),a=n("5388"),l=i.add,u=i.has,h=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=s(t);return a(n,(function(e){u(t,e)?h(i,e):l(i,e)})),i}},"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}}},"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";
  241. //! moment.js locale configuration
  242. 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 u})),n.d(t,"d",(function(){return h}));const r="active-header",i="header",s="area",o="focus",a="fill",l="row",u="column",h="custom-selection"},a356:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  243. //! moment.js locale configuration
  244. 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}))},a357:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("14d9");var r=n("5d7f"),i=n("8828");const s="base";function o(e,t,n,s,o,a,l){const u=l.ariaTags,h=[],c=[],d=[],m=[];l.className&&Object(r["addClass"])(t,l.className),l.readOnly?(h.push(l.readOnlyCellClassName),u&&m.push(Object(i["z"])())):u&&d.push(Object(i["z"])()[0]),!1===l.valid&&l.invalidCellClassName?(h.push(l.invalidCellClassName),u&&m.push(Object(i["o"])())):(c.push(l.invalidCellClassName),u&&d.push(Object(i["o"])()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&h.push(l.noWordWrapClassName),!a&&l.placeholder&&h.push(l.placeholderCellClassName),Object(r["removeClass"])(t,c),Object(r["addClass"])(t,h),Object(r["removeAttribute"])(t,d),Object(r["setAttribute"])(t,m)}o.RENDERER_TYPE=s},a4e7:function(e,t,n){"use strict";var r=n("23e7"),i=n("395e"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("isSupersetOf")},{isSupersetOf:i})},a5f7:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27"),s=n("83b9e"),o=n("8e16"),a=n("7f65"),l=n("384f"),u=n("5388"),h=i.has,c=i.remove;e.exports=function(e){var t=r(this),n=a(e),i=s(t);return o(t)<=n.size?l(t,(function(e){n.includes(e)&&c(i,e)})):u(n.getIterator(),(function(e){h(t,e)&&c(i,e)})),i}},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 u}));n("14d9"),n("5b81");var r=n("7b9c");const i={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},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>"],u=t?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],c=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-c)}</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-c);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("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");l=`<td ${e.join(" ")}>${t}</td>`}}}o.push(l)}const l=["<tr>",...o,"</tr>"].join("");i?u.splice(1,0,l):h.splice(-1,0,l)}return l.splice(1,0,u.join(""),h.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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`).replace(/\t/gi,"&#9;");a.push(`<td>${n}</td>`)}n.push("<tr>",...a,"</tr>"),i+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")}function u(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(/^&nbsp;$/gm,""),i="</td>";return`${t}${r}${i}`});a.insertAdjacentHTML("afterbegin",""+e),l=a.querySelector("table")}if(!l||!o(l))return;const u=a.querySelector('meta[name$="enerator"]'),h=null!==l.querySelector("tbody th"),c=l.querySelector("tr"),d=c?Array.from(c.cells).reduce((e,t)=>e+t.colSpan,0)-(h?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(h&&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)=>(h&&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:h}=e,c=b[o].findIndex(e=>void 0===e);if("TD"===n){if(l>1||h>1){for(let e=o;e<o+l;e++)if(e<y)for(let t=c;t<c+h;t++)b[e][t]=null;const t=e.getAttribute("style"),n=t&&t.includes("mso-ignore:colspan");n||_.push({col:c,row:o,rowspan:l,colspan:h})}let t="";t=u&&/excel/gi.test(u.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][c]=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";
  245. //! moment.js locale configuration
  246. 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("d9e2"),n("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");var r=n("d852"),i=n("81ea"),s=n("7b9c");const o=0,a=1,l=2,u=3,h=[u,l],c=[["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=u;else if(i&&Array.isArray(t))s=f(t,m);else if(e.length>=2&&e.length<=4){const t=!e.some((e,t)=>!c[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(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(o){const a=e===u;let l=a?o.from.row:o[0],h=a?o.from.col:o[1],c=a?o.to.row:o[2],d=a?o.to.col:o[3];if("function"===typeof i&&("string"===typeof h&&(h=i(h)),"string"===typeof d&&(d=i(d))),Object(s["isUndefined"])(c)&&(c=l),Object(s["isUndefined"])(d)&&(d=h),!r){const e=l,t=h,n=c,r=d;l=Math.min(e,n),h=Math.min(t,r),c=Math.max(e,n),d=Math.max(t,r)}const m=t(l,h),f=t(c,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}},aaf2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  247. //! moment.js locale configuration
  248. 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}))},ada2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  249. //! moment.js locale configuration
  250. 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}))},b29d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  251. //! moment.js locale configuration
  252. 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}))},b3eb:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  253. //! moment.js locale configuration
  254. 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";
  255. //! moment.js locale configuration
  256. 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}))},b4bc:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27").has,s=n("8e16"),o=n("7f65"),a=n("384f"),l=n("5388"),u=n("2a62");e.exports=function(e){var t=r(this),n=o(e);if(s(t)<=n.size)return!1!==a(t,(function(e){if(n.includes(e))return!1}),!0);var h=n.getIterator();return!1!==l(h,(function(e){if(i(t,e))return u(h,"normal",!1)}))}},b53d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  257. //! moment.js locale configuration
  258. 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}))},b540:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  259. //! moment.js locale configuration
  260. 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";
  261. //! moment.js locale configuration
  262. 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";
  263. //! moment.js locale configuration
  264. 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";
  265. //! moment.js locale configuration
  266. 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}))},b97c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  267. //! moment.js locale configuration
  268. 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}))},bb71:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  269. //! moment.js locale configuration
  270. 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}))},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("d9e2");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)}},c0d8:function(e,t,n){"use strict";n("d9e2"),n("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3"),n("130f");var r=n("5d7f"),i=n("97b9"),s=n("7b9c"),o=n("63d8"),a=n("f938"),l=n("de3b"),u=n("491c"),h=n("87d6");function c(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(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 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")}var y=new WeakSet;class w{constructor(e,t,n){c(this,y),m(this,"hot",void 0),m(this,"tableMeta",void 0),m(this,"selection",void 0),m(this,"eventManager",void 0),m(this,"destroyed",!1),m(this,"activeEditor",void 0),m(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=n,this.eventManager=new h["a"](e),this.hot.addHook("afterDocumentKeyDown",e=>g(y,this,b).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)=>g(y,this,_).call(this,e,t,n))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;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 s=n,o=r;if(Array.isArray(i)&&([s,o]=i),this.cellProperties=this.hot.getCellMeta(s,o),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(n,r,!0);if(a){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(o),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s),o);this.activeEditor=Object(u["b"])(e,this.hot),this.activeEditor.prepare(n,r,t,a,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 b(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||Object(l["isImmediatePropagationStopped"])(e))return;const{keyCode:n}=e,r=(e.ctrlKey||e.metaKey)&&!e.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&(Object(a["isFunctionKey"])(n)||Object(a["isCtrlMetaKey"])(n)||r||this.isEditorOpened()||this.openEditor("",e))}function _(e,t){t.isCell()&&this.openEditor(null,e,!0)}const v=new WeakMap;w.getInstance=function(e,t,n){let r=v.get(e);return r||(r=new w(e,t,n),v.set(e,r)),r};var S=w,E=n("351d"),C=n("bd5e");function M(e,t){R(e,t),t.add(e)}function T(e,t,n){R(e,t),t.set(e,n)}function R(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function O(e,t){return e.get(L(e,t))}function N(e,t,n){return e.set(L(e,t),n),n}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 A=Object.freeze({CELL:"cell",MIXED:"mixed"});var I=new WeakMap,k=new WeakMap,x=new WeakMap,D=new WeakMap,H=new WeakMap,P=new WeakSet;class j{constructor(e){var t=this;M(this,P),T(this,I,void 0),T(this,k,void 0),T(this,x,1),T(this,D,null),T(this,H,new Map);const n=e.getSettings();N(I,this,e),N(k,this,n.imeFastEdit?A.MIXED:A.CELL),O(I,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return L(P,t,V).call(t,...n)})),O(I,this).addHook("afterSelection",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return L(P,t,Y).call(t,...n)})),O(I,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return L(P,t,Y).call(t,...n)})),O(I,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return L(P,t,U).call(t,...n)}))}getFocusMode(){return O(k,this)}setFocusMode(e){Object.values(A).includes(e)?N(k,this,e):Object(C["b"])(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return O(x,this)}setRefocusDelay(e){N(x,this,e)}setRefocusElementGetter(e){N(D,this,e)}getRefocusElement(){return"function"===typeof O(D,this)?O(D,this).call(this):null===(e=O(I,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,n;const r=null===(t=O(I,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r)return;let i=O(I,this).runHooks("modifyFocusedElement",r.row,r.col,e);i instanceof HTMLElement||(i=e),!i||null!==(n=O(I,this).getActiveEditor())&&void 0!==n&&n.isOpened()||i.focus({preventScroll:!0})};e?t(e):L(P,this,F).call(this,e=>t(e))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O(x,this);const n=this.getRefocusElement();!O(I,this).getSettings().imeFastEdit||null!==(e=O(I,this).getActiveEditor())&&void 0!==e&&e.isOpened()||!n||(O(H,this).has(t)||O(H,this).set(t,Object(i["debounce"])(()=>{n.select()},t)),O(H,this).get(t)())}}function F(e){var t;const n=null===(t=O(I,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n||!O(I,this).selection.isCellVisible(n))return void e(null);const r=O(I,this).getCell(n.row,n.col,!0);null===r?O(I,this).addHookOnce("afterScroll",()=>{e(O(I,this).getCell(n.row,n.col,!0))}):e(r)}function Y(){L(P,this,F).call(this,e=>{const{activeElement:t}=O(I,this).rootDocument;t&&Object(r["isOutsideInput"])(t)&&t.blur(),this.focusOnHighlightedCell(e)})}function U(){L(P,this,F).call(this,e=>{this.getFocusMode()===A.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()})}function V(e){"boolean"===typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?A.MIXED:A.CELL)}var B=n("81ea"),W=n("a776"),G=n("24b5"),z=n("3d76"),K=n("169f"),X=n("29b0"),$=n("ffec"),q=n("7dd0");function J(e,t,n){Q(e,t),t.set(e,n)}function Q(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Z(e,t){return e.get(te(e,t))}function ee(e,t,n){return e.set(te(e,t),n),n}function te(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 ne=new WeakMap,re=new WeakMap,ie=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,ue=new WeakMap,he=new WeakMap,ce=new WeakMap;class de{constructor(e,t,n,r,i,s){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;J(this,ne,void 0),J(this,re,void 0),J(this,ie,void 0),J(this,se,void 0),J(this,oe,void 0),J(this,ae,void 0),J(this,le,void 0),J(this,ue,void 0),J(this,he,[null,null]),J(this,ce,[null,null]),ee(ne,this,n),ee(re,this,t),ee(ie,this,i),ee(se,this,s),ee(oe,this,o),ee(ae,this,r),ee(le,this,e),this.registerEvents()}registerEvents(){Z(ae,this).addEventListener(Z(ie,this).holder,"contextmenu",e=>this.onContextMenu(e)),Z(ae,this).addEventListener(Z(ie,this).TABLE,"mouseover",e=>this.onMouseOver(e)),Z(ae,this).addEventListener(Z(ie,this).TABLE,"mouseout",e=>this.onMouseOut(e));const e=()=>{Z(ae,this).addEventListener(Z(ie,this).holder,"touchstart",e=>this.onTouchStart(e)),Z(ae,this).addEventListener(Z(ie,this).holder,"touchend",e=>this.onTouchEnd(e)),this.momentumScrolling||(this.momentumScrolling={}),Z(ae,this).addEventListener(Z(ie,this).holder,"scroll",()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||Z(ne,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,Z(ne,this).getSetting("onAfterMomentumScroll"))},200)})},t=()=>{Z(ae,this).addEventListener(Z(ie,this).holder,"mouseup",e=>this.onMouseUp(e)),Z(ae,this).addEventListener(Z(ie,this).holder,"mousedown",e=>this.onMouseDown(e))};Object(o["isMobileBrowser"])()?e():(Object(q["isTouchSupported"])()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e),n=t.coords;if(Z(ue,this)&&n){const[e,t]=[n.row,Z(ue,this).from.row],[r,i]=[n.col,Z(ue,this).from.col];return e===t&&r===i}return!1}parentCell(e){const t={},n=Z(ie,this).TABLE,i=Object(r["closestDown"])(e,["TD","TH"],n);return i?(t.coords=Z(ie,this).getCoords(i),t.TD=i):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"current")?(t.coords=Z(se,this).getFocusSelection().cellRange.highlight,t.TD=Z(ie,this).getCell(t.coords)):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"area")&&Z(se,this).getAreaSelection().cellRange&&(t.coords=Z(se,this).getAreaSelection().cellRange.to,t.TD=Z(ie,this).getCell(t.coords)),t}onMouseDown(e){const t=Z(re,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")?Z(ne,this).getSetting("onCellCornerMouseDown",e,s):o.TD&&Z(ne,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&o.TD&&(Z(ce,this)[0]=o.TD,clearTimeout(Z(he,this)[0]),Z(he,this)[0]=setTimeout(()=>{Z(ce,this)[0]=null},1e3))}onContextMenu(e){if(Z(ne,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!Z(ne,this).has("onCellMouseOver"))return;const t=Z(ie,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=Z(oe,this)||this;n&&n!==i.lastMouseOver&&Object(r["isChildOf"])(n,t)&&(i.lastMouseOver=n,this.callListener("onCellMouseOver",e,Z(ie,this).getCoords(n),n))}onMouseOut(e){if(!Z(ne,this).has("onCellMouseOut"))return;const t=Z(ie,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=Object(r["closestDown"])(e.relatedTarget,["TD","TH"],t),s=Z(oe,this)||this;n&&n!==i&&Object(r["isChildOf"])(n,t)&&(this.callListener("onCellMouseOut",e,Z(ie,this).getCoords(n),n),null===i&&(s.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&Z(ne,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===Z(ce,this)[0]&&t.TD===Z(ce,this)[1]?(Object(r["hasClass"])(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),Z(ce,this)[0]=null,Z(ce,this)[1]=null):t.TD===Z(ce,this)[0]&&(Z(ce,this)[1]=t.TD,clearTimeout(Z(he,this)[1]),Z(he,this)[1]=setTimeout(()=>{Z(ce,this)[1]=null},500)))}onTouchStart(e){ee(ue,this,Z(se,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&&Z(ne,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=Z(ne,this).getSettingPure(e);i&&i(t,n,r,Z(le,this).call(this))}destroy(){clearTimeout(Z(he,this)[0]),clearTimeout(Z(he,this)[1]),Z(ae,this).destroy()}}var me=de;function fe(e,t,n){return(t=pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e){var t=ge(e,"string");return"symbol"==typeof t?t:t+""}function ge(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 ye{constructor(e,t,n){fe(this,"offset",void 0),fe(this,"total",void 0),fe(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 we=ye;function be(e,t,n){return(t=_e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e){var t=ve(e,"string");return"symbol"==typeof t?t:t+""}function ve(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 Se{constructor(e,t,n){be(this,"offset",void 0),be(this,"total",void 0),be(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 Ee=Se;const Ce=0,Me=1,Te=2;function Re(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e){var t=Ne(e,"string");return"symbol"==typeof t?t:t+""}function Ne(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 Le{constructor(){Re(this,"currentSize",0),Re(this,"nextSize",0),Re(this,"currentOffset",0),Re(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}function Ae(e,t,n){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e){var t=ke(e,"string");return"symbol"==typeof t?t:t+""}function ke(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 xe{constructor(){Ae(this,"size",new Le),Ae(this,"workingSpace",Ce),Ae(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof Le}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=Me,e.workingSpace=Te,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=Te,e.workingSpace=Me,this.sharedSize=e.getViewSize()}}function De(e,t,n){return(t=He(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){var t=Pe(e,"string");return"symbol"==typeof t?t:t+""}function Pe(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 je{constructor(e,t,n){De(this,"rootNode",void 0),De(this,"nodesPool",void 0),De(this,"sizeSet",new xe),De(this,"childNodeType",void 0),De(this,"visualIndex",0),De(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(Me))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(Te)?e.appendChild(r):e.insertBefore(r,e.firstChild),i+=1}const s=n&&t.isPlaceOn(Me);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(Te)&&(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 Fe extends je{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 Ye(e,t,n){return(t=Ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e){var t=Ve(e,"string");return"symbol"==typeof t?t:t+""}function Ve(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(e){Ye(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}function We(e,t,n){return(t=Ge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(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 Ke{constructor(e,t){We(this,"nodesPool",null),We(this,"nodeType",void 0),We(this,"rootNode",void 0),We(this,"table",null),We(this,"renderedNodes",0),this.nodesPool="string"===typeof e?new Be(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}var Xe=n("8828");function $e(e,t,n){return(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qe(e){var t=Je(e,"string");return"symbol"==typeof t?t:t+""}function Je(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 Qe extends Ke{constructor(){super("TH"),$e(this,"orderViews",new WeakMap),$e(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Fe(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),u=s.obtainOrderView(a);l.appendView(u).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(Xe["E"])(),Object(Xe["H"])(),Object(Xe["f"])(i+1),Object(Xe["L"])(-1)]),t[i](e,n,i)}l.end()}}}class Ze extends Ke{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(Xe["D"])()]);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(Xe["B"])(),Object(Xe["F"])(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(Xe["f"])(o+1+this.table.rowHeadersCount),Object(Xe["L"])(-1),Object(Xe["g"])(),...o>=0?[Object(Xe["G"])()]:[Object(Xe["B"])()]]),e[t](n,a,t)}}}}var et=n("67a8");let tt=!1;class nt extends Ke{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;!tt&&e>1e3&&(tt=!0,Object(C["b"])(et["a"]`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
  271. Consider limiting the number of rendered columns by specifying the table width and/or\x20
  272. 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 rt(e,t,n){return(t=it(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(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)}const ot={rowEven:"ht__row_even",rowOdd:"ht__row_odd"};let at=!1;class lt extends Ke{constructor(e){super("TR",e),rt(this,"orderView",void 0),this.orderView=new je(e,e=>this.nodesPool.obtain(e),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!at&&e>1e3&&(at=!0,Object(C["b"])(et["a"]`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
  273. Consider limiting the number of rendered rows by specifying the table height and/or\x20
  274. turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Xe["D"])()]),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(Xe["B"])(),Object(Xe["F"])(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)]);Object(r["removeClass"])(e,[ot.rowEven,ot.rowOdd]),(s+1)%2===0?Object(r["addClass"])(e,ot.rowEven):Object(r["addClass"])(e,ot.rowOdd)}this.orderView.end()}}function ut(e,t,n){return(t=ht(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ht(e){var t=ct(e,"string");return"symbol"==typeof t?t:t+""}function ct(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 dt extends Ke{constructor(){super("TD"),ut(this,"orderViews",new WeakMap),ut(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Fe(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 u=this.obtainOrderView(l),h=i.obtainOrderView(l);u.prependView(h).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<t;n++){u.render();const t=u.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(Xe["l"])()],Object(Xe["L"])(-1),Object(Xe["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)])}u.end()}}}function mt(e,t,n){return(t=ft(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(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 gt{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mt(this,"rootNode",void 0),mt(this,"rootDocument",void 0),mt(this,"rowHeaders",null),mt(this,"columnHeaders",null),mt(this,"colGroup",null),mt(this,"rows",null),mt(this,"cells",null),mt(this,"rowFilter",null),mt(this,"columnFilter",null),mt(this,"rowUtils",null),mt(this,"columnUtils",null),mt(this,"rowsToRender",0),mt(this,"columnsToRender",0),mt(this,"rowHeaderFunctions",[]),mt(this,"rowHeadersCount",0),mt(this,"columnHeaderFunctions",[]),mt(this,"columnHeadersCount",0),mt(this,"cellRenderer",void 0),mt(this,"activeOverlayName",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setActiveOverlayName(e){this.activeOverlayName=e}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.getHeightByOverlayName(t,this.activeOverlayName);e.firstChild.style.height=r?r-1+"px":""}}}}class yt{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 gt(e,{cellRenderer:o}),this.renderer.setRenderers({rowHeaders:new Qe,columnHeaders:new Ze(t),colGroup:new nt(n),rows:new lt(r),cells:new dt}),this.renderer.setAxisUtils(i,s)}setActiveOverlayName(e){return this.renderer.setActiveOverlayName(e),this}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()}}var wt=n("861dd");function bt(e,t,n){_t(e,t),t.set(e,n)}function _t(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vt(e,t,n){return(t=St(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(e){var t=Et(e,"string");return"symbol"==typeof t?t:t+""}function Et(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 Ct(e,t){return e.get(Tt(e,t))}function Mt(e,t,n){return e.set(Tt(e,t),n),n}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")}var Rt=new WeakMap,Ot=new WeakMap,Nt=new WeakMap,Lt=new WeakMap,At=new WeakMap;class It{constructor(e){let{totalColumns:t,stretchMode:n,stretchingColumnWidthFn:r,columnWidthFn:i}=e;vt(this,"stretchAllRatio",0),vt(this,"stretchLastWidth",0),vt(this,"stretchAllColumnsWidth",[]),bt(this,Rt,0),vt(this,"needVerifyLastColumnWidth",!0),bt(this,Ot,()=>0),bt(this,Nt,e=>e),bt(this,Lt,e=>e),bt(this,At,()=>"none"),Mt(Ot,this,t),Mt(At,this,n),Mt(Nt,this,null!==r&&void 0!==r?r:Ct(Nt,this)),Mt(Lt,this,null!==i&&void 0!==i?i:Ct(Lt,this))}refreshStretching(e){if("none"===Ct(At,this).call(this))return;this.stretchAllRatio=0,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0,this.stretchLastWidth=0,Mt(Rt,this,e);let t=0;for(let r=0;r<Ct(Ot,this).call(this);r++){const n=this._getColumnWidth(r),i=Ct(Nt,this).call(this,void 0,r);"number"===typeof i?e-=i:t+=n}const n=e-t;if("all"===Ct(At,this).call(this)&&n>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===Ct(At,this).call(this)&&e!==1/0){const e=this._getColumnWidth(Ct(Ot,this).call(this)-1),t=n+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let n=null;return"all"===Ct(At,this).call(this)&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===Ct(At,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=Ct(Nt,this).call(this,n,e);this.stretchAllColumnsWidth[e]=void 0===r?n:isNaN(r)?this._getColumnWidth(e):r}if(this.stretchAllColumnsWidth.length===Ct(Ot,this).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)n+=this.stretchAllColumnsWidth[e];n!==Ct(Rt,this)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=Ct(Rt,this)-n)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===Ct(Ot,this).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=Ct(Lt,this).call(this,e);return isNaN(t)&&(t=wt["a"]),t}}function kt(e,t,n){return(t=xt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xt(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){kt(this,"dataAccessObject",void 0),kt(this,"wtSettings",void 0),kt(this,"headerWidths",new Map),kt(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new It({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){const t=this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth");return t}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 Pt(e,t,n){return(t=jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e){var t=Ft(e,"string");return"symbol"==typeof t?t:t+""}function Ft(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 Yt{constructor(e,t){Pt(this,"dataAccessObject",void 0),Pt(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}getHeightByOverlayName(e,t){let n=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(n=void 0===n?r:Math.max(n,r)),n}}const Ut="top",Vt="bottom",Bt="inline_start",Wt="top_inline_start_corner",Gt="bottom_inline_start_corner",zt=[Ut,Vt,Bt,Wt,Gt],Kt=new Map([[Ut,"ht_clone_"+Ut],[Vt,"ht_clone_"+Vt],[Bt,`ht_clone_${Bt} ht_clone_left`],[Wt,`ht_clone_${Wt} ht_clone_top_left_corner`],[Gt,`ht_clone_${Gt} ht_clone_bottom_left_corner`]]);function Xt(e,t,n){return(t=$t(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $t(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)}class Jt{constructor(e,t,n,i,s){Xt(this,"wtSettings",null),Xt(this,"domBindings",void 0),Xt(this,"TBODY",null),Xt(this,"THEAD",null),Xt(this,"COLGROUP",null),Xt(this,"hasTableHeight",!0),Xt(this,"hasTableWidth",!0),Xt(this,"isTableVisible",!1),Xt(this,"tableOffset",0),Xt(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 Yt(this.dataAccessObject,this.wtSettings),this.columnUtils=new Ht(this.dataAccessObject,this.wtSettings),this.tableRenderer=new yt({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(Xe["y"])()]),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(Xe["y"])()]),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(Xe["y"])()])),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Xe["y"])()]),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,u=t.getSetting("columnHeaders"),h=u.length;let c=e;if(this.isMaster&&(n.beforeDraw(),this.holderOffset=Object(r["offset"])(this.holder),c=i.createCalculators(c),l&&!t.getSetting("fixedColumnsStart"))){const e=n.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(c=!1)}if(c)this.isMaster&&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 Ee(e,s,h),this.columnFilter=new we(t,o,l);let c=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),c=!0!==e.skipRender}if(c){let e;if(this.tableRenderer.setHeaderContentRenderers(a,u),(this.is(Vt)||this.is(Gt))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,i.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(Vt))&&this.markOversizedRows(),this.isMaster){this.wtSettings.getSetting("externalRowCalculator")||i.createVisibleCalculators(),n.refresh(!1),n.applyToDOM();const t=Object(r["outerWidth"])(this.hider),s=Object(r["outerWidth"])(this.TABLE);0!==t&&s!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==i.getWorkspaceWidth()&&(i.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(Vt)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let d=!1;return this.isMaster&&(d=n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&(d=n.bottomOverlay.resetFixedPosition()||d),d=n.inlineStartOverlay.resetFixedPosition()||d,n.topInlineStartCornerOverlay&&n.topInlineStartCornerOverlay.resetFixedPosition(),n.bottomInlineStartCornerOverlay&&n.bottomInlineStartCornerOverlay.clone&&n.bottomInlineStartCornerOverlay.resetFixedPosition()),d?(n.refreshAll(),n.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(c),this.isMaster&&n.afterDraw(),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(Vt))&&!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"])(Wt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Ut,t,this.wtRootElement))"THEAD"===i.nodeName&&(s-=i.childNodes.length);else if(Object(r["overlayContainsElement"])(Gt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Vt,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"])(Wt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Bt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Gt,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 Qt=Jt;const Zt="stickyRowsTop",en={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(E["defineGetter"])(en,"MIXIN_NAME",Zt,{writable:!1,enumerable:!1});var tn=en;const nn="calculatedColumns",rn={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(E["defineGetter"])(rn,"MIXIN_NAME",nn,{writable:!1,enumerable:!1});var sn=rn;class on extends Qt{constructor(e,t,n,r){super(e,t,n,r,Ut)}}Object(E["mixin"])(on,tn),Object(E["mixin"])(on,sn);var an=on;function ln(e,t){un(e,t),t.add(e)}function un(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hn(e,t,n){return(t=cn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e){var t=dn(e,"string");return"symbol"==typeof t?t:t+""}function dn(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 mn(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 fn=new WeakSet;class pn{constructor(e){ln(this,fn),hn(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(),u=this.getLastVisibleColumn();let h=!1;return(s&&(e<l||e>u)||!s)&&(h=a.scrollTo(e,s?e>=this.getLastPartiallyVisibleColumn():t)),h}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 u=this.getFirstVisibleRow(),h=this.getLastVisibleRow();let c=!1;return(s&&(e<u||e>h)||!s)&&(c=l.scrollTo(e,s?e>=this.getLastPartiallyVisibleRow():n)),c}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return mn(fn,this,yn).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return mn(fn,this,yn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return mn(fn,this,gn).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return mn(fn,this,gn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}function gn(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 u=null;if(l){const e=i.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document,n=t.documentElement.offsetWidth;u=Math.abs(e.right-n)}else{const e=Object(r["offset"])(i.wtRootElement);u=e.left}const h=Math.abs(Object(r["getScrollLeft"])(a,a));if(u>h){const t=Object(r["innerWidth"])(a);let i=s.getRowHeaderWidth();for(let r=1;r<=o;r++)if(i+=n.sumCellSizes(r-1,r),u+i-h>=t){e=r-2;break}}}return e}function yn(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 u=i.getColumnHeaderHeight();for(let r=1;r<=s;r++)if(u+=t.sumCellSizes(r-1,r),a.top+u-l>=n){e=r-2;break}}}return e}var wn=pn,bn=n("0716"),_n=n("d852");function vn(e,t,n){return(t=Sn(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{get eventManager(){return new h["a"](this)}constructor(e,t){vn(this,"wtTable",void 0),vn(this,"wtScroll",void 0),vn(this,"wtViewport",void 0),vn(this,"wtOverlays",void 0),vn(this,"selectionManager",void 0),vn(this,"wtEvent",void 0),vn(this,"guid","wt_"+Object(X["randomString"])()),vn(this,"drawInterrupted",!1),vn(this,"drawn",!1),vn(this,"domBindings",void 0),vn(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new wn(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 bn["a"](e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,n){return new _n["a"](e,t,n,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,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 Mn(e,t,n){return(t=Tn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tn(e){var t=Rn(e,"string");return"symbol"==typeof t?t:t+""}function Rn(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 On extends Cn{constructor(e,t,n){super(e,t),Mn(this,"cloneSource",void 0),Mn(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 me(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}function Nn(e,t,n){return(t=Ln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e){var t=An(e,"string");return"symbol"==typeof t?t:t+""}function An(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 In{constructor(e,t,n,i,s){Nn(this,"wtSettings",null),Object(E["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.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(e){"before"===e&&this.shouldBeRendered()?this.needFullRender=!0:"after"!==e||this.shouldBeRendered()||(this.needFullRender=!1)}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(C["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},u={start:this.getRelativeStartPosition(e),top:e.offsetTop};let h=null;return h=r?this.getRelativeCellPositionWithinWindow(s,i,u,l):this.getRelativeCellPositionWithinHolder(s,o,i,u,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===zt.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(Xe["y"])()]),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 u=this.wtSettings.getSetting("preventOverflow");return!0===u||"horizontal"===u&&this.type===Ut||"vertical"===u&&this.type===Bt?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE),new On(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];this.needFullRender&&this.clone.draw(e)}reset(){const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,i=e.parentNode.style;[n,r,i].forEach(e=>{e.width="",e.height=""})}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}const kn=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});function xn(e,t,n){return(t=Dn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dn(e){var t=Hn(e,"string");return"symbol"==typeof t?t:t+""}function Hn(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 In{constructor(e,t,n,r){super(e,t,Ut,n,r),xn(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 an(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!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(){this.updateTrimmingContainer(),this.needFullRender&&(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(kn.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"),u=0===l&&a.length>0&&!Object(r["hasClass"])(o.parentNode,"innerBorderTop")?1:0;let h=this.getTableParentOffset(),c=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&&(c=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t){const t=i.getSetting("fixedRowsBottom"),r=i.getSetting("totalRows");h+=this.sumCellSizes(0,e+1),h-=n.wtViewport.getViewportHeight()-this.sumCellSizes(r-t,r),h+=1,h+=u}else h+=this.sumCellSizes(i.getSetting("fixedRowsTop"),e);return h+=c,Object(r["getMaximumScrollTop"])(this.mainTableScrollableElement)===h-u&&u>0&&this.wot.wtOverlays.expandHiderVerticallyBy(u),this.setScrollPosition(h)}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{wtSettings:n}=this,i=this.wot.wtTable.holder.parentNode,s=n.getSetting("totalColumns"),o="horizontal"===n.getSetting("preventOverflow");s?Object(r["removeClass"])(i,"emptyColumns"):Object(r["addClass"])(i,"emptyColumns");let a=!1;if(!t&&!o){const t=n.getSetting("fixedRowsTop"),s=this.cachedFixedRowsTop!==t,o=n.getSetting("columnHeaders");if((s||0===t)&&o.length>0){const t=Object(r["hasClass"])(i,"innerBorderTop");this.cachedFixedRowsTop=n.getSetting("fixedRowsTop"),e||0===n.getSetting("totalRows")?(Object(r["addClass"])(i,"innerBorderTop"),a=!t):(Object(r["removeClass"])(i,"innerBorderTop"),a=t)}}return a}}const jn="stickyRowsBottom",Fn={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(E["defineGetter"])(Fn,"MIXIN_NAME",jn,{writable:!1,enumerable:!1});var Yn=Fn;class Un extends Qt{constructor(e,t,n,r){super(e,t,n,r,Vt)}}Object(E["mixin"])(Un,Yn),Object(E["mixin"])(Un,sn);var Vn=Un;function Bn(e,t,n){return(t=Wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(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)}class zn extends In{constructor(e,t,n,r){super(e,t,Vt,n,r),Bn(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 Vn(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!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(){this.updateTrimmingContainer(),this.needFullRender&&(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 u=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(u=0),a.height=u+"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",Xn={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(E["defineGetter"])(Xn,"MIXIN_NAME",Kn,{writable:!1,enumerable:!1});var $n=Xn;const qn="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(E["defineGetter"])(Jn,"MIXIN_NAME",qn,{writable:!1,enumerable:!1});var Qn=Jn;class Zn extends Qt{constructor(e,t,n,r){super(e,t,n,r,Bt)}}Object(E["mixin"])(Zn,$n),Object(E["mixin"])(Zn,Qn);var er=Zn;class tr extends In{constructor(e,t,n,r){super(e,t,Bt,n,r)}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new er(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!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(){this.updateTrimmingContainer(),this.needFullRender&&(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(kn.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 u=this.getTableParentOffset(),h=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&&(h=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(u+=this.sumCellSizes(0,e+1),u-=this.wot.wtViewport.getViewportWidth(),u+=l):u+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),u+=h,Object(r["getMaximumScrollLeft"])(this.mainTableScrollableElement)===u-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(u)}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{wtSettings:t}=this,n=this.wot.wtTable.holder.parentNode,i=t.getSetting("rowHeaders"),s=t.getSetting("fixedColumnsStart"),o=t.getSetting("totalRows"),a="vertical"===t.getSetting("preventOverflow");o?Object(r["removeClass"])(n,"emptyRows"):Object(r["addClass"])(n,"emptyRows");let l=!1;if(!a)if(s&&!i.length)Object(r["addClass"])(n,"innerBorderLeft innerBorderInlineStart");else if(!s&&i.length){const t=Object(r["hasClass"])(n,"innerBorderInlineStart");e?(Object(r["addClass"])(n,"innerBorderLeft innerBorderInlineStart"),l=!t):(Object(r["removeClass"])(n,"innerBorderLeft innerBorderInlineStart"),l=t)}return l}}class nr extends Qt{constructor(e,t,n,r){super(e,t,n,r,Wt)}}Object(E["mixin"])(nr,tn),Object(E["mixin"])(nr,Qn);var rr=nr;function ir(e,t,n){return(t=sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e){var t=or(e,"string");return"symbol"==typeof t?t:t+""}function or(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 ar extends In{constructor(e,t,n,r,i,s){super(e,t,Wt,n,r),ir(this,"topOverlay",void 0),ir(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 rr(...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 lr extends Qt{constructor(e,t,n,r){super(e,t,n,r,Gt)}}Object(E["mixin"])(lr,Yn),Object(E["mixin"])(lr,Qn);var ur=lr;class hr extends In{constructor(e,t,n,r,i,s){super(e,t,Gt,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 ur(...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 cr(e,t,n){dr(e,t),t.set(e,n)}function dr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mr(e,t,n){return(t=fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e){var t=pr(e,"string");return"symbol"==typeof t?t:t+""}function pr(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,n){return e.set(wr(e,t),n),n}function yr(e,t){return e.get(wr(e,t))}function wr(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 br=new WeakMap,_r=new WeakMap,vr=new WeakMap,Sr=new WeakMap;class Er{constructor(e,t,n,i,s,o){mr(this,"wot",null),cr(this,br,[]),mr(this,"topOverlay",null),mr(this,"bottomOverlay",null),mr(this,"inlineStartOverlay",null),mr(this,"topInlineStartCornerOverlay",null),mr(this,"bottomInlineStartCornerOverlay",null),mr(this,"browserLineHeight",void 0),mr(this,"wtSettings",null),cr(this,_r,!1),cr(this,vr,0),cr(this,Sr,null),mr(this,"resizeObserver",new ResizeObserver(e=>{Object(q["requestAnimationFrame"])(()=>{Array.isArray(e)&&e.length&&(gr(vr,this,yr(vr,this)+1),100===yr(vr,this)&&(Object(C["b"])("The ResizeObserver callback was fired too many times in direct succession.\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, with the `dvh` units) to a Handsontable container's parent. \nThe observer will be disconnected."),this.resizeObserver.disconnect()),null!==yr(Sr,this)&&clearTimeout(yr(Sr,this)),gr(Sr,this,setTimeout(()=>{gr(vr,this,0)},100)),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 u="hidden"===l.getComputedStyle(o.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=u?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=[...yr(br,this)];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 Pn(...e),this.bottomOverlay=new zn(...e),this.inlineStartOverlay=new tr(...e),this.topInlineStartCornerOverlay=new ar(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new hr(...e,this.bottomOverlay,this.inlineStartOverlay),gr(br,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){gr(_r,this,yr(br,this).reduce((e,t)=>t.hasRenderingStateChanged()||e,!1)),yr(br,this).forEach(e=>e.updateStateOfRendering("before"))}afterDraw(){this.syncScrollWithMaster(),yr(br,this).forEach(e=>{const t=e.hasRenderingStateChanged();e.updateStateOfRendering("after"),t&&!e.needFullRender&&e.reset()})}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 u=[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let h;u.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(h),h=setTimeout(()=>{this.wtSettings.getSetting("onWindowResize"),gr(vr,this,0)},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)||this.scrollableElement===n)return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=Object(a["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(){if(!yr(_r,this))return;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),gr(_r,this,!1)}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(){const{wtViewport:e}=this.wot,{wtTable:t}=this,{rootWindow:n}=this.domBindings,r=this.scrollableElement===n,i=this.wtSettings.getSetting("totalColumns"),s=this.wtSettings.getSetting("totalRows"),o=e.getRowHeaderWidth(),a=e.getColumnHeaderHeight(),l=a+this.topOverlay.sumCellSizes(0,s)+1,u=o+this.inlineStartOverlay.sumCellSizes(0,i),h=t.hider,c=h.style,d=()=>!r&&this.scrollableElement.scrollTop>Math.max(0,l-t.holder.clientHeight),m=()=>!r&&this.scrollableElement.scrollLeft>Math.max(0,u-t.holder.clientWidth),f=d()?1:0,p=m()?1:0;if(c.width=u+p+"px",c.height=l+f+"px",this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:n}=t.wtRootElement,{scrollHeight:r,scrollWidth:i}=t.holder;this.hasScrollbarRight=e<r,this.hasScrollbarBottom=n<i,this.hasScrollbarRight&&t.hider.scrollWidth+this.scrollbarSize>n?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&t.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}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(B["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(B["arrayEach"])(t,t=>{t&&(t.clone.wtTable.TABLE.className=e.className)})}}var Cr=Er;function Mr(e,t,n){return(t=Tr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(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)}class Or{constructor(e){Mr(this,"settings",{}),Mr(this,"defaults",Object.freeze(this.getDefaults())),Object(E["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(){},rowHeightByOverlayName(){},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(E["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 Nr extends Qt{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 u=e.offsetWidth,h=e.offsetHeight;const c=["auto","hidden","scroll"];if(n&&c.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&&(h=0)}h=Math.min(h,l),o.height="auto"===i?"auto":h+"px",u=Math.min(u,a),o.width=u+"px",o.overflow="",this.hasTableHeight="auto"===o.height||h>0,this.hasTableWidth=u>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(E["mixin"])(Nr,$n),Object(E["mixin"])(Nr,sn);var Lr=Nr;function Ar(e,t,n){return(t=Ir(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ir(e){var t=kr(e,"string");return"symbol"==typeof t?t:t+""}function kr(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 xr{constructor(){Ar(this,"count",0),Ar(this,"startRow",0),Ar(this,"endRow",0),Ar(this,"startPosition",0),Ar(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalRows:t}=e;this.count=t,this.endRow=this.count-1}process(){}finalize(){}}n("33d1"),n("ea98");function Dr(e,t,n){return(t=Hr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hr(e){var t=Pr(e,"string");return"symbol"==typeof t?t:t+""}function Pr(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 jr{constructor(){Dr(this,"count",0),Dr(this,"startRow",null),Dr(this,"endRow",null),Dr(this,"startPosition",null),Dr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:i}=t;n<=r&&(this.startRow=e),n>=r&&n<=i&&null===this.startRow&&(this.startRow=e),this.endRow=e}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:i,totalRows:s,needReverse:o,startPositions:a,rowHeight:l}=e;if(this.endRow===s-1&&o){this.startRow=this.endRow;while(this.startRow>0){const e=a[this.endRow]+l-a[this.startRow-1];if(this.startRow-=1,e>=r-i)break}}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;const u=n+r-i;u<0||n>a.at(-1)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}class Fr extends jr{finalize(e){var t;super.finalize(e);const{overrideFn:n,totalRows:r,startPositions:i}=e;null!==this.startRow&&"function"===typeof n&&n(this),this.startRow<0&&(this.startRow=0),this.startPosition=null!==(t=i[this.startRow])&&void 0!==t?t:null,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function Yr(e,t,n){return(t=Ur(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ur(e){var t=Vr(e,"string");return"symbol"==typeof t?t:t+""}function Vr(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 Br{constructor(){Yr(this,"count",0),Yr(this,"startRow",null),Yr(this,"endRow",null),Yr(this,"startPosition",null),Yr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:i,rowHeight:s}=t;n>=r&&n+s<=i&&(null===this.startRow&&(this.startRow=e),this.endRow=e)}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:i,totalRows:s,needReverse:o,startPositions:a,rowHeight:l}=e;if(this.endRow===s-1&&o){this.startRow=this.endRow;while(this.startRow>0){const e=a[this.endRow]+l-a[this.startRow-1];if(e<=r-i&&(this.startRow-=1),e>=r-i)break}}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;const u=n+r-i,h=null===this.startRow?0:e.getRowHeight(this.startRow);u<h||n>a.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function Wr(e,t,n){return(t=Gr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e){var t=zr(e,"string");return"symbol"==typeof t?t:t+""}function zr(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 Kr{constructor(){Wr(this,"count",0),Wr(this,"startColumn",0),Wr(this,"endColumn",0),Wr(this,"startPosition",0),Wr(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalColumns:t}=e;this.count=t,this.endColumn=this.count-1}process(){}finalize(){}}function Xr(e,t,n){return(t=$r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $r(e){var t=qr(e,"string");return"symbol"==typeof t?t:t+""}function qr(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 Jr{constructor(){Xr(this,"count",0),Xr(this,"startColumn",null),Xr(this,"endColumn",null),Xr(this,"startPosition",null),Xr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:i}=t;n<=r&&(this.startColumn=e);const s=r>0?i+1:i;n>=r&&n<=r+s&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e)),this.endColumn=e}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:o,needReverse:a,startPositions:l,columnWidth:u}=e;if(this.endColumn===o-1&&a){this.startColumn=this.endColumn;while(this.startColumn>0){const e=l[this.endColumn]+u-l[this.startColumn-1];if(this.startColumn-=1,e>r)break}}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const h=s>0?r+1:r,c=n+r-h;c<-1*i||n>l.at(-1)+u||-1*n-r>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}class Qr extends Jr{finalize(e){var t;super.finalize(e);const{overrideFn:n,totalColumns:r,startPositions:i}=e;null!==this.startColumn&&"function"===typeof n&&n(this),this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(t=i[this.startColumn])&&void 0!==t?t:null,r<this.endColumn&&(this.endColumn=r-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function Zr(e,t,n){return(t=ei(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ei(e){var t=ti(e,"string");return"symbol"==typeof t?t:t+""}function ti(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 ni{constructor(){Zr(this,"count",0),Zr(this,"startColumn",null),Zr(this,"endColumn",null),Zr(this,"startPosition",null),Zr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:i,columnWidth:s}=t,o=r>0?i+1:i;n>=r&&n+s<=r+o&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e),this.endColumn=e)}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:o,needReverse:a,startPositions:l,columnWidth:u}=e;if(this.endColumn===o-1&&a){this.startColumn=this.endColumn;while(this.startColumn>0){const e=l[this.endColumn]+u-l[this.startColumn-1];if(e<=r&&(this.startColumn-=1),e>=r)break}}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const h=s>0?r+1:r,c=n+r-h,d=null===this.startColumn?0:e.getColumnWidth(this.startColumn);c<-1*i||n>l.at(-1)||-1*n-r>-1*d?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}var ri=n("eb36");class ii{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.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new xr:new Fr],["fullyVisible",()=>new Br],["partiallyVisible",()=>new jr]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new Kr:new Qr],["fullyVisible",()=>new ni],["partiallyVisible",()=>new Jr]]),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"),u=this.wtTable.TABLE.getBoundingClientRect(),h=l?u.right-s:u.left,c=s-h;let d,m;if(a)return Object(r["outerWidth"])(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(c,s):Math.min(this.getContainerFillWidth(),c,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]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let i,s,o=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const l=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),h=t.getSetting("totalRows");return l&&a>=0&&(s=this.dataAccessObject.topOverlay.sumCellSizes(0,l),a+=s,o-=s),u&&this.dataAccessObject.bottomOverlay.clone&&(s=this.dataAccessObject.bottomOverlay.sumCellSizes(h-u,h),o-=s),i=n.holder.clientHeight===n.holder.offsetHeight?0:Object(r["getScrollbarWidth"])(this.domBindings.rootDocument),new ri["b"]({calculationTypes:e.map(e=>[e,this.rowsCalculatorTypes.get(e)()]),viewportHeight:o,scrollOffset:a,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>n.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;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 wt["b"]({calculationTypes:e.map(e=>[e,this.columnsCalculatorTypes.get(e)()]),viewportWidth:i,scrollOffset:s,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>n.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,n=this.createRowsCalculator(),r=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=n.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=r.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=n.getResultsFor("rendered"),this.columnsRenderCalculator=r.getResultsFor("rendered")),this.rowsVisibleCalculator=n.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=r.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=r.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:n}=e;if(null===t&&null===n){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,n=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:r,endRow:i}=this.rowsRenderCalculator;return!(t<r||t===r&&t>0)&&!(n>i||n===i&&n<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:n}=e;if(null===t&&null===n){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,n=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:r,endColumn:i}=this.columnsRenderCalculator;return!(t<r||t===r&&t>0)&&!(n>i||n===i&&n<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){Object(E["objectEach"])(this.hasOversizedColumnHeadersMarked,(e,t,n)=>{n[t]=void 0})}}var si=ii;n("4069");function oi(e,t){li(e,t),t.add(e)}function ai(e,t,n){li(e,t),t.set(e,n)}function li(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ui(e,t){return e.get(ci(e,t))}function hi(e,t,n){return e.set(ci(e,t),n),n}function ci(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 di=new WeakMap,mi=new WeakMap,fi=new WeakSet;class pi{constructor(){oi(this,fi),ai(this,di,void 0),ai(this,mi,void 0)}setActiveOverlay(e){return hi(mi,this,e),this}setActiveSelection(e){return hi(di,this,e),this}scan(){const e=ui(di,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]=ui(di,this).getCorners(),{wtTable:s}=ui(mi,this),o=s.getRenderedColumnsCount(),a=s.getColumnHeadersCount();let l=0;for(let u=-s.getRowHeadersCount();u<o;u++){const o=s.columnFilter.renderedToSource(u);if(!(o<n||o>i)){for(let u=-a;u<0;u++){if(u<t||u>r)continue;const h=u+a;let c=s.getColumnHeader(o,h);const d=ui(mi,this).getSetting("onBeforeHighlightingColumnHeader",o,h,{selectionType:ui(di,this).settings.selectionType,columnCursor:l,selectionWidth:i-n+1});null!==d&&(d!==o&&(c=s.getColumnHeader(d,h)),e(c))}l+=1}}}scanRowsInHeadersRange(e){const[t,n,r,i]=ui(di,this).getCorners(),{wtTable:s}=ui(mi,this),o=s.getRenderedRowsCount(),a=s.getRowHeadersCount();let l=0;for(let u=-s.getColumnHeadersCount();u<o;u++){const o=s.rowFilter.renderedToSource(u);if(!(o<t||o>r)){for(let u=-a;u<0;u++){if(u<n||u>i)continue;const h=u+a;let c=s.getRowHeader(o,h);const d=ui(mi,this).getSetting("onBeforeHighlightingRowHeader",o,h,{selectionType:ui(di,this).settings.selectionType,rowCursor:l,selectionHeight:r-t+1});null!==d&&(d!==o&&(c=s.getRowHeader(d,h)),e(c))}l+=1}}}scanCellsRange(e){const[t,n,i,s]=ui(di,this).getCorners(),{wtTable:o}=ui(mi,this);ci(fi,this,gi).call(this,(a,l)=>{if(a>=t&&a<=i&&l>=n&&l<=s){const t=o.getCell(ui(mi,this).createCellCoords(a,l)),n=ui(mi,this).getSetting("onAfterDrawSelection",a,l,ui(di,this).settings.layerLevel);"string"===typeof n&&Object(r["addClass"])(t,n),e(t)}})}scanRowsInCellsRange(e){const[t,,n]=ui(di,this).getCorners(),{wtTable:r}=ui(mi,this);ci(fi,this,gi).call(this,(i,s)=>{if(i>=t&&i<=n){const t=r.getCell(ui(mi,this).createCellCoords(i,s));e(t)}})}scanColumnsInCellsRange(e){const[,t,,n]=ui(di,this).getCorners(),{wtTable:r}=ui(mi,this);ci(fi,this,gi).call(this,(i,s)=>{if(s>=t&&s<=n){const t=r.getCell(ui(mi,this).createCellCoords(i,s));e(t)}})}}function gi(e){const{wtTable:t}=ui(mi,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 yi{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=kn,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(l["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(E["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(E["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:u,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),m=parseInt(l.width,10),f=parseInt(u.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",u.top=parseInt(n-f/4*3,10)+"px",u[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);h[a]=y+"px",c[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);h.top=b+"px",c.top=_+"px",this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",u.display="block",this.isPartRange(e,t)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(l.display="none",h.display="none",u.display="none",c.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",u.zIndex="9999"):(l.zIndex="",u.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:n,rootWindow:i}=this.wot;let s,a,l,u,h,c;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,h=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,c=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]){u=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!==u,g=p?t.getCell(this.wot.createCellCoords(a,u)):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,M=0;if(E){const e=Object(r["outerWidth"])(f),t=i.innerWidth-b.left-_;M=S+e-w.left,C=i.innerWidth-S-e-t-1}else M=w.left+Object(r["outerWidth"])(g)-S,C=S-b.left-1;if(this.isEntireColumnSelected(s,a)){const e=this.getDimensionsFromHeader("columns",l,u,h,b);let t=null;e&&([t,C,M]=e),t&&(f=t)}let T=v-b.top-1,R=w.top+Object(r["outerHeight"])(g)-v;if(this.isEntireRowSelected(l,u)){const e=this.getDimensionsFromHeader("rows",s,a,c,b);let t=null;e&&([t,T,R]=e),t&&(f=t)}const O=Object(r["getComputedStyle"])(f,i);parseInt(O.borderTopWidth,10)>0&&(T+=1,R=R>0?R-1:0),parseInt(O[E?"borderRightWidth":"borderLeftWidth"],10)>0&&(C+=1,M=M>0?M-1:0);const N=E?"right":"left";this.topStyle.top=T+"px",this.topStyle[N]=C+"px",this.topStyle.width=M+"px",this.topStyle.display="block",this.startStyle.top=T+"px",this.startStyle[N]=C+"px",this.startStyle.height=R+"px",this.startStyle.display="block";const L=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+R-L+"px",this.bottomStyle[N]=C+"px",this.bottomStyle.width=M+"px",this.bottomStyle.display="block",this.endStyle.top=T+"px",this.endStyle[N]=C+M-L+"px",this.endStyle.height=R+1+"px",this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"===typeof A?A(this.settings.layerLevel):A;const I=this.wot.getSetting("onModifyGetCellCoords",a,u);let[k,x]=[a,u];if(I&&Array.isArray(I)&&([,,k,x]=I),Object(o["isMobileBrowser"])()||!A||this.isPartRange(k,x))this.cornerStyle.display="none";else{this.cornerStyle.top=T+R+this.cornerCenterPointOffset-1+"px",this.cornerStyle[N]=C+M+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(u===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+M+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(T+R+this.cornerCenterPointOffset-l)+"px",this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(a,u,T,C,M,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,u=null,h=null,c=null,d=null,m=null,f=null,p=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},u=function(){return Object(r["outerHeight"])(...arguments)},h="ht__selection--rows",m="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},u=function(){return Object(r["outerWidth"])(...arguments)},h="ht__selection--columns",m="left";break;default:}if(a.classList.contains(h)){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&&(c=o[m]-s[m]-1,d=a[m]+u(p)-o[m]),[f,c,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 wi=yi;function bi(e,t){vi(e,t),t.add(e)}function _i(e,t,n){vi(e,t),t.set(e,n)}function vi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Si(e,t){return e.get(Ci(e,t))}function Ei(e,t,n){return e.set(Ci(e,t),n),n}function Ci(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 Mi=new WeakMap,Ti=new WeakMap,Ri=new WeakMap,Oi=new WeakMap,Ni=new WeakMap,Li=new WeakMap,Ai=new WeakSet;class Ii{constructor(e){bi(this,Ai),_i(this,Mi,void 0),_i(this,Ti,void 0),_i(this,Ri,new pi),_i(this,Oi,new WeakMap),_i(this,Ni,new WeakSet),_i(this,Li,new Map),Ei(Ti,this,e)}setActiveOverlay(e){return Ei(Mi,this,e),Si(Ri,this).setActiveOverlay(Si(Mi,this)),Si(Oi,this).has(Si(Mi,this))||Si(Oi,this).set(Si(Mi,this),new Set),this}getFocusSelection(){return null!==Si(Ti,this)?Si(Ti,this).getFocus():null}getAreaSelection(){return null!==Si(Ti,this)?Si(Ti,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(Si(Li,this).has(e)){const t=Si(Li,this).get(e);if(t.has(Si(Mi,this)))return t.get(Si(Mi,this));const n=new wi(Si(Mi,this),e.settings);return t.set(Si(Mi,this),n),n}const t=new wi(Si(Mi,this),e.settings);return Si(Li,this).set(e,new Map([[Si(Mi,this),t]])),t}getBorderInstances(e){var t,n;return Array.from(null!==(t=null===(n=Si(Li,this).get(e))||void 0===n?void 0:n.values())&&void 0!==t?t:[])}destroyBorders(e){Si(Li,this).get(e).forEach(e=>e.destroy()),Si(Li,this).delete(e)}render(e){if(null===Si(Ti,this))return;e&&Ci(Ai,this,ki).call(this);const t=Array.from(Si(Ti,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;Si(Ni,this).has(e)||(Si(Ni,this).add(e),e.addLocalHook("destroy",()=>this.destroyBorders(e)));const u=this.getBorderInstance(e);if(e.isEmpty()){null===u||void 0===u||u.disappear();continue}if(s){const t=Si(Ri,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 h=e.getCorners();Si(Mi,this).getSetting("onBeforeDrawBorders",h,l),null===u||void 0===u||u.appear(h)}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=>Si(Oi,this).get(Si(Mi,this)).add(e)),Object(r["addClass"])(t,i),"TD"===t.nodeName&&Array.isArray(null===(n=Si(Ti,this).options)||void 0===n?void 0:n.cellAttributes)&&Object(r["setAttribute"])(t,Si(Ti,this).options.cellAttributes)}),Array.from(i.keys()).forEach(e=>{Object(r["setAttribute"])(e,[...i.get(e)])})}}function ki(){const e=Si(Oi,this).get(Si(Mi,this)),t=Si(Mi,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=Si(Mi,this).wtTable.TABLE.querySelectorAll("."+e);let s=[];Array.isArray(null===(t=Si(Ti,this).options)||void 0===t?void 0:t.cellAttributes)&&(s=Si(Ti,this).options.cellAttributes.map(e=>e[0])),Array.isArray(null===(n=Si(Ti,this).options)||void 0===n?void 0:n.headerAttributes)&&(s=[...s,...Si(Ti,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 xi extends Cn{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 si(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Ii(this.wtSettings.getSetting("selections")),this.wtEvent=new me(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new Cr(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e={rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},t=[],n=[];Object(E["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)}getOverlayByName(e){var t;if(!zt.includes(e))return null;const n=e.replace(/_([a-z])/g,e=>e[1].toUpperCase());return null!==(t=this.wtOverlays[n+"Overlay"])&&void 0!==t?t:null}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 Di{constructor(e){e instanceof Cn?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new Di(e);return()=>t},this._wot=new xi(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"}getOverlayByName(e){return this._wot.getOverlayByName(e)}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 Hi(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,u=s.isSelectedByCorner(),h=s.isSelectedByRowHeader();if(s.markSource("mouse"),t&&l)i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(i):(u||h)&&i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(a(i.row,i.col)):u&&i.row<0&&!o.column?s.setRangeEnd(a(l.to.row,i.col)):h&&i.col<0&&!o.row?s.setRangeEnd(a(i.row,l.to.col)):(!u&&!h&&i.col<0||u&&i.col<0)&&!o.row?s.selectRows(Math.max(l.from.row,0),i.row,i.col):(!u&&!h&&i.row<0||h&&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 Pi(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(),u=r.tableProps.countRows();r.markSource("mouse"),a&&!i.column?r.setRangeEnd(s(u-1,n.col)):o&&!i.row?r.setRangeEnd(s(n.row,l-1)):i.cell||r.setRangeEnd(n),r.markEndSource()}const ji=new Map([["mousedown",Hi],["mouseover",Pi],["touchstart",Hi]]);function Fi(e,t){let{coords:n,selection:r,controller:i,cellCoordsFactory:s}=t;ji.get(e.type)({coords:n,selection:r,controller:i,cellCoordsFactory:s,isShiftKey:e.shiftKey,isLeftClick:Object(l["isLeftClick"])(e)||"touchstart"===e.type,isRightClick:Object(l["isRightClick"])(e)})}const Yi=new WeakMap,Ui=Symbol("rootInstance");function Vi(e){Yi.set(e,!0)}function Bi(e){return e===Ui}function Wi(e){return Yi.has(e)}function Gi(e,t){Ki(e,t),t.add(e)}function zi(e,t,n){Ki(e,t),t.set(e,n)}function Ki(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xi(e,t,n){return(t=$i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $i(e){var t=qi(e,"string");return"symbol"==typeof t?t:t+""}function qi(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 Ji(e,t){return e.get(Zi(e,t))}function Qi(e,t,n){return e.set(Zi(e,t),n),n}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,ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,is=new WeakMap,ss=new WeakMap,os=new WeakMap,as=new WeakSet;class ls{constructor(e){Gi(this,as),Xi(this,"hot",void 0),Xi(this,"eventManager",void 0),Xi(this,"settings",void 0),Xi(this,"THEAD",void 0),Xi(this,"TBODY",void 0),Xi(this,"_wt",void 0),Xi(this,"activeWt",void 0),zi(this,es,0),zi(this,ts,0),Xi(this,"postponedAdjustElementsSize",!1),zi(this,ns,!1),zi(this,rs,void 0),zi(this,is,void 0),zi(this,ss,0),zi(this,os,0),this.hot=e,this.eventManager=new h["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(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}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"),Qi(is,this,t.createElement("TABLE")),Object(r["addClass"])(Ji(is,this),"htCore"),this.hot.getSettings().tableClassName&&Object(r["addClass"])(Ji(is,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(Object(r["setAttribute"])(Ji(is,this),[Object(Xe["y"])()]),Object(r["setAttribute"])(e,[Object(Xe["N"])(),Object(Xe["C"])(-1),Object(Xe["e"])(this.hot.countCols()),Object(Xe["v"])()])),this.THEAD=t.createElement("THEAD"),Ji(is,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),Ji(is,this).appendChild(this.TBODY),this.hot.table=Ji(is,this),this.hot.container.insertBefore(Ji(is,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=>{Qi(ns,this,!0),this.isTextSelectionAllowed(e.target)||(Object(r["clearTextSelection"])(i),e.preventDefault(),i.focus())}),this.eventManager.addEventListener(e,"mouseup",()=>{Qi(ns,this,!1)}),this.eventManager.addEventListener(e,"mousemove",e=>{Ji(ns,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(l["isLeftClick"])(i)&&n.finish(),Qi(rs,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(l["isRightClick"])(i))||this.hot.unlisten()}),this.eventManager.addEventListener(s,"contextmenu",e=>{n.isInProgress()&&Object(l["isRightClick"])(e)&&(n.finish(),Qi(rs,this,!1))}),this.eventManager.addEventListener(s,"touchend",()=>{n.isInProgress()&&n.finish(),Qi(rs,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(Ji(rs,this)||!e||!this.hot.view)return;const{holder:u}=this._wt.wtTable;if(l===u){const e=Object(r["getScrollbarWidth"])(t);if(t.elementFromPoint(o+e,a)!==u||t.elementFromPoint(o,a+e)!==u)return}else while(l!==s){if(null===l){if(n.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}const h="function"===typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects;h?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(Ji(is,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:Ji(is,this),isDataViewInstance:()=>Wi(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),Qi(ts,this,e.length),this.hot.getSettings().ariaTags&&Zi(as,this,us).call(this)===this.hot.countCols()&&Zi(as,this,hs).call(this,Ji(ts,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),Qi(es,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)},rowHeightByOverlayName:(e,t)=>{const n=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),r=null===n?e:n;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(r),r,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),u=this.hot.colToProp(a);let h=this.hot.getDataAtRowProp(o,u);this.hot.hasHook("beforeValueRender")&&(h=this.hot.runHooks("beforeValueRender",h,l)),this.hot.runHooks("beforeRenderer",n,r,i,u,h,l),this.hot.getCellRenderer(l)(this.hot,n,r,i,u,h,l),this.hot.runHooks("afterRenderer",n,r,i,u,h,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,Qi(rs,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,i,n,s),Object(l["isImmediatePropagationStopped"])(e)||(Fi(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,Qi(rs,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,i,n),Object(l["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(l["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(l["isImmediatePropagationStopped"])(e)||(Ji(rs,this)&&Fi(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(l["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 Di(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._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 Ji(rs,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;const s=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const o=t.firstChild;Object(r["hasClass"])(o,"relative")?(this.updateCellHeader(o.querySelector(".colHeader"),e,n,i),o.className="",Object(r["addClass"])(o,["relative",...s()])):(Object(r["empty"])(t),this.appendColHeader(e,t,n,i))}else{const{rootDocument:o}=this.hot,a=o.createElement("div"),l=o.createElement("span"),u=s();a.classList.add("relative",...u),l.className="colHeader",this.settings.ariaTags&&(Object(r["setAttribute"])(a,...Object(Xe["y"])()),Object(r["setAttribute"])(l,...Object(Xe["y"])())),this.updateCellHeader(l,e,n,i),a.appendChild(l),t.appendChild(a)}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){Qi(ss,this,e),Qi(os,this,t)}getLastSize(){return{width:Ji(ss,this),height:Ji(os,this)}}getFirstRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedRow(),1):null}getLastRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedRow(),-1):null}getFirstRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedColumn(),1):null}getLastRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedColumn(),-1):null}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return Ji(es,this)}getRowHeadersCount(){return Ji(ts,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}isVisible(){return this._wt.wtTable.isVisible()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}function us(){return parseInt(this.hot.rootElement.getAttribute(Object(Xe["e"])()[0]),10)}function hs(e){const t=Zi(as,this,us).call(this)+e;Object(r["setAttribute"])(this.hot.rootElement,...Object(Xe["e"])(t))}var cs=ls,ds=n("480c");function ms(e,t,n){return(t=fs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fs(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)}class gs{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ms(this,"hot",void 0),ms(this,"data",void 0),ms(this,"dataType","array"),ms(this,"colToProp",()=>{}),ms(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(B["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,{dataDotNotation:o}=this.hot.getSettings();let a=null,l=null;if(a=this.modifyRowData(e),Array.isArray(a))l=[],s?a.forEach((t,n)=>{l[n]=this.getAtPhysicalCell(e,n,a)}):Object($["rangeEach"])(t,n,n=>{l[n-t]=this.getAtPhysicalCell(e,n,a)});else if(Object(E["isObject"])(a)||Object(i["isFunction"])(a))if(l=r?[]:{},!s||r){const i=0,s=this.countFirstRowKeys()-1;Object($["rangeEach"])(i,s,u=>{const h=this.colToProp(u);if(u>=(t||i)&&u<=(n||s)&&!Number.isInteger(h)){const t=this.getAtPhysicalCell(e,h,a);r?l.push(t):o?Object(E["setProperty"])(l,h,t):l[h]=t}})}else Object(E["objectEach"])(a,(t,n)=>{const r=this.getAtPhysicalCell(e,n,a);o?Object(E["setProperty"])(l,n,r):l[n]=r});return l}setAtCell(e,t,n){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const r=Object(E["createObjectPropListener"])(n);this.hot.runHooks("modifySourceData",e,t,r,"set"),r.isTouched()&&(n=r.value)}Number.isInteger(t)?this.data[e][t]=n:Object(E["setProperty"])(this.data[e],t,n)}}getAtPhysicalCell(e,t,n){let r=null;if(n)if("string"===typeof t){const{dataDotNotation:e}=this.hot.getSettings();r=e?Object(E["getProperty"])(n,t):n[t]}else r="function"===typeof t?t(n):n[t];if(this.hot.hasHook("modifySourceData")){const n=Object(E["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($["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(ds["countFirstRowKeys"])(this.data)}destroy(){this.data=null,this.hot=null}}var ys=gs,ws=n("1b1a"),bs=n("cef7"),_s=n("1096"),vs=n("9056"),Ss=n("9f10"),Es=n("00fd");const Cs=new Map([["hiding",bs["a"]],["index",_s["a"]],["linkedPhysicalIndexToValue",vs["a"]],["physicalIndexToValue",Ss["a"]],["trimming",Es["a"]]]);function Ms(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Cs.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(Cs.get(e))(t)}var Ts=n("3d57"),Rs=n("c5cd");function Os(e,t,n){return(t=Ns(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e){var t=Ls(e,"string");return"symbol"==typeof t?t:t+""}function Ls(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 extends Rs["a"]{constructor(e,t){super(),Os(this,"mergedValuesCache",[]),Os(this,"aggregationFunction",void 0),Os(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(B["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(B["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 Is=n("7ae0");function ks(e,t,n){xs(e,t),t.set(e,n)}function xs(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 e.set(Ps(e,t),n),n}function Hs(e,t){return e.get(Ps(e,t))}function Ps(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 js=new WeakMap;class Fs{constructor(){ks(this,js,[])}subscribe(e){return this.addLocalHook("change",e),this._write(Hs(js,this)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){Ds(js,this,e)}}function Ys(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 Us(e,t,n){Vs(e,t),t.set(e,n)}function Vs(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(Gs(e,t))}function Ws(e,t,n){return e.set(Gs(e,t),n),n}function Gs(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(E["mixin"])(Fs,Is["a"]);var zs=new WeakMap,Ks=new WeakMap,Xs=new WeakMap,$s=new WeakMap,qs=new WeakMap;class Js{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Us(this,zs,new Set),Us(this,Ks,[]),Us(this,Xs,[]),Us(this,$s,!1),Us(this,qs,!1),Ws(qs,this,null!==e&&void 0!==e&&e)}createObserver(){const e=new Fs;return Bs(zs,this).add(e),e.addLocalHook("unsubscribe",()=>{Bs(zs,this).delete(e)}),e._writeInitialChanges(Ys(Bs(Ks,this),Bs(Xs,this))),e}emit(e){let t=Bs(Xs,this);Bs($s,this)&&Bs(Ks,this).length===e.length||(0===e.length?e=new Array(t.length).fill(Bs(qs,this)):Ws(Ks,this,new Array(e.length).fill(Bs(qs,this))),Bs($s,this)||(Ws($s,this,!0),t=Bs(Ks,this)));const n=Ys(t,e);Bs(zs,this).forEach(e=>e._write(n)),Ws(Xs,this,e)}}function Qs(e,t,n){return(t=Zs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zs(e){var t=eo(e,"string");return"symbol"==typeof t?t:t+""}function eo(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 to{constructor(){Qs(this,"indexesSequence",new ws["a"]),Qs(this,"trimmingMapsCollection",new As(e=>e.some(e=>!0===e),!1)),Qs(this,"hidingMapsCollection",new As(e=>e.some(e=>!0===e),!1)),Qs(this,"variousMapsCollection",new Rs["a"]),Qs(this,"hidingChangesObservable",new Js({initialIndexValue:!1})),Qs(this,"notTrimmedIndexesCache",[]),Qs(this,"notHiddenIndexesCache",[]),Qs(this,"isBatched",!1),Qs(this,"indexesSequenceChanged",!1),Qs(this,"indexesChangeSource",void 0),Qs(this,"trimmedIndexesChanged",!1),Qs(this,"hiddenIndexesChanged",!1),Qs(this,"renderablePhysicalIndexesCache",[]),Qs(this,"fromPhysicalToVisualIndexesCache",new Map),Qs(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,Ms(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 Es["a"]?this.trimmingMapsCollection.register(e,t):t instanceof bs["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(B["arrayMap"])(e,e=>this.getPhysicalFromVisualIndex(e)),r=this.getNotTrimmedIndexesLength(),i=e.length,s=Object(Ts["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(Ts["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(B["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(E["mixin"])(to,Is["a"]);var no=n("1004");function ro(e,t){return Object(E["objectEach"])(t,(t,n)=>{Object(s["isUndefined"])(e[n])&&(e[n]=t)}),e}function io(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 so(e){Object(s["isDefined"])(e)&&Object(C["a"])(et["a"]`Language with code "${e}" was not found. You should register particular language\x20
  275. before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}var oo=n("9acd");function ao(e,t){const n=Array.isArray(e)&&Number.isInteger(t);return n?e[t]:e}const{register:lo,getValues:uo}=Object(oo["a"])("phraseFormatters");function ho(e,t){lo(e,t)}function co(){return uo()}ho("pluralize",ao);var mo=n("0283");
  276. /**
  277. * @preserve
  278. * Authors: Handsoncode
  279. * Last updated: Nov 15, 2017
  280. *
  281. * Description: Definition file for English - United States language-country.
  282. */const fo={languageCode:"en-US",[mo["CONTEXTMENU_ITEMS_NO_ITEMS"]]:"No available options",[mo["CONTEXTMENU_ITEMS_ROW_ABOVE"]]:"Insert row above",[mo["CONTEXTMENU_ITEMS_ROW_BELOW"]]:"Insert row below",[mo["CONTEXTMENU_ITEMS_INSERT_LEFT"]]:"Insert column left",[mo["CONTEXTMENU_ITEMS_INSERT_RIGHT"]]:"Insert column right",[mo["CONTEXTMENU_ITEMS_REMOVE_ROW"]]:["Remove row","Remove rows"],[mo["CONTEXTMENU_ITEMS_REMOVE_COLUMN"]]:["Remove column","Remove columns"],[mo["CONTEXTMENU_ITEMS_UNDO"]]:"Undo",[mo["CONTEXTMENU_ITEMS_REDO"]]:"Redo",[mo["CONTEXTMENU_ITEMS_READ_ONLY"]]:"Read only",[mo["CONTEXTMENU_ITEMS_CLEAR_COLUMN"]]:"Clear column",[mo["CONTEXTMENU_ITEMS_ALIGNMENT"]]:"Alignment",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]]:"Left",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]]:"Center",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]]:"Right",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]]:"Justify",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]]:"Top",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]]:"Middle",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]]:"Bottom",[mo["CONTEXTMENU_ITEMS_FREEZE_COLUMN"]]:"Freeze column",[mo["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"]]:"Unfreeze column",[mo["CONTEXTMENU_ITEMS_BORDERS"]]:"Borders",[mo["CONTEXTMENU_ITEMS_BORDERS_TOP"]]:"Top",[mo["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]]:"Right",[mo["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]]:"Bottom",[mo["CONTEXTMENU_ITEMS_BORDERS_LEFT"]]:"Left",[mo["CONTEXTMENU_ITEMS_REMOVE_BORDERS"]]:"Remove border(s)",[mo["CONTEXTMENU_ITEMS_ADD_COMMENT"]]:"Add comment",[mo["CONTEXTMENU_ITEMS_EDIT_COMMENT"]]:"Edit comment",[mo["CONTEXTMENU_ITEMS_REMOVE_COMMENT"]]:"Delete comment",[mo["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]]:"Read-only comment",[mo["CONTEXTMENU_ITEMS_MERGE_CELLS"]]:"Merge cells",[mo["CONTEXTMENU_ITEMS_UNMERGE_CELLS"]]:"Unmerge cells",[mo["CONTEXTMENU_ITEMS_COPY"]]:"Copy",[mo["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"]]:["Copy with header","Copy with headers"],[mo["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"]]:["Copy with group header","Copy with group headers"],[mo["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"]]:["Copy header only","Copy headers only"],[mo["CONTEXTMENU_ITEMS_CUT"]]:"Cut",[mo["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"]]:"Insert child row",[mo["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"]]:"Detach from parent",[mo["CONTEXTMENU_ITEMS_HIDE_COLUMN"]]:["Hide column","Hide columns"],[mo["CONTEXTMENU_ITEMS_SHOW_COLUMN"]]:["Show column","Show columns"],[mo["CONTEXTMENU_ITEMS_HIDE_ROW"]]:["Hide row","Hide rows"],[mo["CONTEXTMENU_ITEMS_SHOW_ROW"]]:["Show row","Show rows"],[mo["FILTERS_CONDITIONS_NONE"]]:"None",[mo["FILTERS_CONDITIONS_EMPTY"]]:"Is empty",[mo["FILTERS_CONDITIONS_NOT_EMPTY"]]:"Is not empty",[mo["FILTERS_CONDITIONS_EQUAL"]]:"Is equal to",[mo["FILTERS_CONDITIONS_NOT_EQUAL"]]:"Is not equal to",[mo["FILTERS_CONDITIONS_BEGINS_WITH"]]:"Begins with",[mo["FILTERS_CONDITIONS_ENDS_WITH"]]:"Ends with",[mo["FILTERS_CONDITIONS_CONTAINS"]]:"Contains",[mo["FILTERS_CONDITIONS_NOT_CONTAIN"]]:"Does not contain",[mo["FILTERS_CONDITIONS_GREATER_THAN"]]:"Greater than",[mo["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"]]:"Greater than or equal to",[mo["FILTERS_CONDITIONS_LESS_THAN"]]:"Less than",[mo["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"]]:"Less than or equal to",[mo["FILTERS_CONDITIONS_BETWEEN"]]:"Is between",[mo["FILTERS_CONDITIONS_NOT_BETWEEN"]]:"Is not between",[mo["FILTERS_CONDITIONS_AFTER"]]:"After",[mo["FILTERS_CONDITIONS_BEFORE"]]:"Before",[mo["FILTERS_CONDITIONS_TODAY"]]:"Today",[mo["FILTERS_CONDITIONS_TOMORROW"]]:"Tomorrow",[mo["FILTERS_CONDITIONS_YESTERDAY"]]:"Yesterday",[mo["FILTERS_VALUES_BLANK_CELLS"]]:"Blank cells",[mo["FILTERS_DIVS_FILTER_BY_CONDITION"]]:"Filter by condition",[mo["FILTERS_DIVS_FILTER_BY_VALUE"]]:"Filter by value",[mo["FILTERS_LABELS_CONJUNCTION"]]:"And",[mo["FILTERS_LABELS_DISJUNCTION"]]:"Or",[mo["FILTERS_BUTTONS_SELECT_ALL"]]:"Select all",[mo["FILTERS_BUTTONS_CLEAR"]]:"Clear",[mo["FILTERS_BUTTONS_OK"]]:"OK",[mo["FILTERS_BUTTONS_CANCEL"]]:"Cancel",[mo["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"]]:"Search",[mo["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]]:"Value",[mo["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]]:"Second value",[mo["CHECKBOX_CHECKED"]]:"Checked",[mo["CHECKBOX_UNCHECKED"]]:"Unchecked"};var po=fo;const go=mo,yo=po.languageCode,{register:wo,getItem:bo,hasItem:_o,getValues:vo}=Object(oo["a"])("languagesDictionaries");function So(e,t){let n=e,r=t;return Object(E["isObject"])(e)&&(r=e,n=r.languageCode),Eo(n,r),wo(n,Object(E["deepClone"])(r)),Object(E["deepClone"])(r)}function Eo(e,t){e!==yo&&ro(t,bo(yo))}function Co(e){return Mo(e)?Object(E["deepClone"])(bo(e)):null}function Mo(e){return _o(e)}function To(){return vo()}function Ro(e,t,n){const r=Co(e);if(null===r)return null;const i=r[t];if(Object(s["isUndefined"])(i))return null;const o=Oo(i,n);return Array.isArray(o)?o[0]:o}function Oo(e,t){let n=e;return Object(B["arrayEach"])(co(),r=>{n=r(e,t)}),n}function No(e){let t=io(e);return Mo(t)||(t=yo,so(e)),t}So(po);var Lo=n("a309");class Ao{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(E["mixin"])(Ao,Is["a"]);var Io=Ao;function ko(e,t,n){return(t=xo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xo(e){var t=Do(e,"string");return"symbol"==typeof t?t:t+""}function Do(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 Ho extends Io{constructor(e,t){super(e,null),ko(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 Po=Ho;function jo(e){let{activeHeaderClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Lo["a"]})}function Fo(e){let{areaCornerVisible:t,...n}=e;return new Po({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...n,selectionType:Lo["b"]})}function Yo(e){let{...t}=e;return new Po({className:"highlight",...t,selectionType:Lo["b"]})}function Uo(e){let{columnClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Lo["c"]})}function Vo(e){let{cellCornerVisible:t,...n}=e;return new Po({className:"current",headerAttributes:[Object(Xe["I"])()],border:{width:2,color:"#4b89ff",cornerVisible:t},...n,selectionType:Lo["f"]})}function Bo(e){let{border:t,visualCellRange:n,...r}=e;return new Po({...t,...r,selectionType:Lo["d"]},n)}function Wo(e){let{...t}=e;return new Po({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:Lo["e"]})}function Go(e){let{headerClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Lo["g"]})}function zo(e){let{rowClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Lo["h"]})}function Ko(e,t){Xo(e,t),t.add(e)}function Xo(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=qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qo(e){var t=Jo(e,"string");return"symbol"==typeof t?t:t+""}function Jo(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 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 Zo=new WeakSet;class ea{constructor(e){Ko(this,Zo),$o(this,"options",void 0),$o(this,"layerLevel",0),$o(this,"focus",void 0),$o(this,"fill",void 0),$o(this,"layeredAreas",new Map),$o(this,"areas",new Map),$o(this,"rowHeaders",new Map),$o(this,"columnHeaders",new Map),$o(this,"activeRowHeaders",new Map),$o(this,"activeColumnHeaders",new Map),$o(this,"activeCornerHeaders",new Map),$o(this,"rowHighlights",new Map),$o(this,"columnHighlights",new Map),$o(this,"customSelections",[]),this.options=e,this.focus=Vo(e),this.fill=Wo(e)}isEnabledFor(e,t){let n=e;e===Lo["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 Qo(Zo,this,ta).call(this,this.layeredAreas,Fo)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return Qo(Zo,this,ta).call(this,this.areas,Yo)}getAreas(){return[...this.areas.values()]}createRowHeader(){return Qo(Zo,this,ta).call(this,this.rowHeaders,Go)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return Qo(Zo,this,ta).call(this,this.columnHeaders,Go)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return Qo(Zo,this,ta).call(this,this.activeRowHeaders,jo)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return Qo(Zo,this,ta).call(this,this.activeColumnHeaders,jo)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return Qo(Zo,this,ta).call(this,this.activeCornerHeaders,jo)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return Qo(Zo,this,ta).call(this,this.rowHighlights,zo)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return Qo(Zo,this,ta).call(this,this.columnHighlights,Uo)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(Bo({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),Object(B["arrayEach"])(this.areas.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.layeredAreas.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.rowHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.columnHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.activeRowHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.activeColumnHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.activeCornerHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.rowHighlights.values(),e=>{e.clear()}),Object(B["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 ta(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 na=ea;function ra(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){var t=sa(e,"string");return"symbol"==typeof t?t:t+""}function sa(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 oa{constructor(e){ra(this,"ranges",[]),ra(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 aa=oa;function la(e,t){ha(e,t),t.add(e)}function ua(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 ca(e,t){return e.get(ma(e,t))}function da(e,t,n){return e.set(ma(e,t),n),n}function ma(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 fa=new WeakMap,pa=new WeakMap,ga=new WeakMap,ya=new WeakSet;class wa{constructor(e,t){la(this,ya),ua(this,fa,void 0),ua(this,pa,void 0),ua(this,ga,{x:0,y:0}),da(fa,this,e),da(pa,this,t)}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=ca(pa,this).createCellCoords(e,t);let i=ca(fa,this).current().highlight;const s=ca(pa,this).visualToRenderableCoords(i);let o=0,a=0;if(this.runLocalHooks("beforeTransformStart",r),null!==s.row&&null!==s.col){const{width:e,height:t}=ma(ya,this,_a).call(this),{row:s,col:l}=ma(ya,this,Ea).call(this,i),u=ca(pa,this).fixedRowsBottom(),h=ca(pa,this).minSpareRows(),c=ca(pa,this).minSpareCols(),d=ca(pa,this).autoWrapRow(),m=ca(pa,this).autoWrapCol(),f=ca(pa,this).createCellCoords(s+r.row,l+r.col);if(f.row>=t){const r=Object(E["createObjectPropListener"])(n&&h>0&&0===u),i=f.col+1,s=ca(pa,this).createCellCoords(f.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",r,ma(ya,this,Ca).call(this,s),i>=e),r.value?this.runLocalHooks("insertRowRequire",ca(pa,this).countRenderableRows()):m&&f.assign(s)}else if(f.row<0){const n=Object(E["createObjectPropListener"])(m),r=f.col-1,i=ca(pa,this).createCellCoords(t+f.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",n,ma(ya,this,Ca).call(this,i),r<0),m&&f.assign(i)}if(f.col>=e){const r=Object(E["createObjectPropListener"])(n&&c>0),i=f.row+1,s=ca(pa,this).createCellCoords(i>=t?i-t:i,f.col-e);this.runLocalHooks("beforeRowWrap",r,ma(ya,this,Ca).call(this,s),i>=t),r.value?this.runLocalHooks("insertColRequire",ca(pa,this).countRenderableColumns()):d&&f.assign(s)}else if(f.col<0){const n=Object(E["createObjectPropListener"])(d),r=f.row-1,i=ca(pa,this).createCellCoords(r<0?t+r:r,e+f.col);this.runLocalHooks("beforeRowWrap",n,ma(ya,this,Ca).call(this,i),r<0),d&&f.assign(i)}const{rowDir:p,colDir:g}=ma(ya,this,ba).call(this,f);o=p,a=g,i=ma(ya,this,Ca).call(this,f)}return this.runLocalHooks("afterTransformStart",i,o,a),i}transformEnd(e,t){const n=ca(pa,this).createCellCoords(e,t),r=ca(fa,this).current(),i=ca(pa,this).visualToRenderableCoords(r.highlight),s=ma(ya,this,va).call(this,r.to.row,r.from.row),o=ma(ya,this,Sa).call(this,r.to.col,r.from.col),a=r.to.clone();let l=0,u=0;if(this.runLocalHooks("beforeTransformEnd",n),null!==i.row&&null!==i.col&&null!==s&&null!==o){const{row:e,col:t}=ma(ya,this,Ea).call(this,r.highlight),i=ca(pa,this).createCellCoords(s+n.row,o+n.col),h=r.getTopStartCorner(),c=r.getTopEndCorner(),d=r.getBottomEndCorner();if(n.col<0&&o>=t&&i.col<t){const e=i.col-t;i.col=ma(ya,this,Sa).call(this,h.col,c.col)+e}else if(n.col>0&&o<=t&&i.col>t){const e=ma(ya,this,Sa).call(this,c.col,h.col),t=Math.max(i.col-e,1);i.col=e+t}if(n.row<0&&s>=e&&i.row<e){const t=i.row-e;i.row=ma(ya,this,va).call(this,h.row,d.row)+t}else if(n.row>0&&s<=e&&i.row>e){const e=ma(ya,this,va).call(this,d.row,h.row),t=Math.max(i.row-e,1);i.row=e+t}const{rowDir:m,colDir:f}=ma(ya,this,ba).call(this,i);l=m,u=f;const p=ma(ya,this,Ca).call(this,i);0===n.row&&0!==n.col?a.col=p.col:0!==n.row&&0===n.col?a.row=p.row:(a.row=p.row,a.col=p.col)}return this.runLocalHooks("afterTransformEnd",a,l,u),a}setOffsetSize(e){let{x:t,y:n}=e;da(ga,this,{x:t,y:n})}resetOffsetSize(){da(ga,this,{x:0,y:0})}}function ba(e){const{width:t,height:n}=ma(ya,this,_a).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 _a(){return{width:ca(ga,this).x+ca(pa,this).countRenderableColumns(),height:ca(ga,this).y+ca(pa,this).countRenderableRows()}}function va(e,t){const n=ca(pa,this).findFirstNonHiddenRenderableRow(e,t);return null===n?null:ca(ga,this).y+n}function Sa(e,t){const n=ca(pa,this).findFirstNonHiddenRenderableColumn(e,t);return null===n?null:ca(ga,this).x+n}function Ea(e){const{row:t,col:n}=ca(pa,this).visualToRenderableCoords(e);if(null===t||null===n)throw new Error("Renderable coords are not visible.");return ca(pa,this).createCellCoords(ca(ga,this).y+t,ca(ga,this).x+n)}function Ca(e){const t=e.clone();return t.col=e.col-ca(ga,this).x,t.row=e.row-ca(ga,this).y,ca(pa,this).renderableToVisualCoords(t)}Object(E["mixin"])(wa,Is["a"]);var Ma=wa,Ta=n("a952");function Ra(e,t,n){Oa(e,t),t.set(e,n)}function Oa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Na(e,t,n){return(t=La(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function La(e){var t=Aa(e,"string");return"symbol"==typeof t?t:t+""}function Aa(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 Ia(e,t){return e.get(xa(e,t))}function ka(e,t,n){return e.set(xa(e,t),n),n}function xa(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 Da=new WeakMap,Ha=new WeakMap,Pa=new WeakMap,ja=new WeakMap,Fa=new WeakMap,Ya=new WeakMap;class Ua{constructor(e,t){var n=this;Na(this,"settings",void 0),Na(this,"tableProps",void 0),Na(this,"inProgress",!1),Na(this,"selectedRange",new aa((e,t,n)=>this.tableProps.createCellRange(e,t,n))),Na(this,"highlight",void 0),Ra(this,Da,void 0),Ra(this,Ha,void 0),Na(this,"selectedByRowHeader",new Set),Na(this,"selectedByColumnHeader",new Set),Ra(this,Pa,!1),Ra(this,ja,!1),Ra(this,Fa,"unknown"),Ra(this,Ya,-1),this.settings=e,this.tableProps=t,this.highlight=new na({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[Object(Xe["I"])()],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)}),ka(Da,this,new Ma(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})),ka(Ha,this,new Ma(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})),Ia(Da,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)})),Ia(Da,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)})),Ia(Da,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)})),Ia(Da,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)})),Ia(Da,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)})),Ia(Da,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)})),Ia(Da,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)})),Ia(Da,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)})),Ia(Ha,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)})),Ia(Ha,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){ka(Fa,this,e)}markEndSource(){ka(Fa,this,"unknown")}getSelectionSource(){return Ia(Fa,this)}setExpectedLayers(e){ka(Ya,this,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,ka(Ya,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();ka(Pa,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),this.applyAndCommit();const o=-1===Ia(Ya,this)||this.selectedRange.size()===Ia(Ya,this);this.runLocalHooks("afterSetRangeEnd",e,o)}applyAndCommit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectedRange.current(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();const n=this.tableProps.countRows(),r=this.tableProps.countCols();t<this.highlight.layerLevel&&(Object(B["arrayEach"])(this.highlight.getAreas(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getLayeredAreas(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getRowHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getColumnHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getActiveRowHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getActiveColumnHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getActiveCornerHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getRowHighlights(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getColumnHighlights(),e=>{e.clear()})),this.highlight.useLayerLevel(t);const i=this.highlight.createArea(),s=this.highlight.createLayeredArea(),o=this.highlight.createRowHeader(),a=this.highlight.createColumnHeader(),l=this.highlight.createActiveRowHeader(),u=this.highlight.createActiveColumnHeader(),h=this.highlight.createActiveCornerHeader(),c=this.highlight.createRowHighlight(),d=this.highlight.createColumnHighlight();if(i.clear(),s.clear(),o.clear(),a.clear(),l.clear(),u.clear(),h.clear(),c.clear(),d.clear(),this.highlight.isEnabledFor(Lo["b"],e.highlight)&&(this.isMultiple()||t>=1)&&(i.add(e.from).add(e.to).commit(),s.add(e.from).add(e.to).commit(),1===t)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(t-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(t)}if(this.highlight.isEnabledFor(Lo["g"],e.highlight)){if(!e.isSingleHeader()){const t=this.tableProps.createCellCoords(Math.max(e.from.row,0),-1),n=this.tableProps.createCellCoords(e.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(e.from.col,0)),i=this.tableProps.createCellCoords(-1,e.to.col);"single"===this.settings.selectionMode?(o.add(t).commit(),a.add(r).commit(),c.add(t).commit(),d.add(r).commit()):(o.add(t).add(n).commit(),a.add(r).add(i).commit(),c.add(t).add(n).commit(),d.add(r).add(i).commit())}const t=!Ia(ja,this)&&this.isEntireRowSelected()&&(r>0&&r===e.getWidth()||0===r&&this.isSelectedByRowHeader()),i=!Ia(ja,this)&&this.isEntireColumnSelected()&&(n>0&&n===e.getHeight()||0===n&&this.isSelectedByColumnHeader());t&&l.add(this.tableProps.createCellCoords(Math.max(e.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(e.to.row,0),-1)).commit(),i&&u.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(e.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(e.to.col,0))).commit(),t&&i&&h.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}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(Lo["f"],t.highlight)&&n.add(t.highlight).commit().syncWith(t),this.inProgress||(ka(Pa,this,!0),this.runLocalHooks("afterSetFocus",t.highlight))}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders?Ia(Da,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Ia(Da,this).resetOffsetSize(),this.setRangeStart(Ia(Da,this).transformStart(e,t,n))}transformEnd(e,t){this.settings.navigableHeaders?Ia(Da,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Ia(Da,this).resetOffsetSize(),this.setRangeEnd(Ia(Da,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()?Ia(Ha,this).setOffsetSize({x:i<0?Math.abs(i):-s,y:r<0?Math.abs(r):-o}):Ia(Ha,this).setOffsetSize({x:i<0?0:-s,y:r<0?0:-o});const a=Ia(Ha,this).transformStart(e,t);this.setRangeFocus(a.normalize())}shiftRows(e,t){if(!this.isSelected())return;const n=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||n.getOuterTopStartCorner().row>=e){const{from:r,to:i,highlight:s}=n,o=this.tableProps.countRows(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),u=l?-1:0,h=l?0:t;this.getSelectedRange().pop();const c=this.tableProps.createCellCoords(Object($["clamp"])(r.row+h,u,o-1),r.col),d=this.tableProps.createCellCoords(Object($["clamp"])(i.row+t,u,o-1),i.col);this.markSource("shift"),s.row>=e?this.setRangeStartOnly(c,!0,this.tableProps.createCellCoords(Object($["clamp"])(s.row+t,0,o-1),s.col)):this.setRangeStartOnly(c,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.markEndSource()}}shiftColumns(e,t){if(!this.isSelected())return;const n=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||n.getOuterTopStartCorner().col>=e){const{from:r,to:i,highlight:s}=n,o=this.tableProps.countCols(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),u=a?-1:0,h=a?0:t;this.getSelectedRange().pop();const c=this.tableProps.createCellCoords(r.row,Object($["clamp"])(r.col+h,u,o-1)),d=this.tableProps.createCellCoords(i.row,Object($["clamp"])(i.col+t,u,o-1));this.markSource("shift"),s.col>=e?this.setRangeStartOnly(c,!0,this.tableProps.createCellCoords(s.row,Object($["clamp"])(s.col+t,0,o-1))):this.setRangeStartOnly(c,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){if(!this.isSelected())return!1;const e=Object(E["createObjectPropListener"])(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&Ia(Pa,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,u=t?-o:0;if(0===l&&0===u&&(0===i||0===s))return;let h=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:c,disableHeadersHighlight:d}=r;ka(ja,this,d),c&&Number.isInteger(null===c||void 0===c?void 0:c.row)&&Number.isInteger(null===c||void 0===c?void 0:c.col)&&(h=this.tableProps.createCellCoords(Object($["clamp"])(c.row,l,i-1),Object($["clamp"])(c.col,u,s-1)));const m=this.tableProps.createCellCoords(l,u),f=this.tableProps.createCellCoords(i-1,s-1);this.clear(),this.setRangeStartOnly(m,void 0,h),u<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.finish(),ka(ja,this,!1)}selectCells(e){var t=this;const n=Object(Ta["c"])(e);if(n===Ta["a"])return!1;if(n===Ta["b"])throw new Error(et["a"]`Unsupported format of the selection ranges was passed. To select cells pass\x20
  283. the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
  284. columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const r=Object(Ta["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(B["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,u=this.tableProps.createCellCoords(l,r),h=this.tableProps.createCellCoords(s-1,i),c=this.tableProps.createCellRange(u,u,h).isValid({countRows:s,countCols:o,countRowHeaders:0,countColHeaders:a});if(c){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($["clamp"])(n.row,l,s-1),t=Object($["clamp"])(n.col,Math.min(r,i),Math.max(r,i))):(e=Object($["clamp"])(n,l,s-1),t=r);const o=this.tableProps.createCellCoords(e,t),u=0===a?0:Object($["clamp"])(o.row,l,-1),h=s-1,c=this.tableProps.createCellCoords(u,r),d=this.tableProps.createCellCoords(h,i);this.runLocalHooks("beforeSelectColumns",c,d,o),c.row=u,d.row=h,this.setRangeStartOnly(c,void 0,o),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectColumns",c,d,o),this.finish()}return c}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),u=this.tableProps.createCellRange(a,a,l).isValid({countRows:r,countCols:i,countRowHeaders:s,countColHeaders:0});if(u){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($["clamp"])(n.row,Math.min(e,t),Math.max(e,t)),a=Object($["clamp"])(n.col,o,i-1)):(r=e,a=Object($["clamp"])(n,o,i-1));const l=this.tableProps.createCellCoords(r,a),u=0===s?0:Object($["clamp"])(l.col,o,-1),h=i-1,c=this.tableProps.createCellCoords(e,u),d=this.tableProps.createCellCoords(t,h);this.runLocalHooks("beforeSelectRows",c,d,l),c.col=u,d.col=h,this.setRangeStartOnly(c,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectRows",c,d,l),this.finish()}return u}refresh(){if(!this.isSelected())return;const e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();const n=this.selectedRange.peekByIndex(this.selectedRange.size()-1),{from:r,to:i,highlight:s}=n;this.clear(),s.assign({row:Object($["clamp"])(s.row,-1/0,e-1),col:Object($["clamp"])(s.col,-1/0,t-1)}),r.assign({row:Object($["clamp"])(r.row,-1/0,e-1),col:Object($["clamp"])(r.col,-1/0,t-1)}),i.assign({row:Object($["clamp"])(i.row,0,e-1),col:Object($["clamp"])(i.col,0,t-1)}),this.selectedRange.ranges.push(n),this.highlight.getFocus().add(s).commit().syncWith(n),this.applyAndCommit(n)}commit(){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(),u=this.highlight.createColumnHighlight();e.commit(),t.commit(),n.commit(),i.commit(),s.commit(),o.commit(),a.commit(),l.commit(),u.commit()}this.highlight.useLayerLevel(n)}}Object(E["mixin"])(Ua,Is["a"]);var Va=Ua,Ba=n("76ab");function Wa(e,t){var n;return"CELL_TYPE"!==e&&((null===(n=t._automaticallyAssignedMetaProps)||void 0===n?void 0:n.has(e))||!Object(E["hasOwnProperty"])(t,e))}function Ga(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"===typeof t.type?Object(Ba["a"])(t.type):t.type;if(e._automaticallyAssignedMetaProps&&Object(E["objectEach"])(t,(t,n)=>{e._automaticallyAssignedMetaProps.delete(n)}),!Object(E["isObject"])(r))return;n!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};Object(E["objectEach"])(r,(t,r)=>{var s;Wa(r,n)&&(i[r]=t,null===(s=e._automaticallyAssignedMetaProps)||void 0===s||s.add(r))}),Object(E["extend"])(e,i)}function za(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}Object(E["inherit"])(n,e);for(let r=0;r<t.length;r++)n.prototype[t[r]]=void 0;return n}function Ka(e){return Number.isInteger(e)&&e>=0}function Xa(e,t){if(!e())throw new Error("Assertion failed: "+t)}function $a(e){return null===e||void 0===e}var qa=()=>({_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,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",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,headerClassName:void 0,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(E["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 Ja(e,t,n){return(t=Qa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qa(e){var t=Za(e,"string");return"symbol"==typeof t?t:t+""}function Za(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 el(){return class{}}class tl{constructor(e){Ja(this,"metaCtor",el()),Ja(this,"meta",void 0),this.meta=this.metaCtor.prototype,Object(E["extend"])(this.meta,qa()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;Object(E["extend"])(this.meta,e),Ga(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}function nl(e,t,n){return(t=rl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rl(e){var t=il(e,"string");return"symbol"==typeof t?t:t+""}function il(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 sl{constructor(e){nl(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){Object(E["extend"])(this.meta,e),Ga(this.meta,e,e)}}function ol(e,t,n){return(t=al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function al(e){var t=ll(e,"string");return"symbol"==typeof t?t:t+""}function ll(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 ul{constructor(e){ol(this,"valueFactory",void 0),ol(this,"data",[]),ol(this,"index",[]),ol(this,"holes",new Set),this.valueFactory=e}obtain(e){Xa(()=>Ka(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;Xa(()=>Ka(e)||$a(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=$a(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;Xa(()=>Ka(e)||$a(e),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice($a(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(B["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 hl(e,t,n){return(t=cl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cl(e){var t=dl(e,"string");return"symbol"==typeof t?t:t+""}function dl(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 ml=["data","width"];class fl{constructor(e){hl(this,"globalMeta",void 0),hl(this,"metas",new ul(()=>this._createMeta())),this.globalMeta=e,this.metas=new ul(()=>this._createMeta())}updateMeta(e,t){const n=this.getMeta(e);Object(E["extend"])(n,t),Ga(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 za(this.globalMeta.getMetaConstructor(),ml).prototype}}function pl(e,t,n){return(t=gl(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)}class wl{constructor(e){pl(this,"columnMeta",void 0),pl(this,"metas",new ul(()=>this._createRow())),this.columnMeta=e}updateMeta(e,t,n){const r=this.getMeta(e,t);Object(E["extend"])(r,n),Ga(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){Xa(()=>Ka(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 ul(e=>this._createMeta(e))}_createMeta(e){const t=this.columnMeta.getMetaConstructor(e);return new t}}class bl{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 tl(e),this.tableMeta=new sl(this.globalMeta),this.columnMeta=new fl(this.globalMeta),this.cellMeta=new wl(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 _l(e,t,n){return(t=vl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vl(e){var t=Sl(e,"string");return"symbol"==typeof t?t:t+""}function Sl(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(E["mixin"])(bl,Is["a"]);class El{constructor(e){_l(this,"metaManager",void 0),_l(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>this.extendCellMeta(e)),no["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(E["hasOwnProperty"])(e,"type")?e.type:null;let h=Object(i["isFunction"])(e.cells)?e.cells(n,r,l):null;var c;u&&(h?h.type=null!==(c=h.type)&&void 0!==c?c: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 Cl(e,t,n){Ml(e,t),t.set(e,n)}function Ml(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tl(e,t,n){return(t=Rl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rl(e){var t=Ol(e,"string");return"symbol"==typeof t?t:t+""}function Ol(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 Nl(e,t){return e.get(Ll(e,t))}function Ll(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 Al=new WeakMap;class Il{constructor(e){Tl(this,"metaManager",void 0),Tl(this,"usageTracker",new Set),Tl(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["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",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),Cl(this,Al,(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{initOnly:n,target:r,onChange:i}=e,s="string"===typeof r,o=s?r:t,a="_"+o;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[o],i?(this.installPropWatcher(t,a,i),s&&this.installPropWatcher(r,a,i)):n&&(this.installPropWatcher(t,a,Nl(Al,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}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 kl=n("3bc4");function xl(e,t,n){return(t=Dl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dl(e){var t=Hl(e,"string");return"symbol"==typeof t?t:t+""}function Hl(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 Pl{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,n){xl(this,"hot",void 0),xl(this,"metaManager",void 0),xl(this,"tableMeta",void 0),xl(this,"dataSource",void 0),xl(this,"duckSchema",void 0),xl(this,"colToPropCache",void 0),xl(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(E["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(E["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(ds["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(E["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(E["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,c=[];while(o<t&&i+o<u){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=Object(E["deepClone"])(this.getSchema()):(e=[],Object($["rangeEach"])(h-1,()=>e.push(null))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+o):(e={},Object(E["deepExtend"])(e,this.getSchema())),c.push(e),o+=1}this.hot.rowIndexMapper.insertIndexes(a,o),"below"===r&&(s=Math.min(s+1,i)),this.spliceData(s,0,c);const d=this.hot.toVisualRow(s);return this.hot.countSourceRows()===c.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",d,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 u=o;a<this.hot.countCols()&&(u=this.hot.toPhysicalColumn(a));const h=this.hot.countSourceRows();let c=this.hot.countCols(),d=0,m=u;"end"===r&&(m=Math.min(m+1,o));const f=m;while(d<t&&c<s){if("number"!==typeof a||a>=c)if(h>0)for(let e=0;e<h;e+=1)"undefined"===typeof i[e]&&(i[e]=[]),i[e].push(null);else i.push([null]);else for(let e=0;e<h;e++)i[e].splice(m,0,null);d+=1,m+=1,c+=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 u=i.slice(0).sort((e,t)=>t-e);return u.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,u=this.dataSource;for(let h=0;h<l;h++)a&&i[0]!==i[h]-h&&(a=!1);if(a)for(let h=0,c=this.hot.countSourceRows();h<c;h++)u[h].splice(i[0],t),0===h&&this.metaManager.removeColumn(i[0],t);else for(let h=0,c=this.hot.countSourceRows();h<c;h++)for(let e=0;e<l;e++)u[h].splice(s[e],1),0===h&&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(B["extendArray"])(a,s);let u=0;while(u<n)a.push(null),u+=1;return Object(B["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(B["extendArray"])(a,s);let u=0;while(u<n)a.push(null),u+=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;const{dataDotNotation:s}=this.hot.getSettings();let o=null;if(r&&r.hasOwnProperty&&Object(E["hasOwnProperty"])(r,t))o=r[t];else if(s&&"string"===typeof t&&t.indexOf(".")>-1){let e=r;if(!e)return null;const n=t.split(".");for(let t=0,r=n.length;t<r;t++)if(e=e[n[t]],"undefined"===typeof e)return null;o=e}else"function"===typeof t&&(o=t(this.dataSource.slice(n,n+1)[0]));if(this.hot.hasHook("modifyData")){const e=Object(E["createObjectPropListener"])(o);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}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(E["createObjectPropListener"])(i);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"set"),e.isTouched()&&(i=e.value)}const{dataDotNotation:a}=this.hot.getSettings();if(s&&s.hasOwnProperty&&Object(E["hasOwnProperty"])(s,t))s[t]=i;else if(a&&"string"===typeof t&&t.indexOf(".")>-1){let e,n=s,r=0;const o=t.split(".");for(r=0,e=o.length-1;r<e;r++)"undefined"===typeof n[o[r]]&&(n[o[r]]={}),n=n[o[r]];n[o[r]]=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,Pl.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 u=n===Pl.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),c=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=h;i++){o=[];const n=i>=0?this.hot.toPhysicalRow(i):i;for(s=Math.min(e.col,t.col);s<=c;s++){if(null===n)break;o.push(u.call(this,i,this.colToProp(s)))}null!==n&&r.push(o)}return r}getText(e,t){return Object(kl["b"])(this.getRange(e,t,Pl.DESTINATION_RENDERER))}getCopyableText(e,t){return Object(kl["b"])(this.getRange(e,t,Pl.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 jl=Pl;function Fl(e,t,n,s){const{hotInstance:o,dataMap:a,dataSource:l,internalSource:u,source:h,metaManager:c,firstRun:d}=s,m=Object(X["toUpperCaseFirst"])(u),f=o.getSettings();Array.isArray(f.dataSchema)?o.dataType="array":Object(i["isFunction"])(f.dataSchema)?o.dataType="function":o.dataType="object",a&&a.destroy(),e=o.runHooks("before"+m,e,d,h);const p=new jl(o,e,c);if(t(p),"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=p.getSchema();let n;e=[];let r=0,i=0;for(r=0,i=f.startRows;r<i;r++)if("object"!==o.dataType&&"function"!==o.dataType||!f.dataSchema)if("array"===o.dataType)n=Object(E["deepClone"])(t[0]),e.push(n);else{n=[];for(let e=0,t=f.startCols;e<t;e++)n.push(null);e.push(n)}else n=Object(E["deepClone"])(t),e.push(n)}}Array.isArray(e[0])&&(o.dataType="array"),f.data=e,p.dataSource=e,l.data=e,l.dataType=o.dataType,l.colToProp=p.colToProp.bind(p),l.propToCol=p.propToCol.bind(p),l.countCachedColumns=p.countCachedColumns.bind(p),n(p),o.runHooks("after"+m,e,d,h),d||(o.runHooks("afterChange",null,u),o.render()),o.getSettings().ariaTags&&Object(r["setAttribute"])(o.rootElement,[Object(Xe["C"])(-1),Object(Xe["e"])(o.countCols()+(o.view?o.countRowHeaders():0))])}function Yl(e){return t=>{let{col:n}=t;e.scrollViewportTo({col:n})}}function Ul(){return()=>{}}function Vl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Bl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Wl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Gl(e){return t=>{let{row:n}=t;e.scrollViewportTo({row:n})}}function zl(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 Kl(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=Vl(e):t.isSelectedByCorner()?o=Ul(e):t.isSelectedByRowHeader()?o=Gl(e):t.isSelectedByColumnHeader()?o=Yl(e):1===t.getSelectedRange().size()&&t.isMultiple()?o=Bl(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(o=Wl(e)):o=zl(e),null===(s=o)||void 0===s||s(i)}}}var Xl=n("c4fa");function $l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.rootElement,r=ql(e),i=ql(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 ql(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(Xe["y"])(),Object(Xe["n"])()]),n}function Jl(e){const t=eu(e);let n;const{activate:r,deactivate:i}=$l(e,{onFocusFromTop(){var r;const i=null!==(r=t(n))&&void 0!==r?r:Ql(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:Zl(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 u(){s.wrapped=!1,s.flipped=!1,e.deselectCell(),e.unlisten()}e.addHook("afterListen",()=>i()),e.addHook("afterUnlisten",()=>r()),e.addHook("afterSelection",(t,r,i,u,h)=>{var c;(a&&(s.wrapped&&s.flipped||l)&&(l=!1,h.value=!0),o)&&(n=null===(c=e.getSelectedRangeLast())||void 0===c?void 0:c.highlight)}),e.addHook("beforeRowWrap",(e,t,n)=>{s.wrapped=!0,s.flipped=n});const h={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Xl["b"],group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...h,callback:()=>{const{tabNavigation:t}=e.getSettings();a=!0,e.getSelectedRangeLast()&&!t&&(o=!1),t||(l=!0)},position:"before"},{...h,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?Ql(e):Zl(e)),u(),!1;t.preventDefault()},position:"after"}])}function Ql(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 Zl(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 eu(e){return t=>{if(!t)return null;const n=Ql(e),r=Zl(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 tu=n("6906");const nu=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"]]),ru=e=>e.map(e=>{const t=e.toLowerCase();return nu.has(t)?nu.get(t):t}).sort().join("+"),iu=e=>e.split("+"),su=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]),ou=e=>{let{which:t,key:n}=e;if(su.has(t))return su.get(t);const r=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(r)?r:n.toLowerCase()},au=Symbol("shortcut-context");function lu(e){return Object(E["isObject"])(e)&&e.__kindOf===au}const uu=e=>{const t=Object(tu["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:u=!1,relativeToGroup:h,position:c,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(et["a"]`Pass the shortcut\'s keys as an array of arrays,\x20
  285. using the KeyboardEvent.key properties:\x20
  286. 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:u};Object(s["isDefined"])(h)&&(m.relativeToGroup=h,m.position=c),lu(d)&&(m.forwardToContext=d),e.forEach(e=>{const n=ru(e),r=t.hasItem(n);if(r){const e=t.getItem(n);let r=e.findIndex(e=>e.group===h);-1!==r?"before"===c?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(E["objectEach"])(t,(n,r)=>{!1===Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=t[r])}),n(e)})},o=e=>{const n=ru(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(iu(n)):(r.length=0,r.push(...i))})},l=e=>{const n=ru(e),r=t.getItem(n);return Object(s["isDefined"])(r)?r.slice():[]},u=e=>{const n=ru(e);return t.hasItem(n)};return{__kindOf:au,addShortcut:n,addShortcuts:r,getShortcuts:l,hasShortcut:u,removeShortcutsByKeys:o,removeShortcutsByGroup:a}};function hu(){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 cu=["meta","alt","shift","control"],du=hu(),mu=[];let fu=0;function pu(e,t,n,i,s){const a=e=>cu.includes(e),u=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},h=e=>{if(!1===t(e))return;const r=n(e);if(229===e.keyCode||!1===r||Object(l["isImmediatePropagationStopped"])(e))return;const h=ou(e);let c=[];a(h)||(c=u(e));const d=[h].concat(c),m=s(e,d);!m&&(Object(o["isMacOS"])()&&c.includes("meta")||!Object(o["isMacOS"])()&&c.includes("control"))&&s(e,[h].concat(u(e,!0))),i(e)},c=e=>{if(e.key){const t=ou(e);a(t)&&du.press(t)}},d=e=>{if(e.key){const t=ou(e);a(t)&&du.release(t)}},m=()=>{du.releaseAll()},f=()=>{let t=e;fu+=1;while(t)1===fu&&(t.document.documentElement.addEventListener("keydown",c),mu.push({event:"keydown",listener:c}),t.document.documentElement.addEventListener("keyup",d),mu.push({event:"keyup",listener:d})),t.document.documentElement.addEventListener("keydown",h),t.document.documentElement.addEventListener("blur",m),t=Object(r["getParentWindow"])(t)},p=()=>{let t=e;fu-=1;while(t){if(0===fu){for(let e=0;e<mu.length;e++){const{event:n,listener:r}=mu[e];t.document.documentElement.removeEventListener(n,r)}mu.length=0}t.document.documentElement.removeEventListener("keydown",h),t.document.documentElement.removeEventListener("blur",m),t=Object(r["getParentWindow"])(t)}};return{mount:f,unmount:p,isPressed:e=>du.isPressed(e),releasePressedKeys:()=>du.releaseAll()}}const gu=e=>{let{ownerWindow:t,handleEvent:n,beforeKeyDown:r,afterKeyDown:i}=e;const s=Object(tu["a"])({errorIdExists:e=>`The "${e}" context name is already registered.`});let o="grid";const a=e=>{const t=uu(e);return s.addItem(e,t),t},u=()=>o,h=e=>s.getItem(e),c=e=>{if(!s.hasItem(e))throw new Error(et["a"]`You've tried to activate the "${e}" shortcut context\x20
  287. that does not exist. Before activation, register the context using the "addContext" method.`);o=e};let d=!1;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u();const r=lu(n)?n:h(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:u,captureCtrl:h,forwardToContext:c}=s[o];if(!0===r(e)){if(d=h,i=!1===n(e,t),d=!1,a&&e.preventDefault(),u&&(Object(l["stopImmediatePropagation"])(e),e.stopPropagation()),i)break;c&&m(e,t,c)}}return i},f=pu(t,n,r,i,m);return f.mount(),{addContext:a,getActiveContextName:u,getContext:h,setActiveContextName:c,isCtrlPressed:()=>!d&&(f.isPressed("control")||f.isPressed("meta")),releasePressedKeys:()=>f.releasePressedKeys(),destroy:()=>f.unmount()}};var yu=n("1e8c");let wu=null;const bu=new Map;new Set;function _u(e,t){var n,a=this;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=this;const d=new h["a"](c);let m,f,p,g,y,w,b=!0;Bi(l)&&Vi(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const _=null!==(n=null===t||void 0===t?void 0:t.layoutDirection)&&void 0!==n?n:"inherit",v=["rtl","ltr"].includes(_)?_:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",v),this.isRtl=function(){return"rtl"===v},this.isLtr=function(){return!c.isRtl()},this.getDirectionFactor=function(){return c.isLtr()?1:-1},t.language=No(t.language);const C=new bl(c,t,[El,Il]),M=C.getTableMeta(),T=C.getGlobalMeta(),R=Object(tu["a"])();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),Wi(this)&&Object(s["_injectProductInfo"])(t.licenseKey,e),this.guid="ht_"+Object(X["randomString"])(),bu.set(this.guid,this),this.columnIndexMapper=new to,this.rowIndexMapper=new to,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{c.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{c.runHooks("afterRowSequenceChange",e)}),f=new ys(c),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 c._createCellCoords(t>=0?c.rowIndexMapper.getRenderableFromVisualIndex(t):t,n>=0?c.columnIndexMapper.getRenderableFromVisualIndex(n):n)},N=e=>{const{row:t,col:n}=e;return c._createCellCoords(t>=0?c.rowIndexMapper.getVisualFromRenderableIndex(t):t,n>=0?c.columnIndexMapper.getVisualFromRenderableIndex(n):n)},L=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=c.rowIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?c.rowIndexMapper.getRenderableFromVisualIndex(s):s},A=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=c.columnIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?c.columnIndexMapper.getRenderableFromVisualIndex(s):s};let I=new Va(M,{rowIndexMapper:c.rowIndexMapper,columnIndexMapper:c.columnIndexMapper,countCols:()=>c.countCols(),countRows:()=>c.countRows(),propToCol:e=>m.propToCol(e),isEditorOpened:()=>!!c.getActiveEditor()&&c.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return a.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return a.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>c.getShortcutManager(),createCellCoords:(e,t)=>c._createCellCoords(e,t),createCellRange:(e,t,n)=>c._createCellRange(e,t,n),visualToRenderableCoords:O,renderableToVisualCoords:N,findFirstNonHiddenRenderableRow:L,findFirstNonHiddenRenderableColumn:A,isDisabledCellSelection:(e,t)=>e<0||t<0?c.getSettings().disableVisualSelection:c.getCellMeta(e,t).disableVisualSelection});this.selection=I;const k=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function x(e){const t=io(e);Mo(t)?(c.runHooks("beforeLanguageChange",t),T.language=t,c.runHooks("afterLanguageChange",t)):so(e)}function D(e,t){const n="className"===e?c.rootElement:c.table;if(b)Object(r["addClass"])(n,t);else{let i=[],s=[];T[e]&&(i=Array.isArray(T[e])?T[e]:Object(B["stringToArray"])(T[e])),t&&(s=Array.isArray(t)?t:Object(B["stringToArray"])(t));const o=Object(B["getDifferenceOfArrays"])(i,s),a=Object(B["getDifferenceOfArrays"])(s,i);o.length&&Object(r["removeClass"])(n,o),a.length&&Object(r["addClass"])(n,a)}T[e]=t}function H(){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 P(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function F(e,t,n){if(!e.length)return void n();const r=c.getActiveEditor(),i=new H;let s=!0;i.onQueueEmpty=()=>{r&&s&&r.cancelChanges(),n()};for(let o=e.length-1;o>=0;o--){const[n,r,,a]=e[o],l=m.propToCol(r);let u;u=Number.isInteger(l)?c.getCellMeta(n,l):{...Object.getPrototypeOf(M),...M},"numeric"===u.type&&"string"===typeof a&&Object($["isNumericLike"])(a)&&(e[o][3]=P(a)),c.getCellValidator(u)&&(i.addValidatorToQueue(),c.validateCell(e[o][3],u,function(t,n){return function(r){if("boolean"!==typeof r)throw new Error("Validation error: result is not boolean");!1===r&&!1===n.allowInvalid&&(s=!1,e.splice(t,1),n.valid=!0),i.removeValidatorFormQueue()}}(o,u),t))}i.checkIfQueueIsEmpty()}function Y(e,t){for(let r=e.length-1;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(M.allowInsertRow)while(e[r][0]>c.countRows()-1){const{delta:e}=m.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===c.dataType&&(!M.columns||0===M.columns.length)&&M.allowInsertColumn)while(m.propToCol(e[r][1])>c.countCols()-1){const{delta:e}=m.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||m.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}const n=e.length>0;if(c.forceFullRender=!0,n){p.adjustRowsAndCols(),c.runHooks("beforeChangeRender",e,t),g.closeEditor(),c.view.render(),g.prepareEditor(),c.view.adjustElementsSize(),c.runHooks("afterChange",e,t||"edit");const n=c.getActiveEditor();n&&Object(s["isDefined"])(n.refreshValue)&&n.refreshValue()}else c.view.render()}function U(e,t,n){return Array.isArray(e)?e:[[e,t,n]]}function V(e,t){const n=c.getActiveEditor(),r=c.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",k),this.rowIndexMapper.addLocalHook("cacheUpdated",k),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{const n=Object(E["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,c.colToProp(s.col),o.row,c.colToProp(o.col),n,a),t&&(!n.isTouched()||n.isTouched()&&!n.value)&&w.scrollTo(e);const l=I.isSelectedByRowHeader(),u=I.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"]),"shift"!==I.getSelectionSource()&&g.closeEditor(null),c.view.render(),g.prepareEditor()}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{const t=Object(E["createObjectPropListener"])(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&w.scrollTo(e),g.closeEditor(),c.view.render(),g.prepareEditor()}),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,c.colToProp(n.col),r.row,c.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",()=>{g.closeEditor(),c.view.render(),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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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 a.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")),p={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(B["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=c.countSourceRows();if(M.maxRows===a)return;const u="insert_row_below"===e?"below":"above";t=null!==(n=t)&&void 0!==n?n:"below"===u?a:0;const{delta:h,startPhysicalIndex:d}=m.createRow(t,i,{source:o,mode:u});I.shiftRows(c.toVisualRow(d),h);break;case"insert_col_start":case"insert_col_end":const f="insert_col_end"===e?"end":"start";t=null!==(r=t)&&void 0!==r?r:"end"===f?c.countSourceCols():0;const{delta:p,startPhysicalIndex:y}=m.createCol(t,i,{source:o,mode:f});if(p){if(Array.isArray(M.colHeaders)){const e=[c.toVisualColumn(y),0];e.length+=p,Array.prototype.splice.apply(M.colHeaders,e)}I.shiftColumns(c.toVisualColumn(y),p)}break;case"remove_row":const w=e=>{let t=0;Object(B["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?c.countRows()-1:Math.max(n-t,0);Number.isInteger(n)&&(n=Math.max(n-t,0));const a=m.removeRow(n,r,o);if(!a)return;if(I.isSelected()){const{row:e}=c.getSelectedRangeLast().highlight;e>=n&&e<=n+r-1&&g.closeEditor(!0)}const l=c.countRows();0===l?I.deselect():"ContextMenu.removeRow"===o?I.refresh():I.shiftRows(n,-r);const u=M.fixedRowsTop;u>=i+1&&(M.fixedRowsTop-=Math.min(r,u-i));const h=M.fixedRowsBottom;h&&i>=l-h&&(M.fixedRowsBottom-=Math.min(r,h)),t+=r})};Array.isArray(t)?w(l(t)):w([[t,i]]);break;case"remove_col":const b=e=>{let t=0;Object(B["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?c.countCols()-1:Math.max(n-t,0);let a=c.toPhysicalColumn(i);Number.isInteger(n)&&(n=Math.max(n-t,0));const l=m.removeCol(n,r,o);if(!l)return;if(I.isSelected()){const{col:e}=c.getSelectedRangeLast().highlight;e>=n&&e<=n+r-1&&g.closeEditor(!0)}const u=c.countCols();0===u?I.deselect():"ContextMenu.removeColumn"===o?I.refresh():I.shiftColumns(n,-r);const h=M.fixedColumnsStart;h>=i+1&&(M.fixedColumnsStart-=Math.min(r,h-i)),Array.isArray(M.colHeaders)&&("undefined"===typeof a&&(a=-1),M.colHeaders.splice(a,r)),t+=r})};Array.isArray(t)?b(l(t)):b([[t,i]]);break;default:throw new Error(`There is no such action "${e}"`)}c.view.render(),a||p.adjustRowsAndCols()},adjustRowsAndCols(){const e=M.minRows,t=M.minSpareRows,n=M.minCols,r=M.minSpareCols;if(e){const t=c.countRows();t<e&&m.createRow(t,e-t,{source:"auto"})}if(t){const e=c.countEmptyRows(!0);if(e<t){const n=t-e,r=Math.min(n,M.maxRows-c.countSourceRows());m.createRow(c.countRows(),r,{source:"auto"})}}{let e;(n||r)&&(e=c.countEmptyCols(!0));let t=c.countCols();if(n&&!M.columns&&t<n){const r=n-t;e+=r,m.createCol(t,r,{source:"auto"})}if(r&&!M.columns&&"array"===c.dataType&&e<r){t=c.countCols();const n=r-e,i=Math.min(n,M.maxCols-t);m.createCol(t,i,{source:"auto"})}}c.view&&c.view.adjustElementsSize()},populateFromArray(e,t,n,r,i){let s,o,a,l;const u=[],h={},d=[],m=e.row,f=e.col;if(o=t.length,0===o)return!1;let p=0,g=0;switch(Object(E["isObject"])(n)&&(p=n.col-f+1,g=n.row-m+1),i){case"shift_down":const i=Object(B["pivot"])(t),y=i.length,w=Math.max(y,p),b=c.getData().slice(m),_=Object(B["pivot"])(b).slice(f,f+w);for(a=0;a<w;a+=1)if(a<y){for(s=0,o=i[a].length;s<g-o;s+=1)i[a].push(i[a][s%o]);a<_.length?d.push(i[a].concat(_[a])):d.push(i[a].concat(new Array(b.length).fill(null)))}else d.push(i[a%y].concat(_[a]));c.populateFromArray(m,f,Object(B["pivot"])(d));break;case"shift_right":const v=t.length,S=Math.max(v,g),C=c.getData().slice(m).map(e=>e.slice(f));for(s=0;s<S;s+=1)if(s<v){for(a=0,l=t[s].length;a<p-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,S).concat(C[s]));c.populateFromArray(m,f,t);break;case"overwrite":default:h.row=e.row,h.col=e.col;let T,R=0,O=0,N=!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},A=t.length,I=n?n.row-e.row+1:0;for(o=n?I:Math.max(A,I),s=0;s<o;s++){if(n&&h.row>n.row&&I>A||!M.allowInsertRow&&h.row>c.countRows()-1||h.row>=M.maxRows)break;const t=s-R,i=L(t).length,d=n?n.col-e.col+1:0;if(l=n?d:Math.max(i,d),h.col=e.col,T=c.getCellMeta(h.row,h.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!T.skipRowOnPaste){for(O=0,a=0;a<l;a++){if(n&&h.col>n.col&&d>i||!M.allowInsertColumn&&h.col>c.countCols()-1||h.col>=M.maxCols)break;if(T=c.getCellMeta(h.row,h.col),("CopyPaste.paste"===r||"Autofill.fill"===r)&&T.skipColumnOnPaste){O+=1,h.col+=1,l+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==r){h.col+=1;continue}const e=a-O;let s=L(t,e),o=c.getDataAtCell(h.row,h.col);if(null!==s&&"object"===typeof s)if(Array.isArray(s)&&null===o&&(o=[]),null===o||"object"!==typeof o)N=!1;else{const e=Object(E["duckSchema"])(Array.isArray(o)?o:o[0]||o),t=Object(E["duckSchema"])(Array.isArray(s)?s:s[0]||s);Object(E["isObjectEqual"])(e,t)||Array.isArray(e)&&Array.isArray(t)?s=Object(E["deepClone"])(s):N=!1}else null!==o&&"object"===typeof o&&(N=!1);N&&u.push([h.row,h.col,s]),N=!0,h.col+=1}h.row+=1}else R+=1,h.row+=1,o+=1}c.setDataAtCell(u,null,null,r||"populateFromArray");break}}},this.init=function(){f.setData(M.data),c.runHooks("beforeInit"),(Object(o["isMobileBrowser"])()||Object(o["isIpadOS"])())&&Object(r["addClass"])(c.rootElement,"mobile"),this.updateSettings(M,!0),this.view=new cs(this),g=S.getInstance(c,M,I),w=Kl(c),y=new j(c),Wi(this)&&Jl(c),c.runHooks("init"),this.forceFullRender=!0,this.view.render(),b&&null===c.rootElement.offsetParent&&Object(r["observeVisibilityChangeOnce"])(c.rootElement,()=>{c.view._wt.wtOverlays.updateLastSpreaderSize(),c.render(),c.view.adjustElementsSize()}),"object"===typeof b&&(c.runHooks("afterChange",b[0],b[1]),b=!1),c.runHooks("afterInit")},this._createCellCoords=function(e,t){return c.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,n){return c.view._wt.createCellRange(e,t,n)},this.validateCell=function(e,t,n,r){let o=c.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=c.getCell(s,i,!0);if(o&&"TH"!==o.nodeName){const e=c.rowIndexMapper.getRenderableFromVisualIndex(s),t=c.columnIndexMapper.getRenderableFromVisualIndex(i);c.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=c.runHooks("beforeValidate",e,t.visualRow,t.prop,r),c._registerImmediate(()=>{o.call(t,e,n=>{c&&(n=c.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),c.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))})})):c._registerImmediate(()=>{t.valid=!0,a(t.valid,!1)})},this.setDataAtCell=function(e,t,n,r){const i=U(e,t,n),s=[];let o,a,l,u=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]:m.colToProp(i[o][1]),s.push([i[o][0],l,f.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]])}u||"object"!==typeof e||(u=t);const h=V(s,r);c.runHooks("afterSetDataAtCell",h,u),F(h,u,()=>{Y(h,u)})},this.setDataAtRowProp=function(e,t,n,r){const i=U(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],f.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]]);l||"object"!==typeof e||(l=t);const u=V(s,r);c.runHooks("afterSetDataAtRowProp",u,l),F(u,l,()=>{Y(u,l)})},this.listen=function(){c&&!c.isListening()&&(bu.forEach(e=>{c!==e&&e.unlisten()}),wu=c.guid,c.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(wu=null,c.runHooks("afterUnlisten"))},this.isListening=function(){return wu===c.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];g.closeEditor(e),c.view.render(),t&&I.isSelected()&&g.prepareEditor()},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?c._createCellCoords(r,i):null;return p.populateFromArray(c._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 m.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 m.spliceRow(e,t,n,...i)},this.getSelected=function(){if(I.isSelected())return Object(B["arrayMap"])(I.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(I.isSelected())return Array.from(I.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(!I.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];Object(B["arrayEach"])(I.getSelectedRange(),e=>{if(e.isSingleHeader())return;const n=e.getTopStartCorner(),r=e.getBottomEndCorner();Object($["rangeEach"])(n.row,r.row,e=>{Object($["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():c.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||c.view.render())},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(!c.view)return;const{width:e,height:t}=c.view.getLastSize(),{width:n,height:r}=c.rootElement.getBoundingClientRect(),i=n!==e||r!==t,s=!1===c.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:n,height:r},i);s||((i||c.view._wt.wtOverlays.scrollableElement===c.rootWindow)&&(c.view.setLastSize(n,r),c.render()),c.runHooks("afterRefreshDimensions",{width:e,height:t},{width:n,height:r},i))},this.updateData=function(e,t){Fl(e,e=>{m=e},e=>{m=e,c.columnIndexMapper.fitToLength(this.getInitialColumnCount()),c.rowIndexMapper.fitToLength(this.countSourceRows()),p.adjustRowsAndCols(),I.refresh()},{hotInstance:c,dataMap:m,dataSource:f,internalSource:"updateData",source:t,metaManager:C,firstRun:b})},this.loadData=function(e,t){Fl(e,e=>{m=e},()=>{C.clearCellsCache(),c.initIndexMappers(),p.adjustRowsAndCols(),I.refresh(),b&&(b=[null,"loadData"])},{hotInstance:c,dataMap:m,dataSource:f,internalSource:"loadData",source:t,metaManager:C,firstRun:b})},this.getInitialColumnCount=function(){const e=M.columns;let t=0;if(Array.isArray(e))t=e.length;else if(Object(i["isFunction"])(e))if("array"===c.dataType){const n=this.countSourceCols();for(let r=0;r<n;r+=1)e(r)&&(t+=1)}else"object"!==c.dataType&&"function"!==c.dataType||(t=m.colToPropCache.length);else if(Object(s["isDefined"])(M.dataSchema)){const e=m.getSchema();t=Array.isArray(e)?e.length:Object(E["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)?m.getAll():m.getRange(c._createCellCoords(e,t),c._createCellCoords(n,r),m.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return m.getCopyableText(c._createCellCoords(e,t),c._createCellCoords(n,r))},this.getCopyableData=function(e,t){return m.getCopyable(e,m.colToProp(t))},this.getSchema=function(){return m.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(b?c.loadData:c.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?x(e.language):"className"===r?D("className",e.className):"tableClassName"===r&&c.table?(D("tableClassName",e.tableClassName),c.view._wt.wtOverlays.syncOverlayTableClassNames()):no["a"].getSingleton().isRegistered(r)||no["a"].getSingleton().isDeprecated(r)?(Object(i["isFunction"])(e[r])||Array.isArray(e[r]))&&(e[r].initialHook=!0,c.addHook(r,e[r])):!t&&Object(E["hasOwnProperty"])(e,r)&&(T[r]=e[r]));void 0===e.data&&void 0===M.data?n(null,"updateSettings"):void 0!==e.data?n(e.data,"updateSettings"):void 0!==e.columns&&(m.createMap(),c.initIndexMappers());const l=c.countCols(),u=M.columns;if(u&&Object(i["isFunction"])(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||C.clearCache(),l>0)for(r=0,o=0;r<l;r++){if(u){const e=a?u(r):u[o];e&&C.updateColumnMeta(o,e)}o+=1}Object(s["isDefined"])(e.cell)&&Object(E["objectEach"])(e.cell,e=>{c.setCellMetaObject(e.row,e.col,e)}),c.runHooks("afterCellMetaReset");let h=c.rootElement.style.height;""!==h&&(h=parseInt(c.rootElement.style.height,10));let d=e.height;if(Object(i["isFunction"])(d)&&(d=d()),t){const e=c.rootElement.getAttribute("style");e&&c.rootElement.setAttribute("data-initialstyle",c.rootElement.getAttribute("style"))}if(null===d){const e=c.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?c.rootElement.setAttribute("style",e):(c.rootElement.style.height="",c.rootElement.style.overflow="")}else void 0!==d&&(c.rootElement.style.height=isNaN(d)?""+d:d+"px",c.rootElement.style.overflow="hidden");if("undefined"!==typeof e.width){let t=e.width;Object(i["isFunction"])(t)&&(t=t()),c.rootElement.style.width=isNaN(t)?""+t:t+"px"}t||(c.view&&(c.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),c.view._wt.exportSettingsAsClassNames()),c.runHooks("afterUpdateSettings",e)),p.adjustRowsAndCols(),c.view&&!b&&(c.forceFullRender=!0,c.view.render(),c.view._wt.wtOverlays.adjustElementsSize()),t||!c.view||""!==h&&""!==d&&void 0!==d||h===d||c.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=c.getSelectedLast();if(M.getValue){if(Object(i["isFunction"])(M.getValue))return M.getValue.call(c);if(e)return c.getData()[e[0][0]][M.getValue]}else if(e)return c.getDataAtCell(e[0],e[1])},this.getSettings=function(){return M},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,i){p.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||void 0===i||void 0===r?null:c.view.getCellAtCoords(c._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)),c._createCellCoords(i,s)},this.colToProp=function(e){return m.colToProp(e)},this.propToCol=function(e){return m.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 m.get(e,m.colToProp(t))},this.getDataAtRowProp=function(e,t){return m.get(e,t)},this.getDataAtCol=function(e){const t=[],n=m.getRange(c._createCellCoords(0,e),c._createCellCoords(M.data.length-1,e),m.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=m.getRange(c._createCellCoords(0,m.propToCol(e)),c._createCellCoords(M.data.length-1,m.propToCol(e)),m.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?f.getData():f.getByRange(c._createCellCoords(e,t),c._createCellCoords(n,r)),i},this.getSourceDataArray=function(e,t,n,r){let i;return i=void 0===e?f.getData(!0):f.getByRange(c._createCellCoords(e,t),c._createCellCoords(n,r),!0),i},this.getSourceDataAtCol=function(e){return f.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,n,r){const i=U(e,t,n),o=this.hasHook("afterSetSourceDataAtCell"),a=[];o&&Object(B["arrayEach"])(i,e=>{let[t,n,r]=e;a.push([t,n,f.getAtCell(t,n),r])}),Object(B["arrayEach"])(i,e=>{let[t,n,r]=e;f.setAtCell(t,n,r)}),o&&this.runHooks("afterSetSourceDataAtCell",a,r),this.render();const l=c.getActiveEditor();l&&Object(s["isDefined"])(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return f.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return f.getAtCell(e,t)},this.getDataAtRow=function(e){const t=m.getRange(c._createCellCoords(e,0),c._createCellCoords(e,this.countCols()-1),m.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,u=null,h=null;void 0===a&&(a=s),void 0===l&&(l=o);let c="mixed";return Object($["rangeEach"])(Math.max(Math.min(s,a),0),Math.max(s,a),e=>{let t=!0;return Object($["rangeEach"])(Math.max(Math.min(o,l),0),Math.max(o,l),n=>{const r=this.getCellMeta(e,n);return h=r.type,u?t=u===h:u=h,t}),c=t?h:"mixed",t}),c},this.removeCellMeta=function(e,t,n){const[r,i]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let s=C.getCellMetaKeyValue(r,i,n);const o=c.runHooks("beforeRemoveCellMeta",e,t,n,s);!1!==o&&(C.removeCellMeta(r,i,n),c.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&&C.removeRow(this.toPhysicalRow(e),t),r.length>0&&Object(B["arrayEach"])(r.reverse(),t=>{C.createRow(this.toPhysicalRow(e)),Object(B["arrayEach"])(t,(t,n)=>this.setCellMetaObject(e,n,t))}),c.render()},this.setCellMetaObject=function(e,t,n){"object"===typeof n&&Object(E["objectEach"])(n,(n,r)=>{this.setCellMeta(e,t,r,n)})},this.setCellMeta=function(e,t,n,r){const i=c.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)),C.setCellMeta(s,o,n,r),c.runHooks("afterSetCellMeta",e,t,n,r)},this.getCellsMeta=function(){return C.getCellsMeta()},this.getCellMeta=function(e,t){let n=this.toPhysicalRow(e),r=this.toPhysicalColumn(t);return null===n&&(n=e),null===r&&(r=t),C.getCellMeta(n,r,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return C.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return C.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===c.dataType||M.columns)},this.getCellRenderer=function(e,t){const n="number"===typeof e?c.getCellMeta(e,t).renderer:e.renderer;return"string"===typeof n?Object(z["b"])(n):Object(s["isUndefined"])(n)?Object(z["b"])("text"):n},this.getCellEditor=function(e,t){const n="number"===typeof e?c.getCellMeta(e,t).editor:e.editor;return"string"===typeof n?Object(u["a"])(n):Object(s["isUndefined"])(n)?Object(u["a"])("text"):n},this.getCellValidator=function(e,t){const n="number"===typeof e?c.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 H;e&&(r.onQueueEmpty=e);let i=c.countRows()-1;while(i>=0){if(void 0!==t&&-1===t.indexOf(i)){i-=1;continue}let e=c.countCols()-1;while(e>=0)void 0===n||-1!==n.indexOf(e)?(r.addValidatorToQueue(),c.validateCell(c.getDataAtCell(i,e),c.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=M.rowHeaders,n=e;return void 0!==n&&(n=c.runHooks("modifyRowHeader",n)),void 0===n?(t=[],Object($["rangeEach"])(c.countRows()-1,e=>{t.push(c.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!!M.rowHeaders},this.hasColHeaders=function(){if(void 0!==M.colHeaders&&null!==M.colHeaders)return!!M.colHeaders;for(let e=0,t=c.countCols();e<t;e++)if(c.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=c.runHooks("modifyColHeader",e);if(void 0===n){const e=[],t=c.countCols();for(let n=0;n<t;n++)e.push(c.getColHeader(n));return e}let r=M.colHeaders;const s=function(e){const t=[],n=c.countCols();let r=0;for(;r<n;r++)Object(i["isFunction"])(M.columns)&&M.columns(r)&&t.push(r);return t[e]},o=c.toPhysicalColumn(n),a=s(o);return!1===M.colHeaders?r=null:M.columns&&Object(i["isFunction"])(M.columns)&&M.columns(a)&&M.columns(a).title?r=M.columns(a).title:M.columns&&M.columns[o]&&M.columns[o].title?r=M.columns[o].title:Array.isArray(M.colHeaders)&&void 0!==M.colHeaders[o]?r=M.colHeaders[o]:Object(i["isFunction"])(M.colHeaders)?r=M.colHeaders(o):M.colHeaders&&"string"!==typeof M.colHeaders&&"number"!==typeof M.colHeaders&&(r=Object(ds["spreadsheetColumnLabel"])(n)),r=c.runHooks("modifyColumnHeaderValue",r,e,t),r},this._getColWidthFromSettings=function(e){let t;if(e>=0){const n=c.getCellMeta(0,e);t=n.width}if(void 0!==t&&t!==M.width||(t=M.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=c._getColWidthFromSettings(e);return t=c.runHooks("modifyColWidth",t,e),void 0===t&&(t=wt["a"]),t},this._getRowHeightFromSettings=function(e){let t=M.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=c._getRowHeightFromSettings(e);return t=c.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return f.countRows()},this.countSourceCols=function(){return f.countFirstRowKeys()},this.countRows=function(){return m.getLength()},this.countCols=function(){const e=M.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return c.view._wt.drawn?c.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return c.view._wt.drawn?c.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return c.view._wt.drawn?c.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return c.view._wt.drawn?c.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($["rangeEachReverse"])(c.countRows()-1,n=>{if(c.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($["rangeEachReverse"])(c.countCols()-1,n=>{if(c.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return M.isEmptyRow.call(c,e)},this.isEmptyCol=function(e){return M.isEmptyCol.call(c,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&&w.suspend();const r=I.selectCells(e);return r&&n&&c.listen(),w.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 I.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 I.selectRows(e,t,n)},this.deselectCell=function(){I.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;w.skipNextScrollCycle(),I.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,u,h,d;void 0!==s&&(l="top"===s,u=!l),void 0!==o&&(h="start"===o,d=!h);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?c.rowIndexMapper.getRenderableFromVisualIndex(n):r,f=t?c.columnIndexMapper.getRenderableFromVisualIndex(s):i}const p=Number.isInteger(m),g=Number.isInteger(f);return p&&m>=0&&g&&f>=0?c.view.scrollViewport(c._createCellCoords(m,f),l,d,u,h):p&&m>=0&&(g&&f<0||!g)?c.view.scrollViewportVertically(m,l,u):!!(g&&f>=0&&(p&&m<0||!p))&&c.view.scrollViewportHorizontally(f,d,h)},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(c._clearTimeouts(),c._clearImmediates(),c.view&&c.view.destroy(),f&&f.destroy(),f=null,this.getShortcutManager().destroy(),C.clearCache(),bu.delete(this.guid),Wi(c)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}Object(r["empty"])(c.rootElement),d.destroy(),g&&g.destroy(),c.batchExecution(()=>{c.rowIndexMapper.unregisterAll(),c.columnIndexMapper.unregisterAll(),R.getItems().forEach(e=>{let[,t]=e;t.destroy()}),R.clear(),c.runHooks("afterDestroy")},!0),no["a"].getSingleton().destroy(c),Object(E["objectEach"])(c,(e,t,n)=>{Object(i["isFunction"])(e)?n[t]=J(t):"guid"!==t&&(n[t]=null)}),c.isDestroyed=!0,m&&m.destroy(),m=null,p=null,I=null,g=null,c=null},this.getActiveEditor=function(){return g.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return c.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return c.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return c.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return c.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return c.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return c.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return c.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return c.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return c.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return c.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return c.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return c.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=Object(X["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 c},this.addHook=function(e,t,n){no["a"].getSingleton().add(e,t,c,n)},this.hasHook=function(e){return no["a"].getSingleton().has(e,c)||no["a"].getSingleton().has(e)},this.addHookOnce=function(e,t,n){no["a"].getSingleton().once(e,t,c,n)},this.removeHook=function(e,t){no["a"].getSingleton().remove(e,t,c)},this.runHooks=function(e,t,n,r,i,s,o){return no["a"].getSingleton().run(c,e,t,n,r,i,s,o)},this.getTranslatedPhrase=function(e,t){return Ro(M.language,e,t)},this.toHTML=()=>Object(W["instanceToHTML"])(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",Object(W["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(B["arrayEach"])(this.timeouts,e=>{clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){Object(B["arrayEach"])(this.immediates,e=>{clearImmediate(e)})},this._getEditorManager=function(){return g},this.isRtl=function(){return"rtl"===c.rootWindow.getComputedStyle(c.rootElement).direction},this.isLtr=function(){return!c.isRtl()},this.getDirectionFactor=function(){return c.isLtr()?1:-1};const Q=gu({handleEvent(){return c.isListening()},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||c.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 y},Object(G["b"])().forEach(e=>{const t=Object(G["a"])(e);R.addItem(e,new t(this))}),Object(yu["a"])(c),Q.setActiveContextName("grid"),no["a"].getSingleton().run(c,"construct")}var vu=n("ef07"),Su=n("13e1");function Eu(e,t){const n=new _u(e,t||{},Ui);return n.init(),n}Object(Ba["d"])(vu["a"]),Eu.editors={BaseEditor:Su["a"]},Eu.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new _u(e,t,Ui)},Eu.DefaultSettings=qa(),Eu.hooks=no["a"].getSingleton(),Eu.CellCoords=bn["a"],Eu.CellRange=_n["a"],Eu.packageName="handsontable",Eu.buildDate="17/10/2024 09:16:16",Eu.version="14.6.1",Eu.languages={dictionaryKeys:go,getLanguageDictionary:Co,getLanguagesDictionaries:To,registerLanguageDictionary:So,getTranslatedPhrase:Ro};t["a"]=Eu},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";
  288. //! moment.js locale configuration
  289. 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}))},c1a1:function(e,t,n){"use strict";var r=n("23e7"),i=n("b4bc"),s=n("dad2");r({target:"Set",proto:!0,real:!0,forced:!s("isDisjointFrom")},{isDisjointFrom:i})},c1cf:function(e,t,n){"use strict";var r=n("e437");
  290. /**
  291. * @preserve
  292. * Authors: soakit, HChenZi
  293. * Last updated: Mar 09, 2023
  294. *
  295. * Description: Definition file for Chinese - China language-country.
  296. */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
  297. //! version : 2.30.1
  298. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  299. //! license : MIT
  300. //! momentjs.com
  301. (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 u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(u(e,t))return!1;return!0}function c(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)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(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){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());return r&&(t=w(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?r:(e._isValid=r,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(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=w(t)),c(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=v[n],i=t[r],c(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 M(e){return e instanceof C||null!=e&&null!=e._isAMomentObject}function T(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])u(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];a.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var O,N={};function L(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),N[e]||(T(t),N[e]=!0)}function A(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)u(e,n)&&(t=e[n],A(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 k(e,t){var n,r=p({},e);for(n in t)u(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)u(e,n)&&!u(t,n)&&l(e[n])&&(r[n]=p({},r[n]));return r}function x(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)u(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 A(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+=A(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 A(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ne(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)}var re={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ie(e){return"string"===typeof e?re[e]||re[e.toLowerCase()]:void 0}function se(e){var t,n,r={};for(n in e)u(e,n)&&(t=ie(n),t&&(r[t]=e[n]));return r}var oe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)u(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}var le,ue=/\d/,he=/\d\d/,ce=/\d{3}/,de=/\d{4}/,me=/[+-]?\d{6}/,fe=/\d\d?/,pe=/\d\d\d\d?/,ge=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,we=/\d{1,4}/,be=/[+-]?\d{1,6}/,_e=/\d+/,ve=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ee=/Z|[+-]\d\d(?::?\d\d)?/gi,Ce=/[+-]?\d+(\.\d{1,3})?/,Me=/[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,Te=/^[1-9]\d?/,Re=/^([1-9]\d|\d)/;function Oe(e,t,n){le[e]=A(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return u(le,e)?le[e](t._strict,t._locale):new RegExp(Le(e))}function Le(e){return Ae(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Ae(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ie(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ke(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Ie(t)),n}le={};var xe={};function De(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=ke(e)}),r=e.length,n=0;n<r;n++)xe[e[n]]=i}function He(e,t){De(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Pe(e,t,n){null!=t&&u(xe,e)&&xe[e](t,n._a,n,e)}function je(e){return e%4===0&&e%100!==0||e%400===0}var Fe=0,Ye=1,Ue=2,Ve=3,Be=4,We=5,Ge=6,ze=7,Ke=8;function Xe(e){return je(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"),Oe("Y",ve),Oe("YY",fe,he),Oe("YYYY",we,de),Oe("YYYYY",be,me),Oe("YYYYYY",be,me),De(["YYYYY","YYYYYY"],Fe),De("YYYY",(function(e,t){t[Fe]=2===e.length?s.parseTwoDigitYear(e):ke(e)})),De("YY",(function(e,t){t[Fe]=s.parseTwoDigitYear(e)})),De("Y",(function(e,t){t[Fe]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return ke(e)+(ke(e)>68?1900:2e3)};var $e,qe=Qe("FullYear",!0);function Je(){return je(this.year())}function Qe(e,t){return function(n){return null!=n?(et(this,e,n),s.updateOffset(this,t),this):Ze(this,e)}}function Ze(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function et(e,t,n){var r,i,s,o,a;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=e.month(),a=e.date(),a=29!==a||1!==o||je(s)?a:28,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function tt(e){return e=ie(e),A(this[e])?this[e]():this}function nt(e,t){if("object"===typeof e){e=se(e);var n,r=ae(e),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(e=ie(e),A(this[e]))return this[e](t);return this}function rt(e,t){return(e%t+t)%t}function it(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=rt(t,12);return e+=(t-n)/12,1===n?je(e)?29:28:31-n%7%2}$e=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)})),Oe("M",fe,Te),Oe("MM",fe,he),Oe("MMM",(function(e,t){return t.monthsShortRegex(e)})),Oe("MMMM",(function(e,t){return t.monthsRegex(e)})),De(["M","MM"],(function(e,t){t[Ye]=ke(e)-1})),De(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Ye]=i:w(n).invalidMonth=e}));var st="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),at=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,lt=Me,ut=Me;function ht(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||at).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months["standalone"]}function ct(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[at.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function dt(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=$e.call(this._shortMonthsParse,o),-1!==i?i:null):(i=$e.call(this._longMonthsParse,o),-1!==i?i:null):"MMM"===t?(i=$e.call(this._shortMonthsParse,o),-1!==i?i:(i=$e.call(this._longMonthsParse,o),-1!==i?i:null)):(i=$e.call(this._longMonthsParse,o),-1!==i?i:(i=$e.call(this._shortMonthsParse,o),-1!==i?i:null))}function mt(e,t,n){var r,i,s;if(this._monthsParseExact)return dt.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 ft(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=ke(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,it(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function pt(e){return null!=e?(ft(this,e),s.updateOffset(this,!0),this):Ze(this,"Month")}function gt(){return it(this.year(),this.month())}function yt(e){return this._monthsParseExact?(u(this,"_monthsRegex")||bt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=lt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function wt(e){return this._monthsParseExact?(u(this,"_monthsRegex")||bt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=ut),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function bt(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],o=[],a=[];for(t=0;t<12;t++)n=g([2e3,t]),r=Ae(this.monthsShort(n,"")),i=Ae(this.months(n,"")),s.push(r),o.push(i),a.push(i),a.push(r);s.sort(e),o.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}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),u=1+7*(t-1)+a+l;return u<=0?(s=e-1,o=Xe(s)+u):u>Xe(e)?(s=e+1,o=u-Xe(e)):(s=e,o=u),{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+Mt(i,t,n)):o>Mt(e.year(),t,n)?(r=o-Mt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function Mt(e,t,n){var r=St(e,t,n),i=St(e+1,t,n);return(Xe(e)-r+i)/7}function Tt(e){return Ct(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),Oe("w",fe,Te),Oe("ww",fe,he),Oe("W",fe,Te),Oe("WW",fe,he),He(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ke(e)}));var Rt={dow:0,doy:6};function Ot(){return this._week.dow}function Nt(){return this._week.doy}function Lt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function At(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 kt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function xt(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"),Oe("d",fe),Oe("e",fe),Oe("E",fe),Oe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Oe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Oe("dddd",(function(e,t){return t.weekdaysRegex(e)})),He(["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})),He(["d","e","E"],(function(e,t,n,r){t[r]=ke(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=Me,Ft=Me,Yt=Me;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?xt(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return!0===e?xt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Bt(e){return!0===e?xt(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=$e.call(this._weekdaysParse,o),-1!==i?i:null):"ddd"===t?(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:null):(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:null):"dddd"===t?(i=$e.call(this._weekdaysParse,o),-1!==i?i:(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:null))):"ddd"===t?(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:(i=$e.call(this._weekdaysParse,o),-1!==i?i:(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:null))):(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:(i=$e.call(this._weekdaysParse,o),-1!==i?i:(i=$e.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=Ze(this,"Day");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=kt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=jt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Jt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(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=[],u=[];for(t=0;t<7;t++)n=g([2e3,1]).day(t),r=Ae(this.weekdaysMin(n,"")),i=Ae(this.weekdaysShort(n,"")),s=Ae(this.weekdays(n,"")),o.push(r),a.push(i),l.push(s),u.push(r),u.push(i),u.push(s);o.sort(e),a.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.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),Oe("a",nn),Oe("A",nn),Oe("H",fe,Re),Oe("h",fe,Te),Oe("k",fe,Te),Oe("HH",fe,he),Oe("hh",fe,he),Oe("kk",fe,he),Oe("hmm",pe),Oe("hmmss",ge),Oe("Hmm",pe),Oe("Hmmss",ge),De(["H","HH"],Ve),De(["k","kk"],(function(e,t,n){var r=ke(e);t[Ve]=24===r?0:r})),De(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),De(["h","hh"],(function(e,t,n){t[Ve]=ke(e),w(n).bigHour=!0})),De("hmm",(function(e,t,n){var r=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r)),w(n).bigHour=!0})),De("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r,2)),t[We]=ke(e.substr(i)),w(n).bigHour=!0})),De("Hmm",(function(e,t,n){var r=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r))})),De("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r,2)),t[We]=ke(e.substr(i))}));var sn=/[ap]\.?m?\.?/i,on=Qe("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var ln,un={calendar:D,longDateFormat:K,invalidDate:$,ordinal:J,dayOfMonthOrdinalParse:Q,relativeTime:ee,months:st,monthsShort:ot,week:Rt,weekdays:Dt,weekdaysMin:Pt,weekdaysShort:Ht,meridiemParse:sn},hn={},cn={};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!(!e||!e.match("^[^/\\\\]*$"))}function gn(r){var i=null;if(void 0===hn[r]&&"undefined"!==typeof e&&e&&e.exports&&pn(r))try{i=ln._abbr,t,n("4678")("./"+r),yn(i)}catch(s){hn[r]=null}return hn[r]}function yn(e,t){var n;return e&&(n=c(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=un;if(t.abbr=e,null!=hn[e])L("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=hn[e]._config;else if(null!=t.parentLocale)if(null!=hn[t.parentLocale])r=hn[t.parentLocale]._config;else{if(n=gn(t.parentLocale),null==n)return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return hn[e]=new x(k(r,t)),cn[e]&&cn[e].forEach((function(e){wn(e.name,e.config)})),yn(e),hn[e]}return delete hn[e],null}function bn(e,t){if(null!=t){var n,r,i=un;null!=hn[e]&&null!=hn[e].parentLocale?hn[e].set(k(hn[e]._config,t)):(r=gn(e),null!=r&&(i=r._config),t=k(i,t),null==r&&(t.abbr=e),n=new x(t),n.parentLocale=hn[e],hn[e]=n),yn(e)}else null!=hn[e]&&(null!=hn[e].parentLocale?(hn[e]=hn[e].parentLocale,e===yn()&&yn(e)):null!=hn[e]&&delete hn[e]);return hn[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(hn)}function Sn(e){var t,n=e._a;return n&&-2===w(e).overflow&&(t=n[Ye]<0||n[Ye]>11?Ye:n[Ue]<1||n[Ue]>it(n[Fe],n[Ye])?Ue:n[Ve]<0||n[Ve]>24||24===n[Ve]&&(0!==n[Be]||0!==n[We]||0!==n[Ge])?Ve:n[Be]<0||n[Be]>59?Be:n[We]<0||n[We]>59?We:n[Ge]<0||n[Ge]>999?Ge:-1,w(e)._overflowDayOfYear&&(t<Fe||t>Ue)&&(t=Ue),w(e)._overflowWeeks&&-1===t&&(t=ze),w(e)._overflowWeekday&&-1===t&&(t=Ke),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)?)?$/,Mn=/Z|[+-]\d\d(?::?\d\d)?/,Tn=[["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}))$/,Ln={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function An(e){var t,n,r,i,s,o,a=e._i,l=En.exec(a)||Cn.exec(a),u=Tn.length,h=Rn.length;if(l){for(w(e).iso=!0,t=0,n=u;t<n;t++)if(Tn[t][1].exec(l[1])){i=Tn[t][0],r=!1!==Tn[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=h;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(!Mn.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=[kn(e),ot.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function kn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xn(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 Ln[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(xn(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?(An(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[Ue]&&null==e._a[Ye]&&Vn(e),null!=e._dayOfYear&&(s=Fn(e._a[Fe],r[Fe]),(e._dayOfYear>Xe(s)||0===e._dayOfYear)&&(w(e)._overflowDayOfYear=!0),n=vt(s,0,e._dayOfYear),e._a[Ye]=n.getUTCMonth(),e._a[Ue]=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[Ve]&&0===e._a[Be]&&0===e._a[We]&&0===e._a[Ge]&&(e._nextDay=!0,e._a[Ve]=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[Ve]=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,u;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,o=4,n=Fn(t.GG,e._a[Fe],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,u=Ct(Jn(),s,o),n=Fn(t.gg,e._a[Fe],u.year),r=Fn(t.w,u.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>Mt(n,s,o)?w(e)._overflowWeeks=!0:null!=l?w(e)._overflowWeekday=!0:(a=Et(n,r,i,s,o),e._a[Fe]=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,u=""+e._i,h=u.length,c=0;for(r=z(e._f,e._locale).match(j)||[],l=r.length,t=0;t<l;t++)i=r[t],n=(u.match(Ne(i,e))||[])[0],n&&(o=u.substr(0,u.indexOf(n)),o.length>0&&w(e).unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),c+=n.length),U[i]?(n?w(e).empty=!1:w(e).unusedTokens.push(i),Pe(i,n,e)):e._strict&&!n&&w(e).unusedTokens.push(i);w(e).charsLeftOver=h-c,u.length>0&&w(e).unusedInput.push(u),e._a[Ve]<=12&&!0===w(e).bigHour&&e._a[Ve]>0&&(w(e).bigHour=void 0),w(e).parsedDateParts=e._a.slice(0),w(e).meridiem=e._meridiem,e._a[Ve]=Wn(e._locale,e._a[Ve],e._meridiem),a=w(e).era,null!==a&&(e._a[Fe]=e._locale.erasConvertYear(a,e._a[Fe])),Un(e),Sn(e)}else Pn(e);else An(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=se(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)),M(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;c(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)&&h(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(u(e,t)&&(-1===$e.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]])!==ke(e[ir[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Lr(NaN)}function lr(e){var t=se(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,u=t.second||0,h=t.millisecond||0;this._isValid=sr(t),this._milliseconds=+h+1e3*u+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 ur(e){return e instanceof lr}function hr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(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&&ke(e[r])!==ke(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",""),Oe("Z",Ee),Oe("ZZ",Ee),De(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(Ee,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]+ke(r[2]),0===i?0:"+"===r[0]?i:-i)}function pr(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(M(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(Ee,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,Lr(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(Se,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(!c(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()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Mr(){return!!this.isValid()&&!this._isUTC}function Tr(){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 Lr(e,t){var n,r,i,s=e,o=null;return ur(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:ke(o[Ue])*n,h:ke(o[Ve])*n,m:ke(o[Be])*n,s:ke(o[We])*n,ms:ke(hr(1e3*o[Ge]))*n}):(o=Nr.exec(e))?(n="-"===o[1]?-1:1,s={y:Ar(o[2],n),M:Ar(o[3],n),w:Ar(o[4],n),d:Ar(o[5],n),h:Ar(o[6],n),m:Ar(o[7],n),s:Ar(o[8],n)}):null==s?s={}:"object"===typeof s&&("from"in s||"to"in s)&&(i=kr(Jn(s.from),Jn(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new lr(s),ur(e)&&u(e,"_locale")&&(r._locale=e._locale),ur(e)&&u(e,"_isValid")&&(r._isValid=e._isValid),r}function Ar(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 kr(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 xr(e,t){return function(n,r){var i,s;return null===r||isNaN(+r)||(L(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=Lr(n,r),Dr(this,i,e),this}}function Dr(e,t,n,r){var i=t._milliseconds,o=hr(t._days),a=hr(t._months);e.isValid()&&(r=null==r||r,a&&ft(e,Ze(e,"Month")+a*n),o&&et(e,"Date",Ze(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&s.updateOffset(e,o||a))}Lr.fn=lr.prototype,Lr.invalid=ar;var Hr=xr(1,"add"),Pr=xr(-1,"subtract");function jr(e){return"string"===typeof e||e instanceof String}function Fr(e){return M(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)&&!h(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||u(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)&&!h(e),i=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)n=s[t],i=i||u(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&&(A(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=M(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Kr(e,t){var n=M(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Xr(e,t,n,r){var i=M(e)?e:Jn(e),s=M(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=M(e)?e:Jn(e);return!(!this.isValid()||!r.isValid())&&(t=ie(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=ie(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:Ie(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"):A(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()&&(M(e)&&e.isValid()||Jn(e).isValid())?Lr({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()&&(M(e)&&e.isValid()||Jn(e).isValid())?Lr({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 ui=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 hi(){return this._locale}var ci=1e3,di=60*ci,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=ie(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,ci);break}return this._d.setTime(t),s.updateOffset(this,!0),this}function bi(e){var t,n;if(e=ie(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+=ci-pi(t,ci)-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 Mi(){return this.isValid()?this.toISOString():null}function Ti(){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 Li(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 Ai(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 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].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}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].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 u(this,"_erasNameRegex")||Wi.call(this),e?this._erasNameRegex:this._erasRegex}function ji(e){return u(this,"_erasAbbrRegex")||Wi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fi(e){return u(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||_e}function Wi(){var e,t,n,r,i,s=[],o=[],a=[],l=[],u=this.eras();for(e=0,t=u.length;e<t;++e)n=Ae(u[e].name),r=Ae(u[e].abbr),i=Ae(u[e].narrow),o.push(n),s.push(r),a.push(i),l.push(n),l.push(r),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.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.dow,this.localeData()._week.doy)}function Ki(e){return Qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Xi(){return Mt(this.year(),1,4)}function $i(){return Mt(this.isoWeekYear(),1,4)}function qi(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)}function Ji(){var e=this.localeData()._week;return Mt(this.weekYear(),e.dow,e.doy)}function Qi(e,t,n,r,i){var s;return null==e?Ct(this,r,i).year:(s=Mt(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"),Oe("N",Yi),Oe("NN",Yi),Oe("NNN",Yi),Oe("NNNN",Ui),Oe("NNNNN",Vi),De(["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})),Oe("y",_e),Oe("yy",_e),Oe("yyy",_e),Oe("yyyy",_e),Oe("yo",Bi),De(["y","yy","yyy","yyyy"],Fe),De(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fe]=n._locale.eraYearOrdinalParse(e,i):t[Fe]=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"),Oe("G",ve),Oe("g",ve),Oe("GG",fe,he),Oe("gg",fe,he),Oe("GGGG",we,de),Oe("gggg",we,de),Oe("GGGGG",be,me),Oe("ggggg",be,me),He(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ke(e)})),He(["gg","GG"],(function(e,t,n,r){t[r]=s.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),Oe("Q",ue),De("Q",(function(e,t){t[Ye]=3*(ke(e)-1)})),V("D",["DD",2],"Do","date"),Oe("D",fe,Te),Oe("DD",fe,he),Oe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),De(["D","DD"],Ue),De("Do",(function(e,t){t[Ue]=ke(e.match(fe)[0])}));var ts=Qe("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"),Oe("DDD",ye),Oe("DDDD",ce),De(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ke(e)})),V("m",["mm",2],0,"minute"),Oe("m",fe,Re),Oe("mm",fe,he),De(["m","mm"],Be);var rs=Qe("Minutes",!1);V("s",["ss",2],0,"second"),Oe("s",fe,Re),Oe("ss",fe,he),De(["s","ss"],We);var is,ss,os=Qe("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()})),Oe("S",ye,ue),Oe("SS",ye,he),Oe("SSS",ye,ce),is="SSSS";is.length<=9;is+="S")Oe(is,_e);function as(e,t){t[Ge]=ke(1e3*("0."+e))}for(is="S";is.length<=9;is+="S")De(is,as);function ls(){return this._isUTC?"UTC":""}function us(){return this._isUTC?"Coordinated Universal Time":""}ss=Qe("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var hs=C.prototype;function cs(e){return Jn(1e3*e)}function ds(){return Jn.apply(null,arguments).parseZone()}function ms(e){return e}hs.add=Hr,hs.calendar=Wr,hs.clone=Gr,hs.diff=Qr,hs.endOf=bi,hs.format=ri,hs.from=ii,hs.fromNow=si,hs.to=oi,hs.toNow=ai,hs.get=tt,hs.invalidAt=Oi,hs.isAfter=zr,hs.isBefore=Kr,hs.isBetween=Xr,hs.isSame=$r,hs.isSameOrAfter=qr,hs.isSameOrBefore=Jr,hs.isValid=Ti,hs.lang=ui,hs.locale=li,hs.localeData=hi,hs.max=Zn,hs.min=Qn,hs.parsingFlags=Ri,hs.set=nt,hs.startOf=wi,hs.subtract=Pr,hs.toArray=Ei,hs.toObject=Ci,hs.toDate=Si,hs.toISOString=ti,hs.inspect=ni,"undefined"!==typeof Symbol&&null!=Symbol.for&&(hs[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),hs.toJSON=Mi,hs.toString=ei,hs.unix=vi,hs.valueOf=_i,hs.creationData=Ni,hs.eraName=ki,hs.eraNarrow=xi,hs.eraAbbr=Di,hs.eraYear=Hi,hs.year=qe,hs.isLeapYear=Je,hs.weekYear=zi,hs.isoWeekYear=Ki,hs.quarter=hs.quarters=es,hs.month=pt,hs.daysInMonth=gt,hs.week=hs.weeks=Lt,hs.isoWeek=hs.isoWeeks=At,hs.weeksInYear=qi,hs.weeksInWeekYear=Ji,hs.isoWeeksInYear=Xi,hs.isoWeeksInISOWeekYear=$i,hs.date=ts,hs.day=hs.days=zt,hs.weekday=Kt,hs.isoWeekday=Xt,hs.dayOfYear=ns,hs.hour=hs.hours=on,hs.minute=hs.minutes=rs,hs.second=hs.seconds=os,hs.millisecond=hs.milliseconds=ss,hs.utcOffset=yr,hs.utc=br,hs.local=_r,hs.parseZone=vr,hs.hasAlignedHourOffset=Sr,hs.isDST=Er,hs.isLocal=Mr,hs.isUtcOffset=Tr,hs.isUtc=Rr,hs.isUTC=Rr,hs.zoneAbbr=ls,hs.zoneName=us,hs.dates=R("dates accessor is deprecated. Use date instead.",ts),hs.months=R("months accessor is deprecated. Use month instead",pt),hs.years=R("years accessor is deprecated. Use year instead",qe),hs.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",wr),hs.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Cr);var fs=x.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=Li,fs.erasParse=Ai,fs.erasConvertYear=Ii,fs.erasAbbrRegex=ji,fs.erasNameRegex=Pi,fs.erasNarrowRegex=Fi,fs.months=ht,fs.monthsShort=ct,fs.monthsParse=mt,fs.monthsRegex=wt,fs.monthsShortRegex=yt,fs.week=Tt,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===ke(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 Ms(e,t,n,r){var i=Lr(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ts(e,t){return Ms(this,e,t,1)}function Rs(e,t){return Ms(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(As(a)+o),o=0,a=0),l.milliseconds=s%1e3,e=Ie(s/1e3),l.seconds=e%60,t=Ie(e/60),l.minutes=t%60,n=Ie(t/60),l.hours=n%24,o+=Ie(n/24),i=Ie(Ls(o)),a+=i,o-=Os(As(i)),r=Ie(a/12),a%=12,l.days=o,l.months=a,l.years=r,this}function Ls(e){return 4800*e/146097}function As(e){return 146097*e/4800}function Is(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=ie(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Ls(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(As(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 ks(e){return function(){return this.as(e)}}var xs=ks("ms"),Ds=ks("s"),Hs=ks("m"),Ps=ks("h"),js=ks("d"),Fs=ks("w"),Ys=ks("M"),Us=ks("Q"),Vs=ks("y"),Bs=xs;function Ws(){return Lr(this)}function Gs(e){return e=ie(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 Ie(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=Lr(e).abs(),s=to(i.as("s")),o=to(i.as("m")),a=to(i.as("h")),l=to(i.as("d")),u=to(i.as("M")),h=to(i.as("w")),c=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||h<=1&&["w"]||h<n.w&&["ww",h]),d=d||u<=1&&["M"]||u<n.M&&["MM",u]||c<=1&&["y"]||["yy",c],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 uo(e){return(e>0)-(e<0)||+e}function ho(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,o,a,l=lo(this._milliseconds)/1e3,u=lo(this._days),h=lo(this._months),c=this.asSeconds();return c?(e=Ie(l/60),t=Ie(e/60),l%=60,e%=60,n=Ie(h/12),h%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=c<0?"-":"",s=uo(this._months)!==uo(c)?"-":"",o=uo(this._days)!==uo(c)?"-":"",a=uo(this._milliseconds)!==uo(c)?"-":"",i+"P"+(n?s+n+"Y":"")+(h?s+h+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var co=lr.prototype;return co.isValid=or,co.abs=Cs,co.add=Ts,co.subtract=Rs,co.as=Is,co.asMilliseconds=xs,co.asSeconds=Ds,co.asMinutes=Hs,co.asHours=Ps,co.asDays=js,co.asWeeks=Fs,co.asMonths=Ys,co.asQuarters=Us,co.asYears=Vs,co.valueOf=Bs,co._bubble=Ns,co.clone=Ws,co.get=Gs,co.milliseconds=Ks,co.seconds=Xs,co.minutes=$s,co.hours=qs,co.days=Js,co.weeks=eo,co.months=Qs,co.years=Zs,co.humanize=ao,co.toISOString=ho,co.toString=ho,co.toJSON=ho,co.locale=li,co.localeData=hi,co.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ho),co.lang=ui,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Oe("x",ve),Oe("X",Ce),De("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),De("x",(function(e,t,n){n._d=new Date(ke(e))})),
  302. //! moment.js
  303. s.version="2.30.1",o(Jn),s.fn=hs,s.min=tr,s.max=nr,s.now=rr,s.utc=g,s.unix=cs,s.months=ws,s.isDate=m,s.locale=yn,s.invalid=_,s.duration=Lr,s.isMoment=M,s.weekdays=_s,s.parseZone=ds,s.localeData=_n,s.isDuration=ur,s.monthsShort=bs,s.weekdaysMin=Ss,s.defineLocale=wn,s.updateLocale=bn,s.locales=vn,s.weekdaysShort=vs,s.normalizeUnits=ie,s.relativeTimeRounding=so,s.relativeTimeThreshold=oo,s.calendarFormat=Br,s.prototype=hs,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 V}));var r=n("c0d8"),i=n("2b0e");function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t=c(t),g(e,m()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(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,b(r.key),r)}}function u(e,t,n){return t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function d(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&&y(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function f(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(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 s(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,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)}function b(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}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 M(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 T(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=T(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&&A(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&&A(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 L(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 A(e,t){var n=function(e){var t=function(){var e=new WeakSet;return function(t,n){if("object"===_(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():_(e)===_(t)&&n(e)===n(t)}var I="14.6.1",k=("undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self&&self,{});(function(e){(function(t,n){var r=e;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)}}))})(k);var x={name:"HotTable",props:M("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 k.LRUMap(this.wrapperRendererCacheSize);return t.shift=function(){var e=k.LRUMap.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 u=n[0].length;u<a;u++)i.push(u);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),p({},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,u){if(i&&!i.getAttribute("ghost-table")){var h=n.rendererCache,c={hotInstance:r,TD:i,row:s,col:o,prop:a,value:l,cellProperties:u,isRenderer:!0};if(h&&!h.has("".concat(s,"-").concat(o))){var d=L(e,t,e.componentOptions.propsData,c);h.set("".concat(s,"-").concat(o),{component:d,lastUsedTD:null})}var m=h.get("".concat(s,"-").concat(o)),f=m.component,p=m.lastUsedTD;if(Object.assign(f.$data,c),!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=L(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 D(e,t,n,r,i,s,o,a,l,u){const h="function"===typeof n?n.options:n;return e&&e.render&&(h.render=e.render,h.staticRenderFns=e.staticRenderFns,h._compiled=!0,i&&(h.functional=!0)),n}var H=x,P=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:e.id}},[e._t("default")],2)},j=[],F=void 0,Y=void 0,U=!1,V=D({render:P,staticRenderFns:j},F,H,Y,U);M("HotColumn");function B(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 W(e){return W="function"===typeof Symbol&&"symbol"===_(Symbol.iterator)?function(e){return _(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_(e)},W(e)}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e){return K(e)||X(e)||$()}function K(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 X(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function $(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function q(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function J(e,t){Q(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){Q(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){Q(e,t,n)}))}function Q(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)}))}"function"===typeof SuppressedError&&SuppressedError;var Z={__proto__:[]},ee=Z instanceof Array;function te(e){var t=W(e);return null==e||"object"!==t&&"function"!==t}function ne(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 re=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function ie(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(re.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 G({},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 ne(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 oe(a,e,o),q()&&J(a,e),a}var se={prototype:!0,arguments:!0,callee:!0,caller:!0};function oe(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!se[r]){var i=Object.getOwnPropertyDescriptor(e,r);if(!i||i.configurable){var s=Object.getOwnPropertyDescriptor(t,r);if(!ee){if("cid"===r)return;var o=Object.getOwnPropertyDescriptor(n,r);if(!te(s.value)&&o&&o.value===s.value)return}Object.defineProperty(e,r,s)}}}))}function ae(e){return"function"===typeof e?ie(e):function(t){return ie(t,e)}}ae.registerHooks=function(e){re.push.apply(re,z(e))};var le=function(e){function t(){var e;return a(this,t),e=o(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 d(t,e),u(t,[{key:"mounted",value:function(){var e=this;this.$data.hotCustomEditorClass=function(){var t=function(t){function n(t){var r;return a(this,n),r=o(this,n,[t]),e.$data.hotCustomEditorInstance=r,r}return d(n,t),u(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"]);le=B([ae({})],le)},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"},c5cd:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return c}));n("d9e2");var r=n("7b9c"),i=n("351d"),s=n("7ae0");function o(e,t,n){return(t=a(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 u=0;class h{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)),u+=1)}unregister(e){const t=this.collection.get(e);Object(r["isDefined"])(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),u-=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 c(){return u}Object(i["mixin"])(h,s["a"])},c6a7:function(e,t,n){"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},c7aa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  304. //! moment.js locale configuration
  305. 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";
  306. //! moment.js locale configuration
  307. 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}))},cb27:function(e,t,n){"use strict";var r=n("e330"),i=Set.prototype;e.exports={Set:Set,add:r(i.add),has:r(i.has),remove:r(i["delete"]),proto:i}},cc6f:function(e,t,n){"use strict";n.d(t,"a",(function(){return ca})),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 Ma})),n.d(s,"BitwiseLogicOperationsPlugin",(function(){return Na})),n.d(s,"BooleanPlugin",(function(){return La})),n.d(s,"CharPlugin",(function(){return Aa})),n.d(s,"CodePlugin",(function(){return Ia})),n.d(s,"CountBlankPlugin",(function(){return ka})),n.d(s,"CountUniquePlugin",(function(){return xa})),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 hl})),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 Al})),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 tu})),n.d(s,"StatisticalPlugin",(function(){return Ju})),n.d(s,"MathPlugin",(function(){return Qu})),n.d(s,"ComplexPlugin",(function(){return nh})),n.d(s,"StatisticalAggregationPlugin",(function(){return ph})),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),cr(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}}
  308. /**
  309. * @license
  310. * Copyright (c) 2024 Handsoncode. All rights reserved.
  311. */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),ur(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(hr(t))return;const n=this.type===r.ABSOLUTE?"$":"";return`${n}${t.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}
  312. /**
  313. * @license
  314. * Copyright (c) 2024 Handsoncode. All rights reserved.
  315. */(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),cr(t,n)}toSimpleRowAddress(e){const t=wr(this,e);let n=this.row;return this.isRowRelative()&&(n+=e.row),ur(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}}
  316. /**
  317. * @license
  318. * Copyright (c) 2024 Handsoncode. All rights reserved.
  319. */const u=":",h="$",c="\\s+",d="[ \\t\\n\\r]+",m="A-Za-zÀ-ʯ",f=m+"0-9_.",p=`[${m}0-9_]+`,g="'(((?!').|'')*)'",y=`(${p}|${g})!`,w=`(${y})?\\${h}?[A-Za-z]+\\${h}?[0-9]+`,b=`(${y})?\\${h}?[A-Za-z]+`,_=`(${y})?\\${h}?[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"],M=[...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)),T=new RegExp(`^(${y})?(\\${h}?)([A-Za-z]+)(\\${h}?)([0-9]+)$`),R=new RegExp(`^(${y})?(\\${h}?)([A-Za-z]+)$`),O=new RegExp(`^(${y})?(\\${h}?)([0-9]+)$`),N=new RegExp(`^${p}$`),L=(e,t,n)=>{const r=T.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]===h&&r[7]===h?l.absolute(i,o,s):r[5]===h?l.absoluteCol(i,o-n.row,s):r[7]===h?l.absoluteRow(i-n.col,o,s):l.relative(i-n.col,o-n.row,s)},A=(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]===h?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]===h?a.absolute(s,i):a.relative(s-n.row,i)},k=(e,t,n)=>{const r=T.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)},x=(e,t,n)=>{const r=t.split(u);if(2!==r.length)return;const[i,s]=r,o=k(e,i,n);if(void 0===o)return;const a=k(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}${u}${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");
  320. /**
  321. * @license
  322. * Copyright (c) 2024 Handsoncode. All rights reserved.
  323. */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}),ue=(e,t,n)=>({type:W.DIV_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),he=(e,t,n)=>({type:W.POWER_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ce=(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}
  324. /**
  325. * @license
  326. * Copyright (c) 2024 Handsoncode. All rights reserved.
  327. */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});
  328. /**
  329. * @license
  330. * Copyright (c) 2024 Handsoncode. All rights reserved.
  331. */class Me{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){const n=mt(t,this.functionRegistry),r=Ce(t,n,Te(t,this.functionRegistry.isFunctionVolatile),Te(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 Te=(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 Te(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 Te(e.left,t)||Te(e.right,t);case W.PARENTHESIS:return Te(e.expression,t);case W.FUNCTION_CALL:return!!t(e.procedureName)||e.args.some(e=>Te(e,t));case W.ARRAY:return e.args.some(e=>e.some(e=>Te(e,t)))}};
  332. /**
  333. * @license
  334. * Copyright (c) 2024 Handsoncode. All rights reserved.
  335. */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}.`
  336. /**
  337. * @license
  338. * Copyright (c) 2024 Handsoncode. All rights reserved.
  339. */;class Oe{constructor(){this.POSSIBLE_START_CHARACTERS=[...M,...C,h,"'","_"],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)}}
  340. /**
  341. * @license
  342. * Copyright (c) 2024 Handsoncode. All rights reserved.
  343. */class Ne{constructor(){this.POSSIBLE_START_CHARACTERS=[...M,"_"],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}}
  344. /**
  345. * @license
  346. * Copyright (c) 2024 Handsoncode. All rights reserved.
  347. */const Le=Object(U["createToken"])({name:"AdditionOp",pattern:U["Lexer"].NA}),Ae=Object(U["createToken"])({name:"PlusOp",pattern:/\+/,categories:Le}),Ie=Object(U["createToken"])({name:"MinusOp",pattern:/-/,categories:Le}),ke=Object(U["createToken"])({name:"MultiplicationOp",pattern:U["Lexer"].NA}),xe=Object(U["createToken"])({name:"TimesOp",pattern:/\*/,categories:ke}),De=Object(U["createToken"])({name:"DivOp",pattern:/\//,categories:ke}),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(u)}),Ze=Object(U["createToken"])({name:"ColumnRange",pattern:new RegExp(`${b}${u}${b}`)}),et=Object(U["createToken"])({name:"RowRange",pattern:new RegExp(`${_}${u}${_}`)}),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:c),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+)?`)}),u=Object(U["createToken"])({name:"OffsetProcedureName",pattern:new RegExp(t,"i")});let h,m;e.functionArgSeparator===e.arrayColumnSeparator?(h=a,m=[]):e.functionArgSeparator===e.arrayRowSeparator?(h=o,m=[]):(h=Object(U["createToken"])({name:"ArgSeparator",pattern:e.functionArgSeparator}),m=[h]);const f=[s,Ae,Ie,xe,De,He,Fe,Ye,Pe,Be,We,Ue,Ve,ze,Ke,Xe,$e,u,tt,Qe,...m,Ze,et,l,qe,Je,Ge,je,Le,ke,rt,st,o,a];return{ArgSeparator:h,NumberLiteral:l,OffsetProcedureName:u,ArrayRowSeparator:o,ArrayColSeparator:a,WhiteSpace:s,allTokens:f,errorMapping:n,functionMapping:r,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}};
  348. /**
  349. * @license
  350. * Copyright (c) 2024 Handsoncode. All rights reserved.
  351. */
  352. 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(()=>A(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>A(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(()=>L(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(()=>L(this.sheetMapping,e.image,this.formulaAddress)),i=this.ACTION(()=>L(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(()=>L(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(()=>L(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(Le),t=this.SUBRULE(this.atomicExpression);return Object(U["tokenMatcher"])(e,Ae)?de(t,e.leadingWhitespace):Object(U["tokenMatcher"])(e,Ie)?ce(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=he(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(ke),n=this.SUBRULE2(this.powerExpression);Object(U["tokenMatcher"])(t,xe)?e=le(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,De)?e=ue(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(Le),n=this.SUBRULE2(this.multiplicationExpression);Object(U["tokenMatcher"])(t,Ae)?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 u;if(void 0===a)u=1;else{if(a.type!==W.NUMBER)return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if(u=a.value,u<1)return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(u))return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is not integer")}const h=e[4];let c;if(void 0===h)c=1;else{if(h.type!==W.NUMBER)return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if(c=h.value,c<1)return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(c))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===c&&1===u)return $(d);{const e=new l(d.col+c-1,d.row+u-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}}
  353. /**
  354. * @license
  355. * Copyright (c) 2024 Handsoncode. All rights reserved.
  356. */class ut{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(ht(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 ht(e,t){const n=e.toString();return n.replace(".",t)}
  357. /**
  358. * @license
  359. * Copyright (c) 2024 Handsoncode. All rights reserved.
  360. */class ct{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 Me(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),u=mt(l,this.functionRegistry);return{ast:l,errors:[],hasVolatileFunction:o,hasStructuralChangeFunction:a,dependencies:u}}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,u]=n.map(e=>e.toRowAddress()).sort(a.compareByAbsoluteAddress(this.formulaAddress)),[h,c]=n.map(e=>e.sheet).sort(ct.compareSheetIds.bind(this));return{start:l.fromColAndRow(r,s,h),end:l.fromColAndRow(i,u,c)}}orderColumnRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,a]=n.map(e=>e.sheet).sort(ct.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(ct.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=L(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=A(this.sheetMapping,e,t),o=A(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(ht(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)}}
  361. /**
  362. * @license
  363. * Copyright (c) 2024 Handsoncode. All rights reserved.
  364. */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};
  365. /**
  366. * @license
  367. * Copyright (c) 2024 Handsoncode. All rights reserved.
  368. */
  369. 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 Mr(t.sheet,t.row,n.row)}}class wt{constructor(e){this.name=e}absolutize(e){return this}}
  370. /**
  371. * @license
  372. * Copyright (c) 2024 Handsoncode. All rights reserved.
  373. */
  374. /**
  375. * @license
  376. * Copyright (c) 2024 Handsoncode. All rights reserved.
  377. */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 Mt extends Et{getDetailedType(){return At.NUMBER_DATE}}class Tt extends Et{getDetailedType(){return At.NUMBER_CURRENCY}}class Rt extends Et{getDetailedType(){return At.NUMBER_TIME}}class Ot extends Et{getDetailedType(){return At.NUMBER_DATETIME}}class Nt extends Et{getDetailedType(){return At.NUMBER_PERCENT}}function Lt(e){return"number"===typeof e||e instanceof Et}var At,It;function kt(e){return e instanceof Et?e.getDetailedType():At.NUMBER_RAW}function xt(e){return e instanceof Et?e.format:void 0}function Dt(e){return e instanceof Et?{type:e.getDetailedType(),format:e.format}:{type:At.NUMBER_RAW}}
  378. /**
  379. * @license
  380. * Copyright (c) 2024 Handsoncode. All rights reserved.
  381. */(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"})(At||(At={}));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)):(Lt(t)||(this._hasOnlyNumbers=!1),t)}))}}
  382. /**
  383. * @license
  384. * Copyright (c) 2024 Handsoncode. All rights reserved.
  385. */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})}}
  386. /**
  387. * @license
  388. * Copyright (c) 2024 Handsoncode. All rights reserved.
  389. */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)}}
  390. /**
  391. * @license
  392. * Copyright (c) 2024 Handsoncode. All rights reserved.
  393. */(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={}));
  394. /**
  395. * @license
  396. * Copyright (c) 2024 Handsoncode. All rights reserved.
  397. */
  398. 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)}}
  399. /**
  400. * @license
  401. * Copyright (c) 2024 Handsoncode. All rights reserved.
  402. */class Ut extends Yt{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}
  403. /**
  404. * @license
  405. * Copyright (c) 2024 Handsoncode. All rights reserved.
  406. */
  407. /**
  408. * @license
  409. * Copyright (c) 2024 Handsoncode. All rights reserved.
  410. */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 un extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class hn extends Error{constructor(){super("Computations are suspended")}}class cn 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.`)}}
  411. /**
  412. * @license
  413. * Copyright (c) 2024 Handsoncode. All rights reserved.
  414. */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)}}
  415. /**
  416. * @license
  417. * Copyright (c) 2024 Handsoncode. All rights reserved.
  418. */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)})}}
  419. /**
  420. * @license
  421. * Copyright (c) 2024 Handsoncode. All rights reserved.
  422. */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 Mn{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}}
  423. /**
  424. * @license
  425. * Copyright (c) 2024 Handsoncode. All rights reserved.
  426. */class Tn{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 Tn{constructor(e,t,n,r=0){super(e,t,r),n.isRef?this.array=new Mn(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 Mn(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 Mn(e,this.array.size)}}class On extends Tn{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}}
  427. /**
  428. * @license
  429. * Copyright (c) 2024 Handsoncode. All rights reserved.
  430. */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}}
  431. /**
  432. * @license
  433. * Copyright (c) 2024 Handsoncode. All rights reserved.
  434. */const Ln=(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 Tn?(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))):[]};
  435. /**
  436. * @license
  437. * Copyright (c) 2024 Handsoncode. All rights reserved.
  438. */var An;(function(e){e[e["ON_STACK"]=0]="ON_STACK",e[e["PROCESSED"]=1]="PROCESSED",e[e["POPPED"]=2]="POPPED"})(An||(An={}));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]=An.ON_STACK;const t=[e],n=[];while(t.length>0){const e=t[t.length-1];switch(this.nodeStatus[e]){case An.ON_STACK:this.handleOnStack(e,n,t);break;case An.PROCESSED:this.handleProcessed(e,n,t);break;case An.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]=An.ON_STACK)}),this.nodeStatus[e]=An.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]=An.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}}}
  439. /**
  440. * @license
  441. * Copyright (c) 2024 Handsoncode. All rights reserved.
  442. */class kn{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}}
  443. /**
  444. * @license
  445. * Copyright (c) 2024 Handsoncode. All rights reserved.
  446. */class xn{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.nodesIds=new Map,this.dirtyAndVolatileNodeIds=new kn({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)}}
  447. /**
  448. * @license
  449. * Copyright (c) 2024 Handsoncode. All rights reserved.
  450. */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};
  451. /**
  452. * @license
  453. * Copyright (c) 2024 Handsoncode. All rights reserved.
  454. */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 cn("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 cn("errors."+e);return t}getUITranslation(e){const t=this.ui[e];if(void 0===t)throw new cn("ui."+e);return t}checkUI(){for(const e of Object.values(Un))if(!(e in this.ui))throw new cn("ui."+e)}checkErrors(){for(const e of Object.values(Vn))if(!(e in this.errors)&&e!==Vn.LIC)throw new cn("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))}
  455. /**
  456. * @license
  457. * Copyright (c) 2024 Handsoncode. All rights reserved.
  458. */var Un,Vn,Bn;
  459. /**
  460. * @license
  461. * Copyright (c) 2024 Handsoncode. All rights reserved.
  462. */
  463. 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}}
  464. /**
  465. * @license
  466. * Copyright (c) 2024 Handsoncode. All rights reserved.
  467. */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 Tn))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 xn(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=Tn.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=Ln(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 Tn?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 Tn||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))}}}
  468. /**
  469. * @license
  470. * Copyright (c) 2024 Handsoncode. All rights reserved.
  471. */class Xn{constructor(){}getCellValue(){return vt}}
  472. /**
  473. * @license
  474. * Copyright (c) 2024 Handsoncode. All rights reserved.
  475. */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")}}
  476. /**
  477. * @license
  478. * Copyright (c) 2024 Handsoncode. All rights reserved.
  479. */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}}
  480. /**
  481. * @license
  482. * Copyright (c) 2024 Handsoncode. All rights reserved.
  483. */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)}}
  484. /**
  485. * @license
  486. * Copyright (c) 2024 Handsoncode. All rights reserved.
  487. */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++)void 0!==this.mapping[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++)void 0!==this.mapping[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]}}
  488. /**
  489. * @license
  490. * Copyright (c) 2024 Handsoncode. All rights reserved.
  491. */
  492. /**
  493. * @license
  494. * Copyright (c) 2024 Handsoncode. All rights reserved.
  495. */(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),At),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(Lt(e))return nr.NUMBER;if("boolean"===typeof e)return nr.BOOLEAN;throw new Error("Cell value not computed")},or=e=>Lt(e)?kt(e):sr(e),ar=e=>Lt(e)?xt(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 ur=(e,t)=>({sheet:e,row:t}),hr=e=>e.row<0,cr=(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 Mr(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):Mr.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 Mr(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 Mr 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 Mr(n.sheet,n.row,r.row)}shouldBeRemoved(){return this.height()<=0}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new Mr(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new Mr(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){}}
  496. /**
  497. * @license
  498. * Copyright (c) 2024 Handsoncode. All rights reserved.
  499. */class Tr{constructor(e,t,n){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=n}}
  500. /**
  501. * @license
  502. * Copyright (c) 2024 Handsoncode. All rights reserved.
  503. */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})}
  504. /**
  505. * @license
  506. * Copyright (c) 2024 Handsoncode. All rights reserved.
  507. */const Or="i",Nr=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class Lr{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(Lt(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;Lt(n)&&t.push(St(n))}return t},this.manyToOnlyNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(Lt(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);Lt(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 Lt(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 Tt(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]:Lt(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 At.NUMBER_RAW:return e;case At.NUMBER_CURRENCY:return new Tt(e,null!==r&&void 0!==r?r:this.config.currencySymbol[0]);case At.NUMBER_DATE:return new Mt(e,r);case At.NUMBER_DATETIME:return new Ot(e,r);case At.NUMBER_TIME:return new Rt(e,r);case At.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(Lt(n)&&Lt(r))return this.floatCmp(n,r)}return e===vt?e=xr(t):t===vt&&(t=xr(e)),"string"===typeof e&&"string"===typeof t?this.stringCmp(e,t):"boolean"===typeof e&&"boolean"===typeof t?jr(kr(e),kr(t)):Lt(e)&&Lt(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 Ar([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 kr(e){return Number(e)}function xr(e){return"string"===typeof e?"":Lt(e)?0:"boolean"!==typeof e&&vt}function Dr(e){if(e instanceof lr||"boolean"===typeof e)return e;if(e===vt)return!1;if(Lt(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?"":Lt(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===At.NUMBER_RAW)return{type:i,format:s};if(i===At.NUMBER_RAW)return{type:n,format:r};if((n===At.NUMBER_DATETIME||n===At.NUMBER_DATE)&&(i===At.NUMBER_DATETIME||i===At.NUMBER_DATE))return{type:At.NUMBER_RAW};if(n===At.NUMBER_TIME){if(i===At.NUMBER_DATE)return{type:At.NUMBER_DATETIME,format:`${s} ${r}`};if(i===At.NUMBER_DATETIME)return{type:At.NUMBER_DATETIME,format:s}}if(i===At.NUMBER_TIME){if(n===At.NUMBER_DATE)return{type:At.NUMBER_DATETIME,format:`${r} ${s}`};if(n===At.NUMBER_DATETIME)return{type:At.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===At.NUMBER_PERCENT&&(n=At.NUMBER_RAW,r=void 0),i===At.NUMBER_PERCENT&&(i=At.NUMBER_RAW,s=void 0),n===At.NUMBER_RAW?{type:i,format:s}:i===At.NUMBER_RAW?{type:n,format:r}:{type:At.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())}
  508. /**
  509. * @license
  510. * Copyright (c) 2024 Handsoncode. All rights reserved.
  511. */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[u,h]=l?this.calculateSizeOfVectorizedResultArray(s,a):[1,1];if(1===u&&1===h){const e=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,o,r,n.returnNumberType)}const c=[...Array(u).keys()].map(e=>[...Array(h).keys()].map(i=>{const u=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,e,i),h=this.calculateSingleCellOfResultArray(t,u,a,o,r,n.returnNumberType);if(h instanceof Ht)throw new Error("Function returning array cannot be vectorized.");return h}));return Ht.onlyValues(c)},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(!Lt(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&&Lt(e)?this.arithmeticHelper.ExtendedNumberFactory(St(e),{type:t,format:n}):e}}
  512. /**
  513. * @license
  514. * Copyright (c) 2024 Handsoncode. All rights reserved.
  515. */
  516. /**
  517. * @license
  518. * Copyright (c) 2024 Handsoncode. All rights reserved.
  519. */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 Tr(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)}}
  520. /**
  521. * @license
  522. * Copyright (c) 2024 Handsoncode. All rights reserved.
  523. */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}}
  524. /**
  525. * @license
  526. * Copyright (c) 2024 Handsoncode. All rights reserved.
  527. */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 un(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 ui(...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 hi(e,t,n){if(typeof e!==t)throw new sn(t,n)}
  528. /**
  529. * @license
  530. * Copyright (c) 2024 Handsoncode. All rights reserved.
  531. */const ci=new RegExp("^ss(\\.(s+|0+))?$"),di=new RegExp("^[0-9/.\\-: ]+[ap]?m?$"),mi=new RegExp("\\s+"),fi=new RegExp("[ /.-]"),pi=":",gi=1e3,yi=Mi(Si),wi=Mi(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 u=void 0;if("am"===e[e.length-1]||"a"===e[e.length-1]?(u=!1,e.pop()):"pm"!==e[e.length-1]&&"p"!==e[e.length-1]||(u=!0,e.pop()),e.length!==s)return;const h=Number(null!==(n=e[l])&&void 0!==n?n:"0");if(!Number.isFinite(h))return;const c=Math.round(h*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!==u&&(m<0||m>12))return;const f=void 0!==u?m%12+(u?12:0):m;return{hours:f,minutes:d,seconds:c}}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 u=Number(e[s]);if(!Number.isFinite(u)||!Number.isInteger(u))return;if(e[a]&&e[o])return;const h=Number(null!==(n=e[a])&&void 0!==n?n:e[o]);return!Number.isFinite(h)||!Number.isInteger(h)||e[a]&&(h<1e3||h>9999)||e[o]&&(h<0||h>99)?void 0:{year:h,month:u,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=>ci.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 Mi(e){const t={};return n=>{const r=t[n];if(void 0!==r)return r;const i=e(n);return t[n]=i,i}}
  532. /**
  533. * @license
  534. * Copyright (c) 2024 Handsoncode. All rights reserved.
  535. */const Ti=[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,Li=24;function Ai(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 ki={year:9999,month:12,day:31};class xi{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(ki),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)?Ai(t)?new Ot(Ui(t)+this.dateToNumber(t),n+" "+r):new Rt(Ui(t),r):Ai(t)?new Mt(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<=Ti[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/Li);t.hours=t.hours%Li;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:Ti[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(!Ai(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,Ti[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*Li*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)}}
  536. /**
  537. * @license
  538. * Copyright (c) 2024 Handsoncode. All rights reserved.
  539. */class Bi{call(){return Qn}}
  540. /**
  541. * @license
  542. * Copyright (c) 2024 Handsoncode. All rights reserved.
  543. */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("\\")}
  544. /**
  545. * @license
  546. * Copyright (c) 2024 Handsoncode. All rights reserved.
  547. */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]?".":"",u=Number(t.toFixed(a.length)).toString().split(".");let h=u[0]||"",c=u[1]||"";if(o.length>h.length){const e=is(o.substr(0,o.length-h.length),"0");h=ns(h,e+h.length)}const d=is(a.substr(c.length,a.length-c.length),"0");c=rs(c,d+c.length),n+=h+l+c}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(ci.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(ci.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}
  548. /**
  549. * @license
  550. * Copyright (c) 2024 Handsoncode. All rights reserved.
  551. */(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",us=e=>parseInt(e,16),hs=e=>parseInt(e,10),cs=e=>(e+"").replace(/\-/g,""),ds=(e,t,n)=>e["substr"](t,n),ms=e=>e["codePointAt"](0)-65;function fs(e){return 25===cs(e)[ls]?us(ds(cs(e),us("12"),ms("F")))/(us(ds(cs(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|=(hs(""+hs(us(ds(e,t+r-(0===s?0:2),i+(s?2:0)))+(us(ds(e,t+r+i,2))+[]).padStart(2,"0")))%97||2)>>1,t+=2,n),ms("A"))===[]+1>>1}
  552. /**
  553. * @license
  554. * Copyright (c) 2024 Handsoncode. All rights reserved.
  555. */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]="18/07/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}`}
  556. /**
  557. * @license
  558. * Copyright (c) 2024 Handsoncode. All rights reserved.
  559. */var _s,vs,Ss;function Es(e){return e.startsWith("=")}function Cs(e){const t=e.toLowerCase();return"true"===t||"false"===t}function Ms(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 Ts{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 Mt(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(Ms(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 Tt(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)]}}}
  560. /**
  561. * @license
  562. * Copyright (c) 2024 Handsoncode. All rights reserved.
  563. */(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}}
  564. /**
  565. * @license
  566. * Copyright (c) 2024 Handsoncode. All rights reserved.
  567. */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 Ls{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 As{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 Ls,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 As&&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 As,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 ks=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 ks(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 ks(e.left)||ks(e.right);case W.PARENTHESIS:return ks(e.expression);case W.FUNCTION_CALL:return e.args.some(e=>ks(e));case W.ARRAY:return e.args.some(e=>e.some(e=>ks(e)))}};
  568. /**
  569. * @license
  570. * Copyright (c) 2024 Handsoncode. All rights reserved.
  571. */class xs{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}}
  572. /**
  573. * @license
  574. * Copyright (c) 2024 Handsoncode. All rights reserved.
  575. */class Ds extends xs{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]}}
  576. /**
  577. * @license
  578. * Copyright (c) 2024 Handsoncode. All rights reserved.
  579. */class Hs extends xs{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]}}
  580. /**
  581. * @license
  582. * Copyright (c) 2024 Handsoncode. All rights reserved.
  583. */class Ps extends xs{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}}
  584. /**
  585. * @license
  586. * Copyright (c) 2024 Handsoncode. All rights reserved.
  587. */class js extends xs{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 xs{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]}}
  588. /**
  589. * @license
  590. * Copyright (c) 2024 Handsoncode. All rights reserved.
  591. */class Ys extends xs{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]}}
  592. /**
  593. * @license
  594. * Copyright (c) 2024 Handsoncode. All rights reserved.
  595. */class Us extends xs{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]}}
  596. /**
  597. * @license
  598. * Copyright (c) 2024 Handsoncode. All rights reserved.
  599. */class Vs extends xs{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}}
  600. /**
  601. * @license
  602. * Copyright (c) 2024 Handsoncode. All rights reserved.
  603. */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}}
  604. /**
  605. * @license
  606. * Copyright (c) 2024 Handsoncode. All rights reserved.
  607. */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,u=this.getRangeClipboardCells(s),h=this.dependencyGraph.rawValuesFromRange(s);this.columnSearch.removeValues(h);const c=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.moveValues(c,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:u,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 Tn)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),u=this.arraySizePredictor.checkArraySize(n,t);this.dependencyGraph.setFormulaToCell(t,a,l,u,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),u=null!==l&&void 0!==l?l:this.dependencyGraph.graph.getNodeId(a);for(const h of this.dependencyGraph.graph.adjacentNodes(a))if(h instanceof On&&h.getAddress(this.lazilyTransformingAstService).sheet===n){const t=h.getFormula(this.lazilyTransformingAstService),n=h.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(u,h),this.dependencyGraph.graph.addEdge(s,h))}}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(ks(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}
  608. /**
  609. * @license
  610. * Copyright (c) 2024 Handsoncode. All rights reserved.
  611. */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 uo extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class ho extends eo{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}}class co 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)}}}
  612. /**
  613. * @license
  614. * Copyright (c) 2024 Handsoncode. All rights reserved.
  615. */class Eo{constructor(e,t,n,r,i,s,o,a,l,u){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=u,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 uo(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 ho(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 co(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(!Mo(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(!Mo(n)||!Mo(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(!Mo(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(!Mo(n)||!Mo(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(!Mo(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(ks(e.ast))throw new bn}}}function Co(e){return Number.isInteger(e)&&e>0}function Mo(e){return Number.isInteger(e)&&e>=0}
  616. /**
  617. * @license
  618. * Copyright (c) 2024 Handsoncode. All rights reserved.
  619. */class To{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 Tn){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 Tn){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 Tr(t,this.config.useArrayArithmetic));return r.forEach(e=>{this.dependencyGraph.rangeMapping.removeRange(e)}),i}recomputeFormulas(e,t){e.forEach(e=>{e instanceof Tn&&e.setCellValue(new lr(Vn.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof Tn){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 Tr(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}}
  620. /**
  621. * @license
  622. * Copyright (c) 2024 Handsoncode. All rights reserved.
  623. */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&&Lt(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}}
  624. /**
  625. * @license
  626. * Copyright (c) 2024 Handsoncode. All rights reserved.
  627. */class Lo{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 Ao(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 Ao{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)}}
  628. /**
  629. * @license
  630. * Copyright (c) 2024 Handsoncode. All rights reserved.
  631. */const Io=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class ko 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${ca.version}, ${n}`})}}
  632. /**
  633. * @license
  634. * Copyright (c) 2024 Handsoncode. All rights reserved.
  635. */
  636. function xo(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}ko.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,xo(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(ca.getRegisteredLanguagesCodes());Object.keys(e).forEach(n=>{t.has(n)&&ca.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=xo(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=xo(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)}}
  637. /**
  638. * @license
  639. * Copyright (c) 2024 Handsoncode. All rights reserved.
  640. */
  641. var Ho;Do.plugins=new Map,Do._protectedPlugins=new Map([["VERSION",ko],["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}};
  642. /**
  643. * @license
  644. * Copyright (c) 2024 Handsoncode. All rights reserved.
  645. */class Vo{constructor(e,t,n,r,i,s,o,a,l,u){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=u,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(Lt(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 Tr(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=Mr.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,u=1!==n.width()?l:0;i<t.height()&&a<n.height()&&r<t.width()&&u<n.width()?s[o][l]=e(t.data[i][r],n.data[a][u]):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}
  646. /**
  647. * @license
  648. * Copyright (c) 2024 Handsoncode. All rights reserved.
  649. */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}}
  650. /**
  651. * @license
  652. * Copyright (c) 2024 Handsoncode. All rights reserved.
  653. */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)}}}
  654. /**
  655. * @license
  656. * Copyright (c) 2024 Handsoncode. All rights reserved.
  657. */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))),u="asc"===r?(e,t)=>Jo(e,t):(e,t)=>-Jo(e,t),h=qo(t=>u(e,l(t))>=0,o,a),c=l(h);return h===Xo||typeof c!==typeof e||i&&c!==e?Xo:h-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}
  658. /**
  659. * @license
  660. * Copyright (c) 2024 Handsoncode. All rights reserved.
  661. */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)}}
  662. /**
  663. * @license
  664. * Copyright (c) 2024 Handsoncode. All rights reserved.
  665. */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)}}
  666. /**
  667. * @license
  668. * Copyright (c) 2024 Handsoncode. All rights reserved.
  669. */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}
  670. /**
  671. * @license
  672. * Copyright (c) 2024 Handsoncode. All rights reserved.
  673. */function na(e,t,n){return t.useColumnIndex?new ea(e,t,n):new Zo(e)}
  674. /**
  675. * @license
  676. * Copyright (c) 2024 Handsoncode. All rights reserved.
  677. */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)}}
  678. /**
  679. * @license
  680. * Copyright (c) 2024 Handsoncode. All rights reserved.
  681. */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 ut(e,ot(e),this.dependencyGraph.sheetMapping.fetchDisplayName,t);return new ia(this.dependencyGraph,n,this.exporter)}}
  682. /**
  683. * @license
  684. * Copyright (c) 2024 Handsoncode. All rights reserved.
  685. */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),u=a.sheetMapping,h=a.addressMapping;for(const T in t)if(Object.prototype.hasOwnProperty.call(t,T)){const n=t[T];Bs(n);const r=Ws(n);if(r.height>e.maxRows||r.width>e.maxColumns)throw new Gt;const i=u.addSheet(T);h.autoAddSheet(i,r)}const c=new ct(e,s,u.get);o.parser=c;const d=new ut(e,ot(e),u.fetchDisplayName,i),m=new xi(e),f=new ra(e),p=new Lr(e,m,f),g=new Ts(e,m,f),y=new ri(e,s),w=new $s(e,a,l,g,c,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,c,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,u.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 Lo(a,l,c,g,r,y);e.buildGraph(t,r)});const M=new To(e,r,C,o,a,l);return M.run(),r.end(It.BUILD_ENGINE_TOTAL),{config:e,stats:r,dependencyGraph:a,columnSearch:l,parser:c,unparser:d,cellContentParser:g,evaluator:M,lazilyTransformingAstService:o,crudOperations:v,exporter:S,namedExpressions:i,serialization:E,functionRegistry:s}}}
  686. /**
  687. * @license
  688. * Copyright (c) 2024 Handsoncode. All rights reserved.
  689. */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,ua=n("c0e2");
  690. /**
  691. * @license
  692. * Copyright (c) 2024 Handsoncode. All rights reserved.
  693. */(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 ha extends ua["TinyEmitter"]{emit(e,...t){return super.emit(e,...t),this}}
  694. /**
  695. * @license
  696. * Copyright (c) 2024 Handsoncode. All rights reserved.
  697. */class ca{constructor(e,t,n,r,i,s,o,a,l,u,h,c,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=u,this._exporter=h,this._namedExpressions=c,this._serialization=d,this._functionRegistry=m,this._emitter=new ha,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){hi(e,"string","languageCode");const t=this.registeredLanguages.get(e);if(void 0===t)throw new mn;return t}static registerLanguage(e,t){if(hi(e,"string","languageCode"),this.registeredLanguages.has(e))throw new fn;this.registeredLanguages.set(e,Yn(t))}static unregisterLanguage(e){if(hi(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){hi(e,"string","functionId"),Do.registerFunction(e,t,n)}static unregisterFunction(e){hi(e,"string","functionId"),Do.unregisterFunction(e)}static unregisterAllFunctions(){Do.unregisterAll()}static getRegisteredFunctionNames(e){hi(e,"string","code");const t=Do.getRegisteredFunctionIds(),n=this.getLanguage(e);return n.getFunctionTranslations(t)}static getFunctionPlugin(e){return hi(e,"string","functionId"),Do.getFunctionPlugin(e)}static getAllFunctionPlugins(){return Do.getPlugins()}static buildFromEngineState(e){return new ca(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 hi(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return hi(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return hi(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return hi(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 hi(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){hi(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(n){return!1}}setRowOrder(e,t){hi(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}isItPossibleToSetRowOrder(e,t){hi(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 hi(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){hi(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(n){return!1}}setColumnOrder(e,t){hi(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}isItPossibleToSetColumnOrder(e,t){hi(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){hi(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...n),!0}catch(r){return!1}}addRows(e,...t){return hi(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){hi(e,"number","sheetId");const n=qs(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...n),!0}catch(r){return!1}}removeRows(e,...t){return hi(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){hi(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...n),!0}catch(r){return!1}}addColumns(e,...t){return hi(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){hi(e,"number","sheetId");const n=qs(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...n),!0}catch(r){return!1}}removeColumns(e,...t){return hi(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){hi(e,"number","sheetId"),hi(t,"number","startRow"),hi(n,"number","numberOfRows"),hi(r,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(i){return!1}}moveRows(e,t,n,r){return hi(e,"number","sheetId"),hi(t,"number","startRow"),hi(n,"number","numberOfRows"),hi(r,"number","targetRow"),this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,n,r){hi(e,"number","sheetId"),hi(t,"number","startColumn"),hi(n,"number","numberOfColumns"),hi(r,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(i){return!1}}moveColumns(e,t,n,r){return hi(e,"number","sheetId"),hi(t,"number","startColumn"),hi(n,"number","numberOfColumns"),hi(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){hi(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(t){return!1}}addSheet(e){void 0!==e&&hi(e,"string","sheetName");const t=this._crudOperations.addSheet(e);return this._emitter.emit(la.SheetAdded,t),t}isItPossibleToRemoveSheet(e){hi(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}removeSheet(e){hi(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){hi(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}clearSheet(e){return hi(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){hi(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(n){return!1}}setSheetContent(e,t){return hi(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return hi(e,"string","cellAddress"),hi(t,"number","sheetId"),k(this.sheetMapping.get,e,t)}simpleCellRangeFromString(e,t){return hi(e,"string","cellRange"),hi(t,"number","sheetId"),x(this.sheetMapping.get,e,t)}simpleCellAddressToString(e,t){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return hi(t,"number","sheetId"),D(this.sheetMapping.fetchDisplayName,e,t)}simpleCellRangeToString(e,t){if(!vr(e))throw new sn("SimpleCellRange","cellRange");return hi(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 hi(e,"number","sheetId"),this.sheetMapping.getDisplayName(e)}getSheetNames(){return this.sheetMapping.sheetNames()}getSheetId(e){return hi(e,"string","sheetName"),this.sheetMapping.get(e)}doesSheetExist(e){return hi(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){hi(e,"number","sheetId"),hi(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(n){return!1}}renameSheet(e,t){hi(e,"number","sheetId"),hi(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){hi(e,"string","expressionName"),void 0!==n&&hi(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(r){return!1}}addNamedExpression(e,t,n,r){hi(e,"string","expressionName"),void 0!==n&&hi(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){hi(e,"string","expressionName"),void 0!==t&&hi(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){hi(e,"string","expressionName"),void 0!==t&&hi(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){hi(e,"string","expressionName"),void 0!==t&&hi(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){hi(e,"string","expressionName"),void 0!==n&&hi(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(r){return!1}}changeNamedExpression(e,t,n,r){return hi(e,"string","expressionName"),void 0!==n&&hi(n,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){hi(e,"string","expressionName"),void 0!==t&&hi(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(n){return!1}}removeNamedExpression(e,t){hi(e,"string","expressionName"),void 0!==t&&hi(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&&hi(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){hi(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){hi(e,"string","formulaString"),hi(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){hi(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){hi(e,"string","formulaString");const{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){const e=ca.getLanguage(this._config.language);return e.getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return hi(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return hi(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return hi(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return hi(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 hn}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}}}ca.version="2.7.1",ca.buildDate="18/07/2024 11:23:17",ca.releaseDate="18/07/2024",ca.languages={},ca.registeredLanguages=new Map;
  698. /**
  699. * @license
  700. * Copyright (c) 2024 Handsoncode. All rights reserved.
  701. */
  702. 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:u,decimalSeparator:h,evaluateNullToZero:c,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:M,nullDate:T,parseDateTime:R,precisionEpsilon:O,precisionRounding:N,stringifyDateTime:L,stringifyDuration:A,smartRounding:I,timeFormats:k,thousandSeparator:x,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(u,Array.isArray,"array","dateFormats")],this.timeFormats=[...li(k,Array.isArray,"array","timeFormats")],this.functionArgSeparator=si(d,"string","functionArgSeparator"),this.decimalSeparator=si(h,[".",","],"decimalSeparator"),this.language=si(y,"string","language"),this.ignoreWhiteSpace=si(w,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=si(b,"string","licenseKey"),this.thousandSeparator=si(x,["",","," ","."],"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(c,"boolean","evaluateNullToZero"),this.nullYear=si(M,"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(L,"function","stringifyDateTime"),this.stringifyDuration=si(A,"function","stringifyDuration"),this.translationPackage=ca.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=li(T,Ai,"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)}),ui({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),ui({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({})}
  703. /**
  704. * @license
  705. * Copyright (c) 2024 Handsoncode. All rights reserved.
  706. */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;
  707. /**
  708. * @license
  709. * Copyright (c) 2024 Handsoncode. All rights reserved.
  710. */(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}]`,u=0==e?"R":`R[${e}]`;return ya.FullyRelative==n?r?`${a}${o}${e}`:`${a}${u}${l}`:ya.RowRelativeColAbsolute==n?r?`${a}$${o}${e}`:`${a}${u}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}]}};
  711. /**
  712. * @license
  713. * Copyright (c) 2024 Handsoncode. All rights reserved.
  714. */
  715. 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 Tr(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 Tr(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 Tr(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}};
  716. /**
  717. * @license
  718. * Copyright (c) 2024 Handsoncode. All rights reserved.
  719. */
  720. 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}]}};
  721. /**
  722. * @license
  723. * Copyright (c) 2024 Handsoncode. All rights reserved.
  724. */
  725. const Sa=0xffffffffffff,Ea=-53,Ca=53;class Ma extends Zr{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),Ta)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),Ra)}}function Ta(e,t){return t<0?Ra(e,-t):Oa(e*Math.pow(2,t))}function Ra(e,t){return t<0?Ta(e,-t):Oa(Math.floor(e/Math.pow(2,t)))}function Oa(e){return e>Sa?new lr(Vn.NUM,Re.BitshiftLong):e}
  726. /**
  727. * @license
  728. * Copyright (c) 2024 Handsoncode. All rights reserved.
  729. */Ma.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}]}};
  730. /**
  731. * @license
  732. * Copyright (c) 2024 Handsoncode. All rights reserved.
  733. */
  734. class La 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])}}La.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}};
  735. /**
  736. * @license
  737. * Copyright (c) 2024 Handsoncode. All rights reserved.
  738. */
  739. class Aa 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)))}}Aa.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:Qr.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:Qr.NUMBER}]}};
  740. /**
  741. * @license
  742. * Copyright (c) 2024 Handsoncode. All rights reserved.
  743. */
  744. 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}]}};
  745. /**
  746. * @license
  747. * Copyright (c) 2024 Handsoncode. All rights reserved.
  748. */
  749. class ka 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})}}ka.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:Qr.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
  750. /**
  751. * @license
  752. * Copyright (c) 2024 Handsoncode. All rights reserved.
  753. */
  754. class xa 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})}}xa.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:Qr.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
  755. /**
  756. * @license
  757. * Copyright (c) 2024 Handsoncode. All rights reserved.
  758. */
  759. 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):Ai(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(!Lt(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:At.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:At.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:At.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:At.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:Qr.STRING}],returnNumberType:At.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:At.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:At.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER}],returnNumberType:At.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"]]);
  760. /**
  761. * @license
  762. * Copyright (c) 2024 Handsoncode. All rights reserved.
  763. */
  764. 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}]}};
  765. /**
  766. * @license
  767. * Copyright (c) 2024 Handsoncode. All rights reserved.
  768. */
  769. 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}]}};
  770. /**
  771. * @license
  772. * Copyright (c) 2024 Handsoncode. All rights reserved.
  773. */
  774. 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}]}};
  775. /**
  776. * @license
  777. * Copyright (c) 2024 Handsoncode. All rights reserved.
  778. */
  779. 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 u=0;u<a;u++){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(Lt(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 c of r)c>0?(i=!0,o.push(c),a.push(0)):c<0?(s=!0,a.push(c),o.push(0)):(a.push(0),o.push(0));if(!i||!s)return new lr(Vn.DIV_BY_ZERO);const l=r.length,u=Xa(n,o);if(u instanceof lr)return u;const h=Xa(t,a);return h instanceof lr?h:Math.pow(-u*Math.pow(1+n,l)/h/(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 u of r)if("number"!==typeof u)return new lr(Vn.VALUE,Re.NumberExpected);const i=r,s=n.valuesFromTopLeftCorner();for(const u of s)if("number"!==typeof u)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 u=0;u<a;u++){if(o[u]=Math.floor(o[u]),o[u]<o[0])return new lr(Vn.NUM,Re.ValueSmall);l+=i[u]/Math.pow(1+e,(o[u]-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}
  780. /**
  781. * @license
  782. * Copyright (c) 2024 Handsoncode. All rights reserved.
  783. */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:At.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:At.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:At.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:At.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:At.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:At.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:At.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:At.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:At.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:At.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:At.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:At.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:At.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:At.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:At.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:At.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:At.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:At.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE}],returnNumberType:At.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.ANY}],repeatLastArgs:1,returnNumberType:At.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:At.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}};
  784. /**
  785. * @license
  786. * Copyright (c) 2024 Handsoncode. All rights reserved.
  787. */
  788. 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}]}};
  789. /**
  790. * @license
  791. * Copyright (c) 2024 Handsoncode. All rights reserved.
  792. */
  793. 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 Tn})}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"),Lt)}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}};
  794. /**
  795. * @license
  796. * Copyright (c) 2024 Handsoncode. All rights reserved.
  797. */
  798. 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}]}};
  799. /**
  800. * @license
  801. * Copyright (c) 2024 Handsoncode. All rights reserved.
  802. */
  803. 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}]}};
  804. /**
  805. * @license
  806. * Copyright (c) 2024 Handsoncode. All rights reserved.
  807. */
  808. 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}]}};
  809. /**
  810. * @license
  811. * Copyright (c) 2024 Handsoncode. All rights reserved.
  812. */
  813. 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))}}
  814. /**
  815. * @license
  816. * Copyright (c) 2024 Handsoncode. All rights reserved.
  817. */
  818. 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 Tr(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 c=0;c<t;c++)for(let n=0;n<t;n++)s=Math.max(s,e[i+c][r+n]);let o=e[i][r];for(let c=0;c<t;c++)for(let n=0;n<t;n++)o=Math.min(o,e[i+c][r+n]);const a=t*t;let l=o,u=s,h=42;for(let c=0;c<32;c++){const n=(l+u)/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){h=n;break}s>a/2?l=n:u=n}else{if(s===(a-1)/2){h=n;break}s>(a-1)/2?l=n:u=n}}return h}),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 Tr(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 Tr(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}};
  819. /**
  820. * @license
  821. * Copyright (c) 2024 Handsoncode. All rights reserved.
  822. */
  823. 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}]}};
  824. /**
  825. * @license
  826. * Copyright (c) 2024 Handsoncode. All rights reserved.
  827. */
  828. 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)}}
  829. /**
  830. * @license
  831. * Copyright (c) 2024 Handsoncode. All rights reserved.
  832. */
  833. function ll(e){return Lt(e)&&!Number.isFinite(St(e))?0:e}al.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]}};class ul{constructor(e,t,n){this.sumsq=e,this.sum=t,this.count=n}static single(e){return new ul(e*e,e,1)}compose(e){return new ul(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}}ul.empty=new ul(0,0,0);class hl 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),cl)}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,ul.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>ul.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,ul.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>ul.single(St(e)),cl)}reduceAggregateA(e,t){return this.reduce(e,t,ul.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>ul.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=>Lt(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,cl);return ll(n)}doMin(e,t){const n=this.reduce(e,t,Number.POSITIVE_INFINITY,"MIN",(e,t)=>Math.min(e,t),St,cl);return ll(n)}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,St,cl)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,St,cl)}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(h){if(h instanceof $t)return new lr(Vn.REF,Re.RangeManySheets);throw h}const l=this.dependencyGraph.getRange(a.start,a.end);if(void 0===l)throw new Error("Range does not exists in graph");let u=l.getFunctionValue(r);if(void 0===u){const e=this.getRangeValues(r,a,l,s,o);u=e.reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),n),l.setFunctionValue(r,u)}return u}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 u of l.addresses(this.dependencyGraph)){const e=i(this.dependencyGraph.getScalarValue(u));e instanceof lr?s.push(e):void 0!==e&&s.push(r(e))}return s}}function cl(e){return Lt(e)||e instanceof lr?e:void 0}function dl(e){return"boolean"===typeof e?kr(e):Lt(e)||e instanceof lr?e:"string"===typeof e?0:void 0}
  834. /**
  835. * @license
  836. * Copyright (c) 2024 Handsoncode. All rights reserved.
  837. */hl.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}},hl.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}]}};
  838. /**
  839. * @license
  840. * Copyright (c) 2024 Handsoncode. All rights reserved.
  841. */
  842. 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}]}};
  843. /**
  844. * @license
  845. * Copyright (c) 2024 Handsoncode. All rights reserved.
  846. */
  847. 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"),Ml)}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=Tl(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 Ml(e,t,n){const r=Tl(e,t);return void 0!==n&&n>r.length?ns(r,n):r}function Tl(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}
  848. /**
  849. * @license
  850. * Copyright (c) 2024 Handsoncode. All rights reserved.
  851. */_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))))}}
  852. /**
  853. * @license
  854. * Copyright (c) 2024 Handsoncode. All rights reserved.
  855. */
  856. function Nl(e){const t=Math.ceil(e);return t%2===1?t:t+1}function Ll(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 Al 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?-Ll(-e):Ll(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))}}Al.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}]}},Al.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};
  857. /**
  858. * @license
  859. * Copyright (c) 2024 Handsoncode. All rights reserved.
  860. */
  861. class Il extends Zr{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}
  862. /**
  863. * @license
  864. * Copyright (c) 2024 Handsoncode. All rights reserved.
  865. */
  866. function*kl(){}function xl(e){const t=e[Symbol.iterator](),{done:n,value:r}=t.next();return n?{rest:kl()}:{value:r,rest:t}}Il.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:Qr.NUMBER}]}};
  867. /**
  868. * @license
  869. * Copyright (c) 2024 Handsoncode. All rights reserved.
  870. */
  871. 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=>xl(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}
  872. /**
  873. * @license
  874. * Copyright (c) 2024 Handsoncode. All rights reserved.
  875. */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 Lt(e)&&!Number.isFinite(St(e))?0:e}function Wl(e){return e instanceof lr?e:Lt(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=>Lt(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}};
  876. /**
  877. * @license
  878. * Copyright (c) 2024 Handsoncode. All rights reserved.
  879. */
  880. 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);Lt(r)?e*=St(r):e=0}r+=e}return r})}}zl.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:Qr.RANGE}],repeatLastArgs:1}};
  881. /**
  882. * @license
  883. * Copyright (c) 2024 Handsoncode. All rights reserved.
  884. */
  885. 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}]}};
  886. /**
  887. * @license
  888. * Copyright (c) 2024 Handsoncode. All rights reserved.
  889. */
  890. 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}]}};
  891. /**
  892. * @license
  893. * Copyright (c) 2024 Handsoncode. All rights reserved.
  894. */
  895. class $l extends Qo{constructor(e){super(e),this.dependencyGraph=e}find(e,t,n){return this.basicFind(e,t,"col",n)}}
  896. /**
  897. * @license
  898. * Copyright (c) 2024 Handsoncode. All rights reserved.
  899. */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}]}};
  900. /**
  901. * @license
  902. * Copyright (c) 2024 Handsoncode. All rights reserved.
  903. */
  904. 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&&(eu(n,"IM",999,1e3),eu(n,"ID",499,500)),t>=3&&(eu(n,"VM",995,1e3),eu(n,"VD",495,500)),t>=2&&(eu(n,"XM",990,1e3),eu(n,"XD",490,500)),t>=1&&(eu(n,"LM",950,1e3),eu(n,"LD",450,500)),eu(n,"CM",900,1e3),eu(n,"CD",400,500),eu(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,t>=2&&(eu(n,"IC",99,100),eu(n,"IL",49,50)),t>=1&&(eu(n,"VC",95,100),eu(n,"VL",45,50)),eu(n,"XC",90,100),eu(n,"XL",40,50),eu(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,eu(n,"IX",9,10),eu(n,"IV",4,5),eu(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc}function eu(e,t,n,r){e.val>=n&&e.val<r&&(e.val-=n,e.acc+=t)}
  905. /**
  906. * @license
  907. * Copyright (c) 2024 Handsoncode. All rights reserved.
  908. */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 tu 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)}}tu.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}]}};
  909. /**
  910. * @license
  911. bessel.js (C) 2013-present SheetJS -- http://sheetjs.com
  912. Apache License
  913. Version 2.0, January 2004
  914. http://www.apache.org/licenses/
  915. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
  916. 1. Definitions.
  917. "License" shall mean the terms and conditions for use, reproduction,
  918. and distribution as defined by Sections 1 through 9 of this document.
  919. "Licensor" shall mean the copyright owner or entity authorized by
  920. the copyright owner that is granting the License.
  921. "Legal Entity" shall mean the union of the acting entity and all
  922. other entities that control, are controlled by, or are under common
  923. control with that entity. For the purposes of this definition,
  924. "control" means (i) the power, direct or indirect, to cause the
  925. direction or management of such entity, whether by contract or
  926. otherwise, or (ii) ownership of fifty percent (50%) or more of the
  927. outstanding shares, or (iii) beneficial ownership of such entity.
  928. "You" (or "Your") shall mean an individual or Legal Entity
  929. exercising permissions granted by this License.
  930. "Source" form shall mean the preferred form for making modifications,
  931. including but not limited to software source code, documentation
  932. source, and configuration files.
  933. "Object" form shall mean any form resulting from mechanical
  934. transformation or translation of a Source form, including but
  935. not limited to compiled object code, generated documentation,
  936. and conversions to other media types.
  937. "Work" shall mean the work of authorship, whether in Source or
  938. Object form, made available under the License, as indicated by a
  939. copyright notice that is included in or attached to the work
  940. (an example is provided in the Appendix below).
  941. "Derivative Works" shall mean any work, whether in Source or Object
  942. form, that is based on (or derived from) the Work and for which the
  943. editorial revisions, annotations, elaborations, or other modifications
  944. represent, as a whole, an original work of authorship. For the purposes
  945. of this License, Derivative Works shall not include works that remain
  946. separable from, or merely link (or bind by name) to the interfaces of,
  947. the Work and Derivative Works thereof.
  948. "Contribution" shall mean any work of authorship, including
  949. the original version of the Work and any modifications or additions
  950. to that Work or Derivative Works thereof, that is intentionally
  951. submitted to Licensor for inclusion in the Work by the copyright owner
  952. or by an individual or Legal Entity authorized to submit on behalf of
  953. the copyright owner. For the purposes of this definition, "submitted"
  954. means any form of electronic, verbal, or written communication sent
  955. to the Licensor or its representatives, including but not limited to
  956. communication on electronic mailing lists, source code control systems,
  957. and issue tracking systems that are managed by, or on behalf of, the
  958. Licensor for the purpose of discussing and improving the Work, but
  959. excluding communication that is conspicuously marked or otherwise
  960. designated in writing by the copyright owner as "Not a Contribution."
  961. "Contributor" shall mean Licensor and any individual or Legal Entity
  962. on behalf of whom a Contribution has been received by Licensor and
  963. subsequently incorporated within the Work.
  964. 2. Grant of Copyright License. Subject to the terms and conditions of
  965. this License, each Contributor hereby grants to You a perpetual,
  966. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  967. copyright license to reproduce, prepare Derivative Works of,
  968. publicly display, publicly perform, sublicense, and distribute the
  969. Work and such Derivative Works in Source or Object form.
  970. 3. Grant of Patent License. Subject to the terms and conditions of
  971. this License, each Contributor hereby grants to You a perpetual,
  972. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
  973. (except as stated in this section) patent license to make, have made,
  974. use, offer to sell, sell, import, and otherwise transfer the Work,
  975. where such license applies only to those patent claims licensable
  976. by such Contributor that are necessarily infringed by their
  977. Contribution(s) alone or by combination of their Contribution(s)
  978. with the Work to which such Contribution(s) was submitted. If You
  979. institute patent litigation against any entity (including a
  980. cross-claim or counterclaim in a lawsuit) alleging that the Work
  981. or a Contribution incorporated within the Work constitutes direct
  982. or contributory patent infringement, then any patent licenses
  983. granted to You under this License for that Work shall terminate
  984. as of the date such litigation is filed.
  985. 4. Redistribution. You may reproduce and distribute copies of the
  986. Work or Derivative Works thereof in any medium, with or without
  987. modifications, and in Source or Object form, provided that You
  988. meet the following conditions:
  989. (a) You must give any other recipients of the Work or
  990. Derivative Works a copy of this License; and
  991. (b) You must cause any modified files to carry prominent notices
  992. stating that You changed the files; and
  993. (c) You must retain, in the Source form of any Derivative Works
  994. that You distribute, all copyright, patent, trademark, and
  995. attribution notices from the Source form of the Work,
  996. excluding those notices that do not pertain to any part of
  997. the Derivative Works; and
  998. (d) If the Work includes a "NOTICE" text file as part of its
  999. distribution, then any Derivative Works that You distribute must
  1000. include a readable copy of the attribution notices contained
  1001. within such NOTICE file, excluding those notices that do not
  1002. pertain to any part of the Derivative Works, in at least one
  1003. of the following places: within a NOTICE text file distributed
  1004. as part of the Derivative Works; within the Source form or
  1005. documentation, if provided along with the Derivative Works; or,
  1006. within a display generated by the Derivative Works, if and
  1007. wherever such third-party notices normally appear. The contents
  1008. of the NOTICE file are for informational purposes only and
  1009. do not modify the License. You may add Your own attribution
  1010. notices within Derivative Works that You distribute, alongside
  1011. or as an addendum to the NOTICE text from the Work, provided
  1012. that such additional attribution notices cannot be construed
  1013. as modifying the License.
  1014. You may add Your own copyright statement to Your modifications and
  1015. may provide additional or different license terms and conditions
  1016. for use, reproduction, or distribution of Your modifications, or
  1017. for any such Derivative Works as a whole, provided Your use,
  1018. reproduction, and distribution of the Work otherwise complies with
  1019. the conditions stated in this License.
  1020. 5. Submission of Contributions. Unless You explicitly state otherwise,
  1021. any Contribution intentionally submitted for inclusion in the Work
  1022. by You to the Licensor shall be under the terms and conditions of
  1023. this License, without any additional terms or conditions.
  1024. Notwithstanding the above, nothing herein shall supersede or modify
  1025. the terms of any separate license agreement you may have executed
  1026. with Licensor regarding such Contributions.
  1027. 6. Trademarks. This License does not grant permission to use the trade
  1028. names, trademarks, service marks, or product names of the Licensor,
  1029. except as required for reasonable and customary use in describing the
  1030. origin of the Work and reproducing the content of the NOTICE file.
  1031. 7. Disclaimer of Warranty. Unless required by applicable law or
  1032. agreed to in writing, Licensor provides the Work (and each
  1033. Contributor provides its Contributions) on an "AS IS" BASIS,
  1034. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  1035. implied, including, without limitation, any warranties or conditions
  1036. of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
  1037. PARTICULAR PURPOSE. You are solely responsible for determining the
  1038. appropriateness of using or redistributing the Work and assume any
  1039. risks associated with Your exercise of permissions under this License.
  1040. 8. Limitation of Liability. In no event and under no legal theory,
  1041. whether in tort (including negligence), contract, or otherwise,
  1042. unless required by applicable law (such as deliberate and grossly
  1043. negligent acts) or agreed to in writing, shall any Contributor be
  1044. liable to You for damages, including any direct, indirect, special,
  1045. incidental, or consequential damages of any character arising as a
  1046. result of this License or out of the use or inability to use the
  1047. Work (including but not limited to damages for loss of goodwill,
  1048. work stoppage, computer failure or malfunction, or any and all
  1049. other commercial damages or losses), even if such Contributor
  1050. has been advised of the possibility of such damages.
  1051. 9. Accepting Warranty or Additional Liability. While redistributing
  1052. the Work or Derivative Works thereof, You may choose to offer,
  1053. and charge a fee for, acceptance of support, warranty, indemnity,
  1054. or other liability obligations and/or rights consistent with this
  1055. License. However, in accepting such obligations, You may act only
  1056. on Your own behalf and on Your sole responsibility, not on behalf
  1057. of any other Contributor, and only if You agree to indemnify,
  1058. defend, and hold each Contributor harmless for any liability
  1059. incurred by, or claims asserted against, such Contributor by reason
  1060. of your accepting any such warranty or additional liability.
  1061. END OF TERMS AND CONDITIONS
  1062. APPENDIX: How to apply the Apache License to your work.
  1063. To apply the Apache License to your work, attach the following
  1064. boilerplate notice, with the fields enclosed by brackets "{}"
  1065. replaced with your own identifying information. (Don't include
  1066. the brackets!) The text should be enclosed in the appropriate
  1067. comment syntax for the file format. We also recommend that a
  1068. file or class name and description of purpose be included on the
  1069. same "printed page" as the copyright notice for easier
  1070. identification within third-party archives.
  1071. Copyright (C) 2013-present SheetJS LLC
  1072. Licensed under the Apache License, Version 2.0 (the "License");
  1073. you may not use this file except in compliance with the License.
  1074. You may obtain a copy of the License at
  1075. http://www.apache.org/licenses/LICENSE-2.0
  1076. Unless required by applicable law or agreed to in writing, software
  1077. distributed under the License is distributed on an "AS IS" BASIS,
  1078. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  1079. See the License for the specific language governing permissions and
  1080. limitations under the License.
  1081. */
  1082. var nu=Math;function ru(e,t){for(var n=0,r=0;n<e.length;++n)r=t*r+e[n];return r}function iu(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 su(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 iu(n,s,o,a,i)}}var ou=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,u=s*s;if(s<8)a=ru(t,u),l=ru(n,u),o=a/l;else{var h=s-.785398164;u=64/u,a=ru(r,u),l=ru(i,u),o=nu.sqrt(e/s)*(nu.cos(h)*a-nu.sin(h)*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(),u=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function h(t){var n=0,r=0,i=0,s=t*t,h=nu.abs(t)-2.356194491;return Math.abs(t)<8?(r=t*ru(o,s),i=ru(a,s),n=r/i):(s=64/s,r=ru(l,s),i=ru(u,s),n=nu.sqrt(e/nu.abs(t))*(nu.cos(h)*r-nu.sin(h)*i*8/nu.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 h(t);if(0===t)return 0;var r=0;if(t>n)r=iu(t,n,s(t),h(t),-1);else{for(var i=2*nu.floor((n+nu.floor(nu.sqrt(40*n)))/2),o=!1,a=0,l=0,u=1,c=0,d=2/t,m=i;m>0;m--)c=m*d*u-a,a=u,u=c,nu.abs(u)>1e10&&(u*=1e-10,a*=1e-10,r*=1e-10,l*=1e-10),o&&(l+=u),o=!o,m==n&&(r=a);l=2*l-u,r/=l}return r}}(),au=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,u=s*s,h=s-.785398164;return s<8?(a=ru(t,u),l=ru(n,u),o=a/l+e*ou(s,0)*nu.log(s)):(u=64/u,a=ru(r,u),l=ru(i,u),o=nu.sqrt(e/s)*(nu.sin(h)*a+nu.cos(h)*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(),u=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function h(t){var n=0,r=0,i=0,s=t*t,h=t-2.356194491;return t<8?(r=t*ru(o,s),i=ru(a,s),n=r/i+e*(ou(t,1)*nu.log(t)-1/t)):(s=64/s,r=ru(l,s),i=ru(u,s),n=nu.sqrt(e/t)*(nu.sin(h)*r+nu.cos(h)*i*8/t)),n}return su(s,h,"BESSELY",1,-1)}(),lu=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?ru(e,n*n/14.0625):nu.exp(nu.abs(n))/nu.sqrt(nu.abs(n))*ru(t,3.75/nu.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*ru(r,e*e/14.0625):(e<0?-1:1)*nu.exp(nu.abs(e))/nu.sqrt(nu.abs(e))*ru(i,3.75/nu.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===nu.abs(t))return 0;if(t==1/0)return 1/0;var i,o=0,a=2/nu.abs(t),l=0,u=1,h=0,c=2*nu.round((r+nu.round(nu.sqrt(40*r)))/2);for(i=c;i>0;i--)h=i*a*u+l,l=u,u=h,nu.abs(u)>1e10&&(u*=1e-10,l*=1e-10,o*=1e-10),i==r&&(o=l);return o*=e(t,0)/u,t<0&&r%2?-o:o}}(),uu=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?-nu.log(n/2)*lu(n,0)+ru(e,n*n/4):nu.exp(-n)/nu.sqrt(n)*ru(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?nu.log(e/2)*lu(e,1)+1/e*ru(r,e*e/4):nu.exp(-e)/nu.sqrt(e)*ru(i,2/e)}return su(n,s,"BESSELK",2,1)}();
  1083. /**
  1084. * @license
  1085. Copyright (c) 2013 jStat
  1086. Permission is hereby granted, free of charge, to any person obtaining a copy
  1087. of this software and associated documentation files (the "Software"), to deal
  1088. in the Software without restriction, including without limitation the rights
  1089. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  1090. copies of the Software, and to permit persons to whom the Software is
  1091. furnished to do so, subject to the following conditions:
  1092. The above copyright notice and this permission notice shall be included in
  1093. all copies or substantial portions of the Software.
  1094. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  1095. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  1096. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  1097. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  1098. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  1099. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  1100. THE SOFTWARE.
  1101. */
  1102. function hu(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,u=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-u+t[o],u=i;return s=n*Math.exp(-e*e+.5*(t[0]+r*l)-u),a?s-1:1-s}function cu(e){return 1-hu(e)}function du(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=cu(t)-i,t+=n/(1.1283791670955126*Math.exp(-t*t)-t*n);return e<1?t:-t}const mu={pdf:(e,t)=>e<0?0:t*Math.exp(-t*e),cdf:(e,t)=>e<0?0:1-Math.exp(-t*e)};function fu(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,u=0,h=0,c=e;if(e>171.6243769536076)return 1/0;if(c<=0){if(o=c%1,!o)return 1/0;a=(1&c?-1:1)*Math.PI/Math.sin(Math.PI*o),c=1-c}for(s=c,i=c<1?c++:(c-=l=(0|c)-1)-1,r=0;r<8;++r)h=(h+t[r])*i,u=u*i+n[r];if(o=h/u+1,s<c)o/=s;else if(s>c)for(r=0;r<l;++r)o*=c,c++;return a&&(o=a/o),o}const pu={pdf:function(e,t,n){return e<0?0:0===e&&1===t?1/n:Math.exp((t-1)*Math.log(e)-e/n-gu(t)-t*Math.log(n))},cdf:function(e,t,n){return e<0?0:yu(t,e/n)},inv:function(e,t,n){return wu(e,t)*n}};function gu(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 yu(e,t){const n=gu(e);let r=e,i=1/e,s=i,o=t+1-e,a=1/1e-30,l=1/o,u=l,h=1;const c=-~(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(;h<=c;h++)i+=s*=t/++r;return i*Math.exp(-t+e*Math.log(t)-n)}for(;h<=c;h++)d=-h*(h-e),o+=2,l=d*l+o,a=o+d/a,l=1/l,u*=l*a;return 1-u*Math.exp(-t+e*Math.log(t)-n)}function wu(e,t){let n=0;const r=t-1,i=1e-8,s=gu(t);let o,a,l,u,h,c,d;if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(c=Math.log(r),d=Math.exp(r*(c-1)-s),h=e<.5?e:1-e,l=Math.sqrt(-2*Math.log(h)),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=yu(t,o)-e,l=t>1?d*Math.exp(-(o-r)+r*(Math.log(o)-c)):Math.exp(-o+r*Math.log(o)-s),u=a/l,o-=l=u/(1-.5*Math.min(1,u*((t-1)/o-1))),o<=0&&(o=.5*(o+l)),Math.abs(l)<i*o)break}return o}const bu={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+hu((e-t)/Math.sqrt(2*n*n)))},inv:function(e,t,n){return-1.4142135623730951*n*du(2*e)+t}},_u={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)/vu(t,n):Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-Su(t,n))},cdf:function(e,t,n){return e>1||e<0?+(e>1):Cu(e,t,n)},inv:function(e,t,n){return Eu(e,t,n)}};function vu(e,t){if(!(e<=0||t<=0))return e+t>170?Math.exp(Su(e,t)):fu(e)*fu(t)/fu(e+t)}function Su(e,t){return gu(e)+gu(t)-gu(e+t)}function Eu(e,t,n){var r,i,s,o,a,l,u,h,c,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)),u=(2.30753+.27061*o)/(1+o*(.99229+.04481*o))-o,e<.5&&(u=-u),h=(u*u-3)/6,c=2/(1/(2*t-1)+1/(2*n-1)),d=u*Math.sqrt(h+c)/c-(1/(2*n-1)-1/(2*t-1))*(h+5/6-2/(3*c)),u=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,u=e<o/d?Math.pow(t*d*e,1/t):1-Math.pow(n*d*(1-e),1/n)),m=-gu(t)-gu(n)+gu(t+n);y<10;y++){if(0===u||1===u)return u;if(l=Cu(u,t,n)-e,o=Math.exp(p*Math.log(u)+g*Math.log(1-u)+m),a=l/o,u-=o=a/(1-.5*Math.min(1,a*(p/u-g/(1-u)))),u<=0&&(u=.5*(u+o)),u>=1&&(u=.5*(u+o+1)),Math.abs(o)<f*u&&y>0)break}return u}function Cu(e,t,n){var r=0===e||1===e?0:Math.exp(gu(t+n)-gu(t)-gu(n)+t*Math.log(e)+n*Math.log(1-e));return!(e<0||e>1)&&(e<(t+1)/(t+n+2)?r*Mu(e,t,n)/t:1-r*Mu(1-e,n,t)/n)}function Mu(e,t,n){var r,i,s,o,a=1e-30,l=1,u=t+n,h=t+1,c=t-1,d=1,m=1-u*e/h;for(Math.abs(m)<a&&(m=a),m=1/m,o=m;l<=100;l++)if(r=2*l,i=l*(n-l)*e/((c+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)*(u+l)*e/((t+r)*(h+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 Tu={pdf:function(e,t,n){return 0===n||1===n?t*n===e?1:0:Ou(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,u=Math.exp(gu(l)-gu(a)-gu(o)+o*Math.log(s)+a*Math.log(1-s));return r=s<(o+1)/(l+2)?u*Ru(s,o,a,i):1-u*Ru(1-s,a,o,i),Math.round(1/i*(1-r))/(1/i)}};function Ru(e,t,n,r){var i,s=0,o=1,a=1,l=1,u=0,h=0;while(Math.abs((a-h)/a)>r)h=a,i=-(t+u)*(t+n+u)*e/(t+2*u)/(t+2*u+1),s=a+i*s,o=l+i*o,u+=1,i=u*(n-u)*e/(t+2*u-1)/(t+2*u),a=s+i*a,l=o+i*l,s/=l,o/=l,a/=l,l=1;return a/t}function Ou(e,t){return e>170||t>170?Math.exp(Nu(e,t)):Au(e)/Au(t)/Au(e-t)}function Nu(e,t){return Lu(e)-Lu(t)-Lu(e-t)}function Lu(e){return e<0?NaN:gu(e+1)}function Au(e){return e<0?NaN:fu(e+1)}const Iu={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)-gu(t/2))},cdf:function(e,t){return e<0?0:yu(t/2,e/2)},inv:function(e,t){return 2*wu(e,.5*t)}},ku={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/vu(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*Tu.pdf((t-2)/2,(t+n-2)/2,r))},cdf:function(e,t,n){return e<0?0:Cu(t*e/(t*e+n),t/2,n/2)},inv:function(e,t,n){return n/(t*(1/Eu(e,t/2,n/2)-1))}},xu={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))}},Du={pdf:function(e,t){return t<0||e%1!==0||e<0?0:Math.pow(t,e)*Math.exp(-t)/Au(e)},cdf:function(e,t){var n=0;if(e<0)return 0;for(var r=0;n<=e;n++)r+=Du.pdf(n,t);return r}},Hu={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?Hu.pdf(t-n-r+e,t,t-n,t-r):Hu.pdf(r-e,t,t-n,r);if(2*r>t)return Hu.pdf(n-e,t,n,t-r);if(n<r)return Hu.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-Hu.cdf(i-t-1,n,n-r,i);if(2*i>n)return 1-Hu.cdf(r-t-1,n,r,n-i);if(r<i)return Hu.cdf(t,n,i,r);for(var s=1,o=1,a=0,l=0;l<t;l++){while(s>1&&a<i){var u=1-r/(n-a);o*=u,s*=u,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))}},Pu={pdf:function(e,t){return t=t>1e100?1e100:t,1/(Math.sqrt(t)*vu(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)},cdf:function(e,t){var n=t/2;return Cu((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),n,n)},inv:function(e,t){var n=Eu(2*Math.min(e,1-e),.5*t,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}},ju={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*hu((Math.log(e)-t)/Math.sqrt(2*n*n))},inv:function(e,t,n){return Math.exp(-1.4142135623730951*n*du(2*e)+t)}},Fu={pdf:function(e,t,n){return e===e>>>0&&(e<0?0:Ou(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+=Fu.pdf(i,t,n);return r}};function Yu(e){var t=0,n=e.length;while(--n>=0)t+=e[n];return t}function Uu(e){return Yu(e)/e.length}function Vu(e){var t,n=Uu(e),r=0,i=e.length;while(--i>=0)t=e[i]-n,r+=t*t;return r}function Bu(e,t){return Vu(e)/(e.length-(t?1:0))}function Wu(e,t){return Math.sqrt(Bu(e,t))}function Gu(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(bu.inv(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(bu.inv(t[1]/2,0,1)*Wu(t[2])/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function zu(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(Pu.inv(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(Pu.inv(t[1]/2,t[2].length-1)*Wu(t[2],!0)/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function Ku(e){var t=1,n=e.length;while(--n>=0)t*=e[n];return t}function Xu(e){return Math.pow(Ku(e),1/e.length)}function $u(e,t){var n,r=Uu(e),i=Uu(t),s=e.length,o=new Array(s);for(n=0;n<s;n++)o[n]=(e[n]-r)*(t[n]-i);return Yu(o)/(s-1)}function qu(e,t){return $u(e,t)/Wu(e,1)/Wu(t,1)}
  1103. /**
  1104. * @license
  1105. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1106. */class Ju extends Zr{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?hu(e):hu(t)-hu(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),cu)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,n)=>n?mu.cdf(e,t):mu.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"),fu)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),(e,t,n,r)=>r?pu.cdf(e,t,n):pu.pdf(e,t,n))}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),gu)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),pu.inv)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>bu.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?_u.cdf(e,t,n):_u.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):_u.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?Tu.cdf(e,t,n):Tu.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);Tu.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)=>lu(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>ou(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>uu(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>au(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?Iu.cdf(e,t):Iu.pdf(e,t)))}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-Iu.cdf(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>Iu.inv(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>Iu.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?ku.cdf(e,t,n):ku.pdf(e,t,n)))}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,n)=>1-ku.cdf(e,Math.trunc(t),Math.trunc(n)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,n)=>ku.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)=>ku.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?xu.cdf(e,n,t):xu.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?Du.cdf(e,t):Du.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?Hu.cdf(e,r,n,t):Hu.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?Pu.cdf(e,t):Pu.pdf(e,t)))}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>2*(1-Pu.cdf(e,Math.trunc(t))))}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-Pu.cdf(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,n)=>n*(1-Pu.cdf(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>Pu.inv(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>Pu.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?ju.cdf(e,t,n):ju.pdf(e,t,n))}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,n)=>ju.inv(e,t,n))}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,n,r)=>r?bu.cdf(e,t,n):bu.pdf(e,t,n))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,n)=>bu.inv(e,t,n))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?bu.cdf(e,0,1):bu.pdf(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>bu.inv(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>bu.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?Fu.cdf(e,t,n):Fu.pdf(e,t,n)))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),(e,t,n)=>Gu(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):zu(1,e,t,n)[1]-1))}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),(e,t,n)=>(e-t)/n)}}Ju.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}]}},Ju.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"};
  1107. /**
  1108. * @license
  1109. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1110. */
  1111. class Qu 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),Zu(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:Zu(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=eh(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=th(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 Zu(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 eh(e,t){e<t&&([e,t]=[t,e]);while(t>0)[e,t]=[t,e%t];return e}function th(e,t){return 0===e||0===t?0:e*(t/eh(e,t))}
  1112. /**
  1113. * @license
  1114. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1115. */Qu.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 nh 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):Ar([e,t],n))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),dh)}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])=>Ar([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>Ar(ah(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>Ar(lh(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>Ar(oh(ah(e),uh(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>Ar(oh([1,0],uh(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>Ar(oh([1,0],hh(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>Ar(oh([1,0],ah(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>Ar(oh([1,0],lh(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>Ar(uh(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>Ar(hh(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>Ar(oh(uh(e),ah(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>Ar(oh(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=sh(n,r);return Ar(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=rh(n,r);return Ar(n)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>Ar(ih(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>Ar(ch(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>Ar(mh(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{const[t,n]=mh(e),r=Math.log(10);return Ar([t/r,n/r])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{const[t,n]=mh(e),r=Math.log(2);return Ar([t/r,n/r])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>Ar(fh(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>Ar(fh(e,.5)))}}function rh([e,t],[n,r]){return[e+n,t+r]}function ih([e,t],[n,r]){return[e-n,t-r]}function sh([e,t],[n,r]){return[e*n-t*r,e*r+n*t]}function oh([e,t],[n,r]){const i=Math.pow(n,2)+Math.pow(r,2),[s,o]=sh([e,t],[n,-r]);return[s/i,o/i]}function ah([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function lh([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function uh([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function hh([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function ch([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function dh([e,t]){return Math.sqrt(e*e+t*t)}function mh([e,t]){return[Math.log(dh([e,t])),Math.atan2(t,e)]}function fh(e,t){const[n,r]=mh(e);return ch([t*n,t*r])}
  1116. /**
  1117. * @license
  1118. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1119. */nh.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 ph 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=Uu(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:Vu(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 Xu(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=gh(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):qu(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=gh(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(qu(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=gh(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:$u(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=gh(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):$u(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=Wu(r,!0)}return i<1?new lr(Vn.NA,Re.OneValue):0===n?new lr(Vn.DIV_BY_ZERO):1-bu.cdf((Uu(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=Bu(n,!0),s=Bu(r,!0);if(0===i||0===s)return new lr(Vn.DIV_BY_ZERO);const o=i/s,a=ku.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=gh(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((Vu(n[0])-Math.pow($u(n[0],n[1])*(r-1),2)/Vu(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=gh(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):$u(n[0],n[1])*(r-1)/Vu(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=gh(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-Iu.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=Wu(e,!0);if(0===t)return new lr(Vn.DIV_BY_ZERO);const r=Math.abs(Math.sqrt(o)*Uu(e)/t);return n*(1-Pu.cdf(r,o-1))}if(2===r){if(o<=1||a<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=(Vu(i)+Vu(s))/(o+a-2);if(0===e)return new lr(Vn.DIV_BY_ZERO);const t=Math.abs((Uu(i)-Uu(s))/Math.sqrt(e*(1/o+1/a)));return n*(1-Pu.cdf(t,o+a-2))}{if(o<=1||a<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=Bu(i,!0),t=Bu(s,!0);if(0===e&&0===t)return new lr(Vn.DIV_BY_ZERO);const r=Math.abs((Uu(i)-Uu(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-Pu.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=Uu(t),i=Wu(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=Uu(t),i=Wu(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 gh(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;Lt(e)&&Lt(t)&&(o.push(St(e)),a.push(St(t)))}return[o,a]}
  1120. /**
  1121. * @license
  1122. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1123. */
  1124. /**
  1125. * @license
  1126. * Copyright (c) 2024 Handsoncode. All rights reserved.
  1127. */ph.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}},ph.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 yh extends ca{}yh.HyperFormula=ca,yh.ErrorType=Vn,yh.CellError=lr,yh.CellType=Bn,yh.CellValueType=nr,yh.CellValueDetailedType=rr,yh.DetailedCellError=ii,yh.ExportedCellChange=Ro,yh.ExportedNamedExpressionChange=Oo,yh.ConfigValueTooBigError=ln,yh.ConfigValueTooSmallError=an,yh.EvaluationSuspendedError=hn,yh.ExpectedOneOfValuesError=un,yh.ExpectedValueOfTypeError=sn,yh.ArraySize=ei,yh.SimpleRangeValue=Ht,yh.EmptyValue=vt,yh.FunctionPlugin=Zr,yh.FunctionArgumentType=Qr,yh.FunctionPluginValidationError=pn,yh.InvalidAddressError=Kt,yh.InvalidArgumentsError=Xt,yh.LanguageNotRegisteredError=mn,yh.LanguageAlreadyRegisteredError=fn,yh.MissingTranslationError=cn,yh.NamedExpressionDoesNotExistError=Qt,yh.NamedExpressionNameIsAlreadyTakenError=qt,yh.NamedExpressionNameIsInvalidError=Jt,yh.NoOperationToRedoError=en,yh.NoOperationToUndoError=Zt,yh.NoRelativeAddressesAllowedError=bn,yh.NoSheetWithIdError=Vt,yh.NoSheetWithNameError=Bt,yh.NotAFormulaError=zt,yh.NothingToPasteError=tn,yh.ProtectedFunctionTranslationError=dn,yh.SheetNameAlreadyTakenError=Wt,yh.SheetSizeLimitExceededError=Gt,yh.SourceLocationHasArrayError=yn,yh.TargetLocationHasArrayError=wn,yh.UnableToParseError=rn;const wh=ma.defaultConfig.language;ca.registerLanguage(wh,wa),ca.languages[wa.langCode]=wa;for(const bh of Object.getOwnPropertyNames(s))bh.startsWith("_")||ca.registerFunctionPlugin(s[bh])},cef7:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("14d9");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),[])}}},cf1e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1128. //! moment.js locale configuration
  1129. 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}))},cf51:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1130. //! moment.js locale configuration
  1131. 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";
  1132. //! moment.js locale configuration
  1133. 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}))},d26a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1134. //! moment.js locale configuration
  1135. 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";
  1136. //! moment.js locale configuration
  1137. 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}))},d3c5:function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));n("d9e2"),n("14d9");var r=n("351d"),i=n("81ea"),s=n("24b5"),o=n("76ab"),a=n("491c"),l=n("3d76"),u=n("169f"),h=n("87d6");function c(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))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",u["c"]]]),_="base",v=[];let S=null;var E=new WeakMap,C=new WeakSet;class M{static get PLUGIN_KEY(){return _}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){c(this,C),f(this,"eventManager",new h["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,n){y(E,this)[e]=y(E,this)[e]||[];const r=y(E,this)[e];this.hot.addHook(e,t,n),r.push(t),y(E,this)[e]=r}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,T).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 T(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}},d69a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1138. //! moment.js locale configuration
  1139. 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";
  1140. //! moment.js locale configuration
  1141. 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}))},d716:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1142. //! moment.js locale configuration
  1143. 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("d9e2"),n("14d9");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))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 u(e,t){return e.get(c(e,t))}function h(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")}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(),h(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),u=Math.max(r.row,o.row),h=Math.max(r.col,o.col),c=this._createCellCoords(a,l),d=this._createCellCoords(u,h);return this.from=c,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 u(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 u(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 u(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 u(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 u(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 u(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 u(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 u(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(u(d,this)?"left":"right"),t.bottom===n.bottom&&r.push("bottom"),t.left===n.left&&r.push(u(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,u(d,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new r["a"](e,t,u(d,this))}}t["a"]=m},d9f8:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1144. //! moment.js locale configuration
  1145. 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}))},dad2:function(e,t,n){"use strict";var r=n("d066"),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}};e.exports=function(e){var t=r("Set");try{(new t)[e](i(0));try{return(new t)[e](i(-1)),!1}catch(n){return!0}}catch(s){return!1}}},db29:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1146. //! moment.js locale configuration
  1147. 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}))},dc19:function(e,t,n){"use strict";var r=n("cb27").has;e.exports=function(e){return r(e),e}},dc4d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1148. //! moment.js locale configuration
  1149. 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("a357"),i=n("5d7f"),s=n("7b9c");const o="text";function a(e,t,n,o,a,l,u){r["a"].apply(this,[e,t,n,o,a,l,u]);let h=l;if(!h&&u.placeholder&&(h=u.placeholder),h=Object(s["stringify"])(h),u.trimWhitespace&&(h=h.trim()),u.rendererTemplate){Object(i["empty"])(t);const r=e.rootDocument.createElement("TEMPLATE");r.setAttribute("bind","{{}}"),r.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(r),r.model=e.getSourceDataAtRow(n),t.appendChild(r)}else Object(i["fastInnerText"])(t,h)}a.RENDERER_TYPE=o},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){return e instanceof TouchEvent}function l(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,"isTouchEvent",(function(){return a})),n.d(t,"offsetRelativeTo",(function(){return l}))},e0c5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1150. //! moment.js locale configuration
  1151. 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}))},e1d3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1152. //! moment.js locale configuration
  1153. 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}))},e20c:function(e,t,n){"use strict";var r=n("23e7"),i=n("da84"),s=n("2cf4").clear;r({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==s},{clearImmediate:s})},e437:function(e,t,n){"use strict";var r=n("c0d8"),i=n("8c7e"),s=n("87d6"),o=n("c5cd");n("d9e2");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,u,h,c,d,m=n("220a"),f=n("a776"),p=n("81ea"),g=n("63d8"),y=n("480c"),w=n("3eb5"),b=n("7dd0"),_=n("97b9"),v=n("7b9c"),S=n("ffec"),E=n("351d"),C=n("29b0"),M=n("f938"),T=n("5d7f"),R=n("de3b"),O=n("491c"),N=n("3d76"),L=n("169f"),A=n("76ab"),I=n("24b5"),k=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 x=[p,g,y,w,b,_,v,S,E,C,M,f],D=[T,R];r["a"].helper={},r["a"].dom={},p["arrayEach"](x,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(A["b"])(),e=>{r["a"].cellTypes[e]=Object(A["a"])(e)}),r["a"].cellTypes.registerCellType=A["d"],r["a"].cellTypes.getCellType=A["a"],r["a"].editors=null!==(u=r["a"].editors)&&void 0!==u?u:{},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!==(h=r["a"].renderers)&&void 0!==h?h:{},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!==(c=r["a"].validators)&&void 0!==c?c:{},p["arrayEach"](Object(L["a"])(),e=>{r["a"].validators[C["toUpperCaseFirst"](e)+"Validator"]=Object(L["b"])(e)}),r["a"].validators.registerValidator=L["d"],r["a"].validators.getValidator=L["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"](k["a"].PLUGIN_KEY)+"Plugin"]=k["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";
  1154. //! moment.js locale configuration
  1155. 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))}},e9bc:function(e,t,n){"use strict";var r=n("dc19"),i=n("cb27").add,s=n("83b9e"),o=n("7f65"),a=n("5388");e.exports=function(e){var t=r(this),n=o(e).getIterator(),l=s(t);return a(n,(function(e){i(l,e)})),l}},eb36:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));n("d9e2"),n("14d9");var r=n("5714");function i(e,t,n){return(t=s(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)}const a=23;class l extends r["a"]{constructor(e){let{calculationTypes:t,viewportHeight:n,scrollOffset:r,totalRows:s,rowHeightFn:o,overrideFn:a,horizontalScrollbarHeight:l}=e;super(t),i(this,"viewportHeight",0),i(this,"scrollOffset",0),i(this,"zeroBasedScrollOffset",0),i(this,"totalRows",0),i(this,"rowHeightFn",null),i(this,"rowHeight",0),i(this,"overrideFn",null),i(this,"horizontalScrollbarHeight",0),i(this,"innerViewportHeight",0),i(this,"totalCalculatedHeight",0),i(this,"startPositions",[]),i(this,"needReverse",!0),this.viewportHeight=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalRows=s,this.rowHeightFn=o,this.overrideFn=a,this.horizontalScrollbarHeight=null!==l&&void 0!==l?l:0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalRows;e++)if(this.rowHeight=this.getRowHeight(e),this._process(e,this),this.startPositions.push(this.totalCalculatedHeight),this.totalCalculatedHeight+=this.rowHeight,this.totalCalculatedHeight>=this.innerViewportHeight){this.needReverse=!1;break}this._finalize(this)}getRowHeight(e){const t=this.rowHeightFn(e);return isNaN(t)?a:t}}},ebe4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1156. //! moment.js locale configuration
  1157. 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";
  1158. //! moment.js locale configuration
  1159. 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";
  1160. //! moment.js locale configuration
  1161. 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";
  1162. //! moment.js locale configuration
  1163. 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("0352"),i=n("dd49");const s="text",o={CELL_TYPE:s,editor:r["a"],renderer:i["a"]}},f260:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1164. //! moment.js locale configuration
  1165. 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}))},f3ff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1166. //! moment.js locale configuration
  1167. 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}))},f6b46:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1168. //! moment.js locale configuration
  1169. 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}))},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 u})),n.d(t,"isCtrlMetaKey",(function(){return h})),n.d(t,"isKey",(function(){return c}));n("14d9");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 u(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 h(e){return[s.CONTROL,s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX].includes(e)}function c(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 Me})),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 u(){o={}}var h=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)}}(),c="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===c)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(c);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),u=a;u<=l;u++)t[u]=u}}}));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 h(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",M="boolean"===typeof new RegExp("(?:)").sticky;function T(e,t){t=Object(i["k"])(t,{useSticky:M,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,u,h,c,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}})),u=Object(i["I"])(n,(function(e){return e.PUSH_MODE})),h=Object(i["I"])(n,(function(e){return Object(i["w"])(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=Z(t.lineTerminatorCharacters);c=Object(i["I"])(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(c=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:c[t],isCustom:f[t],short:p[t],group:a[t],push:u[t],pop:h[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=L(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(k(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 L(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 A=/[^\\][\$]/;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 A.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 k(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 x=/[^\\[][\^]|^\^/;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 x.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 ue(e){var t=he(e);ce(t),me(t),de(t),Object(i["u"])(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function he(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 ce(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))&&(ue(e),n.TRACE_INIT("analyzeTokenTypes",(function(){s=T(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(M?(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(){u()})),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,u,h,c,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=[],M=this.trackStartLines?1:void 0,T=this.trackStartLines?1:void 0,R=K(this.emptyGroups),O=this.trackStartLines,N=this.config.lineTerminatorsPattern,L=0,A=[],I=[],k=[],x=[];Object.freeze(x);var D=void 0;function H(){return A}function P(e){var t=ne(e),n=I[t];return void 0===n?x:n}var j,F=function(e){if(1===k.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{k.pop();var n=Object(i["H"])(k);A=y.patternIdxToConfig[n],I=y.charCodeToPatternIdxToConfig[n],L=A.length;var r=y.canModeBeOptimized[n]&&!1===y.config.safeMode;D=I&&r?P:H}};function Y(e){k.push(e),I=this.charCodeToPatternIdxToConfig[e],A=this.patternIdxToConfig[e],L=A.length,L=A.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=A[o],X=z.pattern;u=null,!0===z.isCustom?(g=X.exec(w,_,E,R),null!==g?(s=g[0],void 0!==g.payload&&(u=g.payload)):s=null):(this.updateLastIndex(X,_),s=this.match(X,e,_)),s&&s.length>a.length&&(a=s,l=u,j=z)}break}}if(null!==a){if(h=a.length,c=j.group,void 0!==c&&(d=j.tokenTypeIdx,m=this.createTokenInstance(a,_,d,j.tokenType,M,T,h),this.handlePayload(m,l),!1===c?v=this.addToken(E,v,m):R[c].push(m)),e=this.chopInput(e,h),_+=h,T=this.computeNewColumn(T,h),!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!==$&&(M+=$,T=h-J,this.updateTokenEndLineColumnLocation(m,c,J,$,M,T,h))}this.handleModes(j,F,Y,m)}else{var Q=_,Z=M,ee=T,te=!1;while(!te&&_<b)for(w.charCodeAt(_),e=this.chopInput(e,1),_++,r=0;r<L;r++){var re=A[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 Te(e)?e.LABEL:e.name}function Me(e){return e.name}function Te(e){return Object(i["E"])(e.LABEL)&&""!==e.LABEL}var Re="parent",Oe="categories",Ne="label",Le="group",Ae="push_mode",Ie="pop_mode",ke="longer_alt",xe="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]),ue([n]),Object(i["w"])(e,Ne)&&(n.LABEL=e[Ne]),Object(i["w"])(e,Le)&&(n.GROUP=e[Le]),Object(i["w"])(e,Ie)&&(n.POP_MODE=e[Ie]),Object(i["w"])(e,Ae)&&(n.PUSH_MODE=e[Ae]),Object(i["w"])(e,ke)&&(n.LONGER_ALT=e[ke]),Object(i["w"])(e,xe)&&(n.LINE_BREAKS=e[xe]),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)}ue([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 ut=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),ht=new ut;function ct(e){ht.reset(),e.accept(ht);var t=ht.dslMethods;return ht.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,Mt=2<<St,Tt=3<<St,Rt=4<<St,Ot=5<<St,Nt=6<<St;function Lt(e,t,n){return n|t|e}var At=32-Et;function It(e,t,n,r){var i=r+1<<At;return Lt(e,t,n)|i}var kt=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 xt(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 kt(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=Lt(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,Mt)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,$e,Tt)},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 u=l.definition.concat([new $e({definition:l.definition})]);return a(u)}if(l instanceof Xe){u=[new Ge({definition:l.definition}),new $e({definition:[new Qe({terminalType:l.separator})].concat(l.definition)})];return a(u)}if(l instanceof qe){u=l.definition.concat([new $e({definition:[new Qe({terminalType:l.separator})].concat(l.definition)})]);r=a(u)}else if(l instanceof $e){u=l.definition.concat([new $e({definition:l.definition})]);r=a(u)}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,u=t.length,h=u-r-1,c=[],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<u-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!==u-1)throw Error("non exhaustive match");c.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 M={idx:p,def:w.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y};d.push(M)}else if(w instanceof Ke){var T=new $e({definition:w.definition,idx:w.idx}),R=w.definition.concat([T],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});T=new $e({definition:[O].concat(w.definition),idx:w.idx}),R=w.definition.concat([T],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)),M={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(M)}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)),M={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(M)}else if(w instanceof Je)for(var L=w.definition.length-1;L>=0;L--){var A=w.definition[L],I={idx:p,def:A.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<=h&&d.pop()}return c}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=cn(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,u=r[o];if(void 0===u||!1!==u.call(this))e:for(var h=0;h<l;h++){for(var c=a[h],d=c.length,m=0;m<d;m++){var f=this.LA(m+1);if(!1===n(f,c[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,u=0;u<l;u++){var h=this.LA(u+1);if(!1===n(h,a[u]))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 u=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===u[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 un(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 hn(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 u=function(e){for(var n=l[e],u=0;u<n.length;u++){var h=n[u].partialPath,c=n[u].suffixDef,d=ln(h),m=un(s,d,e);if(m||Object(i["A"])(c)||h.length===t){var f=r[e];if(!1===mn(f,h)){f.push(h);for(var p=0;p<d.length;p++){var g=d[p];s[e][g]=!0}}}else{var y=Xt(c,a+1,h);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}))}))}}},h=0;h<l.length;h++)u(h)}return r}function cn(e,t,n,r){var i=new on(e,Jt.ALTERNATION,r);return t.accept(i),hn(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}),u=new Ge({definition:a});return hn([l,u],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 Ln(e,e,s)})),u=[],h=[],c=[];Object(i["o"])(l,i["A"])&&(u=Object(i["I"])(e,(function(e){return kn(e,s)})),h=Object(i["I"])(e,(function(e){return xn(e,t,r,s)})),c=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 Mn(e,s)})),w=Object(i["I"])(e,(function(t){return On(t,e,o,s)}));return i["t"](a.concat(m,f,p,c,l,u,h,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 Tn(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 Mn(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 Tn(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 Ln(e,t,n,r){void 0===r&&(r=[]);var s=[],o=An(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 u=i["l"](o,r.concat([e])),h=i["I"](u,(function(t){var s=i["g"](r);return s.push(t),Ln(e,t,n,s)}));return s.concat(i["t"](h))}function An(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(An(n.definition));else if(n instanceof Je)t=i["t"](i["I"](n.definition,(function(e){return An(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(An(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 kn(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 xn(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=cn(s,e,o,i),l=jn(a,i,e,r),u=Fn(a,i,e,r);return n.concat(l,u)}),[]);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,u=dn(l,e,o,a),h=u[0];if(Object(i["A"])(Object(i["t"])(h))){var c=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});r.push({message:c,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,u=e.path,h=Object(i["r"])(o,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<l&&fn(e.path,u)})),c=Object(i["I"])(h,(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(c)}})),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,Te(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)}),[]),u=Object(i["I"])(l,(function(e){return"["+Object(i["I"])(e,(function(e){return Ce(e)})).join(", ")+"]"})),h=Object(i["I"])(u,(function(e,t){return" "+(t+1)+". "+e})),c="one of these possible Token sequences:\n"+h.join("\n");return s+c+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(",")+"]"})),u="expecting at least one iteration which starts with one of these possible Token sequences::\n <"+l.join(" ,")+">";return s+u+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),u=o>0,h="->"+a+(u?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 h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,"\n"),h},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 ut;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 ur(e){this.name=lr,this.message=e}ur.prototype=Error.prototype;var hr=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=cr)},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=[],u=!1,h=this.LA(1),c=this.LA(1),d=function(){var e=s.LA(0),t=s.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:h,previous:e,ruleName:s.getCurrRuleFullName()}),n=new rr(t,h,s.LA(0));n.resyncedTokens=Object(i["n"])(l),s.SAVE_ERROR(n)};while(!u){if(this.tokenMatcher(c,r))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(c,o)?u=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,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 ur("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 cr(e,t,n,r,i,s,o){var a=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[a];if(void 0===l){var u=this.getCurrRuleFullName(),h=this.getGAstProductions()[u],c=new s(h,i);l=c.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=ct(e),r=n.alternation,s=n.repetition,o=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,u=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=Lt(t.fullRuleNameToShort[e.name],Ct,n.idx);t.setLaFuncCache(i,r)}))})),Object(i["u"])(s,(function(n){t.computeLookaheadFunc(e,n.idx,Tt,Jt.REPETITION,n.maxLookahead,lt(n))})),Object(i["u"])(o,(function(n){t.computeLookaheadFunc(e,n.idx,Mt,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"])(u,(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=Lt(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 Lt(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,u=0;u<l;u++){var h=a[u];void 0===h.tokenTypeIdx&&(void 0!==h.fullName?this[h.fullName](h.children,t):this[h.name](h.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=Mr(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 Mr(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 Tr=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=xt,this.setNodeLocationFromNode=xt,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,ue(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 u="ruleName";return r[u]=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(Mt,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(Mt,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(Tt,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(Tt,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,Tt,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],u=this.nestedAltBeforeClause(l,t,Ct,a);try{return l.ALT.call(this)}finally{void 0!==u&&this.nestedRuleFinallyClause(u.shortName,u.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}(),Lr=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 u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new or(u,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=cn(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}(),Ar=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 kr=!0,xr=Math.pow(2,St)-1,Dr=He({name:"RECORDING_PHASE_TOKEN",pattern:Ee.NA});ue([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,kr)},e.prototype.manyInternalRecord=function(e,t){Fr.call(this,$e,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){Fr.call(this,qe,t,e,kr)},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>xr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(xr+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,[hr,dr,Tr,Rr,Nr,Or,Lr,Ar,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',u="\n<link rel='stylesheet' href='"+a+"'>\n",h="\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",c='\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+u+h+c+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 ui(e,t+1)}));return n+=r.join(","+ei),n+=ei+fi(t,"])"+ei),n}function ui(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 hi(e,t){if(e instanceof Be)return ai(e,t);if(e instanceof ze)return ci("OPTION",e,t);if(e instanceof Ke)return ci("AT_LEAST_ONE",e,t);if(e instanceof Xe)return ci("AT_LEAST_ONE_SEP",e,t);if(e instanceof qe)return ci("MANY_SEP",e,t);if(e instanceof $e)return ci("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 ci(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+=hi(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";
  1170. //! moment.js locale configuration
  1171. 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}))},fd7e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1172. //! moment.js locale configuration
  1173. 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}))},ffec:function(e,t,n){"use strict";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}));n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3");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(`^[+-]?(((${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}},ffff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
  1174. //! moment.js locale configuration
  1175. 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}))}}]);