@slickgrid-universal/vanilla-force-bundle 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,8 @@ Arguments: `+Array.prototype.slice.call(we).join("")+`
4
4
  `+new Error().stack),R=!1}return w.apply(this,arguments)},w)}var L={};function ae(g,w){n.deprecationHandler!=null&&n.deprecationHandler(g,w),L[g]||(B(w),L[g]=!0)}function _e(g){return typeof Function<"u"&&g instanceof Function||Object.prototype.toString.call(g)==="[object Function]"}function J(g,w){var R,H=m({},g);for(R in w)s(w,R)&&(o(g[R])&&o(w[R])?(H[R]={},m(H[R],g[R]),m(H[R],w[R])):w[R]!=null?H[R]=w[R]:delete H[R]);for(R in g)s(g,R)&&!s(w,R)&&o(g[R])&&(H[R]=m({},H[R]));return H}function U(g){g!=null&&this.set(g)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var F=Object.keys||function(g){var w,R=[];for(w in g)s(g,w)&&R.push(w);return R};function de(g,w,R){var H=""+Math.abs(g);return(0<=g?R?"+":"":"-")+Math.pow(10,Math.max(0,w-H.length)).toString().substr(1)+H}var qe=/(\[[^\[]*\])|(\\)?([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,Ie=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,xe={},Oe={};function De(g,w,R,H){var te=typeof H=="string"?function(){return this[H]()}:H;g&&(Oe[g]=te),w&&(Oe[w[0]]=function(){return de(te.apply(this,arguments),w[1],w[2])}),R&&(Oe[R]=function(){return this.localeData().ordinal(te.apply(this,arguments),g)})}function ne(g,w){return g.isValid()?(w=pe(w,g.localeData()),xe[w]=xe[w]||function(R){for(var H,te=R.match(qe),we=0,Be=te.length;we<Be;we++)Oe[te[we]]?te[we]=Oe[te[we]]:te[we]=(H=te[we]).match(/\[[\s\S]/)?H.replace(/^\[|\]$/g,""):H.replace(/\\/g,"");return function(Ke){for(var yt="",ft=0;ft<Be;ft++)yt+=_e(te[ft])?te[ft].call(Ke,R):te[ft];return yt}}(w),xe[w](g)):g.localeData().invalidDate()}function pe(g,w){var R=5;function H(te){return w.longDateFormat(te)||te}for(Ie.lastIndex=0;0<=R&&Ie.test(g);)g=g.replace(Ie,H),Ie.lastIndex=0,--R;return g}var Ve={};function Ye(g,w){var R=g.toLowerCase();Ve[R]=Ve[R+"s"]=Ve[w]=g}function ze(g){return typeof g=="string"?Ve[g]||Ve[g.toLowerCase()]:void 0}function ce(g){var w,R,H={};for(R in g)s(g,R)&&(w=ze(R))&&(H[w]=g[R]);return H}var Ce={};function be(g,w){Ce[g]=w}function He(g){return g%4==0&&g%100!=0||g%400==0}function ot(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function Ue(w){var w=+w,R=0;return R=w!=0&&isFinite(w)?ot(w):R}function St(g,w){return function(R){return R!=null?(k(this,g,R),n.updateOffset(this,w),this):ct(this,g)}}function ct(g,w){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+w]():NaN}function k(g,w,R){g.isValid()&&!isNaN(R)&&(w==="FullYear"&&He(g.year())&&g.month()===1&&g.date()===29?(R=Ue(R),g._d["set"+(g._isUTC?"UTC":"")+w](R,g.month(),Mi(R,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+w](R))}var ee=/\d/,Ft=/\d\d/,ge=/\d{3}/,qi=/\d{4}/,rn=/[+-]?\d{6}/,$=/\d\d?/,X=/\d\d\d\d?/,re=/\d\d\d\d\d\d?/,Pe=/\d{1,3}/,Kn=/\d{1,4}/,wr=/[+-]?\d{1,6}/,Fe=/\d+/,me=/[+-]?\d+/,We=/Z|[+-]\d\d:?\d\d/gi,mt=/Z|[+-]\d\d(?::?\d\d)?/gi,Ge=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Le(g,w,R){bi[g]=_e(w)?w:function(H,te){return H&&R?R:w}}function jt(g,w){return s(bi,g)?bi[g](w._strict,w._locale):new RegExp(It(g.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(R,H,te,we,Be){return H||te||we||Be})))}function It(g){return g.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var bi={},q={};function W(g,w){var R,H,te=w;for(typeof g=="string"&&(g=[g]),h(w)&&(te=function(we,Be){Be[w]=Ue(we)}),H=g.length,R=0;R<H;R++)q[g[R]]=te}function ve(g,w){W(g,function(R,H,te,we){te._w=te._w||{},w(R,te._w,te,we)})}var ke,at=0,st=1,ht=2,Dt=3,Lt=4,Ot=5,zt=6,Kt=7,Fi=8;function Mi(g,w){if(isNaN(g)||isNaN(w))return NaN;var R=(w%(R=12)+R)%R;return g+=(w-R)/12,R==1?He(g)?29:28:31-R%7%2}ke=Array.prototype.indexOf||function(g){for(var w=0;w<this.length;++w)if(this[w]===g)return w;return-1},De("M",["MM",2],"Mo",function(){return this.month()+1}),De("MMM",0,0,function(g){return this.localeData().monthsShort(this,g)}),De("MMMM",0,0,function(g){return this.localeData().months(this,g)}),Ye("month","M"),be("month",8),Le("M",$),Le("MM",$,Ft),Le("MMM",function(g,w){return w.monthsShortRegex(g)}),Le("MMMM",function(g,w){return w.monthsRegex(g)}),W(["M","MM"],function(g,w){w[st]=Ue(g)-1}),W(["MMM","MMMM"],function(g,w,R,H){H=R._locale.monthsParse(g,H,R._strict),H!=null?w[st]=H:_(R).invalidMonth=g});var z="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Q="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),he=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ee=Ge,lt=Ge;function vt(g,w){var R;if(g.isValid()){if(typeof w=="string"){if(/^\d+$/.test(w))w=Ue(w);else if(!h(w=g.localeData().monthsParse(w)))return}R=Math.min(g.date(),Mi(g.year(),w)),g._d["set"+(g._isUTC?"UTC":"")+"Month"](w,R)}}function it(g){return g!=null?(vt(this,g),n.updateOffset(this,!0),this):ct(this,"Month")}function wt(){function g(Be,Ke){return Ke.length-Be.length}for(var w,R=[],H=[],te=[],we=0;we<12;we++)w=v([2e3,we]),R.push(this.monthsShort(w,"")),H.push(this.months(w,"")),te.push(this.months(w,"")),te.push(this.monthsShort(w,""));for(R.sort(g),H.sort(g),te.sort(g),we=0;we<12;we++)R[we]=It(R[we]),H[we]=It(H[we]);for(we=0;we<24;we++)te[we]=It(te[we]);this._monthsRegex=new RegExp("^("+te.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+H.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+R.join("|")+")","i")}function Ht(g){return He(g)?366:365}De("Y",0,0,function(){var g=this.year();return g<=9999?de(g,4):"+"+g}),De(0,["YY",2],0,function(){return this.year()%100}),De(0,["YYYY",4],0,"year"),De(0,["YYYYY",5],0,"year"),De(0,["YYYYYY",6,!0],0,"year"),Ye("year","y"),be("year",1),Le("Y",me),Le("YY",$,Ft),Le("YYYY",Kn,qi),Le("YYYYY",wr,rn),Le("YYYYYY",wr,rn),W(["YYYYY","YYYYYY"],at),W("YYYY",function(g,w){w[at]=g.length===2?n.parseTwoDigitYear(g):Ue(g)}),W("YY",function(g,w){w[at]=n.parseTwoDigitYear(g)}),W("Y",function(g,w){w[at]=parseInt(g,10)}),n.parseTwoDigitYear=function(g){return Ue(g)+(68<Ue(g)?1900:2e3)};var Oo=St("FullYear",!0);function Et(g,w,R,H,te,we,Be){var Ke;return g<100&&0<=g?(Ke=new Date(g+400,w,R,H,te,we,Be),isFinite(Ke.getFullYear())&&Ke.setFullYear(g)):Ke=new Date(g,w,R,H,te,we,Be),Ke}function gt(g){var w;return g<100&&0<=g?((w=Array.prototype.slice.call(arguments))[0]=g+400,w=new Date(Date.UTC.apply(null,w)),isFinite(w.getUTCFullYear())&&w.setUTCFullYear(g)):w=new Date(Date.UTC.apply(null,arguments)),w}function ei(g,w,R){return R=7+w-R,R-(7+gt(g,0,R).getUTCDay()-w)%7-1}function Ai(g,Be,Ke,H,te){var we,Be=1+7*(Be-1)+(7+Ke-H)%7+ei(g,H,te),Ke=Be<=0?Ht(we=g-1)+Be:Be>Ht(g)?(we=g+1,Be-Ht(g)):(we=g,Be);return{year:we,dayOfYear:Ke}}function zi(g,w,R){var H,te,we=ei(g.year(),w,R),we=Math.floor((g.dayOfYear()-we-1)/7)+1;return we<1?H=we+Zt(te=g.year()-1,w,R):we>Zt(g.year(),w,R)?(H=we-Zt(g.year(),w,R),te=g.year()+1):(te=g.year(),H=we),{week:H,year:te}}function Zt(g,te,R){var H=ei(g,te,R),te=ei(g+1,te,R);return(Ht(g)-H+te)/7}De("w",["ww",2],"wo","week"),De("W",["WW",2],"Wo","isoWeek"),Ye("week","w"),Ye("isoWeek","W"),be("week",5),be("isoWeek",5),Le("w",$),Le("ww",$,Ft),Le("W",$),Le("WW",$,Ft),ve(["w","ww","W","WW"],function(g,w,R,H){w[H.substr(0,1)]=Ue(g)});function Ni(g,w){return g.slice(w,7).concat(g.slice(0,w))}De("d",0,"do","day"),De("dd",0,0,function(g){return this.localeData().weekdaysMin(this,g)}),De("ddd",0,0,function(g){return this.localeData().weekdaysShort(this,g)}),De("dddd",0,0,function(g){return this.localeData().weekdays(this,g)}),De("e",0,0,"weekday"),De("E",0,0,"isoWeekday"),Ye("day","d"),Ye("weekday","e"),Ye("isoWeekday","E"),be("day",11),be("weekday",11),be("isoWeekday",11),Le("d",$),Le("e",$),Le("E",$),Le("dd",function(g,w){return w.weekdaysMinRegex(g)}),Le("ddd",function(g,w){return w.weekdaysShortRegex(g)}),Le("dddd",function(g,w){return w.weekdaysRegex(g)}),ve(["dd","ddd","dddd"],function(g,w,R,H){H=R._locale.weekdaysParse(g,H,R._strict),H!=null?w.d=H:_(R).invalidWeekday=g}),ve(["d","e","E"],function(g,w,R,H){w[H]=Ue(g)});var Bn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),fn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ct="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Se=Ge,Xe=Ge,xt=Ge;function ti(){function g(ft,Vt){return Vt.length-ft.length}for(var w,R,H,te=[],we=[],Be=[],Ke=[],yt=0;yt<7;yt++)H=v([2e3,1]).day(yt),w=It(this.weekdaysMin(H,"")),R=It(this.weekdaysShort(H,"")),H=It(this.weekdays(H,"")),te.push(w),we.push(R),Be.push(H),Ke.push(w),Ke.push(R),Ke.push(H);te.sort(g),we.sort(g),Be.sort(g),Ke.sort(g),this._weekdaysRegex=new RegExp("^("+Ke.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+Be.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+we.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+te.join("|")+")","i")}function Ui(){return this.hours()%12||12}function Gi(g,w){De(g,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),w)})}function Li(g,w){return w._meridiemParse}De("H",["HH",2],0,"hour"),De("h",["hh",2],0,Ui),De("k",["kk",2],0,function(){return this.hours()||24}),De("hmm",0,0,function(){return""+Ui.apply(this)+de(this.minutes(),2)}),De("hmmss",0,0,function(){return""+Ui.apply(this)+de(this.minutes(),2)+de(this.seconds(),2)}),De("Hmm",0,0,function(){return""+this.hours()+de(this.minutes(),2)}),De("Hmmss",0,0,function(){return""+this.hours()+de(this.minutes(),2)+de(this.seconds(),2)}),Gi("a",!0),Gi("A",!1),Ye("hour","h"),be("hour",13),Le("a",Li),Le("A",Li),Le("H",$),Le("h",$),Le("k",$),Le("HH",$,Ft),Le("hh",$,Ft),Le("kk",$,Ft),Le("hmm",X),Le("hmmss",re),Le("Hmm",X),Le("Hmmss",re),W(["H","HH"],Dt),W(["k","kk"],function(g,w,R){g=Ue(g),w[Dt]=g===24?0:g}),W(["a","A"],function(g,w,R){R._isPm=R._locale.isPM(g),R._meridiem=g}),W(["h","hh"],function(g,w,R){w[Dt]=Ue(g),_(R).bigHour=!0}),W("hmm",function(g,w,R){var H=g.length-2;w[Dt]=Ue(g.substr(0,H)),w[Lt]=Ue(g.substr(H)),_(R).bigHour=!0}),W("hmmss",function(g,w,R){var H=g.length-4,te=g.length-2;w[Dt]=Ue(g.substr(0,H)),w[Lt]=Ue(g.substr(H,2)),w[Ot]=Ue(g.substr(te)),_(R).bigHour=!0}),W("Hmm",function(g,w,R){var H=g.length-2;w[Dt]=Ue(g.substr(0,H)),w[Lt]=Ue(g.substr(H))}),W("Hmmss",function(g,w,R){var H=g.length-4,te=g.length-2;w[Dt]=Ue(g.substr(0,H)),w[Lt]=Ue(g.substr(H,2)),w[Ot]=Ue(g.substr(te))}),Ge=St("Hours",!0);var pn,Wn={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:z,monthsShort:Q,week:{dow:0,doy:6},weekdays:Bn,weekdaysMin:Ct,weekdaysShort:fn,meridiemParse:/[ap]\.?m?\.?/i},qt={},Wi={};function lr(g){return g&&g.toLowerCase().replace("_","-")}function bo(g){for(var w,R,H,te,we=0;we<g.length;){for(w=(te=lr(g[we]).split("-")).length,R=(R=lr(g[we+1]))?R.split("-"):null;0<w;){if(H=er(te.slice(0,w).join("-")))return H;if(R&&R.length>=w&&function(Be,Ke){for(var yt=Math.min(Be.length,Ke.length),ft=0;ft<yt;ft+=1)if(Be[ft]!==Ke[ft])return ft;return yt}(te,R)>=w-1)break;w--}we++}return pn}function er(g){var w;if(qt[g]===void 0&&a&&a.exports&&g.match("^[^/\\\\]*$")!=null)try{w=pn._abbr,Na("./locale/"+g),tr(w)}catch{qt[g]=null}return qt[g]}function tr(g,w){return g&&((w=u(w)?mr(g):Co(g,w))?pn=w:typeof console<"u"&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),pn._abbr}function Co(g,w){if(w===null)return delete qt[g],null;var R,H=Wn;if(w.abbr=g,qt[g]!=null)ae("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."),H=qt[g]._config;else if(w.parentLocale!=null)if(qt[w.parentLocale]!=null)H=qt[w.parentLocale]._config;else{if((R=er(w.parentLocale))==null)return Wi[w.parentLocale]||(Wi[w.parentLocale]=[]),Wi[w.parentLocale].push({name:g,config:w}),null;H=R._config}return qt[g]=new U(J(H,w)),Wi[g]&&Wi[g].forEach(function(te){Co(te.name,te.config)}),tr(g),qt[g]}function mr(g){var w;if(!(g=g&&g._locale&&g._locale._abbr?g._locale._abbr:g))return pn;if(!r(g)){if(w=er(g))return w;g=[g]}return bo(g)}function ar(g){var w=g._a;return w&&_(g).overflow===-2&&(w=w[st]<0||11<w[st]?st:w[ht]<1||w[ht]>Mi(w[at],w[st])?ht:w[Dt]<0||24<w[Dt]||w[Dt]===24&&(w[Lt]!==0||w[Ot]!==0||w[zt]!==0)?Dt:w[Lt]<0||59<w[Lt]?Lt:w[Ot]<0||59<w[Ot]?Ot:w[zt]<0||999<w[zt]?zt:-1,_(g)._overflowDayOfYear&&(w<at||ht<w)&&(w=ht),_(g)._overflowWeeks&&w===-1&&(w=Kt),_(g)._overflowWeekday&&w===-1&&(w=Fi),_(g).overflow=w),g}var Sr=/^\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)?)?$/,$n=/^\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)?)?$/,Vn=/Z|[+-]\d\d(?::?\d\d)?/,di=[["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]],zn=[["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/]],to=/^\/?Date\((-?\d+)/i,yo=/^(?:(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}))$/,mn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ir(g){var w,R,H,te,we,Be,yt=g._i,Ke=Sr.exec(yt)||$n.exec(yt),yt=di.length,ft=zn.length;if(Ke){for(_(g).iso=!0,w=0,R=yt;w<R;w++)if(di[w][1].exec(Ke[1])){te=di[w][0],H=di[w][2]!==!1;break}if(te==null)g._isValid=!1;else{if(Ke[3]){for(w=0,R=ft;w<R;w++)if(zn[w][1].exec(Ke[3])){we=(Ke[2]||" ")+zn[w][0];break}if(we==null)return void(g._isValid=!1)}if(H||we==null){if(Ke[4]){if(!Vn.exec(Ke[4]))return void(g._isValid=!1);Be="Z"}g._f=te+(we||"")+(Be||""),ye(g)}else g._isValid=!1}}else g._isValid=!1}function vr(g,w,R,H,te,we){return g=[function(Be){Be=parseInt(Be,10);{if(Be<=49)return 2e3+Be;if(Be<=999)return 1900+Be}return Be}(g),Q.indexOf(w),parseInt(R,10),parseInt(H,10),parseInt(te,10)],we&&g.push(parseInt(we,10)),g}function gr(g){var w,R,H,te,we=yo.exec(g._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));we?(w=vr(we[4],we[3],we[2],we[5],we[6],we[7]),R=we[1],H=w,te=g,R&&fn.indexOf(R)!==new Date(H[0],H[1],H[2]).getDay()?(_(te).weekdayMismatch=!0,te._isValid=!1):(g._a=w,g._tzm=(R=we[8],H=we[9],te=we[10],R?mn[R]:H?0:60*(((R=parseInt(te,10))-(H=R%100))/100)+H),g._d=gt.apply(null,g._a),g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),_(g).rfc2822=!0)):g._isValid=!1}function se(g,w,R){return g??w??R}function ue(g){var w,R,H,te,we,Be,Ke,yt,ft,Vt,Mt,Ki=[];if(!g._d){for(H=g,te=new Date(n.now()),R=H._useUTC?[te.getUTCFullYear(),te.getUTCMonth(),te.getUTCDate()]:[te.getFullYear(),te.getMonth(),te.getDate()],g._w&&g._a[ht]==null&&g._a[st]==null&&((te=(H=g)._w).GG!=null||te.W!=null||te.E!=null?(yt=1,ft=4,we=se(te.GG,H._a[at],zi(dt(),1,4).year),Be=se(te.W,1),((Ke=se(te.E,1))<1||7<Ke)&&(Vt=!0)):(yt=H._locale._week.dow,ft=H._locale._week.doy,Mt=zi(dt(),yt,ft),we=se(te.gg,H._a[at],Mt.year),Be=se(te.w,Mt.week),te.d!=null?((Ke=te.d)<0||6<Ke)&&(Vt=!0):te.e!=null?(Ke=te.e+yt,(te.e<0||6<te.e)&&(Vt=!0)):Ke=yt),Be<1||Be>Zt(we,yt,ft)?_(H)._overflowWeeks=!0:Vt!=null?_(H)._overflowWeekday=!0:(Mt=Ai(we,Be,Ke,yt,ft),H._a[at]=Mt.year,H._dayOfYear=Mt.dayOfYear)),g._dayOfYear!=null&&(te=se(g._a[at],R[at]),(g._dayOfYear>Ht(te)||g._dayOfYear===0)&&(_(g)._overflowDayOfYear=!0),Vt=gt(te,0,g._dayOfYear),g._a[st]=Vt.getUTCMonth(),g._a[ht]=Vt.getUTCDate()),w=0;w<3&&g._a[w]==null;++w)g._a[w]=Ki[w]=R[w];for(;w<7;w++)g._a[w]=Ki[w]=g._a[w]==null?w===2?1:0:g._a[w];g._a[Dt]===24&&g._a[Lt]===0&&g._a[Ot]===0&&g._a[zt]===0&&(g._nextDay=!0,g._a[Dt]=0),g._d=(g._useUTC?gt:Et).apply(null,Ki),we=g._useUTC?g._d.getUTCDay():g._d.getDay(),g._tzm!=null&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[Dt]=24),g._w&&g._w.d!==void 0&&g._w.d!==we&&(_(g).weekdayMismatch=!0)}}function ye(g){if(g._f===n.ISO_8601)ir(g);else if(g._f===n.RFC_2822)gr(g);else{g._a=[],_(g).empty=!0;for(var w,R,H,te,we,Be=""+g._i,Ke=Be.length,yt=0,ft=pe(g._f,g._locale).match(qe)||[],Vt=ft.length,Mt=0;Mt<Vt;Mt++)R=ft[Mt],(w=(Be.match(jt(R,g))||[])[0])&&(0<(H=Be.substr(0,Be.indexOf(w))).length&&_(g).unusedInput.push(H),Be=Be.slice(Be.indexOf(w)+w.length),yt+=w.length),Oe[R]?(w?_(g).empty=!1:_(g).unusedTokens.push(R),H=R,we=g,(te=w)!=null&&s(q,H)&&q[H](te,we._a,we,H)):g._strict&&!w&&_(g).unusedTokens.push(R);_(g).charsLeftOver=Ke-yt,0<Be.length&&_(g).unusedInput.push(Be),g._a[Dt]<=12&&_(g).bigHour===!0&&0<g._a[Dt]&&(_(g).bigHour=void 0),_(g).parsedDateParts=g._a.slice(0),_(g).meridiem=g._meridiem,g._a[Dt]=function(Ki,ln,Zi){return Zi==null?ln:Ki.meridiemHour!=null?Ki.meridiemHour(ln,Zi):Ki.isPM!=null?((Ki=Ki.isPM(Zi))&&ln<12&&(ln+=12),ln=Ki||ln!==12?ln:0):ln}(g._locale,g._a[Dt],g._meridiem),(Ke=_(g).era)!==null&&(g._a[at]=g._locale.erasConvertYear(Ke,g._a[at])),ue(g),ar(g)}}function $e(g){var w,R,H,te=g._i,we=g._f;return g._locale=g._locale||mr(g._l),te===null||we===void 0&&te===""?x({nullInput:!0}):(typeof te=="string"&&(g._i=te=g._locale.preparse(te)),M(te)?new P(ar(te)):(c(te)?g._d=te:r(we)?function(Be){var Ke,yt,ft,Vt,Mt,Ki,ln=!1,Zi=Be._f.length;if(Zi===0)return _(Be).invalidFormat=!0,Be._d=new Date(NaN);for(Vt=0;Vt<Zi;Vt++)Mt=0,Ki=!1,Ke=A({},Be),Be._useUTC!=null&&(Ke._useUTC=Be._useUTC),Ke._f=Be._f[Vt],ye(Ke),C(Ke)&&(Ki=!0),Mt=(Mt+=_(Ke).charsLeftOver)+10*_(Ke).unusedTokens.length,_(Ke).score=Mt,ln?Mt<ft&&(ft=Mt,yt=Ke):(ft==null||Mt<ft||Ki)&&(ft=Mt,yt=Ke,Ki&&(ln=!0));m(Be,yt||Ke)}(g):we?ye(g):u(we=(te=g)._i)?te._d=new Date(n.now()):c(we)?te._d=new Date(we.valueOf()):typeof we=="string"?(R=te,(w=to.exec(R._i))!==null?R._d=new Date(+w[1]):(ir(R),R._isValid===!1&&(delete R._isValid,gr(R),R._isValid===!1&&(delete R._isValid,R._strict?R._isValid=!1:n.createFromInputFallback(R))))):r(we)?(te._a=p(we.slice(0),function(Be){return parseInt(Be,10)}),ue(te)):o(we)?(w=te)._d||(H=(R=ce(w._i)).day===void 0?R.date:R.day,w._a=p([R.year,R.month,H,R.hour,R.minute,R.second,R.millisecond],function(Be){return Be&&parseInt(Be,10)}),ue(w)):h(we)?te._d=new Date(we):n.createFromInputFallback(te),C(g)||(g._d=null),g))}function Je(g,w,R,H,te){var we={};return w!==!0&&w!==!1||(H=w,w=void 0),R!==!0&&R!==!1||(H=R,R=void 0),(o(g)&&l(g)||r(g)&&g.length===0)&&(g=void 0),we._isAMomentObject=!0,we._useUTC=we._isUTC=te,we._l=R,we._i=g,we._f=w,we._strict=H,(te=new P(ar($e(te=we))))._nextDay&&(te.add(1,"d"),te._nextDay=void 0),te}function dt(g,w,R,H){return Je(g,w,R,H,!1)}n.createFromInputFallback=Z("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(g){g._d=new Date(g._i+(g._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){},X=Z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var g=dt.apply(null,arguments);return this.isValid()&&g.isValid()?g<this?this:g:x()}),re=Z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var g=dt.apply(null,arguments);return this.isValid()&&g.isValid()?this<g?this:g:x()});function At(g,w){var R,H;if(!(w=w.length===1&&r(w[0])?w[0]:w).length)return dt();for(R=w[0],H=1;H<w.length;++H)w[H].isValid()&&!w[H][g](R)||(R=w[H]);return R}var Bt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ui(w){var w=ce(w),R=w.year||0,H=w.quarter||0,te=w.month||0,we=w.week||w.isoWeek||0,Be=w.day||0,Ke=w.hour||0,yt=w.minute||0,ft=w.second||0,Vt=w.millisecond||0;this._isValid=function(Mt){var Ki,ln,Zi=!1,is=Bt.length;for(Ki in Mt)if(s(Mt,Ki)&&(ke.call(Bt,Ki)===-1||Mt[Ki]!=null&&isNaN(Mt[Ki])))return!1;for(ln=0;ln<is;++ln)if(Mt[Bt[ln]]){if(Zi)return!1;parseFloat(Mt[Bt[ln]])!==Ue(Mt[Bt[ln]])&&(Zi=!0)}return!0}(w),this._milliseconds=+Vt+1e3*ft+6e4*yt+1e3*Ke*60*60,this._days=+Be+7*we,this._months=+te+3*H+12*R,this._data={},this._locale=mr(),this._bubble()}function Ci(g){return g instanceof ui}function Ei(g){return g<0?-1*Math.round(-1*g):Math.round(g)}function yn(g,w){De(g,0,0,function(){var R=this.utcOffset(),H="+";return R<0&&(R=-R,H="-"),H+de(~~(R/60),2)+w+de(~~R%60,2)})}yn("Z",":"),yn("ZZ",""),Le("Z",mt),Le("ZZ",mt),W(["Z","ZZ"],function(g,w,R){R._useUTC=!0,R._tzm=jn(mt,g)});var Yn=/([\+\-]|\d\d)/gi;function jn(g,R){var R=(R||"").match(g);return R===null?null:(R=60*(g=((R[R.length-1]||[])+"").match(Yn)||["-",0,0])[1]+Ue(g[2]))===0?0:g[0]==="+"?R:-R}function Xn(g,w){var R;return w._isUTC?(w=w.clone(),R=(M(g)||c(g)?g:dt(g)).valueOf()-w.valueOf(),w._d.setTime(w._d.valueOf()+R),n.updateOffset(w,!1),w):dt(g).local()}function io(g){return-Math.round(g._d.getTimezoneOffset())}function _r(){return!!this.isValid()&&this._isUTC&&this._offset===0}n.updateOffset=function(){};var Eo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Hi=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Oi(g,w){var R,H=g,te=null;return Ci(g)?H={ms:g._milliseconds,d:g._days,M:g._months}:h(g)||!isNaN(+g)?(H={},w?H[w]=+g:H.milliseconds=+g):(te=Eo.exec(g))?(R=te[1]==="-"?-1:1,H={y:0,d:Ue(te[ht])*R,h:Ue(te[Dt])*R,m:Ue(te[Lt])*R,s:Ue(te[Ot])*R,ms:Ue(Ei(1e3*te[zt]))*R}):(te=Hi.exec(g))?(R=te[1]==="-"?-1:1,H={y:Br(te[2],R),M:Br(te[3],R),w:Br(te[4],R),d:Br(te[5],R),h:Br(te[6],R),m:Br(te[7],R),s:Br(te[8],R)}):H==null?H={}:typeof H=="object"&&("from"in H||"to"in H)&&(w=function(we,Be){var Ke;return!we.isValid()||!Be.isValid()?{milliseconds:0,months:0}:(Be=Xn(Be,we),we.isBefore(Be)?Ke=Cs(we,Be):((Ke=Cs(Be,we)).milliseconds=-Ke.milliseconds,Ke.months=-Ke.months),Ke)}(dt(H.from),dt(H.to)),(H={}).ms=w.milliseconds,H.M=w.months),te=new ui(H),Ci(g)&&s(g,"_locale")&&(te._locale=g._locale),Ci(g)&&s(g,"_isValid")&&(te._isValid=g._isValid),te}function Br(g,w){return g=g&&parseFloat(g.replace(",",".")),(isNaN(g)?0:g)*w}function Cs(g,w){var R={};return R.months=w.month()-g.month()+12*(w.year()-g.year()),g.clone().add(R.months,"M").isAfter(w)&&--R.months,R.milliseconds=+w-+g.clone().add(R.months,"M"),R}function So(g,w){return function(R,H){var te;return H===null||isNaN(+H)||(ae(w,"moment()."+w+"(period, number) is deprecated. Please use moment()."+w+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),te=R,R=H,H=te),qs(this,Oi(R,H),g),this}}function qs(g,Be,R,H){var te=Be._milliseconds,we=Ei(Be._days),Be=Ei(Be._months);g.isValid()&&(H=H==null||H,Be&&vt(g,ct(g,"Month")+Be*R),we&&k(g,"Date",ct(g,"Date")+we*R),te&&g._d.setTime(g._d.valueOf()+te*R),H&&n.updateOffset(g,we||Be))}Oi.fn=ui.prototype,Oi.invalid=function(){return Oi(NaN)},z=So(1,"add"),Bn=So(-1,"subtract");function ys(g){return typeof g=="string"||g instanceof String}function ia(g){return M(g)||c(g)||ys(g)||h(g)||function(w){var R=r(w),H=!1;return R&&(H=w.filter(function(te){return!h(te)&&ys(w)}).length===0),R&&H}(g)||function(w){var R,H,te=o(w)&&!l(w),we=!1,Be=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ke=Be.length;for(R=0;R<Ke;R+=1)H=Be[R],we=we||s(w,H);return te&&we}(g)||g==null}function Jo(g,te){if(g.date()<te.date())return-Jo(te,g);var R=12*(te.year()-g.year())+(te.month()-g.month()),H=g.clone().add(R,"months"),te=te-H<0?(te-H)/(H-g.clone().add(R-1,"months")):(te-H)/(g.clone().add(1+R,"months")-H);return-(R+te)||0}function Es(g){return g===void 0?this._locale._abbr:((g=mr(g))!=null&&(this._locale=g),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",Ct=Z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(g){return g===void 0?this.localeData():this.locale(g)});function ki(){return this._locale}var vi=126227808e5;function wo(g,w){return(g%w+w)%w}function xo(g,w,R){return g<100&&0<=g?new Date(g+400,w,R)-vi:new Date(g,w,R).valueOf()}function Ss(g,w,R){return g<100&&0<=g?Date.UTC(g+400,w,R)-vi:Date.UTC(g,w,R)}function xl(g,w){return w.erasAbbrRegex(g)}function Ks(){for(var g=[],w=[],R=[],H=[],te=this.eras(),we=0,Be=te.length;we<Be;++we)w.push(It(te[we].name)),g.push(It(te[we].abbr)),R.push(It(te[we].narrow)),H.push(It(te[we].name)),H.push(It(te[we].abbr)),H.push(It(te[we].narrow));this._erasRegex=new RegExp("^("+H.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+w.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+g.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+R.join("|")+")","i")}function es(g,w){De(0,[g,g.length],0,w)}function ws(g,w,R,H,te){var we;return g==null?zi(this,H,te).year:(we=Zt(g,H,te),(function(Be,Ke,yt,ft,Vt){return Be=Ai(Be,Ke,yt,ft,Vt),Ke=gt(Be.year,0,Be.dayOfYear),this.year(Ke.getUTCFullYear()),this.month(Ke.getUTCMonth()),this.date(Ke.getUTCDate()),this}).call(this,g,w=we<w?we:w,R,H,te))}De("N",0,0,"eraAbbr"),De("NN",0,0,"eraAbbr"),De("NNN",0,0,"eraAbbr"),De("NNNN",0,0,"eraName"),De("NNNNN",0,0,"eraNarrow"),De("y",["y",1],"yo","eraYear"),De("y",["yy",2],0,"eraYear"),De("y",["yyy",3],0,"eraYear"),De("y",["yyyy",4],0,"eraYear"),Le("N",xl),Le("NN",xl),Le("NNN",xl),Le("NNNN",function(g,w){return w.erasNameRegex(g)}),Le("NNNNN",function(g,w){return w.erasNarrowRegex(g)}),W(["N","NN","NNN","NNNN","NNNNN"],function(g,w,R,H){H=R._locale.erasParse(g,H,R._strict),H?_(R).era=H:_(R).invalidEra=g}),Le("y",Fe),Le("yy",Fe),Le("yyy",Fe),Le("yyyy",Fe),Le("yo",function(g,w){return w._eraYearOrdinalRegex||Fe}),W(["y","yy","yyy","yyyy"],at),W(["yo"],function(g,w,R,H){var te;R._locale._eraYearOrdinalRegex&&(te=g.match(R._locale._eraYearOrdinalRegex)),R._locale.eraYearOrdinalParse?w[at]=R._locale.eraYearOrdinalParse(g,te):w[at]=parseInt(g,10)}),De(0,["gg",2],0,function(){return this.weekYear()%100}),De(0,["GG",2],0,function(){return this.isoWeekYear()%100}),es("gggg","weekYear"),es("ggggg","weekYear"),es("GGGG","isoWeekYear"),es("GGGGG","isoWeekYear"),Ye("weekYear","gg"),Ye("isoWeekYear","GG"),be("weekYear",1),be("isoWeekYear",1),Le("G",me),Le("g",me),Le("GG",$,Ft),Le("gg",$,Ft),Le("GGGG",Kn,qi),Le("gggg",Kn,qi),Le("GGGGG",wr,rn),Le("ggggg",wr,rn),ve(["gggg","ggggg","GGGG","GGGGG"],function(g,w,R,H){w[H.substr(0,2)]=Ue(g)}),ve(["gg","GG"],function(g,w,R,H){w[H]=n.parseTwoDigitYear(g)}),De("Q",0,"Qo","quarter"),Ye("quarter","Q"),be("quarter",7),Le("Q",ee),W("Q",function(g,w){w[st]=3*(Ue(g)-1)}),De("D",["DD",2],"Do","date"),Ye("date","D"),be("date",9),Le("D",$),Le("DD",$,Ft),Le("Do",function(g,w){return g?w._dayOfMonthOrdinalParse||w._ordinalParse:w._dayOfMonthOrdinalParseLenient}),W(["D","DD"],ht),W("Do",function(g,w){w[ht]=Ue(g.match($)[0])}),Kn=St("Date",!0),De("DDD",["DDDD",3],"DDDo","dayOfYear"),Ye("dayOfYear","DDD"),be("dayOfYear",4),Le("DDD",Pe),Le("DDDD",ge),W(["DDD","DDDD"],function(g,w,R){R._dayOfYear=Ue(g)}),De("m",["mm",2],0,"minute"),Ye("minute","m"),be("minute",14),Le("m",$),Le("mm",$,Ft),W(["m","mm"],Lt);var kt,qi=St("Minutes",!1),wr=(De("s",["ss",2],0,"second"),Ye("second","s"),be("second",15),Le("s",$),Le("ss",$,Ft),W(["s","ss"],Ot),St("Seconds",!1));for(De("S",0,0,function(){return~~(this.millisecond()/100)}),De(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),De(0,["SSS",3],0,"millisecond"),De(0,["SSSS",4],0,function(){return 10*this.millisecond()}),De(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),De(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),De(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),De(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),De(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ye("millisecond","ms"),be("millisecond",16),Le("S",Pe,ee),Le("SS",Pe,Ft),Le("SSS",Pe,ge),kt="SSSS";kt.length<=9;kt+="S")Le(kt,Fe);function Ho(g,w){w[zt]=Ue(1e3*("0."+g))}for(kt="S";kt.length<=9;kt+="S")W(kt,Ho);rn=St("Milliseconds",!1),De("z",0,0,"zoneAbbr"),De("zz",0,0,"zoneName"),ee=P.prototype;function Tl(g){return g}ee.add=z,ee.calendar=function(R,te){arguments.length===1&&(arguments[0]?ia(arguments[0])?(R=arguments[0],te=void 0):function(we){for(var Be=o(we)&&!l(we),Ke=!1,yt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],ft=0;ft<yt.length;ft+=1)Ke=Ke||s(we,yt[ft]);return Be&&Ke}(arguments[0])&&(te=arguments[0],R=void 0):te=R=void 0);var R=R||dt(),H=Xn(R,this).startOf("day"),H=n.calendarFormat(this,H)||"sameElse",te=te&&(_e(te[H])?te[H].call(this,R):te[H]);return this.format(te||this.localeData().calendar(H,this,dt(R)))},ee.clone=function(){return new P(this)},ee.diff=function(g,w,R){var H,te,we;if(!this.isValid())return NaN;if(!(H=Xn(g,this)).isValid())return NaN;switch(te=6e4*(H.utcOffset()-this.utcOffset()),w=ze(w)){case"year":we=Jo(this,H)/12;break;case"month":we=Jo(this,H);break;case"quarter":we=Jo(this,H)/3;break;case"second":we=(this-H)/1e3;break;case"minute":we=(this-H)/6e4;break;case"hour":we=(this-H)/36e5;break;case"day":we=(this-H-te)/864e5;break;case"week":we=(this-H-te)/6048e5;break;default:we=this-H}return R?we:ot(we)},ee.endOf=function(g){var w,R;if((g=ze(g))===void 0||g==="millisecond"||!this.isValid())return this;switch(R=this._isUTC?Ss:xo,g){case"year":w=R(this.year()+1,0,1)-1;break;case"quarter":w=R(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":w=R(this.year(),this.month()+1,1)-1;break;case"week":w=R(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":w=R(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":w=R(this.year(),this.month(),this.date()+1)-1;break;case"hour":w=this._d.valueOf(),w+=36e5-wo(w+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":w=this._d.valueOf(),w+=6e4-wo(w,6e4)-1;break;case"second":w=this._d.valueOf(),w+=1e3-wo(w,1e3)-1;break}return this._d.setTime(w),n.updateOffset(this,!0),this},ee.format=function(g){return g=g||(this.isUtc()?n.defaultFormatUtc:n.defaultFormat),g=ne(this,g),this.localeData().postformat(g)},ee.from=function(g,w){return this.isValid()&&(M(g)&&g.isValid()||dt(g).isValid())?Oi({to:this,from:g}).locale(this.locale()).humanize(!w):this.localeData().invalidDate()},ee.fromNow=function(g){return this.from(dt(),g)},ee.to=function(g,w){return this.isValid()&&(M(g)&&g.isValid()||dt(g).isValid())?Oi({from:this,to:g}).locale(this.locale()).humanize(!w):this.localeData().invalidDate()},ee.toNow=function(g){return this.to(dt(),g)},ee.get=function(g){return _e(this[g=ze(g)])?this[g]():this},ee.invalidAt=function(){return _(this).overflow},ee.isAfter=function(g,w){return g=M(g)?g:dt(g),!(!this.isValid()||!g.isValid())&&((w=ze(w)||"millisecond")==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(w).valueOf())},ee.isBefore=function(g,w){return g=M(g)?g:dt(g),!(!this.isValid()||!g.isValid())&&((w=ze(w)||"millisecond")==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(w).valueOf()<g.valueOf())},ee.isBetween=function(g,w,R,H){return g=M(g)?g:dt(g),w=M(w)?w:dt(w),!!(this.isValid()&&g.isValid()&&w.isValid())&&((H=H||"()")[0]==="("?this.isAfter(g,R):!this.isBefore(g,R))&&(H[1]===")"?this.isBefore(w,R):!this.isAfter(w,R))},ee.isSame=function(R,w){var R=M(R)?R:dt(R);return!(!this.isValid()||!R.isValid())&&((w=ze(w)||"millisecond")==="millisecond"?this.valueOf()===R.valueOf():(R=R.valueOf(),this.clone().startOf(w).valueOf()<=R&&R<=this.clone().endOf(w).valueOf()))},ee.isSameOrAfter=function(g,w){return this.isSame(g,w)||this.isAfter(g,w)},ee.isSameOrBefore=function(g,w){return this.isSame(g,w)||this.isBefore(g,w)},ee.isValid=function(){return C(this)},ee.lang=Ct,ee.locale=Es,ee.localeData=ki,ee.max=re,ee.min=X,ee.parsingFlags=function(){return m({},_(this))},ee.set=function(g,w){if(typeof g=="object")for(var R=function(we){var Be,Ke=[];for(Be in we)s(we,Be)&&Ke.push({unit:Be,priority:Ce[Be]});return Ke.sort(function(yt,ft){return yt.priority-ft.priority}),Ke}(g=ce(g)),H=R.length,te=0;te<H;te++)this[R[te].unit](g[R[te].unit]);else if(_e(this[g=ze(g)]))return this[g](w);return this},ee.startOf=function(g){var w,R;if((g=ze(g))===void 0||g==="millisecond"||!this.isValid())return this;switch(R=this._isUTC?Ss:xo,g){case"year":w=R(this.year(),0,1);break;case"quarter":w=R(this.year(),this.month()-this.month()%3,1);break;case"month":w=R(this.year(),this.month(),1);break;case"week":w=R(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":w=R(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":w=R(this.year(),this.month(),this.date());break;case"hour":w=this._d.valueOf(),w-=wo(w+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":w=this._d.valueOf(),w-=wo(w,6e4);break;case"second":w=this._d.valueOf(),w-=wo(w,1e3);break}return this._d.setTime(w),n.updateOffset(this,!0),this},ee.subtract=Bn,ee.toArray=function(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]},ee.toObject=function(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}},ee.toDate=function(){return new Date(this.valueOf())},ee.toISOString=function(g){if(!this.isValid())return null;var w=(g=g!==!0)?this.clone().utc():this;return w.year()<0||9999<w.year()?ne(w,g?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):_e(Date.prototype.toISOString)?g?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ne(w,"Z")):ne(w,g?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ee.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g,w="moment",R="";return this.isLocal()||(w=this.utcOffset()===0?"moment.utc":"moment.parseZone",R="Z"),w="["+w+'("]',g=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(w+g+"-MM-DD[T]HH:mm:ss.SSS"+(R+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(ee[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ee.toJSON=function(){return this.isValid()?this.toISOString():null},ee.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ee.unix=function(){return Math.floor(this.valueOf()/1e3)},ee.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ee.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ee.eraName=function(){for(var g,w=this.localeData().eras(),R=0,H=w.length;R<H;++R)if(g=this.clone().startOf("day").valueOf(),w[R].since<=g&&g<=w[R].until||w[R].until<=g&&g<=w[R].since)return w[R].name;return""},ee.eraNarrow=function(){for(var g,w=this.localeData().eras(),R=0,H=w.length;R<H;++R)if(g=this.clone().startOf("day").valueOf(),w[R].since<=g&&g<=w[R].until||w[R].until<=g&&g<=w[R].since)return w[R].narrow;return""},ee.eraAbbr=function(){for(var g,w=this.localeData().eras(),R=0,H=w.length;R<H;++R)if(g=this.clone().startOf("day").valueOf(),w[R].since<=g&&g<=w[R].until||w[R].until<=g&&g<=w[R].since)return w[R].abbr;return""},ee.eraYear=function(){for(var g,w,R=this.localeData().eras(),H=0,te=R.length;H<te;++H)if(g=R[H].since<=R[H].until?1:-1,w=this.clone().startOf("day").valueOf(),R[H].since<=w&&w<=R[H].until||R[H].until<=w&&w<=R[H].since)return(this.year()-n(R[H].since).year())*g+R[H].offset;return this.year()},ee.year=Oo,ee.isLeapYear=function(){return He(this.year())},ee.weekYear=function(g){return ws.call(this,g,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ee.isoWeekYear=function(g){return ws.call(this,g,this.isoWeek(),this.isoWeekday(),1,4)},ee.quarter=ee.quarters=function(g){return g==null?Math.ceil((this.month()+1)/3):this.month(3*(g-1)+this.month()%3)},ee.month=it,ee.daysInMonth=function(){return Mi(this.year(),this.month())},ee.week=ee.weeks=function(g){var w=this.localeData().week(this);return g==null?w:this.add(7*(g-w),"d")},ee.isoWeek=ee.isoWeeks=function(g){var w=zi(this,1,4).week;return g==null?w:this.add(7*(g-w),"d")},ee.weeksInYear=function(){var g=this.localeData()._week;return Zt(this.year(),g.dow,g.doy)},ee.weeksInWeekYear=function(){var g=this.localeData()._week;return Zt(this.weekYear(),g.dow,g.doy)},ee.isoWeeksInYear=function(){return Zt(this.year(),1,4)},ee.isoWeeksInISOWeekYear=function(){return Zt(this.isoWeekYear(),1,4)},ee.date=Kn,ee.day=ee.days=function(g){if(!this.isValid())return g!=null?this:NaN;var w,R,H=this._isUTC?this._d.getUTCDay():this._d.getDay();return g!=null?(w=g,R=this.localeData(),g=typeof w!="string"?w:isNaN(w)?typeof(w=R.weekdaysParse(w))=="number"?w:null:parseInt(w,10),this.add(g-H,"d")):H},ee.weekday=function(g){if(!this.isValid())return g!=null?this:NaN;var w=(this.day()+7-this.localeData()._week.dow)%7;return g==null?w:this.add(g-w,"d")},ee.isoWeekday=function(g){return this.isValid()?g!=null?(w=g,R=this.localeData(),R=typeof w=="string"?R.weekdaysParse(w)%7||7:isNaN(w)?null:w,this.day(this.day()%7?R:R-7)):this.day()||7:g!=null?this:NaN;var w,R},ee.dayOfYear=function(g){var w=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return g==null?w:this.add(g-w,"d")},ee.hour=ee.hours=Ge,ee.minute=ee.minutes=qi,ee.second=ee.seconds=wr,ee.millisecond=ee.milliseconds=rn,ee.utcOffset=function(g,w,R){var H,te=this._offset||0;if(!this.isValid())return g!=null?this:NaN;if(g==null)return this._isUTC?te:io(this);if(typeof g=="string"){if((g=jn(mt,g))===null)return this}else Math.abs(g)<16&&!R&&(g*=60);return!this._isUTC&&w&&(H=io(this)),this._offset=g,this._isUTC=!0,H!=null&&this.add(H,"m"),te!==g&&(!w||this._changeInProgress?qs(this,Oi(g-te,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this},ee.utc=function(g){return this.utcOffset(0,g)},ee.local=function(g){return this._isUTC&&(this.utcOffset(0,g),this._isUTC=!1,g&&this.subtract(io(this),"m")),this},ee.parseZone=function(){var g;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((g=jn(We,this._i))!=null?this.utcOffset(g):this.utcOffset(0,!0)),this},ee.hasAlignedHourOffset=function(g){return!!this.isValid()&&(g=g?dt(g).utcOffset():0,(this.utcOffset()-g)%60==0)},ee.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ee.isLocal=function(){return!!this.isValid()&&!this._isUTC},ee.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ee.isUtc=_r,ee.isUTC=_r,ee.zoneAbbr=function(){return this._isUTC?"UTC":""},ee.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ee.dates=Z("dates accessor is deprecated. Use date instead.",Kn),ee.months=Z("months accessor is deprecated. Use month instead",it),ee.years=Z("years accessor is deprecated. Use year instead",Oo),ee.zone=Z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(g,w){return g!=null?(this.utcOffset(g=typeof g!="string"?-g:g,w),this):-this.utcOffset()}),ee.isDSTShifted=Z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var g,w={};return A(w,this),(w=$e(w))._a?(g=(w._isUTC?v:dt)(w._a),this._isDSTShifted=this.isValid()&&0<function(R,H,te){for(var we=Math.min(R.length,H.length),Be=Math.abs(R.length-H.length),Ke=0,yt=0;yt<we;yt++)(te&&R[yt]!==H[yt]||!te&&Ue(R[yt])!==Ue(H[yt]))&&Ke++;return Ke+Be}(w._a,g.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),Ft=U.prototype;function no(g,w,R,we){var te=mr(),we=v().set(we,w);return te[R](we,g)}function qn(g,w,R){if(h(g)&&(w=g,g=void 0),g=g||"",w!=null)return no(g,w,R,"month");for(var H=[],te=0;te<12;te++)H[te]=no(g,te,R,"month");return H}function Zs(g,w,R,H){w=(typeof g=="boolean"?h(w)&&(R=w,w=void 0):(w=g,g=!1,h(R=w)&&(R=w,w=void 0)),w||"");var te,we=mr(),Be=g?we._week.dow:0,Ke=[];if(R!=null)return no(w,(R+Be)%7,H,"day");for(te=0;te<7;te++)Ke[te]=no(w,(te+Be)%7,H,"day");return Ke}Ft.calendar=function(g,w,R){return _e(g=this._calendar[g]||this._calendar.sameElse)?g.call(w,R):g},Ft.longDateFormat=function(g){var w=this._longDateFormat[g],R=this._longDateFormat[g.toUpperCase()];return w||!R?w:(this._longDateFormat[g]=R.match(qe).map(function(H){return H==="MMMM"||H==="MM"||H==="DD"||H==="dddd"?H.slice(1):H}).join(""),this._longDateFormat[g])},Ft.invalidDate=function(){return this._invalidDate},Ft.ordinal=function(g){return this._ordinal.replace("%d",g)},Ft.preparse=Tl,Ft.postformat=Tl,Ft.relativeTime=function(g,w,R,H){var te=this._relativeTime[R];return _e(te)?te(g,w,R,H):te.replace(/%d/i,g)},Ft.pastFuture=function(g,w){return _e(g=this._relativeTime[0<g?"future":"past"])?g(w):g.replace(/%s/i,w)},Ft.set=function(g){var w,R;for(R in g)s(g,R)&&(_e(w=g[R])?this[R]=w:this["_"+R]=w);this._config=g,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Ft.eras=function(g,w){for(var R,H=this._eras||mr("en")._eras,te=0,we=H.length;te<we;++te){switch(typeof H[te].since){case"string":R=n(H[te].since).startOf("day"),H[te].since=R.valueOf();break}switch(typeof H[te].until){case"undefined":H[te].until=1/0;break;case"string":R=n(H[te].until).startOf("day").valueOf(),H[te].until=R.valueOf();break}}return H},Ft.erasParse=function(g,w,R){var H,te,we,Be,Ke,yt=this.eras();for(g=g.toUpperCase(),H=0,te=yt.length;H<te;++H)if(we=yt[H].name.toUpperCase(),Be=yt[H].abbr.toUpperCase(),Ke=yt[H].narrow.toUpperCase(),R)switch(w){case"N":case"NN":case"NNN":if(Be===g)return yt[H];break;case"NNNN":if(we===g)return yt[H];break;case"NNNNN":if(Ke===g)return yt[H];break}else if(0<=[we,Be,Ke].indexOf(g))return yt[H]},Ft.erasConvertYear=function(g,w){var R=g.since<=g.until?1:-1;return w===void 0?n(g.since).year():n(g.since).year()+(w-g.offset)*R},Ft.erasAbbrRegex=function(g){return s(this,"_erasAbbrRegex")||Ks.call(this),g?this._erasAbbrRegex:this._erasRegex},Ft.erasNameRegex=function(g){return s(this,"_erasNameRegex")||Ks.call(this),g?this._erasNameRegex:this._erasRegex},Ft.erasNarrowRegex=function(g){return s(this,"_erasNarrowRegex")||Ks.call(this),g?this._erasNarrowRegex:this._erasRegex},Ft.months=function(g,w){return g?(r(this._months)?this._months:this._months[(this._months.isFormat||he).test(w)?"format":"standalone"])[g.month()]:r(this._months)?this._months:this._months.standalone},Ft.monthsShort=function(g,w){return g?(r(this._monthsShort)?this._monthsShort:this._monthsShort[he.test(w)?"format":"standalone"])[g.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Ft.monthsParse=function(g,w,R){var H,te;if(this._monthsParseExact)return(function(Mt,Be,Ke){var yt,ft,Vt,Mt=Mt.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],yt=0;yt<12;++yt)Vt=v([2e3,yt]),this._shortMonthsParse[yt]=this.monthsShort(Vt,"").toLocaleLowerCase(),this._longMonthsParse[yt]=this.months(Vt,"").toLocaleLowerCase();return Ke?Be==="MMM"?(ft=ke.call(this._shortMonthsParse,Mt))!==-1?ft:null:(ft=ke.call(this._longMonthsParse,Mt))!==-1?ft:null:Be==="MMM"?(ft=ke.call(this._shortMonthsParse,Mt))!==-1||(ft=ke.call(this._longMonthsParse,Mt))!==-1?ft:null:(ft=ke.call(this._longMonthsParse,Mt))!==-1||(ft=ke.call(this._shortMonthsParse,Mt))!==-1?ft:null}).call(this,g,w,R);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),H=0;H<12;H++)if(te=v([2e3,H]),R&&!this._longMonthsParse[H]&&(this._longMonthsParse[H]=new RegExp("^"+this.months(te,"").replace(".","")+"$","i"),this._shortMonthsParse[H]=new RegExp("^"+this.monthsShort(te,"").replace(".","")+"$","i")),R||this._monthsParse[H]||(te="^"+this.months(te,"")+"|^"+this.monthsShort(te,""),this._monthsParse[H]=new RegExp(te.replace(".",""),"i")),R&&w==="MMMM"&&this._longMonthsParse[H].test(g)||R&&w==="MMM"&&this._shortMonthsParse[H].test(g)||!R&&this._monthsParse[H].test(g))return H},Ft.monthsRegex=function(g){return this._monthsParseExact?(s(this,"_monthsRegex")||wt.call(this),g?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=lt),this._monthsStrictRegex&&g?this._monthsStrictRegex:this._monthsRegex)},Ft.monthsShortRegex=function(g){return this._monthsParseExact?(s(this,"_monthsRegex")||wt.call(this),g?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Ee),this._monthsShortStrictRegex&&g?this._monthsShortStrictRegex:this._monthsShortRegex)},Ft.week=function(g){return zi(g,this._week.dow,this._week.doy).week},Ft.firstDayOfYear=function(){return this._week.doy},Ft.firstDayOfWeek=function(){return this._week.dow},Ft.weekdays=function(g,w){return w=r(this._weekdays)?this._weekdays:this._weekdays[g&&g!==!0&&this._weekdays.isFormat.test(w)?"format":"standalone"],g===!0?Ni(w,this._week.dow):g?w[g.day()]:w},Ft.weekdaysMin=function(g){return g===!0?Ni(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin},Ft.weekdaysShort=function(g){return g===!0?Ni(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort},Ft.weekdaysParse=function(g,w,R){var H,te;if(this._weekdaysParseExact)return(function(Mt,Be,Ke){var yt,ft,Vt,Mt=Mt.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],yt=0;yt<7;++yt)Vt=v([2e3,1]).day(yt),this._minWeekdaysParse[yt]=this.weekdaysMin(Vt,"").toLocaleLowerCase(),this._shortWeekdaysParse[yt]=this.weekdaysShort(Vt,"").toLocaleLowerCase(),this._weekdaysParse[yt]=this.weekdays(Vt,"").toLocaleLowerCase();return Ke?Be==="dddd"?(ft=ke.call(this._weekdaysParse,Mt))!==-1?ft:null:Be==="ddd"?(ft=ke.call(this._shortWeekdaysParse,Mt))!==-1?ft:null:(ft=ke.call(this._minWeekdaysParse,Mt))!==-1?ft:null:Be==="dddd"?(ft=ke.call(this._weekdaysParse,Mt))!==-1||(ft=ke.call(this._shortWeekdaysParse,Mt))!==-1||(ft=ke.call(this._minWeekdaysParse,Mt))!==-1?ft:null:Be==="ddd"?(ft=ke.call(this._shortWeekdaysParse,Mt))!==-1||(ft=ke.call(this._weekdaysParse,Mt))!==-1||(ft=ke.call(this._minWeekdaysParse,Mt))!==-1?ft:null:(ft=ke.call(this._minWeekdaysParse,Mt))!==-1||(ft=ke.call(this._weekdaysParse,Mt))!==-1||(ft=ke.call(this._shortWeekdaysParse,Mt))!==-1?ft:null}).call(this,g,w,R);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),H=0;H<7;H++)if(te=v([2e3,1]).day(H),R&&!this._fullWeekdaysParse[H]&&(this._fullWeekdaysParse[H]=new RegExp("^"+this.weekdays(te,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[H]=new RegExp("^"+this.weekdaysShort(te,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[H]=new RegExp("^"+this.weekdaysMin(te,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[H]||(te="^"+this.weekdays(te,"")+"|^"+this.weekdaysShort(te,"")+"|^"+this.weekdaysMin(te,""),this._weekdaysParse[H]=new RegExp(te.replace(".",""),"i")),R&&w==="dddd"&&this._fullWeekdaysParse[H].test(g)||R&&w==="ddd"&&this._shortWeekdaysParse[H].test(g)||R&&w==="dd"&&this._minWeekdaysParse[H].test(g)||!R&&this._weekdaysParse[H].test(g))return H},Ft.weekdaysRegex=function(g){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ti.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Se),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)},Ft.weekdaysShortRegex=function(g){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ti.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Xe),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Ft.weekdaysMinRegex=function(g){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ti.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=xt),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Ft.isPM=function(g){return(g+"").toLowerCase().charAt(0)==="p"},Ft.meridiem=function(g,w,R){return 11<g?R?"pm":"PM":R?"am":"AM"},tr("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(g){var w=g%10;return g+(Ue(g%100/10)===1?"th":w==1?"st":w==2?"nd":w==3?"rd":"th")}}),n.lang=Z("moment.lang is deprecated. Use moment.locale instead.",tr),n.langData=Z("moment.langData is deprecated. Use moment.localeData instead.",mr);var xr=Math.abs;function Ol(g,w,R,H){return w=Oi(w,R),g._milliseconds+=H*w._milliseconds,g._days+=H*w._days,g._months+=H*w._months,g._bubble()}function xs(g){return g<0?Math.floor(g):Math.ceil(g)}function Al(g){return 4800*g/146097}function Ts(g){return 146097*g/4800}function nn(g){return function(){return this.as(g)}}Pe=nn("ms"),ge=nn("s"),z=nn("m"),re=nn("h"),X=nn("d"),Bn=nn("w"),Ge=nn("M"),qi=nn("Q"),wr=nn("y");function To(g){return function(){return this.isValid()?this._data[g]:NaN}}var rn=To("milliseconds"),Kn=To("seconds"),Oo=To("minutes"),Ft=To("hours"),Qs=To("days"),Js=To("months"),$i=To("years"),Un=Math.round,Ao={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fd(g,w,R,H){var ft=Oi(g).abs(),Vt=Un(ft.as("s")),te=Un(ft.as("m")),we=Un(ft.as("h")),Be=Un(ft.as("d")),Ke=Un(ft.as("M")),yt=Un(ft.as("w")),ft=Un(ft.as("y")),Vt=(Vt<=R.ss?["s",Vt]:Vt<R.s&&["ss",Vt])||te<=1&&["m"]||te<R.m&&["mm",te]||we<=1&&["h"]||we<R.h&&["hh",we]||Be<=1&&["d"]||Be<R.d&&["dd",Be];return(Vt=(Vt=R.w!=null?Vt||yt<=1&&["w"]||yt<R.w&&["ww",yt]:Vt)||Ke<=1&&["M"]||Ke<R.M&&["MM",Ke]||ft<=1&&["y"]||["yy",ft])[2]=w,Vt[3]=0<+g,Vt[4]=H,(function(Mt,Ki,ln,Zi,is){return is.relativeTime(Ki||1,!!ln,Mt,Zi)}).apply(null,Vt)}var Os=Math.abs;function ts(g){return(0<g)-(g<0)||+g}function el(){if(!this.isValid())return this.localeData().invalidDate();var g,w,R,H,te,we,Be,Ke=Os(this._milliseconds)/1e3,yt=Os(this._days),ft=Os(this._months),Vt=this.asSeconds();return Vt?(g=ot(Ke/60),w=ot(g/60),Ke%=60,g%=60,R=ot(ft/12),ft%=12,H=Ke?Ke.toFixed(3).replace(/\.?0+$/,""):"",te=ts(this._months)!==ts(Vt)?"-":"",we=ts(this._days)!==ts(Vt)?"-":"",Be=ts(this._milliseconds)!==ts(Vt)?"-":"",(Vt<0?"-":"")+"P"+(R?te+R+"Y":"")+(ft?te+ft+"M":"")+(yt?we+yt+"D":"")+(w||g||Ke?"T":"")+(w?Be+w+"H":"")+(g?Be+g+"M":"")+(Ke?Be+H+"S":"")):"P0D"}var hi=ui.prototype;return hi.isValid=function(){return this._isValid},hi.abs=function(){var g=this._data;return this._milliseconds=xr(this._milliseconds),this._days=xr(this._days),this._months=xr(this._months),g.milliseconds=xr(g.milliseconds),g.seconds=xr(g.seconds),g.minutes=xr(g.minutes),g.hours=xr(g.hours),g.months=xr(g.months),g.years=xr(g.years),this},hi.add=function(g,w){return Ol(this,g,w,1)},hi.subtract=function(g,w){return Ol(this,g,w,-1)},hi.as=function(g){if(!this.isValid())return NaN;var w,R,H=this._milliseconds;if((g=ze(g))==="month"||g==="quarter"||g==="year")switch(w=this._days+H/864e5,R=this._months+Al(w),g){case"month":return R;case"quarter":return R/3;case"year":return R/12}else switch(w=this._days+Math.round(Ts(this._months)),g){case"week":return w/7+H/6048e5;case"day":return w+H/864e5;case"hour":return 24*w+H/36e5;case"minute":return 1440*w+H/6e4;case"second":return 86400*w+H/1e3;case"millisecond":return Math.floor(864e5*w)+H;default:throw new Error("Unknown unit "+g)}},hi.asMilliseconds=Pe,hi.asSeconds=ge,hi.asMinutes=z,hi.asHours=re,hi.asDays=X,hi.asWeeks=Bn,hi.asMonths=Ge,hi.asQuarters=qi,hi.asYears=wr,hi.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*Ue(this._months/12):NaN},hi._bubble=function(){var g=this._milliseconds,w=this._days,R=this._months,H=this._data;return 0<=g&&0<=w&&0<=R||g<=0&&w<=0&&R<=0||(g+=864e5*xs(Ts(R)+w),R=w=0),H.milliseconds=g%1e3,g=ot(g/1e3),H.seconds=g%60,g=ot(g/60),H.minutes=g%60,g=ot(g/60),H.hours=g%24,w+=ot(g/24),R+=g=ot(Al(w)),w-=xs(Ts(g)),g=ot(R/12),R%=12,H.days=w,H.months=R,H.years=g,this},hi.clone=function(){return Oi(this)},hi.get=function(g){return g=ze(g),this.isValid()?this[g+"s"]():NaN},hi.milliseconds=rn,hi.seconds=Kn,hi.minutes=Oo,hi.hours=Ft,hi.days=Qs,hi.weeks=function(){return ot(this.days()/7)},hi.months=Js,hi.years=$i,hi.humanize=function(g,w){if(!this.isValid())return this.localeData().invalidDate();var R=!1,H=Ao;return typeof g=="object"&&(w=g,g=!1),typeof g=="boolean"&&(R=g),typeof w=="object"&&(H=Object.assign({},Ao,w),w.s!=null&&w.ss==null&&(H.ss=w.s-1)),g=this.localeData(),w=fd(this,!R,H,g),R&&(w=g.pastFuture(+this,w)),g.postformat(w)},hi.toISOString=el,hi.toString=el,hi.toJSON=el,hi.locale=Es,hi.localeData=ki,hi.toIsoString=Z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",el),hi.lang=Ct,De("X",0,0,"unix"),De("x",0,0,"valueOf"),Le("x",me),Le("X",/[+-]?\d+(\.\d{1,3})?/),W("X",function(g,w,R){R._d=new Date(1e3*parseFloat(g))}),W("x",function(g,w,R){R._d=new Date(Ue(g))}),n.version="2.29.4",e=dt,n.fn=ee,n.min=function(){return At("isBefore",[].slice.call(arguments,0))},n.max=function(){return At("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=v,n.unix=function(g){return dt(1e3*g)},n.months=function(g,w){return qn(g,w,"months")},n.isDate=c,n.locale=tr,n.invalid=x,n.duration=Oi,n.isMoment=M,n.weekdays=function(g,w,R){return Zs(g,w,R,"weekdays")},n.parseZone=function(){return dt.apply(null,arguments).parseZone()},n.localeData=mr,n.isDuration=Ci,n.monthsShort=function(g,w){return qn(g,w,"monthsShort")},n.weekdaysMin=function(g,w,R){return Zs(g,w,R,"weekdaysMin")},n.defineLocale=Co,n.updateLocale=function(g,w){var R,H;return w!=null?(H=Wn,qt[g]!=null&&qt[g].parentLocale!=null?qt[g].set(J(qt[g]._config,w)):(w=J(H=(R=er(g))!=null?R._config:H,w),R==null&&(w.abbr=g),(H=new U(w)).parentLocale=qt[g],qt[g]=H),tr(g)):qt[g]!=null&&(qt[g].parentLocale!=null?(qt[g]=qt[g].parentLocale,g===tr()&&tr(g)):qt[g]!=null&&delete qt[g]),qt[g]},n.locales=function(){return F(qt)},n.weekdaysShort=function(g,w,R){return Zs(g,w,R,"weekdaysShort")},n.normalizeUnits=ze,n.relativeTimeRounding=function(g){return g===void 0?Un:typeof g=="function"&&(Un=g,!0)},n.relativeTimeThreshold=function(g,w){return Ao[g]!==void 0&&(w===void 0?Ao[g]:(Ao[g]=w,g==="s"&&(Ao.ss=w-1),!0))},n.calendarFormat=function(g,w){return(g=g.diff(w,"days",!0))<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"},n.prototype=ee,n.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"},n})})(Op);var Ap=Op.exports;const Us=eh(Ap),hs=pl({__proto__:null,default:Us},[Ap]);class je{}je.locales={TEXT_ALL_SELECTED:"All Selected",TEXT_ALL_X_RECORDS_SELECTED:"All {{x}} records selected",TEXT_APPLY_MASS_UPDATE:"Apply Mass Update",TEXT_APPLY_TO_SELECTION:"Update Selection",TEXT_CANCEL:"Cancel",TEXT_CLEAR_ALL_FILTERS:"Clear all Filters",TEXT_CLEAR_ALL_GROUPING:"Clear all Grouping",TEXT_CLEAR_ALL_SORTING:"Clear all Sorting",TEXT_CLEAR_PINNING:"Unfreeze Columns/Rows",TEXT_CLONE:"Clone",TEXT_COLLAPSE_ALL_GROUPS:"Collapse all Groups",TEXT_CONTAINS:"Contains",TEXT_COLUMNS:"Columns",TEXT_COLUMN_RESIZE_BY_CONTENT:"Resize by Content",TEXT_COMMANDS:"Commands",TEXT_COPY:"Copy",TEXT_DROP_COLUMN_HEADER_TO_GROUP_BY:"Drop a column header here to group by the column",TEXT_EQUALS:"Equals",TEXT_EQUAL_TO:"Equal to",TEXT_ENDS_WITH:"Ends With",TEXT_ERROR_EDITABLE_GRID_REQUIRED:"Your grid must be editable in order to use the Composite Editor Modal.",TEXT_ERROR_ENABLE_CELL_NAVIGATION_REQUIRED:'Composite Editor requires the flag "enableCellNavigation" to be set to True in your Grid Options.',TEXT_ERROR_NO_CHANGES_DETECTED:"Sorry we could not detect any changes.",TEXT_ERROR_NO_EDITOR_FOUND:"We could not find any Editor in your Column Definition.",TEXT_ERROR_NO_RECORD_FOUND:"No records selected for edit or clone operation.",TEXT_ERROR_ROW_NOT_EDITABLE:"Current row is not editable.",TEXT_ERROR_ROW_SELECTION_REQUIRED:"You must select some rows before trying to apply new value(s).",TEXT_EXPAND_ALL_GROUPS:"Expand all Groups",TEXT_EXPORT_TO_CSV:"Export in CSV format",TEXT_EXPORT_TO_TEXT_FORMAT:"Export in Text format (Tab delimited)",TEXT_EXPORT_TO_EXCEL:"Export to Excel",TEXT_EXPORT_TO_TAB_DELIMITED:"Export in Text format (Tab delimited)",TEXT_FORCE_FIT_COLUMNS:"Force fit columns",TEXT_FREEZE_COLUMNS:"Freeze Columns",TEXT_GREATER_THAN:"Greater than",TEXT_GREATER_THAN_OR_EQUAL_TO:"Greater than or equal to",TEXT_GROUP_BY:"Group By",TEXT_HIDE_COLUMN:"Hide Column",TEXT_ITEMS:"items",TEXT_ITEMS_PER_PAGE:"items per page",TEXT_ITEMS_SELECTED:"items selected",TEXT_OF:"of",TEXT_OK:"OK",TEXT_LAST_UPDATE:"Last Update",TEXT_LESS_THAN:"Less than",TEXT_LESS_THAN_OR_EQUAL_TO:"Less than or equal to",TEXT_NOT_CONTAINS:"Not contains",TEXT_NOT_EQUAL_TO:"Not equal to",TEXT_PAGE:"Page",TEXT_RECORDS_SELECTED:"records selected",TEXT_REFRESH_DATASET:"Refresh Dataset",TEXT_REMOVE_FILTER:"Remove Filter",TEXT_REMOVE_SORT:"Remove Sort",TEXT_RESET_INPUT_VALUE:"Reset Input Value",TEXT_RESET_FORM:"Reset Form",TEXT_SAVE:"Save",TEXT_SELECT_ALL:"Select All",TEXT_SYNCHRONOUS_RESIZE:"Synchronous resize",TEXT_SORT_ASCENDING:"Sort Ascending",TEXT_SORT_DESCENDING:"Sort Descending",TEXT_STARTS_WITH:"Starts With",TEXT_TOGGLE_ALL_GROUPS:"Toggle all Groups",TEXT_TOGGLE_FILTER_ROW:"Toggle Filter Row",TEXT_TOGGLE_PRE_HEADER_ROW:"Toggle Pre-Header Row",TEXT_UNFREEZE_COLUMNS:"Unfreeze Columns",TEXT_X_OF_Y_SELECTED:"# of % selected",TEXT_X_OF_Y_MASS_SELECTED:"{{x}} of {{y}} selected"},je.treeDataProperties={CHILDREN_PROP:"children",COLLAPSED_PROP:"__collapsed",HAS_CHILDREN_PROP:"__hasChildren",TREE_LEVEL_PROP:"__treeLevel",PARENT_PROP:"__parentId"},je.DEFAULT_FORMATTER_NUMBER_MIN_DECIMAL=2,je.DEFAULT_FORMATTER_NUMBER_MAX_DECIMAL=2,je.DEFAULT_FORMATTER_CURRENCY_MIN_DECIMAL=2,je.DEFAULT_FORMATTER_CURRENCY_MAX_DECIMAL=4,je.DEFAULT_FORMATTER_PERCENT_MIN_DECIMAL=void 0,je.DEFAULT_FORMATTER_PERCENT_MAX_DECIMAL=void 0,je.DEFAULT_NUMBER_DECIMAL_SEPARATOR=".",je.DEFAULT_NUMBER_THOUSAND_SEPARATOR="",je.DEFAULT_NEGATIVE_NUMBER_WRAPPED_IN_BRAQUET=!1,je.SLIDER_DEFAULT_MIN_VALUE=0,je.SLIDER_DEFAULT_MAX_VALUE=100,je.SLIDER_DEFAULT_STEP=1,je.VALIDATION_REQUIRED_FIELD="Field is required",je.VALIDATION_EDITOR_VALID_NUMBER="Please enter a valid number",je.VALIDATION_EDITOR_VALID_INTEGER="Please enter a valid integer number",je.VALIDATION_EDITOR_INTEGER_BETWEEN="Please enter a valid integer number between {{minValue}} and {{maxValue}}",je.VALIDATION_EDITOR_INTEGER_MAX="Please enter a valid integer number that is lower than {{maxValue}}",je.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE="Please enter a valid integer number that is lower than or equal to {{maxValue}}",je.VALIDATION_EDITOR_INTEGER_MIN="Please enter a valid integer number that is greater than {{minValue}}",je.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE="Please enter a valid integer number that is greater than or equal to {{minValue}}",je.VALIDATION_EDITOR_NUMBER_BETWEEN="Please enter a valid number between {{minValue}} and {{maxValue}}",je.VALIDATION_EDITOR_NUMBER_MAX="Please enter a valid number that is lower than {{maxValue}}",je.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE="Please enter a valid number that is lower than or equal to {{maxValue}}",je.VALIDATION_EDITOR_NUMBER_MIN="Please enter a valid number that is greater than {{minValue}}",je.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE="Please enter a valid number that is greater than or equal to {{minValue}}",je.VALIDATION_EDITOR_DECIMAL_BETWEEN="Please enter a valid number with a maximum of {{maxDecimal}} decimals",je.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN="Please make sure your text length is between {{minLength}} and {{maxLength}} characters",je.VALIDATION_EDITOR_TEXT_MAX_LENGTH="Please make sure your text is less than {{maxLength}} characters",je.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE="Please make sure your text is less than or equal to {{maxLength}} characters",je.VALIDATION_EDITOR_TEXT_MIN_LENGTH="Please make sure your text is more than {{minLength}} character(s)",je.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE="Please make sure your text is at least {{minLength}} character(s)";var th;(function(a){a[a.camelCase=0]="camelCase",a[a.pascalCase=1]="pascalCase",a[a.snakeCase=2]="snakeCase",a[a.kebabCase=3]="kebabCase"})(th||(th={}));var fs;(function(a){a.colon=":",a.comma=",",a.equalSign="=",a.pipe="|",a.semicolon=";",a.space=" ",a.tab=" ",a.doubleColon="::",a.doublePipe="||",a.doubleSemicolon=";;"})(fs||(fs={}));var ii;(function(a){a.autoTooltip="autoTooltip",a.cellExternalCopyManager="cellExternalCopyManager",a.cellMenu="cellMenu",a.checkboxSelector="checkboxSelector",a.columnPicker="columnPicker",a.contextMenu="contextMenu",a.customTooltip="customTooltip",a.draggableGrouping="draggableGrouping",a.groupItemMetaProvider="groupItemMetaProvider",a.gridMenu="gridMenu",a.headerButton="headerButton",a.headerMenu="headerMenu",a.rowDetailView="rowDetailView",a.rowMoveManager="rowMoveManager",a.rowSelection="rowSelection"})(ii||(ii={}));const ie={unknown:"unknown",string:"string",boolean:"boolean",integer:"integer",float:"float",number:"number",date:"date",dateIso:"dateIso",dateUtc:"dateUtc",dateTime:"dateTime",dateTimeIso:"dateTimeIso",dateTimeIsoAmPm:"dateTimeIsoAmPm",dateTimeIsoAM_PM:"dateTimeIsoAM_PM",dateTimeShortIso:"dateTimeShortIso",dateEuro:"dateEuro",dateEuroShort:"dateEuroShort",dateTimeShortEuro:"dateTimeShortEuro",dateTimeEuro:"dateTimeEuro",dateTimeEuroAmPm:"dateTimeEuroAmPm",dateTimeEuroAM_PM:"dateTimeEuroAM_PM",dateTimeEuroShort:"dateTimeEuroShort",dateTimeEuroShortAmPm:"dateTimeEuroShortAmPm",dateTimeEuroShortAM_PM:"dateTimeEuroShortAM_PM",dateUs:"dateUs",dateUsShort:"dateUsShort",dateTimeShortUs:"dateTimeShortUs",dateTimeUs:"dateTimeUs",dateTimeUsAmPm:"dateTimeUsAmPm",dateTimeUsAM_PM:"dateTimeUsAM_PM",dateTimeUsShort:"dateTimeUsShort",dateTimeUsShortAmPm:"dateTimeUsShortAmPm",dateTimeUsShortAM_PM:"dateTimeUsShortAM_PM",object:"object",password:"password",text:"text",readonly:"readonly"};var an;(function(a){a.csv="csv",a.txt="txt",a.xls="xls",a.xlsx="xlsx"})(an||(an={}));var Vl;(function(a){a.merge="merge",a.chain="chain"})(Vl||(Vl={}));var Yd;(function(a){a.none="NOA",a.legacyOff="LOF",a.legacyForceFit="LFF",a.ignoreViewport="IGV",a.fitColsToViewport="FCV",a.fitViewportToCols="FVC"})(Yd||(Yd={}));var ur;(function(a){a.columns="columns",a.filter="filter",a.pagination="pagination",a.pinning="pinning",a.rowSelection="rowSelection",a.sorter="sorter",a.treeData="treeData"})(ur||(ur={}));var xi;(function(a){a[a.C=67]="C",a[a.V=86]="V",a[a.BACKSPACE=8]="BACKSPACE",a[a.DELETE=46]="DELETE",a[a.DOWN=40]="DOWN",a[a.END=35]="END",a[a.ENTER=13]="ENTER",a[a.ESCAPE=27]="ESCAPE",a[a.HOME=36]="HOME",a[a.INSERT=45]="INSERT",a[a.LEFT=37]="LEFT",a[a.PAGE_DOWN=34]="PAGE_DOWN",a[a.PAGE_UP=33]="PAGE_UP",a[a.RIGHT=39]="RIGHT",a[a.TAB=9]="TAB",a[a.UP=38]="UP",a[a.SPACE=32]="SPACE"})(xi||(xi={}));var Nt;(function(a){a.empty="",a.contains="Contains",a.notContains="Not_Contains",a.lessThan="LT",a.lessThanOrEqual="LE",a.greaterThan="GT",a.greaterThanOrEqual="GE",a.notEqual="NE",a.equal="EQ",a.endsWith="EndsWith",a.rangeInclusive="RangeInclusive",a.rangeExclusive="RangeExclusive",a.startsWith="StartsWith",a.in="IN",a.notIn="NOT_IN",a.inContains="IN_CONTAINS",a.notInContains="NOT_IN_CONTAINS",a.inCollection="IN_COLLECTION",a.notInCollection="NOT_IN_COLLECTION"})(Nt||(Nt={}));var Do;(function(a){a.asc="asc",a.ASC="ASC",a.desc="desc",a.DESC="DESC"})(Do||(Do={}));var ji;(function(a){a[a.asc=1]="asc",a[a.desc=-1]="desc",a[a.neutral=0]="neutral"})(ji||(ji={}));var ps;(function(a){a.toggleCollapse="toggle-collapse",a.fullExpand="full-expand",a.fullCollapse="full-collapse",a.toggleExpand="toggle-expand"})(ps||(ps={}));const ih=Object.freeze(Object.defineProperty({__proto__:null,get CaseType(){return th},get DelimiterType(){return fs},get EmitterType(){return Ji},get ExtensionName(){return ii},FieldType:ie,get FileType(){return an},get FilterMultiplePassType(){return Vl},get GridAutosizeColsMode(){return Yd},get GridStateType(){return ur},get KeyCode(){return xi},get OperatorType(){return Nt},get SortDirection(){return Do},get SortDirectionNumber(){return ji},get ToggleStateChangeType(){return ps}},Symbol.toStringTag,{value:"Module"})),t_=Us||hs;class La extends Error{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}}function kp(a){let t=!1;return a instanceof Promise?{promise:a.then(e=>{if(t)throw new La("Cancelled Promise");return e}),cancel:()=>t=!0}:a}function Ip(a,t,e=""){let n=t;if(t instanceof Promise)return t;if(a.isObservable(t)&&(n=a.firstValueFrom(t)),!(n instanceof Promise))throw new Error(`Something went wrong, Slickgrid-Universal ${e} is not able to convert the Observable into a Promise.`);return n}function jd(a,t,e=0){var n;const r=(n=t==null?void 0:t.childrenPropName)!==null&&n!==void 0?n:je.treeDataProperties.CHILDREN_PROP;if(Array.isArray(a))for(const o of a)o&&(Array.isArray(o[r])&&o[r].length>0&&(e++,jd(o[r],t,e),e--),o[t.levelPropName]=e)}function Ha(a,t,e=0,n=null){var r;const o=(r=t==null?void 0:t.childrenPropName)!==null&&r!==void 0?r:je.treeDataProperties.CHILDREN_PROP,{aggregator:s}=t;if(Array.isArray(a)){for(const l of a)if(l){const u=Array.isArray(l[o]);Array.isArray(l[o])&&l[o].length>0&&(s.init(l,!0),e++,Ha(l[o],t,e,l),e--),n&&s.isInitialized&&typeof s.accumulate=="function"&&!(l!=null&&l.__filteredOut)&&(s.accumulate(l,u),s.storeResult(n.__treeTotals)),l[t.levelPropName]=e}}}function Dp(a,t){var e,n,r,o,s;const l=(e=t==null?void 0:t.identifierPropName)!==null&&e!==void 0?e:"id",u=(n=t==null?void 0:t.childrenPropName)!==null&&n!==void 0?n:je.treeDataProperties.CHILDREN_PROP,h=(r=t==null?void 0:t.hasChildrenPropName)!==null&&r!==void 0?r:je.treeDataProperties.HAS_CHILDREN_PROP,c=(o=t==null?void 0:t.parentPropName)!==null&&o!==void 0?o:je.treeDataProperties.PARENT_PROP,p=(s=t==null?void 0:t.levelPropName)!==null&&s!==void 0?s:je.treeDataProperties.TREE_LEVEL_PROP;return t!=null&&t.shouldAddTreeLevelNumber&&(t!=null&&t.aggregators?t.aggregators.forEach(v=>{Ha(a,{childrenPropName:u,levelPropName:p,aggregator:v})}):jd(a,{childrenPropName:u,levelPropName:p})),e_(a,v=>v[u],(v,_)=>({[l]:v[l],[c]:_!==void 0?_[l]:null,[h]:!!v[u],...Pp(v,u)}))}function Rp(a,t){var e,n,r,o,s;const l=(e=t==null?void 0:t.identifierPropName)!==null&&e!==void 0?e:"id",u=(n=t==null?void 0:t.childrenPropName)!==null&&n!==void 0?n:je.treeDataProperties.CHILDREN_PROP,h=(r=t==null?void 0:t.parentPropName)!==null&&r!==void 0?r:je.treeDataProperties.PARENT_PROP,c=(o=t==null?void 0:t.levelPropName)!==null&&o!==void 0?o:je.treeDataProperties.TREE_LEVEL_PROP,p=(s=t==null?void 0:t.collapsedPropName)!==null&&s!==void 0?s:je.treeDataProperties.COLLAPSED_PROP,m=a||[],v=[],_={};return m.forEach(C=>_[C[l]]=C),Object.keys(_).forEach(C=>{var x;const S=_[C];if(!(h in S)||S[h]===null||S[h]===void 0||S[h]==="")v.push(S);else if(S[h]in _){const E=_[S[h]];u in E||(E[u]=[]),E[u].push(S),E[p]===void 0&&(E[p]=(x=t==null?void 0:t.initiallyCollapsed)!==null&&x!==void 0?x:!1)}}),t!=null&&t.aggregators?t.aggregators.forEach(C=>{Ha(v,{childrenPropName:u,levelPropName:c,aggregator:C},0)}):jd(v,{childrenPropName:u,levelPropName:c},0),v}function Ba(a,t,e){if(!e)throw new Error('findRecursive requires parameter "childrenPropertyName"');const n=a.find(t),r=a.filter(o=>(o==null?void 0:o.hasOwnProperty(e))&&o[e]);if(n)return n;if(r.length){const o=[];return r.forEach(s=>{s!=null&&s.hasOwnProperty(e)&&o.push(...s[e])}),Ba(o,t,e)}}function Gs(a,t,e,n=".",r=""){if(isNaN(+a))return a;const o=t===void 0?2:t,s=e===void 0?2:e;let l=String(Math.round(+a*Math.pow(10,s))/Math.pow(10,s));for(l.indexOf(".")<0&&o>0&&(l+=".");l.length-l.indexOf(".")<=o;)l+="0";const u=l.split(".");let h,c;r?h=u.length>=1?ms(u[0],r):void 0:h=u.length>=1?u[0]:l,u.length>1&&(c=u[1]);let p="";return h!==void 0&&c!==void 0?p=`${h}${n}${c}`:h!=null&&(p=h),p}function wn(a,t,e,n,r="",o="",s=".",l=""){if(isNaN(+a))return a;const u=Math.round(parseFloat(a)*1e6)/1e6;if(u<0){const h=Math.abs(u);if(n){if(!isNaN(t)||!isNaN(e))return`(${r}${Gs(h,t,e,s,l)}${o})`;const c=ms(`${h}`,l);return`(${r}${c}${o})`}else{if(!isNaN(t)||!isNaN(e))return`-${r}${Gs(h,t,e,s,l)}${o}`;const c=ms(`${h}`,l);return`-${r}${c}${o}`}}else{if(!isNaN(t)||!isNaN(e))return`${r}${Gs(a,t,e,s,l)}${o}`;const h=ms(`${a}`,l);return`${r}${h}${o}`}}function Va(a,t,e){if(typeof a.queryFieldNameGetterFn=="function"){const n=a.queryFieldNameGetterFn(t);(n==null?void 0:n.indexOf("."))>=0?e=_n(t,n):e=t.hasOwnProperty(n)?t[n]:e}return e}function _n(a,t){return!a||!t?a:t.split(".").reduce((e,n)=>e&&e[n],a)}function ho(a){return a&&a.translationNamespace?a.translationNamespace+(a.translationNamespaceSeparator||""):""}function za(a){return a.outputType||a.type||ie.string}function nh(a){switch(a){case ie.date:case ie.dateTime:case ie.dateIso:case ie.dateTimeIso:case ie.dateTimeShortIso:case ie.dateTimeIsoAmPm:case ie.dateTimeIsoAM_PM:case ie.dateEuro:case ie.dateEuroShort:case ie.dateTimeEuro:case ie.dateTimeShortEuro:case ie.dateTimeEuroAmPm:case ie.dateTimeEuroAM_PM:case ie.dateTimeEuroShort:case ie.dateTimeEuroShortAmPm:case ie.dateTimeEuroShortAM_PM:case ie.dateUs:case ie.dateUsShort:case ie.dateTimeUs:case ie.dateTimeShortUs:case ie.dateTimeUsAmPm:case ie.dateTimeUsAM_PM:case ie.dateTimeUsShort:case ie.dateTimeUsShortAmPm:case ie.dateTimeUsShortAM_PM:case ie.dateUtc:return!0;default:return!1}}function Fr(a){let t;switch(a){case ie.dateTime:case ie.dateTimeIso:t="YYYY-MM-DD HH:mm:ss";break;case ie.dateTimeIsoAmPm:t="YYYY-MM-DD hh:mm:ss a";break;case ie.dateTimeIsoAM_PM:t="YYYY-MM-DD hh:mm:ss A";break;case ie.dateTimeShortIso:t="YYYY-MM-DD HH:mm";break;case ie.dateEuro:t="DD/MM/YYYY";break;case ie.dateEuroShort:t="D/M/YY";break;case ie.dateTimeEuro:t="DD/MM/YYYY HH:mm:ss";break;case ie.dateTimeShortEuro:t="DD/MM/YYYY HH:mm";break;case ie.dateTimeEuroAmPm:t="DD/MM/YYYY hh:mm:ss a";break;case ie.dateTimeEuroAM_PM:t="DD/MM/YYYY hh:mm:ss A";break;case ie.dateTimeEuroShort:t="D/M/YY H:m:s";break;case ie.dateTimeEuroShortAmPm:t="D/M/YY h:m:s a";break;case ie.dateTimeEuroShortAM_PM:t="D/M/YY h:m:s A";break;case ie.dateUs:t="MM/DD/YYYY";break;case ie.dateUsShort:t="M/D/YY";break;case ie.dateTimeUs:t="MM/DD/YYYY HH:mm:ss";break;case ie.dateTimeUsAmPm:t="MM/DD/YYYY hh:mm:ss a";break;case ie.dateTimeUsAM_PM:t="MM/DD/YYYY hh:mm:ss A";break;case ie.dateTimeUsShort:t="M/D/YY H:m:s";break;case ie.dateTimeUsShortAmPm:t="M/D/YY h:m:s a";break;case ie.dateTimeUsShortAM_PM:t="M/D/YY h:m:s A";break;case ie.dateTimeShortUs:t="MM/DD/YYYY HH:mm";break;case ie.dateUtc:t="YYYY-MM-DDTHH:mm:ss.SSSZ";break;case ie.date:case ie.dateIso:default:t="YYYY-MM-DD";break}return t}function Ua(a){let t;switch(a){case ie.dateTime:case ie.dateTimeIso:t="Y-m-d H:i:S";break;case ie.dateTimeShortIso:t="Y-m-d H:i";break;case ie.dateTimeIsoAmPm:case ie.dateTimeIsoAM_PM:t="Y-m-d h:i:S K";break;case ie.dateEuro:t="d/m/Y";break;case ie.dateEuroShort:t="d/m/y";break;case ie.dateTimeEuro:t="d/m/Y H:i:S";break;case ie.dateTimeShortEuro:t="d/m/y H:i";break;case ie.dateTimeEuroAmPm:t="d/m/Y h:i:S K";break;case ie.dateTimeEuroAM_PM:t="d/m/Y h:i:s K";break;case ie.dateTimeEuroShort:t="d/m/y H:i:s";break;case ie.dateTimeEuroShortAmPm:t="d/m/y h:i:s K";break;case ie.dateUs:t="m/d/Y";break;case ie.dateUsShort:t="m/d/y";break;case ie.dateTimeUs:t="m/d/Y H:i:S";break;case ie.dateTimeShortUs:t="m/d/y H:i";break;case ie.dateTimeUsAmPm:t="m/d/Y h:i:S K";break;case ie.dateTimeUsAM_PM:t="m/d/Y h:i:s K";break;case ie.dateTimeUsShort:t="m/d/y H:i:s";break;case ie.dateTimeUsShortAmPm:t="m/d/y h:i:s K";break;case ie.dateUtc:t="Z";break;case ie.date:case ie.dateIso:default:t="Y-m-d";break}return t}function i_(a){let t;switch(a){case"<":case"LT":t=Nt.lessThan;break;case"<=":case"LE":t=Nt.lessThanOrEqual;break;case">":case"GT":t=Nt.greaterThan;break;case">=":case"GE":t=Nt.greaterThanOrEqual;break;case"<>":case"!=":case"NE":t=Nt.notEqual;break;case"*":case"a*":case"StartsWith":t=Nt.startsWith;break;case"*z":case"EndsWith":t=Nt.endsWith;break;case"=":case"==":case"EQ":t=Nt.equal;break;case"IN":t=Nt.in;break;case"NIN":case"NOT_IN":t=Nt.notIn;break;case"Not_Contains":case"NOT_CONTAINS":t=Nt.notContains;break;case"Contains":case"CONTAINS":default:t=Nt.contains;break}return t}function zl(a){let t="";switch(a){case Nt.greaterThan:case">":t=">";break;case Nt.greaterThanOrEqual:case">=":t=">=";break;case Nt.lessThan:case"<":t="<";break;case Nt.lessThanOrEqual:case"<=":t="<=";break;case Nt.notEqual:case"<>":t="<>";break;case Nt.equal:case"=":case"==":case"EQ":t="=";break;case Nt.startsWith:case"a*":case"*":t="a*";break;case Nt.endsWith:case"*z":t="*z";break;default:t=a;break}return t}function rh(a){let t;if(nh(a))t=Nt.equal;else switch(a){case ie.unknown:case ie.string:case ie.text:case ie.password:case ie.readonly:t=Nt.contains;break;case ie.float:case ie.number:default:t=Nt.equal;break}return t}function Pp(a,t){return Object.keys(a).reduce((e,n)=>(n!==t&&(e[n]=a[n]),e),{})}function n_(a,t){let e="";if(typeof a=="string"&&/^[0-9\-\/]*$/.test(a)){const n=decodeURIComponent(a),r=t_(new Date(n));r.isValid()&&r.year().toString().length===4&&(e=t?r.utc().format():r.format())}return e}function ms(a,t=","){if(a!=null){const e=`${a}`,n=e.split(".");return n.length===2?`${n[0].replace(/\B(?=(\d{3})+(?!\d))/g,t)}.${n[1]}`:e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}return a}function vs(a,t,e={}){return Array.isArray(a)?a.find(t)||e:a}function Xd(a){if(Array.isArray(a))for(;a.length>0;){const t=a.pop();t!=null&&t.unsubscribe&&t.unsubscribe()}return a}const r_=Object.freeze(Object.defineProperty({__proto__:null,CancelledException:La,addTreeLevelAndAggregatorsByMutation:Ha,addTreeLevelByMutation:jd,cancellablePromise:kp,castObservableToPromise:Ip,decimalFormatted:Gs,findItemInTreeStructure:Ba,findOrDefault:vs,flattenToParentChildArray:Dp,formatNumber:wn,getCellValueFromQueryFieldGetter:Va,getColumnFieldType:za,getDescendantProperty:_n,getTranslationPrefix:ho,isColumnDateType:nh,mapFlatpickrDateFormatWithFieldType:Ua,mapMomentDateFormatWithFieldType:Fr,mapOperatorByFieldType:rh,mapOperatorToShorthandDesignation:zl,mapOperatorType:i_,objectWithoutKey:Pp,parseUtcDate:n_,thousandSeparatorFormatted:ms,unflattenParentChildArrayToTree:Rp,unsubscribeAll:Xd},Symbol.toStringTag,{value:"Module"})),o_=(a,t,e)=>{e==null&&(e=ji.neutral);let n=0;return a===t?n=0:a===null?n=-1:t===null?n=1:e?n=a<t?-1:1:n=a<t?1:-1,e*n},s_=(a,t,e,n,r)=>{var o,s;if(!n||!n.dataKey)throw new Error('Sorting a "FieldType.object" requires you to provide the "dataKey" (object property name) of the object so that we can use it to sort correctly');const l=a!=null&&a.hasOwnProperty(n.dataKey)?a[n.dataKey]:a,u=t!=null&&t.hasOwnProperty(n.dataKey)?t[n.dataKey]:t,h=(s=(o=n==null?void 0:n.valueCouldBeUndefined)!==null&&o!==void 0?o:r==null?void 0:r.cellValueCouldBeUndefined)!==null&&s!==void 0?s:!1;e==null&&(e=ji.neutral);let c=0;return typeof a!="object"?c=-99e10:typeof t!="object"?c=99e10:l===null||h&&l===void 0?c=-1:u===null||h&&u===void 0?c=1:l===u?c=0:e?c=l<u?-1:1:c=l<u?1:-1,e*c};function l_(a,t,e="id"){let n=-1;t&&typeof t=="object"&&e in t?n=a.findIndex(r=>r[e]===t[e]):n=a.findIndex(r=>r===t),n<0&&a.push(t)}function Ga(a,t=" "){let e="";for(let n=0;n<a;n++)e+=t;return e}function oh(a,t){return a.filter((e,n)=>t!==n)}function fo(a){const t=()=>{const r={};for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=fo(a[o]));return r},e=()=>a.map(r=>fo(r)),n=Object.prototype.toString.call(a).slice(8,-1).toLowerCase();return n==="object"?t():n==="array"?e():a}function ml(a,...t){if(!t.length)return a;const e=t.shift();if(a=!Xo(a)&&Xo(e)?{}:a,Xo(a)&&Xo(e))for(const n in e)e.hasOwnProperty(n)&&(n in a?typeof a[n]!="object"||typeof e[n]!="object"?a[n]=e[n]:a[n].concat&&e[n].concat?a[n]=a[n].concat(e[n]):a[n]=ml(a[n],e[n]):a[n]=e[n]);return ml(a,...t)}function sh(a,...t){if(!t.length||t[0]===void 0)return a;const e=t.shift();if(a=!Xo(a)&&Xo(e)?{}:a,Xo(a)&&Xo(e))for(const n of Object.keys(e))typeof e[n]=="object"&&e[n]!==null&&sh(a[n],e[n]),(a[n]===null||a[n]===void 0)&&e[n]!==null&&e[n]!==void 0&&(a[n]=e[n]);return sh(a,...t)}function Fp(a){for(const t in a)a.hasOwnProperty(t)&&delete a[t];return a=null,a={},a}function lh(a){return a==null?!0:Object.entries(a).length===0}function Xo(a){return a!==null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)}function qd(a){return a==null||typeof a=="boolean"||typeof a=="number"||typeof a=="string"}function Kd(a){return a!=null&&a!==""}function en(a,t=!1){return t?a==null||typeof a=="string"?!1:!isNaN(a):a==null||a===""?!1:!isNaN(+a)}function Mp(a){return!a||a&&typeof a=="object"&&Object.keys(a).length===0}function Zd(a){return/(true|1)/i.test(a+"")}function Ul(a,t=!1){const e=typeof a.normalize=="function"?a.normalize("NFD").replace(/[\u0300-\u036f]/g,""):a;return t?e.toLowerCase():e}function cr(a,t,e){if(typeof t=="string"&&(t=t.split(".")),t.length>1){const n=t.shift();a&&n!==void 0&&cr(a[n]=Kd(a[n])&&(Array.isArray(a[n])||Object.prototype.toString.call(a[n])==="[object Object]")?a[n]:{},t,e)}else a&&t[0]&&(a[t[0]]=e)}function vl(a,t=!1){return typeof a=="string"?t?a.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()):a.charAt(0).toUpperCase()+a.slice(1):a}function ah(a){return typeof a=="string"?a.replace(/(?:^\w|[A-Z]|\b\w|[\s+\-_\/])/g,(t,e)=>/[\s+\-_\/]/.test(t)?"":e===0?t.toLowerCase():t.toUpperCase()):a}function Wa(a){return typeof a=="string"?ah(a).replace(/([A-Z])/g,"-$1").toLowerCase():a}function qr(a){if(typeof a=="string"){const t=a.replace(/([A-Z])|(\-)/g," $1").replace(/\s+/g," ").trim();return t.charAt(0).toUpperCase()+t.slice(1)}return a}function a_(a){return typeof a=="string"?ah(a).replace(/([A-Z])/g,"_$1").toLowerCase():a}function Np(a){return Array.isArray(a)&&a.length>0?a.filter((t,e)=>a.indexOf(t)>=e):a}function d_(a,t="id"){if(Array.isArray(a)&&a.length>0){const e=[],n=new Map;for(const r of a)r&&!n.has(r[t])&&(n.set(r[t],!0),e.push({id:r[t],name:r.name}));return e}return a}const u_=Object.freeze(Object.defineProperty({__proto__:null,addToArrayWhenNotExists:l_,addWhiteSpaces:Ga,arrayRemoveItemByIndex:oh,deepCopy:fo,deepMerge:ml,emptyObject:Fp,hasData:Kd,isEmptyObject:lh,isNumber:en,isObject:Xo,isObjectEmpty:Mp,isPrimitiveValue:qd,objectAssignAndExtend:sh,parseBoolean:Zd,removeAccentFromText:Ul,setDeepValue:cr,titleCase:vl,toCamelCase:ah,toKebabCase:Wa,toSentenceCase:qr,toSnakeCase:a_,uniqueArray:Np,uniqueObjectArray:d_},Symbol.toStringTag,{value:"Module"})),c_=(a,t,e,n,r)=>{var o,s;e==null&&(e=ji.neutral);let l=0;const u=(s=(o=n==null?void 0:n.valueCouldBeUndefined)!==null&&o!==void 0?o:r==null?void 0:r.cellValueCouldBeUndefined)!==null&&s!==void 0?s:!1;return a===t?l=0:a===null||u&&a===void 0?l=-1:t===null||u&&t===void 0?l=1:(r!=null&&r.ignoreAccentOnStringFilterAndSort&&(a=Ul(a,!1),t=Ul(t,!1)),e?l=a<t?-1:1:l=a<t?1:-1),e*l},Lp=(a,t,e,n,r)=>{var o,s;const l=(s=(o=n==null?void 0:n.valueCouldBeUndefined)!==null&&o!==void 0?o:r==null?void 0:r.cellValueCouldBeUndefined)!==null&&s!==void 0?s:!1,u=isNaN(a)||a===""||a===null||l&&a===void 0?-99e10:parseFloat(a),h=isNaN(t)||t===""||t===null||l&&t===void 0?-99e10:parseFloat(t);return e*(u===h?0:u>h?1:-1)},Qd=Us||hs;function Hp(a,t,e,n,r){let o=0;if(a===t)o=0;else{let s=Qd(a,n,r),l=Qd(t,n,r);s.isValid()||(s=new Date(1001,1,1)),l.isValid()||(l=new Date(1001,1,1)),o=s.valueOf()-l.valueOf()}return e*o}function Xi(a){const t=a===ie.date?Qd.ISO_8601:Fr(a);return(e,n,r)=>t===Qd.ISO_8601?Hp(e,n,r,t,!1):Hp(e,n,r,t,!0)}const gl={boolean:o_,date:Xi(ie.date),dateIso:Xi(ie.dateIso),dateUtc:Xi(ie.dateUtc),dateTime:Xi(ie.dateTime),dateTimeIso:Xi(ie.dateTimeIso),dateTimeIsoAmPm:Xi(ie.dateTimeIsoAmPm),dateTimeIsoAM_PM:Xi(ie.dateTimeIsoAM_PM),dateTimeShortIso:Xi(ie.dateTimeShortIso),dateEuro:Xi(ie.dateEuro),dateEuroShort:Xi(ie.dateEuroShort),dateTimeShortEuro:Xi(ie.dateTimeShortEuro),dateTimeEuro:Xi(ie.dateTimeEuro),dateTimeEuroAmPm:Xi(ie.dateTimeEuroAmPm),dateTimeEuroAM_PM:Xi(ie.dateTimeEuroAM_PM),dateTimeEuroShort:Xi(ie.dateTimeEuroShort),dateTimeEuroShortAmPm:Xi(ie.dateTimeEuroShortAmPm),dateTimeEuroShortAM_PM:Xi(ie.dateTimeEuroShortAM_PM),dateUs:Xi(ie.dateUs),dateUsShort:Xi(ie.dateUsShort),dateTimeShortUs:Xi(ie.dateTimeShortUs),dateTimeUs:Xi(ie.dateTimeUs),dateTimeUsAmPm:Xi(ie.dateTimeUsAmPm),dateTimeUsAM_PM:Xi(ie.dateTimeUsAM_PM),dateTimeUsShort:Xi(ie.dateTimeUsShort),dateTimeUsShortAmPm:Xi(ie.dateTimeUsShortAmPm),dateTimeUsShortAM_PM:Xi(ie.dateTimeUsShortAM_PM),numeric:Lp,objectString:s_,string:c_};function Gl(a,t,e,n,r,o){let s=0;switch(a){case ie.boolean:s=gl.boolean(t,e,n,r,o);break;case ie.float:case ie.integer:case ie.number:s=gl.numeric(t,e,n,r,o);break;case ie.date:case ie.dateIso:case ie.dateUtc:case ie.dateTime:case ie.dateTimeIso:case ie.dateTimeIsoAmPm:case ie.dateTimeIsoAM_PM:case ie.dateTimeShortIso:case ie.dateEuro:case ie.dateEuroShort:case ie.dateTimeShortEuro:case ie.dateTimeEuro:case ie.dateTimeEuroAmPm:case ie.dateTimeEuroAM_PM:case ie.dateTimeEuroShort:case ie.dateTimeEuroShortAmPm:case ie.dateTimeEuroShortAM_PM:case ie.dateUs:case ie.dateUsShort:case ie.dateTimeShortUs:case ie.dateTimeUs:case ie.dateTimeUsAmPm:case ie.dateTimeUsAM_PM:case ie.dateTimeUsShort:case ie.dateTimeUsShortAmPm:case ie.dateTimeUsShortAM_PM:s=Xi(a).call(this,t,e,n,r,o);break;case ie.object:s=gl.objectString(t,e,n,r,o);break;case ie.string:case ie.text:case ie.password:case ie.readonly:default:s=gl.string(t,e,n,r,o);break}return s}const h_=Object.freeze(Object.defineProperty({__proto__:null,sortByFieldType:Gl},Symbol.toStringTag,{value:"Module"}));var Ro;(function(a){a.camelCase="camelCase",a.kebabCase="kebabCase",a.lowerCase="lowerCase",a.lowerCaseWithoutOnPrefix="lowerCaseWithoutOnPrefix"})(Ro||(Ro={}));class Bp{get elementSource(){return this._elementSource}set elementSource(t){this._elementSource=t}get subscribedEvents(){return this._subscribedEvents}get subscribedEventNames(){return this._subscribedEvents.map(t=>t.name)}constructor(t){this._subscribedEvents=[],this.eventNamingStyle=Ro.camelCase,this._elementSource=t||document.createElement("div")}dispose(){var t;this.unsubscribeAll(),this._subscribedEvents=[],clearTimeout(this._timer),(t=this._elementSource)===null||t===void 0||t.remove(),this._elementSource=null}dispatchCustomEvent(t,e,n=!0,r=!0){var o;const s={bubbles:n,cancelable:r};return e&&(s.detail=e),(o=this._elementSource)===null||o===void 0?void 0:o.dispatchEvent(new CustomEvent(t,s))}getEventNameByNamingConvention(t,e){let n="";switch(this.eventNamingStyle){case Ro.camelCase:n=e!==""?`${e}${vl(t)}`:t;break;case Ro.kebabCase:n=e!==""?`${e}-${Wa(t)}`:Wa(t);break;case Ro.lowerCase:n=`${e}${t}`.toLowerCase();break;case Ro.lowerCaseWithoutOnPrefix:n=`${e}${t.replace(/^on/,"")}`.toLowerCase();break}return n}publish(t,e,n){const r=this.getEventNameByNamingConvention(t,"");return n?new Promise(o=>{this._timer=setTimeout(()=>o(this.dispatchCustomEvent(r,e,!0,!0)),n)}):this.dispatchCustomEvent(r,e,!0,!0)}subscribe(t,e){const n=this.getEventNameByNamingConvention(t,"");return this._elementSource.addEventListener(n,r=>e.call(null,r.detail)),this._subscribedEvents.push({name:n,listener:e}),{unsubscribe:()=>this.unsubscribe(n,e)}}subscribeEvent(t,e){const n=this.getEventNameByNamingConvention(t,"");return this._elementSource.addEventListener(n,e),this._subscribedEvents.push({name:n,listener:e}),{unsubscribe:()=>this.unsubscribe(n,e)}}unsubscribe(t,e,n=!0){const r=this.getEventNameByNamingConvention(t,"");this._elementSource.removeEventListener(r,e),n&&this.removeSubscribedEventWhenFound(t,e)}unsubscribeAll(t){if(Array.isArray(t)){let e;do e=t.pop(),e!=null&&e.dispose?e.dispose():e!=null&&e.unsubscribe&&e.unsubscribe();while(e)}else{let e=this._subscribedEvents.pop();for(;e;)this.unsubscribe(e.name,e.listener,!1),e=this._subscribedEvents.pop()}}removeSubscribedEventWhenFound(t,e){const n=this._subscribedEvents.findIndex(r=>r.name===t&&r.listener===e);n>=0&&this._subscribedEvents.splice(n,1)}}var Vp={exports:{}};(function(a,t){(function(e,n){a.exports=n()})(Pr,function(){function e(n){var r=document,o=n.container||r.createElement("div"),s=n.preventSubmit||0;o.id=o.id||"autocomplete-"+P();var l=o.style,u=n.debounceWaitMs||0,h=n.disableAutoSelect||!1,c=o.parentElement,p=[],m="",v=2,_=n.showOnFocus,C,x=0,S,E=!1,D=!1;if(n.minLength!==void 0&&(v=n.minLength),!n.input)throw new Error("input undefined");var A=n.input;o.className="autocomplete "+(n.className||""),o.setAttribute("role","listbox"),A.setAttribute("role","combobox"),A.setAttribute("aria-expanded","false"),A.setAttribute("aria-autocomplete","list"),A.setAttribute("aria-controls",o.id),A.setAttribute("aria-owns",o.id),A.setAttribute("aria-activedescendant",""),A.setAttribute("aria-haspopup","listbox"),l.position="absolute";function P(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}function M(){var k=o.parentNode;k&&k.removeChild(o)}function B(){S&&window.clearTimeout(S)}function Z(){o.parentNode||(c||r.body).appendChild(o)}function L(){return!!o.parentNode}function ae(){x++,p=[],m="",C=void 0,A.setAttribute("aria-activedescendant",""),A.setAttribute("aria-expanded","false"),M()}function _e(){if(!L())return;A.setAttribute("aria-expanded","true"),l.height="auto",l.width=A.offsetWidth+"px";var k=0,ee;function ge(){var $=r.documentElement,X=$.clientTop||r.body.clientTop||0,re=$.clientLeft||r.body.clientLeft||0,Pe=window.pageYOffset||$.scrollTop,Fe=window.pageXOffset||$.scrollLeft;ee=A.getBoundingClientRect();var me=ee.top+A.offsetHeight+Pe-X,We=ee.left+Fe-re;l.top=me+"px",l.left=We+"px",k=window.innerHeight-(ee.top+A.offsetHeight),k<0&&(k=0),l.top=me+"px",l.bottom="",l.left=We+"px",l.maxHeight=k+"px"}ge(),ge(),n.customize&&ee&&n.customize(A,ee,o,k)}function J(){o.textContent="",A.setAttribute("aria-activedescendant","");var k=function(re,Pe,Fe){var me=r.createElement("div");return me.textContent=re.label||"",me};n.render&&(k=n.render);var ee=function(re,Pe){var Fe=r.createElement("div");return Fe.textContent=re,Fe};n.renderGroup&&(ee=n.renderGroup);var ge=r.createDocumentFragment(),$=P();if(p.forEach(function(re,Pe){if(re.group&&re.group!==$){$=re.group;var Fe=ee(re.group,m);Fe&&(Fe.className+=" group",ge.appendChild(Fe))}var me=k(re,m,Pe);me&&(me.id=o.id+"_"+Pe,me.setAttribute("role","option"),me.addEventListener("click",function(We){D=!0;try{n.onSelect(re,A)}finally{D=!1}ae(),We.preventDefault(),We.stopPropagation()}),re===C&&(me.className+=" selected",me.setAttribute("aria-selected","true"),A.setAttribute("aria-activedescendant",me.id)),ge.appendChild(me))}),o.appendChild(ge),p.length<1)if(n.emptyMsg){var X=r.createElement("div");X.id=o.id+"_"+P(),X.className="empty",X.textContent=n.emptyMsg,o.appendChild(X),A.setAttribute("aria-activedescendant",X.id)}else{ae();return}Z(),_e(),Ie()}function U(){L()&&J()}function F(){U()}function de(k){k.target!==o?U():k.preventDefault()}function qe(){D||Ce(0)}function Ie(){var k=o.getElementsByClassName("selected");if(k.length>0){var ee=k[0],ge=ee.previousElementSibling;if(ge&&ge.className.indexOf("group")!==-1&&!ge.previousElementSibling&&(ee=ge),ee.offsetTop<o.scrollTop)o.scrollTop=ee.offsetTop;else{var $=ee.offsetTop+ee.offsetHeight,X=o.scrollTop+o.offsetHeight;$>X&&(o.scrollTop+=$-X)}}}function xe(){var k=p.indexOf(C);C=k===-1?void 0:p[(k+p.length-1)%p.length],De(k)}function Oe(){var k=p.indexOf(C);C=p.length<1?void 0:k===-1?p[0]:p[(k+1)%p.length],De(k)}function De(k){p.length>0&&(pe(k),ne(p.indexOf(C)),Ie())}function ne(k){var ee=r.getElementById(o.id+"_"+k);ee&&(ee.classList.add("selected"),ee.setAttribute("aria-selected","true"),A.setAttribute("aria-activedescendant",ee.id))}function pe(k){var ee=r.getElementById(o.id+"_"+k);ee&&(ee.classList.remove("selected"),ee.removeAttribute("aria-selected"),A.removeAttribute("aria-activedescendant"))}function Ve(k,ee){var ge=L();if(ee==="Escape")ae();else{if(!ge||p.length<1)return;ee==="ArrowUp"?xe():Oe()}k.preventDefault(),ge&&k.stopPropagation()}function Ye(k){if(C){s===2&&k.preventDefault(),D=!0;try{n.onSelect(C,A)}finally{D=!1}ae()}s===1&&k.preventDefault()}function ze(k){var ee=k.key;switch(ee){case"ArrowUp":case"ArrowDown":case"Escape":Ve(k,ee);break;case"Enter":Ye(k);break}}function ce(){_&&Ce(1)}function Ce(k){A.value.length>=v||k===1?(B(),S=window.setTimeout(function(){return be(A.value,k,A.selectionStart||0)},k===0||k===2?u:0)):ae()}function be(k,ee,ge){if(!E){var $=++x;n.fetch(k,function(X){x===$&&X&&(p=X,m=k,C=p.length<1||h?void 0:p[0],J())},ee,ge)}}function He(k){if(n.keyup){n.keyup({event:k,fetch:function(){return Ce(0)}});return}!L()&&k.key==="ArrowDown"&&Ce(0)}function ot(k){n.click&&n.click({event:k,fetch:function(){return Ce(2)}})}function Ue(){setTimeout(function(){r.activeElement!==A&&ae()},200)}function St(){be(A.value,3,A.selectionStart||0)}o.addEventListener("mousedown",function(k){k.stopPropagation(),k.preventDefault()}),o.addEventListener("focus",function(){return A.focus()}),M();function ct(){A.removeEventListener("focus",ce),A.removeEventListener("keyup",He),A.removeEventListener("click",ot),A.removeEventListener("keydown",ze),A.removeEventListener("input",qe),A.removeEventListener("blur",Ue),window.removeEventListener("resize",F),r.removeEventListener("scroll",de,!0),A.removeAttribute("role"),A.removeAttribute("aria-expanded"),A.removeAttribute("aria-autocomplete"),A.removeAttribute("aria-controls"),A.removeAttribute("aria-activedescendant"),A.removeAttribute("aria-owns"),A.removeAttribute("aria-haspopup"),B(),ae(),E=!0}return A.addEventListener("keyup",He),A.addEventListener("click",ot),A.addEventListener("keydown",ze),A.addEventListener("input",qe),A.addEventListener("blur",Ue),A.addEventListener("focus",ce),window.addEventListener("resize",F),r.addEventListener("scroll",de,!0),{destroy:ct,fetch:St}}return e})})(Vp);var zp=Vp.exports;const dh=eh(zp),Jd=pl({__proto__:null,default:dh},[zp]);function Up(a,t){const e=t.fetch;e&&(t.fetch=(n,r,o,s)=>{a.classList.add("slick-autocomplete-loading");const l=r;e(n,h=>{l(h),a.classList.remove("slick-autocomplete-loading")},o,s)})}class Nn{constructor(){this._boundedEvents=[]}get boundedEvents(){return this._boundedEvents}dispose(){this.unbindAll(),this._boundedEvents=[]}bind(t,e,n,r,o=""){const s=Array.isArray(e)?e:[e];if(t!=null&&t.forEach)t.forEach(l=>{for(const u of s)l.addEventListener(u,n,r),this._boundedEvents.push({element:l,eventName:u,listener:n,groupName:o})});else for(const l of s)t.addEventListener(l,n,r),this._boundedEvents.push({element:t,eventName:l,listener:n,groupName:o})}unbind(t,e,n){const r=Array.isArray(t)?t:[t],o=Array.isArray(e)?e:[e];for(const s of o)for(const l of r)typeof(l==null?void 0:l.removeEventListener)=="function"&&l.removeEventListener(s,n)}unbindAll(t){if(t){const e=Array.isArray(t)?t:[t];for(let n=this._boundedEvents.length-1;n>=0;--n){const r=this._boundedEvents[n];if(e.some(o=>o===r.groupName)){const{element:o,eventName:s,listener:l}=r;this.unbind(o,s,l),this._boundedEvents.splice(n,1)}}}else for(;this._boundedEvents.length>0;){const e=this._boundedEvents.pop(),{element:n,eventName:r,listener:o}=e;this.unbind(n,r,o)}}}class Gp{constructor(t){this.translaterService=t}filterCollection(t,e,n=Vl.chain){let r=[];if(Array.isArray(e)){r=n===Vl.merge?[]:[...t];for(const o of e)if(n===Vl.merge){const s=this.singleFilterCollection(t,o);r=Np([...r,...s])}else r=this.singleFilterCollection(r,o)}else r=this.singleFilterCollection(t,e);return r}singleFilterCollection(t,e){let n=[];if(e){const r=e.property,o=e.operator||Nt.equal,s=typeof e.value>"u"?"":e.value;switch(o){case Nt.equal:r?n=t.filter(l=>l[r]===s):n=t.filter(l=>l===s);break;case Nt.contains:r?n=t.filter(l=>{var u;return((u=l[r])===null||u===void 0?void 0:u.toString().indexOf(s.toString()))!==-1}):n=t.filter(l=>l!=null&&l.toString().indexOf(s.toString())!==-1);break;case Nt.notContains:r?n=t.filter(l=>{var u;return((u=l[r])===null||u===void 0?void 0:u.toString().indexOf(s.toString()))===-1}):n=t.filter(l=>l!=null&&l.toString().indexOf(s.toString())===-1);break;case Nt.notEqual:default:r?n=t.filter(l=>l[r]!==s):n=t.filter(l=>l!==s)}}return n}sortCollection(t,e,n,r){var o,s,l,u;if(r&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');let h=[];if(n){if(Array.isArray(n))h=e.sort((c,p)=>{var m,v,_,C;for(let x=0,S=n.length;x<S;x++){const E=n[x];if(E!=null&&E.property){const D=E.sortDesc?ji.desc:ji.asc,A=E.property,P=(v=(m=E==null?void 0:E.fieldType)!==null&&m!==void 0?m:t==null?void 0:t.type)!==null&&v!==void 0?v:ie.string,M=r?((_=this.translaterService)===null||_===void 0?void 0:_.translate)&&this.translaterService.translate(c[A]||" "):c[A],B=r?((C=this.translaterService)===null||C===void 0?void 0:C.translate)&&this.translaterService.translate(p[A]||" "):p[A],Z=Gl(P,M,B,D,t);if(Z!==ji.neutral)return Z}}return ji.neutral});else if(n!=null&&n.property){const c=n.property,p=n.sortDesc?ji.desc:ji.asc,m=(s=(o=n==null?void 0:n.fieldType)!==null&&o!==void 0?o:t==null?void 0:t.type)!==null&&s!==void 0?s:ie.string;h=e.sort((v,_)=>{var C,x;const S=r?((C=this.translaterService)===null||C===void 0?void 0:C.translate)&&this.translaterService.translate(v[c]||" "):v[c],E=r?((x=this.translaterService)===null||x===void 0?void 0:x.translate)&&this.translaterService.translate(_[c]||" "):_[c],D=Gl(m,S,E,p,t);return D!==ji.neutral?D:ji.neutral})}else if(n&&!n.property){const c=n.sortDesc?ji.desc:ji.asc,p=(u=(l=n==null?void 0:n.fieldType)!==null&&l!==void 0?l:t==null?void 0:t.type)!==null&&u!==void 0?u:ie.string;h=e.sort((m,v)=>{var _,C;const x=r?((_=this.translaterService)===null||_===void 0?void 0:_.translate)&&this.translaterService.translate(m||" "):m,S=r?((C=this.translaterService)===null||C===void 0?void 0:C.translate)&&this.translaterService.translate(v||" "):v,E=Gl(p,x,S,c,t);return E!==ji.neutral?E:ji.neutral})}}return h}}/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */const{entries:Wp,setPrototypeOf:$p,isFrozen:f_,getPrototypeOf:p_,getOwnPropertyDescriptor:Yp}=Object;let{freeze:Cr,seal:Po,create:jp}=Object,{apply:uh,construct:ch}=typeof Reflect<"u"&&Reflect;Cr||(Cr=function(t){return t}),Po||(Po=function(t){return t}),uh||(uh=function(t,e,n){return t.apply(e,n)}),ch||(ch=function(t,e){return new t(...e)});const eu=po(Array.prototype.forEach),Xp=po(Array.prototype.pop),$a=po(Array.prototype.push),tu=po(String.prototype.toLowerCase),hh=po(String.prototype.toString),m_=po(String.prototype.match),Ya=po(String.prototype.replace),v_=po(String.prototype.indexOf),g_=po(String.prototype.trim),Kr=po(RegExp.prototype.test),ja=__(TypeError);function po(a){return function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return uh(a,t,n)}}function __(a){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return ch(a,e)}}function ai(a,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tu;$p&&$p(a,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){const o=e(r);o!==r&&(f_(t)||(t[n]=o),r=o)}a[r]=!0}return a}function Wl(a){const t=jp(null);for(const[e,n]of Wp(a))Yp(a,e)!==void 0&&(t[e]=n);return t}function iu(a,t){for(;a!==null;){const n=Yp(a,t);if(n){if(n.get)return po(n.get);if(typeof n.value=="function")return po(n.value)}a=p_(a)}function e(n){return console.warn("fallback value for",n),null}return e}const qp=Cr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),fh=Cr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ph=Cr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),b_=Cr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mh=Cr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),C_=Cr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Kp=Cr(["#text"]),Zp=Cr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),vh=Cr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Qp=Cr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),nu=Cr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y_=Po(/\{\{[\w\W]*|[\w\W]*\}\}/gm),E_=Po(/<%[\w\W]*|[\w\W]*%>/gm),S_=Po(/\${[\w\W]*}/gm),w_=Po(/^data-[\-\w.\u00B7-\uFFFF]/),x_=Po(/^aria-[\-\w]+$/),Jp=Po(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),T_=Po(/^(?:\w+script|data):/i),O_=Po(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),em=Po(/^html$/i);var tm=Object.freeze({__proto__:null,MUSTACHE_EXPR:y_,ERB_EXPR:E_,TMPLIT_EXPR:S_,DATA_ATTR:w_,ARIA_ATTR:x_,IS_ALLOWED_URI:Jp,IS_SCRIPT_OR_DATA:T_,ATTR_WHITESPACE:O_,DOCTYPE_NAME:em});const A_=function(){return typeof window>"u"?null:window},k_=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function im(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A_();const t=Ct=>im(Ct);if(t.version="3.0.6",t.removed=[],!a||!a.document||a.document.nodeType!==9)return t.isSupported=!1,t;let{document:e}=a;const n=e,r=n.currentScript,{DocumentFragment:o,HTMLTemplateElement:s,Node:l,Element:u,NodeFilter:h,NamedNodeMap:c=a.NamedNodeMap||a.MozNamedAttrMap,HTMLFormElement:p,DOMParser:m,trustedTypes:v}=a,_=u.prototype,C=iu(_,"cloneNode"),x=iu(_,"nextSibling"),S=iu(_,"childNodes"),E=iu(_,"parentNode");if(typeof s=="function"){const Ct=e.createElement("template");Ct.content&&Ct.content.ownerDocument&&(e=Ct.content.ownerDocument)}let D,A="";const{implementation:P,createNodeIterator:M,createDocumentFragment:B,getElementsByTagName:Z}=e,{importNode:L}=n;let ae={};t.isSupported=typeof Wp=="function"&&typeof E=="function"&&P&&P.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:_e,ERB_EXPR:J,TMPLIT_EXPR:U,DATA_ATTR:F,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:qe,ATTR_WHITESPACE:Ie}=tm;let{IS_ALLOWED_URI:xe}=tm,Oe=null;const De=ai({},[...qp,...fh,...ph,...mh,...Kp]);let ne=null;const pe=ai({},[...Zp,...vh,...Qp,...nu]);let Ve=Object.seal(jp(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ye=null,ze=null,ce=!0,Ce=!0,be=!1,He=!0,ot=!1,Ue=!1,St=!1,ct=!1,k=!1,ee=!1,ge=!1,$=!0,X=!1;const re="user-content-";let Pe=!0,Fe=!1,me={},We=null;const mt=ai({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ge=null;const Le=ai({},["audio","video","img","source","image","track"]);let jt=null;const It=ai({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bi="http://www.w3.org/1998/Math/MathML",q="http://www.w3.org/2000/svg",W="http://www.w3.org/1999/xhtml";let ve=W,ke=!1,at=null;const st=ai({},[bi,q,W],hh);let ht=null;const Dt=["application/xhtml+xml","text/html"],Lt="text/html";let Ot=null,zt=null;const Kt=e.createElement("form"),Fi=function(Se){return Se instanceof RegExp||Se instanceof Function},Mi=function(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(zt&&zt===Se)){if((!Se||typeof Se!="object")&&(Se={}),Se=Wl(Se),ht=Dt.indexOf(Se.PARSER_MEDIA_TYPE)===-1?ht=Lt:ht=Se.PARSER_MEDIA_TYPE,Ot=ht==="application/xhtml+xml"?hh:tu,Oe="ALLOWED_TAGS"in Se?ai({},Se.ALLOWED_TAGS,Ot):De,ne="ALLOWED_ATTR"in Se?ai({},Se.ALLOWED_ATTR,Ot):pe,at="ALLOWED_NAMESPACES"in Se?ai({},Se.ALLOWED_NAMESPACES,hh):st,jt="ADD_URI_SAFE_ATTR"in Se?ai(Wl(It),Se.ADD_URI_SAFE_ATTR,Ot):It,Ge="ADD_DATA_URI_TAGS"in Se?ai(Wl(Le),Se.ADD_DATA_URI_TAGS,Ot):Le,We="FORBID_CONTENTS"in Se?ai({},Se.FORBID_CONTENTS,Ot):mt,Ye="FORBID_TAGS"in Se?ai({},Se.FORBID_TAGS,Ot):{},ze="FORBID_ATTR"in Se?ai({},Se.FORBID_ATTR,Ot):{},me="USE_PROFILES"in Se?Se.USE_PROFILES:!1,ce=Se.ALLOW_ARIA_ATTR!==!1,Ce=Se.ALLOW_DATA_ATTR!==!1,be=Se.ALLOW_UNKNOWN_PROTOCOLS||!1,He=Se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=Se.SAFE_FOR_TEMPLATES||!1,Ue=Se.WHOLE_DOCUMENT||!1,k=Se.RETURN_DOM||!1,ee=Se.RETURN_DOM_FRAGMENT||!1,ge=Se.RETURN_TRUSTED_TYPE||!1,ct=Se.FORCE_BODY||!1,$=Se.SANITIZE_DOM!==!1,X=Se.SANITIZE_NAMED_PROPS||!1,Pe=Se.KEEP_CONTENT!==!1,Fe=Se.IN_PLACE||!1,xe=Se.ALLOWED_URI_REGEXP||Jp,ve=Se.NAMESPACE||W,Ve=Se.CUSTOM_ELEMENT_HANDLING||{},Se.CUSTOM_ELEMENT_HANDLING&&Fi(Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ve.tagNameCheck=Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&Fi(Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ve.attributeNameCheck=Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&typeof Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ve.allowCustomizedBuiltInElements=Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ot&&(Ce=!1),ee&&(k=!0),me&&(Oe=ai({},[...Kp]),ne=[],me.html===!0&&(ai(Oe,qp),ai(ne,Zp)),me.svg===!0&&(ai(Oe,fh),ai(ne,vh),ai(ne,nu)),me.svgFilters===!0&&(ai(Oe,ph),ai(ne,vh),ai(ne,nu)),me.mathMl===!0&&(ai(Oe,mh),ai(ne,Qp),ai(ne,nu))),Se.ADD_TAGS&&(Oe===De&&(Oe=Wl(Oe)),ai(Oe,Se.ADD_TAGS,Ot)),Se.ADD_ATTR&&(ne===pe&&(ne=Wl(ne)),ai(ne,Se.ADD_ATTR,Ot)),Se.ADD_URI_SAFE_ATTR&&ai(jt,Se.ADD_URI_SAFE_ATTR,Ot),Se.FORBID_CONTENTS&&(We===mt&&(We=Wl(We)),ai(We,Se.FORBID_CONTENTS,Ot)),Pe&&(Oe["#text"]=!0),Ue&&ai(Oe,["html","head","body"]),Oe.table&&(ai(Oe,["tbody"]),delete Ye.tbody),Se.TRUSTED_TYPES_POLICY){if(typeof Se.TRUSTED_TYPES_POLICY.createHTML!="function")throw ja('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ja('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=Se.TRUSTED_TYPES_POLICY,A=D.createHTML("")}else D===void 0&&(D=k_(v,r)),D!==null&&typeof A=="string"&&(A=D.createHTML(""));Cr&&Cr(Se),zt=Se}},z=ai({},["mi","mo","mn","ms","mtext"]),Q=ai({},["foreignobject","desc","title","annotation-xml"]),he=ai({},["title","style","font","a","script"]),Ee=ai({},fh);ai(Ee,ph),ai(Ee,b_);const lt=ai({},mh);ai(lt,C_);const vt=function(Se){let Xe=E(Se);(!Xe||!Xe.tagName)&&(Xe={namespaceURI:ve,tagName:"template"});const xt=tu(Se.tagName),ti=tu(Xe.tagName);return at[Se.namespaceURI]?Se.namespaceURI===q?Xe.namespaceURI===W?xt==="svg":Xe.namespaceURI===bi?xt==="svg"&&(ti==="annotation-xml"||z[ti]):!!Ee[xt]:Se.namespaceURI===bi?Xe.namespaceURI===W?xt==="math":Xe.namespaceURI===q?xt==="math"&&Q[ti]:!!lt[xt]:Se.namespaceURI===W?Xe.namespaceURI===q&&!Q[ti]||Xe.namespaceURI===bi&&!z[ti]?!1:!lt[xt]&&(he[xt]||!Ee[xt]):!!(ht==="application/xhtml+xml"&&at[Se.namespaceURI]):!1},it=function(Se){$a(t.removed,{element:Se});try{Se.parentNode.removeChild(Se)}catch{Se.remove()}},wt=function(Se,Xe){try{$a(t.removed,{attribute:Xe.getAttributeNode(Se),from:Xe})}catch{$a(t.removed,{attribute:null,from:Xe})}if(Xe.removeAttribute(Se),Se==="is"&&!ne[Se])if(k||ee)try{it(Xe)}catch{}else try{Xe.setAttribute(Se,"")}catch{}},Ht=function(Se){let Xe=null,xt=null;if(ct)Se="<remove></remove>"+Se;else{const Gi=m_(Se,/^[\r\n\t ]+/);xt=Gi&&Gi[0]}ht==="application/xhtml+xml"&&ve===W&&(Se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Se+"</body></html>");const ti=D?D.createHTML(Se):Se;if(ve===W)try{Xe=new m().parseFromString(ti,ht)}catch{}if(!Xe||!Xe.documentElement){Xe=P.createDocument(ve,"template",null);try{Xe.documentElement.innerHTML=ke?A:ti}catch{}}const Ui=Xe.body||Xe.documentElement;return Se&&xt&&Ui.insertBefore(e.createTextNode(xt),Ui.childNodes[0]||null),ve===W?Z.call(Xe,Ue?"html":"body")[0]:Ue?Xe.documentElement:Ui},Et=function(Se){return M.call(Se.ownerDocument||Se,Se,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null)},gt=function(Se){return Se instanceof p&&(typeof Se.nodeName!="string"||typeof Se.textContent!="string"||typeof Se.removeChild!="function"||!(Se.attributes instanceof c)||typeof Se.removeAttribute!="function"||typeof Se.setAttribute!="function"||typeof Se.namespaceURI!="string"||typeof Se.insertBefore!="function"||typeof Se.hasChildNodes!="function")},ei=function(Se){return typeof l=="function"&&Se instanceof l},Ai=function(Se,Xe,xt){ae[Se]&&eu(ae[Se],ti=>{ti.call(t,Xe,xt,zt)})},zi=function(Se){let Xe=null;if(Ai("beforeSanitizeElements",Se,null),gt(Se))return it(Se),!0;const xt=Ot(Se.nodeName);if(Ai("uponSanitizeElement",Se,{tagName:xt,allowedTags:Oe}),Se.hasChildNodes()&&!ei(Se.firstElementChild)&&Kr(/<[/\w]/g,Se.innerHTML)&&Kr(/<[/\w]/g,Se.textContent))return it(Se),!0;if(!Oe[xt]||Ye[xt]){if(!Ye[xt]&&Ni(xt)&&(Ve.tagNameCheck instanceof RegExp&&Kr(Ve.tagNameCheck,xt)||Ve.tagNameCheck instanceof Function&&Ve.tagNameCheck(xt)))return!1;if(Pe&&!We[xt]){const ti=E(Se)||Se.parentNode,Ui=S(Se)||Se.childNodes;if(Ui&&ti){const Gi=Ui.length;for(let Li=Gi-1;Li>=0;--Li)ti.insertBefore(C(Ui[Li],!0),x(Se))}}return it(Se),!0}return Se instanceof u&&!vt(Se)||(xt==="noscript"||xt==="noembed"||xt==="noframes")&&Kr(/<\/no(script|embed|frames)/i,Se.innerHTML)?(it(Se),!0):(ot&&Se.nodeType===3&&(Xe=Se.textContent,eu([_e,J,U],ti=>{Xe=Ya(Xe,ti," ")}),Se.textContent!==Xe&&($a(t.removed,{element:Se.cloneNode()}),Se.textContent=Xe)),Ai("afterSanitizeElements",Se,null),!1)},Zt=function(Se,Xe,xt){if($&&(Xe==="id"||Xe==="name")&&(xt in e||xt in Kt))return!1;if(!(Ce&&!ze[Xe]&&Kr(F,Xe))){if(!(ce&&Kr(de,Xe))){if(!ne[Xe]||ze[Xe]){if(!(Ni(Se)&&(Ve.tagNameCheck instanceof RegExp&&Kr(Ve.tagNameCheck,Se)||Ve.tagNameCheck instanceof Function&&Ve.tagNameCheck(Se))&&(Ve.attributeNameCheck instanceof RegExp&&Kr(Ve.attributeNameCheck,Xe)||Ve.attributeNameCheck instanceof Function&&Ve.attributeNameCheck(Xe))||Xe==="is"&&Ve.allowCustomizedBuiltInElements&&(Ve.tagNameCheck instanceof RegExp&&Kr(Ve.tagNameCheck,xt)||Ve.tagNameCheck instanceof Function&&Ve.tagNameCheck(xt))))return!1}else if(!jt[Xe]){if(!Kr(xe,Ya(xt,Ie,""))){if(!((Xe==="src"||Xe==="xlink:href"||Xe==="href")&&Se!=="script"&&v_(xt,"data:")===0&&Ge[Se])){if(!(be&&!Kr(qe,Ya(xt,Ie,"")))){if(xt)return!1}}}}}}return!0},Ni=function(Se){return Se.indexOf("-")>0},Bn=function(Se){Ai("beforeSanitizeAttributes",Se,null);const{attributes:Xe}=Se;if(!Xe)return;const xt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ne};let ti=Xe.length;for(;ti--;){const Ui=Xe[ti],{name:Gi,namespaceURI:Li,value:pn}=Ui,Wn=Ot(Gi);let qt=Gi==="value"?pn:g_(pn);if(xt.attrName=Wn,xt.attrValue=qt,xt.keepAttr=!0,xt.forceKeepAttr=void 0,Ai("uponSanitizeAttribute",Se,xt),qt=xt.attrValue,xt.forceKeepAttr||(wt(Gi,Se),!xt.keepAttr))continue;if(!He&&Kr(/\/>/i,qt)){wt(Gi,Se);continue}ot&&eu([_e,J,U],lr=>{qt=Ya(qt,lr," ")});const Wi=Ot(Se.nodeName);if(Zt(Wi,Wn,qt)){if(X&&(Wn==="id"||Wn==="name")&&(wt(Gi,Se),qt=re+qt),D&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!Li)switch(v.getAttributeType(Wi,Wn)){case"TrustedHTML":{qt=D.createHTML(qt);break}case"TrustedScriptURL":{qt=D.createScriptURL(qt);break}}try{Li?Se.setAttributeNS(Li,Gi,qt):Se.setAttribute(Gi,qt),Xp(t.removed)}catch{}}}Ai("afterSanitizeAttributes",Se,null)},fn=function Ct(Se){let Xe=null;const xt=Et(Se);for(Ai("beforeSanitizeShadowDOM",Se,null);Xe=xt.nextNode();)Ai("uponSanitizeShadowNode",Xe,null),!zi(Xe)&&(Xe.content instanceof o&&Ct(Xe.content),Bn(Xe));Ai("afterSanitizeShadowDOM",Se,null)};return t.sanitize=function(Ct){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xe=null,xt=null,ti=null,Ui=null;if(ke=!Ct,ke&&(Ct="<!-->"),typeof Ct!="string"&&!ei(Ct))if(typeof Ct.toString=="function"){if(Ct=Ct.toString(),typeof Ct!="string")throw ja("dirty is not a string, aborting")}else throw ja("toString is not a function");if(!t.isSupported)return Ct;if(St||Mi(Se),t.removed=[],typeof Ct=="string"&&(Fe=!1),Fe){if(Ct.nodeName){const pn=Ot(Ct.nodeName);if(!Oe[pn]||Ye[pn])throw ja("root node is forbidden and cannot be sanitized in-place")}}else if(Ct instanceof l)Xe=Ht("<!---->"),xt=Xe.ownerDocument.importNode(Ct,!0),xt.nodeType===1&&xt.nodeName==="BODY"||xt.nodeName==="HTML"?Xe=xt:Xe.appendChild(xt);else{if(!k&&!ot&&!Ue&&Ct.indexOf("<")===-1)return D&&ge?D.createHTML(Ct):Ct;if(Xe=Ht(Ct),!Xe)return k?null:ge?A:""}Xe&&ct&&it(Xe.firstChild);const Gi=Et(Fe?Ct:Xe);for(;ti=Gi.nextNode();)zi(ti)||(ti.content instanceof o&&fn(ti.content),Bn(ti));if(Fe)return Ct;if(k){if(ee)for(Ui=B.call(Xe.ownerDocument);Xe.firstChild;)Ui.appendChild(Xe.firstChild);else Ui=Xe;return(ne.shadowroot||ne.shadowrootmode)&&(Ui=L.call(n,Ui,!0)),Ui}let Li=Ue?Xe.outerHTML:Xe.innerHTML;return Ue&&Oe["!doctype"]&&Xe.ownerDocument&&Xe.ownerDocument.doctype&&Xe.ownerDocument.doctype.name&&Kr(em,Xe.ownerDocument.doctype.name)&&(Li="<!DOCTYPE "+Xe.ownerDocument.doctype.name+`>
5
5
  `+Li),ot&&eu([_e,J,U],pn=>{Li=Ya(Li,pn," ")}),D&&ge?D.createHTML(Li):Li},t.setConfig=function(){let Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Mi(Ct),St=!0},t.clearConfig=function(){zt=null,St=!1},t.isValidAttribute=function(Ct,Se,Xe){zt||Mi({});const xt=Ot(Ct),ti=Ot(Se);return Zt(xt,ti,Xe)},t.addHook=function(Ct,Se){typeof Se=="function"&&(ae[Ct]=ae[Ct]||[],$a(ae[Ct],Se))},t.removeHook=function(Ct){if(ae[Ct])return Xp(ae[Ct])},t.removeHooks=function(Ct){ae[Ct]&&(ae[Ct]=[])},t.removeAllHooks=function(){ae={}},t}var nm=im();const gh=Object.freeze(Object.defineProperty({__proto__:null,default:nm},Symbol.toStringTag,{value:"Module"}));var _h;const ru=(_h=gh==null?void 0:nm)!==null&&_h!==void 0?_h:gh;function rm(a,t,e,n,r=!1,o,s){var l,u,h,c,p,m,v,_,C,x,S,E,D,A,P,M,B,Z;const L=(l=e==null?void 0:e.id)!==null&&l!==void 0?l:"",ae=n.getOptions(),_e=(u=a==="editor"?e==null?void 0:e.internalColumnEditor:e==null?void 0:e.filter)!==null&&u!==void 0?u:{},J=(h=_e==null?void 0:_e.collectionOptions)!==null&&h!==void 0?h:{},U=(c=J==null?void 0:J.separatorBetweenTextLabels)!==null&&c!==void 0?c:"",F=(p=_e==null?void 0:_e.enableTranslateLabel)!==null&&p!==void 0?p:!1,de=(m=ae==null?void 0:ae.enableTranslate)!==null&&m!==void 0?m:!1,qe=(v=_e==null?void 0:_e.enableRenderHtml)!==null&&v!==void 0?v:!1,Ie=(_=ae==null?void 0:ae.sanitizeHtmlOptions)!==null&&_!==void 0?_:{},xe=(x=(C=_e==null?void 0:_e.customStructure)===null||C===void 0?void 0:C.label)!==null&&x!==void 0?x:"label",Oe=(E=(S=_e==null?void 0:_e.customStructure)===null||S===void 0?void 0:S.labelPrefix)!==null&&E!==void 0?E:"labelPrefix",De=(A=(D=_e==null?void 0:_e.customStructure)===null||D===void 0?void 0:D.labelSuffix)!==null&&A!==void 0?A:"labelSuffix",ne=(M=(P=_e==null?void 0:_e.customStructure)===null||P===void 0?void 0:P.optionLabel)!==null&&M!==void 0?M:"value",pe=(Z=(B=_e==null?void 0:_e.customStructure)===null||B===void 0?void 0:B.value)!==null&&Z!==void 0?Z:"value",Ve=Re("select",{className:"ms-filter search-filter"}),Ye=a==="filter"?["search-filter",`filter-${L}`]:["select-editor",`editor-${L}`];Ve.classList.add(...Ye),Ve.multiple=r;const ze=[];let ce=!1;if(Array.isArray(t))if(t.every(Ce=>typeof Ce=="number"||typeof Ce=="string"))for(const Ce of t){const be={text:Ce,value:Ce};a==="filter"&&Array.isArray(s)&&(be.selected=s.findIndex(He=>He===Ce)>=0),ze.push(be),(be.selected&&r||be.selected&&!r&&Ce!=="")&&(ce=!0)}else t.forEach(Ce=>{if(Ce===void 0||typeof Ce=="object"&&Ce[xe]===void 0&&Ce.labelKey===void 0)throw new Error("[Slickgrid-Universal] Select Filter/Editor collection with value/label (or value/labelKey when using Locale) is required to populate the Select list, for example:: { filter: model: Filters.multipleSelect, collection: [ { value: '1', label: 'One' } ]')");const be=Ce.labelKey||Ce[xe],He=(Ce.labelKey||F&&o)&&be&&de?o==null?void 0:o.translate(be||" "):be;let ot=Ce[Oe]||"",Ue=Ce[De]||"",St=Ce.hasOwnProperty(ne)?Ce[ne]:"";St!=null&&St.toString&&(St=St.toString().replace(/\"/g,"'")),ot=F&&o&&ot&&typeof ot=="string"?o.translate(ot||" "):ot,Ue=F&&o&&Ue&&typeof Ue=="string"?o.translate(Ue||" "):Ue,St=F&&o&&St&&typeof St=="string"?o.translate(St||" "):St;let k=[ot,typeof He=="string"||typeof He=="number"?He.toString():He,Ue].filter($=>$).join(U);const ee={text:"",value:""};qe&&(k=Ln(ae,k,Ie)),ee.text=k;let ge=Ce[pe];ge==null&&(ge=""),a==="filter"&&Array.isArray(s)&&(ee.selected=s.findIndex($=>`${$}`==`${Ce[pe]}`)>=0),ee.value=`${ge??""}`,ze.push(ee),(ee.selected&&r||ee.selected&&!r&&Ce[pe]!=="")&&(ce=!0)});return{selectElement:Ve,dataCollection:ze,hasFoundSearchTerm:ce}}function ou(a){var t,e,n,r;let o=0,s=0,l=0,u=0;const h=(t=window.innerHeight)!==null&&t!==void 0?t:0,c=(e=window.innerWidth)!==null&&e!==void 0?e:0,p=N_(),m=p.top,v=p.left,_=Gn(a);if(_){const C=(n=_.top)!==null&&n!==void 0?n:0,x=(r=_.left)!==null&&r!==void 0?r:0;s=C-m,o=h-(C-m),l=x-v,u=c-(x-v)}return{top:s,bottom:o,left:l,right:u}}function Re(a,t,e){const n=document.createElement(a);return t&&Object.keys(t).forEach(r=>{r==="innerHTML"&&console.warn(`[Slickgrid-Universal] For better CSP (Content Security Policy) support, do not use "innerHTML" directly in "createDomElement('${a}', { innerHTML: 'some html'})", it is better as separate assignment: "const elm = createDomElement('span'); elm.innerHTML = 'some html';"`);const o=t[r];typeof o=="object"?Object.assign(n[r],o):n[r]=t[r]}),e!=null&&e.appendChild&&e.appendChild(n),n}function bh(a){if(a)for(const t of Object.keys(a))Array.isArray(a[t])&&bh(a[t]),a[t]instanceof HTMLElement&&(a[t]=null)}function on(a){if(a!=null&&a.firstChild)for(;a.firstChild;)a.lastChild&&a.removeChild(a.lastChild);return a}function I_(a,t){if(!a||!t)return;const e=a.getBoundingClientRect(),n=t.getBoundingClientRect();return{top:n.top-e.top,right:n.right-e.right,bottom:n.bottom-e.bottom,left:n.left-e.left}}function Gn(a){var t;if(!a)return;const e=(t=a==null?void 0:a.getBoundingClientRect)===null||t===void 0?void 0:t.call(a);let n=0,r=0,o=0,s=0;return(e==null?void 0:e.top)!==void 0&&e.left!==void 0&&(n=e.top+window.pageYOffset,r=e.left+window.pageXOffset,s=e.right,o=e.bottom),{top:n,left:r,bottom:o,right:s}}function om(a,t){let e=0;if(a){const n=t==="height"?"clientHeight":"clientWidth",r=t==="height"?["top","bottom"]:["left","right"];e=a[n];for(const o of r)e-=parseFloat(D_(a,`padding-${o}`))||0}return e}function D_(a,t){return window.getComputedStyle(a,null).getPropertyValue(t)}function R_(a){let t="";return a!=null&&a.localName&&(t=a!=null&&a.className?`${a.localName}.${Array.from(a.classList).join(".")}`:a.localName),t}function su(a,t){if(a)for(const e of t){const n=a.getAttribute(e);if(n)return n}return null}function Ws(a,t="auto"){return(/^[0-9]+$/i.test(`${a}`)?`${+a}px`:a)||t}function P_(a){const t=typeof a=="string"?a:String(a),e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return(t||"").toString().replace(/[&<>"']/g,n=>e[n])}function F_(a){return a.replace(/&#(\d+);/g,(t,e)=>String.fromCharCode(e))}function M_(a,t){const e=a.length;let n=P_(a);if(e<t)for(let r=e;r<t;r++)n+="&nbsp;";return n}function or(a){const t=document.createElement("div");return t.innerHTML=a,t.textContent||t.innerText||""}function Ln(a,t,e){let n=t;return typeof(a==null?void 0:a.sanitizer)=="function"?n=a.sanitizer(t||""):typeof(ru==null?void 0:ru.sanitize)=="function"&&(n=(ru.sanitize(t||"",e||{RETURN_TRUSTED_TYPE:!0})||"").toString()),n}function N_(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}class L_{constructor(t,e,n){this.sharedService=t,this.backendUtilities=e,this.translaterService=n}getPickerTitleOutputString(t,e){var n,r,o,s,l,u,h,c,p,m,v,_,C,x,S;if(this.sharedService.gridOptions&&this.sharedService.gridOptions.enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');let E="";const D=(r=(n=this.sharedService.gridOptions)===null||n===void 0?void 0:n[e])!==null&&r!==void 0?r:{},A=(s=(o=this.sharedService.gridOptions)===null||o===void 0?void 0:o.enableTranslate)!==null&&s!==void 0?s:!1,P=(u=(l=this.sharedService.gridOptions)===null||l===void 0?void 0:l.locales)!==null&&u!==void 0?u:je.locales,M=D==null?void 0:D[t],B=D==null?void 0:D[`${t}Key`],Z=this.sharedService.gridOptions,L=ho(Z);if(B&&(!((h=this.translaterService)===null||h===void 0)&&h.translate))E=this.translaterService.translate(B||" ");else switch(t){case"commandTitle":E=M||A&&((c=this.translaterService)===null||c===void 0?void 0:c.getCurrentLanguage)&&((p=this.translaterService)===null||p===void 0?void 0:p.translate(`${L}COMMANDS`||" "))||(P==null?void 0:P.TEXT_COMMANDS);break;case"columnTitle":E=M||A&&((m=this.translaterService)===null||m===void 0?void 0:m.getCurrentLanguage)&&((v=this.translaterService)===null||v===void 0?void 0:v.translate(`${L}COLUMNS`||" "))||(P==null?void 0:P.TEXT_COLUMNS);break;case"forceFitTitle":E=M||A&&((_=this.translaterService)===null||_===void 0?void 0:_.getCurrentLanguage)&&((C=this.translaterService)===null||C===void 0?void 0:C.translate(`${L}FORCE_FIT_COLUMNS`||" "))||(P==null?void 0:P.TEXT_FORCE_FIT_COLUMNS);break;case"syncResizeTitle":E=M||A&&((x=this.translaterService)===null||x===void 0?void 0:x.getCurrentLanguage)&&((S=this.translaterService)===null||S===void 0?void 0:S.translate(`${L}SYNCHRONOUS_RESIZE`||" "))||(P==null?void 0:P.TEXT_SYNCHRONOUS_RESIZE);break;default:E=M;break}return E}readjustFrozenColumnIndexWhenNeeded(t,e,n){if(t>=0){const r=n.findIndex(o=>o.id===this.sharedService.frozenVisibleColumnId);r>=0&&r!==t&&(this.sharedService.gridOptions.frozenColumn=r,this.sharedService.slickGrid.setOptions({frozenColumn:r})),Array.isArray(n)&&Array.isArray(e)&&n.length!==e.length&&this.sharedService.slickGrid.setColumns(n)}}refreshBackendDataset(t){var e;let n=this.sharedService.gridOptions;t&&(n={...this.sharedService.gridOptions,...t},this.sharedService.gridOptions=n),(e=this.backendUtilities)===null||e===void 0||e.refreshBackendDataset(n)}runOverrideFunctionWhenExists(t,e){return typeof t=="function"?!!t.call(this,e):!0}sortItems(t,e){Array.isArray(t)&&t.sort((n,r)=>n&&r&&n.hasOwnProperty(e)&&r.hasOwnProperty(e)?n[e]-r[e]:0)}translateItems(t,e,n){var r,o;if(Array.isArray(t))for(const s of t)s.hasOwnProperty(e)&&(s[n]=(o=(r=this.translaterService)===null||r===void 0?void 0:r.translate)===null||o===void 0?void 0:o.call(r,s[e]))}translateMenuItemsFromTitleKey(t,e="commandItems"){for(const n of t)typeof n=="object"&&(n.titleKey&&(n.title=this.translateWhenEnabledAndServiceExist(`${n.titleKey}`,`TEXT_${n.titleKey}`)),n.subMenuTitleKey&&(n.subMenuTitle=this.translateWhenEnabledAndServiceExist(`${n.subMenuTitleKey}`,`TEXT_${n.subMenuTitleKey}`))),Array.isArray(n==null?void 0:n[e])&&this.translateMenuItemsFromTitleKey(n==null?void 0:n[e])}translateWhenEnabledAndServiceExist(t,e,n){var r,o,s;let l="";const u=(r=this.sharedService)===null||r===void 0?void 0:r.gridOptions,h=(o=u==null?void 0:u.locales)!==null&&o!==void 0?o:je.locales;return n?l=n:u.enableTranslate&&(!((s=this.translaterService)===null||s===void 0)&&s.translate)?l=this.translaterService.translate(t||" "):e in h?l=h[e]:l=e,l}}class H_{constructor(t){this._defaults={enableForCells:!0,enableForHeaderCells:!1,maxToolTipLength:void 0,replaceExisting:!0},this.pluginName="AutoTooltips",this._eventHandler=new Slick.EventHandler,this._addonOptions=t}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}init(t){this._addonOptions={...this._defaults,...this.addonOptions},this._grid=t,this._addonOptions.enableForCells&&this._eventHandler.subscribe(this._grid.onMouseEnter,this.handleMouseEnter.bind(this)),this._addonOptions.enableForHeaderCells&&this._eventHandler.subscribe(this._grid.onHeaderMouseEnter,this.handleHeaderMouseEnter.bind(this))}dispose(){var t;(t=this._eventHandler)===null||t===void 0||t.unsubscribeAll()}handleMouseEnter(t){var e,n,r,o,s;const l=this._grid.getCellFromEvent(t);if(l){let u=this._grid.getCellNode(l.row,l.cell),h;this._addonOptions&&u&&(!u.title||!((e=this._addonOptions)===null||e===void 0)&&e.replaceExisting)&&(u.clientWidth<u.scrollWidth?(h=(r=(n=u.textContent)===null||n===void 0?void 0:n.trim())!==null&&r!==void 0?r:"",!((o=this._addonOptions)===null||o===void 0)&&o.maxToolTipLength&&h.length>((s=this._addonOptions)===null||s===void 0?void 0:s.maxToolTipLength)&&(h=h.substring(0,this._addonOptions.maxToolTipLength-3)+"...")):h="",u.title=h),u=null}}handleHeaderMouseEnter(t,e){var n;const r=e.column;let o;const s=t.target;s&&(o=s.closest(".slick-header-column"),o&&!(r!=null&&r.toolTip)&&(o.title=s.clientWidth<o.clientWidth&&(n=r==null?void 0:r.name)!==null&&n!==void 0?n:"")),o=null}}class B_{constructor(){this.pluginName="CellExcelCopyManager",this._eventHandler=new Slick.EventHandler,this._bindingEventService=new Nn}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get commandQueue(){return this._commandQueue}get gridOptions(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get undoRedoBuffer(){return this._undoRedoBuffer}init(t,e){this._grid=t,this.createUndoRedoBuffer(),this._cellSelectionModel=new W_,this._grid.setSelectionModel(this._cellSelectionModel),this._bindingEventService.bind(document.body,"keydown",this.handleBodyKeyDown.bind(this)),this._addonOptions={...this.getDefaultOptions(),...e},this._cellExternalCopyManagerPlugin=new z_,this._cellExternalCopyManagerPlugin.init(this._grid,this._addonOptions),this._eventHandler.subscribe(this._cellExternalCopyManagerPlugin.onCopyCells,(n,r)=>{this._addonOptions&&typeof this._addonOptions.onCopyCells=="function"&&this._addonOptions.onCopyCells(n,r)}),this._eventHandler.subscribe(this._cellExternalCopyManagerPlugin.onCopyCancelled,(n,r)=>{this._addonOptions&&typeof this._addonOptions.onCopyCancelled=="function"&&this._addonOptions.onCopyCancelled(n,r)}),this._eventHandler.subscribe(this._cellExternalCopyManagerPlugin.onPasteCells,(n,r)=>{this._addonOptions&&typeof this._addonOptions.onPasteCells=="function"&&this._addonOptions.onPasteCells(n,r)})}dispose(){var t,e;this._eventHandler.unsubscribeAll(),this._bindingEventService.unbindAll(),(t=this._cellSelectionModel)===null||t===void 0||t.dispose(),(e=this._cellExternalCopyManagerPlugin)===null||e===void 0||e.dispose()}createUndoRedoBuffer(){let t=0;this._commandQueue=[],this._undoRedoBuffer={queueAndExecuteCommand:e=>{this._commandQueue[t]=e,t++,e.execute()},undo:()=>{if(t===0)return;t--;const e=this._commandQueue[t];e&&Slick.GlobalEditorLock.cancelCurrentEdit()&&e.undo()},redo:()=>{if(t>=this._commandQueue.length)return;const e=this._commandQueue[t];t++,e&&Slick.GlobalEditorLock.cancelCurrentEdit()&&e.execute()}}}getDefaultOptions(){let t=0;return{clipboardCommandHandler:e=>{this._undoRedoBuffer.queueAndExecuteCommand.call(this._undoRedoBuffer,e)},dataItemColumnValueExtractor:(e,n)=>{var r,o;if(!this.gridOptions.editable||!n.editor){const s=n.exportWithFormatter!==void 0?n.exportWithFormatter:(r=this.gridOptions.textExportOptions)===null||r===void 0?void 0:r.exportWithFormatter;if(n.formatter&&s){const l=n.formatter(0,0,e[n.field],n,e,this._grid);if(n.sanitizeDataExport||!((o=this.gridOptions.textExportOptions)===null||o===void 0)&&o.sanitizeDataExport){let u=l;return l&&typeof l=="object"&&l.hasOwnProperty("text")&&(u=l.text),u===null&&(u=""),or(u)}return l}}return null},readOnlyMode:!1,includeHeaderWhenCopying:!1,newRowCreator:e=>{for(let n=0;n<e;n++)this._grid.getData().addItem({id:`newRow_${t++}`})}}}handleBodyKeyDown(t){(t.keyCode||t.code)===90&&(t.ctrlKey||t.metaKey)&&(t.shiftKey?this._undoRedoBuffer.redo():this._undoRedoBuffer.undo())}}const V_=2e3,sm=100;class z_{constructor(){this._bodyElement=document.body,this._copiedCellStyle="copied",this._copiedCellStyleLayerKey="copy-manager",this._copiedRanges=null,this.pluginName="CellExternalCopyManager",this.onCopyCells=new Slick.Event,this.onCopyCancelled=new Slick.Event,this.onPasteCells=new Slick.Event,this._eventHandler=new Slick.EventHandler}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}init(t,e){this._grid=t,this._addonOptions={...this._addonOptions,...e},this._copiedCellStyleLayerKey=this._addonOptions.copiedCellStyleLayerKey||"copy-manager",this._copiedCellStyle=this._addonOptions.copiedCellStyle||"copied",this._bodyElement=this._addonOptions.bodyElement||document.body,this._onCopyInit=this._addonOptions.onCopyInit||void 0,this._onCopySuccess=this._addonOptions.onCopySuccess||void 0,this._eventHandler.subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this));const n=t.getSelectionModel();if(!n)throw new Error("Selection model is mandatory for this plugin. Please set a selection model on the grid before adding this plugin: grid.setSelectionModel(new Slick.CellSelectionModel())");this._eventHandler.subscribe(n.onSelectedRangesChanged,()=>{this._grid.getEditorLock().isActive()||this._grid.focus()})}dispose(){this._eventHandler.unsubscribeAll()}clearCopySelection(){this._grid.removeCellCssStyles(this._copiedCellStyleLayerKey)}getHeaderValueForColumn(t){if(typeof this._addonOptions.headerColumnValueExtractor=="function"){const e=this._addonOptions.headerColumnValueExtractor(t);if(e)return e}return t.name}getDataItemValueForColumn(t,e,n){if(typeof this._addonOptions.dataItemColumnValueExtractor=="function"){const o=this._addonOptions.dataItemColumnValueExtractor(t,e);if(o)return o}let r="";if(e)if(e.editor){const o=document.createElement("p"),s=new e.editor({container:o,column:e,event:n,position:{top:0,left:0},grid:this._grid});s.loadValue(t),r=s.serializeValue(),s.destroy(),o.remove()}else r=t[e.field||""];return r}setDataItemValueForColumn(t,e,n){if(!(e!=null&&e.denyPaste)){if(this._addonOptions.dataItemColumnValueSetter)return this._addonOptions.dataItemColumnValueSetter(t,e,n);if(e.editor){const r=document.createElement("div"),o=new e.editor({container:r,column:e,position:{top:0,left:0},grid:this._grid});o.loadValue(t),o.applyValue(t,n),o.destroy(),r.remove()}else t[e.field]=n}}setIncludeHeaderWhenCopying(t){this._addonOptions.includeHeaderWhenCopying=t}createTextBox(t){const e=Re("textarea",{value:t,style:{position:"absolute",left:"-1000px",top:`${document.body.scrollTop}px`}},this._bodyElement);return e.select(),e}decodeTabularData(t,e){var n;const r=t.getColumns(),s=e.value.split(/[\n\f\r]/);s[s.length-1]===""&&s.pop();let l=0;const u=[];this._bodyElement.removeChild(e);for(const P of s)u[l++]=P!==""?P.split(" "):[""];const h=this._grid.getActiveCell(),c=(n=this._grid.getSelectionModel())===null||n===void 0?void 0:n.getSelectedRanges(),p=c!=null&&c.length?c[0]:null;let m,v;if(p)m=p.fromRow,v=p.fromCell;else if(h)m=h.row,v=h.cell;else return;let _=!1,C=u.length,x=u.length?u[0].length:0;u.length===1&&u[0].length===1&&p&&(_=!0,C=p.toRow-p.fromRow+1,x=p.toCell-p.fromCell+1);const S=this._grid.getData().length-m;let E=0;if(S<C&&typeof this._addonOptions.newRowCreator=="function"){const P=this._grid.getData();for(E=1;E<=C-S;E++)P.push({});this._grid.setData(P),this._grid.render()}if(m+C>this._grid.getDataLength()&&typeof this._addonOptions.newRowCreator=="function"){const P=m+C-this._grid.getDataLength();this._addonOptions.newRowCreator(P)}const A={isClipboardCommand:!0,clippedRange:u,oldValues:[],cellExternalCopyManager:this,_options:this._addonOptions,setDataItemValueForColumn:this.setDataItemValueForColumn,markCopySelection:this.markCopySelection,oneCellToMultiple:_,activeRow:m,activeCell:v,destH:C,destW:x,maxDestY:this._grid.getDataLength(),maxDestX:this._grid.getColumns().length,h:0,w:0,execute:()=>{var P;A.h=0;for(let B=0;B<A.destH;B++){A.oldValues[B]=[],A.w=0,A.h++;for(let Z=0;Z<A.destW;Z++){A.w++;const L=m+B,ae=v+Z;if(L<A.maxDestY&&ae<A.maxDestX){const _e=this._grid.getDataItem(L);A.oldValues[B][Z]=_e[r[ae].field],_?this.setDataItemValueForColumn(_e,r[ae],u[0][0]):this.setDataItemValueForColumn(_e,r[ae],u[B]?u[B][Z]:""),this._grid.updateCell(L,ae),this._grid.onCellChange.notify({row:L,cell:ae,item:_e,grid:this._grid,column:{}})}}}const M={fromCell:v,fromRow:m,toCell:v+A.w-1,toRow:m+A.h-1};this.markCopySelection([M]),(P=this._grid.getSelectionModel())===null||P===void 0||P.setSelectedRanges([M]),this.onPasteCells.notify({ranges:[M]})},undo:()=>{var P;for(let B=0;B<A.destH;B++)for(let Z=0;Z<A.destW;Z++){const L=m+B,ae=v+Z;if(L<A.maxDestY&&ae<A.maxDestX){const _e=this._grid.getDataItem(L);_?this.setDataItemValueForColumn(_e,r[ae],A.oldValues[0][0]):this.setDataItemValueForColumn(_e,r[ae],A.oldValues[B][Z]),this._grid.updateCell(L,ae),this._grid.onCellChange.notify({row:L,cell:ae,item:_e,grid:this._grid,column:{}})}}const M={fromCell:v,fromRow:m,toCell:v+A.w-1,toRow:m+A.h-1};if(this.markCopySelection([M]),(P=this._grid.getSelectionModel())===null||P===void 0||P.setSelectedRanges([M]),this.onPasteCells.notify({ranges:[M]}),typeof this._addonOptions.onPasteCells=="function"&&this._addonOptions.onPasteCells(new Slick.EventData,{ranges:[M]}),E>1){const B=this._grid.getData();for(;E>1;E--)B.splice(B.length-1,1);this._grid.setData(B),this._grid.render()}}};this._addonOptions.clipboardCommandHandler?this._addonOptions.clipboardCommandHandler(A):A.execute()}handleKeyDown(t){var e,n,r,o,s,l;let u;if(!this._grid.getEditorLock().isActive()||this._grid.getOptions().autoEdit){if((t.which===xi.ESCAPE||t.key==="Escape")&&this._copiedRanges&&(t.preventDefault(),this.clearCopySelection(),this.onCopyCancelled.notify({ranges:this._copiedRanges}),typeof this._addonOptions.onCopyCancelled=="function"&&this._addonOptions.onCopyCancelled(t,{ranges:this._copiedRanges}),this._copiedRanges=null),(t.which===xi.C||t.key==="c"||t.which===xi.INSERT||t.key==="Insert")&&(t.ctrlKey||t.metaKey)&&!t.shiftKey&&(typeof this._onCopyInit=="function"&&this._onCopyInit.call(this),u=(n=(e=this._grid.getSelectionModel())===null||e===void 0?void 0:e.getSelectedRanges())!==null&&n!==void 0?n:[],u.length!==0)){this._copiedRanges=u,this.markCopySelection(u),this.onCopyCells.notify({ranges:u}),typeof this._addonOptions.onCopyCells=="function"&&this._addonOptions.onCopyCells(t,{ranges:u});const h=this._grid.getColumns();let c="";for(let p=0;p<u.length;p++){const m=u[p],v=[];for(let _=m.fromRow;_<m.toRow+1;_++){const C=[],x=this._grid.getDataItem(_);if(v.length===0&&this._addonOptions.includeHeaderWhenCopying){const S=[];for(let E=m.fromCell;E<m.toCell+1;E++)h[E].name.length>0&&S.push(this.getHeaderValueForColumn(h[E]));v.push(S.join(" "))}for(let S=m.fromCell;S<m.toCell+1;S++)C.push(this.getDataItemValueForColumn(x,h[S],t));v.push(C.join(" "))}c+=v.join(`\r
6
6
  `)+`\r
7
- `}if(window.clipboardData)return window.clipboardData.setData("Text",c),!0;{const p=document.activeElement,m=this.createTextBox(c);if(m.focus(),setTimeout(()=>{this._bodyElement.removeChild(m),p?p.focus():console.log("No element to restore focus to after copy?")},(o=(r=this.addonOptions)===null||r===void 0?void 0:r.clipboardPasteDelay)!==null&&o!==void 0?o:sm),typeof this._onCopySuccess=="function"){const v=u.length===1?u[0].toRow+1-u[0].fromRow:u.length;this._onCopySuccess(v)}return!1}}if(!this._addonOptions.readOnlyMode&&((t.which===xi.V||t.key==="v")&&(t.ctrlKey||t.metaKey)&&!t.shiftKey||(t.which===xi.INSERT||t.key==="Insert")&&t.shiftKey&&!t.ctrlKey)){const h=this.createTextBox("");return setTimeout(()=>this.decodeTabularData(this._grid,h),(l=(s=this.addonOptions)===null||s===void 0?void 0:s.clipboardPasteDelay)!==null&&l!==void 0?l:sm),!1}}}markCopySelection(t){var e;this.clearCopySelection();const n=this._grid.getColumns(),r={};for(const o of t)for(let s=o.fromRow;s<=o.toRow;s++){r[s]={};for(let l=o.fromCell;l<=o.toCell&&l<n.length;l++)r[s][n[l].id]=this._copiedCellStyle}this._grid.setCellCssStyles(this._copiedCellStyleLayerKey,r),clearTimeout(this._clearCopyTI),this._clearCopyTI=setTimeout(()=>this.clearCopySelection(),((e=this.addonOptions)===null||e===void 0?void 0:e.clearCopySelectionDelay)||V_)}}class lu{constructor(t,e,n){this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._addonOptions={},this._camelPluginName="",this._gridUid="",this._menuCssPrefix="",this._menuPluginCssPrefix="",this._bindEventService=new Nn,this._eventHandler=new Slick.EventHandler}get addonOptions(){return this._addonOptions}set addonOptions(t){this._addonOptions=t}get eventHandler(){return this._eventHandler}get grid(){return this.sharedService.slickGrid}get gridOptions(){var t;return(t=this.sharedService.gridOptions)!==null&&t!==void 0?t:{}}get gridUid(){var t,e;return this._gridUid||((e=(t=this.grid)===null||t===void 0?void 0:t.getUID())!==null&&e!==void 0?e:"")}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get menuCssClass(){return this._menuPluginCssPrefix||this._menuCssPrefix}get menuElement(){return this._menuElm||document.querySelector(`.${this.menuCssClass}${this.gridUidSelector}`)}dispose(){var t,e,n,r,o;(t=this._eventHandler)===null||t===void 0||t.unsubscribeAll(),this._bindEventService.unbindAll(),this.pubSubService.unsubscribeAll(),(e=this._commandTitleElm)===null||e===void 0||e.remove(),(n=this._optionTitleElm)===null||n===void 0||n.remove(),this.disposeAllMenus(),on(this._menuElm),(r=this.menuElement)===null||r===void 0||r.remove(),(o=this._menuElm)===null||o===void 0||o.remove()}disposeAllMenus(){this.disposeSubMenus(),this._bindEventService.unbindAll("parent-menu"),document.querySelectorAll(`.${this.menuCssClass}${this.gridUidSelector}`).forEach(t=>t.remove())}disposeSubMenus(){this._bindEventService.unbindAll("sub-menu"),document.querySelectorAll(`.${this.menuCssClass}.slick-submenu${this.gridUidSelector}`).forEach(t=>t.remove())}setOptions(t){this._addonOptions={...this._addonOptions,...t}}addSubMenuTitleWhenExists(t,e){if(t!=="divider"&&(t!=null&&t.subMenuTitle)){const n=document.createElement("div");n.className="slick-menu-title",n.textContent=t.subMenuTitle;const r=t.subMenuTitleCssClass;r&&n.classList.add(...r.split(" ")),e.appendChild(n)}}populateCommandOrOptionItems(t,e,n,r,o,s,l){if(o&&r&&e)for(const u of r)this.populateSingleCommandOrOptionItem(t,e,n,u,o,s,l)}populateCommandOrOptionTitle(t,e,n,r){var o,s;if(e){const l=r>0,u=(s=(o=this._menuElm)===null||o===void 0?void 0:o.querySelector(`.slick-${t}-header`))!==null&&s!==void 0?s:Re("div",{className:`slick-${t}-header`}),h=`${t}Title`;l||(e!=null&&e[h]?(on(u),this[`_${t}TitleElm`]=Re("span",{className:"slick-menu-title",textContent:e[h]}),u.appendChild(this[`_${t}TitleElm`]),u.classList.add("with-title")):u.classList.add("no-title"),n.appendChild(u))}}populateSingleCommandOrOptionItem(t,e,n,r,o,s,l){var u;let h=null;if(o&&r&&e){const c=(o==null?void 0:o.level)||0,p=this._camelPluginName==="headerButtons"?"":"-item",m=`${this._menuCssPrefix}${p}`;let v=!0,_=!0;if(typeof r=="object"&&(v=this.extensionUtility.runOverrideFunctionWhenExists(r.itemVisibilityOverride,o),_=this.extensionUtility.runOverrideFunctionWhenExists(r.itemUsabilityOverride,o)),!v)return null;if(typeof r=="object"&&r.itemUsabilityOverride&&(r.disabled=!_),h=Re("li",{className:m,role:"menuitem"}),typeof r=="object"&&Kd(r[t])&&(h.dataset[t]=r==null?void 0:r[t]),n&&n.appendChild(h),typeof r=="object"&&r.divider||r==="divider")return h.classList.add(`${m}-divider`),h;if(r.disabled&&h.classList.add(`${m}-disabled`),(r.hidden||r.showOnHover)&&h.classList.add(`${m}-hidden`),r.cssClass&&h.classList.add(...r.cssClass.split(" ")),r.tooltip&&(h.title=r.tooltip),this._camelPluginName!=="headerButtons"){const x=Re("div",{className:`${this._menuCssPrefix}-icon`});h.appendChild(x),r.iconCssClass?x.classList.add(...r.iconCssClass.split(" ")):!r.commandItems&&!r.optionItems&&!r.items&&(x.textContent="◦");const S=Re("span",{className:`${this._menuCssPrefix}-content`,textContent:typeof r=="object"&&r.title||""},h);r.textCssClass&&S.classList.add(...r.textCssClass.split(" "))}const C=c>0?"sub-menu":"parent-menu";if(this._bindEventService.bind(h,"click",x=>s.call(this,x,t,r,c,o==null?void 0:o.column),void 0,C),((u=this._addonOptions)===null||u===void 0?void 0:u.subMenuOpenByEvent)==="mouseover"&&typeof l=="function"&&this._bindEventService.bind(h,"mouseover",x=>l.call(this,x,t,r,c),void 0,C),r.commandItems||r.optionItems||r.items){const x=document.createElement("span");x.className="sub-item-chevron",this._addonOptions.subItemChevronClass?x.classList.add(...this._addonOptions.subItemChevronClass.split(" ")):x.textContent="⮞",h.classList.add("slick-submenu-item"),h.appendChild(x)}}return h}}class lm extends lu{constructor(t,e,n){super(t,e,n),this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._currentCell=-1,this._currentRow=-1,this._lastMenuTypeClicked="",this._subMenuParentId=""}createParentMenu(t){var e,n,r,o,s,l,u;(e=this.menuElement)===null||e===void 0||e.remove(),this._menuElm=void 0;const h=this.grid.getCellFromEvent(t);if(h){this._currentCell=(n=h.cell)!==null&&n!==void 0?n:0,this._currentRow=(r=h.row)!==null&&r!==void 0?r:0;const c=((o=this._addonOptions)===null||o===void 0?void 0:o.commandItems)||[],p=((s=this._addonOptions)===null||s===void 0?void 0:s.optionItems)||[],m={cell:this._currentCell,row:this._currentRow,grid:this.grid};if(this.closeMenu(t,m),typeof t.stopPropagation=="function"&&(this.pubSubService.publish(`on${vl(this._camelPluginName)}BeforeMenuShow`,m),typeof((l=this.addonOptions)===null||l===void 0?void 0:l.onBeforeMenuShow)=="function"&&this.addonOptions.onBeforeMenuShow(t,m)===!1)||(this._menuElm=this.createMenu(c,p),this._menuElm&&(this._menuElm.style.top=`${t.pageY+5}px`,this._menuElm.style.left=`${t.pageX}px`,this._menuElm.style.display="block",document.body.appendChild(this._menuElm)),this.pubSubService.publish(`on${vl(this._camelPluginName)}AfterMenuShow`,m),typeof((u=this.addonOptions)===null||u===void 0?void 0:u.onAfterMenuShow)=="function"&&this.addonOptions.onAfterMenuShow(t,m)===!1))return}return this._menuElm}createMenu(t,e,n=0,r){var o,s,l,u,h,c,p,m;const v=this.grid.getColumns()[this._currentCell],_=this.grid.getDataItem(this._currentRow),C=(r==null?void 0:r.command)||(r==null?void 0:r.option);let x=n===1&&C?String(C).replace(/\s/g,""):"";x&&(this._subMenuParentId=x),n>1&&(x=this._subMenuParentId);let S=!0,E=!0;if(this._camelPluginName==="contextMenu"){if(S=this.checkIsColumnAllowed((s=(o=this._addonOptions)===null||o===void 0?void 0:o.optionShownOverColumnIds)!==null&&s!==void 0?s:[],v.id),E=this.checkIsColumnAllowed((u=(l=this._addonOptions)===null||l===void 0?void 0:l.commandShownOverColumnIds)!==null&&u!==void 0?u:[],v.id),!v||(!E||!t.length)&&(!S||!e.length)){this.hideMenu();return}}else if(!v||!v.cellMenu||!t.length&&!e.length)return;const D=`${this.menuCssClass} slick-menu-level-${n} ${this.gridUid}`,A=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${n}${this.gridUidSelector}`);if(A){if(A.dataset.subMenuParent===x)return A;this.disposeSubMenus()}const P=document.createElement("div");P.className=D,n>0&&(P.classList.add("slick-submenu"),x&&(P.dataset.subMenuParent=x));const M=isNaN(this.addonOptions.maxHeight)?this.addonOptions.maxHeight:`${(h=this.addonOptions.maxHeight)!==null&&h!==void 0?h:0}px`,B=isNaN(this.addonOptions.maxWidth)?this.addonOptions.maxWidth:`${(c=this.addonOptions.maxWidth)!==null&&c!==void 0?c:0}px`;M&&(P.style.maxHeight=M),B&&(P.style.maxWidth=B),!((p=this.addonOptions)===null||p===void 0)&&p.width&&(P.style.width=Ws((m=this.addonOptions)===null||m===void 0?void 0:m.width));const Z=Re("button",{ariaLabel:"Close",className:"close",type:"button",textContent:"×",dataset:{dismiss:this._menuCssPrefix}});if(!this.addonOptions.hideOptionSection&&S&&e.length>0){const L=Re("div",{className:`${this._menuCssPrefix}-option-list`,role:"menu"},P);this.populateCommandOrOptionTitle("option",this.addonOptions,L,n),!this.addonOptions.hideCloseButton&&n<1&&this.populateCommandOrOptionCloseBtn("option",Z,L),r&&n>0&&this.addSubMenuTitleWhenExists(r,L),this.populateCommandOrOptionItems("option",this.addonOptions,L,e,{cell:this._currentCell,row:this._currentRow,column:v,dataContext:_,grid:this.grid,level:n},this.handleMenuItemCommandClick,this.handleMenuItemMouseOver)}if(!this.addonOptions.hideCommandSection&&E&&t.length>0){const L=Re("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},P);this.populateCommandOrOptionTitle("command",this.addonOptions,L,n),!this.addonOptions.hideCloseButton&&n<1&&(!S||e.length===0||this.addonOptions.hideOptionSection)&&this.populateCommandOrOptionCloseBtn("command",Z,L),r&&n>0&&this.addSubMenuTitleWhenExists(r,L),this.populateCommandOrOptionItems("command",this.addonOptions,L,t,{cell:this._currentCell,row:this._currentRow,column:v,dataContext:_,grid:this.grid,level:n},this.handleMenuItemCommandClick,this.handleMenuItemMouseOver)}return n++,P}closeMenu(t,e){var n;if(this.menuElement){if(typeof((n=this.addonOptions)===null||n===void 0?void 0:n.onBeforeMenuClose)=="function"&&this.addonOptions.onBeforeMenuClose(t,e)===!1)return;this.hideMenu()}}hideMenu(){var t;(t=this.menuElement)===null||t===void 0||t.remove(),this._menuElm=null,this.disposeSubMenus()}checkIsColumnAllowed(t,e){return(t==null?void 0:t.length)>0?t.findIndex(n=>n===e)>=0:!0}handleBodyMouseDown(t){if(this.menuElement){let e=!1;const n=t.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(t.target)||n)&&(e=!0),(this.menuElement!==t.target&&!e&&!t.defaultPrevented||t.target.className==="close"&&n)&&this.closeMenu(t,{cell:this._currentCell,row:this._currentRow,grid:this.grid})}}handleCloseButtonClicked(t){t.defaultPrevented||this.closeMenu(t,{cell:0,row:0,grid:this.grid})}handleMenuItemMouseOver(t,e,n,r=0){(n==null?void 0:n[e])!==void 0&&n!=="divider"&&!n.disabled&&!n.divider&&(n.commandItems||n.optionItems||n.items?(this.repositionSubMenu(n,e,r,t),this._lastMenuTypeClicked=e):r===0&&this.disposeSubMenus())}handleMenuItemCommandClick(t,e,n,r=0){var o;if((n==null?void 0:n[e])!==void 0&&n!=="divider"&&!n.disabled&&!n.divider&&this._currentCell!==void 0&&this._currentRow!==void 0){if(e==="option"&&!this.grid.getEditorLock().commitCurrentEdit())return;const s=this._currentCell,l=this._currentRow,u=this.grid.getColumns()[this._currentCell],h=this.grid.getDataItem(this._currentRow),c=n[e]!==void 0?n[e]:"";if(c!==void 0&&!n[`${e}Items`]){const p={cell:this._currentCell,row:this._currentRow,grid:this.grid,[e]:c,item:n,column:u,dataContext:h},m=e==="command"?"onCommand":"onOptionSelected",v=`${this._camelPluginName}:${m}`;this.pubSubService.publish(v,p),typeof((o=this._addonOptions)===null||o===void 0?void 0:o[m])=="function"&&this._addonOptions[m](t,p),typeof n.action=="function"&&n.action.call(this,t,p),t.defaultPrevented||this.closeMenu(t,{cell:s,row:l,grid:this.grid})}else(n.commandItems||n.optionItems)&&this.repositionSubMenu(n,e,r,t);this._lastMenuTypeClicked=e}}populateCommandOrOptionCloseBtn(t,e,n){var r;this._bindEventService.bind(e,"click",s=>this.handleCloseButtonClicked(s),void 0,"parent-menu");const o=(r=n.querySelector(`.slick-${t}-header`))!==null&&r!==void 0?r:Re("div",{className:`slick-${t}-header`});o==null||o.appendChild(e),n.appendChild(o),o.classList.add("with-close")}repositionSubMenu(t,e,n,r){(r.target.classList.contains("slick-cell")||this._lastMenuTypeClicked!==e)&&this.disposeSubMenus();const o=this.createMenu((t==null?void 0:t.commandItems)||[],(t==null?void 0:t.optionItems)||[],n+1,t);o&&(o.style.display="block",document.body.appendChild(o),this.repositionMenu(r,o))}repositionMenu(t,e){var n,r,o,s,l,u;const h=e==null?void 0:e.classList.contains("slick-submenu"),c=h?t.target.closest(`.${this._menuCssPrefix}-item`):t.target.closest(".slick-cell");if(e&&c){e.style.top="0px",e.style.left="0px";const p=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t,m=Gn(c);let v=c&&this._camelPluginName==="cellMenu"?(o=m==null?void 0:m.left)!==null&&o!==void 0?o:0:p.pageX,_=c&&this._camelPluginName==="cellMenu"?(s=m==null?void 0:m.top)!==null&&s!==void 0?s:0:p.pageY;h&&this._camelPluginName==="contextMenu"&&(v=(l=m==null?void 0:m.left)!==null&&l!==void 0?l:0,_=(u=m==null?void 0:m.top)!==null&&u!==void 0?u:0);const C=c.offsetWidth||0,x=(e==null?void 0:e.offsetHeight)||0,S=(e==null?void 0:e.offsetWidth)||this._addonOptions.width||0,E=this.gridOptions.rowHeight||0,D=Number(this._addonOptions.autoAdjustDropOffset||0),A=Number(this._addonOptions.autoAlignSideOffset||0);if(this._addonOptions.autoAdjustDrop||this._addonOptions.dropDirection){const{bottom:P,top:M}=ou(c),B=P+D-E,Z=M-D+E;(B<x&&Z>B?"top":"bottom")==="top"||this._addonOptions.dropDirection==="top"?(e.classList.remove("dropdown"),e.classList.add("dropup"),h?_-=x-D-c.clientHeight:_-=x-D):(e.classList.remove("dropup"),e.classList.add("dropdown"),_=_+D,this._camelPluginName==="cellMenu"&&(h?_+=D:_+=E+D))}if(this._addonOptions.autoAlignSide||this._addonOptions.dropSide==="left"){const P=this.grid.getGridPosition();let M=v+Number(S);h&&(M+=c.clientWidth);const B=document.documentElement.clientWidth;(M>=P.width||M>=B?"left":"right")==="left"||!h&&this._addonOptions.dropSide==="left"?(e.classList.remove("dropright"),e.classList.add("dropleft"),this._camelPluginName==="cellMenu"&&!h?v-=Number(S)-C-A:v-=Number(S)-A):(e.classList.remove("dropleft"),e.classList.add("dropright"),h?v+=A+c.offsetWidth:v+=A)}e.style.top=`${_}px`,e.style.left=`${v}px`}}}class U_ extends lm{constructor(t,e,n){super(t,e,n),this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._defaults={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!0,subMenuOpenByEvent:"mouseover"},this.pluginName="CellMenu",this._camelPluginName="cellMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-cell-menu",this.init(n.gridOptions.cellMenu)}init(t){this._addonOptions={...this._defaults,...t},this.sortMenuItems(this.sharedService.allColumns),this._eventHandler.subscribe(this.grid.onClick,this.handleCellClick.bind(this)),this._addonOptions.hideMenuOnScroll&&this._eventHandler.subscribe(this.grid.onScroll,this.closeMenu.bind(this))}translateCellMenu(){var t;const e=(t=this.sharedService)===null||t===void 0?void 0:t.gridOptions,n=this.sharedService.allColumns;e!=null&&e.enableTranslate&&Array.isArray(n)&&n.forEach(r=>{if(r!=null&&r.cellMenu&&(Array.isArray(r.cellMenu.commandItems)||Array.isArray(r.cellMenu.optionItems))){const o=r.cellMenu.commandItems||[],s=r.cellMenu.optionItems||[];r.cellMenu.commandTitleKey&&(r.cellMenu.commandTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.cellMenu.commandTitleKey,"TEXT_COMMANDS")||r.cellMenu.commandTitle),r.cellMenu.optionTitleKey&&(r.cellMenu.optionTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.cellMenu.optionTitleKey,"TEXT_COMMANDS")||r.cellMenu.optionTitle),this.extensionUtility.translateMenuItemsFromTitleKey(o,"commandItems"),this.extensionUtility.translateMenuItemsFromTitleKey(s,"optionItems")}})}handleCellClick(t,e){this.disposeAllMenus();const n=this.grid.getCellFromEvent(t);if(n){const r=this.grid.getDataItem(n.row),o=this.grid.getColumns()[n.cell];if(o!=null&&o.cellMenu&&t.preventDefault(),this._addonOptions={...this._addonOptions,...o.cellMenu},e=e||{},e.column=o,e.dataContext=r,e.grid=this.grid,!this.extensionUtility.runOverrideFunctionWhenExists(this._addonOptions.menuUsabilityOverride,e))return;this._menuElm=this.createParentMenu(t),this._menuElm&&(this.repositionMenu(t,this._menuElm),this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.style.display="block"),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}}sortMenuItems(t){t.forEach(e=>{var n,r;!((n=e==null?void 0:e.cellMenu)===null||n===void 0)&&n.commandItems&&this.extensionUtility.sortItems(e.cellMenu.commandItems||[],"positionOrder"),!((r=e==null?void 0:e.cellMenu)===null||r===void 0)&&r.optionItems&&this.extensionUtility.sortItems(e.cellMenu.optionItems||[],"positionOrder")})}}class G_{constructor(t,e){this.grid=t,this.pluginName="CellRangeDecorator",this._defaults={selectionCssClass:"slick-range-decorator",selectionCss:{border:"2px dashed red",zIndex:"9999"},offset:{top:-1,left:-1,height:-2,width:-2}},this._addonOptions=ml(this._defaults,e)}get addonOptions(){return this._addonOptions}get addonElement(){return this._elem}dispose(){this.hide()}hide(){var t;(t=this._elem)===null||t===void 0||t.remove(),this._elem=null}show(t){var e,n;this._elem||(this._elem=Re("div",{className:this._addonOptions.selectionCssClass}),Object.keys(this._addonOptions.selectionCss).forEach(s=>{this._elem.style[s]=this._addonOptions.selectionCss[s]}),this._elem.style.position="absolute",(e=this.grid.getActiveCanvasNode())===null||e===void 0||e.appendChild(this._elem));const r=this.grid.getCellNodeBox(t.fromRow,t.fromCell),o=this.grid.getCellNodeBox(t.toRow,t.toCell);return r&&o&&(!((n=this._addonOptions)===null||n===void 0)&&n.offset)&&(this._elem.style.top=`${r.top+this._addonOptions.offset.top}px`,this._elem.style.left=`${r.left+this._addonOptions.offset.left}px`,this._elem.style.height=`${o.bottom-r.top+this._addonOptions.offset.height}px`,this._elem.style.width=`${o.right-r.left+this._addonOptions.offset.width}px`),this._elem}}class am{constructor(t){this._currentlySelectedRange=null,this._dragging=!1,this._gridUid="",this._columnOffset=0,this._rowOffset=0,this._isRightCanvas=!1,this._isBottomCanvas=!1,this._xDelayForNextCell=0,this._yDelayForNextCell=0,this._viewportHeight=0,this._viewportWidth=0,this._isRowMoveRegistered=!1,this._scrollLeft=0,this._scrollTop=0,this._defaults={autoScroll:!0,minIntervalToShowNextCell:30,maxIntervalToShowNextCell:600,accelerateInterval:5,selectionCss:{border:"2px dashed blue"}},this.pluginName="CellRangeSelector",this.onBeforeCellRangeSelected=new Slick.Event,this.onCellRangeSelecting=new Slick.Event,this.onCellRangeSelected=new Slick.Event,this._eventHandler=new Slick.EventHandler,this._addonOptions=ml(this._defaults,t)}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get gridUid(){var t,e;return this._gridUid||((e=(t=this._grid)===null||t===void 0?void 0:t.getUID())!==null&&e!==void 0?e:"")}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}init(t){this._grid=t,this._decorator=this._addonOptions.cellDecorator||new G_(t,this._addonOptions),this._canvas=t.getCanvasNode(),this._gridOptions=t.getOptions(),this._gridUid=t.getUID(),this._eventHandler.subscribe(this._grid.onDrag,this.handleDrag.bind(this)).subscribe(this._grid.onDragInit,this.handleDragInit.bind(this)).subscribe(this._grid.onDragStart,this.handleDragStart.bind(this)).subscribe(this._grid.onDragEnd,this.handleDragEnd.bind(this)).subscribe(this._grid.onScroll,this.handleScroll.bind(this))}destroy(){this.dispose()}dispose(){var t,e;(t=this._eventHandler)===null||t===void 0||t.unsubscribeAll(),on(this._activeCanvas),on(this._canvas),(e=this._decorator)===null||e===void 0||e.dispose(),this.stopIntervalTimer()}getCellDecorator(){return this._decorator}getCurrentRange(){return this._currentlySelectedRange}getMouseOffsetViewport(t,e){var n,r,o,s;const l=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t,u=this._activeViewport.scrollLeft,h=this._activeViewport.scrollTop,c=u+this._viewportWidth,p=h+this._viewportHeight,m=Gn(this._activeViewport),v=(o=m==null?void 0:m.left)!==null&&o!==void 0?o:0,_=(s=m==null?void 0:m.top)!==null&&s!==void 0?s:0,C=v+this._viewportWidth,x=_+this._viewportHeight,S={e:t,dd:e,viewport:{left:u,top:h,right:c,bottom:p,offset:{left:v,top:_,right:C,bottom:x}},offset:{x:0,y:0},isOutsideViewport:!1};return l.pageX<v?S.offset.x=l.pageX-v:l.pageX>C&&(S.offset.x=l.pageX-C),l.pageY<_?S.offset.y=_-l.pageY:l.pageY>x&&(S.offset.y=x-l.pageY),S.isOutsideViewport=!!S.offset.x||!!S.offset.y,S}stopIntervalTimer(){this._autoScrollTimerId&&(clearInterval(this._autoScrollTimerId),this._autoScrollTimerId=void 0)}handleDrag(t,e){if(!(!this._dragging&&!this._gridOptions.enableRowMoveManager)){if(this._gridOptions.enableRowMoveManager||t.stopImmediatePropagation(),this.addonOptions.autoScroll&&(this._draggingMouseOffset=this.getMouseOffsetViewport(t,e),this._draggingMouseOffset.isOutsideViewport))return this.handleDragOutsideViewport();this.stopIntervalTimer(),this.handleDragTo(t,e)}}handleDragOutsideViewport(){if(this._xDelayForNextCell=this.addonOptions.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.x)*this.addonOptions.accelerateInterval,this._yDelayForNextCell=this.addonOptions.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.y)*this.addonOptions.accelerateInterval,!this._autoScrollTimerId){let t=0,e=0;this._autoScrollTimerId=setInterval(()=>{let n=!1,r=!1;this._draggingMouseOffset.offset.x?(t+=this.addonOptions.minIntervalToShowNextCell,n=t>=this._xDelayForNextCell):t=0,this._draggingMouseOffset.offset.y?(e+=this.addonOptions.minIntervalToShowNextCell,r=e>=this._yDelayForNextCell):e=0,(n||r)&&(n&&(t=0),r&&(e=0),this.handleDragToNewPosition(n,r))},this.addonOptions.minIntervalToShowNextCell)}}handleDragToNewPosition(t,e){let n=this._draggingMouseOffset.e.pageX,r=this._draggingMouseOffset.e.pageY;const o=this._draggingMouseOffset.offset.x,s=this._draggingMouseOffset.offset.y,l=this._draggingMouseOffset.viewport.offset;t&&o&&(o>0?n=l.right+this._moveDistanceForOneCell.x:n=l.left-this._moveDistanceForOneCell.x),e&&s&&(s>0?r=l.top-this._moveDistanceForOneCell.y:r=l.bottom+this._moveDistanceForOneCell.y),this.handleDragTo({pageX:n,pageY:r},this._draggingMouseOffset.dd)}handleDragTo(t,e){var n,r,o,s,l,u;const h=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t,c=this._grid.getCellFromPoint(h.pageX-((s=(o=Gn(this._activeCanvas))===null||o===void 0?void 0:o.left)!==null&&s!==void 0?s:0)+this._columnOffset,h.pageY-((u=(l=Gn(this._activeCanvas))===null||l===void 0?void 0:l.top)!==null&&u!==void 0?u:0)+this._rowOffset);if(c!==void 0){if(this._gridOptions.frozenColumn>=0&&(!this._isRightCanvas&&c.cell>this._gridOptions.frozenColumn||this._isRightCanvas&&c.cell<=this._gridOptions.frozenColumn)||this._gridOptions.frozenRow>=0&&(!this._isBottomCanvas&&c.row>=this._gridOptions.frozenRow||this._isBottomCanvas&&c.row<this._gridOptions.frozenRow))return;if(this.addonOptions.autoScroll&&this._draggingMouseOffset){const p=this._grid.getCellNodeBox(c.row,c.cell);if(p){const m=this._draggingMouseOffset.viewport;(p.left<m.left||p.right>m.right||p.top<m.top||p.bottom>m.bottom)&&this._grid.scrollCellIntoView(c.row,c.cell)}}if(!this._grid.canCellBeSelected(c.row,c.cell))return;if(e!=null&&e.range){e.range.end=c;const p=new Slick.Range(e.range.start.row,e.range.start.cell,c.row,c.cell);this._decorator.show(p),this.onCellRangeSelecting.notify({range:p})}}}handleDragEnd(t,e){this._dragging&&(this._dragging=!1,t.stopImmediatePropagation(),this.stopIntervalTimer(),this._decorator.hide(),this.onCellRangeSelected.notify({range:new Slick.Range(e.range.start.row,e.range.start.cell,e.range.end.row,e.range.end.cell)}))}handleDragInit(t){var e,n,r,o;this._activeCanvas=this._grid.getActiveCanvasNode(t),this._activeViewport=this._grid.getActiveViewportNode(t);const s=this._grid.getDisplayedScrollbarDimensions();if(this._viewportWidth=this._activeViewport.offsetWidth-s.width,this._viewportHeight=this._activeViewport.offsetHeight-s.height,this._moveDistanceForOneCell={x:this._grid.getAbsoluteColumnMinWidth()/2,y:this._gridOptions.rowHeight/2},this._rowOffset=0,this._columnOffset=0,this._isBottomCanvas=this._activeCanvas.classList.contains("grid-canvas-bottom"),this._gridOptions.frozenRow>-1&&this._isBottomCanvas){const l=`${this.gridUidSelector} .grid-canvas-${this._gridOptions.frozenBottom?"bottom":"top"}`;this._rowOffset=(n=(e=document.querySelector(l))===null||e===void 0?void 0:e.clientHeight)!==null&&n!==void 0?n:0}this._isRightCanvas=this._activeCanvas.classList.contains("grid-canvas-right"),this._gridOptions.frozenColumn>-1&&this._isRightCanvas&&(this._columnOffset=(o=(r=document.querySelector(`${this.gridUidSelector} .grid-canvas-left`))===null||r===void 0?void 0:r.clientWidth)!==null&&o!==void 0?o:0),this._grid.getEditorLock().isActive()||(t.stopImmediatePropagation(),t.preventDefault())}handleDragStart(t,e){var n,r,o,s;const l=this._grid.getCellFromEvent(t);if(l&&this.onBeforeCellRangeSelected.notify(l).getReturnValue()!==!1&&this._grid.canCellBeSelected(l.row,l.cell)&&(this._dragging=!0,t.stopImmediatePropagation()),!this._dragging)return;this._grid.focus();let u=e.startX-((r=(n=Gn(this._canvas))===null||n===void 0?void 0:n.left)!==null&&r!==void 0?r:0);this._gridOptions.frozenColumn>=0&&this._isRightCanvas&&(u+=this._scrollLeft);let h=e.startY-((s=(o=Gn(this._canvas))===null||o===void 0?void 0:o.top)!==null&&s!==void 0?s:0);this._gridOptions.frozenRow>=0&&this._isBottomCanvas&&(h+=this._scrollTop);const c=this._grid.getCellFromPoint(u,h);return e.range={start:c,end:{}},this._currentlySelectedRange=e.range,this._decorator.show(new Slick.Range(c.row,c.cell))}handleScroll(t,e){this._scrollTop=e.scrollTop,this._scrollLeft=e.scrollLeft}}class W_{constructor(t){this._cachedPageRowCount=0,this._prevKeyDown="",this._ranges=[],this._defaults={selectActiveCell:!0},this.onSelectedRangesChanged=new Slick.Event,this.pluginName="CellSelectionModel",this._eventHandler=new Slick.EventHandler,t===void 0||t.cellRangeSelector===void 0?this._selector=new am({selectionCss:{border:"2px solid black"}}):this._selector=t.cellRangeSelector,this._addonOptions=t}get addonOptions(){return this._addonOptions}get cellRangeSelector(){return this._selector}get eventHandler(){return this._eventHandler}init(t){var e;this._grid=t,this.hasDataView()&&(this._dataView=(e=t==null?void 0:t.getData())!==null&&e!==void 0?e:{}),this._addonOptions={...this._defaults,...this._addonOptions},this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.handleActiveCellChange.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)).subscribe(this._selector.onBeforeCellRangeSelected,this.handleBeforeCellRangeSelected.bind(this)).subscribe(this._selector.onCellRangeSelected,this.handleCellRangeSelected.bind(this)),t.registerPlugin(this._selector)}destroy(){this.dispose()}dispose(){var t,e;this._selector&&(this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this))),this._eventHandler.unsubscribeAll(),(t=this._grid)===null||t===void 0||t.unregisterPlugin(this._selector),(e=this._selector)===null||e===void 0||e.dispose()}getSelectedRanges(){return this._ranges}getViewportRowCount(){var t,e,n;const r=this._grid.getViewportNode(),o=(t=r==null?void 0:r.clientHeight)!==null&&t!==void 0?t:0,s=(n=(e=this._grid.getScrollbarDimensions())===null||e===void 0?void 0:e.height)!==null&&n!==void 0?n:0;return Math.floor((o-s)/this._grid.getOptions().rowHeight)||1}hasDataView(){return!Array.isArray(this._grid.getData())}rangesAreEqual(t,e){let n=t.length!==e.length;if(!n){for(let r=0;r<t.length;r++)if(t[r].fromCell!==e[r].fromCell||t[r].fromRow!==e[r].fromRow||t[r].toCell!==e[r].toCell||t[r].toRow!==e[r].toRow){n=!0;break}}return!n}refreshSelections(){this.setSelectedRanges(this.getSelectedRanges())}removeInvalidRanges(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];this._grid.canCellBeSelected(r.fromRow,r.fromCell)&&this._grid.canCellBeSelected(r.toRow,r.toCell)&&e.push(r)}return e}resetPageRowCount(){this._cachedPageRowCount=0}setSelectedRanges(t,e="SlickCellSelectionModel.setSelectedRanges"){if((!this._ranges||this._ranges.length===0)&&(!t||t.length===0))return;const n=!this.rangesAreEqual(this._ranges,t);if(this._ranges=this.removeInvalidRanges(t),n){const r=new Slick.EventData;Object.defineProperty(r,"detail",{writable:!0,configurable:!0,value:{caller:e}}),this.onSelectedRangesChanged.notify(this._ranges,r)}}handleActiveCellChange(t,e){var n,r;this._prevSelectedRow=void 0,!((n=this._addonOptions)===null||n===void 0)&&n.selectActiveCell&&e.row!==null&&e.cell!==null?this.setSelectedRanges([new Slick.Range(e.row,e.cell)]):!((r=this._addonOptions)===null||r===void 0)&&r.selectActiveCell||this.setSelectedRanges([])}handleBeforeCellRangeSelected(t){if(this._grid.getEditorLock().isActive())return t.stopPropagation(),!1}handleCellRangeSelected(t,e){this._grid.setActiveCell(e.range.fromRow,e.range.fromCell,!1,!1,!0),this.setSelectedRanges([e.range])}isKeyAllowed(t){return["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","PageDown","PageUp","Home","End"].some(e=>e===t)}handleKeyDown(t){var e;let n,r;const o=this._grid.getActiveCell(),s=t.ctrlKey||t.metaKey;let l=0;if(this._dataView?l=((e=this._dataView)===null||e===void 0?void 0:e.getPagingInfo().pageSize)||this._dataView.getLength():l=this._grid.getDataLength(),o&&t.shiftKey&&!s&&!t.altKey&&this.isKeyAllowed(t.key)&&(n=this.getSelectedRanges().slice(),n.length||n.push(new Slick.Range(o.row,o.cell)),r=n.pop(),typeof(r==null?void 0:r.contains)=="function")){r.contains(o.row,o.cell)||(r=new Slick.Range(o.row,o.cell));let u=r.toRow-r.fromRow,h=r.toCell-r.fromCell;const c=o.row===r.fromRow?1:-1,p=o.cell===r.fromCell?1:-1,m=t.key.startsWith("Arrow");let v=0;m?(t.key==="ArrowLeft"?h-=p:t.key==="ArrowRight"?h+=p:t.key==="ArrowUp"?u-=c:t.key==="ArrowDown"&&(u+=c),v=o.row+c*u):(this._cachedPageRowCount<1&&(this._cachedPageRowCount=this.getViewportRowCount()),this._prevSelectedRow===void 0&&(this._prevSelectedRow=o.row),t.key==="Home"?v=0:t.key==="End"?v=l-1:t.key==="PageUp"?(this._prevSelectedRow>=0&&(v=this._prevSelectedRow-this._cachedPageRowCount),v<0&&(v=0)):t.key==="PageDown"&&(this._prevSelectedRow<=l-1&&(v=this._prevSelectedRow+this._cachedPageRowCount),v>l-1&&(v=l-1)),this._prevSelectedRow=v);const _=new Slick.Range(o.row,o.cell,v,o.cell+p*h);if(this.removeInvalidRanges([_]).length){n.push(_);const C=c>0?_.toRow:_.fromRow,x=p>0?_.toCell:_.fromCell;m?(this._grid.scrollRowIntoView(C),this._grid.scrollCellIntoView(C,x,!1)):(this._grid.scrollRowIntoView(v),this._grid.scrollCellIntoView(v,x,!1))}else n.push(r);this.setSelectedRanges(n),t.preventDefault(),t.stopPropagation(),this._prevKeyDown=t.key}}}class Ch{constructor(t){this._ranges=[],this._defaults={autoScrollWhenDrag:!0,cellRangeSelector:void 0,dragToSelect:!1,selectActiveRow:!0},this.pluginName="RowSelectionModel",this.onSelectedRangesChanged=new Slick.Event,this._eventHandler=new Slick.EventHandler,this._addonOptions={...this._defaults,...t}}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get gridOptions(){return this._grid.getOptions()}init(t){this._grid=t,this._addonOptions={...this._defaults,...this._addonOptions},this._selector=this.addonOptions.cellRangeSelector,!this._selector&&this._addonOptions.dragToSelect&&(this._selector=new am({selectionCss:{border:"none"},autoScroll:this._addonOptions.autoScrollWhenDrag}),this.addonOptions.cellRangeSelector=this._selector),this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.handleActiveCellChange.bind(this)).subscribe(this._grid.onClick,this.handleClick.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)),this._selector&&(this._grid.registerPlugin(this._selector),this._selector.onCellRangeSelecting.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.subscribe(this.handleBeforeCellRangeSelected.bind(this)))}destroy(){this.dispose()}dispose(){this._eventHandler.unsubscribeAll(),this.disposeSelector()}disposeSelector(){var t,e;this._selector&&(this._selector.onCellRangeSelecting.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._grid.unregisterPlugin(this._selector),(t=this._selector)===null||t===void 0||t.destroy(),(e=this._selector)===null||e===void 0||e.dispose())}getCellRangeSelector(){return this._selector}getSelectedRanges(){return this._ranges}getSelectedRows(){return this.rangesToRows(this._ranges)}refreshSelections(){this.setSelectedRows(this.getSelectedRows())}setSelectedRows(t){this.setSelectedRanges(this.rowsToRanges(t),"SlickRowSelectionModel.setSelectedRows")}setSelectedRanges(t,e="SlickRowSelectionModel.setSelectedRanges"){if((!this._ranges||this._ranges.length===0)&&(!t||t.length===0))return;this._ranges=t;const n=new Slick.EventData;Object.defineProperty(n,"detail",{writable:!0,configurable:!0,value:{caller:e}}),this.onSelectedRangesChanged.notify(this._ranges,n)}getRowsRange(t,e){let n;const r=[];for(n=t;n<=e;n++)r.push(n);for(n=e;n<t;n++)r.push(n);return r}handleBeforeCellRangeSelected(t,e){var n;let r=!1;if(this.gridOptions.enableRowMoveManager&&(r=(n=this.isHandlerColumn(e.cell))!==null&&n!==void 0?n:!1),this._grid.getEditorLock().isActive()||r)return t.stopPropagation(),!1;this._grid.setActiveCell(e.row,e.cell)}handleCellRangeSelected(t,e){if(!this.gridOptions.multiSelect||!this.addonOptions.selectActiveRow)return!1;this.setSelectedRanges([new Slick.Range(e.range.fromRow,0,e.range.toRow,this._grid.getColumns().length-1)])}handleActiveCellChange(t,e){this._addonOptions.selectActiveRow&&e.row!==null&&this.setSelectedRanges([new Slick.Range(e.row,0,e.row,this._grid.getColumns().length-1)])}handleClick(t){const e=this._grid.getCellFromEvent(t);if(!e||!this._grid.canCellBeActive(e.row,e.cell)||!this.gridOptions.multiSelect||!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return!1;let n=this.rangesToRows(this._ranges);const r=n.indexOf(e.row);if(r===-1&&(t.ctrlKey||t.metaKey))n.push(e.row),this._grid.setActiveCell(e.row,e.cell);else if(r!==-1&&(t.ctrlKey||t.metaKey))n=n.filter(s=>s!==e.row),this._grid.setActiveCell(e.row,e.cell);else if(n.length&&t.shiftKey){const s=n.pop(),l=Math.min(e.row,s),u=Math.max(e.row,s);n=[];for(let h=l;h<=u;h++)h!==s&&n.push(h);n.push(s),this._grid.setActiveCell(e.row,e.cell)}const o=this.rowsToRanges(n);return this.setSelectedRanges(o),t.stopImmediatePropagation(),!0}handleKeyDown(t){const e=this._grid.getActiveCell();if(this.gridOptions.multiSelect&&e&&t.shiftKey&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&(t.which===xi.UP||t.key==="ArrowUp"||t.which===xi.DOWN||t.key==="ArrowDown")){let n=this.getSelectedRows();n.sort((l,u)=>l-u),n.length||(n=[e.row]);let r,o=n[0],s=n[n.length-1];if(t.which===xi.DOWN||t.key==="ArrowDown"?r=e.row<s||o===s?++s:++o:r=e.row<s?--s:--o,r>=0&&r<this._grid.getDataLength()){this._grid.scrollRowIntoView(r);const l=this.rowsToRanges(this.getRowsRange(o,s));this.setSelectedRanges(l)}t.preventDefault(),t.stopPropagation()}}isHandlerColumn(t){const n=this._grid.getColumns()[t].behavior||"";return/move|selectAndMove/.test(n)}rangesToRows(t){const e=[];for(let n=0;n<t.length;n++)for(let r=t[n].fromRow;r<=t[n].toRow;r++)e.push(r);return e}rowsToRanges(t){const e=[],n=this._grid.getColumns().length-1;for(const r of t)e.push(new Slick.Range(r,0,r,n));return e}}class dm{constructor(t,e){this.pubSubService=t,this.pluginName="CheckboxSelectColumn",this._defaults={columnId:"_checkbox_selector",cssClass:null,field:"_checkbox_selector",hideSelectAllCheckbox:!1,toolTip:"Select/Deselect All",width:30,applySelectOnAllPages:!0,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0},this._addonOptions=this._defaults,this._checkboxColumnCellIndex=null,this._isSelectAllChecked=!1,this._isUsingDataView=!1,this._selectedRowsLookup={},this._selectAll_UID=this.createUID(),this._bindEventService=new Nn,this._eventHandler=new Slick.EventHandler,this._addonOptions={...this._defaults,...e}}get addonOptions(){return this._addonOptions}get headerRowNode(){return this._headerRowNode}get gridOptions(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get selectAllUid(){return this._selectAll_UID}set selectedRowsLookup(t){this._selectedRowsLookup=t}init(t){this._grid=t,this._isUsingDataView=!Array.isArray(t.getData()),this._isUsingDataView&&(this._dataView=t.getData()),this.gridOptions.backendServiceApi&&(this._addonOptions.applySelectOnAllPages=!1),this._eventHandler.subscribe(t.onSelectedRowsChanged,this.handleSelectedRowsChanged.bind(this)).subscribe(t.onClick,this.handleClick.bind(this)).subscribe(t.onKeyDown,this.handleKeyDown.bind(this)),this._isUsingDataView&&this._dataView&&this._addonOptions.applySelectOnAllPages&&this._eventHandler.subscribe(this._dataView.onSelectedRowIdsChanged,this.handleDataViewSelectedIdsChanged.bind(this)).subscribe(this._dataView.onPagingInfoChanged,this.handleDataViewSelectedIdsChanged.bind(this)),this._addonOptions.hideInFilterHeaderRow||this.addCheckboxToFilterHeaderRow(t),this._addonOptions.hideInColumnTitleRow||this._eventHandler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this)),(!this._rowSelectionModel||!this._grid.getSelectionModel())&&(this._rowSelectionModel=new Ch(this.gridOptions.rowSelectionOptions),this._grid.setSelectionModel(this._rowSelectionModel)),this.gridOptions.preselectedRows&&this._rowSelectionModel&&this._grid.getSelectionModel()&&setTimeout(()=>this.selectRows(this.gridOptions.preselectedRows||[])),typeof this._addonOptions.selectableOverride=="function"&&this.selectableOverride(this._addonOptions.selectableOverride)}dispose(){this._bindEventService.unbindAll(),this._eventHandler.unsubscribeAll()}create(t,e){var n,r;if(this._addonOptions={...this._defaults,...e.checkboxSelector},Array.isArray(t)&&e){const o=this.getColumnDefinition();if(!t.some(s=>s.id===o.id)){const s=(r=(n=e==null?void 0:e.checkboxSelector)===null||n===void 0?void 0:n.columnIndexPosition)!==null&&r!==void 0?r:0;s>0?t.splice(s,0,o):t.unshift(o),this.pubSubService.publish("onPluginColumnsChanged",{columns:t,pluginName:this.pluginName})}}return this}getOptions(){return this._addonOptions}setOptions(t){var e;if(this._addonOptions={...this._addonOptions,...t},this._addonOptions.hideSelectAllCheckbox)this.hideSelectAllFromColumnHeaderTitleRow(),this.hideSelectAllFromColumnHeaderFilterRow();else if(this._addonOptions.hideInColumnTitleRow?this.hideSelectAllFromColumnHeaderTitleRow():(this.renderSelectAllCheckbox(this._isSelectAllChecked),this._eventHandler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))),this._addonOptions.hideInFilterHeaderRow)this.hideSelectAllFromColumnHeaderFilterRow();else{const n=(e=this.headerRowNode)===null||e===void 0?void 0:e.querySelector("#filter-checkbox-selectall-container");if(n){n.style.display="flex",n.ariaChecked=String(this._isSelectAllChecked);const r=n.querySelector('input[type="checkbox"]');r&&(r.ariaChecked=String(this._isSelectAllChecked),r.checked=this._isSelectAllChecked)}}}deSelectRows(t){const e=[];for(const n of t)this._selectedRowsLookup[n]&&(e[e.length]=n);this._grid.setSelectedRows(this._grid.getSelectedRows().filter(n=>e.indexOf(n)<0),"SlickCheckboxSelectColumn.deSelectRows")}selectRows(t){var e;const n=[];for(const o of t)this._selectedRowsLookup[o]&&(n[n.length]=o);const r=(e=this._grid.getSelectedRows())===null||e===void 0?void 0:e.concat(n);this._grid.setSelectedRows(r)}getColumnDefinition(){var t,e;const n=String((e=(t=this._addonOptions)===null||t===void 0?void 0:t.columnId)!==null&&e!==void 0?e:this._defaults.columnId);return{id:n,name:this._addonOptions.hideSelectAllCheckbox||this._addonOptions.hideInColumnTitleRow?"":`<input id="header-selector${this._selectAll_UID}" type="checkbox"><label for="header-selector${this._selectAll_UID}"></label>`,toolTip:this._addonOptions.hideSelectAllCheckbox||this._addonOptions.hideInColumnTitleRow?"":this._addonOptions.toolTip,field:n,cssClass:this._addonOptions.cssClass,excludeFromExport:!0,excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromQuery:!0,excludeFromHeaderMenu:!0,hideSelectAllCheckbox:this._addonOptions.hideSelectAllCheckbox,resizable:!1,sortable:!1,width:this._addonOptions.width||30,formatter:this.checkboxSelectionFormatter.bind(this)}}hideSelectAllFromColumnHeaderTitleRow(){this._grid.updateColumnHeader(this._addonOptions.columnId||"","","")}hideSelectAllFromColumnHeaderFilterRow(){var t;const e=(t=this.headerRowNode)===null||t===void 0?void 0:t.querySelector("#filter-checkbox-selectall-container");e&&(e.style.display="none")}toggleRowSelection(t){this.toggleRowSelectionWithEvent(null,t)}toggleRowSelectionWithEvent(t,e){const n=this._grid.getDataItem(e);if(!this.checkSelectableOverride(e,n,this._grid))return;const r=this._grid.getSelectedRows();this._addonOptions.onRowToggleStart&&this._addonOptions.onRowToggleStart(t,{row:e,previousSelectedRows:r});const o=this._selectedRowsLookup[e]?this._grid.getSelectedRows().filter(s=>s!==e):this._grid.getSelectedRows().concat(e);this._grid.setSelectedRows(o,"click.toggle"),this._grid.setActiveCell(e,this.getCheckboxColumnCellIndex()),this._addonOptions.onRowToggleEnd&&this._addonOptions.onRowToggleEnd(t,{row:e,previousSelectedRows:r})}selectableOverride(t){this._selectableOverride=t}addCheckboxToFilterHeaderRow(t){this._eventHandler.subscribe(t.onHeaderRowCellRendered,(e,n)=>{if(n.column.field===(this._addonOptions.field||"_checkbox_selector")){on(n.node);const r=Re("span",{id:"filter-checkbox-selectall-container",ariaChecked:"false"});r.appendChild(Re("input",{type:"checkbox",id:`header-filter-selector${this._selectAll_UID}`})),r.appendChild(Re("label",{htmlFor:`header-filter-selector${this._selectAll_UID}`})),n.node.appendChild(r),this._headerRowNode=n.node,this._bindEventService.bind(r,"click",o=>this.handleHeaderClick(o,n))}})}checkboxSelectionFormatter(t,e,n,r,o,s){if(o&&this.checkSelectableOverride(t,o,s)){const l=this.createUID()+t;return`<input id="selector${l}" type="checkbox" ${this._selectedRowsLookup[t]?'checked="checked" aria-checked="true"':'aria-checked="false"'}><label for="selector${l}"></label>`}return null}checkSelectableOverride(t,e,n){return typeof this._selectableOverride=="function"?this._selectableOverride(t,e,n):!0}createUID(){return Math.round(1e7*Math.random())}getCheckboxColumnCellIndex(){if(this._checkboxColumnCellIndex===null){this._checkboxColumnCellIndex=0;const t=this._grid.getColumns();for(let e=0;e<t.length;e++)t[e].id===this._addonOptions.columnId&&(this._checkboxColumnCellIndex=e)}return this._checkboxColumnCellIndex}handleDataViewSelectedIdsChanged(){var t;const e=this._dataView.getAllSelectedFilteredIds(),n=this._dataView.getFilteredItems();let r=0;if(typeof this._selectableOverride=="function"&&e.length>0)for(let o=0;o<this._dataView.getItemCount();o++){const s=this._dataView.getItemByIdx(o),l=this._dataView.getIdPropertyName(),u=s[l];n.findIndex(c=>c[l]===u)>=0&&!this.checkSelectableOverride(o,s,this._grid)&&r++}if(this._isSelectAllChecked=e.length+r>=n.length,!this._addonOptions.hideInColumnTitleRow&&!this._addonOptions.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._addonOptions.hideInFilterHeaderRow){const o=(t=this.headerRowNode)===null||t===void 0?void 0:t.querySelector(`#header-filter-selector${this._selectAll_UID}`);o&&(o.ariaChecked=String(this._isSelectAllChecked),o.checked=this._isSelectAllChecked)}}handleClick(t,e){if(this._grid.getColumns()[e.cell].id===this._addonOptions.columnId&&t.target.type==="checkbox"){if(t.target.ariaChecked=String(t.target.checked),this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){t.preventDefault(),t.stopImmediatePropagation();return}this.toggleRowSelectionWithEvent(t,e.row),t.stopPropagation(),t.stopImmediatePropagation()}}handleHeaderClick(t,e){if(e.column.id===this._addonOptions.columnId&&t.target.type==="checkbox"){if(t.target.ariaChecked=String(t.target.checked),this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){t.preventDefault(),t.stopImmediatePropagation();return}let n=t.target.checked;const r=n?"click.selectAll":"click.unselectAll",o=this._grid.getSelectedRows();this._addonOptions.onSelectAllToggleStart&&this._addonOptions.onSelectAllToggleStart(t,{previousSelectedRows:o,caller:r});let s=[];if(n){const l=[];for(let u=0;u<this._grid.getDataLength();u++){const h=this._grid.getDataItem(u);!h.__group&&!h.__groupTotals&&this.checkSelectableOverride(u,h,this._grid)&&l.push(u)}s=l,n=!0}if(this._isUsingDataView&&this._dataView&&this._addonOptions.applySelectOnAllPages){const l=[],u=this._dataView.getFilteredItems();for(let h=0;h<u.length;h++){const c=u[h];this.checkSelectableOverride(h,c,this._grid)&&l.push(c[this._dataView.getIdPropertyName()])}this._dataView.setSelectedIds(l,{isRowBeingAdded:n})}this._grid.setSelectedRows(s,r),this._addonOptions.onSelectAllToggleEnd&&this._addonOptions.onSelectAllToggleEnd(t,{rows:s,previousSelectedRows:o,caller:r}),t.stopPropagation(),t.stopImmediatePropagation()}}handleKeyDown(t,e){(t.which===xi.SPACE||t.key===" ")&&this._grid.getColumns()[e.cell].id===this._addonOptions.columnId&&((!this._grid.getEditorLock().isActive()||this._grid.getEditorLock().commitCurrentEdit())&&this.toggleRowSelectionWithEvent(t,e.row),t.preventDefault(),t.stopImmediatePropagation())}handleSelectedRowsChanged(){var t,e;const n=this._grid.getSelectedRows(),r={};let o=0,s=0,l=0,u=0;if(typeof this._selectableOverride=="function")for(l=0;l<this._grid.getDataLength();l++){const c=this._grid.getDataItem(l);this.checkSelectableOverride(s,c,this._grid)||u++}const h=[];for(s=0;s<n.length;s++){o=n[s];const c=this._grid.getDataItem(o);this.checkSelectableOverride(s,c,this._grid)?(r[o]=!0,r[o]!==this._selectedRowsLookup[o]&&(this._grid.invalidateRow(o),delete this._selectedRowsLookup[o])):h.push(o)}for(const c in this._selectedRowsLookup)c!==void 0&&this._grid.invalidateRow(+c);if(this._selectedRowsLookup=r,this._grid.render(),this._isSelectAllChecked=((t=n==null?void 0:n.length)!==null&&t!==void 0?t:0)+u>=this._grid.getDataLength(),(!this._isUsingDataView||!this._addonOptions.applySelectOnAllPages)&&(!this._addonOptions.hideInColumnTitleRow&&!this._addonOptions.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._addonOptions.hideInFilterHeaderRow)){const c=(e=this.headerRowNode)===null||e===void 0?void 0:e.querySelector(`#header-filter-selector${this._selectAll_UID}`);c&&(c.ariaChecked=String(this._isSelectAllChecked),c.checked=this._isSelectAllChecked)}if(h.length>0){for(const c of h){const p=n.indexOf(c);n.splice(p,1)}this._grid.setSelectedRows(n,"click.toggle")}}renderSelectAllCheckbox(t){const e=t?' checked="checked" aria-checked="true"':' aria-checked="false"';this._grid.updateColumnHeader(this._addonOptions.columnId||"",`<input id="header-selector${this._selectAll_UID}" type="checkbox"${e}><label for="header-selector${this._selectAll_UID}"></label>`,this._addonOptions.toolTip)}}class um extends lu{constructor(t,e,n,r,o){var s,l,u,h;super(t,n,r),this.extensionUtility=t,this.filterService=e,this.pubSubService=n,this.sharedService=r,this.sortService=o,this._areVisibleColumnDifferent=!1,this._columns=[],this._columnCheckboxes=[],this._commandMenuElm=null,this._headerElm=null,this._isMenuOpen=!1,this._subMenuParentId="",this._defaults={dropSide:"left",showButton:!0,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",marginBottom:15,menuWidth:18,minHeight:250,contentMinWidth:0,resizeOnShowHeaderRow:!1,syncResizeTitle:"Synchronous resize",subMenuOpenByEvent:"mouseover",headerColumnValueExtractor:c=>c.name},this.onAfterMenuShow=new Slick.Event,this.onBeforeMenuShow=new Slick.Event,this.onMenuClose=new Slick.Event,this.onCommand=new Slick.Event,this.onColumnsChanged=new Slick.Event,this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-grid-menu",this._camelPluginName="gridMenu",this._columns=(s=this.sharedService.allColumns)!==null&&s!==void 0?s:[],this._gridUid=(h=(u=(l=this.grid)===null||l===void 0?void 0:l.getUID)===null||u===void 0?void 0:u.call(l))!==null&&h!==void 0?h:"",this.initEventHandlers(),this.init()}get addonOptions(){return this._addonOptions||{}}get columns(){return this._columns}set columns(t){this._columns=t}get gridOptions(){return this.grid.getOptions()||{}}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}initEventHandlers(){this._eventHandler.subscribe(this.grid.onColumnsReordered,au.bind(this)),this._eventHandler.subscribe(this.grid.onBeforeDestroy,this.dispose.bind(this)),this._eventHandler.subscribe(this.grid.onSetOptions,(t,e)=>{if(e&&e.optionsBefore&&e.optionsAfter){const n=e.optionsBefore.frozenColumn>=0&&e.optionsAfter.frozenColumn===-1,r=e.optionsBefore.frozenColumn===-1&&e.optionsAfter.frozenColumn>=0;(n||r)&&this.recreateGridMenu()}})}init(){var t;this._gridUid=(t=this.grid.getUID())!==null&&t!==void 0?t:"",this._userOriginalGridMenu={...this.sharedService.gridOptions.gridMenu},this._addonOptions={...this._defaults,...this.getDefaultGridMenuOptions(),...this.sharedService.gridOptions.gridMenu},this.sharedService.gridOptions.gridMenu=this._addonOptions;const e=this._userOriginalGridMenu.commandItems,n=this._userOriginalGridMenu&&Array.isArray(e)?e:[];this._addonOptions.commandItems=[...n,...this.addGridMenuCustomCommands(n)],this.extensionUtility.translateMenuItemsFromTitleKey(this._addonOptions.commandItems||[],"commandItems"),this.extensionUtility.sortItems(this._addonOptions.commandItems,"positionOrder"),this._addonOptions.commandItems=this._addonOptions.commandItems,this.createGridMenu()}dispose(){this.deleteMenu(),super.dispose()}deleteMenu(){var t,e;this._bindEventService.unbindAll(),(t=this._menuElm)===null||t===void 0||t.remove(),this._menuElm=null,(e=this._gridMenuButtonElm)===null||e===void 0||e.remove(),this._headerElm&&(this._headerElm.style.width="100%")}createColumnPickerContainer(){this._menuElm&&(hm.call(this,this._menuElm),this._listElm=Re("div",{className:"slick-column-picker-list",role:"menu"}),this._bindEventService.bind(this._menuElm,"click",fm.bind(this),void 0,"parent-menu"))}createGridMenu(){var t,e,n,r;const o=this._gridUid?`.${this._gridUid}`:"",s=((t=this._addonOptions)===null||t===void 0?void 0:t.menuWidth)||this._defaults.menuWidth,l=this.gridOptions.hasOwnProperty("frozenColumn")&&this.gridOptions.frozenColumn>=0?"right":"left",u=this.grid.getContainerNode();if(this._headerElm=u.querySelector(`.slick-header-${l}`),this._headerElm&&this._addonOptions){if(this._headerElm.style.width=`calc(100% - ${s}px)`,((e=this._addonOptions.resizeOnShowHeaderRow)!==null&&e!==void 0?e:this._defaults.resizeOnShowHeaderRow)&&this.gridOptions.showHeaderRow){const p=u.querySelector(`${o} .slick-headerrow`);p&&(p.style.width=`calc(100% - ${s}px)`)}((n=this._addonOptions.showButton)!==null&&n!==void 0?n:this._defaults.showButton)&&(this._gridMenuButtonElm=Re("button",{className:"slick-grid-menu-button",ariaLabel:"Grid Menu"}),!((r=this._addonOptions)===null||r===void 0)&&r.iconCssClass&&this._gridMenuButtonElm.classList.add(...this._addonOptions.iconCssClass.split(" ")),this._headerElm.parentElement.insertBefore(this._gridMenuButtonElm,this._headerElm.parentElement.firstChild),this._bindEventService.bind(this._gridMenuButtonElm,"click",this.showGridMenu.bind(this))),this.sharedService.gridOptions.gridMenu={...this._defaults,...this._addonOptions},this.translateTitleLabels(this._addonOptions),this.translateTitleLabels(this.sharedService.gridOptions.gridMenu),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this)),this._bindEventService.bind(document.body,"beforeunload",this.dispose.bind(this))}}createCommandMenu(t,e=0,n){const r=n==null?void 0:n.command;let o=e===1&&r?r.replace(/\s/g,""):"";o&&(this._subMenuParentId=o),e>1&&(o=this._subMenuParentId);const s=`${this.menuCssClass} slick-menu-level-${e} ${this._gridUid}`,l=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${e}${this.gridUidSelector}`);if(l){if(l.dataset.subMenuParent===o)return l;this.disposeSubMenus()}const u=Re("div",{role:"menu",className:s,ariaLabel:e>1?"SubMenu":"Grid Menu"});e>0&&(u.classList.add("slick-submenu"),o&&(u.dataset.subMenuParent=o));const h={grid:this.grid,menu:this._menuElm,columns:this.columns,allColumns:this.getAllColumns(),visibleColumns:this.getVisibleColumns(),level:e};return this._commandMenuElm=this.recreateCommandList(t,u,h,n),e++,u}getAllColumns(){return this._columns}getVisibleColumns(){return this.grid.getColumns()}hideMenu(t){var e,n,r;const o={grid:this.grid,menu:this._menuElm,allColumns:this.columns,visibleColumns:this.getVisibleColumns()};if(this.pubSubService.publish("onGridMenuMenuClose",o),!(typeof((e=this._addonOptions)===null||e===void 0?void 0:e.onMenuClose)=="function"&&this._addonOptions.onMenuClose(t,o)===!1||this.onMenuClose.notify(o,null,this).getReturnValue()===!1)){if(this._isMenuOpen=!1,typeof((n=this.grid)===null||n===void 0?void 0:n.autosizeColumns)=="function"){const s=this.grid.getUID()||"";this._areVisibleColumnDifferent&&s&&document.querySelector(`.${s}`)!==null&&(this.gridOptions.enableAutoSizeColumns&&this.grid.autosizeColumns(),this._areVisibleColumnDifferent=!1)}this.disposeSubMenus(),(r=this._menuElm)===null||r===void 0||r.remove(),this._menuElm=null}}recreateGridMenu(){this.deleteMenu(),this.init()}repositionMenu(t,e,n,r){var o,s,l,u,h,c,p,m,v,_,C;const x=(s=(o=t==null?void 0:t.touches)===null||o===void 0?void 0:o[0])!==null&&s!==void 0?s:t,S=e.classList.contains("slick-submenu"),E=S?t.target.closest(".slick-menu-item"):x.target;if(E){const D=n||this._gridMenuButtonElm,A=Gn(n),P=Gn(E),M=r??this._addonOptions,B=getComputedStyle(D),Z=parseInt((l=B==null?void 0:B.width)!==null&&l!==void 0?l:(u=this._defaults)===null||u===void 0?void 0:u.menuWidth,10),L=(h=e==null?void 0:e.offsetWidth)!==null&&h!==void 0?h:0,ae=(p=(c=M==null?void 0:M.contentMinWidth)!==null&&c!==void 0?c:this._defaults.contentMinWidth)!==null&&p!==void 0?p:0,_e=(ae>L?ae:L)||0,J=(m=A==null?void 0:A.top)!==null&&m!==void 0?m:0,U=(v=A==null?void 0:A.right)!==null&&v!==void 0?v:0;let F,de;if(S?(de=(_=P==null?void 0:P.top)!==null&&_!==void 0?_:0,F=(C=P==null?void 0:P.left)!==null&&C!==void 0?C:0):(de=J+D.offsetHeight,F=(M==null?void 0:M.dropSide)==="right"?U-Z:U-_e),S){const De=(e==null?void 0:e.clientHeight)||0,{bottom:ne,top:pe}=ou(E);(ne<De&&pe>ne?"top":"bottom")==="top"?(e.classList.remove("dropdown"),e.classList.add("dropup"),de-=De-E.clientHeight):(e.classList.remove("dropup"),e.classList.add("dropdown"))}const qe=this.grid.getGridPosition();let Ie=F+Number(L);S&&(Ie+=E.clientWidth);const xe=document.documentElement.clientWidth;(Ie>=qe.width||Ie>=xe?"left":"right")==="left"||!S&&(M==null?void 0:M.dropSide)==="left"?(e.classList.remove("dropright"),e.classList.add("dropleft"),S&&(F-=Number(L))):(e.classList.remove("dropleft"),e.classList.add("dropright"),S&&(F+=E.offsetWidth)),e.style.top=`${de}px`,e.style.left=`${F}px`,ae>0&&(e.style.minWidth=`${ae}px`),e.style.opacity="1",e.style.display="block"}}openGridMenu(){const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!1});Object.defineProperty(t,"target",{writable:!0,configurable:!0,value:Re("button",{className:"slick-grid-menu-button"})}),this.showGridMenu(t)}showGridMenu(t,e){var n,r,o,s,l;const u=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t;if(t.preventDefault(),on(this._menuElm),(o=this._menuElm)===null||o===void 0||o.remove(),this._addonOptions){const h={grid:this.grid,menu:this._menuElm,columns:this.columns,allColumns:this.getAllColumns(),visibleColumns:this.getVisibleColumns()},c={...this._addonOptions,...e};if(c&&!this.extensionUtility.runOverrideFunctionWhenExists(c.menuUsabilityOverride,h)||typeof t.stopPropagation=="function"&&(this.pubSubService.publish("onGridMenuBeforeMenuShow",h),typeof(c==null?void 0:c.onBeforeMenuShow)=="function"&&c.onBeforeMenuShow(t,h)===!1||this.onBeforeMenuShow.notify(h,null,this).getReturnValue()===!1))return;this._menuElm=this.createCommandMenu((l=(s=this._addonOptions)===null||s===void 0?void 0:s.commandItems)!==null&&l!==void 0?l:[]),this.createColumnPickerContainer(),au.call(this),this._columnCheckboxes=[],pm.call(this,c),document.body.appendChild(this._menuElm),this._menuElm.style.opacity="0";const p=((c==null?void 0:c.marginBottom)!==void 0?c.marginBottom:this._defaults.marginBottom)||0;this._menuElm.style.minHeight=Ws(c==null?void 0:c.minHeight,""),(c==null?void 0:c.height)!==void 0?this._menuElm.style.height=Ws(c.height,""):this._menuElm.style.maxHeight=Ws(c==null?void 0:c.maxHeight,`${window.innerHeight-u.clientY-p}px`);let m=t.target.nodeName==="BUTTON"?t.target:t.target.querySelector("button");m||(m=t.target.parentElement),this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.appendChild(this._listElm),this.repositionMenu(t,this._menuElm,m,c),this._isMenuOpen=!0,this.pubSubService.publish("onGridMenuAfterMenuShow",h),typeof(c==null?void 0:c.onAfterMenuShow)=="function"&&c.onAfterMenuShow(t,h),this.onAfterMenuShow.notify(h,null,this)}}translateGridMenu(){var t;if(this.sharedService.gridOptions.gridMenu){this.sharedService.gridOptions.gridMenu.commandItems=[],this.sharedService.gridOptions.gridMenu.commandTitle="",this.sharedService.gridOptions.gridMenu.columnTitle="",this.sharedService.gridOptions.gridMenu.forceFitTitle="",this.sharedService.gridOptions.gridMenu.syncResizeTitle="";const e=this._userOriginalGridMenu&&Array.isArray(this._userOriginalGridMenu.commandItems)?this._userOriginalGridMenu.commandItems:[];this.sharedService.gridOptions.gridMenu.commandItems=[...e,...this.addGridMenuCustomCommands(e)],this.extensionUtility.translateMenuItemsFromTitleKey(((t=this._addonOptions)===null||t===void 0?void 0:t.commandItems)||[],"commandItems"),this.extensionUtility.sortItems(this.sharedService.gridOptions.gridMenu.commandItems,"positionOrder"),this.translateTitleLabels(this.sharedService.gridOptions.gridMenu),this.translateTitleLabels(this._addonOptions),this.extensionUtility.translateItems(this._columns,"nameKey","name")}}translateTitleLabels(t){t&&(t.commandTitle=this.extensionUtility.getPickerTitleOutputString("commandTitle","gridMenu"),t.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),t.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),t.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"))}addGridMenuCustomCommands(t){var e,n,r,o,s,l,u,h,c,p,m,v,_;const C=this.gridOptions.backendServiceApi||null,x=[],S=this.gridOptions,E=ho(S),D=(e=this._addonOptions)===null||e===void 0?void 0:e.commandLabels;if(this.gridOptions&&this._addonOptions&&!this._addonOptions.hideClearFrozenColumnsCommand){const P="clear-pinning";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconClearFrozenColumnsCommand||"fa fa-times",titleKey:`${E}${(n=D==null?void 0:D.clearFrozenColumnsCommandKey)!==null&&n!==void 0?n:"CLEAR_PINNING"}`,disabled:!1,command:P,positionOrder:52})}if(this.gridOptions&&this.gridOptions.enableFiltering&&!this.sharedService.hideHeaderRowAfterPageLoad){if(this.gridOptions&&this._addonOptions&&!this._addonOptions.hideClearAllFiltersCommand){const P="clear-filter";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconClearAllFiltersCommand||"fa fa-filter text-danger",titleKey:`${E}${(r=D==null?void 0:D.clearAllFiltersCommandKey)!==null&&r!==void 0?r:"CLEAR_ALL_FILTERS"}`,disabled:!1,command:P,positionOrder:50})}if(this.gridOptions&&this._addonOptions&&!this._addonOptions.hideToggleFilterCommand){const P="toggle-filter";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconToggleFilterCommand||"fa fa-random",titleKey:`${E}${(o=D==null?void 0:D.toggleFilterCommandKey)!==null&&o!==void 0?o:"TOGGLE_FILTER_ROW"}`,disabled:!1,command:P,positionOrder:53})}if(C&&this.gridOptions&&this._addonOptions&&!this._addonOptions.hideRefreshDatasetCommand){const P="refresh-dataset";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconRefreshDatasetCommand||"fa fa-refresh",titleKey:`${E}${(s=D==null?void 0:D.refreshDatasetCommandKey)!==null&&s!==void 0?s:"REFRESH_DATASET"}`,disabled:!1,command:P,positionOrder:57})}}if(this.gridOptions.showPreHeaderPanel&&this.gridOptions&&this._addonOptions&&!this._addonOptions.hideTogglePreHeaderCommand){const P="toggle-preheader";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconTogglePreHeaderCommand||"fa fa-random",titleKey:`${E}${(l=D==null?void 0:D.togglePreHeaderCommandKey)!==null&&l!==void 0?l:"TOGGLE_PRE_HEADER_ROW"}`,disabled:!1,command:P,positionOrder:53})}if(this.gridOptions.enableSorting&&this.gridOptions&&this._addonOptions&&!this._addonOptions.hideClearAllSortingCommand){const P="clear-sorting";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconClearAllSortingCommand||"fa fa-unsorted text-danger",titleKey:`${E}${(u=D==null?void 0:D.clearAllSortingCommandKey)!==null&&u!==void 0?u:"CLEAR_ALL_SORTING"}`,disabled:!1,command:P,positionOrder:51})}if(!((h=this.gridOptions)===null||h===void 0)&&h.enableTextExport&&this._addonOptions&&!this._addonOptions.hideExportCsvCommand){const P="export-csv";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconExportCsvCommand||"fa fa-download",titleKey:`${E}${(c=D==null?void 0:D.exportCsvCommandKey)!==null&&c!==void 0?c:"EXPORT_TO_CSV"}`,disabled:!1,command:P,positionOrder:54})}if(this.gridOptions&&this.gridOptions.enableExcelExport&&this._addonOptions&&!this._addonOptions.hideExportExcelCommand){const P="export-excel";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconExportExcelCommand||"fa fa-file-excel-o text-success",titleKey:`${E}${(p=D==null?void 0:D.exportExcelCommandKey)!==null&&p!==void 0?p:"EXPORT_TO_EXCEL"}`,disabled:!1,command:P,positionOrder:55})}if(!((m=this.gridOptions)===null||m===void 0)&&m.enableTextExport&&this._addonOptions&&!this._addonOptions.hideExportTextDelimitedCommand){const P="export-text-delimited";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconExportTextDelimitedCommand||"fa fa-download",titleKey:`${E}${(v=D==null?void 0:D.exportTextDelimitedCommandKey)!==null&&v!==void 0?v:"EXPORT_TO_TAB_DELIMITED"}`,disabled:!1,command:P,positionOrder:56})}const A=((_=this._addonOptions)===null||_===void 0?void 0:_.commandItems)||[];return this.gridOptions&&this._addonOptions&&(Array.isArray(x)&&x.length>0||Array.isArray(A)&&A.length>0)&&(this._addonOptions.commandTitle=this._addonOptions.commandTitle||this.extensionUtility.getPickerTitleOutputString("commandTitle","gridMenu")),x}executeGridMenuInternalCustomCommands(t,e){var n,r,o,s,l;const u=((n=this.sharedService)===null||n===void 0?void 0:n.externalRegisteredResources)||[];if(e!=null&&e.command)switch(e.command){case"clear-pinning":const h=[...this.sharedService.visibleColumns],c={frozenColumn:-1,frozenRow:-1,frozenBottom:!1,enableMouseWheelScrollHandler:!1};this.grid.setOptions(c),this.sharedService.gridOptions.frozenColumn=c.frozenColumn,this.sharedService.gridOptions.frozenRow=c.frozenRow,this.sharedService.gridOptions.frozenBottom=c.frozenBottom,this.sharedService.gridOptions.enableMouseWheelScrollHandler=c.enableMouseWheelScrollHandler,Array.isArray(h)&&this.grid.setColumns(h),this.gridOptions.enableAutoSizeColumns&&this.grid.autosizeColumns(),this.pubSubService.publish("onGridMenuClearAllPinning");break;case"clear-filter":this.filterService.clearFilters(),this.sharedService.dataView.refresh(),this.pubSubService.publish("onGridMenuClearAllFilters");break;case"clear-sorting":this.sortService.clearSorting(),this.sharedService.dataView.refresh(),this.pubSubService.publish("onGridMenuClearAllSorting");break;case"export-csv":const m=u.find(S=>S.className==="TextExportService");m!=null&&m.exportToFile?m.exportToFile({delimiter:fs.comma,format:an.csv}):console.error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Grid Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };");break;case"export-excel":const v=u.find(S=>S.className==="ExcelExportService");v!=null&&v.exportToExcel?v.exportToExcel():console.error("[Slickgrid-Universal] You must register the ExcelExportService to properly use Export to Excel in the Grid Menu. Example:: this.gridOptions = { enableExcelExport: true, registerExternalResources: [new ExcelExportService()] };");break;case"export-text-delimited":const _=u.find(S=>S.className==="TextExportService");_!=null&&_.exportToFile?_.exportToFile({delimiter:fs.tab,format:an.txt}):console.error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Grid Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };");break;case"toggle-filter":let C=(o=(r=this.gridOptions)===null||r===void 0?void 0:r.showHeaderRow)!==null&&o!==void 0?o:!1;C=!C,this.grid.setHeaderRowVisibility(C),C===!0&&(this.grid.setColumns(this.sharedService.columnDefinitions),this.grid.scrollColumnIntoView(0));break;case"toggle-preheader":const x=(l=(s=this.gridOptions)===null||s===void 0?void 0:s.showPreHeaderPanel)!==null&&l!==void 0?l:!1;this.grid.setPreHeaderPanelVisibility(!x);break;case"refresh-dataset":this.extensionUtility.refreshBackendDataset();break}}getDefaultGridMenuOptions(){return{commandTitle:void 0,columnTitle:this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),forceFitTitle:this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),syncResizeTitle:this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"),iconCssClass:"fa fa-bars",menuWidth:18,commandItems:[],hideClearAllFiltersCommand:!1,hideRefreshDatasetCommand:!1,hideToggleFilterCommand:!1}}handleBodyMouseDown(t){if(this.menuElement){let e=!1;const n=t.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(t.target)||n)&&(e=!0),(this._isMenuOpen&&this.menuElement!==t.target&&!e&&!t.defaultPrevented||t.target.className==="close"&&n)&&this.hideMenu(t)}}handleMenuItemCommandClick(t,e,n,r=0){var o,s;if(n!=="divider"&&!n.disabled&&!n.divider)if((n.command||"")&&!n.commandItems){const u={grid:this.grid,command:n.command,item:n,allColumns:this.columns,visibleColumns:this.getVisibleColumns()};this.executeGridMenuInternalCustomCommands(t,u),this.pubSubService.publish("onGridMenuCommand",u),typeof((o=this._addonOptions)===null||o===void 0?void 0:o.onCommand)=="function"&&this._addonOptions.onCommand(t,u),this.onCommand.notify(u,null,this),typeof n.action=="function"&&n.action.call(this,t,u),!(!((s=this._addonOptions)===null||s===void 0)&&s.leaveOpen)&&!t.defaultPrevented&&this.hideMenu(t),t.preventDefault(),t.stopPropagation()}else n.commandItems&&this.repositionSubMenu(t,n,r)}handleMenuItemMouseOver(t,e,n,r=0){n!=="divider"&&!n.disabled&&!n.divider&&(n.commandItems?this.repositionSubMenu(t,n,r):r===0&&this.disposeSubMenus())}recreateCommandList(t,e,n,r){var o;const s=n.level||0;if(t.length>0){const l=Re("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},e);if(s===0){this.populateCommandOrOptionTitle("command",this.addonOptions,l,s);const u=(o=e.querySelector(".slick-command-header"))!==null&&o!==void 0?o:Re("div",{className:"slick-command-header"});u.classList.add("with-close"),cm.call(this,u),l.appendChild(u)}return r&&s>0&&this.addSubMenuTitleWhenExists(r,l),this.populateCommandOrOptionItems("command",this._addonOptions,l,t,n,this.handleMenuItemCommandClick,this.handleMenuItemMouseOver),l}return null}repositionSubMenu(t,e,n){const r=(e==null?void 0:e.commandItems)||[],o=this.createCommandMenu(r,n+1,e);o.style.display="block",document.body.appendChild(o),this.repositionMenu(t,o)}}function cm(a){const e=Re("button",{type:"button",className:"close",ariaLabel:"Close",textContent:"×",dataset:{dismiss:this instanceof yh?"slick-column-picker":"slick-grid-menu"}});a.appendChild(e)}function hm(a){var t,e,n;const r=this;!((t=r.addonOptions)===null||t===void 0)&&t.columnTitle&&(r._columnTitleElm=Re("div",{className:"slick-menu-title",textContent:(n=(e=r.addonOptions)===null||e===void 0?void 0:e.columnTitle)!==null&&n!==void 0?n:r._defaults.columnTitle},a))}function fm(a){var t,e;const n=this,r=n instanceof yh?"columnPicker":"gridMenu";if(a.target.dataset.option==="autoresize"){const o=n.getVisibleColumns();a.target.ariaChecked=String(a.target.checked);const s=a.target.checked;n.grid.setOptions({forceFitColumns:s}),n.grid.setColumns(o);return}if(a.target.dataset.option==="syncresize"){a.target.ariaChecked=String(a.target.checked),n.grid.setOptions({syncColumnCellResize:!!a.target.checked});return}if(a.target.type==="checkbox"){n._areVisibleColumnDifferent=!0,a.target.ariaChecked=String(a.target.checked);const o=a.target.checked,s=a.target.dataset.columnid||"",l=[];if(n._columnCheckboxes.forEach((c,p)=>{c.checked&&l.push(n.columns[p])}),!l.length){a.target.checked=!0;return}if(n.grid.setColumns(l),(!n.sharedService.visibleColumns||Array.isArray(l)&&l.length!==n.sharedService.visibleColumns.length)&&(n.sharedService.visibleColumns=l),n.gridOptions.enableRowSelection&&o){const c=n.grid.getSelectedRows();n.grid.setSelectedRows(c)}const u=(t=n.gridOptions.frozenColumn)!==null&&t!==void 0?t:-1;u>=0&&n.extensionUtility.readjustFrozenColumnIndexWhenNeeded(u,n.columns,l);const h={columnId:s,showing:o,allColumns:n.columns,visibleColumns:l,columns:l,grid:n.grid};n.pubSubService.publish(`on${vl(r)}ColumnsChanged`,h),typeof((e=n.addonOptions)===null||e===void 0?void 0:e.onColumnsChanged)=="function"&&n.addonOptions.onColumnsChanged(a,h),n.onColumnsChanged.notify(h,null,n)}}function pm(a){var t,e;const n=this,r=n instanceof um?"gridmenu-":"";for(const o of n.columns){const s=o.id,l=document.createElement("li");o.excludeFromColumnPicker&&(l.className="hidden");const u=Re("input",{type:"checkbox",id:`${n._gridUid}-${r}colpicker-${s}`,dataset:{columnid:`${s}`}});n.grid.getColumnIndex(s)>=0&&(u.ariaChecked="true",u.checked=!0),l.appendChild(u),n._columnCheckboxes.push(u);const p=(typeof(a==null?void 0:a.headerColumnValueExtractor)=="function"?a.headerColumnValueExtractor:n._defaults.headerColumnValueExtractor)(o,n.gridOptions),m=document.createElement("label");m.htmlFor=`${n._gridUid}-${r}colpicker-${s}`,m.innerHTML=Ln(n.gridOptions,p),l.appendChild(m),n._listElm.appendChild(l)}if((!a.hideForceFitButton||!a.hideSyncResizeButton)&&n._listElm.appendChild(document.createElement("hr")),!(a!=null&&a.hideForceFitButton)){const o=document.createElement("li");o.appendChild(Re("input",{type:"checkbox",id:`${n._gridUid}-${r}colpicker-forcefit`,ariaChecked:String(n.gridOptions.forceFitColumns),checked:n.gridOptions.forceFitColumns,dataset:{option:"autoresize"}})),o.appendChild(Re("label",{htmlFor:`${n._gridUid}-${r}colpicker-forcefit`,textContent:(t=a==null?void 0:a.forceFitTitle)!==null&&t!==void 0?t:""})),n._listElm.appendChild(o)}if(!(a!=null&&a.hideSyncResizeButton)){const o=document.createElement("li");o.appendChild(Re("input",{type:"checkbox",id:`${n._gridUid}-${r}colpicker-syncresize`,ariaChecked:String(n.gridOptions.syncColumnCellResize),checked:n.gridOptions.syncColumnCellResize,dataset:{option:"syncresize"}})),o.appendChild(Re("label",{htmlFor:`${n._gridUid}-${r}colpicker-syncresize`,textContent:(e=a==null?void 0:a.syncResizeTitle)!==null&&e!==void 0?e:""})),n._listElm.appendChild(o)}}function au(){const a=this,t=a.grid.getColumns().slice(0),e=new Array(a.columns.length);for(let n=0;n<e.length;n++)a.grid.getColumnIndex(a.columns[n].id)===void 0?e[n]=a.columns[n]:e[n]=t.shift();a._columns=e}class yh{constructor(t,e,n){var r,o,s,l;this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._areVisibleColumnDifferent=!1,this._columns=[],this._gridUid="",this._menuElm=null,this._columnCheckboxes=[],this.onColumnsChanged=new Slick.Event,this._defaults={hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",minHeight:200,syncResizeTitle:"Synchronous resize",headerColumnValueExtractor:u=>u.name},this._bindEventService=new Nn,this._eventHandler=new Slick.EventHandler,this._columns=(r=this.sharedService.allColumns)!==null&&r!==void 0?r:[],this._gridUid=(l=(s=(o=this.grid)===null||o===void 0?void 0:o.getUID)===null||s===void 0?void 0:s.call(o))!==null&&l!==void 0?l:"",this.init()}get addonOptions(){return this.gridOptions.columnPicker||{}}get eventHandler(){return this._eventHandler}get columns(){return this._columns}set columns(t){this._columns=t}get gridOptions(){var t;return(t=this.sharedService.gridOptions)!==null&&t!==void 0?t:{}}get grid(){return this.sharedService.slickGrid}get menuElement(){return this._menuElm}init(){var t;this._gridUid=(t=this.grid.getUID())!==null&&t!==void 0?t:"",this.gridOptions.columnPicker={...this._defaults,...this.gridOptions.columnPicker},this.addonOptions.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this.addonOptions.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this.addonOptions.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker"),this._eventHandler.subscribe(this.grid.onHeaderContextMenu,this.handleHeaderContextMenu.bind(this)),this._eventHandler.subscribe(this.grid.onColumnsReordered,au.bind(this)),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this),void 0,"body"),this._bindEventService.bind(document.body,"beforeunload",this.dispose.bind(this),void 0,"body")}dispose(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this.disposeMenu()}disposeMenu(){var t,e;this._bindEventService.unbindAll("parent-menu"),(t=this._listElm)===null||t===void 0||t.remove(),(e=this._menuElm)===null||e===void 0||e.remove(),this._menuElm=null}createPickerMenu(){const t=Re("div",{ariaExpanded:"true",className:`slick-column-picker ${this._gridUid}`,role:"menu"});return au.call(this),hm.call(this,t),cm.call(this,t),this._listElm=Re("div",{className:"slick-column-picker-list",role:"menu"}),this._bindEventService.bind(t,"click",fm.bind(this),void 0,"parent-menu"),document.body.appendChild(t),t}getAllColumns(){return this._columns}getVisibleColumns(){return this.grid.getColumns()}translateColumnPicker(){this.addonOptions&&(this.addonOptions.columnTitle="",this.addonOptions.forceFitTitle="",this.addonOptions.syncResizeTitle="",this.addonOptions.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this.addonOptions.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this.addonOptions.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker")),this.extensionUtility.translateItems(this._columns,"nameKey","name"),this.translateTitleLabels(this.addonOptions)}handleBodyMouseDown(t){var e;(this._menuElm!==t.target&&!(!((e=this._menuElm)===null||e===void 0)&&e.contains(t.target))||t.target.className==="close"&&t.target.closest(".slick-column-picker"))&&this.disposeMenu()}handleHeaderContextMenu(t){t.preventDefault(),on(this._listElm),this._columnCheckboxes=[],this._menuElm=this.createPickerMenu(),pm.call(this,this.addonOptions),document.body.appendChild(this._menuElm),this.repositionMenu(t)}repositionMenu(t){var e,n;const r=(n=(e=t==null?void 0:t.touches)===null||e===void 0?void 0:e[0])!==null&&n!==void 0?n:t;this._menuElm&&(this._menuElm.style.top=`${r.pageY-10}px`,this._menuElm.style.left=`${r.pageX-10}px`,this._menuElm.style.minHeight=Ws(this.addonOptions.minHeight,""),this._menuElm.style.maxHeight=Ws(this.addonOptions.maxHeight,`${window.innerHeight-r.clientY}px`),this._menuElm.style.display="block",this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.appendChild(this._listElm))}translateTitleLabels(t){t&&(t.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"))}}const du=(a,t,e,n,r,o)=>{const s=n.params||{};if(!s.formatters||!Array.isArray(s.formatters))throw new Error(`The multiple formatter requires the "formatters" to be provided as a column params.
8
- For example: this.columnDefinitions = [{ id: title, field: title, formatter: Formatters.multiple, params: { formatters: [Formatters.lowercase, Formatters.uppercase] }`);const l=s.formatters;let u=e;for(const h of l)u=h.call(globalThis,a,t,u,n,r,o);return u},Eh=Us||hs;function mm(a,t){if(Array.isArray(a)){for(const e of a)if(e.editor)if(e.formatter&&e.formatter!==du&&e.formatter!==t){const n=e.formatter;e.formatter=du,e.params={...e.params,formatters:[n,t]}}else e.formatter&&e.formatter===du&&e.params?e.params.formatters.findIndex(n=>n===t)===-1&&(e.params.formatters=[...e.params.formatters,t]):e.formatter=t}}function dn(a,t,e,n){let r,o,s="",l="";switch(e){case"currency":r=je.DEFAULT_FORMATTER_CURRENCY_MIN_DECIMAL,o=je.DEFAULT_FORMATTER_CURRENCY_MAX_DECIMAL;break;case"decimal":r=je.DEFAULT_FORMATTER_NUMBER_MIN_DECIMAL,o=je.DEFAULT_FORMATTER_NUMBER_MAX_DECIMAL;break;case"percent":r=je.DEFAULT_FORMATTER_PERCENT_MIN_DECIMAL,o=je.DEFAULT_FORMATTER_PERCENT_MAX_DECIMAL;break}const u=t&&typeof t.getOptions=="function"?t.getOptions():{},h=qo("minDecimal",a,u,r),c=qo("maxDecimal",a,u,o),p=qo("decimalSeparator",a,u,je.DEFAULT_NUMBER_DECIMAL_SEPARATOR),m=qo("thousandSeparator",a,u,je.DEFAULT_NUMBER_THOUSAND_SEPARATOR),v=qo("displayNegativeNumberWithParentheses",a,u,je.DEFAULT_NEGATIVE_NUMBER_WRAPPED_IN_BRAQUET),_=qo("currencyPrefix",a,u,""),C=qo("currencySuffix",a,u,"");return n==="cell"&&(s=qo("numberPrefix",a,u,""),l=qo("numberSuffix",a,u,"")),{minDecimal:h,maxDecimal:c,decimalSeparator:p,thousandSeparator:m,wrapNegativeNumber:v,currencyPrefix:_,currencySuffix:C,numberPrefix:s,numberSuffix:l}}function qo(a,t,e,n){var r;const o=t&&t.params;return o&&o.hasOwnProperty(a)?o[a]:!((r=e==null?void 0:e.formatterOptions)===null||r===void 0)&&r.hasOwnProperty(a)?e.formatterOptions[a]:n}function un(a,t){const e=Fr(a);return(n,r,o,s,l,u)=>{var h,c,p,m,v;const _=u&&typeof u.getOptions=="function"?u.getOptions():{},C=(c=(h=_==null?void 0:_.formatterOptions)===null||h===void 0?void 0:h.dateSeparator)!==null&&c!==void 0?c:t,x=(p=s==null?void 0:s.type)!==null&&p!==void 0?p:ie.date,S=Fr(x),E=(v=(m=s==null?void 0:s.params)===null||m===void 0?void 0:m.parseDateAsUtc)!==null&&v!==void 0?v:!1,D=Eh(o,S,!1).isValid();let A=o;if(o&&D&&(A=E?Eh.utc(o).format(e):Eh(o).format(e)),A&&C!==t){const P=new RegExp(t,"ig");A=A.replace(P,C)}return A}}function Sh(a,t,e,n,r,o){let s=!1;e!=null&&e.hasOwnProperty("exportWithFormatter")?s=!!e.exportWithFormatter:o!=null&&o.hasOwnProperty("exportWithFormatter")&&(s=!!o.exportWithFormatter);let l;n&&e.exportCustomFormatter?l=e.exportCustomFormatter:s&&e.formatter&&(l=e.formatter);const u=uu(l,a,t,e,n,r);return o!=null&&o.sanitizeDataExport&&typeof u=="string"?or(u):u}function uu(a,t,e,n,r,o){let s="",u=n.field||n.id||"";if(typeof n.field=="string"&&n.field.indexOf(".")>0){const c=n.field.split(".");u=c.length>0?c[0]:n.field}const h=r!=null&&r.hasOwnProperty(u)?r[u]:null;if(typeof a=="function"){const c=a(t,e,h,n,r,o);s=c,c&&typeof c=="object"&&c.hasOwnProperty("text")&&(s=c.text),s==null&&(s="")}else s=r!=null&&r.hasOwnProperty(u)?h:"",s==null&&(s="");return typeof s=="object"&&!(s instanceof Date)&&Object.entries(s).length===0&&(s=""),s}class $_ extends lm{constructor(t,e,n,r){super(t,e,n),this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this.treeDataService=r,this._defaults={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!1,optionShownOverColumnIds:[],commandShownOverColumnIds:[],subMenuOpenByEvent:"mouseover"},this.pluginName="ContextMenu",this._camelPluginName="contextMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-context-menu",this.init(n.gridOptions.contextMenu)}init(t){this._addonOptions={...this._defaults,...t};const e=this._addonOptions&&Array.isArray(this._addonOptions.commandItems)?this._addonOptions.commandItems:[];this._addonOptions.commandItems=[...e,...this.addMenuCustomCommands(e)],this._addonOptions={...this._addonOptions},this.sharedService.gridOptions.contextMenu=this._addonOptions,this.sortMenuItems(),this._eventHandler.subscribe(this.grid.onContextMenu,this.handleOnContextMenu.bind(this)),this._addonOptions.hideMenuOnScroll&&this._eventHandler.subscribe(this.grid.onScroll,this.closeMenu.bind(this))}translateContextMenu(){var t,e;const n=(e=(t=this.sharedService)===null||t===void 0?void 0:t.gridOptions)!==null&&e!==void 0?e:{},r=this.sharedService.gridOptions.contextMenu;if(r&&(n!=null&&n.enableTranslate)){const o=r.commandItems||[],s=r.optionItems||[];r.commandTitleKey&&(r.commandTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.commandTitleKey,"TEXT_COMMANDS")||r.commandTitle),r.optionTitleKey&&(r.optionTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.optionTitleKey,"TEXT_COMMANDS")||r.optionTitle),this.extensionUtility.translateMenuItemsFromTitleKey(o,"commandItems"),this.extensionUtility.translateMenuItemsFromTitleKey(s,"optionItems")}}handleOnContextMenu(t,e){this.disposeAllMenus();const n=this.grid.getCellFromEvent(t);if(n){const r=this.grid.getDataItem(n.row),o=this.grid.getColumns()[n.cell];if(e=e||{},e.cell=n.cell,e.row=n.row,e.column=o,e.dataContext=r,e.grid=this.grid,!this.extensionUtility.runOverrideFunctionWhenExists(this._addonOptions.menuUsabilityOverride,e))return;this._menuElm=this.createParentMenu(t),this._menuElm&&t.preventDefault(),this._menuElm&&(this.repositionMenu(t,this._menuElm),this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.style.display="block"),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}}addMenuCustomCommands(t){var e;const n=[],r=this.sharedService&&this.sharedService.gridOptions||{},o=r==null?void 0:r.contextMenu,s=(e=this.sharedService)===null||e===void 0?void 0:e.dataView,l=ho(r);if(o&&!o.hideCopyCellValueCommand){const u="copy";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconCopyCellValueCommand||"fa fa-clone",titleKey:`${l}COPY`,disabled:!1,command:u,positionOrder:50,action:(h,c)=>{this.copyToClipboard(c)},itemUsabilityOverride:h=>{const c=h==null?void 0:h.column,p=h==null?void 0:h.dataContext;if(typeof c.queryFieldNameGetterFn=="function"){const m=Va(c,p,"");if(m!==""&&m!==void 0)return!0}else if(c&&p.hasOwnProperty(c.field))return p[c.field]!==""&&p[c.field]!==null&&p[c.field]!==void 0;return!1}})}if(r!=null&&r.enableTextExport&&o&&!o.hideExportCsvCommand){const u="export-csv";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExportCsvCommand||"fa fa-download",titleKey:`${l}EXPORT_TO_CSV`,disabled:!1,command:u,positionOrder:51,action:()=>{var h;const p=(((h=this.sharedService)===null||h===void 0?void 0:h.externalRegisteredResources)||[]).find(m=>m.className==="TextExportService");if(p!=null&&p.exportToFile)p.exportToFile({delimiter:fs.comma,format:an.csv});else throw new Error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Context Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };")}})}if(r&&r.enableExcelExport&&o&&!o.hideExportExcelCommand){const u="export-excel";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExportExcelCommand||"fa fa-file-excel-o text-success",titleKey:`${l}EXPORT_TO_EXCEL`,disabled:!1,command:u,positionOrder:52,action:()=>{var h;const p=(((h=this.sharedService)===null||h===void 0?void 0:h.externalRegisteredResources)||[]).find(m=>m.className==="ExcelExportService");if(p!=null&&p.exportToExcel)p.exportToExcel();else throw new Error("[Slickgrid-Universal] You must register the ExcelExportService to properly use Export to Excel in the Context Menu. Example:: this.gridOptions = { enableExcelExport: true, registerExternalResources: [new ExcelExportService()] };")}})}if(r!=null&&r.enableTextExport&&o&&!o.hideExportTextDelimitedCommand){const u="export-text-delimited";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExportTextDelimitedCommand||"fa fa-download",titleKey:`${l}EXPORT_TO_TAB_DELIMITED`,disabled:!1,command:u,positionOrder:53,action:()=>{var h;const p=(((h=this.sharedService)===null||h===void 0?void 0:h.externalRegisteredResources)||[]).find(m=>m.className==="TextExportService");if(p!=null&&p.exportToFile)p.exportToFile({delimiter:fs.tab,format:an.txt});else throw new Error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Context Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };")}})}if(r&&(r.enableGrouping||r.enableDraggableGrouping||r.enableTreeData)){if(o&&!o.hideCopyCellValueCommand&&n.push({divider:!0,command:"",positionOrder:54}),r&&!r.enableTreeData&&o&&!o.hideClearAllGrouping){const u="clear-grouping";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconClearGroupingCommand||"fa fa-times",titleKey:`${l}CLEAR_ALL_GROUPING`,disabled:!1,command:u,positionOrder:55,action:()=>{s.setGrouping([]),this.pubSubService.publish("onContextMenuClearGrouping")},itemUsabilityOverride:()=>{const h=s&&s.getGrouping&&s.getGrouping();return Array.isArray(h)&&h.length>0}})}if(r&&o&&!o.hideCollapseAllGroups){const u="collapse-all-groups";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconCollapseAllGroupsCommand||"fa fa-compress",titleKey:`${l}COLLAPSE_ALL_GROUPS`,disabled:!1,command:u,positionOrder:56,action:()=>{r.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!0):s.collapseAllGroups(),this.pubSubService.publish("onContextMenuCollapseAllGroups")},itemUsabilityOverride:()=>{if(r.enableTreeData)return!0;const h=s&&s.getGrouping&&s.getGrouping();return Array.isArray(h)&&h.length>0}})}if(r&&o&&!o.hideExpandAllGroups){const u="expand-all-groups";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExpandAllGroupsCommand||"fa fa-expand",titleKey:`${l}EXPAND_ALL_GROUPS`,disabled:!1,command:u,positionOrder:57,action:()=>{r.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!1):s.expandAllGroups(),this.pubSubService.publish("onContextMenuExpandAllGroups")},itemUsabilityOverride:()=>{if(r.enableTreeData)return!0;const h=s&&s.getGrouping&&s.getGrouping();return Array.isArray(h)&&h.length>0}})}}return this.extensionUtility.translateMenuItemsFromTitleKey(n),n}copyToClipboard(t){var e,n,r,o,s;try{if(t&&t.grid&&t.command){const l=(n=(e=this.sharedService)===null||e===void 0?void 0:e.gridOptions)!==null&&n!==void 0?n:{},u=(r=t==null?void 0:t.cell)!==null&&r!==void 0?r:0,h=(o=t==null?void 0:t.row)!==null&&o!==void 0?o:0,c=t==null?void 0:t.column,p=t==null?void 0:t.dataContext,m=(s=this.sharedService)===null||s===void 0?void 0:s.slickGrid,v=l&&(l.excelExportOptions||l.textExportOptions);let _=Sh(h,u,c,p,m,v);typeof c.queryFieldNameGetterFn=="function"&&(_=Va(c,p,""));let C=_;typeof _=="string"&&(C=_.replace(/^([·|⮞|⮟]\s*)|([·|⮞|⮟])\s*/gi,"").replace(/[\u00b7|\u034f]/gi,"").trim());const x=document.createElement("textarea");x&&document.body&&(x.style.position="absolute",x.style.opacity="0",x.value=C,document.body.appendChild(x),x.select(),document.execCommand("copy",!1,C)&&x.remove())}}catch{}}sortMenuItems(){var t,e;const n=(e=(t=this.sharedService)===null||t===void 0?void 0:t.gridOptions)===null||e===void 0?void 0:e.contextMenu;n&&(this.extensionUtility.sortItems(n.commandItems||[],"positionOrder"),this.extensionUtility.sortItems(n.optionItems||[],"positionOrder"))}}/**!
7
+ `}if(window.clipboardData)return window.clipboardData.setData("Text",c),!0;{const p=document.activeElement,m=this.createTextBox(c);if(m.focus(),setTimeout(()=>{this._bodyElement.removeChild(m),p?p.focus():console.log("No element to restore focus to after copy?")},(o=(r=this.addonOptions)===null||r===void 0?void 0:r.clipboardPasteDelay)!==null&&o!==void 0?o:sm),typeof this._onCopySuccess=="function"){const v=u.length===1?u[0].toRow+1-u[0].fromRow:u.length;this._onCopySuccess(v)}return!1}}if(!this._addonOptions.readOnlyMode&&((t.which===xi.V||t.key==="v")&&(t.ctrlKey||t.metaKey)&&!t.shiftKey||(t.which===xi.INSERT||t.key==="Insert")&&t.shiftKey&&!t.ctrlKey)){const h=this.createTextBox("");return setTimeout(()=>this.decodeTabularData(this._grid,h),(l=(s=this.addonOptions)===null||s===void 0?void 0:s.clipboardPasteDelay)!==null&&l!==void 0?l:sm),!1}}}markCopySelection(t){var e;this.clearCopySelection();const n=this._grid.getColumns(),r={};for(const o of t)for(let s=o.fromRow;s<=o.toRow;s++){r[s]={};for(let l=o.fromCell;l<=o.toCell&&l<n.length;l++)r[s][n[l].id]=this._copiedCellStyle}this._grid.setCellCssStyles(this._copiedCellStyleLayerKey,r),clearTimeout(this._clearCopyTI),this._clearCopyTI=setTimeout(()=>this.clearCopySelection(),((e=this.addonOptions)===null||e===void 0?void 0:e.clearCopySelectionDelay)||V_)}}class lu{constructor(t,e,n){this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._addonOptions={},this._camelPluginName="",this._gridUid="",this._menuCssPrefix="",this._menuPluginCssPrefix="",this._bindEventService=new Nn,this._eventHandler=new Slick.EventHandler}get addonOptions(){return this._addonOptions}set addonOptions(t){this._addonOptions=t}get eventHandler(){return this._eventHandler}get grid(){return this.sharedService.slickGrid}get gridOptions(){var t;return(t=this.sharedService.gridOptions)!==null&&t!==void 0?t:{}}get gridUid(){var t,e;return this._gridUid||((e=(t=this.grid)===null||t===void 0?void 0:t.getUID())!==null&&e!==void 0?e:"")}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get menuCssClass(){return this._menuPluginCssPrefix||this._menuCssPrefix}get menuElement(){return this._menuElm||document.querySelector(`.${this.menuCssClass}${this.gridUidSelector}`)}dispose(){var t,e,n,r,o;(t=this._eventHandler)===null||t===void 0||t.unsubscribeAll(),this._bindEventService.unbindAll(),this.pubSubService.unsubscribeAll(),(e=this._commandTitleElm)===null||e===void 0||e.remove(),(n=this._optionTitleElm)===null||n===void 0||n.remove(),this.disposeAllMenus(),on(this._menuElm),(r=this.menuElement)===null||r===void 0||r.remove(),(o=this._menuElm)===null||o===void 0||o.remove()}disposeAllMenus(){this.disposeSubMenus(),this._bindEventService.unbindAll("parent-menu"),document.querySelectorAll(`.${this.menuCssClass}${this.gridUidSelector}`).forEach(t=>t.remove())}disposeSubMenus(){this._bindEventService.unbindAll("sub-menu"),document.querySelectorAll(`.${this.menuCssClass}.slick-submenu${this.gridUidSelector}`).forEach(t=>t.remove())}setOptions(t){this._addonOptions={...this._addonOptions,...t}}addSubMenuTitleWhenExists(t,e){if(t!=="divider"&&(t!=null&&t.subMenuTitle)){const n=document.createElement("div");n.className="slick-menu-title",n.textContent=t.subMenuTitle;const r=t.subMenuTitleCssClass;r&&n.classList.add(...r.split(" ")),e.appendChild(n)}}populateCommandOrOptionItems(t,e,n,r,o,s,l){if(o&&r&&e)for(const u of r)this.populateSingleCommandOrOptionItem(t,e,n,u,o,s,l)}populateCommandOrOptionTitle(t,e,n,r){var o,s;if(e){const l=r>0,u=(s=(o=this._menuElm)===null||o===void 0?void 0:o.querySelector(`.slick-${t}-header`))!==null&&s!==void 0?s:Re("div",{className:`slick-${t}-header`}),h=`${t}Title`;l||(e!=null&&e[h]?(on(u),this[`_${t}TitleElm`]=Re("span",{className:"slick-menu-title",textContent:e[h]}),u.appendChild(this[`_${t}TitleElm`]),u.classList.add("with-title")):u.classList.add("no-title"),n.appendChild(u))}}populateSingleCommandOrOptionItem(t,e,n,r,o,s,l){var u;let h=null;if(o&&r&&e){const c=(o==null?void 0:o.level)||0,p=this._camelPluginName==="headerButtons"?"":"-item",m=`${this._menuCssPrefix}${p}`;let v=!0,_=!0;if(typeof r=="object"&&(v=this.extensionUtility.runOverrideFunctionWhenExists(r.itemVisibilityOverride,o),_=this.extensionUtility.runOverrideFunctionWhenExists(r.itemUsabilityOverride,o)),!v)return null;if(typeof r=="object"&&r.itemUsabilityOverride&&(r.disabled=!_),h=Re("li",{className:m,role:"menuitem"}),typeof r=="object"&&Kd(r[t])&&(h.dataset[t]=r==null?void 0:r[t]),n&&n.appendChild(h),typeof r=="object"&&r.divider||r==="divider")return h.classList.add(`${m}-divider`),h;if(r.disabled&&h.classList.add(`${m}-disabled`),(r.hidden||r.showOnHover)&&h.classList.add(`${m}-hidden`),r.cssClass&&h.classList.add(...r.cssClass.split(" ")),r.tooltip&&(h.title=r.tooltip),this._camelPluginName!=="headerButtons"){const x=Re("div",{className:`${this._menuCssPrefix}-icon`});h.appendChild(x),r.iconCssClass?x.classList.add(...r.iconCssClass.split(" ")):!r.commandItems&&!r.optionItems&&!r.items&&(x.textContent="◦");const S=Re("span",{className:`${this._menuCssPrefix}-content`,textContent:typeof r=="object"&&r.title||""},h);r.textCssClass&&S.classList.add(...r.textCssClass.split(" "))}const C=c>0?"sub-menu":"parent-menu";if(this._bindEventService.bind(h,"click",x=>s.call(this,x,t,r,c,o==null?void 0:o.column),void 0,C),((u=this._addonOptions)===null||u===void 0?void 0:u.subMenuOpenByEvent)==="mouseover"&&typeof l=="function"&&this._bindEventService.bind(h,"mouseover",x=>l.call(this,x,t,r,c),void 0,C),r.commandItems||r.optionItems||r.items){const x=document.createElement("span");x.className="sub-item-chevron",this._addonOptions.subItemChevronClass?x.classList.add(...this._addonOptions.subItemChevronClass.split(" ")):x.textContent="⮞",h.classList.add("slick-submenu-item"),h.appendChild(x)}}return h}}class lm extends lu{constructor(t,e,n){super(t,e,n),this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._currentCell=-1,this._currentRow=-1,this._lastMenuTypeClicked="",this._subMenuParentId=""}createParentMenu(t){var e,n,r,o,s,l,u;(e=this.menuElement)===null||e===void 0||e.remove(),this._menuElm=void 0;const h=this.grid.getCellFromEvent(t);if(h){this._currentCell=(n=h.cell)!==null&&n!==void 0?n:0,this._currentRow=(r=h.row)!==null&&r!==void 0?r:0;const c=((o=this._addonOptions)===null||o===void 0?void 0:o.commandItems)||[],p=((s=this._addonOptions)===null||s===void 0?void 0:s.optionItems)||[],m={cell:this._currentCell,row:this._currentRow,grid:this.grid};if(this.closeMenu(t,m),typeof t.stopPropagation=="function"&&(this.pubSubService.publish(`on${vl(this._camelPluginName)}BeforeMenuShow`,m),typeof((l=this.addonOptions)===null||l===void 0?void 0:l.onBeforeMenuShow)=="function"&&this.addonOptions.onBeforeMenuShow(t,m)===!1)||(this._menuElm=this.createMenu(c,p),this._menuElm&&(this._menuElm.style.top=`${t.pageY+5}px`,this._menuElm.style.left=`${t.pageX}px`,this._menuElm.style.display="block",document.body.appendChild(this._menuElm)),this.pubSubService.publish(`on${vl(this._camelPluginName)}AfterMenuShow`,m),typeof((u=this.addonOptions)===null||u===void 0?void 0:u.onAfterMenuShow)=="function"&&this.addonOptions.onAfterMenuShow(t,m)===!1))return}return this._menuElm}createMenu(t,e,n=0,r){var o,s,l,u,h,c,p,m;const v=this.grid.getColumns()[this._currentCell],_=this.grid.getDataItem(this._currentRow),C=(r==null?void 0:r.command)||(r==null?void 0:r.option);let x=n===1&&C?String(C).replace(/\s/g,""):"";x&&(this._subMenuParentId=x),n>1&&(x=this._subMenuParentId);let S=!0,E=!0;if(this._camelPluginName==="contextMenu"){if(S=this.checkIsColumnAllowed((s=(o=this._addonOptions)===null||o===void 0?void 0:o.optionShownOverColumnIds)!==null&&s!==void 0?s:[],v.id),E=this.checkIsColumnAllowed((u=(l=this._addonOptions)===null||l===void 0?void 0:l.commandShownOverColumnIds)!==null&&u!==void 0?u:[],v.id),!v||(!E||!t.length)&&(!S||!e.length)){this.hideMenu();return}}else if(!v||!v.cellMenu||!t.length&&!e.length)return;const D=`${this.menuCssClass} slick-menu-level-${n} ${this.gridUid}`,A=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${n}${this.gridUidSelector}`);if(A){if(A.dataset.subMenuParent===x)return A;this.disposeSubMenus()}const P=document.createElement("div");P.className=D,n>0&&(P.classList.add("slick-submenu"),x&&(P.dataset.subMenuParent=x));const M=isNaN(this.addonOptions.maxHeight)?this.addonOptions.maxHeight:`${(h=this.addonOptions.maxHeight)!==null&&h!==void 0?h:0}px`,B=isNaN(this.addonOptions.maxWidth)?this.addonOptions.maxWidth:`${(c=this.addonOptions.maxWidth)!==null&&c!==void 0?c:0}px`;M&&(P.style.maxHeight=M),B&&(P.style.maxWidth=B),!((p=this.addonOptions)===null||p===void 0)&&p.width&&(P.style.width=Ws((m=this.addonOptions)===null||m===void 0?void 0:m.width));const Z=Re("button",{ariaLabel:"Close",className:"close",type:"button",textContent:"×",dataset:{dismiss:this._menuCssPrefix}});if(!this.addonOptions.hideOptionSection&&S&&e.length>0){const L=Re("div",{className:`${this._menuCssPrefix}-option-list`,role:"menu"},P);this.populateCommandOrOptionTitle("option",this.addonOptions,L,n),!this.addonOptions.hideCloseButton&&n<1&&this.populateCommandOrOptionCloseBtn("option",Z,L),r&&n>0&&this.addSubMenuTitleWhenExists(r,L),this.populateCommandOrOptionItems("option",this.addonOptions,L,e,{cell:this._currentCell,row:this._currentRow,column:v,dataContext:_,grid:this.grid,level:n},this.handleMenuItemCommandClick,this.handleMenuItemMouseOver)}if(!this.addonOptions.hideCommandSection&&E&&t.length>0){const L=Re("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},P);this.populateCommandOrOptionTitle("command",this.addonOptions,L,n),!this.addonOptions.hideCloseButton&&n<1&&(!S||e.length===0||this.addonOptions.hideOptionSection)&&this.populateCommandOrOptionCloseBtn("command",Z,L),r&&n>0&&this.addSubMenuTitleWhenExists(r,L),this.populateCommandOrOptionItems("command",this.addonOptions,L,t,{cell:this._currentCell,row:this._currentRow,column:v,dataContext:_,grid:this.grid,level:n},this.handleMenuItemCommandClick,this.handleMenuItemMouseOver)}return n++,P}closeMenu(t,e){var n;if(this.menuElement){if(typeof((n=this.addonOptions)===null||n===void 0?void 0:n.onBeforeMenuClose)=="function"&&this.addonOptions.onBeforeMenuClose(t,e)===!1)return;this.hideMenu()}}hideMenu(){var t;(t=this.menuElement)===null||t===void 0||t.remove(),this._menuElm=null,this.disposeSubMenus()}checkIsColumnAllowed(t,e){return(t==null?void 0:t.length)>0?t.findIndex(n=>n===e)>=0:!0}handleBodyMouseDown(t){if(this.menuElement){let e=!1;const n=t.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(t.target)||n)&&(e=!0),(this.menuElement!==t.target&&!e&&!t.defaultPrevented||t.target.className==="close"&&n)&&this.closeMenu(t,{cell:this._currentCell,row:this._currentRow,grid:this.grid})}}handleCloseButtonClicked(t){t.defaultPrevented||this.closeMenu(t,{cell:0,row:0,grid:this.grid})}handleMenuItemMouseOver(t,e,n,r=0){(n==null?void 0:n[e])!==void 0&&n!=="divider"&&!n.disabled&&!n.divider&&(n.commandItems||n.optionItems||n.items?(this.repositionSubMenu(n,e,r,t),this._lastMenuTypeClicked=e):r===0&&this.disposeSubMenus())}handleMenuItemCommandClick(t,e,n,r=0){var o;if((n==null?void 0:n[e])!==void 0&&n!=="divider"&&!n.disabled&&!n.divider&&this._currentCell!==void 0&&this._currentRow!==void 0){if(e==="option"&&!this.grid.getEditorLock().commitCurrentEdit())return;const s=this._currentCell,l=this._currentRow,u=this.grid.getColumns()[this._currentCell],h=this.grid.getDataItem(this._currentRow),c=n[e]!==void 0?n[e]:"";if(c!==void 0&&!n[`${e}Items`]){const p={cell:this._currentCell,row:this._currentRow,grid:this.grid,[e]:c,item:n,column:u,dataContext:h},m=e==="command"?"onCommand":"onOptionSelected",v=`${this._camelPluginName}:${m}`;this.pubSubService.publish(v,p),typeof((o=this._addonOptions)===null||o===void 0?void 0:o[m])=="function"&&this._addonOptions[m](t,p),typeof n.action=="function"&&n.action.call(this,t,p),t.defaultPrevented||this.closeMenu(t,{cell:s,row:l,grid:this.grid})}else(n.commandItems||n.optionItems)&&this.repositionSubMenu(n,e,r,t);this._lastMenuTypeClicked=e}}populateCommandOrOptionCloseBtn(t,e,n){var r;this._bindEventService.bind(e,"click",s=>this.handleCloseButtonClicked(s),void 0,"parent-menu");const o=(r=n.querySelector(`.slick-${t}-header`))!==null&&r!==void 0?r:Re("div",{className:`slick-${t}-header`});o==null||o.appendChild(e),n.appendChild(o),o.classList.add("with-close")}repositionSubMenu(t,e,n,r){(r.target.classList.contains("slick-cell")||this._lastMenuTypeClicked!==e)&&this.disposeSubMenus();const o=this.createMenu((t==null?void 0:t.commandItems)||[],(t==null?void 0:t.optionItems)||[],n+1,t);o&&(o.style.display="block",document.body.appendChild(o),this.repositionMenu(r,o))}repositionMenu(t,e){var n,r,o,s,l,u;const h=e==null?void 0:e.classList.contains("slick-submenu"),c=h?t.target.closest(`.${this._menuCssPrefix}-item`):t.target.closest(".slick-cell");if(e&&c){e.style.top="0px",e.style.left="0px";const p=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t,m=Gn(c);let v=c&&this._camelPluginName==="cellMenu"?(o=m==null?void 0:m.left)!==null&&o!==void 0?o:0:p.pageX,_=c&&this._camelPluginName==="cellMenu"?(s=m==null?void 0:m.top)!==null&&s!==void 0?s:0:p.pageY;h&&this._camelPluginName==="contextMenu"&&(v=(l=m==null?void 0:m.left)!==null&&l!==void 0?l:0,_=(u=m==null?void 0:m.top)!==null&&u!==void 0?u:0);const C=c.offsetWidth||0,x=(e==null?void 0:e.offsetHeight)||0,S=(e==null?void 0:e.offsetWidth)||this._addonOptions.width||0,E=this.gridOptions.rowHeight||0,D=Number(this._addonOptions.autoAdjustDropOffset||0),A=Number(this._addonOptions.autoAlignSideOffset||0);if(this._addonOptions.autoAdjustDrop||this._addonOptions.dropDirection){const{bottom:P,top:M}=ou(c),B=P+D-E,Z=M-D+E;(B<x&&Z>B?"top":"bottom")==="top"||this._addonOptions.dropDirection==="top"?(e.classList.remove("dropdown"),e.classList.add("dropup"),h?_-=x-D-c.clientHeight:_-=x-D):(e.classList.remove("dropup"),e.classList.add("dropdown"),_=_+D,this._camelPluginName==="cellMenu"&&(h?_+=D:_+=E+D))}if(this._addonOptions.autoAlignSide||this._addonOptions.dropSide==="left"){const P=this.grid.getGridPosition();let M=v+Number(S);h&&(M+=c.clientWidth);const B=document.documentElement.clientWidth;(M>=P.width||M>=B?"left":"right")==="left"||!h&&this._addonOptions.dropSide==="left"?(e.classList.remove("dropright"),e.classList.add("dropleft"),this._camelPluginName==="cellMenu"&&!h?v-=Number(S)-C-A:v-=Number(S)-A):(e.classList.remove("dropleft"),e.classList.add("dropright"),h?v+=A+c.offsetWidth:v+=A)}e.style.top=`${_}px`,e.style.left=`${v}px`}}}class U_ extends lm{constructor(t,e,n){super(t,e,n),this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._defaults={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!0,subMenuOpenByEvent:"mouseover"},this.pluginName="CellMenu",this._camelPluginName="cellMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-cell-menu",this.init(n.gridOptions.cellMenu)}init(t){this._addonOptions={...this._defaults,...t},this.sortMenuItems(this.sharedService.allColumns),this._eventHandler.subscribe(this.grid.onClick,this.handleCellClick.bind(this)),this._addonOptions.hideMenuOnScroll&&this._eventHandler.subscribe(this.grid.onScroll,this.closeMenu.bind(this))}translateCellMenu(){var t;const e=(t=this.sharedService)===null||t===void 0?void 0:t.gridOptions,n=this.sharedService.allColumns;e!=null&&e.enableTranslate&&Array.isArray(n)&&n.forEach(r=>{if(r!=null&&r.cellMenu&&(Array.isArray(r.cellMenu.commandItems)||Array.isArray(r.cellMenu.optionItems))){const o=r.cellMenu.commandItems||[],s=r.cellMenu.optionItems||[];r.cellMenu.commandTitleKey&&(r.cellMenu.commandTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.cellMenu.commandTitleKey,"TEXT_COMMANDS")||r.cellMenu.commandTitle),r.cellMenu.optionTitleKey&&(r.cellMenu.optionTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.cellMenu.optionTitleKey,"TEXT_COMMANDS")||r.cellMenu.optionTitle),this.extensionUtility.translateMenuItemsFromTitleKey(o,"commandItems"),this.extensionUtility.translateMenuItemsFromTitleKey(s,"optionItems")}})}handleCellClick(t,e){this.disposeAllMenus();const n=this.grid.getCellFromEvent(t);if(n){const r=this.grid.getDataItem(n.row),o=this.grid.getColumns()[n.cell];if(o!=null&&o.cellMenu&&t.preventDefault(),this._addonOptions={...this._addonOptions,...o.cellMenu},e=e||{},e.column=o,e.dataContext=r,e.grid=this.grid,!this.extensionUtility.runOverrideFunctionWhenExists(this._addonOptions.menuUsabilityOverride,e))return;this._menuElm=this.createParentMenu(t),this._menuElm&&(this.repositionMenu(t,this._menuElm),this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.style.display="block"),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}}sortMenuItems(t){t.forEach(e=>{var n,r;!((n=e==null?void 0:e.cellMenu)===null||n===void 0)&&n.commandItems&&this.extensionUtility.sortItems(e.cellMenu.commandItems||[],"positionOrder"),!((r=e==null?void 0:e.cellMenu)===null||r===void 0)&&r.optionItems&&this.extensionUtility.sortItems(e.cellMenu.optionItems||[],"positionOrder")})}}class G_{constructor(t,e){this.grid=t,this.pluginName="CellRangeDecorator",this._defaults={selectionCssClass:"slick-range-decorator",selectionCss:{border:"2px dashed red",zIndex:"9999"},offset:{top:-1,left:-1,height:-2,width:-2}},this._addonOptions=ml(this._defaults,e)}get addonOptions(){return this._addonOptions}get addonElement(){return this._elem}dispose(){this.hide()}hide(){var t;(t=this._elem)===null||t===void 0||t.remove(),this._elem=null}show(t){var e,n;this._elem||(this._elem=Re("div",{className:this._addonOptions.selectionCssClass}),Object.keys(this._addonOptions.selectionCss).forEach(s=>{this._elem.style[s]=this._addonOptions.selectionCss[s]}),this._elem.style.position="absolute",(e=this.grid.getActiveCanvasNode())===null||e===void 0||e.appendChild(this._elem));const r=this.grid.getCellNodeBox(t.fromRow,t.fromCell),o=this.grid.getCellNodeBox(t.toRow,t.toCell);return r&&o&&(!((n=this._addonOptions)===null||n===void 0)&&n.offset)&&(this._elem.style.top=`${r.top+this._addonOptions.offset.top}px`,this._elem.style.left=`${r.left+this._addonOptions.offset.left}px`,this._elem.style.height=`${o.bottom-r.top+this._addonOptions.offset.height}px`,this._elem.style.width=`${o.right-r.left+this._addonOptions.offset.width}px`),this._elem}}class am{constructor(t){this._currentlySelectedRange=null,this._dragging=!1,this._gridUid="",this._columnOffset=0,this._rowOffset=0,this._isRightCanvas=!1,this._isBottomCanvas=!1,this._xDelayForNextCell=0,this._yDelayForNextCell=0,this._viewportHeight=0,this._viewportWidth=0,this._isRowMoveRegistered=!1,this._scrollLeft=0,this._scrollTop=0,this._defaults={autoScroll:!0,minIntervalToShowNextCell:30,maxIntervalToShowNextCell:600,accelerateInterval:5,selectionCss:{border:"2px dashed blue"}},this.pluginName="CellRangeSelector",this.onBeforeCellRangeSelected=new Slick.Event,this.onCellRangeSelecting=new Slick.Event,this.onCellRangeSelected=new Slick.Event,this._eventHandler=new Slick.EventHandler,this._addonOptions=ml(this._defaults,t)}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get gridUid(){var t,e;return this._gridUid||((e=(t=this._grid)===null||t===void 0?void 0:t.getUID())!==null&&e!==void 0?e:"")}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}init(t){this._grid=t,this._decorator=this._addonOptions.cellDecorator||new G_(t,this._addonOptions),this._canvas=t.getCanvasNode(),this._gridOptions=t.getOptions(),this._gridUid=t.getUID(),this._eventHandler.subscribe(this._grid.onDrag,this.handleDrag.bind(this)).subscribe(this._grid.onDragInit,this.handleDragInit.bind(this)).subscribe(this._grid.onDragStart,this.handleDragStart.bind(this)).subscribe(this._grid.onDragEnd,this.handleDragEnd.bind(this)).subscribe(this._grid.onScroll,this.handleScroll.bind(this))}destroy(){this.dispose()}dispose(){var t,e;(t=this._eventHandler)===null||t===void 0||t.unsubscribeAll(),on(this._activeCanvas),on(this._canvas),(e=this._decorator)===null||e===void 0||e.dispose(),this.stopIntervalTimer()}getCellDecorator(){return this._decorator}getCurrentRange(){return this._currentlySelectedRange}getMouseOffsetViewport(t,e){var n,r,o,s;const l=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t,u=this._activeViewport.scrollLeft,h=this._activeViewport.scrollTop,c=u+this._viewportWidth,p=h+this._viewportHeight,m=Gn(this._activeViewport),v=(o=m==null?void 0:m.left)!==null&&o!==void 0?o:0,_=(s=m==null?void 0:m.top)!==null&&s!==void 0?s:0,C=v+this._viewportWidth,x=_+this._viewportHeight,S={e:t,dd:e,viewport:{left:u,top:h,right:c,bottom:p,offset:{left:v,top:_,right:C,bottom:x}},offset:{x:0,y:0},isOutsideViewport:!1};return l.pageX<v?S.offset.x=l.pageX-v:l.pageX>C&&(S.offset.x=l.pageX-C),l.pageY<_?S.offset.y=_-l.pageY:l.pageY>x&&(S.offset.y=x-l.pageY),S.isOutsideViewport=!!S.offset.x||!!S.offset.y,S}stopIntervalTimer(){this._autoScrollTimerId&&(clearInterval(this._autoScrollTimerId),this._autoScrollTimerId=void 0)}handleDrag(t,e){if(!(!this._dragging&&!this._gridOptions.enableRowMoveManager)){if(this._gridOptions.enableRowMoveManager||t.stopImmediatePropagation(),this.addonOptions.autoScroll&&(this._draggingMouseOffset=this.getMouseOffsetViewport(t,e),this._draggingMouseOffset.isOutsideViewport))return this.handleDragOutsideViewport();this.stopIntervalTimer(),this.handleDragTo(t,e)}}handleDragOutsideViewport(){if(this._xDelayForNextCell=this.addonOptions.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.x)*this.addonOptions.accelerateInterval,this._yDelayForNextCell=this.addonOptions.maxIntervalToShowNextCell-Math.abs(this._draggingMouseOffset.offset.y)*this.addonOptions.accelerateInterval,!this._autoScrollTimerId){let t=0,e=0;this._autoScrollTimerId=setInterval(()=>{let n=!1,r=!1;this._draggingMouseOffset.offset.x?(t+=this.addonOptions.minIntervalToShowNextCell,n=t>=this._xDelayForNextCell):t=0,this._draggingMouseOffset.offset.y?(e+=this.addonOptions.minIntervalToShowNextCell,r=e>=this._yDelayForNextCell):e=0,(n||r)&&(n&&(t=0),r&&(e=0),this.handleDragToNewPosition(n,r))},this.addonOptions.minIntervalToShowNextCell)}}handleDragToNewPosition(t,e){let n=this._draggingMouseOffset.e.pageX,r=this._draggingMouseOffset.e.pageY;const o=this._draggingMouseOffset.offset.x,s=this._draggingMouseOffset.offset.y,l=this._draggingMouseOffset.viewport.offset;t&&o&&(o>0?n=l.right+this._moveDistanceForOneCell.x:n=l.left-this._moveDistanceForOneCell.x),e&&s&&(s>0?r=l.top-this._moveDistanceForOneCell.y:r=l.bottom+this._moveDistanceForOneCell.y),this.handleDragTo({pageX:n,pageY:r},this._draggingMouseOffset.dd)}handleDragTo(t,e){var n,r,o,s,l,u;const h=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t,c=this._grid.getCellFromPoint(h.pageX-((s=(o=Gn(this._activeCanvas))===null||o===void 0?void 0:o.left)!==null&&s!==void 0?s:0)+this._columnOffset,h.pageY-((u=(l=Gn(this._activeCanvas))===null||l===void 0?void 0:l.top)!==null&&u!==void 0?u:0)+this._rowOffset);if(c!==void 0){if(this._gridOptions.frozenColumn>=0&&(!this._isRightCanvas&&c.cell>this._gridOptions.frozenColumn||this._isRightCanvas&&c.cell<=this._gridOptions.frozenColumn)||this._gridOptions.frozenRow>=0&&(!this._isBottomCanvas&&c.row>=this._gridOptions.frozenRow||this._isBottomCanvas&&c.row<this._gridOptions.frozenRow))return;if(this.addonOptions.autoScroll&&this._draggingMouseOffset){const p=this._grid.getCellNodeBox(c.row,c.cell);if(p){const m=this._draggingMouseOffset.viewport;(p.left<m.left||p.right>m.right||p.top<m.top||p.bottom>m.bottom)&&this._grid.scrollCellIntoView(c.row,c.cell)}}if(!this._grid.canCellBeSelected(c.row,c.cell))return;if(e!=null&&e.range){e.range.end=c;const p=new Slick.Range(e.range.start.row,e.range.start.cell,c.row,c.cell);this._decorator.show(p),this.onCellRangeSelecting.notify({range:p})}}}handleDragEnd(t,e){this._decorator.hide(),this._dragging&&(this._dragging=!1,t.stopImmediatePropagation(),this.stopIntervalTimer(),this.onCellRangeSelected.notify({range:new Slick.Range(e.range.start.row,e.range.start.cell,e.range.end.row,e.range.end.cell)}))}handleDragInit(t){var e,n,r,o;this._activeCanvas=this._grid.getActiveCanvasNode(t),this._activeViewport=this._grid.getActiveViewportNode(t);const s=this._grid.getDisplayedScrollbarDimensions();if(this._viewportWidth=this._activeViewport.offsetWidth-s.width,this._viewportHeight=this._activeViewport.offsetHeight-s.height,this._moveDistanceForOneCell={x:this._grid.getAbsoluteColumnMinWidth()/2,y:this._gridOptions.rowHeight/2},this._rowOffset=0,this._columnOffset=0,this._isBottomCanvas=this._activeCanvas.classList.contains("grid-canvas-bottom"),this._gridOptions.frozenRow>-1&&this._isBottomCanvas){const l=`${this.gridUidSelector} .grid-canvas-${this._gridOptions.frozenBottom?"bottom":"top"}`;this._rowOffset=(n=(e=document.querySelector(l))===null||e===void 0?void 0:e.clientHeight)!==null&&n!==void 0?n:0}this._isRightCanvas=this._activeCanvas.classList.contains("grid-canvas-right"),this._gridOptions.frozenColumn>-1&&this._isRightCanvas&&(this._columnOffset=(o=(r=document.querySelector(`${this.gridUidSelector} .grid-canvas-left`))===null||r===void 0?void 0:r.clientWidth)!==null&&o!==void 0?o:0),this._grid.getEditorLock().isActive()||(t.stopImmediatePropagation(),t.preventDefault())}handleDragStart(t,e){var n,r,o,s;const l=this._grid.getCellFromEvent(t);if(l&&this.onBeforeCellRangeSelected.notify(l).getReturnValue()!==!1&&this._grid.canCellBeSelected(l.row,l.cell)&&(this._dragging=!0,t.stopImmediatePropagation()),!this._dragging)return;this._grid.focus();let u=e.startX-((r=(n=Gn(this._canvas))===null||n===void 0?void 0:n.left)!==null&&r!==void 0?r:0);this._gridOptions.frozenColumn>=0&&this._isRightCanvas&&(u+=this._scrollLeft);let h=e.startY-((s=(o=Gn(this._canvas))===null||o===void 0?void 0:o.top)!==null&&s!==void 0?s:0);this._gridOptions.frozenRow>=0&&this._isBottomCanvas&&(h+=this._scrollTop);const c=this._grid.getCellFromPoint(u,h);return e.range={start:c,end:{}},this._currentlySelectedRange=e.range,this._decorator.show(new Slick.Range(c.row,c.cell))}handleScroll(t,e){this._scrollTop=e.scrollTop,this._scrollLeft=e.scrollLeft}}class W_{constructor(t){this._cachedPageRowCount=0,this._prevKeyDown="",this._ranges=[],this._defaults={selectActiveCell:!0},this.onSelectedRangesChanged=new Slick.Event,this.pluginName="CellSelectionModel",this._eventHandler=new Slick.EventHandler,t===void 0||t.cellRangeSelector===void 0?this._selector=new am({selectionCss:{border:"2px solid black"}}):this._selector=t.cellRangeSelector,this._addonOptions=t}get addonOptions(){return this._addonOptions}get cellRangeSelector(){return this._selector}get eventHandler(){return this._eventHandler}init(t){var e;this._grid=t,this.hasDataView()&&(this._dataView=(e=t==null?void 0:t.getData())!==null&&e!==void 0?e:{}),this._addonOptions={...this._defaults,...this._addonOptions},this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.handleActiveCellChange.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)).subscribe(this._selector.onBeforeCellRangeSelected,this.handleBeforeCellRangeSelected.bind(this)).subscribe(this._selector.onCellRangeSelected,this.handleCellRangeSelected.bind(this)),t.registerPlugin(this._selector)}destroy(){this.dispose()}dispose(){var t,e;this._selector&&(this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this))),this._eventHandler.unsubscribeAll(),(t=this._grid)===null||t===void 0||t.unregisterPlugin(this._selector),(e=this._selector)===null||e===void 0||e.dispose()}getSelectedRanges(){return this._ranges}getViewportRowCount(){var t,e,n;const r=this._grid.getViewportNode(),o=(t=r==null?void 0:r.clientHeight)!==null&&t!==void 0?t:0,s=(n=(e=this._grid.getScrollbarDimensions())===null||e===void 0?void 0:e.height)!==null&&n!==void 0?n:0;return Math.floor((o-s)/this._grid.getOptions().rowHeight)||1}hasDataView(){return!Array.isArray(this._grid.getData())}rangesAreEqual(t,e){let n=t.length!==e.length;if(!n){for(let r=0;r<t.length;r++)if(t[r].fromCell!==e[r].fromCell||t[r].fromRow!==e[r].fromRow||t[r].toCell!==e[r].toCell||t[r].toRow!==e[r].toRow){n=!0;break}}return!n}refreshSelections(){this.setSelectedRanges(this.getSelectedRanges())}removeInvalidRanges(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];this._grid.canCellBeSelected(r.fromRow,r.fromCell)&&this._grid.canCellBeSelected(r.toRow,r.toCell)&&e.push(r)}return e}resetPageRowCount(){this._cachedPageRowCount=0}setSelectedRanges(t,e="SlickCellSelectionModel.setSelectedRanges"){if((!this._ranges||this._ranges.length===0)&&(!t||t.length===0))return;const n=!this.rangesAreEqual(this._ranges,t);if(this._ranges=this.removeInvalidRanges(t),n){const r=new Slick.EventData;Object.defineProperty(r,"detail",{writable:!0,configurable:!0,value:{caller:e}}),this.onSelectedRangesChanged.notify(this._ranges,r)}}handleActiveCellChange(t,e){var n,r;this._prevSelectedRow=void 0,!((n=this._addonOptions)===null||n===void 0)&&n.selectActiveCell&&e.row!==null&&e.cell!==null?this.setSelectedRanges([new Slick.Range(e.row,e.cell)]):!((r=this._addonOptions)===null||r===void 0)&&r.selectActiveCell||this.setSelectedRanges([])}handleBeforeCellRangeSelected(t){if(this._grid.getEditorLock().isActive())return t.stopPropagation(),!1}handleCellRangeSelected(t,e){this._grid.setActiveCell(e.range.fromRow,e.range.fromCell,!1,!1,!0),this.setSelectedRanges([e.range])}isKeyAllowed(t){return["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","PageDown","PageUp","Home","End"].some(e=>e===t)}handleKeyDown(t){var e;let n,r;const o=this._grid.getActiveCell(),s=t.ctrlKey||t.metaKey;let l=0;if(this._dataView?l=((e=this._dataView)===null||e===void 0?void 0:e.getPagingInfo().pageSize)||this._dataView.getLength():l=this._grid.getDataLength(),o&&t.shiftKey&&!s&&!t.altKey&&this.isKeyAllowed(t.key)&&(n=this.getSelectedRanges().slice(),n.length||n.push(new Slick.Range(o.row,o.cell)),r=n.pop(),typeof(r==null?void 0:r.contains)=="function")){r.contains(o.row,o.cell)||(r=new Slick.Range(o.row,o.cell));let u=r.toRow-r.fromRow,h=r.toCell-r.fromCell;const c=o.row===r.fromRow?1:-1,p=o.cell===r.fromCell?1:-1,m=t.key.startsWith("Arrow");let v=0;m?(t.key==="ArrowLeft"?h-=p:t.key==="ArrowRight"?h+=p:t.key==="ArrowUp"?u-=c:t.key==="ArrowDown"&&(u+=c),v=o.row+c*u):(this._cachedPageRowCount<1&&(this._cachedPageRowCount=this.getViewportRowCount()),this._prevSelectedRow===void 0&&(this._prevSelectedRow=o.row),t.key==="Home"?v=0:t.key==="End"?v=l-1:t.key==="PageUp"?(this._prevSelectedRow>=0&&(v=this._prevSelectedRow-this._cachedPageRowCount),v<0&&(v=0)):t.key==="PageDown"&&(this._prevSelectedRow<=l-1&&(v=this._prevSelectedRow+this._cachedPageRowCount),v>l-1&&(v=l-1)),this._prevSelectedRow=v);const _=new Slick.Range(o.row,o.cell,v,o.cell+p*h);if(this.removeInvalidRanges([_]).length){n.push(_);const C=c>0?_.toRow:_.fromRow,x=p>0?_.toCell:_.fromCell;m?(this._grid.scrollRowIntoView(C),this._grid.scrollCellIntoView(C,x,!1)):(this._grid.scrollRowIntoView(v),this._grid.scrollCellIntoView(v,x,!1))}else n.push(r);this.setSelectedRanges(n),t.preventDefault(),t.stopPropagation(),this._prevKeyDown=t.key}}}class Ch{constructor(t){this._ranges=[],this._defaults={autoScrollWhenDrag:!0,cellRangeSelector:void 0,dragToSelect:!1,selectActiveRow:!0},this.pluginName="RowSelectionModel",this.onSelectedRangesChanged=new Slick.Event,this._eventHandler=new Slick.EventHandler,this._addonOptions={...this._defaults,...t}}get addonOptions(){return this._addonOptions}get eventHandler(){return this._eventHandler}get gridOptions(){return this._grid.getOptions()}init(t){this._grid=t,this._addonOptions={...this._defaults,...this._addonOptions},this._selector=this.addonOptions.cellRangeSelector,!this._selector&&this._addonOptions.dragToSelect&&(this._selector=new am({selectionCss:{border:"none"},autoScroll:this._addonOptions.autoScrollWhenDrag}),this.addonOptions.cellRangeSelector=this._selector),this._eventHandler.subscribe(this._grid.onActiveCellChanged,this.handleActiveCellChange.bind(this)).subscribe(this._grid.onClick,this.handleClick.bind(this)).subscribe(this._grid.onKeyDown,this.handleKeyDown.bind(this)),this._selector&&(this._grid.registerPlugin(this._selector),this._selector.onCellRangeSelecting.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.subscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.subscribe(this.handleBeforeCellRangeSelected.bind(this)))}destroy(){this.dispose()}dispose(){this._eventHandler.unsubscribeAll(),this.disposeSelector()}disposeSelector(){var t,e;this._selector&&(this._selector.onCellRangeSelecting.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onCellRangeSelected.unsubscribe(this.handleCellRangeSelected.bind(this)),this._selector.onBeforeCellRangeSelected.unsubscribe(this.handleBeforeCellRangeSelected.bind(this)),this._grid.unregisterPlugin(this._selector),(t=this._selector)===null||t===void 0||t.destroy(),(e=this._selector)===null||e===void 0||e.dispose())}getCellRangeSelector(){return this._selector}getSelectedRanges(){return this._ranges}getSelectedRows(){return this.rangesToRows(this._ranges)}refreshSelections(){this.setSelectedRows(this.getSelectedRows())}setSelectedRows(t){this.setSelectedRanges(this.rowsToRanges(t),"SlickRowSelectionModel.setSelectedRows")}setSelectedRanges(t,e="SlickRowSelectionModel.setSelectedRanges"){if((!this._ranges||this._ranges.length===0)&&(!t||t.length===0))return;this._ranges=t;const n=new Slick.EventData;Object.defineProperty(n,"detail",{writable:!0,configurable:!0,value:{caller:e}}),this.onSelectedRangesChanged.notify(this._ranges,n)}getRowsRange(t,e){let n;const r=[];for(n=t;n<=e;n++)r.push(n);for(n=e;n<t;n++)r.push(n);return r}handleBeforeCellRangeSelected(t,e){var n;let r=!1;if(this.gridOptions.enableRowMoveManager&&(r=(n=this.isHandlerColumn(e.cell))!==null&&n!==void 0?n:!1),this._grid.getEditorLock().isActive()||r)return t.stopPropagation(),!1;this._grid.setActiveCell(e.row,e.cell)}handleCellRangeSelected(t,e){if(!this.gridOptions.multiSelect||!this.addonOptions.selectActiveRow)return!1;this.setSelectedRanges([new Slick.Range(e.range.fromRow,0,e.range.toRow,this._grid.getColumns().length-1)])}handleActiveCellChange(t,e){this._addonOptions.selectActiveRow&&e.row!==null&&this.setSelectedRanges([new Slick.Range(e.row,0,e.row,this._grid.getColumns().length-1)])}handleClick(t){const e=this._grid.getCellFromEvent(t);if(!e||!this._grid.canCellBeActive(e.row,e.cell)||!this.gridOptions.multiSelect||!t.ctrlKey&&!t.shiftKey&&!t.metaKey)return!1;let n=this.rangesToRows(this._ranges);const r=n.indexOf(e.row);if(r===-1&&(t.ctrlKey||t.metaKey))n.push(e.row),this._grid.setActiveCell(e.row,e.cell);else if(r!==-1&&(t.ctrlKey||t.metaKey))n=n.filter(s=>s!==e.row),this._grid.setActiveCell(e.row,e.cell);else if(n.length&&t.shiftKey){const s=n.pop(),l=Math.min(e.row,s),u=Math.max(e.row,s);n=[];for(let h=l;h<=u;h++)h!==s&&n.push(h);n.push(s),this._grid.setActiveCell(e.row,e.cell)}const o=this.rowsToRanges(n);return this.setSelectedRanges(o),t.stopImmediatePropagation(),!0}handleKeyDown(t){const e=this._grid.getActiveCell();if(this.gridOptions.multiSelect&&e&&t.shiftKey&&!t.ctrlKey&&!t.altKey&&!t.metaKey&&(t.which===xi.UP||t.key==="ArrowUp"||t.which===xi.DOWN||t.key==="ArrowDown")){let n=this.getSelectedRows();n.sort((l,u)=>l-u),n.length||(n=[e.row]);let r,o=n[0],s=n[n.length-1];if(t.which===xi.DOWN||t.key==="ArrowDown"?r=e.row<s||o===s?++s:++o:r=e.row<s?--s:--o,r>=0&&r<this._grid.getDataLength()){this._grid.scrollRowIntoView(r);const l=this.rowsToRanges(this.getRowsRange(o,s));this.setSelectedRanges(l)}t.preventDefault(),t.stopPropagation()}}isHandlerColumn(t){const n=this._grid.getColumns()[t].behavior||"";return/move|selectAndMove/.test(n)}rangesToRows(t){const e=[];for(let n=0;n<t.length;n++)for(let r=t[n].fromRow;r<=t[n].toRow;r++)e.push(r);return e}rowsToRanges(t){const e=[],n=this._grid.getColumns().length-1;for(const r of t)e.push(new Slick.Range(r,0,r,n));return e}}class dm{constructor(t,e){this.pubSubService=t,this.pluginName="CheckboxSelectColumn",this._defaults={columnId:"_checkbox_selector",cssClass:null,field:"_checkbox_selector",hideSelectAllCheckbox:!1,toolTip:"Select/Deselect All",width:30,applySelectOnAllPages:!0,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0},this._addonOptions=this._defaults,this._checkboxColumnCellIndex=null,this._isSelectAllChecked=!1,this._isUsingDataView=!1,this._selectedRowsLookup={},this._selectAll_UID=this.createUID(),this._bindEventService=new Nn,this._eventHandler=new Slick.EventHandler,this._addonOptions={...this._defaults,...e}}get addonOptions(){return this._addonOptions}get headerRowNode(){return this._headerRowNode}get gridOptions(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get selectAllUid(){return this._selectAll_UID}set selectedRowsLookup(t){this._selectedRowsLookup=t}init(t){this._grid=t,this._isUsingDataView=!Array.isArray(t.getData()),this._isUsingDataView&&(this._dataView=t.getData()),this.gridOptions.backendServiceApi&&(this._addonOptions.applySelectOnAllPages=!1),this._eventHandler.subscribe(t.onSelectedRowsChanged,this.handleSelectedRowsChanged.bind(this)).subscribe(t.onClick,this.handleClick.bind(this)).subscribe(t.onKeyDown,this.handleKeyDown.bind(this)),this._isUsingDataView&&this._dataView&&this._addonOptions.applySelectOnAllPages&&this._eventHandler.subscribe(this._dataView.onSelectedRowIdsChanged,this.handleDataViewSelectedIdsChanged.bind(this)).subscribe(this._dataView.onPagingInfoChanged,this.handleDataViewSelectedIdsChanged.bind(this)),this._addonOptions.hideInFilterHeaderRow||this.addCheckboxToFilterHeaderRow(t),this._addonOptions.hideInColumnTitleRow||this._eventHandler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this)),(!this._rowSelectionModel||!this._grid.getSelectionModel())&&(this._rowSelectionModel=new Ch(this.gridOptions.rowSelectionOptions),this._grid.setSelectionModel(this._rowSelectionModel)),this.gridOptions.preselectedRows&&this._rowSelectionModel&&this._grid.getSelectionModel()&&setTimeout(()=>this.selectRows(this.gridOptions.preselectedRows||[])),typeof this._addonOptions.selectableOverride=="function"&&this.selectableOverride(this._addonOptions.selectableOverride)}dispose(){this._bindEventService.unbindAll(),this._eventHandler.unsubscribeAll()}create(t,e){var n,r;if(this._addonOptions={...this._defaults,...e.checkboxSelector},Array.isArray(t)&&e){const o=this.getColumnDefinition();if(!t.some(s=>s.id===o.id)){const s=(r=(n=e==null?void 0:e.checkboxSelector)===null||n===void 0?void 0:n.columnIndexPosition)!==null&&r!==void 0?r:0;s>0?t.splice(s,0,o):t.unshift(o),this.pubSubService.publish("onPluginColumnsChanged",{columns:t,pluginName:this.pluginName})}}return this}getOptions(){return this._addonOptions}setOptions(t){var e;if(this._addonOptions={...this._addonOptions,...t},this._addonOptions.hideSelectAllCheckbox)this.hideSelectAllFromColumnHeaderTitleRow(),this.hideSelectAllFromColumnHeaderFilterRow();else if(this._addonOptions.hideInColumnTitleRow?this.hideSelectAllFromColumnHeaderTitleRow():(this.renderSelectAllCheckbox(this._isSelectAllChecked),this._eventHandler.subscribe(this._grid.onHeaderClick,this.handleHeaderClick.bind(this))),this._addonOptions.hideInFilterHeaderRow)this.hideSelectAllFromColumnHeaderFilterRow();else{const n=(e=this.headerRowNode)===null||e===void 0?void 0:e.querySelector("#filter-checkbox-selectall-container");if(n){n.style.display="flex",n.ariaChecked=String(this._isSelectAllChecked);const r=n.querySelector('input[type="checkbox"]');r&&(r.ariaChecked=String(this._isSelectAllChecked),r.checked=this._isSelectAllChecked)}}}deSelectRows(t){const e=[];for(const n of t)this._selectedRowsLookup[n]&&(e[e.length]=n);this._grid.setSelectedRows(this._grid.getSelectedRows().filter(n=>e.indexOf(n)<0),"SlickCheckboxSelectColumn.deSelectRows")}selectRows(t){var e;const n=[];for(const o of t)this._selectedRowsLookup[o]&&(n[n.length]=o);const r=(e=this._grid.getSelectedRows())===null||e===void 0?void 0:e.concat(n);this._grid.setSelectedRows(r)}getColumnDefinition(){var t,e;const n=String((e=(t=this._addonOptions)===null||t===void 0?void 0:t.columnId)!==null&&e!==void 0?e:this._defaults.columnId);return{id:n,name:this._addonOptions.hideSelectAllCheckbox||this._addonOptions.hideInColumnTitleRow?"":`<input id="header-selector${this._selectAll_UID}" type="checkbox"><label for="header-selector${this._selectAll_UID}"></label>`,toolTip:this._addonOptions.hideSelectAllCheckbox||this._addonOptions.hideInColumnTitleRow?"":this._addonOptions.toolTip,field:n,cssClass:this._addonOptions.cssClass,excludeFromExport:!0,excludeFromColumnPicker:!0,excludeFromGridMenu:!0,excludeFromQuery:!0,excludeFromHeaderMenu:!0,hideSelectAllCheckbox:this._addonOptions.hideSelectAllCheckbox,resizable:!1,sortable:!1,width:this._addonOptions.width||30,formatter:this.checkboxSelectionFormatter.bind(this)}}hideSelectAllFromColumnHeaderTitleRow(){this._grid.updateColumnHeader(this._addonOptions.columnId||"","","")}hideSelectAllFromColumnHeaderFilterRow(){var t;const e=(t=this.headerRowNode)===null||t===void 0?void 0:t.querySelector("#filter-checkbox-selectall-container");e&&(e.style.display="none")}toggleRowSelection(t){this.toggleRowSelectionWithEvent(null,t)}toggleRowSelectionWithEvent(t,e){const n=this._grid.getDataItem(e);if(!this.checkSelectableOverride(e,n,this._grid))return;const r=this._grid.getSelectedRows();this._addonOptions.onRowToggleStart&&this._addonOptions.onRowToggleStart(t,{row:e,previousSelectedRows:r});const o=this._selectedRowsLookup[e]?this._grid.getSelectedRows().filter(s=>s!==e):this._grid.getSelectedRows().concat(e);this._grid.setSelectedRows(o,"click.toggle"),this._grid.setActiveCell(e,this.getCheckboxColumnCellIndex()),this._addonOptions.onRowToggleEnd&&this._addonOptions.onRowToggleEnd(t,{row:e,previousSelectedRows:r})}selectableOverride(t){this._selectableOverride=t}addCheckboxToFilterHeaderRow(t){this._eventHandler.subscribe(t.onHeaderRowCellRendered,(e,n)=>{if(n.column.field===(this._addonOptions.field||"_checkbox_selector")){on(n.node);const r=Re("span",{id:"filter-checkbox-selectall-container",ariaChecked:"false"});r.appendChild(Re("input",{type:"checkbox",id:`header-filter-selector${this._selectAll_UID}`})),r.appendChild(Re("label",{htmlFor:`header-filter-selector${this._selectAll_UID}`})),n.node.appendChild(r),this._headerRowNode=n.node,this._bindEventService.bind(r,"click",o=>this.handleHeaderClick(o,n))}})}checkboxSelectionFormatter(t,e,n,r,o,s){if(o&&this.checkSelectableOverride(t,o,s)){const l=this.createUID()+t;return`<input id="selector${l}" type="checkbox" ${this._selectedRowsLookup[t]?'checked="checked" aria-checked="true"':'aria-checked="false"'}><label for="selector${l}"></label>`}return null}checkSelectableOverride(t,e,n){return typeof this._selectableOverride=="function"?this._selectableOverride(t,e,n):!0}createUID(){return Math.round(1e7*Math.random())}getCheckboxColumnCellIndex(){if(this._checkboxColumnCellIndex===null){this._checkboxColumnCellIndex=0;const t=this._grid.getColumns();for(let e=0;e<t.length;e++)t[e].id===this._addonOptions.columnId&&(this._checkboxColumnCellIndex=e)}return this._checkboxColumnCellIndex}handleDataViewSelectedIdsChanged(){var t;const e=this._dataView.getAllSelectedFilteredIds(),n=this._dataView.getFilteredItems();let r=0;if(typeof this._selectableOverride=="function"&&e.length>0)for(let o=0;o<this._dataView.getItemCount();o++){const s=this._dataView.getItemByIdx(o),l=this._dataView.getIdPropertyName(),u=s[l];n.findIndex(c=>c[l]===u)>=0&&!this.checkSelectableOverride(o,s,this._grid)&&r++}if(this._isSelectAllChecked=e.length+r>=n.length,!this._addonOptions.hideInColumnTitleRow&&!this._addonOptions.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._addonOptions.hideInFilterHeaderRow){const o=(t=this.headerRowNode)===null||t===void 0?void 0:t.querySelector(`#header-filter-selector${this._selectAll_UID}`);o&&(o.ariaChecked=String(this._isSelectAllChecked),o.checked=this._isSelectAllChecked)}}handleClick(t,e){if(this._grid.getColumns()[e.cell].id===this._addonOptions.columnId&&t.target.type==="checkbox"){if(t.target.ariaChecked=String(t.target.checked),this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){t.preventDefault(),t.stopImmediatePropagation();return}this.toggleRowSelectionWithEvent(t,e.row),t.stopPropagation(),t.stopImmediatePropagation()}}handleHeaderClick(t,e){if(e.column.id===this._addonOptions.columnId&&t.target.type==="checkbox"){if(t.target.ariaChecked=String(t.target.checked),this._grid.getEditorLock().isActive()&&!this._grid.getEditorLock().commitCurrentEdit()){t.preventDefault(),t.stopImmediatePropagation();return}let n=t.target.checked;const r=n?"click.selectAll":"click.unselectAll",o=this._grid.getSelectedRows();this._addonOptions.onSelectAllToggleStart&&this._addonOptions.onSelectAllToggleStart(t,{previousSelectedRows:o,caller:r});let s=[];if(n){const l=[];for(let u=0;u<this._grid.getDataLength();u++){const h=this._grid.getDataItem(u);!h.__group&&!h.__groupTotals&&this.checkSelectableOverride(u,h,this._grid)&&l.push(u)}s=l,n=!0}if(this._isUsingDataView&&this._dataView&&this._addonOptions.applySelectOnAllPages){const l=[],u=this._dataView.getFilteredItems();for(let h=0;h<u.length;h++){const c=u[h];this.checkSelectableOverride(h,c,this._grid)&&l.push(c[this._dataView.getIdPropertyName()])}this._dataView.setSelectedIds(l,{isRowBeingAdded:n})}this._grid.setSelectedRows(s,r),this._addonOptions.onSelectAllToggleEnd&&this._addonOptions.onSelectAllToggleEnd(t,{rows:s,previousSelectedRows:o,caller:r}),t.stopPropagation(),t.stopImmediatePropagation()}}handleKeyDown(t,e){(t.which===xi.SPACE||t.key===" ")&&this._grid.getColumns()[e.cell].id===this._addonOptions.columnId&&((!this._grid.getEditorLock().isActive()||this._grid.getEditorLock().commitCurrentEdit())&&this.toggleRowSelectionWithEvent(t,e.row),t.preventDefault(),t.stopImmediatePropagation())}handleSelectedRowsChanged(){var t,e;const n=this._grid.getSelectedRows(),r={};let o=0,s=0,l=0,u=0;if(typeof this._selectableOverride=="function")for(l=0;l<this._grid.getDataLength();l++){const c=this._grid.getDataItem(l);this.checkSelectableOverride(s,c,this._grid)||u++}const h=[];for(s=0;s<n.length;s++){o=n[s];const c=this._grid.getDataItem(o);this.checkSelectableOverride(s,c,this._grid)?(r[o]=!0,r[o]!==this._selectedRowsLookup[o]&&(this._grid.invalidateRow(o),delete this._selectedRowsLookup[o])):h.push(o)}for(const c in this._selectedRowsLookup)c!==void 0&&this._grid.invalidateRow(+c);if(this._selectedRowsLookup=r,this._grid.render(),this._isSelectAllChecked=((t=n==null?void 0:n.length)!==null&&t!==void 0?t:0)+u>=this._grid.getDataLength(),(!this._isUsingDataView||!this._addonOptions.applySelectOnAllPages)&&(!this._addonOptions.hideInColumnTitleRow&&!this._addonOptions.hideSelectAllCheckbox&&this.renderSelectAllCheckbox(this._isSelectAllChecked),!this._addonOptions.hideInFilterHeaderRow)){const c=(e=this.headerRowNode)===null||e===void 0?void 0:e.querySelector(`#header-filter-selector${this._selectAll_UID}`);c&&(c.ariaChecked=String(this._isSelectAllChecked),c.checked=this._isSelectAllChecked)}if(h.length>0){for(const c of h){const p=n.indexOf(c);n.splice(p,1)}this._grid.setSelectedRows(n,"click.toggle")}}renderSelectAllCheckbox(t){const e=t?' checked="checked" aria-checked="true"':' aria-checked="false"';this._grid.updateColumnHeader(this._addonOptions.columnId||"",`<input id="header-selector${this._selectAll_UID}" type="checkbox"${e}><label for="header-selector${this._selectAll_UID}"></label>`,this._addonOptions.toolTip)}}class um extends lu{constructor(t,e,n,r,o){var s,l,u,h;super(t,n,r),this.extensionUtility=t,this.filterService=e,this.pubSubService=n,this.sharedService=r,this.sortService=o,this._areVisibleColumnDifferent=!1,this._columns=[],this._columnCheckboxes=[],this._commandMenuElm=null,this._headerElm=null,this._isMenuOpen=!1,this._subMenuParentId="",this._defaults={dropSide:"left",showButton:!0,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",marginBottom:15,menuWidth:18,minHeight:250,contentMinWidth:0,resizeOnShowHeaderRow:!1,syncResizeTitle:"Synchronous resize",subMenuOpenByEvent:"mouseover",headerColumnValueExtractor:c=>c.name},this.onAfterMenuShow=new Slick.Event,this.onBeforeMenuShow=new Slick.Event,this.onMenuClose=new Slick.Event,this.onCommand=new Slick.Event,this.onColumnsChanged=new Slick.Event,this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-grid-menu",this._camelPluginName="gridMenu",this._columns=(s=this.sharedService.allColumns)!==null&&s!==void 0?s:[],this._gridUid=(h=(u=(l=this.grid)===null||l===void 0?void 0:l.getUID)===null||u===void 0?void 0:u.call(l))!==null&&h!==void 0?h:"",this.initEventHandlers(),this.init()}get addonOptions(){return this._addonOptions||{}}get columns(){return this._columns}set columns(t){this._columns=t}get gridOptions(){return this.grid.getOptions()||{}}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}initEventHandlers(){this._eventHandler.subscribe(this.grid.onColumnsReordered,au.bind(this)),this._eventHandler.subscribe(this.grid.onBeforeDestroy,this.dispose.bind(this)),this._eventHandler.subscribe(this.grid.onSetOptions,(t,e)=>{if(e&&e.optionsBefore&&e.optionsAfter){const n=e.optionsBefore.frozenColumn>=0&&e.optionsAfter.frozenColumn===-1,r=e.optionsBefore.frozenColumn===-1&&e.optionsAfter.frozenColumn>=0;(n||r)&&this.recreateGridMenu()}})}init(){var t;this._gridUid=(t=this.grid.getUID())!==null&&t!==void 0?t:"",this._userOriginalGridMenu={...this.sharedService.gridOptions.gridMenu},this._addonOptions={...this._defaults,...this.getDefaultGridMenuOptions(),...this.sharedService.gridOptions.gridMenu},this.sharedService.gridOptions.gridMenu=this._addonOptions;const e=this._userOriginalGridMenu.commandItems,n=this._userOriginalGridMenu&&Array.isArray(e)?e:[];this._addonOptions.commandItems=[...n,...this.addGridMenuCustomCommands(n)],this.extensionUtility.translateMenuItemsFromTitleKey(this._addonOptions.commandItems||[],"commandItems"),this.extensionUtility.sortItems(this._addonOptions.commandItems,"positionOrder"),this._addonOptions.commandItems=this._addonOptions.commandItems,this.createGridMenu()}dispose(){this.deleteMenu(),super.dispose()}deleteMenu(){var t,e;this._bindEventService.unbindAll(),(t=this._menuElm)===null||t===void 0||t.remove(),this._menuElm=null,(e=this._gridMenuButtonElm)===null||e===void 0||e.remove(),this._headerElm&&(this._headerElm.style.width="100%")}createColumnPickerContainer(){this._menuElm&&(hm.call(this,this._menuElm),this._listElm=Re("div",{className:"slick-column-picker-list",role:"menu"}),this._bindEventService.bind(this._menuElm,"click",fm.bind(this),void 0,"parent-menu"))}createGridMenu(){var t,e,n,r;const o=this._gridUid?`.${this._gridUid}`:"",s=((t=this._addonOptions)===null||t===void 0?void 0:t.menuWidth)||this._defaults.menuWidth,l=this.gridOptions.hasOwnProperty("frozenColumn")&&this.gridOptions.frozenColumn>=0?"right":"left",u=this.grid.getContainerNode();if(this._headerElm=u.querySelector(`.slick-header-${l}`),this._headerElm&&this._addonOptions){if(this._headerElm.style.width=`calc(100% - ${s}px)`,((e=this._addonOptions.resizeOnShowHeaderRow)!==null&&e!==void 0?e:this._defaults.resizeOnShowHeaderRow)&&this.gridOptions.showHeaderRow){const p=u.querySelector(`${o} .slick-headerrow`);p&&(p.style.width=`calc(100% - ${s}px)`)}((n=this._addonOptions.showButton)!==null&&n!==void 0?n:this._defaults.showButton)&&(this._gridMenuButtonElm=Re("button",{className:"slick-grid-menu-button",ariaLabel:"Grid Menu"}),!((r=this._addonOptions)===null||r===void 0)&&r.iconCssClass&&this._gridMenuButtonElm.classList.add(...this._addonOptions.iconCssClass.split(" ")),this._headerElm.parentElement.insertBefore(this._gridMenuButtonElm,this._headerElm.parentElement.firstChild),this._bindEventService.bind(this._gridMenuButtonElm,"click",this.showGridMenu.bind(this))),this.sharedService.gridOptions.gridMenu={...this._defaults,...this._addonOptions},this.translateTitleLabels(this._addonOptions),this.translateTitleLabels(this.sharedService.gridOptions.gridMenu),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this)),this._bindEventService.bind(document.body,"beforeunload",this.dispose.bind(this))}}createCommandMenu(t,e=0,n){const r=n==null?void 0:n.command;let o=e===1&&r?r.replace(/\s/g,""):"";o&&(this._subMenuParentId=o),e>1&&(o=this._subMenuParentId);const s=`${this.menuCssClass} slick-menu-level-${e} ${this._gridUid}`,l=document.body.querySelector(`.${this.menuCssClass}.slick-menu-level-${e}${this.gridUidSelector}`);if(l){if(l.dataset.subMenuParent===o)return l;this.disposeSubMenus()}const u=Re("div",{role:"menu",className:s,ariaLabel:e>1?"SubMenu":"Grid Menu"});e>0&&(u.classList.add("slick-submenu"),o&&(u.dataset.subMenuParent=o));const h={grid:this.grid,menu:this._menuElm,columns:this.columns,allColumns:this.getAllColumns(),visibleColumns:this.getVisibleColumns(),level:e};return this._commandMenuElm=this.recreateCommandList(t,u,h,n),e++,u}getAllColumns(){return this._columns}getVisibleColumns(){return this.grid.getColumns()}hideMenu(t){var e,n,r;const o={grid:this.grid,menu:this._menuElm,allColumns:this.columns,visibleColumns:this.getVisibleColumns()};if(this.pubSubService.publish("onGridMenuMenuClose",o),!(typeof((e=this._addonOptions)===null||e===void 0?void 0:e.onMenuClose)=="function"&&this._addonOptions.onMenuClose(t,o)===!1||this.onMenuClose.notify(o,null,this).getReturnValue()===!1)){if(this._isMenuOpen=!1,typeof((n=this.grid)===null||n===void 0?void 0:n.autosizeColumns)=="function"){const s=this.grid.getUID()||"";this._areVisibleColumnDifferent&&s&&document.querySelector(`.${s}`)!==null&&(this.gridOptions.enableAutoSizeColumns&&this.grid.autosizeColumns(),this._areVisibleColumnDifferent=!1)}this.disposeSubMenus(),(r=this._menuElm)===null||r===void 0||r.remove(),this._menuElm=null}}recreateGridMenu(){this.deleteMenu(),this.init()}repositionMenu(t,e,n,r){var o,s,l,u,h,c,p,m,v,_,C;const x=(s=(o=t==null?void 0:t.touches)===null||o===void 0?void 0:o[0])!==null&&s!==void 0?s:t,S=e.classList.contains("slick-submenu"),E=S?t.target.closest(".slick-menu-item"):x.target;if(E){const D=n||this._gridMenuButtonElm,A=Gn(n),P=Gn(E),M=r??this._addonOptions,B=getComputedStyle(D),Z=parseInt((l=B==null?void 0:B.width)!==null&&l!==void 0?l:(u=this._defaults)===null||u===void 0?void 0:u.menuWidth,10),L=(h=e==null?void 0:e.offsetWidth)!==null&&h!==void 0?h:0,ae=(p=(c=M==null?void 0:M.contentMinWidth)!==null&&c!==void 0?c:this._defaults.contentMinWidth)!==null&&p!==void 0?p:0,_e=(ae>L?ae:L)||0,J=(m=A==null?void 0:A.top)!==null&&m!==void 0?m:0,U=(v=A==null?void 0:A.right)!==null&&v!==void 0?v:0;let F,de;if(S?(de=(_=P==null?void 0:P.top)!==null&&_!==void 0?_:0,F=(C=P==null?void 0:P.left)!==null&&C!==void 0?C:0):(de=J+D.offsetHeight,F=(M==null?void 0:M.dropSide)==="right"?U-Z:U-_e),S){const De=(e==null?void 0:e.clientHeight)||0,{bottom:ne,top:pe}=ou(E);(ne<De&&pe>ne?"top":"bottom")==="top"?(e.classList.remove("dropdown"),e.classList.add("dropup"),de-=De-E.clientHeight):(e.classList.remove("dropup"),e.classList.add("dropdown"))}const qe=this.grid.getGridPosition();let Ie=F+Number(L);S&&(Ie+=E.clientWidth);const xe=document.documentElement.clientWidth;(Ie>=qe.width||Ie>=xe?"left":"right")==="left"||!S&&(M==null?void 0:M.dropSide)==="left"?(e.classList.remove("dropright"),e.classList.add("dropleft"),S&&(F-=Number(L))):(e.classList.remove("dropleft"),e.classList.add("dropright"),S&&(F+=E.offsetWidth)),e.style.top=`${de}px`,e.style.left=`${F}px`,ae>0&&(e.style.minWidth=`${ae}px`),e.style.opacity="1",e.style.display="block"}}openGridMenu(){const t=new MouseEvent("click",{bubbles:!0,cancelable:!0,composed:!1});Object.defineProperty(t,"target",{writable:!0,configurable:!0,value:Re("button",{className:"slick-grid-menu-button"})}),this.showGridMenu(t)}showGridMenu(t,e){var n,r,o,s,l;const u=(r=(n=t==null?void 0:t.touches)===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:t;if(t.preventDefault(),on(this._menuElm),(o=this._menuElm)===null||o===void 0||o.remove(),this._addonOptions){const h={grid:this.grid,menu:this._menuElm,columns:this.columns,allColumns:this.getAllColumns(),visibleColumns:this.getVisibleColumns()},c={...this._addonOptions,...e};if(c&&!this.extensionUtility.runOverrideFunctionWhenExists(c.menuUsabilityOverride,h)||typeof t.stopPropagation=="function"&&(this.pubSubService.publish("onGridMenuBeforeMenuShow",h),typeof(c==null?void 0:c.onBeforeMenuShow)=="function"&&c.onBeforeMenuShow(t,h)===!1||this.onBeforeMenuShow.notify(h,null,this).getReturnValue()===!1))return;this._menuElm=this.createCommandMenu((l=(s=this._addonOptions)===null||s===void 0?void 0:s.commandItems)!==null&&l!==void 0?l:[]),this.createColumnPickerContainer(),au.call(this),this._columnCheckboxes=[],pm.call(this,c),document.body.appendChild(this._menuElm),this._menuElm.style.opacity="0";const p=((c==null?void 0:c.marginBottom)!==void 0?c.marginBottom:this._defaults.marginBottom)||0;this._menuElm.style.minHeight=Ws(c==null?void 0:c.minHeight,""),(c==null?void 0:c.height)!==void 0?this._menuElm.style.height=Ws(c.height,""):this._menuElm.style.maxHeight=Ws(c==null?void 0:c.maxHeight,`${window.innerHeight-u.clientY-p}px`);let m=t.target.nodeName==="BUTTON"?t.target:t.target.querySelector("button");m||(m=t.target.parentElement),this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.appendChild(this._listElm),this.repositionMenu(t,this._menuElm,m,c),this._isMenuOpen=!0,this.pubSubService.publish("onGridMenuAfterMenuShow",h),typeof(c==null?void 0:c.onAfterMenuShow)=="function"&&c.onAfterMenuShow(t,h),this.onAfterMenuShow.notify(h,null,this)}}translateGridMenu(){var t;if(this.sharedService.gridOptions.gridMenu){this.sharedService.gridOptions.gridMenu.commandItems=[],this.sharedService.gridOptions.gridMenu.commandTitle="",this.sharedService.gridOptions.gridMenu.columnTitle="",this.sharedService.gridOptions.gridMenu.forceFitTitle="",this.sharedService.gridOptions.gridMenu.syncResizeTitle="";const e=this._userOriginalGridMenu&&Array.isArray(this._userOriginalGridMenu.commandItems)?this._userOriginalGridMenu.commandItems:[];this.sharedService.gridOptions.gridMenu.commandItems=[...e,...this.addGridMenuCustomCommands(e)],this.extensionUtility.translateMenuItemsFromTitleKey(((t=this._addonOptions)===null||t===void 0?void 0:t.commandItems)||[],"commandItems"),this.extensionUtility.sortItems(this.sharedService.gridOptions.gridMenu.commandItems,"positionOrder"),this.translateTitleLabels(this.sharedService.gridOptions.gridMenu),this.translateTitleLabels(this._addonOptions),this.extensionUtility.translateItems(this._columns,"nameKey","name")}}translateTitleLabels(t){t&&(t.commandTitle=this.extensionUtility.getPickerTitleOutputString("commandTitle","gridMenu"),t.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),t.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),t.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"))}addGridMenuCustomCommands(t){var e,n,r,o,s,l,u,h,c,p,m,v,_;const C=this.gridOptions.backendServiceApi||null,x=[],S=this.gridOptions,E=ho(S),D=(e=this._addonOptions)===null||e===void 0?void 0:e.commandLabels;if(this.gridOptions&&this._addonOptions&&!this._addonOptions.hideClearFrozenColumnsCommand){const P="clear-pinning";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconClearFrozenColumnsCommand||"fa fa-times",titleKey:`${E}${(n=D==null?void 0:D.clearFrozenColumnsCommandKey)!==null&&n!==void 0?n:"CLEAR_PINNING"}`,disabled:!1,command:P,positionOrder:52})}if(this.gridOptions&&this.gridOptions.enableFiltering&&!this.sharedService.hideHeaderRowAfterPageLoad){if(this.gridOptions&&this._addonOptions&&!this._addonOptions.hideClearAllFiltersCommand){const P="clear-filter";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconClearAllFiltersCommand||"fa fa-filter text-danger",titleKey:`${E}${(r=D==null?void 0:D.clearAllFiltersCommandKey)!==null&&r!==void 0?r:"CLEAR_ALL_FILTERS"}`,disabled:!1,command:P,positionOrder:50})}if(this.gridOptions&&this._addonOptions&&!this._addonOptions.hideToggleFilterCommand){const P="toggle-filter";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconToggleFilterCommand||"fa fa-random",titleKey:`${E}${(o=D==null?void 0:D.toggleFilterCommandKey)!==null&&o!==void 0?o:"TOGGLE_FILTER_ROW"}`,disabled:!1,command:P,positionOrder:53})}if(C&&this.gridOptions&&this._addonOptions&&!this._addonOptions.hideRefreshDatasetCommand){const P="refresh-dataset";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconRefreshDatasetCommand||"fa fa-refresh",titleKey:`${E}${(s=D==null?void 0:D.refreshDatasetCommandKey)!==null&&s!==void 0?s:"REFRESH_DATASET"}`,disabled:!1,command:P,positionOrder:57})}}if(this.gridOptions.showPreHeaderPanel&&this.gridOptions&&this._addonOptions&&!this._addonOptions.hideTogglePreHeaderCommand){const P="toggle-preheader";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconTogglePreHeaderCommand||"fa fa-random",titleKey:`${E}${(l=D==null?void 0:D.togglePreHeaderCommandKey)!==null&&l!==void 0?l:"TOGGLE_PRE_HEADER_ROW"}`,disabled:!1,command:P,positionOrder:53})}if(this.gridOptions.enableSorting&&this.gridOptions&&this._addonOptions&&!this._addonOptions.hideClearAllSortingCommand){const P="clear-sorting";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconClearAllSortingCommand||"fa fa-unsorted text-danger",titleKey:`${E}${(u=D==null?void 0:D.clearAllSortingCommandKey)!==null&&u!==void 0?u:"CLEAR_ALL_SORTING"}`,disabled:!1,command:P,positionOrder:51})}if(!((h=this.gridOptions)===null||h===void 0)&&h.enableTextExport&&this._addonOptions&&!this._addonOptions.hideExportCsvCommand){const P="export-csv";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconExportCsvCommand||"fa fa-download",titleKey:`${E}${(c=D==null?void 0:D.exportCsvCommandKey)!==null&&c!==void 0?c:"EXPORT_TO_CSV"}`,disabled:!1,command:P,positionOrder:54})}if(this.gridOptions&&this.gridOptions.enableExcelExport&&this._addonOptions&&!this._addonOptions.hideExportExcelCommand){const P="export-excel";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconExportExcelCommand||"fa fa-file-excel-o text-success",titleKey:`${E}${(p=D==null?void 0:D.exportExcelCommandKey)!==null&&p!==void 0?p:"EXPORT_TO_EXCEL"}`,disabled:!1,command:P,positionOrder:55})}if(!((m=this.gridOptions)===null||m===void 0)&&m.enableTextExport&&this._addonOptions&&!this._addonOptions.hideExportTextDelimitedCommand){const P="export-text-delimited";t.some(M=>M!=="divider"&&M.hasOwnProperty("command")&&M.command===P)||x.push({iconCssClass:this._addonOptions.iconExportTextDelimitedCommand||"fa fa-download",titleKey:`${E}${(v=D==null?void 0:D.exportTextDelimitedCommandKey)!==null&&v!==void 0?v:"EXPORT_TO_TAB_DELIMITED"}`,disabled:!1,command:P,positionOrder:56})}const A=((_=this._addonOptions)===null||_===void 0?void 0:_.commandItems)||[];return this.gridOptions&&this._addonOptions&&(Array.isArray(x)&&x.length>0||Array.isArray(A)&&A.length>0)&&(this._addonOptions.commandTitle=this._addonOptions.commandTitle||this.extensionUtility.getPickerTitleOutputString("commandTitle","gridMenu")),x}executeGridMenuInternalCustomCommands(t,e){var n,r,o,s,l;const u=((n=this.sharedService)===null||n===void 0?void 0:n.externalRegisteredResources)||[];if(e!=null&&e.command)switch(e.command){case"clear-pinning":const h=[...this.sharedService.visibleColumns],c={frozenColumn:-1,frozenRow:-1,frozenBottom:!1,enableMouseWheelScrollHandler:!1};this.grid.setOptions(c),this.sharedService.gridOptions.frozenColumn=c.frozenColumn,this.sharedService.gridOptions.frozenRow=c.frozenRow,this.sharedService.gridOptions.frozenBottom=c.frozenBottom,this.sharedService.gridOptions.enableMouseWheelScrollHandler=c.enableMouseWheelScrollHandler,Array.isArray(h)&&this.grid.setColumns(h),this.gridOptions.enableAutoSizeColumns&&this.grid.autosizeColumns(),this.pubSubService.publish("onGridMenuClearAllPinning");break;case"clear-filter":this.filterService.clearFilters(),this.sharedService.dataView.refresh(),this.pubSubService.publish("onGridMenuClearAllFilters");break;case"clear-sorting":this.sortService.clearSorting(),this.sharedService.dataView.refresh(),this.pubSubService.publish("onGridMenuClearAllSorting");break;case"export-csv":const m=u.find(S=>S.className==="TextExportService");m!=null&&m.exportToFile?m.exportToFile({delimiter:fs.comma,format:an.csv}):console.error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Grid Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };");break;case"export-excel":const v=u.find(S=>S.className==="ExcelExportService");v!=null&&v.exportToExcel?v.exportToExcel():console.error("[Slickgrid-Universal] You must register the ExcelExportService to properly use Export to Excel in the Grid Menu. Example:: this.gridOptions = { enableExcelExport: true, registerExternalResources: [new ExcelExportService()] };");break;case"export-text-delimited":const _=u.find(S=>S.className==="TextExportService");_!=null&&_.exportToFile?_.exportToFile({delimiter:fs.tab,format:an.txt}):console.error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Grid Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };");break;case"toggle-filter":let C=(o=(r=this.gridOptions)===null||r===void 0?void 0:r.showHeaderRow)!==null&&o!==void 0?o:!1;C=!C,this.grid.setHeaderRowVisibility(C),C===!0&&(this.grid.setColumns(this.sharedService.columnDefinitions),this.grid.scrollColumnIntoView(0));break;case"toggle-preheader":const x=(l=(s=this.gridOptions)===null||s===void 0?void 0:s.showPreHeaderPanel)!==null&&l!==void 0?l:!1;this.grid.setPreHeaderPanelVisibility(!x);break;case"refresh-dataset":this.extensionUtility.refreshBackendDataset();break}}getDefaultGridMenuOptions(){return{commandTitle:void 0,columnTitle:this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"),forceFitTitle:this.extensionUtility.getPickerTitleOutputString("forceFitTitle","gridMenu"),syncResizeTitle:this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","gridMenu"),iconCssClass:"fa fa-bars",menuWidth:18,commandItems:[],hideClearAllFiltersCommand:!1,hideRefreshDatasetCommand:!1,hideToggleFilterCommand:!1}}handleBodyMouseDown(t){if(this.menuElement){let e=!1;const n=t.target.closest(`.${this.menuCssClass}`);(this.menuElement.contains(t.target)||n)&&(e=!0),(this._isMenuOpen&&this.menuElement!==t.target&&!e&&!t.defaultPrevented||t.target.className==="close"&&n)&&this.hideMenu(t)}}handleMenuItemCommandClick(t,e,n,r=0){var o,s;if(n!=="divider"&&!n.disabled&&!n.divider)if((n.command||"")&&!n.commandItems){const u={grid:this.grid,command:n.command,item:n,allColumns:this.columns,visibleColumns:this.getVisibleColumns()};this.executeGridMenuInternalCustomCommands(t,u),this.pubSubService.publish("onGridMenuCommand",u),typeof((o=this._addonOptions)===null||o===void 0?void 0:o.onCommand)=="function"&&this._addonOptions.onCommand(t,u),this.onCommand.notify(u,null,this),typeof n.action=="function"&&n.action.call(this,t,u),!(!((s=this._addonOptions)===null||s===void 0)&&s.leaveOpen)&&!t.defaultPrevented&&this.hideMenu(t),t.preventDefault(),t.stopPropagation()}else n.commandItems&&this.repositionSubMenu(t,n,r)}handleMenuItemMouseOver(t,e,n,r=0){n!=="divider"&&!n.disabled&&!n.divider&&(n.commandItems?this.repositionSubMenu(t,n,r):r===0&&this.disposeSubMenus())}recreateCommandList(t,e,n,r){var o;const s=n.level||0;if(t.length>0){const l=Re("div",{className:`${this._menuCssPrefix}-command-list`,role:"menu"},e);if(s===0){this.populateCommandOrOptionTitle("command",this.addonOptions,l,s);const u=(o=e.querySelector(".slick-command-header"))!==null&&o!==void 0?o:Re("div",{className:"slick-command-header"});u.classList.add("with-close"),cm.call(this,u),l.appendChild(u)}return r&&s>0&&this.addSubMenuTitleWhenExists(r,l),this.populateCommandOrOptionItems("command",this._addonOptions,l,t,n,this.handleMenuItemCommandClick,this.handleMenuItemMouseOver),l}return null}repositionSubMenu(t,e,n){const r=(e==null?void 0:e.commandItems)||[],o=this.createCommandMenu(r,n+1,e);o.style.display="block",document.body.appendChild(o),this.repositionMenu(t,o)}}function cm(a){const e=Re("button",{type:"button",className:"close",ariaLabel:"Close",textContent:"×",dataset:{dismiss:this instanceof yh?"slick-column-picker":"slick-grid-menu"}});a.appendChild(e)}function hm(a){var t,e,n;const r=this;!((t=r.addonOptions)===null||t===void 0)&&t.columnTitle&&(r._columnTitleElm=Re("div",{className:"slick-menu-title",textContent:(n=(e=r.addonOptions)===null||e===void 0?void 0:e.columnTitle)!==null&&n!==void 0?n:r._defaults.columnTitle},a))}function fm(a){var t,e;const n=this,r=n instanceof yh?"columnPicker":"gridMenu";if(a.target.dataset.option==="autoresize"){const o=n.getVisibleColumns();a.target.ariaChecked=String(a.target.checked);const s=a.target.checked;n.grid.setOptions({forceFitColumns:s}),n.grid.setColumns(o);return}if(a.target.dataset.option==="syncresize"){a.target.ariaChecked=String(a.target.checked),n.grid.setOptions({syncColumnCellResize:!!a.target.checked});return}if(a.target.type==="checkbox"){n._areVisibleColumnDifferent=!0,a.target.ariaChecked=String(a.target.checked);const o=a.target.checked,s=a.target.dataset.columnid||"",l=[];if(n._columnCheckboxes.forEach((c,p)=>{c.checked&&l.push(n.columns[p])}),!l.length){a.target.checked=!0;return}if(n.grid.setColumns(l),(!n.sharedService.visibleColumns||Array.isArray(l)&&l.length!==n.sharedService.visibleColumns.length)&&(n.sharedService.visibleColumns=l),n.gridOptions.enableRowSelection&&o){const c=n.grid.getSelectedRows();n.grid.setSelectedRows(c)}const u=(t=n.gridOptions.frozenColumn)!==null&&t!==void 0?t:-1;u>=0&&n.extensionUtility.readjustFrozenColumnIndexWhenNeeded(u,n.columns,l);const h={columnId:s,showing:o,allColumns:n.columns,visibleColumns:l,columns:l,grid:n.grid};n.pubSubService.publish(`on${vl(r)}ColumnsChanged`,h),typeof((e=n.addonOptions)===null||e===void 0?void 0:e.onColumnsChanged)=="function"&&n.addonOptions.onColumnsChanged(a,h),n.onColumnsChanged.notify(h,null,n)}}function pm(a){var t,e;const n=this,r=n instanceof um?"gridmenu-":"";for(const o of n.columns){const s=o.id,l=document.createElement("li");o.excludeFromColumnPicker&&(l.className="hidden");const u=Re("input",{type:"checkbox",id:`${n._gridUid}-${r}colpicker-${s}`,dataset:{columnid:`${s}`}});n.grid.getColumnIndex(s)>=0&&(u.ariaChecked="true",u.checked=!0),l.appendChild(u),n._columnCheckboxes.push(u);const p=(typeof(a==null?void 0:a.headerColumnValueExtractor)=="function"?a.headerColumnValueExtractor:n._defaults.headerColumnValueExtractor)(o,n.gridOptions),m=document.createElement("label");m.htmlFor=`${n._gridUid}-${r}colpicker-${s}`,m.innerHTML=Ln(n.gridOptions,p),l.appendChild(m),n._listElm.appendChild(l)}if((!a.hideForceFitButton||!a.hideSyncResizeButton)&&n._listElm.appendChild(document.createElement("hr")),!(a!=null&&a.hideForceFitButton)){const o=document.createElement("li");o.appendChild(Re("input",{type:"checkbox",id:`${n._gridUid}-${r}colpicker-forcefit`,ariaChecked:String(n.gridOptions.forceFitColumns),checked:n.gridOptions.forceFitColumns,dataset:{option:"autoresize"}})),o.appendChild(Re("label",{htmlFor:`${n._gridUid}-${r}colpicker-forcefit`,textContent:(t=a==null?void 0:a.forceFitTitle)!==null&&t!==void 0?t:""})),n._listElm.appendChild(o)}if(!(a!=null&&a.hideSyncResizeButton)){const o=document.createElement("li");o.appendChild(Re("input",{type:"checkbox",id:`${n._gridUid}-${r}colpicker-syncresize`,ariaChecked:String(n.gridOptions.syncColumnCellResize),checked:n.gridOptions.syncColumnCellResize,dataset:{option:"syncresize"}})),o.appendChild(Re("label",{htmlFor:`${n._gridUid}-${r}colpicker-syncresize`,textContent:(e=a==null?void 0:a.syncResizeTitle)!==null&&e!==void 0?e:""})),n._listElm.appendChild(o)}}function au(){const a=this,t=a.grid.getColumns().slice(0),e=new Array(a.columns.length);for(let n=0;n<e.length;n++)a.grid.getColumnIndex(a.columns[n].id)===void 0?e[n]=a.columns[n]:e[n]=t.shift();a._columns=e}class yh{constructor(t,e,n){var r,o,s,l;this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this._areVisibleColumnDifferent=!1,this._columns=[],this._gridUid="",this._menuElm=null,this._columnCheckboxes=[],this.onColumnsChanged=new Slick.Event,this._defaults={hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",minHeight:200,syncResizeTitle:"Synchronous resize",headerColumnValueExtractor:u=>u.name},this._bindEventService=new Nn,this._eventHandler=new Slick.EventHandler,this._columns=(r=this.sharedService.allColumns)!==null&&r!==void 0?r:[],this._gridUid=(l=(s=(o=this.grid)===null||o===void 0?void 0:o.getUID)===null||s===void 0?void 0:s.call(o))!==null&&l!==void 0?l:"",this.init()}get addonOptions(){return this.gridOptions.columnPicker||{}}get eventHandler(){return this._eventHandler}get columns(){return this._columns}set columns(t){this._columns=t}get gridOptions(){var t;return(t=this.sharedService.gridOptions)!==null&&t!==void 0?t:{}}get grid(){return this.sharedService.slickGrid}get menuElement(){return this._menuElm}init(){var t;this._gridUid=(t=this.grid.getUID())!==null&&t!==void 0?t:"",this.gridOptions.columnPicker={...this._defaults,...this.gridOptions.columnPicker},this.addonOptions.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this.addonOptions.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this.addonOptions.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker"),this._eventHandler.subscribe(this.grid.onHeaderContextMenu,this.handleHeaderContextMenu.bind(this)),this._eventHandler.subscribe(this.grid.onColumnsReordered,au.bind(this)),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this),void 0,"body"),this._bindEventService.bind(document.body,"beforeunload",this.dispose.bind(this),void 0,"body")}dispose(){this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),this.disposeMenu()}disposeMenu(){var t,e;this._bindEventService.unbindAll("parent-menu"),(t=this._listElm)===null||t===void 0||t.remove(),(e=this._menuElm)===null||e===void 0||e.remove(),this._menuElm=null}createPickerMenu(){const t=Re("div",{ariaExpanded:"true",className:`slick-column-picker ${this._gridUid}`,role:"menu"});return au.call(this),hm.call(this,t),cm.call(this,t),this._listElm=Re("div",{className:"slick-column-picker-list",role:"menu"}),this._bindEventService.bind(t,"click",fm.bind(this),void 0,"parent-menu"),document.body.appendChild(t),t}getAllColumns(){return this._columns}getVisibleColumns(){return this.grid.getColumns()}translateColumnPicker(){this.addonOptions&&(this.addonOptions.columnTitle="",this.addonOptions.forceFitTitle="",this.addonOptions.syncResizeTitle="",this.addonOptions.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","columnPicker"),this.addonOptions.forceFitTitle=this.extensionUtility.getPickerTitleOutputString("forceFitTitle","columnPicker"),this.addonOptions.syncResizeTitle=this.extensionUtility.getPickerTitleOutputString("syncResizeTitle","columnPicker")),this.extensionUtility.translateItems(this._columns,"nameKey","name"),this.translateTitleLabels(this.addonOptions)}handleBodyMouseDown(t){var e;(this._menuElm!==t.target&&!(!((e=this._menuElm)===null||e===void 0)&&e.contains(t.target))||t.target.className==="close"&&t.target.closest(".slick-column-picker"))&&this.disposeMenu()}handleHeaderContextMenu(t){t.preventDefault(),on(this._listElm),this._columnCheckboxes=[],this._menuElm=this.createPickerMenu(),pm.call(this,this.addonOptions),document.body.appendChild(this._menuElm),this.repositionMenu(t)}repositionMenu(t){var e,n;const r=(n=(e=t==null?void 0:t.touches)===null||e===void 0?void 0:e[0])!==null&&n!==void 0?n:t;this._menuElm&&(this._menuElm.style.top=`${r.pageY-10}px`,this._menuElm.style.left=`${r.pageX-10}px`,this._menuElm.style.minHeight=Ws(this.addonOptions.minHeight,""),this._menuElm.style.maxHeight=Ws(this.addonOptions.maxHeight,`${window.innerHeight-r.clientY}px`),this._menuElm.style.display="block",this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.appendChild(this._listElm))}translateTitleLabels(t){t&&(t.columnTitle=this.extensionUtility.getPickerTitleOutputString("columnTitle","gridMenu"))}}const du=(a,t,e,n,r,o)=>{const s=n.params||{};if(!s.formatters||!Array.isArray(s.formatters))throw new Error(`The multiple formatter requires the "formatters" to be provided as a column params.
8
+ For example: this.columnDefinitions = [{ id: title, field: title, formatter: Formatters.multiple, params: { formatters: [Formatters.lowercase, Formatters.uppercase] }`);const l=s.formatters;let u=e;for(const h of l)u=h.call(void 0,a,t,u,n,r,o);return u},Eh=Us||hs;function mm(a,t){if(Array.isArray(a)){for(const e of a)if(e.editor)if(e.formatter&&e.formatter!==du&&e.formatter!==t){const n=e.formatter;e.formatter=du,e.params={...e.params,formatters:[n,t]}}else e.formatter&&e.formatter===du&&e.params?e.params.formatters.findIndex(n=>n===t)===-1&&(e.params.formatters=[...e.params.formatters,t]):e.formatter=t}}function dn(a,t,e,n){let r,o,s="",l="";switch(e){case"currency":r=je.DEFAULT_FORMATTER_CURRENCY_MIN_DECIMAL,o=je.DEFAULT_FORMATTER_CURRENCY_MAX_DECIMAL;break;case"decimal":r=je.DEFAULT_FORMATTER_NUMBER_MIN_DECIMAL,o=je.DEFAULT_FORMATTER_NUMBER_MAX_DECIMAL;break;case"percent":r=je.DEFAULT_FORMATTER_PERCENT_MIN_DECIMAL,o=je.DEFAULT_FORMATTER_PERCENT_MAX_DECIMAL;break}const u=t&&typeof t.getOptions=="function"?t.getOptions():{},h=qo("minDecimal",a,u,r),c=qo("maxDecimal",a,u,o),p=qo("decimalSeparator",a,u,je.DEFAULT_NUMBER_DECIMAL_SEPARATOR),m=qo("thousandSeparator",a,u,je.DEFAULT_NUMBER_THOUSAND_SEPARATOR),v=qo("displayNegativeNumberWithParentheses",a,u,je.DEFAULT_NEGATIVE_NUMBER_WRAPPED_IN_BRAQUET),_=qo("currencyPrefix",a,u,""),C=qo("currencySuffix",a,u,"");return n==="cell"&&(s=qo("numberPrefix",a,u,""),l=qo("numberSuffix",a,u,"")),{minDecimal:h,maxDecimal:c,decimalSeparator:p,thousandSeparator:m,wrapNegativeNumber:v,currencyPrefix:_,currencySuffix:C,numberPrefix:s,numberSuffix:l}}function qo(a,t,e,n){var r;const o=t&&t.params;return o&&o.hasOwnProperty(a)?o[a]:!((r=e==null?void 0:e.formatterOptions)===null||r===void 0)&&r.hasOwnProperty(a)?e.formatterOptions[a]:n}function un(a,t){const e=Fr(a);return(n,r,o,s,l,u)=>{var h,c,p,m,v;const _=u&&typeof u.getOptions=="function"?u.getOptions():{},C=(c=(h=_==null?void 0:_.formatterOptions)===null||h===void 0?void 0:h.dateSeparator)!==null&&c!==void 0?c:t,x=(p=s==null?void 0:s.type)!==null&&p!==void 0?p:ie.date,S=Fr(x),E=(v=(m=s==null?void 0:s.params)===null||m===void 0?void 0:m.parseDateAsUtc)!==null&&v!==void 0?v:!1,D=Eh(o,S,!1).isValid();let A=o;if(o&&D&&(A=E?Eh.utc(o).format(e):Eh(o).format(e)),A&&C!==t){const P=new RegExp(t,"ig");A=A.replace(P,C)}return A}}function Sh(a,t,e,n,r,o){let s=!1;e!=null&&e.hasOwnProperty("exportWithFormatter")?s=!!e.exportWithFormatter:o!=null&&o.hasOwnProperty("exportWithFormatter")&&(s=!!o.exportWithFormatter);let l;n&&e.exportCustomFormatter?l=e.exportCustomFormatter:s&&e.formatter&&(l=e.formatter);const u=uu(l,a,t,e,n,r);return o!=null&&o.sanitizeDataExport&&typeof u=="string"?or(u):u}function uu(a,t,e,n,r,o){let s="",u=n.field||n.id||"";if(typeof n.field=="string"&&n.field.indexOf(".")>0){const c=n.field.split(".");u=c.length>0?c[0]:n.field}const h=r!=null&&r.hasOwnProperty(u)?r[u]:null;if(typeof a=="function"){const c=a(t,e,h,n,r,o);s=c,c&&typeof c=="object"&&c.hasOwnProperty("text")&&(s=c.text),s==null&&(s="")}else s=r!=null&&r.hasOwnProperty(u)?h:"",s==null&&(s="");return typeof s=="object"&&!(s instanceof Date)&&Object.entries(s).length===0&&(s=""),s}class $_ extends lm{constructor(t,e,n,r){super(t,e,n),this.extensionUtility=t,this.pubSubService=e,this.sharedService=n,this.treeDataService=r,this._defaults={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!1,optionShownOverColumnIds:[],commandShownOverColumnIds:[],subMenuOpenByEvent:"mouseover"},this.pluginName="ContextMenu",this._camelPluginName="contextMenu",this._menuCssPrefix="slick-menu",this._menuPluginCssPrefix="slick-context-menu",this.init(n.gridOptions.contextMenu)}init(t){this._addonOptions={...this._defaults,...t};const e=this._addonOptions&&Array.isArray(this._addonOptions.commandItems)?this._addonOptions.commandItems:[];this._addonOptions.commandItems=[...e,...this.addMenuCustomCommands(e)],this._addonOptions={...this._addonOptions},this.sharedService.gridOptions.contextMenu=this._addonOptions,this.sortMenuItems(),this._eventHandler.subscribe(this.grid.onContextMenu,this.handleOnContextMenu.bind(this)),this._addonOptions.hideMenuOnScroll&&this._eventHandler.subscribe(this.grid.onScroll,this.closeMenu.bind(this))}translateContextMenu(){var t,e;const n=(e=(t=this.sharedService)===null||t===void 0?void 0:t.gridOptions)!==null&&e!==void 0?e:{},r=this.sharedService.gridOptions.contextMenu;if(r&&(n!=null&&n.enableTranslate)){const o=r.commandItems||[],s=r.optionItems||[];r.commandTitleKey&&(r.commandTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.commandTitleKey,"TEXT_COMMANDS")||r.commandTitle),r.optionTitleKey&&(r.optionTitle=this.extensionUtility.translateWhenEnabledAndServiceExist(r.optionTitleKey,"TEXT_COMMANDS")||r.optionTitle),this.extensionUtility.translateMenuItemsFromTitleKey(o,"commandItems"),this.extensionUtility.translateMenuItemsFromTitleKey(s,"optionItems")}}handleOnContextMenu(t,e){this.disposeAllMenus();const n=this.grid.getCellFromEvent(t);if(n){const r=this.grid.getDataItem(n.row),o=this.grid.getColumns()[n.cell];if(e=e||{},e.cell=n.cell,e.row=n.row,e.column=o,e.dataContext=r,e.grid=this.grid,!this.extensionUtility.runOverrideFunctionWhenExists(this._addonOptions.menuUsabilityOverride,e))return;this._menuElm=this.createParentMenu(t),this._menuElm&&t.preventDefault(),this._menuElm&&(this.repositionMenu(t,this._menuElm),this._menuElm.setAttribute("aria-expanded","true"),this._menuElm.style.display="block"),this._bindEventService.bind(document.body,"mousedown",this.handleBodyMouseDown.bind(this))}}addMenuCustomCommands(t){var e;const n=[],r=this.sharedService&&this.sharedService.gridOptions||{},o=r==null?void 0:r.contextMenu,s=(e=this.sharedService)===null||e===void 0?void 0:e.dataView,l=ho(r);if(o&&!o.hideCopyCellValueCommand){const u="copy";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconCopyCellValueCommand||"fa fa-clone",titleKey:`${l}COPY`,disabled:!1,command:u,positionOrder:50,action:(h,c)=>{this.copyToClipboard(c)},itemUsabilityOverride:h=>{const c=h==null?void 0:h.column,p=h==null?void 0:h.dataContext;if(typeof c.queryFieldNameGetterFn=="function"){const m=Va(c,p,"");if(m!==""&&m!==void 0)return!0}else if(c&&p.hasOwnProperty(c.field))return p[c.field]!==""&&p[c.field]!==null&&p[c.field]!==void 0;return!1}})}if(r!=null&&r.enableTextExport&&o&&!o.hideExportCsvCommand){const u="export-csv";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExportCsvCommand||"fa fa-download",titleKey:`${l}EXPORT_TO_CSV`,disabled:!1,command:u,positionOrder:51,action:()=>{var h;const p=(((h=this.sharedService)===null||h===void 0?void 0:h.externalRegisteredResources)||[]).find(m=>m.className==="TextExportService");if(p!=null&&p.exportToFile)p.exportToFile({delimiter:fs.comma,format:an.csv});else throw new Error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Context Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };")}})}if(r&&r.enableExcelExport&&o&&!o.hideExportExcelCommand){const u="export-excel";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExportExcelCommand||"fa fa-file-excel-o text-success",titleKey:`${l}EXPORT_TO_EXCEL`,disabled:!1,command:u,positionOrder:52,action:()=>{var h;const p=(((h=this.sharedService)===null||h===void 0?void 0:h.externalRegisteredResources)||[]).find(m=>m.className==="ExcelExportService");if(p!=null&&p.exportToExcel)p.exportToExcel();else throw new Error("[Slickgrid-Universal] You must register the ExcelExportService to properly use Export to Excel in the Context Menu. Example:: this.gridOptions = { enableExcelExport: true, registerExternalResources: [new ExcelExportService()] };")}})}if(r!=null&&r.enableTextExport&&o&&!o.hideExportTextDelimitedCommand){const u="export-text-delimited";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExportTextDelimitedCommand||"fa fa-download",titleKey:`${l}EXPORT_TO_TAB_DELIMITED`,disabled:!1,command:u,positionOrder:53,action:()=>{var h;const p=(((h=this.sharedService)===null||h===void 0?void 0:h.externalRegisteredResources)||[]).find(m=>m.className==="TextExportService");if(p!=null&&p.exportToFile)p.exportToFile({delimiter:fs.tab,format:an.txt});else throw new Error("[Slickgrid-Universal] You must register the TextExportService to properly use Export to File in the Context Menu. Example:: this.gridOptions = { enableTextExport: true, registerExternalResources: [new TextExportService()] };")}})}if(r&&(r.enableGrouping||r.enableDraggableGrouping||r.enableTreeData)){if(o&&!o.hideCopyCellValueCommand&&n.push({divider:!0,command:"",positionOrder:54}),r&&!r.enableTreeData&&o&&!o.hideClearAllGrouping){const u="clear-grouping";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconClearGroupingCommand||"fa fa-times",titleKey:`${l}CLEAR_ALL_GROUPING`,disabled:!1,command:u,positionOrder:55,action:()=>{s.setGrouping([]),this.pubSubService.publish("onContextMenuClearGrouping")},itemUsabilityOverride:()=>{const h=s&&s.getGrouping&&s.getGrouping();return Array.isArray(h)&&h.length>0}})}if(r&&o&&!o.hideCollapseAllGroups){const u="collapse-all-groups";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconCollapseAllGroupsCommand||"fa fa-compress",titleKey:`${l}COLLAPSE_ALL_GROUPS`,disabled:!1,command:u,positionOrder:56,action:()=>{r.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!0):s.collapseAllGroups(),this.pubSubService.publish("onContextMenuCollapseAllGroups")},itemUsabilityOverride:()=>{if(r.enableTreeData)return!0;const h=s&&s.getGrouping&&s.getGrouping();return Array.isArray(h)&&h.length>0}})}if(r&&o&&!o.hideExpandAllGroups){const u="expand-all-groups";t.some(h=>h!=="divider"&&h.hasOwnProperty("command")&&h.command===u)||n.push({iconCssClass:o.iconExpandAllGroupsCommand||"fa fa-expand",titleKey:`${l}EXPAND_ALL_GROUPS`,disabled:!1,command:u,positionOrder:57,action:()=>{r.enableTreeData?this.treeDataService.toggleTreeDataCollapse(!1):s.expandAllGroups(),this.pubSubService.publish("onContextMenuExpandAllGroups")},itemUsabilityOverride:()=>{if(r.enableTreeData)return!0;const h=s&&s.getGrouping&&s.getGrouping();return Array.isArray(h)&&h.length>0}})}}return this.extensionUtility.translateMenuItemsFromTitleKey(n),n}copyToClipboard(t){var e,n,r,o,s;try{if(t&&t.grid&&t.command){const l=(n=(e=this.sharedService)===null||e===void 0?void 0:e.gridOptions)!==null&&n!==void 0?n:{},u=(r=t==null?void 0:t.cell)!==null&&r!==void 0?r:0,h=(o=t==null?void 0:t.row)!==null&&o!==void 0?o:0,c=t==null?void 0:t.column,p=t==null?void 0:t.dataContext,m=(s=this.sharedService)===null||s===void 0?void 0:s.slickGrid,v=l&&(l.excelExportOptions||l.textExportOptions);let _=Sh(h,u,c,p,m,v);typeof c.queryFieldNameGetterFn=="function"&&(_=Va(c,p,""));let C=_;typeof _=="string"&&(C=_.replace(/^([·|⮞|⮟]\s*)|([·|⮞|⮟])\s*/gi,"").replace(/[\u00b7|\u034f]/gi,"").trim());const x=document.createElement("textarea");x&&document.body&&(x.style.position="absolute",x.style.opacity="0",x.value=C,document.body.appendChild(x),x.select(),document.execCommand("copy",!1,C)&&x.remove())}}catch{}}sortMenuItems(){var t,e;const n=(e=(t=this.sharedService)===null||t===void 0?void 0:t.gridOptions)===null||e===void 0?void 0:e.contextMenu;n&&(this.extensionUtility.sortItems(n.commandItems||[],"positionOrder"),this.extensionUtility.sortItems(n.optionItems||[],"positionOrder"))}}/**!
9
9
  * Sortable 1.15.0
10
10
  * @author RubaXa <trash@rubaxa.org>
11
11
  * @author owenm <owen23355@gmail.com>
@@ -15,13 +15,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
15
15
  [Slickgrid-Universal] Resizer Service requires a valid Grid object and DOM Element Container to be provided.
16
16
  You can fix this by setting your gridOption to use "enableAutoResize" or create an instance of the ResizerService by calling bindAutoResizeDataGrid() once.`);this._grid=t,this._gridContainerElm=e;const p=!((n=this.gridOptions)===null||n===void 0)&&n.gridHeight||!((r=this.gridOptions)===null||r===void 0)&&r.gridWidth?{height:(o=this.gridOptions)===null||o===void 0?void 0:o.gridHeight,width:(s=this.gridOptions)===null||s===void 0?void 0:s.gridWidth}:void 0;this._autoResizeOptions=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.autoResize)!==null&&u!==void 0?u:{container:"grid1",bottomPadding:0},p!=null&&p.width&&(e!=null&&e.style)&&(e.style.width=typeof p.width=="string"?p.width:`${p.width}px`),this._gridDomElm=(h=t==null?void 0:t.getContainerNode)===null||h===void 0?void 0:h.call(t),typeof this._autoResizeOptions.container=="string"?this._pageContainerElm=typeof this._autoResizeOptions.container=="string"?document.querySelector(this._autoResizeOptions.container):this._autoResizeOptions.container:this._pageContainerElm=this._autoResizeOptions.container,p&&(this._fixedHeight=p.height,this._fixedWidth=p.width),this.gridOptions&&this.gridOptions.enableAutoResize&&this.bindAutoResizeDataGrid(),this.gridOptions.autoResize&&this._subscriptions.push(this.pubSubService.subscribe("onFullResizeByContentRequested",()=>this.resizeColumnsByCellContent(!0))),!((c=this.gridOptions)===null||c===void 0)&&c.enableColumnResizeOnDoubleClick&&(this._subscriptions.push(this.pubSubService.subscribe("onHeaderMenuColumnResizeByContent",m=>{this.handleSingleColumnResizeByContent(m.columnId)})),this._eventHandler.subscribe(this._grid.onColumnsResizeDblClick,(m,v)=>{this.handleSingleColumnResizeByContent(v.triggeredByColumn)}))}bindAutoResizeDataGrid(t){var e;if(((e=this.gridOptions.autoResize)===null||e===void 0?void 0:e.resizeDetection)==="container"){if(!this._pageContainerElm||!this._pageContainerElm)throw new Error(`
17
17
  [Slickgrid-Universal] Resizer Service requires a container when gridOption.autoResize.resizeDetection="container"
18
- You can fix this by setting your gridOption.autoResize.container`);this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this.resizeObserverCallback())),this._resizeObserver.observe(this._pageContainerElm)}else{if(this._gridDomElm===void 0||Gn(this._gridDomElm)===void 0)return null;this.resizeGrid().then(()=>this.resizeGridWhenStylingIsBrokenUntilCorrected()).catch(n=>console.log("Error:",n)),this.resizeGrid(10,t),this._bindingEventService.bind(window,"resize",this.handleResizeGrid.bind(this,t))}}handleResizeGrid(t){this.pubSubService.publish("onGridBeforeResize"),this._resizePaused||(this.resizeGrid(0,t),this.resizeGrid(0,t))}resizeObserverCallback(){this._resizePaused||this.resizeGrid()}calculateGridNewDimensions(t){var e,n,r,o,s,l,u;const h=(e=t==null?void 0:t.autoResize)!==null&&e!==void 0?e:{},c=Gn(this._gridDomElm);if(!window||c===void 0)return null;let p=(h==null?void 0:h.bottomPadding)!==void 0?h.bottomPadding:$0;if(p&&t.enablePagination&&(p+=j0),p&&t.showCustomFooter){const M=(o=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.customFooterOptions)===null||r===void 0?void 0:r.footerHeight)!==null&&o!==void 0?o:Y0;p+=parseInt(`${M}`,10)}let m=0,v=0;h.calculateAvailableSizeBy==="container"?m=om(this._pageContainerElm,"height")||0:(m=window.innerHeight||0,v=(s=c==null?void 0:c.top)!==null&&s!==void 0?s:0);const _=m-v-p,C=om(this._pageContainerElm,"width")||window.innerWidth||0,x=h==null?void 0:h.maxHeight,S=(l=h==null?void 0:h.minHeight)!==null&&l!==void 0?l:X0,E=h==null?void 0:h.maxWidth,D=(u=h==null?void 0:h.minWidth)!==null&&u!==void 0?u:q0;let A=_,P=h!=null&&h.rightPadding?C-h.rightPadding:C;return A<S&&(A=S),x&&A>x&&(A=x),P<D&&(P=D),E&&P>E&&(P=E),{height:this._fixedHeight||A,width:this._fixedWidth||P}}getLastResizeDimensions(){return this._lastDimensions}pauseResizer(t){this._resizePaused=t}resizeGrid(t,e){return new Promise(n=>{t=t||0,t>0?(clearTimeout(this._timer),this._timer=setTimeout(()=>n(this.resizeGridCallback(e)),t)):n(this.resizeGridCallback(e))})}resizeGridCallback(t){var e,n;const r=this.resizeGridWithDimensions(t);return this.pubSubService.publish("onGridAfterResize",r),this.gridOptions.enableAutoResizeColumnsByCellContent&&(!(!((e=this._lastDimensions)===null||e===void 0)&&e.width)||(r==null?void 0:r.width)!==((n=this._lastDimensions)===null||n===void 0?void 0:n.width))&&this.resizeColumnsByCellContent(!1),this._lastDimensions=r,r}resizeGridWithDimensions(t){var e,n,r,o;const s=this.calculateGridNewDimensions(this.gridOptions);if((t||s)&&this._gridDomElm){const l=t!=null&&t.height?t.height:s==null?void 0:s.height,u=t!=null&&t.width?t.width:s==null?void 0:s.width;this.gridOptions.autoHeight||(this._gridDomElm.style.height=`${l}px`),this._gridDomElm.style.width=`${u}px`,this._gridContainerElm&&(this._gridContainerElm.style.width=`${u}px`),!((e=this._grid)===null||e===void 0)&&e.resizeCanvas&&this._gridContainerElm&&this._grid.resizeCanvas(),!((n=this.gridOptions)===null||n===void 0)&&n.enableAutoSizeColumns&&this._grid.autosizeColumns?this.gridUid&&document.querySelector(this.gridUidSelector)&&this._grid.autosizeColumns():this.gridOptions.enableAutoResizeColumnsByCellContent&&(!(!((r=this._lastDimensions)===null||r===void 0)&&r.width)||u!==((o=this._lastDimensions)===null||o===void 0?void 0:o.width))&&this.resizeColumnsByCellContent(!1),this._lastDimensions={height:l||0,width:u||0}}return this._lastDimensions}requestStopOfAutoFixResizeGrid(t=!0){this._isStopResizeIntervalRequested=t}resizeColumnsByCellContent(t=!1){var e,n,r,o,s,l,u;const h=this._grid.getColumns(),c=this.dataView.getItems(),p={};let m=!1,v=0;const _=(n=(e=this._gridContainerElm)===null||e===void 0?void 0:e.offsetWidth)!==null&&n!==void 0?n:0;if(!Array.isArray(c)||c.length===0||!t&&this._totalColumnsWidthByContent>0&&this._totalColumnsWidthByContent<_){this._grid.autosizeColumns();return}if(this._hasResizedByContentAtLeastOnce&&(!((r=this.gridOptions)===null||r===void 0)&&r.resizeByContentOnlyOnFirstLoad)&&!t)return;if(this.pubSubService.publish("onBeforeResizeByContent",void 0,0),this._totalColumnsWidthByContent===0||t){for(const S of h)p[S.id]=(s=(o=S.originalWidth)!==null&&o!==void 0?o:S.minWidth)!==null&&s!==void 0?s:0;v=this.calculateCellWidthByReadingDataset(h,p,this.resizeByContentOptions.maxItemToInspectCellContentWidth);let x=0;for(const S of h){const E=(u=(l=S.resizeAlwaysRecalculateWidth)!==null&&l!==void 0?l:this.resizeByContentOptions.alwaysRecalculateColumnWidth)!==null&&u!==void 0?u:!1;S.originalWidth&&!E?S.width=S.originalWidth:p[S.id]!==void 0&&(S.rerenderOnResize&&(m=!0),this.applyNewCalculatedColumnWidthByReference(S,p[S.id])),x+=S.width||0,this._totalColumnsWidthByContent=x}}this._grid.setColumns(h),this._hasResizedByContentAtLeastOnce=!0;const C={};for(const x of h)C[x.id]=x.width;this._totalColumnsWidthByContent>_?this._grid.reRenderColumns(m):this._grid.autosizeColumns(),this.pubSubService.publish("onAfterResizeByContent",{readItemCount:v,calculateColumnWidths:C})}calculateCellWidthByReadingDataset(t,e,n=1e3,r){const o=Array.isArray(t)?t:[t],s=this.dataView.getItems();let l=0;for(const[u,h]of s.entries()){if(u>n)break;Array.isArray(o)&&typeof e=="object"&&o.forEach((c,p)=>{const m=this.calculateCellWidthByContent(h,c,u,r??p,e[c.id]);m!==void 0&&(e[c.id]=m)}),l=u+1}return l}calculateCellWidthByContent(t,e,n,r,o){var s,l;const u=(s=this.resizeByContentOptions.cellCharWidthInPx)!==null&&s!==void 0?s:7;if(!e.originalWidth){const h=(l=e==null?void 0:e.resizeCharWidthInPx)!==null&&l!==void 0?l:u,c=uu(e==null?void 0:e.formatter,n,r,e,t,this._grid),p=or(c),m=Math.ceil(p.length*h),v=e.resizeMaxWidthThreshold;e&&(o===void 0||m>o)&&(o=v!==void 0&&m>v?v:e.maxWidth!==void 0&&m>e.maxWidth?e.maxWidth:m)}return o}applyNewCalculatedColumnWidthByReference(t,e){var n,r,o,s,l,u,h;const c=(n=this.resizeByContentOptions.cellPaddingWidthInPx)!==null&&n!==void 0?n:6,p=(r=this.resizeByContentOptions.formatterPaddingWidthInPx)!==null&&r!==void 0?r:6,m=(l=(s=(o=t==null?void 0:t.filter)===null||o===void 0?void 0:o.type)!==null&&s!==void 0?s:t==null?void 0:t.type)!==null&&l!==void 0?l:ie.string;let v=e;const _=(h=(u=t==null?void 0:t.resizeCalcWidthRatio)!==null&&u!==void 0?u:this.resizeByContentOptions.defaultRatioForStringType)!==null&&h!==void 0?h:.9;v*=m==="string"?_:1,v+=c,t.resizeExtraWidthPadding&&(v+=t.resizeExtraWidthPadding),t.editor&&this.gridOptions.editable&&(v+=p),t.maxWidth!==void 0&&v>t.maxWidth&&(v=t.maxWidth),t.resizeMaxWidthThreshold!==void 0&&v>t.resizeMaxWidthThreshold&&(v=t.resizeMaxWidthThreshold),v=Math.ceil(v),(t.originalWidth===void 0||t.resizeAlwaysRecalculateWidth===!0||this.resizeByContentOptions.alwaysRecalculateColumnWidth===!0)&&(t.width=this.readjustNewColumnWidthWhenOverLimit(t,v))}handleSingleColumnResizeByContent(t){var e,n,r;const o=this._grid.getColumns(),s=o.findIndex(l=>l.id===t);if(s>=0){const l=o[s],u={[t]:(n=(e=l.originalWidth)!==null&&e!==void 0?e:l.minWidth)!==null&&n!==void 0?n:0};l.originalWidth=void 0,this.calculateCellWidthByReadingDataset(l,u,this.resizeByContentOptions.maxItemToInspectSingleColumnWidthByContent,s),this.applyNewCalculatedColumnWidthByReference(l,u[t]),this._grid.reRenderColumns((r=l==null?void 0:l.rerenderOnResize)!==null&&r!==void 0?r:!1)}}readjustNewColumnWidthWhenOverLimit(t,e){var n,r,o,s,l,u,h,c;const p=(n=this.gridOptions.frozenColumn)!==null&&n!==void 0?n:-1,m=(r=this._grid.getColumns().findIndex(_=>_.id===t.id))!==null&&r!==void 0?r:0;let v=e;if(p>=0&&m<=p){const _=Array.from(this._grid.getViewports());if(_){const C=(s=(o=_.find(A=>A.classList.contains("slick-viewport-left")))===null||o===void 0?void 0:o.clientWidth)!==null&&s!==void 0?s:0,x=(u=(l=_.find(A=>A.classList.contains("slick-viewport-right")))===null||l===void 0?void 0:l.clientWidth)!==null&&u!==void 0?u:0,S=C+x,E=C-((h=t.width)!==null&&h!==void 0?h:0);if(E+e>S){const A=(c=this.resizeByContentOptions.widthToRemoveFromExceededWidthReadjustment)!==null&&c!==void 0?c:50;v=C-E+x-A}}}return Math.ceil(v)}checkIsGridShown(){var t,e;return!!((e=(t=document.querySelector(`${this.gridUidSelector}`))===null||t===void 0?void 0:t.offsetParent)!==null&&e!==void 0&&e)}resizeGridWhenStylingIsBrokenUntilCorrected(){var t,e,n,r;const o=(e=(t=this.gridOptions)===null||t===void 0?void 0:t.autoFixResizeTimeout)!==null&&e!==void 0?e:18e3,s=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.autoFixResizeRequiredGoodCount)!==null&&r!==void 0?r:5,l=this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-header`),u=this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-viewport`);let h=0,c=0;if(l&&u&&this.gridOptions.autoFixResizeWhenBrokenStyleDetected){const p=this.dataView.getItemCount(),m=this._grid.getColumns()||[];this._intervalId=setInterval(async()=>{var v,_,C,x,S,E;const A=Gn(l);let P=(v=A==null?void 0:A.top)!==null&&v!==void 0?v:0;this.gridOptions&&this.gridOptions.enableFiltering&&this.gridOptions.headerRowHeight&&(P+=this.gridOptions.headerRowHeight),this.gridOptions&&this.gridOptions.createPreHeaderPanel&&this.gridOptions.showPreHeaderPanel&&this.gridOptions.preHeaderPanelHeight&&(P+=this.gridOptions.preHeaderPanelHeight),P+=44;const M=Gn(u),B=(_=M==null?void 0:M.top)!==null&&_!==void 0?_:0,Z=Gn(this._gridContainerElm);let L=(A==null?void 0:A.top)===0||P-B>2||(Z==null?void 0:Z.left)===0&&(Z==null?void 0:Z.top)===0;const ae=(E=(S=(x=(C=this._grid).getRenderedRange)===null||x===void 0?void 0:x.call(C))===null||S===void 0?void 0:S.rightPx)!==null&&E!==void 0?E:0;!L&&p>0&&ae===0&&m.length>1&&(L=!0),this._isStopResizeIntervalRequested&&(L=!1,h=o),this.checkIsGridShown()&&(L||(Z==null?void 0:Z.left)===0||(Z==null?void 0:Z.top)===0)&&(await this.resizeGrid(),this.checkIsGridShown()&&(L=!1)),this.checkIsGridShown()&&c++,this.checkIsGridShown()&&!L&&(c>=s||h++>=o)&&clearInterval(this._intervalId)},this.intervalRetryDelay)}}}class Q0{constructor(){this._hasColumnsReordered=!1,this._hideHeaderRowAfterPageLoad=!1}get allColumns(){return this._allColumns}set allColumns(t){this._allColumns=t}get columnDefinitions(){return this._grid&&this._grid.getColumns?this._grid.getColumns():[]}get currentPagination(){return this._currentPagination}set currentPagination(t){this._currentPagination=t}get dataView(){return this._dataView}set dataView(t){this._dataView=t}get frozenVisibleColumnId(){return this._frozenVisibleColumnId}set frozenVisibleColumnId(t){this._frozenVisibleColumnId=t}get hasColumnsReordered(){return this._hasColumnsReordered}set hasColumnsReordered(t){this._hasColumnsReordered=t}get slickGrid(){return this._grid}set slickGrid(t){this._grid=t}get gridContainerElement(){return this._gridContainerElm}set gridContainerElement(t){this._gridContainerElm=t}get gridOptions(){var t;return this._gridOptions||((t=this._grid)===null||t===void 0?void 0:t.getOptions())||{}}set gridOptions(t){this._gridOptions=t}get groupItemMetadataProvider(){return this._groupItemMetadataProvider}set groupItemMetadataProvider(t){this._groupItemMetadataProvider=t}get hideHeaderRowAfterPageLoad(){return this._hideHeaderRowAfterPageLoad}set hideHeaderRowAfterPageLoad(t){this._hideHeaderRowAfterPageLoad=t}get externalRegisteredResources(){return this._externalRegisteredResources}set externalRegisteredResources(t){this._externalRegisteredResources=t}get visibleColumns(){return this._visibleColumns}set visibleColumns(t){this._visibleColumns=t}get hierarchicalDataset(){return this._hierarchicalDataset}set hierarchicalDataset(t){this._hierarchicalDataset=t}}class J0{constructor(t,e,n,r){this.sharedService=t,this.pubSubService=e,this.backendUtilities=n,this.rxjs=r,this._currentLocalSorters=[],this._isBackendGrid=!1,this._eventHandler=new Slick.EventHandler,this.rxjs&&(this.httpCancelRequests$=this.rxjs.createSubject())}get eventHandler(){return this._eventHandler}get _gridOptions(){return this._grid&&this._grid.getOptions?this._grid.getOptions():{}}get _columnDefinitions(){return this._grid&&this._grid.getColumns?this._grid.getColumns():[]}dispose(){var t,e;!((t=this._eventHandler)===null||t===void 0)&&t.unsubscribeAll&&this._eventHandler.unsubscribeAll(),this.httpCancelRequests$&&(!((e=this.rxjs)===null||e===void 0)&&e.isObservable(this.httpCancelRequests$))&&(this.httpCancelRequests$.next(),this.httpCancelRequests$.complete())}addRxJsResource(t){this.rxjs=t}bindBackendOnSort(t){var e,n;this._isBackendGrid=!0,this._grid=t,this._dataView=(n=(e=t==null?void 0:t.getData)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{},this._eventHandler.subscribe(t.onSort,this.onBackendSortChanged.bind(this))}bindLocalOnSort(t){this._isBackendGrid=!1,this._grid=t,this._dataView=t.getData(),this.processTreeDataInitialSort(),this._eventHandler.subscribe(t.onSort,this.handleLocalOnSort.bind(this))}handleLocalOnSort(t,e){var n,r;const o=e.multiColumnSort?e.sortCols:new Array({columnId:(r=(n=e.sortCol)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:"",sortAsc:e.sortAsc,sortCol:e.sortCol});this._currentLocalSorters=[],Array.isArray(o)&&o.forEach(s=>{s.sortCol&&this._currentLocalSorters.push({columnId:s.sortCol.id,direction:s.sortAsc?Do.ASC:Do.DESC})}),this.onLocalSortChanged(this._grid,o),this.emitSortChanged(Ji.local)}clearSortByColumnId(t,e){var n,r;const o=this.getCurrentColumnSorts(),s=this.getCurrentColumnSorts(`${e}`);if(Array.isArray(o)&&Array.isArray(s)&&o.length!==s.length){if(this._gridOptions.backendServiceApi)this.onBackendSortChanged(t,{multiColumnSort:!0,sortCols:s,grid:this._grid});else if(this._dataView)this.onLocalSortChanged(this._grid,s,!0,!0);else{const h=((r=(n=this._gridOptions)===null||n===void 0?void 0:n.multiColumnSort)!==null&&r!==void 0?r:!1)?s:s[0];this._grid.onSort.notify(h)}const l=s.map(u=>({columnId:u&&u.sortCol&&u.sortCol.id,sortAsc:u&&u.sortAsc,sortCol:u&&u.sortCol}));this._grid.setSortColumns(l)}Array.isArray(s)&&s.length===0&&this.sortLocalGridByDefaultSortFieldId()}clearSorting(t=!0){var e,n;if(this._grid&&this._gridOptions&&this._dataView){if(this._grid.setSortColumns([]),t)this._isBackendGrid?this.onBackendSortChanged(void 0,{grid:this._grid,multiColumnSort:!0,sortCols:[],clearSortTriggered:!0}):this._columnDefinitions&&Array.isArray(this._columnDefinitions)&&this._columnDefinitions.length>0&&this.sortLocalGridByDefaultSortFieldId();else if(this._isBackendGrid){const r=(n=(e=this._gridOptions)===null||e===void 0?void 0:e.backendServiceApi)===null||n===void 0?void 0:n.service;r!=null&&r.clearSorters&&r.clearSorters()}}this._currentLocalSorters=[],this.pubSubService.publish("onSortCleared",!0)}disableSortFunctionality(t=!0,e=!0){const r=!this._gridOptions.enableSorting;this._gridOptions.enableSorting=r;let o;t?(e&&this.clearSorting(),this._eventHandler.unsubscribeAll(),o=this.disableAllSortingCommands(!0)):(o=this.disableAllSortingCommands(!1),this._eventHandler.subscribe(this._grid.onSort,(s,l)=>this.handleLocalOnSort(s,l))),this._grid.setOptions({enableSorting:this._gridOptions.enableSorting},!1,!0),this.sharedService.gridOptions=this._gridOptions,this._grid.setColumns(o)}toggleSortFunctionality(t=!0){const e=this._gridOptions.enableSorting;this.disableSortFunctionality(e,t)}emitSortChanged(t,e){var n;if(t===Ji.remote&&(!((n=this._gridOptions)===null||n===void 0)&&n.backendServiceApi)){let r=[];const o=this._gridOptions.backendServiceApi.service;o!=null&&o.getCurrentSorters&&(r=o.getCurrentSorters()),this.pubSubService.publish("onSortChanged",r)}else t===Ji.local&&(e&&(this._currentLocalSorters=e),this.pubSubService.publish("onSortChanged",this.getCurrentLocalSorters()))}getCurrentLocalSorters(){return this._currentLocalSorters}getCurrentColumnSorts(t){if(this._grid){const e=this._grid.getSortColumns();if(Array.isArray(e))return e.reduce((r,o)=>(o&&(!t||o.columnId!==t)&&r.push({columnId:o.columnId||"",sortCol:this._columnDefinitions[this._grid.getColumnIndex(o.columnId||"")],sortAsc:o.sortAsc}),r),[])}return[]}loadGridSorters(t){this._currentLocalSorters=[];const e=[];return Array.isArray(t)&&((this._gridOptions.multiColumnSort?t:t.slice(0,1)).forEach(r=>{const o=this._columnDefinitions.find(s=>s.id===r.columnId);o&&(e.push({columnId:o.id,sortAsc:r.direction.toUpperCase()===Do.ASC,sortCol:o}),this._currentLocalSorters.push({columnId:o.id+"",direction:r.direction.toUpperCase()}))}),this.onLocalSortChanged(this._grid,e),this._grid.setSortColumns(e.map(r=>({columnId:r.columnId,sortAsc:r.sortAsc})))),e}processTreeDataInitialSort(){var t,e,n;if(!((t=this._gridOptions)===null||t===void 0)&&t.enableTreeData&&this._gridOptions.treeDataOptions){const r=this._gridOptions.treeDataOptions,o=this._columnDefinitions.find(s=>s.id===r.columnId);if(o){let s=Do.ASC,l={columnId:r.columnId,sortCol:o,sortAsc:!0};if(!((e=r==null?void 0:r.initialSort)===null||e===void 0)&&e.columnId){const u=r.initialSort.columnId,h=this._columnDefinitions.find(c=>c.id===u);s=(r.initialSort.direction||Do.ASC).toUpperCase(),l={columnId:u,sortCol:h,sortAsc:s===Do.ASC}}l!=null&&l.columnId&&(!((n=this.sharedService)===null||n===void 0)&&n.hierarchicalDataset)&&this.updateSorting([{columnId:l.columnId||"",direction:s}])}}}onBackendSortChanged(t,e){var n,r;if(!e||!e.grid)throw new Error('Something went wrong when trying to bind the "onBackendSortChanged(event, args)" function, it seems that "args" is not populated correctly');const o=e.grid&&e.grid.getOptions?e.grid.getOptions():{},s=o.backendServiceApi;if(!s||!s.process||!s.service)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');const l=new Date;s.preProcess&&s.preProcess();const u=s.service.processOnSortChanged(t,e),h=((n=o==null?void 0:o.pagination)===null||n===void 0?void 0:n.totalItems)||0;(r=this.backendUtilities)===null||r===void 0||r.executeBackendCallback(s,u,e,l,h,{emitActionChangedCallback:this.emitSortChanged.bind(this),errorCallback:()=>{var c,p,m;this._grid.setSortColumns(e.previousSortColumns||[]);const v=(c=e.previousSortColumns)===null||c===void 0?void 0:c.map(_=>({columnId:_.columnId,sortAsc:_.sortAsc,sortCol:this._columnDefinitions.find(C=>C.id===_.columnId)}));(m=(p=s==null?void 0:s.service)===null||p===void 0?void 0:p.updateSorters)===null||m===void 0||m.call(p,v||[])},httpCancelRequestSubject:this.httpCancelRequests$})}async onLocalSortChanged(t,e,n=!1,r=!1){var o,s,l,u,h;const c=(s=(o=this._gridOptions)===null||o===void 0?void 0:o.datasetIdPropertyName)!==null&&s!==void 0?s:"id",p=(u=(l=this._gridOptions)===null||l===void 0?void 0:l.enableTreeData)!==null&&u!==void 0?u:!1,m=(h=t.getData)===null||h===void 0?void 0:h.call(t);if(await this.pubSubService.publish("onBeforeSortChange",{sortColumns:e},0),t&&m){if(n&&!p&&m.reSort(),p&&this.sharedService&&Array.isArray(this.sharedService.hierarchicalDataset)){const v=this.sortHierarchicalDataset(this.sharedService.hierarchicalDataset,e);this._dataView.setItems(v.flat,c),this._dataView.onRowCountChanged.notify({previous:this._dataView.getFilteredItemCount(),current:this._dataView.getLength(),itemCount:this._dataView.getItemCount(),dataView:this._dataView,callingOnRowsChanged:!0})}else m.sort(this.sortComparers.bind(this,e));t.invalidate(),r&&this.emitSortChanged(Ji.local,e.map(v=>{var _,C;return{columnId:(C=(_=v.sortCol)===null||_===void 0?void 0:_.id)!==null&&C!==void 0?C:"id",direction:v.sortAsc?Do.ASC:Do.DESC}}))}}sortHierarchicalDataset(t,e,n=!1){var r,o,s,l,u,h;this.sortTreeData(t,e);const c=(o=(r=this._gridOptions)===null||r===void 0?void 0:r.datasetIdPropertyName)!==null&&o!==void 0?o:"id",p=(l=(s=this._gridOptions)===null||s===void 0?void 0:s.treeDataOptions)!==null&&l!==void 0?l:{columnId:""},m={...p,identifierPropName:(u=p.identifierPropName)!==null&&u!==void 0?u:c,shouldAddTreeLevelNumber:!0},v=Dp(t,m);if(n){this._currentLocalSorters=[];for(const C of e)this._currentLocalSorters.push({columnId:C.columnId,direction:C.sortAsc?"ASC":"DESC"});const _=!((h=this._gridOptions)===null||h===void 0)&&h.backendServiceApi?Ji.remote:Ji.local;this.emitSortChanged(_)}return{hierarchical:t,flat:v}}sortLocalGridByDefaultSortFieldId(){const t=this._gridOptions&&this._gridOptions.defaultColumnSortFieldId||this._gridOptions.datasetIdPropertyName||"id",e={id:t,field:t};this.onLocalSortChanged(this._grid,new Array({columnId:e.id,sortAsc:!0,sortCol:e,clearSortTriggered:!0}),!1,!0)}sortComparers(t,e,n){if(Array.isArray(t))for(const r of t){const o=this.sortComparer(r,e,n);if(o!==void 0)return o}return ji.neutral}sortComparer(t,e,n,r){if(t!=null&&t.sortCol){const o=t.sortCol,s=t.sortAsc?ji.asc:ji.desc;let l=r||o.queryFieldSorter||o.queryField||o.field,u=l;const h=o.type||ie.string;typeof o.queryFieldNameGetterFn=="function"&&(l=o.queryFieldNameGetterFn(e),u=o.queryFieldNameGetterFn(n));let c=e[l],p=n[u];if(l&&l.indexOf(".")>=0&&(c=_n(e,l)),u&&u.indexOf(".")>=0&&(p=_n(n,u)),o.sortComparer){const m=o.sortComparer(c,p,s,o,this._gridOptions);if(m!==ji.neutral)return m}else{const m=Gl(h,c,p,s,o,this._gridOptions);if(m!==ji.neutral)return m}}}sortTreeData(t,e){if(Array.isArray(e))for(const n of e)this.sortTreeChildren(t,n,0)}sortTreeChildren(t,e,n){var r,o;const s=(r=this._gridOptions)===null||r===void 0?void 0:r.treeDataOptions,l=(o=s==null?void 0:s.childrenPropName)!==null&&o!==void 0?o:"children";t.sort((u,h)=>{var c;return(c=this.sortComparer(e,u,h))!==null&&c!==void 0?c:ji.neutral});for(const u of t)u&&u.hasOwnProperty(l)&&Array.isArray(u[l])&&(n++,this.sortTreeChildren(u[l],e,n),n--)}updateSorting(t,e=!0,n=!0){var r,o;if(!this._gridOptions||!this._gridOptions.enableSorting)throw new Error('[Slickgrid-Universal] in order to use "updateSorting" method, you need to have Sortable Columns defined in your grid and "enableSorting" set in your Grid Options');if(Array.isArray(t)){const s=(r=this._gridOptions)===null||r===void 0?void 0:r.backendServiceApi;if(s){const l=s==null?void 0:s.service;l!=null&&l.updateSorters&&(l.updateSorters(void 0,t),n&&((o=this.backendUtilities)===null||o===void 0||o.refreshBackendDataset(this._gridOptions)))}else this.loadGridSorters(t);if(e){const l=s?Ji.remote:Ji.local;this.emitSortChanged(l)}}}disableAllSortingCommands(t=!0){var e,n;const r=this._grid.getColumns();r.forEach(s=>{var l,u;typeof s.sortable!==void 0&&(s.sortable=!t),!((l=s==null?void 0:s.header)===null||l===void 0)&&l.menu&&((u=s.header.menu.commandItems||s.header.menu.items)===null||u===void 0||u.forEach(h=>{if(h&&typeof h!="string"){const c=h.command;(c==="sort-asc"||c==="sort-desc"||c==="clear-sort")&&(h.hidden=t)}}))});const o=(n=(e=this._gridOptions)===null||e===void 0?void 0:e.gridMenu)===null||n===void 0?void 0:n.commandItems;return o&&o.forEach(s=>{s&&typeof s!="string"&&s.command==="clear-sorting"&&(s.hidden=t)}),r}}class eb{constructor(t,e,n){this.pubSubService=t,this.sharedService=e,this.sortService=n,this._currentToggledItems=[],this._isLastFullToggleCollapsed=!1,this._isOneCpuCyclePassed=!1,this._isTreeDataEnabled=!1,this._subscriptions=[],this._treeDataRecalcHandler=null,this._eventHandler=new Slick.EventHandler,setTimeout(()=>this._isOneCpuCyclePassed=!0)}set currentToggledItems(t){this._currentToggledItems=t}get dataset(){var t;return(t=this.dataView)===null||t===void 0?void 0:t.getItems()}get datasetHierarchical(){return this.sharedService.hierarchicalDataset}get dataView(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getData)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get eventHandler(){return this._eventHandler}get gridOptions(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get treeDataOptions(){return this.gridOptions.treeDataOptions}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}init(t){var e,n,r,o,s,l,u,h,c,p,m;if(this._grid=t,this._isTreeDataEnabled=(n=(e=this.gridOptions)===null||e===void 0?void 0:e.enableTreeData)!==null&&n!==void 0?n:!1,this._isLastFullToggleCollapsed=(o=(r=this.treeDataOptions)===null||r===void 0?void 0:r.initiallyCollapsed)!==null&&o!==void 0?o:!1,this._currentToggledItems=(u=(l=(s=this.gridOptions.presets)===null||s===void 0?void 0:s.treeData)===null||l===void 0?void 0:l.toggledItems)!==null&&u!==void 0?u:[],this._lastToggleStateChange={type:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this._isTreeDataEnabled){if(!((h=this.gridOptions)===null||h===void 0)&&h.multiColumnSort)throw new Error('[Slickgrid-Universal] It looks like you are trying to use Tree Data with multi-column sorting, unfortunately it is not supported because of its complexity, you can disable it via "multiColumnSort: false" grid option and/or help in providing support for this feature.');if(!(!((c=this.gridOptions)===null||c===void 0)&&c.enableFiltering))throw new Error('[Slickgrid-Universal] It looks like you are trying to use Tree Data without using the filtering option, unfortunately that is not possible with Tree Data since it relies heavily on the filters to expand/collapse the tree. You need to enable it via "enableFiltering: true"');if(!((p=this.gridOptions)===null||p===void 0)&&p.backendServiceApi||!((m=this.gridOptions)===null||m===void 0)&&m.enablePagination)throw new Error("[Slickgrid-Universal] It looks like you are trying to use Tree Data with Pagination and/or a Backend Service (OData, GraphQL) but unfortunately that is simply not supported because of its complexity.");if(!this.gridOptions.treeDataOptions||!this.gridOptions.treeDataOptions.columnId)throw new Error('[Slickgrid-Universal] When enabling tree data, you must also provide the "treeDataOption" property in your Grid Options with "childrenPropName" or "parentPropName" (depending if your array is hierarchical or flat) for the Tree Data to work properly.')}this._eventHandler.subscribe(t.onClick,this.handleOnCellClick.bind(this)),this._subscriptions.push(this.pubSubService.subscribe("onGridMenuClearAllSorting",this.clearSorting.bind(this))),this._treeDataRecalcHandler=this.setAutoRecalcTotalsCallbackWhenFeatEnabled(this.gridOptions),this._eventHandler.subscribe(this.dataView.onRowCountChanged,()=>{var v,_;typeof this._treeDataRecalcHandler=="function"&&this._isOneCpuCyclePassed&&(clearTimeout(this._timer),this._timer=setTimeout(()=>{var C;return(C=this._treeDataRecalcHandler)===null||C===void 0?void 0:C.call(this)},(_=(v=this.treeDataOptions)===null||v===void 0?void 0:v.autoRecalcTotalsDebounce)!==null&&_!==void 0?_:0))})}applyToggledItemStateChanges(t,e,n=!0,r=!1){if(Array.isArray(t)){const o=this.getTreeDataOptionPropName("collapsedPropName"),s=this.getTreeDataOptionPropName("hasChildrenPropName");this.dataView.beginUpdate(!0);const u=(e??this._lastToggleStateChange.previousFullToggleType)==="full-collapse";e&&(this._lastToggleStateChange.previousFullToggleType=e),n&&(this.dataView.getItems()||[]).forEach(h=>{h[s]&&(h[o]=u)}),this.dynamicallyToggleItemState(t,r)}}dynamicallyToggleItemState(t,e=!0){if(Array.isArray(t)){this.dataView.beginUpdate(!0);for(const n of t){const r=this.dataView.getItemById(n.itemId);if(this.updateToggledItem(r,n.isCollapsed),e){const o=this._currentToggledItems.findIndex(s=>s.itemId===n.itemId);o>=0?this._currentToggledItems[o].isCollapsed=n.isCollapsed:this._currentToggledItems.push({itemId:n.itemId,isCollapsed:n.isCollapsed}),this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:n.itemId,toggledItems:this._currentToggledItems,type:n.isCollapsed?ps.toggleCollapse:ps.toggleExpand})}}this.dataView.endUpdate(),this.dataView.refresh()}}getCurrentToggleState(){return this._lastToggleStateChange}getInitialSort(t,e){var n,r,o;const s=e==null?void 0:e.treeDataOptions,l=(n=s==null?void 0:s.initialSort)!==null&&n!==void 0?n:{columnId:(r=s==null?void 0:s.columnId)!==null&&r!==void 0?r:"",direction:"ASC"},u=t.find(h=>h.id===l.columnId);return{columnId:l.columnId,sortAsc:((o=l==null?void 0:l.direction)===null||o===void 0?void 0:o.toUpperCase())!=="DESC",sortCol:u}}getItemCount(t){if(t!==void 0){const e=this.getTreeDataOptionPropName("levelPropName");return this.dataView.getItems().filter(n=>n[e]===t).length}return this.dataView.getItemCount()}getToggledItems(){return this._currentToggledItems}getTreeDataOptionPropName(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C;let x="";switch(t){case"childrenPropName":x=(n=(e=this.treeDataOptions)===null||e===void 0?void 0:e.childrenPropName)!==null&&n!==void 0?n:je.treeDataProperties.CHILDREN_PROP;break;case"collapsedPropName":x=(o=(r=this.treeDataOptions)===null||r===void 0?void 0:r.collapsedPropName)!==null&&o!==void 0?o:je.treeDataProperties.COLLAPSED_PROP;break;case"hasChildrenPropName":x=(l=(s=this.treeDataOptions)===null||s===void 0?void 0:s.hasChildrenPropName)!==null&&l!==void 0?l:je.treeDataProperties.HAS_CHILDREN_PROP;break;case"identifierPropName":x=(p=(h=(u=this.treeDataOptions)===null||u===void 0?void 0:u.identifierPropName)!==null&&h!==void 0?h:(c=this.gridOptions)===null||c===void 0?void 0:c.datasetIdPropertyName)!==null&&p!==void 0?p:"id";break;case"levelPropName":x=(v=(m=this.treeDataOptions)===null||m===void 0?void 0:m.levelPropName)!==null&&v!==void 0?v:je.treeDataProperties.TREE_LEVEL_PROP;break;case"parentPropName":x=(C=(_=this.treeDataOptions)===null||_===void 0?void 0:_.parentPropName)!==null&&C!==void 0?C:je.treeDataProperties.PARENT_PROP;break}return x}clearSorting(){const t=this.getInitialSort(this.sharedService.columnDefinitions,this.sharedService.gridOptions);this.sortService.loadGridSorters([{columnId:t.columnId,direction:t.sortAsc?"ASC":"DESC"}])}convertFlatParentChildToTreeDatasetAndSort(t,e,n){var r;const o=this.convertFlatParentChildToTreeDataset(t,n),s=this.getInitialSort(e,n),l=this.sortService.sortHierarchicalDataset(o,[s],!0);return(r=this._grid)===null||r===void 0||r.setSortColumns([s]),l}convertFlatParentChildToTreeDataset(t,e){var n,r,o;const s=(n=e==null?void 0:e.datasetIdPropertyName)!==null&&n!==void 0?n:"id",l=(r=e==null?void 0:e.treeDataOptions)!==null&&r!==void 0?r:{columnId:"id"},u={...l,identifierPropName:(o=l.identifierPropName)!==null&&o!==void 0?o:s,initiallyCollapsed:this._isLastFullToggleCollapsed};return Rp(t,u)}enableAutoRecalcTotalsFeature(t=!0){t&&this._isTreeDataEnabled?this._treeDataRecalcHandler=this.recalculateTreeTotals.bind(this,this.gridOptions):this._treeDataRecalcHandler=null}recalculateTreeTotals(t){var e,n;const r=t.treeDataOptions,o=(e=r==null?void 0:r.childrenPropName)!==null&&e!==void 0?e:je.treeDataProperties.CHILDREN_PROP,s=(n=r==null?void 0:r.levelPropName)!==null&&n!==void 0?n:je.treeDataProperties.TREE_LEVEL_PROP;r!=null&&r.aggregators&&(r.aggregators.forEach(l=>{Ha(this.sharedService.hierarchicalDataset||[],{childrenPropName:o,levelPropName:s,aggregator:l})}),this._grid.invalidate())}sortHierarchicalDataset(t,e){const n=e??this.getInitialSort(this.sharedService.allColumns,this.gridOptions),r=Array.isArray(n)?n:[n];return this.sortService.sortHierarchicalDataset(t,r)}async toggleTreeDataCollapse(t,e=!0){var n;if(!((n=this.gridOptions)===null||n===void 0)&&n.enableTreeData){const o=this.getTreeDataOptionPropName("hasChildrenPropName");e&&await this.pubSubService.publish("onTreeFullToggleStart",{collapsing:t}),this.dataView.beginUpdate(!0),(this.dataView.getItems()||[]).forEach(s=>{s[o]&&this.updateToggledItem(s,t)}),this.dataView.endUpdate(),this.dataView.refresh(),this._isLastFullToggleCollapsed=t}const r=t?ps.fullCollapse:ps.fullExpand;this._lastToggleStateChange={type:r,previousFullToggleType:r,toggledItems:null},e&&this.pubSubService.publish("onTreeFullToggleEnd",this._lastToggleStateChange)}handleOnCellClick(t,e){var n;if(t&&e){const r=t.target||{},o=(n=this.gridOptions.datasetIdPropertyName)!==null&&n!==void 0?n:"id",s=this.getTreeDataOptionPropName("collapsedPropName"),l=this.getTreeDataOptionPropName("childrenPropName");if(typeof(r==null?void 0:r.className)=="string"&&(r.className.indexOf("toggle")>=0||!1)){const h=this.dataView.getItem(e.row);if(h){h[s]=!h[s];const c=h[s],p=h[o],m=this._currentToggledItems.findIndex(C=>C.itemId===p);m>=0?this._currentToggledItems[m].isCollapsed=c:this._currentToggledItems.push({itemId:p,isCollapsed:c}),this.dataView.updateItem(p,h);const v=C=>C[o]===p,_=Ba(this.sharedService.hierarchicalDataset||[],v,l);_&&(_[s]=c),this._grid.invalidate(),this._lastToggleStateChange={type:c?ps.toggleCollapse:ps.toggleExpand,previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:p})}t.stopImmediatePropagation()}}}updateToggledItem(t,e){var n,r;const o=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.datasetIdPropertyName)!==null&&r!==void 0?r:"id",s=this.getTreeDataOptionPropName("childrenPropName"),l=this.getTreeDataOptionPropName("collapsedPropName");if(t){t[l]=e,this.dataView.updateItem(t[o],t);const u=c=>c[o]===t[o],h=Ba(this.sharedService.hierarchicalDataset||[],u,s);h&&(h[l]=e)}}setAutoRecalcTotalsCallbackWhenFeatEnabled(t){var e,n;return t!=null&&t.enableTreeData&&(!((e=t==null?void 0:t.treeDataOptions)===null||e===void 0)&&e.autoRecalcTotalsOnFilterChange)&&(!((n=t==null?void 0:t.treeDataOptions)===null||n===void 0)&&n.aggregators)?this.recalculateTreeTotals.bind(this,t):null}}function Yh(a,t){const e=Re("select",{className:"form-control"});for(const n of a){const r=document.createElement("option");r.value=n.operator,r.innerHTML=Ln(t,`${M_(n.operatorAlt||n.operator,3)}${n.descAlt||n.desc}`),e.appendChild(r)}return e}function Jn(a,t,e,n="Slider"){var r,o,s;let l;return((r=a.filterOptions)===null||r===void 0?void 0:r[t])!==void 0?l=a.filterOptions[t]:((o=a==null?void 0:a.params)===null||o===void 0?void 0:o[t])!==void 0&&(console.warn(`[Slickgrid-Universal] All filter.params from ${n} Filter are moving to "filterOptions" for better typing support and "params" will be deprecated in future release.`),l=(s=a==null?void 0:a.params)===null||s===void 0?void 0:s[t]),l??e}function tb(a,t,e){var n,r;const o=(n=t==null?void 0:t.filter)!==null&&n!==void 0?n:{},s=(r=o==null?void 0:o.collectionOptions)!==null&&r!==void 0?r:{};if(s&&s.collectionInsideObjectProperty){const l=s.collectionInsideObjectProperty;a=_n(a,l)}if(!Array.isArray(a))throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Filter, the collection is not a valid array.');o.collection=a,e(a)}async function Km(a,t,e,n,r){var o,s,l;const u=(o=t==null?void 0:t.filter)!==null&&o!==void 0?o:{},h=(s=u==null?void 0:u.collectionOptions)!==null&&s!==void 0?s:{};let c=null;if(a){const p=(l=n==null?void 0:n.isObservable(a))!==null&&l!==void 0?l:!1;p&&n&&(c=await Ip(n,a));const m=await a;if(Array.isArray(m)?c=m:(m==null?void 0:m.status)>=200&&m.status<300&&typeof m.json=="function"?c=await m.json():m&&m.content&&(c=m.content),!Array.isArray(c)&&(h!=null&&h.collectionInsideObjectProperty)){const v=c||m,_=h.collectionInsideObjectProperty;c=_n(v,_||"")}if(!Array.isArray(c))throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Filter, the collection is not a valid array.');u.collection=c,e(c),p&&ib(t,e,n,r)}return c}function ib(a,t,e,n){var r;const o=(r=a==null?void 0:a.filter)!==null&&r!==void 0?r:{},s=e==null?void 0:e.createSubject();o.collectionAsync=s,n&&s&&n.push(s.subscribe(l=>tb(l,a,t)))}function go(a,t,e,n,r){var o;if(n!=null&&n.enableTranslate&&(r!=null&&r.translate)){const l=ho(n);return r.translate(`${l}${a}`)}const s=n.locales||je.locales;return(o=s==null?void 0:s[t])!==null&&o!==void 0?o:e}function nb(a,t){const e=[{operator:"",desc:go("CONTAINS","TEXT_CONTAINS","Contains",a,t)},{operator:"<>",desc:go("NOT_CONTAINS","TEXT_NOT_CONTAINS","Not Contains",a,t)},{operator:"=",desc:go("EQUALS","TEXT_EQUALS","Equals",a,t)},{operator:"!=",desc:go("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to",a,t)},{operator:"a*",desc:go("STARTS_WITH","TEXT_STARTS_WITH","Starts with",a,t)},{operator:"*z",desc:go("ENDS_WITH","TEXT_ENDS_WITH","Ends with",a,t)}];return Zm(a,e,"text"),e}function jh(a,t){const e=[{operator:"",desc:""},{operator:"=",desc:go("EQUAL_TO","TEXT_EQUAL_TO","Equal to",a,t)},{operator:"<",desc:go("LESS_THAN","TEXT_LESS_THAN","Less than",a,t)},{operator:"<=",desc:go("LESS_THAN_OR_EQUAL_TO","TEXT_LESS_THAN_OR_EQUAL_TO","Less than or equal to",a,t)},{operator:">",desc:go("GREATER_THAN","TEXT_GREATER_THAN","Greater than",a,t)},{operator:">=",desc:go("GREATER_THAN_OR_EQUAL_TO","TEXT_GREATER_THAN_OR_EQUAL_TO","Greater than or equal to",a,t)},{operator:"<>",desc:go("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to",a,t)}];return Zm(a,e,"numeric"),e}function Zm(a,t,e){if(a.compoundOperatorAltTexts){for(const n of t)if(a.compoundOperatorAltTexts.hasOwnProperty(e)){const r=a.compoundOperatorAltTexts[e][n.operator];n.operatorAlt=(r==null?void 0:r.operatorAlt)||"",n.descAlt=(r==null?void 0:r.descAlt)||""}}}const Qm=Jd&&dh||Jd;class rb{constructor(t,e,n){this.translaterService=t,this.collectionService=e,this.rxjs=n,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this.isFilled=!1,this.isItemSelected=!1,this.valueName="label",this.enableTranslateLabel=!1,this.subscriptions=[],this._bindEventService=new Nn}get autocompleterOptions(){return this._autocompleterOptions||{}}get collectionOptions(){var t,e,n;return(n=(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)===null||e===void 0?void 0:e.collectionOptions)!==null&&n!==void 0?n:{}}get collection(){return this._collection}get columnFilter(){var t;return((t=this.columnDef)===null||t===void 0?void 0:t.filter)||{}}get filterDomElement(){return this._filterElm}get filterOptions(){var t;return((t=this.columnFilter)===null||t===void 0?void 0:t.filterOptions)||{}}get customStructure(){var t,e,n,r,o,s;let l=(t=this.columnFilter)===null||t===void 0?void 0:t.customStructure;const u=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.type)!==null&&n!==void 0?n:(r=this.columnDef)===null||r===void 0?void 0:r.type;return!l&&u===ie.object&&(!((o=this.columnDef)===null||o===void 0)&&o.dataKey)&&(!((s=this.columnDef)===null||s===void 0)&&s.labelKey)&&(l={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),l}get defaultOperator(){return Nt.equal}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get instance(){return this._instance}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}init(t){var e,n,r,o,s,l,u,h,c,p,m,v;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this.filterContainerElm=t.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection&&!this.columnFilter.collectionAsync&&!this.columnFilter.filterOptions)throw new Error(`[Slickgrid-Universal] You need to pass a "collection" (or "collectionAsync") for the AutoComplete Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.autocompleter, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }`);this.enableTranslateLabel=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.enableTranslateLabel)!==null&&n!==void 0?n:!1,this.labelName=(o=(r=this.customStructure)===null||r===void 0?void 0:r.label)!==null&&o!==void 0?o:"label",this.valueName=(l=(s=this.customStructure)===null||s===void 0?void 0:s.value)!==null&&l!==void 0?l:"value",this.labelPrefixName=(h=(u=this.customStructure)===null||u===void 0?void 0:u.labelPrefix)!==null&&h!==void 0?h:"labelPrefix",this.labelSuffixName=(p=(c=this.customStructure)===null||c===void 0?void 0:c.labelSuffix)!==null&&p!==void 0?p:"labelSuffix",this._locales=(v=(m=this.gridOptions)===null||m===void 0?void 0:m.locales)!==null&&v!==void 0?v:je.locales;const _=this.columnFilter.collection;return this._collection=_,this.renderDomElement(_),new Promise(async(C,x)=>{try{const S=this.columnFilter.collectionAsync;let E;S&&!this.columnFilter.collection?(E=Km(S,this.columnDef,this.renderDomElement.bind(this),this.rxjs,this.subscriptions),C(E)):(E=_,C(_)),(S||this.columnFilter.enableCollectionWatch)&&(await(E??S),this.watchCollectionChanges())}catch(S){x(S)}})}clear(t=!0){this._filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[],this._filterElm.value="",this._filterElm.dispatchEvent(new CustomEvent("input")),this._filterElm.classList.remove("filled"))}destroy(){var t,e,n;typeof((t=this._instance)===null||t===void 0?void 0:t.destroy)=="function"&&this._instance.destroy(),this._filterElm,(n=(e=this._filterElm)===null||e===void 0?void 0:e.remove)===null||n===void 0||n.call(e),this._collection=void 0,this._bindEventService.unbindAll(),Xd(this.subscriptions)}getValues(){var t;return(t=this._filterElm)===null||t===void 0?void 0:t.value}setValues(t,e){var n;t&&this._filterElm&&(this._filterElm.value=t);const r=this.getValues()!==""?"add":"remove";(n=this._filterElm)===null||n===void 0||n.classList[r]("filled"),this.operator=e||this.defaultOperator}filterCollection(t){let e=t;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const n=this.columnFilter.collectionFilterBy,r=this.columnFilter.collectionOptions&&this.columnFilter.collectionOptions.filterResultAfterEachPass||null;e=this.collectionService.filterCollection(e,n,r)}return e}sortCollection(t){let e=t;if(this.columnFilter&&this.columnFilter.collectionSortBy){const n=this.columnFilter.collectionSortBy;e=this.collectionService.sortCollection(this.columnDef,e,n,this.enableTranslateLabel)}return e}watchCollectionChanges(){var t;!((t=this.columnFilter)===null||t===void 0)&&t.collection&&(Ma(this.columnFilter.collection,e=>{this.renderDomElement(this.columnFilter.collection||e||[])}),Jc(this.columnFilter,"collection",e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&Ma(this.columnFilter.collection,n=>{this.renderDomElement(this.columnFilter.collection||n||[])})}))}renderDomElement(t){var e;if(!Array.isArray(t)&&(!((e=this.collectionOptions)===null||e===void 0)&&e.collectionInsideObjectProperty)){const o=this.collectionOptions.collectionInsideObjectProperty;t=_n(t,o||"")}let n=t;n&&(n=this.filterCollection(n),n=this.sortCollection(n));const r=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this._collection=n,this._filterElm=this.createFilterElement(n,r),this._bindEventService.bind(this._filterElm,"input",this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._filterElm,"blur",()=>{this.isItemSelected||this.clear()})}createFilterElement(t,e){var n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E;this._collection=t;const D=(r=(n=this.columnDef)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:"";on(this.filterContainerElm);let A=(s=(o=this.gridOptions)===null||o===void 0?void 0:o.defaultFilterPlaceholder)!==null&&s!==void 0?s:"";!((l=this.columnFilter)===null||l===void 0)&&l.placeholder&&(A=this.columnFilter.placeholder),this._filterElm=Re("input",{type:"text",ariaLabel:(h=(u=this.columnFilter)===null||u===void 0?void 0:u.ariaLabel)!==null&&h!==void 0?h:`${qr(D+"")} Search Filter`,autocomplete:"off",ariaAutoComplete:"none",placeholder:A,className:`form-control search-filter filter-${D} slick-autocomplete-container`,value:e??"",dataset:{columnid:`${D}`}});const P=e;Array.isArray(t)&&(t.every(B=>qd(B))?t=t.map(B=>({label:B,value:B})):t=t.map(B=>{var Z,L;return{label:B==null?void 0:B[this.labelName],value:B==null?void 0:B[this.valueName],labelPrefix:(Z=B==null?void 0:B[this.labelPrefixName])!==null&&Z!==void 0?Z:"",labelSuffix:(L=B==null?void 0:B[this.labelSuffixName])!==null&&L!==void 0?L:""}})),this._autocompleterOptions={input:this._filterElm,debounceWaitMs:200,className:`slick-autocomplete ${(p=(c=this.filterOptions)===null||c===void 0?void 0:c.className)!==null&&p!==void 0?p:""}`.trim(),emptyMsg:this.gridOptions.enableTranslate&&(!((m=this.translaterService)===null||m===void 0)&&m.translate)?this.translaterService.translate("NO_ELEMENTS_FOUND"):(_=(v=this._locales)===null||v===void 0?void 0:v.TEXT_NO_ELEMENTS_FOUND)!==null&&_!==void 0?_:"No elements found",customize:(B,Z,L)=>{L.style.width=""},onSelect:B=>{this.isItemSelected=!0,this.handleSelect(B)},...this.filterOptions},!((C=this._autocompleterOptions.renderItem)===null||C===void 0)&&C.layout?(this._autocompleterOptions.className+=` autocomplete-custom-${Wa(this._autocompleterOptions.renderItem.layout)}`,this._autocompleterOptions.render=this.renderCustomItem.bind(this)):Array.isArray(t)?this._autocompleterOptions.render=(S=(x=this._autocompleterOptions.render)===null||x===void 0?void 0:x.bind(this))!==null&&S!==void 0?S:this.renderCollectionItem.bind(this):this._autocompleterOptions.render||(this._autocompleterOptions.render=this.renderRegularItem.bind(this)),!((E=this.filterOptions)===null||E===void 0)&&E.fetch?(Up(this._filterElm,this._autocompleterOptions),this._instance=Qm(this._autocompleterOptions)):this._instance=Qm({...this._autocompleterOptions,fetch:(B,Z)=>{t&&Z(t.filter(L=>((typeof L=="string"?L:L==null?void 0:L.label)||"").toLowerCase().includes(B.toLowerCase())))}}),this._filterElm.value=P??"";const M=Re("div",{className:"autocomplete-filter-container"});return M.appendChild(this._filterElm),M.appendChild(Re("span")),e&&this._filterElm.classList.add("filled"),this.filterContainerElm.appendChild(M),this.filterContainerElm.appendChild(document.createElement("span")),this._filterElm}handleSelect(t){var e,n,r,o;if(t!==void 0){const l=(r=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.filterOptions)===null||n===void 0?void 0:n.renderItem)!==null&&r!==void 0?r:!1,u=typeof t=="string"?t:l?t[this.labelName]:t.label;let h=typeof t=="string"?t:l?t[this.valueName]:t.value;h=this.trimWhitespaceWhenEnabled(h);const c=h===""?"remove":"add";(o=this._filterElm)===null||o===void 0||o.classList[c]("filled"),this.setValues(u),this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:[h],shouldTriggerQuery:this._shouldTriggerQuery}),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}return!1}handleOnInputChange(t){var e,n,r,o,s;let l=(n=(e=t==null?void 0:t.target)===null||e===void 0?void 0:e.value)!==null&&n!==void 0?n:"";const u=(r=this.filterOptions.triggerOnEveryKeyStroke)!==null&&r!==void 0?r:!1;if(l=this.trimWhitespaceWhenEnabled(l),this._clearFilterTriggered||l===""||u){const h={columnDef:this.columnDef,shouldTriggerQuery:this._shouldTriggerQuery};this._clearFilterTriggered?h.clearFilterTriggered=this._clearFilterTriggered:(h.operator=this.operator,h.searchTerms=[l]),l!==""?(this.isItemSelected=!0,(o=this._filterElm)===null||o===void 0||o.classList.add("filled")):(this.isItemSelected=!1,(s=this._filterElm)===null||s===void 0||s.classList.remove("filled")),this.callback(t,h)}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}renderRegularItem(t){var e;const n=typeof t=="string"?t:(e=t==null?void 0:t.label)!==null&&e!==void 0?e:"";return Re("div",{textContent:n||""})}renderCustomItem(t){var e,n,r;const o=(r=(n=(e=this._autocompleterOptions)===null||e===void 0?void 0:e.renderItem)===null||n===void 0?void 0:n.templateCallback(t))!==null&&r!==void 0?r:"",s=Ln(this.gridOptions,o)||"",l=document.createElement("div");return l.innerHTML=s,l}renderCollectionItem(t){var e,n;const r=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.enableRenderHtml)!==null&&n!==void 0?n:!1,o=t.labelPrefix||"",s=t.label||"",l=t.labelSuffix||"",u=o+s+l,h=Ln(this.gridOptions,u)||"",c=document.createElement("div");return c[r?"innerHTML":"textContent"]=h,c}trimWhitespaceWhenEnabled(t){let e=t;const n=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;return typeof t=="string"&&n&&(e=t.trim()),e}}var Xh=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ql={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(a){return typeof console<"u"&&console.warn(a)},getWeek:function(a){var t=new Date(a.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},dd={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(a){var t=a%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Lr=function(a,t){return t===void 0&&(t=2),("000"+a).slice(t*-1)},_o=function(a){return a===!0?1:0};function Jm(a,t){var e;return function(){var n=this,r=arguments;clearTimeout(e),e=setTimeout(function(){return a.apply(n,r)},t)}}var qh=function(a){return a instanceof Array?a:[a]};function Er(a,t,e){if(e===!0)return a.classList.add(t);a.classList.remove(t)}function Ii(a,t,e){var n=window.document.createElement(a);return t=t||"",e=e||"",n.className=t,e!==void 0&&(n.textContent=e),n}function Ru(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function ev(a,t){if(t(a))return a;if(a.parentNode)return ev(a.parentNode,t)}function Pu(a,t){var e=Ii("div","numInputWrapper"),n=Ii("input","numInput "+a),r=Ii("span","arrowUp"),o=Ii("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?n.type="number":(n.type="text",n.pattern="\\d*"),t!==void 0)for(var s in t)n.setAttribute(s,t[s]);return e.appendChild(n),e.appendChild(r),e.appendChild(o),e}function Jr(a){try{if(typeof a.composedPath=="function"){var t=a.composedPath();return t[0]}return a.target}catch{return a.target}}var Kh=function(){},Fu=function(a,t,e){return e.months[t?"shorthand":"longhand"][a]},ob={D:Kh,F:function(a,t,e){a.setMonth(e.months.longhand.indexOf(t))},G:function(a,t){a.setHours((a.getHours()>=12?12:0)+parseFloat(t))},H:function(a,t){a.setHours(parseFloat(t))},J:function(a,t){a.setDate(parseFloat(t))},K:function(a,t,e){a.setHours(a.getHours()%12+12*_o(new RegExp(e.amPM[1],"i").test(t)))},M:function(a,t,e){a.setMonth(e.months.shorthand.indexOf(t))},S:function(a,t){a.setSeconds(parseFloat(t))},U:function(a,t){return new Date(parseFloat(t)*1e3)},W:function(a,t,e){var n=parseInt(t),r=new Date(a.getFullYear(),0,2+(n-1)*7,0,0,0,0);return r.setDate(r.getDate()-r.getDay()+e.firstDayOfWeek),r},Y:function(a,t){a.setFullYear(parseFloat(t))},Z:function(a,t){return new Date(t)},d:function(a,t){a.setDate(parseFloat(t))},h:function(a,t){a.setHours((a.getHours()>=12?12:0)+parseFloat(t))},i:function(a,t){a.setMinutes(parseFloat(t))},j:function(a,t){a.setDate(parseFloat(t))},l:Kh,m:function(a,t){a.setMonth(parseFloat(t)-1)},n:function(a,t){a.setMonth(parseFloat(t)-1)},s:function(a,t){a.setSeconds(parseFloat(t))},u:function(a,t){return new Date(parseFloat(t))},w:Kh,y:function(a,t){a.setFullYear(2e3+parseFloat(t))}},El={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ud={Z:function(a){return a.toISOString()},D:function(a,t,e){return t.weekdays.shorthand[ud.w(a,t,e)]},F:function(a,t,e){return Fu(ud.n(a,t,e)-1,!1,t)},G:function(a,t,e){return Lr(ud.h(a,t,e))},H:function(a){return Lr(a.getHours())},J:function(a,t){return t.ordinal!==void 0?a.getDate()+t.ordinal(a.getDate()):a.getDate()},K:function(a,t){return t.amPM[_o(a.getHours()>11)]},M:function(a,t){return Fu(a.getMonth(),!0,t)},S:function(a){return Lr(a.getSeconds())},U:function(a){return a.getTime()/1e3},W:function(a,t,e){return e.getWeek(a)},Y:function(a){return Lr(a.getFullYear(),4)},d:function(a){return Lr(a.getDate())},h:function(a){return a.getHours()%12?a.getHours()%12:12},i:function(a){return Lr(a.getMinutes())},j:function(a){return a.getDate()},l:function(a,t){return t.weekdays.longhand[a.getDay()]},m:function(a){return Lr(a.getMonth()+1)},n:function(a){return a.getMonth()+1},s:function(a){return a.getSeconds()},u:function(a){return a.getTime()},w:function(a){return a.getDay()},y:function(a){return String(a.getFullYear()).substring(2)}},tv=function(a){var t=a.config,e=t===void 0?Ql:t,n=a.l10n,r=n===void 0?dd:n,o=a.isMobile,s=o===void 0?!1:o;return function(l,u,h){var c=h||r;return e.formatDate!==void 0&&!s?e.formatDate(l,u,c):u.split("").map(function(p,m,v){return ud[p]&&v[m-1]!=="\\"?ud[p](l,c,e):p!=="\\"?p:""}).join("")}},Zh=function(a){var t=a.config,e=t===void 0?Ql:t,n=a.l10n,r=n===void 0?dd:n;return function(o,s,l,u){if(!(o!==0&&!o)){var h=u||r,c,p=o;if(o instanceof Date)c=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)c=new Date(o);else if(typeof o=="string"){var m=s||(e||Ql).dateFormat,v=String(o).trim();if(v==="today")c=new Date,l=!0;else if(e&&e.parseDate)c=e.parseDate(o,m);else if(/Z$/.test(v)||/GMT$/.test(v))c=new Date(o);else{for(var _=void 0,C=[],x=0,S=0,E="";x<m.length;x++){var D=m[x],A=D==="\\",P=m[x-1]==="\\"||A;if(El[D]&&!P){E+=El[D];var M=new RegExp(E).exec(o);M&&(_=!0)&&C[D!=="Y"?"push":"unshift"]({fn:ob[D],val:M[++S]})}else A||(E+=".")}c=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),C.forEach(function(B){var Z=B.fn,L=B.val;return c=Z(c,L,h)||c}),c=_?c:void 0}}if(!(c instanceof Date&&!isNaN(c.getTime()))){e.errorHandler(new Error("Invalid date provided: "+p));return}return l===!0&&c.setHours(0,0,0,0),c}}};function eo(a,t,e){return e===void 0&&(e=!0),e!==!1?new Date(a.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):a.getTime()-t.getTime()}var sb=function(a,t,e){return a>Math.min(t,e)&&a<Math.max(t,e)},Qh=function(a,t,e){return a*3600+t*60+e},lb=function(a){var t=Math.floor(a/3600),e=(a-t*3600)/60;return[t,e,a-t*3600-e*60]},ab={DAY:864e5};function Jh(a){var t=a.defaultHour,e=a.defaultMinute,n=a.defaultSeconds;if(a.minDate!==void 0){var r=a.minDate.getHours(),o=a.minDate.getMinutes(),s=a.minDate.getSeconds();t<r&&(t=r),t===r&&e<o&&(e=o),t===r&&e===o&&n<s&&(n=a.minDate.getSeconds())}if(a.maxDate!==void 0){var l=a.maxDate.getHours(),u=a.maxDate.getMinutes();t=Math.min(t,l),t===l&&(e=Math.min(u,e)),t===l&&e===u&&(n=a.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:n}}typeof Object.assign!="function"&&(Object.assign=function(a){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!a)throw TypeError("Cannot convert undefined or null to object");for(var n=function(l){l&&Object.keys(l).forEach(function(u){return a[u]=l[u]})},r=0,o=t;r<o.length;r++){var s=o[r];n(s)}return a});var pr=globalThis&&globalThis.__assign||function(){return pr=Object.assign||function(a){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},pr.apply(this,arguments)},iv=globalThis&&globalThis.__spreadArrays||function(){for(var a=0,t=0,e=arguments.length;t<e;t++)a+=arguments[t].length;for(var n=Array(a),r=0,t=0;t<e;t++)for(var o=arguments[t],s=0,l=o.length;s<l;s++,r++)n[r]=o[s];return n},db=300;function ub(a,t){var e={config:pr(pr({},Ql),On.defaultConfig),l10n:dd};e.parseDate=Zh({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=C,e._setHoursFromDate=m,e._positionCalendar=re,e.changeMonth=ne,e.changeYear=Ce,e.clear=pe,e.close=Ve,e.onMouseOver=St,e._createElement=Ii,e.createDay=M,e.destroy=Ye,e.isEnabled=be,e.jumpToDate=E,e.updateValue=Kt,e.open=k,e.redraw=me,e.set=Le,e.setDate=It,e.toggle=at;function n(){e.utils={getDaysInMonth:function(z,Q){return z===void 0&&(z=e.currentMonth),Q===void 0&&(Q=e.currentYear),z===1&&(Q%4===0&&Q%100!==0||Q%400===0)?29:e.l10n.daysInMonth[z]}}}function r(){e.element=e.input=a,e.isOpen=!1,ge(),X(),W(),q(),n(),e.isMobile||P(),S(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&m(e.config.noCalendar?e.latestSelectedDateObj:void 0),Kt(!1)),l();var z=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&z&&re(),st("onReady")}function o(){var z;return((z=e.calendarContainer)===null||z===void 0?void 0:z.getRootNode()).activeElement||document.activeElement}function s(z){return z.bind(e)}function l(){var z=e.config;z.weekNumbers===!1&&z.showMonths===1||z.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var Q=(e.days.offsetWidth+1)*z.showMonths;e.daysContainer.style.width=Q+"px",e.calendarContainer.style.width=Q+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function u(z){if(e.selectedDates.length===0){var Q=e.config.minDate===void 0||eo(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),he=Jh(e.config);Q.setHours(he.hours,he.minutes,he.seconds,Q.getMilliseconds()),e.selectedDates=[Q],e.latestSelectedDateObj=Q}z!==void 0&&z.type!=="blur"&&Mi(z);var Ee=e._input.value;p(),Kt(),e._input.value!==Ee&&e._debouncedChange()}function h(z,Q){return z%12+12*_o(Q===e.l10n.amPM[1])}function c(z){switch(z%24){case 0:case 12:return 12;default:return z%12}}function p(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var z=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,Q=(parseInt(e.minuteElement.value,10)||0)%60,he=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(z=h(z,e.amPM.textContent));var Ee=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&eo(e.latestSelectedDateObj,e.config.minDate,!0)===0,lt=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&eo(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var vt=Qh(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),it=Qh(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),wt=Qh(z,Q,he);if(wt>it&&wt<vt){var Ht=lb(vt);z=Ht[0],Q=Ht[1],he=Ht[2]}}else{if(lt){var Et=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;z=Math.min(z,Et.getHours()),z===Et.getHours()&&(Q=Math.min(Q,Et.getMinutes())),Q===Et.getMinutes()&&(he=Math.min(he,Et.getSeconds()))}if(Ee){var gt=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;z=Math.max(z,gt.getHours()),z===gt.getHours()&&Q<gt.getMinutes()&&(Q=gt.getMinutes()),Q===gt.getMinutes()&&(he=Math.max(he,gt.getSeconds()))}}v(z,Q,he)}}function m(z){var Q=z||e.latestSelectedDateObj;Q&&Q instanceof Date&&v(Q.getHours(),Q.getMinutes(),Q.getSeconds())}function v(z,Q,he){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(z%24,Q,he||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=Lr(e.config.time_24hr?z:(12+z)%12+12*_o(z%12===0)),e.minuteElement.value=Lr(Q),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[_o(z>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Lr(he)))}function _(z){var Q=Jr(z),he=parseInt(Q.value)+(z.delta||0);(he/1e3>1||z.key==="Enter"&&!/[^\d]/.test(he.toString()))&&Ce(he)}function C(z,Q,he,Ee){if(Q instanceof Array)return Q.forEach(function(lt){return C(z,lt,he,Ee)});if(z instanceof Array)return z.forEach(function(lt){return C(lt,Q,he,Ee)});z.addEventListener(Q,he,Ee),e._handlers.push({remove:function(){return z.removeEventListener(Q,he,Ee)}})}function x(){st("onChange")}function S(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(he){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+he+"]"),function(Ee){return C(Ee,"click",e[he])})}),e.isMobile){ke();return}var z=Jm(ct,50);if(e._debouncedChange=Jm(x,db),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&C(e.daysContainer,"mouseover",function(he){e.config.mode==="range"&&St(Jr(he))}),C(e._input,"keydown",Ue),e.calendarContainer!==void 0&&C(e.calendarContainer,"keydown",Ue),!e.config.inline&&!e.config.static&&C(window,"resize",z),window.ontouchstart!==void 0?C(window.document,"touchstart",ce):C(window.document,"mousedown",ce),C(window.document,"focus",ce,{capture:!0}),e.config.clickOpens===!0&&(C(e._input,"focus",e.open),C(e._input,"click",e.open)),e.daysContainer!==void 0&&(C(e.monthNav,"click",Fi),C(e.monthNav,["keyup","increment"],_),C(e.daysContainer,"click",mt)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var Q=function(he){return Jr(he).select()};C(e.timeContainer,["increment"],u),C(e.timeContainer,"blur",u,{capture:!0}),C(e.timeContainer,"click",D),C([e.hourElement,e.minuteElement],["focus","click"],Q),e.secondElement!==void 0&&C(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&C(e.amPM,"click",function(he){u(he)})}e.config.allowInput&&C(e._input,"blur",ot)}function E(z,Q){var he=z!==void 0?e.parseDate(z):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),Ee=e.currentYear,lt=e.currentMonth;try{he!==void 0&&(e.currentYear=he.getFullYear(),e.currentMonth=he.getMonth())}catch(vt){vt.message="Invalid date supplied: "+he,e.config.errorHandler(vt)}Q&&e.currentYear!==Ee&&(st("onYearChange"),U()),Q&&(e.currentYear!==Ee||e.currentMonth!==lt)&&st("onMonthChange"),e.redraw()}function D(z){var Q=Jr(z);~Q.className.indexOf("arrow")&&A(z,Q.classList.contains("arrowUp")?1:-1)}function A(z,Q,he){var Ee=z&&Jr(z),lt=he||Ee&&Ee.parentNode&&Ee.parentNode.firstChild,vt=ht("increment");vt.delta=Q,lt&&lt.dispatchEvent(vt)}function P(){var z=window.document.createDocumentFragment();if(e.calendarContainer=Ii("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(z.appendChild(qe()),e.innerContainer=Ii("div","flatpickr-innerContainer"),e.config.weekNumbers){var Q=De(),he=Q.weekWrapper,Ee=Q.weekNumbers;e.innerContainer.appendChild(he),e.weekNumbers=Ee,e.weekWrapper=he}e.rContainer=Ii("div","flatpickr-rContainer"),e.rContainer.appendChild(xe()),e.daysContainer||(e.daysContainer=Ii("div","flatpickr-days"),e.daysContainer.tabIndex=-1),J(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),z.appendChild(e.innerContainer)}e.config.enableTime&&z.appendChild(Ie()),Er(e.calendarContainer,"rangeMode",e.config.mode==="range"),Er(e.calendarContainer,"animate",e.config.animate===!0),Er(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(z);var lt=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!lt&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var vt=Ii("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(vt,e.element),vt.appendChild(e.element),e.altInput&&vt.appendChild(e.altInput),vt.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function M(z,Q,he,Ee){var lt=be(Q,!0),vt=Ii("span",z,Q.getDate().toString());return vt.dateObj=Q,vt.$i=Ee,vt.setAttribute("aria-label",e.formatDate(Q,e.config.ariaDateFormat)),z.indexOf("hidden")===-1&&eo(Q,e.now)===0&&(e.todayDateElem=vt,vt.classList.add("today"),vt.setAttribute("aria-current","date")),lt?(vt.tabIndex=-1,Dt(Q)&&(vt.classList.add("selected"),e.selectedDateElem=vt,e.config.mode==="range"&&(Er(vt,"startRange",e.selectedDates[0]&&eo(Q,e.selectedDates[0],!0)===0),Er(vt,"endRange",e.selectedDates[1]&&eo(Q,e.selectedDates[1],!0)===0),z==="nextMonthDay"&&vt.classList.add("inRange")))):vt.classList.add("flatpickr-disabled"),e.config.mode==="range"&&Lt(Q)&&!Dt(Q)&&vt.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&z!=="prevMonthDay"&&Ee%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(Q)+"</span>"),st("onDayCreate",vt),vt}function B(z){z.focus(),e.config.mode==="range"&&St(z)}function Z(z){for(var Q=z>0?0:e.config.showMonths-1,he=z>0?e.config.showMonths:-1,Ee=Q;Ee!=he;Ee+=z)for(var lt=e.daysContainer.children[Ee],vt=z>0?0:lt.children.length-1,it=z>0?lt.children.length:-1,wt=vt;wt!=it;wt+=z){var Ht=lt.children[wt];if(Ht.className.indexOf("hidden")===-1&&be(Ht.dateObj))return Ht}}function L(z,Q){for(var he=z.className.indexOf("Month")===-1?z.dateObj.getMonth():e.currentMonth,Ee=Q>0?e.config.showMonths:-1,lt=Q>0?1:-1,vt=he-e.currentMonth;vt!=Ee;vt+=lt)for(var it=e.daysContainer.children[vt],wt=he-e.currentMonth===vt?z.$i+Q:Q<0?it.children.length-1:0,Ht=it.children.length,Et=wt;Et>=0&&Et<Ht&&Et!=(Q>0?Ht:-1);Et+=lt){var gt=it.children[Et];if(gt.className.indexOf("hidden")===-1&&be(gt.dateObj)&&Math.abs(z.$i-Et)>=Math.abs(Q))return B(gt)}e.changeMonth(lt),ae(Z(lt),0)}function ae(z,Q){var he=o(),Ee=He(he||document.body),lt=z!==void 0?z:Ee?he:e.selectedDateElem!==void 0&&He(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&He(e.todayDateElem)?e.todayDateElem:Z(Q>0?1:-1);lt===void 0?e._input.focus():Ee?L(lt,Q):B(lt)}function _e(z,Q){for(var he=(new Date(z,Q,1).getDay()-e.l10n.firstDayOfWeek+7)%7,Ee=e.utils.getDaysInMonth((Q-1+12)%12,z),lt=e.utils.getDaysInMonth(Q,z),vt=window.document.createDocumentFragment(),it=e.config.showMonths>1,wt=it?"prevMonthDay hidden":"prevMonthDay",Ht=it?"nextMonthDay hidden":"nextMonthDay",Et=Ee+1-he,gt=0;Et<=Ee;Et++,gt++)vt.appendChild(M("flatpickr-day "+wt,new Date(z,Q-1,Et),Et,gt));for(Et=1;Et<=lt;Et++,gt++)vt.appendChild(M("flatpickr-day",new Date(z,Q,Et),Et,gt));for(var ei=lt+1;ei<=42-he&&(e.config.showMonths===1||gt%7!==0);ei++,gt++)vt.appendChild(M("flatpickr-day "+Ht,new Date(z,Q+1,ei%lt),ei,gt));var Ai=Ii("div","dayContainer");return Ai.appendChild(vt),Ai}function J(){if(e.daysContainer!==void 0){Ru(e.daysContainer),e.weekNumbers&&Ru(e.weekNumbers);for(var z=document.createDocumentFragment(),Q=0;Q<e.config.showMonths;Q++){var he=new Date(e.currentYear,e.currentMonth,1);he.setMonth(e.currentMonth+Q),z.appendChild(_e(he.getFullYear(),he.getMonth()))}e.daysContainer.appendChild(z),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&St()}}function U(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var z=function(Ee){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&Ee<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&Ee>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var Q=0;Q<12;Q++)if(z(Q)){var he=Ii("option","flatpickr-monthDropdown-month");he.value=new Date(e.currentYear,Q).getMonth().toString(),he.textContent=Fu(Q,e.config.shorthandCurrentMonth,e.l10n),he.tabIndex=-1,e.currentMonth===Q&&(he.selected=!0),e.monthsDropdownContainer.appendChild(he)}}}function F(){var z=Ii("div","flatpickr-month"),Q=window.document.createDocumentFragment(),he;e.config.showMonths>1||e.config.monthSelectorType==="static"?he=Ii("span","cur-month"):(e.monthsDropdownContainer=Ii("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),C(e.monthsDropdownContainer,"change",function(it){var wt=Jr(it),Ht=parseInt(wt.value,10);e.changeMonth(Ht-e.currentMonth),st("onMonthChange")}),U(),he=e.monthsDropdownContainer);var Ee=Pu("cur-year",{tabindex:"-1"}),lt=Ee.getElementsByTagName("input")[0];lt.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&lt.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(lt.setAttribute("max",e.config.maxDate.getFullYear().toString()),lt.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var vt=Ii("div","flatpickr-current-month");return vt.appendChild(he),vt.appendChild(Ee),Q.appendChild(vt),z.appendChild(Q),{container:z,yearElement:lt,monthElement:he}}function de(){Ru(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var z=e.config.showMonths;z--;){var Q=F();e.yearElements.push(Q.yearElement),e.monthElements.push(Q.monthElement),e.monthNav.appendChild(Q.container)}e.monthNav.appendChild(e.nextMonthNav)}function qe(){return e.monthNav=Ii("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Ii("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Ii("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,de(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(z){e.__hidePrevMonthArrow!==z&&(Er(e.prevMonthNav,"flatpickr-disabled",z),e.__hidePrevMonthArrow=z)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(z){e.__hideNextMonthArrow!==z&&(Er(e.nextMonthNav,"flatpickr-disabled",z),e.__hideNextMonthArrow=z)}}),e.currentYearElement=e.yearElements[0],Ot(),e.monthNav}function Ie(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var z=Jh(e.config);e.timeContainer=Ii("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var Q=Ii("span","flatpickr-time-separator",":"),he=Pu("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=he.getElementsByTagName("input")[0];var Ee=Pu("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=Ee.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Lr(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?z.hours:c(z.hours)),e.minuteElement.value=Lr(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():z.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(he),e.timeContainer.appendChild(Q),e.timeContainer.appendChild(Ee),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var lt=Pu("flatpickr-second");e.secondElement=lt.getElementsByTagName("input")[0],e.secondElement.value=Lr(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():z.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Ii("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(lt)}return e.config.time_24hr||(e.amPM=Ii("span","flatpickr-am-pm",e.l10n.amPM[_o((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function xe(){e.weekdayContainer?Ru(e.weekdayContainer):e.weekdayContainer=Ii("div","flatpickr-weekdays");for(var z=e.config.showMonths;z--;){var Q=Ii("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(Q)}return Oe(),e.weekdayContainer}function Oe(){if(e.weekdayContainer){var z=e.l10n.firstDayOfWeek,Q=iv(e.l10n.weekdays.shorthand);z>0&&z<Q.length&&(Q=iv(Q.splice(z,Q.length),Q.splice(0,z)));for(var he=e.config.showMonths;he--;)e.weekdayContainer.children[he].innerHTML=`
18
+ You can fix this by setting your gridOption.autoResize.container`);this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this.resizeObserverCallback())),this._resizeObserver.observe(this._pageContainerElm)}else{if(this._gridDomElm===void 0||Gn(this._gridDomElm)===void 0)return null;this.resizeGrid().then(()=>this.resizeGridWhenStylingIsBrokenUntilCorrected()).catch(n=>console.log("Error:",n)),this.resizeGrid(10,t),this._bindingEventService.bind(window,"resize",this.handleResizeGrid.bind(this,t))}}handleResizeGrid(t){this.pubSubService.publish("onGridBeforeResize"),this._resizePaused||(this.resizeGrid(0,t),this.resizeGrid(0,t))}resizeObserverCallback(){this._resizePaused||this.resizeGrid()}calculateGridNewDimensions(t){var e,n,r,o,s,l,u;const h=(e=t==null?void 0:t.autoResize)!==null&&e!==void 0?e:{},c=Gn(this._gridDomElm);if(!window||c===void 0)return null;let p=(h==null?void 0:h.bottomPadding)!==void 0?h.bottomPadding:$0;if(p&&t.enablePagination&&(p+=j0),p&&t.showCustomFooter){const M=(o=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.customFooterOptions)===null||r===void 0?void 0:r.footerHeight)!==null&&o!==void 0?o:Y0;p+=parseInt(`${M}`,10)}let m=0,v=0;h.calculateAvailableSizeBy==="container"?m=om(this._pageContainerElm,"height")||0:(m=window.innerHeight||0,v=(s=c==null?void 0:c.top)!==null&&s!==void 0?s:0);const _=m-v-p,C=om(this._pageContainerElm,"width")||window.innerWidth||0,x=h==null?void 0:h.maxHeight,S=(l=h==null?void 0:h.minHeight)!==null&&l!==void 0?l:X0,E=h==null?void 0:h.maxWidth,D=(u=h==null?void 0:h.minWidth)!==null&&u!==void 0?u:q0;let A=_,P=h!=null&&h.rightPadding?C-h.rightPadding:C;return A<S&&(A=S),x&&A>x&&(A=x),P<D&&(P=D),E&&P>E&&(P=E),{height:this._fixedHeight||A,width:this._fixedWidth||P}}getLastResizeDimensions(){return this._lastDimensions}pauseResizer(t){this._resizePaused=t}resizeGrid(t,e){return new Promise(n=>{t=t||0,t>0?(clearTimeout(this._timer),this._timer=setTimeout(()=>n(this.resizeGridCallback(e)),t)):n(this.resizeGridCallback(e))})}resizeGridCallback(t){var e,n;const r=this.resizeGridWithDimensions(t);return this.pubSubService.publish("onGridAfterResize",r),this.gridOptions.enableAutoResizeColumnsByCellContent&&(!(!((e=this._lastDimensions)===null||e===void 0)&&e.width)||(r==null?void 0:r.width)!==((n=this._lastDimensions)===null||n===void 0?void 0:n.width))&&this.resizeColumnsByCellContent(!1),this._lastDimensions=r,r}resizeGridWithDimensions(t){var e,n,r,o;const s=this.calculateGridNewDimensions(this.gridOptions);if((t||s)&&this._gridDomElm){const l=t!=null&&t.height?t.height:s==null?void 0:s.height,u=t!=null&&t.width?t.width:s==null?void 0:s.width;this.gridOptions.autoHeight||(this._gridDomElm.style.height=`${l}px`),this._gridDomElm.style.width=`${u}px`,this._gridContainerElm&&(this._gridContainerElm.style.width=`${u}px`),!((e=this._grid)===null||e===void 0)&&e.resizeCanvas&&this._gridContainerElm&&this._grid.resizeCanvas(),!((n=this.gridOptions)===null||n===void 0)&&n.enableAutoSizeColumns&&this._grid.autosizeColumns?this.gridUid&&document.querySelector(this.gridUidSelector)&&this._grid.autosizeColumns():this.gridOptions.enableAutoResizeColumnsByCellContent&&(!(!((r=this._lastDimensions)===null||r===void 0)&&r.width)||u!==((o=this._lastDimensions)===null||o===void 0?void 0:o.width))&&this.resizeColumnsByCellContent(!1),this._lastDimensions={height:l||0,width:u||0}}return this._lastDimensions}requestStopOfAutoFixResizeGrid(t=!0){this._isStopResizeIntervalRequested=t}resizeColumnsByCellContent(t=!1){var e,n,r,o,s,l,u;const h=this._grid.getColumns(),c=this.dataView.getItems(),p={};let m=!1,v=0;const _=(n=(e=this._gridContainerElm)===null||e===void 0?void 0:e.offsetWidth)!==null&&n!==void 0?n:0;if(!Array.isArray(c)||c.length===0||!t&&this._totalColumnsWidthByContent>0&&this._totalColumnsWidthByContent<_){this._grid.autosizeColumns();return}if(this._hasResizedByContentAtLeastOnce&&(!((r=this.gridOptions)===null||r===void 0)&&r.resizeByContentOnlyOnFirstLoad)&&!t)return;if(this.pubSubService.publish("onBeforeResizeByContent",void 0,0),this._totalColumnsWidthByContent===0||t){for(const S of h)p[S.id]=(s=(o=S.originalWidth)!==null&&o!==void 0?o:S.minWidth)!==null&&s!==void 0?s:0;v=this.calculateCellWidthByReadingDataset(h,p,this.resizeByContentOptions.maxItemToInspectCellContentWidth);let x=0;for(const S of h){const E=(u=(l=S.resizeAlwaysRecalculateWidth)!==null&&l!==void 0?l:this.resizeByContentOptions.alwaysRecalculateColumnWidth)!==null&&u!==void 0?u:!1;S.originalWidth&&!E?S.width=S.originalWidth:p[S.id]!==void 0&&(S.rerenderOnResize&&(m=!0),this.applyNewCalculatedColumnWidthByReference(S,p[S.id])),x+=S.width||0,this._totalColumnsWidthByContent=x}}this._grid.setColumns(h),this._hasResizedByContentAtLeastOnce=!0;const C={};for(const x of h)C[x.id]=x.width;this._totalColumnsWidthByContent>_?this._grid.reRenderColumns(m):this._grid.autosizeColumns(),this.pubSubService.publish("onAfterResizeByContent",{readItemCount:v,calculateColumnWidths:C})}calculateCellWidthByReadingDataset(t,e,n=1e3,r){const o=Array.isArray(t)?t:[t],s=this.dataView.getItems();let l=0;for(const[u,h]of s.entries()){if(u>n)break;Array.isArray(o)&&typeof e=="object"&&o.forEach((c,p)=>{const m=this.calculateCellWidthByContent(h,c,u,r??p,e[c.id]);m!==void 0&&(e[c.id]=m)}),l=u+1}return l}calculateCellWidthByContent(t,e,n,r,o){var s,l;const u=(s=this.resizeByContentOptions.cellCharWidthInPx)!==null&&s!==void 0?s:7;if(!e.originalWidth){const h=(l=e==null?void 0:e.resizeCharWidthInPx)!==null&&l!==void 0?l:u,c=uu(e==null?void 0:e.formatter,n,r,e,t,this._grid),p=or(c),m=Math.ceil(p.length*h),v=e.resizeMaxWidthThreshold;e&&(o===void 0||m>o)&&(o=v!==void 0&&m>v?v:e.maxWidth!==void 0&&m>e.maxWidth?e.maxWidth:m)}return o}applyNewCalculatedColumnWidthByReference(t,e){var n,r,o,s,l,u,h;const c=(n=this.resizeByContentOptions.cellPaddingWidthInPx)!==null&&n!==void 0?n:6,p=(r=this.resizeByContentOptions.formatterPaddingWidthInPx)!==null&&r!==void 0?r:6,m=(l=(s=(o=t==null?void 0:t.filter)===null||o===void 0?void 0:o.type)!==null&&s!==void 0?s:t==null?void 0:t.type)!==null&&l!==void 0?l:ie.string;let v=e;const _=(h=(u=t==null?void 0:t.resizeCalcWidthRatio)!==null&&u!==void 0?u:this.resizeByContentOptions.defaultRatioForStringType)!==null&&h!==void 0?h:.9;v*=m==="string"?_:1,v+=c,t.resizeExtraWidthPadding&&(v+=t.resizeExtraWidthPadding),t.editor&&this.gridOptions.editable&&(v+=p),t.maxWidth!==void 0&&v>t.maxWidth&&(v=t.maxWidth),t.resizeMaxWidthThreshold!==void 0&&v>t.resizeMaxWidthThreshold&&(v=t.resizeMaxWidthThreshold),v=Math.ceil(v),(t.originalWidth===void 0||t.resizeAlwaysRecalculateWidth===!0||this.resizeByContentOptions.alwaysRecalculateColumnWidth===!0)&&(t.width=this.readjustNewColumnWidthWhenOverLimit(t,v))}handleSingleColumnResizeByContent(t){var e,n,r;const o=this._grid.getColumns(),s=o.findIndex(l=>l.id===t);if(s>=0){const l=o[s],u={[t]:(n=(e=l.originalWidth)!==null&&e!==void 0?e:l.minWidth)!==null&&n!==void 0?n:0};l.originalWidth=void 0,this.calculateCellWidthByReadingDataset(l,u,this.resizeByContentOptions.maxItemToInspectSingleColumnWidthByContent,s),this.applyNewCalculatedColumnWidthByReference(l,u[t]),this._grid.reRenderColumns((r=l==null?void 0:l.rerenderOnResize)!==null&&r!==void 0?r:!1)}}readjustNewColumnWidthWhenOverLimit(t,e){var n,r,o,s,l,u,h,c;const p=(n=this.gridOptions.frozenColumn)!==null&&n!==void 0?n:-1,m=(r=this._grid.getColumns().findIndex(_=>_.id===t.id))!==null&&r!==void 0?r:0;let v=e;if(p>=0&&m<=p){const _=Array.from(this._grid.getViewports());if(_){const C=(s=(o=_.find(A=>A.classList.contains("slick-viewport-left")))===null||o===void 0?void 0:o.clientWidth)!==null&&s!==void 0?s:0,x=(u=(l=_.find(A=>A.classList.contains("slick-viewport-right")))===null||l===void 0?void 0:l.clientWidth)!==null&&u!==void 0?u:0,S=C+x,E=C-((h=t.width)!==null&&h!==void 0?h:0);if(E+e>S){const A=(c=this.resizeByContentOptions.widthToRemoveFromExceededWidthReadjustment)!==null&&c!==void 0?c:50;v=C-E+x-A}}}return Math.ceil(v)}checkIsGridShown(){var t,e;return!!((e=(t=document.querySelector(`${this.gridUidSelector}`))===null||t===void 0?void 0:t.offsetParent)!==null&&e!==void 0&&e)}resizeGridWhenStylingIsBrokenUntilCorrected(){var t,e,n,r;const o=(e=(t=this.gridOptions)===null||t===void 0?void 0:t.autoFixResizeTimeout)!==null&&e!==void 0?e:18e3,s=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.autoFixResizeRequiredGoodCount)!==null&&r!==void 0?r:5,l=this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-header`),u=this._gridContainerElm.querySelector(`${this.gridUidSelector} .slick-viewport`);let h=0,c=0;if(l&&u&&this.gridOptions.autoFixResizeWhenBrokenStyleDetected){const p=this.dataView.getItemCount(),m=this._grid.getColumns()||[];this._intervalId=setInterval(async()=>{var v,_,C,x,S,E;const A=Gn(l);let P=(v=A==null?void 0:A.top)!==null&&v!==void 0?v:0;this.gridOptions&&this.gridOptions.enableFiltering&&this.gridOptions.headerRowHeight&&(P+=this.gridOptions.headerRowHeight),this.gridOptions&&this.gridOptions.createPreHeaderPanel&&this.gridOptions.showPreHeaderPanel&&this.gridOptions.preHeaderPanelHeight&&(P+=this.gridOptions.preHeaderPanelHeight),P+=44;const M=Gn(u),B=(_=M==null?void 0:M.top)!==null&&_!==void 0?_:0,Z=Gn(this._gridContainerElm);let L=(A==null?void 0:A.top)===0||P-B>2||(Z==null?void 0:Z.left)===0&&(Z==null?void 0:Z.top)===0;const ae=(E=(S=(x=(C=this._grid).getRenderedRange)===null||x===void 0?void 0:x.call(C))===null||S===void 0?void 0:S.rightPx)!==null&&E!==void 0?E:0;!L&&p>0&&ae===0&&m.length>1&&(L=!0),this._isStopResizeIntervalRequested&&(L=!1,h=o),this.checkIsGridShown()&&(L||(Z==null?void 0:Z.left)===0||(Z==null?void 0:Z.top)===0)&&(await this.resizeGrid(),this.checkIsGridShown()&&(L=!1)),this.checkIsGridShown()&&c++,this.checkIsGridShown()&&!L&&(c>=s||h++>=o)&&clearInterval(this._intervalId)},this.intervalRetryDelay)}}}class Q0{constructor(){this._hasColumnsReordered=!1,this._hideHeaderRowAfterPageLoad=!1}get allColumns(){return this._allColumns}set allColumns(t){this._allColumns=t}get columnDefinitions(){return this._grid&&this._grid.getColumns?this._grid.getColumns():[]}get currentPagination(){return this._currentPagination}set currentPagination(t){this._currentPagination=t}get dataView(){return this._dataView}set dataView(t){this._dataView=t}get frozenVisibleColumnId(){return this._frozenVisibleColumnId}set frozenVisibleColumnId(t){this._frozenVisibleColumnId=t}get hasColumnsReordered(){return this._hasColumnsReordered}set hasColumnsReordered(t){this._hasColumnsReordered=t}get slickGrid(){return this._grid}set slickGrid(t){this._grid=t}get gridContainerElement(){return this._gridContainerElm}set gridContainerElement(t){this._gridContainerElm=t}get gridOptions(){var t;return this._gridOptions||((t=this._grid)===null||t===void 0?void 0:t.getOptions())||{}}set gridOptions(t){this._gridOptions=t}get groupItemMetadataProvider(){return this._groupItemMetadataProvider}set groupItemMetadataProvider(t){this._groupItemMetadataProvider=t}get hideHeaderRowAfterPageLoad(){return this._hideHeaderRowAfterPageLoad}set hideHeaderRowAfterPageLoad(t){this._hideHeaderRowAfterPageLoad=t}get externalRegisteredResources(){return this._externalRegisteredResources}set externalRegisteredResources(t){this._externalRegisteredResources=t}get visibleColumns(){return this._visibleColumns}set visibleColumns(t){this._visibleColumns=t}get hierarchicalDataset(){return this._hierarchicalDataset}set hierarchicalDataset(t){this._hierarchicalDataset=t}}class J0{constructor(t,e,n,r){this.sharedService=t,this.pubSubService=e,this.backendUtilities=n,this.rxjs=r,this._currentLocalSorters=[],this._isBackendGrid=!1,this._eventHandler=new Slick.EventHandler,this.rxjs&&(this.httpCancelRequests$=this.rxjs.createSubject())}get eventHandler(){return this._eventHandler}get _gridOptions(){return this._grid&&this._grid.getOptions?this._grid.getOptions():{}}get _columnDefinitions(){return this._grid&&this._grid.getColumns?this._grid.getColumns():[]}dispose(){var t,e;!((t=this._eventHandler)===null||t===void 0)&&t.unsubscribeAll&&this._eventHandler.unsubscribeAll(),this.httpCancelRequests$&&(!((e=this.rxjs)===null||e===void 0)&&e.isObservable(this.httpCancelRequests$))&&(this.httpCancelRequests$.next(),this.httpCancelRequests$.complete())}addRxJsResource(t){this.rxjs=t}bindBackendOnSort(t){var e,n;this._isBackendGrid=!0,this._grid=t,this._dataView=(n=(e=t==null?void 0:t.getData)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{},this._eventHandler.subscribe(t.onSort,this.onBackendSortChanged.bind(this))}bindLocalOnSort(t){this._isBackendGrid=!1,this._grid=t,this._dataView=t.getData(),this.processTreeDataInitialSort(),this._eventHandler.subscribe(t.onSort,this.handleLocalOnSort.bind(this))}handleLocalOnSort(t,e){var n,r;const o=e.multiColumnSort?e.sortCols:new Array({columnId:(r=(n=e.sortCol)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:"",sortAsc:e.sortAsc,sortCol:e.sortCol});this._currentLocalSorters=[],Array.isArray(o)&&o.forEach(s=>{s.sortCol&&this._currentLocalSorters.push({columnId:s.sortCol.id,direction:s.sortAsc?Do.ASC:Do.DESC})}),this.onLocalSortChanged(this._grid,o),this.emitSortChanged(Ji.local)}clearSortByColumnId(t,e){var n,r;const o=this.getCurrentColumnSorts(),s=this.getCurrentColumnSorts(`${e}`);if(Array.isArray(o)&&Array.isArray(s)&&o.length!==s.length){if(this._gridOptions.backendServiceApi)this.onBackendSortChanged(t,{multiColumnSort:!0,sortCols:s,grid:this._grid});else if(this._dataView)this.onLocalSortChanged(this._grid,s,!0,!0);else{const h=((r=(n=this._gridOptions)===null||n===void 0?void 0:n.multiColumnSort)!==null&&r!==void 0?r:!1)?s:s[0];this._grid.onSort.notify(h)}const l=s.map(u=>({columnId:u&&u.sortCol&&u.sortCol.id,sortAsc:u&&u.sortAsc,sortCol:u&&u.sortCol}));this._grid.setSortColumns(l)}Array.isArray(s)&&s.length===0&&this.sortLocalGridByDefaultSortFieldId()}clearSorting(t=!0){var e,n;if(this._grid&&this._gridOptions&&this._dataView){if(this._grid.setSortColumns([]),t)this._isBackendGrid?this.onBackendSortChanged(void 0,{grid:this._grid,multiColumnSort:!0,sortCols:[],clearSortTriggered:!0}):this._columnDefinitions&&Array.isArray(this._columnDefinitions)&&this._columnDefinitions.length>0&&this.sortLocalGridByDefaultSortFieldId();else if(this._isBackendGrid){const r=(n=(e=this._gridOptions)===null||e===void 0?void 0:e.backendServiceApi)===null||n===void 0?void 0:n.service;r!=null&&r.clearSorters&&r.clearSorters()}}this._currentLocalSorters=[],this.pubSubService.publish("onSortCleared",!0)}disableSortFunctionality(t=!0,e=!0){const r=!this._gridOptions.enableSorting;this._gridOptions.enableSorting=r;let o;t?(e&&this.clearSorting(),this._eventHandler.unsubscribeAll(),o=this.disableAllSortingCommands(!0)):(o=this.disableAllSortingCommands(!1),this._eventHandler.subscribe(this._grid.onSort,(s,l)=>this.handleLocalOnSort(s,l))),this._grid.setOptions({enableSorting:this._gridOptions.enableSorting},!1,!0),this.sharedService.gridOptions=this._gridOptions,this._grid.setColumns(o)}toggleSortFunctionality(t=!0){const e=this._gridOptions.enableSorting;this.disableSortFunctionality(e,t)}emitSortChanged(t,e){var n;if(t===Ji.remote&&(!((n=this._gridOptions)===null||n===void 0)&&n.backendServiceApi)){let r=[];const o=this._gridOptions.backendServiceApi.service;o!=null&&o.getCurrentSorters&&(r=o.getCurrentSorters()),this.pubSubService.publish("onSortChanged",r)}else t===Ji.local&&(e&&(this._currentLocalSorters=e),this.pubSubService.publish("onSortChanged",this.getCurrentLocalSorters()))}getCurrentLocalSorters(){return this._currentLocalSorters}getCurrentColumnSorts(t){if(this._grid){const e=this._grid.getSortColumns();if(Array.isArray(e))return e.reduce((r,o)=>(o&&(!t||o.columnId!==t)&&r.push({columnId:o.columnId||"",sortCol:this._columnDefinitions[this._grid.getColumnIndex(o.columnId||"")],sortAsc:o.sortAsc}),r),[])}return[]}loadGridSorters(t){this._currentLocalSorters=[];const e=[];return Array.isArray(t)&&((this._gridOptions.multiColumnSort?t:t.slice(0,1)).forEach(r=>{const o=this._columnDefinitions.find(s=>s.id===r.columnId);if(o){if(!o.sortable){let s="[Slickgrid-Universal] Cannot add sort icon to a column that is not sortable, please add `sortable: true` to your column or remove it from your list of columns to sort.";throw this._gridOptions.enableTreeData&&(s+=" Also note that TreeData feature requires the column holding the tree (expand/collapse icons) to be sortable."),new Error(s)}e.push({columnId:o.id,sortAsc:r.direction.toUpperCase()===Do.ASC,sortCol:o}),this._currentLocalSorters.push({columnId:String(o.id),direction:r.direction.toUpperCase()})}}),this.onLocalSortChanged(this._grid,e),this._grid.setSortColumns(e.map(r=>({columnId:r.columnId,sortAsc:r.sortAsc})))),e}processTreeDataInitialSort(){var t,e,n;if(!((t=this._gridOptions)===null||t===void 0)&&t.enableTreeData&&this._gridOptions.treeDataOptions){const r=this._gridOptions.treeDataOptions,o=this._columnDefinitions.find(s=>s.id===r.columnId);if(o){let s=Do.ASC,l={columnId:r.columnId,sortCol:o,sortAsc:!0};if(!((e=r==null?void 0:r.initialSort)===null||e===void 0)&&e.columnId){const u=r.initialSort.columnId,h=this._columnDefinitions.find(c=>c.id===u);s=(r.initialSort.direction||Do.ASC).toUpperCase(),l={columnId:u,sortCol:h,sortAsc:s===Do.ASC}}l!=null&&l.columnId&&(!((n=this.sharedService)===null||n===void 0)&&n.hierarchicalDataset)&&this.updateSorting([{columnId:l.columnId||"",direction:s}])}}}onBackendSortChanged(t,e){var n,r;if(!e||!e.grid)throw new Error('Something went wrong when trying to bind the "onBackendSortChanged(event, args)" function, it seems that "args" is not populated correctly');const o=e.grid&&e.grid.getOptions?e.grid.getOptions():{},s=o.backendServiceApi;if(!s||!s.process||!s.service)throw new Error('BackendServiceApi requires at least a "process" function and a "service" defined');const l=new Date;s.preProcess&&s.preProcess();const u=s.service.processOnSortChanged(t,e),h=((n=o==null?void 0:o.pagination)===null||n===void 0?void 0:n.totalItems)||0;(r=this.backendUtilities)===null||r===void 0||r.executeBackendCallback(s,u,e,l,h,{emitActionChangedCallback:this.emitSortChanged.bind(this),errorCallback:()=>{var c,p,m;this._grid.setSortColumns(e.previousSortColumns||[]);const v=(c=e.previousSortColumns)===null||c===void 0?void 0:c.map(_=>({columnId:_.columnId,sortAsc:_.sortAsc,sortCol:this._columnDefinitions.find(C=>C.id===_.columnId)}));(m=(p=s==null?void 0:s.service)===null||p===void 0?void 0:p.updateSorters)===null||m===void 0||m.call(p,v||[])},httpCancelRequestSubject:this.httpCancelRequests$})}async onLocalSortChanged(t,e,n=!1,r=!1){var o,s,l,u,h;const c=(s=(o=this._gridOptions)===null||o===void 0?void 0:o.datasetIdPropertyName)!==null&&s!==void 0?s:"id",p=(u=(l=this._gridOptions)===null||l===void 0?void 0:l.enableTreeData)!==null&&u!==void 0?u:!1,m=(h=t.getData)===null||h===void 0?void 0:h.call(t);if(await this.pubSubService.publish("onBeforeSortChange",{sortColumns:e},0),t&&m){if(n&&!p&&m.reSort(),p&&this.sharedService&&Array.isArray(this.sharedService.hierarchicalDataset)){const v=this.sortHierarchicalDataset(this.sharedService.hierarchicalDataset,e);this._dataView.setItems(v.flat,c),this._dataView.onRowCountChanged.notify({previous:this._dataView.getFilteredItemCount(),current:this._dataView.getLength(),itemCount:this._dataView.getItemCount(),dataView:this._dataView,callingOnRowsChanged:!0})}else m.sort(this.sortComparers.bind(this,e));t.invalidate(),r&&this.emitSortChanged(Ji.local,e.map(v=>{var _,C;return{columnId:(C=(_=v.sortCol)===null||_===void 0?void 0:_.id)!==null&&C!==void 0?C:"id",direction:v.sortAsc?Do.ASC:Do.DESC}}))}}sortHierarchicalDataset(t,e,n=!1){var r,o,s,l,u,h;this.sortTreeData(t,e);const c=(o=(r=this._gridOptions)===null||r===void 0?void 0:r.datasetIdPropertyName)!==null&&o!==void 0?o:"id",p=(l=(s=this._gridOptions)===null||s===void 0?void 0:s.treeDataOptions)!==null&&l!==void 0?l:{columnId:""},m={...p,identifierPropName:(u=p.identifierPropName)!==null&&u!==void 0?u:c,shouldAddTreeLevelNumber:!0},v=Dp(t,m);if(n){this._currentLocalSorters=[];for(const C of e)this._currentLocalSorters.push({columnId:C.columnId,direction:C.sortAsc?"ASC":"DESC"});const _=!((h=this._gridOptions)===null||h===void 0)&&h.backendServiceApi?Ji.remote:Ji.local;this.emitSortChanged(_)}return{hierarchical:t,flat:v}}sortLocalGridByDefaultSortFieldId(){const t=this._gridOptions&&this._gridOptions.defaultColumnSortFieldId||this._gridOptions.datasetIdPropertyName||"id",e={id:t,field:t};this.onLocalSortChanged(this._grid,new Array({columnId:e.id,sortAsc:!0,sortCol:e,clearSortTriggered:!0}),!1,!0)}sortComparers(t,e,n){if(Array.isArray(t))for(const r of t){const o=this.sortComparer(r,e,n);if(o!==void 0)return o}return ji.neutral}sortComparer(t,e,n,r){if(t!=null&&t.sortCol){const o=t.sortCol,s=t.sortAsc?ji.asc:ji.desc;let l=r||o.queryFieldSorter||o.queryField||o.field,u=l;const h=o.type||ie.string;typeof o.queryFieldNameGetterFn=="function"&&(l=o.queryFieldNameGetterFn(e),u=o.queryFieldNameGetterFn(n));let c=e[l],p=n[u];if(l&&l.indexOf(".")>=0&&(c=_n(e,l)),u&&u.indexOf(".")>=0&&(p=_n(n,u)),o.sortComparer){const m=o.sortComparer(c,p,s,o,this._gridOptions);if(m!==ji.neutral)return m}else{const m=Gl(h,c,p,s,o,this._gridOptions);if(m!==ji.neutral)return m}}}sortTreeData(t,e){if(Array.isArray(e))for(const n of e)this.sortTreeChildren(t,n,0)}sortTreeChildren(t,e,n){var r,o;const s=(r=this._gridOptions)===null||r===void 0?void 0:r.treeDataOptions,l=(o=s==null?void 0:s.childrenPropName)!==null&&o!==void 0?o:"children";t.sort((u,h)=>{var c;return(c=this.sortComparer(e,u,h))!==null&&c!==void 0?c:ji.neutral});for(const u of t)u&&u.hasOwnProperty(l)&&Array.isArray(u[l])&&(n++,this.sortTreeChildren(u[l],e,n),n--)}updateSorting(t,e=!0,n=!0){var r,o;if(!this._gridOptions||!this._gridOptions.enableSorting)throw new Error('[Slickgrid-Universal] in order to use "updateSorting" method, you need to have Sortable Columns defined in your grid and "enableSorting" set in your Grid Options');if(Array.isArray(t)){const s=(r=this._gridOptions)===null||r===void 0?void 0:r.backendServiceApi;if(s){const l=s==null?void 0:s.service;l!=null&&l.updateSorters&&(l.updateSorters(void 0,t),n&&((o=this.backendUtilities)===null||o===void 0||o.refreshBackendDataset(this._gridOptions)))}else this.loadGridSorters(t);if(e){const l=s?Ji.remote:Ji.local;this.emitSortChanged(l)}}}disableAllSortingCommands(t=!0){var e,n;const r=this._grid.getColumns();r.forEach(s=>{var l,u;typeof s.sortable!==void 0&&(s.sortable=!t),!((l=s==null?void 0:s.header)===null||l===void 0)&&l.menu&&((u=s.header.menu.commandItems||s.header.menu.items)===null||u===void 0||u.forEach(h=>{if(h&&typeof h!="string"){const c=h.command;(c==="sort-asc"||c==="sort-desc"||c==="clear-sort")&&(h.hidden=t)}}))});const o=(n=(e=this._gridOptions)===null||e===void 0?void 0:e.gridMenu)===null||n===void 0?void 0:n.commandItems;return o&&o.forEach(s=>{s&&typeof s!="string"&&s.command==="clear-sorting"&&(s.hidden=t)}),r}}class eb{constructor(t,e,n){this.pubSubService=t,this.sharedService=e,this.sortService=n,this._currentToggledItems=[],this._isLastFullToggleCollapsed=!1,this._isOneCpuCyclePassed=!1,this._isTreeDataEnabled=!1,this._subscriptions=[],this._treeDataRecalcHandler=null,this._eventHandler=new Slick.EventHandler,setTimeout(()=>this._isOneCpuCyclePassed=!0)}set currentToggledItems(t){this._currentToggledItems=t}get dataset(){var t;return(t=this.dataView)===null||t===void 0?void 0:t.getItems()}get datasetHierarchical(){return this.sharedService.hierarchicalDataset}get dataView(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getData)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get eventHandler(){return this._eventHandler}get gridOptions(){var t,e,n;return(n=(e=(t=this._grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get treeDataOptions(){return this.gridOptions.treeDataOptions}dispose(){this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions)}init(t){var e,n,r,o,s,l,u,h,c,p,m;if(this._grid=t,this._isTreeDataEnabled=(n=(e=this.gridOptions)===null||e===void 0?void 0:e.enableTreeData)!==null&&n!==void 0?n:!1,this._isLastFullToggleCollapsed=(o=(r=this.treeDataOptions)===null||r===void 0?void 0:r.initiallyCollapsed)!==null&&o!==void 0?o:!1,this._currentToggledItems=(u=(l=(s=this.gridOptions.presets)===null||s===void 0?void 0:s.treeData)===null||l===void 0?void 0:l.toggledItems)!==null&&u!==void 0?u:[],this._lastToggleStateChange={type:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this._isTreeDataEnabled){if(!((h=this.gridOptions)===null||h===void 0)&&h.multiColumnSort)throw new Error('[Slickgrid-Universal] It looks like you are trying to use Tree Data with multi-column sorting, unfortunately it is not supported because of its complexity, you can disable it via "multiColumnSort: false" grid option and/or help in providing support for this feature.');if(!(!((c=this.gridOptions)===null||c===void 0)&&c.enableFiltering))throw new Error('[Slickgrid-Universal] It looks like you are trying to use Tree Data without using the filtering option, unfortunately that is not possible with Tree Data since it relies heavily on the filters to expand/collapse the tree. You need to enable it via "enableFiltering: true"');if(!((p=this.gridOptions)===null||p===void 0)&&p.backendServiceApi||!((m=this.gridOptions)===null||m===void 0)&&m.enablePagination)throw new Error("[Slickgrid-Universal] It looks like you are trying to use Tree Data with Pagination and/or a Backend Service (OData, GraphQL) but unfortunately that is simply not supported because of its complexity.");if(!this.gridOptions.treeDataOptions||!this.gridOptions.treeDataOptions.columnId)throw new Error('[Slickgrid-Universal] When enabling tree data, you must also provide the "treeDataOption" property in your Grid Options with "childrenPropName" or "parentPropName" (depending if your array is hierarchical or flat) for the Tree Data to work properly.')}this._eventHandler.subscribe(t.onClick,this.handleOnCellClick.bind(this)),this._subscriptions.push(this.pubSubService.subscribe("onGridMenuClearAllSorting",this.clearSorting.bind(this))),this._treeDataRecalcHandler=this.setAutoRecalcTotalsCallbackWhenFeatEnabled(this.gridOptions),this._eventHandler.subscribe(this.dataView.onRowCountChanged,()=>{var v,_;typeof this._treeDataRecalcHandler=="function"&&this._isOneCpuCyclePassed&&(clearTimeout(this._timer),this._timer=setTimeout(()=>{var C;return(C=this._treeDataRecalcHandler)===null||C===void 0?void 0:C.call(this)},(_=(v=this.treeDataOptions)===null||v===void 0?void 0:v.autoRecalcTotalsDebounce)!==null&&_!==void 0?_:0))})}applyToggledItemStateChanges(t,e,n=!0,r=!1){if(Array.isArray(t)){const o=this.getTreeDataOptionPropName("collapsedPropName"),s=this.getTreeDataOptionPropName("hasChildrenPropName");this.dataView.beginUpdate(!0);const u=(e??this._lastToggleStateChange.previousFullToggleType)==="full-collapse";e&&(this._lastToggleStateChange.previousFullToggleType=e),n&&(this.dataView.getItems()||[]).forEach(h=>{h[s]&&(h[o]=u)}),this.dynamicallyToggleItemState(t,r)}}dynamicallyToggleItemState(t,e=!0){if(Array.isArray(t)){this.dataView.beginUpdate(!0);for(const n of t){const r=this.dataView.getItemById(n.itemId);if(this.updateToggledItem(r,n.isCollapsed),e){const o=this._currentToggledItems.findIndex(s=>s.itemId===n.itemId);o>=0?this._currentToggledItems[o].isCollapsed=n.isCollapsed:this._currentToggledItems.push({itemId:n.itemId,isCollapsed:n.isCollapsed}),this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:n.itemId,toggledItems:this._currentToggledItems,type:n.isCollapsed?ps.toggleCollapse:ps.toggleExpand})}}this.dataView.endUpdate(),this.dataView.refresh()}}getCurrentToggleState(){return this._lastToggleStateChange}getInitialSort(t,e){var n,r,o;const s=e==null?void 0:e.treeDataOptions,l=(n=s==null?void 0:s.initialSort)!==null&&n!==void 0?n:{columnId:(r=s==null?void 0:s.columnId)!==null&&r!==void 0?r:"",direction:"ASC"},u=t.find(h=>h.id===l.columnId);return{columnId:l.columnId,sortAsc:((o=l==null?void 0:l.direction)===null||o===void 0?void 0:o.toUpperCase())!=="DESC",sortCol:u}}getItemCount(t){if(t!==void 0){const e=this.getTreeDataOptionPropName("levelPropName");return this.dataView.getItems().filter(n=>n[e]===t).length}return this.dataView.getItemCount()}getToggledItems(){return this._currentToggledItems}getTreeDataOptionPropName(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C;let x="";switch(t){case"childrenPropName":x=(n=(e=this.treeDataOptions)===null||e===void 0?void 0:e.childrenPropName)!==null&&n!==void 0?n:je.treeDataProperties.CHILDREN_PROP;break;case"collapsedPropName":x=(o=(r=this.treeDataOptions)===null||r===void 0?void 0:r.collapsedPropName)!==null&&o!==void 0?o:je.treeDataProperties.COLLAPSED_PROP;break;case"hasChildrenPropName":x=(l=(s=this.treeDataOptions)===null||s===void 0?void 0:s.hasChildrenPropName)!==null&&l!==void 0?l:je.treeDataProperties.HAS_CHILDREN_PROP;break;case"identifierPropName":x=(p=(h=(u=this.treeDataOptions)===null||u===void 0?void 0:u.identifierPropName)!==null&&h!==void 0?h:(c=this.gridOptions)===null||c===void 0?void 0:c.datasetIdPropertyName)!==null&&p!==void 0?p:"id";break;case"levelPropName":x=(v=(m=this.treeDataOptions)===null||m===void 0?void 0:m.levelPropName)!==null&&v!==void 0?v:je.treeDataProperties.TREE_LEVEL_PROP;break;case"parentPropName":x=(C=(_=this.treeDataOptions)===null||_===void 0?void 0:_.parentPropName)!==null&&C!==void 0?C:je.treeDataProperties.PARENT_PROP;break}return x}clearSorting(){const t=this.getInitialSort(this.sharedService.columnDefinitions,this.sharedService.gridOptions);this.sortService.loadGridSorters([{columnId:t.columnId,direction:t.sortAsc?"ASC":"DESC"}])}convertFlatParentChildToTreeDatasetAndSort(t,e,n){var r;const o=this.convertFlatParentChildToTreeDataset(t,n),s=this.getInitialSort(e,n),l=this.sortService.sortHierarchicalDataset(o,[s],!0);return(r=this._grid)===null||r===void 0||r.setSortColumns([s]),l}convertFlatParentChildToTreeDataset(t,e){var n,r,o;const s=(n=e==null?void 0:e.datasetIdPropertyName)!==null&&n!==void 0?n:"id",l=(r=e==null?void 0:e.treeDataOptions)!==null&&r!==void 0?r:{columnId:"id"},u={...l,identifierPropName:(o=l.identifierPropName)!==null&&o!==void 0?o:s,initiallyCollapsed:this._isLastFullToggleCollapsed};return Rp(t,u)}enableAutoRecalcTotalsFeature(t=!0){t&&this._isTreeDataEnabled?this._treeDataRecalcHandler=this.recalculateTreeTotals.bind(this,this.gridOptions):this._treeDataRecalcHandler=null}recalculateTreeTotals(t){var e,n;const r=t.treeDataOptions,o=(e=r==null?void 0:r.childrenPropName)!==null&&e!==void 0?e:je.treeDataProperties.CHILDREN_PROP,s=(n=r==null?void 0:r.levelPropName)!==null&&n!==void 0?n:je.treeDataProperties.TREE_LEVEL_PROP;r!=null&&r.aggregators&&(r.aggregators.forEach(l=>{Ha(this.sharedService.hierarchicalDataset||[],{childrenPropName:o,levelPropName:s,aggregator:l})}),this._grid.invalidate())}sortHierarchicalDataset(t,e){const n=e??this.getInitialSort(this.sharedService.allColumns,this.gridOptions),r=Array.isArray(n)?n:[n];return this.sortService.sortHierarchicalDataset(t,r)}async toggleTreeDataCollapse(t,e=!0){var n;if(!((n=this.gridOptions)===null||n===void 0)&&n.enableTreeData){const o=this.getTreeDataOptionPropName("hasChildrenPropName");e&&await this.pubSubService.publish("onTreeFullToggleStart",{collapsing:t}),this.dataView.beginUpdate(!0),(this.dataView.getItems()||[]).forEach(s=>{s[o]&&this.updateToggledItem(s,t)}),this.dataView.endUpdate(),this.dataView.refresh(),this._isLastFullToggleCollapsed=t}const r=t?ps.fullCollapse:ps.fullExpand;this._lastToggleStateChange={type:r,previousFullToggleType:r,toggledItems:null},e&&this.pubSubService.publish("onTreeFullToggleEnd",this._lastToggleStateChange)}handleOnCellClick(t,e){var n;if(t&&e){const r=t.target||{},o=(n=this.gridOptions.datasetIdPropertyName)!==null&&n!==void 0?n:"id",s=this.getTreeDataOptionPropName("collapsedPropName"),l=this.getTreeDataOptionPropName("childrenPropName");if(typeof(r==null?void 0:r.className)=="string"&&(r.className.indexOf("toggle")>=0||!1)){const h=this.dataView.getItem(e.row);if(h){h[s]=!h[s];const c=h[s],p=h[o],m=this._currentToggledItems.findIndex(C=>C.itemId===p);m>=0?this._currentToggledItems[m].isCollapsed=c:this._currentToggledItems.push({itemId:p,isCollapsed:c}),this.dataView.updateItem(p,h);const v=C=>C[o]===p,_=Ba(this.sharedService.hierarchicalDataset||[],v,l);_&&(_[s]=c),this._grid.invalidate(),this._lastToggleStateChange={type:c?ps.toggleCollapse:ps.toggleExpand,previousFullToggleType:this._isLastFullToggleCollapsed?"full-collapse":"full-expand",toggledItems:this._currentToggledItems},this.pubSubService.publish("onTreeItemToggled",{...this._lastToggleStateChange,fromItemId:p})}t.stopImmediatePropagation()}}}updateToggledItem(t,e){var n,r;const o=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.datasetIdPropertyName)!==null&&r!==void 0?r:"id",s=this.getTreeDataOptionPropName("childrenPropName"),l=this.getTreeDataOptionPropName("collapsedPropName");if(t){t[l]=e,this.dataView.updateItem(t[o],t);const u=c=>c[o]===t[o],h=Ba(this.sharedService.hierarchicalDataset||[],u,s);h&&(h[l]=e)}}setAutoRecalcTotalsCallbackWhenFeatEnabled(t){var e,n;return t!=null&&t.enableTreeData&&(!((e=t==null?void 0:t.treeDataOptions)===null||e===void 0)&&e.autoRecalcTotalsOnFilterChange)&&(!((n=t==null?void 0:t.treeDataOptions)===null||n===void 0)&&n.aggregators)?this.recalculateTreeTotals.bind(this,t):null}}function Yh(a,t){const e=Re("select",{className:"form-control"});for(const n of a){const r=document.createElement("option");r.value=n.operator,r.innerHTML=Ln(t,`${M_(n.operatorAlt||n.operator,3)}${n.descAlt||n.desc}`),e.appendChild(r)}return e}function Jn(a,t,e,n="Slider"){var r,o,s;let l;return((r=a.filterOptions)===null||r===void 0?void 0:r[t])!==void 0?l=a.filterOptions[t]:((o=a==null?void 0:a.params)===null||o===void 0?void 0:o[t])!==void 0&&(console.warn(`[Slickgrid-Universal] All filter.params from ${n} Filter are moving to "filterOptions" for better typing support and "params" will be deprecated in future release.`),l=(s=a==null?void 0:a.params)===null||s===void 0?void 0:s[t]),l??e}function tb(a,t,e){var n,r;const o=(n=t==null?void 0:t.filter)!==null&&n!==void 0?n:{},s=(r=o==null?void 0:o.collectionOptions)!==null&&r!==void 0?r:{};if(s&&s.collectionInsideObjectProperty){const l=s.collectionInsideObjectProperty;a=_n(a,l)}if(!Array.isArray(a))throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Filter, the collection is not a valid array.');o.collection=a,e(a)}async function Km(a,t,e,n,r){var o,s,l;const u=(o=t==null?void 0:t.filter)!==null&&o!==void 0?o:{},h=(s=u==null?void 0:u.collectionOptions)!==null&&s!==void 0?s:{};let c=null;if(a){const p=(l=n==null?void 0:n.isObservable(a))!==null&&l!==void 0?l:!1;p&&n&&(c=await Ip(n,a));const m=await a;if(Array.isArray(m)?c=m:(m==null?void 0:m.status)>=200&&m.status<300&&typeof m.json=="function"?c=await m.json():m&&m.content&&(c=m.content),!Array.isArray(c)&&(h!=null&&h.collectionInsideObjectProperty)){const v=c||m,_=h.collectionInsideObjectProperty;c=_n(v,_||"")}if(!Array.isArray(c))throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Filter, the collection is not a valid array.');u.collection=c,e(c),p&&ib(t,e,n,r)}return c}function ib(a,t,e,n){var r;const o=(r=a==null?void 0:a.filter)!==null&&r!==void 0?r:{},s=e==null?void 0:e.createSubject();o.collectionAsync=s,n&&s&&n.push(s.subscribe(l=>tb(l,a,t)))}function go(a,t,e,n,r){var o;if(n!=null&&n.enableTranslate&&(r!=null&&r.translate)){const l=ho(n);return r.translate(`${l}${a}`)}const s=n.locales||je.locales;return(o=s==null?void 0:s[t])!==null&&o!==void 0?o:e}function nb(a,t){const e=[{operator:"",desc:go("CONTAINS","TEXT_CONTAINS","Contains",a,t)},{operator:"<>",desc:go("NOT_CONTAINS","TEXT_NOT_CONTAINS","Not Contains",a,t)},{operator:"=",desc:go("EQUALS","TEXT_EQUALS","Equals",a,t)},{operator:"!=",desc:go("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to",a,t)},{operator:"a*",desc:go("STARTS_WITH","TEXT_STARTS_WITH","Starts with",a,t)},{operator:"*z",desc:go("ENDS_WITH","TEXT_ENDS_WITH","Ends with",a,t)}];return Zm(a,e,"text"),e}function jh(a,t){const e=[{operator:"",desc:""},{operator:"=",desc:go("EQUAL_TO","TEXT_EQUAL_TO","Equal to",a,t)},{operator:"<",desc:go("LESS_THAN","TEXT_LESS_THAN","Less than",a,t)},{operator:"<=",desc:go("LESS_THAN_OR_EQUAL_TO","TEXT_LESS_THAN_OR_EQUAL_TO","Less than or equal to",a,t)},{operator:">",desc:go("GREATER_THAN","TEXT_GREATER_THAN","Greater than",a,t)},{operator:">=",desc:go("GREATER_THAN_OR_EQUAL_TO","TEXT_GREATER_THAN_OR_EQUAL_TO","Greater than or equal to",a,t)},{operator:"<>",desc:go("NOT_EQUAL_TO","TEXT_NOT_EQUAL_TO","Not equal to",a,t)}];return Zm(a,e,"numeric"),e}function Zm(a,t,e){if(a.compoundOperatorAltTexts){for(const n of t)if(a.compoundOperatorAltTexts.hasOwnProperty(e)){const r=a.compoundOperatorAltTexts[e][n.operator];n.operatorAlt=(r==null?void 0:r.operatorAlt)||"",n.descAlt=(r==null?void 0:r.descAlt)||""}}}const Qm=Jd&&dh||Jd;class rb{constructor(t,e,n){this.translaterService=t,this.collectionService=e,this.rxjs=n,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.searchTerms=[],this.isFilled=!1,this.isItemSelected=!1,this.valueName="label",this.enableTranslateLabel=!1,this.subscriptions=[],this._bindEventService=new Nn}get autocompleterOptions(){return this._autocompleterOptions||{}}get collectionOptions(){var t,e,n;return(n=(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)===null||e===void 0?void 0:e.collectionOptions)!==null&&n!==void 0?n:{}}get collection(){return this._collection}get columnFilter(){var t;return((t=this.columnDef)===null||t===void 0?void 0:t.filter)||{}}get filterDomElement(){return this._filterElm}get filterOptions(){var t;return((t=this.columnFilter)===null||t===void 0?void 0:t.filterOptions)||{}}get customStructure(){var t,e,n,r,o,s;let l=(t=this.columnFilter)===null||t===void 0?void 0:t.customStructure;const u=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.type)!==null&&n!==void 0?n:(r=this.columnDef)===null||r===void 0?void 0:r.type;return!l&&u===ie.object&&(!((o=this.columnDef)===null||o===void 0)&&o.dataKey)&&(!((s=this.columnDef)===null||s===void 0)&&s.labelKey)&&(l={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),l}get defaultOperator(){return Nt.equal}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get instance(){return this._instance}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}init(t){var e,n,r,o,s,l,u,h,c,p,m,v;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this.filterContainerElm=t.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection&&!this.columnFilter.collectionAsync&&!this.columnFilter.filterOptions)throw new Error(`[Slickgrid-Universal] You need to pass a "collection" (or "collectionAsync") for the AutoComplete Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.autocompleter, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }`);this.enableTranslateLabel=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.enableTranslateLabel)!==null&&n!==void 0?n:!1,this.labelName=(o=(r=this.customStructure)===null||r===void 0?void 0:r.label)!==null&&o!==void 0?o:"label",this.valueName=(l=(s=this.customStructure)===null||s===void 0?void 0:s.value)!==null&&l!==void 0?l:"value",this.labelPrefixName=(h=(u=this.customStructure)===null||u===void 0?void 0:u.labelPrefix)!==null&&h!==void 0?h:"labelPrefix",this.labelSuffixName=(p=(c=this.customStructure)===null||c===void 0?void 0:c.labelSuffix)!==null&&p!==void 0?p:"labelSuffix",this._locales=(v=(m=this.gridOptions)===null||m===void 0?void 0:m.locales)!==null&&v!==void 0?v:je.locales;const _=this.columnFilter.collection;return this._collection=_,this.renderDomElement(_),new Promise(async(C,x)=>{try{const S=this.columnFilter.collectionAsync;let E;S&&!this.columnFilter.collection?(E=Km(S,this.columnDef,this.renderDomElement.bind(this),this.rxjs,this.subscriptions),C(E)):(E=_,C(_)),(S||this.columnFilter.enableCollectionWatch)&&(await(E??S),this.watchCollectionChanges())}catch(S){x(S)}})}clear(t=!0){this._filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[],this._filterElm.value="",this._filterElm.dispatchEvent(new CustomEvent("input")),this._filterElm.classList.remove("filled"))}destroy(){var t,e,n;typeof((t=this._instance)===null||t===void 0?void 0:t.destroy)=="function"&&this._instance.destroy(),this._filterElm,(n=(e=this._filterElm)===null||e===void 0?void 0:e.remove)===null||n===void 0||n.call(e),this._collection=void 0,this._bindEventService.unbindAll(),Xd(this.subscriptions)}getValues(){var t;return(t=this._filterElm)===null||t===void 0?void 0:t.value}setValues(t,e){var n;t&&this._filterElm&&(this._filterElm.value=t);const r=this.getValues()!==""?"add":"remove";(n=this._filterElm)===null||n===void 0||n.classList[r]("filled"),this.operator=e||this.defaultOperator}filterCollection(t){let e=t;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const n=this.columnFilter.collectionFilterBy,r=this.columnFilter.collectionOptions&&this.columnFilter.collectionOptions.filterResultAfterEachPass||null;e=this.collectionService.filterCollection(e,n,r)}return e}sortCollection(t){let e=t;if(this.columnFilter&&this.columnFilter.collectionSortBy){const n=this.columnFilter.collectionSortBy;e=this.collectionService.sortCollection(this.columnDef,e,n,this.enableTranslateLabel)}return e}watchCollectionChanges(){var t;!((t=this.columnFilter)===null||t===void 0)&&t.collection&&(Ma(this.columnFilter.collection,e=>{this.renderDomElement(this.columnFilter.collection||e||[])}),Jc(this.columnFilter,"collection",e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&Ma(this.columnFilter.collection,n=>{this.renderDomElement(this.columnFilter.collection||n||[])})}))}renderDomElement(t){var e;if(!Array.isArray(t)&&(!((e=this.collectionOptions)===null||e===void 0)&&e.collectionInsideObjectProperty)){const o=this.collectionOptions.collectionInsideObjectProperty;t=_n(t,o||"")}let n=t;n&&(n=this.filterCollection(n),n=this.sortCollection(n));const r=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this._collection=n,this._filterElm=this.createFilterElement(n,r),this._bindEventService.bind(this._filterElm,"input",this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._filterElm,"blur",()=>{this.isItemSelected||this.clear()})}createFilterElement(t,e){var n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E;this._collection=t;const D=(r=(n=this.columnDef)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:"";on(this.filterContainerElm);let A=(s=(o=this.gridOptions)===null||o===void 0?void 0:o.defaultFilterPlaceholder)!==null&&s!==void 0?s:"";!((l=this.columnFilter)===null||l===void 0)&&l.placeholder&&(A=this.columnFilter.placeholder),this._filterElm=Re("input",{type:"text",ariaLabel:(h=(u=this.columnFilter)===null||u===void 0?void 0:u.ariaLabel)!==null&&h!==void 0?h:`${qr(D+"")} Search Filter`,autocomplete:"off",ariaAutoComplete:"none",placeholder:A,className:`form-control search-filter filter-${D} slick-autocomplete-container`,value:e??"",dataset:{columnid:`${D}`}});const P=e;Array.isArray(t)&&(t.every(B=>qd(B))?t=t.map(B=>({label:B,value:B})):t=t.map(B=>{var Z,L;return{label:B==null?void 0:B[this.labelName],value:B==null?void 0:B[this.valueName],labelPrefix:(Z=B==null?void 0:B[this.labelPrefixName])!==null&&Z!==void 0?Z:"",labelSuffix:(L=B==null?void 0:B[this.labelSuffixName])!==null&&L!==void 0?L:""}})),this._autocompleterOptions={input:this._filterElm,debounceWaitMs:200,className:`slick-autocomplete ${(p=(c=this.filterOptions)===null||c===void 0?void 0:c.className)!==null&&p!==void 0?p:""}`.trim(),emptyMsg:this.gridOptions.enableTranslate&&(!((m=this.translaterService)===null||m===void 0)&&m.translate)?this.translaterService.translate("NO_ELEMENTS_FOUND"):(_=(v=this._locales)===null||v===void 0?void 0:v.TEXT_NO_ELEMENTS_FOUND)!==null&&_!==void 0?_:"No elements found",customize:(B,Z,L)=>{L.style.width=""},onSelect:B=>{this.isItemSelected=!0,this.handleSelect(B)},...this.filterOptions},!((C=this._autocompleterOptions.renderItem)===null||C===void 0)&&C.layout?(this._autocompleterOptions.className+=` autocomplete-custom-${Wa(this._autocompleterOptions.renderItem.layout)}`,this._autocompleterOptions.render=this.renderCustomItem.bind(this)):Array.isArray(t)?this._autocompleterOptions.render=(S=(x=this._autocompleterOptions.render)===null||x===void 0?void 0:x.bind(this))!==null&&S!==void 0?S:this.renderCollectionItem.bind(this):this._autocompleterOptions.render||(this._autocompleterOptions.render=this.renderRegularItem.bind(this)),!((E=this.filterOptions)===null||E===void 0)&&E.fetch?(Up(this._filterElm,this._autocompleterOptions),this._instance=Qm(this._autocompleterOptions)):this._instance=Qm({...this._autocompleterOptions,fetch:(B,Z)=>{t&&Z(t.filter(L=>((typeof L=="string"?L:L==null?void 0:L.label)||"").toLowerCase().includes(B.toLowerCase())))}}),this._filterElm.value=P??"";const M=Re("div",{className:"autocomplete-filter-container"});return M.appendChild(this._filterElm),M.appendChild(Re("span")),e&&this._filterElm.classList.add("filled"),this.filterContainerElm.appendChild(M),this.filterContainerElm.appendChild(document.createElement("span")),this._filterElm}handleSelect(t){var e,n,r,o;if(t!==void 0){const l=(r=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.filterOptions)===null||n===void 0?void 0:n.renderItem)!==null&&r!==void 0?r:!1,u=typeof t=="string"?t:l?t[this.labelName]:t.label;let h=typeof t=="string"?t:l?t[this.valueName]:t.value;h=this.trimWhitespaceWhenEnabled(h);const c=h===""?"remove":"add";(o=this._filterElm)===null||o===void 0||o.classList[c]("filled"),this.setValues(u),this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:[h],shouldTriggerQuery:this._shouldTriggerQuery}),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}return!1}handleOnInputChange(t){var e,n,r,o,s;let l=(n=(e=t==null?void 0:t.target)===null||e===void 0?void 0:e.value)!==null&&n!==void 0?n:"";const u=(r=this.filterOptions.triggerOnEveryKeyStroke)!==null&&r!==void 0?r:!1;if(l=this.trimWhitespaceWhenEnabled(l),this._clearFilterTriggered||l===""||u){const h={columnDef:this.columnDef,shouldTriggerQuery:this._shouldTriggerQuery};this._clearFilterTriggered?h.clearFilterTriggered=this._clearFilterTriggered:(h.operator=this.operator,h.searchTerms=[l]),l!==""?(this.isItemSelected=!0,(o=this._filterElm)===null||o===void 0||o.classList.add("filled")):(this.isItemSelected=!1,(s=this._filterElm)===null||s===void 0||s.classList.remove("filled")),this.callback(t,h)}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}renderRegularItem(t){var e;const n=typeof t=="string"?t:(e=t==null?void 0:t.label)!==null&&e!==void 0?e:"";return Re("div",{textContent:n||""})}renderCustomItem(t){var e,n,r;const o=(r=(n=(e=this._autocompleterOptions)===null||e===void 0?void 0:e.renderItem)===null||n===void 0?void 0:n.templateCallback(t))!==null&&r!==void 0?r:"",s=Ln(this.gridOptions,o)||"",l=document.createElement("div");return l.innerHTML=s,l}renderCollectionItem(t){var e,n;const r=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.enableRenderHtml)!==null&&n!==void 0?n:!1,o=t.labelPrefix||"",s=t.label||"",l=t.labelSuffix||"",u=o+s+l,h=Ln(this.gridOptions,u)||"",c=document.createElement("div");return c[r?"innerHTML":"textContent"]=h,c}trimWhitespaceWhenEnabled(t){let e=t;const n=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;return typeof t=="string"&&n&&(e=t.trim()),e}}var Xh=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Ql={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(a){return typeof console<"u"&&console.warn(a)},getWeek:function(a){var t=new Date(a.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var e=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},dd={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(a){var t=a%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Lr=function(a,t){return t===void 0&&(t=2),("000"+a).slice(t*-1)},_o=function(a){return a===!0?1:0};function Jm(a,t){var e;return function(){var n=this,r=arguments;clearTimeout(e),e=setTimeout(function(){return a.apply(n,r)},t)}}var qh=function(a){return a instanceof Array?a:[a]};function Er(a,t,e){if(e===!0)return a.classList.add(t);a.classList.remove(t)}function Ii(a,t,e){var n=window.document.createElement(a);return t=t||"",e=e||"",n.className=t,e!==void 0&&(n.textContent=e),n}function Ru(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function ev(a,t){if(t(a))return a;if(a.parentNode)return ev(a.parentNode,t)}function Pu(a,t){var e=Ii("div","numInputWrapper"),n=Ii("input","numInput "+a),r=Ii("span","arrowUp"),o=Ii("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?n.type="number":(n.type="text",n.pattern="\\d*"),t!==void 0)for(var s in t)n.setAttribute(s,t[s]);return e.appendChild(n),e.appendChild(r),e.appendChild(o),e}function Jr(a){try{if(typeof a.composedPath=="function"){var t=a.composedPath();return t[0]}return a.target}catch{return a.target}}var Kh=function(){},Fu=function(a,t,e){return e.months[t?"shorthand":"longhand"][a]},ob={D:Kh,F:function(a,t,e){a.setMonth(e.months.longhand.indexOf(t))},G:function(a,t){a.setHours((a.getHours()>=12?12:0)+parseFloat(t))},H:function(a,t){a.setHours(parseFloat(t))},J:function(a,t){a.setDate(parseFloat(t))},K:function(a,t,e){a.setHours(a.getHours()%12+12*_o(new RegExp(e.amPM[1],"i").test(t)))},M:function(a,t,e){a.setMonth(e.months.shorthand.indexOf(t))},S:function(a,t){a.setSeconds(parseFloat(t))},U:function(a,t){return new Date(parseFloat(t)*1e3)},W:function(a,t,e){var n=parseInt(t),r=new Date(a.getFullYear(),0,2+(n-1)*7,0,0,0,0);return r.setDate(r.getDate()-r.getDay()+e.firstDayOfWeek),r},Y:function(a,t){a.setFullYear(parseFloat(t))},Z:function(a,t){return new Date(t)},d:function(a,t){a.setDate(parseFloat(t))},h:function(a,t){a.setHours((a.getHours()>=12?12:0)+parseFloat(t))},i:function(a,t){a.setMinutes(parseFloat(t))},j:function(a,t){a.setDate(parseFloat(t))},l:Kh,m:function(a,t){a.setMonth(parseFloat(t)-1)},n:function(a,t){a.setMonth(parseFloat(t)-1)},s:function(a,t){a.setSeconds(parseFloat(t))},u:function(a,t){return new Date(parseFloat(t))},w:Kh,y:function(a,t){a.setFullYear(2e3+parseFloat(t))}},El={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ud={Z:function(a){return a.toISOString()},D:function(a,t,e){return t.weekdays.shorthand[ud.w(a,t,e)]},F:function(a,t,e){return Fu(ud.n(a,t,e)-1,!1,t)},G:function(a,t,e){return Lr(ud.h(a,t,e))},H:function(a){return Lr(a.getHours())},J:function(a,t){return t.ordinal!==void 0?a.getDate()+t.ordinal(a.getDate()):a.getDate()},K:function(a,t){return t.amPM[_o(a.getHours()>11)]},M:function(a,t){return Fu(a.getMonth(),!0,t)},S:function(a){return Lr(a.getSeconds())},U:function(a){return a.getTime()/1e3},W:function(a,t,e){return e.getWeek(a)},Y:function(a){return Lr(a.getFullYear(),4)},d:function(a){return Lr(a.getDate())},h:function(a){return a.getHours()%12?a.getHours()%12:12},i:function(a){return Lr(a.getMinutes())},j:function(a){return a.getDate()},l:function(a,t){return t.weekdays.longhand[a.getDay()]},m:function(a){return Lr(a.getMonth()+1)},n:function(a){return a.getMonth()+1},s:function(a){return a.getSeconds()},u:function(a){return a.getTime()},w:function(a){return a.getDay()},y:function(a){return String(a.getFullYear()).substring(2)}},tv=function(a){var t=a.config,e=t===void 0?Ql:t,n=a.l10n,r=n===void 0?dd:n,o=a.isMobile,s=o===void 0?!1:o;return function(l,u,h){var c=h||r;return e.formatDate!==void 0&&!s?e.formatDate(l,u,c):u.split("").map(function(p,m,v){return ud[p]&&v[m-1]!=="\\"?ud[p](l,c,e):p!=="\\"?p:""}).join("")}},Zh=function(a){var t=a.config,e=t===void 0?Ql:t,n=a.l10n,r=n===void 0?dd:n;return function(o,s,l,u){if(!(o!==0&&!o)){var h=u||r,c,p=o;if(o instanceof Date)c=new Date(o.getTime());else if(typeof o!="string"&&o.toFixed!==void 0)c=new Date(o);else if(typeof o=="string"){var m=s||(e||Ql).dateFormat,v=String(o).trim();if(v==="today")c=new Date,l=!0;else if(e&&e.parseDate)c=e.parseDate(o,m);else if(/Z$/.test(v)||/GMT$/.test(v))c=new Date(o);else{for(var _=void 0,C=[],x=0,S=0,E="";x<m.length;x++){var D=m[x],A=D==="\\",P=m[x-1]==="\\"||A;if(El[D]&&!P){E+=El[D];var M=new RegExp(E).exec(o);M&&(_=!0)&&C[D!=="Y"?"push":"unshift"]({fn:ob[D],val:M[++S]})}else A||(E+=".")}c=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),C.forEach(function(B){var Z=B.fn,L=B.val;return c=Z(c,L,h)||c}),c=_?c:void 0}}if(!(c instanceof Date&&!isNaN(c.getTime()))){e.errorHandler(new Error("Invalid date provided: "+p));return}return l===!0&&c.setHours(0,0,0,0),c}}};function eo(a,t,e){return e===void 0&&(e=!0),e!==!1?new Date(a.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):a.getTime()-t.getTime()}var sb=function(a,t,e){return a>Math.min(t,e)&&a<Math.max(t,e)},Qh=function(a,t,e){return a*3600+t*60+e},lb=function(a){var t=Math.floor(a/3600),e=(a-t*3600)/60;return[t,e,a-t*3600-e*60]},ab={DAY:864e5};function Jh(a){var t=a.defaultHour,e=a.defaultMinute,n=a.defaultSeconds;if(a.minDate!==void 0){var r=a.minDate.getHours(),o=a.minDate.getMinutes(),s=a.minDate.getSeconds();t<r&&(t=r),t===r&&e<o&&(e=o),t===r&&e===o&&n<s&&(n=a.minDate.getSeconds())}if(a.maxDate!==void 0){var l=a.maxDate.getHours(),u=a.maxDate.getMinutes();t=Math.min(t,l),t===l&&(e=Math.min(u,e)),t===l&&e===u&&(n=a.maxDate.getSeconds())}return{hours:t,minutes:e,seconds:n}}typeof Object.assign!="function"&&(Object.assign=function(a){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];if(!a)throw TypeError("Cannot convert undefined or null to object");for(var n=function(l){l&&Object.keys(l).forEach(function(u){return a[u]=l[u]})},r=0,o=t;r<o.length;r++){var s=o[r];n(s)}return a});var pr=function(){return pr=Object.assign||function(a){for(var t,e=1,n=arguments.length;e<n;e++){t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},pr.apply(this,arguments)},iv=function(){for(var a=0,t=0,e=arguments.length;t<e;t++)a+=arguments[t].length;for(var n=Array(a),r=0,t=0;t<e;t++)for(var o=arguments[t],s=0,l=o.length;s<l;s++,r++)n[r]=o[s];return n},db=300;function ub(a,t){var e={config:pr(pr({},Ql),On.defaultConfig),l10n:dd};e.parseDate=Zh({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=C,e._setHoursFromDate=m,e._positionCalendar=re,e.changeMonth=ne,e.changeYear=Ce,e.clear=pe,e.close=Ve,e.onMouseOver=St,e._createElement=Ii,e.createDay=M,e.destroy=Ye,e.isEnabled=be,e.jumpToDate=E,e.updateValue=Kt,e.open=k,e.redraw=me,e.set=Le,e.setDate=It,e.toggle=at;function n(){e.utils={getDaysInMonth:function(z,Q){return z===void 0&&(z=e.currentMonth),Q===void 0&&(Q=e.currentYear),z===1&&(Q%4===0&&Q%100!==0||Q%400===0)?29:e.l10n.daysInMonth[z]}}}function r(){e.element=e.input=a,e.isOpen=!1,ge(),X(),W(),q(),n(),e.isMobile||P(),S(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&m(e.config.noCalendar?e.latestSelectedDateObj:void 0),Kt(!1)),l();var z=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&z&&re(),st("onReady")}function o(){var z;return((z=e.calendarContainer)===null||z===void 0?void 0:z.getRootNode()).activeElement||document.activeElement}function s(z){return z.bind(e)}function l(){var z=e.config;z.weekNumbers===!1&&z.showMonths===1||z.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var Q=(e.days.offsetWidth+1)*z.showMonths;e.daysContainer.style.width=Q+"px",e.calendarContainer.style.width=Q+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function u(z){if(e.selectedDates.length===0){var Q=e.config.minDate===void 0||eo(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),he=Jh(e.config);Q.setHours(he.hours,he.minutes,he.seconds,Q.getMilliseconds()),e.selectedDates=[Q],e.latestSelectedDateObj=Q}z!==void 0&&z.type!=="blur"&&Mi(z);var Ee=e._input.value;p(),Kt(),e._input.value!==Ee&&e._debouncedChange()}function h(z,Q){return z%12+12*_o(Q===e.l10n.amPM[1])}function c(z){switch(z%24){case 0:case 12:return 12;default:return z%12}}function p(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var z=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,Q=(parseInt(e.minuteElement.value,10)||0)%60,he=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(z=h(z,e.amPM.textContent));var Ee=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&eo(e.latestSelectedDateObj,e.config.minDate,!0)===0,lt=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&eo(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var vt=Qh(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),it=Qh(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),wt=Qh(z,Q,he);if(wt>it&&wt<vt){var Ht=lb(vt);z=Ht[0],Q=Ht[1],he=Ht[2]}}else{if(lt){var Et=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;z=Math.min(z,Et.getHours()),z===Et.getHours()&&(Q=Math.min(Q,Et.getMinutes())),Q===Et.getMinutes()&&(he=Math.min(he,Et.getSeconds()))}if(Ee){var gt=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;z=Math.max(z,gt.getHours()),z===gt.getHours()&&Q<gt.getMinutes()&&(Q=gt.getMinutes()),Q===gt.getMinutes()&&(he=Math.max(he,gt.getSeconds()))}}v(z,Q,he)}}function m(z){var Q=z||e.latestSelectedDateObj;Q&&Q instanceof Date&&v(Q.getHours(),Q.getMinutes(),Q.getSeconds())}function v(z,Q,he){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(z%24,Q,he||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=Lr(e.config.time_24hr?z:(12+z)%12+12*_o(z%12===0)),e.minuteElement.value=Lr(Q),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[_o(z>=12)]),e.secondElement!==void 0&&(e.secondElement.value=Lr(he)))}function _(z){var Q=Jr(z),he=parseInt(Q.value)+(z.delta||0);(he/1e3>1||z.key==="Enter"&&!/[^\d]/.test(he.toString()))&&Ce(he)}function C(z,Q,he,Ee){if(Q instanceof Array)return Q.forEach(function(lt){return C(z,lt,he,Ee)});if(z instanceof Array)return z.forEach(function(lt){return C(lt,Q,he,Ee)});z.addEventListener(Q,he,Ee),e._handlers.push({remove:function(){return z.removeEventListener(Q,he,Ee)}})}function x(){st("onChange")}function S(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(he){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+he+"]"),function(Ee){return C(Ee,"click",e[he])})}),e.isMobile){ke();return}var z=Jm(ct,50);if(e._debouncedChange=Jm(x,db),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&C(e.daysContainer,"mouseover",function(he){e.config.mode==="range"&&St(Jr(he))}),C(e._input,"keydown",Ue),e.calendarContainer!==void 0&&C(e.calendarContainer,"keydown",Ue),!e.config.inline&&!e.config.static&&C(window,"resize",z),window.ontouchstart!==void 0?C(window.document,"touchstart",ce):C(window.document,"mousedown",ce),C(window.document,"focus",ce,{capture:!0}),e.config.clickOpens===!0&&(C(e._input,"focus",e.open),C(e._input,"click",e.open)),e.daysContainer!==void 0&&(C(e.monthNav,"click",Fi),C(e.monthNav,["keyup","increment"],_),C(e.daysContainer,"click",mt)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var Q=function(he){return Jr(he).select()};C(e.timeContainer,["increment"],u),C(e.timeContainer,"blur",u,{capture:!0}),C(e.timeContainer,"click",D),C([e.hourElement,e.minuteElement],["focus","click"],Q),e.secondElement!==void 0&&C(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&C(e.amPM,"click",function(he){u(he)})}e.config.allowInput&&C(e._input,"blur",ot)}function E(z,Q){var he=z!==void 0?e.parseDate(z):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),Ee=e.currentYear,lt=e.currentMonth;try{he!==void 0&&(e.currentYear=he.getFullYear(),e.currentMonth=he.getMonth())}catch(vt){vt.message="Invalid date supplied: "+he,e.config.errorHandler(vt)}Q&&e.currentYear!==Ee&&(st("onYearChange"),U()),Q&&(e.currentYear!==Ee||e.currentMonth!==lt)&&st("onMonthChange"),e.redraw()}function D(z){var Q=Jr(z);~Q.className.indexOf("arrow")&&A(z,Q.classList.contains("arrowUp")?1:-1)}function A(z,Q,he){var Ee=z&&Jr(z),lt=he||Ee&&Ee.parentNode&&Ee.parentNode.firstChild,vt=ht("increment");vt.delta=Q,lt&&lt.dispatchEvent(vt)}function P(){var z=window.document.createDocumentFragment();if(e.calendarContainer=Ii("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(z.appendChild(qe()),e.innerContainer=Ii("div","flatpickr-innerContainer"),e.config.weekNumbers){var Q=De(),he=Q.weekWrapper,Ee=Q.weekNumbers;e.innerContainer.appendChild(he),e.weekNumbers=Ee,e.weekWrapper=he}e.rContainer=Ii("div","flatpickr-rContainer"),e.rContainer.appendChild(xe()),e.daysContainer||(e.daysContainer=Ii("div","flatpickr-days"),e.daysContainer.tabIndex=-1),J(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),z.appendChild(e.innerContainer)}e.config.enableTime&&z.appendChild(Ie()),Er(e.calendarContainer,"rangeMode",e.config.mode==="range"),Er(e.calendarContainer,"animate",e.config.animate===!0),Er(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(z);var lt=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!lt&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var vt=Ii("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(vt,e.element),vt.appendChild(e.element),e.altInput&&vt.appendChild(e.altInput),vt.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function M(z,Q,he,Ee){var lt=be(Q,!0),vt=Ii("span",z,Q.getDate().toString());return vt.dateObj=Q,vt.$i=Ee,vt.setAttribute("aria-label",e.formatDate(Q,e.config.ariaDateFormat)),z.indexOf("hidden")===-1&&eo(Q,e.now)===0&&(e.todayDateElem=vt,vt.classList.add("today"),vt.setAttribute("aria-current","date")),lt?(vt.tabIndex=-1,Dt(Q)&&(vt.classList.add("selected"),e.selectedDateElem=vt,e.config.mode==="range"&&(Er(vt,"startRange",e.selectedDates[0]&&eo(Q,e.selectedDates[0],!0)===0),Er(vt,"endRange",e.selectedDates[1]&&eo(Q,e.selectedDates[1],!0)===0),z==="nextMonthDay"&&vt.classList.add("inRange")))):vt.classList.add("flatpickr-disabled"),e.config.mode==="range"&&Lt(Q)&&!Dt(Q)&&vt.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&z!=="prevMonthDay"&&Ee%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(Q)+"</span>"),st("onDayCreate",vt),vt}function B(z){z.focus(),e.config.mode==="range"&&St(z)}function Z(z){for(var Q=z>0?0:e.config.showMonths-1,he=z>0?e.config.showMonths:-1,Ee=Q;Ee!=he;Ee+=z)for(var lt=e.daysContainer.children[Ee],vt=z>0?0:lt.children.length-1,it=z>0?lt.children.length:-1,wt=vt;wt!=it;wt+=z){var Ht=lt.children[wt];if(Ht.className.indexOf("hidden")===-1&&be(Ht.dateObj))return Ht}}function L(z,Q){for(var he=z.className.indexOf("Month")===-1?z.dateObj.getMonth():e.currentMonth,Ee=Q>0?e.config.showMonths:-1,lt=Q>0?1:-1,vt=he-e.currentMonth;vt!=Ee;vt+=lt)for(var it=e.daysContainer.children[vt],wt=he-e.currentMonth===vt?z.$i+Q:Q<0?it.children.length-1:0,Ht=it.children.length,Et=wt;Et>=0&&Et<Ht&&Et!=(Q>0?Ht:-1);Et+=lt){var gt=it.children[Et];if(gt.className.indexOf("hidden")===-1&&be(gt.dateObj)&&Math.abs(z.$i-Et)>=Math.abs(Q))return B(gt)}e.changeMonth(lt),ae(Z(lt),0)}function ae(z,Q){var he=o(),Ee=He(he||document.body),lt=z!==void 0?z:Ee?he:e.selectedDateElem!==void 0&&He(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&He(e.todayDateElem)?e.todayDateElem:Z(Q>0?1:-1);lt===void 0?e._input.focus():Ee?L(lt,Q):B(lt)}function _e(z,Q){for(var he=(new Date(z,Q,1).getDay()-e.l10n.firstDayOfWeek+7)%7,Ee=e.utils.getDaysInMonth((Q-1+12)%12,z),lt=e.utils.getDaysInMonth(Q,z),vt=window.document.createDocumentFragment(),it=e.config.showMonths>1,wt=it?"prevMonthDay hidden":"prevMonthDay",Ht=it?"nextMonthDay hidden":"nextMonthDay",Et=Ee+1-he,gt=0;Et<=Ee;Et++,gt++)vt.appendChild(M("flatpickr-day "+wt,new Date(z,Q-1,Et),Et,gt));for(Et=1;Et<=lt;Et++,gt++)vt.appendChild(M("flatpickr-day",new Date(z,Q,Et),Et,gt));for(var ei=lt+1;ei<=42-he&&(e.config.showMonths===1||gt%7!==0);ei++,gt++)vt.appendChild(M("flatpickr-day "+Ht,new Date(z,Q+1,ei%lt),ei,gt));var Ai=Ii("div","dayContainer");return Ai.appendChild(vt),Ai}function J(){if(e.daysContainer!==void 0){Ru(e.daysContainer),e.weekNumbers&&Ru(e.weekNumbers);for(var z=document.createDocumentFragment(),Q=0;Q<e.config.showMonths;Q++){var he=new Date(e.currentYear,e.currentMonth,1);he.setMonth(e.currentMonth+Q),z.appendChild(_e(he.getFullYear(),he.getMonth()))}e.daysContainer.appendChild(z),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&St()}}function U(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var z=function(Ee){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&Ee<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&Ee>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var Q=0;Q<12;Q++)if(z(Q)){var he=Ii("option","flatpickr-monthDropdown-month");he.value=new Date(e.currentYear,Q).getMonth().toString(),he.textContent=Fu(Q,e.config.shorthandCurrentMonth,e.l10n),he.tabIndex=-1,e.currentMonth===Q&&(he.selected=!0),e.monthsDropdownContainer.appendChild(he)}}}function F(){var z=Ii("div","flatpickr-month"),Q=window.document.createDocumentFragment(),he;e.config.showMonths>1||e.config.monthSelectorType==="static"?he=Ii("span","cur-month"):(e.monthsDropdownContainer=Ii("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),C(e.monthsDropdownContainer,"change",function(it){var wt=Jr(it),Ht=parseInt(wt.value,10);e.changeMonth(Ht-e.currentMonth),st("onMonthChange")}),U(),he=e.monthsDropdownContainer);var Ee=Pu("cur-year",{tabindex:"-1"}),lt=Ee.getElementsByTagName("input")[0];lt.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&lt.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(lt.setAttribute("max",e.config.maxDate.getFullYear().toString()),lt.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var vt=Ii("div","flatpickr-current-month");return vt.appendChild(he),vt.appendChild(Ee),Q.appendChild(vt),z.appendChild(Q),{container:z,yearElement:lt,monthElement:he}}function de(){Ru(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var z=e.config.showMonths;z--;){var Q=F();e.yearElements.push(Q.yearElement),e.monthElements.push(Q.monthElement),e.monthNav.appendChild(Q.container)}e.monthNav.appendChild(e.nextMonthNav)}function qe(){return e.monthNav=Ii("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=Ii("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=Ii("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,de(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(z){e.__hidePrevMonthArrow!==z&&(Er(e.prevMonthNav,"flatpickr-disabled",z),e.__hidePrevMonthArrow=z)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(z){e.__hideNextMonthArrow!==z&&(Er(e.nextMonthNav,"flatpickr-disabled",z),e.__hideNextMonthArrow=z)}}),e.currentYearElement=e.yearElements[0],Ot(),e.monthNav}function Ie(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var z=Jh(e.config);e.timeContainer=Ii("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var Q=Ii("span","flatpickr-time-separator",":"),he=Pu("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=he.getElementsByTagName("input")[0];var Ee=Pu("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=Ee.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=Lr(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?z.hours:c(z.hours)),e.minuteElement.value=Lr(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():z.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(he),e.timeContainer.appendChild(Q),e.timeContainer.appendChild(Ee),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var lt=Pu("flatpickr-second");e.secondElement=lt.getElementsByTagName("input")[0],e.secondElement.value=Lr(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():z.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(Ii("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(lt)}return e.config.time_24hr||(e.amPM=Ii("span","flatpickr-am-pm",e.l10n.amPM[_o((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function xe(){e.weekdayContainer?Ru(e.weekdayContainer):e.weekdayContainer=Ii("div","flatpickr-weekdays");for(var z=e.config.showMonths;z--;){var Q=Ii("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(Q)}return Oe(),e.weekdayContainer}function Oe(){if(e.weekdayContainer){var z=e.l10n.firstDayOfWeek,Q=iv(e.l10n.weekdays.shorthand);z>0&&z<Q.length&&(Q=iv(Q.splice(z,Q.length),Q.splice(0,z)));for(var he=e.config.showMonths;he--;)e.weekdayContainer.children[he].innerHTML=`
19
19
  <span class='flatpickr-weekday'>
20
20
  `+Q.join("</span><span class='flatpickr-weekday'>")+`
21
21
  </span>
22
22
  `}}function De(){e.calendarContainer.classList.add("hasWeeks");var z=Ii("div","flatpickr-weekwrapper");z.appendChild(Ii("span","flatpickr-weekday",e.l10n.weekAbbreviation));var Q=Ii("div","flatpickr-weeks");return z.appendChild(Q),{weekWrapper:z,weekNumbers:Q}}function ne(z,Q){Q===void 0&&(Q=!0);var he=Q?z:z-e.currentMonth;he<0&&e._hidePrevMonthArrow===!0||he>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=he,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,st("onYearChange"),U()),J(),st("onMonthChange"),Ot())}function pe(z,Q){if(z===void 0&&(z=!0),Q===void 0&&(Q=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,Q===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var he=Jh(e.config),Ee=he.hours,lt=he.minutes,vt=he.seconds;v(Ee,lt,vt)}e.redraw(),z&&st("onChange")}function Ve(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),st("onClose")}function Ye(){e.config!==void 0&&st("onDestroy");for(var z=e._handlers.length;z--;)e._handlers[z].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var Q=e.calendarContainer.parentNode;if(Q.lastChild&&Q.removeChild(Q.lastChild),Q.parentNode){for(;Q.firstChild;)Q.parentNode.insertBefore(Q.firstChild,Q);Q.parentNode.removeChild(Q)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(he){try{delete e[he]}catch{}})}function ze(z){return e.calendarContainer.contains(z)}function ce(z){if(e.isOpen&&!e.config.inline){var Q=Jr(z),he=ze(Q),Ee=Q===e.input||Q===e.altInput||e.element.contains(Q)||z.path&&z.path.indexOf&&(~z.path.indexOf(e.input)||~z.path.indexOf(e.altInput)),lt=!Ee&&!he&&!ze(z.relatedTarget),vt=!e.config.ignoredFocusElements.some(function(it){return it.contains(Q)});lt&&vt&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&u(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function Ce(z){if(!(!z||e.config.minDate&&z<e.config.minDate.getFullYear()||e.config.maxDate&&z>e.config.maxDate.getFullYear())){var Q=z,he=e.currentYear!==Q;e.currentYear=Q||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),he&&(e.redraw(),st("onYearChange"),U())}}function be(z,Q){var he;Q===void 0&&(Q=!0);var Ee=e.parseDate(z,void 0,Q);if(e.config.minDate&&Ee&&eo(Ee,e.config.minDate,Q!==void 0?Q:!e.minDateHasTime)<0||e.config.maxDate&&Ee&&eo(Ee,e.config.maxDate,Q!==void 0?Q:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(Ee===void 0)return!1;for(var lt=!!e.config.enable,vt=(he=e.config.enable)!==null&&he!==void 0?he:e.config.disable,it=0,wt=void 0;it<vt.length;it++){if(wt=vt[it],typeof wt=="function"&&wt(Ee))return lt;if(wt instanceof Date&&Ee!==void 0&&wt.getTime()===Ee.getTime())return lt;if(typeof wt=="string"){var Ht=e.parseDate(wt,void 0,!0);return Ht&&Ht.getTime()===Ee.getTime()?lt:!lt}else if(typeof wt=="object"&&Ee!==void 0&&wt.from&&wt.to&&Ee.getTime()>=wt.from.getTime()&&Ee.getTime()<=wt.to.getTime())return lt}return!lt}function He(z){return e.daysContainer!==void 0?z.className.indexOf("hidden")===-1&&z.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(z):!1}function ot(z){var Q=z.target===e._input,he=e._input.value.trimEnd()!==zt();Q&&he&&!(z.relatedTarget&&ze(z.relatedTarget))&&e.setDate(e._input.value,!0,z.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Ue(z){var Q=Jr(z),he=e.config.wrap?a.contains(Q):Q===e._input,Ee=e.config.allowInput,lt=e.isOpen&&(!Ee||!he),vt=e.config.inline&&he&&!Ee;if(z.keyCode===13&&he){if(Ee)return e.setDate(e._input.value,!0,Q===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),Q.blur();e.open()}else if(ze(Q)||lt||vt){var it=!!e.timeContainer&&e.timeContainer.contains(Q);switch(z.keyCode){case 13:it?(z.preventDefault(),u(),We()):mt(z);break;case 27:z.preventDefault(),We();break;case 8:case 46:he&&!e.config.allowInput&&(z.preventDefault(),e.clear());break;case 37:case 39:if(!it&&!he){z.preventDefault();var wt=o();if(e.daysContainer!==void 0&&(Ee===!1||wt&&He(wt))){var Ht=z.keyCode===39?1:-1;z.ctrlKey?(z.stopPropagation(),ne(Ht),ae(Z(1),0)):ae(void 0,Ht)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:z.preventDefault();var Et=z.keyCode===40?1:-1;e.daysContainer&&Q.$i!==void 0||Q===e.input||Q===e.altInput?z.ctrlKey?(z.stopPropagation(),Ce(e.currentYear-Et),ae(Z(1),0)):it||ae(void 0,Et*7):Q===e.currentYearElement?Ce(e.currentYear-Et):e.config.enableTime&&(!it&&e.hourElement&&e.hourElement.focus(),u(z),e._debouncedChange());break;case 9:if(it){var gt=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(zi){return zi}),ei=gt.indexOf(Q);if(ei!==-1){var Ai=gt[ei+(z.shiftKey?-1:1)];z.preventDefault(),(Ai||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(Q)&&z.shiftKey&&(z.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&Q===e.amPM)switch(z.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],p(),Kt();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],p(),Kt();break}(he||ze(Q))&&st("onKeyDown",z)}function St(z,Q){if(Q===void 0&&(Q="flatpickr-day"),!(e.selectedDates.length!==1||z&&(!z.classList.contains(Q)||z.classList.contains("flatpickr-disabled")))){for(var he=z?z.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),Ee=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),lt=Math.min(he,e.selectedDates[0].getTime()),vt=Math.max(he,e.selectedDates[0].getTime()),it=!1,wt=0,Ht=0,Et=lt;Et<vt;Et+=ab.DAY)be(new Date(Et),!0)||(it=it||Et>lt&&Et<vt,Et<Ee&&(!wt||Et>wt)?wt=Et:Et>Ee&&(!Ht||Et<Ht)&&(Ht=Et));var gt=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+Q));gt.forEach(function(ei){var Ai=ei.dateObj,zi=Ai.getTime(),Zt=wt>0&&zi<wt||Ht>0&&zi>Ht;if(Zt){ei.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Ni){ei.classList.remove(Ni)});return}else if(it&&!Zt)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Ni){ei.classList.remove(Ni)}),z!==void 0&&(z.classList.add(he<=e.selectedDates[0].getTime()?"startRange":"endRange"),Ee<he&&zi===Ee?ei.classList.add("startRange"):Ee>he&&zi===Ee&&ei.classList.add("endRange"),zi>=wt&&(Ht===0||zi<=Ht)&&sb(zi,Ee,he)&&ei.classList.add("inRange"))})}}function ct(){e.isOpen&&!e.config.static&&!e.config.inline&&re()}function k(z,Q){if(Q===void 0&&(Q=e._positionElement),e.isMobile===!0){if(z){z.preventDefault();var he=Jr(z);he&&he.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),st("onOpen");return}else if(e._input.disabled||e.config.inline)return;var Ee=e.isOpen;e.isOpen=!0,Ee||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),st("onOpen"),re(Q)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(z===void 0||!e.timeContainer.contains(z.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function ee(z){return function(Q){var he=e.config["_"+z+"Date"]=e.parseDate(Q,e.config.dateFormat),Ee=e.config["_"+(z==="min"?"max":"min")+"Date"];he!==void 0&&(e[z==="min"?"minDateHasTime":"maxDateHasTime"]=he.getHours()>0||he.getMinutes()>0||he.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(lt){return be(lt)}),!e.selectedDates.length&&z==="min"&&m(he),Kt()),e.daysContainer&&(me(),he!==void 0?e.currentYearElement[z]=he.getFullYear().toString():e.currentYearElement.removeAttribute(z),e.currentYearElement.disabled=!!Ee&&he!==void 0&&Ee.getFullYear()===he.getFullYear())}}function ge(){var z=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Q=pr(pr({},JSON.parse(JSON.stringify(a.dataset||{}))),t),he={};e.config.parseDate=Q.parseDate,e.config.formatDate=Q.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(gt){e.config._enable=bi(gt)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(gt){e.config._disable=bi(gt)}});var Ee=Q.mode==="time";if(!Q.dateFormat&&(Q.enableTime||Ee)){var lt=On.defaultConfig.dateFormat||Ql.dateFormat;he.dateFormat=Q.noCalendar||Ee?"H:i"+(Q.enableSeconds?":S":""):lt+" H:i"+(Q.enableSeconds?":S":"")}if(Q.altInput&&(Q.enableTime||Ee)&&!Q.altFormat){var vt=On.defaultConfig.altFormat||Ql.altFormat;he.altFormat=Q.noCalendar||Ee?"h:i"+(Q.enableSeconds?":S K":" K"):vt+(" h:i"+(Q.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:ee("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:ee("max")});var it=function(gt){return function(ei){e.config[gt==="min"?"_minTime":"_maxTime"]=e.parseDate(ei,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:it("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:it("max")}),Q.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,he,Q);for(var wt=0;wt<z.length;wt++)e.config[z[wt]]=e.config[z[wt]]===!0||e.config[z[wt]]==="true";Xh.filter(function(gt){return e.config[gt]!==void 0}).forEach(function(gt){e.config[gt]=qh(e.config[gt]||[]).map(s)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var wt=0;wt<e.config.plugins.length;wt++){var Ht=e.config.plugins[wt](e)||{};for(var Et in Ht)Xh.indexOf(Et)>-1?e.config[Et]=qh(Ht[Et]).map(s).concat(e.config[Et]):typeof Q[Et]>"u"&&(e.config[Et]=Ht[Et])}Q.altInputClass||(e.config.altInputClass=$().className+" "+e.config.altInputClass),st("onParseConfig")}function $(){return e.config.wrap?a.querySelector("[data-input]"):a}function X(){typeof e.config.locale!="object"&&typeof On.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=pr(pr({},On.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?On.l10ns[e.config.locale]:void 0),El.D="("+e.l10n.weekdays.shorthand.join("|")+")",El.l="("+e.l10n.weekdays.longhand.join("|")+")",El.M="("+e.l10n.months.shorthand.join("|")+")",El.F="("+e.l10n.months.longhand.join("|")+")",El.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var z=pr(pr({},t),JSON.parse(JSON.stringify(a.dataset||{})));z.time_24hr===void 0&&On.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=tv(e),e.parseDate=Zh({config:e.config,l10n:e.l10n})}function re(z){if(typeof e.config.position=="function")return void e.config.position(e,z);if(e.calendarContainer!==void 0){st("onPreCalendarPosition");var Q=z||e._positionElement,he=Array.prototype.reduce.call(e.calendarContainer.children,function(Gi,Li){return Gi+Li.offsetHeight},0),Ee=e.calendarContainer.offsetWidth,lt=e.config.position.split(" "),vt=lt[0],it=lt.length>1?lt[1]:null,wt=Q.getBoundingClientRect(),Ht=window.innerHeight-wt.bottom,Et=vt==="above"||vt!=="below"&&Ht<he&&wt.top>he,gt=window.pageYOffset+wt.top+(Et?-he-2:Q.offsetHeight+2);if(Er(e.calendarContainer,"arrowTop",!Et),Er(e.calendarContainer,"arrowBottom",Et),!e.config.inline){var ei=window.pageXOffset+wt.left,Ai=!1,zi=!1;it==="center"?(ei-=(Ee-wt.width)/2,Ai=!0):it==="right"&&(ei-=Ee-wt.width,zi=!0),Er(e.calendarContainer,"arrowLeft",!Ai&&!zi),Er(e.calendarContainer,"arrowCenter",Ai),Er(e.calendarContainer,"arrowRight",zi);var Zt=window.document.body.offsetWidth-(window.pageXOffset+wt.right),Ni=ei+Ee>window.document.body.offsetWidth,Bn=Zt+Ee>window.document.body.offsetWidth;if(Er(e.calendarContainer,"rightMost",Ni),!e.config.static)if(e.calendarContainer.style.top=gt+"px",!Ni)e.calendarContainer.style.left=ei+"px",e.calendarContainer.style.right="auto";else if(!Bn)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=Zt+"px";else{var fn=Pe();if(fn===void 0)return;var Ct=window.document.body.offsetWidth,Se=Math.max(0,Ct/2-Ee/2),Xe=".flatpickr-calendar.centerMost:before",xt=".flatpickr-calendar.centerMost:after",ti=fn.cssRules.length,Ui="{left:"+wt.left+"px;right:auto;}";Er(e.calendarContainer,"rightMost",!1),Er(e.calendarContainer,"centerMost",!0),fn.insertRule(Xe+","+xt+Ui,ti),e.calendarContainer.style.left=Se+"px",e.calendarContainer.style.right="auto"}}}}function Pe(){for(var z=null,Q=0;Q<document.styleSheets.length;Q++){var he=document.styleSheets[Q];if(he.cssRules){try{he.cssRules}catch{continue}z=he;break}}return z??Fe()}function Fe(){var z=document.createElement("style");return document.head.appendChild(z),z.sheet}function me(){e.config.noCalendar||e.isMobile||(U(),Ot(),J())}function We(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function mt(z){z.preventDefault(),z.stopPropagation();var Q=function(gt){return gt.classList&&gt.classList.contains("flatpickr-day")&&!gt.classList.contains("flatpickr-disabled")&&!gt.classList.contains("notAllowed")},he=ev(Jr(z),Q);if(he!==void 0){var Ee=he,lt=e.latestSelectedDateObj=new Date(Ee.dateObj.getTime()),vt=(lt.getMonth()<e.currentMonth||lt.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=Ee,e.config.mode==="single")e.selectedDates=[lt];else if(e.config.mode==="multiple"){var it=Dt(lt);it?e.selectedDates.splice(parseInt(it),1):e.selectedDates.push(lt)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=lt,e.selectedDates.push(lt),eo(lt,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(gt,ei){return gt.getTime()-ei.getTime()}));if(p(),vt){var wt=e.currentYear!==lt.getFullYear();e.currentYear=lt.getFullYear(),e.currentMonth=lt.getMonth(),wt&&(st("onYearChange"),U()),st("onMonthChange")}if(Ot(),J(),Kt(),!vt&&e.config.mode!=="range"&&e.config.showMonths===1?B(Ee):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var Ht=e.config.mode==="single"&&!e.config.enableTime,Et=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(Ht||Et)&&We()}x()}}var Ge={locale:[X,Oe],showMonths:[de,l,xe],minDate:[E],maxDate:[E],positionElement:[ve],clickOpens:[function(){e.config.clickOpens===!0?(C(e._input,"focus",e.open),C(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Le(z,Q){if(z!==null&&typeof z=="object"){Object.assign(e.config,z);for(var he in z)Ge[he]!==void 0&&Ge[he].forEach(function(Ee){return Ee()})}else e.config[z]=Q,Ge[z]!==void 0?Ge[z].forEach(function(Ee){return Ee()}):Xh.indexOf(z)>-1&&(e.config[z]=qh(Q));e.redraw(),Kt(!0)}function jt(z,Q){var he=[];if(z instanceof Array)he=z.map(function(Ee){return e.parseDate(Ee,Q)});else if(z instanceof Date||typeof z=="number")he=[e.parseDate(z,Q)];else if(typeof z=="string")switch(e.config.mode){case"single":case"time":he=[e.parseDate(z,Q)];break;case"multiple":he=z.split(e.config.conjunction).map(function(Ee){return e.parseDate(Ee,Q)});break;case"range":he=z.split(e.l10n.rangeSeparator).map(function(Ee){return e.parseDate(Ee,Q)});break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(z)));e.selectedDates=e.config.allowInvalidPreload?he:he.filter(function(Ee){return Ee instanceof Date&&be(Ee,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(Ee,lt){return Ee.getTime()-lt.getTime()})}function It(z,Q,he){if(Q===void 0&&(Q=!1),he===void 0&&(he=e.config.dateFormat),z!==0&&!z||z instanceof Array&&z.length===0)return e.clear(Q);jt(z,he),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),E(void 0,Q),m(),e.selectedDates.length===0&&e.clear(!1),Kt(Q),Q&&st("onChange")}function bi(z){return z.slice().map(function(Q){return typeof Q=="string"||typeof Q=="number"||Q instanceof Date?e.parseDate(Q,void 0,!0):Q&&typeof Q=="object"&&Q.from&&Q.to?{from:e.parseDate(Q.from,void 0),to:e.parseDate(Q.to,void 0)}:Q}).filter(function(Q){return Q})}function q(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var z=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);z&&jt(z,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function W(){if(e.input=$(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=Ii(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),ve()}function ve(){e._positionElement=e.config.positionElement||e._input}function ke(){var z=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=Ii("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=z,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=z==="datetime-local"?"Y-m-d\\TH:i:S":z==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}C(e.mobileInput,"change",function(Q){e.setDate(Jr(Q).value,!1,e.mobileFormatStr),st("onChange"),st("onClose")})}function at(z){if(e.isOpen===!0)return e.close();e.open(z)}function st(z,Q){if(e.config!==void 0){var he=e.config[z];if(he!==void 0&&he.length>0)for(var Ee=0;he[Ee]&&Ee<he.length;Ee++)he[Ee](e.selectedDates,e.input.value,e,Q);z==="onChange"&&(e.input.dispatchEvent(ht("change")),e.input.dispatchEvent(ht("input")))}}function ht(z){var Q=document.createEvent("Event");return Q.initEvent(z,!0,!0),Q}function Dt(z){for(var Q=0;Q<e.selectedDates.length;Q++){var he=e.selectedDates[Q];if(he instanceof Date&&eo(he,z)===0)return""+Q}return!1}function Lt(z){return e.config.mode!=="range"||e.selectedDates.length<2?!1:eo(z,e.selectedDates[0])>=0&&eo(z,e.selectedDates[1])<=0}function Ot(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(z,Q){var he=new Date(e.currentYear,e.currentMonth,1);he.setMonth(e.currentMonth+Q),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[Q].textContent=Fu(he.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=he.getMonth().toString(),z.value=he.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function zt(z){var Q=z||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(he){return e.formatDate(he,Q)}).filter(function(he,Ee,lt){return e.config.mode!=="range"||e.config.enableTime||lt.indexOf(he)===Ee}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function Kt(z){z===void 0&&(z=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=zt(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=zt(e.config.altFormat)),z!==!1&&st("onValueUpdate")}function Fi(z){var Q=Jr(z),he=e.prevMonthNav.contains(Q),Ee=e.nextMonthNav.contains(Q);he||Ee?ne(he?-1:1):e.yearElements.indexOf(Q)>=0?Q.select():Q.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):Q.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Mi(z){z.preventDefault();var Q=z.type==="keydown",he=Jr(z),Ee=he;e.amPM!==void 0&&he===e.amPM&&(e.amPM.textContent=e.l10n.amPM[_o(e.amPM.textContent===e.l10n.amPM[0])]);var lt=parseFloat(Ee.getAttribute("min")),vt=parseFloat(Ee.getAttribute("max")),it=parseFloat(Ee.getAttribute("step")),wt=parseInt(Ee.value,10),Ht=z.delta||(Q?z.which===38?1:-1:0),Et=wt+it*Ht;if(typeof Ee.value<"u"&&Ee.value.length===2){var gt=Ee===e.hourElement,ei=Ee===e.minuteElement;Et<lt?(Et=vt+Et+_o(!gt)+(_o(gt)&&_o(!e.amPM)),ei&&A(void 0,-1,e.hourElement)):Et>vt&&(Et=Ee===e.hourElement?Et-vt-_o(!e.amPM):lt,ei&&A(void 0,1,e.hourElement)),e.amPM&&gt&&(it===1?Et+wt===23:Math.abs(Et-wt)>it)&&(e.amPM.textContent=e.l10n.amPM[_o(e.amPM.textContent===e.l10n.amPM[0])]),Ee.value=Lr(Et)}}return r(),e}function Jl(a,t){for(var e=Array.prototype.slice.call(a).filter(function(s){return s instanceof HTMLElement}),n=[],r=0;r<e.length;r++){var o=e[r];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=ub(o,t||{}),n.push(o._flatpickr)}catch(s){console.error(s)}}return n.length===1?n[0]:n}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(a){return Jl(this,a)},HTMLElement.prototype.flatpickr=function(a){return Jl([this],a)});var On=function(a,t){return typeof a=="string"?Jl(window.document.querySelectorAll(a),t):a instanceof Node?Jl([a],t):Jl(a,t)};On.defaultConfig={},On.l10ns={en:pr({},dd),default:pr({},dd)},On.localize=function(a){On.l10ns.default=pr(pr({},On.l10ns.default),a)},On.setDefaults=function(a){On.defaultConfig=pr(pr({},On.defaultConfig),a)},On.parseDate=Zh({}),On.formatDate=tv({}),On.compareDates=eo,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(a){return Jl(this,a)}),Date.prototype.fp_incr=function(a){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof a=="string"?parseInt(a,10):a))},typeof window<"u"&&(window.flatpickr=On);const cd=Object.freeze(Object.defineProperty({__proto__:null,default:On},Symbol.toStringTag,{value:"Module"}));var ef,tf;const cb=(ef=cd==null?void 0:On)!==null&&ef!==void 0?ef:cd,nv=(tf=hs==null?void 0:Us)!==null&&tf!==void 0?tf:hs;class rv{constructor(t){this.translaterService=t,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.inputFilterType="range",this.searchTerms=[],this._bindEventService=new Nn}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get columnFilter(){return this.columnDef&&this.columnDef.filter||{}}get currentDateOrDates(){return this._currentDateOrDates}get defaultOperator(){return this.inputFilterType==="compound"?Nt.empty:this.gridOptions.defaultFilterRangeOperator||Nt.rangeInclusive}get flatpickrOptions(){return this._flatpickrOptions||{}}get operator(){var t,e;return this.inputFilterType==="compound"?this._operator||this.columnFilter.operator||this.defaultOperator:(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.inputFilterType==="compound"?this._operator=t:this.columnFilter&&(this.columnFilter.operator=t)}init(t){var e;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.inputFilterType==="compound"&&(this.operator=t.operator||""),this.searchTerms=(e=t==null?void 0:t.searchTerms)!==null&&e!==void 0?e:[],this.filterContainerElm=t.filterContainerElm;const n=this.inputFilterType==="compound"?Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"":this.searchTerms;this._filterElm=this.createDomFilterElement(n),this._bindEventService.bind(this._filterDivInputElm,"keyup",this.onTriggerEvent.bind(this)),this._selectOperatorElm&&this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this))}clear(t=!0){this.flatInstance&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[],this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0),this.flatInstance.input&&this.flatInstance.clear()),this._filterElm.classList.remove("filled"),this._filterDivInputElm.classList.remove("filled")}destroy(){var t,e,n,r,o;this._bindEventService.unbindAll(),typeof((t=this.flatInstance)===null||t===void 0?void 0:t.destroy)=="function"&&(this.flatInstance.destroy(),this.flatInstance.element&&bh(this.flatInstance)),on(this.filterContainerElm),on(this._filterDivInputElm),(e=this._filterDivInputElm)===null||e===void 0||e.remove(),(n=this.filterContainerElm)===null||n===void 0||n.remove(),(r=this._selectOperatorElm)===null||r===void 0||r.remove(),(o=this._filterElm)===null||o===void 0||o.remove()}hide(){var t;typeof((t=this.flatInstance)===null||t===void 0?void 0:t.close)=="function"&&this.flatInstance.close()}show(){var t;typeof((t=this.flatInstance)===null||t===void 0?void 0:t.open)=="function"&&this.flatInstance.open()}getValues(){return this._currentDateOrDates}setValues(t,e){let n;this.inputFilterType==="compound"?n=Array.isArray(t)?t[0]:t:typeof t=="string"||Array.isArray(t)&&typeof t[0]=="string"&&t[0].indexOf("..")>0?n=typeof t=="string"?[t]:t[0].split(".."):Array.isArray(t)&&(n=t),this.flatInstance&&(this._currentDateOrDates=t&&n?n:void 0,this.flatInstance.setDate(this._currentDateOrDates||""));const r=this.getValues()||[];if(this.getValues()||Array.isArray(r)&&r.length>0&&t?(this._filterElm.classList.add("filled"),this._filterDivInputElm.classList.add("filled")):(this._filterElm.classList.remove("filled"),this._filterDivInputElm.classList.remove("filled")),this.operator=e||this.defaultOperator,e&&this._selectOperatorElm){const o=zl(this.operator);this._selectOperatorElm.value=o}}buildDatePickerInput(t){var e,n,r,o,s,l,u,h,c,p;const m=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",v=Ua(this.columnFilter.type||this.columnDef.type||ie.dateIso),_=Ua(this.columnDef.outputType||this.columnFilter.type||this.columnDef.type||ie.dateUtc),C=(o=(r=this.columnFilter)===null||r===void 0?void 0:r.filterOptions)!==null&&o!==void 0?o:{};let x=((s=C==null?void 0:C.locale)!==null&&s!==void 0?s:(u=(l=this.translaterService)===null||l===void 0?void 0:l.getCurrentLanguage)===null||u===void 0?void 0:u.call(l))||this.gridOptions.locale||"en";(x==null?void 0:x.length)>2&&(x=x.substring(0,2));let S;if(this.inputFilterType==="compound")t&&(S=t,this._currentDateOrDates=t);else if(typeof t=="string"||Array.isArray(t)&&typeof t[0]=="string"&&t[0].indexOf("..")>0?S=typeof t=="string"?[t]:t[0].split(".."):Array.isArray(t)&&(S=t),Array.isArray(S)){this._currentDateOrDates=S;const P=Fr(this.columnFilter.type||this.columnDef.type||ie.dateIso);this._currentDateStrings=S.map(M=>nv(M).format(P))}const E={defaultDate:S||"",altInput:!0,altFormat:_,dateFormat:v,mode:this.inputFilterType==="range"?"range":"single",wrap:!0,closeOnSelect:!0,locale:x,onChange:(P,M)=>{if(this.inputFilterType==="compound")this._currentValue=M,this._currentDateOrDates=Array.isArray(P)&&P[0]||void 0;else if(Array.isArray(P)){this._currentDateOrDates=P;const Z=Fr(this.columnDef.outputType||this.columnFilter.type||this.columnDef.type||ie.dateIso);this._currentDateStrings=P.map(L=>nv(L).format(Z)),this._currentValue=this._currentDateStrings.join("..")}const B=E.enableTime?new Event("keyup"):void 0;this.onTriggerEvent(B)},errorHandler:P=>{P.toString().includes("invalid locale")&&console.warn(`[Slickgrid-Universal] Flatpickr missing locale imports (${x}), will revert to English as the default locale.
23
- See Flatpickr Localization for more info, for example if we want to use French, then we can import it with: import 'flatpickr/dist/l10n/fr';`)}};_&&(_==="Z"||_.toLowerCase().includes("h"))&&(E.enableTime=!0),this._flatpickrOptions={...E,...C};let D=(c=(h=this.gridOptions)===null||h===void 0?void 0:h.defaultFilterPlaceholder)!==null&&c!==void 0?c:"";!((p=this.columnFilter)===null||p===void 0)&&p.placeholder&&(D=this.columnFilter.placeholder);const A=Re("div",{className:"flatpickr"});return this.inputFilterType==="range"&&A.classList.add("search-filter",`filter-${m}`),A.appendChild(Re("input",{type:"text",className:"form-control",placeholder:D,dataset:{input:"",columnid:`${m}`}})),this.flatInstance=cb(A,this._flatpickrOptions),A}getOperatorOptionValues(){var t;return!((t=this.columnFilter)===null||t===void 0)&&t.compoundOperatorList?this.columnFilter.compoundOperatorList:jh(this.gridOptions,this.translaterService)}createDomFilterElement(t){var e,n;const r=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"";if(on(this.filterContainerElm),this._filterDivInputElm=this.buildDatePickerInput(t),this.inputFilterType==="range")return Array.isArray(t)&&t.length>0&&t[0]!==""&&(this._filterDivInputElm.classList.add("filled"),this._currentDateOrDates=t,this._currentValue=t[0]),this._filterDivInputElm&&this.filterContainerElm.appendChild(this._filterDivInputElm),this._filterDivInputElm;{this._selectOperatorElm=Yh(this.getOperatorOptionValues(),this.gridOptions);const o=Re("div",{className:`form-group search-filter filter-${r}`}),s=Re("div",{className:"input-group flatpickr"},o);if(Re("div",{className:"input-group-addon input-group-prepend operator"},s).appendChild(this._selectOperatorElm),s.appendChild(this._filterDivInputElm),this.operator){const u=zl(this.operator);this._selectOperatorElm.value=u}return t!==""&&(this._filterDivInputElm.classList.add("filled"),this._currentDateOrDates=t,this._currentValue=t),o&&this.filterContainerElm.appendChild(o),o}}onTriggerEvent(t){var e,n;if(this._clearFilterTriggered)this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled");else if(this.inputFilterType==="range")this._currentDateStrings?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),this.callback(t,{columnDef:this.columnDef,searchTerms:this._currentDateStrings?this._currentDateStrings:[this._currentValue],operator:this.operator||"",shouldTriggerQuery:this._shouldTriggerQuery});else if(this.inputFilterType==="compound"&&this._selectOperatorElm){const r=this._selectOperatorElm.value;this._currentValue?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),(!((n=(e=this.columnFilter.skipCompoundOperatorFilterWithNullInput)!==null&&e!==void 0?e:this.gridOptions.skipCompoundOperatorFilterWithNullInput)!==null&&n!==void 0?n:this.gridOptions.skipCompoundOperatorFilterWithNullInput===void 0)||this._currentDateOrDates!==void 0)&&this.callback(t,{columnDef:this.columnDef,searchTerms:this._currentValue?[this._currentValue]:null,operator:r||"",shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}class hb extends rv{constructor(t){super(t),this.translaterService=t,this.inputFilterType="compound"}}class Xs{constructor(t){this.translaterService=t,this._debounceTypingDelay=0,this._shouldTriggerQuery=!0,this._inputType="text",this.inputFilterType="single",this.searchTerms=[],this._bindEventService=new Nn}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get defaultOperator(){return Nt.empty}get inputType(){return this._inputType}set inputType(t){this._inputType=t}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}get gridOptions(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions())!==null&&e!==void 0?e:{}}init(t){var e,n,r,o,s,l;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.inputFilterType==="compound"&&(this.operator=t.operator||""),this.searchTerms=(e=t==null?void 0:t.searchTerms)!==null&&e!==void 0?e:[],this._cellContainerElm=t.filterContainerElm;const u=(n=this.gridOptions)===null||n===void 0?void 0:n.backendServiceApi;this._debounceTypingDelay=(l=u?(r=u==null?void 0:u.filterTypingDebounce)!==null&&r!==void 0?r:(o=this.gridOptions)===null||o===void 0?void 0:o.defaultBackendServiceFilterTypingDebounce:(s=this.gridOptions)===null||s===void 0?void 0:s.filterTypingDebounce)!==null&&l!==void 0?l:0;const h=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.createDomFilterElement(h),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change"],this.onTriggerEvent.bind(this)),this._bindEventService.bind(this._filterInputElm,"wheel",this.onTriggerEvent.bind(this),{passive:!0}),this.inputFilterType==="compound"&&this._selectOperatorElm&&this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this))}clear(t=!0){this._filterInputElm&&(this._shouldTriggerQuery=t,this.searchTerms=[],this._filterInputElm.value="",this._currentValue=void 0,this.inputFilterType==="compound"&&this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0,this._filterContainerElm.classList.remove("filled")),this._filterInputElm.classList.remove("filled"),this.onTriggerEvent(void 0,!0))}destroy(){var t,e,n,r;this._bindEventService.unbindAll(),(e=(t=this._selectOperatorElm)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t),(r=(n=this._filterInputElm)===null||n===void 0?void 0:n.remove)===null||r===void 0||r.call(n)}getValues(){return this._filterInputElm.value}setValues(t,e){const n=Array.isArray(t)?t:[t];let r="";for(const o of n)this.inputFilterType==="single"?r=e?this.addOptionalOperatorIntoSearchString(o,e):o:r=`${o}`,this._filterInputElm.value=`${r??""}`,this._currentValue=this._filterInputElm.value;if(this.getValues()!==""?(this._filterContainerElm.classList.add("filled"),this._filterInputElm.classList.add("filled")):(this._filterContainerElm.classList.remove("filled"),this._filterInputElm.classList.remove("filled")),this.operator=e||this.defaultOperator,e&&this._selectOperatorElm){const o=zl(this.operator);this._selectOperatorElm.value=o}}addOptionalOperatorIntoSearchString(t,e){let n="",r="",o=t==null?"":`${t}`;if(e&&o){switch(e){case"<>":case"!=":case"=":case"==":case">":case">=":case"<":case"<=":n=e;break;case"EndsWith":case"*z":n="*";break;case"StartsWith":case"a*":r="*";break}o=`${n}${o}${r}`}return o}getCompoundOperatorOptionValues(){var t;const e=this.columnDef.type&&this.columnDef.type?this.columnDef.type:ie.string;let n=[];if(!((t=this.columnFilter)===null||t===void 0)&&t.compoundOperatorList)return this.columnFilter.compoundOperatorList;switch(e){case ie.string:case ie.text:case ie.readonly:case ie.password:n=nb(this.gridOptions,this.translaterService);break;default:n=jh(this.gridOptions,this.translaterService);break}return n}createDomFilterElement(t){var e,n,r,o,s,l,u;const h=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"";on(this._cellContainerElm);let c=(o=(r=this.gridOptions)===null||r===void 0?void 0:r.defaultFilterPlaceholder)!==null&&o!==void 0?o:"";!((s=this.columnFilter)===null||s===void 0)&&s.placeholder&&(c=this.columnFilter.placeholder);const p=`${t??""}`;if(this._filterInputElm=Re("input",{type:this._inputType||"text",autocomplete:"off",ariaAutoComplete:"none",placeholder:c,ariaLabel:(u=(l=this.columnFilter)===null||l===void 0?void 0:l.ariaLabel)!==null&&u!==void 0?u:`${qr(h+"")} Search Filter`,className:`form-control filter-${h}`,value:p,dataset:{columnid:`${h}`}}),t&&this._filterInputElm.classList.add("filled"),t!==void 0&&(this._currentValue=p),this.inputFilterType==="single")this._filterContainerElm=this._filterInputElm,this._filterInputElm.classList.add("search-filter"),this._cellContainerElm.appendChild(this._filterInputElm),this._cellContainerElm.appendChild(document.createElement("span"));else{this._filterInputElm.classList.add("compound-input"),this._selectOperatorElm=Yh(this.getCompoundOperatorOptionValues(),this.gridOptions),this._filterContainerElm=Re("div",{className:`form-group search-filter filter-${h}`});const m=Re("div",{className:"input-group"},this._filterContainerElm);Re("div",{className:"input-group-addon input-group-prepend operator"},m).appendChild(this._selectOperatorElm),m.appendChild(this._filterInputElm),m.appendChild(Re("span")),this.operator&&(this._selectOperatorElm.value=zl(this.operator)),this._filterContainerElm&&this._cellContainerElm.appendChild(this._filterContainerElm)}}onTriggerEvent(t,e=!1){var n,r,o,s,l;if(e)this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:e,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterContainerElm.classList.remove("filled");else{const u=(n=t==null?void 0:t.type)!==null&&n!==void 0?n:"",h=(o=(r=this._selectOperatorElm)===null||r===void 0?void 0:r.value)!==null&&o!==void 0?o:this.operator;let c=this._filterInputElm.value;const p=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;typeof c=="string"&&p&&(c=c.trim()),((s=t==null?void 0:t.target)===null||s===void 0?void 0:s.tagName.toLowerCase())!=="select"&&(this._currentValue=c),c===""?this._filterContainerElm.classList.remove("filled"):this._filterContainerElm.classList.add("filled");const m={columnDef:this.columnDef,operator:h,searchTerms:c?[c]:null,shouldTriggerQuery:this._shouldTriggerQuery},v=u==="keyup"&&(t==null?void 0:t.key)!=="Enter"?this._debounceTypingDelay:0,_=(l=this.columnFilter.skipCompoundOperatorFilterWithNullInput)!==null&&l!==void 0?l:this.gridOptions.skipCompoundOperatorFilterWithNullInput;(this.inputFilterType==="single"||!_||this._currentValue!==void 0)&&(v>0?(clearTimeout(this._timer),this._timer=setTimeout(()=>this.callback(t,m),v)):this.callback(t,m))}this._shouldTriggerQuery=!0}}class ov extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="text",this.inputFilterType="compound"}}class fb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="number",this.inputFilterType="compound"}}class pb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="password",this.inputFilterType="compound"}}const nf="#86bff8",Mu=0,mb=20;class rf{constructor(t){this.translaterService=t,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._sliderTrackFilledColor=nf,this.sliderType="double",this.searchTerms=[],this._bindEventService=new Nn}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get currentValue(){return this._currentValue}get currentValues(){return this._currentValues}get defaultOperator(){return this.sliderType==="compound"?Nt.empty:this.sliderType==="single"?Nt.greaterThanOrEqual:this.gridOptions.defaultFilterRangeOperator||Nt.rangeInclusive}get gridOptions(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions())!==null&&e!==void 0?e:{}}get sliderOptions(){return this._sliderOptions}get operator(){var t,e;return this._operator||((e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator)}set operator(t){this._operator=t}init(t){var e;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.operator=t.operator||"",this.searchTerms=(e=t==null?void 0:t.searchTerms)!==null&&e!==void 0?e:[],this._argFilterContainerElm=t.filterContainerElm,this._sliderTrackFilledColor=window.getComputedStyle(document.documentElement).getPropertyValue("--slick-slider-filter-filled-track-color")||nf,this._filterElm=this.createDomFilterElement(this.searchTerms)}clear(t=!0){var e,n,r,o,s,l;if(this._filterElm){this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[];const u=+((e=Jn(this.columnFilter,"sliderStartValue"))!==null&&e!==void 0?e:je.SLIDER_DEFAULT_MIN_VALUE),h=+((n=Jn(this.columnFilter,"sliderEndValue"))!==null&&n!==void 0?n:je.SLIDER_DEFAULT_MAX_VALUE);this.sliderType==="double"?(this._sliderLeftInputElm&&(this._sliderLeftInputElm.value=`${u}`),this._sliderRightInputElm&&(this._sliderRightInputElm.value=`${h}`),this._currentValues=[u,h],(r=this._sliderLeftInputElm)===null||r===void 0||r.dispatchEvent(new Event("change")),(o=this._sliderRightInputElm)===null||o===void 0||o.dispatchEvent(new Event("change"))):(this._sliderRightInputElm&&(this._sliderRightInputElm.value=`${u}`),this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0),this._currentValue=u,(s=this._sliderRightInputElm)===null||s===void 0||s.dispatchEvent(new Event("change"))),((l=Jn(this.columnFilter,"hideSliderNumber"))!==null&&l!==void 0?l:Jn(this.columnFilter,"hideSliderNumbers"))||(this.sliderType==="double"?this.renderSliderValues(u,h):this.renderSliderValues(void 0,u)),this._divContainerFilterElm.classList.remove("filled"),this._filterElm.classList.remove("filled"),this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:t,searchTerms:[]})}}destroy(){var t,e,n;this._bindEventService.unbindAll(),(t=this._sliderTrackElm)===null||t===void 0||t.remove(),(e=this._sliderLeftInputElm)===null||e===void 0||e.remove(),(n=this._sliderRightInputElm)===null||n===void 0||n.remove()}renderSliderValues(t,e){var n,r;!((n=this._leftSliderNumberElm)===null||n===void 0)&&n.textContent&&t&&(this._leftSliderNumberElm.textContent=t.toString()),!((r=this._rightSliderNumberElm)===null||r===void 0)&&r.textContent&&e&&(this._rightSliderNumberElm.textContent=e.toString())}getValues(){return this.sliderType==="double"?this._currentValues:this._currentValue}setValues(t,e){var n;if(t){let s=[];const l=Array.isArray(t)?t==null?void 0:t[0]:t;if(Array.isArray(t)&&t.length===2?s=t:typeof l=="string"&&l.indexOf("..")>0?(s=l.split(".."),this._currentValue=+((n=s==null?void 0:s[0])!==null&&n!==void 0?n:0)):(Kd(l)||l==="")&&(this._currentValue=l===null?void 0:+l,s=[l]),this.sliderType!=="double"&&this._sliderRightInputElm)this._sliderRightInputElm.value=typeof t=="string"?t:`${l}`,this.renderSliderValues(void 0,this._sliderRightInputElm.value);else if(Array.isArray(s)&&s.length===2&&!Jn(this.columnFilter,"hideSliderNumbers")){const[u,h]=s;this._sliderLeftInputElm&&(this._sliderLeftInputElm.value=String(u??je.SLIDER_DEFAULT_MIN_VALUE)),this._sliderRightInputElm&&(this._sliderRightInputElm.value=String(h??je.SLIDER_DEFAULT_MAX_VALUE)),this.renderSliderValues(...s)}}else this._currentValue=void 0,this._currentValues=void 0;const r=this.getValues();if((r===void 0?[]:Array.isArray(r)?r:[r]).length>0?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),e!==void 0&&(this.operator=e),this.operator&&this._selectOperatorElm){const s=zl(this.operator);this._selectOperatorElm.value=s}}createDomFilterElement(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E,D;const A=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",P=+((o=(r=this.columnFilter)===null||r===void 0?void 0:r.minValue)!==null&&o!==void 0?o:je.SLIDER_DEFAULT_MIN_VALUE),M=+((l=(s=this.columnFilter)===null||s===void 0?void 0:s.maxValue)!==null&&l!==void 0?l:je.SLIDER_DEFAULT_MAX_VALUE),B=+((h=(u=this.columnFilter)===null||u===void 0?void 0:u.valueStep)!==null&&h!==void 0?h:je.SLIDER_DEFAULT_STEP);on(this._argFilterContainerElm);const Z=+((p=(c=Array.isArray(t)&&(t==null?void 0:t[0]))!==null&&c!==void 0?c:Jn(this.columnFilter,"sliderStartValue"))!==null&&p!==void 0?p:P),L=+((v=(m=Array.isArray(t)&&(t==null?void 0:t[1]))!==null&&m!==void 0?m:Jn(this.columnFilter,"sliderEndValue"))!==null&&v!==void 0?v:M);if(this._sliderRangeContainElm=Re("div",{className:`filter-input filter-${A} slider-input-container slider-values`,title:this.sliderType==="double"?`${Z} - ${L}`:`${Z}`}),this._sliderTrackElm=Re("div",{className:"slider-track"}),this.sliderType==="compound"){const U=Re("span",{className:"input-group-addon input-group-prepend operator"});this._selectOperatorElm=Yh(this.getOperatorOptionValues(),this.gridOptions),U.appendChild(this._selectOperatorElm)}this.sliderType==="double"&&(this._sliderLeftInputElm=Re("input",{type:"range",className:"slider-filter-input",ariaLabel:(C=(_=this.columnFilter)===null||_===void 0?void 0:_.ariaLabel)!==null&&C!==void 0?C:`${qr(A+"")} Search Filter`,defaultValue:`${Z}`,value:`${Z}`,min:`${P}`,max:`${M}`,step:`${B}`}));const ae=this.sliderType==="double"?L:Z;this._sliderRightInputElm=Re("input",{type:"range",className:"slider-filter-input",ariaLabel:(S=(x=this.columnFilter)===null||x===void 0?void 0:x.ariaLabel)!==null&&S!==void 0?S:`${qr(A+"")} Search Filter`,defaultValue:`${ae}`,value:`${ae}`,min:`${P}`,max:`${M}`,step:`${B}`});const _e=(E=Jn(this.columnFilter,"hideSliderNumber"))!==null&&E!==void 0?E:Jn(this.columnFilter,"hideSliderNumbers"),J=_e?"":"input-group";if(this._divContainerFilterElm=Re("div",{className:`${J} search-filter slider-container slider-values filter-${A}`.trim()}),this._sliderRangeContainElm.appendChild(this._sliderTrackElm),this.sliderType==="double"&&this._sliderLeftInputElm&&this._sliderRangeContainElm.appendChild(this._sliderLeftInputElm),this._sliderRangeContainElm.appendChild(this._sliderRightInputElm),_e)this._divContainerFilterElm.appendChild(this._sliderRangeContainElm);else{let U;this.sliderType==="compound"&&this._selectOperatorElm?(U=Re("span",{className:"input-group-addon input-group-prepend operator"}),U.appendChild(this._selectOperatorElm)):this.sliderType==="double"&&(U=Re("div",{className:"input-group-addon input-group-prepend slider-range-value"}),this._leftSliderNumberElm=Re("span",{className:`input-group-text lowest-range-${A}`,textContent:`${Z}`}),U.appendChild(this._leftSliderNumberElm));const F=Re("div",{className:"input-group-addon input-group-append slider-range-value"});this._rightSliderNumberElm=Re("span",{className:`input-group-text highest-range-${A}`,textContent:`${ae}`},F),U&&this._divContainerFilterElm.appendChild(U),this._divContainerFilterElm.appendChild(this._sliderRangeContainElm),this._divContainerFilterElm.appendChild(F)}return this._sliderOptions={minValue:P,maxValue:M,step:B},this._currentValues=[Z,L],Array.isArray(t)&&t.length>0&&t[0]!==""&&(this._divContainerFilterElm.classList.add("filled"),this._currentValue=Z),(Jn(this.columnFilter,"sliderStartValue")!==void 0||((D=this.columnFilter)===null||D===void 0?void 0:D.minValue)!==void 0)&&(this._currentValue=Z),this._argFilterContainerElm.appendChild(this._divContainerFilterElm),this.updateTrackFilledColorWhenEnabled(),this._bindEventService.bind(this._sliderTrackElm,"click",this.sliderTrackClicked.bind(this)),this._bindEventService.bind(this._sliderRightInputElm,["input","change"],this.slideRightInputChanged.bind(this)),this._bindEventService.bind(this._sliderRightInputElm,["change","mouseup","touchend"],this.onValueChanged.bind(this)),this.sliderType==="compound"&&this._selectOperatorElm?this._bindEventService.bind(this._selectOperatorElm,["change"],this.onValueChanged.bind(this)):this.sliderType==="double"&&this._sliderLeftInputElm&&(this._bindEventService.bind(this._sliderLeftInputElm,["input","change"],this.slideLeftInputChanged.bind(this)),this._bindEventService.bind(this._sliderLeftInputElm,["change","mouseup","touchend"],this.onValueChanged.bind(this))),this._divContainerFilterElm}getOperatorOptionValues(){var t;return!((t=this.columnFilter)===null||t===void 0)&&t.compoundOperatorList?this.columnFilter.compoundOperatorList:jh(this.gridOptions,this.translaterService)}onValueChanged(t){var e,n,r,o,s,l,u,h,c;const p=parseInt((n=(e=this._sliderRightInputElm)===null||e===void 0?void 0:e.value)!==null&&n!==void 0?n:"",10);let m,v;if(this.sliderType==="compound"||this.sliderType==="single")((o=(r=t==null?void 0:t.target)===null||r===void 0?void 0:r.tagName)===null||o===void 0?void 0:o.toLowerCase())!=="select"&&(this._currentValue=+p),m=this._currentValue,v=[m||"0"];else if(this.sliderType==="double"){const C=[parseInt((l=(s=this._sliderLeftInputElm)===null||s===void 0?void 0:s.value)!==null&&l!==void 0?l:"",10),p];m=C.join(".."),v=C}if(this._clearFilterTriggered)this._filterElm.classList.remove("filled"),this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,searchTerms:[],shouldTriggerQuery:this._shouldTriggerQuery});else{const _=(h=(u=this._selectOperatorElm)===null||u===void 0?void 0:u.value)!==null&&h!==void 0?h:this.operator;m===""?this._filterElm.classList.remove("filled"):this._filterElm.classList.add("filled");const C=(c=this.columnFilter.skipCompoundOperatorFilterWithNullInput)!==null&&c!==void 0?c:this.gridOptions.skipCompoundOperatorFilterWithNullInput;(this.sliderType!=="compound"||!C||this._currentValue!==void 0)&&this.callback(t,{columnDef:this.columnDef,operator:_||"",searchTerms:v,shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.changeBothSliderFocuses(!1),this.grid.onHeaderRowMouseEnter.notify({column:this.columnDef,grid:this.grid},{...new Slick.EventData,target:this._argFilterContainerElm})}changeBothSliderFocuses(t){var e,n;const r=t?"add":"remove";(e=this._sliderLeftInputElm)===null||e===void 0||e.classList[r]("focus"),(n=this._sliderRightInputElm)===null||n===void 0||n.classList[r]("focus")}slideLeftInputChanged(){var t,e,n,r;const o=parseInt((e=(t=this._sliderLeftInputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:"",10),s=parseInt((r=(n=this._sliderRightInputElm)===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:"",10);this._sliderLeftInputElm&&s-o<=Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu)&&(this._sliderLeftInputElm.value=String(o-Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu))),this._sliderLeftInputElm&&this._sliderRightInputElm&&(+this._sliderLeftInputElm.value>=+this._sliderRightInputElm.value-mb?(this._sliderLeftInputElm.style.zIndex="1",this._sliderRightInputElm.style.zIndex="0"):(this._sliderLeftInputElm.style.zIndex="0",this._sliderRightInputElm.style.zIndex="1")),this.sliderLeftOrRightChanged(o,s)}slideRightInputChanged(){var t,e,n,r;const o=parseInt((e=(t=this._sliderLeftInputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:"",10),s=parseInt((r=(n=this._sliderRightInputElm)===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:"",10);this.sliderType==="double"&&this._sliderRightInputElm&&s-o<=Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu)&&(this._sliderRightInputElm.value=String(o+Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu))),this.sliderLeftOrRightChanged(o,s)}sliderLeftOrRightChanged(t,e){var n,r,o,s,l,u,h;this.updateTrackFilledColorWhenEnabled(),this.changeBothSliderFocuses(!0),this._sliderRangeContainElm.title=this.sliderType==="double"?`${t} - ${e}`:`${e}`,((n=Jn(this.columnFilter,"hideSliderNumber"))!==null&&n!==void 0?n:Jn(this.columnFilter,"hideSliderNumbers"))||(!((r=this._leftSliderNumberElm)===null||r===void 0)&&r.textContent&&(this._leftSliderNumberElm.textContent=(s=(o=this._sliderLeftInputElm)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:""),!((l=this._rightSliderNumberElm)===null||l===void 0)&&l.textContent&&(this._rightSliderNumberElm.textContent=(h=(u=this._sliderRightInputElm)===null||u===void 0?void 0:u.value)!==null&&h!==void 0?h:"")),this.grid.onHeaderRowMouseEnter.notify({column:this.columnDef,grid:this.grid},{...new Slick.EventData,target:this._argFilterContainerElm})}sliderTrackClicked(t){t.preventDefault();const e=t.offsetX,n=this._sliderTrackElm.offsetWidth,r=(e+0)*100/n;this._sliderRightInputElm&&this.sliderType!=="double"?(this._sliderRightInputElm.value=`${r}`,this._sliderRightInputElm.dispatchEvent(new Event("change"))):this._sliderLeftInputElm&&this._sliderRightInputElm&&(r<=50?(this._sliderLeftInputElm.value=`${r}`,this._sliderLeftInputElm.dispatchEvent(new Event("change"))):(this._sliderRightInputElm.value=`${r}`,this._sliderRightInputElm.dispatchEvent(new Event("change"))))}updateTrackFilledColorWhenEnabled(){var t,e,n,r;if(Jn(this.columnFilter,"enableSliderTrackColoring")&&this._sliderRightInputElm){let o=0;this._sliderLeftInputElm&&(o=(+this._sliderLeftInputElm.value-+this._sliderLeftInputElm.min)/((e=(t=this.sliderOptions)===null||t===void 0?void 0:t.maxValue)!==null&&e!==void 0?e:0-+this._sliderLeftInputElm.min)*100);const s=(+this._sliderRightInputElm.value-+this._sliderRightInputElm.min)/((r=(n=this.sliderOptions)===null||n===void 0?void 0:n.maxValue)!==null&&r!==void 0?r:0-+this._sliderRightInputElm.min)*100,l="linear-gradient(to right, %b %p1, %c %p1, %c %p2, %b %p2)".replace(/%b/g,"#eee").replace(/%c/g,Jn(this.columnFilter,"sliderTrackFilledColor")||this._sliderTrackFilledColor||nf).replace(/%p1/g,`${o}%`).replace(/%p2/g,`${s}%`);this._sliderTrackElm.style.background=l,this._sliderOptions.sliderTrackBackground=l}}}class vb extends rf{constructor(t){super(t),this.translaterService=t,super.sliderType="compound"}}class gb extends rv{constructor(t){super(t),this.translaterService=t,this.inputFilterType="range"}}class _b extends Xs{constructor(t){super(t),this.translaterService=t,this._inputMask="",this.inputType="text"}get inputMask(){return this._inputMask}init(t){var e,n,r,o;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this._cellContainerElm=t.filterContainerElm,!((n=(e=this.columnDef)===null||e===void 0?void 0:e.params)===null||n===void 0)&&n.mask?this._inputMask=this.columnDef.params.mask:!((o=(r=this.columnFilter)===null||r===void 0?void 0:r.params)===null||o===void 0)&&o.mask&&(this._inputMask=this.columnFilter.params.mask),!this._inputMask)throw new Error(`[Slickgrid-Universal] The Filters.inputMask requires the mask to be passed in the filter params or the column definition params
24
- for example:: this.columnDefinitions: [{ id: 'phone', field: 'phone', filter: { model: Filters.inputMask, params: { mask: '000-000-0000' }}}]`);const s=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.createDomFilterElement(s),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change"],this.onTriggerEvent.bind(this))}onTriggerEvent(t,e=!1){var n,r,o;let s="";if(!((n=t==null?void 0:t.target)===null||n===void 0)&&n.value){let l=(o=(r=t==null?void 0:t.target)===null||r===void 0?void 0:r.value)!==null&&o!==void 0?o:"";const u=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;typeof l=="string"&&u&&(l=l.trim());const h=this.unmaskValue(l),c=this.maskValue(h);s=h,(t==null?void 0:t.keyCode)>=48&&(this._filterInputElm.value=c,t.preventDefault())}e?(this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:e,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterInputElm.classList.remove("filled")):(this._filterInputElm.classList.add("filled"),this.callback(t,{columnDef:this.columnDef,operator:this.operator,searchTerms:[s],shouldTriggerQuery:this._shouldTriggerQuery})),this._shouldTriggerQuery=!0}maskValue(t){let e=0,n="";return this._inputMask&&(n=this._inputMask.replace(/[09A]/gi,r=>((r==="0"||r==="9")&&/\d+/g.test(t[e])||r.toUpperCase()==="A"&&/[^\d]+/gi.test(t[e]))&&t[e++]||"")),n}unmaskValue(t){const e=t.replace(/[^0-9a-z]*/gi,""),n=this._inputMask.replace(/[^0-9a-z]*/gi,"");let r="";for(let o=0;o<n.length;o++)e[o]&&((n[o]==="0"||n[o]==="9")&&/\d+/g.test(e[o])||n[o].toUpperCase()==="A"&&/[^\d]+/gi.test(e[o]))&&(r+=e[o]);return r}}class bb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="number"}}class Cb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="password"}}var yb=Object.defineProperty,Eb=(a,t,e)=>t in a?yb(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,Wt=(a,t,e)=>(Eb(a,typeof t!="symbol"?t+"":t,e),e),Sb=class{constructor(a){Wt(this,"_distinctEvent"),Wt(this,"_boundedEvents",[]),this._distinctEvent=(a==null?void 0:a.distinctEvent)??!1}get boundedEvents(){return this._boundedEvents}dispose(){this.unbindAll(),this._boundedEvents=[]}bind(a,t,e,n){let r=Array.isArray(t)?t:[t];if(a!=null&&a.forEach)a==null||a.forEach(o=>{for(let s of r)(!this._distinctEvent||this._distinctEvent&&!this.hasBinding(o,s))&&(o.addEventListener(s,e,n),this._boundedEvents.push({element:o,eventName:s,listener:e}))});else for(let o of r)(!this._distinctEvent||this._distinctEvent&&!this.hasBinding(a,o))&&(a.addEventListener(o,e,n),this._boundedEvents.push({element:a,eventName:o,listener:e}))}hasBinding(a,t){return this._boundedEvents.some(e=>e.element===a&&(!t||e.eventName===t))}unbind(a,t,e){var n;if(a){let r=Array.isArray(a)?a:[a],o=Array.isArray(t)?t||"":[t||""];for(let s of r){e||(e=this._boundedEvents.find(l=>{if(l.element===s&&(!t||l.eventName===t))return l.listener}));for(let l of o)(n=s==null?void 0:s.removeEventListener)==null||n.call(s,l,e)}}}unbindAll(){for(;this._boundedEvents.length>0;){let a=this._boundedEvents.pop(),{element:t,eventName:e,listener:n}=a;this.unbind(t,e,n)}}},sv=typeof window<"u"&&window.multipleSelect!==void 0?window.multipleSelect:{locales:{}};sv.locales={"en-US":{formatSelectAll(){return"[Select all]"},formatAllSelected(){return"All selected"},formatCountSelected(a,t){return`${a} of ${t} selected`},formatNoMatchesFound(){return"No matches found"},formatOkButton(){return"OK"}}};var lv=sv.locales,wb=50,xb=4,av={name:"",placeholder:"",classes:"",classPrefix:"",data:void 0,locale:void 0,selectAll:!0,single:void 0,singleRadio:!1,multiple:!1,hideOptgroupCheckboxes:!1,multipleWidth:80,width:void 0,dropWidth:void 0,maxHeight:250,maxHeightUnit:"px",position:"bottom",displayValues:!1,displayTitle:!1,displayDelimiter:", ",minimumCountSelected:3,ellipsis:!1,isOpen:!1,keepOpen:!1,openOnHover:!1,container:null,filter:!1,filterGroup:!1,filterPlaceholder:"",filterAcceptOnEnter:!1,filterByDataLength:void 0,customFilter(a){let{text:t,label:e,search:n}=a;return(e||t||"").includes(n)},showClear:!1,autoAdjustDropHeight:!1,autoAdjustDropPosition:!1,autoAdjustDropWidthByTextSize:!1,adjustedHeightPadding:10,useSelectOptionLabel:!1,useSelectOptionLabelToHtml:!1,cssStyler:()=>null,styler:()=>!1,textTemplate:a=>a.innerHTML.trim(),labelTemplate:a=>a.label,onOpen:()=>!1,onClose:()=>!1,onCheckAll:()=>!1,onUncheckAll:()=>!1,onFocus:()=>!1,onBlur:()=>!1,onOptgroupClick:()=>!1,onBeforeClick:()=>!0,onClick:()=>!1,onFilter:()=>!1,onClear:()=>!1,onAfterCreate:()=>!1,onDestroy:()=>!1,onAfterDestroy:()=>!1,onDestroyed:()=>!1},Tb=["init","getOptions","refreshOptions","getSelects","setSelects","enable","disable","open","close","check","uncheck","checkAll","uncheckAll","checkInvert","focus","blur","refresh","destroy"];Object.assign(av,lv["en-US"]);var Ob={BLOCK_ROWS:wb,CLUSTER_BLOCKS:xb,DEFAULTS:av,METHODS:Tb},Lo=Ob;function Ab(a,t,e=!1){let n=Object.keys(a),r=Object.keys(t);if(e&&n.length!==r.length)return!1;for(let o of n)if(r.includes(o)&&a[o]!==t[o])return!1;return!0}function of(a){let t=()=>{let r={};for(let o in a)Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=of(a[o]));return r},e=()=>a.map(r=>of(r)),n=Object.prototype.toString.call(a).slice(8,-1).toLowerCase();return n==="object"?t():n==="array"?e():a}function sf(a){return a!=null&&a!==""}function kb(a,t){return typeof a=="object"?Object.fromEntries(t?Object.entries(a).filter(([e,n])=>!sf(n)&&!t.includes(e)||sf(n)):Object.entries(a).filter(([e,n])=>sf(n))):a}function Ib(a){let t=0;return a.forEach((e,n)=>{e.type==="optgroup"?(e._key=`group_${n}`,e.visible=typeof e.visible>"u"?!0:e.visible,e.children.forEach((r,o)=>{r&&(r.visible=typeof(r==null?void 0:r.visible)>"u"?!0:r.visible,r.divider||(r._key=`option_${n}_${o}`,t+=1))})):(e.visible=typeof e.visible>"u"?!0:e.visible,e.divider||(e._key=`option_${n}`,t+=1))}),t}function Nu(a,t,e){if(Array.isArray(a))for(let n of a){if(n[t]===e||n[t]===`${+n[t]}`&&+n[t]===e)return n;if(n.type==="optgroup"){for(let r of n.children)if(r&&(r[t]===e||r[t]===`${+r[t]}`&&+r[t]===e))return r}}}function Db(a){return a.replace(/(\b)(on[a-z]+)(\s*)=([^>]*)|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(&lt;|&#60;)(\/*)(script|script defer)(.*)(&#62;|&gt;|&gt;">)/gi,"")}function lf(a){return Object.keys(a).forEach(t=>a[t]===void 0?delete a[t]:""),a}function Rb(a){return a.replace(/[\W_]+(.)/g,(t,e)=>e.toUpperCase())}function ea(a){return typeof a!="string"?a:a.normalize?a.normalize("NFD").replace(/[\u0300-\u036F]/g,""):[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}].reduce((t,{letters:e,base:n})=>t.replace(e,n),a)}function dv(a){let t={};if(a){let e=a.replace(/\s/g,"").split(";");for(let n of e){let[r,o]=n.trim().split(":");r&&(t[Rb(r)]=o.trim())}console.warn("[multiple-select-vanilla] Please note that `styler` is deprecated, please migrate to `cssStyler` when possible.")}return t}function af(a){let t=0,e=0,n=0,r=0,o=window.innerHeight??0,s=window.innerWidth??0,l=Fb(),u=l.top,h=l.left,c=cf(a);if(c){let p=c.top??0,m=c.left??0;e=p-u,t=o-(p-u),n=m-h,r=s-(m-h)}return{top:e,bottom:t,left:n,right:r}}function Hr(a,t,e){let n=document.createElement(a);return t&&Object.keys(t).forEach(r=>{let o=t[r];typeof o=="object"?Object.assign(n[r],o):n[r]=t[r]}),e!=null&&e.appendChild&&e.appendChild(n),n}function uv(a,t,e){var o;let n="";(o=a.props)!=null&&o.innerHTML&&(n=a.props.innerHTML,delete a.props.innerHTML);let r=Hr(a.tagName,kb(a.props,["class","title","style"]),t);if(n&&(r.innerHTML=n),a.attrs)for(let s of Object.keys(a.attrs))r.setAttribute(s,a.attrs[s]);if(a.children)for(let s of a.children)uv(s,r);return t==null||t.appendChild(r),r}function df(a){return a.hasOwnProperty("tagName")?uv(a):document.createElement("li")}function uf(a){for(;a!=null&&a.firstChild;)a.lastChild&&a.removeChild(a.lastChild);return a}function cf(a){var s;if(!a)return;let t=(s=a==null?void 0:a.getBoundingClientRect)==null?void 0:s.call(a),e=0,n=0,r=0,o=0;return(t==null?void 0:t.top)!==void 0&&t.left!==void 0&&(e=t.top+window.pageYOffset,n=t.left+window.pageXOffset,o=t.right,r=t.bottom),{top:e,left:n,bottom:r,right:o}}function Lu(a,t,e){let n=parseFloat(a.style[e]);if(!n||isNaN(n)){switch(t){case"outer":n=a[e==="width"?"offsetWidth":"offsetHeight"];break;case"scroll":n=a[e==="width"?"scrollWidth":"scrollHeight"];break;case"inner":default:n=a[e==="width"?"clientWidth":"clientHeight"];break}n=a.getBoundingClientRect()[e]}if(!n||isNaN(n)){let r=a.style.display,o=a.style.position;a.style.display="block",a.style.position="absolute";let s=window.getComputedStyle(a)[e];n=parseFloat(s),isNaN(n)&&(n=0),a.style.display=r,a.style.position=o}return n||0}function cv(a,t){let e=null,n=a==null?void 0:a.parentElement;for(;n;){let[r,o,s,l]=t.match(/^([a-z]*)([#.]{1})([a-z\-]+)$/i)||[];if(s&&l)for(let u of l.replace(s,"").split(" "))n.classList.contains(u)&&(o?(n==null?void 0:n.tagName.toLowerCase())===o&&(e=n):e=n);n=n.parentElement}return e}function Pb(a,t){var e;(e=a.parentNode)==null||e.insertBefore(t,a.nextSibling)}function hv(a,t){a!=null&&a.style&&(a.style.display=a.style.display==="none"&&t!==!1||t===!0?"block":"none")}function Fb(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}var Mb=class{constructor(a){var e;Wt(this,"cache"),Wt(this,"clusterRows"),Wt(this,"dataStart"),Wt(this,"dataEnd"),Wt(this,"rows"),Wt(this,"scrollEl"),Wt(this,"blockHeight"),Wt(this,"clusterHeight"),Wt(this,"contentEl"),Wt(this,"parentEl"),Wt(this,"itemHeight"),Wt(this,"lastCluster"),Wt(this,"scrollTop"),Wt(this,"destroy"),Wt(this,"callback"),Wt(this,"sanitizer"),this.rows=a.rows,this.scrollEl=a.scrollEl,this.contentEl=a.contentEl,this.parentEl=(e=a.contentEl)==null?void 0:e.parentElement,this.callback=a.callback,this.cache={},this.scrollTop=this.scrollEl.scrollTop,this.initDOM(this.rows),this.scrollEl.scrollTop=this.scrollTop,this.lastCluster=0;let t=()=>{this.lastCluster!==(this.lastCluster=this.getNum())&&(this.initDOM(this.rows),this.callback())};this.scrollEl.addEventListener("scroll",t,!1),this.destroy=()=>{uf(this.contentEl),this.scrollEl.removeEventListener("scroll",t,!1)}}initDOM(a){if(typeof this.clusterHeight>"u"){this.cache.scrollTop=this.scrollEl.scrollTop;let o=df(a[0]);this.contentEl.appendChild(o),this.contentEl.appendChild(o),this.contentEl.appendChild(o),this.cache.data=[a[0]],this.getRowsHeight()}let t=this.initData(a,this.getNum()),e=this.checkChanges("data",t.rows),n=this.checkChanges("top",t.topOffset),r=this.checkChanges("bottom",t.bottomOffset);uf(this.contentEl),e&&n?(t.topOffset&&this.contentEl.appendChild(this.getExtra("top",t.topOffset)),t.rows.forEach(o=>this.contentEl.appendChild(df(o))),t.bottomOffset&&this.contentEl.appendChild(this.getExtra("bottom",t.bottomOffset))):r&&this.contentEl.lastChild&&(this.contentEl.lastChild.style.height=`${t.bottomOffset}px`)}getRowsHeight(){var a;if(typeof this.itemHeight>"u"){let t=((a=this.parentEl)==null?void 0:a.style.display)||"";this.parentEl&&(t===""||t==="none")&&(this.parentEl.style.display="block");let e=this.contentEl.children,n=e[Math.floor(e.length/2)];this.itemHeight=n.offsetHeight,this.parentEl&&(this.parentEl.style.display=t)}this.blockHeight=this.itemHeight*Lo.BLOCK_ROWS,this.clusterRows=Lo.BLOCK_ROWS*Lo.CLUSTER_BLOCKS,this.clusterHeight=this.blockHeight*Lo.CLUSTER_BLOCKS}getNum(){this.scrollTop=this.scrollEl.scrollTop;let a=(this.clusterHeight||0)-(this.blockHeight||0);return a&&Math.floor(this.scrollTop/a)||0}initData(a,t){if(a.length<Lo.BLOCK_ROWS)return{topOffset:0,bottomOffset:0,rowsAbove:0,rows:a};let e=Math.max((this.clusterRows-Lo.BLOCK_ROWS)*t,0),n=e+this.clusterRows,r=Math.max(e*this.itemHeight,0),o=Math.max((a.length-n)*this.itemHeight,0),s=[],l=e;r<1&&l++;for(let u=e;u<n;u++)a[u]&&s.push(a[u]);return this.dataStart=e,this.dataEnd=n,{topOffset:r,bottomOffset:o,rowsAbove:l,rows:s}}checkChanges(a,t){let e=t!==this.cache[a];return this.cache[a]=t,e}getExtra(a,t){let e=document.createElement("li");return e.className=`virtual-scroll-${a}`,t&&(e.style.height=`${t}px`),e}},Nb=class{constructor(a,t){this.elm=a,Wt(this,"_bindEventService"),Wt(this,"allSelected",!1),Wt(this,"fromHtml",!1),Wt(this,"choiceElm"),Wt(this,"closeElm"),Wt(this,"closeSearchElm"),Wt(this,"filterText",""),Wt(this,"updateData",[]),Wt(this,"data",[]),Wt(this,"dataTotal"),Wt(this,"dropElm"),Wt(this,"okButtonElm"),Wt(this,"filterParentElm"),Wt(this,"ulElm"),Wt(this,"parentElm"),Wt(this,"labelElm"),Wt(this,"selectAllParentElm"),Wt(this,"selectAllElm"),Wt(this,"searchInputElm"),Wt(this,"selectGroupElms"),Wt(this,"selectItemElms"),Wt(this,"disableItemElms"),Wt(this,"noResultsElm"),Wt(this,"options"),Wt(this,"selectAllName",""),Wt(this,"selectGroupName",""),Wt(this,"selectItemName",""),Wt(this,"tabIndex"),Wt(this,"updateDataStart"),Wt(this,"updateDataEnd"),Wt(this,"virtualScroll"),Wt(this,"locales",{}),this.options=Object.assign({},Lo.DEFAULTS,this.elm.dataset,t),this._bindEventService=new Sb({distinctEvent:!0})}get isRenderAsHtml(){return this.options.renderOptionLabelAsHtml||this.options.useSelectOptionLabelToHtml}init(){this.initLocale(),this.initContainer(),this.initData(),this.initSelected(!0),this.initFilter(),this.initDrop(),this.initView(),this.options.onAfterCreate()}destroy(a=!0){var t,e,n,r,o;this.elm&&this.parentElm&&(this.options.onDestroy({hardDestroy:a}),a&&this.options.onHardDestroy(),this.elm.parentElement&&this.parentElm.parentElement&&this.elm.parentElement.insertBefore(this.elm,this.parentElm.parentElement.firstChild),this.elm.classList.remove("ms-offscreen"),this._bindEventService.unbindAll(),this.tabIndex&&(this.elm.tabIndex=+this.tabIndex),(t=this.virtualScroll)==null||t.destroy(),(e=this.dropElm)==null||e.remove(),(n=this.parentElm.parentNode)==null||n.removeChild(this.parentElm),this.fromHtml&&(delete this.options.data,this.fromHtml=!1),this.options.onAfterDestroy({hardDestroy:a}),a&&((o=(r=this.options).onAfterHardDestroy)==null||o.call(r),Object.keys(this.options).forEach(s=>delete this[s])))}initLocale(){if(this.options.locale){let a=window.multipleSelect.locales,t=this.options.locale.split(/-|_/);if(t[0]=t[0].toLowerCase(),t[1]&&(t[1]=t[1].toUpperCase()),a[this.options.locale])Object.assign(this.options,a[this.options.locale]);else if(a[t.join("-")])Object.assign(this.options,a[t.join("-")]);else if(a[t[0]])Object.assign(this.options,a[t[0]]);else throw new Error(`[multiple-select-vanilla] invalid locales "${this.options.locale}", make sure to import it before using it`)}}initContainer(){var r;let a=this.elm.getAttribute("name")||this.options.name||"";this.options.classes&&this.elm.classList.add(this.options.classes),this.options.classPrefix&&(this.elm.classList.add(this.options.classPrefix),this.options.size&&this.elm.classList.add(`${this.options.classPrefix}-${this.options.size}`)),this.elm.style.display="none",this.labelElm=this.elm.closest("label"),!this.labelElm&&this.elm.id&&(this.labelElm=document.createElement("label"),this.labelElm.htmlFor=this.elm.id),(r=this.labelElm)!=null&&r.querySelector("input")&&(this.labelElm=null),typeof this.options.single>"u"&&(this.options.single=!this.elm.multiple),this.parentElm=Hr("div",{className:`ms-parent ${this.elm.className||""} ${this.options.classes}`,dataset:{test:"sel"}});let t=this.elm.getAttribute("title")||"";t&&(this.parentElm.title=t),this.options.placeholder=this.options.placeholder||this.elm.getAttribute("placeholder")||"",this.tabIndex=this.elm.getAttribute("tabindex");let e="";this.tabIndex!==null&&(this.elm.tabIndex=-1,e=this.tabIndex&&`tabindex="${this.tabIndex}"`),this.choiceElm=Hr("button",{className:"ms-choice",type:"button"},this.parentElm),isNaN(e)&&(this.choiceElm.tabIndex=+e),this.choiceElm.appendChild(Hr("span",{className:"ms-placeholder",textContent:this.options.placeholder})),this.options.showClear&&this.choiceElm.appendChild(Hr("div",{className:"icon-close"})),this.choiceElm.appendChild(Hr("div",{className:"icon-caret"})),this.dropElm=Hr("div",{className:`ms-drop ${this.options.position}`},this.parentElm),a&&(this.dropElm.dataset.name=a);let n=this.elm.getAttribute("data-test")||this.options.dataTest;n&&(this.parentElm.dataset.test=n,this.dropElm.dataset.test=n),this.closeElm=this.choiceElm.querySelector(".icon-close"),this.options.dropWidth&&(this.dropElm.style.width=typeof this.options.dropWidth=="string"?this.options.dropWidth:`${this.options.dropWidth}px`),Pb(this.elm,this.parentElm),this.elm.disabled&&this.choiceElm.classList.add("disabled"),this.selectAllName=`selectAll${a}`,this.selectGroupName=`selectGroup${a}`,this.selectItemName=`selectItem${a}`,this.options.keepOpen||(this._bindEventService.unbind(document.body,"click"),this._bindEventService.bind(document.body,"click",o=>{o.target===this.choiceElm||cv(o.target,".ms-choice")===this.choiceElm||(o.target===this.dropElm||cv(o.target,".ms-drop")!==this.dropElm&&o.target!==this.elm)&&this.options.isOpen&&this.close()}))}initData(){let a=[];if(this.options.data){if(Array.isArray(this.options.data))this.data=this.options.data.map(t=>typeof t=="string"||typeof t=="number"?{text:t,value:t}:t);else if(typeof this.options.data=="object"){for(let[t,e]of Object.entries(this.options.data))a.push({value:t,text:`${e}`});this.data=a}}else this.elm.childNodes.forEach(t=>{let e=this.initRow(t);e&&a.push(e)}),this.options.data=a,this.data=a,this.fromHtml=!0;this.dataTotal=Ib(this.data||[])}initRow(a,t){var n,r;let e={};return((n=a.tagName)==null?void 0:n.toLowerCase())==="option"?(e.type="option",e.text=this.options.textTemplate(a),e.value=a.value,e.visible=!0,e.selected=!!a.selected,e.disabled=t||a.disabled,e.classes=a.getAttribute("class")||"",e.title=a.getAttribute("title")||"",a.dataset.value&&(e._value=a.dataset.value),Object.keys(a.dataset).length&&(e._data=a.dataset,e._data.divider&&(e.divider=e._data.divider)),e):((r=a.tagName)==null?void 0:r.toLowerCase())==="optgroup"?(e.type="optgroup",e.label=this.options.labelTemplate(a),e.visible=!0,e.selected=!!a.selected,e.disabled=a.disabled,e.children=[],Object.keys(a.dataset).length&&(e._data=a.dataset),a.childNodes.forEach(o=>{e.children.push(this.initRow(o,e.disabled))}),e):null}initDrop(){this.initList(),this.update(!0),this.options.isOpen&&this.open(10),this.options.openOnHover&&this.parentElm&&(this._bindEventService.bind(this.parentElm,"mouseover",()=>this.open(null)),this._bindEventService.bind(this.parentElm,"mouseout",()=>this.close()))}initFilter(){if(this.filterText="",this.options.filter||!this.options.filterByDataLength)return;let a=0;for(let t of this.data||[])t.type==="optgroup"?a+=t.children.length:a+=1;this.options.filter=a>this.options.filterByDataLength}initList(){if(this.options.filter&&(this.filterParentElm=Hr("div",{className:"ms-search"},this.dropElm),this.filterParentElm.appendChild(Hr("input",{autocomplete:"off",autocapitalize:"off",spellcheck:!1,type:"text",placeholder:this.options.filterPlaceholder||"🔎︎"})),this.options.showSearchClear&&this.filterParentElm.appendChild(Hr("span",{className:"icon-close"}))),this.options.selectAll&&!this.options.single){let a=this.elm.getAttribute("name")||this.options.name||"";this.selectAllParentElm=Hr("div",{className:"ms-select-all"});let t=document.createElement("label");Hr("input",{type:"checkbox",ariaChecked:String(this.allSelected),checked:this.allSelected,dataset:{name:`selectAll${a}`}},t),t.appendChild(Hr("span",{textContent:this.formatSelectAll()})),this.selectAllParentElm.appendChild(t),this.dropElm.appendChild(this.selectAllParentElm)}this.ulElm=document.createElement("ul"),this.dropElm.appendChild(this.ulElm),this.options.showOkButton&&!this.options.single&&(this.okButtonElm=Hr("button",{className:"ms-ok-button",type:"button",textContent:this.formatOkButton()},this.dropElm)),this.initListItems()}initListItems(){var e;let a=0,t=this.getListRows();if(this.options.selectAll&&!this.options.single&&(a=-1),t.length>Lo.BLOCK_ROWS*Lo.CLUSTER_BLOCKS){(e=this.virtualScroll)==null||e.destroy();let n=this.dropElm.style.display!=="none";n||(this.dropElm.style.left="-10000",this.dropElm.style.display="block");let r=()=>{this.virtualScroll&&(this.updateDataStart=this.virtualScroll.dataStart+a,this.updateDataEnd=this.virtualScroll.dataEnd+a,this.updateDataStart<0&&(this.updateDataStart=0),this.updateDataEnd>this.getDataLength()&&(this.updateDataEnd=this.getDataLength()))};this.ulElm&&(this.virtualScroll=new Mb({rows:t,scrollEl:this.ulElm,contentEl:this.ulElm,sanitizer:this.options.sanitizer,callback:()=>{r(),this.events()}})),r(),n||(this.dropElm.style.left="0",this.dropElm.style.display="none")}else this.ulElm&&(uf(this.ulElm),t.forEach(n=>this.ulElm.appendChild(df(n)))),this.updateDataStart=0,this.updateDataEnd=this.updateData.length,this.virtualScroll=null;return this.events(),t}getListRows(){var t;let a=[];return this.updateData=[],(t=this.data)==null||t.forEach(e=>a.push(...this.initListItem(e))),a.push({tagName:"li",props:{className:"ms-no-results",textContent:this.formatNoMatchesFound()}}),a}initListItem(a,t=0){let e=(a==null?void 0:a.title)||"",n=this.options.multiple?"multiple":"",r=this.options.single?"radio":"checkbox",o="";if(!(a!=null&&a.visible))return[];if(this.updateData.push(a),this.options.single&&!this.options.singleRadio&&(o="hide-radio "),a.selected&&(o+="selected "),a.type==="optgroup"){let v=[],_=this.options.hideOptgroupCheckboxes||this.options.single?{tagName:"span",props:{dataset:{name:this.selectGroupName,key:a._key}}}:{tagName:"input",props:{type:"checkbox",dataset:{name:this.selectGroupName,key:a._key},ariaChecked:String(a.selected||!1),checked:!!a.selected,disabled:a.disabled}};!o.includes("hide-radio")&&(this.options.hideOptgroupCheckboxes||this.options.single)&&(o+="hide-radio ");let C={tagName:"span",props:{}};this.applyAsTextOrHtmlWhenEnabled(C.props,a.label);let x={tagName:"li",props:{className:`group ${o}`.trim()},children:[{tagName:"label",props:{className:`optgroup${this.options.single||a.disabled?" disabled":""}`},children:[_,C]}]},S=this.options.cssStyler(a),E=String(this.options.styler(a)||"");return E&&(x.props.style=dv(E)),S&&(x.props.style=S),v.push(x),a.children.forEach(D=>v.push(...this.initListItem(D,1))),v}if(o+=a.classes||"",t&&this.options.single&&(o+=`option-level-${t} `),a.divider)return[{tagName:"li",props:{className:"option-divider"}}];let s=n||o?(n+o).trim():"",l=`${a.disabled?"disabled":""}`,u={tagName:"span",props:{}};this.applyAsTextOrHtmlWhenEnabled(u.props,a.text);let h={tagName:"input",props:{type:r,value:encodeURI(a.value),dataset:{key:a._key,name:this.selectItemName},ariaChecked:String(a.selected||!1),checked:!!a.selected,disabled:!!a.disabled}};a.selected&&(h.attrs={checked:"checked"});let c={tagName:"li",props:{className:s,title:e},children:[{tagName:"label",props:{className:l},children:[h,u]}]},p=this.options.cssStyler(a),m=String(this.options.styler(a)||"");return m&&(c.props.style=dv(m)),p&&(c.props.style=p),[c]}initSelected(a=!1){var e,n;let t=0;for(let r of this.data||[])if(r.type==="optgroup"){let o=r.children.filter(s=>s&&s.selected&&!s.disabled&&s.visible).length;r.children.length&&(r.selected=!this.options.single&&o&&o===r.children.filter(s=>s&&!s.disabled&&s.visible&&!s.divider).length),t+=o}else t+=r.selected&&!r.disabled&&r.visible?1:0;this.allSelected=((e=this.data)==null?void 0:e.filter(r=>r.selected&&!r.disabled&&r.visible).length)===((n=this.data)==null?void 0:n.filter(r=>!r.disabled&&r.visible&&!r.divider).length),a||(this.allSelected?this.options.onCheckAll():t===0&&this.options.onUncheckAll())}initView(){let a;window.getComputedStyle?(a=window.getComputedStyle(this.elm).width,a==="auto"&&(a=Lu(this.dropElm,"outer","width")+20)):a=Lu(this.elm,"outer","width")+20,this.parentElm.style.width=`${this.options.width||a}px`,this.elm.classList.add("ms-offscreen")}events(){var t;this._bindEventService.unbind(this.okButtonElm),this._bindEventService.unbind(this.searchInputElm),this._bindEventService.unbind(this.selectAllElm),this._bindEventService.unbind(this.selectGroupElms),this._bindEventService.unbind(this.selectItemElms),this._bindEventService.unbind(this.disableItemElms),this._bindEventService.unbind(this.noResultsElm),this.closeSearchElm=(t=this.filterParentElm)==null?void 0:t.querySelector(".icon-close"),this.searchInputElm=this.dropElm.querySelector(".ms-search input"),this.selectAllElm=this.dropElm.querySelector(`input[data-name="${this.selectAllName}"]`),this.selectGroupElms=this.dropElm.querySelectorAll(`input[data-name="${this.selectGroupName}"],span[data-name="${this.selectGroupName}"]`),this.selectItemElms=this.dropElm.querySelectorAll(`input[data-name="${this.selectItemName}"]:enabled`),this.disableItemElms=this.dropElm.querySelectorAll(`input[data-name="${this.selectItemName}"]:disabled`),this.noResultsElm=this.dropElm.querySelector(".ms-no-results");let a=e=>{e.preventDefault(),!e.target.classList.contains("icon-close")&&this[this.options.isOpen?"close":"open"]()};this.labelElm&&this._bindEventService.bind(this.labelElm,"click",e=>{e.target.nodeName.toLowerCase()==="label"&&(a(e),(!this.options.filter||!this.options.isOpen)&&this.focus(),e.stopPropagation())}),this._bindEventService.bind(this.choiceElm,"click",a),this.options.onFocus&&this._bindEventService.bind(this.choiceElm,"focus",this.options.onFocus),this.options.onBlur&&this._bindEventService.bind(this.choiceElm,"blur",this.options.onBlur),this._bindEventService.bind(this.parentElm,"keydown",e=>{e.code==="Escape"&&!this.options.keepOpen&&(this.close(),this.choiceElm.focus())}),this.closeElm&&this._bindEventService.bind(this.closeElm,"click",e=>{e.preventDefault(),this._checkAll(!1,!0),this.initSelected(!1),this.updateSelected(),this.update(),this.options.onClear()}),this.closeSearchElm&&this._bindEventService.bind(this.closeSearchElm,"click",e=>{e.preventDefault(),this.searchInputElm&&(this.searchInputElm.value="",this.searchInputElm.focus()),this.filter()}),this.searchInputElm&&(this._bindEventService.bind(this.searchInputElm,"keydown",e=>{e.code==="Tab"&&e.shiftKey&&this.close()}),this._bindEventService.bind(this.searchInputElm,"keyup",e=>{var n,r,o;if(this.options.filterAcceptOnEnter&&["Enter","Space"].includes(e.code)&&((n=this.searchInputElm)!=null&&n.value)){if(this.options.single){let s=[];(r=this.selectItemElms)==null||r.forEach(l=>{var u;((u=l.closest("li"))==null?void 0:u.style.display)!=="none"&&s.push(l)}),s.length&&s[0].hasAttribute("data-name")&&this.setSelects([s[0].value])}else(o=this.selectAllElm)==null||o.click();this.close(),this.focus();return}this.filter()})),this.selectAllElm&&(this._bindEventService.unbind(this.selectAllElm,"click"),this._bindEventService.bind(this.selectAllElm,"click",e=>{var n;this._checkAll((n=e.currentTarget)==null?void 0:n.checked)})),this.okButtonElm&&(this._bindEventService.unbind(this.okButtonElm,"click"),this._bindEventService.bind(this.okButtonElm,"click",e=>{a(e),e.stopPropagation()})),this._bindEventService.bind(this.selectGroupElms,"click",e=>{let n=e.currentTarget,r=n.checked,o=Nu(this.data,"_key",n.dataset.key);this._checkGroup(o,r),this.options.onOptgroupClick(lf({label:o.label,selected:o.selected,data:o._data,children:o.children.map(s=>{if(s)return lf({text:s.text,value:s.value,selected:s.selected,disabled:s.disabled,data:s._data})})}))}),this._bindEventService.bind(this.selectItemElms,"click",e=>{let n=e.currentTarget,r=n.checked,o=Nu(this.data,"_key",n.dataset.key),s=()=>{this.options.single&&this.options.isOpen&&!this.options.keepOpen&&this.close()};if(this.options.onBeforeClick(o)===!1){s();return}this._check(o,r),this.options.onClick(lf({text:o.text,value:o.value,selected:o.selected,data:o._data})),s()})}open(a=0){if(a!==null&&a>=0){let t;clearTimeout(t),t=setTimeout(()=>this.openDrop(),a)}else this.openDrop()}openDrop(){var r,o,s,l,u;if((r=this.choiceElm)!=null&&r.classList.contains("disabled"))return;if(this.options.isOpen=!0,this.parentElm.classList.add("ms-parent-open"),(s=(o=this.choiceElm)==null?void 0:o.querySelector("div"))==null||s.classList.add("open"),this.dropElm.style.display="block",(l=this.selectAllElm)!=null&&l.parentElement&&(this.selectAllElm.parentElement.style.display="block"),this.noResultsElm&&(this.noResultsElm.style.display="none"),this.getDataLength()||((u=this.selectAllElm)!=null&&u.parentElement&&(this.selectAllElm.parentElement.style.display="none"),this.noResultsElm&&(this.noResultsElm.style.display="block")),this.options.container){let h=cf(this.dropElm),c;this.options.container instanceof Node?c=this.options.container:typeof this.options.container=="string"&&(c=this.options.container==="body"?document.body:document.querySelector(this.options.container)),c.appendChild(this.dropElm),this.dropElm.style.top=`${(h==null?void 0:h.top)??0}px`,this.dropElm.style.left=`${(h==null?void 0:h.left)??0}px`,this.dropElm.style.minWidth="auto",this.dropElm.style.width=`${Lu(this.parentElm,"outer","width")}px`}let a=this.options.minHeight,t=this.options.maxHeight;this.options.maxHeightUnit==="row"&&(t=Lu(this.dropElm.querySelector("ul>li"),"outer","height")*this.options.maxHeight);let e=this.dropElm.querySelector("ul");e&&(a&&(e.style.minHeight=`${a}px`),e.style.maxHeight=`${t}px`),this.dropElm.querySelectorAll(".multiple").forEach(h=>h.style.width=`${this.options.multipleWidth}px`),this.getDataLength()&&this.options.filter&&(this.searchInputElm&&(this.searchInputElm.value="",this.searchInputElm.focus()),this.filter(!0)),this.options.autoAdjustDropWidthByTextSize&&this.adjustDropWidthByText();let n=this.options.position;if(this.options.autoAdjustDropHeight){if(this.options.autoAdjustDropPosition){let{bottom:h,top:c}=af(this.dropElm),p=this.dropElm.getBoundingClientRect().height;n=h<p&&c>h?"top":"bottom"}this.adjustDropHeight(n)}this.options.autoAdjustDropPosition&&this.adjustDropPosition(!0),this.options.onOpen()}close(){var a,t;this.options.isOpen=!1,this.parentElm.classList.remove("ms-parent-open"),(t=(a=this.choiceElm)==null?void 0:a.querySelector("div"))==null||t.classList.remove("open"),this.dropElm.style.display="none",this.options.container&&(this.parentElm.appendChild(this.dropElm),this.dropElm.style.top="auto",this.dropElm.style.left="auto"),this.options.onClose()}applyAsTextOrHtmlWhenEnabled(a,t){a||(a={}),this.isRenderAsHtml?a.innerHTML=typeof this.options.sanitizer=="function"?this.options.sanitizer(t):t:a.textContent=t}update(a=!1){var u;let t=this.getSelects(),e=this.getSelects("text");this.options.displayValues&&(e=t);let n=(u=this.choiceElm)==null?void 0:u.querySelector("span"),r=t.length,o=null,s=()=>{if(this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml){let h=t.join(this.options.displayDelimiter);return this.options.useSelectOptionLabelToHtml?Db(h):h}return e.join(this.options.displayDelimiter)};if(n){if(r===0){let h=this.options.placeholder||"";n.classList.add("ms-placeholder"),this.applyAsTextOrHtmlWhenEnabled(n,h)}else r<this.options.minimumCountSelected?o=s():this.formatAllSelected()&&r===this.dataTotal?o=this.formatAllSelected():this.options.ellipsis&&r>this.options.minimumCountSelected?o=`${e.slice(0,this.options.minimumCountSelected).join(this.options.displayDelimiter)}...`:this.formatCountSelected(r,this.dataTotal)&&r>this.options.minimumCountSelected?o=this.formatCountSelected(r,this.dataTotal):o=s();if(o!==null&&(n==null||n.classList.remove("ms-placeholder"),this.applyAsTextOrHtmlWhenEnabled(n,o)),this.options.displayTitle||this.options.addTitle){this.options.addTitle&&console.warn("[Multiple-Select-Vanilla] Please note that the `addTitle` option was deprecated and replaced by `displayTitle`.");let h=this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml?"value":"text";n.title=this.getSelects(h).join(this.options.displayDelimiter)}}let l=this.getSelects();this.options.single?this.elm.value=l.length?l[0]:"":Array.from(this.elm.options).forEach(h=>{h.selected=l.some(c=>c===h.value)}),a||this.elm.dispatchEvent(new Event("change"))}updateSelected(a){var e;for(let n=this.updateDataStart;n<this.updateDataEnd;n++){let r=this.updateData[n],o=this.dropElm.querySelector(`input[data-key=${r._key}]`);if(o){o.checked=r.selected;let s=o.closest("li");s&&(r.selected&&!s.classList.contains("selected")?s.classList.add("selected"):r.selected||s.classList.remove("selected"))}}let t=((e=this.data)==null?void 0:e.filter(n=>n.visible).length)===0;this.selectAllElm&&(this.selectAllElm.checked=this.allSelected,hv(this.selectAllElm.closest("li"),!t)),hv(this.noResultsElm,t),this.virtualScroll&&(this.virtualScroll.rows=a??this.getListRows())}getData(){return this.options.data}getDataLength(){var a;return((a=this.data)==null?void 0:a.length)??0}getOptions(a=!0){let t=Object.assign({},this.options);return delete t.data,a?of(t):this.options}refreshOptions(a){Ab(this.options,a,!0)||(this.options=Object.assign(this.options,a),this.destroy(!1),this.init())}getDropElement(){return this.dropElm}getParentElement(){return this.parentElm}getSelects(a="value"){let t=[];for(let e of this.data||[])if(e.type==="optgroup"){let n=e.children.filter(r=>r==null?void 0:r.selected);if(!n.length)continue;if(a==="value"||this.options.single)t.push(...n.map(r=>a==="value"&&r._value||r[a]));else{let r=[];r.push("["),r.push(e.label),r.push(`: ${n.map(o=>o[a]).join(", ")}`),r.push("]"),t.push(r.join(""))}}else e.selected&&t.push(a==="value"&&e._value||e[a]);return t}setSelects(a,t="value",e=!1){let n=!1,r=o=>{var s;for(let l of o){let u=!1;if(t==="text"){let h=document.createElement("div");this.applyAsTextOrHtmlWhenEnabled(h,l.text),u=a.includes(((s=h.textContent)==null?void 0:s.trim())??"")}else u=a.includes(l._value||l.value),!u&&l.value===`${+l.value}`&&(u=a.includes(+l.value));l.selected!==u&&(n=!0),l.selected=u}};for(let o of this.data||[])o.type==="optgroup"?r(o.children):r([o]);n&&(this.initSelected(e),this.updateSelected(),this.update(e))}enable(){var a;(a=this.choiceElm)==null||a.classList.remove("disabled")}disable(){var a;(a=this.choiceElm)==null||a.classList.add("disabled")}check(a){let t=Nu(this.data,"value",a);t&&this._check(t,!0)}uncheck(a){let t=Nu(this.data,"value",a);t&&this._check(t,!1)}_check(a,t){this.options.single&&this._checkAll(!1,!0),a.selected=t,this.initSelected(),this.updateSelected(),this.update()}checkAll(){this._checkAll(!0)}uncheckAll(){this._checkAll(!1)}_checkAll(a,t){for(let e of this.data||[])e.type==="optgroup"?this._checkGroup(e,a,!0):!e.disabled&&!e.divider&&(t||e.visible)&&(e.selected=a);t||(this.initSelected(),this.updateSelected(),this.update())}_checkGroup(a,t,e){a.selected=t,a.children.forEach(n=>{n&&!n.disabled&&!n.divider&&(e||n.visible)&&(n.selected=t)}),e||(this.initSelected(),this.updateSelected(),this.update())}checkInvert(){if(!this.options.single){for(let a of this.data||[])if(a.type==="optgroup")for(let t of a.children)t&&(t.divider||(t.selected=!t.selected));else a&&!a.divider&&(a.selected=!a.selected);this.initSelected(),this.updateSelected(),this.update()}}focus(){var a;(a=this.choiceElm)==null||a.focus(),this.options.onFocus()}blur(){var a;(a=this.choiceElm)==null||a.blur(),this.options.onBlur()}refresh(){this.destroy(!1),this.init()}filter(a){var r;let t=((r=this.searchInputElm)==null?void 0:r.value.trim())??"",e=t.toLowerCase();if(this.filterText===e)return;this.filterText=e;for(let o of this.data||[])if(o.type==="optgroup")if(this.options.filterGroup){let s=`${(o==null?void 0:o.label)??""}`;if(o!=null){let l=this.options.customFilter({label:ea(s.toLowerCase()),search:ea(e),originalLabel:s,originalSearch:t,row:o});o.visible=l;for(let u of o.children)u&&(u.visible=l)}}else{for(let s of o.children)if(s!=null){let l=`${(s==null?void 0:s.text)??""}`;s.visible=this.options.customFilter({text:ea(l.toLowerCase()),search:ea(e),originalText:l,originalSearch:t,row:s,parent:o})}o.visible=o.children.filter(s=>s==null?void 0:s.visible).length>0}else{let s=`${(o==null?void 0:o.text)??""}`;o.visible=this.options.customFilter({text:ea(s.toLowerCase()),search:ea(e),originalText:s,originalSearch:t,row:o})}let n=this.initListItems();this.initSelected(a),this.updateSelected(n),a||this.options.onFilter(t)}adjustDropHeight(a){var h,c,p,m;let t=a!=="top",e=((h=this.filterParentElm)==null?void 0:h.getBoundingClientRect().height)??0,n=((c=this.okButtonElm)==null?void 0:c.getBoundingClientRect().height)??0,r=this.options.single?0:((p=this.selectAllParentElm)==null?void 0:p.getBoundingClientRect().height)??0,o=e+n+r+5,{bottom:s,top:l}=af(this.parentElm),u=this.options.maxHeight;if(t?u=s-o-this.options.adjustedHeightPadding:u=l-o-this.options.adjustedHeightPadding,!this.options.maxHeight||this.options.maxHeight&&u<this.options.maxHeight){let v=(m=this.dropElm)==null?void 0:m.querySelector("ul");return v&&(v.style.maxHeight=`${u}px`),!0}return!1}adjustDropPosition(a){let t="bottom";if(this.dropElm&&this.parentElm){let{bottom:e,top:n}=af(this.dropElm),{top:r,left:o}=cf(this.parentElm),s=this.dropElm.getBoundingClientRect().height,l=this.dropElm.getBoundingClientRect().width,u=document.body.offsetWidth||window.innerWidth,h=this.parentElm.getBoundingClientRect().width;if(e>s)t="bottom";else if(s>e&&n>e){if(this.options.container){let c=r-s;c<0&&(c=0),(c>0||a)&&(t="top",this.dropElm.style.top=`${c<0?0:c}px`)}else t="top",this.dropElm.classList.add(t);this.dropElm.classList.remove("bottom")}u-l<o&&(this.dropElm.style.left=`${o-(l-h)}px`)}return t}adjustDropWidthByText(){let a=this.parentElm.scrollWidth;(this.options.dropWidth||this.options.width)&&(a=this.options.dropWidth||this.options.width||0);let t=this.dropElm.querySelector(".ms-select-all span"),e=this.dropElm.querySelector("ul"),n=26,r=(t==null?void 0:t.clientWidth)??0+n,o=e.scrollHeight>e.clientHeight?this.getScrollbarWidth():0,s=0;this.dropElm.querySelectorAll("li label").forEach(l=>{l.scrollWidth>s&&(s=l.scrollWidth)}),s+=n+o,s<r&&(s=r),this.options.maxWidth&&s>this.options.maxWidth&&(s=this.options.maxWidth),this.options.minWidth&&s<this.options.minWidth&&(s=this.options.minWidth),(a==="100%"||+a<s)&&(this.dropElm.style.width=`${s}px`,this.dropElm.style.maxWidth=`${s}px`)}getScrollbarWidth(){var r;let a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",document.body.appendChild(a);let t=a.offsetWidth;a.style.overflow="scroll";let e=document.createElement("div");e.style.width="100%",a.appendChild(e);let n=e.offsetWidth;return(r=a.parentNode)==null||r.removeChild(a),t-n}formatAllSelected(){return this.options.allSelectedText||this.options.formatAllSelected()}formatCountSelected(a,t){return this.options.countSelectedText?this.options.countSelectedText.replace("#",`${a}`).replace("%",`${t}`):this.options.formatCountSelected(a,t)}formatNoMatchesFound(){return this.options.noMatchesFoundText||this.options.formatNoMatchesFound()}formatOkButton(){return this.options.okButtonText||this.options.formatOkButton()}formatSelectAll(){return this.options.selectAllText||this.options.formatSelectAll()}},ta=function(a,t){return typeof a=="string"?hf(document.querySelectorAll(a),t):a instanceof Node?hf([a],t):hf(a,t)};function hf(a,t){let e=Array.from(a),n=[];for(let r=0;r<e.length;r++){let o=e[r];try{o._multipleSelect!==void 0&&(o._multipleSelect.destroy(),delete o._multipleSelect),o._multipleSelect=new Nb(o,t||{}),o._multipleSelect.init();let s=o._multipleSelect.getOptions(!1);s.onHardDestroy=()=>delete o._multipleSelect,s.onAfterHardDestroyed=()=>n[r]=null,n.push(o._multipleSelect)}catch(s){console.error(s)}}return n.length===1?n[0]:n}ta.defaults=Lo.DEFAULTS,ta.locales={...lv},ta.methods=Lo.METHODS,typeof window<"u"&&(window.multipleSelect=ta);class fv{constructor(t,e,n,r=!0){this.translaterService=t,this.collectionService=e,this.rxjs=n,this._isMultipleSelect=!0,this._collectionLength=0,this._shouldTriggerQuery=!0,this.isFilled=!1,this.enableTranslateLabel=!1,this.subscriptions=[],this._isMultipleSelect=r}get collectionOptions(){var t,e,n;return(n=(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)===null||e===void 0?void 0:e.collectionOptions)!==null&&n!==void 0?n:{}}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get customStructure(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)===null||e===void 0?void 0:e.customStructure}get gridOptions(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions())!==null&&e!==void 0?e:{}}get defaultOperator(){return this.isMultipleSelect?Nt.in:Nt.equal}get isMultipleSelect(){return this._isMultipleSelect}get msInstance(){return this._msInstance}get selectOptions(){return this.defaultOptions}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}init(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E,D,A;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this.filterContainerElm=t.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection&&!this.columnFilter.collectionAsync)throw new Error(`[Slickgrid-Universal] You need to pass a "collection" (or "collectionAsync") for the MultipleSelect/SingleSelect Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.multipleSelect, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }`);if(this.enableTranslateLabel=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.enableTranslateLabel)!==null&&n!==void 0?n:!1,this.labelName=(o=(r=this.customStructure)===null||r===void 0?void 0:r.label)!==null&&o!==void 0?o:"label",this.labelPrefixName=(l=(s=this.customStructure)===null||s===void 0?void 0:s.labelPrefix)!==null&&l!==void 0?l:"labelPrefix",this.labelSuffixName=(h=(u=this.customStructure)===null||u===void 0?void 0:u.labelSuffix)!==null&&h!==void 0?h:"labelSuffix",this.optionLabel=(p=(c=this.customStructure)===null||c===void 0?void 0:c.optionLabel)!==null&&p!==void 0?p:"value",this.valueName=(v=(m=this.customStructure)===null||m===void 0?void 0:m.value)!==null&&v!==void 0?v:"value",this.enableTranslateLabel&&(!this.translaterService||typeof this.translaterService.translate!="function"))throw new Error('[select-filter] The Translate Service is required for the Select Filter to work correctly when "enableTranslateLabel" is set.');this._locales=(C=(_=this.gridOptions)===null||_===void 0?void 0:_.locales)!==null&&C!==void 0?C:je.locales,this.initMultipleSelectTemplate();let P=((x=this.gridOptions)===null||x===void 0?void 0:x.defaultFilterPlaceholder)||"";!((S=this.columnFilter)===null||S===void 0)&&S.placeholder&&(P=this.columnFilter.placeholder),this.defaultOptions.placeholder=P||"",this._isMultipleSelect&&(!((E=this.columnDef)===null||E===void 0)&&E.filter)&&(this.columnDef.filter.emptySearchTermReturnAllValues=(A=(D=this.columnDef.filter)===null||D===void 0?void 0:D.emptySearchTermReturnAllValues)!==null&&A!==void 0?A:!1);const M=this.columnFilter.collection||[];return this.renderDomElement(M),new Promise(async(B,Z)=>{try{const L=this.columnFilter.collectionAsync;let ae;L&&!this.columnFilter.collection?(ae=Km(L,this.columnDef,this.renderDomElement.bind(this),this.rxjs,this.subscriptions),B(ae)):(ae=M,B(M)),(L||this.columnFilter.enableCollectionWatch)&&(await(ae??L),this.watchCollectionChanges())}catch(L){Z(L)}})}clear(t=!0){var e,n,r;this._msInstance&&this._collectionLength>0&&(this._msInstance.setSelects([]),(e=this.filterElm)===null||e===void 0||e.classList.remove("filled"),(r=(n=this._msInstance)===null||n===void 0?void 0:n.getParentElement())===null||r===void 0||r.classList.remove("filled"),this.searchTerms=[],this._shouldTriggerQuery=t,this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0)}destroy(){var t,e;typeof((t=this._msInstance)===null||t===void 0?void 0:t.destroy)=="function"&&this._msInstance.destroy(),(e=this.filterElm)===null||e===void 0||e.remove(),Xd(this.subscriptions)}getValues(){var t,e;return(e=(t=this._msInstance)===null||t===void 0?void 0:t.getSelects())!==null&&e!==void 0?e:[]}setValues(t,e){t!==void 0&&this._msInstance&&(t=Array.isArray(t)?t.every(n=>qd(n))?t.map(String):t:[t],this._msInstance.setSelects(t)),this.updateFilterStyle(this.getValues().length>0),this.operator=e||this.defaultOperator}filterCollection(t){var e;let n=t;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const r=this.columnFilter.collectionFilterBy,o=((e=this.columnFilter.collectionOptions)===null||e===void 0?void 0:e.filterResultAfterEachPass)||null;n=this.collectionService.filterCollection(n,r,o)}return n}sortCollection(t){let e=t;if(this.columnFilter&&this.columnFilter.collectionSortBy){const n=this.columnFilter.collectionSortBy;e=this.collectionService.sortCollection(this.columnDef,e,n,this.enableTranslateLabel)}return e}watchCollectionChanges(){var t;!((t=this.columnFilter)===null||t===void 0)&&t.collection&&(Ma(this.columnFilter.collection,e=>{this.renderDomElement(this.columnFilter.collection||e||[])}),Jc(this.columnFilter,"collection",e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&Ma(this.columnFilter.collection,n=>{this.renderDomElement(this.columnFilter.collection||n||[])})}))}renderDomElement(t){var e,n,r,o;if(!Array.isArray(t)&&(!((e=this.collectionOptions)===null||e===void 0)&&e.collectionInsideObjectProperty)){const h=this.collectionOptions.collectionInsideObjectProperty;t=_n(t,h||"")}if(!Array.isArray(t))throw new Error('The "collection" passed to the Select Filter is not a valid array.');let s=[];if(t.length>0&&(s=[...t]),!((n=this.collectionOptions)===null||n===void 0)&&n.addBlankEntry&&Array.isArray(s)&&s.length>0&&s[0][this.valueName]!==""&&s.unshift(this.createBlankEntry()),!((r=this.collectionOptions)===null||r===void 0)&&r.addCustomFirstEntry&&Array.isArray(s)&&s.length>0&&s[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&s.unshift(this.collectionOptions.addCustomFirstEntry),!((o=this.collectionOptions)===null||o===void 0)&&o.addCustomLastEntry&&Array.isArray(s)&&s.length>0){const h=s.length-1;s[h][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&s.push(this.collectionOptions.addCustomLastEntry)}let l=s;l=this.filterCollection(l),l=this.sortCollection(l);const u=rm("filter",l,this.columnDef,this.grid,this.isMultipleSelect,this.translaterService,this.searchTerms||[]);this.isFilled=u.hasFoundSearchTerm,this.createFilterElement(u.selectElement,u.dataCollection),this._collectionLength=l.length}createBlankEntry(){const t={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(t[this.labelPrefixName]=""),this.labelSuffixName&&(t[this.labelSuffixName]=""),t}createFilterElement(t,e){var n,r;const o=(r=(n=this.columnDef)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:"";this.elementName=`filter-${o}`,this.defaultOptions.name=this.elementName,on(this.filterContainerElm),this.filterElm=t,this.filterElm.dataset.columnId=`${o}`,this.updateFilterStyle(this.isFilled),this.filterContainerElm.appendChild(t);const s=this.columnFilter?this.columnFilter.filterOptions:{};this.filterElmOptions={...this.defaultOptions,...s,data:e},this._msInstance=ta(t,this.filterElmOptions)}initMultipleSelectTemplate(){var t,e,n,r,o,s,l,u,h,c,p,m,v,_,C,x;const S=(e=(t=this.gridOptions)===null||t===void 0?void 0:t.enableTranslate)!==null&&e!==void 0?e:!1,D={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,name:`${(r=(n=this.columnDef)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:""}`,container:"body",filter:!1,maxHeight:275,single:!0,renderOptionLabelAsHtml:(s=(o=this.columnFilter)===null||o===void 0?void 0:o.enableRenderHtml)!==null&&s!==void 0?s:!1,sanitizer:A=>Ln(this.gridOptions,A),onClose:()=>this.onTriggerEvent()};if(this._isMultipleSelect){D.single=!1,D.showOkButton=!0,D.displayTitle=!0;const A=ho(this.gridOptions);D.countSelectedText=S&&(!((l=this.translaterService)===null||l===void 0)&&l.translate)?this.translaterService.translate(`${A}X_OF_Y_SELECTED`):(u=this._locales)===null||u===void 0?void 0:u.TEXT_X_OF_Y_SELECTED,D.allSelectedText=S&&(!((h=this.translaterService)===null||h===void 0)&&h.translate)?this.translaterService.translate(`${A}ALL_SELECTED`):(c=this._locales)===null||c===void 0?void 0:c.TEXT_ALL_SELECTED,D.noMatchesFoundText=S&&(!((p=this.translaterService)===null||p===void 0)&&p.translate)?this.translaterService.translate(`${A}NO_MATCHES_FOUND`):(m=this._locales)===null||m===void 0?void 0:m.TEXT_NO_MATCHES_FOUND,D.okButtonText=S&&(!((v=this.translaterService)===null||v===void 0)&&v.translate)?this.translaterService.translate(`${A}OK`):(_=this._locales)===null||_===void 0?void 0:_.TEXT_OK,D.selectAllText=S&&(!((C=this.translaterService)===null||C===void 0)&&C.translate)?this.translaterService.translate(`${A}SELECT_ALL`):(x=this._locales)===null||x===void 0?void 0:x.TEXT_SELECT_ALL}this.defaultOptions=D}onTriggerEvent(){if(this._msInstance){const t=this.getValues();this.updateFilterStyle(Array.isArray(t)&&t.length>1||t.length===1&&t[0]!==""),this.searchTerms=t,this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:t,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0}}updateFilterStyle(t){var e,n,r,o,s,l;t?(this.isFilled=!0,(e=this.filterElm)===null||e===void 0||e.classList.add("filled"),(r=(n=this._msInstance)===null||n===void 0?void 0:n.getParentElement())===null||r===void 0||r.classList.add("filled")):(this.isFilled=!1,(o=this.filterElm)===null||o===void 0||o.classList.remove("filled"),(l=(s=this._msInstance)===null||s===void 0?void 0:s.getParentElement())===null||l===void 0||l.classList.remove("filled"))}}class Lb extends fv{constructor(t,e,n){super(t,e,n,!0),this.translaterService=t,this.collectionService=e,this.rxjs=n}}class Hb{constructor(t){this.translater=t,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._currentValues=[],this.searchTerms=[],this._bindEventService=new Nn}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get defaultOperator(){return Nt.equal}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}init(t){if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this.filterContainerElm=t.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection)throw new Error('[Slickgrid-Universal] You need to pass a "collection" for the Native Select Filter to work correctly.');if(this.columnFilter.enableTranslateLabel&&!this.gridOptions.enableTranslate&&(!this.translater||typeof this.translater.translate!="function"))throw new Error('The I18N Service is required for the Native Select Filter to work correctly when "enableTranslateLabel" is set.');let e=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";(typeof e=="boolean"||typeof e=="number")&&(e=`${e??""}`),this.filterElm=this.createFilterElement(e),this._bindEventService.bind(this.filterElm,"change",this.handleOnChange.bind(this))}clear(t=!0){this.filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[],this._currentValues=[],this.filterElm.value="",this.filterElm.classList.remove("filled"),this.filterElm.dispatchEvent(new Event("change")))}destroy(){var t,e;this._bindEventService.unbindAll(),(e=(t=this.filterElm)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t)}getValues(){return this._currentValues||[]}setValues(t,e){var n;Array.isArray(t)?(this.filterElm.value=`${(n=t[0])!==null&&n!==void 0?n:""}`,this._currentValues=t):t&&(this.filterElm.value=`${t??""}`,this._currentValues=[t]),this.getValues().length>0?this.filterElm.classList.add("filled"):this.filterElm.classList.remove("filled"),this.operator=e||this.defaultOperator}buildFilterSelectFromCollection(t){var e,n,r,o,s,l,u,h,c,p,m,v;const _=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",C=Re("select",{className:`form-control search-filter filter-${_}`,ariaLabel:(o=(r=this.columnFilter)===null||r===void 0?void 0:r.ariaLabel)!==null&&o!==void 0?o:`${qr(_+"")} Search Filter`}),x=(l=(s=this.columnFilter.customStructure)===null||s===void 0?void 0:s.label)!==null&&l!==void 0?l:"label",S=(h=(u=this.columnFilter.customStructure)===null||u===void 0?void 0:u.value)!==null&&h!==void 0?h:"value",E=(p=(c=this.columnFilter)===null||c===void 0?void 0:c.enableTranslateLabel)!==null&&p!==void 0?p:!1;if(t.every(D=>typeof D=="string"))for(const D of t)C.appendChild(Re("option",{value:D,label:D,textContent:D}));else for(const D of t){if(!D||D[x]===void 0&&D.labelKey===void 0)throw new Error("A collection with value/label (or value/labelKey when using Locale) is required to populate the Native Select Filter list, for example:: { filter: model: Filters.select, collection: [ { value: '1', label: 'One' } ]')");const A=D.labelKey||D[x],P=(D.labelKey||E)&&typeof this.translater!==void 0&&(!((v=(m=this.translater).getCurrentLanguage)===null||v===void 0)&&v.call(m))?this.translater.translate(A||" "):A;C.appendChild(Re("option",{value:D[S],textContent:P}))}return C}createFilterElement(t){var e,n,r,o;const s=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"";on(this.filterContainerElm);const l=t||"",u=(o=(r=this.columnFilter)===null||r===void 0?void 0:r.collection)!==null&&o!==void 0?o:[];if(!Array.isArray(u))throw new Error('The "collection" passed to the Native Select Filter is not a valid array.');const h=this.buildFilterSelectFromCollection(u);return h.value=l,h.dataset.columnid=`${s||""}`,l&&(this._currentValues=[l]),this.filterContainerElm.appendChild(h),h}handleOnChange(t){const e=t&&t.target&&t.target.value||"";this._currentValues=[e],this._clearFilterTriggered?(this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.filterElm.classList.remove("filled")):(e===""?this.filterElm.classList.remove("filled"):this.filterElm.classList.add("filled"),this.callback(t,{columnDef:this.columnDef,operator:this.operator,searchTerms:[e],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}class Bb extends fv{constructor(t,e,n){super(t,e,n,!1),this.translaterService=t,this.collectionService=e,this.rxjs=n}}class Vb extends rf{constructor(t){super(t),this.translaterService=t,super.sliderType="single"}}class zb extends rf{constructor(t){super(t),this.translaterService=t,super.sliderType="double"}}const Hu={autocompleter:rb,compoundDate:hb,compoundInput:ov,compoundInputNumber:fb,compoundInputPassword:pb,compoundInputText:ov,compoundSlider:vb,dateRange:gb,input:Xs,inputMask:_b,inputNumber:bb,inputPassword:Cb,inputText:Xs,multipleSelect:Lb,select:Hb,singleSelect:Bb,slider:Vb,sliderRange:zb};class Ub{constructor(t,e,n,r){var o,s;this.config=t,this.translaterService=e,this.collectionService=n,this.rxjs=r,this._options=(s=(o=this.config)===null||o===void 0?void 0:o.options)!==null&&s!==void 0?s:{}}addRxJsResource(t){this.rxjs=t}createFilter(t){let e;return t!=null&&t.model&&(e=typeof t.model=="function"?new t.model(this.translaterService,this.collectionService,this.rxjs):t.model),!e&&this._options.defaultFilter&&(e=new this._options.defaultFilter(this.translaterService,this.collectionService,this.rxjs)),e}}const ff={alwaysShowVerticalScroll:!0,autoEdit:!1,asyncEditorLoading:!1,autoFitColumnsOnFirstLoad:!0,autoFixResizeTimeout:5*60*5,autoFixResizeRequiredGoodCount:2,autoFixResizeWhenBrokenStyleDetected:!1,autoParseInputFilterOperator:!0,autoResize:{applyResizeToContainer:!0,calculateAvailableSizeBy:"window",bottomPadding:20,minHeight:180,minWidth:300,rightPadding:0},cellHighlightCssClass:"slick-cell-modified",checkboxSelector:{cssClass:"slick-cell-checkboxsel",width:40},columnGroupSeparator:" - ",columnPicker:{fadeSpeed:0,hideForceFitButton:!1,hideSyncResizeButton:!0,headerColumnValueExtractor:pv},cellMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideCommandSection:!1,hideOptionSection:!1,showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},compositeEditorOptions:{labels:{cancelButtonKey:"CANCEL",cloneButtonKey:"CLONE",resetEditorButtonTooltipKey:"RESET_INPUT_VALUE",resetFormButtonKey:"RESET_FORM",massSelectionButtonKey:"APPLY_TO_SELECTION",massSelectionStatusKey:"X_OF_Y_MASS_SELECTED",massUpdateButtonKey:"APPLY_MASS_UPDATE",massUpdateStatusKey:"ALL_X_RECORDS_SELECTED",saveButtonKey:"SAVE"}},contextMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideClearAllGrouping:!1,hideCollapseAllGroups:!1,hideCommandSection:!1,hideCopyCellValueCommand:!1,hideExpandAllGroups:!1,hideExportCsvCommand:!1,hideExportExcelCommand:!1,hideExportTextDelimitedCommand:!0,hideMenuOnScroll:!0,hideOptionSection:!1,iconCollapseAllGroupsCommand:"fa fa-compress mdi mdi-arrow-collapse",iconExpandAllGroupsCommand:"fa fa-expand mdi mdi-arrow-expand",iconClearGroupingCommand:"fa fa-times mdi mdi-close",iconCopyCellValueCommand:"fa fa-clone mdi mdi-content-copy",iconExportCsvCommand:"fa fa-download mdi mdi-download",iconExportExcelCommand:"fa fa-file-excel-o mdi mdi-file-excel-outline",iconExportTextDelimitedCommand:"fa fa-download mdi mdi-download",showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},customFooterOptions:{dateFormat:"YYYY-MM-DD, hh:mm a",hideRowSelectionCount:!1,hideTotalItemCount:!1,hideLastUpdateTimestamp:!0,footerHeight:25,leftContainerClass:"col-xs-12 col-sm-5",rightContainerClass:"col-xs-6 col-sm-7",metricSeparator:"|",metricTexts:{itemsKey:"ITEMS",ofKey:"OF",itemsSelectedKey:"ITEMS_SELECTED"}},customTooltip:{tooltipTextMaxLength:700,maxWidth:500},dataView:{syncGridSelection:{preserveHidden:!1,preserveHiddenOnSelectionChange:!0},syncGridSelectionWithBackendService:!1},datasetIdPropertyName:"id",defaultFilter:Hu.input,defaultBackendServiceFilterTypingDebounce:500,enableFilterTrimWhiteSpace:!1,defaultFilterPlaceholder:"🔎︎",defaultFilterRangeOperator:Nt.rangeInclusive,defaultColumnSortFieldId:"id",defaultComponentEventPrefix:"",defaultSlickgridEventPrefix:"",draggableGrouping:{hideToggleAllButton:!1,toggleAllButtonText:"",dropPlaceHolderTextKey:"DROP_COLUMN_HEADER_TO_GROUP_BY"},editable:!1,editorTypingDebounce:450,filterTypingDebounce:0,enableEmptyDataWarningMessage:!0,emptyDataWarning:{className:"slick-empty-data-warning",messageKey:"EMPTY_DATA_WARNING_MESSAGE",hideFrozenLeftWarning:!1,hideFrozenRightWarning:!1,leftViewportMarginLeft:"40%",rightViewportMarginLeft:"40%",frozenLeftViewportMarginLeft:"0px",frozenRightViewportMarginLeft:"40%"},enableAutoResize:!0,enableAutoSizeColumns:!0,enableCellNavigation:!1,enableColumnPicker:!0,enableColumnReorder:!0,enableColumnResizeOnDoubleClick:!0,enableContextMenu:!0,enableExcelExport:!1,enableTextExport:!1,enableGridMenu:!0,enableHeaderMenu:!0,enableMouseHoverHighlightRow:!0,enableSorting:!0,enableTextSelectionOnCells:!0,explicitInitialization:!0,excelExportOptions:{addGroupIndentation:!0,autoDetectCellFormat:!0,exportWithFormatter:!1,filename:"export",format:an.xlsx,groupingColumnHeaderTitle:"Group By",groupCollapsedSymbol:"⮞",groupExpandedSymbol:"⮟",groupingAggregatorRowText:"",sanitizeDataExport:!0},textExportOptions:{delimiter:fs.comma,exportWithFormatter:!1,filename:"export",format:an.csv,groupingColumnHeaderTitle:"Group By",groupingAggregatorRowText:"",sanitizeDataExport:!0,useUtf8WithBom:!0},gridAutosizeColsMode:Yd.none,eventNamingStyle:Ro.lowerCase,forceFitColumns:!1,frozenHeaderWidthCalcDifferential:1,gridMenu:{dropSide:"left",commandLabels:{clearAllFiltersCommandKey:"CLEAR_ALL_FILTERS",clearAllSortingCommandKey:"CLEAR_ALL_SORTING",clearFrozenColumnsCommandKey:"CLEAR_PINNING",exportCsvCommandKey:"EXPORT_TO_CSV",exportExcelCommandKey:"EXPORT_TO_EXCEL",exportTextDelimitedCommandKey:"EXPORT_TO_TAB_DELIMITED",refreshDatasetCommandKey:"REFRESH_DATASET",toggleFilterCommandKey:"TOGGLE_FILTER_ROW",togglePreHeaderCommandKey:"TOGGLE_PRE_HEADER_ROW"},hideClearAllFiltersCommand:!1,hideClearAllSortingCommand:!1,hideClearFrozenColumnsCommand:!0,hideExportCsvCommand:!1,hideExportExcelCommand:!1,hideExportTextDelimitedCommand:!0,hideForceFitButton:!1,hideRefreshDatasetCommand:!1,hideSyncResizeButton:!0,hideToggleFilterCommand:!1,hideTogglePreHeaderCommand:!1,iconCssClass:"fa fa-bars mdi mdi-menu",iconClearAllFiltersCommand:"fa fa-filter mdi mdi-filter-remove-outline",iconClearAllSortingCommand:"fa fa-unsorted mdi mdi-swap-vertical",iconClearFrozenColumnsCommand:"fa fa-times mdi mdi-pin-off-outline",iconExportCsvCommand:"fa fa-download mdi mdi-download",iconExportExcelCommand:"fa fa-file-excel-o mdi mdi-file-excel-outline",iconExportTextDelimitedCommand:"fa fa-download mdi mdi-download",iconRefreshDatasetCommand:"fa fa-refresh mdi mdi-sync",iconToggleFilterCommand:"fa fa-random mdi mdi-flip-vertical",iconTogglePreHeaderCommand:"fa fa-random mdi mdi-flip-vertical",menuWidth:16,resizeOnShowHeaderRow:!0,showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",headerColumnValueExtractor:pv},headerMenu:{autoAlign:!0,autoAlignOffset:4,minWidth:140,iconClearFilterCommand:"fa fa-filter mdi mdi mdi-filter-remove-outline",iconClearSortCommand:"fa fa-unsorted mdi mdi-swap-vertical",iconFreezeColumns:"fa fa-thumb-tack mdi mdi-pin-outline",iconSortAscCommand:"fa fa-sort-amount-asc mdi mdi-flip-v mdi-sort-ascending",iconSortDescCommand:"fa fa-sort-amount-desc mdi mdi-flip-v mdi-sort-descending",iconColumnHideCommand:"fa fa-times mdi mdi-close",iconColumnResizeByContentCommand:"fa fa-arrows-h mdi mdi-arrow-expand-horizontal",hideColumnResizeByContentCommand:!1,hideColumnHideCommand:!1,hideClearFilterCommand:!1,hideClearSortCommand:!1,hideFreezeColumnsCommand:!0,hideSortCommands:!1,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},ignoreAccentOnStringFilterAndSort:!1,multiColumnSort:!0,numberedMultiColumnSort:!0,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!0,suppressActiveCellChangeOnEdit:!1,pagination:{pageSizes:[10,15,20,25,30,40,50,75,100],pageSize:25,totalItems:0},headerRowHeight:35,rowHeight:35,topPanelHeight:30,translationNamespaceSeparator:":",resetFilterSearchValueAfterOnBeforeCancellation:!0,resizeByContentOnlyOnFirstLoad:!0,resizeByContentOptions:{alwaysRecalculateColumnWidth:!1,cellCharWidthInPx:7.8,cellPaddingWidthInPx:14,defaultRatioForStringType:.88,formatterPaddingWidthInPx:0,maxItemToInspectCellContentWidth:1e3,maxItemToInspectSingleColumnWidthByContent:5e3,widthToRemoveFromExceededWidthReadjustment:50},treeDataOptions:{exportIndentMarginLeft:5,exportIndentationLeadingChar:"͏͏͏͏͏͏͏͏͏·"}};function pv(a,t){var e,n;const r=(a==null?void 0:a.columnGroup)||"",o=(e=t==null?void 0:t.columnGroupSeparator)!==null&&e!==void 0?e:" - ";return r?r+o+a.name:(n=a==null?void 0:a.name)!==null&&n!==void 0?n:""}class Gb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._sum=0,this._itemCount=0,this._type="sum",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._isTreeAggregator=e,this._isInitialized=!0,this._sum=0,this._itemCount=0,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={},t.__treeTotals.count={}),t.__treeTotals.count[this._field]=0,t.__treeTotals[this._type][this._field]=0)}accumulate(t,e=!1){var n,r;const o=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;this._isTreeAggregator?e?(t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals),this._sum=parseFloat((n=t.__treeTotals[this._type][this._field])!==null&&n!==void 0?n:0),this._itemCount=(r=t.__treeTotals.count[this._field])!==null&&r!==void 0?r:0):en(o)&&(this._sum=parseFloat(o),this._itemCount=1):o!==null&&o!==""&&!isNaN(o)&&(this._sum+=parseFloat(o))}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={}),this.addGroupTotalPropertiesWhenNotExist(t);let e=this._sum,n=this._itemCount;this._isTreeAggregator&&(e+=t[this._type][this._field],n+=t.count[this._field],t.count[this._field]=n),t[this._type][this._field]=e}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={}),this._isTreeAggregator&&t.count===void 0&&(t.count={})}}class Wb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._max=null,this._type="max",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._max=null,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),t.__treeTotals[this._type][this._field]=null)}accumulate(t,e=!1){const n=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;if(!this._isTreeAggregator)this.keepMaxValueWhenFound(n);else if(e){t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals);const r=t.__treeTotals[this._type][this._field]!==null?parseFloat(t.__treeTotals[this._type][this._field]):null;r!==null&&en(r)&&(this._max===null||r>this._max)&&(this._max=r)}else en(n)&&this.keepMaxValueWhenFound(n)}storeResult(t){let e=this._max;if(this.addGroupTotalPropertiesWhenNotExist(t),this._isTreeAggregator&&e!==null){const n=t[this._type][this._field];en(n)&&n>e&&(e=n)}t[this._type][this._field]=e}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={})}keepMaxValueWhenFound(t){t!==null&&t!==""&&!isNaN(t)&&(this._max===null||t>this._max)&&(this._max=parseFloat(t))}}class $b{constructor(t){this._isInitialized=!1,this._distinctValues=[],this._type="distinct",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){if(this._distinctValues=[],this._isInitialized=!0,e)throw new Error("[Slickgrid-Universal] CloneAggregator is not currently supported for use with Tree Data")}accumulate(t){const e=t&&t.hasOwnProperty(this._field)?t[this._field]:void 0;this._distinctValues.indexOf(e)===-1&&e!==void 0&&this._distinctValues.push(e)}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={}),t[this._type][this._field]=this._distinctValues}}class Yb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._min=null,this._type="min",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._min=null,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),t.__treeTotals[this._type][this._field]=null)}accumulate(t,e=!1){const n=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;if(!this._isTreeAggregator)this.keepMinValueWhenFound(n);else if(e){t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals);const r=t.__treeTotals[this._type][this._field]!==null?parseFloat(t.__treeTotals[this._type][this._field]):null;r!==null&&en(r)&&(this._min===null||r<this._min)&&(this._min=r)}else en(n)&&this.keepMinValueWhenFound(n)}storeResult(t){let e=this._min;if(this.addGroupTotalPropertiesWhenNotExist(t),this._isTreeAggregator&&e!==null){const n=t[this._type][this._field];en(n)&&n<e&&(e=n)}t[this._type][this._field]=e}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={})}keepMinValueWhenFound(t){t!==null&&t!==""&&!isNaN(t)&&(this._min===null||t<this._min)&&(this._min=parseFloat(t))}}class jb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._count=0,this._type="count",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._count=0,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),t.__treeTotals[this._type][this._field]=0)}accumulate(t,e=!1){var n;const r=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;this._isTreeAggregator&&(e?(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),this._count=(n=t.__treeTotals[this._type][this._field])!==null&&n!==void 0?n:0):en(r)&&(this._count=1))}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={});let e=this._count;this._isTreeAggregator?e+=t[this._type][this._field]:e=t.group.rows.length,t[this._type][this._field]=e}}class Xb{constructor(t){this._isInitialized=!1,this._type="clone",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){if(this._data="",this._isInitialized=!0,e)throw new Error("[Slickgrid-Universal] CloneAggregator is not currently supported for use with Tree Data")}accumulate(t){const e=t&&t.hasOwnProperty(this._field)?t[this._field]:null;e!==null&&e!==""&&(this._data=e)}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={}),t[this._type][this._field]=this._data}}class qb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._nonNullCount=0,this._sum=0,this._type="avg",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._sum=0,this._nonNullCount=0,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={},t.__treeTotals.sum={},t.__treeTotals.count={}),t.__treeTotals[this._type][this._field]=0,t.__treeTotals.count[this._field]=0,t.__treeTotals.sum[this._field]=0)}accumulate(t,e=!1){var n,r;const o=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;this._isTreeAggregator?e?(t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals),this._sum=parseFloat((n=t.__treeTotals.sum[this._field])!==null&&n!==void 0?n:0),this._nonNullCount=(r=t.__treeTotals.count[this._field])!==null&&r!==void 0?r:0):en(o)&&(this._sum=parseFloat(o),this._nonNullCount=1):o!==null&&o!==""&&!isNaN(o)&&(this._nonNullCount++,this._sum+=parseFloat(o))}storeResult(t){let e=this._sum,n=this._nonNullCount;this.addGroupTotalPropertiesWhenNotExist(t),this._isTreeAggregator&&(e+=t.sum[this._field],n+=t.count[this._field],t.sum[this._field]=e,t.count[this._field]=n),n!==0&&(t[this._type][this._field]=n===0?e:e/n)}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={}),this._isTreeAggregator&&t.sum===void 0&&(t.sum={}),this._isTreeAggregator&&t.count===void 0&&(t.count={})}}const pf={Avg:qb,Clone:Xb,Count:jb,Distinct:$b,Min:Yb,Max:Wb,Sum:Gb};function Bu(a,t){var e;const n=t.errorMessage,r=t.required,o=t.minLength,s=t.maxLength,l=t.operatorConditionalType||"inclusive",u={"{{minLength}}":o,"{{maxLength}}":s};let h=!0,c="";const p=(e=a==null?void 0:a.length)!==null&&e!==void 0?e:0;if(t.validator)return t.validator(a,t.editorArgs);if(r&&a==="")h=!1,c=n||je.VALIDATION_REQUIRED_FIELD;else if(o!==void 0&&s!==void 0&&(l==="exclusive"&&(p<=o||p>=s)||l==="inclusive"&&(p<o||p>s)))h=!1,c=n||je.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN.replace(/{{minLength}}|{{maxLength}}/gi,m=>u[m]);else if(o!==void 0&&p!==null&&(l==="exclusive"&&p<=o||l==="inclusive"&&p!==null&&p<o)){h=!1;const m=l==="inclusive"?je.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE:je.VALIDATION_EDITOR_TEXT_MIN_LENGTH;c=n||m.replace(/{{minLength}}/gi,v=>u[v])}else if(s!==void 0&&p!==null&&(l==="exclusive"&&p>=s||l==="inclusive"&&p!==null&&p>s)){h=!1;const m=l==="inclusive"?je.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE:je.VALIDATION_EDITOR_TEXT_MAX_LENGTH;c=n||m.replace(/{{maxLength}}/gi,v=>u[v])}return{valid:h,msg:c}}function Sl(a,t,e,n="Slider"){var r,o,s;let l;return((r=a.editorOptions)===null||r===void 0?void 0:r[t])!==void 0?l=a.editorOptions[t]:((o=a==null?void 0:a.params)===null||o===void 0?void 0:o[t])!==void 0&&(console.warn(`[Slickgrid-Universal] All editor.params from ${n} Editor are moving to "editorOptions" for better typing support and "params" will be deprecated in future release.`),l=(s=a==null?void 0:a.params)===null||s===void 0?void 0:s[t]),l??e}const mv=Jd&&dh||Jd,Kb=3;class Zb{constructor(t){var e;if(this.args=t,this._isValueTouched=!1,this._lastTriggeredByClearInput=!1,this.disabled=!1,this.forceUserInput=!1,this.finalCollection=[],!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this._bindEventService=new Nn,!((e=this.gridOptions)===null||e===void 0)&&e.translater&&(this._translater=this.gridOptions.translater),this._locales=this.gridOptions&&this.gridOptions.locales||je.locales,this.init()}get autocompleterOptions(){return this._autocompleterOptions||{}}get collection(){var t,e;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.collection)!==null&&e!==void 0?e:[]}get editorDomElement(){return this._inputElm}get elementCollection(){return this._elementCollection}get columnDef(){return this.args.column}get columnEditor(){var t;return((t=this.columnDef)===null||t===void 0?void 0:t.internalColumnEditor)||{}}get customStructure(){var t,e,n,r,o,s;let l=(t=this.columnEditor)===null||t===void 0?void 0:t.customStructure;const u=(n=(e=this.columnEditor)===null||e===void 0?void 0:e.type)!==null&&n!==void 0?n:(r=this.columnDef)===null||r===void 0?void 0:r.type;return!l&&u===ie.object&&(!((o=this.columnDef)===null||o===void 0)&&o.dataKey)&&(!((s=this.columnDef)===null||s===void 0)&&s.labelKey)&&(l={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),l}get dataContext(){return this.args.item}get editorOptions(){var t;return((t=this.columnEditor)===null||t===void 0?void 0:t.editorOptions)||{}}get gridOptions(){var t,e,n;return(n=(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get instance(){return this._instance}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l,u,h,c;this.labelName=(e=(t=this.customStructure)===null||t===void 0?void 0:t.label)!==null&&e!==void 0?e:"label",this.valueName=(r=(n=this.customStructure)===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:"value",this.labelPrefixName=(s=(o=this.customStructure)===null||o===void 0?void 0:o.labelPrefix)!==null&&s!==void 0?s:"labelPrefix",this.labelSuffixName=(u=(l=this.customStructure)===null||l===void 0?void 0:l.labelSuffix)!==null&&u!==void 0?u:"labelSuffix";let p=this.columnEditor.collection;!((h=this.columnEditor)===null||h===void 0)&&h.collectionAsync&&!p&&(p=[]),this.renderDomElement(p),(this.disabled||!((c=this.columnEditor)===null||c===void 0)&&c.collectionAsync&&Array.isArray(p)&&p.length===0)&&this.disable(!0)}destroy(){var t,e,n;this._bindEventService.unbindAll(),typeof((t=this._instance)===null||t===void 0?void 0:t.destroy)=="function"&&this._instance.destroy(),(n=(e=this._inputElm)===null||e===void 0?void 0:e.remove)===null||n===void 0||n.call(e),this._elementCollection=null}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._inputElm)if(t){this._inputElm.disabled=!0;const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==""&&this.clear(!0)}else this._inputElm.disabled=!1}focus(){this.grid.focus(),this._inputElm&&(this._inputElm.focus(),this._inputElm.select())}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){return this._inputElm.value}setValue(t,e=!1,n=!0){var r;if(this._inputElm.value=t!=null&&t.hasOwnProperty(this.labelName)?t[this.labelName]:t,e){this._currentValue=t,this._defaultTextValue=typeof t=="string"?t:(r=t==null?void 0:t[this.labelName])!==null&&r!==void 0?r:"",this.applyValue(this.args.item,this.serializeValue());const o=this.args.compositeEditorOptions;o&&n&&this.handleChangeOnCompositeEditor(null,o,"system")}}applyValue(t,e){var n,r,o,s;let l=e;const u=(n=this.columnDef)===null||n===void 0?void 0:n.field;if(u!==void 0){Array.isArray(this.collection)&&this.collection.length>0&&(l=vs(this.collection,p=>p&&Xo(e)&&p.hasOwnProperty(this.valueName)?p[this.valueName].toString()===(e.hasOwnProperty(this.valueName)&&e[this.valueName].toString()):p&&typeof e=="string"&&p.hasOwnProperty(this.valueName)?p[this.valueName].toString()===e:(p==null?void 0:p.toString())===e,""));const h=(u==null?void 0:u.indexOf("."))>0,c=this.validate(null,l);if(l=c!=null&&c.valid?l:"",h){const p=(s=(o=(r=this.columnEditor)===null||r===void 0?void 0:r.complexObjectPath)!==null&&o!==void 0?o:u)!==null&&s!==void 0?s:"";cr(t,p,l)}else t[u]=l}}isValueChanged(){var t,e;const n=this._inputElm.value,r=(t=this._lastInputKeyEvent)===null||t===void 0?void 0:t.keyCode;if(!((e=this.columnEditor)===null||e===void 0)&&e.alwaysSaveOnEnterKey&&r===xi.ENTER)return!0;const o=!(n===""&&(this._defaultTextValue===null||this._defaultTextValue===void 0))&&n!==this._defaultTextValue;return this._lastTriggeredByClearInput||o}isValueTouched(){return this._isValueTouched}loadValue(t){var e,n;const r=(e=this.columnDef)===null||e===void 0?void 0:e.field;if(t&&r!==void 0){const s=(r==null?void 0:r.indexOf("."))>0?_n(t,r):t[r];this._currentValue=s,this._originalValue=s,this._defaultTextValue=typeof s=="string"?s:(n=s==null?void 0:s[this.labelName])!==null&&n!==void 0?n:"",this._inputElm.value=this._defaultTextValue,this._inputElm.select()}}clear(t=!1){this._inputElm&&(this._currentValue="",this._defaultTextValue="",this.setValue("",!0)),this._isValueTouched=!0,this._lastTriggeredByClearInput=!0;const e=this.args.compositeEditorOptions;if(e){const n=!t;this.handleChangeOnCompositeEditor(null,e,"user",n)}else this.save()}reset(t,e=!0,n=!1){var r,o;const s=(r=t??this._originalValue)!==null&&r!==void 0?r:"";this._inputElm&&(this._currentValue=s,this._defaultTextValue=typeof s=="string"?s:(o=s==null?void 0:s[this.labelName])!==null&&o!==void 0?o:"",this._inputElm.value=this._defaultTextValue),this._isValueTouched=!1;const l=this.args.compositeEditorOptions;if(l&&e){const u=!n;this.handleChangeOnCompositeEditor(null,l,"user",u)}}save(){var t;const e=this.validate(),n=(t=e==null?void 0:e.valid)!==null&&t!==void 0?t:!1;this.hasAutoCommitEdit&&n?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t,e,n,r,o,s;if(this._inputElm&&this.editorOptions.forceUserInput){const l=(e=(t=this.editorOptions)===null||t===void 0?void 0:t.minLength)!==null&&e!==void 0?e:Kb;this._currentValue=this._inputElm.value.length>l?this._inputElm.value:this._currentValue}return this.customStructure&&this._currentValue&&this._currentValue.hasOwnProperty(this.valueName)&&((n=this.columnDef)===null||n===void 0?void 0:n.type)!==ie.object&&((r=this.columnEditor)===null||r===void 0?void 0:r.type)!==ie.object?this._currentValue[this.valueName]:this._currentValue&&this._currentValue.value!==void 0?((o=this.columnDef)===null||o===void 0?void 0:o.type)===ie.object||((s=this.columnEditor)===null||s===void 0?void 0:s.type)===ie.object?{[this.labelName]:this._currentValue.label,[this.valueName]:this._currentValue.value}:this._currentValue.value:this._currentValue}validate(t,e){var n,r;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const o=e!==void 0?e:(n=this._inputElm)===null||n===void 0?void 0:n.value;return Bu(o,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!((r=this.args)===null||r===void 0)&&r.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}handleSelect(t){var e,n;if(t!==void 0){const o=t;this._currentValue=o,this._isValueTouched=!0;const s=this.args.compositeEditorOptions,l=(n=(e=this.editorOptions)===null||e===void 0?void 0:e.renderItem)!==null&&n!==void 0?n:!1,u=typeof o=="string"?o:l?o[this.labelName]:o.label;if(this.setValue(u),s?this.handleChangeOnCompositeEditor(null,s):this.save(),typeof this.editorOptions.onSelectItem=="function"){const{row:h,cell:c}=this.grid.getActiveCell();this.editorOptions.onSelectItem(t,h,c,this.args.column,this.args.item)}setTimeout(()=>this._lastTriggeredByClearInput=!1)}return!1}renderRegularItem(t){var e;const n=typeof t=="string"?t:(e=t==null?void 0:t.label)!==null&&e!==void 0?e:"";return Re("div",{textContent:n||""})}renderCustomItem(t){var e,n,r;const o=(r=(n=(e=this._autocompleterOptions)===null||e===void 0?void 0:e.renderItem)===null||n===void 0?void 0:n.templateCallback(t))!==null&&r!==void 0?r:"",s=Ln(this.gridOptions,o)||"",l=document.createElement("div");return l.innerHTML=s,l}renderCollectionItem(t){var e,n;const r=(n=(e=this.columnEditor)===null||e===void 0?void 0:e.enableRenderHtml)!==null&&n!==void 0?n:!1,o=t.labelPrefix||"",s=t.label||"",l=t.labelSuffix||"",u=o+s+l,h=Ln(this.gridOptions,u)||"",c=document.createElement("div");return c[r?"innerHTML":"textContent"]=h,c}renderDomElement(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S;const E=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",D=(o=(r=this.columnEditor)===null||r===void 0?void 0:r.placeholder)!==null&&o!==void 0?o:"",A=(l=(s=this.columnEditor)===null||s===void 0?void 0:s.title)!==null&&l!==void 0?l:"";this._editorInputGroupElm=Re("div",{className:"autocomplete-container input-group"});const P=Re("span",{className:"input-group-btn input-group-append",dataset:{clear:""}});this._clearButtonElm=Re("button",{type:"button",className:"btn btn-default icon-clear"}),this._inputElm=Re("input",{type:"text",placeholder:D,title:A,autocomplete:"off",ariaAutoComplete:"none",className:`autocomplete form-control editor-text input-group-editor editor-${E}`,dataset:{input:""}},this._editorInputGroupElm),this._editorInputGroupElm.appendChild(document.createElement("span")),Sl(this.columnEditor,"hideClearButton",void 0,"autocomplete")||(P.appendChild(this._clearButtonElm),this._editorInputGroupElm.appendChild(P),this._bindEventService.bind(this._clearButtonElm,"click",()=>this.clear())),this._bindEventService.bind(this._inputElm,"focus",()=>{var B;return(B=this._inputElm)===null||B===void 0?void 0:B.select()}),this._bindEventService.bind(this._inputElm,"keydown",B=>{this._lastInputKeyEvent=B,(B.keyCode===xi.LEFT||B.keyCode===xi.RIGHT||B.key==="ArrowLeft"||B.key==="ArrowRight")&&B.stopImmediatePropagation(),this.columnEditor.alwaysSaveOnEnterKey&&(B.keyCode===xi.ENTER||B.key==="Enter")&&(this._currentValue=null)});let M=t;if(M&&(!((u=this.columnEditor)===null||u===void 0)&&u.collectionOverride)){const B={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:Z,modalType:L}=this.args.compositeEditorOptions;B.compositeEditorOptions={formValues:Z,modalType:L}}M=this.columnEditor.collectionOverride(M,B)}M&&(this.finalCollection=M),Array.isArray(M)&&(this.collection.every(B=>qd(B))?M=M.map(B=>({label:B,value:B})):M=M.map(B=>{var Z,L;return{label:B==null?void 0:B[this.labelName],value:B==null?void 0:B[this.valueName],labelPrefix:(Z=B==null?void 0:B[this.labelPrefixName])!==null&&Z!==void 0?Z:"",labelSuffix:(L=B==null?void 0:B[this.labelSuffixName])!==null&&L!==void 0?L:""}}),this._elementCollection=M),this._autocompleterOptions={input:this._inputElm,debounceWaitMs:200,className:`slick-autocomplete ${(c=(h=this.editorOptions)===null||h===void 0?void 0:h.className)!==null&&c!==void 0?c:""}`.trim(),emptyMsg:this.gridOptions.enableTranslate&&(!((p=this._translater)===null||p===void 0)&&p.translate)?this._translater.translate("NO_ELEMENTS_FOUND"):(v=(m=this._locales)===null||m===void 0?void 0:m.TEXT_NO_ELEMENTS_FOUND)!==null&&v!==void 0?v:"No elements found",customize:(B,Z,L)=>{L.style.width=""},onSelect:this.handleSelect.bind(this),...this.editorOptions},!((_=this._autocompleterOptions.renderItem)===null||_===void 0)&&_.layout?(this._autocompleterOptions.className+=` autocomplete-custom-${Wa(this._autocompleterOptions.renderItem.layout)}`,this._autocompleterOptions.render=this.renderCustomItem.bind(this)):Array.isArray(t)?this._autocompleterOptions.render=(x=(C=this._autocompleterOptions.render)===null||C===void 0?void 0:C.bind(this))!==null&&x!==void 0?x:this.renderCollectionItem.bind(this):this._autocompleterOptions.render||(this._autocompleterOptions.render=this.renderRegularItem.bind(this)),!((S=this._autocompleterOptions)===null||S===void 0)&&S.fetch?(Up(this._inputElm,this._autocompleterOptions),this._instance=mv(this._autocompleterOptions)):this._instance=mv({...this._autocompleterOptions,fetch:(B,Z)=>{M&&Z(M.filter(L=>((typeof L=="string"?L:L==null?void 0:L.label)||"").toLowerCase().includes(B.toLowerCase())))}}),this.args.container.appendChild(this._editorInputGroupElm),this.args.compositeEditorOptions||setTimeout(()=>this.focus(),50)}}class Qb{constructor(t){if(this.args=t,this._isValueTouched=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new Nn,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._input}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l;const u=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",h=this.args.compositeEditorOptions;this._checkboxContainerElm=Re("div",{className:`checkbox-editor-container editor-${u}`}),this._input=Re("input",{type:"checkbox",value:"true",ariaLabel:(r=(n=this.columnEditor)===null||n===void 0?void 0:n.ariaLabel)!==null&&r!==void 0?r:`${qr(u+"")} Checkbox Editor`,className:`editor-checkbox editor-${u}`,title:(s=(o=this.columnEditor)===null||o===void 0?void 0:o.title)!==null&&s!==void 0?s:""});const c=(l=this.args)===null||l===void 0?void 0:l.container;c&&typeof c.appendChild=="function"&&(h?(this._checkboxContainerElm.appendChild(this._input),c.appendChild(this._checkboxContainerElm)):c.appendChild(this._input)),this.hasAutoCommitEdit&&!h&&this._bindEventService.bind(this._input,"click",()=>{this._isValueTouched=!0,this.save()}),h?this._bindEventService.bind(this._input,"change",p=>{this._isValueTouched=!0,this.handleChangeOnCompositeEditor(p,h)}):this.focus()}destroy(){var t,e;this._bindEventService.unbindAll(),(e=(t=this._input)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t)}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._input)if(t){this._input.setAttribute("disabled","disabled"),this._checkboxContainerElm.classList.add("disabled");const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==!1&&this.reset(!1,!0,!0)}else this._input.removeAttribute("disabled"),this._checkboxContainerElm.classList.remove("disabled")}focus(){var t;this.grid.focus(),(t=this._input)===null||t===void 0||t.focus()}preClick(){this._input&&(this._input.checked=!this._input.checked)}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var t,e;return(e=(t=this._input)===null||t===void 0?void 0:t.checked)!==null&&e!==void 0?e:!1}setValue(t,e=!1,n=!0){const r=!!t;if(this._input&&(this._input.checked=r),e){this.applyValue(this.args.item,this.serializeValue());const o=this.args.compositeEditorOptions;o&&n&&this.handleChangeOnCompositeEditor(null,o,"system")}}applyValue(t,e){var n,r,o;const s=this.columnDef&&this.columnDef.field;if(s!==void 0){const l=(s==null?void 0:s.indexOf("."))>0,u=this.validate(null,e),h=u&&u.valid?e:"";if(l){const c=(o=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.complexObjectPath)!==null&&r!==void 0?r:s)!==null&&o!==void 0?o:"";cr(t,c,h)}else t[s]=h}}isValueChanged(){return this.serializeValue()!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(t){const e=this.columnDef&&this.columnDef.field;if(t&&e!==void 0&&this._input){const r=(e==null?void 0:e.indexOf("."))>0?_n(t,e):t[e];this._originalValue=r,this._input.checked=!!this._originalValue}}reset(t,e=!0,n=!1){var r;const o=(r=t??this._originalValue)!==null&&r!==void 0?r:!1;this._input&&(this._originalValue=o,this._input.checked=!!o),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&e){const l=!n;this.handleChangeOnCompositeEditor(null,s,"user",l)}}save(){const t=this.validate(),e=t&&t.valid||!1;this.hasAutoCommitEdit&&e?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t,e;return(e=(t=this._input)===null||t===void 0?void 0:t.checked)!==null&&e!==void 0?e:!1}validate(t,e){var n,r;const o=!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions?!1:this.columnEditor.required,s=e!==void 0?e:(r=this._input)===null||r===void 0?void 0:r.checked,l=this.columnEditor.errorMessage;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:this.validator?this.validator(s,this.args):o&&!s?{valid:!1,msg:l||je.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}}const Jb=cd&&On||cd,Vu=Us||hs;class eC{constructor(t){var e;if(this.args=t,this._isValueTouched=!1,this._lastTriggeredByClearDate=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},!((e=this.gridOptions)===null||e===void 0)&&e.translater&&(this._translaterService=this.gridOptions.translater),this._bindEventService=new Nn,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._inputElm}get editorOptions(){return this.columnEditor.editorOptions||{}}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get pickerOptions(){return this._pickerMergedOptions}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l;if(this.args&&this.columnDef){const u=this.args.compositeEditorOptions,h=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",c=this.args.grid.getOptions()||{};this.defaultDate=this.args.item?this.args.item[this.columnDef.field]:null;const p=Ua(this.columnEditor.type||this.columnDef.type||ie.dateUtc),m=Ua(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type||ie.dateUtc);let v=((r=(n=this._translaterService)===null||n===void 0?void 0:n.getCurrentLanguage)===null||r===void 0?void 0:r.call(n))||c.locale||"en";v.length>2&&(v=v.substring(0,2));const _={defaultDate:this.defaultDate,altInput:!0,altFormat:m,dateFormat:p,closeOnSelect:!0,wrap:!0,locale:v,onChange:()=>this.handleOnDateChange(),errorHandler:S=>{S.toString().includes("invalid locale")&&console.warn(`[Slickgrid-Universal] Flatpickr missing locale imports (${v}), will revert to English as the default locale.
23
+ See Flatpickr Localization for more info, for example if we want to use French, then we can import it with: import 'flatpickr/dist/l10n/fr';`)}};_&&(_==="Z"||_.toLowerCase().includes("h"))&&(E.enableTime=!0),this._flatpickrOptions={...E,...C};let D=(c=(h=this.gridOptions)===null||h===void 0?void 0:h.defaultFilterPlaceholder)!==null&&c!==void 0?c:"";!((p=this.columnFilter)===null||p===void 0)&&p.placeholder&&(D=this.columnFilter.placeholder);const A=Re("div",{className:"flatpickr"});return this.inputFilterType==="range"&&A.classList.add("search-filter",`filter-${m}`),A.appendChild(Re("input",{type:"text",className:"form-control",placeholder:D,dataset:{input:"",columnid:`${m}`}})),this.flatInstance=cb(A,this._flatpickrOptions),A}getOperatorOptionValues(){var t;return!((t=this.columnFilter)===null||t===void 0)&&t.compoundOperatorList?this.columnFilter.compoundOperatorList:jh(this.gridOptions,this.translaterService)}createDomFilterElement(t){var e,n;const r=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"";if(on(this.filterContainerElm),this._filterDivInputElm=this.buildDatePickerInput(t),this.inputFilterType==="range")return Array.isArray(t)&&t.length>0&&t[0]!==""&&(this._filterDivInputElm.classList.add("filled"),this._currentDateOrDates=t,this._currentValue=t[0]),this._filterDivInputElm&&this.filterContainerElm.appendChild(this._filterDivInputElm),this._filterDivInputElm;{this._selectOperatorElm=Yh(this.getOperatorOptionValues(),this.gridOptions);const o=Re("div",{className:`form-group search-filter filter-${r}`}),s=Re("div",{className:"input-group flatpickr"},o);if(Re("div",{className:"input-group-addon input-group-prepend operator"},s).appendChild(this._selectOperatorElm),s.appendChild(this._filterDivInputElm),this.operator){const u=zl(this.operator);this._selectOperatorElm.value=u}return t!==""&&(this._filterDivInputElm.classList.add("filled"),this._currentDateOrDates=t,this._currentValue=t),o&&this.filterContainerElm.appendChild(o),o}}onTriggerEvent(t){var e,n;if(this._clearFilterTriggered)this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterElm.classList.remove("filled");else if(this.inputFilterType==="range")this._currentDateStrings?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),this.callback(t,{columnDef:this.columnDef,searchTerms:this._currentDateStrings?this._currentDateStrings:[this._currentValue],operator:this.operator||"",shouldTriggerQuery:this._shouldTriggerQuery});else if(this.inputFilterType==="compound"&&this._selectOperatorElm){const r=this._selectOperatorElm.value;this._currentValue?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),(!((n=(e=this.columnFilter.skipCompoundOperatorFilterWithNullInput)!==null&&e!==void 0?e:this.gridOptions.skipCompoundOperatorFilterWithNullInput)!==null&&n!==void 0?n:this.gridOptions.skipCompoundOperatorFilterWithNullInput===void 0)||this._currentDateOrDates!==void 0)&&this.callback(t,{columnDef:this.columnDef,searchTerms:this._currentValue?[this._currentValue]:null,operator:r||"",shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}class hb extends rv{constructor(t){super(t),this.translaterService=t,this.inputFilterType="compound"}}class Xs{constructor(t){this.translaterService=t,this._debounceTypingDelay=0,this._shouldTriggerQuery=!0,this._inputType="text",this.inputFilterType="single",this.searchTerms=[],this._bindEventService=new Nn}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get defaultOperator(){return Nt.empty}get inputType(){return this._inputType}set inputType(t){this._inputType=t}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}get gridOptions(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions())!==null&&e!==void 0?e:{}}init(t){var e,n,r,o,s,l;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.inputFilterType==="compound"&&(this.operator=t.operator||""),this.searchTerms=(e=t==null?void 0:t.searchTerms)!==null&&e!==void 0?e:[],this._cellContainerElm=t.filterContainerElm;const u=(n=this.gridOptions)===null||n===void 0?void 0:n.backendServiceApi;this._debounceTypingDelay=(l=u?(r=u==null?void 0:u.filterTypingDebounce)!==null&&r!==void 0?r:(o=this.gridOptions)===null||o===void 0?void 0:o.defaultBackendServiceFilterTypingDebounce:(s=this.gridOptions)===null||s===void 0?void 0:s.filterTypingDebounce)!==null&&l!==void 0?l:0;const h=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.createDomFilterElement(h),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change"],this.onTriggerEvent.bind(this)),this._bindEventService.bind(this._filterInputElm,"wheel",this.onTriggerEvent.bind(this),{passive:!0}),this.inputFilterType==="compound"&&this._selectOperatorElm&&this._bindEventService.bind(this._selectOperatorElm,"change",this.onTriggerEvent.bind(this))}clear(t=!0){this._filterInputElm&&(this._shouldTriggerQuery=t,this.searchTerms=[],this._filterInputElm.value="",this._currentValue=void 0,this.inputFilterType==="compound"&&this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0,this._filterContainerElm.classList.remove("filled")),this._filterInputElm.classList.remove("filled"),this.onTriggerEvent(void 0,!0))}destroy(){var t,e,n,r;this._bindEventService.unbindAll(),(e=(t=this._selectOperatorElm)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t),(r=(n=this._filterInputElm)===null||n===void 0?void 0:n.remove)===null||r===void 0||r.call(n)}getValues(){return this._filterInputElm.value}setValues(t,e){const n=Array.isArray(t)?t:[t];let r="";for(const o of n)this.inputFilterType==="single"?r=e?this.addOptionalOperatorIntoSearchString(o,e):o:r=`${o}`,this._filterInputElm.value=`${r??""}`,this._currentValue=this._filterInputElm.value;if(this.getValues()!==""?(this._filterContainerElm.classList.add("filled"),this._filterInputElm.classList.add("filled")):(this._filterContainerElm.classList.remove("filled"),this._filterInputElm.classList.remove("filled")),this.operator=e||this.defaultOperator,e&&this._selectOperatorElm){const o=zl(this.operator);this._selectOperatorElm.value=o}}addOptionalOperatorIntoSearchString(t,e){let n="",r="",o=t==null?"":`${t}`;if(e&&o){switch(e){case"<>":case"!=":case"=":case"==":case">":case">=":case"<":case"<=":n=e;break;case"EndsWith":case"*z":n="*";break;case"StartsWith":case"a*":r="*";break}o=`${n}${o}${r}`}return o}getCompoundOperatorOptionValues(){var t;const e=this.columnDef.type&&this.columnDef.type?this.columnDef.type:ie.string;let n=[];if(!((t=this.columnFilter)===null||t===void 0)&&t.compoundOperatorList)return this.columnFilter.compoundOperatorList;switch(e){case ie.string:case ie.text:case ie.readonly:case ie.password:n=nb(this.gridOptions,this.translaterService);break;default:n=jh(this.gridOptions,this.translaterService);break}return n}createDomFilterElement(t){var e,n,r,o,s,l,u;const h=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"";on(this._cellContainerElm);let c=(o=(r=this.gridOptions)===null||r===void 0?void 0:r.defaultFilterPlaceholder)!==null&&o!==void 0?o:"";!((s=this.columnFilter)===null||s===void 0)&&s.placeholder&&(c=this.columnFilter.placeholder);const p=`${t??""}`;if(this._filterInputElm=Re("input",{type:this._inputType||"text",autocomplete:"off",ariaAutoComplete:"none",placeholder:c,ariaLabel:(u=(l=this.columnFilter)===null||l===void 0?void 0:l.ariaLabel)!==null&&u!==void 0?u:`${qr(h+"")} Search Filter`,className:`form-control filter-${h}`,value:p,dataset:{columnid:`${h}`}}),t&&this._filterInputElm.classList.add("filled"),t!==void 0&&(this._currentValue=p),this.inputFilterType==="single")this._filterContainerElm=this._filterInputElm,this._filterInputElm.classList.add("search-filter"),this._cellContainerElm.appendChild(this._filterInputElm),this._cellContainerElm.appendChild(document.createElement("span"));else{this._filterInputElm.classList.add("compound-input"),this._selectOperatorElm=Yh(this.getCompoundOperatorOptionValues(),this.gridOptions),this._filterContainerElm=Re("div",{className:`form-group search-filter filter-${h}`});const m=Re("div",{className:"input-group"},this._filterContainerElm);Re("div",{className:"input-group-addon input-group-prepend operator"},m).appendChild(this._selectOperatorElm),m.appendChild(this._filterInputElm),m.appendChild(Re("span")),this.operator&&(this._selectOperatorElm.value=zl(this.operator)),this._filterContainerElm&&this._cellContainerElm.appendChild(this._filterContainerElm)}}onTriggerEvent(t,e=!1){var n,r,o,s,l;if(e)this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:e,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterContainerElm.classList.remove("filled");else{const u=(n=t==null?void 0:t.type)!==null&&n!==void 0?n:"",h=(o=(r=this._selectOperatorElm)===null||r===void 0?void 0:r.value)!==null&&o!==void 0?o:this.operator;let c=this._filterInputElm.value;const p=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;typeof c=="string"&&p&&(c=c.trim()),((s=t==null?void 0:t.target)===null||s===void 0?void 0:s.tagName.toLowerCase())!=="select"&&(this._currentValue=c),c===""?this._filterContainerElm.classList.remove("filled"):this._filterContainerElm.classList.add("filled");const m={columnDef:this.columnDef,operator:h,searchTerms:c?[c]:null,shouldTriggerQuery:this._shouldTriggerQuery},v=u==="keyup"&&(t==null?void 0:t.key)!=="Enter"?this._debounceTypingDelay:0,_=(l=this.columnFilter.skipCompoundOperatorFilterWithNullInput)!==null&&l!==void 0?l:this.gridOptions.skipCompoundOperatorFilterWithNullInput;(this.inputFilterType==="single"||!_||this._currentValue!==void 0)&&(v>0?(clearTimeout(this._timer),this._timer=setTimeout(()=>this.callback(t,m),v)):this.callback(t,m))}this._shouldTriggerQuery=!0}}class ov extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="text",this.inputFilterType="compound"}}class fb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="number",this.inputFilterType="compound"}}class pb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="password",this.inputFilterType="compound"}}const nf="#86bff8",Mu=0,mb=20;class rf{constructor(t){this.translaterService=t,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._sliderTrackFilledColor=nf,this.sliderType="double",this.searchTerms=[],this._bindEventService=new Nn}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get currentValue(){return this._currentValue}get currentValues(){return this._currentValues}get defaultOperator(){return this.sliderType==="compound"?Nt.empty:this.sliderType==="single"?Nt.greaterThanOrEqual:this.gridOptions.defaultFilterRangeOperator||Nt.rangeInclusive}get gridOptions(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions())!==null&&e!==void 0?e:{}}get sliderOptions(){return this._sliderOptions}get operator(){var t,e;return this._operator||((e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator)}set operator(t){this._operator=t}init(t){var e;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.operator=t.operator||"",this.searchTerms=(e=t==null?void 0:t.searchTerms)!==null&&e!==void 0?e:[],this._argFilterContainerElm=t.filterContainerElm,this._sliderTrackFilledColor=window.getComputedStyle(document.documentElement).getPropertyValue("--slick-slider-filter-filled-track-color")||nf,this._filterElm=this.createDomFilterElement(this.searchTerms)}clear(t=!0){var e,n,r,o,s,l;if(this._filterElm){this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[];const u=+((e=Jn(this.columnFilter,"sliderStartValue"))!==null&&e!==void 0?e:je.SLIDER_DEFAULT_MIN_VALUE),h=+((n=Jn(this.columnFilter,"sliderEndValue"))!==null&&n!==void 0?n:je.SLIDER_DEFAULT_MAX_VALUE);this.sliderType==="double"?(this._sliderLeftInputElm&&(this._sliderLeftInputElm.value=`${u}`),this._sliderRightInputElm&&(this._sliderRightInputElm.value=`${h}`),this._currentValues=[u,h],(r=this._sliderLeftInputElm)===null||r===void 0||r.dispatchEvent(new Event("change")),(o=this._sliderRightInputElm)===null||o===void 0||o.dispatchEvent(new Event("change"))):(this._sliderRightInputElm&&(this._sliderRightInputElm.value=`${u}`),this._selectOperatorElm&&(this._selectOperatorElm.selectedIndex=0),this._currentValue=u,(s=this._sliderRightInputElm)===null||s===void 0||s.dispatchEvent(new Event("change"))),((l=Jn(this.columnFilter,"hideSliderNumber"))!==null&&l!==void 0?l:Jn(this.columnFilter,"hideSliderNumbers"))||(this.sliderType==="double"?this.renderSliderValues(u,h):this.renderSliderValues(void 0,u)),this._divContainerFilterElm.classList.remove("filled"),this._filterElm.classList.remove("filled"),this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:t,searchTerms:[]})}}destroy(){var t,e,n;this._bindEventService.unbindAll(),(t=this._sliderTrackElm)===null||t===void 0||t.remove(),(e=this._sliderLeftInputElm)===null||e===void 0||e.remove(),(n=this._sliderRightInputElm)===null||n===void 0||n.remove()}renderSliderValues(t,e){var n,r;!((n=this._leftSliderNumberElm)===null||n===void 0)&&n.textContent&&t&&(this._leftSliderNumberElm.textContent=t.toString()),!((r=this._rightSliderNumberElm)===null||r===void 0)&&r.textContent&&e&&(this._rightSliderNumberElm.textContent=e.toString())}getValues(){return this.sliderType==="double"?this._currentValues:this._currentValue}setValues(t,e){var n;if(t){let s=[];const l=Array.isArray(t)?t==null?void 0:t[0]:t;if(Array.isArray(t)&&t.length===2?s=t:typeof l=="string"&&l.indexOf("..")>0?(s=l.split(".."),this._currentValue=+((n=s==null?void 0:s[0])!==null&&n!==void 0?n:0)):(Kd(l)||l==="")&&(this._currentValue=l===null?void 0:+l,s=[l]),this.sliderType!=="double"&&this._sliderRightInputElm)this._sliderRightInputElm.value=typeof t=="string"?t:`${l}`,this.renderSliderValues(void 0,this._sliderRightInputElm.value);else if(Array.isArray(s)&&s.length===2&&!Jn(this.columnFilter,"hideSliderNumbers")){const[u,h]=s;this._sliderLeftInputElm&&(this._sliderLeftInputElm.value=String(u??je.SLIDER_DEFAULT_MIN_VALUE)),this._sliderRightInputElm&&(this._sliderRightInputElm.value=String(h??je.SLIDER_DEFAULT_MAX_VALUE)),this.renderSliderValues(...s)}}else this._currentValue=void 0,this._currentValues=void 0;const r=this.getValues();if((r===void 0?[]:Array.isArray(r)?r:[r]).length>0?this._filterElm.classList.add("filled"):this._filterElm.classList.remove("filled"),e!==void 0&&(this.operator=e),this.operator&&this._selectOperatorElm){const s=zl(this.operator);this._selectOperatorElm.value=s}}createDomFilterElement(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E,D;const A=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",P=+((o=(r=this.columnFilter)===null||r===void 0?void 0:r.minValue)!==null&&o!==void 0?o:je.SLIDER_DEFAULT_MIN_VALUE),M=+((l=(s=this.columnFilter)===null||s===void 0?void 0:s.maxValue)!==null&&l!==void 0?l:je.SLIDER_DEFAULT_MAX_VALUE),B=+((h=(u=this.columnFilter)===null||u===void 0?void 0:u.valueStep)!==null&&h!==void 0?h:je.SLIDER_DEFAULT_STEP);on(this._argFilterContainerElm);const Z=+((p=(c=Array.isArray(t)&&(t==null?void 0:t[0]))!==null&&c!==void 0?c:Jn(this.columnFilter,"sliderStartValue"))!==null&&p!==void 0?p:P),L=+((v=(m=Array.isArray(t)&&(t==null?void 0:t[1]))!==null&&m!==void 0?m:Jn(this.columnFilter,"sliderEndValue"))!==null&&v!==void 0?v:M);if(this._sliderRangeContainElm=Re("div",{className:`filter-input filter-${A} slider-input-container slider-values`,title:this.sliderType==="double"?`${Z} - ${L}`:`${Z}`}),this._sliderTrackElm=Re("div",{className:"slider-track"}),this.sliderType==="compound"){const U=Re("span",{className:"input-group-addon input-group-prepend operator"});this._selectOperatorElm=Yh(this.getOperatorOptionValues(),this.gridOptions),U.appendChild(this._selectOperatorElm)}this.sliderType==="double"&&(this._sliderLeftInputElm=Re("input",{type:"range",className:"slider-filter-input",ariaLabel:(C=(_=this.columnFilter)===null||_===void 0?void 0:_.ariaLabel)!==null&&C!==void 0?C:`${qr(A+"")} Search Filter`,defaultValue:`${Z}`,value:`${Z}`,min:`${P}`,max:`${M}`,step:`${B}`}));const ae=this.sliderType==="double"?L:Z;this._sliderRightInputElm=Re("input",{type:"range",className:"slider-filter-input",ariaLabel:(S=(x=this.columnFilter)===null||x===void 0?void 0:x.ariaLabel)!==null&&S!==void 0?S:`${qr(A+"")} Search Filter`,defaultValue:`${ae}`,value:`${ae}`,min:`${P}`,max:`${M}`,step:`${B}`});const _e=(E=Jn(this.columnFilter,"hideSliderNumber"))!==null&&E!==void 0?E:Jn(this.columnFilter,"hideSliderNumbers"),J=_e?"":"input-group";if(this._divContainerFilterElm=Re("div",{className:`${J} search-filter slider-container slider-values filter-${A}`.trim()}),this._sliderRangeContainElm.appendChild(this._sliderTrackElm),this.sliderType==="double"&&this._sliderLeftInputElm&&this._sliderRangeContainElm.appendChild(this._sliderLeftInputElm),this._sliderRangeContainElm.appendChild(this._sliderRightInputElm),_e)this._divContainerFilterElm.appendChild(this._sliderRangeContainElm);else{let U;this.sliderType==="compound"&&this._selectOperatorElm?(U=Re("span",{className:"input-group-addon input-group-prepend operator"}),U.appendChild(this._selectOperatorElm)):this.sliderType==="double"&&(U=Re("div",{className:"input-group-addon input-group-prepend slider-range-value"}),this._leftSliderNumberElm=Re("span",{className:`input-group-text lowest-range-${A}`,textContent:`${Z}`}),U.appendChild(this._leftSliderNumberElm));const F=Re("div",{className:"input-group-addon input-group-append slider-range-value"});this._rightSliderNumberElm=Re("span",{className:`input-group-text highest-range-${A}`,textContent:`${ae}`},F),U&&this._divContainerFilterElm.appendChild(U),this._divContainerFilterElm.appendChild(this._sliderRangeContainElm),this._divContainerFilterElm.appendChild(F)}return this._sliderOptions={minValue:P,maxValue:M,step:B},this._currentValues=[Z,L],Array.isArray(t)&&t.length>0&&t[0]!==""&&(this._divContainerFilterElm.classList.add("filled"),this._currentValue=Z),(Jn(this.columnFilter,"sliderStartValue")!==void 0||((D=this.columnFilter)===null||D===void 0?void 0:D.minValue)!==void 0)&&(this._currentValue=Z),this._argFilterContainerElm.appendChild(this._divContainerFilterElm),this.updateTrackFilledColorWhenEnabled(),this._bindEventService.bind(this._sliderTrackElm,"click",this.sliderTrackClicked.bind(this)),this._bindEventService.bind(this._sliderRightInputElm,["input","change"],this.slideRightInputChanged.bind(this)),this._bindEventService.bind(this._sliderRightInputElm,["change","mouseup","touchend"],this.onValueChanged.bind(this)),this.sliderType==="compound"&&this._selectOperatorElm?this._bindEventService.bind(this._selectOperatorElm,["change"],this.onValueChanged.bind(this)):this.sliderType==="double"&&this._sliderLeftInputElm&&(this._bindEventService.bind(this._sliderLeftInputElm,["input","change"],this.slideLeftInputChanged.bind(this)),this._bindEventService.bind(this._sliderLeftInputElm,["change","mouseup","touchend"],this.onValueChanged.bind(this))),this._divContainerFilterElm}getOperatorOptionValues(){var t;return!((t=this.columnFilter)===null||t===void 0)&&t.compoundOperatorList?this.columnFilter.compoundOperatorList:jh(this.gridOptions,this.translaterService)}onValueChanged(t){var e,n,r,o,s,l,u,h,c;const p=parseInt((n=(e=this._sliderRightInputElm)===null||e===void 0?void 0:e.value)!==null&&n!==void 0?n:"",10);let m,v;if(this.sliderType==="compound"||this.sliderType==="single")((o=(r=t==null?void 0:t.target)===null||r===void 0?void 0:r.tagName)===null||o===void 0?void 0:o.toLowerCase())!=="select"&&(this._currentValue=+p),m=this._currentValue,v=[m||"0"];else if(this.sliderType==="double"){const C=[parseInt((l=(s=this._sliderLeftInputElm)===null||s===void 0?void 0:s.value)!==null&&l!==void 0?l:"",10),p];m=C.join(".."),v=C}if(this._clearFilterTriggered)this._filterElm.classList.remove("filled"),this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,searchTerms:[],shouldTriggerQuery:this._shouldTriggerQuery});else{const _=(h=(u=this._selectOperatorElm)===null||u===void 0?void 0:u.value)!==null&&h!==void 0?h:this.operator;m===""?this._filterElm.classList.remove("filled"):this._filterElm.classList.add("filled");const C=(c=this.columnFilter.skipCompoundOperatorFilterWithNullInput)!==null&&c!==void 0?c:this.gridOptions.skipCompoundOperatorFilterWithNullInput;(this.sliderType!=="compound"||!C||this._currentValue!==void 0)&&this.callback(t,{columnDef:this.columnDef,operator:_||"",searchTerms:v,shouldTriggerQuery:this._shouldTriggerQuery})}this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this.changeBothSliderFocuses(!1),this.grid.onHeaderRowMouseEnter.notify({column:this.columnDef,grid:this.grid},{...new Slick.EventData,target:this._argFilterContainerElm})}changeBothSliderFocuses(t){var e,n;const r=t?"add":"remove";(e=this._sliderLeftInputElm)===null||e===void 0||e.classList[r]("focus"),(n=this._sliderRightInputElm)===null||n===void 0||n.classList[r]("focus")}slideLeftInputChanged(){var t,e,n,r;const o=parseInt((e=(t=this._sliderLeftInputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:"",10),s=parseInt((r=(n=this._sliderRightInputElm)===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:"",10);this._sliderLeftInputElm&&s-o<=Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu)&&(this._sliderLeftInputElm.value=String(o-Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu))),this._sliderLeftInputElm&&this._sliderRightInputElm&&(+this._sliderLeftInputElm.value>=+this._sliderRightInputElm.value-mb?(this._sliderLeftInputElm.style.zIndex="1",this._sliderRightInputElm.style.zIndex="0"):(this._sliderLeftInputElm.style.zIndex="0",this._sliderRightInputElm.style.zIndex="1")),this.sliderLeftOrRightChanged(o,s)}slideRightInputChanged(){var t,e,n,r;const o=parseInt((e=(t=this._sliderLeftInputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:"",10),s=parseInt((r=(n=this._sliderRightInputElm)===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:"",10);this.sliderType==="double"&&this._sliderRightInputElm&&s-o<=Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu)&&(this._sliderRightInputElm.value=String(o+Jn(this.columnFilter,"stopGapBetweenSliderHandles",Mu))),this.sliderLeftOrRightChanged(o,s)}sliderLeftOrRightChanged(t,e){var n,r,o,s,l,u,h;this.updateTrackFilledColorWhenEnabled(),this.changeBothSliderFocuses(!0),this._sliderRangeContainElm.title=this.sliderType==="double"?`${t} - ${e}`:`${e}`,((n=Jn(this.columnFilter,"hideSliderNumber"))!==null&&n!==void 0?n:Jn(this.columnFilter,"hideSliderNumbers"))||(!((r=this._leftSliderNumberElm)===null||r===void 0)&&r.textContent&&(this._leftSliderNumberElm.textContent=(s=(o=this._sliderLeftInputElm)===null||o===void 0?void 0:o.value)!==null&&s!==void 0?s:""),!((l=this._rightSliderNumberElm)===null||l===void 0)&&l.textContent&&(this._rightSliderNumberElm.textContent=(h=(u=this._sliderRightInputElm)===null||u===void 0?void 0:u.value)!==null&&h!==void 0?h:"")),this.grid.onHeaderRowMouseEnter.notify({column:this.columnDef,grid:this.grid},{...new Slick.EventData,target:this._argFilterContainerElm})}sliderTrackClicked(t){t.preventDefault();const e=t.offsetX,n=this._sliderTrackElm.offsetWidth,r=(e+0)*100/n;this._sliderRightInputElm&&this.sliderType!=="double"?(this._sliderRightInputElm.value=`${r}`,this._sliderRightInputElm.dispatchEvent(new Event("change"))):this._sliderLeftInputElm&&this._sliderRightInputElm&&(r<=50?(this._sliderLeftInputElm.value=`${r}`,this._sliderLeftInputElm.dispatchEvent(new Event("change"))):(this._sliderRightInputElm.value=`${r}`,this._sliderRightInputElm.dispatchEvent(new Event("change"))))}updateTrackFilledColorWhenEnabled(){var t,e,n,r;if(Jn(this.columnFilter,"enableSliderTrackColoring")&&this._sliderRightInputElm){let o=0;this._sliderLeftInputElm&&(o=(+this._sliderLeftInputElm.value-+this._sliderLeftInputElm.min)/((e=(t=this.sliderOptions)===null||t===void 0?void 0:t.maxValue)!==null&&e!==void 0?e:0-+this._sliderLeftInputElm.min)*100);const s=(+this._sliderRightInputElm.value-+this._sliderRightInputElm.min)/((r=(n=this.sliderOptions)===null||n===void 0?void 0:n.maxValue)!==null&&r!==void 0?r:0-+this._sliderRightInputElm.min)*100,l="linear-gradient(to right, %b %p1, %c %p1, %c %p2, %b %p2)".replace(/%b/g,"#eee").replace(/%c/g,Jn(this.columnFilter,"sliderTrackFilledColor")||this._sliderTrackFilledColor||nf).replace(/%p1/g,`${o}%`).replace(/%p2/g,`${s}%`);this._sliderTrackElm.style.background=l,this._sliderOptions.sliderTrackBackground=l}}}class vb extends rf{constructor(t){super(t),this.translaterService=t,this.sliderType="compound"}}class gb extends rv{constructor(t){super(t),this.translaterService=t,this.inputFilterType="range"}}class _b extends Xs{constructor(t){super(t),this.translaterService=t,this._inputMask="",this.inputType="text"}get inputMask(){return this._inputMask}init(t){var e,n,r,o;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this._cellContainerElm=t.filterContainerElm,!((n=(e=this.columnDef)===null||e===void 0?void 0:e.params)===null||n===void 0)&&n.mask?this._inputMask=this.columnDef.params.mask:!((o=(r=this.columnFilter)===null||r===void 0?void 0:r.params)===null||o===void 0)&&o.mask&&(this._inputMask=this.columnFilter.params.mask),!this._inputMask)throw new Error(`[Slickgrid-Universal] The Filters.inputMask requires the mask to be passed in the filter params or the column definition params
24
+ for example:: this.columnDefinitions: [{ id: 'phone', field: 'phone', filter: { model: Filters.inputMask, params: { mask: '000-000-0000' }}}]`);const s=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";this.createDomFilterElement(s),this._bindEventService.bind(this._filterInputElm,["keyup","blur","change"],this.onTriggerEvent.bind(this))}onTriggerEvent(t,e=!1){var n,r,o;let s="";if(!((n=t==null?void 0:t.target)===null||n===void 0)&&n.value){let l=(o=(r=t==null?void 0:t.target)===null||r===void 0?void 0:r.value)!==null&&o!==void 0?o:"";const u=this.gridOptions.enableFilterTrimWhiteSpace||this.columnFilter.enableTrimWhiteSpace;typeof l=="string"&&u&&(l=l.trim());const h=this.unmaskValue(l),c=this.maskValue(h);s=h,(t==null?void 0:t.keyCode)>=48&&(this._filterInputElm.value=c,t.preventDefault())}e?(this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:e,shouldTriggerQuery:this._shouldTriggerQuery}),this._filterInputElm.classList.remove("filled")):(this._filterInputElm.classList.add("filled"),this.callback(t,{columnDef:this.columnDef,operator:this.operator,searchTerms:[s],shouldTriggerQuery:this._shouldTriggerQuery})),this._shouldTriggerQuery=!0}maskValue(t){let e=0,n="";return this._inputMask&&(n=this._inputMask.replace(/[09A]/gi,r=>((r==="0"||r==="9")&&/\d+/g.test(t[e])||r.toUpperCase()==="A"&&/[^\d]+/gi.test(t[e]))&&t[e++]||"")),n}unmaskValue(t){const e=t.replace(/[^0-9a-z]*/gi,""),n=this._inputMask.replace(/[^0-9a-z]*/gi,"");let r="";for(let o=0;o<n.length;o++)e[o]&&((n[o]==="0"||n[o]==="9")&&/\d+/g.test(e[o])||n[o].toUpperCase()==="A"&&/[^\d]+/gi.test(e[o]))&&(r+=e[o]);return r}}class bb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="number"}}class Cb extends Xs{constructor(t){super(t),this.translaterService=t,this.inputType="password"}}var yb=Object.defineProperty,Eb=(a,t,e)=>t in a?yb(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e,Wt=(a,t,e)=>(Eb(a,typeof t!="symbol"?t+"":t,e),e),Sb=class{constructor(a){Wt(this,"_distinctEvent"),Wt(this,"_boundedEvents",[]),this._distinctEvent=(a==null?void 0:a.distinctEvent)??!1}get boundedEvents(){return this._boundedEvents}dispose(){this.unbindAll(),this._boundedEvents=[]}bind(a,t,e,n){let r=Array.isArray(t)?t:[t];if(a!=null&&a.forEach)a==null||a.forEach(o=>{for(let s of r)(!this._distinctEvent||this._distinctEvent&&!this.hasBinding(o,s))&&(o.addEventListener(s,e,n),this._boundedEvents.push({element:o,eventName:s,listener:e}))});else for(let o of r)(!this._distinctEvent||this._distinctEvent&&!this.hasBinding(a,o))&&(a.addEventListener(o,e,n),this._boundedEvents.push({element:a,eventName:o,listener:e}))}hasBinding(a,t){return this._boundedEvents.some(e=>e.element===a&&(!t||e.eventName===t))}unbind(a,t,e){var n;if(a){let r=Array.isArray(a)?a:[a],o=Array.isArray(t)?t||"":[t||""];for(let s of r){e||(e=this._boundedEvents.find(l=>{if(l.element===s&&(!t||l.eventName===t))return l.listener}));for(let l of o)(n=s==null?void 0:s.removeEventListener)==null||n.call(s,l,e)}}}unbindAll(){for(;this._boundedEvents.length>0;){let a=this._boundedEvents.pop(),{element:t,eventName:e,listener:n}=a;this.unbind(t,e,n)}}},sv=typeof window<"u"&&window.multipleSelect!==void 0?window.multipleSelect:{locales:{}};sv.locales={"en-US":{formatSelectAll(){return"[Select all]"},formatAllSelected(){return"All selected"},formatCountSelected(a,t){return`${a} of ${t} selected`},formatNoMatchesFound(){return"No matches found"},formatOkButton(){return"OK"}}};var lv=sv.locales,wb=50,xb=4,av={name:"",placeholder:"",classes:"",classPrefix:"",data:void 0,locale:void 0,selectAll:!0,single:void 0,singleRadio:!1,multiple:!1,hideOptgroupCheckboxes:!1,multipleWidth:80,width:void 0,dropWidth:void 0,maxHeight:250,maxHeightUnit:"px",position:"bottom",displayValues:!1,displayTitle:!1,displayDelimiter:", ",minimumCountSelected:3,ellipsis:!1,isOpen:!1,keepOpen:!1,openOnHover:!1,container:null,filter:!1,filterGroup:!1,filterPlaceholder:"",filterAcceptOnEnter:!1,filterByDataLength:void 0,customFilter(a){let{text:t,label:e,search:n}=a;return(e||t||"").includes(n)},showClear:!1,autoAdjustDropHeight:!1,autoAdjustDropPosition:!1,autoAdjustDropWidthByTextSize:!1,adjustedHeightPadding:10,useSelectOptionLabel:!1,useSelectOptionLabelToHtml:!1,cssStyler:()=>null,styler:()=>!1,textTemplate:a=>a.innerHTML.trim(),labelTemplate:a=>a.label,onOpen:()=>!1,onClose:()=>!1,onCheckAll:()=>!1,onUncheckAll:()=>!1,onFocus:()=>!1,onBlur:()=>!1,onOptgroupClick:()=>!1,onBeforeClick:()=>!0,onClick:()=>!1,onFilter:()=>!1,onClear:()=>!1,onAfterCreate:()=>!1,onDestroy:()=>!1,onAfterDestroy:()=>!1,onDestroyed:()=>!1},Tb=["init","getOptions","refreshOptions","getSelects","setSelects","enable","disable","open","close","check","uncheck","checkAll","uncheckAll","checkInvert","focus","blur","refresh","destroy"];Object.assign(av,lv["en-US"]);var Ob={BLOCK_ROWS:wb,CLUSTER_BLOCKS:xb,DEFAULTS:av,METHODS:Tb},Lo=Ob;function Ab(a,t,e=!1){let n=Object.keys(a),r=Object.keys(t);if(e&&n.length!==r.length)return!1;for(let o of n)if(r.includes(o)&&a[o]!==t[o])return!1;return!0}function of(a){let t=()=>{let r={};for(let o in a)Object.prototype.hasOwnProperty.call(a,o)&&(r[o]=of(a[o]));return r},e=()=>a.map(r=>of(r)),n=Object.prototype.toString.call(a).slice(8,-1).toLowerCase();return n==="object"?t():n==="array"?e():a}function sf(a){return a!=null&&a!==""}function kb(a,t){return typeof a=="object"?Object.fromEntries(t?Object.entries(a).filter(([e,n])=>!sf(n)&&!t.includes(e)||sf(n)):Object.entries(a).filter(([e,n])=>sf(n))):a}function Ib(a){let t=0;return a.forEach((e,n)=>{e.type==="optgroup"?(e._key=`group_${n}`,e.visible=typeof e.visible>"u"?!0:e.visible,e.children.forEach((r,o)=>{r&&(r.visible=typeof(r==null?void 0:r.visible)>"u"?!0:r.visible,r.divider||(r._key=`option_${n}_${o}`,t+=1))})):(e.visible=typeof e.visible>"u"?!0:e.visible,e.divider||(e._key=`option_${n}`,t+=1))}),t}function Nu(a,t,e){if(Array.isArray(a))for(let n of a){if(n[t]===e||n[t]===`${+n[t]}`&&+n[t]===e)return n;if(n.type==="optgroup"){for(let r of n.children)if(r&&(r[t]===e||r[t]===`${+r[t]}`&&+r[t]===e))return r}}}function Db(a){return a.replace(/(\b)(on[a-z]+)(\s*)=([^>]*)|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(&lt;|&#60;)(\/*)(script|script defer)(.*)(&#62;|&gt;|&gt;">)/gi,"")}function lf(a){return Object.keys(a).forEach(t=>a[t]===void 0?delete a[t]:""),a}function Rb(a){return a.replace(/[\W_]+(.)/g,(t,e)=>e.toUpperCase())}function ea(a){return typeof a!="string"?a:a.normalize?a.normalize("NFD").replace(/[\u0300-\u036F]/g,""):[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}].reduce((t,{letters:e,base:n})=>t.replace(e,n),a)}function dv(a){let t={};if(a){let e=a.replace(/\s/g,"").split(";");for(let n of e){let[r,o]=n.trim().split(":");r&&(t[Rb(r)]=o.trim())}console.warn("[multiple-select-vanilla] Please note that `styler` is deprecated, please migrate to `cssStyler` when possible.")}return t}function af(a){let t=0,e=0,n=0,r=0,o=window.innerHeight??0,s=window.innerWidth??0,l=Fb(),u=l.top,h=l.left,c=cf(a);if(c){let p=c.top??0,m=c.left??0;e=p-u,t=o-(p-u),n=m-h,r=s-(m-h)}return{top:e,bottom:t,left:n,right:r}}function Hr(a,t,e){let n=document.createElement(a);return t&&Object.keys(t).forEach(r=>{let o=t[r];typeof o=="object"?Object.assign(n[r],o):n[r]=t[r]}),e!=null&&e.appendChild&&e.appendChild(n),n}function uv(a,t,e){var o;let n="";(o=a.props)!=null&&o.innerHTML&&(n=a.props.innerHTML,delete a.props.innerHTML);let r=Hr(a.tagName,kb(a.props,["class","title","style"]),t);if(n&&(r.innerHTML=n),a.attrs)for(let s of Object.keys(a.attrs))r.setAttribute(s,a.attrs[s]);if(a.children)for(let s of a.children)uv(s,r);return t==null||t.appendChild(r),r}function df(a){return a.hasOwnProperty("tagName")?uv(a):document.createElement("li")}function uf(a){for(;a!=null&&a.firstChild;)a.lastChild&&a.removeChild(a.lastChild);return a}function cf(a){var s;if(!a)return;let t=(s=a==null?void 0:a.getBoundingClientRect)==null?void 0:s.call(a),e=0,n=0,r=0,o=0;return(t==null?void 0:t.top)!==void 0&&t.left!==void 0&&(e=t.top+window.pageYOffset,n=t.left+window.pageXOffset,o=t.right,r=t.bottom),{top:e,left:n,bottom:r,right:o}}function Lu(a,t,e){let n=parseFloat(a.style[e]);if(!n||isNaN(n)){switch(t){case"outer":n=a[e==="width"?"offsetWidth":"offsetHeight"];break;case"scroll":n=a[e==="width"?"scrollWidth":"scrollHeight"];break;case"inner":default:n=a[e==="width"?"clientWidth":"clientHeight"];break}n=a.getBoundingClientRect()[e]}if(!n||isNaN(n)){let r=a.style.display,o=a.style.position;a.style.display="block",a.style.position="absolute";let s=window.getComputedStyle(a)[e];n=parseFloat(s),isNaN(n)&&(n=0),a.style.display=r,a.style.position=o}return n||0}function cv(a,t){let e=null,n=a==null?void 0:a.parentElement;for(;n;){let[r,o,s,l]=t.match(/^([a-z]*)([#.]{1})([a-z\-]+)$/i)||[];if(s&&l)for(let u of l.replace(s,"").split(" "))n.classList.contains(u)&&(o?(n==null?void 0:n.tagName.toLowerCase())===o&&(e=n):e=n);n=n.parentElement}return e}function Pb(a,t){var e;(e=a.parentNode)==null||e.insertBefore(t,a.nextSibling)}function hv(a,t){a!=null&&a.style&&(a.style.display=a.style.display==="none"&&t!==!1||t===!0?"block":"none")}function Fb(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}var Mb=class{constructor(a){var e;Wt(this,"cache"),Wt(this,"clusterRows"),Wt(this,"dataStart"),Wt(this,"dataEnd"),Wt(this,"rows"),Wt(this,"scrollEl"),Wt(this,"blockHeight"),Wt(this,"clusterHeight"),Wt(this,"contentEl"),Wt(this,"parentEl"),Wt(this,"itemHeight"),Wt(this,"lastCluster"),Wt(this,"scrollTop"),Wt(this,"destroy"),Wt(this,"callback"),Wt(this,"sanitizer"),this.rows=a.rows,this.scrollEl=a.scrollEl,this.contentEl=a.contentEl,this.parentEl=(e=a.contentEl)==null?void 0:e.parentElement,this.callback=a.callback,this.cache={},this.scrollTop=this.scrollEl.scrollTop,this.initDOM(this.rows),this.scrollEl.scrollTop=this.scrollTop,this.lastCluster=0;let t=()=>{this.lastCluster!==(this.lastCluster=this.getNum())&&(this.initDOM(this.rows),this.callback())};this.scrollEl.addEventListener("scroll",t,!1),this.destroy=()=>{uf(this.contentEl),this.scrollEl.removeEventListener("scroll",t,!1)}}initDOM(a){if(typeof this.clusterHeight>"u"){this.cache.scrollTop=this.scrollEl.scrollTop;let o=df(a[0]);this.contentEl.appendChild(o),this.contentEl.appendChild(o),this.contentEl.appendChild(o),this.cache.data=[a[0]],this.getRowsHeight()}let t=this.initData(a,this.getNum()),e=this.checkChanges("data",t.rows),n=this.checkChanges("top",t.topOffset),r=this.checkChanges("bottom",t.bottomOffset);uf(this.contentEl),e&&n?(t.topOffset&&this.contentEl.appendChild(this.getExtra("top",t.topOffset)),t.rows.forEach(o=>this.contentEl.appendChild(df(o))),t.bottomOffset&&this.contentEl.appendChild(this.getExtra("bottom",t.bottomOffset))):r&&this.contentEl.lastChild&&(this.contentEl.lastChild.style.height=`${t.bottomOffset}px`)}getRowsHeight(){var a;if(typeof this.itemHeight>"u"){let t=((a=this.parentEl)==null?void 0:a.style.display)||"";this.parentEl&&(t===""||t==="none")&&(this.parentEl.style.display="block");let e=this.contentEl.children,n=e[Math.floor(e.length/2)];this.itemHeight=n.offsetHeight,this.parentEl&&(this.parentEl.style.display=t)}this.blockHeight=this.itemHeight*Lo.BLOCK_ROWS,this.clusterRows=Lo.BLOCK_ROWS*Lo.CLUSTER_BLOCKS,this.clusterHeight=this.blockHeight*Lo.CLUSTER_BLOCKS}getNum(){this.scrollTop=this.scrollEl.scrollTop;let a=(this.clusterHeight||0)-(this.blockHeight||0);return a&&Math.floor(this.scrollTop/a)||0}initData(a,t){if(a.length<Lo.BLOCK_ROWS)return{topOffset:0,bottomOffset:0,rowsAbove:0,rows:a};let e=Math.max((this.clusterRows-Lo.BLOCK_ROWS)*t,0),n=e+this.clusterRows,r=Math.max(e*this.itemHeight,0),o=Math.max((a.length-n)*this.itemHeight,0),s=[],l=e;r<1&&l++;for(let u=e;u<n;u++)a[u]&&s.push(a[u]);return this.dataStart=e,this.dataEnd=n,{topOffset:r,bottomOffset:o,rowsAbove:l,rows:s}}checkChanges(a,t){let e=t!==this.cache[a];return this.cache[a]=t,e}getExtra(a,t){let e=document.createElement("li");return e.className=`virtual-scroll-${a}`,t&&(e.style.height=`${t}px`),e}},Nb=class{constructor(a,t){this.elm=a,Wt(this,"_bindEventService"),Wt(this,"allSelected",!1),Wt(this,"fromHtml",!1),Wt(this,"choiceElm"),Wt(this,"closeElm"),Wt(this,"closeSearchElm"),Wt(this,"filterText",""),Wt(this,"updateData",[]),Wt(this,"data",[]),Wt(this,"dataTotal"),Wt(this,"dropElm"),Wt(this,"okButtonElm"),Wt(this,"filterParentElm"),Wt(this,"ulElm"),Wt(this,"parentElm"),Wt(this,"labelElm"),Wt(this,"selectAllParentElm"),Wt(this,"selectAllElm"),Wt(this,"searchInputElm"),Wt(this,"selectGroupElms"),Wt(this,"selectItemElms"),Wt(this,"disableItemElms"),Wt(this,"noResultsElm"),Wt(this,"options"),Wt(this,"selectAllName",""),Wt(this,"selectGroupName",""),Wt(this,"selectItemName",""),Wt(this,"tabIndex"),Wt(this,"updateDataStart"),Wt(this,"updateDataEnd"),Wt(this,"virtualScroll"),Wt(this,"locales",{}),this.options=Object.assign({},Lo.DEFAULTS,this.elm.dataset,t),this._bindEventService=new Sb({distinctEvent:!0})}get isRenderAsHtml(){return this.options.renderOptionLabelAsHtml||this.options.useSelectOptionLabelToHtml}init(){this.initLocale(),this.initContainer(),this.initData(),this.initSelected(!0),this.initFilter(),this.initDrop(),this.initView(),this.options.onAfterCreate()}destroy(a=!0){var t,e,n,r,o;this.elm&&this.parentElm&&(this.options.onDestroy({hardDestroy:a}),a&&this.options.onHardDestroy(),this.elm.parentElement&&this.parentElm.parentElement&&this.elm.parentElement.insertBefore(this.elm,this.parentElm.parentElement.firstChild),this.elm.classList.remove("ms-offscreen"),this._bindEventService.unbindAll(),this.tabIndex&&(this.elm.tabIndex=+this.tabIndex),(t=this.virtualScroll)==null||t.destroy(),(e=this.dropElm)==null||e.remove(),(n=this.parentElm.parentNode)==null||n.removeChild(this.parentElm),this.fromHtml&&(delete this.options.data,this.fromHtml=!1),this.options.onAfterDestroy({hardDestroy:a}),a&&((o=(r=this.options).onAfterHardDestroy)==null||o.call(r),Object.keys(this.options).forEach(s=>delete this[s])))}initLocale(){if(this.options.locale){let a=window.multipleSelect.locales,t=this.options.locale.split(/-|_/);if(t[0]=t[0].toLowerCase(),t[1]&&(t[1]=t[1].toUpperCase()),a[this.options.locale])Object.assign(this.options,a[this.options.locale]);else if(a[t.join("-")])Object.assign(this.options,a[t.join("-")]);else if(a[t[0]])Object.assign(this.options,a[t[0]]);else throw new Error(`[multiple-select-vanilla] invalid locales "${this.options.locale}", make sure to import it before using it`)}}initContainer(){var r;let a=this.elm.getAttribute("name")||this.options.name||"";this.options.classes&&this.elm.classList.add(this.options.classes),this.options.classPrefix&&(this.elm.classList.add(this.options.classPrefix),this.options.size&&this.elm.classList.add(`${this.options.classPrefix}-${this.options.size}`)),this.elm.style.display="none",this.labelElm=this.elm.closest("label"),!this.labelElm&&this.elm.id&&(this.labelElm=document.createElement("label"),this.labelElm.htmlFor=this.elm.id),(r=this.labelElm)!=null&&r.querySelector("input")&&(this.labelElm=null),typeof this.options.single>"u"&&(this.options.single=!this.elm.multiple),this.parentElm=Hr("div",{className:`ms-parent ${this.elm.className||""} ${this.options.classes}`,dataset:{test:"sel"}});let t=this.elm.getAttribute("title")||"";t&&(this.parentElm.title=t),this.options.placeholder=this.options.placeholder||this.elm.getAttribute("placeholder")||"",this.tabIndex=this.elm.getAttribute("tabindex");let e="";this.tabIndex!==null&&(this.elm.tabIndex=-1,e=this.tabIndex&&`tabindex="${this.tabIndex}"`),this.choiceElm=Hr("button",{className:"ms-choice",type:"button"},this.parentElm),isNaN(e)&&(this.choiceElm.tabIndex=+e),this.choiceElm.appendChild(Hr("span",{className:"ms-placeholder",textContent:this.options.placeholder})),this.options.showClear&&this.choiceElm.appendChild(Hr("div",{className:"icon-close"})),this.choiceElm.appendChild(Hr("div",{className:"icon-caret"})),this.dropElm=Hr("div",{className:`ms-drop ${this.options.position}`},this.parentElm),a&&(this.dropElm.dataset.name=a);let n=this.elm.getAttribute("data-test")||this.options.dataTest;n&&(this.parentElm.dataset.test=n,this.dropElm.dataset.test=n),this.closeElm=this.choiceElm.querySelector(".icon-close"),this.options.dropWidth&&(this.dropElm.style.width=typeof this.options.dropWidth=="string"?this.options.dropWidth:`${this.options.dropWidth}px`),Pb(this.elm,this.parentElm),this.elm.disabled&&this.choiceElm.classList.add("disabled"),this.selectAllName=`selectAll${a}`,this.selectGroupName=`selectGroup${a}`,this.selectItemName=`selectItem${a}`,this.options.keepOpen||(this._bindEventService.unbind(document.body,"click"),this._bindEventService.bind(document.body,"click",o=>{o.target===this.choiceElm||cv(o.target,".ms-choice")===this.choiceElm||(o.target===this.dropElm||cv(o.target,".ms-drop")!==this.dropElm&&o.target!==this.elm)&&this.options.isOpen&&this.close()}))}initData(){let a=[];if(this.options.data){if(Array.isArray(this.options.data))this.data=this.options.data.map(t=>typeof t=="string"||typeof t=="number"?{text:t,value:t}:t);else if(typeof this.options.data=="object"){for(let[t,e]of Object.entries(this.options.data))a.push({value:t,text:`${e}`});this.data=a}}else this.elm.childNodes.forEach(t=>{let e=this.initRow(t);e&&a.push(e)}),this.options.data=a,this.data=a,this.fromHtml=!0;this.dataTotal=Ib(this.data||[])}initRow(a,t){var n,r;let e={};return((n=a.tagName)==null?void 0:n.toLowerCase())==="option"?(e.type="option",e.text=this.options.textTemplate(a),e.value=a.value,e.visible=!0,e.selected=!!a.selected,e.disabled=t||a.disabled,e.classes=a.getAttribute("class")||"",e.title=a.getAttribute("title")||"",a.dataset.value&&(e._value=a.dataset.value),Object.keys(a.dataset).length&&(e._data=a.dataset,e._data.divider&&(e.divider=e._data.divider)),e):((r=a.tagName)==null?void 0:r.toLowerCase())==="optgroup"?(e.type="optgroup",e.label=this.options.labelTemplate(a),e.visible=!0,e.selected=!!a.selected,e.disabled=a.disabled,e.children=[],Object.keys(a.dataset).length&&(e._data=a.dataset),a.childNodes.forEach(o=>{e.children.push(this.initRow(o,e.disabled))}),e):null}initDrop(){this.initList(),this.update(!0),this.options.isOpen&&this.open(10),this.options.openOnHover&&this.parentElm&&(this._bindEventService.bind(this.parentElm,"mouseover",()=>this.open(null)),this._bindEventService.bind(this.parentElm,"mouseout",()=>this.close()))}initFilter(){if(this.filterText="",this.options.filter||!this.options.filterByDataLength)return;let a=0;for(let t of this.data||[])t.type==="optgroup"?a+=t.children.length:a+=1;this.options.filter=a>this.options.filterByDataLength}initList(){if(this.options.filter&&(this.filterParentElm=Hr("div",{className:"ms-search"},this.dropElm),this.filterParentElm.appendChild(Hr("input",{autocomplete:"off",autocapitalize:"off",spellcheck:!1,type:"text",placeholder:this.options.filterPlaceholder||"🔎︎"})),this.options.showSearchClear&&this.filterParentElm.appendChild(Hr("span",{className:"icon-close"}))),this.options.selectAll&&!this.options.single){let a=this.elm.getAttribute("name")||this.options.name||"";this.selectAllParentElm=Hr("div",{className:"ms-select-all"});let t=document.createElement("label");Hr("input",{type:"checkbox",ariaChecked:String(this.allSelected),checked:this.allSelected,dataset:{name:`selectAll${a}`}},t),t.appendChild(Hr("span",{textContent:this.formatSelectAll()})),this.selectAllParentElm.appendChild(t),this.dropElm.appendChild(this.selectAllParentElm)}this.ulElm=document.createElement("ul"),this.dropElm.appendChild(this.ulElm),this.options.showOkButton&&!this.options.single&&(this.okButtonElm=Hr("button",{className:"ms-ok-button",type:"button",textContent:this.formatOkButton()},this.dropElm)),this.initListItems()}initListItems(){var e;let a=0,t=this.getListRows();if(this.options.selectAll&&!this.options.single&&(a=-1),t.length>Lo.BLOCK_ROWS*Lo.CLUSTER_BLOCKS){(e=this.virtualScroll)==null||e.destroy();let n=this.dropElm.style.display!=="none";n||(this.dropElm.style.left="-10000",this.dropElm.style.display="block");let r=()=>{this.virtualScroll&&(this.updateDataStart=this.virtualScroll.dataStart+a,this.updateDataEnd=this.virtualScroll.dataEnd+a,this.updateDataStart<0&&(this.updateDataStart=0),this.updateDataEnd>this.getDataLength()&&(this.updateDataEnd=this.getDataLength()))};this.ulElm&&(this.virtualScroll=new Mb({rows:t,scrollEl:this.ulElm,contentEl:this.ulElm,sanitizer:this.options.sanitizer,callback:()=>{r(),this.events()}})),r(),n||(this.dropElm.style.left="0",this.dropElm.style.display="none")}else this.ulElm&&(uf(this.ulElm),t.forEach(n=>this.ulElm.appendChild(df(n)))),this.updateDataStart=0,this.updateDataEnd=this.updateData.length,this.virtualScroll=null;return this.events(),t}getListRows(){var t;let a=[];return this.updateData=[],(t=this.data)==null||t.forEach(e=>a.push(...this.initListItem(e))),a.push({tagName:"li",props:{className:"ms-no-results",textContent:this.formatNoMatchesFound()}}),a}initListItem(a,t=0){let e=(a==null?void 0:a.title)||"",n=this.options.multiple?"multiple":"",r=this.options.single?"radio":"checkbox",o="";if(!(a!=null&&a.visible))return[];if(this.updateData.push(a),this.options.single&&!this.options.singleRadio&&(o="hide-radio "),a.selected&&(o+="selected "),a.type==="optgroup"){let v=[],_=this.options.hideOptgroupCheckboxes||this.options.single?{tagName:"span",props:{dataset:{name:this.selectGroupName,key:a._key}}}:{tagName:"input",props:{type:"checkbox",dataset:{name:this.selectGroupName,key:a._key},ariaChecked:String(a.selected||!1),checked:!!a.selected,disabled:a.disabled}};!o.includes("hide-radio")&&(this.options.hideOptgroupCheckboxes||this.options.single)&&(o+="hide-radio ");let C={tagName:"span",props:{}};this.applyAsTextOrHtmlWhenEnabled(C.props,a.label);let x={tagName:"li",props:{className:`group ${o}`.trim()},children:[{tagName:"label",props:{className:`optgroup${this.options.single||a.disabled?" disabled":""}`},children:[_,C]}]},S=this.options.cssStyler(a),E=String(this.options.styler(a)||"");return E&&(x.props.style=dv(E)),S&&(x.props.style=S),v.push(x),a.children.forEach(D=>v.push(...this.initListItem(D,1))),v}if(o+=a.classes||"",t&&this.options.single&&(o+=`option-level-${t} `),a.divider)return[{tagName:"li",props:{className:"option-divider"}}];let s=n||o?(n+o).trim():"",l=`${a.disabled?"disabled":""}`,u={tagName:"span",props:{}};this.applyAsTextOrHtmlWhenEnabled(u.props,a.text);let h={tagName:"input",props:{type:r,value:encodeURI(a.value),dataset:{key:a._key,name:this.selectItemName},ariaChecked:String(a.selected||!1),checked:!!a.selected,disabled:!!a.disabled}};a.selected&&(h.attrs={checked:"checked"});let c={tagName:"li",props:{className:s,title:e},children:[{tagName:"label",props:{className:l},children:[h,u]}]},p=this.options.cssStyler(a),m=String(this.options.styler(a)||"");return m&&(c.props.style=dv(m)),p&&(c.props.style=p),[c]}initSelected(a=!1){var e,n;let t=0;for(let r of this.data||[])if(r.type==="optgroup"){let o=r.children.filter(s=>s&&s.selected&&!s.disabled&&s.visible).length;r.children.length&&(r.selected=!this.options.single&&o&&o===r.children.filter(s=>s&&!s.disabled&&s.visible&&!s.divider).length),t+=o}else t+=r.selected&&!r.disabled&&r.visible?1:0;this.allSelected=((e=this.data)==null?void 0:e.filter(r=>r.selected&&!r.disabled&&r.visible).length)===((n=this.data)==null?void 0:n.filter(r=>!r.disabled&&r.visible&&!r.divider).length),a||(this.allSelected?this.options.onCheckAll():t===0&&this.options.onUncheckAll())}initView(){let a;window.getComputedStyle?(a=window.getComputedStyle(this.elm).width,a==="auto"&&(a=Lu(this.dropElm,"outer","width")+20)):a=Lu(this.elm,"outer","width")+20,this.parentElm.style.width=`${this.options.width||a}px`,this.elm.classList.add("ms-offscreen")}events(){var t;this._bindEventService.unbind(this.okButtonElm),this._bindEventService.unbind(this.searchInputElm),this._bindEventService.unbind(this.selectAllElm),this._bindEventService.unbind(this.selectGroupElms),this._bindEventService.unbind(this.selectItemElms),this._bindEventService.unbind(this.disableItemElms),this._bindEventService.unbind(this.noResultsElm),this.closeSearchElm=(t=this.filterParentElm)==null?void 0:t.querySelector(".icon-close"),this.searchInputElm=this.dropElm.querySelector(".ms-search input"),this.selectAllElm=this.dropElm.querySelector(`input[data-name="${this.selectAllName}"]`),this.selectGroupElms=this.dropElm.querySelectorAll(`input[data-name="${this.selectGroupName}"],span[data-name="${this.selectGroupName}"]`),this.selectItemElms=this.dropElm.querySelectorAll(`input[data-name="${this.selectItemName}"]:enabled`),this.disableItemElms=this.dropElm.querySelectorAll(`input[data-name="${this.selectItemName}"]:disabled`),this.noResultsElm=this.dropElm.querySelector(".ms-no-results");let a=e=>{e.preventDefault(),!e.target.classList.contains("icon-close")&&this[this.options.isOpen?"close":"open"]()};this.labelElm&&this._bindEventService.bind(this.labelElm,"click",e=>{e.target.nodeName.toLowerCase()==="label"&&(a(e),(!this.options.filter||!this.options.isOpen)&&this.focus(),e.stopPropagation())}),this._bindEventService.bind(this.choiceElm,"click",a),this.options.onFocus&&this._bindEventService.bind(this.choiceElm,"focus",this.options.onFocus),this.options.onBlur&&this._bindEventService.bind(this.choiceElm,"blur",this.options.onBlur),this._bindEventService.bind(this.parentElm,"keydown",e=>{e.code==="Escape"&&!this.options.keepOpen&&(this.close(),this.choiceElm.focus())}),this.closeElm&&this._bindEventService.bind(this.closeElm,"click",e=>{e.preventDefault(),this._checkAll(!1,!0),this.initSelected(!1),this.updateSelected(),this.update(),this.options.onClear()}),this.closeSearchElm&&this._bindEventService.bind(this.closeSearchElm,"click",e=>{e.preventDefault(),this.searchInputElm&&(this.searchInputElm.value="",this.searchInputElm.focus()),this.filter()}),this.searchInputElm&&(this._bindEventService.bind(this.searchInputElm,"keydown",e=>{e.code==="Tab"&&e.shiftKey&&this.close()}),this._bindEventService.bind(this.searchInputElm,"keyup",e=>{var n,r,o;if(this.options.filterAcceptOnEnter&&["Enter","Space"].includes(e.code)&&((n=this.searchInputElm)!=null&&n.value)){if(this.options.single){let s=[];(r=this.selectItemElms)==null||r.forEach(l=>{var u;((u=l.closest("li"))==null?void 0:u.style.display)!=="none"&&s.push(l)}),s.length&&s[0].hasAttribute("data-name")&&this.setSelects([s[0].value])}else(o=this.selectAllElm)==null||o.click();this.close(),this.focus();return}this.filter()})),this.selectAllElm&&(this._bindEventService.unbind(this.selectAllElm,"click"),this._bindEventService.bind(this.selectAllElm,"click",e=>{var n;this._checkAll((n=e.currentTarget)==null?void 0:n.checked)})),this.okButtonElm&&(this._bindEventService.unbind(this.okButtonElm,"click"),this._bindEventService.bind(this.okButtonElm,"click",e=>{a(e),e.stopPropagation()})),this._bindEventService.bind(this.selectGroupElms,"click",e=>{let n=e.currentTarget,r=n.checked,o=Nu(this.data,"_key",n.dataset.key);this._checkGroup(o,r),this.options.onOptgroupClick(lf({label:o.label,selected:o.selected,data:o._data,children:o.children.map(s=>{if(s)return lf({text:s.text,value:s.value,selected:s.selected,disabled:s.disabled,data:s._data})})}))}),this._bindEventService.bind(this.selectItemElms,"click",e=>{let n=e.currentTarget,r=n.checked,o=Nu(this.data,"_key",n.dataset.key),s=()=>{this.options.single&&this.options.isOpen&&!this.options.keepOpen&&this.close()};if(this.options.onBeforeClick(o)===!1){s();return}this._check(o,r),this.options.onClick(lf({text:o.text,value:o.value,selected:o.selected,data:o._data})),s()})}open(a=0){if(a!==null&&a>=0){let t;clearTimeout(t),t=setTimeout(()=>this.openDrop(),a)}else this.openDrop()}openDrop(){var r,o,s,l,u;if((r=this.choiceElm)!=null&&r.classList.contains("disabled"))return;if(this.options.isOpen=!0,this.parentElm.classList.add("ms-parent-open"),(s=(o=this.choiceElm)==null?void 0:o.querySelector("div"))==null||s.classList.add("open"),this.dropElm.style.display="block",(l=this.selectAllElm)!=null&&l.parentElement&&(this.selectAllElm.parentElement.style.display="block"),this.noResultsElm&&(this.noResultsElm.style.display="none"),this.getDataLength()||((u=this.selectAllElm)!=null&&u.parentElement&&(this.selectAllElm.parentElement.style.display="none"),this.noResultsElm&&(this.noResultsElm.style.display="block")),this.options.container){let h=cf(this.dropElm),c;this.options.container instanceof Node?c=this.options.container:typeof this.options.container=="string"&&(c=this.options.container==="body"?document.body:document.querySelector(this.options.container)),c.appendChild(this.dropElm),this.dropElm.style.top=`${(h==null?void 0:h.top)??0}px`,this.dropElm.style.left=`${(h==null?void 0:h.left)??0}px`,this.dropElm.style.minWidth="auto",this.dropElm.style.width=`${Lu(this.parentElm,"outer","width")}px`}let a=this.options.minHeight,t=this.options.maxHeight;this.options.maxHeightUnit==="row"&&(t=Lu(this.dropElm.querySelector("ul>li"),"outer","height")*this.options.maxHeight);let e=this.dropElm.querySelector("ul");e&&(a&&(e.style.minHeight=`${a}px`),e.style.maxHeight=`${t}px`),this.dropElm.querySelectorAll(".multiple").forEach(h=>h.style.width=`${this.options.multipleWidth}px`),this.getDataLength()&&this.options.filter&&(this.searchInputElm&&(this.searchInputElm.value="",this.searchInputElm.focus()),this.filter(!0)),this.options.autoAdjustDropWidthByTextSize&&this.adjustDropWidthByText();let n=this.options.position;if(this.options.autoAdjustDropHeight){if(this.options.autoAdjustDropPosition){let{bottom:h,top:c}=af(this.dropElm),p=this.dropElm.getBoundingClientRect().height;n=h<p&&c>h?"top":"bottom"}this.adjustDropHeight(n)}this.options.autoAdjustDropPosition&&this.adjustDropPosition(!0),this.options.onOpen()}close(){var a,t;this.options.isOpen=!1,this.parentElm.classList.remove("ms-parent-open"),(t=(a=this.choiceElm)==null?void 0:a.querySelector("div"))==null||t.classList.remove("open"),this.dropElm.style.display="none",this.options.container&&(this.parentElm.appendChild(this.dropElm),this.dropElm.style.top="auto",this.dropElm.style.left="auto"),this.options.onClose()}applyAsTextOrHtmlWhenEnabled(a,t){a||(a={}),this.isRenderAsHtml?a.innerHTML=typeof this.options.sanitizer=="function"?this.options.sanitizer(t):t:a.textContent=t}update(a=!1){var u;let t=this.getSelects(),e=this.getSelects("text");this.options.displayValues&&(e=t);let n=(u=this.choiceElm)==null?void 0:u.querySelector("span"),r=t.length,o=null,s=()=>{if(this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml){let h=t.join(this.options.displayDelimiter);return this.options.useSelectOptionLabelToHtml?Db(h):h}return e.join(this.options.displayDelimiter)};if(n){if(r===0){let h=this.options.placeholder||"";n.classList.add("ms-placeholder"),this.applyAsTextOrHtmlWhenEnabled(n,h)}else r<this.options.minimumCountSelected?o=s():this.formatAllSelected()&&r===this.dataTotal?o=this.formatAllSelected():this.options.ellipsis&&r>this.options.minimumCountSelected?o=`${e.slice(0,this.options.minimumCountSelected).join(this.options.displayDelimiter)}...`:this.formatCountSelected(r,this.dataTotal)&&r>this.options.minimumCountSelected?o=this.formatCountSelected(r,this.dataTotal):o=s();if(o!==null&&(n==null||n.classList.remove("ms-placeholder"),this.applyAsTextOrHtmlWhenEnabled(n,o)),this.options.displayTitle||this.options.addTitle){this.options.addTitle&&console.warn("[Multiple-Select-Vanilla] Please note that the `addTitle` option was deprecated and replaced by `displayTitle`.");let h=this.options.useSelectOptionLabel||this.options.useSelectOptionLabelToHtml?"value":"text";n.title=this.getSelects(h).join(this.options.displayDelimiter)}}let l=this.getSelects();this.options.single?this.elm.value=l.length?l[0]:"":Array.from(this.elm.options).forEach(h=>{h.selected=l.some(c=>c===h.value)}),a||this.elm.dispatchEvent(new Event("change"))}updateSelected(a){var e;for(let n=this.updateDataStart;n<this.updateDataEnd;n++){let r=this.updateData[n],o=this.dropElm.querySelector(`input[data-key=${r._key}]`);if(o){o.checked=r.selected;let s=o.closest("li");s&&(r.selected&&!s.classList.contains("selected")?s.classList.add("selected"):r.selected||s.classList.remove("selected"))}}let t=((e=this.data)==null?void 0:e.filter(n=>n.visible).length)===0;this.selectAllElm&&(this.selectAllElm.checked=this.allSelected,hv(this.selectAllElm.closest("li"),!t)),hv(this.noResultsElm,t),this.virtualScroll&&(this.virtualScroll.rows=a??this.getListRows())}getData(){return this.options.data}getDataLength(){var a;return((a=this.data)==null?void 0:a.length)??0}getOptions(a=!0){let t=Object.assign({},this.options);return delete t.data,a?of(t):this.options}refreshOptions(a){Ab(this.options,a,!0)||(this.options=Object.assign(this.options,a),this.destroy(!1),this.init())}getDropElement(){return this.dropElm}getParentElement(){return this.parentElm}getSelects(a="value"){let t=[];for(let e of this.data||[])if(e.type==="optgroup"){let n=e.children.filter(r=>r==null?void 0:r.selected);if(!n.length)continue;if(a==="value"||this.options.single)t.push(...n.map(r=>a==="value"&&r._value||r[a]));else{let r=[];r.push("["),r.push(e.label),r.push(`: ${n.map(o=>o[a]).join(", ")}`),r.push("]"),t.push(r.join(""))}}else e.selected&&t.push(a==="value"&&e._value||e[a]);return t}setSelects(a,t="value",e=!1){let n=!1,r=o=>{var s;for(let l of o){let u=!1;if(t==="text"){let h=document.createElement("div");this.applyAsTextOrHtmlWhenEnabled(h,l.text),u=a.includes(((s=h.textContent)==null?void 0:s.trim())??"")}else u=a.includes(l._value||l.value),!u&&l.value===`${+l.value}`&&(u=a.includes(+l.value));l.selected!==u&&(n=!0),l.selected=u}};for(let o of this.data||[])o.type==="optgroup"?r(o.children):r([o]);n&&(this.initSelected(e),this.updateSelected(),this.update(e))}enable(){var a;(a=this.choiceElm)==null||a.classList.remove("disabled")}disable(){var a;(a=this.choiceElm)==null||a.classList.add("disabled")}check(a){let t=Nu(this.data,"value",a);t&&this._check(t,!0)}uncheck(a){let t=Nu(this.data,"value",a);t&&this._check(t,!1)}_check(a,t){this.options.single&&this._checkAll(!1,!0),a.selected=t,this.initSelected(),this.updateSelected(),this.update()}checkAll(){this._checkAll(!0)}uncheckAll(){this._checkAll(!1)}_checkAll(a,t){for(let e of this.data||[])e.type==="optgroup"?this._checkGroup(e,a,!0):!e.disabled&&!e.divider&&(t||e.visible)&&(e.selected=a);t||(this.initSelected(),this.updateSelected(),this.update())}_checkGroup(a,t,e){a.selected=t,a.children.forEach(n=>{n&&!n.disabled&&!n.divider&&(e||n.visible)&&(n.selected=t)}),e||(this.initSelected(),this.updateSelected(),this.update())}checkInvert(){if(!this.options.single){for(let a of this.data||[])if(a.type==="optgroup")for(let t of a.children)t&&(t.divider||(t.selected=!t.selected));else a&&!a.divider&&(a.selected=!a.selected);this.initSelected(),this.updateSelected(),this.update()}}focus(){var a;(a=this.choiceElm)==null||a.focus(),this.options.onFocus()}blur(){var a;(a=this.choiceElm)==null||a.blur(),this.options.onBlur()}refresh(){this.destroy(!1),this.init()}filter(a){var r;let t=((r=this.searchInputElm)==null?void 0:r.value.trim())??"",e=t.toLowerCase();if(this.filterText===e)return;this.filterText=e;for(let o of this.data||[])if(o.type==="optgroup")if(this.options.filterGroup){let s=`${(o==null?void 0:o.label)??""}`;if(o!=null){let l=this.options.customFilter({label:ea(s.toLowerCase()),search:ea(e),originalLabel:s,originalSearch:t,row:o});o.visible=l;for(let u of o.children)u&&(u.visible=l)}}else{for(let s of o.children)if(s!=null){let l=`${(s==null?void 0:s.text)??""}`;s.visible=this.options.customFilter({text:ea(l.toLowerCase()),search:ea(e),originalText:l,originalSearch:t,row:s,parent:o})}o.visible=o.children.filter(s=>s==null?void 0:s.visible).length>0}else{let s=`${(o==null?void 0:o.text)??""}`;o.visible=this.options.customFilter({text:ea(s.toLowerCase()),search:ea(e),originalText:s,originalSearch:t,row:o})}let n=this.initListItems();this.initSelected(a),this.updateSelected(n),a||this.options.onFilter(t)}adjustDropHeight(a){var h,c,p,m;let t=a!=="top",e=((h=this.filterParentElm)==null?void 0:h.getBoundingClientRect().height)??0,n=((c=this.okButtonElm)==null?void 0:c.getBoundingClientRect().height)??0,r=this.options.single?0:((p=this.selectAllParentElm)==null?void 0:p.getBoundingClientRect().height)??0,o=e+n+r+5,{bottom:s,top:l}=af(this.parentElm),u=this.options.maxHeight;if(t?u=s-o-this.options.adjustedHeightPadding:u=l-o-this.options.adjustedHeightPadding,!this.options.maxHeight||this.options.maxHeight&&u<this.options.maxHeight){let v=(m=this.dropElm)==null?void 0:m.querySelector("ul");return v&&(v.style.maxHeight=`${u}px`),!0}return!1}adjustDropPosition(a){let t="bottom";if(this.dropElm&&this.parentElm){let{bottom:e,top:n}=af(this.dropElm),{top:r,left:o}=cf(this.parentElm),s=this.dropElm.getBoundingClientRect().height,l=this.dropElm.getBoundingClientRect().width,u=document.body.offsetWidth||window.innerWidth,h=this.parentElm.getBoundingClientRect().width;if(e>s)t="bottom";else if(s>e&&n>e){if(this.options.container){let c=r-s;c<0&&(c=0),(c>0||a)&&(t="top",this.dropElm.style.top=`${c<0?0:c}px`)}else t="top",this.dropElm.classList.add(t);this.dropElm.classList.remove("bottom")}u-l<o&&(this.dropElm.style.left=`${o-(l-h)}px`)}return t}adjustDropWidthByText(){let a=this.parentElm.scrollWidth;(this.options.dropWidth||this.options.width)&&(a=this.options.dropWidth||this.options.width||0);let t=this.dropElm.querySelector(".ms-select-all span"),e=this.dropElm.querySelector("ul"),n=26,r=(t==null?void 0:t.clientWidth)??0+n,o=e.scrollHeight>e.clientHeight?this.getScrollbarWidth():0,s=0;this.dropElm.querySelectorAll("li label").forEach(l=>{l.scrollWidth>s&&(s=l.scrollWidth)}),s+=n+o,s<r&&(s=r),this.options.maxWidth&&s>this.options.maxWidth&&(s=this.options.maxWidth),this.options.minWidth&&s<this.options.minWidth&&(s=this.options.minWidth),(a==="100%"||+a<s)&&(this.dropElm.style.width=`${s}px`,this.dropElm.style.maxWidth=`${s}px`)}getScrollbarWidth(){var r;let a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",document.body.appendChild(a);let t=a.offsetWidth;a.style.overflow="scroll";let e=document.createElement("div");e.style.width="100%",a.appendChild(e);let n=e.offsetWidth;return(r=a.parentNode)==null||r.removeChild(a),t-n}formatAllSelected(){return this.options.allSelectedText||this.options.formatAllSelected()}formatCountSelected(a,t){return this.options.countSelectedText?this.options.countSelectedText.replace("#",`${a}`).replace("%",`${t}`):this.options.formatCountSelected(a,t)}formatNoMatchesFound(){return this.options.noMatchesFoundText||this.options.formatNoMatchesFound()}formatOkButton(){return this.options.okButtonText||this.options.formatOkButton()}formatSelectAll(){return this.options.selectAllText||this.options.formatSelectAll()}},ta=function(a,t){return typeof a=="string"?hf(document.querySelectorAll(a),t):a instanceof Node?hf([a],t):hf(a,t)};function hf(a,t){let e=Array.from(a),n=[];for(let r=0;r<e.length;r++){let o=e[r];try{o._multipleSelect!==void 0&&(o._multipleSelect.destroy(),delete o._multipleSelect),o._multipleSelect=new Nb(o,t||{}),o._multipleSelect.init();let s=o._multipleSelect.getOptions(!1);s.onHardDestroy=()=>delete o._multipleSelect,s.onAfterHardDestroyed=()=>n[r]=null,n.push(o._multipleSelect)}catch(s){console.error(s)}}return n.length===1?n[0]:n}ta.defaults=Lo.DEFAULTS,ta.locales={...lv},ta.methods=Lo.METHODS,typeof window<"u"&&(window.multipleSelect=ta);class fv{constructor(t,e,n,r=!0){this.translaterService=t,this.collectionService=e,this.rxjs=n,this._isMultipleSelect=!0,this._collectionLength=0,this._shouldTriggerQuery=!0,this.isFilled=!1,this.enableTranslateLabel=!1,this.subscriptions=[],this._isMultipleSelect=r}get collectionOptions(){var t,e,n;return(n=(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)===null||e===void 0?void 0:e.collectionOptions)!==null&&n!==void 0?n:{}}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get customStructure(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)===null||e===void 0?void 0:e.customStructure}get gridOptions(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions())!==null&&e!==void 0?e:{}}get defaultOperator(){return this.isMultipleSelect?Nt.in:Nt.equal}get isMultipleSelect(){return this._isMultipleSelect}get msInstance(){return this._msInstance}get selectOptions(){return this.defaultOptions}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}init(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E,D,A;if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this.filterContainerElm=t.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection&&!this.columnFilter.collectionAsync)throw new Error(`[Slickgrid-Universal] You need to pass a "collection" (or "collectionAsync") for the MultipleSelect/SingleSelect Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.multipleSelect, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }`);if(this.enableTranslateLabel=(n=(e=this.columnFilter)===null||e===void 0?void 0:e.enableTranslateLabel)!==null&&n!==void 0?n:!1,this.labelName=(o=(r=this.customStructure)===null||r===void 0?void 0:r.label)!==null&&o!==void 0?o:"label",this.labelPrefixName=(l=(s=this.customStructure)===null||s===void 0?void 0:s.labelPrefix)!==null&&l!==void 0?l:"labelPrefix",this.labelSuffixName=(h=(u=this.customStructure)===null||u===void 0?void 0:u.labelSuffix)!==null&&h!==void 0?h:"labelSuffix",this.optionLabel=(p=(c=this.customStructure)===null||c===void 0?void 0:c.optionLabel)!==null&&p!==void 0?p:"value",this.valueName=(v=(m=this.customStructure)===null||m===void 0?void 0:m.value)!==null&&v!==void 0?v:"value",this.enableTranslateLabel&&(!this.translaterService||typeof this.translaterService.translate!="function"))throw new Error('[select-filter] The Translate Service is required for the Select Filter to work correctly when "enableTranslateLabel" is set.');this._locales=(C=(_=this.gridOptions)===null||_===void 0?void 0:_.locales)!==null&&C!==void 0?C:je.locales,this.initMultipleSelectTemplate();let P=((x=this.gridOptions)===null||x===void 0?void 0:x.defaultFilterPlaceholder)||"";!((S=this.columnFilter)===null||S===void 0)&&S.placeholder&&(P=this.columnFilter.placeholder),this.defaultOptions.placeholder=P||"",this._isMultipleSelect&&(!((E=this.columnDef)===null||E===void 0)&&E.filter)&&(this.columnDef.filter.emptySearchTermReturnAllValues=(A=(D=this.columnDef.filter)===null||D===void 0?void 0:D.emptySearchTermReturnAllValues)!==null&&A!==void 0?A:!1);const M=this.columnFilter.collection||[];return this.renderDomElement(M),new Promise(async(B,Z)=>{try{const L=this.columnFilter.collectionAsync;let ae;L&&!this.columnFilter.collection?(ae=Km(L,this.columnDef,this.renderDomElement.bind(this),this.rxjs,this.subscriptions),B(ae)):(ae=M,B(M)),(L||this.columnFilter.enableCollectionWatch)&&(await(ae??L),this.watchCollectionChanges())}catch(L){Z(L)}})}clear(t=!0){var e,n,r;this._msInstance&&this._collectionLength>0&&(this._msInstance.setSelects([]),(e=this.filterElm)===null||e===void 0||e.classList.remove("filled"),(r=(n=this._msInstance)===null||n===void 0?void 0:n.getParentElement())===null||r===void 0||r.classList.remove("filled"),this.searchTerms=[],this._shouldTriggerQuery=t,this.callback(void 0,{columnDef:this.columnDef,clearFilterTriggered:!0,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0)}destroy(){var t,e;typeof((t=this._msInstance)===null||t===void 0?void 0:t.destroy)=="function"&&this._msInstance.destroy(),(e=this.filterElm)===null||e===void 0||e.remove(),Xd(this.subscriptions)}getValues(){var t,e;return(e=(t=this._msInstance)===null||t===void 0?void 0:t.getSelects())!==null&&e!==void 0?e:[]}setValues(t,e){t!==void 0&&this._msInstance&&(t=Array.isArray(t)?t.every(n=>qd(n))?t.map(String):t:[t],this._msInstance.setSelects(t)),this.updateFilterStyle(this.getValues().length>0),this.operator=e||this.defaultOperator}filterCollection(t){var e;let n=t;if(this.columnFilter&&this.columnFilter.collectionFilterBy){const r=this.columnFilter.collectionFilterBy,o=((e=this.columnFilter.collectionOptions)===null||e===void 0?void 0:e.filterResultAfterEachPass)||null;n=this.collectionService.filterCollection(n,r,o)}return n}sortCollection(t){let e=t;if(this.columnFilter&&this.columnFilter.collectionSortBy){const n=this.columnFilter.collectionSortBy;e=this.collectionService.sortCollection(this.columnDef,e,n,this.enableTranslateLabel)}return e}watchCollectionChanges(){var t;!((t=this.columnFilter)===null||t===void 0)&&t.collection&&(Ma(this.columnFilter.collection,e=>{this.renderDomElement(this.columnFilter.collection||e||[])}),Jc(this.columnFilter,"collection",e=>{this.renderDomElement(e||[]),this.columnFilter.collection&&Ma(this.columnFilter.collection,n=>{this.renderDomElement(this.columnFilter.collection||n||[])})}))}renderDomElement(t){var e,n,r,o;if(!Array.isArray(t)&&(!((e=this.collectionOptions)===null||e===void 0)&&e.collectionInsideObjectProperty)){const h=this.collectionOptions.collectionInsideObjectProperty;t=_n(t,h||"")}if(!Array.isArray(t))throw new Error('The "collection" passed to the Select Filter is not a valid array.');let s=[];if(t.length>0&&(s=[...t]),!((n=this.collectionOptions)===null||n===void 0)&&n.addBlankEntry&&Array.isArray(s)&&s.length>0&&s[0][this.valueName]!==""&&s.unshift(this.createBlankEntry()),!((r=this.collectionOptions)===null||r===void 0)&&r.addCustomFirstEntry&&Array.isArray(s)&&s.length>0&&s[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&s.unshift(this.collectionOptions.addCustomFirstEntry),!((o=this.collectionOptions)===null||o===void 0)&&o.addCustomLastEntry&&Array.isArray(s)&&s.length>0){const h=s.length-1;s[h][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&s.push(this.collectionOptions.addCustomLastEntry)}let l=s;l=this.filterCollection(l),l=this.sortCollection(l);const u=rm("filter",l,this.columnDef,this.grid,this.isMultipleSelect,this.translaterService,this.searchTerms||[]);this.isFilled=u.hasFoundSearchTerm,this.createFilterElement(u.selectElement,u.dataCollection),this._collectionLength=l.length}createBlankEntry(){const t={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(t[this.labelPrefixName]=""),this.labelSuffixName&&(t[this.labelSuffixName]=""),t}createFilterElement(t,e){var n,r;const o=(r=(n=this.columnDef)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:"";this.elementName=`filter-${o}`,this.defaultOptions.name=this.elementName,on(this.filterContainerElm),this.filterElm=t,this.filterElm.dataset.columnId=`${o}`,this.updateFilterStyle(this.isFilled),this.filterContainerElm.appendChild(t);const s=this.columnFilter?this.columnFilter.filterOptions:{};this.filterElmOptions={...this.defaultOptions,...s,data:e},this._msInstance=ta(t,this.filterElmOptions)}initMultipleSelectTemplate(){var t,e,n,r,o,s,l,u,h,c,p,m,v,_,C,x;const S=(e=(t=this.gridOptions)===null||t===void 0?void 0:t.enableTranslate)!==null&&e!==void 0?e:!1,D={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,name:`${(r=(n=this.columnDef)===null||n===void 0?void 0:n.id)!==null&&r!==void 0?r:""}`,container:"body",filter:!1,maxHeight:275,single:!0,renderOptionLabelAsHtml:(s=(o=this.columnFilter)===null||o===void 0?void 0:o.enableRenderHtml)!==null&&s!==void 0?s:!1,sanitizer:A=>Ln(this.gridOptions,A),onClose:()=>this.onTriggerEvent()};if(this._isMultipleSelect){D.single=!1,D.showOkButton=!0,D.displayTitle=!0;const A=ho(this.gridOptions);D.countSelectedText=S&&(!((l=this.translaterService)===null||l===void 0)&&l.translate)?this.translaterService.translate(`${A}X_OF_Y_SELECTED`):(u=this._locales)===null||u===void 0?void 0:u.TEXT_X_OF_Y_SELECTED,D.allSelectedText=S&&(!((h=this.translaterService)===null||h===void 0)&&h.translate)?this.translaterService.translate(`${A}ALL_SELECTED`):(c=this._locales)===null||c===void 0?void 0:c.TEXT_ALL_SELECTED,D.noMatchesFoundText=S&&(!((p=this.translaterService)===null||p===void 0)&&p.translate)?this.translaterService.translate(`${A}NO_MATCHES_FOUND`):(m=this._locales)===null||m===void 0?void 0:m.TEXT_NO_MATCHES_FOUND,D.okButtonText=S&&(!((v=this.translaterService)===null||v===void 0)&&v.translate)?this.translaterService.translate(`${A}OK`):(_=this._locales)===null||_===void 0?void 0:_.TEXT_OK,D.selectAllText=S&&(!((C=this.translaterService)===null||C===void 0)&&C.translate)?this.translaterService.translate(`${A}SELECT_ALL`):(x=this._locales)===null||x===void 0?void 0:x.TEXT_SELECT_ALL}this.defaultOptions=D}onTriggerEvent(){if(this._msInstance){const t=this.getValues();this.updateFilterStyle(Array.isArray(t)&&t.length>1||t.length===1&&t[0]!==""),this.searchTerms=t,this.callback(void 0,{columnDef:this.columnDef,operator:this.operator,searchTerms:t,shouldTriggerQuery:this._shouldTriggerQuery}),this._shouldTriggerQuery=!0}}updateFilterStyle(t){var e,n,r,o,s,l;t?(this.isFilled=!0,(e=this.filterElm)===null||e===void 0||e.classList.add("filled"),(r=(n=this._msInstance)===null||n===void 0?void 0:n.getParentElement())===null||r===void 0||r.classList.add("filled")):(this.isFilled=!1,(o=this.filterElm)===null||o===void 0||o.classList.remove("filled"),(l=(s=this._msInstance)===null||s===void 0?void 0:s.getParentElement())===null||l===void 0||l.classList.remove("filled"))}}class Lb extends fv{constructor(t,e,n){super(t,e,n,!0),this.translaterService=t,this.collectionService=e,this.rxjs=n}}class Hb{constructor(t){this.translater=t,this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0,this._currentValues=[],this.searchTerms=[],this._bindEventService=new Nn}get columnFilter(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.filter)!==null&&e!==void 0?e:{}}get defaultOperator(){return Nt.equal}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get operator(){var t,e;return(e=(t=this.columnFilter)===null||t===void 0?void 0:t.operator)!==null&&e!==void 0?e:this.defaultOperator}set operator(t){this.columnFilter&&(this.columnFilter.operator=t)}init(t){if(!t)throw new Error('[Slickgrid-Universal] A filter must always have an "init()" with valid arguments.');if(this.grid=t.grid,this.callback=t.callback,this.columnDef=t.columnDef,this.searchTerms=(t.hasOwnProperty("searchTerms")?t.searchTerms:[])||[],this.filterContainerElm=t.filterContainerElm,!this.grid||!this.columnDef||!this.columnFilter||!this.columnFilter.collection)throw new Error('[Slickgrid-Universal] You need to pass a "collection" for the Native Select Filter to work correctly.');if(this.columnFilter.enableTranslateLabel&&!this.gridOptions.enableTranslate&&(!this.translater||typeof this.translater.translate!="function"))throw new Error('The I18N Service is required for the Native Select Filter to work correctly when "enableTranslateLabel" is set.');let e=Array.isArray(this.searchTerms)&&this.searchTerms.length>=0?this.searchTerms[0]:"";(typeof e=="boolean"||typeof e=="number")&&(e=`${e??""}`),this.filterElm=this.createFilterElement(e),this._bindEventService.bind(this.filterElm,"change",this.handleOnChange.bind(this))}clear(t=!0){this.filterElm&&(this._clearFilterTriggered=!0,this._shouldTriggerQuery=t,this.searchTerms=[],this._currentValues=[],this.filterElm.value="",this.filterElm.classList.remove("filled"),this.filterElm.dispatchEvent(new Event("change")))}destroy(){var t,e;this._bindEventService.unbindAll(),(e=(t=this.filterElm)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t)}getValues(){return this._currentValues||[]}setValues(t,e){var n;Array.isArray(t)?(this.filterElm.value=`${(n=t[0])!==null&&n!==void 0?n:""}`,this._currentValues=t):t&&(this.filterElm.value=`${t??""}`,this._currentValues=[t]),this.getValues().length>0?this.filterElm.classList.add("filled"):this.filterElm.classList.remove("filled"),this.operator=e||this.defaultOperator}buildFilterSelectFromCollection(t){var e,n,r,o,s,l,u,h,c,p,m,v;const _=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",C=Re("select",{className:`form-control search-filter filter-${_}`,ariaLabel:(o=(r=this.columnFilter)===null||r===void 0?void 0:r.ariaLabel)!==null&&o!==void 0?o:`${qr(_+"")} Search Filter`}),x=(l=(s=this.columnFilter.customStructure)===null||s===void 0?void 0:s.label)!==null&&l!==void 0?l:"label",S=(h=(u=this.columnFilter.customStructure)===null||u===void 0?void 0:u.value)!==null&&h!==void 0?h:"value",E=(p=(c=this.columnFilter)===null||c===void 0?void 0:c.enableTranslateLabel)!==null&&p!==void 0?p:!1;if(t.every(D=>typeof D=="string"))for(const D of t)C.appendChild(Re("option",{value:D,label:D,textContent:D}));else for(const D of t){if(!D||D[x]===void 0&&D.labelKey===void 0)throw new Error("A collection with value/label (or value/labelKey when using Locale) is required to populate the Native Select Filter list, for example:: { filter: model: Filters.select, collection: [ { value: '1', label: 'One' } ]')");const A=D.labelKey||D[x],P=(D.labelKey||E)&&typeof this.translater!==void 0&&(!((v=(m=this.translater).getCurrentLanguage)===null||v===void 0)&&v.call(m))?this.translater.translate(A||" "):A;C.appendChild(Re("option",{value:D[S],textContent:P}))}return C}createFilterElement(t){var e,n,r,o;const s=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"";on(this.filterContainerElm);const l=t||"",u=(o=(r=this.columnFilter)===null||r===void 0?void 0:r.collection)!==null&&o!==void 0?o:[];if(!Array.isArray(u))throw new Error('The "collection" passed to the Native Select Filter is not a valid array.');const h=this.buildFilterSelectFromCollection(u);return h.value=l,h.dataset.columnid=`${s||""}`,l&&(this._currentValues=[l]),this.filterContainerElm.appendChild(h),h}handleOnChange(t){const e=t&&t.target&&t.target.value||"";this._currentValues=[e],this._clearFilterTriggered?(this.callback(t,{columnDef:this.columnDef,clearFilterTriggered:this._clearFilterTriggered,shouldTriggerQuery:this._shouldTriggerQuery}),this.filterElm.classList.remove("filled")):(e===""?this.filterElm.classList.remove("filled"):this.filterElm.classList.add("filled"),this.callback(t,{columnDef:this.columnDef,operator:this.operator,searchTerms:[e],shouldTriggerQuery:this._shouldTriggerQuery})),this._clearFilterTriggered=!1,this._shouldTriggerQuery=!0}}class Bb extends fv{constructor(t,e,n){super(t,e,n,!1),this.translaterService=t,this.collectionService=e,this.rxjs=n}}class Vb extends rf{constructor(t){super(t),this.translaterService=t,this.sliderType="single"}}class zb extends rf{constructor(t){super(t),this.translaterService=t,this.sliderType="double"}}const Hu={autocompleter:rb,compoundDate:hb,compoundInput:ov,compoundInputNumber:fb,compoundInputPassword:pb,compoundInputText:ov,compoundSlider:vb,dateRange:gb,input:Xs,inputMask:_b,inputNumber:bb,inputPassword:Cb,inputText:Xs,multipleSelect:Lb,select:Hb,singleSelect:Bb,slider:Vb,sliderRange:zb};class Ub{constructor(t,e,n,r){var o,s;this.config=t,this.translaterService=e,this.collectionService=n,this.rxjs=r,this._options=(s=(o=this.config)===null||o===void 0?void 0:o.options)!==null&&s!==void 0?s:{}}addRxJsResource(t){this.rxjs=t}createFilter(t){let e;return t!=null&&t.model&&(e=typeof t.model=="function"?new t.model(this.translaterService,this.collectionService,this.rxjs):t.model),!e&&this._options.defaultFilter&&(e=new this._options.defaultFilter(this.translaterService,this.collectionService,this.rxjs)),e}}const ff={alwaysShowVerticalScroll:!0,autoEdit:!1,asyncEditorLoading:!1,autoFitColumnsOnFirstLoad:!0,autoFixResizeTimeout:5*60*5,autoFixResizeRequiredGoodCount:2,autoFixResizeWhenBrokenStyleDetected:!1,autoParseInputFilterOperator:!0,autoResize:{applyResizeToContainer:!0,calculateAvailableSizeBy:"window",bottomPadding:20,minHeight:180,minWidth:300,rightPadding:0},cellHighlightCssClass:"slick-cell-modified",checkboxSelector:{cssClass:"slick-cell-checkboxsel",width:40},columnGroupSeparator:" - ",columnPicker:{fadeSpeed:0,hideForceFitButton:!1,hideSyncResizeButton:!0,headerColumnValueExtractor:pv},cellMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideCommandSection:!1,hideOptionSection:!1,showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},compositeEditorOptions:{labels:{cancelButtonKey:"CANCEL",cloneButtonKey:"CLONE",resetEditorButtonTooltipKey:"RESET_INPUT_VALUE",resetFormButtonKey:"RESET_FORM",massSelectionButtonKey:"APPLY_TO_SELECTION",massSelectionStatusKey:"X_OF_Y_MASS_SELECTED",massUpdateButtonKey:"APPLY_MASS_UPDATE",massUpdateStatusKey:"ALL_X_RECORDS_SELECTED",saveButtonKey:"SAVE"}},contextMenu:{autoAdjustDrop:!0,autoAlignSide:!0,hideCloseButton:!0,hideClearAllGrouping:!1,hideCollapseAllGroups:!1,hideCommandSection:!1,hideCopyCellValueCommand:!1,hideExpandAllGroups:!1,hideExportCsvCommand:!1,hideExportExcelCommand:!1,hideExportTextDelimitedCommand:!0,hideMenuOnScroll:!0,hideOptionSection:!1,iconCollapseAllGroupsCommand:"fa fa-compress mdi mdi-arrow-collapse",iconExpandAllGroupsCommand:"fa fa-expand mdi mdi-arrow-expand",iconClearGroupingCommand:"fa fa-times mdi mdi-close",iconCopyCellValueCommand:"fa fa-clone mdi mdi-content-copy",iconExportCsvCommand:"fa fa-download mdi mdi-download",iconExportExcelCommand:"fa fa-file-excel-o mdi mdi-file-excel-outline",iconExportTextDelimitedCommand:"fa fa-download mdi mdi-download",showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},customFooterOptions:{dateFormat:"YYYY-MM-DD, hh:mm a",hideRowSelectionCount:!1,hideTotalItemCount:!1,hideLastUpdateTimestamp:!0,footerHeight:25,leftContainerClass:"col-xs-12 col-sm-5",rightContainerClass:"col-xs-6 col-sm-7",metricSeparator:"|",metricTexts:{itemsKey:"ITEMS",ofKey:"OF",itemsSelectedKey:"ITEMS_SELECTED"}},customTooltip:{tooltipTextMaxLength:700,maxWidth:500},dataView:{syncGridSelection:{preserveHidden:!1,preserveHiddenOnSelectionChange:!0},syncGridSelectionWithBackendService:!1},datasetIdPropertyName:"id",defaultFilter:Hu.input,defaultBackendServiceFilterTypingDebounce:500,enableFilterTrimWhiteSpace:!1,defaultFilterPlaceholder:"🔎︎",defaultFilterRangeOperator:Nt.rangeInclusive,defaultColumnSortFieldId:"id",defaultComponentEventPrefix:"",defaultSlickgridEventPrefix:"",draggableGrouping:{hideToggleAllButton:!1,toggleAllButtonText:"",dropPlaceHolderTextKey:"DROP_COLUMN_HEADER_TO_GROUP_BY"},editable:!1,editorTypingDebounce:450,filterTypingDebounce:0,enableEmptyDataWarningMessage:!0,emptyDataWarning:{className:"slick-empty-data-warning",messageKey:"EMPTY_DATA_WARNING_MESSAGE",hideFrozenLeftWarning:!1,hideFrozenRightWarning:!1,leftViewportMarginLeft:"40%",rightViewportMarginLeft:"40%",frozenLeftViewportMarginLeft:"0px",frozenRightViewportMarginLeft:"40%"},enableAutoResize:!0,enableAutoSizeColumns:!0,enableCellNavigation:!1,enableColumnPicker:!0,enableColumnReorder:!0,enableColumnResizeOnDoubleClick:!0,enableContextMenu:!0,enableExcelExport:!1,enableTextExport:!1,enableGridMenu:!0,enableHeaderMenu:!0,enableMouseHoverHighlightRow:!0,enableSorting:!0,enableTextSelectionOnCells:!0,explicitInitialization:!0,excelExportOptions:{addGroupIndentation:!0,autoDetectCellFormat:!0,exportWithFormatter:!1,filename:"export",format:an.xlsx,groupingColumnHeaderTitle:"Group By",groupCollapsedSymbol:"⮞",groupExpandedSymbol:"⮟",groupingAggregatorRowText:"",sanitizeDataExport:!0},textExportOptions:{delimiter:fs.comma,exportWithFormatter:!1,filename:"export",format:an.csv,groupingColumnHeaderTitle:"Group By",groupingAggregatorRowText:"",sanitizeDataExport:!0,useUtf8WithBom:!0},gridAutosizeColsMode:Yd.none,eventNamingStyle:Ro.lowerCase,forceFitColumns:!1,frozenHeaderWidthCalcDifferential:1,gridMenu:{dropSide:"left",commandLabels:{clearAllFiltersCommandKey:"CLEAR_ALL_FILTERS",clearAllSortingCommandKey:"CLEAR_ALL_SORTING",clearFrozenColumnsCommandKey:"CLEAR_PINNING",exportCsvCommandKey:"EXPORT_TO_CSV",exportExcelCommandKey:"EXPORT_TO_EXCEL",exportTextDelimitedCommandKey:"EXPORT_TO_TAB_DELIMITED",refreshDatasetCommandKey:"REFRESH_DATASET",toggleFilterCommandKey:"TOGGLE_FILTER_ROW",togglePreHeaderCommandKey:"TOGGLE_PRE_HEADER_ROW"},hideClearAllFiltersCommand:!1,hideClearAllSortingCommand:!1,hideClearFrozenColumnsCommand:!0,hideExportCsvCommand:!1,hideExportExcelCommand:!1,hideExportTextDelimitedCommand:!0,hideForceFitButton:!1,hideRefreshDatasetCommand:!1,hideSyncResizeButton:!0,hideToggleFilterCommand:!1,hideTogglePreHeaderCommand:!1,iconCssClass:"fa fa-bars mdi mdi-menu",iconClearAllFiltersCommand:"fa fa-filter mdi mdi-filter-remove-outline",iconClearAllSortingCommand:"fa fa-unsorted mdi mdi-swap-vertical",iconClearFrozenColumnsCommand:"fa fa-times mdi mdi-pin-off-outline",iconExportCsvCommand:"fa fa-download mdi mdi-download",iconExportExcelCommand:"fa fa-file-excel-o mdi mdi-file-excel-outline",iconExportTextDelimitedCommand:"fa fa-download mdi mdi-download",iconRefreshDatasetCommand:"fa fa-refresh mdi mdi-sync",iconToggleFilterCommand:"fa fa-random mdi mdi-flip-vertical",iconTogglePreHeaderCommand:"fa fa-random mdi mdi-flip-vertical",menuWidth:16,resizeOnShowHeaderRow:!0,showBulletWhenIconMissing:!0,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270",headerColumnValueExtractor:pv},headerMenu:{autoAlign:!0,autoAlignOffset:4,minWidth:140,iconClearFilterCommand:"fa fa-filter mdi mdi mdi-filter-remove-outline",iconClearSortCommand:"fa fa-unsorted mdi mdi-swap-vertical",iconFreezeColumns:"fa fa-thumb-tack mdi mdi-pin-outline",iconSortAscCommand:"fa fa-sort-amount-asc mdi mdi-flip-v mdi-sort-ascending",iconSortDescCommand:"fa fa-sort-amount-desc mdi mdi-flip-v mdi-sort-descending",iconColumnHideCommand:"fa fa-times mdi mdi-close",iconColumnResizeByContentCommand:"fa fa-arrows-h mdi mdi-arrow-expand-horizontal",hideColumnResizeByContentCommand:!1,hideColumnHideCommand:!1,hideClearFilterCommand:!1,hideClearSortCommand:!1,hideFreezeColumnsCommand:!0,hideSortCommands:!1,subItemChevronClass:"mdi mdi-chevron-down mdi-rotate-270"},ignoreAccentOnStringFilterAndSort:!1,multiColumnSort:!0,numberedMultiColumnSort:!0,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!0,suppressActiveCellChangeOnEdit:!1,pagination:{pageSizes:[10,15,20,25,30,40,50,75,100],pageSize:25,totalItems:0},headerRowHeight:35,rowHeight:35,topPanelHeight:30,translationNamespaceSeparator:":",resetFilterSearchValueAfterOnBeforeCancellation:!0,resizeByContentOnlyOnFirstLoad:!0,resizeByContentOptions:{alwaysRecalculateColumnWidth:!1,cellCharWidthInPx:7.8,cellPaddingWidthInPx:14,defaultRatioForStringType:.88,formatterPaddingWidthInPx:0,maxItemToInspectCellContentWidth:1e3,maxItemToInspectSingleColumnWidthByContent:5e3,widthToRemoveFromExceededWidthReadjustment:50},treeDataOptions:{exportIndentMarginLeft:5,exportIndentationLeadingChar:"͏͏͏͏͏͏͏͏͏·"}};function pv(a,t){var e,n;const r=(a==null?void 0:a.columnGroup)||"",o=(e=t==null?void 0:t.columnGroupSeparator)!==null&&e!==void 0?e:" - ";return r?r+o+a.name:(n=a==null?void 0:a.name)!==null&&n!==void 0?n:""}class Gb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._sum=0,this._itemCount=0,this._type="sum",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._isTreeAggregator=e,this._isInitialized=!0,this._sum=0,this._itemCount=0,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={},t.__treeTotals.count={}),t.__treeTotals.count[this._field]=0,t.__treeTotals[this._type][this._field]=0)}accumulate(t,e=!1){var n,r;const o=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;this._isTreeAggregator?e?(t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals),this._sum=parseFloat((n=t.__treeTotals[this._type][this._field])!==null&&n!==void 0?n:0),this._itemCount=(r=t.__treeTotals.count[this._field])!==null&&r!==void 0?r:0):en(o)&&(this._sum=parseFloat(o),this._itemCount=1):o!==null&&o!==""&&!isNaN(o)&&(this._sum+=parseFloat(o))}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={}),this.addGroupTotalPropertiesWhenNotExist(t);let e=this._sum,n=this._itemCount;this._isTreeAggregator&&(e+=t[this._type][this._field],n+=t.count[this._field],t.count[this._field]=n),t[this._type][this._field]=e}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={}),this._isTreeAggregator&&t.count===void 0&&(t.count={})}}class Wb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._max=null,this._type="max",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._max=null,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),t.__treeTotals[this._type][this._field]=null)}accumulate(t,e=!1){const n=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;if(!this._isTreeAggregator)this.keepMaxValueWhenFound(n);else if(e){t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals);const r=t.__treeTotals[this._type][this._field]!==null?parseFloat(t.__treeTotals[this._type][this._field]):null;r!==null&&en(r)&&(this._max===null||r>this._max)&&(this._max=r)}else en(n)&&this.keepMaxValueWhenFound(n)}storeResult(t){let e=this._max;if(this.addGroupTotalPropertiesWhenNotExist(t),this._isTreeAggregator&&e!==null){const n=t[this._type][this._field];en(n)&&n>e&&(e=n)}t[this._type][this._field]=e}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={})}keepMaxValueWhenFound(t){t!==null&&t!==""&&!isNaN(t)&&(this._max===null||t>this._max)&&(this._max=parseFloat(t))}}class $b{constructor(t){this._isInitialized=!1,this._distinctValues=[],this._type="distinct",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){if(this._distinctValues=[],this._isInitialized=!0,e)throw new Error("[Slickgrid-Universal] CloneAggregator is not currently supported for use with Tree Data")}accumulate(t){const e=t&&t.hasOwnProperty(this._field)?t[this._field]:void 0;this._distinctValues.indexOf(e)===-1&&e!==void 0&&this._distinctValues.push(e)}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={}),t[this._type][this._field]=this._distinctValues}}class Yb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._min=null,this._type="min",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._min=null,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),t.__treeTotals[this._type][this._field]=null)}accumulate(t,e=!1){const n=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;if(!this._isTreeAggregator)this.keepMinValueWhenFound(n);else if(e){t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals);const r=t.__treeTotals[this._type][this._field]!==null?parseFloat(t.__treeTotals[this._type][this._field]):null;r!==null&&en(r)&&(this._min===null||r<this._min)&&(this._min=r)}else en(n)&&this.keepMinValueWhenFound(n)}storeResult(t){let e=this._min;if(this.addGroupTotalPropertiesWhenNotExist(t),this._isTreeAggregator&&e!==null){const n=t[this._type][this._field];en(n)&&n<e&&(e=n)}t[this._type][this._field]=e}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={})}keepMinValueWhenFound(t){t!==null&&t!==""&&!isNaN(t)&&(this._min===null||t<this._min)&&(this._min=parseFloat(t))}}class jb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._count=0,this._type="count",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._count=0,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),t.__treeTotals[this._type][this._field]=0)}accumulate(t,e=!1){var n;const r=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;this._isTreeAggregator&&(e?(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={}),this._count=(n=t.__treeTotals[this._type][this._field])!==null&&n!==void 0?n:0):en(r)&&(this._count=1))}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={});let e=this._count;this._isTreeAggregator?e+=t[this._type][this._field]:e=t.group.rows.length,t[this._type][this._field]=e}}class Xb{constructor(t){this._isInitialized=!1,this._type="clone",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){if(this._data="",this._isInitialized=!0,e)throw new Error("[Slickgrid-Universal] CloneAggregator is not currently supported for use with Tree Data")}accumulate(t){const e=t&&t.hasOwnProperty(this._field)?t[this._field]:null;e!==null&&e!==""&&(this._data=e)}storeResult(t){(!t||t[this._type]===void 0)&&(t[this._type]={}),t[this._type][this._field]=this._data}}class qb{constructor(t){this._isInitialized=!1,this._isTreeAggregator=!1,this._nonNullCount=0,this._sum=0,this._type="avg",this._field=t}get field(){return this._field}get isInitialized(){return this._isInitialized}get type(){return this._type}init(t,e=!1){this._sum=0,this._nonNullCount=0,this._isInitialized=!0,this._isTreeAggregator=e,e&&(t.__treeTotals||(t.__treeTotals={}),t.__treeTotals[this._type]===void 0&&(t.__treeTotals[this._type]={},t.__treeTotals.sum={},t.__treeTotals.count={}),t.__treeTotals[this._type][this._field]=0,t.__treeTotals.count[this._field]=0,t.__treeTotals.sum[this._field]=0)}accumulate(t,e=!1){var n,r;const o=t!=null&&t.hasOwnProperty(this._field)?t[this._field]:null;this._isTreeAggregator?e?(t.__treeTotals||(t.__treeTotals={}),this.addGroupTotalPropertiesWhenNotExist(t.__treeTotals),this._sum=parseFloat((n=t.__treeTotals.sum[this._field])!==null&&n!==void 0?n:0),this._nonNullCount=(r=t.__treeTotals.count[this._field])!==null&&r!==void 0?r:0):en(o)&&(this._sum=parseFloat(o),this._nonNullCount=1):o!==null&&o!==""&&!isNaN(o)&&(this._nonNullCount++,this._sum+=parseFloat(o))}storeResult(t){let e=this._sum,n=this._nonNullCount;this.addGroupTotalPropertiesWhenNotExist(t),this._isTreeAggregator&&(e+=t.sum[this._field],n+=t.count[this._field],t.sum[this._field]=e,t.count[this._field]=n),n!==0&&(t[this._type][this._field]=n===0?e:e/n)}addGroupTotalPropertiesWhenNotExist(t){t[this._type]===void 0&&(t[this._type]={}),this._isTreeAggregator&&t.sum===void 0&&(t.sum={}),this._isTreeAggregator&&t.count===void 0&&(t.count={})}}const pf={Avg:qb,Clone:Xb,Count:jb,Distinct:$b,Min:Yb,Max:Wb,Sum:Gb};function Bu(a,t){var e;const n=t.errorMessage,r=t.required,o=t.minLength,s=t.maxLength,l=t.operatorConditionalType||"inclusive",u={"{{minLength}}":o,"{{maxLength}}":s};let h=!0,c="";const p=(e=a==null?void 0:a.length)!==null&&e!==void 0?e:0;if(t.validator)return t.validator(a,t.editorArgs);if(r&&a==="")h=!1,c=n||je.VALIDATION_REQUIRED_FIELD;else if(o!==void 0&&s!==void 0&&(l==="exclusive"&&(p<=o||p>=s)||l==="inclusive"&&(p<o||p>s)))h=!1,c=n||je.VALIDATION_EDITOR_TEXT_LENGTH_BETWEEN.replace(/{{minLength}}|{{maxLength}}/gi,m=>u[m]);else if(o!==void 0&&p!==null&&(l==="exclusive"&&p<=o||l==="inclusive"&&p!==null&&p<o)){h=!1;const m=l==="inclusive"?je.VALIDATION_EDITOR_TEXT_MIN_LENGTH_INCLUSIVE:je.VALIDATION_EDITOR_TEXT_MIN_LENGTH;c=n||m.replace(/{{minLength}}/gi,v=>u[v])}else if(s!==void 0&&p!==null&&(l==="exclusive"&&p>=s||l==="inclusive"&&p!==null&&p>s)){h=!1;const m=l==="inclusive"?je.VALIDATION_EDITOR_TEXT_MAX_LENGTH_INCLUSIVE:je.VALIDATION_EDITOR_TEXT_MAX_LENGTH;c=n||m.replace(/{{maxLength}}/gi,v=>u[v])}return{valid:h,msg:c}}function Sl(a,t,e,n="Slider"){var r,o,s;let l;return((r=a.editorOptions)===null||r===void 0?void 0:r[t])!==void 0?l=a.editorOptions[t]:((o=a==null?void 0:a.params)===null||o===void 0?void 0:o[t])!==void 0&&(console.warn(`[Slickgrid-Universal] All editor.params from ${n} Editor are moving to "editorOptions" for better typing support and "params" will be deprecated in future release.`),l=(s=a==null?void 0:a.params)===null||s===void 0?void 0:s[t]),l??e}const mv=Jd&&dh||Jd,Kb=3;class Zb{constructor(t){var e;if(this.args=t,this._isValueTouched=!1,this._lastTriggeredByClearInput=!1,this.disabled=!1,this.forceUserInput=!1,this.finalCollection=[],!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this._bindEventService=new Nn,!((e=this.gridOptions)===null||e===void 0)&&e.translater&&(this._translater=this.gridOptions.translater),this._locales=this.gridOptions&&this.gridOptions.locales||je.locales,this.init()}get autocompleterOptions(){return this._autocompleterOptions||{}}get collection(){var t,e;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.collection)!==null&&e!==void 0?e:[]}get editorDomElement(){return this._inputElm}get elementCollection(){return this._elementCollection}get columnDef(){return this.args.column}get columnEditor(){var t;return((t=this.columnDef)===null||t===void 0?void 0:t.internalColumnEditor)||{}}get customStructure(){var t,e,n,r,o,s;let l=(t=this.columnEditor)===null||t===void 0?void 0:t.customStructure;const u=(n=(e=this.columnEditor)===null||e===void 0?void 0:e.type)!==null&&n!==void 0?n:(r=this.columnDef)===null||r===void 0?void 0:r.type;return!l&&u===ie.object&&(!((o=this.columnDef)===null||o===void 0)&&o.dataKey)&&(!((s=this.columnDef)===null||s===void 0)&&s.labelKey)&&(l={label:this.columnDef.labelKey,value:this.columnDef.dataKey}),l}get dataContext(){return this.args.item}get editorOptions(){var t;return((t=this.columnEditor)===null||t===void 0?void 0:t.editorOptions)||{}}get gridOptions(){var t,e,n;return(n=(e=(t=this.grid)===null||t===void 0?void 0:t.getOptions)===null||e===void 0?void 0:e.call(t))!==null&&n!==void 0?n:{}}get instance(){return this._instance}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l,u,h,c;this.labelName=(e=(t=this.customStructure)===null||t===void 0?void 0:t.label)!==null&&e!==void 0?e:"label",this.valueName=(r=(n=this.customStructure)===null||n===void 0?void 0:n.value)!==null&&r!==void 0?r:"value",this.labelPrefixName=(s=(o=this.customStructure)===null||o===void 0?void 0:o.labelPrefix)!==null&&s!==void 0?s:"labelPrefix",this.labelSuffixName=(u=(l=this.customStructure)===null||l===void 0?void 0:l.labelSuffix)!==null&&u!==void 0?u:"labelSuffix";let p=this.columnEditor.collection;!((h=this.columnEditor)===null||h===void 0)&&h.collectionAsync&&!p&&(p=[]),this.renderDomElement(p),(this.disabled||!((c=this.columnEditor)===null||c===void 0)&&c.collectionAsync&&Array.isArray(p)&&p.length===0)&&this.disable(!0)}destroy(){var t,e,n;this._bindEventService.unbindAll(),typeof((t=this._instance)===null||t===void 0?void 0:t.destroy)=="function"&&this._instance.destroy(),(n=(e=this._inputElm)===null||e===void 0?void 0:e.remove)===null||n===void 0||n.call(e),this._elementCollection=null}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._inputElm)if(t){this._inputElm.disabled=!0;const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==""&&this.clear(!0)}else this._inputElm.disabled=!1}focus(){this.grid.focus(),this._inputElm&&(this._inputElm.focus(),this._inputElm.select())}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){return this._inputElm.value}setValue(t,e=!1,n=!0){var r;if(this._inputElm.value=t!=null&&t.hasOwnProperty(this.labelName)?t[this.labelName]:t,e){this._currentValue=t,this._defaultTextValue=typeof t=="string"?t:(r=t==null?void 0:t[this.labelName])!==null&&r!==void 0?r:"",this.applyValue(this.args.item,this.serializeValue());const o=this.args.compositeEditorOptions;o&&n&&this.handleChangeOnCompositeEditor(null,o,"system")}}applyValue(t,e){var n,r,o,s;let l=e;const u=(n=this.columnDef)===null||n===void 0?void 0:n.field;if(u!==void 0){Array.isArray(this.collection)&&this.collection.length>0&&(l=vs(this.collection,p=>p&&Xo(e)&&p.hasOwnProperty(this.valueName)?p[this.valueName].toString()===(e.hasOwnProperty(this.valueName)&&e[this.valueName].toString()):p&&typeof e=="string"&&p.hasOwnProperty(this.valueName)?p[this.valueName].toString()===e:(p==null?void 0:p.toString())===e,""));const h=(u==null?void 0:u.indexOf("."))>0,c=this.validate(null,l);if(l=c!=null&&c.valid?l:"",h){const p=(s=(o=(r=this.columnEditor)===null||r===void 0?void 0:r.complexObjectPath)!==null&&o!==void 0?o:u)!==null&&s!==void 0?s:"";cr(t,p,l)}else t[u]=l}}isValueChanged(){var t,e;const n=this._inputElm.value,r=(t=this._lastInputKeyEvent)===null||t===void 0?void 0:t.keyCode;if(!((e=this.columnEditor)===null||e===void 0)&&e.alwaysSaveOnEnterKey&&r===xi.ENTER)return!0;const o=!(n===""&&(this._defaultTextValue===null||this._defaultTextValue===void 0))&&n!==this._defaultTextValue;return this._lastTriggeredByClearInput||o}isValueTouched(){return this._isValueTouched}loadValue(t){var e,n;const r=(e=this.columnDef)===null||e===void 0?void 0:e.field;if(t&&r!==void 0){const s=(r==null?void 0:r.indexOf("."))>0?_n(t,r):t[r];this._currentValue=s,this._originalValue=s,this._defaultTextValue=typeof s=="string"?s:(n=s==null?void 0:s[this.labelName])!==null&&n!==void 0?n:"",this._inputElm.value=this._defaultTextValue,this._inputElm.select()}}clear(t=!1){this._inputElm&&(this._currentValue="",this._defaultTextValue="",this.setValue("",!0)),this._isValueTouched=!0,this._lastTriggeredByClearInput=!0;const e=this.args.compositeEditorOptions;if(e){const n=!t;this.handleChangeOnCompositeEditor(null,e,"user",n)}else this.save()}reset(t,e=!0,n=!1){var r,o;const s=(r=t??this._originalValue)!==null&&r!==void 0?r:"";this._inputElm&&(this._currentValue=s,this._defaultTextValue=typeof s=="string"?s:(o=s==null?void 0:s[this.labelName])!==null&&o!==void 0?o:"",this._inputElm.value=this._defaultTextValue),this._isValueTouched=!1;const l=this.args.compositeEditorOptions;if(l&&e){const u=!n;this.handleChangeOnCompositeEditor(null,l,"user",u)}}save(){var t;const e=this.validate(),n=(t=e==null?void 0:e.valid)!==null&&t!==void 0?t:!1;this.hasAutoCommitEdit&&n?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t,e,n,r,o,s;if(this._inputElm&&this.editorOptions.forceUserInput){const l=(e=(t=this.editorOptions)===null||t===void 0?void 0:t.minLength)!==null&&e!==void 0?e:Kb;this._currentValue=this._inputElm.value.length>l?this._inputElm.value:this._currentValue}return this.customStructure&&this._currentValue&&this._currentValue.hasOwnProperty(this.valueName)&&((n=this.columnDef)===null||n===void 0?void 0:n.type)!==ie.object&&((r=this.columnEditor)===null||r===void 0?void 0:r.type)!==ie.object?this._currentValue[this.valueName]:this._currentValue&&this._currentValue.value!==void 0?((o=this.columnDef)===null||o===void 0?void 0:o.type)===ie.object||((s=this.columnEditor)===null||s===void 0?void 0:s.type)===ie.object?{[this.labelName]:this._currentValue.label,[this.valueName]:this._currentValue.value}:this._currentValue.value:this._currentValue}validate(t,e){var n,r;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const o=e!==void 0?e:(n=this._inputElm)===null||n===void 0?void 0:n.value;return Bu(o,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!((r=this.args)===null||r===void 0)&&r.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}handleSelect(t){var e,n;if(t!==void 0){const o=t;this._currentValue=o,this._isValueTouched=!0;const s=this.args.compositeEditorOptions,l=(n=(e=this.editorOptions)===null||e===void 0?void 0:e.renderItem)!==null&&n!==void 0?n:!1,u=typeof o=="string"?o:l?o[this.labelName]:o.label;if(this.setValue(u),s?this.handleChangeOnCompositeEditor(null,s):this.save(),typeof this.editorOptions.onSelectItem=="function"){const{row:h,cell:c}=this.grid.getActiveCell();this.editorOptions.onSelectItem(t,h,c,this.args.column,this.args.item)}setTimeout(()=>this._lastTriggeredByClearInput=!1)}return!1}renderRegularItem(t){var e;const n=typeof t=="string"?t:(e=t==null?void 0:t.label)!==null&&e!==void 0?e:"";return Re("div",{textContent:n||""})}renderCustomItem(t){var e,n,r;const o=(r=(n=(e=this._autocompleterOptions)===null||e===void 0?void 0:e.renderItem)===null||n===void 0?void 0:n.templateCallback(t))!==null&&r!==void 0?r:"",s=Ln(this.gridOptions,o)||"",l=document.createElement("div");return l.innerHTML=s,l}renderCollectionItem(t){var e,n;const r=(n=(e=this.columnEditor)===null||e===void 0?void 0:e.enableRenderHtml)!==null&&n!==void 0?n:!1,o=t.labelPrefix||"",s=t.label||"",l=t.labelSuffix||"",u=o+s+l,h=Ln(this.gridOptions,u)||"",c=document.createElement("div");return c[r?"innerHTML":"textContent"]=h,c}renderDomElement(t){var e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S;const E=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",D=(o=(r=this.columnEditor)===null||r===void 0?void 0:r.placeholder)!==null&&o!==void 0?o:"",A=(l=(s=this.columnEditor)===null||s===void 0?void 0:s.title)!==null&&l!==void 0?l:"";this._editorInputGroupElm=Re("div",{className:"autocomplete-container input-group"});const P=Re("span",{className:"input-group-btn input-group-append",dataset:{clear:""}});this._clearButtonElm=Re("button",{type:"button",className:"btn btn-default icon-clear"}),this._inputElm=Re("input",{type:"text",placeholder:D,title:A,autocomplete:"off",ariaAutoComplete:"none",className:`autocomplete form-control editor-text input-group-editor editor-${E}`,dataset:{input:""}},this._editorInputGroupElm),this._editorInputGroupElm.appendChild(document.createElement("span")),Sl(this.columnEditor,"hideClearButton",void 0,"autocomplete")||(P.appendChild(this._clearButtonElm),this._editorInputGroupElm.appendChild(P),this._bindEventService.bind(this._clearButtonElm,"click",()=>this.clear())),this._bindEventService.bind(this._inputElm,"focus",()=>{var B;return(B=this._inputElm)===null||B===void 0?void 0:B.select()}),this._bindEventService.bind(this._inputElm,"keydown",B=>{this._lastInputKeyEvent=B,(B.keyCode===xi.LEFT||B.keyCode===xi.RIGHT||B.key==="ArrowLeft"||B.key==="ArrowRight")&&B.stopImmediatePropagation(),this.columnEditor.alwaysSaveOnEnterKey&&(B.keyCode===xi.ENTER||B.key==="Enter")&&(this._currentValue=null)});let M=t;if(M&&(!((u=this.columnEditor)===null||u===void 0)&&u.collectionOverride)){const B={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:Z,modalType:L}=this.args.compositeEditorOptions;B.compositeEditorOptions={formValues:Z,modalType:L}}M=this.columnEditor.collectionOverride(M,B)}M&&(this.finalCollection=M),Array.isArray(M)&&(this.collection.every(B=>qd(B))?M=M.map(B=>({label:B,value:B})):M=M.map(B=>{var Z,L;return{label:B==null?void 0:B[this.labelName],value:B==null?void 0:B[this.valueName],labelPrefix:(Z=B==null?void 0:B[this.labelPrefixName])!==null&&Z!==void 0?Z:"",labelSuffix:(L=B==null?void 0:B[this.labelSuffixName])!==null&&L!==void 0?L:""}}),this._elementCollection=M),this._autocompleterOptions={input:this._inputElm,debounceWaitMs:200,className:`slick-autocomplete ${(c=(h=this.editorOptions)===null||h===void 0?void 0:h.className)!==null&&c!==void 0?c:""}`.trim(),emptyMsg:this.gridOptions.enableTranslate&&(!((p=this._translater)===null||p===void 0)&&p.translate)?this._translater.translate("NO_ELEMENTS_FOUND"):(v=(m=this._locales)===null||m===void 0?void 0:m.TEXT_NO_ELEMENTS_FOUND)!==null&&v!==void 0?v:"No elements found",customize:(B,Z,L)=>{L.style.width=""},onSelect:this.handleSelect.bind(this),...this.editorOptions},!((_=this._autocompleterOptions.renderItem)===null||_===void 0)&&_.layout?(this._autocompleterOptions.className+=` autocomplete-custom-${Wa(this._autocompleterOptions.renderItem.layout)}`,this._autocompleterOptions.render=this.renderCustomItem.bind(this)):Array.isArray(t)?this._autocompleterOptions.render=(x=(C=this._autocompleterOptions.render)===null||C===void 0?void 0:C.bind(this))!==null&&x!==void 0?x:this.renderCollectionItem.bind(this):this._autocompleterOptions.render||(this._autocompleterOptions.render=this.renderRegularItem.bind(this)),!((S=this._autocompleterOptions)===null||S===void 0)&&S.fetch?(Up(this._inputElm,this._autocompleterOptions),this._instance=mv(this._autocompleterOptions)):this._instance=mv({...this._autocompleterOptions,fetch:(B,Z)=>{M&&Z(M.filter(L=>((typeof L=="string"?L:L==null?void 0:L.label)||"").toLowerCase().includes(B.toLowerCase())))}}),this.args.container.appendChild(this._editorInputGroupElm),this.args.compositeEditorOptions||setTimeout(()=>this.focus(),50)}}class Qb{constructor(t){if(this.args=t,this._isValueTouched=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new Nn,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._input}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l;const u=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",h=this.args.compositeEditorOptions;this._checkboxContainerElm=Re("div",{className:`checkbox-editor-container editor-${u}`}),this._input=Re("input",{type:"checkbox",value:"true",ariaLabel:(r=(n=this.columnEditor)===null||n===void 0?void 0:n.ariaLabel)!==null&&r!==void 0?r:`${qr(u+"")} Checkbox Editor`,className:`editor-checkbox editor-${u}`,title:(s=(o=this.columnEditor)===null||o===void 0?void 0:o.title)!==null&&s!==void 0?s:""});const c=(l=this.args)===null||l===void 0?void 0:l.container;c&&typeof c.appendChild=="function"&&(h?(this._checkboxContainerElm.appendChild(this._input),c.appendChild(this._checkboxContainerElm)):c.appendChild(this._input)),this.hasAutoCommitEdit&&!h&&this._bindEventService.bind(this._input,"click",()=>{this._isValueTouched=!0,this.save()}),h?this._bindEventService.bind(this._input,"change",p=>{this._isValueTouched=!0,this.handleChangeOnCompositeEditor(p,h)}):this.focus()}destroy(){var t,e;this._bindEventService.unbindAll(),(e=(t=this._input)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t)}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._input)if(t){this._input.setAttribute("disabled","disabled"),this._checkboxContainerElm.classList.add("disabled");const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==!1&&this.reset(!1,!0,!0)}else this._input.removeAttribute("disabled"),this._checkboxContainerElm.classList.remove("disabled")}focus(){var t;this.grid.focus(),(t=this._input)===null||t===void 0||t.focus()}preClick(){this._input&&(this._input.checked=!this._input.checked)}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var t,e;return(e=(t=this._input)===null||t===void 0?void 0:t.checked)!==null&&e!==void 0?e:!1}setValue(t,e=!1,n=!0){const r=!!t;if(this._input&&(this._input.checked=r),e){this.applyValue(this.args.item,this.serializeValue());const o=this.args.compositeEditorOptions;o&&n&&this.handleChangeOnCompositeEditor(null,o,"system")}}applyValue(t,e){var n,r,o;const s=this.columnDef&&this.columnDef.field;if(s!==void 0){const l=(s==null?void 0:s.indexOf("."))>0,u=this.validate(null,e),h=u&&u.valid?e:"";if(l){const c=(o=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.complexObjectPath)!==null&&r!==void 0?r:s)!==null&&o!==void 0?o:"";cr(t,c,h)}else t[s]=h}}isValueChanged(){return this.serializeValue()!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(t){const e=this.columnDef&&this.columnDef.field;if(t&&e!==void 0&&this._input){const r=(e==null?void 0:e.indexOf("."))>0?_n(t,e):t[e];this._originalValue=r,this._input.checked=!!this._originalValue}}reset(t,e=!0,n=!1){var r;const o=(r=t??this._originalValue)!==null&&r!==void 0?r:!1;this._input&&(this._originalValue=o,this._input.checked=!!o),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&e){const l=!n;this.handleChangeOnCompositeEditor(null,s,"user",l)}}save(){const t=this.validate(),e=t&&t.valid||!1;this.hasAutoCommitEdit&&e?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t,e;return(e=(t=this._input)===null||t===void 0?void 0:t.checked)!==null&&e!==void 0?e:!1}validate(t,e){var n,r;const o=!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions?!1:this.columnEditor.required,s=e!==void 0?e:(r=this._input)===null||r===void 0?void 0:r.checked,l=this.columnEditor.errorMessage;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:this.validator?this.validator(s,this.args):o&&!s?{valid:!1,msg:l||je.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}}const Jb=cd&&On||cd,Vu=Us||hs;class eC{constructor(t){var e;if(this.args=t,this._isValueTouched=!1,this._lastTriggeredByClearDate=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},!((e=this.gridOptions)===null||e===void 0)&&e.translater&&(this._translaterService=this.gridOptions.translater),this._bindEventService=new Nn,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._inputElm}get editorOptions(){return this.columnEditor.editorOptions||{}}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get pickerOptions(){return this._pickerMergedOptions}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l;if(this.args&&this.columnDef){const u=this.args.compositeEditorOptions,h=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",c=this.args.grid.getOptions()||{};this.defaultDate=this.args.item?this.args.item[this.columnDef.field]:null;const p=Ua(this.columnEditor.type||this.columnDef.type||ie.dateUtc),m=Ua(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type||ie.dateUtc);let v=((r=(n=this._translaterService)===null||n===void 0?void 0:n.getCurrentLanguage)===null||r===void 0?void 0:r.call(n))||c.locale||"en";v.length>2&&(v=v.substring(0,2));const _={defaultDate:this.defaultDate,altInput:!0,altFormat:m,dateFormat:p,closeOnSelect:!0,wrap:!0,locale:v,onChange:()=>this.handleOnDateChange(),errorHandler:S=>{S.toString().includes("invalid locale")&&console.warn(`[Slickgrid-Universal] Flatpickr missing locale imports (${v}), will revert to English as the default locale.
25
25
  See Flatpickr Localization for more info, for example if we want to use French, then we can import it with: import 'flatpickr/dist/l10n/fr';`)}};this._pickerMergedOptions={..._,...this.editorOptions};const C=`.editor-text.editor-${h}.form-control`;this._pickerMergedOptions.altInput&&(this._pickerMergedOptions.altInputClass="flatpickr-alt-input form-control"),this._editorInputGroupElm=Re("div",{className:"flatpickr input-group"});const x=Re("span",{className:"input-group-btn input-group-append",dataset:{clear:""}});this._clearButtonElm=Re("button",{type:"button",className:"btn btn-default icon-clear"}),this._inputElm=Re("input",{placeholder:(s=(o=this.columnEditor)===null||o===void 0?void 0:o.placeholder)!==null&&s!==void 0?s:"",title:this.columnEditor&&this.columnEditor.title||"",className:C.replace(/\./g," "),dataset:{input:"",defaultdate:this.defaultDate}},this._editorInputGroupElm),Sl(this.columnEditor,"hideClearButton",void 0,"date")||(x.appendChild(this._clearButtonElm),this._editorInputGroupElm.appendChild(x),this._bindEventService.bind(this._clearButtonElm,"click",()=>this._lastTriggeredByClearDate=!0)),this.args.container.appendChild(this._editorInputGroupElm),this.flatInstance=Jb(this._editorInputGroupElm,this._pickerMergedOptions),this._inputWithDataElm=!((l=this._pickerMergedOptions)===null||l===void 0)&&l.altInput?document.querySelector(`${C}.flatpickr-alt-input`):this._inputElm,u||setTimeout(()=>{this.show(),this.focus()},50)}}destroy(){var t,e,n,r,o,s,l,u;this.hide(),this._bindEventService.unbindAll(),typeof((t=this.flatInstance)===null||t===void 0?void 0:t.destroy)=="function"&&(this.flatInstance.destroy(),!((e=this.flatInstance)===null||e===void 0)&&e.element&&setTimeout(()=>bh(this.flatInstance))),on(this._editorInputGroupElm),on(this._inputWithDataElm),on(this._inputElm),(r=(n=this._editorInputGroupElm)===null||n===void 0?void 0:n.remove)===null||r===void 0||r.call(n),(s=(o=this._inputWithDataElm)===null||o===void 0?void 0:o.remove)===null||s===void 0||s.call(o),(u=(l=this._inputElm)===null||l===void 0?void 0:l.remove)===null||u===void 0||u.call(l)}disable(t=!0){var e,n;const r=this.disabled;if(this.disabled=t,!((e=this.flatInstance)===null||e===void 0)&&e._input)if(t){this.flatInstance._input.setAttribute("disabled","disabled"),this._clearButtonElm.disabled=!0;const o=this.getValue();r!==t&&(!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions)&&o!==""&&this.reset("",!0,!0)}else this.flatInstance._input.removeAttribute("disabled"),this._clearButtonElm.disabled=!1}changeEditorOption(t,e){this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[t]=e,this._pickerMergedOptions={...this._pickerMergedOptions,[t]:e},this.flatInstance.set(t,e)}focus(){var t,e;this.grid.focus(),this.show(),(t=this._inputElm)===null||t===void 0||t.focus(),!((e=this._inputWithDataElm)===null||e===void 0)&&e.focus&&(this._inputWithDataElm.focus(),this._inputWithDataElm.select())}hide(){this.flatInstance&&typeof this.flatInstance.close=="function"&&this.flatInstance.close()}show(){var t;const e=!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions);!e&&this.flatInstance&&typeof this.flatInstance.open=="function"&&this.flatInstance._input?this.flatInstance.open():e&&this.applyInputUsabilityState()}getValue(){return this._inputElm.value}setValue(t,e=!1,n=!0){if(this.flatInstance.setDate(t),e){this.applyValue(this.args.item,this.serializeValue());const r=this.args.compositeEditorOptions;r&&n&&this.handleChangeOnCompositeEditor(r,"system")}}applyValue(t,e){var n,r,o;const s=this.columnDef&&this.columnDef.field;if(s!==void 0){const l=Fr(this.columnDef&&(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||ie.dateUtc),u=Fr(this.columnDef&&(this.columnDef.saveOutputType||this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||ie.dateUtc),h=(s==null?void 0:s.indexOf("."))>0,c=this.validate(null,e),p=e&&c&&c.valid?Vu(e,l).format(u):"";if(h){const m=(o=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.complexObjectPath)!==null&&r!==void 0?r:s)!==null&&o!==void 0?o:"";cr(t,m,p)}else t[s]=p}}isValueChanged(){var t;const e=this._inputElm.value,n=Fr(this.columnEditor.type||((t=this.columnDef)===null||t===void 0?void 0:t.type)||ie.dateIso),r=Fr(this.columnDef&&(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||ie.dateUtc),o=e?Vu(e,n,!1).format(r):"",s=this._originalDate?Vu(this._originalDate,n,!1).format(r):"";return o==="Invalid date"||s==="Invalid date"?!1:this._lastTriggeredByClearDate||!(o===""&&s==="")&&o!==s}isValueTouched(){return this._isValueTouched}loadValue(t){const e=this.columnDef&&this.columnDef.field;if(t&&e!==void 0){const r=(e==null?void 0:e.indexOf("."))>0?_n(t,e):t[e];this._originalDate=r,this.flatInstance.setDate(r)}}reset(t,e=!0,n=!1){var r;const o=(r=t??this._originalDate)!==null&&r!==void 0?r:"";this.flatInstance&&(this._originalDate=o,this.flatInstance.setDate(o),o||this.flatInstance.clear()),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&e){const l=!n;this.handleChangeOnCompositeEditor(s,"user",l)}}save(){const t=this.validate(),e=t&&t.valid||!1;this.hasAutoCommitEdit&&e?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t;const e=this._inputElm.value;if(!e)return"";const n=Fr(this.columnEditor.type||((t=this.columnDef)===null||t===void 0?void 0:t.type)||ie.dateIso),r=Fr(this.columnDef&&(this.columnDef.outputType||this.columnEditor.type||this.columnDef.type)||ie.dateIso);return Vu(e,n,!1).format(r)}validate(t,e){var n,r;const o=!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions?!1:this.columnEditor.required,s=e!==void 0?e:(r=this._inputElm)===null||r===void 0?void 0:r.value,l=this.columnEditor.errorMessage;return this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled?{valid:!0,msg:""}:this.validator?this.validator(s,this.args):o&&s===""?{valid:!1,msg:l||je.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleOnDateChange(){var t,e;this._isValueTouched=!0;const n=(e=(t=this.flatInstance)===null||t===void 0?void 0:t.config)!==null&&e!==void 0?e:this._pickerMergedOptions;if(this.args&&(n!=null&&n.closeOnSelect)){const r=this.args.compositeEditorOptions;r?this.handleChangeOnCompositeEditor(r):this.save()}setTimeout(()=>this._lastTriggeredByClearDate=!1)}handleChangeOnCompositeEditor(t,e="user",n=!1){var r,o,s,l,u;const h=this.grid.getActiveCell(),c=this.args.column,p=(o=(r=this.columnDef)===null||r===void 0?void 0:r.id)!==null&&o!==void 0?o:"",m=this.dataContext,v=this.grid,_=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,_),this.applyValue(t.formValues,_);const C=(u=(l=(s=this.gridOptions)===null||s===void 0?void 0:s.compositeEditorOptions)===null||l===void 0?void 0:l.excludeDisabledFieldFormValues)!==null&&u!==void 0?u:!1;(n||this.disabled&&C&&t.formValues.hasOwnProperty(p))&&delete t.formValues[p],v.onCompositeEditorChange.notify({...h,item:m,grid:v,column:c,formValues:t.formValues,editors:t.editors,triggeredBy:e},new Slick.EventData)}}function vv(a,t){const e=isNaN(a)?null:parseFloat(a),n=t.decimal||0,r=t.required,o=t.minValue,s=t.maxValue,l=t.operatorConditionalType||"inclusive",u=t.errorMessage,h={"{{minValue}}":o,"{{maxValue}}":s,"{{minDecimal}}":0,"{{maxDecimal}}":n};let c=!0,p="";if(typeof t.validator=="function")return t.validator(a,t.editorArgs);if(r&&a==="")c=!1,p=u||je.VALIDATION_REQUIRED_FIELD;else if(a!==""&&(isNaN(a)||n===0&&!/^[-+]?(\d*(\.)?(\d)*)$/.test(a)))c=!1,p=u||je.VALIDATION_EDITOR_VALID_NUMBER;else if(o!==void 0&&s!==void 0&&e!==null&&(l==="exclusive"&&(e<=+o||e>=+s)||l==="inclusive"&&(e<+o||e>+s)))c=!1,p=u||je.VALIDATION_EDITOR_NUMBER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,m=>h[m]);else if(o!==void 0&&e!==null&&(l==="exclusive"&&e<=+o||l==="inclusive"&&e<+o)){c=!1;const m=l==="inclusive"?je.VALIDATION_EDITOR_NUMBER_MIN_INCLUSIVE:je.VALIDATION_EDITOR_NUMBER_MIN;p=u||m.replace(/{{minValue}}/gi,v=>h[v])}else if(s!==void 0&&e!==null&&(l==="exclusive"&&e>=+s||l==="inclusive"&&e>+s)){c=!1;const m=l==="inclusive"?je.VALIDATION_EDITOR_NUMBER_MAX_INCLUSIVE:je.VALIDATION_EDITOR_NUMBER_MAX;p=u||m.replace(/{{maxValue}}/gi,v=>h[v])}else n>0&&!new RegExp(`^[-+]?(\\d*(\\.)?(\\d){0,${n}})$`).test(a)&&(c=!1,p=u||je.VALIDATION_EDITOR_DECIMAL_BETWEEN.replace(/{{minDecimal}}|{{maxDecimal}}/gi,m=>h[m]));return{valid:c,msg:p}}function gv(a,t){let e=isNaN(a)?null:parseInt(a,10);e!==null&&isNaN(e)&&(e=null);const n=t.errorMessage,r=t.required,o=t.minValue,s=t.maxValue,l=t.operatorConditionalType||"inclusive",u={"{{minValue}}":o,"{{maxValue}}":s};let h=!0,c="";if(t.validator)return t.validator(a,t.editorArgs);if(r&&a==="")h=!1,c=n||je.VALIDATION_REQUIRED_FIELD;else if(a!==""&&(isNaN(a)||!/^[+-]?\d+$/.test(a)))h=!1,c=n||je.VALIDATION_EDITOR_VALID_INTEGER;else if(o!==void 0&&s!==void 0&&e!==null&&(l==="exclusive"&&(e<=+o||e>=+s)||l==="inclusive"&&(e<+o||e>+s)))h=!1,c=n||je.VALIDATION_EDITOR_INTEGER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,p=>u[p]);else if(o!==void 0&&e!==null&&(l==="exclusive"&&e<=+o||l==="inclusive"&&e!==null&&e<+o)){h=!1;const p=l==="inclusive"?je.VALIDATION_EDITOR_INTEGER_MIN_INCLUSIVE:je.VALIDATION_EDITOR_INTEGER_MIN;c=n||p.replace(/{{minValue}}/gi,m=>u[m])}else if(s!==void 0&&e!==null&&(l==="exclusive"&&e>=+s||l==="inclusive"&&e!==null&&e>+s)){h=!1;const p=l==="inclusive"?je.VALIDATION_EDITOR_INTEGER_MAX_INCLUSIVE:je.VALIDATION_EDITOR_INTEGER_MAX;c=n||p.replace(/{{maxValue}}/gi,m=>u[m])}return{valid:h,msg:c}}function tC(a,t){const e=t.required,n=t.minValue,r=t.maxValue,o=t.errorMessage,s={"{{minValue}}":n,"{{maxValue}}":r};return t.validator?t.validator(a,t.editorArgs):e&&a===""?{valid:!1,msg:o||je.VALIDATION_REQUIRED_FIELD}:n!==void 0&&r!==void 0&&a!==null&&(a<n||a>r)?{valid:!1,msg:o||je.VALIDATION_EDITOR_NUMBER_BETWEEN.replace(/{{minValue}}|{{maxValue}}/gi,l=>s[l])}:{valid:!0,msg:null}}class iC{constructor(t){if(this.args=t,this._isValueSaveCalled=!1,this._isLeftValueTouched=!1,this._isRightValueTouched=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},this._eventHandler=new Slick.EventHandler,this._bindEventService=new Nn,this.init(),this._eventHandler.subscribe(this.grid.onValidationError,()=>this._isValueSaveCalled=!0)}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return{leftInput:this._leftInput,rightInput:this._rightInput}}get editorParams(){return this.columnEditor.params||{}}get eventHandler(){return this._eventHandler}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get isValueSaveCalled(){return this._isValueSaveCalled}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r;if(!this.editorParams||!this.editorParams.leftInput||!this.editorParams.leftInput.field||!this.editorParams.rightInput||!this.editorParams.rightInput.field)throw new Error(`[Slickgrid-Universal] Please make sure that your Combo Input Editor has params defined with "leftInput" and "rightInput" (example: { editor: { model: Editors.comboInput, params: { leftInput: { field: 'firstName' }, { rightSide: { field: 'lastName' } }}}`);this._leftFieldName=(t=this.editorParams.leftInput)===null||t===void 0?void 0:t.field,this._rightFieldName=(e=this.editorParams.rightInput)===null||e===void 0?void 0:e.field,this._leftInput=this.createInput("leftInput"),this._rightInput=this.createInput("rightInput");const o=(n=this.args)===null||n===void 0?void 0:n.container;o&&typeof o.appendChild=="function"&&(o.appendChild(this._leftInput),o.appendChild(this._rightInput)),this._bindEventService.bind(this._leftInput,"keydown",l=>this.handleKeyDown(l,"leftInput")),this._bindEventService.bind(this._rightInput,"keydown",l=>this.handleKeyDown(l,"rightInput")),this.hasAutoCommitEdit&&(this._bindEventService.bind(this._leftInput,"focusout",l=>this.handleFocusOut(l,"leftInput")),this._bindEventService.bind(this._rightInput,"focusout",l=>this.handleFocusOut(l,"rightInput"))),((r=this.args)===null||r===void 0?void 0:r.compositeEditorOptions)?(this._bindEventService.bind(this._leftInput,"input",this.handleChangeOnCompositeEditorDebounce.bind(this)),this._bindEventService.bind(this._rightInput,"input",this.handleChangeOnCompositeEditorDebounce.bind(this))):setTimeout(()=>this._leftInput.select(),50)}handleFocusOut(t,e){var n;const r=((n=t.relatedTarget)===null||n===void 0?void 0:n.className)||"";!this.args.compositeEditorOptions&&r.indexOf("dual-editor")===-1&&this._lastEventType!=="focusout-right"&&(e==="rightInput"||e==="leftInput"&&this._lastEventType!=="focusout-left")&&(e==="leftInput"?this._isLeftValueTouched=!0:this._isRightValueTouched=!0,this.save());const s=e==="leftInput"?"left":"right";this._lastEventType=`${t==null?void 0:t.type}-${s}`}handleKeyDown(t,e){e==="leftInput"?this._isLeftValueTouched=!0:this._isRightValueTouched=!0,this._lastInputKeyEvent=t,(t.keyCode===xi.LEFT||t.keyCode===xi.RIGHT||t.keyCode===xi.TAB)&&t.stopImmediatePropagation()}destroy(){var t,e,n,r;this._eventHandler.unsubscribeAll(),this._bindEventService.unbindAll(),(e=(t=this._leftInput)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t),(r=(n=this._rightInput)===null||n===void 0?void 0:n.remove)===null||r===void 0||r.call(n)}createInput(t){var e,n,r,o,s,l,u;const h=this.editorParams[t],c=(n=(e=this.columnDef)===null||e===void 0?void 0:e.id)!==null&&n!==void 0?n:"",p=this.gridOptions.datasetIdPropertyName||"id",m=(s=(o=(r=this.args)===null||r===void 0?void 0:r.item)===null||o===void 0?void 0:o[p])!==null&&s!==void 0?s:"";let v=h.type||"text";(v==="float"||v==="integer")&&(v="number");const _=Re("input",{type:v||"text",id:`item-${m}-${t}`,ariaLabel:(u=(l=this.columnEditor)===null||l===void 0?void 0:l.ariaLabel)!==null&&u!==void 0?u:`${qr(c+"")} Input Editor`,className:`dual-editor-text editor-${c} ${t.replace(/input/gi,"")}`,autocomplete:"off",ariaAutoComplete:"none",placeholder:h.placeholder||"",title:h.title||""});return v==="readonly"&&(_.readOnly=!0,v="text"),v==="number"&&(_.step=this.getInputDecimalSteps(t)),_}disable(t=!0){var e;const n=this.disabled;this.disabled=t,this._leftInput&&this._rightInput&&(t?(this._leftInput.setAttribute("disabled","disabled"),this._rightInput.setAttribute("disabled","disabled"),n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&this.reset("",!0,!0)):(this._leftInput.removeAttribute("disabled"),this._rightInput.removeAttribute("disabled")))}focus(){this.grid.focus()}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValues(){const t={},e=this._leftInput.value,n=this._rightInput.value,r=this.editorParams.leftInput&&(this.editorParams.leftInput.type==="float"||this.editorParams.leftInput.type==="integer"),o=this.editorParams.rightInput&&(this.editorParams.rightInput.type==="float"||this.editorParams.rightInput.type==="integer"),s=e!==""&&r?+this._leftInput.value:e||"",l=n!==""&&o?+this._rightInput.value:n||"";return cr(t,this._leftFieldName,s),cr(t,this._rightFieldName,l),t}setValues(t){Array.isArray(t)&&t.length===2&&(this._leftInput.value=`${t[0]}`,this._rightInput.value=`${t[1]}`)}applyValue(t,e){this.applyValueByPosition(t,e,"leftInput"),this.applyValueByPosition(t,e,"rightInput")}applyValueByPosition(t,e,n){var r,o,s;const l=n==="leftInput"?this._leftFieldName:this._rightFieldName;if(l!==void 0){const u=(l==null?void 0:l.indexOf("."))>0;let h=l;if(u){const m=l.split(/\.(.*)/);h=m.length>1?m[1]:m}const c=u?_n(e,h):e[l],p=this.validate(null,{position:n,inputValue:c});if(u){const m=_n(e,h),v=p&&p.valid?m:"",_=(s=(o=(r=this.columnEditor)===null||r===void 0?void 0:r.complexObjectPath)!==null&&o!==void 0?o:l)!==null&&s!==void 0?s:"";cr(t,_,v)}else l&&(t[l]=p&&p.valid?e[l]:"")}}isValueChanged(){const t=this._leftInput.value,e=this._rightInput.value,n=this.editorParams&&this.editorParams.leftInput,r=this.editorParams&&this.editorParams.rightInput,o=this._lastInputKeyEvent&&this._lastInputKeyEvent.keyCode;if((n&&n.alwaysSaveOnEnterKey||r&&r.alwaysSaveOnEnterKey)&&o===xi.ENTER)return!0;const s=!(t===""&&(this._originalLeftValue===null||this._originalLeftValue===void 0))&&t!==this._originalLeftValue,l=!(e===""&&(this._originalRightValue===null||this._originalRightValue===void 0))&&e!==this._originalRightValue;return s||l}isValueTouched(){return this._isLeftValueTouched||this._isRightValueTouched}loadValue(t){this.loadValueByPosition(t,"leftInput"),this.loadValueByPosition(t,"rightInput"),this._leftInput.select()}loadValueByPosition(t,e){const n=e==="leftInput"?this._leftFieldName:this._rightFieldName,r=e==="leftInput"?"_originalLeftValue":"_originalRightValue",o=e==="leftInput"?"_leftInput":"_rightInput";if(t&&n!==void 0){const l=(n==null?void 0:n.indexOf("."))>0?_n(t,n):t.hasOwnProperty(n)?t[n]:"";if(this[r]=l,this.editorParams[e].type==="float"){const u=this.getDecimalPlaces(e);u!==null&&(this[r]||this[r]===0)&&typeof this[r]!==void 0&&(this[r]=(+this[r]).toFixed(u))}this[o]&&(this[o].value=`${this[r]}`)}}reset(t,e=!0,n=!1){var r,o;const s=(r=t??this._originalLeftValue)!==null&&r!==void 0?r:"",l=(o=t??this._originalRightValue)!==null&&o!==void 0?o:"";this._leftInput&&this._rightInput&&(this._originalLeftValue=s,this._originalRightValue=l,this._leftInput.value=`${s}`,this._rightInput.value=`${l}`),this._isLeftValueTouched=!1,this._isRightValueTouched=!1;const u=this.args.compositeEditorOptions;if(u&&e){const h=!n;this.handleChangeOnCompositeEditor(null,u,"user",h)}}save(){const t=this.validate(),e=t&&t.valid||!1;this._isValueSaveCalled||(this.hasAutoCommitEdit&&e?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges(),this._isValueSaveCalled=!0)}serializeValue(){const t={},e=this.serializeValueByPosition("leftInput"),n=this.serializeValueByPosition("rightInput");return cr(t,this._leftFieldName,e),cr(t,this._rightFieldName,n),t}serializeValueByPosition(t){const e=t==="leftInput"?this._leftInput.value:this._rightInput.value;if(e===""||isNaN(+e))return e;let n=parseFloat(e);const r=this.getDecimalPlaces(t);return r!==null&&(n||n===0)&&n.toFixed&&(n=parseFloat(n.toFixed(r))),n}getDecimalPlaces(t){const n=t==="leftInput"?"leftInput":"rightInput",r=this.editorParams[n],o=r==null?void 0:r.decimal;return o===void 0?0:o}getInputDecimalSteps(t){const e=this.getDecimalPlaces(t);let n="";for(let r=1;r<e;r++)n+="0";return e>0?`0.${n}1`:"1"}validate(t,e){if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};if(e){const n=this.validateByPosition(e.position,e.inputValue);if(!n.valid)return e.position==="leftInput"?this._leftInput.select():this._rightInput.select(),n}else{const n=this.validateByPosition("leftInput"),r=this.validateByPosition("rightInput");if(!n.valid)return this._leftInput.select(),n;if(!r.valid)return this._rightInput.select(),r}return{valid:!0,msg:""}}validateByPosition(t,e){var n;const r=this.editorParams[t];let o="";if(e)o=e;else{const u=t==="leftInput"?this._leftInput:this._rightInput;o=u&&u.value}const s=this.validator;o=typeof s=="function"?this.getValues():o;const l={editorArgs:this.args,errorMessage:r.errorMessage,required:!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions?!1:r.required,validator:typeof s=="function"?s:r.validator};switch(r.type){case"float":return vv(o,{...l,decimal:this.getDecimalPlaces(t),minValue:r.minValue,maxValue:r.maxValue,operatorConditionalType:r.operatorConditionalType});case"integer":return gv(o,{...l,minValue:r.minValue,maxValue:r.maxValue,operatorConditionalType:r.operatorConditionalType});case"text":case"password":default:return Bu(o,l)}}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h,c,p,m,v;const _=this.grid.getActiveCell(),C=this.args.column,x=(l=(s=(o=this.columnEditor.params)===null||o===void 0?void 0:o.leftInput)===null||s===void 0?void 0:s.field)!==null&&l!==void 0?l:"",S=(c=(h=(u=this.columnEditor.params)===null||u===void 0?void 0:u.rightInput)===null||h===void 0?void 0:h.field)!==null&&c!==void 0?c:"",E=this.dataContext,D=this.grid,A=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,A),this.applyValue(e.formValues,A);const P=(v=(m=(p=this.gridOptions)===null||p===void 0?void 0:p.compositeEditorOptions)===null||m===void 0?void 0:m.excludeDisabledFieldFormValues)!==null&&v!==void 0?v:!1;(r||this.disabled&&P&&e.formValues.hasOwnProperty(x))&&delete e.formValues[x],(r||this.disabled&&P&&e.formValues.hasOwnProperty(S))&&delete e.formValues[S],D.onCompositeEditorChange.notify({..._,item:E,grid:D,column:C,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}handleChangeOnCompositeEditorDebounce(t){var e,n,r;const o=(e=this.args)===null||e===void 0?void 0:e.compositeEditorOptions;if(o){const s=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.editorTypingDebounce)!==null&&r!==void 0?r:500;clearTimeout(this._timer),this._timer=setTimeout(()=>this.handleChangeOnCompositeEditor(t,o),s)}}}class zu{constructor(t,e){if(this.args=t,this._inputType="text",this._isValueTouched=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=t.grid&&t.grid.getOptions(),this._bindEventService=new Nn,this.inputType=e||"text",this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._input}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get inputType(){return this._inputType}set inputType(t){this._inputType=t}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l,u;const h=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",c=this.args.compositeEditorOptions;this._input=Re("input",{type:this._inputType||"text",autocomplete:"off",ariaAutoComplete:"none",ariaLabel:(r=(n=this.columnEditor)===null||n===void 0?void 0:n.ariaLabel)!==null&&r!==void 0?r:`${qr(h+"")} Input Editor`,placeholder:(s=(o=this.columnEditor)===null||o===void 0?void 0:o.placeholder)!==null&&s!==void 0?s:"",title:(u=(l=this.columnEditor)===null||l===void 0?void 0:l.title)!==null&&u!==void 0?u:"",className:`editor-text editor-${h}`});const p=this.args.container;p&&typeof p.appendChild=="function"&&p.appendChild(this._input),this._bindEventService.bind(this._input,"focus",()=>{var m;return(m=this._input)===null||m===void 0?void 0:m.select()}),this._bindEventService.bind(this._input,"keydown",m=>{this._isValueTouched=!0,this._lastInputKeyEvent=m,(m.keyCode===xi.LEFT||m.keyCode===xi.RIGHT)&&m.stopImmediatePropagation()}),this.hasAutoCommitEdit&&!c&&this._bindEventService.bind(this._input,"focusout",()=>{this._isValueTouched=!0,this.save()}),c&&this._bindEventService.bind(this._input,["input","paste"],this.handleOnInputChange.bind(this))}destroy(){var t,e;this._bindEventService.unbindAll(),(e=(t=this._input)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t)}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._input)if(t){this._input.setAttribute("disabled","disabled");const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==""&&this.reset("",!0,!0)}else this._input.removeAttribute("disabled")}focus(){var t;this.grid.focus(),(t=this._input)===null||t===void 0||t.focus()}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var t;return((t=this._input)===null||t===void 0?void 0:t.value)||""}setValue(t,e=!1,n=!0){if(this._input&&(this._input.value=`${t}`,e)){this.applyValue(this.args.item,this.serializeValue());const r=this.args.compositeEditorOptions;r&&n&&this.handleChangeOnCompositeEditor(null,r,"system")}}applyValue(t,e){var n,r,o;const s=this.columnDef&&this.columnDef.field;if(s!==void 0){const l=(s==null?void 0:s.indexOf("."))>0,u=this.validate(null,e),h=u!=null&&u.valid?e:"";if(l){const c=(o=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.complexObjectPath)!==null&&r!==void 0?r:s)!==null&&o!==void 0?o:"";cr(t,c,h)}else s&&(t[s]=h)}}isValueChanged(){var t;const e=(t=this._input)===null||t===void 0?void 0:t.value,n=this._lastInputKeyEvent&&this._lastInputKeyEvent.keyCode;return this.columnEditor&&this.columnEditor.alwaysSaveOnEnterKey&&n===xi.ENTER?!0:!(e===""&&(this._originalValue===null||this._originalValue===void 0))&&e!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(t){const e=this.columnDef&&this.columnDef.field;if(t&&e!==void 0&&this._input){const r=(e==null?void 0:e.indexOf("."))>0?_n(t,e):t.hasOwnProperty(e)&&t[e]||"";this._originalValue=r,this._input.value=this._originalValue,this._input.select()}}reset(t,e=!0,n=!1){var r;const o=(r=t??this._originalValue)!==null&&r!==void 0?r:"";this._input&&(this._originalValue=o,this._input.value=`${o}`),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&e){const l=!n;this.handleChangeOnCompositeEditor(null,s,"user",l)}}save(){const t=this.validate(),e=t&&t.valid||!1;this.hasAutoCommitEdit&&e?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t,e;return(e=(t=this._input)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:""}validate(t,e){var n;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const r=e!==void 0?e:this._input&&this._input.value;return Bu(r,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}handleOnInputChange(t){var e,n;this._isValueTouched=!0;const r=this.args.compositeEditorOptions;if(r){const o=(n=(e=this.gridOptions)===null||e===void 0?void 0:e.editorTypingDebounce)!==null&&n!==void 0?n:500;clearTimeout(this._timer),this._timer=setTimeout(()=>this.handleChangeOnCompositeEditor(t,r),o)}}}const nC=0;class rC extends zu{constructor(t){super(t,"number"),this.args=t}init(){var t,e,n,r,o,s,l,u;if(this.columnDef&&this.columnEditor&&this.args){const h=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",c=this.args.compositeEditorOptions;this._input=Re("input",{type:"number",autocomplete:"off",ariaAutoComplete:"none",ariaLabel:(r=(n=this.columnEditor)===null||n===void 0?void 0:n.ariaLabel)!==null&&r!==void 0?r:`${qr(h+"")} Number Editor`,className:`editor-text editor-${h}`,placeholder:(s=(o=this.columnEditor)===null||o===void 0?void 0:o.placeholder)!==null&&s!==void 0?s:"",title:(u=(l=this.columnEditor)===null||l===void 0?void 0:l.title)!==null&&u!==void 0?u:"",step:`${this.columnEditor.valueStep!==void 0?this.columnEditor.valueStep:this.getInputDecimalSteps()}`});const p=this.args.container;p&&typeof p.appendChild=="function"&&p.appendChild(this._input),this._bindEventService.bind(this._input,"focus",()=>{var m;return(m=this._input)===null||m===void 0?void 0:m.select()}),this._bindEventService.bind(this._input,"keydown",m=>{this._lastInputKeyEvent=m,(m.keyCode===xi.LEFT||m.keyCode===xi.RIGHT)&&m.stopImmediatePropagation()}),this.hasAutoCommitEdit&&!c&&this._bindEventService.bind(this._input,"focusout",()=>{this._isValueTouched=!0,this.save()}),c&&(this._bindEventService.bind(this._input,["input","paste"],this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._input,"wheel",this.handleOnMouseWheel.bind(this),{passive:!0}))}}getDecimalPlaces(){var t,e,n,r,o;let s=(o=(e=(t=this.columnEditor)===null||t===void 0?void 0:t.decimal)!==null&&e!==void 0?e:(r=(n=this.columnEditor)===null||n===void 0?void 0:n.params)===null||r===void 0?void 0:r.decimalPlaces)!==null&&o!==void 0?o:void 0;return s===void 0&&(s=nC),!s&&s!==0?null:s}getInputDecimalSteps(){const t=this.getDecimalPlaces();let e="";for(let n=1;n<t;n++)e+="0";return t>0?`0.${e}1`:"1"}loadValue(t){const e=this.columnDef&&this.columnDef.field;if(e!==void 0&&t&&e!==void 0&&this._input){const r=(e==null?void 0:e.indexOf("."))>0?_n(t,e):t[e];this._originalValue=r;const o=this.getDecimalPlaces();o!==null&&(this._originalValue||this._originalValue===0)&&typeof this._originalValue!==void 0&&(this._originalValue=(+this._originalValue).toFixed(o)),this._input.value=`${this._originalValue}`,this._input.select()}}serializeValue(){var t;const e=(t=this._input)===null||t===void 0?void 0:t.value;if(e===void 0||e===""||isNaN(+e))return e;let n=parseFloat(e);const r=this.getDecimalPlaces();return r!==null&&(n||n===0)&&n.toFixed&&(n=parseFloat(n.toFixed(r))),n}validate(t,e){var n,r;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const o=e!==void 0?e:(n=this._input)===null||n===void 0?void 0:n.value;return vv(o,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,decimal:this.getDecimalPlaces(),minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!((r=this.args)===null||r===void 0)&&r.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}handleOnMouseWheel(t){this._isValueTouched=!0;const e=this.args.compositeEditorOptions;e&&this.handleChangeOnCompositeEditor(t,e)}}class oC extends zu{constructor(t){super(t,"password"),this.args=t}}class sC extends zu{constructor(t){super(t,"number"),this.args=t}init(){var t,e,n,r,o,s,l,u;if(this.columnDef&&this.columnEditor&&this.args){const h=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",c=this.args.compositeEditorOptions;this._input=Re("input",{type:"number",autocomplete:"off",ariaAutoComplete:"none",ariaLabel:(r=(n=this.columnEditor)===null||n===void 0?void 0:n.ariaLabel)!==null&&r!==void 0?r:`${qr(h+"")} Slider Editor`,placeholder:(s=(o=this.columnEditor)===null||o===void 0?void 0:o.placeholder)!==null&&s!==void 0?s:"",title:(u=(l=this.columnEditor)===null||l===void 0?void 0:l.title)!==null&&u!==void 0?u:"",step:`${this.columnEditor.valueStep!==void 0?this.columnEditor.valueStep:"1"}`,className:`editor-text editor-${h}`});const p=this.args.container;p&&typeof p.appendChild=="function"&&p.appendChild(this._input),this._bindEventService.bind(this._input,"focus",()=>{var m;return(m=this._input)===null||m===void 0?void 0:m.select()}),this._bindEventService.bind(this._input,"keydown",m=>{this._lastInputKeyEvent=m,(m.keyCode===xi.LEFT||m.keyCode===xi.RIGHT)&&m.stopImmediatePropagation()}),this.hasAutoCommitEdit&&!c&&this._bindEventService.bind(this._input,"focusout",()=>{this._isValueTouched=!0,this.save()}),c&&(this._bindEventService.bind(this._input,["input","paste"],this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._input,"wheel",this.handleOnMouseWheel.bind(this),{passive:!0}))}}loadValue(t){const e=this.columnDef&&this.columnDef.field;if(e!==void 0&&t&&e!==void 0&&this._input){const r=(e==null?void 0:e.indexOf("."))>0?_n(t,e):t[e];this._originalValue=isNaN(r)||r===null||r===void 0?r:`${r}`,this._input.value=`${this._originalValue}`,this._input.select()}}serializeValue(){var t;const e=(t=this._input)===null||t===void 0?void 0:t.value;if(e===void 0||e===""||isNaN(+e))return e;const n=isNaN(+e)?e:parseInt(e,10);return isNaN(+n)?e:n}validate(t,e){var n;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const r=e!==void 0?e:this.getValue();return gv(r,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!((n=this.args)===null||n===void 0)&&n.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}handleOnMouseWheel(t){this._isValueTouched=!0;const e=this.args.compositeEditorOptions;e&&this.handleChangeOnCompositeEditor(t,e)}}class lC{constructor(t){if(this.args=t,this._isValueTouched=!1,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=t.grid&&t.grid.getOptions();const e=this.gridOptions||this.args.column.params||{};e!=null&&e.translater&&(this._translater=e.translater),this._locales=this.gridOptions&&this.gridOptions.locales||je.locales,this._bindEventService=new Nn,this.init()}get columnDef(){return this.args.column}get columnEditor(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.internalColumnEditor)!==null&&e!==void 0?e:{}}get dataContext(){return this.args.item}get editorDomElement(){return this._textareaElm}get editorOptions(){var t,e;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.editorOptions)!==null&&e!==void 0?e:{}}get hasAutoCommitEdit(){var t,e;return(e=(t=this.gridOptions)===null||t===void 0?void 0:t.autoCommitEdit)!==null&&e!==void 0?e:!1}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l,u,h,c,p,m,v,_,C,x,S,E,D,A,P,M,B,Z,L,ae;let _e="",J="";if(this._translater&&this._translater.translate&&this.gridOptions.enableTranslate){const De=ho(this.gridOptions),ne=(e=(t=this.editorOptions.buttonTexts)===null||t===void 0?void 0:t.cancelKey)!==null&&e!==void 0?e:`${De}CANCEL`,pe=(r=(n=this.editorOptions.buttonTexts)===null||n===void 0?void 0:n.saveKey)!==null&&r!==void 0?r:`${De}SAVE`;_e=this._translater.translate(`${De}${ne}`),J=this._translater.translate(`${De}${pe}`)}else _e=(u=(s=(o=this.editorOptions.buttonTexts)===null||o===void 0?void 0:o.cancel)!==null&&s!==void 0?s:(l=this._locales)===null||l===void 0?void 0:l.TEXT_CANCEL)!==null&&u!==void 0?u:"Cancel",J=(m=(c=(h=this.editorOptions.buttonTexts)===null||h===void 0?void 0:h.save)!==null&&c!==void 0?c:(p=this._locales)===null||p===void 0?void 0:p.TEXT_SAVE)!==null&&m!==void 0?m:"Save";const U=this.args.compositeEditorOptions,F=(_=(v=this.columnDef)===null||v===void 0?void 0:v.id)!==null&&_!==void 0?_:"",de=(C=this.columnEditor)===null||C===void 0?void 0:C.maxLength,qe=(S=(x=this.editorOptions)===null||x===void 0?void 0:x.rows)!==null&&S!==void 0?S:4,Ie=U?this.args.container:document.body;this._wrapperElm=Re("div",{className:`slick-large-editor-text editor-${F}`,style:{position:U?"relative":"absolute"}}),Ie.appendChild(this._wrapperElm),this._textareaElm=Re("textarea",{ariaLabel:(D=(E=this.columnEditor)===null||E===void 0?void 0:E.ariaLabel)!==null&&D!==void 0?D:`${qr(F+"")} Text Editor`,cols:(P=(A=this.editorOptions)===null||A===void 0?void 0:A.cols)!==null&&P!==void 0?P:40,rows:U&&qe>3?3:qe,placeholder:(B=(M=this.columnEditor)===null||M===void 0?void 0:M.placeholder)!==null&&B!==void 0?B:"",title:(L=(Z=this.columnEditor)===null||Z===void 0?void 0:Z.title)!==null&&L!==void 0?L:""},this._wrapperElm);const xe=Re("div",{className:"editor-footer"}),Oe=Re("span",{className:"counter"});if(this._currentLengthElm=Re("span",{className:"text-length",textContent:"0"}),Oe.appendChild(this._currentLengthElm),de!==void 0&&(Oe.appendChild(Re("span",{className:"separator",textContent:"/"})),Oe.appendChild(Re("span",{className:"max-length",textContent:`${de}`}))),xe.appendChild(Oe),!U){const De=Re("button",{className:"btn btn-cancel btn-default btn-xs",textContent:_e},xe),ne=Re("button",{className:"btn btn-save btn-primary btn-xs",textContent:J},xe);this._bindEventService.bind(De,"click",this.cancel.bind(this)),this._bindEventService.bind(ne,"click",this.save.bind(this)),this.position((ae=this.args)===null||ae===void 0?void 0:ae.position),this._textareaElm.focus(),this._textareaElm.select()}this._wrapperElm.appendChild(xe),this._bindEventService.bind(this._textareaElm,"keydown",this.handleKeyDown.bind(this)),this._bindEventService.bind(this._textareaElm,"input",this.handleOnInputChange.bind(this)),this._bindEventService.bind(this._textareaElm,"paste",this.handleOnInputChange.bind(this))}cancel(){var t;const e=this._defaultTextValue||"";this._textareaElm.value=e,this._currentLengthElm.textContent=`${e.length}`,!((t=this.args)===null||t===void 0)&&t.cancelChanges&&this.args.cancelChanges()}hide(){this._wrapperElm.style.display="none"}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)?this.applyInputUsabilityState():this._wrapperElm.style.display="block"}destroy(){var t,e;this._bindEventService.unbindAll(),(e=(t=this._wrapperElm)===null||t===void 0?void 0:t.remove)===null||e===void 0||e.call(t)}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._textareaElm&&this._wrapperElm)if(t){this._textareaElm.disabled=!0,this._wrapperElm.classList.add("disabled");const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==""&&this.reset("",!0,!0)}else this._textareaElm.disabled=!1,this._wrapperElm.classList.remove("disabled")}focus(){this.grid.focus(),this._textareaElm&&(this._textareaElm.focus(),this._textareaElm.select())}getValue(){return this._textareaElm.value}setValue(t,e=!1,n=!0){if(this._textareaElm.value=t,this._currentLengthElm.textContent=`${t.length}`,e){this.applyValue(this.args.item,this.serializeValue());const r=this.args.compositeEditorOptions;r&&n&&this.handleChangeOnCompositeEditor(null,r,"system")}}applyValue(t,e){var n,r,o,s;const l=(n=this.columnDef)===null||n===void 0?void 0:n.field;if(l!==void 0){const u=(l==null?void 0:l.indexOf("."))>0,h=this.validate(void 0,e),c=h&&h.valid?e:"";if(u){const p=(s=(o=(r=this.columnEditor)===null||r===void 0?void 0:r.complexObjectPath)!==null&&o!==void 0?o:l)!==null&&s!==void 0?s:"";cr(t,p,c)}else t[l]=c}}isValueChanged(){const t=this._textareaElm.value;return!(t===""&&(this._defaultTextValue===null||this._defaultTextValue===void 0))&&t!==this._defaultTextValue}isValueTouched(){return this._isValueTouched}loadValue(t){var e;const n=(e=this.columnDef)===null||e===void 0?void 0:e.field;if(t&&n!==void 0){const o=(n==null?void 0:n.indexOf("."))>0?_n(t,n):t[n];this._defaultTextValue=o||"",this._textareaElm.value=this._defaultTextValue,this._currentLengthElm.textContent=this._defaultTextValue.length,this._textareaElm.defaultValue=this._defaultTextValue,this._textareaElm.select()}}position(t){var e,n,r,o,s,l,u,h;const c=Gn(this.args.container),p=this.args.container.offsetHeight,m=this.args.container.offsetWidth,v=this._wrapperElm.getBoundingClientRect().height||this.args.position.height,_=this._wrapperElm.getBoundingClientRect().width||this.args.position.width,C=document.body.offsetHeight||window.innerHeight,x=document.body.offsetWidth||window.innerWidth;let S=(n=(e=c==null?void 0:c.top)!==null&&e!==void 0?e:t.top)!==null&&n!==void 0?n:0,E=(o=(r=c==null?void 0:c.left)!==null&&r!==void 0?r:t.left)!==null&&o!==void 0?o:0;const D=(l=(s=this.editorOptions)===null||s===void 0?void 0:s.position)!==null&&l!==void 0?l:"auto";if(D==="left"||D==="auto"&&E+_>x){const A=(h=(u=this.editorOptions)===null||u===void 0?void 0:u.marginRight)!==null&&h!==void 0?h:0;E-=_-m+A}(D==="top"||D==="auto"&&S+v>C)&&(S-=v-p),this._wrapperElm.style.top=`${S}px`,this._wrapperElm.style.left=`${E}px`}reset(t,e=!0,n=!1){var r;const o=(r=t??this._defaultTextValue)!==null&&r!==void 0?r:"";this._textareaElm&&(this._defaultTextValue=o,this._textareaElm.value=o,this._currentLengthElm.textContent=o.length),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&e){const l=!n;this.handleChangeOnCompositeEditor(null,s,"user",l)}}save(){var t;const e=this.validate(),n=(t=e==null?void 0:e.valid)!==null&&t!==void 0?t:!1;this.hasAutoCommitEdit&&n?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){return this._textareaElm.value}validate(t,e){var n,r;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const o=e!==void 0?e:(n=this._textareaElm)===null||n===void 0?void 0:n.value;return Bu(o,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minLength:this.columnEditor.minLength,maxLength:this.columnEditor.maxLength,operatorConditionalType:this.columnEditor.operatorConditionalType,required:!((r=this.args)===null||r===void 0)&&r.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleKeyDown(t){var e;const n=(e=t.keyCode)!==null&&e!==void 0?e:t.code;this._isValueTouched=!0,this.args.compositeEditorOptions||(n===xi.ENTER&&t.ctrlKey||t.ctrlKey&&t.key.toUpperCase()==="S"?(t.preventDefault(),this.save()):n===xi.ESCAPE?(t.preventDefault(),this.cancel()):n===xi.TAB&&t.shiftKey?(t.preventDefault(),this.args&&this.grid&&this.grid.navigatePrev()):n===xi.TAB&&(t.preventDefault(),this.args&&this.grid&&this.grid.navigateNext()))}handleOnInputChange(t){var e,n,r;const o=this.args.compositeEditorOptions,s=(e=this.columnEditor)===null||e===void 0?void 0:e.maxLength;let l=!1;if(s&&(l=this.truncateText(this._textareaElm,s)),l)this._currentLengthElm.textContent=`${s}`;else{const u=t.type==="paste"?t.clipboardData.getData("text"):t.target.value;this._currentLengthElm.textContent=`${u.length}`}if(o){const u=(r=(n=this.gridOptions)===null||n===void 0?void 0:n.editorTypingDebounce)!==null&&r!==void 0?r:500;clearTimeout(this._timer),this._timer=setTimeout(()=>this.handleChangeOnCompositeEditor(t,o),u)}}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}truncateText(t,e){const n=t.value+"";return n.length>e?(t.value=n.substring(0,e),!0):!1}}class _v{constructor(t,e,n=-1){var r,o,s,l,u,h,c,p,m,v,_;if(this.args=t,this.isMultipleSelect=e,this.delayOpening=n,this._isValueTouched=!1,this._isDisposingOrCallingSave=!1,this.disabled=!1,this.enableTranslateLabel=!1,this.finalCollection=[],!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},!((r=this.gridOptions)===null||r===void 0)&&r.translater&&(this._translaterService=this.gridOptions.translater),this._locales=this.gridOptions.locales||je.locales;const C=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"";this.elementName=`editor-${C}`;const x=this.args.compositeEditorOptions,S={autoAdjustDropHeight:!0,autoAdjustDropPosition:!0,autoAdjustDropWidthByTextSize:!0,container:"body",filter:!1,maxHeight:275,minHeight:25,name:this.elementName,single:!0,renderOptionLabelAsHtml:(u=(l=this.columnEditor)===null||l===void 0?void 0:l.enableRenderHtml)!==null&&u!==void 0?u:!1,sanitizer:E=>Ln(this.gridOptions,E),onClick:()=>this._isValueTouched=!0,onCheckAll:()=>this._isValueTouched=!0,onUncheckAll:()=>this._isValueTouched=!0,onClose:()=>{x?this.handleChangeOnCompositeEditor(x):(this._isDisposingOrCallingSave=!0,this.save(this.hasAutoCommitEdit))}};if(e)if(S.single=!1,S.displayTitle=!0,S.showOkButton=!0,!((h=this._translaterService)===null||h===void 0)&&h.getCurrentLanguage()){const E=ho(this.gridOptions);S.countSelectedText=this._translaterService.translate(`${E}X_OF_Y_SELECTED`),S.allSelectedText=this._translaterService.translate(`${E}ALL_SELECTED`),S.selectAllText=this._translaterService.translate(`${E}SELECT_ALL`),S.okButtonText=this._translaterService.translate(`${E}OK`),S.noMatchesFoundText=this._translaterService.translate(`${E}NO_MATCHES_FOUND`)}else S.countSelectedText=(c=this._locales)===null||c===void 0?void 0:c.TEXT_X_OF_Y_SELECTED,S.allSelectedText=(p=this._locales)===null||p===void 0?void 0:p.TEXT_ALL_SELECTED,S.selectAllText=(m=this._locales)===null||m===void 0?void 0:m.TEXT_SELECT_ALL,S.okButtonText=(v=this._locales)===null||v===void 0?void 0:v.TEXT_OK,S.noMatchesFoundText=(_=this._locales)===null||_===void 0?void 0:_.TEXT_NO_MATCHES_FOUND;this.defaultOptions=S,this.init()}get collection(){var t,e;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.collection)!==null&&e!==void 0?e:[]}get collectionOptions(){var t;return(t=this.columnEditor)===null||t===void 0?void 0:t.collectionOptions}get columnDef(){return this.args.column}get columnEditor(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.internalColumnEditor)!==null&&e!==void 0?e:{}}get dataContext(){return this.args.item}get editorDomElement(){return this.editorElm}get isCompositeEditor(){var t;return!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)}get customStructure(){var t,e;return(e=(t=this.columnDef)===null||t===void 0?void 0:t.internalColumnEditor)===null||e===void 0?void 0:e.customStructure}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get msInstance(){return this._msInstance}get selectOptions(){return this.defaultOptions}get currentValues(){var t,e,n,r,o,s;const l=(e=(t=this._msInstance)===null||t===void 0?void 0:t.getSelects())!==null&&e!==void 0?e:[];if(this.collection.every(c=>typeof c=="number"||typeof c=="string"))return this.collection.filter(c=>l==null?void 0:l.some(p=>`${p}`===(c==null?void 0:c.toString())));const u=(r=(n=this.collectionOptions)===null||n===void 0?void 0:n.separatorBetweenTextLabels)!==null&&r!==void 0?r:"",h=(s=(o=this.collectionOptions)===null||o===void 0?void 0:o.includePrefixSuffixToSelectedValues)!==null&&s!==void 0?s:!1;return this.collection.filter(c=>l.some(p=>{var m;return`${p}`===((m=c==null?void 0:c[this.valueName])===null||m===void 0?void 0:m.toString())})).map(c=>{var p,m,v,_;const C=c[this.valueName];let x=c[this.labelPrefixName]||"",S=c[this.labelSuffixName]||"";const E=(m=(p=this.columnDef)===null||p===void 0?void 0:p.field)!==null&&m!==void 0?m:"",D=(E==null?void 0:E.indexOf("."))>0,A=(_=(v=this.columnEditor)===null||v===void 0?void 0:v.serializeComplexValueFormat)!==null&&_!==void 0?_:"object";return D&&typeof c=="object"&&A==="object"?c:(x=this.enableTranslateLabel&&this._translaterService&&x&&typeof x=="string"?this._translaterService.translate(x||" "):x,S=this.enableTranslateLabel&&this._translaterService&&S&&typeof S=="string"?this._translaterService.translate(S||" "):S,h?[x,C,S].filter(M=>M).join(u):C)})}get currentValue(){var t,e,n,r,o,s,l,u,h;const c=(e=(t=this._msInstance)===null||t===void 0?void 0:t.getSelects())!==null&&e!==void 0?e:[],p=c.length?c[0]:"",m=(n=this.columnDef)===null||n===void 0?void 0:n.field;if(m!==void 0){if(this.collection.every(E=>typeof E=="number"||typeof E=="string"))return vs(this.collection,E=>{var D;return((D=E==null?void 0:E.toString)===null||D===void 0?void 0:D.call(E))===`${p}`});const v=(o=(r=this.collectionOptions)===null||r===void 0?void 0:r.separatorBetweenTextLabels)!==null&&o!==void 0?o:"",_=(l=(s=this.collectionOptions)===null||s===void 0?void 0:s.includePrefixSuffixToSelectedValues)!==null&&l!==void 0?l:!1,C=vs(this.collection,E=>{var D;return E.hasOwnProperty(this.valueName)&&((D=E[this.valueName])===null||D===void 0?void 0:D.toString())===`${p}`}),x=(m==null?void 0:m.indexOf("."))>0,S=(h=(u=this.columnEditor)===null||u===void 0?void 0:u.serializeComplexValueFormat)!==null&&h!==void 0?h:"object";if(x&&typeof C=="object"&&S==="object")return C;if(C&&C.hasOwnProperty(this.valueName)){const E=C[this.valueName];if(_){let D=C[this.labelPrefixName]||"",A=C[this.labelSuffixName]||"";return D=this.enableTranslateLabel&&this._translaterService&&D&&typeof D=="string"?this._translaterService.translate(D||" "):D,A=this.enableTranslateLabel&&this._translaterService&&A&&typeof A=="string"?this._translaterService.translate(A||" "):A,[D,E,A].filter(M=>M).join(v)}return E}}return""}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t,e,n,r,o,s,l,u,h,c,p,m,v;if(!this.columnDef||!this.columnDef.internalColumnEditor||!this.columnDef.internalColumnEditor.collection&&!this.columnDef.internalColumnEditor.collectionAsync)throw new Error(`[Slickgrid-Universal] You need to pass a "collection" (or "collectionAsync") inside Column Definition Editor for the MultipleSelect/SingleSelect Editor to work correctly.
26
26
  Also each option should include a value/label pair (or value/labelKey when using Locale).
27
27
  For example: { editor: { collection: [{ value: true, label: 'True' },{ value: false, label: 'False'}] } }`);if(this._collectionService=new Gp(this._translaterService),this.enableTranslateLabel=(e=(t=this.columnEditor)===null||t===void 0?void 0:t.enableTranslateLabel)!==null&&e!==void 0?e:!1,this.labelName=(r=(n=this.customStructure)===null||n===void 0?void 0:n.label)!==null&&r!==void 0?r:"label",this.labelPrefixName=(s=(o=this.customStructure)===null||o===void 0?void 0:o.labelPrefix)!==null&&s!==void 0?s:"labelPrefix",this.labelSuffixName=(u=(l=this.customStructure)===null||l===void 0?void 0:l.labelSuffix)!==null&&u!==void 0?u:"labelSuffix",this.optionLabel=(c=(h=this.customStructure)===null||h===void 0?void 0:h.optionLabel)!==null&&c!==void 0?c:"value",this.valueName=(m=(p=this.customStructure)===null||p===void 0?void 0:p.value)!==null&&m!==void 0?m:"value",this.enableTranslateLabel&&(!this._translaterService||typeof this._translaterService.translate!="function"))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');this.renderDomElement(this.collection),(this.disabled||!((v=this.columnEditor)===null||v===void 0)&&v.collectionAsync&&Array.isArray(this.collection)&&this.collection.length===0)&&this.disable(!0)}getValue(){return this.isMultipleSelect?this.currentValues:this.currentValue}setValue(t,e=!1,n=!0){if(this.isMultipleSelect&&Array.isArray(t)?this.loadMultipleValues(t):this.loadSingleValue(t),e){this.applyValue(this.args.item,this.serializeValue());const r=this.args.compositeEditorOptions;r&&n&&this.handleChangeOnCompositeEditor(r,"system")}}hide(){this._msInstance&&this._msInstance.close()}show(t){!this.isCompositeEditor&&this._msInstance?this._msInstance.open(t):this.isCompositeEditor&&this.applyInputUsabilityState()}applyValue(t,e){var n,r,o,s,l;const u=(n=this.columnDef)===null||n===void 0?void 0:n.field,h=(r=this.columnDef)===null||r===void 0?void 0:r.type;let c=e;if(u!==void 0){(h===ie.number||h===ie.integer||h===ie.boolean)&&!isNaN(parseFloat(e))&&(c=parseFloat(e)),this.isMultipleSelect&&typeof e=="string"&&e.indexOf(",")>=0&&(c=e.split(","));const p=(u==null?void 0:u.indexOf("."))>0,m=this.validate(null,c);if(c=m!=null&&m.valid?c:"",p){const v=(l=(s=(o=this.columnEditor)===null||o===void 0?void 0:o.complexObjectPath)!==null&&s!==void 0?s:u)!==null&&l!==void 0?l:"";cr(t,v,c)}else t[u]=c}}destroy(){var t,e;this._msInstance&&this.hasAutoCommitEdit&&this.isValueChanged()&&!this._isDisposingOrCallingSave&&!this.isCompositeEditor&&(this._isDisposingOrCallingSave=!0,this.save(!0)),this._isDisposingOrCallingSave=!0,typeof((t=this._msInstance)===null||t===void 0?void 0:t.destroy)=="function"&&this._msInstance.destroy(),(e=this.editorElm)===null||e===void 0||e.remove(),this._msInstance=void 0}loadValue(t){var e,n,r;const o=(e=this.columnDef)===null||e===void 0?void 0:e.field,s=o!==void 0&&(o==null?void 0:o.indexOf("."))>0;if(t&&o!==void 0){const l=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.complexObjectPath)!==null&&r!==void 0?r:o,u=s?_n(t,l):t.hasOwnProperty(o)&&t[o],h=s&&(u!=null&&u.hasOwnProperty(this.valueName))?u[this.valueName]:u;this.isMultipleSelect&&Array.isArray(h)?this.loadMultipleValues(h):this.loadSingleValue(h)}}loadMultipleValues(t){var e;if(Array.isArray(t)){this.originalValue=t.map(r=>typeof r=="number"||typeof r=="boolean"?`${r}`:r),(e=this._msInstance)===null||e===void 0||e.setSelects(this.originalValue);const n=this.args.compositeEditorOptions;n&&this.handleChangeOnCompositeEditor(n)}}loadSingleValue(t){var e;this.originalValue=typeof t=="number"||typeof t=="boolean"?`${t}`:t,(e=this._msInstance)===null||e===void 0||e.setSelects([this.originalValue])}serializeValue(){return this.isMultipleSelect?this.currentValues:this.currentValue}changeEditorOption(t,e){var n;this.columnEditor&&(this.columnEditor.editorOptions||(this.columnEditor.editorOptions={}),this.columnEditor.editorOptions[t]=e,this.editorElmOptions={...this.editorElmOptions,[t]:e},(n=this._msInstance)===null||n===void 0||n.refreshOptions(this.editorElmOptions))}disable(t=!0){const e=this.disabled;if(this.disabled=t,this._msInstance)if(t){this._msInstance.disable();const n=this.getValue(),r=Array.isArray(n)&&this.isMultipleSelect?(n==null?void 0:n[0])==="":n==="";e!==t&&this.isCompositeEditor&&!r&&this.reset("",!0,!0)}else this._msInstance.enable()}focus(){var t;this.grid.focus(),(t=this._msInstance)===null||t===void 0||t.focus()}isValueChanged(){var t;const e=(t=this._msInstance)===null||t===void 0?void 0:t.getSelects();if(this.isMultipleSelect)return!Qo(e,this.originalValue);const n=Array.isArray(e)&&e.length>0?e[0]:void 0;return n!==void 0&&n!==this.originalValue}isValueTouched(){return this._isValueTouched}reset(t,e=!0,n=!1){const r=t??this.originalValue;if(this._msInstance){this.originalValue=this.isMultipleSelect?r!==void 0?[r]:[]:r;const s=this.originalValue===void 0?[]:[this.originalValue];this._msInstance.setSelects(s)}this._isValueTouched=!1;const o=this.args.compositeEditorOptions;if(o&&e){const s=!n;this.handleChangeOnCompositeEditor(o,"user",s)}}save(t=!1){var e;const n=this.validate(),r=(e=n==null?void 0:n.valid)!==null&&e!==void 0?e:!1;(!this._isDisposingOrCallingSave||t)&&this.hasAutoCommitEdit&&r?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}validate(t,e){var n,r;const o=this.isCompositeEditor?!1:(n=this.columnEditor)===null||n===void 0?void 0:n.required,s=e!==void 0?e:(r=this._msInstance)===null||r===void 0?void 0:r.getSelects(),l=this.columnEditor&&this.columnEditor.errorMessage;if(this.isCompositeEditor&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};if(this.validator){const u=e!==void 0?e:this.isMultipleSelect?this.currentValues:this.currentValue;return this.validator(u,this.args)}return o&&(s===""||Array.isArray(s)&&s.length===0)?{valid:!1,msg:l||je.VALIDATION_REQUIRED_FIELD}:{valid:!0,msg:null}}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}filterCollection(t){var e,n;let r=t;if(this.columnEditor&&this.columnEditor.collectionFilterBy){const o=this.columnEditor.collectionFilterBy,s=(n=(e=this.columnEditor.collectionOptions)===null||e===void 0?void 0:e.filterResultAfterEachPass)!==null&&n!==void 0?n:null;r=this._collectionService.filterCollection(r,o,s)}return r}sortCollection(t){let e=t;if(this.columnDef&&this.columnEditor&&this.columnEditor.collectionSortBy){const n=this.columnEditor.collectionSortBy;e=this._collectionService.sortCollection(this.columnDef,e,n,this.enableTranslateLabel)}return e}renderDomElement(t){var e,n,r,o,s;if(!Array.isArray(t)&&(!((e=this.collectionOptions)===null||e===void 0)&&e.collectionInsideObjectProperty)){const c=this.collectionOptions.collectionInsideObjectProperty;t=_n(t,c)}if(!Array.isArray(t))throw new Error('The "collection" passed to the Select Editor is not a valid array.');let l=[];if(t.length>0&&(l=[...t]),!((n=this.collectionOptions)===null||n===void 0)&&n.addBlankEntry&&Array.isArray(l)&&l.length>0&&l[0][this.valueName]!==""&&(l.unshift(this.createBlankEntry()),this.collection.unshift(this.createBlankEntry())),!((r=this.collectionOptions)===null||r===void 0)&&r.addCustomFirstEntry&&Array.isArray(l)&&l.length>0&&l[0][this.valueName]!==this.collectionOptions.addCustomFirstEntry[this.valueName]&&(l.unshift(this.collectionOptions.addCustomFirstEntry),this.collection.unshift(this.collectionOptions.addCustomFirstEntry)),!((o=this.collectionOptions)===null||o===void 0)&&o.addCustomLastEntry&&Array.isArray(l)&&l.length>0){const c=l.length-1;l[c][this.valueName]!==this.collectionOptions.addCustomLastEntry[this.valueName]&&l.push(this.collectionOptions.addCustomLastEntry)}let u=l;if(u=this.filterCollection(u),u=this.sortCollection(u),!((s=this.columnEditor)===null||s===void 0)&&s.collectionOverride){const c={column:this.columnDef,dataContext:this.dataContext,grid:this.grid,originalCollections:this.collection};if(this.args.compositeEditorOptions){const{formValues:p,modalType:m}=this.args.compositeEditorOptions;c.compositeEditorOptions={formValues:p,modalType:m}}u=this.columnEditor.collectionOverride(u,c)}this.finalCollection=u;const h=rm("editor",u,this.columnDef,this.grid,this.isMultipleSelect,this._translaterService);this.createDomElement(h.selectElement,h.dataCollection)}createBlankEntry(){const t={[this.labelName]:"",[this.valueName]:""};return this.labelPrefixName&&(t[this.labelPrefixName]=""),this.labelSuffixName&&(t[this.labelSuffixName]=""),t}createDomElement(t,e){var n,r,o,s,l;const u=this.args.container;t&&u&&typeof u.appendChild=="function"&&(on(u),u.appendChild(t));const h=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.placeholder)!==null&&r!==void 0?r:"";this.defaultOptions.placeholder=h||"";const c=(l=(s=(o=this.columnDef)===null||o===void 0?void 0:o.internalColumnEditor)===null||s===void 0?void 0:s.editorOptions)!==null&&l!==void 0?l:{};this.editorElmOptions={...this.defaultOptions,...c,data:e},this._msInstance=ta(t,this.editorElmOptions),this.editorElm=this._msInstance.getParentElement(),this.isCompositeEditor||(this.delayOpening>=0?setTimeout(()=>this.show()):this.show())}handleChangeOnCompositeEditor(t,e="user",n=!1){var r,o,s,l,u;const h=this.grid.getActiveCell(),c=this.args.column,p=(o=(r=this.columnDef)===null||r===void 0?void 0:r.id)!==null&&o!==void 0?o:"",m=this.dataContext,v=this.grid,_=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,_),this.applyValue(t.formValues,_);const C=(u=(l=(s=this.gridOptions)===null||s===void 0?void 0:s.compositeEditorOptions)===null||l===void 0?void 0:l.excludeDisabledFieldFormValues)!==null&&u!==void 0?u:!1;(n||this.disabled&&C&&t.formValues.hasOwnProperty(p))&&delete t.formValues[p],v.onCompositeEditorChange.notify({...h,item:m,grid:v,column:c,formValues:t.formValues,editors:t.editors,triggeredBy:e},new Slick.EventData)}}class aC extends _v{constructor(t,e=0){super(t,!0,e),this.args=t,this.delayOpening=e}}class dC extends _v{constructor(t,e=0){super(t,!1,e),this.args=t,this.delayOpening=e}}class uC{constructor(t){if(this.args=t,this._defaultValue=0,this._isValueTouched=!1,this._sliderNumberElm=null,this.disabled=!1,!t)throw new Error("[Slickgrid-Universal] Something is wrong with this grid, an Editor must always have valid arguments.");this.grid=t.grid,this.gridOptions=this.grid.getOptions()||{},this._bindEventService=new Nn,this.init()}get columnDef(){return this.args.column}get columnEditor(){return this.columnDef&&this.columnDef.internalColumnEditor||{}}get dataContext(){return this.args.item}get editorDomElement(){return this._editorElm}get editorInputDomElement(){return this._inputElm}get hasAutoCommitEdit(){var t;return(t=this.gridOptions.autoCommitEdit)!==null&&t!==void 0?t:!1}get sliderOptions(){return this._sliderOptions}get validator(){var t,e,n;return(e=(t=this.columnEditor)===null||t===void 0?void 0:t.validator)!==null&&e!==void 0?e:(n=this.columnDef)===null||n===void 0?void 0:n.validator}init(){var t;if(this._cellContainerElm=(t=this.args)===null||t===void 0?void 0:t.container,this._cellContainerElm&&this.columnDef){const e=this.args.compositeEditorOptions;this._editorElm=this.buildDomElement(),e||this.focus(),this._cellContainerElm.appendChild(this._editorElm),this._bindEventService.bind(this._sliderTrackElm,["click","mouseup"],this.sliderTrackClicked.bind(this)),this._bindEventService.bind(this._inputElm,["change","mouseup","touchend"],this.handleChangeEvent.bind(this)),this._bindEventService.bind(this._inputElm,["input","change"],this.handleChangeSliderNumber.bind(this))}}cancel(){this._inputElm&&(this._inputElm.value=`${this._originalValue}`),this.args.cancelChanges()}destroy(){var t,e,n;this._bindEventService.unbindAll(),(t=this._inputElm)===null||t===void 0||t.remove(),(e=this._editorElm)===null||e===void 0||e.remove(),(n=this._sliderTrackElm)===null||n===void 0||n.remove()}disable(t=!0){var e;const n=this.disabled;if(this.disabled=t,this._inputElm)if(t){this._inputElm.disabled=!0;const r=this.getValue();n!==t&&(!((e=this.args)===null||e===void 0)&&e.compositeEditorOptions)&&r!==""&&this.reset(0,!0,!0)}else this._inputElm.disabled=!1}focus(){var t;this.grid.focus(),(t=this._inputElm)===null||t===void 0||t.focus()}show(){var t;!!(!((t=this.args)===null||t===void 0)&&t.compositeEditorOptions)&&this.applyInputUsabilityState()}getValue(){var t,e;return(e=(t=this._inputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:""}setValue(t,e=!1,n=!0){if(this._inputElm&&(this._inputElm.value=`${t}`),this._sliderNumberElm&&(this._sliderNumberElm.textContent=`${t}`),e){this.applyValue(this.args.item,this.serializeValue());const r=this.args.compositeEditorOptions;r&&n&&this.handleChangeOnCompositeEditor(null,r,"system")}}applyValue(t,e){var n,r,o,s,l;const u=(r=(n=this.columnDef)===null||n===void 0?void 0:n.field)!==null&&r!==void 0?r:"";if(u!==void 0){const h=(u==null?void 0:u.indexOf("."))>0,c=this.validate(void 0,e),p=c&&c.valid?e:"";if(h){const m=(l=(s=(o=this.columnEditor)===null||o===void 0?void 0:o.complexObjectPath)!==null&&s!==void 0?s:u)!==null&&l!==void 0?l:"";cr(t,m,p)}else t&&(t[u]=p)}}isValueChanged(){var t,e;const n=(e=(t=this._inputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:"";return!(n===""&&this._originalValue===void 0)&&+n!==this._originalValue}isValueTouched(){return this._isValueTouched}loadValue(t){var e,n;const r=(n=(e=this.columnDef)===null||e===void 0?void 0:e.field)!==null&&n!==void 0?n:"";if(t&&r!==void 0){let s=(r==null?void 0:r.indexOf("."))>0?_n(t,r):t.hasOwnProperty(r)?t[r]:this._defaultValue;(s===""||s===null||s===void 0)&&(s=this._defaultValue),this._originalValue=+s,this._inputElm&&(this._inputElm.value=`${s}`,this._inputElm.title=`${s}`),this._sliderNumberElm&&(this._sliderNumberElm.textContent=`${s}`)}this.updateTrackFilledColorWhenEnabled()}reset(t,e=!0,n=!1){var r;const o=(r=t??this._originalValue)!==null&&r!==void 0?r:0;this._inputElm&&(this._inputElm.value=`${o}`),this._sliderNumberElm&&(this._sliderNumberElm.textContent=`${o}`),this._isValueTouched=!1;const s=this.args.compositeEditorOptions;if(s&&e){const l=!n;this.handleChangeOnCompositeEditor(null,s,"user",l)}}save(){const t=this.validate(),e=t&&t.valid||!1;this.hasAutoCommitEdit&&e?this.grid.getEditorLock().commitCurrentEdit():this.args.commitChanges()}serializeValue(){var t,e;const n=(e=(t=this._inputElm)===null||t===void 0?void 0:t.value)!==null&&e!==void 0?e:"";return n!==""?parseInt(n,10):this._originalValue}validate(t,e){var n,r;if(this.args.compositeEditorOptions&&this.applyInputUsabilityState(),this.disabled)return{valid:!0,msg:""};const o=e!==void 0?e:(n=this._inputElm)===null||n===void 0?void 0:n.value;return tC(o,{editorArgs:this.args,errorMessage:this.columnEditor.errorMessage,minValue:this.columnEditor.minValue,maxValue:this.columnEditor.maxValue,required:!((r=this.args)===null||r===void 0)&&r.compositeEditorOptions?!1:this.columnEditor.required,validator:this.validator})}buildDomElement(){var t,e,n,r,o,s,l,u,h,c,p,m,v,_,C;const x=(e=(t=this.columnDef)===null||t===void 0?void 0:t.id)!==null&&e!==void 0?e:"",S=(r=(n=this.columnEditor)===null||n===void 0?void 0:n.title)!==null&&r!==void 0?r:"",E=+((s=(o=this.columnEditor)===null||o===void 0?void 0:o.minValue)!==null&&s!==void 0?s:je.SLIDER_DEFAULT_MIN_VALUE),D=+((u=(l=this.columnEditor)===null||l===void 0?void 0:l.maxValue)!==null&&u!==void 0?u:je.SLIDER_DEFAULT_MAX_VALUE),A=+((c=(h=this.columnEditor)===null||h===void 0?void 0:h.valueStep)!==null&&c!==void 0?c:je.SLIDER_DEFAULT_STEP),P=(p=Sl(this.columnEditor,"sliderStartValue"))!==null&&p!==void 0?p:E;this._defaultValue=+P,this._sliderTrackElm=Re("div",{className:"slider-track"}),this._inputElm=Re("input",{type:"range",title:S,defaultValue:`${P}`,value:`${P}`,min:`${E}`,max:`${D}`,step:`${(v=(m=this.columnEditor)===null||m===void 0?void 0:m.valueStep)!==null&&v!==void 0?v:je.SLIDER_DEFAULT_STEP}`,ariaLabel:(C=(_=this.columnEditor)===null||_===void 0?void 0:_.ariaLabel)!==null&&C!==void 0?C:`${qr(x+"")} Slider Editor`,className:`slider-editor-input editor-${x}`});const M=Re("div",{className:"slider-container slider-editor"}),B=Re("div",{className:"slider-input-container slider-editor"});if(B.appendChild(this._sliderTrackElm),B.appendChild(this._inputElm),M.appendChild(B),!Sl(this.columnEditor,"hideSliderNumber")){M.classList.add("input-group");const Z=Re("div",{className:"input-group-addon input-group-append slider-value"});this._sliderNumberElm=Re("span",{className:"input-group-text",textContent:`${P}`}),Z.appendChild(this._sliderNumberElm),M.appendChild(Z)}return this._sliderOptions={minValue:E,maxValue:D,step:A},M}applyInputUsabilityState(){const t=this.grid.getActiveCell(),e=this.grid.onBeforeEditCell.notify({...t,item:this.dataContext,column:this.args.column,grid:this.grid,target:"composite",compositeEditorOptions:this.args.compositeEditorOptions}).getReturnValue();this.disable(e===!1)}handleChangeEvent(t){this._isValueTouched=!0;const e=this.args.compositeEditorOptions;e?this.handleChangeOnCompositeEditor(t,e):this.save()}handleChangeSliderNumber(t){var e,n,r;const o=(n=(e=t.target)===null||e===void 0?void 0:e.value)!==null&&n!==void 0?n:"";o!==""&&(!Sl(this.columnEditor,"hideSliderNumber")&&this._sliderNumberElm&&(this._sliderNumberElm.textContent=o),this._inputElm.title=o,!((r=this.args)===null||r===void 0)&&r.compositeEditorOptions||this.grid.onMouseEnter.notify({grid:this.grid},{...new Slick.EventData,target:t==null?void 0:t.target})),this.updateTrackFilledColorWhenEnabled()}handleChangeOnCompositeEditor(t,e,n="user",r=!1){var o,s,l,u,h;const c=this.grid.getActiveCell(),p=this.args.column,m=(s=(o=this.columnDef)===null||o===void 0?void 0:o.id)!==null&&s!==void 0?s:"",v=this.dataContext,_=this.grid,C=this.serializeValue();this.validate().valid&&this.applyValue(this.dataContext,C),this.applyValue(e.formValues,C);const x=(h=(u=(l=this.gridOptions)===null||l===void 0?void 0:l.compositeEditorOptions)===null||u===void 0?void 0:u.excludeDisabledFieldFormValues)!==null&&h!==void 0?h:!1;(r||this.disabled&&x&&e.formValues.hasOwnProperty(m))&&delete e.formValues[m],_.onCompositeEditorChange.notify({...c,item:v,grid:_,column:p,formValues:e.formValues,editors:e.editors,triggeredBy:n},{...new Slick.EventData,...t})}sliderTrackClicked(t){t.preventDefault();const e=t.offsetX,n=this._sliderTrackElm.offsetWidth,r=(e+0)*100/n;this._inputElm&&(this._inputElm.value=`${r}`,this._inputElm.dispatchEvent(new Event("change")))}updateTrackFilledColorWhenEnabled(){var t,e,n;if(Sl(this.columnEditor,"enableSliderTrackColoring")&&this._inputElm){const o=(+this.getValue()-+this._inputElm.min)/((e=(t=this.sliderOptions)===null||t===void 0?void 0:t.maxValue)!==null&&e!==void 0?e:0-+this._inputElm.min)*100,s="linear-gradient(to right, %b %p1, %c %p1, %c %p2, %b %p2)".replace(/%b/g,"#eee").replace(/%c/g,(n=Sl(this.columnEditor,"sliderTrackFilledColor"))!==null&&n!==void 0?n:"var(--slick-slider-filter-thumb-color, #86bff8)").replace(/%p1/g,"0%").replace(/%p2/g,`${o}%`);this._sliderTrackElm.style.background=s,this._sliderOptions.sliderTrackBackground=s}}}const mf={autocompleter:Zb,checkbox:Qb,date:eC,dualInput:iC,float:rC,integer:sC,longText:lC,multipleSelect:aC,password:oC,singleSelect:dC,slider:uC,text:zu},cC=(a,t,e)=>{let n=e;return e==null&&(n=""),`<div style="float: right">${n}</div>`},hC=(a,t,e,n,r)=>{var o;const s=n&&n.params||{},l=s.propertyNames,u=(o=s==null?void 0:s.includeTitle)!==null&&o!==void 0?o:!0;let h=s.dataContextProperty;if(h||(h=n&&n.field&&n.field.split(".")[0]),!l||!Array.isArray(l)||!h)throw new Error(`Formatters.arrayObjectToCsv requires you to pass an array of "propertyNames" (declared in "params") that you want to pull the data from.
@@ -54,7 +54,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
54
54
  * Released under MIT license <https://lodash.com/license>
55
55
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
56
56
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
57
- */hd.exports;var xv;function qC(){return xv||(xv=1,function(a,t){(function(){var e,n="4.17.21",r=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,c="__lodash_placeholder__",p=1,m=2,v=4,_=1,C=2,x=1,S=2,E=4,D=8,A=16,P=32,M=64,B=128,Z=256,L=512,ae=30,_e="...",J=800,U=16,F=1,de=2,qe=3,Ie=1/0,xe=9007199254740991,Oe=17976931348623157e292,De=0/0,ne=4294967295,pe=ne-1,Ve=ne>>>1,Ye=[["ary",B],["bind",x],["bindKey",S],["curry",D],["curryRight",A],["flip",L],["partial",P],["partialRight",M],["rearg",Z]],ze="[object Arguments]",ce="[object Array]",Ce="[object AsyncFunction]",be="[object Boolean]",He="[object Date]",ot="[object DOMException]",Ue="[object Error]",St="[object Function]",ct="[object GeneratorFunction]",k="[object Map]",ee="[object Number]",ge="[object Null]",$="[object Object]",X="[object Promise]",re="[object Proxy]",Pe="[object RegExp]",Fe="[object Set]",me="[object String]",We="[object Symbol]",mt="[object Undefined]",Ge="[object WeakMap]",Le="[object WeakSet]",jt="[object ArrayBuffer]",It="[object DataView]",bi="[object Float32Array]",q="[object Float64Array]",W="[object Int8Array]",ve="[object Int16Array]",ke="[object Int32Array]",at="[object Uint8Array]",st="[object Uint8ClampedArray]",ht="[object Uint16Array]",Dt="[object Uint32Array]",Lt=/\b__p \+= '';/g,Ot=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kt=/&(?:amp|lt|gt|quot|#39);/g,Fi=/[&<>"']/g,Mi=RegExp(Kt.source),z=RegExp(Fi.source),Q=/<%-([\s\S]+?)%>/g,he=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wt=/[\\^$.*+?()[\]{}|]/g,Ht=RegExp(wt.source),Et=/^\s+/,gt=/\s/,ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ai=/\{\n\/\* \[wrapped with (.+)\] \*/,zi=/,? & /,Zt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ni=/[()=,{}\[\]\/\s]/,Bn=/\\(\\)?/g,fn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ct=/\w*$/,Se=/^[-+]0x[0-9a-f]+$/i,Xe=/^0b[01]+$/i,xt=/^\[object .+?Constructor\]$/,ti=/^0o[0-7]+$/i,Ui=/^(?:0|[1-9]\d*)$/,Gi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Li=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Wn="\\ud800-\\udfff",qt="\\u0300-\\u036f",Wi="\\ufe20-\\ufe2f",lr="\\u20d0-\\u20ff",bo=qt+Wi+lr,er="\\u2700-\\u27bf",tr="a-z\\xdf-\\xf6\\xf8-\\xff",Co="\\xac\\xb1\\xd7\\xf7",mr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ar="\\u2000-\\u206f",Sr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$n="A-Z\\xc0-\\xd6\\xd8-\\xde",Vn="\\ufe0e\\ufe0f",di=Co+mr+ar+Sr,zn="['’]",to="["+Wn+"]",yo="["+di+"]",mn="["+bo+"]",ir="\\d+",vr="["+er+"]",gr="["+tr+"]",se="[^"+Wn+di+ir+er+tr+$n+"]",ue="\\ud83c[\\udffb-\\udfff]",ye="(?:"+mn+"|"+ue+")",$e="[^"+Wn+"]",Je="(?:\\ud83c[\\udde6-\\uddff]){2}",dt="[\\ud800-\\udbff][\\udc00-\\udfff]",At="["+$n+"]",Bt="\\u200d",ui="(?:"+gr+"|"+se+")",Ci="(?:"+At+"|"+se+")",Ei="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",yn="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Yn=ye+"?",jn="["+Vn+"]?",Xn="(?:"+Bt+"(?:"+[$e,Je,dt].join("|")+")"+jn+Yn+")*",io="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_r="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Eo=jn+Yn+Xn,Hi="(?:"+[vr,Je,dt].join("|")+")"+Eo,Oi="(?:"+[$e+mn+"?",mn,Je,dt,to].join("|")+")",Br=RegExp(zn,"g"),Cs=RegExp(mn,"g"),So=RegExp(ue+"(?="+ue+")|"+Oi+Eo,"g"),qs=RegExp([At+"?"+gr+"+"+Ei+"(?="+[yo,At,"$"].join("|")+")",Ci+"+"+yn+"(?="+[yo,At+ui,"$"].join("|")+")",At+"?"+ui+"+"+Ei,At+"+"+yn,_r,io,ir,Hi].join("|"),"g"),ys=RegExp("["+Bt+Wn+bo+Vn+"]"),ia=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Es=-1,ki={};ki[bi]=ki[q]=ki[W]=ki[ve]=ki[ke]=ki[at]=ki[st]=ki[ht]=ki[Dt]=!0,ki[ze]=ki[ce]=ki[jt]=ki[be]=ki[It]=ki[He]=ki[Ue]=ki[St]=ki[k]=ki[ee]=ki[$]=ki[Pe]=ki[Fe]=ki[me]=ki[Ge]=!1;var vi={};vi[ze]=vi[ce]=vi[jt]=vi[It]=vi[be]=vi[He]=vi[bi]=vi[q]=vi[W]=vi[ve]=vi[ke]=vi[k]=vi[ee]=vi[$]=vi[Pe]=vi[Fe]=vi[me]=vi[We]=vi[at]=vi[st]=vi[ht]=vi[Dt]=!0,vi[Ue]=vi[St]=vi[Ge]=!1;var wo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},xo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ss={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ks=parseFloat,es=parseInt,ws=typeof Pr=="object"&&Pr&&Pr.Object===Object&&Pr,kt=typeof self=="object"&&self&&self.Object===Object&&self,qi=ws||kt||Function("return this")(),wr=t&&!t.nodeType&&t,Ho=wr&&!0&&a&&!a.nodeType&&a,Tl=Ho&&Ho.exports===wr,no=Tl&&ws.process,qn=function(){try{var oe=Ho&&Ho.require&&Ho.require("util").types;return oe||no&&no.binding&&no.binding("util")}catch{}}(),Zs=qn&&qn.isArrayBuffer,xr=qn&&qn.isDate,Ol=qn&&qn.isMap,xs=qn&&qn.isRegExp,Al=qn&&qn.isSet,Ts=qn&&qn.isTypedArray;function nn(oe,Ne,Me){switch(Me.length){case 0:return oe.call(Ne);case 1:return oe.call(Ne,Me[0]);case 2:return oe.call(Ne,Me[0],Me[1]);case 3:return oe.call(Ne,Me[0],Me[1],Me[2])}return oe.apply(Ne,Me)}function To(oe,Ne,Me,_t){for(var Xt=-1,Si=oe==null?0:oe.length;++Xt<Si;){var kn=oe[Xt];Ne(_t,kn,Me(kn),oe)}return _t}function rn(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length;++Me<_t&&Ne(oe[Me],Me,oe)!==!1;);return oe}function Kn(oe,Ne){for(var Me=oe==null?0:oe.length;Me--&&Ne(oe[Me],Me,oe)!==!1;);return oe}function Oo(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length;++Me<_t;)if(!Ne(oe[Me],Me,oe))return!1;return!0}function Ft(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length,Xt=0,Si=[];++Me<_t;){var kn=oe[Me];Ne(kn,Me,oe)&&(Si[Xt++]=kn)}return Si}function Qs(oe,Ne){var Me=oe==null?0:oe.length;return!!Me&&R(oe,Ne,0)>-1}function Js(oe,Ne,Me){for(var _t=-1,Xt=oe==null?0:oe.length;++_t<Xt;)if(Me(Ne,oe[_t]))return!0;return!1}function $i(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length,Xt=Array(_t);++Me<_t;)Xt[Me]=Ne(oe[Me],Me,oe);return Xt}function Un(oe,Ne){for(var Me=-1,_t=Ne.length,Xt=oe.length;++Me<_t;)oe[Xt+Me]=Ne[Me];return oe}function Ao(oe,Ne,Me,_t){var Xt=-1,Si=oe==null?0:oe.length;for(_t&&Si&&(Me=oe[++Xt]);++Xt<Si;)Me=Ne(Me,oe[Xt],Xt,oe);return Me}function fd(oe,Ne,Me,_t){var Xt=oe==null?0:oe.length;for(_t&&Xt&&(Me=oe[--Xt]);Xt--;)Me=Ne(Me,oe[Xt],Xt,oe);return Me}function Os(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length;++Me<_t;)if(Ne(oe[Me],Me,oe))return!0;return!1}var ts=Be("length");function el(oe){return oe.split("")}function hi(oe){return oe.match(Zt)||[]}function g(oe,Ne,Me){var _t;return Me(oe,function(Xt,Si,kn){if(Ne(Xt,Si,kn))return _t=Si,!1}),_t}function w(oe,Ne,Me,_t){for(var Xt=oe.length,Si=Me+(_t?1:-1);_t?Si--:++Si<Xt;)if(Ne(oe[Si],Si,oe))return Si;return-1}function R(oe,Ne,Me){return Ne===Ne?Tf(oe,Ne,Me):w(oe,te,Me)}function H(oe,Ne,Me,_t){for(var Xt=Me-1,Si=oe.length;++Xt<Si;)if(_t(oe[Xt],Ne))return Xt;return-1}function te(oe){return oe!==oe}function we(oe,Ne){var Me=oe==null?0:oe.length;return Me?Vt(oe,Ne)/Me:De}function Be(oe){return function(Ne){return Ne==null?e:Ne[oe]}}function Ke(oe){return function(Ne){return oe==null?e:oe[Ne]}}function yt(oe,Ne,Me,_t,Xt){return Xt(oe,function(Si,kn,Bi){Me=_t?(_t=!1,Si):Ne(Me,Si,kn,Bi)}),Me}function ft(oe,Ne){var Me=oe.length;for(oe.sort(Ne);Me--;)oe[Me]=oe[Me].value;return oe}function Vt(oe,Ne){for(var Me,_t=-1,Xt=oe.length;++_t<Xt;){var Si=Ne(oe[_t]);Si!==e&&(Me=Me===e?Si:Me+Si)}return Me}function Mt(oe,Ne){for(var Me=-1,_t=Array(oe);++Me<oe;)_t[Me]=Ne(Me);return _t}function Ki(oe,Ne){return $i(Ne,function(Me){return[Me,oe[Me]]})}function ln(oe){return oe&&oe.slice(0,gd(oe)+1).replace(Et,"")}function Zi(oe){return function(Ne){return oe(Ne)}}function is(oe,Ne){return $i(Ne,function(Me){return oe[Me]})}function As(oe,Ne){return oe.has(Ne)}function ns(oe,Ne){for(var Me=-1,_t=oe.length;++Me<_t&&R(Ne,oe[Me],0)>-1;);return Me}function pd(oe,Ne){for(var Me=oe.length;Me--&&R(Ne,oe[Me],0)>-1;);return Me}function ju(oe,Ne){for(var Me=oe.length,_t=0;Me--;)oe[Me]===Ne&&++_t;return _t}var md=Ke(wo),Xu=Ke(xo);function wf(oe){return"\\"+xl[oe]}function qu(oe,Ne){return oe==null?e:oe[Ne]}function tl(oe){return ys.test(oe)}function xf(oe){return ia.test(oe)}function Ku(oe){for(var Ne,Me=[];!(Ne=oe.next()).done;)Me.push(Ne.value);return Me}function vd(oe){var Ne=-1,Me=Array(oe.size);return oe.forEach(function(_t,Xt){Me[++Ne]=[Xt,_t]}),Me}function kl(oe,Ne){return function(Me){return oe(Ne(Me))}}function rs(oe,Ne){for(var Me=-1,_t=oe.length,Xt=0,Si=[];++Me<_t;){var kn=oe[Me];(kn===Ne||kn===c)&&(oe[Me]=c,Si[Xt++]=Me)}return Si}function ks(oe){var Ne=-1,Me=Array(oe.size);return oe.forEach(function(_t){Me[++Ne]=_t}),Me}function na(oe){var Ne=-1,Me=Array(oe.size);return oe.forEach(function(_t){Me[++Ne]=[_t,_t]}),Me}function Tf(oe,Ne,Me){for(var _t=Me-1,Xt=oe.length;++_t<Xt;)if(oe[_t]===Ne)return _t;return-1}function ra(oe,Ne,Me){for(var _t=Me+1;_t--;)if(oe[_t]===Ne)return _t;return _t}function os(oe){return tl(oe)?Zu(oe):ts(oe)}function ro(oe){return tl(oe)?Af(oe):el(oe)}function gd(oe){for(var Ne=oe.length;Ne--&&gt.test(oe.charAt(Ne)););return Ne}var Of=Ke(Ss);function Zu(oe){for(var Ne=So.lastIndex=0;So.test(oe);)++Ne;return Ne}function Af(oe){return oe.match(So)||[]}function kf(oe){return oe.match(qs)||[]}var _d=function oe(Ne){Ne=Ne==null?qi:Is.defaults(qi.Object(),Ne,Is.pick(qi,Jo));var Me=Ne.Array,_t=Ne.Date,Xt=Ne.Error,Si=Ne.Function,kn=Ne.Math,Bi=Ne.Object,il=Ne.RegExp,If=Ne.String,Tr=Ne.TypeError,oa=Me.prototype,Df=Si.prototype,ss=Bi.prototype,Il=Ne["__core-js_shared__"],Ds=Df.toString,Di=ss.hasOwnProperty,Qu=0,Ju=function(){var d=/[^.]+$/.exec(Il&&Il.keys&&Il.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),sa=ss.toString,ec=Ds.call(Bi),Rf=qi._,Pf=il("^"+Ds.call(Di).replace(wt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=Tl?Ne.Buffer:e,nr=Ne.Symbol,In=Ne.Uint8Array,tc=Ri?Ri.allocUnsafe:e,la=kl(Bi.getPrototypeOf,Bi),nl=Bi.create,ic=ss.propertyIsEnumerable,aa=oa.splice,bd=nr?nr.isConcatSpreadable:e,Dl=nr?nr.iterator:e,Rs=nr?nr.toStringTag:e,da=function(){try{var d=Ll(Bi,"defineProperty");return d({},"",{}),d}catch{}}(),Cd=Ne.clearTimeout!==qi.clearTimeout&&Ne.clearTimeout,ua=_t&&_t.now!==qi.Date.now&&_t.now,Bo=Ne.setTimeout!==qi.setTimeout&&Ne.setTimeout,ca=kn.ceil,Ps=kn.floor,ha=Bi.getOwnPropertySymbols,fa=Ri?Ri.isBuffer:e,nc=Ne.isFinite,pa=oa.join,rc=kl(Bi.keys,Bi),Dn=kn.max,vn=kn.min,Ff=_t.now,Mf=Ne.parseInt,Rl=kn.random,oc=oa.reverse,ma=Ll(Ne,"DataView"),Vo=Ll(Ne,"Map"),yd=Ll(Ne,"Promise"),ls=Ll(Ne,"Set"),rl=Ll(Ne,"WeakMap"),ol=Ll(Bi,"create"),Or=rl&&new rl,sl={},va=Hl(ma),ga=Hl(Vo),sc=Hl(yd),_a=Hl(ls),Nf=Hl(rl),Pl=nr?nr.prototype:e,Fs=Pl?Pl.valueOf:e,Ed=Pl?Pl.toString:e;function G(d){if(An(d)&&!ri(d)&&!(d instanceof fi)){if(d instanceof Qi)return d;if(Di.call(d,"__wrapped__"))return vg(d)}return new Qi(d)}var as=function(){function d(){}return function(f){if(!Sn(f))return{};if(nl)return nl(f);d.prototype=f;var b=new d;return d.prototype=e,b}}();function ba(){}function Qi(d,f){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}G.templateSettings={escape:Q,evaluate:he,interpolate:Ee,variable:"",imports:{_:G}},G.prototype=ba.prototype,G.prototype.constructor=G,Qi.prototype=as(ba.prototype),Qi.prototype.constructor=Qi;function fi(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ne,this.__views__=[]}function lc(){var d=new fi(this.__wrapped__);return d.__actions__=$r(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=$r(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=$r(this.__views__),d}function ac(){if(this.__filtered__){var d=new fi(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function Lf(){var d=this.__wrapped__.value(),f=this.__dir__,b=ri(d),O=f<0,N=b?d.length:0,K=Dy(0,N,this.__views__),le=K.start,fe=K.end,Ae=fe-le,Ze=O?fe:le-1,Qe=this.__iteratees__,et=Qe.length,Tt=0,Pt=vn(Ae,this.__takeCount__);if(!b||!O&&N==Ae&&Pt==Ae)return Yi(d,this.__actions__);var $t=[];e:for(;Ae--&&Tt<Pt;){Ze+=f;for(var ci=-1,Yt=d[Ze];++ci<et;){var gi=Qe[ci],wi=gi.iteratee,uo=gi.type,Rr=wi(Yt);if(uo==de)Yt=Rr;else if(!Rr){if(uo==F)continue e;break e}}$t[Tt++]=Yt}return $t}fi.prototype=as(ba.prototype),fi.prototype.constructor=fi;function Ar(d){var f=-1,b=d==null?0:d.length;for(this.clear();++f<b;){var O=d[f];this.set(O[0],O[1])}}function dc(){this.__data__=ol?ol(null):{},this.size=0}function Hf(d){var f=this.has(d)&&delete this.__data__[d];return this.size-=f?1:0,f}function uc(d){var f=this.__data__;if(ol){var b=f[d];return b===u?e:b}return Di.call(f,d)?f[d]:e}function cc(d){var f=this.__data__;return ol?f[d]!==e:Di.call(f,d)}function Sd(d,f){var b=this.__data__;return this.size+=this.has(d)?0:1,b[d]=ol&&f===e?u:f,this}Ar.prototype.clear=dc,Ar.prototype.delete=Hf,Ar.prototype.get=uc,Ar.prototype.has=cc,Ar.prototype.set=Sd;function zo(d){var f=-1,b=d==null?0:d.length;for(this.clear();++f<b;){var O=d[f];this.set(O[0],O[1])}}function Bf(){this.__data__=[],this.size=0}function hc(d){var f=this.__data__,b=Ca(f,d);if(b<0)return!1;var O=f.length-1;return b==O?f.pop():aa.call(f,b,1),--this.size,!0}function Vf(d){var f=this.__data__,b=Ca(f,d);return b<0?e:f[b][1]}function zf(d){return Ca(this.__data__,d)>-1}function fc(d,f){var b=this.__data__,O=Ca(b,d);return O<0?(++this.size,b.push([d,f])):b[O][1]=f,this}zo.prototype.clear=Bf,zo.prototype.delete=hc,zo.prototype.get=Vf,zo.prototype.has=zf,zo.prototype.set=fc;function Uo(d){var f=-1,b=d==null?0:d.length;for(this.clear();++f<b;){var O=d[f];this.set(O[0],O[1])}}function Uf(){this.size=0,this.__data__={hash:new Ar,map:new(Vo||zo),string:new Ar}}function Gf(d){var f=Gc(this,d).delete(d);return this.size-=f?1:0,f}function Wf(d){return Gc(this,d).get(d)}function ll(d){return Gc(this,d).has(d)}function pc(d,f){var b=Gc(this,d),O=b.size;return b.set(d,f),this.size+=b.size==O?0:1,this}Uo.prototype.clear=Uf,Uo.prototype.delete=Gf,Uo.prototype.get=Wf,Uo.prototype.has=ll,Uo.prototype.set=pc;function ds(d){var f=-1,b=d==null?0:d.length;for(this.__data__=new Uo;++f<b;)this.add(d[f])}function mc(d){return this.__data__.set(d,u),this}function vc(d){return this.__data__.has(d)}ds.prototype.add=ds.prototype.push=mc,ds.prototype.has=vc;function Vr(d){var f=this.__data__=new zo(d);this.size=f.size}function $f(){this.__data__=new zo,this.size=0}function Yf(d){var f=this.__data__,b=f.delete(d);return this.size=f.size,b}function gc(d){return this.__data__.get(d)}function _c(d){return this.__data__.has(d)}function bc(d,f){var b=this.__data__;if(b instanceof zo){var O=b.__data__;if(!Vo||O.length<r-1)return O.push([d,f]),this.size=++b.size,this;b=this.__data__=new Uo(O)}return b.set(d,f),this.size=b.size,this}Vr.prototype.clear=$f,Vr.prototype.delete=Yf,Vr.prototype.get=gc,Vr.prototype.has=_c,Vr.prototype.set=bc;function wd(d,f){var b=ri(d),O=!b&&Bl(d),N=!b&&!O&&fl(d),K=!b&&!O&&!N&&Pa(d),le=b||O||N||K,fe=le?Mt(d.length,If):[],Ae=fe.length;for(var Ze in d)(f||Di.call(d,Ze))&&!(le&&(Ze=="length"||N&&(Ze=="offset"||Ze=="parent")||K&&(Ze=="buffer"||Ze=="byteLength"||Ze=="byteOffset")||Hs(Ze,Ae)))&&fe.push(Ze);return fe}function xd(d){var f=d.length;return f?d[Hd(0,f-1)]:e}function Cc(d,f){return Wc($r(d),Ur(f,0,d.length))}function Td(d){return Wc($r(d))}function Fl(d,f,b){(b!==e&&!Yo(d[f],b)||b===e&&!(f in d))&&zr(d,f,b)}function al(d,f,b){var O=d[f];(!(Di.call(d,f)&&Yo(O,b))||b===e&&!(f in d))&&zr(d,f,b)}function Ca(d,f){for(var b=d.length;b--;)if(Yo(d[b][0],f))return b;return-1}function Od(d,f,b,O){return Zn(d,function(N,K,le){f(O,N,b(N),le)}),O}function dl(d,f){return d&&us(f,rr(f),d)}function jf(d,f){return d&&us(f,jr(f),d)}function zr(d,f,b){f=="__proto__"&&da?da(d,f,{configurable:!0,enumerable:!0,value:b,writable:!0}):d[f]=b}function Go(d,f){for(var b=-1,O=f.length,N=Me(O),K=d==null;++b<O;)N[b]=K?e:gp(d,f[b]);return N}function Ur(d,f,b){return d===d&&(b!==e&&(d=d<=b?d:b),f!==e&&(d=d>=f?d:f)),d}function kr(d,f,b,O,N,K){var le,fe=f&p,Ae=f&m,Ze=f&v;if(b&&(le=N?b(d,O,N,K):b(d)),le!==e)return le;if(!Sn(d))return d;var Qe=ri(d);if(Qe){if(le=Py(d),!fe)return $r(d,le)}else{var et=br(d),Tt=et==St||et==ct;if(fl(d))return Uv(d,fe);if(et==$||et==ze||Tt&&!N){if(le=Ae||Tt?{}:lg(d),!fe)return Ae?Ey(d,jf(le,d)):yy(d,dl(le,d))}else{if(!vi[et])return N?d:{};le=Fy(d,et,fe)}}K||(K=new Vr);var Pt=K.get(d);if(Pt)return Pt;K.set(d,le),Ng(d)?d.forEach(function(Yt){le.add(kr(Yt,f,b,Yt,d,K))}):Fg(d)&&d.forEach(function(Yt,gi){le.set(gi,kr(Yt,f,b,gi,d,K))});var $t=Ze?Ae?np:ip:Ae?jr:rr,ci=Qe?e:$t(d);return rn(ci||d,function(Yt,gi){ci&&(gi=Yt,Yt=d[gi]),al(le,gi,kr(Yt,f,b,gi,d,K))}),le}function Xf(d){var f=rr(d);return function(b){return Wo(b,d,f)}}function Wo(d,f,b){var O=b.length;if(d==null)return!O;for(d=Bi(d);O--;){var N=b[O],K=f[N],le=d[N];if(le===e&&!(N in d)||!K(le))return!1}return!0}function yc(d,f,b){if(typeof d!="function")throw new Tr(s);return Wd(function(){d.apply(e,b)},f)}function ul(d,f,b,O){var N=-1,K=Qs,le=!0,fe=d.length,Ae=[],Ze=f.length;if(!fe)return Ae;b&&(f=$i(f,Zi(b))),O?(K=Js,le=!1):f.length>=r&&(K=As,le=!1,f=new ds(f));e:for(;++N<fe;){var Qe=d[N],et=b==null?Qe:b(Qe);if(Qe=O||Qe!==0?Qe:0,le&&et===et){for(var Tt=Ze;Tt--;)if(f[Tt]===et)continue e;Ae.push(Qe)}else K(f,et,O)||Ae.push(Qe)}return Ae}var Zn=jv(oo),Ml=jv(kd,!0);function Ec(d,f){var b=!0;return Zn(d,function(O,N,K){return b=!!f(O,N,K),b}),b}function Nl(d,f,b){for(var O=-1,N=d.length;++O<N;){var K=d[O],le=f(K);if(le!=null&&(fe===e?le===le&&!ao(le):b(le,fe)))var fe=le,Ae=K}return Ae}function ya(d,f,b,O){var N=d.length;for(b=li(b),b<0&&(b=-b>N?0:N+b),O=O===e||O>N?N:li(O),O<0&&(O+=N),O=b>O?0:Hg(O);b<O;)d[b++]=f;return d}function Ad(d,f){var b=[];return Zn(d,function(O,N,K){f(O,N,K)&&b.push(O)}),b}function Qn(d,f,b,O,N){var K=-1,le=d.length;for(b||(b=Ny),N||(N=[]);++K<le;){var fe=d[K];f>0&&b(fe)?f>1?Qn(fe,f-1,b,O,N):Un(N,fe):O||(N[N.length]=fe)}return N}var Ea=Xv(),Sc=Xv(!0);function oo(d,f){return d&&Ea(d,f,rr)}function kd(d,f){return d&&Sc(d,f,rr)}function Sa(d,f){return Ft(f,function(b){return Bs(d[b])})}function Ms(d,f){f=gn(f,d);for(var b=0,O=f.length;d!=null&&b<O;)d=d[cs(f[b++])];return b&&b==O?d:e}function wa(d,f,b){var O=f(d);return ri(d)?O:Un(O,b(d))}function dr(d){return d==null?d===e?mt:ge:Rs&&Rs in Bi(d)?Iy(d):Gy(d)}function xa(d,f){return d>f}function wc(d,f){return d!=null&&Di.call(d,f)}function xc(d,f){return d!=null&&f in Bi(d)}function Tc(d,f,b){return d>=vn(f,b)&&d<Dn(f,b)}function Ta(d,f,b){for(var O=b?Js:Qs,N=d[0].length,K=d.length,le=K,fe=Me(K),Ae=1/0,Ze=[];le--;){var Qe=d[le];le&&f&&(Qe=$i(Qe,Zi(f))),Ae=vn(Qe.length,Ae),fe[le]=!b&&(f||N>=120&&Qe.length>=120)?new ds(le&&Qe):e}Qe=d[0];var et=-1,Tt=fe[0];e:for(;++et<N&&Ze.length<Ae;){var Pt=Qe[et],$t=f?f(Pt):Pt;if(Pt=b||Pt!==0?Pt:0,!(Tt?As(Tt,$t):O(Ze,$t,b))){for(le=K;--le;){var ci=fe[le];if(!(ci?As(ci,$t):O(d[le],$t,b)))continue e}Tt&&Tt.push($t),Ze.push(Pt)}}return Ze}function Oc(d,f,b,O){return oo(d,function(N,K,le){f(O,b(N),K,le)}),O}function Gr(d,f,b){f=gn(f,d),d=cg(d,f);var O=d==null?d:d[cs(ko(f))];return O==null?e:nn(O,d,b)}function Oa(d){return An(d)&&dr(d)==ze}function Ac(d){return An(d)&&dr(d)==jt}function Id(d){return An(d)&&dr(d)==He}function cl(d,f,b,O,N){return d===f?!0:d==null||f==null||!An(d)&&!An(f)?d!==d&&f!==f:qf(d,f,b,O,cl,N)}function qf(d,f,b,O,N,K){var le=ri(d),fe=ri(f),Ae=le?ce:br(d),Ze=fe?ce:br(f);Ae=Ae==ze?$:Ae,Ze=Ze==ze?$:Ze;var Qe=Ae==$,et=Ze==$,Tt=Ae==Ze;if(Tt&&fl(d)){if(!fl(f))return!1;le=!0,Qe=!1}if(Tt&&!Qe)return K||(K=new Vr),le||Pa(d)?rg(d,f,b,O,N,K):Ay(d,f,Ae,b,O,N,K);if(!(b&_)){var Pt=Qe&&Di.call(d,"__wrapped__"),$t=et&&Di.call(f,"__wrapped__");if(Pt||$t){var ci=Pt?d.value():d,Yt=$t?f.value():f;return K||(K=new Vr),N(ci,Yt,b,O,K)}}return Tt?(K||(K=new Vr),ky(d,f,b,O,N,K)):!1}function Kf(d){return An(d)&&br(d)==k}function Dd(d,f,b,O){var N=b.length,K=N,le=!O;if(d==null)return!K;for(d=Bi(d);N--;){var fe=b[N];if(le&&fe[2]?fe[1]!==d[fe[0]]:!(fe[0]in d))return!1}for(;++N<K;){fe=b[N];var Ae=fe[0],Ze=d[Ae],Qe=fe[1];if(le&&fe[2]){if(Ze===e&&!(Ae in d))return!1}else{var et=new Vr;if(O)var Tt=O(Ze,Qe,Ae,d,f,et);if(!(Tt===e?cl(Qe,Ze,_|C,O,et):Tt))return!1}}return!0}function kc(d){if(!Sn(d)||Hy(d))return!1;var f=Bs(d)?Pf:xt;return f.test(Hl(d))}function Zf(d){return An(d)&&dr(d)==Pe}function Qf(d){return An(d)&&br(d)==Fe}function Ic(d){return An(d)&&Kc(d.length)&&!!ki[dr(d)]}function Rd(d){return typeof d=="function"?d:d==null?Xr:typeof d=="object"?ri(d)?Md(d[0],d[1]):Fd(d):qg(d)}function hl(d){if(!Gd(d))return rc(d);var f=[];for(var b in Bi(d))Di.call(d,b)&&b!="constructor"&&f.push(b);return f}function Dc(d){if(!Sn(d))return Uy(d);var f=Gd(d),b=[];for(var O in d)O=="constructor"&&(f||!Di.call(d,O))||b.push(O);return b}function Aa(d,f){return d<f}function Pd(d,f){var b=-1,O=Yr(d)?Me(d.length):[];return Zn(d,function(N,K,le){O[++b]=f(N,K,le)}),O}function Fd(d){var f=op(d);return f.length==1&&f[0][2]?dg(f[0][0],f[0][1]):function(b){return b===d||Dd(b,d,f)}}function Md(d,f){return lp(d)&&ag(f)?dg(cs(d),f):function(b){var O=gp(b,d);return O===e&&O===f?_p(b,d):cl(f,O,_|C)}}function so(d,f,b,O,N){d!==f&&Ea(f,function(K,le){if(N||(N=new Vr),Sn(K))Ir(d,f,le,b,so,O,N);else{var fe=O?O(dp(d,le),K,le+"",d,f,N):e;fe===e&&(fe=K),Fl(d,le,fe)}},jr)}function Ir(d,f,b,O,N,K,le){var fe=dp(d,b),Ae=dp(f,b),Ze=le.get(Ae);if(Ze){Fl(d,b,Ze);return}var Qe=K?K(fe,Ae,b+"",d,f,le):e,et=Qe===e;if(et){var Tt=ri(Ae),Pt=!Tt&&fl(Ae),$t=!Tt&&!Pt&&Pa(Ae);Qe=Ae,Tt||Pt||$t?ri(fe)?Qe=fe:Pn(fe)?Qe=$r(fe):Pt?(et=!1,Qe=Uv(Ae,!0)):$t?(et=!1,Qe=Gv(Ae,!0)):Qe=[]:$d(Ae)||Bl(Ae)?(Qe=fe,Bl(fe)?Qe=Bg(fe):(!Sn(fe)||Bs(fe))&&(Qe=lg(Ae))):et=!1}et&&(le.set(Ae,Qe),N(Qe,Ae,O,K,le),le.delete(Ae)),Fl(d,b,Qe)}function Rc(d,f){var b=d.length;if(b)return f+=f<0?b:0,Hs(f,b)?d[f]:e}function Pc(d,f,b){f.length?f=$i(f,function(K){return ri(K)?function(le){return Ms(le,K.length===1?K[0]:K)}:K}):f=[Xr];var O=-1;f=$i(f,Zi(Gt()));var N=Pd(d,function(K,le,fe){var Ae=$i(f,function(Ze){return Ze(K)});return{criteria:Ae,index:++O,value:K}});return ft(N,function(K,le){return Cy(K,le,b)})}function Wr(d,f){return Nd(d,f,function(b,O){return _p(d,O)})}function Nd(d,f,b){for(var O=-1,N=f.length,K={};++O<N;){var le=f[O],fe=Ms(d,le);b(fe,le)&&y(K,gn(le,d),fe)}return K}function Fc(d){return function(f){return Ms(f,d)}}function Ld(d,f,b,O){var N=O?H:R,K=-1,le=f.length,fe=d;for(d===f&&(f=$r(f)),b&&(fe=$i(d,Zi(b)));++K<le;)for(var Ae=0,Ze=f[K],Qe=b?b(Ze):Ze;(Ae=N(fe,Qe,Ae,O))>-1;)fe!==d&&aa.call(fe,Ae,1),aa.call(d,Ae,1);return d}function Mc(d,f){for(var b=d?f.length:0,O=b-1;b--;){var N=f[b];if(b==O||N!==K){var K=N;Hs(N)?aa.call(d,N,1):pi(d,N)}}return d}function Hd(d,f){return d+Ps(Rl()*(f-d+1))}function ka(d,f,b,O){for(var N=-1,K=Dn(ca((f-d)/(b||1)),0),le=Me(K);K--;)le[O?K:++N]=d,d+=b;return le}function Bd(d,f){var b="";if(!d||f<1||f>xe)return b;do f%2&&(b+=d),f=Ps(f/2),f&&(d+=d);while(f);return b}function ni(d,f){return up(ug(d,f,Xr),d+"")}function Vd(d){return xd(Fa(d))}function $o(d,f){var b=Fa(d);return Wc(b,Ur(f,0,b.length))}function y(d,f,b,O){if(!Sn(d))return d;f=gn(f,d);for(var N=-1,K=f.length,le=K-1,fe=d;fe!=null&&++N<K;){var Ae=cs(f[N]),Ze=b;if(Ae==="__proto__"||Ae==="constructor"||Ae==="prototype")return d;if(N!=le){var Qe=fe[Ae];Ze=O?O(Qe,Ae,fe):e,Ze===e&&(Ze=Sn(Qe)?Qe:Hs(f[N+1])?[]:{})}al(fe,Ae,Ze),fe=fe[Ae]}return d}var T=Or?function(d,f){return Or.set(d,f),d}:Xr,I=da?function(d,f){return da(d,"toString",{configurable:!0,enumerable:!1,value:Cp(f),writable:!0})}:Xr;function V(d){return Wc(Fa(d))}function Y(d,f,b){var O=-1,N=d.length;f<0&&(f=-f>N?0:N+f),b=b>N?N:b,b<0&&(b+=N),N=f>b?0:b-f>>>0,f>>>=0;for(var K=Me(N);++O<N;)K[O]=d[O+f];return K}function j(d,f){var b;return Zn(d,function(O,N,K){return b=f(O,N,K),!b}),!!b}function Te(d,f,b){var O=0,N=d==null?O:d.length;if(typeof f=="number"&&f===f&&N<=Ve){for(;O<N;){var K=O+N>>>1,le=d[K];le!==null&&!ao(le)&&(b?le<=f:le<f)?O=K+1:N=K}return N}return tt(d,f,Xr,b)}function tt(d,f,b,O){var N=0,K=d==null?0:d.length;if(K===0)return 0;f=b(f);for(var le=f!==f,fe=f===null,Ae=ao(f),Ze=f===e;N<K;){var Qe=Ps((N+K)/2),et=b(d[Qe]),Tt=et!==e,Pt=et===null,$t=et===et,ci=ao(et);if(le)var Yt=O||$t;else Ze?Yt=$t&&(O||Tt):fe?Yt=$t&&Tt&&(O||!Pt):Ae?Yt=$t&&Tt&&!Pt&&(O||!ci):Pt||ci?Yt=!1:Yt=O?et<=f:et<f;Yt?N=Qe+1:K=Qe}return vn(K,pe)}function rt(d,f){for(var b=-1,O=d.length,N=0,K=[];++b<O;){var le=d[b],fe=f?f(le):le;if(!b||!Yo(fe,Ae)){var Ae=fe;K[N++]=le===0?0:le}}return K}function ut(d){return typeof d=="number"?d:ao(d)?De:+d}function pt(d){if(typeof d=="string")return d;if(ri(d))return $i(d,pt)+"";if(ao(d))return Ed?Ed.call(d):"";var f=d+"";return f=="0"&&1/d==-Ie?"-0":f}function nt(d,f,b){var O=-1,N=Qs,K=d.length,le=!0,fe=[],Ae=fe;if(b)le=!1,N=Js;else if(K>=r){var Ze=f?null:Ty(d);if(Ze)return ks(Ze);le=!1,N=As,Ae=new ds}else Ae=f?[]:fe;e:for(;++O<K;){var Qe=d[O],et=f?f(Qe):Qe;if(Qe=b||Qe!==0?Qe:0,le&&et===et){for(var Tt=Ae.length;Tt--;)if(Ae[Tt]===et)continue e;f&&Ae.push(et),fe.push(Qe)}else N(Ae,et,b)||(Ae!==fe&&Ae.push(et),fe.push(Qe))}return fe}function pi(d,f){return f=gn(f,d),d=cg(d,f),d==null||delete d[cs(ko(f))]}function Qt(d,f,b,O){return y(d,f,b(Ms(d,f)),O)}function yi(d,f,b,O){for(var N=d.length,K=O?N:-1;(O?K--:++K<N)&&f(d[K],K,d););return b?Y(d,O?0:K,O?K+1:N):Y(d,O?K+1:0,O?N:K)}function Yi(d,f){var b=d;return b instanceof fi&&(b=b.value()),Ao(f,function(O,N){return N.func.apply(N.thisArg,Un([O],N.args))},b)}function Pi(d,f,b){var O=d.length;if(O<2)return O?nt(d[0]):[];for(var N=-1,K=Me(O);++N<O;)for(var le=d[N],fe=-1;++fe<O;)fe!=N&&(K[N]=ul(K[N]||le,d[fe],f,b));return nt(Qn(K,1),f,b)}function En(d,f,b){for(var O=-1,N=d.length,K=f.length,le={};++O<N;){var fe=O<K?f[O]:e;b(le,d[O],fe)}return le}function si(d){return Pn(d)?d:[]}function Rn(d){return typeof d=="function"?d:Xr}function gn(d,f){return ri(d)?d:lp(d,f)?[d]:mg(Vi(d))}var Nc=ni;function lo(d,f,b){var O=d.length;return b=b===e?O:b,!f&&b>=O?d:Y(d,f,b)}var zd=Cd||function(d){return qi.clearTimeout(d)};function Uv(d,f){if(f)return d.slice();var b=d.length,O=tc?tc(b):new d.constructor(b);return d.copy(O),O}function Jf(d){var f=new d.constructor(d.byteLength);return new In(f).set(new In(d)),f}function gy(d,f){var b=f?Jf(d.buffer):d.buffer;return new d.constructor(b,d.byteOffset,d.byteLength)}function _y(d){var f=new d.constructor(d.source,Ct.exec(d));return f.lastIndex=d.lastIndex,f}function by(d){return Fs?Bi(Fs.call(d)):{}}function Gv(d,f){var b=f?Jf(d.buffer):d.buffer;return new d.constructor(b,d.byteOffset,d.length)}function Wv(d,f){if(d!==f){var b=d!==e,O=d===null,N=d===d,K=ao(d),le=f!==e,fe=f===null,Ae=f===f,Ze=ao(f);if(!fe&&!Ze&&!K&&d>f||K&&le&&Ae&&!fe&&!Ze||O&&le&&Ae||!b&&Ae||!N)return 1;if(!O&&!K&&!Ze&&d<f||Ze&&b&&N&&!O&&!K||fe&&b&&N||!le&&N||!Ae)return-1}return 0}function Cy(d,f,b){for(var O=-1,N=d.criteria,K=f.criteria,le=N.length,fe=b.length;++O<le;){var Ae=Wv(N[O],K[O]);if(Ae){if(O>=fe)return Ae;var Ze=b[O];return Ae*(Ze=="desc"?-1:1)}}return d.index-f.index}function $v(d,f,b,O){for(var N=-1,K=d.length,le=b.length,fe=-1,Ae=f.length,Ze=Dn(K-le,0),Qe=Me(Ae+Ze),et=!O;++fe<Ae;)Qe[fe]=f[fe];for(;++N<le;)(et||N<K)&&(Qe[b[N]]=d[N]);for(;Ze--;)Qe[fe++]=d[N++];return Qe}function Yv(d,f,b,O){for(var N=-1,K=d.length,le=-1,fe=b.length,Ae=-1,Ze=f.length,Qe=Dn(K-fe,0),et=Me(Qe+Ze),Tt=!O;++N<Qe;)et[N]=d[N];for(var Pt=N;++Ae<Ze;)et[Pt+Ae]=f[Ae];for(;++le<fe;)(Tt||N<K)&&(et[Pt+b[le]]=d[N++]);return et}function $r(d,f){var b=-1,O=d.length;for(f||(f=Me(O));++b<O;)f[b]=d[b];return f}function us(d,f,b,O){var N=!b;b||(b={});for(var K=-1,le=f.length;++K<le;){var fe=f[K],Ae=O?O(b[fe],d[fe],fe,b,d):e;Ae===e&&(Ae=d[fe]),N?zr(b,fe,Ae):al(b,fe,Ae)}return b}function yy(d,f){return us(d,sp(d),f)}function Ey(d,f){return us(d,og(d),f)}function Lc(d,f){return function(b,O){var N=ri(b)?To:Od,K=f?f():{};return N(b,d,Gt(O,2),K)}}function Ia(d){return ni(function(f,b){var O=-1,N=b.length,K=N>1?b[N-1]:e,le=N>2?b[2]:e;for(K=d.length>3&&typeof K=="function"?(N--,K):e,le&&Dr(b[0],b[1],le)&&(K=N<3?e:K,N=1),f=Bi(f);++O<N;){var fe=b[O];fe&&d(f,fe,O,K)}return f})}function jv(d,f){return function(b,O){if(b==null)return b;if(!Yr(b))return d(b,O);for(var N=b.length,K=f?N:-1,le=Bi(b);(f?K--:++K<N)&&O(le[K],K,le)!==!1;);return b}}function Xv(d){return function(f,b,O){for(var N=-1,K=Bi(f),le=O(f),fe=le.length;fe--;){var Ae=le[d?fe:++N];if(b(K[Ae],Ae,K)===!1)break}return f}}function Sy(d,f,b){var O=f&x,N=Ud(d);function K(){var le=this&&this!==qi&&this instanceof K?N:d;return le.apply(O?b:this,arguments)}return K}function qv(d){return function(f){f=Vi(f);var b=tl(f)?ro(f):e,O=b?b[0]:f.charAt(0),N=b?lo(b,1).join(""):f.slice(1);return O[d]()+N}}function Da(d){return function(f){return Ao(jg(Yg(f).replace(Br,"")),d,"")}}function Ud(d){return function(){var f=arguments;switch(f.length){case 0:return new d;case 1:return new d(f[0]);case 2:return new d(f[0],f[1]);case 3:return new d(f[0],f[1],f[2]);case 4:return new d(f[0],f[1],f[2],f[3]);case 5:return new d(f[0],f[1],f[2],f[3],f[4]);case 6:return new d(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new d(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var b=as(d.prototype),O=d.apply(b,f);return Sn(O)?O:b}}function wy(d,f,b){var O=Ud(d);function N(){for(var K=arguments.length,le=Me(K),fe=K,Ae=Ra(N);fe--;)le[fe]=arguments[fe];var Ze=K<3&&le[0]!==Ae&&le[K-1]!==Ae?[]:rs(le,Ae);if(K-=Ze.length,K<b)return eg(d,f,Hc,N.placeholder,e,le,Ze,e,e,b-K);var Qe=this&&this!==qi&&this instanceof N?O:d;return nn(Qe,this,le)}return N}function Kv(d){return function(f,b,O){var N=Bi(f);if(!Yr(f)){var K=Gt(b,3);f=rr(f),b=function(fe){return K(N[fe],fe,N)}}var le=d(f,b,O);return le>-1?N[K?f[le]:le]:e}}function Zv(d){return Ls(function(f){var b=f.length,O=b,N=Qi.prototype.thru;for(d&&f.reverse();O--;){var K=f[O];if(typeof K!="function")throw new Tr(s);if(N&&!le&&Uc(K)=="wrapper")var le=new Qi([],!0)}for(O=le?O:b;++O<b;){K=f[O];var fe=Uc(K),Ae=fe=="wrapper"?rp(K):e;Ae&&ap(Ae[0])&&Ae[1]==(B|D|P|Z)&&!Ae[4].length&&Ae[9]==1?le=le[Uc(Ae[0])].apply(le,Ae[3]):le=K.length==1&&ap(K)?le[fe]():le.thru(K)}return function(){var Ze=arguments,Qe=Ze[0];if(le&&Ze.length==1&&ri(Qe))return le.plant(Qe).value();for(var et=0,Tt=b?f[et].apply(this,Ze):Qe;++et<b;)Tt=f[et].call(this,Tt);return Tt}})}function Hc(d,f,b,O,N,K,le,fe,Ae,Ze){var Qe=f&B,et=f&x,Tt=f&S,Pt=f&(D|A),$t=f&L,ci=Tt?e:Ud(d);function Yt(){for(var gi=arguments.length,wi=Me(gi),uo=gi;uo--;)wi[uo]=arguments[uo];if(Pt)var Rr=Ra(Yt),co=ju(wi,Rr);if(O&&(wi=$v(wi,O,N,Pt)),K&&(wi=Yv(wi,K,le,Pt)),gi-=co,Pt&&gi<Ze){var Fn=rs(wi,Rr);return eg(d,f,Hc,Yt.placeholder,b,wi,Fn,fe,Ae,Ze-gi)}var jo=et?b:this,zs=Tt?jo[d]:d;return gi=wi.length,fe?wi=Wy(wi,fe):$t&&gi>1&&wi.reverse(),Qe&&Ae<gi&&(wi.length=Ae),this&&this!==qi&&this instanceof Yt&&(zs=ci||Ud(zs)),zs.apply(jo,wi)}return Yt}function Qv(d,f){return function(b,O){return Oc(b,d,f(O),{})}}function Bc(d,f){return function(b,O){var N;if(b===e&&O===e)return f;if(b!==e&&(N=b),O!==e){if(N===e)return O;typeof b=="string"||typeof O=="string"?(b=pt(b),O=pt(O)):(b=ut(b),O=ut(O)),N=d(b,O)}return N}}function ep(d){return Ls(function(f){return f=$i(f,Zi(Gt())),ni(function(b){var O=this;return d(f,function(N){return nn(N,O,b)})})})}function Vc(d,f){f=f===e?" ":pt(f);var b=f.length;if(b<2)return b?Bd(f,d):f;var O=Bd(f,ca(d/os(f)));return tl(f)?lo(ro(O),0,d).join(""):O.slice(0,d)}function xy(d,f,b,O){var N=f&x,K=Ud(d);function le(){for(var fe=-1,Ae=arguments.length,Ze=-1,Qe=O.length,et=Me(Qe+Ae),Tt=this&&this!==qi&&this instanceof le?K:d;++Ze<Qe;)et[Ze]=O[Ze];for(;Ae--;)et[Ze++]=arguments[++fe];return nn(Tt,N?b:this,et)}return le}function Jv(d){return function(f,b,O){return O&&typeof O!="number"&&Dr(f,b,O)&&(b=O=e),f=Vs(f),b===e?(b=f,f=0):b=Vs(b),O=O===e?f<b?1:-1:Vs(O),ka(f,b,O,d)}}function zc(d){return function(f,b){return typeof f=="string"&&typeof b=="string"||(f=Io(f),b=Io(b)),d(f,b)}}function eg(d,f,b,O,N,K,le,fe,Ae,Ze){var Qe=f&D,et=Qe?le:e,Tt=Qe?e:le,Pt=Qe?K:e,$t=Qe?e:K;f|=Qe?P:M,f&=~(Qe?M:P),f&E||(f&=~(x|S));var ci=[d,f,N,Pt,et,$t,Tt,fe,Ae,Ze],Yt=b.apply(e,ci);return ap(d)&&hg(Yt,ci),Yt.placeholder=O,fg(Yt,d,f)}function tp(d){var f=kn[d];return function(b,O){if(b=Io(b),O=O==null?0:vn(li(O),292),O&&nc(b)){var N=(Vi(b)+"e").split("e"),K=f(N[0]+"e"+(+N[1]+O));return N=(Vi(K)+"e").split("e"),+(N[0]+"e"+(+N[1]-O))}return f(b)}}var Ty=ls&&1/ks(new ls([,-0]))[1]==Ie?function(d){return new ls(d)}:Sp;function tg(d){return function(f){var b=br(f);return b==k?vd(f):b==Fe?na(f):Ki(f,d(f))}}function Ns(d,f,b,O,N,K,le,fe){var Ae=f&S;if(!Ae&&typeof d!="function")throw new Tr(s);var Ze=O?O.length:0;if(Ze||(f&=~(P|M),O=N=e),le=le===e?le:Dn(li(le),0),fe=fe===e?fe:li(fe),Ze-=N?N.length:0,f&M){var Qe=O,et=N;O=N=e}var Tt=Ae?e:rp(d),Pt=[d,f,b,O,N,Qe,et,K,le,fe];if(Tt&&zy(Pt,Tt),d=Pt[0],f=Pt[1],b=Pt[2],O=Pt[3],N=Pt[4],fe=Pt[9]=Pt[9]===e?Ae?0:d.length:Dn(Pt[9]-Ze,0),!fe&&f&(D|A)&&(f&=~(D|A)),!f||f==x)var $t=Sy(d,f,b);else f==D||f==A?$t=wy(d,f,fe):(f==P||f==(x|P))&&!N.length?$t=xy(d,f,b,O):$t=Hc.apply(e,Pt);var ci=Tt?T:hg;return fg(ci($t,Pt),d,f)}function ig(d,f,b,O){return d===e||Yo(d,ss[b])&&!Di.call(O,b)?f:d}function ng(d,f,b,O,N,K){return Sn(d)&&Sn(f)&&(K.set(f,d),so(d,f,e,ng,K),K.delete(f)),d}function Oy(d){return $d(d)?e:d}function rg(d,f,b,O,N,K){var le=b&_,fe=d.length,Ae=f.length;if(fe!=Ae&&!(le&&Ae>fe))return!1;var Ze=K.get(d),Qe=K.get(f);if(Ze&&Qe)return Ze==f&&Qe==d;var et=-1,Tt=!0,Pt=b&C?new ds:e;for(K.set(d,f),K.set(f,d);++et<fe;){var $t=d[et],ci=f[et];if(O)var Yt=le?O(ci,$t,et,f,d,K):O($t,ci,et,d,f,K);if(Yt!==e){if(Yt)continue;Tt=!1;break}if(Pt){if(!Os(f,function(gi,wi){if(!As(Pt,wi)&&($t===gi||N($t,gi,b,O,K)))return Pt.push(wi)})){Tt=!1;break}}else if(!($t===ci||N($t,ci,b,O,K))){Tt=!1;break}}return K.delete(d),K.delete(f),Tt}function Ay(d,f,b,O,N,K,le){switch(b){case It:if(d.byteLength!=f.byteLength||d.byteOffset!=f.byteOffset)return!1;d=d.buffer,f=f.buffer;case jt:return!(d.byteLength!=f.byteLength||!K(new In(d),new In(f)));case be:case He:case ee:return Yo(+d,+f);case Ue:return d.name==f.name&&d.message==f.message;case Pe:case me:return d==f+"";case k:var fe=vd;case Fe:var Ae=O&_;if(fe||(fe=ks),d.size!=f.size&&!Ae)return!1;var Ze=le.get(d);if(Ze)return Ze==f;O|=C,le.set(d,f);var Qe=rg(fe(d),fe(f),O,N,K,le);return le.delete(d),Qe;case We:if(Fs)return Fs.call(d)==Fs.call(f)}return!1}function ky(d,f,b,O,N,K){var le=b&_,fe=ip(d),Ae=fe.length,Ze=ip(f),Qe=Ze.length;if(Ae!=Qe&&!le)return!1;for(var et=Ae;et--;){var Tt=fe[et];if(!(le?Tt in f:Di.call(f,Tt)))return!1}var Pt=K.get(d),$t=K.get(f);if(Pt&&$t)return Pt==f&&$t==d;var ci=!0;K.set(d,f),K.set(f,d);for(var Yt=le;++et<Ae;){Tt=fe[et];var gi=d[Tt],wi=f[Tt];if(O)var uo=le?O(wi,gi,Tt,f,d,K):O(gi,wi,Tt,d,f,K);if(!(uo===e?gi===wi||N(gi,wi,b,O,K):uo)){ci=!1;break}Yt||(Yt=Tt=="constructor")}if(ci&&!Yt){var Rr=d.constructor,co=f.constructor;Rr!=co&&"constructor"in d&&"constructor"in f&&!(typeof Rr=="function"&&Rr instanceof Rr&&typeof co=="function"&&co instanceof co)&&(ci=!1)}return K.delete(d),K.delete(f),ci}function Ls(d){return up(ug(d,e,bg),d+"")}function ip(d){return wa(d,rr,sp)}function np(d){return wa(d,jr,og)}var rp=Or?function(d){return Or.get(d)}:Sp;function Uc(d){for(var f=d.name+"",b=sl[f],O=Di.call(sl,f)?b.length:0;O--;){var N=b[O],K=N.func;if(K==null||K==d)return N.name}return f}function Ra(d){var f=Di.call(G,"placeholder")?G:d;return f.placeholder}function Gt(){var d=G.iteratee||yp;return d=d===yp?Rd:d,arguments.length?d(arguments[0],arguments[1]):d}function Gc(d,f){var b=d.__data__;return Ly(f)?b[typeof f=="string"?"string":"hash"]:b.map}function op(d){for(var f=rr(d),b=f.length;b--;){var O=f[b],N=d[O];f[b]=[O,N,ag(N)]}return f}function Ll(d,f){var b=qu(d,f);return kc(b)?b:e}function Iy(d){var f=Di.call(d,Rs),b=d[Rs];try{d[Rs]=e;var O=!0}catch{}var N=sa.call(d);return O&&(f?d[Rs]=b:delete d[Rs]),N}var sp=ha?function(d){return d==null?[]:(d=Bi(d),Ft(ha(d),function(f){return ic.call(d,f)}))}:wp,og=ha?function(d){for(var f=[];d;)Un(f,sp(d)),d=la(d);return f}:wp,br=dr;(ma&&br(new ma(new ArrayBuffer(1)))!=It||Vo&&br(new Vo)!=k||yd&&br(yd.resolve())!=X||ls&&br(new ls)!=Fe||rl&&br(new rl)!=Ge)&&(br=function(d){var f=dr(d),b=f==$?d.constructor:e,O=b?Hl(b):"";if(O)switch(O){case va:return It;case ga:return k;case sc:return X;case _a:return Fe;case Nf:return Ge}return f});function Dy(d,f,b){for(var O=-1,N=b.length;++O<N;){var K=b[O],le=K.size;switch(K.type){case"drop":d+=le;break;case"dropRight":f-=le;break;case"take":f=vn(f,d+le);break;case"takeRight":d=Dn(d,f-le);break}}return{start:d,end:f}}function Ry(d){var f=d.match(Ai);return f?f[1].split(zi):[]}function sg(d,f,b){f=gn(f,d);for(var O=-1,N=f.length,K=!1;++O<N;){var le=cs(f[O]);if(!(K=d!=null&&b(d,le)))break;d=d[le]}return K||++O!=N?K:(N=d==null?0:d.length,!!N&&Kc(N)&&Hs(le,N)&&(ri(d)||Bl(d)))}function Py(d){var f=d.length,b=new d.constructor(f);return f&&typeof d[0]=="string"&&Di.call(d,"index")&&(b.index=d.index,b.input=d.input),b}function lg(d){return typeof d.constructor=="function"&&!Gd(d)?as(la(d)):{}}function Fy(d,f,b){var O=d.constructor;switch(f){case jt:return Jf(d);case be:case He:return new O(+d);case It:return gy(d,b);case bi:case q:case W:case ve:case ke:case at:case st:case ht:case Dt:return Gv(d,b);case k:return new O;case ee:case me:return new O(d);case Pe:return _y(d);case Fe:return new O;case We:return by(d)}}function My(d,f){var b=f.length;if(!b)return d;var O=b-1;return f[O]=(b>1?"& ":"")+f[O],f=f.join(b>2?", ":" "),d.replace(ei,`{
57
+ */hd.exports;var xv;function qC(){return xv||(xv=1,function(a,t){(function(){var e,n="4.17.21",r=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,c="__lodash_placeholder__",p=1,m=2,v=4,_=1,C=2,x=1,S=2,E=4,D=8,A=16,P=32,M=64,B=128,Z=256,L=512,ae=30,_e="...",J=800,U=16,F=1,de=2,qe=3,Ie=1/0,xe=9007199254740991,Oe=17976931348623157e292,De=NaN,ne=4294967295,pe=ne-1,Ve=ne>>>1,Ye=[["ary",B],["bind",x],["bindKey",S],["curry",D],["curryRight",A],["flip",L],["partial",P],["partialRight",M],["rearg",Z]],ze="[object Arguments]",ce="[object Array]",Ce="[object AsyncFunction]",be="[object Boolean]",He="[object Date]",ot="[object DOMException]",Ue="[object Error]",St="[object Function]",ct="[object GeneratorFunction]",k="[object Map]",ee="[object Number]",ge="[object Null]",$="[object Object]",X="[object Promise]",re="[object Proxy]",Pe="[object RegExp]",Fe="[object Set]",me="[object String]",We="[object Symbol]",mt="[object Undefined]",Ge="[object WeakMap]",Le="[object WeakSet]",jt="[object ArrayBuffer]",It="[object DataView]",bi="[object Float32Array]",q="[object Float64Array]",W="[object Int8Array]",ve="[object Int16Array]",ke="[object Int32Array]",at="[object Uint8Array]",st="[object Uint8ClampedArray]",ht="[object Uint16Array]",Dt="[object Uint32Array]",Lt=/\b__p \+= '';/g,Ot=/\b(__p \+=) '' \+/g,zt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kt=/&(?:amp|lt|gt|quot|#39);/g,Fi=/[&<>"']/g,Mi=RegExp(Kt.source),z=RegExp(Fi.source),Q=/<%-([\s\S]+?)%>/g,he=/<%([\s\S]+?)%>/g,Ee=/<%=([\s\S]+?)%>/g,lt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vt=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wt=/[\\^$.*+?()[\]{}|]/g,Ht=RegExp(wt.source),Et=/^\s+/,gt=/\s/,ei=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ai=/\{\n\/\* \[wrapped with (.+)\] \*/,zi=/,? & /,Zt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ni=/[()=,{}\[\]\/\s]/,Bn=/\\(\\)?/g,fn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ct=/\w*$/,Se=/^[-+]0x[0-9a-f]+$/i,Xe=/^0b[01]+$/i,xt=/^\[object .+?Constructor\]$/,ti=/^0o[0-7]+$/i,Ui=/^(?:0|[1-9]\d*)$/,Gi=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Li=/($^)/,pn=/['\n\r\u2028\u2029\\]/g,Wn="\\ud800-\\udfff",qt="\\u0300-\\u036f",Wi="\\ufe20-\\ufe2f",lr="\\u20d0-\\u20ff",bo=qt+Wi+lr,er="\\u2700-\\u27bf",tr="a-z\\xdf-\\xf6\\xf8-\\xff",Co="\\xac\\xb1\\xd7\\xf7",mr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ar="\\u2000-\\u206f",Sr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",$n="A-Z\\xc0-\\xd6\\xd8-\\xde",Vn="\\ufe0e\\ufe0f",di=Co+mr+ar+Sr,zn="['’]",to="["+Wn+"]",yo="["+di+"]",mn="["+bo+"]",ir="\\d+",vr="["+er+"]",gr="["+tr+"]",se="[^"+Wn+di+ir+er+tr+$n+"]",ue="\\ud83c[\\udffb-\\udfff]",ye="(?:"+mn+"|"+ue+")",$e="[^"+Wn+"]",Je="(?:\\ud83c[\\udde6-\\uddff]){2}",dt="[\\ud800-\\udbff][\\udc00-\\udfff]",At="["+$n+"]",Bt="\\u200d",ui="(?:"+gr+"|"+se+")",Ci="(?:"+At+"|"+se+")",Ei="(?:"+zn+"(?:d|ll|m|re|s|t|ve))?",yn="(?:"+zn+"(?:D|LL|M|RE|S|T|VE))?",Yn=ye+"?",jn="["+Vn+"]?",Xn="(?:"+Bt+"(?:"+[$e,Je,dt].join("|")+")"+jn+Yn+")*",io="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_r="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Eo=jn+Yn+Xn,Hi="(?:"+[vr,Je,dt].join("|")+")"+Eo,Oi="(?:"+[$e+mn+"?",mn,Je,dt,to].join("|")+")",Br=RegExp(zn,"g"),Cs=RegExp(mn,"g"),So=RegExp(ue+"(?="+ue+")|"+Oi+Eo,"g"),qs=RegExp([At+"?"+gr+"+"+Ei+"(?="+[yo,At,"$"].join("|")+")",Ci+"+"+yn+"(?="+[yo,At+ui,"$"].join("|")+")",At+"?"+ui+"+"+Ei,At+"+"+yn,_r,io,ir,Hi].join("|"),"g"),ys=RegExp("["+Bt+Wn+bo+Vn+"]"),ia=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Es=-1,ki={};ki[bi]=ki[q]=ki[W]=ki[ve]=ki[ke]=ki[at]=ki[st]=ki[ht]=ki[Dt]=!0,ki[ze]=ki[ce]=ki[jt]=ki[be]=ki[It]=ki[He]=ki[Ue]=ki[St]=ki[k]=ki[ee]=ki[$]=ki[Pe]=ki[Fe]=ki[me]=ki[Ge]=!1;var vi={};vi[ze]=vi[ce]=vi[jt]=vi[It]=vi[be]=vi[He]=vi[bi]=vi[q]=vi[W]=vi[ve]=vi[ke]=vi[k]=vi[ee]=vi[$]=vi[Pe]=vi[Fe]=vi[me]=vi[We]=vi[at]=vi[st]=vi[ht]=vi[Dt]=!0,vi[Ue]=vi[St]=vi[Ge]=!1;var wo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},xo={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ss={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},xl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ks=parseFloat,es=parseInt,ws=typeof Pr=="object"&&Pr&&Pr.Object===Object&&Pr,kt=typeof self=="object"&&self&&self.Object===Object&&self,qi=ws||kt||Function("return this")(),wr=t&&!t.nodeType&&t,Ho=wr&&!0&&a&&!a.nodeType&&a,Tl=Ho&&Ho.exports===wr,no=Tl&&ws.process,qn=function(){try{var oe=Ho&&Ho.require&&Ho.require("util").types;return oe||no&&no.binding&&no.binding("util")}catch{}}(),Zs=qn&&qn.isArrayBuffer,xr=qn&&qn.isDate,Ol=qn&&qn.isMap,xs=qn&&qn.isRegExp,Al=qn&&qn.isSet,Ts=qn&&qn.isTypedArray;function nn(oe,Ne,Me){switch(Me.length){case 0:return oe.call(Ne);case 1:return oe.call(Ne,Me[0]);case 2:return oe.call(Ne,Me[0],Me[1]);case 3:return oe.call(Ne,Me[0],Me[1],Me[2])}return oe.apply(Ne,Me)}function To(oe,Ne,Me,_t){for(var Xt=-1,Si=oe==null?0:oe.length;++Xt<Si;){var kn=oe[Xt];Ne(_t,kn,Me(kn),oe)}return _t}function rn(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length;++Me<_t&&Ne(oe[Me],Me,oe)!==!1;);return oe}function Kn(oe,Ne){for(var Me=oe==null?0:oe.length;Me--&&Ne(oe[Me],Me,oe)!==!1;);return oe}function Oo(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length;++Me<_t;)if(!Ne(oe[Me],Me,oe))return!1;return!0}function Ft(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length,Xt=0,Si=[];++Me<_t;){var kn=oe[Me];Ne(kn,Me,oe)&&(Si[Xt++]=kn)}return Si}function Qs(oe,Ne){var Me=oe==null?0:oe.length;return!!Me&&R(oe,Ne,0)>-1}function Js(oe,Ne,Me){for(var _t=-1,Xt=oe==null?0:oe.length;++_t<Xt;)if(Me(Ne,oe[_t]))return!0;return!1}function $i(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length,Xt=Array(_t);++Me<_t;)Xt[Me]=Ne(oe[Me],Me,oe);return Xt}function Un(oe,Ne){for(var Me=-1,_t=Ne.length,Xt=oe.length;++Me<_t;)oe[Xt+Me]=Ne[Me];return oe}function Ao(oe,Ne,Me,_t){var Xt=-1,Si=oe==null?0:oe.length;for(_t&&Si&&(Me=oe[++Xt]);++Xt<Si;)Me=Ne(Me,oe[Xt],Xt,oe);return Me}function fd(oe,Ne,Me,_t){var Xt=oe==null?0:oe.length;for(_t&&Xt&&(Me=oe[--Xt]);Xt--;)Me=Ne(Me,oe[Xt],Xt,oe);return Me}function Os(oe,Ne){for(var Me=-1,_t=oe==null?0:oe.length;++Me<_t;)if(Ne(oe[Me],Me,oe))return!0;return!1}var ts=Be("length");function el(oe){return oe.split("")}function hi(oe){return oe.match(Zt)||[]}function g(oe,Ne,Me){var _t;return Me(oe,function(Xt,Si,kn){if(Ne(Xt,Si,kn))return _t=Si,!1}),_t}function w(oe,Ne,Me,_t){for(var Xt=oe.length,Si=Me+(_t?1:-1);_t?Si--:++Si<Xt;)if(Ne(oe[Si],Si,oe))return Si;return-1}function R(oe,Ne,Me){return Ne===Ne?Tf(oe,Ne,Me):w(oe,te,Me)}function H(oe,Ne,Me,_t){for(var Xt=Me-1,Si=oe.length;++Xt<Si;)if(_t(oe[Xt],Ne))return Xt;return-1}function te(oe){return oe!==oe}function we(oe,Ne){var Me=oe==null?0:oe.length;return Me?Vt(oe,Ne)/Me:De}function Be(oe){return function(Ne){return Ne==null?e:Ne[oe]}}function Ke(oe){return function(Ne){return oe==null?e:oe[Ne]}}function yt(oe,Ne,Me,_t,Xt){return Xt(oe,function(Si,kn,Bi){Me=_t?(_t=!1,Si):Ne(Me,Si,kn,Bi)}),Me}function ft(oe,Ne){var Me=oe.length;for(oe.sort(Ne);Me--;)oe[Me]=oe[Me].value;return oe}function Vt(oe,Ne){for(var Me,_t=-1,Xt=oe.length;++_t<Xt;){var Si=Ne(oe[_t]);Si!==e&&(Me=Me===e?Si:Me+Si)}return Me}function Mt(oe,Ne){for(var Me=-1,_t=Array(oe);++Me<oe;)_t[Me]=Ne(Me);return _t}function Ki(oe,Ne){return $i(Ne,function(Me){return[Me,oe[Me]]})}function ln(oe){return oe&&oe.slice(0,gd(oe)+1).replace(Et,"")}function Zi(oe){return function(Ne){return oe(Ne)}}function is(oe,Ne){return $i(Ne,function(Me){return oe[Me]})}function As(oe,Ne){return oe.has(Ne)}function ns(oe,Ne){for(var Me=-1,_t=oe.length;++Me<_t&&R(Ne,oe[Me],0)>-1;);return Me}function pd(oe,Ne){for(var Me=oe.length;Me--&&R(Ne,oe[Me],0)>-1;);return Me}function ju(oe,Ne){for(var Me=oe.length,_t=0;Me--;)oe[Me]===Ne&&++_t;return _t}var md=Ke(wo),Xu=Ke(xo);function wf(oe){return"\\"+xl[oe]}function qu(oe,Ne){return oe==null?e:oe[Ne]}function tl(oe){return ys.test(oe)}function xf(oe){return ia.test(oe)}function Ku(oe){for(var Ne,Me=[];!(Ne=oe.next()).done;)Me.push(Ne.value);return Me}function vd(oe){var Ne=-1,Me=Array(oe.size);return oe.forEach(function(_t,Xt){Me[++Ne]=[Xt,_t]}),Me}function kl(oe,Ne){return function(Me){return oe(Ne(Me))}}function rs(oe,Ne){for(var Me=-1,_t=oe.length,Xt=0,Si=[];++Me<_t;){var kn=oe[Me];(kn===Ne||kn===c)&&(oe[Me]=c,Si[Xt++]=Me)}return Si}function ks(oe){var Ne=-1,Me=Array(oe.size);return oe.forEach(function(_t){Me[++Ne]=_t}),Me}function na(oe){var Ne=-1,Me=Array(oe.size);return oe.forEach(function(_t){Me[++Ne]=[_t,_t]}),Me}function Tf(oe,Ne,Me){for(var _t=Me-1,Xt=oe.length;++_t<Xt;)if(oe[_t]===Ne)return _t;return-1}function ra(oe,Ne,Me){for(var _t=Me+1;_t--;)if(oe[_t]===Ne)return _t;return _t}function os(oe){return tl(oe)?Zu(oe):ts(oe)}function ro(oe){return tl(oe)?Af(oe):el(oe)}function gd(oe){for(var Ne=oe.length;Ne--&&gt.test(oe.charAt(Ne)););return Ne}var Of=Ke(Ss);function Zu(oe){for(var Ne=So.lastIndex=0;So.test(oe);)++Ne;return Ne}function Af(oe){return oe.match(So)||[]}function kf(oe){return oe.match(qs)||[]}var _d=function oe(Ne){Ne=Ne==null?qi:Is.defaults(qi.Object(),Ne,Is.pick(qi,Jo));var Me=Ne.Array,_t=Ne.Date,Xt=Ne.Error,Si=Ne.Function,kn=Ne.Math,Bi=Ne.Object,il=Ne.RegExp,If=Ne.String,Tr=Ne.TypeError,oa=Me.prototype,Df=Si.prototype,ss=Bi.prototype,Il=Ne["__core-js_shared__"],Ds=Df.toString,Di=ss.hasOwnProperty,Qu=0,Ju=function(){var d=/[^.]+$/.exec(Il&&Il.keys&&Il.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}(),sa=ss.toString,ec=Ds.call(Bi),Rf=qi._,Pf=il("^"+Ds.call(Di).replace(wt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ri=Tl?Ne.Buffer:e,nr=Ne.Symbol,In=Ne.Uint8Array,tc=Ri?Ri.allocUnsafe:e,la=kl(Bi.getPrototypeOf,Bi),nl=Bi.create,ic=ss.propertyIsEnumerable,aa=oa.splice,bd=nr?nr.isConcatSpreadable:e,Dl=nr?nr.iterator:e,Rs=nr?nr.toStringTag:e,da=function(){try{var d=Ll(Bi,"defineProperty");return d({},"",{}),d}catch{}}(),Cd=Ne.clearTimeout!==qi.clearTimeout&&Ne.clearTimeout,ua=_t&&_t.now!==qi.Date.now&&_t.now,Bo=Ne.setTimeout!==qi.setTimeout&&Ne.setTimeout,ca=kn.ceil,Ps=kn.floor,ha=Bi.getOwnPropertySymbols,fa=Ri?Ri.isBuffer:e,nc=Ne.isFinite,pa=oa.join,rc=kl(Bi.keys,Bi),Dn=kn.max,vn=kn.min,Ff=_t.now,Mf=Ne.parseInt,Rl=kn.random,oc=oa.reverse,ma=Ll(Ne,"DataView"),Vo=Ll(Ne,"Map"),yd=Ll(Ne,"Promise"),ls=Ll(Ne,"Set"),rl=Ll(Ne,"WeakMap"),ol=Ll(Bi,"create"),Or=rl&&new rl,sl={},va=Hl(ma),ga=Hl(Vo),sc=Hl(yd),_a=Hl(ls),Nf=Hl(rl),Pl=nr?nr.prototype:e,Fs=Pl?Pl.valueOf:e,Ed=Pl?Pl.toString:e;function G(d){if(An(d)&&!ri(d)&&!(d instanceof fi)){if(d instanceof Qi)return d;if(Di.call(d,"__wrapped__"))return vg(d)}return new Qi(d)}var as=function(){function d(){}return function(f){if(!Sn(f))return{};if(nl)return nl(f);d.prototype=f;var b=new d;return d.prototype=e,b}}();function ba(){}function Qi(d,f){this.__wrapped__=d,this.__actions__=[],this.__chain__=!!f,this.__index__=0,this.__values__=e}G.templateSettings={escape:Q,evaluate:he,interpolate:Ee,variable:"",imports:{_:G}},G.prototype=ba.prototype,G.prototype.constructor=G,Qi.prototype=as(ba.prototype),Qi.prototype.constructor=Qi;function fi(d){this.__wrapped__=d,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ne,this.__views__=[]}function lc(){var d=new fi(this.__wrapped__);return d.__actions__=$r(this.__actions__),d.__dir__=this.__dir__,d.__filtered__=this.__filtered__,d.__iteratees__=$r(this.__iteratees__),d.__takeCount__=this.__takeCount__,d.__views__=$r(this.__views__),d}function ac(){if(this.__filtered__){var d=new fi(this);d.__dir__=-1,d.__filtered__=!0}else d=this.clone(),d.__dir__*=-1;return d}function Lf(){var d=this.__wrapped__.value(),f=this.__dir__,b=ri(d),O=f<0,N=b?d.length:0,K=Dy(0,N,this.__views__),le=K.start,fe=K.end,Ae=fe-le,Ze=O?fe:le-1,Qe=this.__iteratees__,et=Qe.length,Tt=0,Pt=vn(Ae,this.__takeCount__);if(!b||!O&&N==Ae&&Pt==Ae)return Yi(d,this.__actions__);var $t=[];e:for(;Ae--&&Tt<Pt;){Ze+=f;for(var ci=-1,Yt=d[Ze];++ci<et;){var gi=Qe[ci],wi=gi.iteratee,uo=gi.type,Rr=wi(Yt);if(uo==de)Yt=Rr;else if(!Rr){if(uo==F)continue e;break e}}$t[Tt++]=Yt}return $t}fi.prototype=as(ba.prototype),fi.prototype.constructor=fi;function Ar(d){var f=-1,b=d==null?0:d.length;for(this.clear();++f<b;){var O=d[f];this.set(O[0],O[1])}}function dc(){this.__data__=ol?ol(null):{},this.size=0}function Hf(d){var f=this.has(d)&&delete this.__data__[d];return this.size-=f?1:0,f}function uc(d){var f=this.__data__;if(ol){var b=f[d];return b===u?e:b}return Di.call(f,d)?f[d]:e}function cc(d){var f=this.__data__;return ol?f[d]!==e:Di.call(f,d)}function Sd(d,f){var b=this.__data__;return this.size+=this.has(d)?0:1,b[d]=ol&&f===e?u:f,this}Ar.prototype.clear=dc,Ar.prototype.delete=Hf,Ar.prototype.get=uc,Ar.prototype.has=cc,Ar.prototype.set=Sd;function zo(d){var f=-1,b=d==null?0:d.length;for(this.clear();++f<b;){var O=d[f];this.set(O[0],O[1])}}function Bf(){this.__data__=[],this.size=0}function hc(d){var f=this.__data__,b=Ca(f,d);if(b<0)return!1;var O=f.length-1;return b==O?f.pop():aa.call(f,b,1),--this.size,!0}function Vf(d){var f=this.__data__,b=Ca(f,d);return b<0?e:f[b][1]}function zf(d){return Ca(this.__data__,d)>-1}function fc(d,f){var b=this.__data__,O=Ca(b,d);return O<0?(++this.size,b.push([d,f])):b[O][1]=f,this}zo.prototype.clear=Bf,zo.prototype.delete=hc,zo.prototype.get=Vf,zo.prototype.has=zf,zo.prototype.set=fc;function Uo(d){var f=-1,b=d==null?0:d.length;for(this.clear();++f<b;){var O=d[f];this.set(O[0],O[1])}}function Uf(){this.size=0,this.__data__={hash:new Ar,map:new(Vo||zo),string:new Ar}}function Gf(d){var f=Gc(this,d).delete(d);return this.size-=f?1:0,f}function Wf(d){return Gc(this,d).get(d)}function ll(d){return Gc(this,d).has(d)}function pc(d,f){var b=Gc(this,d),O=b.size;return b.set(d,f),this.size+=b.size==O?0:1,this}Uo.prototype.clear=Uf,Uo.prototype.delete=Gf,Uo.prototype.get=Wf,Uo.prototype.has=ll,Uo.prototype.set=pc;function ds(d){var f=-1,b=d==null?0:d.length;for(this.__data__=new Uo;++f<b;)this.add(d[f])}function mc(d){return this.__data__.set(d,u),this}function vc(d){return this.__data__.has(d)}ds.prototype.add=ds.prototype.push=mc,ds.prototype.has=vc;function Vr(d){var f=this.__data__=new zo(d);this.size=f.size}function $f(){this.__data__=new zo,this.size=0}function Yf(d){var f=this.__data__,b=f.delete(d);return this.size=f.size,b}function gc(d){return this.__data__.get(d)}function _c(d){return this.__data__.has(d)}function bc(d,f){var b=this.__data__;if(b instanceof zo){var O=b.__data__;if(!Vo||O.length<r-1)return O.push([d,f]),this.size=++b.size,this;b=this.__data__=new Uo(O)}return b.set(d,f),this.size=b.size,this}Vr.prototype.clear=$f,Vr.prototype.delete=Yf,Vr.prototype.get=gc,Vr.prototype.has=_c,Vr.prototype.set=bc;function wd(d,f){var b=ri(d),O=!b&&Bl(d),N=!b&&!O&&fl(d),K=!b&&!O&&!N&&Pa(d),le=b||O||N||K,fe=le?Mt(d.length,If):[],Ae=fe.length;for(var Ze in d)(f||Di.call(d,Ze))&&!(le&&(Ze=="length"||N&&(Ze=="offset"||Ze=="parent")||K&&(Ze=="buffer"||Ze=="byteLength"||Ze=="byteOffset")||Hs(Ze,Ae)))&&fe.push(Ze);return fe}function xd(d){var f=d.length;return f?d[Hd(0,f-1)]:e}function Cc(d,f){return Wc($r(d),Ur(f,0,d.length))}function Td(d){return Wc($r(d))}function Fl(d,f,b){(b!==e&&!Yo(d[f],b)||b===e&&!(f in d))&&zr(d,f,b)}function al(d,f,b){var O=d[f];(!(Di.call(d,f)&&Yo(O,b))||b===e&&!(f in d))&&zr(d,f,b)}function Ca(d,f){for(var b=d.length;b--;)if(Yo(d[b][0],f))return b;return-1}function Od(d,f,b,O){return Zn(d,function(N,K,le){f(O,N,b(N),le)}),O}function dl(d,f){return d&&us(f,rr(f),d)}function jf(d,f){return d&&us(f,jr(f),d)}function zr(d,f,b){f=="__proto__"&&da?da(d,f,{configurable:!0,enumerable:!0,value:b,writable:!0}):d[f]=b}function Go(d,f){for(var b=-1,O=f.length,N=Me(O),K=d==null;++b<O;)N[b]=K?e:gp(d,f[b]);return N}function Ur(d,f,b){return d===d&&(b!==e&&(d=d<=b?d:b),f!==e&&(d=d>=f?d:f)),d}function kr(d,f,b,O,N,K){var le,fe=f&p,Ae=f&m,Ze=f&v;if(b&&(le=N?b(d,O,N,K):b(d)),le!==e)return le;if(!Sn(d))return d;var Qe=ri(d);if(Qe){if(le=Py(d),!fe)return $r(d,le)}else{var et=br(d),Tt=et==St||et==ct;if(fl(d))return Uv(d,fe);if(et==$||et==ze||Tt&&!N){if(le=Ae||Tt?{}:lg(d),!fe)return Ae?Ey(d,jf(le,d)):yy(d,dl(le,d))}else{if(!vi[et])return N?d:{};le=Fy(d,et,fe)}}K||(K=new Vr);var Pt=K.get(d);if(Pt)return Pt;K.set(d,le),Ng(d)?d.forEach(function(Yt){le.add(kr(Yt,f,b,Yt,d,K))}):Fg(d)&&d.forEach(function(Yt,gi){le.set(gi,kr(Yt,f,b,gi,d,K))});var $t=Ze?Ae?np:ip:Ae?jr:rr,ci=Qe?e:$t(d);return rn(ci||d,function(Yt,gi){ci&&(gi=Yt,Yt=d[gi]),al(le,gi,kr(Yt,f,b,gi,d,K))}),le}function Xf(d){var f=rr(d);return function(b){return Wo(b,d,f)}}function Wo(d,f,b){var O=b.length;if(d==null)return!O;for(d=Bi(d);O--;){var N=b[O],K=f[N],le=d[N];if(le===e&&!(N in d)||!K(le))return!1}return!0}function yc(d,f,b){if(typeof d!="function")throw new Tr(s);return Wd(function(){d.apply(e,b)},f)}function ul(d,f,b,O){var N=-1,K=Qs,le=!0,fe=d.length,Ae=[],Ze=f.length;if(!fe)return Ae;b&&(f=$i(f,Zi(b))),O?(K=Js,le=!1):f.length>=r&&(K=As,le=!1,f=new ds(f));e:for(;++N<fe;){var Qe=d[N],et=b==null?Qe:b(Qe);if(Qe=O||Qe!==0?Qe:0,le&&et===et){for(var Tt=Ze;Tt--;)if(f[Tt]===et)continue e;Ae.push(Qe)}else K(f,et,O)||Ae.push(Qe)}return Ae}var Zn=jv(oo),Ml=jv(kd,!0);function Ec(d,f){var b=!0;return Zn(d,function(O,N,K){return b=!!f(O,N,K),b}),b}function Nl(d,f,b){for(var O=-1,N=d.length;++O<N;){var K=d[O],le=f(K);if(le!=null&&(fe===e?le===le&&!ao(le):b(le,fe)))var fe=le,Ae=K}return Ae}function ya(d,f,b,O){var N=d.length;for(b=li(b),b<0&&(b=-b>N?0:N+b),O=O===e||O>N?N:li(O),O<0&&(O+=N),O=b>O?0:Hg(O);b<O;)d[b++]=f;return d}function Ad(d,f){var b=[];return Zn(d,function(O,N,K){f(O,N,K)&&b.push(O)}),b}function Qn(d,f,b,O,N){var K=-1,le=d.length;for(b||(b=Ny),N||(N=[]);++K<le;){var fe=d[K];f>0&&b(fe)?f>1?Qn(fe,f-1,b,O,N):Un(N,fe):O||(N[N.length]=fe)}return N}var Ea=Xv(),Sc=Xv(!0);function oo(d,f){return d&&Ea(d,f,rr)}function kd(d,f){return d&&Sc(d,f,rr)}function Sa(d,f){return Ft(f,function(b){return Bs(d[b])})}function Ms(d,f){f=gn(f,d);for(var b=0,O=f.length;d!=null&&b<O;)d=d[cs(f[b++])];return b&&b==O?d:e}function wa(d,f,b){var O=f(d);return ri(d)?O:Un(O,b(d))}function dr(d){return d==null?d===e?mt:ge:Rs&&Rs in Bi(d)?Iy(d):Gy(d)}function xa(d,f){return d>f}function wc(d,f){return d!=null&&Di.call(d,f)}function xc(d,f){return d!=null&&f in Bi(d)}function Tc(d,f,b){return d>=vn(f,b)&&d<Dn(f,b)}function Ta(d,f,b){for(var O=b?Js:Qs,N=d[0].length,K=d.length,le=K,fe=Me(K),Ae=1/0,Ze=[];le--;){var Qe=d[le];le&&f&&(Qe=$i(Qe,Zi(f))),Ae=vn(Qe.length,Ae),fe[le]=!b&&(f||N>=120&&Qe.length>=120)?new ds(le&&Qe):e}Qe=d[0];var et=-1,Tt=fe[0];e:for(;++et<N&&Ze.length<Ae;){var Pt=Qe[et],$t=f?f(Pt):Pt;if(Pt=b||Pt!==0?Pt:0,!(Tt?As(Tt,$t):O(Ze,$t,b))){for(le=K;--le;){var ci=fe[le];if(!(ci?As(ci,$t):O(d[le],$t,b)))continue e}Tt&&Tt.push($t),Ze.push(Pt)}}return Ze}function Oc(d,f,b,O){return oo(d,function(N,K,le){f(O,b(N),K,le)}),O}function Gr(d,f,b){f=gn(f,d),d=cg(d,f);var O=d==null?d:d[cs(ko(f))];return O==null?e:nn(O,d,b)}function Oa(d){return An(d)&&dr(d)==ze}function Ac(d){return An(d)&&dr(d)==jt}function Id(d){return An(d)&&dr(d)==He}function cl(d,f,b,O,N){return d===f?!0:d==null||f==null||!An(d)&&!An(f)?d!==d&&f!==f:qf(d,f,b,O,cl,N)}function qf(d,f,b,O,N,K){var le=ri(d),fe=ri(f),Ae=le?ce:br(d),Ze=fe?ce:br(f);Ae=Ae==ze?$:Ae,Ze=Ze==ze?$:Ze;var Qe=Ae==$,et=Ze==$,Tt=Ae==Ze;if(Tt&&fl(d)){if(!fl(f))return!1;le=!0,Qe=!1}if(Tt&&!Qe)return K||(K=new Vr),le||Pa(d)?rg(d,f,b,O,N,K):Ay(d,f,Ae,b,O,N,K);if(!(b&_)){var Pt=Qe&&Di.call(d,"__wrapped__"),$t=et&&Di.call(f,"__wrapped__");if(Pt||$t){var ci=Pt?d.value():d,Yt=$t?f.value():f;return K||(K=new Vr),N(ci,Yt,b,O,K)}}return Tt?(K||(K=new Vr),ky(d,f,b,O,N,K)):!1}function Kf(d){return An(d)&&br(d)==k}function Dd(d,f,b,O){var N=b.length,K=N,le=!O;if(d==null)return!K;for(d=Bi(d);N--;){var fe=b[N];if(le&&fe[2]?fe[1]!==d[fe[0]]:!(fe[0]in d))return!1}for(;++N<K;){fe=b[N];var Ae=fe[0],Ze=d[Ae],Qe=fe[1];if(le&&fe[2]){if(Ze===e&&!(Ae in d))return!1}else{var et=new Vr;if(O)var Tt=O(Ze,Qe,Ae,d,f,et);if(!(Tt===e?cl(Qe,Ze,_|C,O,et):Tt))return!1}}return!0}function kc(d){if(!Sn(d)||Hy(d))return!1;var f=Bs(d)?Pf:xt;return f.test(Hl(d))}function Zf(d){return An(d)&&dr(d)==Pe}function Qf(d){return An(d)&&br(d)==Fe}function Ic(d){return An(d)&&Kc(d.length)&&!!ki[dr(d)]}function Rd(d){return typeof d=="function"?d:d==null?Xr:typeof d=="object"?ri(d)?Md(d[0],d[1]):Fd(d):qg(d)}function hl(d){if(!Gd(d))return rc(d);var f=[];for(var b in Bi(d))Di.call(d,b)&&b!="constructor"&&f.push(b);return f}function Dc(d){if(!Sn(d))return Uy(d);var f=Gd(d),b=[];for(var O in d)O=="constructor"&&(f||!Di.call(d,O))||b.push(O);return b}function Aa(d,f){return d<f}function Pd(d,f){var b=-1,O=Yr(d)?Me(d.length):[];return Zn(d,function(N,K,le){O[++b]=f(N,K,le)}),O}function Fd(d){var f=op(d);return f.length==1&&f[0][2]?dg(f[0][0],f[0][1]):function(b){return b===d||Dd(b,d,f)}}function Md(d,f){return lp(d)&&ag(f)?dg(cs(d),f):function(b){var O=gp(b,d);return O===e&&O===f?_p(b,d):cl(f,O,_|C)}}function so(d,f,b,O,N){d!==f&&Ea(f,function(K,le){if(N||(N=new Vr),Sn(K))Ir(d,f,le,b,so,O,N);else{var fe=O?O(dp(d,le),K,le+"",d,f,N):e;fe===e&&(fe=K),Fl(d,le,fe)}},jr)}function Ir(d,f,b,O,N,K,le){var fe=dp(d,b),Ae=dp(f,b),Ze=le.get(Ae);if(Ze){Fl(d,b,Ze);return}var Qe=K?K(fe,Ae,b+"",d,f,le):e,et=Qe===e;if(et){var Tt=ri(Ae),Pt=!Tt&&fl(Ae),$t=!Tt&&!Pt&&Pa(Ae);Qe=Ae,Tt||Pt||$t?ri(fe)?Qe=fe:Pn(fe)?Qe=$r(fe):Pt?(et=!1,Qe=Uv(Ae,!0)):$t?(et=!1,Qe=Gv(Ae,!0)):Qe=[]:$d(Ae)||Bl(Ae)?(Qe=fe,Bl(fe)?Qe=Bg(fe):(!Sn(fe)||Bs(fe))&&(Qe=lg(Ae))):et=!1}et&&(le.set(Ae,Qe),N(Qe,Ae,O,K,le),le.delete(Ae)),Fl(d,b,Qe)}function Rc(d,f){var b=d.length;if(b)return f+=f<0?b:0,Hs(f,b)?d[f]:e}function Pc(d,f,b){f.length?f=$i(f,function(K){return ri(K)?function(le){return Ms(le,K.length===1?K[0]:K)}:K}):f=[Xr];var O=-1;f=$i(f,Zi(Gt()));var N=Pd(d,function(K,le,fe){var Ae=$i(f,function(Ze){return Ze(K)});return{criteria:Ae,index:++O,value:K}});return ft(N,function(K,le){return Cy(K,le,b)})}function Wr(d,f){return Nd(d,f,function(b,O){return _p(d,O)})}function Nd(d,f,b){for(var O=-1,N=f.length,K={};++O<N;){var le=f[O],fe=Ms(d,le);b(fe,le)&&y(K,gn(le,d),fe)}return K}function Fc(d){return function(f){return Ms(f,d)}}function Ld(d,f,b,O){var N=O?H:R,K=-1,le=f.length,fe=d;for(d===f&&(f=$r(f)),b&&(fe=$i(d,Zi(b)));++K<le;)for(var Ae=0,Ze=f[K],Qe=b?b(Ze):Ze;(Ae=N(fe,Qe,Ae,O))>-1;)fe!==d&&aa.call(fe,Ae,1),aa.call(d,Ae,1);return d}function Mc(d,f){for(var b=d?f.length:0,O=b-1;b--;){var N=f[b];if(b==O||N!==K){var K=N;Hs(N)?aa.call(d,N,1):pi(d,N)}}return d}function Hd(d,f){return d+Ps(Rl()*(f-d+1))}function ka(d,f,b,O){for(var N=-1,K=Dn(ca((f-d)/(b||1)),0),le=Me(K);K--;)le[O?K:++N]=d,d+=b;return le}function Bd(d,f){var b="";if(!d||f<1||f>xe)return b;do f%2&&(b+=d),f=Ps(f/2),f&&(d+=d);while(f);return b}function ni(d,f){return up(ug(d,f,Xr),d+"")}function Vd(d){return xd(Fa(d))}function $o(d,f){var b=Fa(d);return Wc(b,Ur(f,0,b.length))}function y(d,f,b,O){if(!Sn(d))return d;f=gn(f,d);for(var N=-1,K=f.length,le=K-1,fe=d;fe!=null&&++N<K;){var Ae=cs(f[N]),Ze=b;if(Ae==="__proto__"||Ae==="constructor"||Ae==="prototype")return d;if(N!=le){var Qe=fe[Ae];Ze=O?O(Qe,Ae,fe):e,Ze===e&&(Ze=Sn(Qe)?Qe:Hs(f[N+1])?[]:{})}al(fe,Ae,Ze),fe=fe[Ae]}return d}var T=Or?function(d,f){return Or.set(d,f),d}:Xr,I=da?function(d,f){return da(d,"toString",{configurable:!0,enumerable:!1,value:Cp(f),writable:!0})}:Xr;function V(d){return Wc(Fa(d))}function Y(d,f,b){var O=-1,N=d.length;f<0&&(f=-f>N?0:N+f),b=b>N?N:b,b<0&&(b+=N),N=f>b?0:b-f>>>0,f>>>=0;for(var K=Me(N);++O<N;)K[O]=d[O+f];return K}function j(d,f){var b;return Zn(d,function(O,N,K){return b=f(O,N,K),!b}),!!b}function Te(d,f,b){var O=0,N=d==null?O:d.length;if(typeof f=="number"&&f===f&&N<=Ve){for(;O<N;){var K=O+N>>>1,le=d[K];le!==null&&!ao(le)&&(b?le<=f:le<f)?O=K+1:N=K}return N}return tt(d,f,Xr,b)}function tt(d,f,b,O){var N=0,K=d==null?0:d.length;if(K===0)return 0;f=b(f);for(var le=f!==f,fe=f===null,Ae=ao(f),Ze=f===e;N<K;){var Qe=Ps((N+K)/2),et=b(d[Qe]),Tt=et!==e,Pt=et===null,$t=et===et,ci=ao(et);if(le)var Yt=O||$t;else Ze?Yt=$t&&(O||Tt):fe?Yt=$t&&Tt&&(O||!Pt):Ae?Yt=$t&&Tt&&!Pt&&(O||!ci):Pt||ci?Yt=!1:Yt=O?et<=f:et<f;Yt?N=Qe+1:K=Qe}return vn(K,pe)}function rt(d,f){for(var b=-1,O=d.length,N=0,K=[];++b<O;){var le=d[b],fe=f?f(le):le;if(!b||!Yo(fe,Ae)){var Ae=fe;K[N++]=le===0?0:le}}return K}function ut(d){return typeof d=="number"?d:ao(d)?De:+d}function pt(d){if(typeof d=="string")return d;if(ri(d))return $i(d,pt)+"";if(ao(d))return Ed?Ed.call(d):"";var f=d+"";return f=="0"&&1/d==-Ie?"-0":f}function nt(d,f,b){var O=-1,N=Qs,K=d.length,le=!0,fe=[],Ae=fe;if(b)le=!1,N=Js;else if(K>=r){var Ze=f?null:Ty(d);if(Ze)return ks(Ze);le=!1,N=As,Ae=new ds}else Ae=f?[]:fe;e:for(;++O<K;){var Qe=d[O],et=f?f(Qe):Qe;if(Qe=b||Qe!==0?Qe:0,le&&et===et){for(var Tt=Ae.length;Tt--;)if(Ae[Tt]===et)continue e;f&&Ae.push(et),fe.push(Qe)}else N(Ae,et,b)||(Ae!==fe&&Ae.push(et),fe.push(Qe))}return fe}function pi(d,f){return f=gn(f,d),d=cg(d,f),d==null||delete d[cs(ko(f))]}function Qt(d,f,b,O){return y(d,f,b(Ms(d,f)),O)}function yi(d,f,b,O){for(var N=d.length,K=O?N:-1;(O?K--:++K<N)&&f(d[K],K,d););return b?Y(d,O?0:K,O?K+1:N):Y(d,O?K+1:0,O?N:K)}function Yi(d,f){var b=d;return b instanceof fi&&(b=b.value()),Ao(f,function(O,N){return N.func.apply(N.thisArg,Un([O],N.args))},b)}function Pi(d,f,b){var O=d.length;if(O<2)return O?nt(d[0]):[];for(var N=-1,K=Me(O);++N<O;)for(var le=d[N],fe=-1;++fe<O;)fe!=N&&(K[N]=ul(K[N]||le,d[fe],f,b));return nt(Qn(K,1),f,b)}function En(d,f,b){for(var O=-1,N=d.length,K=f.length,le={};++O<N;){var fe=O<K?f[O]:e;b(le,d[O],fe)}return le}function si(d){return Pn(d)?d:[]}function Rn(d){return typeof d=="function"?d:Xr}function gn(d,f){return ri(d)?d:lp(d,f)?[d]:mg(Vi(d))}var Nc=ni;function lo(d,f,b){var O=d.length;return b=b===e?O:b,!f&&b>=O?d:Y(d,f,b)}var zd=Cd||function(d){return qi.clearTimeout(d)};function Uv(d,f){if(f)return d.slice();var b=d.length,O=tc?tc(b):new d.constructor(b);return d.copy(O),O}function Jf(d){var f=new d.constructor(d.byteLength);return new In(f).set(new In(d)),f}function gy(d,f){var b=f?Jf(d.buffer):d.buffer;return new d.constructor(b,d.byteOffset,d.byteLength)}function _y(d){var f=new d.constructor(d.source,Ct.exec(d));return f.lastIndex=d.lastIndex,f}function by(d){return Fs?Bi(Fs.call(d)):{}}function Gv(d,f){var b=f?Jf(d.buffer):d.buffer;return new d.constructor(b,d.byteOffset,d.length)}function Wv(d,f){if(d!==f){var b=d!==e,O=d===null,N=d===d,K=ao(d),le=f!==e,fe=f===null,Ae=f===f,Ze=ao(f);if(!fe&&!Ze&&!K&&d>f||K&&le&&Ae&&!fe&&!Ze||O&&le&&Ae||!b&&Ae||!N)return 1;if(!O&&!K&&!Ze&&d<f||Ze&&b&&N&&!O&&!K||fe&&b&&N||!le&&N||!Ae)return-1}return 0}function Cy(d,f,b){for(var O=-1,N=d.criteria,K=f.criteria,le=N.length,fe=b.length;++O<le;){var Ae=Wv(N[O],K[O]);if(Ae){if(O>=fe)return Ae;var Ze=b[O];return Ae*(Ze=="desc"?-1:1)}}return d.index-f.index}function $v(d,f,b,O){for(var N=-1,K=d.length,le=b.length,fe=-1,Ae=f.length,Ze=Dn(K-le,0),Qe=Me(Ae+Ze),et=!O;++fe<Ae;)Qe[fe]=f[fe];for(;++N<le;)(et||N<K)&&(Qe[b[N]]=d[N]);for(;Ze--;)Qe[fe++]=d[N++];return Qe}function Yv(d,f,b,O){for(var N=-1,K=d.length,le=-1,fe=b.length,Ae=-1,Ze=f.length,Qe=Dn(K-fe,0),et=Me(Qe+Ze),Tt=!O;++N<Qe;)et[N]=d[N];for(var Pt=N;++Ae<Ze;)et[Pt+Ae]=f[Ae];for(;++le<fe;)(Tt||N<K)&&(et[Pt+b[le]]=d[N++]);return et}function $r(d,f){var b=-1,O=d.length;for(f||(f=Me(O));++b<O;)f[b]=d[b];return f}function us(d,f,b,O){var N=!b;b||(b={});for(var K=-1,le=f.length;++K<le;){var fe=f[K],Ae=O?O(b[fe],d[fe],fe,b,d):e;Ae===e&&(Ae=d[fe]),N?zr(b,fe,Ae):al(b,fe,Ae)}return b}function yy(d,f){return us(d,sp(d),f)}function Ey(d,f){return us(d,og(d),f)}function Lc(d,f){return function(b,O){var N=ri(b)?To:Od,K=f?f():{};return N(b,d,Gt(O,2),K)}}function Ia(d){return ni(function(f,b){var O=-1,N=b.length,K=N>1?b[N-1]:e,le=N>2?b[2]:e;for(K=d.length>3&&typeof K=="function"?(N--,K):e,le&&Dr(b[0],b[1],le)&&(K=N<3?e:K,N=1),f=Bi(f);++O<N;){var fe=b[O];fe&&d(f,fe,O,K)}return f})}function jv(d,f){return function(b,O){if(b==null)return b;if(!Yr(b))return d(b,O);for(var N=b.length,K=f?N:-1,le=Bi(b);(f?K--:++K<N)&&O(le[K],K,le)!==!1;);return b}}function Xv(d){return function(f,b,O){for(var N=-1,K=Bi(f),le=O(f),fe=le.length;fe--;){var Ae=le[d?fe:++N];if(b(K[Ae],Ae,K)===!1)break}return f}}function Sy(d,f,b){var O=f&x,N=Ud(d);function K(){var le=this&&this!==qi&&this instanceof K?N:d;return le.apply(O?b:this,arguments)}return K}function qv(d){return function(f){f=Vi(f);var b=tl(f)?ro(f):e,O=b?b[0]:f.charAt(0),N=b?lo(b,1).join(""):f.slice(1);return O[d]()+N}}function Da(d){return function(f){return Ao(jg(Yg(f).replace(Br,"")),d,"")}}function Ud(d){return function(){var f=arguments;switch(f.length){case 0:return new d;case 1:return new d(f[0]);case 2:return new d(f[0],f[1]);case 3:return new d(f[0],f[1],f[2]);case 4:return new d(f[0],f[1],f[2],f[3]);case 5:return new d(f[0],f[1],f[2],f[3],f[4]);case 6:return new d(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return new d(f[0],f[1],f[2],f[3],f[4],f[5],f[6])}var b=as(d.prototype),O=d.apply(b,f);return Sn(O)?O:b}}function wy(d,f,b){var O=Ud(d);function N(){for(var K=arguments.length,le=Me(K),fe=K,Ae=Ra(N);fe--;)le[fe]=arguments[fe];var Ze=K<3&&le[0]!==Ae&&le[K-1]!==Ae?[]:rs(le,Ae);if(K-=Ze.length,K<b)return eg(d,f,Hc,N.placeholder,e,le,Ze,e,e,b-K);var Qe=this&&this!==qi&&this instanceof N?O:d;return nn(Qe,this,le)}return N}function Kv(d){return function(f,b,O){var N=Bi(f);if(!Yr(f)){var K=Gt(b,3);f=rr(f),b=function(fe){return K(N[fe],fe,N)}}var le=d(f,b,O);return le>-1?N[K?f[le]:le]:e}}function Zv(d){return Ls(function(f){var b=f.length,O=b,N=Qi.prototype.thru;for(d&&f.reverse();O--;){var K=f[O];if(typeof K!="function")throw new Tr(s);if(N&&!le&&Uc(K)=="wrapper")var le=new Qi([],!0)}for(O=le?O:b;++O<b;){K=f[O];var fe=Uc(K),Ae=fe=="wrapper"?rp(K):e;Ae&&ap(Ae[0])&&Ae[1]==(B|D|P|Z)&&!Ae[4].length&&Ae[9]==1?le=le[Uc(Ae[0])].apply(le,Ae[3]):le=K.length==1&&ap(K)?le[fe]():le.thru(K)}return function(){var Ze=arguments,Qe=Ze[0];if(le&&Ze.length==1&&ri(Qe))return le.plant(Qe).value();for(var et=0,Tt=b?f[et].apply(this,Ze):Qe;++et<b;)Tt=f[et].call(this,Tt);return Tt}})}function Hc(d,f,b,O,N,K,le,fe,Ae,Ze){var Qe=f&B,et=f&x,Tt=f&S,Pt=f&(D|A),$t=f&L,ci=Tt?e:Ud(d);function Yt(){for(var gi=arguments.length,wi=Me(gi),uo=gi;uo--;)wi[uo]=arguments[uo];if(Pt)var Rr=Ra(Yt),co=ju(wi,Rr);if(O&&(wi=$v(wi,O,N,Pt)),K&&(wi=Yv(wi,K,le,Pt)),gi-=co,Pt&&gi<Ze){var Fn=rs(wi,Rr);return eg(d,f,Hc,Yt.placeholder,b,wi,Fn,fe,Ae,Ze-gi)}var jo=et?b:this,zs=Tt?jo[d]:d;return gi=wi.length,fe?wi=Wy(wi,fe):$t&&gi>1&&wi.reverse(),Qe&&Ae<gi&&(wi.length=Ae),this&&this!==qi&&this instanceof Yt&&(zs=ci||Ud(zs)),zs.apply(jo,wi)}return Yt}function Qv(d,f){return function(b,O){return Oc(b,d,f(O),{})}}function Bc(d,f){return function(b,O){var N;if(b===e&&O===e)return f;if(b!==e&&(N=b),O!==e){if(N===e)return O;typeof b=="string"||typeof O=="string"?(b=pt(b),O=pt(O)):(b=ut(b),O=ut(O)),N=d(b,O)}return N}}function ep(d){return Ls(function(f){return f=$i(f,Zi(Gt())),ni(function(b){var O=this;return d(f,function(N){return nn(N,O,b)})})})}function Vc(d,f){f=f===e?" ":pt(f);var b=f.length;if(b<2)return b?Bd(f,d):f;var O=Bd(f,ca(d/os(f)));return tl(f)?lo(ro(O),0,d).join(""):O.slice(0,d)}function xy(d,f,b,O){var N=f&x,K=Ud(d);function le(){for(var fe=-1,Ae=arguments.length,Ze=-1,Qe=O.length,et=Me(Qe+Ae),Tt=this&&this!==qi&&this instanceof le?K:d;++Ze<Qe;)et[Ze]=O[Ze];for(;Ae--;)et[Ze++]=arguments[++fe];return nn(Tt,N?b:this,et)}return le}function Jv(d){return function(f,b,O){return O&&typeof O!="number"&&Dr(f,b,O)&&(b=O=e),f=Vs(f),b===e?(b=f,f=0):b=Vs(b),O=O===e?f<b?1:-1:Vs(O),ka(f,b,O,d)}}function zc(d){return function(f,b){return typeof f=="string"&&typeof b=="string"||(f=Io(f),b=Io(b)),d(f,b)}}function eg(d,f,b,O,N,K,le,fe,Ae,Ze){var Qe=f&D,et=Qe?le:e,Tt=Qe?e:le,Pt=Qe?K:e,$t=Qe?e:K;f|=Qe?P:M,f&=~(Qe?M:P),f&E||(f&=~(x|S));var ci=[d,f,N,Pt,et,$t,Tt,fe,Ae,Ze],Yt=b.apply(e,ci);return ap(d)&&hg(Yt,ci),Yt.placeholder=O,fg(Yt,d,f)}function tp(d){var f=kn[d];return function(b,O){if(b=Io(b),O=O==null?0:vn(li(O),292),O&&nc(b)){var N=(Vi(b)+"e").split("e"),K=f(N[0]+"e"+(+N[1]+O));return N=(Vi(K)+"e").split("e"),+(N[0]+"e"+(+N[1]-O))}return f(b)}}var Ty=ls&&1/ks(new ls([,-0]))[1]==Ie?function(d){return new ls(d)}:Sp;function tg(d){return function(f){var b=br(f);return b==k?vd(f):b==Fe?na(f):Ki(f,d(f))}}function Ns(d,f,b,O,N,K,le,fe){var Ae=f&S;if(!Ae&&typeof d!="function")throw new Tr(s);var Ze=O?O.length:0;if(Ze||(f&=~(P|M),O=N=e),le=le===e?le:Dn(li(le),0),fe=fe===e?fe:li(fe),Ze-=N?N.length:0,f&M){var Qe=O,et=N;O=N=e}var Tt=Ae?e:rp(d),Pt=[d,f,b,O,N,Qe,et,K,le,fe];if(Tt&&zy(Pt,Tt),d=Pt[0],f=Pt[1],b=Pt[2],O=Pt[3],N=Pt[4],fe=Pt[9]=Pt[9]===e?Ae?0:d.length:Dn(Pt[9]-Ze,0),!fe&&f&(D|A)&&(f&=~(D|A)),!f||f==x)var $t=Sy(d,f,b);else f==D||f==A?$t=wy(d,f,fe):(f==P||f==(x|P))&&!N.length?$t=xy(d,f,b,O):$t=Hc.apply(e,Pt);var ci=Tt?T:hg;return fg(ci($t,Pt),d,f)}function ig(d,f,b,O){return d===e||Yo(d,ss[b])&&!Di.call(O,b)?f:d}function ng(d,f,b,O,N,K){return Sn(d)&&Sn(f)&&(K.set(f,d),so(d,f,e,ng,K),K.delete(f)),d}function Oy(d){return $d(d)?e:d}function rg(d,f,b,O,N,K){var le=b&_,fe=d.length,Ae=f.length;if(fe!=Ae&&!(le&&Ae>fe))return!1;var Ze=K.get(d),Qe=K.get(f);if(Ze&&Qe)return Ze==f&&Qe==d;var et=-1,Tt=!0,Pt=b&C?new ds:e;for(K.set(d,f),K.set(f,d);++et<fe;){var $t=d[et],ci=f[et];if(O)var Yt=le?O(ci,$t,et,f,d,K):O($t,ci,et,d,f,K);if(Yt!==e){if(Yt)continue;Tt=!1;break}if(Pt){if(!Os(f,function(gi,wi){if(!As(Pt,wi)&&($t===gi||N($t,gi,b,O,K)))return Pt.push(wi)})){Tt=!1;break}}else if(!($t===ci||N($t,ci,b,O,K))){Tt=!1;break}}return K.delete(d),K.delete(f),Tt}function Ay(d,f,b,O,N,K,le){switch(b){case It:if(d.byteLength!=f.byteLength||d.byteOffset!=f.byteOffset)return!1;d=d.buffer,f=f.buffer;case jt:return!(d.byteLength!=f.byteLength||!K(new In(d),new In(f)));case be:case He:case ee:return Yo(+d,+f);case Ue:return d.name==f.name&&d.message==f.message;case Pe:case me:return d==f+"";case k:var fe=vd;case Fe:var Ae=O&_;if(fe||(fe=ks),d.size!=f.size&&!Ae)return!1;var Ze=le.get(d);if(Ze)return Ze==f;O|=C,le.set(d,f);var Qe=rg(fe(d),fe(f),O,N,K,le);return le.delete(d),Qe;case We:if(Fs)return Fs.call(d)==Fs.call(f)}return!1}function ky(d,f,b,O,N,K){var le=b&_,fe=ip(d),Ae=fe.length,Ze=ip(f),Qe=Ze.length;if(Ae!=Qe&&!le)return!1;for(var et=Ae;et--;){var Tt=fe[et];if(!(le?Tt in f:Di.call(f,Tt)))return!1}var Pt=K.get(d),$t=K.get(f);if(Pt&&$t)return Pt==f&&$t==d;var ci=!0;K.set(d,f),K.set(f,d);for(var Yt=le;++et<Ae;){Tt=fe[et];var gi=d[Tt],wi=f[Tt];if(O)var uo=le?O(wi,gi,Tt,f,d,K):O(gi,wi,Tt,d,f,K);if(!(uo===e?gi===wi||N(gi,wi,b,O,K):uo)){ci=!1;break}Yt||(Yt=Tt=="constructor")}if(ci&&!Yt){var Rr=d.constructor,co=f.constructor;Rr!=co&&"constructor"in d&&"constructor"in f&&!(typeof Rr=="function"&&Rr instanceof Rr&&typeof co=="function"&&co instanceof co)&&(ci=!1)}return K.delete(d),K.delete(f),ci}function Ls(d){return up(ug(d,e,bg),d+"")}function ip(d){return wa(d,rr,sp)}function np(d){return wa(d,jr,og)}var rp=Or?function(d){return Or.get(d)}:Sp;function Uc(d){for(var f=d.name+"",b=sl[f],O=Di.call(sl,f)?b.length:0;O--;){var N=b[O],K=N.func;if(K==null||K==d)return N.name}return f}function Ra(d){var f=Di.call(G,"placeholder")?G:d;return f.placeholder}function Gt(){var d=G.iteratee||yp;return d=d===yp?Rd:d,arguments.length?d(arguments[0],arguments[1]):d}function Gc(d,f){var b=d.__data__;return Ly(f)?b[typeof f=="string"?"string":"hash"]:b.map}function op(d){for(var f=rr(d),b=f.length;b--;){var O=f[b],N=d[O];f[b]=[O,N,ag(N)]}return f}function Ll(d,f){var b=qu(d,f);return kc(b)?b:e}function Iy(d){var f=Di.call(d,Rs),b=d[Rs];try{d[Rs]=e;var O=!0}catch{}var N=sa.call(d);return O&&(f?d[Rs]=b:delete d[Rs]),N}var sp=ha?function(d){return d==null?[]:(d=Bi(d),Ft(ha(d),function(f){return ic.call(d,f)}))}:wp,og=ha?function(d){for(var f=[];d;)Un(f,sp(d)),d=la(d);return f}:wp,br=dr;(ma&&br(new ma(new ArrayBuffer(1)))!=It||Vo&&br(new Vo)!=k||yd&&br(yd.resolve())!=X||ls&&br(new ls)!=Fe||rl&&br(new rl)!=Ge)&&(br=function(d){var f=dr(d),b=f==$?d.constructor:e,O=b?Hl(b):"";if(O)switch(O){case va:return It;case ga:return k;case sc:return X;case _a:return Fe;case Nf:return Ge}return f});function Dy(d,f,b){for(var O=-1,N=b.length;++O<N;){var K=b[O],le=K.size;switch(K.type){case"drop":d+=le;break;case"dropRight":f-=le;break;case"take":f=vn(f,d+le);break;case"takeRight":d=Dn(d,f-le);break}}return{start:d,end:f}}function Ry(d){var f=d.match(Ai);return f?f[1].split(zi):[]}function sg(d,f,b){f=gn(f,d);for(var O=-1,N=f.length,K=!1;++O<N;){var le=cs(f[O]);if(!(K=d!=null&&b(d,le)))break;d=d[le]}return K||++O!=N?K:(N=d==null?0:d.length,!!N&&Kc(N)&&Hs(le,N)&&(ri(d)||Bl(d)))}function Py(d){var f=d.length,b=new d.constructor(f);return f&&typeof d[0]=="string"&&Di.call(d,"index")&&(b.index=d.index,b.input=d.input),b}function lg(d){return typeof d.constructor=="function"&&!Gd(d)?as(la(d)):{}}function Fy(d,f,b){var O=d.constructor;switch(f){case jt:return Jf(d);case be:case He:return new O(+d);case It:return gy(d,b);case bi:case q:case W:case ve:case ke:case at:case st:case ht:case Dt:return Gv(d,b);case k:return new O;case ee:case me:return new O(d);case Pe:return _y(d);case Fe:return new O;case We:return by(d)}}function My(d,f){var b=f.length;if(!b)return d;var O=b-1;return f[O]=(b>1?"& ":"")+f[O],f=f.join(b>2?", ":" "),d.replace(ei,`{
58
58
  /* [wrapped with `+f+`] */
59
59
  `)}function Ny(d){return ri(d)||Bl(d)||!!(bd&&d&&d[bd])}function Hs(d,f){var b=typeof d;return f=f??xe,!!f&&(b=="number"||b!="symbol"&&Ui.test(d))&&d>-1&&d%1==0&&d<f}function Dr(d,f,b){if(!Sn(b))return!1;var O=typeof f;return(O=="number"?Yr(b)&&Hs(f,b.length):O=="string"&&f in b)?Yo(b[f],d):!1}function lp(d,f){if(ri(d))return!1;var b=typeof d;return b=="number"||b=="symbol"||b=="boolean"||d==null||ao(d)?!0:vt.test(d)||!lt.test(d)||f!=null&&d in Bi(f)}function Ly(d){var f=typeof d;return f=="string"||f=="number"||f=="symbol"||f=="boolean"?d!=="__proto__":d===null}function ap(d){var f=Uc(d),b=G[f];if(typeof b!="function"||!(f in fi.prototype))return!1;if(d===b)return!0;var O=rp(b);return!!O&&d===O[0]}function Hy(d){return!!Ju&&Ju in d}var By=Il?Bs:xp;function Gd(d){var f=d&&d.constructor,b=typeof f=="function"&&f.prototype||ss;return d===b}function ag(d){return d===d&&!Sn(d)}function dg(d,f){return function(b){return b==null?!1:b[d]===f&&(f!==e||d in Bi(b))}}function Vy(d){var f=Xc(d,function(O){return b.size===h&&b.clear(),O}),b=f.cache;return f}function zy(d,f){var b=d[1],O=f[1],N=b|O,K=N<(x|S|B),le=O==B&&b==D||O==B&&b==Z&&d[7].length<=f[8]||O==(B|Z)&&f[7].length<=f[8]&&b==D;if(!(K||le))return d;O&x&&(d[2]=f[2],N|=b&x?0:E);var fe=f[3];if(fe){var Ae=d[3];d[3]=Ae?$v(Ae,fe,f[4]):fe,d[4]=Ae?rs(d[3],c):f[4]}return fe=f[5],fe&&(Ae=d[5],d[5]=Ae?Yv(Ae,fe,f[6]):fe,d[6]=Ae?rs(d[5],c):f[6]),fe=f[7],fe&&(d[7]=fe),O&B&&(d[8]=d[8]==null?f[8]:vn(d[8],f[8])),d[9]==null&&(d[9]=f[9]),d[0]=f[0],d[1]=N,d}function Uy(d){var f=[];if(d!=null)for(var b in Bi(d))f.push(b);return f}function Gy(d){return sa.call(d)}function ug(d,f,b){return f=Dn(f===e?d.length-1:f,0),function(){for(var O=arguments,N=-1,K=Dn(O.length-f,0),le=Me(K);++N<K;)le[N]=O[f+N];N=-1;for(var fe=Me(f+1);++N<f;)fe[N]=O[N];return fe[f]=b(le),nn(d,this,fe)}}function cg(d,f){return f.length<2?d:Ms(d,Y(f,0,-1))}function Wy(d,f){for(var b=d.length,O=vn(f.length,b),N=$r(d);O--;){var K=f[O];d[O]=Hs(K,b)?N[K]:e}return d}function dp(d,f){if(!(f==="constructor"&&typeof d[f]=="function")&&f!="__proto__")return d[f]}var hg=pg(T),Wd=Bo||function(d,f){return qi.setTimeout(d,f)},up=pg(I);function fg(d,f,b){var O=f+"";return up(d,My(O,$y(Ry(O),b)))}function pg(d){var f=0,b=0;return function(){var O=Ff(),N=U-(O-b);if(b=O,N>0){if(++f>=J)return arguments[0]}else f=0;return d.apply(e,arguments)}}function Wc(d,f){var b=-1,O=d.length,N=O-1;for(f=f===e?O:f;++b<f;){var K=Hd(b,N),le=d[K];d[K]=d[b],d[b]=le}return d.length=f,d}var mg=Vy(function(d){var f=[];return d.charCodeAt(0)===46&&f.push(""),d.replace(it,function(b,O,N,K){f.push(N?K.replace(Bn,"$1"):O||b)}),f});function cs(d){if(typeof d=="string"||ao(d))return d;var f=d+"";return f=="0"&&1/d==-Ie?"-0":f}function Hl(d){if(d!=null){try{return Ds.call(d)}catch{}try{return d+""}catch{}}return""}function $y(d,f){return rn(Ye,function(b){var O="_."+b[0];f&b[1]&&!Qs(d,O)&&d.push(O)}),d.sort()}function vg(d){if(d instanceof fi)return d.clone();var f=new Qi(d.__wrapped__,d.__chain__);return f.__actions__=$r(d.__actions__),f.__index__=d.__index__,f.__values__=d.__values__,f}function Yy(d,f,b){(b?Dr(d,f,b):f===e)?f=1:f=Dn(li(f),0);var O=d==null?0:d.length;if(!O||f<1)return[];for(var N=0,K=0,le=Me(ca(O/f));N<O;)le[K++]=Y(d,N,N+=f);return le}function jy(d){for(var f=-1,b=d==null?0:d.length,O=0,N=[];++f<b;){var K=d[f];K&&(N[O++]=K)}return N}function Xy(){var d=arguments.length;if(!d)return[];for(var f=Me(d-1),b=arguments[0],O=d;O--;)f[O-1]=arguments[O];return Un(ri(b)?$r(b):[b],Qn(f,1))}var qy=ni(function(d,f){return Pn(d)?ul(d,Qn(f,1,Pn,!0)):[]}),Ky=ni(function(d,f){var b=ko(f);return Pn(b)&&(b=e),Pn(d)?ul(d,Qn(f,1,Pn,!0),Gt(b,2)):[]}),Zy=ni(function(d,f){var b=ko(f);return Pn(b)&&(b=e),Pn(d)?ul(d,Qn(f,1,Pn,!0),e,b):[]});function Qy(d,f,b){var O=d==null?0:d.length;return O?(f=b||f===e?1:li(f),Y(d,f<0?0:f,O)):[]}function Jy(d,f,b){var O=d==null?0:d.length;return O?(f=b||f===e?1:li(f),f=O-f,Y(d,0,f<0?0:f)):[]}function eE(d,f){return d&&d.length?yi(d,Gt(f,3),!0,!0):[]}function tE(d,f){return d&&d.length?yi(d,Gt(f,3),!0):[]}function iE(d,f,b,O){var N=d==null?0:d.length;return N?(b&&typeof b!="number"&&Dr(d,f,b)&&(b=0,O=N),ya(d,f,b,O)):[]}function gg(d,f,b){var O=d==null?0:d.length;if(!O)return-1;var N=b==null?0:li(b);return N<0&&(N=Dn(O+N,0)),w(d,Gt(f,3),N)}function _g(d,f,b){var O=d==null?0:d.length;if(!O)return-1;var N=O-1;return b!==e&&(N=li(b),N=b<0?Dn(O+N,0):vn(N,O-1)),w(d,Gt(f,3),N,!0)}function bg(d){var f=d==null?0:d.length;return f?Qn(d,1):[]}function nE(d){var f=d==null?0:d.length;return f?Qn(d,Ie):[]}function rE(d,f){var b=d==null?0:d.length;return b?(f=f===e?1:li(f),Qn(d,f)):[]}function oE(d){for(var f=-1,b=d==null?0:d.length,O={};++f<b;){var N=d[f];O[N[0]]=N[1]}return O}function Cg(d){return d&&d.length?d[0]:e}function sE(d,f,b){var O=d==null?0:d.length;if(!O)return-1;var N=b==null?0:li(b);return N<0&&(N=Dn(O+N,0)),R(d,f,N)}function lE(d){var f=d==null?0:d.length;return f?Y(d,0,-1):[]}var aE=ni(function(d){var f=$i(d,si);return f.length&&f[0]===d[0]?Ta(f):[]}),dE=ni(function(d){var f=ko(d),b=$i(d,si);return f===ko(b)?f=e:b.pop(),b.length&&b[0]===d[0]?Ta(b,Gt(f,2)):[]}),uE=ni(function(d){var f=ko(d),b=$i(d,si);return f=typeof f=="function"?f:e,f&&b.pop(),b.length&&b[0]===d[0]?Ta(b,e,f):[]});function cE(d,f){return d==null?"":pa.call(d,f)}function ko(d){var f=d==null?0:d.length;return f?d[f-1]:e}function hE(d,f,b){var O=d==null?0:d.length;if(!O)return-1;var N=O;return b!==e&&(N=li(b),N=N<0?Dn(O+N,0):vn(N,O-1)),f===f?ra(d,f,N):w(d,te,N,!0)}function fE(d,f){return d&&d.length?Rc(d,li(f)):e}var pE=ni(yg);function yg(d,f){return d&&d.length&&f&&f.length?Ld(d,f):d}function mE(d,f,b){return d&&d.length&&f&&f.length?Ld(d,f,Gt(b,2)):d}function vE(d,f,b){return d&&d.length&&f&&f.length?Ld(d,f,e,b):d}var gE=Ls(function(d,f){var b=d==null?0:d.length,O=Go(d,f);return Mc(d,$i(f,function(N){return Hs(N,b)?+N:N}).sort(Wv)),O});function _E(d,f){var b=[];if(!(d&&d.length))return b;var O=-1,N=[],K=d.length;for(f=Gt(f,3);++O<K;){var le=d[O];f(le,O,d)&&(b.push(le),N.push(O))}return Mc(d,N),b}function cp(d){return d==null?d:oc.call(d)}function bE(d,f,b){var O=d==null?0:d.length;return O?(b&&typeof b!="number"&&Dr(d,f,b)?(f=0,b=O):(f=f==null?0:li(f),b=b===e?O:li(b)),Y(d,f,b)):[]}function CE(d,f){return Te(d,f)}function yE(d,f,b){return tt(d,f,Gt(b,2))}function EE(d,f){var b=d==null?0:d.length;if(b){var O=Te(d,f);if(O<b&&Yo(d[O],f))return O}return-1}function SE(d,f){return Te(d,f,!0)}function wE(d,f,b){return tt(d,f,Gt(b,2),!0)}function xE(d,f){var b=d==null?0:d.length;if(b){var O=Te(d,f,!0)-1;if(Yo(d[O],f))return O}return-1}function TE(d){return d&&d.length?rt(d):[]}function OE(d,f){return d&&d.length?rt(d,Gt(f,2)):[]}function AE(d){var f=d==null?0:d.length;return f?Y(d,1,f):[]}function kE(d,f,b){return d&&d.length?(f=b||f===e?1:li(f),Y(d,0,f<0?0:f)):[]}function IE(d,f,b){var O=d==null?0:d.length;return O?(f=b||f===e?1:li(f),f=O-f,Y(d,f<0?0:f,O)):[]}function DE(d,f){return d&&d.length?yi(d,Gt(f,3),!1,!0):[]}function RE(d,f){return d&&d.length?yi(d,Gt(f,3)):[]}var PE=ni(function(d){return nt(Qn(d,1,Pn,!0))}),FE=ni(function(d){var f=ko(d);return Pn(f)&&(f=e),nt(Qn(d,1,Pn,!0),Gt(f,2))}),ME=ni(function(d){var f=ko(d);return f=typeof f=="function"?f:e,nt(Qn(d,1,Pn,!0),e,f)});function NE(d){return d&&d.length?nt(d):[]}function LE(d,f){return d&&d.length?nt(d,Gt(f,2)):[]}function HE(d,f){return f=typeof f=="function"?f:e,d&&d.length?nt(d,e,f):[]}function hp(d){if(!(d&&d.length))return[];var f=0;return d=Ft(d,function(b){if(Pn(b))return f=Dn(b.length,f),!0}),Mt(f,function(b){return $i(d,Be(b))})}function Eg(d,f){if(!(d&&d.length))return[];var b=hp(d);return f==null?b:$i(b,function(O){return nn(f,e,O)})}var BE=ni(function(d,f){return Pn(d)?ul(d,f):[]}),VE=ni(function(d){return Pi(Ft(d,Pn))}),zE=ni(function(d){var f=ko(d);return Pn(f)&&(f=e),Pi(Ft(d,Pn),Gt(f,2))}),UE=ni(function(d){var f=ko(d);return f=typeof f=="function"?f:e,Pi(Ft(d,Pn),e,f)}),GE=ni(hp);function WE(d,f){return En(d||[],f||[],al)}function $E(d,f){return En(d||[],f||[],y)}var YE=ni(function(d){var f=d.length,b=f>1?d[f-1]:e;return b=typeof b=="function"?(d.pop(),b):e,Eg(d,b)});function Sg(d){var f=G(d);return f.__chain__=!0,f}function jE(d,f){return f(d),d}function $c(d,f){return f(d)}var XE=Ls(function(d){var f=d.length,b=f?d[0]:0,O=this.__wrapped__,N=function(K){return Go(K,d)};return f>1||this.__actions__.length||!(O instanceof fi)||!Hs(b)?this.thru(N):(O=O.slice(b,+b+(f?1:0)),O.__actions__.push({func:$c,args:[N],thisArg:e}),new Qi(O,this.__chain__).thru(function(K){return f&&!K.length&&K.push(e),K}))});function qE(){return Sg(this)}function KE(){return new Qi(this.value(),this.__chain__)}function ZE(){this.__values__===e&&(this.__values__=Lg(this.value()));var d=this.__index__>=this.__values__.length,f=d?e:this.__values__[this.__index__++];return{done:d,value:f}}function QE(){return this}function JE(d){for(var f,b=this;b instanceof ba;){var O=vg(b);O.__index__=0,O.__values__=e,f?N.__wrapped__=O:f=O;var N=O;b=b.__wrapped__}return N.__wrapped__=d,f}function eS(){var d=this.__wrapped__;if(d instanceof fi){var f=d;return this.__actions__.length&&(f=new fi(this)),f=f.reverse(),f.__actions__.push({func:$c,args:[cp],thisArg:e}),new Qi(f,this.__chain__)}return this.thru(cp)}function tS(){return Yi(this.__wrapped__,this.__actions__)}var iS=Lc(function(d,f,b){Di.call(d,b)?++d[b]:zr(d,b,1)});function nS(d,f,b){var O=ri(d)?Oo:Ec;return b&&Dr(d,f,b)&&(f=e),O(d,Gt(f,3))}function rS(d,f){var b=ri(d)?Ft:Ad;return b(d,Gt(f,3))}var oS=Kv(gg),sS=Kv(_g);function lS(d,f){return Qn(Yc(d,f),1)}function aS(d,f){return Qn(Yc(d,f),Ie)}function dS(d,f,b){return b=b===e?1:li(b),Qn(Yc(d,f),b)}function wg(d,f){var b=ri(d)?rn:Zn;return b(d,Gt(f,3))}function xg(d,f){var b=ri(d)?Kn:Ml;return b(d,Gt(f,3))}var uS=Lc(function(d,f,b){Di.call(d,b)?d[b].push(f):zr(d,b,[f])});function cS(d,f,b,O){d=Yr(d)?d:Fa(d),b=b&&!O?li(b):0;var N=d.length;return b<0&&(b=Dn(N+b,0)),Zc(d)?b<=N&&d.indexOf(f,b)>-1:!!N&&R(d,f,b)>-1}var hS=ni(function(d,f,b){var O=-1,N=typeof f=="function",K=Yr(d)?Me(d.length):[];return Zn(d,function(le){K[++O]=N?nn(f,le,b):Gr(le,f,b)}),K}),fS=Lc(function(d,f,b){zr(d,b,f)});function Yc(d,f){var b=ri(d)?$i:Pd;return b(d,Gt(f,3))}function pS(d,f,b,O){return d==null?[]:(ri(f)||(f=f==null?[]:[f]),b=O?e:b,ri(b)||(b=b==null?[]:[b]),Pc(d,f,b))}var mS=Lc(function(d,f,b){d[b?0:1].push(f)},function(){return[[],[]]});function vS(d,f,b){var O=ri(d)?Ao:yt,N=arguments.length<3;return O(d,Gt(f,4),b,N,Zn)}function gS(d,f,b){var O=ri(d)?fd:yt,N=arguments.length<3;return O(d,Gt(f,4),b,N,Ml)}function _S(d,f){var b=ri(d)?Ft:Ad;return b(d,qc(Gt(f,3)))}function bS(d){var f=ri(d)?xd:Vd;return f(d)}function CS(d,f,b){(b?Dr(d,f,b):f===e)?f=1:f=li(f);var O=ri(d)?Cc:$o;return O(d,f)}function yS(d){var f=ri(d)?Td:V;return f(d)}function ES(d){if(d==null)return 0;if(Yr(d))return Zc(d)?os(d):d.length;var f=br(d);return f==k||f==Fe?d.size:hl(d).length}function SS(d,f,b){var O=ri(d)?Os:j;return b&&Dr(d,f,b)&&(f=e),O(d,Gt(f,3))}var wS=ni(function(d,f){if(d==null)return[];var b=f.length;return b>1&&Dr(d,f[0],f[1])?f=[]:b>2&&Dr(f[0],f[1],f[2])&&(f=[f[0]]),Pc(d,Qn(f,1),[])}),jc=ua||function(){return qi.Date.now()};function xS(d,f){if(typeof f!="function")throw new Tr(s);return d=li(d),function(){if(--d<1)return f.apply(this,arguments)}}function Tg(d,f,b){return f=b?e:f,f=d&&f==null?d.length:f,Ns(d,B,e,e,e,e,f)}function Og(d,f){var b;if(typeof f!="function")throw new Tr(s);return d=li(d),function(){return--d>0&&(b=f.apply(this,arguments)),d<=1&&(f=e),b}}var fp=ni(function(d,f,b){var O=x;if(b.length){var N=rs(b,Ra(fp));O|=P}return Ns(d,O,f,b,N)}),Ag=ni(function(d,f,b){var O=x|S;if(b.length){var N=rs(b,Ra(Ag));O|=P}return Ns(f,O,d,b,N)});function kg(d,f,b){f=b?e:f;var O=Ns(d,D,e,e,e,e,e,f);return O.placeholder=kg.placeholder,O}function Ig(d,f,b){f=b?e:f;var O=Ns(d,A,e,e,e,e,e,f);return O.placeholder=Ig.placeholder,O}function Dg(d,f,b){var O,N,K,le,fe,Ae,Ze=0,Qe=!1,et=!1,Tt=!0;if(typeof d!="function")throw new Tr(s);f=Io(f)||0,Sn(b)&&(Qe=!!b.leading,et="maxWait"in b,K=et?Dn(Io(b.maxWait)||0,f):K,Tt="trailing"in b?!!b.trailing:Tt);function Pt(Fn){var jo=O,zs=N;return O=N=e,Ze=Fn,le=d.apply(zs,jo),le}function $t(Fn){return Ze=Fn,fe=Wd(gi,f),Qe?Pt(Fn):le}function ci(Fn){var jo=Fn-Ae,zs=Fn-Ze,Kg=f-jo;return et?vn(Kg,K-zs):Kg}function Yt(Fn){var jo=Fn-Ae,zs=Fn-Ze;return Ae===e||jo>=f||jo<0||et&&zs>=K}function gi(){var Fn=jc();if(Yt(Fn))return wi(Fn);fe=Wd(gi,ci(Fn))}function wi(Fn){return fe=e,Tt&&O?Pt(Fn):(O=N=e,le)}function uo(){fe!==e&&zd(fe),Ze=0,O=Ae=N=fe=e}function Rr(){return fe===e?le:wi(jc())}function co(){var Fn=jc(),jo=Yt(Fn);if(O=arguments,N=this,Ae=Fn,jo){if(fe===e)return $t(Ae);if(et)return zd(fe),fe=Wd(gi,f),Pt(Ae)}return fe===e&&(fe=Wd(gi,f)),le}return co.cancel=uo,co.flush=Rr,co}var TS=ni(function(d,f){return yc(d,1,f)}),OS=ni(function(d,f,b){return yc(d,Io(f)||0,b)});function AS(d){return Ns(d,L)}function Xc(d,f){if(typeof d!="function"||f!=null&&typeof f!="function")throw new Tr(s);var b=function(){var O=arguments,N=f?f.apply(this,O):O[0],K=b.cache;if(K.has(N))return K.get(N);var le=d.apply(this,O);return b.cache=K.set(N,le)||K,le};return b.cache=new(Xc.Cache||Uo),b}Xc.Cache=Uo;function qc(d){if(typeof d!="function")throw new Tr(s);return function(){var f=arguments;switch(f.length){case 0:return!d.call(this);case 1:return!d.call(this,f[0]);case 2:return!d.call(this,f[0],f[1]);case 3:return!d.call(this,f[0],f[1],f[2])}return!d.apply(this,f)}}function kS(d){return Og(2,d)}var IS=Nc(function(d,f){f=f.length==1&&ri(f[0])?$i(f[0],Zi(Gt())):$i(Qn(f,1),Zi(Gt()));var b=f.length;return ni(function(O){for(var N=-1,K=vn(O.length,b);++N<K;)O[N]=f[N].call(this,O[N]);return nn(d,this,O)})}),pp=ni(function(d,f){var b=rs(f,Ra(pp));return Ns(d,P,e,f,b)}),Rg=ni(function(d,f){var b=rs(f,Ra(Rg));return Ns(d,M,e,f,b)}),DS=Ls(function(d,f){return Ns(d,Z,e,e,e,f)});function RS(d,f){if(typeof d!="function")throw new Tr(s);return f=f===e?f:li(f),ni(d,f)}function PS(d,f){if(typeof d!="function")throw new Tr(s);return f=f==null?0:Dn(li(f),0),ni(function(b){var O=b[f],N=lo(b,0,f);return O&&Un(N,O),nn(d,this,N)})}function FS(d,f,b){var O=!0,N=!0;if(typeof d!="function")throw new Tr(s);return Sn(b)&&(O="leading"in b?!!b.leading:O,N="trailing"in b?!!b.trailing:N),Dg(d,f,{leading:O,maxWait:f,trailing:N})}function MS(d){return Tg(d,1)}function NS(d,f){return pp(Rn(f),d)}function LS(){if(!arguments.length)return[];var d=arguments[0];return ri(d)?d:[d]}function HS(d){return kr(d,v)}function BS(d,f){return f=typeof f=="function"?f:e,kr(d,v,f)}function VS(d){return kr(d,p|v)}function zS(d,f){return f=typeof f=="function"?f:e,kr(d,p|v,f)}function US(d,f){return f==null||Wo(d,f,rr(f))}function Yo(d,f){return d===f||d!==d&&f!==f}var GS=zc(xa),WS=zc(function(d,f){return d>=f}),Bl=Oa(function(){return arguments}())?Oa:function(d){return An(d)&&Di.call(d,"callee")&&!ic.call(d,"callee")},ri=Me.isArray,$S=Zs?Zi(Zs):Ac;function Yr(d){return d!=null&&Kc(d.length)&&!Bs(d)}function Pn(d){return An(d)&&Yr(d)}function YS(d){return d===!0||d===!1||An(d)&&dr(d)==be}var fl=fa||xp,jS=xr?Zi(xr):Id;function XS(d){return An(d)&&d.nodeType===1&&!$d(d)}function qS(d){if(d==null)return!0;if(Yr(d)&&(ri(d)||typeof d=="string"||typeof d.splice=="function"||fl(d)||Pa(d)||Bl(d)))return!d.length;var f=br(d);if(f==k||f==Fe)return!d.size;if(Gd(d))return!hl(d).length;for(var b in d)if(Di.call(d,b))return!1;return!0}function KS(d,f){return cl(d,f)}function ZS(d,f,b){b=typeof b=="function"?b:e;var O=b?b(d,f):e;return O===e?cl(d,f,e,b):!!O}function mp(d){if(!An(d))return!1;var f=dr(d);return f==Ue||f==ot||typeof d.message=="string"&&typeof d.name=="string"&&!$d(d)}function QS(d){return typeof d=="number"&&nc(d)}function Bs(d){if(!Sn(d))return!1;var f=dr(d);return f==St||f==ct||f==Ce||f==re}function Pg(d){return typeof d=="number"&&d==li(d)}function Kc(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=xe}function Sn(d){var f=typeof d;return d!=null&&(f=="object"||f=="function")}function An(d){return d!=null&&typeof d=="object"}var Fg=Ol?Zi(Ol):Kf;function JS(d,f){return d===f||Dd(d,f,op(f))}function ew(d,f,b){return b=typeof b=="function"?b:e,Dd(d,f,op(f),b)}function tw(d){return Mg(d)&&d!=+d}function iw(d){if(By(d))throw new Xt(o);return kc(d)}function nw(d){return d===null}function rw(d){return d==null}function Mg(d){return typeof d=="number"||An(d)&&dr(d)==ee}function $d(d){if(!An(d)||dr(d)!=$)return!1;var f=la(d);if(f===null)return!0;var b=Di.call(f,"constructor")&&f.constructor;return typeof b=="function"&&b instanceof b&&Ds.call(b)==ec}var vp=xs?Zi(xs):Zf;function ow(d){return Pg(d)&&d>=-xe&&d<=xe}var Ng=Al?Zi(Al):Qf;function Zc(d){return typeof d=="string"||!ri(d)&&An(d)&&dr(d)==me}function ao(d){return typeof d=="symbol"||An(d)&&dr(d)==We}var Pa=Ts?Zi(Ts):Ic;function sw(d){return d===e}function lw(d){return An(d)&&br(d)==Ge}function aw(d){return An(d)&&dr(d)==Le}var dw=zc(Aa),uw=zc(function(d,f){return d<=f});function Lg(d){if(!d)return[];if(Yr(d))return Zc(d)?ro(d):$r(d);if(Dl&&d[Dl])return Ku(d[Dl]());var f=br(d),b=f==k?vd:f==Fe?ks:Fa;return b(d)}function Vs(d){if(!d)return d===0?d:0;if(d=Io(d),d===Ie||d===-Ie){var f=d<0?-1:1;return f*Oe}return d===d?d:0}function li(d){var f=Vs(d),b=f%1;return f===f?b?f-b:f:0}function Hg(d){return d?Ur(li(d),0,ne):0}function Io(d){if(typeof d=="number")return d;if(ao(d))return De;if(Sn(d)){var f=typeof d.valueOf=="function"?d.valueOf():d;d=Sn(f)?f+"":f}if(typeof d!="string")return d===0?d:+d;d=ln(d);var b=Xe.test(d);return b||ti.test(d)?es(d.slice(2),b?2:8):Se.test(d)?De:+d}function Bg(d){return us(d,jr(d))}function cw(d){return d?Ur(li(d),-xe,xe):d===0?d:0}function Vi(d){return d==null?"":pt(d)}var hw=Ia(function(d,f){if(Gd(f)||Yr(f)){us(f,rr(f),d);return}for(var b in f)Di.call(f,b)&&al(d,b,f[b])}),Vg=Ia(function(d,f){us(f,jr(f),d)}),Qc=Ia(function(d,f,b,O){us(f,jr(f),d,O)}),fw=Ia(function(d,f,b,O){us(f,rr(f),d,O)}),pw=Ls(Go);function mw(d,f){var b=as(d);return f==null?b:dl(b,f)}var vw=ni(function(d,f){d=Bi(d);var b=-1,O=f.length,N=O>2?f[2]:e;for(N&&Dr(f[0],f[1],N)&&(O=1);++b<O;)for(var K=f[b],le=jr(K),fe=-1,Ae=le.length;++fe<Ae;){var Ze=le[fe],Qe=d[Ze];(Qe===e||Yo(Qe,ss[Ze])&&!Di.call(d,Ze))&&(d[Ze]=K[Ze])}return d}),gw=ni(function(d){return d.push(e,ng),nn(zg,e,d)});function _w(d,f){return g(d,Gt(f,3),oo)}function bw(d,f){return g(d,Gt(f,3),kd)}function Cw(d,f){return d==null?d:Ea(d,Gt(f,3),jr)}function yw(d,f){return d==null?d:Sc(d,Gt(f,3),jr)}function Ew(d,f){return d&&oo(d,Gt(f,3))}function Sw(d,f){return d&&kd(d,Gt(f,3))}function ww(d){return d==null?[]:Sa(d,rr(d))}function xw(d){return d==null?[]:Sa(d,jr(d))}function gp(d,f,b){var O=d==null?e:Ms(d,f);return O===e?b:O}function Tw(d,f){return d!=null&&sg(d,f,wc)}function _p(d,f){return d!=null&&sg(d,f,xc)}var Ow=Qv(function(d,f,b){f!=null&&typeof f.toString!="function"&&(f=sa.call(f)),d[f]=b},Cp(Xr)),Aw=Qv(function(d,f,b){f!=null&&typeof f.toString!="function"&&(f=sa.call(f)),Di.call(d,f)?d[f].push(b):d[f]=[b]},Gt),kw=ni(Gr);function rr(d){return Yr(d)?wd(d):hl(d)}function jr(d){return Yr(d)?wd(d,!0):Dc(d)}function Iw(d,f){var b={};return f=Gt(f,3),oo(d,function(O,N,K){zr(b,f(O,N,K),O)}),b}function Dw(d,f){var b={};return f=Gt(f,3),oo(d,function(O,N,K){zr(b,N,f(O,N,K))}),b}var Rw=Ia(function(d,f,b){so(d,f,b)}),zg=Ia(function(d,f,b,O){so(d,f,b,O)}),Pw=Ls(function(d,f){var b={};if(d==null)return b;var O=!1;f=$i(f,function(K){return K=gn(K,d),O||(O=K.length>1),K}),us(d,np(d),b),O&&(b=kr(b,p|m|v,Oy));for(var N=f.length;N--;)pi(b,f[N]);return b});function Fw(d,f){return Ug(d,qc(Gt(f)))}var Mw=Ls(function(d,f){return d==null?{}:Wr(d,f)});function Ug(d,f){if(d==null)return{};var b=$i(np(d),function(O){return[O]});return f=Gt(f),Nd(d,b,function(O,N){return f(O,N[0])})}function Nw(d,f,b){f=gn(f,d);var O=-1,N=f.length;for(N||(N=1,d=e);++O<N;){var K=d==null?e:d[cs(f[O])];K===e&&(O=N,K=b),d=Bs(K)?K.call(d):K}return d}function Lw(d,f,b){return d==null?d:y(d,f,b)}function Hw(d,f,b,O){return O=typeof O=="function"?O:e,d==null?d:y(d,f,b,O)}var Gg=tg(rr),Wg=tg(jr);function Bw(d,f,b){var O=ri(d),N=O||fl(d)||Pa(d);if(f=Gt(f,4),b==null){var K=d&&d.constructor;N?b=O?new K:[]:Sn(d)?b=Bs(K)?as(la(d)):{}:b={}}return(N?rn:oo)(d,function(le,fe,Ae){return f(b,le,fe,Ae)}),b}function Vw(d,f){return d==null?!0:pi(d,f)}function zw(d,f,b){return d==null?d:Qt(d,f,Rn(b))}function Uw(d,f,b,O){return O=typeof O=="function"?O:e,d==null?d:Qt(d,f,Rn(b),O)}function Fa(d){return d==null?[]:is(d,rr(d))}function Gw(d){return d==null?[]:is(d,jr(d))}function Ww(d,f,b){return b===e&&(b=f,f=e),b!==e&&(b=Io(b),b=b===b?b:0),f!==e&&(f=Io(f),f=f===f?f:0),Ur(Io(d),f,b)}function $w(d,f,b){return f=Vs(f),b===e?(b=f,f=0):b=Vs(b),d=Io(d),Tc(d,f,b)}function Yw(d,f,b){if(b&&typeof b!="boolean"&&Dr(d,f,b)&&(f=b=e),b===e&&(typeof f=="boolean"?(b=f,f=e):typeof d=="boolean"&&(b=d,d=e)),d===e&&f===e?(d=0,f=1):(d=Vs(d),f===e?(f=d,d=0):f=Vs(f)),d>f){var O=d;d=f,f=O}if(b||d%1||f%1){var N=Rl();return vn(d+N*(f-d+Ks("1e-"+((N+"").length-1))),f)}return Hd(d,f)}var jw=Da(function(d,f,b){return f=f.toLowerCase(),d+(b?$g(f):f)});function $g(d){return bp(Vi(d).toLowerCase())}function Yg(d){return d=Vi(d),d&&d.replace(Gi,md).replace(Cs,"")}function Xw(d,f,b){d=Vi(d),f=pt(f);var O=d.length;b=b===e?O:Ur(li(b),0,O);var N=b;return b-=f.length,b>=0&&d.slice(b,N)==f}function qw(d){return d=Vi(d),d&&z.test(d)?d.replace(Fi,Xu):d}function Kw(d){return d=Vi(d),d&&Ht.test(d)?d.replace(wt,"\\$&"):d}var Zw=Da(function(d,f,b){return d+(b?"-":"")+f.toLowerCase()}),Qw=Da(function(d,f,b){return d+(b?" ":"")+f.toLowerCase()}),Jw=qv("toLowerCase");function ex(d,f,b){d=Vi(d),f=li(f);var O=f?os(d):0;if(!f||O>=f)return d;var N=(f-O)/2;return Vc(Ps(N),b)+d+Vc(ca(N),b)}function tx(d,f,b){d=Vi(d),f=li(f);var O=f?os(d):0;return f&&O<f?d+Vc(f-O,b):d}function ix(d,f,b){d=Vi(d),f=li(f);var O=f?os(d):0;return f&&O<f?Vc(f-O,b)+d:d}function nx(d,f,b){return b||f==null?f=0:f&&(f=+f),Mf(Vi(d).replace(Et,""),f||0)}function rx(d,f,b){return(b?Dr(d,f,b):f===e)?f=1:f=li(f),Bd(Vi(d),f)}function ox(){var d=arguments,f=Vi(d[0]);return d.length<3?f:f.replace(d[1],d[2])}var sx=Da(function(d,f,b){return d+(b?"_":"")+f.toLowerCase()});function lx(d,f,b){return b&&typeof b!="number"&&Dr(d,f,b)&&(f=b=e),b=b===e?ne:b>>>0,b?(d=Vi(d),d&&(typeof f=="string"||f!=null&&!vp(f))&&(f=pt(f),!f&&tl(d))?lo(ro(d),0,b):d.split(f,b)):[]}var ax=Da(function(d,f,b){return d+(b?" ":"")+bp(f)});function dx(d,f,b){return d=Vi(d),b=b==null?0:Ur(li(b),0,d.length),f=pt(f),d.slice(b,b+f.length)==f}function ux(d,f,b){var O=G.templateSettings;b&&Dr(d,f,b)&&(f=e),d=Vi(d),f=Qc({},f,O,ig);var N=Qc({},f.imports,O.imports,ig),K=rr(N),le=is(N,K),fe,Ae,Ze=0,Qe=f.interpolate||Li,et="__p += '",Tt=il((f.escape||Li).source+"|"+Qe.source+"|"+(Qe===Ee?fn:Li).source+"|"+(f.evaluate||Li).source+"|$","g"),Pt="//# sourceURL="+(Di.call(f,"sourceURL")?(f.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Es+"]")+`
60
60
  `;d.replace(Tt,function(Yt,gi,wi,uo,Rr,co){return wi||(wi=uo),et+=d.slice(Ze,co).replace(pn,wf),gi&&(fe=!0,et+=`' +
@@ -98,7 +98,7 @@ function print() { __p += __j.call(arguments, '') }
98
98
  * See the License for the specific language governing permissions and
99
99
  * limitations under the License.
100
100
  *
101
- */(function(e){typeof bootstrap=="function"?bootstrap("promise",e):a.exports=e()})(function(){var e=!1;try{throw new Error}catch(q){e=!!q.stack}var n=_e(),r,o=function(){},s=function(){var q={task:void 0,next:null},W=q,ve=!1,ke=void 0,at=!1,st=[];function ht(){for(var zt,Kt;q.next;)q=q.next,zt=q.task,q.task=void 0,Kt=q.domain,Kt&&(q.domain=void 0,Kt.enter()),Dt(zt,Kt);for(;st.length;)zt=st.pop(),Dt(zt);ve=!1}function Dt(zt,Kt){try{zt()}catch(Fi){if(at)throw Kt&&Kt.exit(),setTimeout(ht,0),Kt&&Kt.enter(),Fi;setTimeout(function(){throw Fi},0)}Kt&&Kt.exit()}if(s=function(zt){W=W.next={task:zt,domain:at&&process.domain,next:null},ve||(ve=!0,ke())},typeof process=="object"&&process.toString()==="[object process]"&&process.nextTick)at=!0,ke=function(){process.nextTick(ht)};else if(typeof setImmediate=="function")typeof window<"u"?ke=setImmediate.bind(window,ht):ke=function(){setImmediate(ht)};else if(typeof MessageChannel<"u"){var Lt=new MessageChannel;Lt.port1.onmessage=function(){ke=Ot,Lt.port1.onmessage=ht,ht()};var Ot=function(){Lt.port2.postMessage(0)};ke=function(){setTimeout(ht,0),Ot()}}else ke=function(){setTimeout(ht,0)};return s.runAfter=function(zt){st.push(zt),ve||(ve=!0,ke())},s}(),l=Function.call;function u(q){return function(){return l.apply(q,arguments)}}var h=u(Array.prototype.slice),c=u(Array.prototype.reduce||function(q,W){var ve=0,ke=this.length;if(arguments.length===1)do{if(ve in this){W=this[ve++];break}if(++ve>=ke)throw new TypeError}while(1);for(;ve<ke;ve++)ve in this&&(W=q(W,this[ve],ve));return W}),p=u(Array.prototype.indexOf||function(q){for(var W=0;W<this.length;W++)if(this[W]===q)return W;return-1}),m=u(Array.prototype.map||function(q,W){var ve=this,ke=[];return c(ve,function(at,st,ht){ke.push(q.call(W,st,ht,ve))},void 0),ke}),v=Object.create||function(q){function W(){}return W.prototype=q,new W},_=Object.defineProperty||function(q,W,ve){return q[W]=ve.value,q},C=u(Object.prototype.hasOwnProperty),x=Object.keys||function(q){var W=[];for(var ve in q)C(q,ve)&&W.push(ve);return W},S=u(Object.prototype.toString);function E(q){return q===Object(q)}function D(q){return S(q)==="[object StopIteration]"||q instanceof A}var A;typeof ReturnValue<"u"?A=ReturnValue:A=function(q){this.value=q};var P="From previous event:";function M(q,W){if(e&&W.stack&&typeof q=="object"&&q!==null&&q.stack){for(var ve=[],ke=W;ke;ke=ke.source)ke.stack&&(!q.__minimumStackCounter__||q.__minimumStackCounter__>ke.stackCounter)&&(_(q,"__minimumStackCounter__",{value:ke.stackCounter,configurable:!0}),ve.unshift(ke.stack));ve.unshift(q.stack);var at=ve.join(`
101
+ */(function(e){typeof bootstrap=="function"?bootstrap("promise",e):a.exports=e()})(function(){var e=!1;try{throw new Error}catch(q){e=!!q.stack}var n=_e(),r,o=function(){},s=function(){var q={task:void 0,next:null},W=q,ve=!1,ke=void 0,at=!1,st=[];function ht(){for(var zt,Kt;q.next;)q=q.next,zt=q.task,q.task=void 0,Kt=q.domain,Kt&&(q.domain=void 0,Kt.enter()),Dt(zt,Kt);for(;st.length;)zt=st.pop(),Dt(zt);ve=!1}function Dt(zt,Kt){try{zt()}catch(Fi){if(at)throw Kt&&Kt.exit(),setTimeout(ht,0),Kt&&Kt.enter(),Fi;setTimeout(function(){throw Fi},0)}Kt&&Kt.exit()}if(s=function(zt){W=W.next={task:zt,domain:at&&process.domain,next:null},ve||(ve=!0,ke())},typeof process=="object"&&process.toString()==="[object process]"&&process.nextTick)at=!0,ke=function(){process.nextTick(ht)};else if(typeof setImmediate=="function")typeof window<"u"?ke=setImmediate.bind(window,ht):ke=function(){setImmediate(ht)};else if(typeof MessageChannel<"u"){var Lt=new MessageChannel;Lt.port1.onmessage=function(){ke=Ot,Lt.port1.onmessage=ht,ht()};var Ot=function(){Lt.port2.postMessage(0)};ke=function(){setTimeout(ht,0),Ot()}}else ke=function(){setTimeout(ht,0)};return s.runAfter=function(zt){st.push(zt),ve||(ve=!0,ke())},s}(),l=Function.call;function u(q){return function(){return l.apply(q,arguments)}}var h=u(Array.prototype.slice),c=u(Array.prototype.reduce||function(q,W){var ve=0,ke=this.length;if(arguments.length===1)do{if(ve in this){W=this[ve++];break}if(++ve>=ke)throw new TypeError}while(!0);for(;ve<ke;ve++)ve in this&&(W=q(W,this[ve],ve));return W}),p=u(Array.prototype.indexOf||function(q){for(var W=0;W<this.length;W++)if(this[W]===q)return W;return-1}),m=u(Array.prototype.map||function(q,W){var ve=this,ke=[];return c(ve,function(at,st,ht){ke.push(q.call(W,st,ht,ve))},void 0),ke}),v=Object.create||function(q){function W(){}return W.prototype=q,new W},_=Object.defineProperty||function(q,W,ve){return q[W]=ve.value,q},C=u(Object.prototype.hasOwnProperty),x=Object.keys||function(q){var W=[];for(var ve in q)C(q,ve)&&W.push(ve);return W},S=u(Object.prototype.toString);function E(q){return q===Object(q)}function D(q){return S(q)==="[object StopIteration]"||q instanceof A}var A;typeof ReturnValue<"u"?A=ReturnValue:A=function(q){this.value=q};var P="From previous event:";function M(q,W){if(e&&W.stack&&typeof q=="object"&&q!==null&&q.stack){for(var ve=[],ke=W;ke;ke=ke.source)ke.stack&&(!q.__minimumStackCounter__||q.__minimumStackCounter__>ke.stackCounter)&&(_(q,"__minimumStackCounter__",{value:ke.stackCounter,configurable:!0}),ve.unshift(ke.stack));ve.unshift(q.stack);var at=ve.join(`
102
102
  `+P+`
103
103
  `),st=B(at);_(q,"stack",{value:st,configurable:!0})}}function B(q){for(var W=q.split(`
104
104
  `),ve=[],ke=0;ke<W.length;++ke){var at=W[ke];!ae(at)&&!Z(at)&&at&&ve.push(at)}return ve.join(`
@@ -106,7 +106,7 @@ function print() { __p += __j.call(arguments, '') }
106
106
  `),W=q[0].indexOf("@")>0?q[1]:q[2],ve=L(W);return ve?(r=ve[0],ve[1]):void 0}}function J(q,W,ve){return function(){return typeof console<"u"&&typeof console.warn=="function"&&console.warn(W+" is deprecated, use "+ve+" instead.",new Error("").stack),q.apply(q,arguments)}}function U(q){return q instanceof xe?q:pe(q)?ee(q):k(q)}U.resolve=U,U.nextTick=s,U.longStackSupport=!1;var F=1;typeof process=="object"&&process&&process.env&&process.env.Q_DEBUG&&(U.longStackSupport=!0),U.defer=de;function de(){var q=[],W=[],ve,ke=v(de.prototype),at=v(xe.prototype);if(at.promiseDispatch=function(ht,Dt,Lt){var Ot=h(arguments);q?(q.push(Ot),Dt==="when"&&Lt[1]&&W.push(Lt[1])):U.nextTick(function(){ve.promiseDispatch.apply(ve,Ot)})},at.valueOf=function(){if(q)return at;var ht=De(ve);return ne(ht)&&(ve=ht),ht},at.inspect=function(){return ve?ve.inspect():{state:"pending"}},U.longStackSupport&&e)try{throw new Error}catch(ht){at.stack=ht.stack.substring(ht.stack.indexOf(`
107
107
  `)+1),at.stackCounter=F++}function st(ht){ve=ht,U.longStackSupport&&e&&(at.source=ht),c(q,function(Dt,Lt){U.nextTick(function(){ht.promiseDispatch.apply(ht,Lt)})},void 0),q=void 0,W=void 0}return ke.promise=at,ke.resolve=function(ht){ve||st(U(ht))},ke.fulfill=function(ht){ve||st(k(ht))},ke.reject=function(ht){ve||st(ct(ht))},ke.notify=function(ht){ve||c(W,function(Dt,Lt){U.nextTick(function(){Lt(ht)})},void 0)},ke}de.prototype.makeNodeResolver=function(){var q=this;return function(W,ve){W?q.reject(W):arguments.length>2?q.resolve(h(arguments,1)):q.resolve(ve)}},U.Promise=qe,U.promise=qe;function qe(q){if(typeof q!="function")throw new TypeError("resolver must be a function.");var W=de();try{q(W.resolve,W.reject,W.notify)}catch(ve){W.reject(ve)}return W.promise}qe.race=Ie,qe.all=We,qe.reject=ct,qe.resolve=U,U.passByCopy=function(q){return q},xe.prototype.passByCopy=function(){return this},U.join=function(q,W){return U(q).join(W)},xe.prototype.join=function(q){return U([this,q]).spread(function(W,ve){if(W===ve)return W;throw new Error("Q can't join: not the same: "+W+" "+ve)})},U.race=Ie;function Ie(q){return qe(function(W,ve){for(var ke=0,at=q.length;ke<at;ke++)U(q[ke]).then(W,ve)})}xe.prototype.race=function(){return this.then(U.race)},U.makePromise=xe;function xe(q,W,ve){W===void 0&&(W=function(st){return ct(new Error("Promise does not support operation: "+st))}),ve===void 0&&(ve=function(){return{state:"unknown"}});var ke=v(xe.prototype);if(ke.promiseDispatch=function(st,ht,Dt){var Lt;try{q[ht]?Lt=q[ht].apply(ke,Dt):Lt=W.call(ke,ht,Dt)}catch(Ot){Lt=ct(Ot)}st&&st(Lt)},ke.inspect=ve,ve){var at=ve();at.state==="rejected"&&(ke.exception=at.reason),ke.valueOf=function(){var st=ve();return st.state==="pending"||st.state==="rejected"?ke:st.value}}return ke}xe.prototype.toString=function(){return"[object Promise]"},xe.prototype.then=function(q,W,ve){var ke=this,at=de(),st=!1;function ht(Ot){try{return typeof q=="function"?q(Ot):Ot}catch(zt){return ct(zt)}}function Dt(Ot){if(typeof W=="function"){M(Ot,ke);try{return W(Ot)}catch(zt){return ct(zt)}}return ct(Ot)}function Lt(Ot){return typeof ve=="function"?ve(Ot):Ot}return U.nextTick(function(){ke.promiseDispatch(function(Ot){st||(st=!0,at.resolve(ht(Ot)))},"when",[function(Ot){st||(st=!0,at.resolve(Dt(Ot)))}])}),ke.promiseDispatch(void 0,"when",[void 0,function(Ot){var zt,Kt=!1;try{zt=Lt(Ot)}catch(Fi){if(Kt=!0,U.onerror)U.onerror(Fi);else throw Fi}Kt||at.notify(zt)}]),at.promise},U.tap=function(q,W){return U(q).tap(W)},xe.prototype.tap=function(q){return q=U(q),this.then(function(W){return q.fcall(W).thenResolve(W)})},U.when=Oe;function Oe(q,W,ve,ke){return U(q).then(W,ve,ke)}xe.prototype.thenResolve=function(q){return this.then(function(){return q})},U.thenResolve=function(q,W){return U(q).thenResolve(W)},xe.prototype.thenReject=function(q){return this.then(function(){throw q})},U.thenReject=function(q,W){return U(q).thenReject(W)},U.nearer=De;function De(q){if(ne(q)){var W=q.inspect();if(W.state==="fulfilled")return W.value}return q}U.isPromise=ne;function ne(q){return q instanceof xe}U.isPromiseAlike=pe;function pe(q){return E(q)&&typeof q.then=="function"}U.isPending=Ve;function Ve(q){return ne(q)&&q.inspect().state==="pending"}xe.prototype.isPending=function(){return this.inspect().state==="pending"},U.isFulfilled=Ye;function Ye(q){return!ne(q)||q.inspect().state==="fulfilled"}xe.prototype.isFulfilled=function(){return this.inspect().state==="fulfilled"},U.isRejected=ze;function ze(q){return ne(q)&&q.inspect().state==="rejected"}xe.prototype.isRejected=function(){return this.inspect().state==="rejected"};var ce=[],Ce=[],be=[],He=!0;function ot(){ce.length=0,Ce.length=0,He||(He=!0)}function Ue(q,W){He&&(typeof process=="object"&&typeof process.emit=="function"&&U.nextTick.runAfter(function(){p(Ce,q)!==-1&&(process.emit("unhandledRejection",W,q),be.push(q))}),Ce.push(q),W&&typeof W.stack<"u"?ce.push(W.stack):ce.push("(no stack) "+W))}function St(q){if(He){var W=p(Ce,q);W!==-1&&(typeof process=="object"&&typeof process.emit=="function"&&U.nextTick.runAfter(function(){var ve=p(be,q);ve!==-1&&(process.emit("rejectionHandled",ce[W],q),be.splice(ve,1))}),Ce.splice(W,1),ce.splice(W,1))}}U.resetUnhandledRejections=ot,U.getUnhandledReasons=function(){return ce.slice()},U.stopUnhandledRejectionTracking=function(){ot(),He=!1},ot(),U.reject=ct;function ct(q){var W=xe({when:function(ve){return ve&&St(this),ve?ve(q):this}},function(){return this},function(){return{state:"rejected",reason:q}});return Ue(W,q),W}U.fulfill=k;function k(q){return xe({when:function(){return q},get:function(W){return q[W]},set:function(W,ve){q[W]=ve},delete:function(W){delete q[W]},post:function(W,ve){return W==null?q.apply(void 0,ve):q[W].apply(q,ve)},apply:function(W,ve){return q.apply(W,ve)},keys:function(){return x(q)}},void 0,function(){return{state:"fulfilled",value:q}})}function ee(q){var W=de();return U.nextTick(function(){try{q.then(W.resolve,W.reject,W.notify)}catch(ve){W.reject(ve)}}),W.promise}U.master=ge;function ge(q){return xe({isDef:function(){}},function(ve,ke){return me(q,ve,ke)},function(){return U(q).inspect()})}U.spread=$;function $(q,W,ve){return U(q).spread(W,ve)}xe.prototype.spread=function(q,W){return this.all().then(function(ve){return q.apply(void 0,ve)},W)},U.async=X;function X(q){return function(){function W(st,ht){var Dt;if(typeof StopIteration>"u"){try{Dt=ve[st](ht)}catch(Lt){return ct(Lt)}return Dt.done?U(Dt.value):Oe(Dt.value,ke,at)}else{try{Dt=ve[st](ht)}catch(Lt){return D(Lt)?U(Lt.value):ct(Lt)}return Oe(Dt,ke,at)}}var ve=q.apply(this,arguments),ke=W.bind(W,"next"),at=W.bind(W,"throw");return ke()}}U.spawn=re;function re(q){U.done(U.async(q)())}U.return=Pe;function Pe(q){throw new A(q)}U.promised=Fe;function Fe(q){return function(){return $([this,We(arguments)],function(W,ve){return q.apply(W,ve)})}}U.dispatch=me;function me(q,W,ve){return U(q).dispatch(W,ve)}xe.prototype.dispatch=function(q,W){var ve=this,ke=de();return U.nextTick(function(){ve.promiseDispatch(ke.resolve,q,W)}),ke.promise},U.get=function(q,W){return U(q).dispatch("get",[W])},xe.prototype.get=function(q){return this.dispatch("get",[q])},U.set=function(q,W,ve){return U(q).dispatch("set",[W,ve])},xe.prototype.set=function(q,W){return this.dispatch("set",[q,W])},U.del=U.delete=function(q,W){return U(q).dispatch("delete",[W])},xe.prototype.del=xe.prototype.delete=function(q){return this.dispatch("delete",[q])},U.mapply=U.post=function(q,W,ve){return U(q).dispatch("post",[W,ve])},xe.prototype.mapply=xe.prototype.post=function(q,W){return this.dispatch("post",[q,W])},U.send=U.mcall=U.invoke=function(q,W){return U(q).dispatch("post",[W,h(arguments,2)])},xe.prototype.send=xe.prototype.mcall=xe.prototype.invoke=function(q){return this.dispatch("post",[q,h(arguments,1)])},U.fapply=function(q,W){return U(q).dispatch("apply",[void 0,W])},xe.prototype.fapply=function(q){return this.dispatch("apply",[void 0,q])},U.try=U.fcall=function(q){return U(q).dispatch("apply",[void 0,h(arguments,1)])},xe.prototype.fcall=function(){return this.dispatch("apply",[void 0,h(arguments)])},U.fbind=function(q){var W=U(q),ve=h(arguments,1);return function(){return W.dispatch("apply",[this,ve.concat(h(arguments))])}},xe.prototype.fbind=function(){var q=this,W=h(arguments);return function(){return q.dispatch("apply",[this,W.concat(h(arguments))])}},U.keys=function(q){return U(q).dispatch("keys",[])},xe.prototype.keys=function(){return this.dispatch("keys",[])},U.all=We;function We(q){return Oe(q,function(W){var ve=0,ke=de();return c(W,function(at,st,ht){var Dt;ne(st)&&(Dt=st.inspect()).state==="fulfilled"?W[ht]=Dt.value:(++ve,Oe(st,function(Lt){W[ht]=Lt,--ve===0&&ke.resolve(W)},ke.reject,function(Lt){ke.notify({index:ht,value:Lt})}))},void 0),ve===0&&ke.resolve(W),ke.promise})}xe.prototype.all=function(){return We(this)},U.any=mt;function mt(q){if(q.length===0)return U.resolve();var W=U.defer(),ve=0;return c(q,function(ke,at,st){var ht=q[st];ve++,Oe(ht,Dt,Lt,Ot);function Dt(zt){W.resolve(zt)}function Lt(zt){if(ve--,ve===0){var Kt=zt||new Error(""+zt);Kt.message="Q can't get fulfillment value from any promise, all promises were rejected. Last error message: "+Kt.message,W.reject(Kt)}}function Ot(zt){W.notify({index:st,value:zt})}},void 0),W.promise}xe.prototype.any=function(){return mt(this)},U.allResolved=J(Ge,"allResolved","allSettled");function Ge(q){return Oe(q,function(W){return W=m(W,U),Oe(We(m(W,function(ve){return Oe(ve,o,o)})),function(){return W})})}xe.prototype.allResolved=function(){return Ge(this)},U.allSettled=Le;function Le(q){return U(q).allSettled()}xe.prototype.allSettled=function(){return this.then(function(q){return We(m(q,function(W){W=U(W);function ve(){return W.inspect()}return W.then(ve,ve)}))})},U.fail=U.catch=function(q,W){return U(q).then(void 0,W)},xe.prototype.fail=xe.prototype.catch=function(q){return this.then(void 0,q)},U.progress=jt;function jt(q,W){return U(q).then(void 0,void 0,W)}xe.prototype.progress=function(q){return this.then(void 0,void 0,q)},U.fin=U.finally=function(q,W){return U(q).finally(W)},xe.prototype.fin=xe.prototype.finally=function(q){if(!q||typeof q.apply!="function")throw new Error("Q can't apply finally callback");return q=U(q),this.then(function(W){return q.fcall().then(function(){return W})},function(W){return q.fcall().then(function(){throw W})})},U.done=function(q,W,ve,ke){return U(q).done(W,ve,ke)},xe.prototype.done=function(q,W,ve){var ke=function(st){U.nextTick(function(){if(M(st,at),U.onerror)U.onerror(st);else throw st})},at=q||W||ve?this.then(q,W,ve):this;typeof process=="object"&&process&&process.domain&&(ke=process.domain.bind(ke)),at.then(void 0,ke)},U.timeout=function(q,W,ve){return U(q).timeout(W,ve)},xe.prototype.timeout=function(q,W){var ve=de(),ke=setTimeout(function(){(!W||typeof W=="string")&&(W=new Error(W||"Timed out after "+q+" ms"),W.code="ETIMEDOUT"),ve.reject(W)},q);return this.then(function(at){clearTimeout(ke),ve.resolve(at)},function(at){clearTimeout(ke),ve.reject(at)},ve.notify),ve.promise},U.delay=function(q,W){return W===void 0&&(W=q,q=void 0),U(q).delay(W)},xe.prototype.delay=function(q){return this.then(function(W){var ve=de();return setTimeout(function(){ve.resolve(W)},q),ve.promise})},U.nfapply=function(q,W){return U(q).nfapply(W)},xe.prototype.nfapply=function(q){var W=de(),ve=h(q);return ve.push(W.makeNodeResolver()),this.fapply(ve).fail(W.reject),W.promise},U.nfcall=function(q){var W=h(arguments,1);return U(q).nfapply(W)},xe.prototype.nfcall=function(){var q=h(arguments),W=de();return q.push(W.makeNodeResolver()),this.fapply(q).fail(W.reject),W.promise},U.nfbind=U.denodeify=function(q){if(q===void 0)throw new Error("Q can't wrap an undefined function");var W=h(arguments,1);return function(){var ve=W.concat(h(arguments)),ke=de();return ve.push(ke.makeNodeResolver()),U(q).fapply(ve).fail(ke.reject),ke.promise}},xe.prototype.nfbind=xe.prototype.denodeify=function(){var q=h(arguments);return q.unshift(this),U.denodeify.apply(void 0,q)},U.nbind=function(q,W){var ve=h(arguments,2);return function(){var ke=ve.concat(h(arguments)),at=de();ke.push(at.makeNodeResolver());function st(){return q.apply(W,arguments)}return U(st).fapply(ke).fail(at.reject),at.promise}},xe.prototype.nbind=function(){var q=h(arguments,0);return q.unshift(this),U.nbind.apply(void 0,q)},U.nmapply=U.npost=function(q,W,ve){return U(q).npost(W,ve)},xe.prototype.nmapply=xe.prototype.npost=function(q,W){var ve=h(W||[]),ke=de();return ve.push(ke.makeNodeResolver()),this.dispatch("post",[q,ve]).fail(ke.reject),ke.promise},U.nsend=U.nmcall=U.ninvoke=function(q,W){var ve=h(arguments,2),ke=de();return ve.push(ke.makeNodeResolver()),U(q).dispatch("post",[W,ve]).fail(ke.reject),ke.promise},xe.prototype.nsend=xe.prototype.nmcall=xe.prototype.ninvoke=function(q){var W=h(arguments,1),ve=de();return W.push(ve.makeNodeResolver()),this.dispatch("post",[q,W]).fail(ve.reject),ve.promise},U.nodeify=It;function It(q,W){return U(q).nodeify(W)}xe.prototype.nodeify=function(q){if(q)this.then(function(W){U.nextTick(function(){q(null,W)})},function(W){U.nextTick(function(){q(W)})});else return this},U.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var bi=_e();return U})}(Cf)),Cf.exports}var Ov=function(){var a={183:function(r,o,s){var l=s(804),u=s(328),h=function(c){this.x=null,this.y=null,this.width=null,this.height=null,c&&(this.setPos(c.x,c.y),this.setDimensions(c.width,c.height))};l.extend(h.prototype,{setPos:function(c,p){this.x=c,this.y=p},setDimensions:function(c,p){this.width=c,this.height=p},toXML:function(c,p){var m=u.createElement(c,"xdr:absoluteAnchor"),v=u.createElement(c,"xdr:pos");v.setAttribute("x",this.x),v.setAttribute("y",this.y),m.appendChild(v);var _=u.createElement(c,"xdr:ext");return _.setAttribute("cx",this.width),_.setAttribute("cy",this.height),m.appendChild(_),m.appendChild(p),m.appendChild(u.createElement(c,"xdr:clientData")),m}}),r.exports=h},75:function(r,o,s){var l=s(804),u=function(){};l.extend(u.prototype,{}),r.exports=u},982:function(r,o,s){var l=s(804),u=s(328),h=function(c){this.x=null,this.y=null,this.xOff=null,this.yOff=null,this.width=null,this.height=null,c&&(this.setPos(c.x,c.y,c.xOff,c.yOff),this.setDimensions(c.width,c.height))};l.extend(h.prototype,{setPos:function(c,p,m,v){this.x=c,this.y=p,m!==void 0&&(this.xOff=m),v!==void 0&&(this.yOff=v)},setDimensions:function(c,p){this.width=c,this.height=p},toXML:function(c,p){var m=u.createElement(c,"xdr:oneCellAnchor"),v=u.createElement(c,"xdr:from"),_=u.createElement(c,"xdr:col");_.appendChild(c.createTextNode(this.x));var C=u.createElement(c,"xdr:colOff");C.appendChild(c.createTextNode(this.xOff||0));var x=u.createElement(c,"xdr:row");x.appendChild(c.createTextNode(this.y));var S=u.createElement(c,"xdr:rowOff");S.appendChild(c.createTextNode(this.yOff||0)),v.appendChild(_),v.appendChild(C),v.appendChild(x),v.appendChild(S),m.appendChild(v);var E=u.createElement(c,"xdr:ext");return E.setAttribute("cx",this.width),E.setAttribute("cy",this.height),m.appendChild(E),m.appendChild(p),m.appendChild(u.createElement(c,"xdr:clientData")),m}}),r.exports=h},147:function(r,o,s){var l=s(804),u=s(328),h=s(890),c=function(){this.media=null,this.id=l.uniqueId("Picture"),this.pictureId=u.uniqueId("Picture"),this.fill={},this.mediaData=null};c.prototype=new h,l.extend(c.prototype,{setMedia:function(p){this.mediaData=p},setDescription:function(p){this.description=p},setFillType:function(p){this.fill.type=p},setFillConfig:function(p){l.extend(this.fill,p)},getMediaType:function(){return"image"},getMediaData:function(){return this.mediaData},setRelationshipId:function(p){this.mediaData.rId=p},toXML:function(p){var m=u.createElement(p,"xdr:pic"),v=u.createElement(p,"xdr:nvPicPr"),_=u.createElement(p,"xdr:cNvPr",[["id",this.pictureId],["name",this.mediaData.fileName],["descr",this.description||""]]);v.appendChild(_);var C=u.createElement(p,"xdr:cNvPicPr");C.appendChild(u.createElement(p,"a:picLocks",[["noChangeAspect","1"],["noChangeArrowheads","1"]])),v.appendChild(C),m.appendChild(v);var x=u.createElement(p,"xdr:blipFill");x.appendChild(u.createElement(p,"a:blip",[["xmlns:r",u.schemas.relationships],["r:embed",this.mediaData.rId]])),x.appendChild(u.createElement(p,"a:srcRect"));var S=u.createElement(p,"a:stretch");S.appendChild(u.createElement(p,"a:fillRect")),x.appendChild(S),m.appendChild(x);var E=u.createElement(p,"xdr:spPr",[["bwMode","auto"]]),D=u.createElement(p,"a:xfrm");E.appendChild(D);var A=u.createElement(p,"a:prstGeom",[["prst","rect"]]);return E.appendChild(A),m.appendChild(E),this.anchor.toXML(p,m)}}),r.exports=c},527:function(r,o,s){var l=s(804),u=s(328),h=function(c){this.from={xOff:0,yOff:0},this.to={xOff:0,yOff:0},c&&(this.setFrom(c.from.x,c.from.y,c.to.xOff,c.to.yOff),this.setTo(c.to.x,c.to.y,c.to.xOff,c.to.yOff))};l.extend(h.prototype,{setFrom:function(c,p,m,v){this.from.x=c,this.from.y=p,m!==void 0&&(this.from.xOff=m),v!==void 0&&(this.from.yOff=m)},setTo:function(c,p,m,v){this.to.x=c,this.to.y=p,m!==void 0&&(this.to.xOff=m),v!==void 0&&(this.to.yOff=m)},toXML:function(c,p){var m=u.createElement(c,"xdr:twoCellAnchor"),v=u.createElement(c,"xdr:from"),_=u.createElement(c,"xdr:col");_.appendChild(c.createTextNode(this.from.x));var C=u.createElement(c,"xdr:colOff");C.appendChild(c.createTextNode(this.from.xOff));var x=u.createElement(c,"xdr:row");x.appendChild(c.createTextNode(this.from.y));var S=u.createElement(c,"xdr:rowOff");S.appendChild(c.createTextNode(this.from.yOff)),v.appendChild(_),v.appendChild(C),v.appendChild(x),v.appendChild(S);var E=u.createElement(c,"xdr:to"),D=u.createElement(c,"xdr:col");D.appendChild(c.createTextNode(this.to.x));var A=u.createElement(c,"xdr:colOff");A.appendChild(c.createTextNode(this.from.xOff));var P=u.createElement(c,"xdr:row");P.appendChild(c.createTextNode(this.to.y));var M=u.createElement(c,"xdr:rowOff");return M.appendChild(c.createTextNode(this.from.yOff)),E.appendChild(D),E.appendChild(A),E.appendChild(P),E.appendChild(M),m.appendChild(v),m.appendChild(E),m.appendChild(p),m.appendChild(u.createElement(c,"xdr:clientData")),m}}),r.exports=h},890:function(r,o,s){var l=s(804),u=s(183),h=s(982),c=s(527),p=function(){this.id=l.uniqueId("Drawing")};l.extend(p.prototype,{createAnchor:function(m,v){switch(v=v||{},v.drawing=this,m){case"absoluteAnchor":this.anchor=new u(v);break;case"oneCellAnchor":this.anchor=new h(v);break;case"twoCellAnchor":this.anchor=new c(v);break}return this.anchor}}),Object.defineProperties(p,{AbsoluteAnchor:{get:function(){return s(183)}},Chart:{get:function(){return s(75)}},OneCellAnchor:{get:function(){return s(982)}},Picture:{get:function(){return s(147)}},TwoCellAnchor:{get:function(){return s(527)}}}),r.exports=p},861:function(r,o,s){var l=s(804),u=s(328),h=s(785),c=function(){this.drawings=[],this.relations=new h,this.id=l.uniqueId("Drawings")};l.extend(c.prototype,{addDrawing:function(p){this.drawings.push(p)},getCount:function(){return this.drawings.length},toXML:function(){var p=u.createXmlDoc(u.schemas.spreadsheetDrawing,"xdr:wsDr"),m=p.documentElement;m.setAttribute("xmlns:a",u.schemas.drawing),m.setAttribute("xmlns:r",u.schemas.relationships),m.setAttribute("xmlns:xdr",u.schemas.spreadsheetDrawing);for(var v=0,_=this.drawings.length;v<_;v++){var C=this.relations.getRelationshipId(this.drawings[v].getMediaData());C||(C=this.relations.addRelation(this.drawings[v].getMediaData(),this.drawings[v].getMediaType())),this.drawings[v].setRelationshipId(C),m.appendChild(this.drawings[v].toXML(p))}return p}}),r.exports=c},753:function(r,o,s){var l=s(804),u=function(){this.state=null,this.xSplit=null,this.ySplit=null,this.activePane="bottomRight",this.topLeftCell=null};l.extend(u.prototype,{freezePane:function(h,c,p){this._freezePane={xSplit:h,ySplit:c,cell:p}},exportXML:function(h){var c=h.createElement("pane");return this.state!==null&&(c.setAttribute("xSplit",this._freezePane.xSplit),c.setAttribute("ySplit",this._freezePane.ySplit),c.setAttribute("topLeftCell",this._freezePane.cell),c.setAttribute("activePane","bottomRight"),c.setAttribute("state","frozen")),c}}),r.exports=u},255:function(r){r.exports={}},864:function(r){r.exports={pixelsToEMUs:function(o){return Math.round(o*914400/96)}}},785:function(r,o,s){var l=s(804),u=s(328),h=s(255),c=function(){this.relations={},this.lastId=1};l.uniqueId("rId"),l.extend(c.prototype,{importData:function(p){this.relations=p.relations,this.lastId=p.lastId},exportData:function(){return{relations:this.relations,lastId:this.lastId}},addRelation:function(p,m){return this.relations[p.id]={id:l.uniqueId("rId"),schema:u.schemas[m],object:p},this.relations[p.id].id},getRelationshipId:function(p){return this.relations[p.id]?this.relations[p.id].id:null},toXML:function(){var p=u.createXmlDoc(u.schemas.relationshipPackage,"Relationships"),m=p.documentElement;return l.each(this.relations,function(v,_){var C=u.createElement(p,"Relationship",[["Id",v.id],["Type",v.schema],["Target",v.object.target||h[_]]]);v.object.targetMode&&C.setAttribute("TargetMode",v.object.targetMode),m.appendChild(C)}),p}}),r.exports=c},349:function(r,o,s){var l=s(804),u=s(328),h=function(){this.strings={},this.stringArray=[],this.id=l.uniqueId("SharedStrings")};l.extend(h.prototype,{addString:function(c){return this.strings[c]=this.stringArray.length,this.stringArray[this.stringArray.length]=c,this.strings[c]},exportData:function(){return this.strings},toXML:function(){var c=u.createXmlDoc(u.schemas.spreadsheetml,"sst"),p=c.documentElement;this.stringArray.reverse();var m=this.stringArray.length;p.setAttribute("count",m),p.setAttribute("uniqueCount",m);var v=c.createElement("si"),_=c.createElement("t");_.appendChild(c.createTextNode("--placeholder--")),v.appendChild(_);for(var C=this.stringArray;m--;){var x=v.cloneNode(!0);x.firstChild.firstChild.nodeValue=C[m],p.appendChild(x)}return c}}),r.exports=h},958:function(r,o,s){var l=s(804),u=s(753),h=s(328),c=function(p){p=p||{},this.pane=p.pane||new u,this.showZeros=null,this.defaultGridColor=null,this.colorId=null,this.rightToLeft=null,this.showFormulas=null,this.showGridLines=null,this.showOutlineSymbols=null,this.showRowColHeaders=null,this.showRuler=null,this.showWhiteSpace=null,this.tabSelected=null,this.topLeftCell=null,this.viewType=null,this.windowProtection=null,this.zoomScale=null,this.zoomScaleNormal=null,this.zoomScalePageLayoutView=null,this.zoomScaleSheetLayoutView=null};l.extend(c.prototype,{freezePane:function(p,m,v){this.pane.state="frozen",this.pane.xSplit=p,this.pane.ySplit=m,this.pane.topLeftCell=v},exportXML:function(p){var m=p.createElement("sheetViews"),v=p.createElement("sheetView");return h.setAttributesOnDoc(v,{workbookViewId:0,showZeros:{v:this.showZeros,type:Boolean},defaultGridColor:{v:this.defaultGridColor,type:Boolean},colorId:this.colorId,rightToLeft:{v:this.rightToLeft,type:Boolean},showFormulas:{v:this.showFormulas,type:Boolean},showGridLines:{v:this.showGridLines,type:Boolean},showOutlineSymbols:{v:this.showOutlineSymbols,type:Boolean},showRowColHeaders:{v:this.showRowColHeaders,type:Boolean},showRuler:{v:this.showRuler,type:Boolean},showWhiteSpace:{v:this.showWhiteSpace,type:Boolean},tabSelected:{v:this.tabSelected,type:Boolean},viewType:this.viewType,windowProtection:{v:this.windowProtection,type:Boolean},zoomScale:{v:this.zoomScale,type:Boolean},zoomScaleNormal:this.zoomScaleNormal,zoomScalePageLayoutView:this.zoomScalePageLayoutView,zoomScaleSheetLayoutView:this.zoomScaleSheetLayoutView}),v.appendChild(this.pane.exportXML(p)),m.appendChild(v),m}}),r.exports=c},747:function(r,o,s){var l=s(804),u=s(328),h=function(){this.id=l.uniqueId("StyleSheet"),this.cellStyles=[{name:"Normal",xfId:"0",builtinId:"0"}],this.defaultTableStyle=!1,this.differentialStyles=[{}],this.masterCellFormats=[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfid:0}],this.masterCellStyles=[{numFmtId:0,fontId:0,fillId:0,borderId:0}],this.fonts=[{}],this.numberFormatters=[],this.fills=[{},{type:"pattern",patternType:"gray125",fgColor:"FF333333",bgColor:"FF333333"}],this.borders=[{top:{},left:{},right:{},bottom:{},diagonal:{}}],this.tableStyles=[]};l.extend(h.prototype,{createSimpleFormatter:function(c){var p=this.masterCellFormats.length,m={id:p};switch(c){case"date":m.numFmtId=14;break}return this.masterCellFormats.push(m),m},createFill:function(c){var p=this.fills.length,m=c;return m.id=p,this.fills.push(m),m},createNumberFormatter:function(c){var p=this.numberFormatters.length+100,m={id:p,formatCode:c};return this.numberFormatters.push(m),m},createFormat:function(c){var p=this.masterCellFormats.length,m={id:p};if(c.protection&&(m.protection=c.protection),c.font&&l.isObject(c.font))m.fontId=this.createFontStyle(c.font).id;else if(c.font){if(l.isNaN(parseInt(c.font,10)))throw"Passing a non-numeric font id is not supported";m.fontId=c.font}if(c.format&&l.isString(c.format))m.numFmtId=this.createNumberFormatter(c.format).id;else if(c.format){if(l.isNaN(parseInt(c.format,10)))throw"Invalid number formatter id";m.numFmtId=c.format}if(c.border&&l.isObject(c.border))m.borderId=this.createBorderFormatter(c.border).id;else if(c.border){if(l.isNaN(parseInt(c.border,10)))throw"Passing a non-numeric border id is not supported";m.borderId=c.border}if(c.fill&&l.isObject(c.fill))m.fillId=this.createFill(c.fill).id;else if(c.fill){if(l.isNaN(parseInt(c.fill,10)))throw"Passing a non-numeric fill id is not supported";m.fillId=c.fill}return c.alignment&&l.isObject(c.alignment)&&(m.alignment=l.pick(c.alignment,"horizontal","justifyLastLine","readingOrder","relativeIndent","shrinkToFit","textRotation","vertical","wrapText")),this.masterCellFormats.push(m),m},createDifferentialStyle:function(c){var p=this.differentialStyles.length,m={id:p};return c.font&&l.isObject(c.font)&&(m.font=c.font),c.border&&l.isObject(c.border)&&(m.border=l.defaults(c.border,{top:{},left:{},right:{},bottom:{},diagonal:{}})),c.fill&&l.isObject(c.fill)&&(m.fill=c.fill),c.alignment&&l.isObject(c.alignment)&&(m.alignment=c.alignment),c.format&&l.isString(c.format)&&(m.numFmt=c.format),this.differentialStyles[p]=m,m},createTableStyle:function(c){this.tableStyles.push(c)},createBorderFormatter:function(c){return l.defaults(c,{top:{},left:{},right:{},bottom:{},diagonal:{},id:this.borders.length}),this.borders.push(c),c},createFontStyle:function(c){var p=this.fonts.length,m={id:p};return c.bold&&(m.bold=!0),c.italic&&(m.italic=!0),c.superscript&&(m.vertAlign="superscript"),c.subscript&&(m.vertAlign="subscript"),c.underline&&(l.indexOf(["double","singleAccounting","doubleAccounting"],c.underline)!==-1?m.underline=c.underline:m.underline=!0),c.strike&&(m.strike=!0),c.outline&&(m.outline=!0),c.shadow&&(m.shadow=!0),c.size&&(m.size=c.size),c.color&&(m.color=c.color),c.fontName&&(m.fontName=c.fontName),this.fonts.push(m),m},exportBorders:function(c){var p=c.createElement("borders");p.setAttribute("count",this.borders.length);for(var m=0,v=this.borders.length;m<v;m++)p.appendChild(this.exportBorder(c,this.borders[m]));return p},exportBorder:function(c,p){var m=c.createElement("border"),v=this,_=function(C){var x=c.createElement(C);return p[C].style&&x.setAttribute("style",p[C].style),p[C].color&&x.appendChild(v.exportColor(c,p[C].color)),x};return m.appendChild(_("left")),m.appendChild(_("right")),m.appendChild(_("top")),m.appendChild(_("bottom")),m.appendChild(_("diagonal")),m},exportColor:function(c,p){var m=c.createElement("color");return l.isString(p)?(m.setAttribute("rgb",p),m):(l.isUndefined(p.tint)||m.setAttribute("tint",p.tint),l.isUndefined(p.auto)||m.setAttribute("auto",!!p.auto),l.isUndefined(p.theme)||m.setAttribute("theme",p.theme),m)},exportMasterCellFormats:function(c){for(var p=u.createElement(c,"cellXfs",[["count",this.masterCellFormats.length]]),m=0,v=this.masterCellFormats.length;m<v;m++){var _=this.masterCellFormats[m];p.appendChild(this.exportCellFormatElement(c,_))}return p},exportMasterCellStyles:function(c){for(var p=u.createElement(c,"cellStyleXfs",[["count",this.masterCellStyles.length]]),m=0,v=this.masterCellStyles.length;m<v;m++){var _=this.masterCellStyles[m];p.appendChild(this.exportCellFormatElement(c,_))}return p},exportCellFormatElement:function(c,p){var m=c.createElement("xf"),v=["applyAlignment","applyBorder","applyFill","applyFont","applyNumberFormat","applyProtection","borderId","fillId","fontId","numFmtId","pivotButton","quotePrefix","xfId"],_=l.filter(l.keys(p),function(S){if(l.indexOf(v,S)!==-1)return!0});if(p.alignment){var C=p.alignment;m.appendChild(this.exportAlignment(c,C))}p.protection&&(m.appendChild(this.exportProtection(c,p.protection)),m.setAttribute("applyProtection","1"));for(var x=_.length;x--;)m.setAttribute(_[x],p[_[x]]);return p.fillId&&m.setAttribute("applyFill","1"),p.fontId&&m.setAttribute("applyFont","1"),p.borderId&&m.setAttribute("applyBorder","1"),p.alignment&&m.setAttribute("applyAlignment","1"),p.numFmtId&&m.setAttribute("applyNumberFormat","1"),p.numFmtId!==void 0&&p.xfId===void 0&&m.setAttribute("xfId","0"),m},exportAlignment:function(c,p){for(var m=c.createElement("alignment"),v=l.keys(p),_=0,C=v.length;_<C;_++)m.setAttribute(v[_],p[v[_]]);return m},exportFonts:function(c){var p=c.createElement("fonts");p.setAttribute("count",this.fonts.length);for(var m=0,v=this.fonts.length;m<v;m++){var _=this.fonts[m];p.appendChild(this.exportFont(c,_))}return p},exportFont:function(c,p){var m=c.createElement("font");if(p.size){var v=c.createElement("sz");v.setAttribute("val",p.size),m.appendChild(v)}if(p.fontName){var _=c.createElement("name");_.setAttribute("val",p.fontName),m.appendChild(_)}if(p.bold&&m.appendChild(c.createElement("b")),p.italic&&m.appendChild(c.createElement("i")),p.vertAlign){var C=c.createElement("vertAlign");C.setAttribute("val",p.vertAlign),m.appendChild(C)}if(p.underline){var x=c.createElement("u");p.underline!==!0&&x.setAttribute("val",p.underline),m.appendChild(x)}return p.strike&&m.appendChild(c.createElement("strike")),p.shadow&&m.appendChild(c.createElement("shadow")),p.outline&&m.appendChild(c.createElement("outline")),p.color&&m.appendChild(this.exportColor(c,p.color)),m},exportFills:function(c){var p=c.createElement("fills");p.setAttribute("count",this.fills.length);for(var m=0,v=this.fills.length;m<v;m++){var _=this.fills[m];p.appendChild(this.exportFill(c,_))}return p},exportFill:function(c,p){var m,v=c.createElement("fill");return p.type==="pattern"?(m=this.exportPatternFill(c,p),v.appendChild(m)):p.type==="gradient"&&(m=this.exportGradientFill(c,p),v.appendChild(m)),v},exportGradientFill:function(c,p){var m=c.createElement("gradientFill");p.degree?m.setAttribute("degree",p.degree):p.left&&(m.setAttribute("left",p.left),m.setAttribute("right",p.right),m.setAttribute("top",p.top),m.setAttribute("bottom",p.bottom));var v=c.createElement("stop");v.setAttribute("position",p.start.pureAt||0);var _=c.createElement("color");typeof p.start=="string"||p.start.color?_.setAttribute("rgb",p.start.color||p.start):(p.start.theme,_.setAttribute("theme",p.start.theme));var C=c.createElement("stop"),x=c.createElement("color");return C.setAttribute("position",p.end.pureAt||1),typeof p.start=="string"||p.end.color?x.setAttribute("rgb",p.end.color||p.end):(p.end.theme,x.setAttribute("theme",p.end.theme)),v.appendChild(_),C.appendChild(x),m.appendChild(v),m.appendChild(C),m},exportPatternFill:function(c,p){var m=u.createElement(c,"patternFill",[["patternType",p.patternType]]);p.bgColor||(p.bgColor="FFFFFFFF"),p.fgColor||(p.fgColor="FFFFFFFF");var v=c.createElement("bgColor");l.isString(p.bgColor)?v.setAttribute("rgb",p.bgColor):p.bgColor.theme?v.setAttribute("theme",p.bgColor.theme):v.setAttribute("rgb",p.bgColor.rbg);var _=c.createElement("fgColor");return l.isString(p.fgColor)?_.setAttribute("rgb",p.fgColor):p.fgColor.theme?_.setAttribute("theme",p.fgColor.theme):_.setAttribute("rgb",p.fgColor.rbg),m.appendChild(_),m.appendChild(v),m},exportNumberFormatters:function(c){var p=c.createElement("numFmts");p.setAttribute("count",this.numberFormatters.length);for(var m=0,v=this.numberFormatters.length;m<v;m++){var _=this.numberFormatters[m];p.appendChild(this.exportNumberFormatter(c,_))}return p},exportNumberFormatter:function(c,p){var m=c.createElement("numFmt");return m.setAttribute("numFmtId",p.id),m.setAttribute("formatCode",p.formatCode),m},exportCellStyles:function(c){var p=c.createElement("cellStyles");p.setAttribute("count",this.cellStyles.length);for(var m=0,v=this.cellStyles.length;m<v;m++){var _=this.cellStyles[m];delete _.id;var C=u.createElement(c,"cellStyle");p.appendChild(C);for(var x=l.keys(_),S=x.length;S--;)C.setAttribute(x[S],_[x[S]])}return p},exportDifferentialStyles:function(c){var p=c.createElement("dxfs");p.setAttribute("count",this.differentialStyles.length);for(var m=0,v=this.differentialStyles.length;m<v;m++){var _=this.differentialStyles[m];p.appendChild(this.exportDFX(c,_))}return p},exportDFX:function(c,p){var m=c.createElement("dxf");return p.font&&m.appendChild(this.exportFont(c,p.font)),p.fill&&m.appendChild(this.exportFill(c,p.fill)),p.border&&m.appendChild(this.exportBorder(c,p.border)),p.numFmt&&m.appendChild(this.exportNumberFormatter(c,p.numFmt)),p.alignment&&m.appendChild(this.exportAlignment(c,p.alignment)),m},exportTableStyles:function(c){var p=c.createElement("tableStyles");p.setAttribute("count",this.tableStyles.length),this.defaultTableStyle&&p.setAttribute("defaultTableStyle",this.defaultTableStyle);for(var m=0,v=this.tableStyles.length;m<v;m++)p.appendChild(this.exportTableStyle(c,this.tableStyles[m]));return p},exportTableStyle:function(c,p){var m=c.createElement("tableStyle");m.setAttribute("name",p.name),m.setAttribute("pivot",0);var v=0;return l.each(p,function(_,C){if(C!=="name"){v++;var x=c.createElement("tableStyleElement");x.setAttribute("type",C),x.setAttribute("dxfId",_),m.appendChild(x)}}),m.setAttribute("count",v),m},exportProtection:function(c,p){var m=c.createElement("protection");for(var v in p)p.hasOwnProperty(v)&&m.setAttribute(v,p[v]);return m},toXML:function(){var c=u.createXmlDoc(u.schemas.spreadsheetml,"styleSheet"),p=c.documentElement;return p.appendChild(this.exportNumberFormatters(c)),p.appendChild(this.exportFonts(c)),p.appendChild(this.exportFills(c)),p.appendChild(this.exportBorders(c)),p.appendChild(this.exportMasterCellStyles(c)),p.appendChild(this.exportMasterCellFormats(c)),p.appendChild(this.exportCellStyles(c)),p.appendChild(this.exportDifferentialStyles(c)),this.tableStyles.length&&p.appendChild(this.exportTableStyles(c)),c}}),r.exports=h},496:function(r,o,s){var l=s(804),u=s(328),h=function(c){l.defaults(this,{name:"",displayName:"",dataCellStyle:null,dataDfxId:null,headerRowBorderDxfId:null,headerRowCellStyle:null,headerRowCount:1,headerRowDxfId:null,insertRow:!1,insertRowShift:!1,ref:null,tableBorderDxfId:null,totalsRowBorderDxfId:null,totalsRowCellStyle:null,totalsRowCount:0,totalsRowDxfId:null,tableColumns:[],autoFilter:null,sortState:null,styleInfo:{}}),this.initialize(c)};l.extend(h.prototype,{initialize:function(c){this.displayName=l.uniqueId("Table"),this.name=this.displayName,this.id=this.name,this.tableId=this.id.replace("Table",""),l.extend(this,c)},setReferenceRange:function(c,p){this.ref=[c,p]},setTableColumns:function(c){l.each(c,function(p){this.addTableColumn(p)},this)},addTableColumn:function(c){if(l.isString(c)&&(c={name:c}),!c.name)throw"Invalid argument for addTableColumn - minimum requirement is a name property";this.tableColumns.push(c)},setSortState:function(c){this.sortState=c},toXML:function(){var c=u.createXmlDoc(u.schemas.spreadsheetml,"table"),p=c.documentElement;p.setAttribute("id",this.tableId),p.setAttribute("name",this.name),p.setAttribute("displayName",this.displayName);var m=this.ref[0],v=this.ref[1];if(p.setAttribute("ref",u.positionToLetterRef(m[0],m[1])+":"+u.positionToLetterRef(v[0],v[1])),p.setAttribute("totalsRowCount",this.totalsRowCount),p.setAttribute("headerRowCount",this.headerRowCount),this.headerRowDxfId&&p.setAttribute("headerRowDxfId",this.headerRowDxfId),this.headerRowBorderDxfId&&p.setAttribute("headerRowBorderDxfId",this.headerRowBorderDxfId),!this.ref)throw"Needs at least a reference range";return this.autoFilter||this.addAutoFilter(this.ref[0],this.ref[1]),p.appendChild(this.exportAutoFilter(c)),p.appendChild(this.exportTableColumns(c)),p.appendChild(this.exportTableStyleInfo(c)),c},exportTableColumns:function(c){var p=c.createElement("tableColumns");p.setAttribute("count",this.tableColumns.length);for(var m=this.tableColumns,v=0,_=m.length;v<_;v++){var C=m[v],x=c.createElement("tableColumn");x.setAttribute("id",v+1),x.setAttribute("name",C.name),p.appendChild(x),C.totalsRowFunction&&x.setAttribute("totalsRowFunction",C.totalsRowFunction),C.totalsRowLabel&&x.setAttribute("totalsRowLabel",C.totalsRowLabel)}return p},exportAutoFilter:function(c){var p=c.createElement("autoFilter"),m=this.autoFilter[0],v=this.autoFilter[1];return p.setAttribute("ref",u.positionToLetterRef(m[0],m[1])+":"+u.positionToLetterRef(v[0],v[1]-this.totalsRowCount)),p},exportTableStyleInfo:function(c){var p=this.styleInfo,m=c.createElement("tableStyleInfo");return m.setAttribute("name",p.themeStyle),m.setAttribute("showFirstColumn",p.showFirstColumn?"1":"0"),m.setAttribute("showLastColumn",p.showLastColumn?"1":"0"),m.setAttribute("showColumnStripes",p.showColumnStripes?"1":"0"),m.setAttribute("showRowStripes",p.showRowStripes?"1":"0"),m},addAutoFilter:function(c,p){this.autoFilter=[c,p]}}),r.exports=h},952:function(r,o,s){var l=s(434),u=s(804),h=s(328),c=s(747),p=s(20),m=s(349),v=s(785),_=s(255),C=s(543),x=function(S){this.worksheets=[],this.tables=[],this.drawings=[],this.media={},this.initialize(S)};u.extend(x.prototype,{initialize:function(){this.id=u.uniqueId("Workbook"),this.styleSheet=new c,this.sharedStrings=new m,this.relations=new v,this.relations.addRelation(this.styleSheet,"stylesheet"),this.relations.addRelation(this.sharedStrings,"sharedStrings")},createWorksheet:function(S){return S=S||{},u.defaults(S,{name:"Sheet ".concat(this.worksheets.length+1)}),new p(S)},getStyleSheet:function(){return this.styleSheet},addTable:function(S){this.tables.push(S)},addDrawings:function(S){this.drawings.push(S)},setPrintTitleTop:function(S,E){this.printTitles==null&&(this.printTitles={}),this.printTitles[S]==null&&(this.printTitles[S]={}),this.printTitles[S].top=E},setPrintTitleLeft:function(S,E){this.printTitles==null&&(this.printTitles={}),this.printTitles[S]==null&&(this.printTitles[S]={}),this.printTitles[S].left=String.fromCharCode(64+E)},addMedia:function(S,E,D,A){var P=E.split("."),M=P[P.length-1];if(!A)switch(M.toLowerCase()){case"jpeg":case"jpg":A="image/jpeg";break;case"png":A="image/png";break;case"gif":A="image/gif";break;default:A=null;break}return this.media[E]||(this.media[E]={id:E,data:D,fileName:E,contentType:A,extension:M}),this.media[E]},addWorksheet:function(S){this.relations.addRelation(S,"worksheet"),S.setSharedStringCollection(this.sharedStrings),this.worksheets.push(S)},createContentTypes:function(){var S=h.createXmlDoc(h.schemas.contentTypes,"Types"),E=S.documentElement,D,A;E.appendChild(h.createElement(S,"Default",[["Extension","rels"],["ContentType","application/vnd.openxmlformats-package.relationships+xml"]])),E.appendChild(h.createElement(S,"Default",[["Extension","xml"],["ContentType","application/xml"]]));var P={};for(var M in this.media)this.media.hasOwnProperty(M)&&(P[this.media[M].extension]=this.media[M].contentType);for(var B in P)P.hasOwnProperty(B)&&E.appendChild(h.createElement(S,"Default",[["Extension",B],["ContentType",P[B]]]));for(E.appendChild(h.createElement(S,"Override",[["PartName","/xl/workbook.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"]])),E.appendChild(h.createElement(S,"Override",[["PartName","/xl/sharedStrings.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"]])),E.appendChild(h.createElement(S,"Override",[["PartName","/xl/styles.xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"]])),D=0,A=this.worksheets.length;D<A;D++)E.appendChild(h.createElement(S,"Override",[["PartName","/xl/worksheets/sheet"+(D+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"]]));for(D=0,A=this.tables.length;D<A;D++)E.appendChild(h.createElement(S,"Override",[["PartName","/xl/tables/table"+(D+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"]]));for(D=0,A=this.drawings.length;D<A;D++)E.appendChild(h.createElement(S,"Override",[["PartName","/xl/drawings/drawing"+(D+1)+".xml"],["ContentType","application/vnd.openxmlformats-officedocument.drawing+xml"]]));return S},toXML:function(){var S=h.createXmlDoc(h.schemas.spreadsheetml,"workbook"),E=S.documentElement;E.setAttribute("xmlns:r",h.schemas.relationships);for(var D=31,A=h.createElement(S,"sheets"),P=0,M=this.worksheets.length;P<M;P++){var B=S.createElement("sheet");typeof console<"u"&&this.worksheets[P].name.length>D&&console.log("Microsoft Excel requires work sheet names to be less than "+(D+1)+' characters long, work sheet name "'+this.worksheets[P].name+'" is '+this.worksheets[P].name.length+" characters long"),B.setAttribute("name",this.worksheets[P].name),B.setAttribute("sheetId",P+1),B.setAttribute("r:id",this.relations.getRelationshipId(this.worksheets[P])),A.appendChild(B)}E.appendChild(A);var Z=h.createElement(S,"definedNames"),L=0;for(var ae in this.printTitles)if(this.printTitles.hasOwnProperty(ae)){var _e=this.printTitles[ae],J=S.createElement("definedName");J.setAttribute("name","_xlnm.Print_Titles"),J.setAttribute("localSheetId",L++);var U="";_e.top&&(U+=ae+"!$1:$"+_e.top,_e.left&&(U+=",")),_e.left&&(U+=ae+"!$A:$"+_e.left),J.appendChild(S.createTextNode(U)),Z.appendChild(J)}return E.appendChild(Z),S},createWorkbookRelationship:function(){var S=h.createXmlDoc(h.schemas.relationshipPackage,"Relationships"),E=S.documentElement;return E.appendChild(h.createElement(S,"Relationship",[["Id","rId1"],["Type",h.schemas.officeDocument],["Target","xl/workbook.xml"]])),S},_generateCorePaths:function(S){var E,D;for(_[this.styleSheet.id]="styles.xml",_[this.sharedStrings.id]="sharedStrings.xml",_[this.id]="/xl/workbook.xml",E=0,D=this.tables.length;E<D;E++)S["/xl/tables/table"+(E+1)+".xml"]=this.tables[E].toXML(),_[this.tables[E].id]="/xl/tables/table"+(E+1)+".xml";for(var A in this.media)if(this.media.hasOwnProperty(A)){var P=this.media[A];S["/xl/media/"+A]=P.data,_[A]="/xl/media/"+A}for(E=0,D=this.drawings.length;E<D;E++)S["/xl/drawings/drawing"+(E+1)+".xml"]=this.drawings[E].toXML(),_[this.drawings[E].id]="/xl/drawings/drawing"+(E+1)+".xml",S["/xl/drawings/_rels/drawing"+(E+1)+".xml.rels"]=this.drawings[E].relations.toXML()},_prepareFilesForPackaging:function(S){u.extend(S,{"/[Content_Types].xml":this.createContentTypes(),"/_rels/.rels":this.createWorkbookRelationship(),"/xl/styles.xml":this.styleSheet.toXML(),"/xl/workbook.xml":this.toXML(),"/xl/sharedStrings.xml":this.sharedStrings.toXML(),"/xl/_rels/workbook.xml.rels":this.relations.toXML()}),u.each(S,function(E,D){if(D.indexOf(".xml")!==-1||D.indexOf(".rels")!==-1){E instanceof C?S[D]=E.toString():S[D]=E.xml||new window.XMLSerializer().serializeToString(E);var A=S[D].replace(/xmlns=""/g,"");A=A.replace(/NS[\d]+:/g,""),A=A.replace(/xmlns:NS[\d]+=""/g,""),S[D]=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
108
108
  `+A}})},generateFiles:function(){var S={};this._generateCorePaths(S);for(var E=0,D=this.worksheets.length;E<D;E++)S["/xl/worksheets/sheet"+(E+1)+".xml"]=this.worksheets[E].toXML(),_[this.worksheets[E].id]="worksheets/sheet"+(E+1)+".xml",S["/xl/worksheets/_rels/sheet"+(E+1)+".xml.rels"]=this.worksheets[E].relations.toXML();return this._prepareFilesForPackaging(S),l.resolve(S)}}),r.exports=x},20:function(r,o,s){var l=s(804),u=s(328),h=s(785),c=s(958),p=function(m){this.relations=null,this.columnFormats=[],this.data=[],this.mergedCells=[],this.columns=[],this.sheetProtection=!1,this._headers=[],this._footers=[],this._tables=[],this._drawings=[],this._rowInstructions={},this._freezePane={},this.hyperlinks=[],this.sheetView=m.sheetView||new c,this.showZeros=null,this.initialize(m)};l.extend(p.prototype,{initialize:function(m){m=m||{},this.name=m.name,this.id=l.uniqueId("Worksheet"),this._timezoneOffset=new Date().getTimezoneOffset()*60*1e3,m.columns&&this.setColumns(m.columns),this.relations=new h},exportData:function(){return{relations:this.relations.exportData(),columnFormats:this.columnFormats,data:this.data,columns:this.columns,mergedCells:this.mergedCells,_headers:this._headers,_footers:this._footers,_tables:this._tables,_rowInstructions:this._rowInstructions,_freezePane:this._freezePane,name:this.name,id:this.id}},importData:function(m){this.relations.importData(m.relations),delete m.relations,l.extend(this,m)},setSharedStringCollection:function(m){this.sharedStrings=m},addTable:function(m){this._tables.push(m),this.relations.addRelation(m,"table")},addDrawings:function(m){this._drawings.push(m),this.relations.addRelation(m,"drawingRelationship")},setRowInstructions:function(m,v){this._rowInstructions[m]=v},setHeader:function(m){if(!l.isArray(m))throw"Invalid argument type - setHeader expects an array of three instructions";this._headers=m},setFooter:function(m){if(!l.isArray(m))throw"Invalid argument type - setFooter expects an array of three instructions";this._footers=m},compilePageDetailPackage:function(m){return m=m||"",["&L",this.compilePageDetailPiece(m[0]||""),"&C",this.compilePageDetailPiece(m[1]||""),"&R",this.compilePageDetailPiece(m[2]||"")].join("")},compilePageDetailPiece:function(m){if(l.isString(m))return'&"-,Regular"'.concat(m);if(l.isObject(m)&&!l.isArray(m)){var v="";if(m.font||m.bold){var _=m.bold?"Bold":"Regular";v+='&"'+(m.font||"-"),v+=","+_+'"'}else v+='&"-,Regular"';return m.underline&&(v+="&U"),m.fontSize&&(v+="&"+m.fontSize),v+=m.text,v}if(l.isArray(m)){var C=this;return l.reduce(m,function(x,S){return x.concat(C.compilePageDetailPiece(S))},"")}},exportHeader:function(m){var v=m.createElement("oddHeader");return v.appendChild(m.createTextNode(this.compilePageDetailPackage(this._headers))),v},exportFooter:function(m){var v=m.createElement("oddFooter");return v.appendChild(m.createTextNode(this.compilePageDetailPackage(this._footers))),v},_buildCache:function(m){var v=m.createElement("c"),_=m.createElement("v");_.appendChild(m.createTextNode("--temp--")),v.appendChild(_);var C=m.createElement("c"),x=m.createElement("f");x.appendChild(m.createTextNode("--temp--")),C.appendChild(x);var S=m.createElement("c");S.setAttribute("t","s");var E=m.createElement("v");return E.appendChild(m.createTextNode("--temp--")),S.appendChild(E),{number:v,date:v,string:S,formula:C}},collectSharedStrings:function(){for(var m=this.data,v={},_=0,C=m.length;_<C;_++)for(var x=m[_],S=x.length,E=0;E<S;E++){var D=x[E],A=D&&D.metadata||{};D&&typeof D=="object"&&(D=D.value),A.type||typeof D=="number"&&(A.type="number"),(A.type==="text"||!A.type)&&typeof v[D]>"u"&&(v[D]=!0)}return l.keys(v)},toXML:function(){var m=this.data,v=this.columns||[],_=u.createXmlDoc(u.schemas.spreadsheetml,"worksheet"),C=_.documentElement,x,S,E;C.setAttribute("xmlns:r",u.schemas.relationships),C.setAttribute("xmlns:mc",u.schemas.markupCompat);var D=0,A=u.createElement(_,"sheetData"),P=this._buildCache(_);for(E=0,S=m.length;E<S;E++){var M=m[E],B=M.length;D=B>D?B:D;for(var Z=_.createElement("row"),L=0;L<B;L++){v[L]=v[L]||{};var ae=M[L],_e,J=ae&&ae.metadata||{};switch(ae&&typeof ae=="object"&&(ae=ae.value),J.type||typeof ae=="number"&&(J.type="number"),J.type){case"number":_e=P.number.cloneNode(!0),_e.firstChild.firstChild.nodeValue=ae;break;case"date":_e=P.date.cloneNode(!0),_e.firstChild.firstChild.nodeValue=25569+(ae-this._timezoneOffset)/864e5;break;case"formula":_e=P.formula.cloneNode(!0),_e.firstChild.firstChild.nodeValue=ae;break;case"text":default:var U;typeof this.sharedStrings.strings[ae]<"u"?U=this.sharedStrings.strings[ae]:U=this.sharedStrings.addString(ae),_e=P.string.cloneNode(!0),_e.firstChild.firstChild.nodeValue=U;break}J.style?_e.setAttribute("s",J.style):this._rowInstructions[E]&&this._rowInstructions[E].style!==void 0&&_e.setAttribute("s",this._rowInstructions[E].style),_e.setAttribute("r",u.positionToLetterRef(L+1,E+1)),Z.appendChild(_e)}if(Z.setAttribute("r",E+1),this._rowInstructions[E]){var F=this._rowInstructions[E];F.height!==void 0&&(Z.setAttribute("customHeight","1"),Z.setAttribute("ht",F.height)),F.style!==void 0&&(Z.setAttribute("customFormat","1"),Z.setAttribute("s",F.style))}A.appendChild(Z)}if(D!==0?C.appendChild(u.createElement(_,"dimension",[["ref",u.positionToLetterRef(1,1)+":"+u.positionToLetterRef(D,m.length)]])):C.appendChild(u.createElement(_,"dimension",[["ref",u.positionToLetterRef(1,1)]])),C.appendChild(this.sheetView.exportXML(_)),this.columns.length&&C.appendChild(this.exportColumns(_)),C.appendChild(A),this.sheetProtection&&C.appendChild(this.sheetProtection.exportXML(_)),this.hyperlinks.length>0){var de=_.createElement("hyperlinks"),qe=this.hyperlinks;for(x=0,S=qe.length;x<S;x++){var Ie=_.createElement("hyperlink"),xe=qe[x];Ie.setAttribute("ref",xe.cell),xe.id=u.uniqueId("hyperlink"),this.relations.addRelation({id:xe.id,target:xe.location,targetMode:xe.targetMode||"External"},"hyperlink"),Ie.setAttribute("r:id",this.relations.getRelationshipId(xe)),de.appendChild(Ie)}C.appendChild(de)}if(this.mergedCells.length>0){var Oe=_.createElement("mergeCells");for(x=0,S=this.mergedCells.length;x<S;x++){var De=_.createElement("mergeCell");De.setAttribute("ref",this.mergedCells[x][0]+":"+this.mergedCells[x][1]),Oe.appendChild(De)}C.appendChild(Oe)}if(this.exportPageSettings(_,C),this._headers.length>0||this._footers.length>0){var ne=_.createElement("headerFooter");this._headers.length>0&&ne.appendChild(this.exportHeader(_)),this._footers.length>0&&ne.appendChild(this.exportFooter(_)),C.appendChild(ne)}for(x=0,S=this._drawings.length;x<S;x++){var pe=_.createElement("drawing");pe.setAttribute("r:id",this.relations.getRelationshipId(this._drawings[x])),C.appendChild(pe)}if(this._tables.length>0){var Ve=_.createElement("tableParts");for(Ve.setAttribute("count",this._tables.length),x=0,S=this._tables.length;x<S;x++){var Ye=_.createElement("tablePart");Ye.setAttribute("r:id",this.relations.getRelationshipId(this._tables[x])),Ve.appendChild(Ye)}C.appendChild(Ve)}return _},exportColumns:function(m){for(var v=u.createElement(m,"cols"),_=0,C=this.columns.length;_<C;_++){var x=this.columns[_],S=u.createElement(m,"col",[["min",x.min||_+1],["max",x.max||_+1]]);x.hidden&&S.setAttribute("hidden",1),x.bestFit&&S.setAttribute("bestFit",1),(x.customWidth||x.width)&&S.setAttribute("customWidth",1),x.width?S.setAttribute("width",x.width):S.setAttribute("width",9.140625),v.appendChild(S)}return v},exportPageSettings:function(m,v){if(this._margin){var _=.7,C=this._margin.left?this._margin.left:_,x=this._margin.right?this._margin.right:_,S=this._margin.top?this._margin.top:_,E=this._margin.bottom?this._margin.bottom:_;_=.3;var D=this._margin.header?this._margin.header:_,A=this._margin.footer?this._margin.footer:_;v.appendChild(u.createElement(m,"pageMargins",[["top",S],["bottom",E],["left",C],["right",x],["header",D],["footer",A]]))}this._orientation&&v.appendChild(u.createElement(m,"pageSetup",[["orientation",this._orientation]]))},setPageOrientation:function(m){this._orientation=m},setPageMargin:function(m){this._margin=m},setColumns:function(m){this.columns=m},setData:function(m){this.data=m},mergeCells:function(m,v){this.mergedCells.push([m,v])},freezePane:function(m,v,_){this.sheetView.freezePane(m,v,_)},setColumnFormats:function(m){this.columnFormats=m}}),r.exports=p},543:function(r,o,s){var l=s(804),u=function(h,c){this.documentElement=this.createElement(c),this.documentElement.setAttribute("xmlns",h)};l.extend(u.prototype,{createElement:function(h){return new u.XMLNode({nodeName:h})},createTextNode:function(h){return new u.TextNode(h)},toString:function(){return this.documentElement.toString()}}),u.Node=function(){},u.Node.Create=function(h){switch(h.type){case"XML":return new u.XMLNode(h);case"TEXT":return new u.TextNode(h.nodeValue)}},u.TextNode=function(h){this.nodeValue=h},l.extend(u.TextNode.prototype,{toJSON:function(){return{nodeValue:this.nodeValue,type:"TEXT"}},toString:function(){return l.escape(this.nodeValue)}}),u.XMLNode=function(h){if(this.nodeName=h.nodeName,this.children=[],this.nodeValue=h.nodeValue||"",this.attributes={},h.children)for(var c=0,p=h.children.length;c<p;c++)this.appendChild(u.Node.Create(h.children[c]));if(h.attributes)for(var m in h.attributes)h.attributes.hasOwnProperty(m)&&this.setAttribute(m,h.attributes[m])},l.extend(u.XMLNode.prototype,{toString:function(){var h="<"+this.nodeName;for(var c in this.attributes)this.attributes.hasOwnProperty(c)&&(h=h+" "+c+'="'+l.escape(this.attributes[c])+'"');for(var p="",m=0,v=this.children.length;m<v;m++)p+=this.children[m].toString();return p?h+=">"+p+"</"+this.nodeName+">":h+="/>",h},toJSON:function(){for(var h=[],c=0,p=this.children.length;c<p;c++)h.push(this.children[c].toJSON());return{nodeName:this.nodeName,children:h,nodeValue:this.nodeValue,attributes:this.attributes,type:"XML"}},setAttribute:function(h,c){if(c===null){delete this.attributes[h],delete this[h];return}this.attributes[h]=c,this[h]=c},appendChild:function(h){this.children.push(h),this.firstChild=this.children[0]},cloneNode:function(){return new u.XMLNode(this.toJSON())}}),r.exports=u},328:function(r,o,s){var l=s(543),u=s(804),h={_idSpaces:{},uniqueId:function(c){return this._idSpaces[c]||(this._idSpaces[c]=1),this._idSpaces[c]++},createXmlDoc:function(c,p){return new l(c||null,p,null)},createElement:function(c,p,m){var v=c.createElement(p);m=m||[];for(var _=m.length;_--;)v.setAttribute(m[_][0],m[_][1]);return v},setAttributesOnDoc:function(c,p){u.forEach(p,function(m,v){if(u.isPlainObject(m))if(m.v!==null&&m.v!==void 0)switch(m.type){case Boolean:m=m.v?"1":"0";break}else m=null;m!=null&&c.setAttribute(v,m)})},LETTER_REFS:{},positionToLetterRef:function(c,p){var m=1,v,_=c,C="",x="ABCDEFGHIJKLMNOPQRSTUVWXYZ";if(this.LETTER_REFS[c])return this.LETTER_REFS[c].concat(p);for(;_>0;)_-=Math.pow(26,m-1),v=_%Math.pow(26,m),_-=v,v=v/Math.pow(26,m-1),C=x.charAt(v)+C,m+=1;return this.LETTER_REFS[c]=C,C.concat(p)},schemas:{worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",sharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",stylesheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",relationships:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",relationshipPackage:"http://schemas.openxmlformats.org/package/2006/relationships",contentTypes:"http://schemas.openxmlformats.org/package/2006/content-types",spreadsheetml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",markupCompat:"http://schemas.openxmlformats.org/markup-compatibility/2006",x14ac:"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac",officeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",package:"http://schemas.openxmlformats.org/package/2006/relationships",table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",spreadsheetDrawing:"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",drawing:"http://schemas.openxmlformats.org/drawingml/2006/main",drawingRelationship:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink"}};r.exports=h},450:function(r,o,s){var l=s(952),u=s(496),h=s(804),c=function(p){this.workbook=new l,this.stylesheet=this.workbook.getStyleSheet(),this.columns={},this.predefinedStyles={},this.predefinedFormatters={date:this.stylesheet.createSimpleFormatter("date"),currency:this.stylesheet.createFormat({format:"$ #,##0.00;$ #,##0.00;-",font:{color:"FFE9F50A"}}),header:this.stylesheet.createFormat({font:{bold:!0,underline:!0,color:{theme:3}},alignment:{horizontal:"center"}})},p!=null?this.worksheet=this.workbook.createWorksheet(p):this.worksheet=this.workbook.createWorksheet(),this.workbook.addWorksheet(this.worksheet),this.worksheet.setPageOrientation("landscape"),this.table=new u,this.table.styleInfo.themeStyle="TableStyleLight1",this.worksheet.addTable(this.table),this.workbook.addTable(this.table)};h.extend(c.prototype,{setHeader:function(){this.worksheet.setHeader.apply(this.worksheet,arguments)},setFooter:function(){this.worksheet.setFooter.apply(this.worksheet,arguments)},prepare:function(){return this.workbook},setData:function(p){this.worksheet.setData(p),this.data=p,this.table.setReferenceRange([1,1],[this.columns.length,p.length])},setColumns:function(p){this.columns=p,this.worksheet.setColumns(p),this.table.setTableColumns(p),this.table.setReferenceRange([1,1],[this.columns.length,this.data.length])},getWorksheet:function(){return this.worksheet}}),r.exports=c},133:function(r,o,s){r.exports={BasicReport:s(450)}},396:function(r,o,s){var l=s(804),u=s(952),h=s(395),c={createWorkbook:function(){return new u},config:{forceUIThread:!1},createFile:function(p,m){var v=new h;return p.generateFiles().then(function(_){return l.each(_,function(C,x){x=x.substr(1),x.indexOf(".xml")!==-1||x.indexOf(".rel")!==-1?v.file(x,C,{base64:!1}):v.file(x,C,{base64:!0,binary:!0})}),v.generateAsync(l.defaults(m||{},{type:"base64"}))})}};r.exports=c},351:function(r,o,s){var l=r.exports={Drawings:s(861),Drawing:s(890),Pane:s(753),Paths:s(255),Positioning:s(864),RelationshipManager:s(785),SharedStrings:s(349),SheetView:s(958),StyleSheet:s(747),Table:s(496),util:s(328),Workbook:s(952),Worksheet:s(20),XMLDOM:s(543),Builder:s(396),Template:s(133)};try{typeof window<"u"&&(window.ExcelBuilder=l)}catch{console.info("Not attaching EB to window")}},395:function(r){r.exports=XC()},804:function(r){r.exports=qC()},434:function(r){r.exports=KC()}},t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}},s=!0;try{a[r](o,o.exports,e),s=!1}finally{s&&delete t[r]}return o.exports}var n=typeof n<"u"?n:"";return e.ab=n+"/",e(351)}();const Av=eh(Ov),ZC=pl({__proto__:null,default:Av},[Ov]),QC=a=>a,JC=(a,t,e,n,r)=>({value:typeof a=="string"&&/\d/g.test(a)?ey(a,t,r):a,metadata:{style:e}});function ey(a,t,e){let n=a;if(typeof a=="string"&&a){const r=qo("decimalSeparator",t,e,je.DEFAULT_NUMBER_DECIMAL_SEPARATOR),o=parseFloat(r===","?a.replace(/[^0-9\,\-]+/g,"").replace(",","."):a.replace(/[^\d\.\-]/g,""));n=isNaN(o)?a:o}return n}function ty(a,t,e,n,r=!0){const o=za(e);let s,l=QC;return o===ie.number&&r&&(s=yf(a,t,e,n,"cell").stylesheetFormatter.id,l=JC),{stylesheetFormatterId:s,getDataValueParser:l}}function iy(a,t,e){var n,r;return(r=(n=a==null?void 0:a[e])===null||n===void 0?void 0:n[t.field])!==null&&r!==void 0?r:0}function ny(a,t,e){var n;let r;if(e==="group")switch(a.groupTotalsFormatter){case Ti.avgTotalsCurrency:case Ti.avgTotalsDollar:case Ti.sumTotalsCurrency:case Ti.sumTotalsCurrencyColored:case Ti.sumTotalsDollar:case Ti.sumTotalsDollarBold:case Ti.sumTotalsDollarColored:case Ti.sumTotalsDollarColoredBold:r="currency";break;case Ti.avgTotalsPercentage:r="percent";break;case Ti.avgTotals:case Ti.minTotals:case Ti.maxTotals:case Ti.sumTotals:case Ti.sumTotalsColored:case Ti.sumTotalsBold:default:r="decimal";break}else if(a.formatter===sn.multiple&&Array.isArray((n=a.params)===null||n===void 0?void 0:n.formatters)){r="decimal";for(const o of a.params.formatters)if(r=kv(o),r!=="decimal")break}else r=kv(a.formatter);return dn(a,t,r,e)}function kv(a){let t;switch(a){case sn.currency:case sn.dollar:case sn.dollarColored:case sn.dollarColoredBold:t="currency";break;case sn.percent:case sn.percentComplete:case sn.percentCompleteBar:case sn.percentCompleteBarWithText:case sn.percentSymbol:t="percent";break;case sn.decimal:default:t="decimal";break}return t}function yf(a,t,e,n,r){var o;let s="",l="",u;const h=za(e);if(r==="group")switch(e.groupTotalsFormatter){case Ti.avgTotals:case Ti.avgTotalsCurrency:case Ti.avgTotalsDollar:case Ti.avgTotalsPercentage:l="avg";break;case Ti.minTotals:l="min";break;case Ti.maxTotals:l="max";break;case Ti.sumTotals:case Ti.sumTotalsBold:case Ti.sumTotalsColored:case Ti.sumTotalsCurrency:case Ti.sumTotalsCurrencyColored:case Ti.sumTotalsDollar:case Ti.sumTotalsDollarColoredBold:case Ti.sumTotalsDollarColored:case Ti.sumTotalsDollarBold:l="sum";break;default:u=t.numberFormatter;break}else switch(h){case ie.number:switch(e.formatter){case sn.multiple:if(Array.isArray((o=e.params)===null||o===void 0?void 0:o.formatters))for(const c of e.params.formatters){const{stylesheetFormatter:p}=yf(a,t,{...e,formatter:c},n,r);if(p!==t.numberFormatter){u=p;break}}u||(u=t.numberFormatter);break;case sn.currency:case sn.decimal:case sn.dollar:case sn.dollarColored:case sn.dollarColoredBold:case sn.percent:case sn.percentComplete:case sn.percentCompleteBar:case sn.percentCompleteBarWithText:case sn.percentSymbol:s=Dv(e,n,"cell");break;default:u=t.numberFormatter;break}break}return!u&&(e.formatter||e.groupTotalsFormatter)&&(s=Dv(e,n,r,l),t.hasOwnProperty(s)||(t[s]=a.createFormat({format:s})),u=t[s]),{stylesheetFormatter:u,groupType:l}}function Iv(a){const[t,e,n,r,o,s,l,u]=(a==null?void 0:a.match(/^([^\d\(\-]*)([\(]?)([^\d]*)([\-]?[\w]]?[\d\s]*[.,\d]*[\d]*[^)\s\%]?)([^\d.,)]*)([\)]?)([^\d]*)$/i))||[],h=(o||"").replace(/1/g,"0").replace(/[2]/g,"#");return[Wu(e??""),n??"",Wu(r??""),h,Wu(s??""),l??"",Wu(u??"")].join("").replace(",",",")}function Dv(a,t,e,n=""){let r="",o="",s="";const{minDecimal:l,maxDecimal:u,thousandSeparator:h}=ny(a,t,e),p=parseFloat(`${h?"2220":"0"}.${ry(l,u)}`);return e==="group"&&a.groupTotalsFormatter?(o=or(a.groupTotalsFormatter({[n]:{[a.field]:p}},a,t)),s=or(a.groupTotalsFormatter({[n]:{[a.field]:-p}},a,t))):a.formatter&&(o=or(a.formatter(0,0,p,a,{},t)),s=or(a.formatter(0,0,-p,a,{},t))),o&&s&&(r=Iv(o)+";"+Iv(s)),r}function Wu(a){return a&&`"${a}"`}function ry(a,t){return Rv("1",a)+Rv("2",t-a)}function Rv(a,t){let e="";for(let n=0;n<t;n++)e+=a;return e}const wl=Av||ZC,oy={filename:"export",format:an.xlsx};class sy{constructor(){this._fileFormat=an.xlsx,this._columnHeaders=[],this._hasColumnTitlePreHeader=!1,this._hasGroupedItems=!1,this._pubSubService=null,this._regularCellExcelFormats={},this._groupTotalExcelFormats={},this.className="ExcelExportService"}get _datasetIdPropName(){var t,e;return(e=(t=this._gridOptions)===null||t===void 0?void 0:t.datasetIdPropertyName)!==null&&e!==void 0?e:"id"}get _dataView(){var t;return(t=this._grid)===null||t===void 0?void 0:t.getData()}get _gridOptions(){var t;return((t=this._grid)===null||t===void 0?void 0:t.getOptions())||{}}get stylesheet(){return this._stylesheet}get stylesheetFormats(){return this._stylesheetFormats}get groupTotalExcelFormats(){return this._groupTotalExcelFormats}get regularCellExcelFormats(){return this._regularCellExcelFormats}dispose(){var t;(t=this._pubSubService)===null||t===void 0||t.unsubscribeAll()}init(t,e){var n,r,o;if(this._grid=t,this._pubSubService=e.get("PubSubService"),this._locales=(r=(n=this._gridOptions)===null||n===void 0?void 0:n.locales)!==null&&r!==void 0?r:je.locales,this._translaterService=(o=this._gridOptions)===null||o===void 0?void 0:o.translater,this._gridOptions.enableTranslate&&(!this._translaterService||!this._translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be passed in the "translater" Grid Options when "enableTranslate" is enabled. (example: this.gridOptions = { enableTranslate: true, translater: this.translaterService })')}exportToExcel(t){var e;if(!this._grid||!this._dataView||!this._pubSubService)throw new Error('[Slickgrid-Universal] it seems that the SlickGrid & DataView objects and/or PubSubService are not initialized did you forget to enable the grid option flag "enableExcelExport"?');return(e=this._pubSubService)===null||e===void 0||e.publish("onBeforeExportToExcel",!0),this._excelExportOptions=fo({...oy,...this._gridOptions.excelExportOptions,...t}),this._fileFormat=this._excelExportOptions.format||an.xlsx,this._regularCellExcelFormats={},this._groupTotalExcelFormats={},new Promise(n=>{const r={name:this._excelExportOptions.sheetName||"Sheet1"};this._workbook=wl.Workbook?new wl.Workbook:wl.createWorkbook(),this._sheet=wl.Worksheet?new wl.Worksheet(r):this._workbook.createWorksheet(r),this._stylesheet=this._workbook.getStyleSheet();const o=this._stylesheet.createFormat({font:{bold:!0}}),s=this._stylesheet.createFormat({format:"@"}),l=this._stylesheet.createFormat({format:"0"});this._stylesheetFormats={boldFormatter:o,numberFormatter:l,stringFormatter:s},this._sheet.setColumnFormats([o]);const u=this.getDataOutput();setTimeout(async()=>{var h,c,p,m,v,_,C;!((c=(h=this._gridOptions)===null||h===void 0?void 0:h.excelExportOptions)===null||c===void 0)&&c.customExcelHeader&&this._gridOptions.excelExportOptions.customExcelHeader(this._workbook,this._sheet);const x=((p=this._grid)===null||p===void 0?void 0:p.getColumns())||[];this._sheet.setColumns(this.getColumnStyles(x));const S=this._sheet.data;let E=S;Array.isArray(S)&&Array.isArray(u)&&(E=this._sheet.data.concat(u)),this._sheet.setData(E),this._workbook.addWorksheet(this._sheet);const D=(v=(m=wl.Builder)===null||m===void 0?void 0:m.createFile)!==null&&v!==void 0?v:wl.createFile;let A=(_=this._excelExportOptions)===null||_===void 0?void 0:_.mimeType;A===void 0&&(A=this._fileFormat===an.xls?"application/vnd.ms-excel":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");const P=A===""?{type:"blob"}:{type:"blob",mimeType:A},M=await D(this._workbook,P),B={filename:`${this._excelExportOptions.filename}.${this._fileFormat}`,format:this._fileFormat};this.startDownloadFile({...B,blob:M,data:this._sheet.data}),(C=this._pubSubService)===null||C===void 0||C.publish("onAfterExportToExcel",B),n(!0)})})}getExcelColumnNameByIndex(t){const e="ZABCDEFGHIJKLMNOPQRSTUVWXY";let n=Math.floor(t/26);const r=Math.floor(t%26);return r===0&&n--,t>26?this.getExcelColumnNameByIndex(n)+e[r]:e[r]+""}startDownloadFile(t){if(typeof navigator.msSaveOrOpenBlob=="function")navigator.msSaveOrOpenBlob(t.blob,t.filename);else{const e=document.createElement("a"),n=URL.createObjectURL(t.blob);e&&document&&(e.textContent="download",e.href=n,e.setAttribute("download",t.filename),e.style.visibility="hidden",document.body.appendChild(e),e.click(),document.body.removeChild(e))}}getDataOutput(){var t,e;const n=((t=this._grid)===null||t===void 0?void 0:t.getColumns())||[],r=[],o=(e=this._gridOptions)===null||e===void 0?void 0:e.excelExportOptions,s=o==null?void 0:o.columnHeaderStyle;let l=this._stylesheetFormats.boldFormatter.id;if(s&&(l=this._stylesheet.createFormat(s).id),this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping){const u=this._stylesheet.createFormat({alignment:{horizontal:"center"},font:{bold:!0}});r.push(this.getColumnGroupedHeaderTitlesData(n,{style:u==null?void 0:u.id})),this._hasColumnTitlePreHeader=!0}return r.push(this.getColumnHeaderData(n,{style:l})),this.pushAllGridRowDataToArray(r,n),r}getColumnStyles(t){var e,n,r;const o=this._dataView.getGrouping(),s=[];return Array.isArray(o)&&o.length>0&&s.push({bestFit:!0,columnStyles:(r=(n=(e=this._gridOptions)===null||e===void 0?void 0:e.excelExportOptions)===null||n===void 0?void 0:n.customColumnWidth)!==null&&r!==void 0?r:10}),t.forEach(l=>{var u,h,c,p,m,v,_;const C=(u=l.excludeFromExport)!==null&&u!==void 0?u:!1;(l.width===void 0||l.width>0)&&!C&&s.push({bestFit:!0,width:(_=(p=(h=l.exportColumnWidth)!==null&&h!==void 0?h:(c=l.excelExportOptions)===null||c===void 0?void 0:c.width)!==null&&p!==void 0?p:(v=(m=this._gridOptions)===null||m===void 0?void 0:m.excelExportOptions)===null||v===void 0?void 0:v.customColumnWidth)!==null&&_!==void 0?_:10})}),s}getColumnGroupedHeaderTitlesData(t,e){let n=[];this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(t)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0&&(n=this._groupedColumnHeaders.map(s=>({value:s.title,metadata:e})));let r=0;const o=this._groupedColumnHeaders.length;for(let s=0;s<o;s++)if(s+1===o||s+1<o&&this._groupedColumnHeaders[s].title!==this._groupedColumnHeaders[s+1].title){const l=this.getExcelColumnNameByIndex(r+1),u=this.getExcelColumnNameByIndex(s+1);this._sheet.mergeCells(`${l}1`,`${u}1`),r=s+1}return n}getColumnHeaderData(t,e){let n=[];this._columnHeaders=this.getColumnHeaders(t)||[],this._columnHeaders&&Array.isArray(this._columnHeaders)&&this._columnHeaders.length>0&&(n=this._columnHeaders.map(o=>({value:or(o.title),metadata:e})));const r=this.getGroupColumnTitle();return r&&n.unshift({value:r,metadata:e}),n}getGroupColumnTitle(){var t;let e=this._excelExportOptions.groupingColumnHeaderTitle;!e&&this._gridOptions.enableTranslate&&(!((t=this._translaterService)===null||t===void 0)&&t.translate)?e=this._translaterService.translate(`${ho(this._gridOptions)}GROUP_BY`):e||(e=this._locales&&this._locales.TEXT_GROUP_BY);const n=this._dataView.getGrouping();return Array.isArray(n)&&n.length>0?(this._hasGroupedItems=!0,e):(this._hasGroupedItems=!1,null)}getColumnGroupedHeaderTitles(t){const e=[];return t&&Array.isArray(t)&&t.forEach(n=>{var r;let o="";n.columnGroupKey&&this._gridOptions.enableTranslate&&(!((r=this._translaterService)===null||r===void 0)&&r.translate)?o=this._translaterService.translate(n.columnGroupKey):o=n.columnGroup||"";const s=n.excludeFromExport||!1;(n.width===void 0||n.width>0)&&!s&&e.push({key:n.field||n.id,title:o||""})}),e}getColumnHeaders(t){const e=[];return t&&Array.isArray(t)&&t.forEach(n=>{var r;let o="";(n.nameKey||n.nameKey)&&this._gridOptions.enableTranslate&&(!((r=this._translaterService)===null||r===void 0)&&r.translate)?o=this._translaterService.translate(n.nameKey||n.nameKey):o=n.name||vl(n.field);const s=n.excludeFromExport||!1;(n.width===void 0||n.width>0)&&!s&&e.push({key:(n.field||n.id)+"",title:o})}),e}pushAllGridRowDataToArray(t,e){const n=this._dataView.getLength();for(let r=0;r<n;r++){const o=this._dataView.getItem(r);o&&!o.hasOwnProperty("getItem")&&(o[this._datasetIdPropName]!==null&&o[this._datasetIdPropName]!==void 0?t.push(this.readRegularRowData(e,r,o)):this._hasGroupedItems&&o.__groupTotals===void 0?t.push([this.readGroupedRowTitle(o)]):o.__groupTotals&&t.push(this.readGroupedTotalRows(e,o)))}return t}readRegularRowData(t,e,n){var r,o,s,l,u,h;let c=0;const p=[],m=t.length;let v=1,_=0;const C=this._dataView.getItemMetadata(e);for(let x=0;x<m;x++){const S=t[x];if(S.excludeFromExport)continue;this._hasGroupedItems&&c===0&&p.push("");let E=1,D;if(C!=null&&C.columns){const A=C.columns,P=A[S.id]||A[x];!isNaN(v)&&+v>1||v==="*"&&x>0||(v=(r=P==null?void 0:P.colspan)!==null&&r!==void 0?r:1),v==="*"?E=t.length-x:(E=v,S.id in A&&(D=S.id,_=x))}if(v==="*"&&x>0||!isNaN(v)&&+v>1&&S.id!==D){const A=e+(this._hasColumnTitlePreHeader?3:2);if(typeof v=="number"&&E-1===1){const P=this.getExcelColumnNameByIndex(_+1),M=this.getExcelColumnNameByIndex(x+1);this._sheet.mergeCells(`${P}${A}`,`${M}${A}`),p.push("")}else if(v==="*"&&E===1){const P=this.getExcelColumnNameByIndex(x+1);this._sheet.mergeCells(`A${A}`,`${P}${A}`)}else p.push("");typeof v=="number"&&!isNaN(v)&&+v>1&&(E=v--)}else{let A="";const P=za(S),M={...this._excelExportOptions};if(S.exportWithFormatter!==!1&&nh(P)&&(M.exportWithFormatter=!0),A=Sh(e,x,S,n,this._grid,M),!this._regularCellExcelFormats.hasOwnProperty(S.id)){const L=(s=(o=S.excelExportOptions)===null||o===void 0?void 0:o.autoDetectCellFormat)!==null&&s!==void 0?s:(l=this._excelExportOptions)===null||l===void 0?void 0:l.autoDetectCellFormat,ae=ty(this._stylesheet,this._stylesheetFormats,S,this._grid,L);!((u=S.excelExportOptions)===null||u===void 0)&&u.style&&(ae.stylesheetFormatterId=this._stylesheet.createFormat(S.excelExportOptions.style).id),!((h=S.excelExportOptions)===null||h===void 0)&&h.valueParserCallback&&(ae.getDataValueParser=S.excelExportOptions.valueParserCallback),this._regularCellExcelFormats[S.id]=ae}typeof A=="string"&&(S.sanitizeDataExport||this._excelExportOptions.sanitizeDataExport)&&(A=or(A));const{stylesheetFormatterId:B,getDataValueParser:Z}=this._regularCellExcelFormats[S.id];A=Z(A,S,B,this._stylesheet,this._gridOptions),p.push(A),c++}}return p}readGroupedRowTitle(t){const e=or(t.title);if(this._excelExportOptions&&this._excelExportOptions.addGroupIndentation){const n=this._excelExportOptions&&this._excelExportOptions.groupCollapsedSymbol||"⮞",r=this._excelExportOptions&&this._excelExportOptions.groupExpandedSymbol||"⮟";return(t.collapsed?n:r)+" "+Ga(5*t.level)+e}return e}readGroupedTotalRows(t,e){const r=[this._excelExportOptions.groupingAggregatorRowText||""];return t.forEach(o=>{var s,l,u,h,c,p,m,v;let _="";const C=za(o),x=o.excludeFromExport||!1;o.exportCustomGroupTotalsFormatter&&(_=o.exportCustomGroupTotalsFormatter(e,o,this._grid));const S=(l=(s=o.excelExportOptions)===null||s===void 0?void 0:s.autoDetectCellFormat)!==null&&l!==void 0?l:(u=this._excelExportOptions)===null||u===void 0?void 0:u.autoDetectCellFormat;if(C===ie.number&&S!==!1){let E=this._groupTotalExcelFormats[o.id];E!=null&&E.groupType||(E=yf(this._stylesheet,this._stylesheetFormats,o,this._grid,"group"),!((h=o.groupTotalsExcelExportOptions)===null||h===void 0)&&h.style&&(E.stylesheetFormatter=this._stylesheet.createFormat(o.groupTotalsExcelExportOptions.style)),this._groupTotalExcelFormats[o.id]=E);const D=(p=(c=o.groupTotalsExcelExportOptions)===null||c===void 0?void 0:c.valueParserCallback)!==null&&p!==void 0?p:iy;((m=e[E.groupType])===null||m===void 0?void 0:m[o.field])!==void 0&&(_={value:D(e,o,E.groupType,this._stylesheet),metadata:{style:(v=E.stylesheetFormatter)===null||v===void 0?void 0:v.id}})}else o.groupTotalsFormatter&&(_=o.groupTotalsFormatter(e,o,this._grid));typeof _=="string"&&(o.sanitizeDataExport||this._excelExportOptions.sanitizeDataExport)&&(_=or(_)),(o.width===void 0||o.width>0)&&!x&&r.push(_)}),r}}class ly{constructor(){this._cellType="slick-cell",this._rxjs=null,this._sharedService=null,this._defaultOptions={className:"slick-custom-tooltip",offsetLeft:0,offsetRight:0,offsetTopBottom:4,hideArrow:!1,regularTooltipWhiteSpace:"pre-line",whiteSpace:"normal"},this.name="CustomTooltip",this._eventHandler=new Slick.EventHandler}get addonOptions(){return this._addonOptions}get cancellablePromise(){return this._cancellablePromise}get cellAddonOptions(){return this._cellAddonOptions}get className(){var t,e;return(e=(t=this._cellAddonOptions)===null||t===void 0?void 0:t.className)!==null&&e!==void 0?e:"slick-custom-tooltip"}get dataView(){return this._grid.getData()||{}}get gridOptions(){return this._grid.getOptions()||{}}get gridUid(){var t;return((t=this._grid)===null||t===void 0?void 0:t.getUID())||""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get tooltipElm(){return this._tooltipElm}addRxJsResource(t){this._rxjs=t}init(t,e){var n,r;this._grid=t,this._rxjs=e.get("RxJsFacade"),this._sharedService=e.get("SharedService"),this._addonOptions={...this._defaultOptions,...(r=(n=this._sharedService)===null||n===void 0?void 0:n.gridOptions)===null||r===void 0?void 0:r.customTooltip},this._eventHandler.subscribe(t.onMouseEnter,this.handleOnMouseEnter.bind(this)).subscribe(t.onHeaderMouseEnter,(o,s)=>this.handleOnHeaderMouseEnterByType(o,s,"slick-header-column")).subscribe(t.onHeaderRowMouseEnter,(o,s)=>this.handleOnHeaderMouseEnterByType(o,s,"slick-headerrow-column")).subscribe(t.onMouseLeave,this.hideTooltip.bind(this)).subscribe(t.onHeaderMouseLeave,this.hideTooltip.bind(this)).subscribe(t.onHeaderRowMouseLeave,this.hideTooltip.bind(this))}dispose(){this.hideTooltip(),this._cancellablePromise=void 0,this._eventHandler.unsubscribeAll()}hideTooltip(){var t,e;(t=this._cancellablePromise)===null||t===void 0||t.cancel(),(e=this._observable$)===null||e===void 0||e.unsubscribe();const n=document.body.querySelector(`.${this.className}${this.gridUidSelector}`);n==null||n.remove()}getOptions(){return this._addonOptions}setOptions(t){this._addonOptions={...this._addonOptions,...t}}asyncProcessCallback(t,e,n,r,o){var s,l,u;this.hideTooltip();const h={...o,[(l=(s=this.addonOptions)===null||s===void 0?void 0:s.asyncParamsPropName)!==null&&l!==void 0?l:"__params"]:t};!((u=this._cellAddonOptions)===null||u===void 0)&&u.useRegularTooltip?this.renderRegularTooltip(this._cellAddonOptions.asyncPostFormatter,e,n,r,h):this.renderTooltipFormatter(this._cellAddonOptions.asyncPostFormatter,e,n,r,h)}handleOnHeaderMouseEnterByType(t,e,n){var r,o,s;this._cellType=n,this.hideTooltip();const l={row:-1,cell:this._grid.getColumns().findIndex(p=>{var m,v;return((v=(m=e==null?void 0:e.column)===null||m===void 0?void 0:m.id)!==null&&v!==void 0?v:"")===p.id})},u=e.column,h={},c=n==="slick-headerrow-column";if(e=e||{},e.cell=l.cell,e.row=l.row,e.columnDef=u,e.dataContext=h,e.grid=this._grid,e.type=c?"header-row":"header",this._cellAddonOptions={...this._addonOptions,...u==null?void 0:u.customTooltip},!(u!=null&&u.disableTooltip||typeof((r=this._cellAddonOptions)===null||r===void 0?void 0:r.usabilityOverride)=="function"&&!this._cellAddonOptions.usabilityOverride(e))&&u&&t.target){this._cellNodeElm=t.target.closest(`.${n}`);const p=c?this._cellAddonOptions.headerRowFormatter:this._cellAddonOptions.headerFormatter;if(!((o=this._cellAddonOptions)===null||o===void 0)&&o.useRegularTooltip||!p){const m=c?!((s=this._cellAddonOptions)===null||s===void 0)&&s.useRegularTooltip?null:p:u.name;this.renderRegularTooltip(m,l,null,u,h)}else this._cellNodeElm&&typeof p=="function"&&this.renderTooltipFormatter(p,l,null,u,h)}}async handleOnMouseEnter(t){var e,n,r,o,s,l,u,h;if(this._cellType="slick-cell",this.hideTooltip(),t&&this._grid){const c=(n=(e=t==null?void 0:t.target)===null||e===void 0?void 0:e.closest(".slick-cell"))===null||n===void 0?void 0:n.className,p=c&&/l\d+/.exec(c||"")?this._grid.getCellFromEvent(t):null;if(p){const m=this.dataView?this.dataView.getItem(p.row):this._grid.getDataItem(p.row),v=this._grid.getColumns()[p.cell];if(this._cellNodeElm=this._grid.getCellNode(p.row,p.cell),m&&v){if(this._cellAddonOptions={...this._addonOptions,...v==null?void 0:v.customTooltip},v!=null&&v.disableTooltip||typeof((r=this._cellAddonOptions)===null||r===void 0?void 0:r.usabilityOverride)=="function"&&!this._cellAddonOptions.usabilityOverride({cell:p.cell,row:p.row,dataContext:m,column:v,grid:this._grid,type:"cell"}))return;const _=m.hasOwnProperty(v.field)?m[v.field]:null,C=this._grid.getEditorLock().isActive()?null:_;if(this._cellAddonOptions.useRegularTooltip&&!(!((o=this._cellAddonOptions)===null||o===void 0)&&o.asyncProcess)||!(!((s=this._cellAddonOptions)===null||s===void 0)&&s.formatter))this.renderRegularTooltip(v.formatter,p,C,v,m);else if(typeof((l=this._cellAddonOptions)===null||l===void 0?void 0:l.formatter)=="function"&&this.renderTooltipFormatter(this._cellAddonOptions.formatter,p,C,v,m),typeof((u=this._cellAddonOptions)===null||u===void 0?void 0:u.asyncProcess)=="function"){const x=this._cellAddonOptions.asyncProcess(p.row,p.cell,_,v,m,this._grid);if(this._cellAddonOptions.asyncPostFormatter||console.error('[Slickgrid-Universal] when using "asyncProcess" with Custom Tooltip, you must also provide an "asyncPostFormatter" formatter.'),x instanceof Promise)this._cancellablePromise=kp(x),this._cancellablePromise.promise.then(S=>this.asyncProcessCallback(S,p,_,v,m)).catch(S=>{S instanceof La||console.error(S)});else if(!((h=this._rxjs)===null||h===void 0)&&h.isObservable(x)){const S=this._rxjs;this._observable$=x.pipe(S.switchMap(E=>S.of(E))).subscribe(E=>this.asyncProcessCallback(E,p,_,v,m),E=>console.error(E))}}}}}}parseFormatterAndSanitize(t,e,n,r,o){if(typeof t=="function"){const s=t(e.row,e.cell,n,r,o,this._grid),l=typeof s=="object"&&(s!=null&&s.text)?s.text:typeof s=="string"?s:"";return Ln(this.gridOptions,l)}else if(typeof t=="string")return Ln(this.gridOptions,t);return""}renderRegularTooltip(t,e,n,r,o){var s,l,u,h,c,p,m,v;const _=document.createElement("div");_.innerHTML=this.parseFormatterAndSanitize(t,e,n,r,o);let C=(s=r==null?void 0:r.toolTip)!==null&&s!==void 0?s:"",x;C||(this._cellType==="slick-cell"&&this._cellNodeElm&&this._cellNodeElm.clientWidth<this._cellNodeElm.scrollWidth&&!(!((l=this._cellAddonOptions)===null||l===void 0)&&l.useRegularTooltipFromFormatterOnly)?(C=(h=(u=this._cellNodeElm.textContent)===null||u===void 0?void 0:u.trim())!==null&&h!==void 0?h:"",!((c=this._cellAddonOptions)===null||c===void 0)&&c.tooltipTextMaxLength&&C.length>((p=this._cellAddonOptions)===null||p===void 0?void 0:p.tooltipTextMaxLength)&&(C=C.substring(0,this._cellAddonOptions.tooltipTextMaxLength-3)+"..."),x=this._cellNodeElm):(!((m=this._cellAddonOptions)===null||m===void 0)&&m.useRegularTooltipFromFormatterOnly?x=_.querySelector("[title], [data-slick-tooltip]"):(x=su(this._cellNodeElm,["title","data-slick-tooltip"])?this._cellNodeElm:_.querySelector("[title], [data-slick-tooltip]"),(!x||!su(x,["title","data-slick-tooltip"]))&&this._cellNodeElm&&(x=this._cellNodeElm.querySelector("[title], [data-slick-tooltip]"))),(!C||typeof t=="function"&&(!((v=this._cellAddonOptions)===null||v===void 0)&&v.useRegularTooltipFromFormatterOnly))&&(C=su(x,["title","data-slick-tooltip"])||""))),C!==""&&this.renderTooltipFormatter(t,e,n,r,o,C),this.swapAndClearTitleAttribute(x,C)}renderTooltipFormatter(t,e,n,r,o,s,l){var u,h,c,p,m,v,_,C,x,S;if(this._tooltipElm=Re("div",{className:this.className}),this._tooltipElm.classList.add(this.gridUid),this._tooltipElm.classList.add("l"+e.cell),this._tooltipElm.classList.add("r"+e.cell),n==null){const A=(u=this._cellNodeElm)===null||u===void 0?void 0:u.querySelector("[title], [data-slick-tooltip]");n=su(A,["title","data-slick-tooltip"])||n}let E=s||this.parseFormatterAndSanitize(t,e,n,r,o)||"";E=!((h=this._cellAddonOptions)===null||h===void 0)&&h.tooltipTextMaxLength&&E.length>this._cellAddonOptions.tooltipTextMaxLength?E.substring(0,this._cellAddonOptions.tooltipTextMaxLength-3)+"...":E;let D="";!s||!((c=this._cellAddonOptions)===null||c===void 0)&&c.renderRegularTooltipAsHtml?(D=Ln(this.gridOptions,E),this._tooltipElm.innerHTML=D,this._tooltipElm.style.whiteSpace=(m=(p=this._cellAddonOptions)===null||p===void 0?void 0:p.whiteSpace)!==null&&m!==void 0?m:this._defaultOptions.whiteSpace):(D=E||"",this._tooltipElm.textContent=D,this._tooltipElm.style.whiteSpace=(_=(v=this._cellAddonOptions)===null||v===void 0?void 0:v.regularTooltipWhiteSpace)!==null&&_!==void 0?_:this._defaultOptions.regularTooltipWhiteSpace),!((C=this._cellAddonOptions)===null||C===void 0)&&C.maxHeight&&(this._tooltipElm.style.maxHeight=`${this._cellAddonOptions.maxHeight}px`),!((x=this._cellAddonOptions)===null||x===void 0)&&x.maxWidth&&(this._tooltipElm.style.maxWidth=`${this._cellAddonOptions.maxWidth}px`),D&&(document.body.appendChild(this._tooltipElm),this.reposition(e),!((S=this._cellAddonOptions)===null||S===void 0)&&S.hideArrow||this._tooltipElm.classList.add("tooltip-arrow"),this.swapAndClearTitleAttribute(l,E))}reposition(t){var e,n,r,o,s,l,u,h,c,p,m,v,_;if(this._tooltipElm){this._cellNodeElm=this._cellNodeElm||this._grid.getCellNode(t.row,t.cell);const C=Gn(this._cellNodeElm)||{top:0,left:0},x=this._cellNodeElm.offsetWidth,S=this._tooltipElm.getBoundingClientRect().height,E=this._tooltipElm.getBoundingClientRect().width,D=document.body.offsetWidth||window.innerWidth;let A=(C.top||0)-this._tooltipElm.offsetHeight-((n=(e=this._cellAddonOptions)===null||e===void 0?void 0:e.offsetTopBottom)!==null&&n!==void 0?n:0),P=(C.left||0)-((o=(r=this._cellAddonOptions)===null||r===void 0?void 0:r.offsetRight)!==null&&o!==void 0?o:0);const M=(l=(s=this._cellAddonOptions)===null||s===void 0?void 0:s.position)!==null&&l!==void 0?l:"auto";M==="center"?(P+=x/2-E/2+((h=(u=this._cellAddonOptions)===null||u===void 0?void 0:u.offsetRight)!==null&&h!==void 0?h:0),this._tooltipElm.classList.remove("arrow-left-align"),this._tooltipElm.classList.remove("arrow-right-align"),this._tooltipElm.classList.add("arrow-center-align")):M==="right-align"||(M==="auto"||M!=="left-align")&&P+E>D?(P-=E-x-((p=(c=this._cellAddonOptions)===null||c===void 0?void 0:c.offsetLeft)!==null&&p!==void 0?p:0),this._tooltipElm.classList.remove("arrow-center-align"),this._tooltipElm.classList.remove("arrow-left-align"),this._tooltipElm.classList.add("arrow-right-align")):(this._tooltipElm.classList.remove("arrow-center-align"),this._tooltipElm.classList.remove("arrow-right-align"),this._tooltipElm.classList.add("arrow-left-align")),M==="bottom"||(M==="auto"||M!=="top")&&S>ou(this._cellNodeElm).top?(A=(C.top||0)+((m=this.gridOptions.rowHeight)!==null&&m!==void 0?m:0)+((_=(v=this._cellAddonOptions)===null||v===void 0?void 0:v.offsetTopBottom)!==null&&_!==void 0?_:0),this._tooltipElm.classList.remove("arrow-down"),this._tooltipElm.classList.add("arrow-up")):(this._tooltipElm.classList.add("arrow-down"),this._tooltipElm.classList.remove("arrow-up")),this._tooltipElm.style.top=`${A}px`,this._tooltipElm.style.left=`${P}px`}}swapAndClearTitleAttribute(t,e){var n;const r=t||this._cellNodeElm&&(this._cellNodeElm.hasAttribute("title")&&this._cellNodeElm.getAttribute("title")?this._cellNodeElm:(n=this._cellNodeElm)===null||n===void 0?void 0:n.querySelector("[title]"));r&&(r.setAttribute("data-slick-tooltip",e||""),r.hasAttribute("title")&&r.setAttribute("title",""))}}function $u(a,t,e){return t<=a&&a<=e}function Pv(a){if(a===void 0)return{};if(a===Object(a))return a;throw TypeError("Could not convert argument to dictionary")}function ay(a){for(var t=String(a),e=t.length,n=0,r=[];n<e;){var o=t.charCodeAt(n);if(o<55296||o>57343)r.push(o);else if(56320<=o&&o<=57343)r.push(65533);else if(55296<=o&&o<=56319)if(n===e-1)r.push(65533);else{var s=a.charCodeAt(n+1);if(56320<=s&&s<=57343){var l=o&1023,u=s&1023;r.push(65536+(l<<10)+u),n+=1}else r.push(65533)}n+=1}return r}var Fv=-1;function Mv(a){this.tokens=[].slice.call(a)}Mv.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():Fv},prepend:function(a){if(Array.isArray(a))for(var t=a;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(a)},push:function(a){if(Array.isArray(a))for(var t=a;t.length;)this.tokens.push(t.shift());else this.tokens.push(a)}};var Ef=-1,Nv="utf-8";function Yu(a,t){if(!(this instanceof Yu))return new Yu(a,t);if(a=a!==void 0?String(a).toLowerCase():Nv,a!==Nv)throw new Error("Encoding not supported. Only utf-8 is supported");t=Pv(t),this._streaming=!1,this._encoder=null,this._options={fatal:!!t.fatal},Object.defineProperty(this,"encoding",{value:"utf-8"})}Yu.prototype={encode:function(t,e){t=t?String(t):"",e=Pv(e),this._streaming||(this._encoder=new dy(this._options)),this._streaming=!!e.stream;for(var n=[],r=new Mv(ay(t)),o;!r.endOfStream()&&(o=this._encoder.handler(r,r.read()),o!==Ef);)Array.isArray(o)?n.push.apply(n,o):n.push(o);if(!this._streaming){for(;o=this._encoder.handler(r,r.read()),o!==Ef;)Array.isArray(o)?n.push.apply(n,o):n.push(o);this._encoder=null}return new Uint8Array(n)}};function dy(a){a.fatal,this.handler=function(t,e){if(e===Fv)return Ef;if($u(e,0,127))return e;var n,r;$u(e,128,2047)?(n=1,r=192):$u(e,2048,65535)?(n=2,r=224):$u(e,65536,1114111)&&(n=3,r=240);for(var o=[(e>>6*n)+r];n>0;){var s=e>>6*(n-1);o.push(128|s&63),n-=1}return o}}const uy={delimiter:fs.comma,filename:"export",format:an.csv,useUtf8WithBom:!0};class cy{constructor(){this._delimiter=",",this._exportQuoteWrapper="",this._fileFormat=an.csv,this._lineCarriageReturn=`
109
- `,this._columnHeaders=[],this._hasGroupedItems=!1,this.className="TextExportService"}get _datasetIdPropName(){return this._gridOptions&&this._gridOptions.datasetIdPropertyName||"id"}get _dataView(){var t;return((t=this._grid)===null||t===void 0?void 0:t.getData)&&this._grid.getData()}get _gridOptions(){var t;return!((t=this._grid)===null||t===void 0)&&t.getOptions?this._grid.getOptions():{}}dispose(){var t;(t=this._pubSubService)===null||t===void 0||t.unsubscribeAll()}init(t,e){var n;if(this._grid=t,this._pubSubService=e.get("PubSubService"),this._locales=this._gridOptions&&this._gridOptions.locales||je.locales,this._translaterService=(n=this._gridOptions)===null||n===void 0?void 0:n.translater,this._gridOptions.enableTranslate&&(!this._translaterService||!this._translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be passed in the "translater" Grid Options when "enableTranslate" is enabled. (example: this.gridOptions = { enableTranslate: true, translater: this.translaterService })')}exportToFile(t){if(!this._grid||!this._dataView||!this._pubSubService)throw new Error('[Slickgrid-Universal] it seems that the SlickGrid & DataView objects and/or PubSubService are not initialized did you forget to enable the grid option flag "enableTextExport"?');return new Promise(e=>{var n;(n=this._pubSubService)===null||n===void 0||n.publish("onBeforeExportToTextFile",!0),this._exportOptions=fo({...uy,...this._gridOptions.textExportOptions,...t}),this._delimiter=this._exportOptions.delimiterOverride||this._exportOptions.delimiter||"",this._fileFormat=this._exportOptions.format||an.csv;const r=this.getDataOutput();setTimeout(()=>{var o;const s={filename:`${this._exportOptions.filename}.${this._fileFormat}`,format:this._fileFormat||an.csv,mimeType:this._exportOptions.mimeType||"text/plain",useUtf8WithBom:this._exportOptions&&this._exportOptions.hasOwnProperty("useUtf8WithBom")?this._exportOptions.useUtf8WithBom:!0};this.startDownloadFile({...s,content:r}),(o=this._pubSubService)===null||o===void 0||o.publish("onAfterExportToTextFile",s),e(!0)},0)})}startDownloadFile(t){const e=F_(t.content);let n;t.format===an.csv?n=new Yu("utf-8").encode(e):n=e;const r=new Blob([t.useUtf8WithBom?"\uFEFF":"",n],{type:t.mimeType});if(typeof navigator.msSaveOrOpenBlob=="function")navigator.msSaveOrOpenBlob(r,t.filename);else{const o=document.createElement("a"),s=URL.createObjectURL(r);o.textContent="download",o.href=s,o.setAttribute("download",t.filename),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o)}}getDataOutput(){var t,e,n;const r=this._grid.getColumns()||[];let o=this._exportOptions.groupingColumnHeaderTitle;!o&&this._gridOptions.enableTranslate&&(!((t=this._translaterService)===null||t===void 0)&&t.translate)&&(!((n=(e=this._translaterService)===null||e===void 0?void 0:e.getCurrentLanguage)===null||n===void 0)&&n.call(e))?o=this._translaterService.translate(`${ho(this._gridOptions)}GROUP_BY`):o||(o=this._locales&&this._locales.TEXT_GROUP_BY),this._exportQuoteWrapper=this._fileFormat===an.csv?'"':"";let s="";const l=this._dataView.getGrouping();if(l&&Array.isArray(l)&&l.length>0?(this._hasGroupedItems=!0,s+=this._fileFormat===an.csv?`"${o}"${this._delimiter}`:`${o}${this._delimiter}`):this._hasGroupedItems=!1,this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping&&(this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(r)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0)){const u=this._groupedColumnHeaders.map(h=>`${this._exportQuoteWrapper}${h.title}${this._exportQuoteWrapper}`);s+=u.join(this._delimiter)+this._lineCarriageReturn}if(this._columnHeaders=this.getColumnHeaders(r)||[],this._columnHeaders&&Array.isArray(this._columnHeaders)&&this._columnHeaders.length>0){const u=this._columnHeaders.map(h=>or(`${this._exportQuoteWrapper}${h.title}${this._exportQuoteWrapper}`));s+=u.join(this._delimiter)+this._lineCarriageReturn}return s+=this.getAllGridRowData(r,this._lineCarriageReturn),s}getAllGridRowData(t,e){const n=[],r=this._dataView.getLength();for(let o=0;o<r;o++){const s=this._dataView.getItem(o);s&&!s.hasOwnProperty("getItem")&&(s[this._datasetIdPropName]!==null&&s[this._datasetIdPropName]!==void 0?n.push(this.readRegularRowData(t,o,s)):this._hasGroupedItems&&s.__groupTotals===void 0?n.push(this.readGroupedTitleRow(s)):s.__groupTotals&&n.push(this.readGroupedTotalRow(t,s)))}return n.join(e)}getColumnGroupedHeaderTitles(t){const e=[];return t&&Array.isArray(t)&&t.forEach(n=>{var r,o,s;let l="";n.columnGroupKey&&this._gridOptions.enableTranslate&&(!((r=this._translaterService)===null||r===void 0)&&r.translate)&&(!((s=(o=this._translaterService)===null||o===void 0?void 0:o.getCurrentLanguage)===null||s===void 0)&&s.call(o))?l=this._translaterService.translate(n.columnGroupKey):l=n.columnGroup||"";const u=n.excludeFromExport||!1;(n.width===void 0||n.width>0)&&!u&&e.push({key:n.field||n.id,title:l||""})}),e}getColumnHeaders(t){const e=[];return t&&Array.isArray(t)&&t.forEach(n=>{var r,o,s;let l="";(n.nameKey||n.nameKey)&&this._gridOptions.enableTranslate&&(!((r=this._translaterService)===null||r===void 0)&&r.translate)&&(!((s=(o=this._translaterService)===null||o===void 0?void 0:o.getCurrentLanguage)===null||s===void 0)&&s.call(o))?l=this._translaterService.translate(n.nameKey||n.nameKey):l=n.name||vl(n.field);const u=n.excludeFromExport||!1;(n.width===void 0||n.width>0)&&!u&&e.push({key:n.field||n.id,title:l||""})}),e}readRegularRowData(t,e,n){var r;let o=0;const s=[],l=this._exportQuoteWrapper;let u=1;const h=this._dataView.getItemMetadata(e);for(let c=0,p=t.length;c<p;c++){const m=t[c];if(m.excludeFromExport)continue;if(this._hasGroupedItems&&o===0){const _=this._fileFormat===an.csv?'""':"";s.push(_)}let v;if(h!=null&&h.columns){const _=h==null?void 0:h.columns,C=_[m.id]||_[c];!isNaN(u)&&+u>1||u==="*"&&c>0||(u=(r=C==null?void 0:C.colspan)!==null&&r!==void 0?r:1),u!=="*"&&m.id in _&&(v=m.id)}if(u==="*"&&c>0||!isNaN(u)&&+u>1&&m.id!==v)s.push(""),!isNaN(u)&&+u>1&&u--;else{let _=Sh(e,c,m,n,this._grid,this._exportOptions);(m.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(_=or(_)),this._fileFormat===an.csv&&_&&(_=_.toString().replace(/"/gi,'""'));const C=m!=null&&m.exportCsvForceToKeepAsString?"=":"";s.push(C+l+_+l)}o++}return s.join(this._delimiter)}readGroupedTitleRow(t){let e=or(t.title);const n=this._exportQuoteWrapper;return e=Ga(5*t.level)+e,this._fileFormat===an.csv&&(e=e.toString().replace(/"/gi,'""')),n+e+n}readGroupedTotalRow(t,e){const n=this._exportOptions.delimiter,r=this._exportOptions.format,o=this._exportOptions.groupingAggregatorRowText||"",s=this._exportQuoteWrapper,l=[`${s}${o}${s}`];return t.forEach(u=>{let h="";const c=u.excludeFromExport||!1;u.groupTotalsFormatter&&(h=u.groupTotalsFormatter(e,u,this._grid)),(u.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(h=or(h)),r===an.csv&&(h=h.toString().replace(/"/gi,'""')),(u.width===void 0||u.width>0)&&!c&&l.push(s+h+s)}),l.join(n)}}var Lv={exports:{}};(function(a,t){(function(e,n){n(t)})(Pr,function(e){var n=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc"],longhand:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},ordinal:function(s){return s>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};n.l10ns.fr=r;var o=n.l10ns;e.French=r,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})})})(Lv,Lv.exports),function(a){function t(ce,Ce){this.event=ce;let be=ce,He=Ce,ot=!1,Ue=!1,St=!1,ct;if(ce){const k=["altKey","ctrlKey","metaKey","shiftKey","key","keyCode","clientX","clientY","offsetX","offsetY","pageX","pageY","bubbles","type","which","x","y"];for(let ee of k)this[ee]=ce[ee]}this.target=be?be.target:void 0,this.stopPropagation=function(){ot=!0,be&&be.stopPropagation()},this.isPropagationStopped=function(){return ot},this.stopImmediatePropagation=function(){Ue=!0,be&&be.stopImmediatePropagation()},this.isImmediatePropagationStopped=function(){return Ue},this.getNativeEvent=function(){return be},this.preventDefault=function(){be&&be.preventDefault(),St=!0},this.isDefaultPrevented=function(){return be?be.defaultPrevented:St},this.addReturnValue=function(k){ct===void 0&&k!==void 0&&(ct=k)},this.getReturnValue=function(){return ct},this.getArguments=function(){return He}}function e(){var ce=[];this.subscribe=function(Ce){ce.push(Ce)},this.unsubscribe=function(Ce){for(var be=ce.length-1;be>=0;be--)ce[be]===Ce&&ce.splice(be,1)},this.notify=function(Ce,be,He){be instanceof t||(be=new t(be,Ce)),He=He||this;for(var ot=0;ot<ce.length&&!(be.isPropagationStopped()||be.isImmediatePropagationStopped());ot++){const Ue=ce[ot].call(He,be,Ce);be.addReturnValue(Ue)}return be}}function n(){var ce=[];this.subscribe=function(Ce,be){return ce.push({event:Ce,handler:be}),Ce.subscribe(be),this},this.unsubscribe=function(Ce,be){for(var He=ce.length;He--;)if(ce[He].event===Ce&&ce[He].handler===be){ce.splice(He,1),Ce.unsubscribe(be);return}return this},this.unsubscribeAll=function(){for(var Ce=ce.length;Ce--;)ce[Ce].event.unsubscribe(ce[Ce].handler);return ce=[],this}}function r(ce,Ce,be,He){be===void 0&&He===void 0&&(be=ce,He=Ce),this.fromRow=Math.min(ce,be),this.fromCell=Math.min(Ce,He),this.toRow=Math.max(ce,be),this.toCell=Math.max(Ce,He),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(ot,Ue){return ot>=this.fromRow&&ot<=this.toRow&&Ue>=this.fromCell&&Ue<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}}function o(){this.__nonDataRow=!0}function s(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.selectChecked=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}s.prototype=new o,s.prototype.equals=function(ce){return this.value===ce.value&&this.count===ce.count&&this.collapsed===ce.collapsed&&this.title===ce.title};function l(){this.__groupTotals=!0,this.group=null,this.initialized=!1}l.prototype=new o;function u(){var ce=null;this.isActive=function(Ce){return Ce?ce===Ce:ce!==null},this.activate=function(Ce){if(Ce!==ce){if(ce!==null)throw new Error("SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController");if(!Ce.commitCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!Ce.cancelCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()");ce=Ce}},this.deactivate=function(Ce){if(ce){if(ce!==Ce)throw new Error("SlickGrid.EditorLock.deactivate: specified editController is not the currently active one");ce=null}},this.commitCurrentEdit=function(){return ce?ce.commitCurrentEdit():!0},this.cancelCurrentEdit=function(){return ce?ce.cancelCurrentEdit():!0}}function h(ce){return ce.replace(/(\b)(on[a-z]+)(\s*)=|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(&lt;)(\/*)(script|script defer)(.*)(&gt;|&gt;">)/gi,"")}function c(ce){let Ce=0,be=0,He=0,ot=0;const Ue=a.innerHeight||0,St=a.innerWidth||0,ct=D(),k=ct.top,ee=ct.left,ge=E(ce);if(ge){const $=ge.top||0,X=ge.left||0;be=$-k,Ce=Ue-($-k),He=X-ee,ot=St-(X-ee)}return{top:be,bottom:Ce,left:He,right:ot}}function p(ce,Ce,be){const He=document.createElement(ce);return Ce&&Object.keys(Ce).forEach(ot=>{const Ue=Ce[ot];typeof Ue=="object"?Object.assign(He[ot],Ue):He[ot]=Ce[ot]}),be&&be.appendChild&&be.appendChild(He),He}function m(ce,Ce){let be=null;return(...He)=>{Ce>=0?(clearTimeout(be),be=setTimeout(()=>ce.apply(null,He),Ce)):ce.apply(null)}}function v(ce){if(ce&&ce.firstChild)for(;ce.firstChild;)ce.lastChild&&ce.removeChild(ce.lastChild);return ce}function _(ce,Ce){let be=0;if(ce){const He=Ce==="height"?"clientHeight":"clientWidth",ot=Ce==="height"?["top","bottom"]:["left","right"];be=ce[He];for(const Ue of ot){const St=parseFloat(C(ce,`padding-${Ue}`))||0;be-=St}}return be}function C(ce,Ce){return ce&&ce.getComputedStyle?a.getComputedStyle(ce,null).getPropertyValue(Ce):null}function x(ce){return ce==null?!0:Object.entries(ce).length===0}function S(){}function E(ce){if(!ce||!ce.getBoundingClientRect)return;const Ce=ce.getBoundingClientRect(),be=document.documentElement;return{top:Ce.top+a.pageYOffset-be.clientTop,left:Ce.left+a.pageXOffset-be.clientLeft}}function D(){return{left:a.pageXOffset||document.documentElement.scrollLeft||0,top:a.pageYOffset||document.documentElement.scrollTop||0}}function A(ce,Ce){if(!(!ce||!ce.getBoundingClientRect)){if(Ce===void 0)return ce.getBoundingClientRect().width;M(ce,"width",Ce)}}function P(ce,Ce){if(ce){if(Ce===void 0)return ce.getBoundingClientRect().height;M(ce,"height",Ce)}}function M(ce,Ce,be){typeof be=="function"?be=be():typeof be=="string"?ce.style[Ce]=be:ce.style[Ce]=be+"px"}function B(ce,Ce){return!ce||!Ce?!1:!L(Ce).every(function(He){return ce!=He})}function Z(ce){return ce.offsetWidth===0&&ce.offsetHeight===0}function L(ce,Ce){const be=[],He=Ce==":visible",ot=Ce==":hidden";for(;(ce=ce.parentNode)&&ce!==document&&!(!ce||!ce.parentNode);)ot?Z(ce)&&be.push(ce):He?Z(ce)||be.push(ce):(!Ce||ce.matches(Ce))&&be.push(ce);return be}function ae(ce){var Ce=parseFloat(ce);return isNaN(Ce)?0:Ce}function _e(ce,Ce){Ce=Ce||"",Array.isArray(ce)?ce.forEach(function(be){be.style.display=Ce}):ce.style.display=Ce}function J(ce){Array.isArray(ce)?ce.forEach(function(Ce){Ce.style.display="none"}):ce.style.display="none"}function U(ce,Ce){return de(ce,"slideUp",Ce)}function F(ce,Ce){return de(ce,"slideDown",Ce)}function de(ce,Ce,be){if(a.jQuery!==void 0){a.jQuery(ce)[Ce]("fast",be);return}Ce==="slideUp"?J(ce):_e(ce),be()}var qe=Object.getPrototypeOf,Ie={},xe=Ie.toString,Oe=Ie.hasOwnProperty,De=Oe.toString,ne=De.call(Object);function pe(ce){return typeof ce=="function"&&typeof ce.nodeType!="number"&&typeof ce.item!="function"}function Ve(ce){var Ce,be;return!ce||xe.call(ce)!=="[object Object]"?!1:(Ce=qe(ce),Ce?(be=Oe.call(Ce,"constructor")&&Ce.constructor,typeof be=="function"&&De.call(be)===ne):!0)}function Ye(){var ce,Ce,be,He,ot,Ue,St=arguments[0],ct=1,k=arguments.length,ee=!1;for(typeof St=="boolean"?(ee=St,St=arguments[ct]||{},ct++):St=St||{},typeof St!="object"&&!pe(St)&&(St={}),ct===k&&(St=this,ct--);ct<k;ct++)if((ce=arguments[ct])!=null)for(Ce in ce)He=ce[Ce],!(Ce==="__proto__"||St===He)&&(ee&&He&&(Ve(He)||(ot=Array.isArray(He)))?(be=St[Ce],ot&&!Array.isArray(be)?Ue=[]:!ot&&!Ve(be)?Ue={}:Ue=be,ot=!1,St[Ce]=Ye(ee,Ue,He)):He!==void 0&&(St[Ce]=He));return St}function ze(){this.boundedEvents=[],this.destroy=function(){this.unbindAll(),this.boundedEvents=[]},this.bind=function(ce,Ce,be,He){ce.addEventListener(Ce,be,He),this.boundedEvents.push({element:ce,eventName:Ce,listener:be})},this.unbind=function(ce,Ce,be){ce&&ce.removeEventListener&&ce.removeEventListener(Ce,be)},this.unbindByEventName=function(ce,Ce){const be=this.boundedEvents.find(He=>He.element===ce&&He.eventName===Ce);be&&this.unbind(be.element,be.eventName,be.listener)},this.unbindAll=function(){for(;this.boundedEvents.length>0;){const ce=this.boundedEvents.pop(),{element:Ce,eventName:be,listener:He}=ce;this.unbind(Ce,be,He)}}}a.Slick={Event:e,EventData:t,EventHandler:n,Range:r,NonDataRow:o,Group:s,GroupTotals:l,RegexSanitizer:h,EditorLock:u,BindingEventService:ze,Utils:{debounce:m,extend:Ye,calculateAvailableSpace:c,createDomElement:p,emptyElement:v,innerSize:_,isEmptyObject:x,noop:S,offset:E,height:P,width:A,setStyleSize:M,contains:B,toFloat:ae,parents:L,show:_e,hide:J,slideUp:U,slideDown:F,storage:{_storage:new WeakMap,put:function(ce,Ce,be){this._storage.has(ce)||this._storage.set(ce,new Map),this._storage.get(ce).set(Ce,be)},get:function(ce,Ce){const be=this._storage.get(ce);return be?be.get(Ce):null},remove:function(ce,Ce){var be=this._storage.get(ce).delete(Ce);return!this._storage.get(ce).size===0&&this._storage.delete(ce),be}}},GlobalEditorLock:new u,keyCode:{SPACE:8,BACKSPACE:8,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38,A:65},preClickClassName:"slick-edit-preclick",GridAutosizeColsMode:{None:"NOA",LegacyOff:"LOF",LegacyForceFit:"LFF",IgnoreViewport:"IGV",FitColsToViewport:"FCV",FitViewportToCols:"FVC"},ColAutosizeMode:{Locked:"LCK",Guide:"GUI",Content:"CON",ContentExpandOnly:"CXO",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{Auto:"AUTO",TextOnly:"CANV",HTML:"HTML"}},typeof Pr<"u"&&(Pr.Slick=a.Slick)}(window),function(){function a(n){let{containerElement:r,onDragInit:o,onDragStart:s,onDrag:l,onDragEnd:u}=n,h,c,p,m,v,_;if(r||(r=document),!r||typeof r.addEventListener!="function")throw new Error("[Slick.Draggable] You did not provide a valid container html element that will be used for dragging.");let C={dragSource:r,dragHandle:null};r&&(r.addEventListener("mousedown",E),r.addEventListener("touchstart",E));function x(M,B,Z){typeof M=="function"&&M(B,Z)}function S(){r&&(r.removeEventListener("mousedown",E),r.removeEventListener("touchstart",E))}function E(M){h=M.target;const B=M.touches?M.touches[0]:M,{target:Z}=B;if(!n.allowDragFrom||n.allowDragFrom&&h.matches(n.allowDragFrom)||n.allowDragFromClosest&&h.closest(n.allowDragFromClosest)){C.dragHandle=h;const L=P();c=L.left+B.clientX,p=L.top+B.clientY,m=B.clientX-B.clientX,v=B.clientY-B.clientY,C=Object.assign(C,{deltaX:m,deltaY:v,startX:c,startY:p,target:Z}),x(o,M,C),document.addEventListener("mousemove",D),document.addEventListener("touchmove",D),document.addEventListener("mouseup",A),document.addEventListener("touchend",A),document.addEventListener("touchcancel",A)}}function D(M){const B=M.touches?M.touches[0]:M;m=B.clientX-c,v=B.clientY-p;const{target:Z}=B;_||(C=Object.assign(C,{deltaX:m,deltaY:v,startX:c,startY:p,target:Z}),x(s,M,C),_=!0),C=Object.assign(C,{deltaX:m,deltaY:v,startX:c,startY:p,target:Z}),x(l,M,C)}function A(M){const{target:B}=M;C=Object.assign(C,{target:B}),x(u,M,C),document.removeEventListener("mousemove",D),document.removeEventListener("touchmove",D),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A),document.removeEventListener("touchcancel",A),_=!1}function P(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}return{destroy:S}}function t(n){let{element:r,onMouseWheel:o}=n;function s(){r.removeEventListener("wheel",u),r.removeEventListener("mousewheel",u)}function l(){r.addEventListener("wheel",u),r.addEventListener("mousewheel",u)}function u(h){const c=h||window.event;let p=0,m=0,v=0;c.wheelDelta&&(p=c.wheelDelta/120),c.detail&&(p=-c.detail/3),v=p,c.axis!==void 0&&c.axis===c.HORIZONTAL_AXIS&&(v=0,m=-1*p),c.wheelDeltaY!==void 0&&(v=c.wheelDeltaY/120),c.wheelDeltaX!==void 0&&(m=-1*c.wheelDeltaX/120),typeof o=="function"&&o(h,p,m,v)}return l(),{destroy:s}}function e(n){const{resizeableElement:r,resizeableHandleElement:o,onResizeStart:s,onResize:l,onResizeEnd:u}=n;if(!o||typeof o.addEventListener!="function")throw new Error("[Slick.Resizable] You did not provide a valid html element that will be used for the handle to resize.");function h(){o&&typeof o.removeEventListener=="function"&&(o.removeEventListener("mousedown",p),o.removeEventListener("touchstart",p))}function c(_,C){typeof _=="function"&&_(C,{resizeableElement:r,resizeableHandleElement:o})}function p(_){_.preventDefault();const C=_.touches?_.changedTouches[0]:_;c(s,C),document.addEventListener("mousemove",m),document.addEventListener("mouseup",v),document.addEventListener("touchmove",m),document.addEventListener("touchend",v)}function m(_){_.preventDefault&&_.type!=="touchmove"&&_.preventDefault();const C=_.touches?_.changedTouches[0]:_;typeof l=="function"&&(l(C,{resizeableElement:r,resizeableHandleElement:o}),l(C,{resizeableElement:r,resizeableHandleElement:o}))}function v(_){const C=_.touches?_.changedTouches[0]:_;c(u,C),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",v)}return o.addEventListener("mousedown",p),o.addEventListener("touchstart",p),{destroy:h}}Slick.Utils.extend(Slick,{Draggable:a,MouseWheel:t,Resizable:e})}();/**
109
+ `,this._columnHeaders=[],this._hasGroupedItems=!1,this.className="TextExportService"}get _datasetIdPropName(){return this._gridOptions&&this._gridOptions.datasetIdPropertyName||"id"}get _dataView(){var t;return((t=this._grid)===null||t===void 0?void 0:t.getData)&&this._grid.getData()}get _gridOptions(){var t;return!((t=this._grid)===null||t===void 0)&&t.getOptions?this._grid.getOptions():{}}dispose(){var t;(t=this._pubSubService)===null||t===void 0||t.unsubscribeAll()}init(t,e){var n;if(this._grid=t,this._pubSubService=e.get("PubSubService"),this._locales=this._gridOptions&&this._gridOptions.locales||je.locales,this._translaterService=(n=this._gridOptions)===null||n===void 0?void 0:n.translater,this._gridOptions.enableTranslate&&(!this._translaterService||!this._translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be passed in the "translater" Grid Options when "enableTranslate" is enabled. (example: this.gridOptions = { enableTranslate: true, translater: this.translaterService })')}exportToFile(t){if(!this._grid||!this._dataView||!this._pubSubService)throw new Error('[Slickgrid-Universal] it seems that the SlickGrid & DataView objects and/or PubSubService are not initialized did you forget to enable the grid option flag "enableTextExport"?');return new Promise(e=>{var n;(n=this._pubSubService)===null||n===void 0||n.publish("onBeforeExportToTextFile",!0),this._exportOptions=fo({...uy,...this._gridOptions.textExportOptions,...t}),this._delimiter=this._exportOptions.delimiterOverride||this._exportOptions.delimiter||"",this._fileFormat=this._exportOptions.format||an.csv;const r=this.getDataOutput();setTimeout(()=>{var o;const s={filename:`${this._exportOptions.filename}.${this._fileFormat}`,format:this._fileFormat||an.csv,mimeType:this._exportOptions.mimeType||"text/plain",useUtf8WithBom:this._exportOptions&&this._exportOptions.hasOwnProperty("useUtf8WithBom")?this._exportOptions.useUtf8WithBom:!0};this.startDownloadFile({...s,content:r}),(o=this._pubSubService)===null||o===void 0||o.publish("onAfterExportToTextFile",s),e(!0)},0)})}startDownloadFile(t){const e=F_(t.content);let n;t.format===an.csv?n=new Yu("utf-8").encode(e):n=e;const r=new Blob([t.useUtf8WithBom?"\uFEFF":"",n],{type:t.mimeType});if(typeof navigator.msSaveOrOpenBlob=="function")navigator.msSaveOrOpenBlob(r,t.filename);else{const o=document.createElement("a"),s=URL.createObjectURL(r);o.textContent="download",o.href=s,o.setAttribute("download",t.filename),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o)}}getDataOutput(){var t,e,n;const r=this._grid.getColumns()||[];let o=this._exportOptions.groupingColumnHeaderTitle;!o&&this._gridOptions.enableTranslate&&(!((t=this._translaterService)===null||t===void 0)&&t.translate)&&(!((n=(e=this._translaterService)===null||e===void 0?void 0:e.getCurrentLanguage)===null||n===void 0)&&n.call(e))?o=this._translaterService.translate(`${ho(this._gridOptions)}GROUP_BY`):o||(o=this._locales&&this._locales.TEXT_GROUP_BY),this._exportQuoteWrapper=this._fileFormat===an.csv?'"':"";let s="";const l=this._dataView.getGrouping();if(l&&Array.isArray(l)&&l.length>0?(this._hasGroupedItems=!0,s+=this._fileFormat===an.csv?`"${o}"${this._delimiter}`:`${o}${this._delimiter}`):this._hasGroupedItems=!1,this._gridOptions.createPreHeaderPanel&&this._gridOptions.showPreHeaderPanel&&!this._gridOptions.enableDraggableGrouping&&(this._groupedColumnHeaders=this.getColumnGroupedHeaderTitles(r)||[],this._groupedColumnHeaders&&Array.isArray(this._groupedColumnHeaders)&&this._groupedColumnHeaders.length>0)){const u=this._groupedColumnHeaders.map(h=>`${this._exportQuoteWrapper}${h.title}${this._exportQuoteWrapper}`);s+=u.join(this._delimiter)+this._lineCarriageReturn}if(this._columnHeaders=this.getColumnHeaders(r)||[],this._columnHeaders&&Array.isArray(this._columnHeaders)&&this._columnHeaders.length>0){const u=this._columnHeaders.map(h=>or(`${this._exportQuoteWrapper}${h.title}${this._exportQuoteWrapper}`));s+=u.join(this._delimiter)+this._lineCarriageReturn}return s+=this.getAllGridRowData(r,this._lineCarriageReturn),s}getAllGridRowData(t,e){const n=[],r=this._dataView.getLength();for(let o=0;o<r;o++){const s=this._dataView.getItem(o);s&&!s.hasOwnProperty("getItem")&&(s[this._datasetIdPropName]!==null&&s[this._datasetIdPropName]!==void 0?n.push(this.readRegularRowData(t,o,s)):this._hasGroupedItems&&s.__groupTotals===void 0?n.push(this.readGroupedTitleRow(s)):s.__groupTotals&&n.push(this.readGroupedTotalRow(t,s)))}return n.join(e)}getColumnGroupedHeaderTitles(t){const e=[];return t&&Array.isArray(t)&&t.forEach(n=>{var r,o,s;let l="";n.columnGroupKey&&this._gridOptions.enableTranslate&&(!((r=this._translaterService)===null||r===void 0)&&r.translate)&&(!((s=(o=this._translaterService)===null||o===void 0?void 0:o.getCurrentLanguage)===null||s===void 0)&&s.call(o))?l=this._translaterService.translate(n.columnGroupKey):l=n.columnGroup||"";const u=n.excludeFromExport||!1;(n.width===void 0||n.width>0)&&!u&&e.push({key:n.field||n.id,title:l||""})}),e}getColumnHeaders(t){const e=[];return t&&Array.isArray(t)&&t.forEach(n=>{var r,o,s;let l="";(n.nameKey||n.nameKey)&&this._gridOptions.enableTranslate&&(!((r=this._translaterService)===null||r===void 0)&&r.translate)&&(!((s=(o=this._translaterService)===null||o===void 0?void 0:o.getCurrentLanguage)===null||s===void 0)&&s.call(o))?l=this._translaterService.translate(n.nameKey||n.nameKey):l=n.name||vl(n.field);const u=n.excludeFromExport||!1;(n.width===void 0||n.width>0)&&!u&&e.push({key:n.field||n.id,title:l||""})}),e}readRegularRowData(t,e,n){var r;let o=0;const s=[],l=this._exportQuoteWrapper;let u=1;const h=this._dataView.getItemMetadata(e);for(let c=0,p=t.length;c<p;c++){const m=t[c];if(m.excludeFromExport)continue;if(this._hasGroupedItems&&o===0){const _=this._fileFormat===an.csv?'""':"";s.push(_)}let v;if(h!=null&&h.columns){const _=h==null?void 0:h.columns,C=_[m.id]||_[c];!isNaN(u)&&+u>1||u==="*"&&c>0||(u=(r=C==null?void 0:C.colspan)!==null&&r!==void 0?r:1),u!=="*"&&m.id in _&&(v=m.id)}if(u==="*"&&c>0||!isNaN(u)&&+u>1&&m.id!==v)s.push(""),!isNaN(u)&&+u>1&&u--;else{let _=Sh(e,c,m,n,this._grid,this._exportOptions);(m.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(_=or(_)),this._fileFormat===an.csv&&_&&(_=_.toString().replace(/"/gi,'""'));const C=m!=null&&m.exportCsvForceToKeepAsString?"=":"";s.push(C+l+_+l)}o++}return s.join(this._delimiter)}readGroupedTitleRow(t){let e=or(t.title);const n=this._exportQuoteWrapper;return e=Ga(5*t.level)+e,this._fileFormat===an.csv&&(e=e.toString().replace(/"/gi,'""')),n+e+n}readGroupedTotalRow(t,e){const n=this._exportOptions.delimiter,r=this._exportOptions.format,o=this._exportOptions.groupingAggregatorRowText||"",s=this._exportQuoteWrapper,l=[`${s}${o}${s}`];return t.forEach(u=>{let h="";const c=u.excludeFromExport||!1;u.groupTotalsFormatter&&(h=u.groupTotalsFormatter(e,u,this._grid)),(u.sanitizeDataExport||this._exportOptions.sanitizeDataExport)&&(h=or(h)),r===an.csv&&(h=h.toString().replace(/"/gi,'""')),(u.width===void 0||u.width>0)&&!c&&l.push(s+h+s)}),l.join(n)}}var Lv={exports:{}};(function(a,t){(function(e,n){n(t)})(Pr,function(e){var n=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={firstDayOfWeek:1,weekdays:{shorthand:["dim","lun","mar","mer","jeu","ven","sam"],longhand:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},months:{shorthand:["janv","févr","mars","avr","mai","juin","juil","août","sept","oct","nov","déc"],longhand:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},ordinal:function(s){return s>1?"":"er"},rangeSeparator:" au ",weekAbbreviation:"Sem",scrollTitle:"Défiler pour augmenter la valeur",toggleTitle:"Cliquer pour basculer",time_24hr:!0};n.l10ns.fr=r;var o=n.l10ns;e.French=r,e.default=o,Object.defineProperty(e,"__esModule",{value:!0})})})(Lv,Lv.exports),function(a){function t(ce,Ce){this.event=ce;let be=ce,He=Ce,ot=!1,Ue=!1,St=!1,ct;if(ce){const k=["altKey","ctrlKey","metaKey","shiftKey","key","keyCode","clientX","clientY","offsetX","offsetY","pageX","pageY","bubbles","type","which","x","y"];for(let ee of k)this[ee]=ce[ee]}this.target=be?be.target:void 0,this.stopPropagation=function(){ot=!0,be&&be.stopPropagation()},this.isPropagationStopped=function(){return ot},this.stopImmediatePropagation=function(){Ue=!0,be&&be.stopImmediatePropagation()},this.isImmediatePropagationStopped=function(){return Ue},this.getNativeEvent=function(){return be},this.preventDefault=function(){be&&be.preventDefault(),St=!0},this.isDefaultPrevented=function(){return be?be.defaultPrevented:St},this.addReturnValue=function(k){ct===void 0&&k!==void 0&&(ct=k)},this.getReturnValue=function(){return ct},this.getArguments=function(){return He}}function e(){var ce=[];this.subscribe=function(Ce){ce.push(Ce)},this.unsubscribe=function(Ce){for(var be=ce.length-1;be>=0;be--)ce[be]===Ce&&ce.splice(be,1)},this.notify=function(Ce,be,He){be instanceof t||(be=new t(be,Ce)),He=He||this;for(var ot=0;ot<ce.length&&!(be.isPropagationStopped()||be.isImmediatePropagationStopped());ot++){const Ue=ce[ot].call(He,be,Ce);be.addReturnValue(Ue)}return be}}function n(){var ce=[];this.subscribe=function(Ce,be){return ce.push({event:Ce,handler:be}),Ce.subscribe(be),this},this.unsubscribe=function(Ce,be){for(var He=ce.length;He--;)if(ce[He].event===Ce&&ce[He].handler===be){ce.splice(He,1),Ce.unsubscribe(be);return}return this},this.unsubscribeAll=function(){for(var Ce=ce.length;Ce--;)ce[Ce].event.unsubscribe(ce[Ce].handler);return ce=[],this}}function r(ce,Ce,be,He){be===void 0&&He===void 0&&(be=ce,He=Ce),this.fromRow=Math.min(ce,be),this.fromCell=Math.min(Ce,He),this.toRow=Math.max(ce,be),this.toCell=Math.max(Ce,He),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(ot,Ue){return ot>=this.fromRow&&ot<=this.toRow&&Ue>=this.fromCell&&Ue<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}}function o(){this.__nonDataRow=!0}function s(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.selectChecked=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}s.prototype=new o,s.prototype.equals=function(ce){return this.value===ce.value&&this.count===ce.count&&this.collapsed===ce.collapsed&&this.title===ce.title};function l(){this.__groupTotals=!0,this.group=null,this.initialized=!1}l.prototype=new o;function u(){var ce=null;this.isActive=function(Ce){return Ce?ce===Ce:ce!==null},this.activate=function(Ce){if(Ce!==ce){if(ce!==null)throw new Error("SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController");if(!Ce.commitCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!Ce.cancelCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()");ce=Ce}},this.deactivate=function(Ce){if(ce){if(ce!==Ce)throw new Error("SlickGrid.EditorLock.deactivate: specified editController is not the currently active one");ce=null}},this.commitCurrentEdit=function(){return ce?ce.commitCurrentEdit():!0},this.cancelCurrentEdit=function(){return ce?ce.cancelCurrentEdit():!0}}function h(ce){return ce.replace(/(\b)(on[a-z]+)(\s*)=|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(&lt;)(\/*)(script|script defer)(.*)(&gt;|&gt;">)/gi,"")}function c(ce){let Ce=0,be=0,He=0,ot=0;const Ue=a.innerHeight||0,St=a.innerWidth||0,ct=D(),k=ct.top,ee=ct.left,ge=E(ce);if(ge){const $=ge.top||0,X=ge.left||0;be=$-k,Ce=Ue-($-k),He=X-ee,ot=St-(X-ee)}return{top:be,bottom:Ce,left:He,right:ot}}function p(ce,Ce,be){const He=document.createElement(ce);return Ce&&Object.keys(Ce).forEach(ot=>{const Ue=Ce[ot];typeof Ue=="object"?Object.assign(He[ot],Ue):He[ot]=Ce[ot]}),be&&be.appendChild&&be.appendChild(He),He}function m(ce,Ce){let be=null;return(...He)=>{Ce>=0?(clearTimeout(be),be=setTimeout(()=>ce.apply(null,He),Ce)):ce.apply(null)}}function v(ce){if(ce&&ce.firstChild)for(;ce.firstChild;)ce.lastChild&&ce.removeChild(ce.lastChild);return ce}function _(ce,Ce){let be=0;if(ce){const He=Ce==="height"?"clientHeight":"clientWidth",ot=Ce==="height"?["top","bottom"]:["left","right"];be=ce[He];for(const Ue of ot){const St=parseFloat(C(ce,`padding-${Ue}`))||0;be-=St}}return be}function C(ce,Ce){return ce&&ce.getComputedStyle?a.getComputedStyle(ce,null).getPropertyValue(Ce):null}function x(ce){return ce==null?!0:Object.entries(ce).length===0}function S(){}function E(ce){if(!ce||!ce.getBoundingClientRect)return;const Ce=ce.getBoundingClientRect(),be=document.documentElement;return{top:Ce.top+a.pageYOffset-be.clientTop,left:Ce.left+a.pageXOffset-be.clientLeft}}function D(){return{left:a.pageXOffset||document.documentElement.scrollLeft||0,top:a.pageYOffset||document.documentElement.scrollTop||0}}function A(ce,Ce){if(!(!ce||!ce.getBoundingClientRect)){if(Ce===void 0)return ce.getBoundingClientRect().width;M(ce,"width",Ce)}}function P(ce,Ce){if(ce){if(Ce===void 0)return ce.getBoundingClientRect().height;M(ce,"height",Ce)}}function M(ce,Ce,be){typeof be=="function"?be=be():typeof be=="string"?ce.style[Ce]=be:ce.style[Ce]=be+"px"}function B(ce,Ce){return!ce||!Ce?!1:!L(Ce).every(function(He){return ce!=He})}function Z(ce){return ce.offsetWidth===0&&ce.offsetHeight===0}function L(ce,Ce){const be=[],He=Ce==":visible",ot=Ce==":hidden";for(;(ce=ce.parentNode)&&ce!==document&&!(!ce||!ce.parentNode);)ot?Z(ce)&&be.push(ce):He?Z(ce)||be.push(ce):(!Ce||ce.matches(Ce))&&be.push(ce);return be}function ae(ce){var Ce=parseFloat(ce);return isNaN(Ce)?0:Ce}function _e(ce,Ce){Ce=Ce||"",Array.isArray(ce)?ce.forEach(function(be){be.style.display=Ce}):ce.style.display=Ce}function J(ce){Array.isArray(ce)?ce.forEach(function(Ce){Ce.style.display="none"}):ce.style.display="none"}function U(ce,Ce){return de(ce,"slideUp",Ce)}function F(ce,Ce){return de(ce,"slideDown",Ce)}function de(ce,Ce,be){if(a.jQuery!==void 0){a.jQuery(ce)[Ce]("fast",be);return}Ce==="slideUp"?J(ce):_e(ce),be()}var qe=Object.getPrototypeOf,Ie={},xe=Ie.toString,Oe=Ie.hasOwnProperty,De=Oe.toString,ne=De.call(Object);function pe(ce){return typeof ce=="function"&&typeof ce.nodeType!="number"&&typeof ce.item!="function"}function Ve(ce){var Ce,be;return!ce||xe.call(ce)!=="[object Object]"?!1:(Ce=qe(ce),Ce?(be=Oe.call(Ce,"constructor")&&Ce.constructor,typeof be=="function"&&De.call(be)===ne):!0)}function Ye(){var ce,Ce,be,He,ot,Ue,St=arguments[0],ct=1,k=arguments.length,ee=!1;for(typeof St=="boolean"?(ee=St,St=arguments[ct]||{},ct++):St=St||{},typeof St!="object"&&!pe(St)&&(St={}),ct===k&&(St=this,ct--);ct<k;ct++)if((ce=arguments[ct])!=null)for(Ce in ce)He=ce[Ce],!(Ce==="__proto__"||St===He)&&(ee&&He&&(Ve(He)||(ot=Array.isArray(He)))?(be=St[Ce],ot&&!Array.isArray(be)?Ue=[]:!ot&&!Ve(be)?Ue={}:Ue=be,ot=!1,St[Ce]=Ye(ee,Ue,He)):He!==void 0&&(St[Ce]=He));return St}function ze(){this.boundedEvents=[],this.destroy=function(){this.unbindAll(),this.boundedEvents=[]},this.bind=function(ce,Ce,be,He){ce.addEventListener(Ce,be,He),this.boundedEvents.push({element:ce,eventName:Ce,listener:be})},this.unbind=function(ce,Ce,be){ce&&ce.removeEventListener&&ce.removeEventListener(Ce,be)},this.unbindByEventName=function(ce,Ce){const be=this.boundedEvents.find(He=>He.element===ce&&He.eventName===Ce);be&&this.unbind(be.element,be.eventName,be.listener)},this.unbindAll=function(){for(;this.boundedEvents.length>0;){const ce=this.boundedEvents.pop(),{element:Ce,eventName:be,listener:He}=ce;this.unbind(Ce,be,He)}}}a.Slick={Event:e,EventData:t,EventHandler:n,Range:r,NonDataRow:o,Group:s,GroupTotals:l,RegexSanitizer:h,EditorLock:u,BindingEventService:ze,Utils:{debounce:m,extend:Ye,calculateAvailableSpace:c,createDomElement:p,emptyElement:v,innerSize:_,isEmptyObject:x,noop:S,offset:E,height:P,width:A,setStyleSize:M,contains:B,toFloat:ae,parents:L,show:_e,hide:J,slideUp:U,slideDown:F,storage:{_storage:new WeakMap,put:function(ce,Ce,be){this._storage.has(ce)||this._storage.set(ce,new Map),this._storage.get(ce).set(Ce,be)},get:function(ce,Ce){const be=this._storage.get(ce);return be?be.get(Ce):null},remove:function(ce,Ce){var be=this._storage.get(ce).delete(Ce);return!this._storage.get(ce).size===0&&this._storage.delete(ce),be}}},GlobalEditorLock:new u,keyCode:{SPACE:8,BACKSPACE:8,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38,A:65},preClickClassName:"slick-edit-preclick",GridAutosizeColsMode:{None:"NOA",LegacyOff:"LOF",LegacyForceFit:"LFF",IgnoreViewport:"IGV",FitColsToViewport:"FCV",FitViewportToCols:"FVC"},ColAutosizeMode:{Locked:"LCK",Guide:"GUI",Content:"CON",ContentExpandOnly:"CXO",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{Auto:"AUTO",TextOnly:"CANV",HTML:"HTML"}},typeof Pr<"u"&&(Pr.Slick=a.Slick)}(window),function(){function a(n){let{containerElement:r,onDragInit:o,onDragStart:s,onDrag:l,onDragEnd:u}=n,h,c,p,m,v,_;if(r||(r=document),!r||typeof r.addEventListener!="function")throw new Error("[Slick.Draggable] You did not provide a valid container html element that will be used for dragging.");let C={dragSource:r,dragHandle:null};r&&(r.addEventListener("mousedown",E),r.addEventListener("touchstart",E));function x(M,B,Z){typeof M=="function"&&M(B,Z)}function S(){r&&(r.removeEventListener("mousedown",E),r.removeEventListener("touchstart",E))}function E(M){h=M.target;const B=M.touches?M.touches[0]:M,{target:Z}=B;if(!n.allowDragFrom||n.allowDragFrom&&h.matches(n.allowDragFrom)||n.allowDragFromClosest&&h.closest(n.allowDragFromClosest)){C.dragHandle=h;const L=P();c=L.left+B.clientX,p=L.top+B.clientY,m=B.clientX-B.clientX,v=B.clientY-B.clientY,C=Object.assign(C,{deltaX:m,deltaY:v,startX:c,startY:p,target:Z}),x(o,M,C),document.addEventListener("mousemove",D),document.addEventListener("touchmove",D),document.addEventListener("mouseup",A),document.addEventListener("touchend",A),document.addEventListener("touchcancel",A)}}function D(M){const B=M.touches?M.touches[0]:M;m=B.clientX-c,v=B.clientY-p;const{target:Z}=B;_||(C=Object.assign(C,{deltaX:m,deltaY:v,startX:c,startY:p,target:Z}),x(s,M,C),_=!0),C=Object.assign(C,{deltaX:m,deltaY:v,startX:c,startY:p,target:Z}),x(l,M,C)}function A(M){if(document.removeEventListener("mousemove",D),document.removeEventListener("touchmove",D),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A),document.removeEventListener("touchcancel",A),_){const{target:B}=M;C=Object.assign(C,{target:B}),x(u,M,C),_=!1}}function P(){return{left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0}}return{destroy:S}}function t(n){let{element:r,onMouseWheel:o}=n;function s(){r.removeEventListener("wheel",u),r.removeEventListener("mousewheel",u)}function l(){r.addEventListener("wheel",u),r.addEventListener("mousewheel",u)}function u(h){const c=h||window.event;let p=0,m=0,v=0;c.wheelDelta&&(p=c.wheelDelta/120),c.detail&&(p=-c.detail/3),v=p,c.axis!==void 0&&c.axis===c.HORIZONTAL_AXIS&&(v=0,m=-1*p),c.wheelDeltaY!==void 0&&(v=c.wheelDeltaY/120),c.wheelDeltaX!==void 0&&(m=-1*c.wheelDeltaX/120),typeof o=="function"&&o(h,p,m,v)}return l(),{destroy:s}}function e(n){const{resizeableElement:r,resizeableHandleElement:o,onResizeStart:s,onResize:l,onResizeEnd:u}=n;if(!o||typeof o.addEventListener!="function")throw new Error("[Slick.Resizable] You did not provide a valid html element that will be used for the handle to resize.");function h(){o&&typeof o.removeEventListener=="function"&&(o.removeEventListener("mousedown",p),o.removeEventListener("touchstart",p))}function c(_,C){typeof _=="function"&&_(C,{resizeableElement:r,resizeableHandleElement:o})}function p(_){_.preventDefault();const C=_.touches?_.changedTouches[0]:_;c(s,C),document.addEventListener("mousemove",m),document.addEventListener("mouseup",v),document.addEventListener("touchmove",m),document.addEventListener("touchend",v)}function m(_){_.preventDefault&&_.type!=="touchmove"&&_.preventDefault();const C=_.touches?_.changedTouches[0]:_;typeof l=="function"&&(l(C,{resizeableElement:r,resizeableHandleElement:o}),l(C,{resizeableElement:r,resizeableHandleElement:o}))}function v(_){const C=_.touches?_.changedTouches[0]:_;c(u,C),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",v)}return o.addEventListener("mousedown",p),o.addEventListener("touchstart",p),{destroy:h}}Slick.Utils.extend(Slick,{Draggable:a,MouseWheel:t,Resizable:e})}();/**
110
110
  * @license
111
111
  * (c) 2009-2016 Michael Leibman
112
112
  * michael{dot}leibman{at}gmail{dot}com
@@ -115,14 +115,14 @@ function print() { __p += __j.call(arguments, '') }
115
115
  * Distributed under MIT license.
116
116
  * All rights reserved.
117
117
  *
118
- * SlickGrid v4.1.3
118
+ * SlickGrid v4.1.5
119
119
  *
120
120
  * NOTES:
121
121
  * Cell/row DOM manipulations are done directly bypassing JS DOM manipulation methods.
122
122
  * This increases the speed dramatically, but can only be done safely because there are no event handlers
123
123
  * or data associated with any cell/row DOM nodes. Cell editors must make sure they implement .destroy()
124
124
  * and do proper cleanup.
125
- */if(typeof Slick>"u")throw new Error('"slick.core.js" not loaded');(function(){var a,t;function e(n,r,o,s){var l={alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,autoCommitEdit:!1,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,autoHeight:!1,nonce:"",editorLock:Slick.GlobalEditorLock,showColumnHeader:!0,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,showPreHeaderPanel:!1,preHeaderPanelHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,frozenBottom:!1,frozenColumn:-1,frozenRow:-1,frozenRightViewportMinWidth:100,throwWhenFrozenNotAllViewable:!1,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter:ca,forceSyncScrolling:!1,addNewRowCssClass:"new-row",preserveCopiedSelectionOnPaste:!1,showCellSelection:!0,viewportClass:null,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1,enableMouseWheelScrollHandler:!0,doPaging:!0,autosizeColsMode:Slick.GridAutosizeColsMode.LegacyOff,autosizeColPaddingPx:4,autosizeTextAvgToMWidthRatio:.75,viewportSwitchToScrollModeWidthPercent:void 0,viewportMinWidthPx:void 0,viewportMaxWidthPx:void 0,suppressCssChangesOnHiddenInit:!1,ffMaxSupportedCssHeight:6e6,maxSupportedCssHeight:1e9,sanitizer:void 0,logSanitizedHtml:!1,shadowRoot:void 0},u={name:"",resizable:!0,sortable:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0,hidden:!1},h={ignoreHeaderText:!1,colValueArray:void 0,allowAddlPercent:void 0,formatterOverride:void 0,autosizeMode:Slick.ColAutosizeMode.ContentIntelligent,rowSelectionModeOnInit:void 0,rowSelectionMode:Slick.RowSelectionMode.FirstNRows,rowSelectionCount:100,valueFilterMode:Slick.ValueFilterMode.None,widthEvalMode:Slick.WidthEvalMode.Auto,sizeToRemaining:void 0,widthPx:void 0,contentSizePx:0,headerWidthPx:0,colDataTypeOf:void 0},c,p,m,v,_,C=0,x=0,S=1;const E=Slick.Utils,D=E.show,A=E.hide;var P=new Slick.BindingEventService,M=!1,B,Z="slickgrid_"+Math.round(1e6*Math.random()),L=this,ae,_e,J=[],U=[],F,de,qe,Ie,xe,Oe,De,ne,pe,Ve,Ye,ze,ce,Ce,be,He,ot,Ue,St=[],ct,k,ee,ge,$,X,re,Pe,Fe,me,We,mt,Ge,Le=0,jt=0,It=0,bi=0,q,W=!1,ve=0,ke=-1,at=0,st=0,ht=0,Dt=0,Lt=0,Ot=0,zt=1,Kt,Fi,Mi,z,Q,he=null,Ee=null,lt,vt,it={},wt=0,Ht=0,Et=0,gt=0,ei=0,Ai=0,zi=0,Zt=0,Ni,Bn=[],fn=[],Ct={},Se={},Xe=[],xt=[],ti=[],Ui=!1,Gi=!1,Li=Hf(Qi,50),pn=null,Wn=null,qt=null,Wi={},lr=null,bo=null,er=[],tr=0,Co=0,mr=0,ar,Sr,$n,Vn,di,zn,to,yo,mn,ir,vr,gr,se,ue,ye,$e,Je,dt,At,Bt,ui,Ci,Ei,yn,Yn,jn,Xn,io,_r,Eo,Hi,Oi,Br,Cs,So,qs={position:"absolute",visibility:"hidden",display:"block"},ys,ia=[],Jo=!1,Es=!1,ki=null,vi=[],wo=[],xo,Ss;function xl(){if(typeof n=="string"?B=document.querySelector(n):B=n,!B)throw new Error("SlickGrid requires a valid container, "+n+" does not exist in the DOM.");if(t=t||Qs(),s=E.extend(!0,{},l,s),ec(),u.width=s.defaultColumnWidth,s.suppressCssChangesOnHiddenInit||es(),Il(),s.enableColumnReorder&&!Sortable)throw new Error("SlickGrid requires Sortable.js module to be loaded");vt={commitCurrentEdit:Ld,cancelCurrentEdit:Mc},E.emptyElement(B),B.style.overflow="hidden",B.style.outline=0,B.classList.add(Z),B.classList.add("ui-widget");const y=window.getComputedStyle(B);/relative|absolute|fixed/.test(y.position)||(B.style.position="relative"),ae=E.createDomElement("div",{tabIndex:0,style:{position:"fixed",width:"0px",height:"0px",top:"0px",left:"0px",outline:"0px"}},B),ar=E.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-left",tabIndex:0},B),Sr=E.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-right",tabIndex:0},B),$n=E.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-left",tabIndex:0},B),Vn=E.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-right",tabIndex:0},B),di=E.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-left",tabIndex:0},B),zn=E.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-right",tabIndex:0},B),s.createPreHeaderPanel&&(Ve=E.createDomElement("div",{className:"slick-preheader-panel ui-state-default",style:{overflow:"hidden",position:"relative"}},ar),Ve.appendChild(document.createElement("div")),pe=E.createDomElement("div",null,Ve),Ye=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},Ve),ce=E.createDomElement("div",{className:"slick-preheader-panel ui-state-default",style:{overflow:"hidden",position:"relative"}},Sr),ze=E.createDomElement("div",null,ce),E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},ce),s.showPreHeaderPanel||(A(Ve),A(ce))),to=E.createDomElement("div",{className:"slick-header ui-state-default slick-header-left"},ar),yo=E.createDomElement("div",{className:"slick-header ui-state-default slick-header-right"},Sr),J.push(to),J.push(yo),mn=E.createDomElement("div",{className:"slick-header-columns slick-header-columns-left",style:{left:"-1000px"}},to),ir=E.createDomElement("div",{className:"slick-header-columns slick-header-columns-right",style:{left:"-1000px"}},yo),U=[mn,ir],vr=E.createDomElement("div",{className:"slick-headerrow ui-state-default"},$n),gr=E.createDomElement("div",{className:"slick-headerrow ui-state-default"},Vn),de=[vr,gr],qe=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},vr),Ie=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},gr),ye=E.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-left"},vr),$e=E.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-right"},gr),F=[ye,$e],At=E.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default"},$n),Bt=E.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default"},Vn),Ce=[At,Bt],ui=E.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},At),Ci=E.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},Bt),be=[ui,Ci],s.showColumnHeader||J.forEach(function(T){A(T)}),s.showTopPanel||Ce.forEach(function(T){A(T)}),s.showHeaderRow||de.forEach(function(T){A(T)}),Ei=E.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-left",tabIndex:0},$n),yn=E.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-right",tabIndex:0},Vn),Yn=E.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-left",tabIndex:0},di),jn=E.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-right",tabIndex:0},zn),He=[Ei,yn,Yn,jn],s.viewportClass&&He.forEach(function(T){T.classList.add(...s.viewportClass.split(" "))}),Fi=Ei,Xn=E.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-left",tabIndex:0},Ei),io=E.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-right",tabIndex:0},yn),_r=E.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-left",tabIndex:0},Yn),Eo=E.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-right",tabIndex:0},jn),ot=[Xn,io,_r,Eo],a=a||To(),Kt=Xn,Ye&&E.width(Ye,Kn()+a.width),U.forEach(function(T){E.width(T,rn())}),E.width(qe,Kn()+a.width),E.width(Ie,Kn()+a.width),s.createFooterRow&&(ue=E.createDomElement("div",{className:"slick-footerrow ui-state-default"},Vn),se=E.createDomElement("div",{className:"slick-footerrow ui-state-default"},$n),Oe=[se,ue],De=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},se),E.width(De,Kn()+a.width),ne=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},ue),E.width(ne,Kn()+a.width),Je=E.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-left"},se),dt=E.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-right"},ue),xe=[Je,dt],s.showFooterRow||Oe.forEach(function(T){A(T)})),_e=ae.cloneNode(!0),B.appendChild(_e),s.explicitInitialization||Ks()}function Ks(){M||(M=!0,ol(),rl(),wf(),Ft(U),s.enableTextSelectionOnCells||He.forEach(function(y){P.bind(y,"selectstart.ui",function(T){T.target instanceof HTMLInputElement||T.target instanceof HTMLTextAreaElement})}),pd(),ju(),Xu(),md(),ss(),Vt(),Ke(),Mt(),qu(),Or(),Os(),P.bind(B,"resize.slickgrid",Or),He.forEach(function(y){P.bind(y,"scroll",Ar)}),s.enableMouseWheelScrollHandler&&He.forEach(function(y){vi.push(Slick.MouseWheel({element:y,onMouseWheel:fc}))}),J.forEach(function(y){P.bind(y,"contextmenu",gc),P.bind(y,"click",_c)}),de.forEach(function(y){P.bind(y,"scroll",fi)}),s.createFooterRow&&(xe.forEach(function(y){P.bind(y,"contextmenu",bc),P.bind(y,"click",wd)}),Oe.forEach(function(y){P.bind(y,"scroll",lc)})),s.createPreHeaderPanel&&P.bind(Ve,"scroll",ac),P.bind(ae,"keydown",ll),P.bind(_e,"keydown",ll),ot.forEach(function(y){P.bind(y,"keydown",ll),P.bind(y,"click",pc),P.bind(y,"dblclick",mc),P.bind(y,"contextmenu",ds),P.bind(y,"mouseover",xd),P.bind(y,"mouseout",Cc)}),Slick.Draggable&&(ki=Slick.Draggable({containerElement:B,allowDragFrom:"div.slick-cell",allowDragFromClosest:"div.slick-cell",onDragInit:Uo,onDragStart:Uf,onDrag:Gf,onDragEnd:Wf})),s.suppressCssChangesOnHiddenInit||ws())}function es(){ys=E.parents(B,":hidden");for(const T of ys){var y={};for(const I in qs)y[I]=T.style[I],T.style[I]=qs[I];ia.push(y)}}function ws(){let y=0;for(const I of ys){var T=ia[y++];for(const V in qs)I.style[V]=T[V]}}function kt(){return s.frozenColumn>-1}function qi(y){fn.unshift(y),y.init(L)}function wr(y){for(var T=fn.length;T>=0;T--)if(fn[T]===y){fn[T].destroy&&fn[T].destroy(),fn.splice(T,1);break}}function Ho(y){for(var T=fn.length-1;T>=0;T--)if(fn[T].pluginName===y)return fn[T]}function Tl(y){Ni&&(Ni.onSelectedRangesChanged.unsubscribe(Tr),Ni.destroy&&Ni.destroy()),Ni=y,Ni&&(Ni.init(L),Ni.onSelectedRangesChanged.subscribe(Tr))}function no(){return Ni}function qn(y,T){return nn(xr(),y,T)}function Zs(y){return y===void 0||(y instanceof Slick.EventData&&(y=y.getNativeEvent()),Kt=y.target.closest(".grid-canvas")),Kt}function xr(){return ot}function Ol(y,T){return nn(xs(),y,T)}function xs(){return He}function Al(y){return Ts(y),Fi}function Ts(y){return y instanceof Slick.EventData&&(y=y.getNativeEvent()),Fi=y.target.closest(".slick-viewport"),Fi}function nn(y,T,I){if(y){T||(T=0),I||(I=0);var V=typeof T=="number"?T:_t(T),Y=W&&I>=ke+(s.frozenBottom?0:1),j=kt()&&V>s.frozenColumn;return y[(Y?2:0)+(j?1:0)]}}function To(){var y=E.createDomElement("div",{className:He.className,style:{position:"absolute",top:"-10000px",left:"-10000px",overflow:"auto",width:"100px",height:"100px"}},document.body),T=E.createDomElement("div",{style:{width:"200px",height:"200px",overflow:"auto"}},y),I={width:y.offsetWidth-y.clientWidth,height:y.offsetHeight-y.clientHeight};return T.remove(),y.remove(),I}function rn(){Fe=me=We=0;for(var y=!s.autoHeight,T=0,I=o.length;T<I;T++)if(!(!o[T]||o[T].hidden)){var V=o[T].width;s.frozenColumn>-1&&T>s.frozenColumn?We+=V:me+=V}return y&&(s.frozenColumn>-1&&T>s.frozenColumn?We+=a.width:me+=a.width),kt()?(me=me+1e3,We=Math.max(We,$)+me,We+=a.width):(me+=a.width,me=Math.max(me,$)+1e3),Fe=me+We,Math.max(Fe,$)+1e3}function Kn(){var y=Ge?$-a.width:$,T=o.length;for(re=Pe=0;T--;)!o[T]||o[T].hidden||(kt()&&T>s.frozenColumn?Pe+=o[T].width:re+=o[T].width);var I=re+Pe;if(s.fullWidthRows){var V=Math.max(I,y)-I;V>0&&(I+=V,kt()?Pe+=V:re+=V)}return I}function Oo(y){var T=X,I=re,V=Pe,Y;if(X=Kn(),Y=X!==T||re!==I||Pe!==V,Y||kt()||W)if(E.width(Xn,re),rn(),E.width(mn,me),E.width(ir,We),kt()){const j=E.width(B)||0;if(j>0&&re>j&&s.throwWhenFrozenNotAllViewable)throw new Error("[SlickGrid] Frozen columns cannot be wider than the actual grid container width. Make sure to have less columns freezed or make your grid container wider");E.width(io,Pe),E.width(ar,re),E.setStyleSize(Sr,"left",re),E.setStyleSize(Sr,"width",$-re),E.width($n,re),E.setStyleSize(Vn,"left",re),E.width(Vn,$-re),E.width(vr,re),E.width(gr,$-re),E.width(ye,re),E.width($e,Pe),s.createFooterRow&&(E.width(se,re),E.width(ue,$-re),E.width(Je,re),E.width(dt,Pe)),s.createPreHeaderPanel&&E.width(pe,X),E.width(Ei,re),E.width(yn,$-re),W&&(E.width(di,re),E.setStyleSize(zn,"left",re),E.width(Yn,re),E.width(jn,$-re),E.width(_r,re),E.width(Eo,Pe))}else E.width(ar,"100%"),E.width($n,"100%"),E.width(vr,"100%"),E.width(ye,X),s.createFooterRow&&(E.width(se,"100%"),E.width(Je,X)),s.createPreHeaderPanel&&E.width(pe,X),E.width(Ei,"100%"),W&&(E.width(Yn,"100%"),E.width(_r,re));mt=X>=$-a.width,E.width(qe,X+(Ge?a.width:0)),E.width(Ie,X+(Ge?a.width:0)),s.createFooterRow&&(E.width(De,X+(Ge?a.width:0)),E.width(ne,X+(Ge?a.width:0))),(Y||y)&&Si()}function Ft(y){y.forEach(function(T){T.setAttribute("unselectable","on"),T.style.MozUserSelect="none",P.bind(T,"selectstart.ui",function(){return!1})})}function Qs(){let y=1e6;const T=navigator.userAgent.toLowerCase().match(/firefox/)?s.ffMaxSupportedCssHeight:s.maxSupportedCssHeight,I=E.createDomElement("div",{style:{display:"hidden"}},document.body);for(;;){const V=y*2;E.height(I,V);const Y=E.height(I);if(V>T||Y!==V)break;y=V}return I.remove(),y}function Js(){return Z}function $i(){return Le}function Un(){return a}function Ao(){return{width:Ge?a.width:0,height:mt?a.height:0}}function fd(){return q}function Os(){for(var y=W&&!s.frozenBottom?_r:Xn;(y=y.parentNode)!=document.body&&y!=null;)(y==Ei||y.scrollWidth!=y.clientWidth||y.scrollHeight!=y.clientHeight)&&(St.push(y),P.bind(y,"scroll."+Z,Ea))}function ts(){St.forEach(function(y){P.unbindByEventName(y,"scroll."+Z)}),St=[]}function el(y,T,I){if(M){var V=_t(y);if(V!=null){var Y=o[V],j=Bi(V);j&&(T!==void 0&&(o[V].name=T),I!==void 0&&(o[V].toolTip=I),oe(L.onBeforeHeaderCellDestroy,{node:j,column:Y,grid:L}),j.setAttribute("title",I||""),T!==void 0&&(j.children[0].innerHTML=$o(T)),oe(L.onHeaderCellRendered,{node:j,column:Y,grid:L}))}}}function hi(y){if(!y)return kt()?U:mn;var T=_t(y.id);return kt()?T<=s.frozenColumn?mn:ir:mn}function g(y){var T=typeof y=="number"?y:_t(y),I=kt()?T<=s.frozenColumn?mn:ir:mn,V=kt()?T<=s.frozenColumn?T:T-s.frozenColumn-1:T;return I.children[V]}function w(){return kt()?F:F[0]}function R(){return kt()?xe:xe[0]}function H(){return pe}function te(){return ze}function we(y){var T=typeof y=="number"?y:_t(y),I;return kt()?T<=s.frozenColumn?I=ye:(I=$e,T-=s.frozenColumn+1):I=ye,I.children[T]}function Be(y){var T=typeof y=="number"?y:_t(y),I;return kt()?T<=s.frozenColumn?I=Je:(I=dt,T-=s.frozenColumn+1):I=Je,I.children[T]}function Ke(){if(s.createFooterRow){xe.forEach(function(I){I.querySelectorAll(".slick-footerrow-column").forEach(function(Y){const j=E.storage.get(Y,"column");oe(L.onBeforeFooterRowCellDestroy,{node:Y,column:j,grid:L})})}),E.emptyElement(Je),E.emptyElement(dt);for(var y=0;y<o.length;y++){var T=o[y];if(!T||T.hidden)continue;const I=E.createDomElement("div",{className:`ui-state-default slick-footerrow-column l${y} r${y}`},kt()&&y>s.frozenColumn?dt:Je),V=kt()&&y<=s.frozenColumn?"frozen":null;V&&I.classList.add(V),E.storage.put(I,"column",T),oe(L.onFooterRowCellRendered,{node:I,column:T,grid:L})}}}function yt(y){y.target.classList.add("ui-state-hover")}function ft(y){y.target.classList.remove("ui-state-hover")}function Vt(){U.forEach(function(I){I.querySelectorAll(".slick-header-column").forEach(function(Y){var j=E.storage.get(Y,"column");j&&oe(L.onBeforeHeaderCellDestroy,{node:Y,column:j,grid:L})})}),E.emptyElement(mn),E.emptyElement(ir),rn(),E.width(mn,me),E.width(ir,We),F.forEach(function(I){I.querySelectorAll(".slick-headerrow-column").forEach(function(Y){const j=E.storage.get(Y,"column");j&&oe(L.onBeforeHeaderRowCellDestroy,{node:this,column:j,grid:L})})}),E.emptyElement(ye),E.emptyElement($e),s.createFooterRow&&(Je.querySelectorAll(".slick-footerrow-column").forEach(function(V){var Y=E.storage.get(V,"column");Y&&oe(L.onBeforeFooterRowCellDestroy,{node:this,column:Y,grid:L})}),E.emptyElement(Je),kt()&&(dt.querySelectorAll(".slick-footerrow-column").forEach(function(Y){var j=E.storage.get(Y,"column");j&&oe(L.onBeforeFooterRowCellDestroy,{node:this,column:j,grid:L})}),E.emptyElement(dt)));for(var y=0;y<o.length;y++){const I=o[y];if(!I||I.hidden)continue;const V=kt()?y<=s.frozenColumn?mn:ir:mn,Y=kt()?y<=s.frozenColumn?ye:$e:ye,j=E.createDomElement("div",{id:`${Z+I.id}`,dataset:{id:I.id},className:"ui-state-default slick-header-column",title:I.toolTip||""},V),Te=E.createDomElement("span",{className:"slick-column-name"},j);Te.innerHTML=$o(I.name),E.width(j,I.width-Le);let tt=I.headerCssClass||null;if(tt&&j.classList.add(...tt.split(" ")),tt=kt()&&y<=s.frozenColumn?"frozen":null,tt&&j.classList.add(tt),P.bind(j,"mouseenter",vc),P.bind(j,"mouseleave",Vr),E.storage.put(j,"column",I),(s.enableColumnReorder||I.sortable)&&(P.bind(j,"mouseenter",yt),P.bind(j,"mouseleave",ft)),I.hasOwnProperty("headerCellAttrs")&&I.headerCellAttrs instanceof Object)for(var T in I.headerCellAttrs)I.headerCellAttrs.hasOwnProperty(T)&&j.setAttribute(T,I.headerCellAttrs[T]);if(I.sortable&&(j.classList.add("slick-header-sortable"),E.createDomElement("div",{className:`slick-sort-indicator ${s.numberedMultiColumnSort&&!s.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":""}`},j),s.numberedMultiColumnSort&&s.sortColNumberInSeparateSpan&&E.createDomElement("div",{className:"slick-sort-indicator-numbered"},j)),oe(L.onHeaderCellRendered,{node:j,column:I,grid:L}),s.showHeaderRow){const rt=E.createDomElement("div",{className:`ui-state-default slick-headerrow-column l${y} r${y}`},Y),ut=kt()&&y<=s.frozenColumn?"frozen":null;ut&&rt.classList.add(ut),P.bind(rt,"mouseenter",$f),P.bind(rt,"mouseleave",Yf),E.storage.put(rt,"column",I),oe(L.onHeaderRowCellRendered,{node:rt,column:I,grid:L})}if(s.createFooterRow&&s.showFooterRow){const rt=kt()?y<=s.frozenColumn?xe[0]:xe[1]:xe[0],ut=E.createDomElement("div",{className:`ui-state-default slick-footerrow-column l${y} r${y}`},rt);E.storage.put(ut,"column",I),oe(L.onFooterRowCellRendered,{node:ut,column:I,grid:L})}}il(Xe),As(),s.enableColumnReorder&&(typeof s.enableColumnReorder=="function"?s.enableColumnReorder(L,U,Le,Ds,As,o,_t,Z,oe):Ki())}function Mt(){U.forEach(function(y){P.bind(y,"click",function(T){if(!Es&&!T.target.classList.contains("slick-resizable-handle")){var I=T.target.closest(".slick-header-column");if(I){var V=E.storage.get(I,"column");if(V.sortable){if(!Ne().commitCurrentEdit())return;for(var Y=Xe.slice(),j=null,Te=0;Te<Xe.length;Te++)if(Xe[Te].columnId==V.id){j=Xe[Te],j.sortAsc=!j.sortAsc;break}var tt=!!j;s.tristateMultiColumnSort?(j||(j={columnId:V.id,sortAsc:V.defaultSortAsc}),tt&&j.sortAsc&&(Xe.splice(Te,1),j=null),s.multiColumnSort||(Xe=[]),j&&(!tt||!s.multiColumnSort)&&Xe.push(j)):T.metaKey&&s.multiColumnSort?j&&Xe.splice(Te,1):((!T.shiftKey&&!T.metaKey||!s.multiColumnSort)&&(Xe=[]),j?Xe.length===0&&Xe.push(j):(j={columnId:V.id,sortAsc:V.defaultSortAsc},Xe.push(j)));var rt;s.multiColumnSort?rt={multiColumnSort:!0,previousSortColumns:Y,sortCols:Xe.map(function(ut){return{columnId:o[_t(ut.columnId)].id,sortCol:o[_t(ut.columnId)],sortAsc:ut.sortAsc}})}:rt={multiColumnSort:!1,previousSortColumns:Y,columnId:Xe.length>0?V.id:null,sortCol:Xe.length>0?V:null,sortAsc:Xe.length>0?Xe[0].sortAsc:!0},oe(L.onBeforeSort,rt,T).getReturnValue()!==!1&&(il(Xe),oe(L.onSort,rt,T))}}}})})}function Ki(){xo&&(xo.destroy(),Ss.destroy());var y=null;function T(){Hi.scrollLeft=Hi.scrollLeft+10}function I(){Hi.scrollLeft=Hi.scrollLeft-10}var V,Y={animation:50,direction:"horizontal",chosenClass:"slick-header-column-active",ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dragoverBubble:!1,revertClone:!0,scroll:!kt(),onStart:function(j){V=!kt()||E.offset(j.item).left>E.offset(Hi).left,V&&j.originalEvent.pageX>B.clientWidth?y||(y=setInterval(T,100)):V&&j.originalEvent.pageX<E.offset(Hi).left?y||(y=setInterval(I,100)):(clearInterval(y),y=null)},onEnd:function(j){clearInterval(y),y=null;var Te=null;if(Ne().commitCurrentEdit()){var tt=xo.toArray();tt=tt.concat(Ss.toArray());for(var rt=[],ut=0;ut<tt.length;ut++)rt.push(o[_t(tt[ut])]);Ds(rt),oe(L.onColumnsReordered,{impactedColumns:Zi(Te)}),j.stopPropagation(),As()}}};xo=Sortable.create(mn,Y),Ss=Sortable.create(ir,Y)}function ln(){const y=Array.from(U[0].children),T=Array.from(U[1].children);return y.concat(T)}function Zi(y){var T=[];if(y)for(var I=y.start;I<=y.end;I++)T.push(o[I]);else T=o;return T}function is(y){const T=y.target.parentElement.id.replace(Z,"");oe(L.onColumnsResizeDblClick,{triggeredByColumn:T})}function As(){if(typeof Slick.Resizable>"u")throw new Error('Slick.Resizable is undefined, make sure to import "slick.interactions.js"');var y,T,I,V,Y,j,Te,tt,rt=0;const ut=ln();for(let pt=0;pt<ut.length;pt++)ut[pt].querySelectorAll(".slick-resizable-handle").forEach(function(Qt){Qt.remove()}),!(pt>=o.length||!o[pt]||o[pt].hidden)&&o[pt].resizable&&(Te===void 0&&(Te=pt),tt=pt);if(Te!==void 0)for(let pt=0;pt<ut.length;pt++){const nt=ut[pt];if(pt>=o.length||!o[pt]||o[pt].hidden||pt<Te||s.forceFitColumns&&pt>=tt)continue;const pi=E.createDomElement("div",{className:"slick-resizable-handle",role:"separator",ariaOrientation:"horizontal"},nt);P.bind(pi,"dblclick",is),wo.push(Slick.Resizable({resizeableElement:nt,resizeableHandleElement:pi,onResizeStart:function(Qt,yi){var Yi=Qt.touches?Qt.touches[0]:Qt;if(!Ne().commitCurrentEdit())return!1;V=Yi.pageX,rt=0,yi.resizeableElement.classList.add("slick-header-column-active");var Pi=null,En=null;for(let gn=0;gn<ut.length;gn++)gn>=o.length||!o[gn]||o[gn].hidden||(o[gn].previousWidth=ut[gn].offsetWidth);if(s.forceFitColumns)for(Pi=0,En=0,y=pt+1;y<o.length;y++)I=o[y],I&&I.resizable&&!I.hidden&&(En!==null&&(I.maxWidth?En+=I.maxWidth-I.previousWidth:En=null),Pi+=I.previousWidth-Math.max(I.minWidth||0,q));var si=0,Rn=0;for(y=0;y<=pt;y++)I=o[y],I&&I.resizable&&!I.hidden&&(Rn!==null&&(I.maxWidth?Rn+=I.maxWidth-I.previousWidth:Rn=null),si+=I.previousWidth-Math.max(I.minWidth||0,q));Pi===null&&(Pi=1e5),si===null&&(si=1e5),En===null&&(En=1e5),Rn===null&&(Rn=1e5),j=V+Math.min(Pi,Rn),Y=V-Math.min(si,En)},onResize:function(Qt,yi){var Yi=Qt.touches?Qt.touches[0]:Qt;Es=!0;var Pi,En=Math.min(j,Math.max(Y,Yi.pageX))-V,si,Rn=0,gn=0,Nc=Ge?$-a.width:$;if(En<0){for(si=En,y=pt;y>=0;y--)I=o[y],I&&I.resizable&&!I.hidden&&(Pi=Math.max(I.minWidth||0,q),si&&I.previousWidth+si<Pi?(si+=I.previousWidth-Pi,I.width=Pi):(I.width=I.previousWidth+si,si=0));for(T=0;T<=pt;T++)I=o[T],!(!I||I.hidden)&&(kt()&&T>s.frozenColumn?gn+=I.width:Rn+=I.width);if(s.forceFitColumns)for(si=-En,y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&I.resizable&&(si&&I.maxWidth&&I.maxWidth-I.previousWidth<si?(si-=I.maxWidth-I.previousWidth,I.width=I.maxWidth):(I.width=I.previousWidth+si,si=0),kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width);else for(y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&(kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width);if(s.forceFitColumns)for(si=-En,y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&I.resizable&&(si&&I.maxWidth&&I.maxWidth-I.previousWidth<si?(si-=I.maxWidth-I.previousWidth,I.width=I.maxWidth):(I.width=I.previousWidth+si,si=0))}else{for(si=En,Rn=0,gn=0,y=pt;y>=0;y--)if(I=o[y],!(!I||I.hidden)&&I.resizable)if(si&&I.maxWidth&&I.maxWidth-I.previousWidth<si)si-=I.maxWidth-I.previousWidth,I.width=I.maxWidth;else{var lo=I.previousWidth+si,zd=re+si;kt()&&y<=s.frozenColumn?(lo>rt&&zd<Nc-s.frozenRightViewportMinWidth&&(rt=lo),I.width=zd+s.frozenRightViewportMinWidth>Nc?rt:lo):I.width=lo,si=0}for(T=0;T<=pt;T++)I=o[T],!(!I||I.hidden)&&(kt()&&T>s.frozenColumn?gn+=I.width:Rn+=I.width);if(s.forceFitColumns)for(si=-En,y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&I.resizable&&(Pi=Math.max(I.minWidth||0,q),si&&I.previousWidth+si<Pi?(si+=I.previousWidth-Pi,I.width=Pi):(I.width=I.previousWidth+si,si=0),kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width);else for(y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&(kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width)}kt()&&Rn!=re&&(E.width(mn,Rn+1e3),E.setStyleSize(Sr,"left",Rn)),Xt(),s.syncColumnCellResize&&Si(),oe(L.onColumnsDrag,{triggeredByColumn:yi.resizeableElement,resizeHandle:yi.resizeableHandleElement})},onResizeEnd:function(Qt,yi){yi.resizeableElement.classList.remove("slick-header-column-active");var Yi=yi.resizeableElement.id.replace(Z,"");oe(L.onBeforeColumnsResize,{triggeredByColumn:Yi}).getReturnValue()===!0&&Xt();var Pi;for(y=0;y<o.length;y++)I=o[y],!(!I||I.hidden)&&(Pi=ut[y].offsetWidth,I.previousWidth!==Pi&&I.rerenderOnResize&&vn());Oo(!0),Qi(),oe(L.onColumnsResized,{triggeredByColumn:Yi}),setTimeout(function(){Es=!1},300)}}))}}function ns(y){var T=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],I=getComputedStyle(y),V=0;return T.forEach(function(Y){V+=E.toFloat(I[Y])}),V}function pd(){if(s.frozenColumn=s.frozenColumn>=0&&s.frozenColumn<o.length?parseInt(s.frozenColumn):-1,s.frozenRow>-1){W=!0,ve=s.frozenRow*s.rowHeight;var y=Ri();ke=s.frozenBottom?y-s.frozenRow:s.frozenRow}else W=!1}function ju(){kt()?(D(Sr),D(Vn),W?(D(di),D(zn)):(A(zn),A(di))):(A(Sr),A(Vn),A(zn),W?D(di):(A(zn),A(di)))}function md(){Ei.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"hidden":"scroll":W&&!s.alwaysAllowHorizontalScroll?"hidden":"auto",Ei.style["overflow-y"]=!kt()&&s.alwaysShowVerticalScroll?"scroll":kt()?"hidden":W?"scroll":"auto",yn.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"hidden":"scroll":W&&!s.alwaysAllowHorizontalScroll?"hidden":"auto",yn.style["overflow-y"]=s.alwaysShowVerticalScroll?"scroll":(kt(),W?"scroll":"auto"),Yn.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"scroll":"auto":(W&&!s.alwaysAllowHorizontalScroll,"auto"),Yn.style["overflow-y"]=!kt()&&s.alwaysShowVerticalScroll?"scroll":kt()?"hidden":W?"scroll":"auto",jn.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"scroll":"auto":(W&&!s.alwaysAllowHorizontalScroll,"auto"),jn.style["overflow-y"]=s.alwaysShowVerticalScroll?"scroll":(kt(),"auto"),s.viewportClass&&(Ei.classList.add(...s.viewportClass.split(" ")),yn.classList.add(...s.viewportClass.split(" ")),Yn.classList.add(...s.viewportClass.split(" ")),jn.classList.add(...s.viewportClass.split(" ")))}function Xu(){kt()?(Br=yo,Cs=gr,So=ue,W?s.frozenBottom?(Hi=jn,Oi=yn):Hi=Oi=jn:Hi=Oi=yn):(Br=to,Cs=vr,So=se,W?s.frozenBottom?(Hi=Yn,Oi=Ei):Hi=Oi=Yn:Hi=Oi=Ei)}function wf(){const y=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],T=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],I=U[0];Le=jt=0,It=bi=0;let V=E.createDomElement("div",{className:"ui-state-default slick-header-column",style:{visibility:"hidden"},textContent:"-"},I),Y=getComputedStyle(V);Y["box-sizing"]!="border-box"&&Y["-moz-box-sizing"]!="border-box"&&Y["-webkit-box-sizing"]!="border-box"&&(y.forEach(function(Te){Le+=E.toFloat(Y[Te])}),T.forEach(function(Te){jt+=E.toFloat(Y[Te])})),V.remove();const j=E.createDomElement("div",{className:"slick-row"},ot[0]);V=E.createDomElement("div",{className:"slick-cell",id:"",style:{visibility:"hidden",textContent:"-"}},j),Y=getComputedStyle(V),Y["box-sizing"]!="border-box"&&Y["-moz-box-sizing"]!="border-box"&&Y["-webkit-box-sizing"]!="border-box"&&(y.forEach(function(Te){It+=E.toFloat(Y[Te])}),T.forEach(function(Te){bi+=E.toFloat(Y[Te])})),j.remove(),q=Math.max(Le,It)}function qu(){Ue=document.createElement("style"),Ue.nonce=s.nonce||"",(s.shadowRoot||document.head).appendChild(Ue);const y=s.rowHeight-bi,T=[`.${Z} .slick-group-header-column { left: 1000px; }`,`.${Z} .slick-header-column { left: 1000px; }`,`.${Z} .slick-top-panel { height: ${s.topPanelHeight}px; }`,`.${Z} .slick-preheader-panel { height: ${s.preHeaderPanelHeight}px; }`,`.${Z} .slick-headerrow-columns { height: ${s.headerRowHeight}px; }`,`.${Z} .slick-footerrow-columns { height: ${s.footerRowHeight}px; }`,`.${Z} .slick-cell { height: ${y}px; }`,`.${Z} .slick-row { height: ${s.rowHeight}px; }`],I=Ue.sheet;if(I){for(let V of T)I.insertRule(V);for(let V=0;V<o.length;V++)!o[V]||o[V].hidden||(I.insertRule(`.${Z} .l${V} { }`),I.insertRule(`.${Z} .r${V} { }`))}else tl(T)}function tl(y){const T=document.createElement("template");T.innerHTML='<style type="text/css" rel="stylesheet" />',Ue=T.content.firstChild,(s.shadowRoot||document.head).appendChild(Ue);for(let I=0;I<o.length;I++)!o[I]||o[I].hidden||(y.push(`.${Z} .l${I} { }`),y.push(`.${Z} .r${I} { }`));Ue.styleSheet?Ue.styleSheet.cssText=y.join(" "):Ue.appendChild(document.createTextNode(y.join(" ")))}function xf(y){var T;if(!ct){var I=(s.shadowRoot||document).styleSheets;for(T=0;T<I.length;T++)if((I[T].ownerNode||I[T].owningElement)==Ue){ct=I[T];break}if(!ct)throw new Error("SlickGrid Cannot find stylesheet.");k=[],ee=[];var V=ct.cssRules||ct.rules,Y,j;for(T=0;T<V.length;T++){var Te=V[T].selectorText;(Y=/\.l\d+/.exec(Te))?(j=parseInt(Y[0].substr(2,Y[0].length-2),10),k[j]=V[T]):(Y=/\.r\d+/.exec(Te))&&(j=parseInt(Y[0].substr(2,Y[0].length-2),10),ee[j]=V[T])}}return{left:k[y],right:ee[y]}}function Ku(){Ue&&Ue.remove(),ct=null}function vd(y){P.unbindAll(),ki=kl(ki),vi=kl(vi),wo=kl(wo),Ne().cancelCurrentEdit(),oe(L.onBeforeDestroy,{});for(var T=fn.length;T--;)wr(fn[T]);s.enableColumnReorder&&xo&&typeof xo.destroy=="function"&&(xo.destroy(),Ss.destroy()),ts(),P.unbindByEventName(B,"resize.slickgrid",Or),Ku(),ot.forEach(function(Y){P.unbindByEventName(Y,"keydown",ll),P.unbindByEventName(Y,"click",pc),P.unbindByEventName(Y,"dblclick",mc),P.unbindByEventName(Y,"contextmenu",ds),P.unbindByEventName(Y,"mouseover",xd),P.unbindByEventName(Y,"mouseout",Cc)}),He.forEach(function(Y){P.unbindByEventName(Y,"scroll",Ar)}),J.forEach(function(Y){P.unbindByEventName(Y,"contextmenu",gc),P.unbindByEventName(Y,"click",_c)}),de.forEach(function(Y){P.unbindByEventName(Y,"scroll",fi)}),xe&&xe.forEach(function(Y){P.unbindByEventName(Y,"contextmenu",bc),P.unbindByEventName(Y,"click",wd)}),Oe&&Oe.forEach(function(Y){P.unbindByEventName(Y,"scroll",lc)}),Ve&&P.unbindByEventName(Ve,"scroll",ac),P.unbindByEventName(ae,"keydown",ll),P.unbindByEventName(_e,"keydown",ll);const I=B.querySelectorAll(".slick-resizable-handle");[].forEach.call(I,function(Y){P.unbindByEventName(Y,"dblclick",is)});const V=B.querySelectorAll(".slick-header-column");[].forEach.call(V,function(Y){P.unbindByEventName(Y,"mouseenter",vc),P.unbindByEventName(Y,"mouseleave",Vr),P.unbindByEventName(Y,"mouseenter",yt),P.unbindByEventName(Y,"mouseleave",ft)}),E.emptyElement(B),B.classList.remove(Z),y&&rs()}function kl(y){if(y){const T=Array.isArray(y)?y:[y];let I;for(;(I=T.pop())!=null;)I&&typeof I.destroy=="function"&&I.destroy()}return y=Array.isArray(y)?[]:null,y}function rs(){Kt=null,Fi=null,St=null,ot=null,Xn=null,io=null,_r=null,Eo=null,B=null,ae=null,_e=null,mn=null,ir=null,U=null,F=null,ye=null,$e=null,qe=null,Ie=null,Cs=null,de=null,vr=null,gr=null,Br=null,J=null,to=null,yo=null,ys=null,xe=null,Je=null,dt=null,De=null,ne=null,Oe=null,se=null,ue=null,So=null,pe=null,ze=null,Ve=null,ce=null,Ye=null,be=null,Ce=null,Ue=null,At=null,Bt=null,ui=null,Ci=null,ar=null,Sr=null,$n=null,Vn=null,di=null,zn=null,He=null,Ei=null,yn=null,Yn=null,jn=null,Hi=null,Oi=null}var ks=null,na=null;function Tf(y,T){var I=null,V=-1;if(typeof y=="number")I=o[y],V=y;else if(typeof y=="string")for(i=0;i<o.length;i++)o[i].Id===y&&(I=o[i],V=i);if(!I)return;const Y=qn(0,0);gd(I,V,Y,T,V)}function ra(y){return!y.ignoreHeaderText&&!y.sizeToRemaining&&y.contentSizePx===y.headerWidthPx&&y.widthPx<100}function os(y,T){es(),ro(y,T),ws()}function ro(y,T){if(y=y||s.autosizeColsMode,y===Slick.GridAutosizeColsMode.LegacyForceFit||y===Slick.GridAutosizeColsMode.LegacyOff){kf();return}if(y!==Slick.GridAutosizeColsMode.None){ks=document.createElement("canvas"),ks&&ks.getContext&&(na=ks.getContext("2d"));var I=qn(0,0),V=Ge?$-a.width:$,Y,j,Te,tt,rt=0,ut=0,pt=0,nt=0,pi=0;for(Y=0;Y<o.length;Y++)j=o[Y],gd(j,Y,I,T,Y),pi+=j.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?j.width:ra(j.autoSize)?j.autoSize.widthPx:0,nt+=j.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?j.width:ra(j.autoSize)?j.autoSize.widthPx:j.minWidth,rt+=j.autoSize.widthPx,ut+=j.autoSize.sizeToRemaining?0:j.autoSize.widthPx,pt+=j.autoSize.sizeToRemaining&&j.minWidth||0;var Qt=rt-ut;if(y===Slick.GridAutosizeColsMode.FitViewportToCols){var yi=rt+a.width;y=Slick.GridAutosizeColsMode.IgnoreViewport,s.viewportMaxWidthPx&&yi>s.viewportMaxWidthPx?(yi=s.viewportMaxWidthPx,y=Slick.GridAutosizeColsMode.FitColsToViewport):s.viewportMinWidthPx&&yi<s.viewportMinWidthPx&&(yi=s.viewportMinWidthPx,y=Slick.GridAutosizeColsMode.FitColsToViewport),E.width(B,yi)}if(y===Slick.GridAutosizeColsMode.FitColsToViewport)if(Qt>0&&ut<V-pt){for(Y=0;Y<o.length;Y++)if(j=o[Y],!(!j||j.hidden)){var Yi=V-ut;j.autoSize.sizeToRemaining?Te=Yi*j.autoSize.widthPx/Qt:Te=j.autoSize.widthPx,j.rerenderOnResize&&j.width!=Te&&(tt=!0),j.width=Te}}else if(s.viewportSwitchToScrollModeWidthPercent&&ut+pt>V*s.viewportSwitchToScrollModeWidthPercent/100||nt>V)y=Slick.GridAutosizeColsMode.IgnoreViewport;else{var Pi=ut-pi,En=V-pi-pt;for(Y=0;Y<o.length;Y++)j=o[Y],!(!j||j.hidden)&&(Te=j.width,j.autoSize.autosizeMode!==Slick.ColAutosizeMode.Locked&&!ra(j.autoSize)&&(j.autoSize.sizeToRemaining?Te=j.minWidth:(Te=En/Pi*j.autoSize.widthPx-1,Te<j.minWidth&&(Te=j.minWidth),Pi-=j.autoSize.widthPx,En-=Te)),ra(j.autoSize)&&(Te=j.autoSize.widthPx,Te<j.minWidth&&(Te=j.minWidth)),j.rerenderOnResize&&j.width!=Te&&(tt=!0),j.width=Te)}if(y===Slick.GridAutosizeColsMode.IgnoreViewport)for(Y=0;Y<o.length;Y++)!o[Y]||o[Y].hidden||(Te=o[Y].autoSize.widthPx,o[Y].rerenderOnResize&&o[Y].width!=Te&&(tt=!0),o[Y].width=Te);_d(tt)}}function gd(y,T,I,V,Y){var j=y.autoSize;if(j.widthPx=y.width,j.autosizeMode===Slick.ColAutosizeMode.Locked||j.autosizeMode===Slick.ColAutosizeMode.Guide)return;var Te=Ri();const tt=new RegExp(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z/);if(j.autosizeMode===Slick.ColAutosizeMode.ContentIntelligent){var rt=j.colDataTypeOf,ut;if(Te>0){var pt=In(0);pt&&(ut=pt[y.field],tt.test(ut)&&(ut=Date.parse(ut)),rt=typeof ut,rt==="object"&&(ut instanceof Date&&(rt="date"),typeof moment<"u"&&ut instanceof moment&&(rt="moment")))}rt==="boolean"&&(j.colValueArray=[!0,!1]),rt==="number"&&(j.valueFilterMode=Slick.ValueFilterMode.GetGreatestAndSub,j.rowSelectionMode=Slick.RowSelectionMode.AllRows),rt==="string"&&(j.valueFilterMode=Slick.ValueFilterMode.GetLongestText,j.rowSelectionMode=Slick.RowSelectionMode.AllRows,j.allowAddlPercent=5),rt==="date"&&(j.colValueArray=[new Date(2009,8,30,12,20,20)]),rt==="moment"&&typeof moment<"u"&&(j.colValueArray=[moment([2009,8,30,12,20,20])])}var nt=j.contentSizePx=Of(y,T,I,V,Y);nt===0&&(nt=j.widthPx);var pi=j.allowAddlPercent?1+j.allowAddlPercent/100:1;nt=nt*pi+s.autosizeColPaddingPx,y.minWidth&&nt<y.minWidth&&(nt=y.minWidth),y.maxWidth&&nt>y.maxWidth&&(nt=y.maxWidth),(j.autosizeMode===Slick.ColAutosizeMode.ContentExpandOnly||y.editor&&y.editor.ControlFillsColumn)&&nt<y.width&&(nt=y.width),j.widthPx=nt}function Of(y,T,I,V,Y){var j=y.autoSize,Te=1,tt,rt,ut=0,pt=0;if(j.headerWidthPx=0,j.ignoreHeaderText||(j.headerWidthPx=Af(y)),j.headerWidthPx===0&&(j.headerWidthPx=y.width?y.width:y.maxWidth?y.maxWidth:y.minWidth?y.minWidth:20),j.colValueArray)return pt=Zu(y,I,j.colValueArray),Math.max(j.headerWidthPx,pt);var nt={};nt.colIndex=T,nt.rowCount=Ri(),nt.startIndex=0,nt.endIndex=nt.rowCount-1,nt.valueArr=null,nt.getRowVal=function(si){return In(si)[y.field]};var pi=(V?j.rowSelectionModeOnInit:void 0)||j.rowSelectionMode;if(pi===Slick.RowSelectionMode.FirstRow&&(nt.endIndex=0),pi===Slick.RowSelectionMode.LastRow&&(nt.endIndex=nt.startIndex=nt.rowCount-1),pi===Slick.RowSelectionMode.FirstNRows&&(nt.endIndex=Math.min(j.rowSelectionCount,nt.rowCount)-1),j.valueFilterMode===Slick.ValueFilterMode.DeDuplicate){var Qt={};for(tt=nt.startIndex;tt<=nt.endIndex;tt++)Qt[nt.getRowVal(tt)]=!0;if(Object.keys)nt.valueArr=Object.keys(Qt);else{nt.valueArr=[];for(var yi in Qt)nt.valueArr.push(yi)}nt.startIndex=0,nt.endIndex=nt.length-1}if(j.valueFilterMode===Slick.ValueFilterMode.GetGreatestAndSub){var Yi,Pi=0;for(tt=nt.startIndex;tt<=nt.endIndex;tt++)rt=nt.getRowVal(tt),Math.abs(rt)>Pi&&(Yi=rt,Pi=Math.abs(rt));Yi=""+Yi,Yi=Array(Yi.length+1).join("9"),Yi=+Yi,nt.valueArr=[Yi],nt.startIndex=nt.endIndex=0}if(j.valueFilterMode===Slick.ValueFilterMode.GetLongestTextAndSub){for(tt=nt.startIndex;tt<=nt.endIndex;tt++)rt=nt.getRowVal(tt),(rt||"").length>ut&&(ut=rt.length);rt=Array(ut+1).join("m"),Te=s.autosizeTextAvgToMWidthRatio,nt.maxLen=ut,nt.valueArr=[rt],nt.startIndex=nt.endIndex=0}if(j.valueFilterMode===Slick.ValueFilterMode.GetLongestText){ut=0;var En=0;for(tt=nt.startIndex;tt<=nt.endIndex;tt++)rt=nt.getRowVal(tt),(rt||"").length>ut&&(ut=rt.length,En=tt);rt=nt.getRowVal(En),nt.maxLen=ut,nt.valueArr=[rt],nt.startIndex=nt.endIndex=0}return nt.maxLen&&nt.maxLen>30&&Y>1&&(j.sizeToRemaining=!0),pt=Zu(y,I,nt)*Te,Math.max(j.headerWidthPx,pt)}function Zu(y,T,I){const V=E.createDomElement("div",{className:"slick-row ui-widget-content"},T),Y=E.createDomElement("div",{className:"slick-cell"},V);Y.style.position="absolute",Y.style.visibility="hidden",Y.style["text-overflow"]="initial",Y.style["white-space"]="nowrap";var j,Te,tt=0,rt,ut,pt,nt=y.autoSize.widthEvalMode===Slick.WidthEvalMode.TextOnly;if(y.autoSize.widthEvalMode===Slick.WidthEvalMode.Auto){var pi=!y.formatterOverride&&!y.formatter,Qt=y.formatterOverride&&y.formatterOverride.ReturnsTextOnly||!y.formatterOverride&&y.formatter&&y.formatter.ReturnsTextOnly;nt=pi||Qt}if(na&&nt){const yi=getComputedStyle(Y);for(na.font=yi["font-size"]+" "+yi["font-family"],j=I.startIndex;j<=I.endIndex;j++)pt=I.valueArr?I.valueArr[j]:I.getRowVal(j),y.formatterOverride?ut=y.formatterOverride(j,I.colIndex,pt,y,In(j),L):y.formatter?ut=y.formatter(j,I.colIndex,pt,y,In(j),L):ut=""+pt,Te=ut?na.measureText(ut).width:0,Te>tt&&(tt=Te,rt=ut);return Y.textContent=rt,Te=Y.offsetWidth,V.remove(),Te}for(j=I.startIndex;j<=I.endIndex;j++)pt=I.valueArr?I.valueArr[j]:I.getRowVal(j),y.formatterOverride?ut=y.formatterOverride(j,I.colIndex,pt,y,In(j),L):y.formatter?ut=y.formatter(j,I.colIndex,pt,y,In(j),L):ut=""+pt,Vo(ut,Y),Te=Y.offsetWidth,Te>tt&&(tt=Te);return V.remove(),tt}function Af(y){var T=0,I=Js()+y.id,V=document.getElementById(I),Y=I+"_";if(V){var j=V.cloneNode(!0);j.id=Y,j.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",V.parentNode.insertBefore(j,V),T=j.offsetWidth,j.parentNode.removeChild(j)}else{let Te=hi(y);V=E.createDomElement("div",{id:Y,className:"ui-state-default slick-header-column"},Te);const tt=E.createDomElement("span",{className:"slick-column-name"},V);tt.innerHTML=$o(y.name),j.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",y.headerCssClass&&V.classList.add(...y.headerCssClass.split(" ")),T=V.offsetWidth,Te.removeChild(V)}return T}function kf(){var y,T,I=[],V=0,Y=0,j,Te=Ge?$-a.width:$;for(y=0;y<o.length;y++)T=o[y],!(!T||T.hidden)&&(I.push(T.width),Y+=T.width,T.resizable&&(V+=T.width-Math.max(T.minWidth,q)));for(j=Y;Y>Te&&V;){var tt=(Y-Te)/V;for(y=0;y<o.length&&Y>Te;y++)if(T=o[y],!(!T||T.hidden)){var rt=I[y];if(!(!T.resizable||rt<=T.minWidth||rt<=q)){var ut=Math.max(T.minWidth,q),pt=Math.floor(tt*(rt-ut))||1;pt=Math.min(pt,rt-ut),Y-=pt,V-=pt,I[y]-=pt}}if(j<=Y)break;j=Y}for(j=Y;Y<Te;){var nt=Te/Y;for(y=0;y<o.length&&Y<Te;y++)if(T=o[y],!(!T||T.hidden)){var pi=I[y],Qt;!T.resizable||T.maxWidth<=pi?Qt=0:Qt=Math.min(Math.floor(nt*pi)-pi,T.maxWidth-pi||1e6)||1,Y+=Qt,I[y]+=Y<=Te?Qt:0}if(j>=Y)break;j=Y}var yi=!1;for(y=0;y<o.length;y++)!T||T.hidden||(o[y].rerenderOnResize&&o[y].width!=I[y]&&(yi=!0),o[y].width=I[y]);_d(yi)}function _d(y){Xt(),Oo(!0),oe(L.onAutosizeColumns,{columns:o}),y&&(vn(),Qi())}function Is(){return o.filter(y=>!y.hidden)}function oe(y,T,I){return I=I||new Slick.EventData(I,T),T=T||{},T.grid=L,y.notify(T,I,L)}function Ne(){return s.editorLock}function Me(){return vt}function _t(y){return Se[y]}function Xt(){if(!M)return;let y=0,T=Is();U.forEach(function(I){for(let V=0;V<I.children.length;V++,y++){const Y=I.children[V],Te=((T[y]||{}).width||0)-Le;E.width(Y)!==Te&&E.width(Y,Te)}}),ss()}function Si(){for(var y=0,T,I,V=0;V<o.length;V++)o[V]&&o[V].hidden||(T=o[V].width,I=xf(V),I.left.style.left=y+"px",I.right.style.right=(s.frozenColumn!=-1&&V>s.frozenColumn?Pe:re)-y-T+"px",s.frozenColumn!=V&&(y+=o[V].width)),s.frozenColumn==V&&(y=0)}function kn(y,T){il([{columnId:y,sortAsc:T}])}function Bi(y){let T=null;return U.every(function(I){const V=I.children.length;return y<V?(T=I.children[y],!1):(y-=V,!0)}),T}function il(y){Xe=y;const T=s.numberedMultiColumnSort&&Xe.length>1;U.forEach(function(V){let Y=V.querySelectorAll(".slick-header-column-sorted");Y.forEach(function(j){j.classList.remove("slick-header-column-sorted")}),Y=V.querySelectorAll(".slick-sort-indicator"),Y.forEach(function(j){j.classList.remove("slick-sort-indicator-asc"),j.classList.remove("slick-sort-indicator-desc")}),Y=V.querySelectorAll(".slick-sort-indicator-numbered"),Y.forEach(function(j){j.textContent=""})});let I=1;Xe.forEach(function(V){V.sortAsc==null&&(V.sortAsc=!0);const Y=_t(V.columnId);if(Y!=null){const j=Bi(Y);if(j){j.classList.add("slick-header-column-sorted");let Te=j.querySelector(".slick-sort-indicator");Te.classList.add(V.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),T&&(Te=j.querySelector(".slick-sort-indicator-numbered"),Te.textContent=I)}}I++})}function If(){return Xe}function Tr(y,T){const I=y.getNativeEvent();var V=Bn.slice(0);Bn=[];for(var Y={},j=0;j<T.length;j++)for(var Te=T[j].fromRow;Te<=T[j].toRow;Te++){Y[Te]||(Bn.push(Te),Y[Te]={});for(var tt=T[j].fromCell;tt<=T[j].toCell;tt++)Nd(Te,tt)&&(Y[Te][o[tt].id]=s.selectedCellCssClass)}if(hc(s.selectedCellCssClass,Y),oa(V,Bn)){var rt=I&&I.detail&&I.detail.caller||"click",ut=ka().filter(function(nt){return V.indexOf(nt)<0}),pt=V.filter(function(nt){return ka().indexOf(nt)<0});oe(L.onSelectedRowsChanged,{rows:ka(),previousSelectedRows:V,caller:rt,changedSelectedRows:ut,changedUnselectedRows:pt},y)}}function oa(y,T){return Array.isArray(y)&&Array.isArray(T)&&T.sort().toString()!==y.sort().toString()}function Df(){return o}function ss(){xt=[],ti=[];for(var y=0,T=0,I=o.length;T<I;T++)!o[T]||o[T].hidden||(xt[T]=y,ti[T]=y+o[T].width,s.frozenColumn==T?y=0:y+=o[T].width)}function Il(){Se={};for(var y=0;y<o.length;y++){o[y].width&&(o[y].widthRequest=o[y].width);var T=o[y]=E.extend({},u,o[y]);T.autoSize=E.extend({},h,T.autoSize),Se[T.id]=y,T.minWidth&&T.width<T.minWidth&&(T.width=T.minWidth),T.maxWidth&&T.width>T.maxWidth&&(T.width=T.maxWidth)}}function Ds(y){oe(L.onBeforeSetColumns,{previousColumns:o,newColumns:y,grid:L}),o=y,o=y,Qu()}function Di(){oe(L.onBeforeUpdateColumns,{columns:o,grid:L}),Qu()}function Qu(){Il(),ss(),M&&(ju(),md(),vn(),Vt(),Ke(),Ku(),qu(),Or(),Oo(),Xt(),Si(),Ar(),no()&&no().refreshSelections&&no().refreshSelections())}function Ju(){return s}function sa(y,T,I,V){if(Ne().commitCurrentEdit()){Zn(),y.showColumnHeader!==void 0&&bd(y.showColumnHeader),s.enableAddRow!==y.enableAddRow&&ma(Ri()),y.frozenColumn&&(xs().forEach(j=>j.scrollLeft=0),Ar());var Y=E.extend(!0,{},s);s=E.extend(s,y),oe(L.onSetOptions,{optionsBefore:Y,optionsAfter:s}),ec(),pd(),y.frozenBottom!==void 0&&(Jo=!0),He.forEach(function(j){j.style["overflow-y"]=s.autoHeight?"hidden":"auto"}),T||Qi(),Xu(),V||md(),I||Ds(o),s.enableMouseWheelScrollHandler&&He&&(!vi||vi.length===0)?He.forEach(function(j){vi.push(Slick.MouseWheel({element:j,onMouseWheel:fc}))}):s.enableMouseWheelScrollHandler===!1&&kl(vi)}}function ec(){s.autoHeight&&(s.leaveSpaceForNewRows=!1),s.forceFitColumns&&(s.autosizeColsMode=Slick.GridAutosizeColsMode.LegacyForceFit,console.log("forceFitColumns option is deprecated - use autosizeColsMode"))}function Rf(y,T){r=y,vn(),va(),T&&Bo(0)}function Pf(){return r}function Ri(){return r.getLength?r.getLength():r&&r.length||0}function nr(){return Ri()+(s.enableAddRow&&(!Ui||Gi)?1:0)}function In(y){return r.getItem?r.getItem(y):r[y]}function tc(){return be[0]}function la(){return be}function nl(y,T,I,V){var Y=V!==!1;if(s[y]!=I)if(s[y]=I,I){if(Y){E.slideDown(T,Or);return}D(T),Or()}else{if(Y){E.slideUp(T,Or);return}A(T),Or()}}function ic(y,T){nl("showTopPanel",Ce,y,T)}function aa(y,T){nl("showHeaderRow",de,y,T)}function bd(y,T){nl("showColumnHeader",J,y,T)}function Dl(y,T){nl("showFooterRow",Oe,y,T)}function Rs(y,T){nl("showPreHeaderPanel",[Ve,ce],y,T)}function da(){return B}function Cd(y){return s.rowHeight*y-x}function ua(y){return Math.floor((y+x)/s.rowHeight)}function Bo(y){y=Math.max(y,0),y=Math.min(y,c-E.height(Oi)+(mt||kt()?a.height:0));var T=x;C=Math.min(v-1,Math.floor(y/m)),x=Math.round(C*_);var I=y-x;if(x!=T){var V=ga(I);rc(V),ba()}Et!=I&&(S=Et+T<I+x?1:-1,ei=gt=Et=I,kt()&&(Ei.scrollTop=I),W&&(Yn.scrollTop=jn.scrollTop=I),Oi.scrollTop=I,oe(L.onViewportChanged,{}))}function ca(y,T,I,V,Y,j){return I==null?"":(I+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ps(y,T){var I=r.getItemMetadata&&r.getItemMetadata(y),V=I&&I.columns&&(I.columns[T.id]||I.columns[_t(T.id)]);return V&&V.formatter||I&&I.formatter||T.formatter||s.formatterFactory&&s.formatterFactory.getFormatter(T)||s.defaultFormatter}function ha(y,T){var I=o[T],V=r.getItemMetadata&&r.getItemMetadata(y),Y=V&&V.columns;return Y&&Y[I.id]&&Y[I.id].editor!==void 0?Y[I.id].editor:Y&&Y[T]&&Y[T].editor!==void 0?Y[T].editor:I.editor||s.editorFactory&&s.editorFactory.getEditor(I)}function fa(y,T){return s.dataItemColumnValueExtractor?s.dataItemColumnValueExtractor(y,T):y[T.field]}function nc(y,T,I,V,Y){var j=In(I),Te=I<Y&&!j,tt="slick-row"+(W&&I<=s.frozenRow?" frozen":"")+(Te?" loading":"")+(I===z&&s.showCellSelection?" active":"")+(I%2==1?" odd":" even");j||(tt+=" "+s.addNewRowCssClass);var rt=r.getItemMetadata&&r.getItemMetadata(I);rt&&rt.cssClasses&&(tt+=" "+rt.cssClasses);var ut=Od(I),pt=`<div class="ui-widget-content ${tt}" style="top:${Cd(I)-ut}px">`;y.push(pt),kt()&&T.push(pt);for(var nt,pi,Qt=0,yi=o.length;Qt<yi;Qt++)if(pi=o[Qt],!(!pi||pi.hidden)){if(nt=1,rt&&rt.columns){var Yi=rt.columns[pi.id]||rt.columns[Qt];nt=Yi&&Yi.colspan||1,nt==="*"&&(nt=yi-Qt)}if(ti[Math.min(yi-1,Qt+nt-1)]>V.leftPx){if(!pi.alwaysRenderColumn&&xt[Qt]>V.rightPx)break;kt()&&Qt>s.frozenColumn?pa(T,I,Qt,nt,j):pa(y,I,Qt,nt,j)}else(pi.alwaysRenderColumn||kt()&&Qt<=s.frozenColumn)&&pa(y,I,Qt,nt,j);nt>1&&(Qt+=nt-1)}y.push("</div>"),kt()&&T.push("</div>")}function pa(y,T,I,V,Y){var j=o[I],Te="slick-cell l"+I+" r"+Math.min(o.length-1,I+V-1)+(j.cssClass?" "+j.cssClass:"");kt()&&I<=s.frozenColumn&&(Te+=" frozen"),T===z&&I===Q&&s.showCellSelection&&(Te+=" active");for(var tt in Ct)Ct[tt][T]&&Ct[tt][T][j.id]&&(Te+=" "+Ct[tt][T][j.id]);var rt=null,ut="";Y&&(rt=fa(Y,j),ut=Ps(T,j)(T,I,rt,j,Y,L),ut==null&&(ut=""));var nt=oe(L.onBeforeAppendCell,{row:T,cell:I,value:rt,dataContext:Y}).getReturnValue(),pi=typeof nt=="string"?nt:"";ut&&ut.addClasses&&(pi+=(pi?" ":"")+ut.addClasses);var Qt=ut&&ut.toolTip?"title='"+ut.toolTip+"'":"",yi="";if(j.hasOwnProperty("cellAttrs")&&j.cellAttrs instanceof Object)for(var tt in j.cellAttrs)j.cellAttrs.hasOwnProperty(tt)&&(yi+=" "+tt+'="'+j.cellAttrs[tt]+'" ');y.push(`<div class="${Te+(pi?" "+pi:"")}" ${Qt+yi}>`),Y&&y.push(Object.prototype.toString.call(ut)!=="[object Object]"?ut:ut.text),y.push("</div>"),it[T].cellRenderQueue.push(I),it[T].cellColSpans[I]=V}function rc(y){for(var T in it){var I=!0;W&&(s.frozenBottom&&T>=ke||!s.frozenBottom&&T<=ke)&&(I=!1),(T=parseInt(T,10))!==z&&(T<y.top||T>y.bottom)&&I&&Rl(T)}s.enableAsyncPostRenderCleanup&&G()}function Dn(){va(),vn(),Qi()}function vn(){Ee&&Zn();for(var y in it)Rl(y);s.enableAsyncPostRenderCleanup&&G()}function Ff(y,T,I){tr++;for(var V in T)T.hasOwnProperty(V)&&er.push({actionType:"C",groupId:tr,node:y.cellNodesByColumnIdx[V|0],columnIdx:V|0,rowIdx:I});y.rowNode||(y.rowNode=[]),er.push({actionType:"R",groupId:tr,node:y.rowNode}),y.rowNode.forEach(function(Y){Y.remove()})}function Mf(y,T,I){er.push({actionType:"C",groupId:tr,node:y,columnIdx:T,rowIdx:I}),y.remove()}function Rl(y){var T=it[y];!T||!T.rowNode||(s.enableAsyncPostRenderCleanup&&Wi[y]?Ff(T,Wi[y],y):T.rowNode.forEach(function(I){I.parentElement&&I.parentElement.removeChild(I)}),delete it[y],delete Wi[y],wt--,mr++)}function oc(y){var T,I;if(!(!y||!y.length)){for(S=0,I=y.length,T=0;T<I;T++)Ee&&z===y[T]&&Zn(),it[y[T]]&&Rl(y[T]);s.enableAsyncPostRenderCleanup&&G()}}function ma(y){!y&&y!==0||oc([y])}function Vo(y,T,I){if(y==null&&(y=""),Object.prototype.toString.call(y)!=="[object Object]"){T.innerHTML=$o(y);return}T.innerHTML=$o(y.text),y.removeClasses&&!I&&y.removeClasses.split(" ").forEach(function(Y){T.classList.remove(Y)}),y.addClasses&&y.addClasses.split(" ").forEach(function(Y){T.classList.add(Y)}),y.toolTip&&T.setAttribute("title",y.toolTip)}function yd(y,T){var I=Ir(y,T);if(I){var V=o[T],Y=In(y);if(Ee&&z===y&&Q===T)Ee.loadValue(Y);else{var j=Y?Ps(y,V)(y,T,fa(Y,V),V,Y,L):"";Vo(j,I),as(y)}}}function ls(y){var T=it[y];if(T){_a(y);var I,V=In(y);for(var Y in T.cellNodesByColumnIdx)if(T.cellNodesByColumnIdx.hasOwnProperty(Y)){Y=Y|0;var j=o[Y],Te=T.cellNodesByColumnIdx[Y];y===z&&Y===Q&&Ee?Ee.loadValue(V):V?(I=Ps(y,j)(y,Y,fa(V,j),j,V,L),Vo(I,Te)):E.emptyElement(Te)}as(y)}}function rl(){if((!s.autoHeight||s.frozenColumn!=-1)&&(Dt=s.showTopPanel?s.topPanelHeight+ns(Ce[0]):0,Lt=s.showHeaderRow?s.headerRowHeight+ns(de[0]):0,Ot=s.showFooterRow?s.footerRowHeight+ns(Oe[0]):0),s.autoHeight){let y=ar.offsetHeight;y+=s.showHeaderRow?s.headerRowHeight+ns(de[0]):0,y+=s.showFooterRow?s.footerRowHeight+ns(Oe[0]):0,y+=Kn()>$?a.height:0,ge=s.rowHeight*nr()+(s.frozenColumn==-1?y:0)}else{const y=s.showColumnHeader?E.toFloat(E.height(J[0]))+ns(J[0]):0,T=s.createPreHeaderPanel&&s.showPreHeaderPanel?s.preHeaderPanelHeight+ns(Ve):0,I=getComputedStyle(B);ge=E.toFloat(I.height)-E.toFloat(I.paddingTop)-E.toFloat(I.paddingBottom)-y-Dt-Lt-Ot-T}return Ht=Math.ceil(ge/s.rowHeight),ge}function ol(){$=parseFloat(E.innerSize(B,"width"))}function Or(){if(M){if(at=0,st=0,ht=0,ol(),rl(),W?s.frozenBottom?(at=ge-ve-a.height,st=ve+a.height):(at=ve,st=ge-ve):at=ge,at+=Dt+Lt+Ot,kt()&&s.autoHeight&&(at+=a.height),ht=at-Dt-Lt-Ot,s.autoHeight){if(kt()){const T=getComputedStyle(to);E.height(B,at+E.toFloat(T.height))}$n.style.position="relative"}E.setStyleSize($n,"top",E.height(ar)||(s.showHeaderRow?s.headerRowHeight:0)+(s.showPreHeaderPanel?s.preHeaderPanelHeight:0)),E.height($n,at);var y=$n.offsetTop+at;s.autoHeight||E.height(Ei,ht),kt()?(E.setStyleSize(Vn,"top",E.height(ar)),E.height(Vn,at),E.height(yn,ht),W&&(E.setStyleSize(di,"top",y),E.height(di,st),E.setStyleSize(zn,"top",y),E.height(zn,st),E.height(jn,st))):W&&(E.width(di,"100%"),E.height(di,st),E.setStyleSize(di,"top",y)),W?(E.height(Yn,st),s.frozenBottom?(E.height(_r,ve),kt()&&E.height(Eo,ve)):(E.height(Xn,ve),kt()&&E.height(io,ve))):E.height(yn,ht),(!a||!a.width)&&(a=To()),s.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&os(),va(),Ar(),Ai=-1,Qi()}}function sl(y){Ui=y.pageSize!==0,Gi=y.pageNum==y.totalPages-1}function va(){if(M){var y=Ri(),T=nr(),I=0,tt=W&&!s.frozenBottom?E.height(_r):E.height(Xn);if(W)var I=Ri()-s.frozenRow;else var I=T+(s.leaveSpaceForNewRows?Ht-1:0);var V=E.height(Oi),Y=Ge;Ge=s.alwaysShowVerticalScroll||!s.autoHeight&&I*s.rowHeight>V,Zn();var j=y-1;for(var Te in it)Te>j&&Rl(Te);s.enableAsyncPostRenderCleanup&&G(),he&&z>j&&zr();var tt=p;s.autoHeight?p=s.rowHeight*I:(c=Math.max(s.rowHeight*I,V-a.height),c<t?(p=m=c,v=1,_=0):(p=t,m=p/100,v=Math.floor(c/m),_=(c-p)/(v-1))),(p!==tt||Jo)&&(W&&!s.frozenBottom?(E.height(_r,p),kt()&&E.height(Eo,p)):(E.height(Xn,p),E.height(io,p)),gt=Oi.scrollTop,Jo=!1);var rt=gt+x<=c-V;c==0||gt==0?C=x=0:Bo(rt?gt+x:c-V+a.height),p!=tt&&s.autoHeight&&Or(),s.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&Y!=Ge&&os(),Oo(!1)}}function ga(y,T){return y==null&&(y=gt),T==null&&(T=Zt),{top:ua(y),bottom:ua(y+ge)+1,leftPx:T,rightPx:T+$}}function sc(y,T){var I=ga(y,T),V=Math.round(ge/s.rowHeight),Y=s.minRowBuffer;return S==-1?(I.top-=V,I.bottom+=Y):S==1?(I.top-=Y,I.bottom+=V):(I.top-=Y,I.bottom+=Y),I.top=Math.max(0,I.top),I.bottom=Math.min(nr()-1,I.bottom),I.leftPx-=$,I.rightPx+=$,I.leftPx=Math.max(0,I.leftPx),I.rightPx=Math.min(X,I.rightPx),I}function _a(y){const T=it[y];if(T&&T.cellRenderQueue.length&&T.rowNode&&T.rowNode.length){const I=T.rowNode;let V=Array.from(I[0].children);I.length>1&&(V=V.concat(Array.from(I[1].children)));let Y=V.length-1;for(;T.cellRenderQueue.length;){const j=T.cellRenderQueue.pop();T.cellNodesByColumnIdx[j]=V[Y--]}}}function Nf(y,T){if(!(W&&(s.frozenBottom&&T>ke||T<=ke))){var I=it[T],V=[];for(var Y in I.cellNodesByColumnIdx)if(I.cellNodesByColumnIdx.hasOwnProperty(Y)&&(Y=Y|0,!(Y<=s.frozenColumn)&&!(Array.isArray(o)&&o[Y]&&o[Y].alwaysRenderColumn))){var j=I.cellColSpans[Y];(xt[Y]>y.rightPx||ti[Math.min(o.length-1,Y+j-1)]<y.leftPx)&&(T==z&&Y==Q||V.push(Y))}for(var Te,tt;(Te=V.pop())!=null;)tt=I.cellNodesByColumnIdx[Te],s.enableAsyncPostRenderCleanup&&Wi[T]&&Wi[T][Te]?Mf(tt,Te,T):tt.parentElement.removeChild(tt),delete I.cellColSpans[Te],delete I.cellNodesByColumnIdx[Te],Wi[T]&&delete Wi[T][Te]}}function Pl(y){for(var T,I=[],V=[],Y,j,Te=y.top,tt=y.bottom;Te<=tt;Te++)if(T=it[Te],!!T){_a(Te),Nf(y,Te),Y=0;var rt=r.getItemMetadata&&r.getItemMetadata(Te);rt=rt&&rt.columns;for(var ut=In(Te),pt=0,nt=o.length;pt<nt;pt++)if(!(!o[pt]||o[pt].hidden)){if(xt[pt]>y.rightPx)break;if((j=T.cellColSpans[pt])!=null){pt+=j>1?j-1:0;continue}if(j=1,rt){var pi=rt[o[pt].id]||rt[pt];j=pi&&pi.colspan||1,j==="*"&&(j=nt-pt)}ti[Math.min(nt-1,pt+j-1)]>y.leftPx&&(pa(I,Te,pt,j,ut),Y++),pt+=j>1?j-1:0}Y&&V.push(Te)}if(I.length){var Qt=document.createElement("div");Qt.innerHTML=$o(I.join(""));for(var yi,Yi;(yi=V.pop())!=null;){T=it[yi];for(var Pi;(Pi=T.cellRenderQueue.pop())!=null;)Yi=Qt.lastChild,kt()&&Pi>s.frozenColumn?T.rowNode[1].appendChild(Yi):T.rowNode[0].appendChild(Yi),T.cellNodesByColumnIdx[Pi]=Yi}}}function Fs(y){for(var T=[],I=[],V=[],Y=!1,j=Ri(),Te=y.top,tt=y.bottom;Te<=tt;Te++)it[Te]||W&&s.frozenBottom&&Te==Ri()||(wt++,V.push(Te),it[Te]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},nc(T,I,Te,y,j),he&&z===Te&&(Y=!0),Co++);if(!V.length)return;const rt=document.createElement("div"),ut=document.createElement("div");rt.innerHTML=$o(T.join("")),ut.innerHTML=$o(I.join(""));for(var Te=0,tt=V.length;Te<tt;Te++)W&&V[Te]>=ke?kt()?it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&ut.firstChild&&(it[V[Te]].rowNode=[rt.firstChild,ut.firstChild],_r.appendChild(rt.firstChild),Eo.appendChild(ut.firstChild)):it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&(it[V[Te]].rowNode=[rt.firstChild],_r.appendChild(rt.firstChild)):kt()?it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&ut.firstChild&&(it[V[Te]].rowNode=[rt.firstChild,ut.firstChild],Xn.appendChild(rt.firstChild),io.appendChild(ut.firstChild)):it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&(it[V[Te]].rowNode=[rt.firstChild],Xn.appendChild(rt.firstChild));Y&&(he=Ir(z,Q))}function Ed(){s.enableAsyncPostRender&&(clearTimeout(Wn),Wn=setTimeout(uc,s.asyncPostRenderDelay))}function G(){s.enableAsyncPostRenderCleanup&&(clearTimeout(qt),qt=setTimeout(cc,s.asyncPostRenderCleanupDelay))}function as(y){for(var T in Wi[y])Wi[y].hasOwnProperty(T)&&(Wi[y][T]="C");bo=Math.min(bo,y),lr=Math.max(lr,y),Ed()}function ba(){for(var y in it){var T=y?parseInt(y):0;E.setStyleSize("top",Cd(T))}}function Qi(){if(M){Li.dequeue();var y=ga(),T=sc();if(rc(T),Ai!=Zt){if(W){var I=E.extend(!0,{},T);s.frozenBottom?(I.top=ke,I.bottom=Ri()):(I.top=0,I.bottom=s.frozenRow),Pl(I)}Pl(T)}Fs(T),W&&(s.frozenBottom?Fs({top:ke,bottom:Ri()-1,leftPx:T.leftPx,rightPx:T.rightPx}):Fs({top:0,bottom:s.frozenRow-1,leftPx:T.leftPx,rightPx:T.rightPx})),bo=y.top,lr=Math.min(nr()-1,y.bottom),Ed(),ei=gt,Ai=Zt,oe(L.onRendered,{startRow:y.top,endRow:y.bottom,grid:L})}}function fi(){var y=Cs.scrollLeft;y!=Hi.scrollLeft&&(Hi.scrollLeft=y)}function lc(){var y=So.scrollLeft;y!=Hi.scrollLeft&&(Hi.scrollLeft=y)}function ac(){Lf(Ve)}function Lf(y){var T=y.scrollLeft;T!=Hi.scrollLeft&&(Hi.scrollLeft=T)}function Ar(){return gt=Oi.scrollTop,Zt=Hi.scrollLeft,dc(!1)}function dc(y){var T=Oi.scrollHeight-Oi.clientHeight,I=Oi.scrollWidth-Oi.clientWidth;T=Math.max(0,T),I=Math.max(0,I),gt>T&&(gt=T),Zt>I&&(Zt=I);var V=Math.abs(gt-Et),Y=Math.abs(Zt-zi);if(Y&&(zi=Zt,Hi.scrollLeft=Zt,Br.scrollLeft=Zt,Ce[0].scrollLeft=Zt,s.createFooterRow&&(So.scrollLeft=Zt),s.createPreHeaderPanel&&(kt()?ce.scrollLeft=Zt:Ve.scrollLeft=Zt),kt()?(W&&(yn.scrollLeft=Zt),gr.scrollLeft=Zt):(W&&(Ei.scrollLeft=Zt),vr.scrollLeft=Zt)),V&&!s.autoHeight)if(S=Et<gt?1:-1,Et=gt,y&&(Oi.scrollTop=gt),kt()&&(W&&!s.frozenBottom?Yn.scrollTop=gt:Ei.scrollTop=gt),V<ge)Bo(gt+x);else{var j=x;p==ge?C=0:C=Math.min(v-1,Math.floor(gt*((c-ge)/(p-ge))*(1/m))),x=Math.round(C*_),j!=x&&vn()}if(Y||V){var Te=Math.abs(Ai-Zt),tt=Math.abs(ei-gt);(Te>20||tt>20)&&(s.forceSyncScrolling||tt<ge&&Te<$?Qi():Li.enqueue(),oe(L.onViewportChanged,{}))}return oe(L.onScroll,{scrollLeft:Zt,scrollTop:gt}),!!(Y||V)}function Hf(y,T){var I=!1,V=!1;function Y(){I?V=!0:Te()}function j(){V=!1}function Te(){I=!0,setTimeout(tt,T),y()}function tt(){V?(j(),Te()):I=!1}return{enqueue:Y,dequeue:j}}function uc(){for(var y=Ri();bo<=lr;){var T=S>=0?bo++:lr--,I=it[T];if(!(!I||T>=y)){Wi[T]||(Wi[T]={}),_a(T);for(var V in I.cellNodesByColumnIdx)if(I.cellNodesByColumnIdx.hasOwnProperty(V)){V=V|0;var Y=o[V],j=Wi[T][V];if(Y.asyncPostRender&&j!=="R"){var Te=I.cellNodesByColumnIdx[V];Te&&Y.asyncPostRender(Te,T,In(T),Y,j==="C"),Wi[T][V]="R"}}Wn=setTimeout(uc,s.asyncPostRenderDelay);return}}}function cc(){if(er.length>0){for(var y=er[0].groupId;er.length>0&&er[0].groupId==y;){var T=er.shift();if(T.actionType=="R"&&T.node.forEach(function(V){V.remove()}),T.actionType=="C"){var I=o[T.columnIdx];I.asyncPostRenderCleanup&&T.node&&I.asyncPostRenderCleanup(T.node,T.rowIdx,I)}}qt=setTimeout(cc,s.asyncPostRenderCleanupDelay)}}function Sd(y,T){var I,V,Y,j;for(var Te in it){if(j=T&&T[Te],Y=y&&y[Te],j)for(V in j)(!Y||j[V]!=Y[V])&&(I=Ir(Te,_t(V)),I&&I.classList.remove(j[V]));if(Y)for(V in Y)(!j||j[V]!=Y[V])&&(I=Ir(Te,_t(V)),I&&I.classList.add(Y[V]))}}function zo(y,T){if(Ct[y])throw new Error("SlickGrid addCellCssStyles: cell CSS hash with key '"+y+"' already exists.");Ct[y]=T,Sd(T,null),oe(L.onCellCssStylesChanged,{key:y,hash:T,grid:L})}function Bf(y){Ct[y]&&(Sd(null,Ct[y]),delete Ct[y],oe(L.onCellCssStylesChanged,{key:y,hash:null,grid:L}))}function hc(y,T){const I=Ct[y];Ct[y]=T,Sd(T,I),oe(L.onCellCssStylesChanged,{key:y,hash:T,grid:L})}function Vf(y){return Ct[y]}function zf(y,T,I){I=I||250;function V(Y,j){j<1||setTimeout(function(){j%2==0?Y.classList.add(s.cellFlashingCssClass):Y.classList.remove(s.cellFlashingCssClass),V(Y,j-1)},I)}if(it[y]){const Y=Ir(y,T);Y&&V(Y,5)}}function fc(y,T,I,V){gt=Math.max(0,Oi.scrollTop-V*s.rowHeight),Zt=Hi.scrollLeft+I*10;var Y=dc(!0);Y&&y.preventDefault()}function Uo(y,T){var I=dl(y);if(!I||!Td(I.row,I.cell))return!1;var V=oe(L.onDragInit,T,y);return V.isImmediatePropagationStopped()?V.getReturnValue():!1}function Uf(y,T){var I=dl(y);if(!I||!Td(I.row,I.cell))return!1;var V=oe(L.onDragStart,T,y);return V.isImmediatePropagationStopped()?V.getReturnValue():!1}function Gf(y,T){return oe(L.onDrag,T,y).getReturnValue()}function Wf(y,T){oe(L.onDragEnd,T,y)}function ll(y){var I=oe(L.onKeyDown,{row:z,cell:Q},y).isImmediatePropagationStopped(),V=Slick.keyCode;if(!I&&!y.shiftKey&&!y.altKey){if(s.editable&&Ee&&Ee.keyCaptureList&&Ee.keyCaptureList.indexOf(y.which)>-1)return;y.which==V.HOME?I=y.ctrlKey?Tc():Fd():y.which==V.END&&(I=y.ctrlKey?Ta():Md())}if(!I)if(!y.shiftKey&&!y.altKey&&!y.ctrlKey){if(s.editable&&Ee&&Ee.keyCaptureList&&Ee.keyCaptureList.indexOf(y.which)>-1)return;if(y.which==V.ESCAPE){if(!Ne().isActive())return;Nl()}else y.which==V.PAGE_DOWN?(wc(),I=!0):y.which==V.PAGE_UP?(xc(),I=!0):y.which==V.LEFT?I=Rd():y.which==V.RIGHT?I=Ic():y.which==V.UP?I=Dc():y.which==V.DOWN?I=hl():y.which==V.TAB?I=Aa():y.which==V.ENTER&&(s.editable&&(Ee?z===Ri()?hl():Ec():Ne().commitCurrentEdit()&&Ml(void 0,void 0,y)),I=!0)}else y.which==V.TAB&&y.shiftKey&&!y.ctrlKey&&!y.altKey&&(I=Pd());if(I){y.stopPropagation(),y.preventDefault();try{y.originalEvent.keyCode=0}catch{}}}function pc(y){let T=y;if(T instanceof Slick.EventData?T=y.getNativeEvent():y=void 0,!Ee&&(T.target!=document.activeElement||T.target.classList.contains("slick-cell"))){var I=Sa();Go(),Ms(I)}var V=dl(T);if(!(!V||Ee!==null&&z==V.row&&Q==V.cell)&&(y=oe(L.onClick,{row:V.row,cell:V.cell},y||T),!y.isImmediatePropagationStopped()&&Wr(V.row,V.cell)&&(!Ne().isActive()||Ne().commitCurrentEdit()))){wa(V.row,!1);var Y=T.target&&T.target.className===Slick.preClickClassName,j=o[V.cell],Te=!!(s.editable&&j&&j.editor&&s.suppressActiveCellChangeOnEdit);Wo(Ir(V.row,V.cell),null,Y,Te,T)}}function ds(y){var T=y.target.closest(".slick-cell");T&&(he===T&&Ee!==null||oe(L.onContextMenu,{},y))}function mc(y){var T=dl(y);!T||Ee!==null&&z==T.row&&Q==T.cell||(oe(L.onDblClick,{row:T.row,cell:T.cell},y),!y.defaultPrevented&&s.editable&&Fc(T.row,T.cell,!0,y))}function vc(y){const T=E.storage.get(y.target.closest(".slick-header-column"),"column");T&&oe(L.onHeaderMouseEnter,{column:T,grid:L},y)}function Vr(y){const T=E.storage.get(y.target.closest(".slick-header-column"),"column");T&&oe(L.onHeaderMouseLeave,{column:T,grid:L},y)}function $f(y){const T=E.storage.get(y.target.closest(".slick-headerrow-column"),"column");T&&oe(L.onHeaderRowMouseEnter,{column:T,grid:L},y)}function Yf(y){const T=E.storage.get(y.target.closest(".slick-headerrow-column"),"column");T&&oe(L.onHeaderRowMouseLeave,{column:T,grid:L},y)}function gc(y){var T=y.target.closest(".slick-header-column"),I=T&&E.storage.get(T,"column");oe(L.onHeaderContextMenu,{column:I},y)}function _c(y){if(!Es){var T=y.target.closest(".slick-header-column"),I=T&&E.storage.get(T,"column");I&&oe(L.onHeaderClick,{column:I},y)}}function bc(y){var T=y.target.closest(".slick-footerrow-column"),I=T&&E.storage.get(T,"column");oe(L.onFooterContextMenu,{column:I},y)}function wd(y){var T=y.target.closest(".slick-footerrow-column"),I=T&&E.storage.get(T,"column");oe(L.onFooterClick,{column:I},y)}function xd(y){oe(L.onMouseEnter,{},y)}function Cc(y){oe(L.onMouseLeave,{},y)}function Td(y,T){return!(y<0||y>=Ri()||T<0||T>=o.length)}function Fl(y,T){for(var I=ua(T),V=0,Y=0,j=0;j<o.length&&Y<y;j++)!o[j]||o[j].hidden||(Y+=o[j].width,V++);return V<0&&(V=0),{row:I,cell:V-1}}function al(y){var T=/l\d+/.exec(y.className);if(!T)throw new Error("SlickGrid getCellFromNode: cannot get cell - "+y.className);return parseInt(T[0].substr(1,T[0].length-1),10)}function Ca(y){for(var T in it)for(var I in it[T].rowNode)if(it[T].rowNode[I]===y)return T?parseInt(T):0;return null}function Od(y){let T=0;return W?s.frozenBottom?y>=ke?p<ht?T=ke*s.rowHeight:T=p:T=0:y>=ke?T=ve:T=0:T=0,T}function dl(y){y instanceof Slick.EventData&&(y=y.getNativeEvent());var T=y.touches?y.touches[0]:y,I,V,Y=y.target.closest(".slick-cell");if(!Y)return null;if(I=Ca(Y.parentNode),W){var j=E.offset(E.parents(Y,".grid-canvas")[0]),Te=0,tt=E.parents(Y,".grid-canvas-bottom").length;tt&&(Te=s.frozenBottom?E.height(Xn):ve),I=Fl(T.clientX-j.left,T.clientY-j.top+Te+document.documentElement.scrollTop).row}return V=al(Y),I==null||V==null?null:{row:I,cell:V}}function jf(y,T){if(!Td(y,T))return null;for(var I=Od(y),V=Cd(y)-I,Y=V+s.rowHeight-1,j=0,Te=0;Te<T;Te++)!o[Te]||o[Te].hidden||(j+=o[Te].width,s.frozenColumn==Te&&(j=0));var tt=j+o[T].width;return{top:V,left:j,bottom:Y,right:tt}}function zr(){Wo(null,!1)}function Go(){zt==-1?ae.focus():_e.focus()}function Ur(y,T,I){if(wa(y,I),!(T<=s.frozenColumn)){var V=Gr(y,T);kr(xt[T],ti[T+(V>1?V-1:0)])}}function kr(y,T){var I=Zt+E.width(Hi)-(Ge?a.width:0);y<Zt?(Hi.scrollLeft=y,Ar(),Qi()):T>I&&(Hi.scrollLeft=Math.min(y,T-Hi.clientWidth),Ar(),Qi())}function Xf(y){kr(xt[y],ti[y])}function Wo(y,T,I,V,Y){if(he!==null&&(Zn(),he.classList.remove("active"),it[z]&&it[z].rowNode&&it[z].rowNode.forEach(function(ut){ut.classList.remove("active")})),he=y,he!=null){var j=E.offset(he),Te=Math.floor(E.offset(E.parents(he,".grid-canvas")[0]).top),tt=E.parents(he,".grid-canvas-bottom").length;W&&tt&&(Te-=s.frozenBottom?E.height(Xn):ve);var rt=Fl(j.left,Math.ceil(j.top)-Te);z=rt.row,Q=Mi=Q=Mi=al(he),T==null&&(T=z==Ri()||s.autoEdit),s.showCellSelection&&(he.classList.add("active"),it[z]&&it[z].rowNode&&it[z].rowNode.forEach(function(ut){ut.classList.add("active")})),s.editable&&T&&ul(z,Q)&&(clearTimeout(pn),s.asyncEditorLoading?pn=setTimeout(function(){Ml(void 0,I,Y)},s.asyncEditorLoadDelay):Ml(void 0,I,Y))}else z=Q=null;V||oe(L.onActiveCellChanged,oo())}function yc(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}else if(window.getSelection){var y=window.getSelection();y&&y.removeAllRanges&&y.removeAllRanges()}}function ul(y,T){var I=Ri();return!(y<I&&!In(y)||o[T].cannotTriggerInsert&&y>=I||!o[T]||o[T].hidden||!ha(y,T))}function Zn(){if(Ee){if(oe(L.onBeforeCellEditorDestroy,{editor:Ee}),Ee.destroy(),Ee=null,he){var y=In(z);if(he.classList.remove("editable"),he.classList.remove("invalid"),y){var T=o[Q],I=Ps(z,T),V=I(z,Q,fa(y,T),T,y,L);Vo(V,he),as(z)}}navigator.userAgent.toLowerCase().match(/msie/)&&yc(),Ne().deactivate(vt)}}function Ml(y,T,I){if(he){if(!s.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when options.editable is false");if(clearTimeout(pn),!!ul(z,Q)){var V=o[Q],Y=In(z);if(oe(L.onBeforeEditCell,{row:z,cell:Q,item:Y,column:V,target:"grid"}).getReturnValue()===!1){Go();return}Ne().activate(vt),he.classList.add("editable");var j=y||ha(z,Q);!y&&!j.suppressClearOnEdit&&E.emptyElement(he);var Te=r.getItemMetadata&&r.getItemMetadata(z);Te=Te&&Te.columns;var tt=Te&&(Te[V.id]||Te[Q]);Ee=new j({grid:L,gridPosition:ya(B),position:ya(he),container:he,column:V,columnMetaData:tt,item:Y||{},event:I,commitChanges:Ec,cancelChanges:Nl}),Y&&(Ee.loadValue(Y),T&&Ee.preClick&&Ee.preClick()),lt=Ee.serializeValue(),Ee.position&&Ea()}}}function Ec(){Ne().commitCurrentEdit()&&(Go(),s.autoEdit&&!s.autoCommitEdit&&hl())}function Nl(){Ne().cancelCurrentEdit()&&Go()}function ya(y){var T={top:y.offsetTop,left:y.offsetLeft,bottom:0,right:0,width:y.offsetWidth,height:y.offsetWidth,visible:!0};T.bottom=T.top+T.height,T.right=T.left+T.width;for(var I=y.offsetParent;(y=y.parentNode)!=document.body&&!(!y||!y.parentNode);){const V=getComputedStyle(y);T.visible&&y.scrollHeight!=y.offsetHeight&&V.overflowY!="visible"&&(T.visible=T.bottom>y.scrollTop&&T.top<y.scrollTop+y.clientHeight),T.visible&&y.scrollWidth!=y.offsetWidth&&V.overflowX!="visible"&&(T.visible=T.right>y.scrollLeft&&T.left<y.scrollLeft+y.clientWidth),T.left-=y.scrollLeft,T.top-=y.scrollTop,y===I&&(T.left+=y.offsetLeft,T.top+=y.offsetTop,I=y.offsetParent),T.bottom=T.top+T.height,T.right=T.left+T.width}return T}function Ad(){return ya(he)}function Qn(){return ya(B)}function Ea(){if(he&&(oe(L.onActiveCellPositionChanged,{}),Ee)){var y=Ad();Ee.show&&Ee.hide&&(y.visible?Ee.show():Ee.hide()),Ee.position&&Ee.position(y)}}function Sc(){return Ee}function oo(){return he?{row:z,cell:Q}:null}function kd(){return he}function Sa(){var y=null;if(window.getSelection){var T=window.getSelection();T.rangeCount>0&&(y=T.getRangeAt(0))}return y}function Ms(y){if(window.getSelection&&y){var T=window.getSelection();T.removeAllRanges(),T.addRange(y)}}function wa(y,T){if(!W||!s.frozenBottom&&y>ke-1||s.frozenBottom&&y<ke-1){var I=E.height(Oi),V=W&&!s.frozenBottom?y-s.frozenRow:y,Y=V*s.rowHeight,j=(V+1)*s.rowHeight-I+(mt?a.height:0);(V+1)*s.rowHeight>gt+I+x?(Bo(T?Y:j),Qi()):V*s.rowHeight<gt+x&&(Bo(T?j:Y),Qi())}}function dr(y){Bo(y*s.rowHeight),Qi()}function xa(y){var T=y*Ht,I=gt+s.rowHeight-1;if(Bo((ua(I)+T)*s.rowHeight),Qi(),s.enableCellNavigation&&z!=null){var V=z+T,Y=nr();V>=Y&&(V=Y-1),V<0&&(V=0);for(var j=0,Te=null,tt=Mi;j<=Mi;)Wr(V,j)&&(Te=j),j+=Gr(V,j);Te!==null?(Wo(Ir(V,Te)),Mi=tt):zr()}}function wc(){xa(1)}function xc(){xa(-1)}function Tc(){Oc(0)}function Ta(){Oc(Ri()-1)}function Oc(y){var T=Ri();if(!T)return!0;if(y<0?y=0:y>=T&&(y=T-1),Ur(y,0,!0),s.enableCellNavigation&&z!=null){for(var I=0,V=null,Y=Mi;I<=Mi;)Wr(y,I)&&(V=I),I+=Gr(y,I);V!==null?(Wo(Ir(y,V)),Mi=Y):zr()}return!0}function Gr(y,T){var I=r.getItemMetadata&&r.getItemMetadata(y);if(!I||!I.columns)return 1;var V=I.columns[o[T].id]||I.columns[T],Y=V&&V.colspan;return Y==="*"?Y=o.length-T:Y=Y||1,Y}function Oa(y){for(var T=0;T<o.length;){if(Wr(y,T))return T;T+=Gr(y,T)}return null}function Ac(y){for(var T=0,I=null;T<o.length;)Wr(y,T)&&(I=T),T+=Gr(y,T);return I}function Id(y,T,I){if(T>=o.length)return null;do T+=Gr(y,T);while(T<o.length&&!Wr(y,T));return T<o.length?{row:y,cell:T,posX:T}:null}function cl(y,T,I){if(T<=0)return null;var V=Oa(y);if(V===null||V>=T)return null;for(var Y={row:y,cell:V,posX:V},j;;){if(j=Id(Y.row,Y.cell,Y.posX),!j)return null;if(j.cell>=T)return Y;Y=j}}function qf(y,T,I){for(var V,Y=nr();;){if(++y>=Y)return null;for(V=T=0;T<=I;)V=T,T+=Gr(y,T);if(Wr(y,V))return{row:y,cell:V,posX:I}}}function Kf(y,T,I){for(var V;;){if(--y<0)return null;for(V=T=0;T<=I;)V=T,T+=Gr(y,T);if(Wr(y,V))return{row:y,cell:V,posX:I}}}function Dd(y,T,I){if(y==null&&T==null&&(y=T=0,Wr(y,T)))return{row:y,cell:T,posX:T};var V=Id(y,T);if(V)return V;var Y=null,j=nr();for(y===j-1&&y--;++y<j;)if(Y=Oa(y),Y!==null)return{row:y,cell:Y,posX:Y};return null}function kc(y,T,I){if(y==null&&T==null&&(y=nr()-1,T=o.length-1,Wr(y,T)))return{row:y,cell:T,posX:T};for(var V,Y;!V&&(V=cl(y,T),!V);){if(--y<0)return null;T=0,Y=Ac(y),Y!==null&&(V={row:y,cell:Y,posX:Y})}return V}function Zf(y,T,I){var V=Oa(y);return V===null?null:{row:y,cell:V,posX:V}}function Qf(y,T,I){var V=Ac(y);return V===null?null:{row:y,cell:V,posX:V}}function Ic(){return so("right")}function Rd(){return so("left")}function hl(){return so("down")}function Dc(){return so("up")}function Aa(){return so("next")}function Pd(){return so("prev")}function Fd(){return so("home")}function Md(){return so("end")}function so(y){if(!s.enableCellNavigation||!he&&y!="prev"&&y!="next")return!1;if(!Ne().commitCurrentEdit())return!0;Go();var T={up:-1,down:1,left:-1,right:1,prev:-1,next:1,home:-1,end:1};zt=T[y];var I={up:Kf,down:qf,left:cl,right:Id,prev:kc,next:Dd,home:Zf,end:Qf},V=I[y],Y=V(z,Q,Mi);if(Y){if(W&&s.frozenBottom&Y.row==Ri())return;var j=Y.row==Ri();return(!s.frozenBottom&&Y.row>=ke||s.frozenBottom&&Y.row<ke)&&Ur(Y.row,Y.cell,!j&&s.emulatePagingWhenScrolling),Wo(Ir(Y.row,Y.cell)),Mi=Y.posX,!0}else return Wo(Ir(z,Q)),!1}function Ir(y,T){if(it[y]){_a(y);try{return it[y].cellNodesByColumnIdx.length>T?it[y].cellNodesByColumnIdx[T]:null}catch{return it[y].cellNodesByColumnIdx[T]}}return null}function Rc(y,T,I,V,Y){M&&(y>Ri()||y<0||T>=o.length||T<0||s.enableCellNavigation&&(Ur(y,T,!1),Wo(Ir(y,T),I,V,Y)))}function Pc(y,T,I){M&&(y>Ri()||y<0||T>=o.length||T<0||(z=y,I||Ur(y,T||0,!1)))}function Wr(y,T){if(!s.enableCellNavigation||y>=nr()||y<0||T>=o.length||T<0||!o[T]||o[T].hidden)return!1;var I=r.getItemMetadata&&r.getItemMetadata(y);if(I&&typeof I.focusable<"u")return!!I.focusable;var V=I&&I.columns;return V&&V[o[T].id]&&typeof V[o[T].id].focusable<"u"?!!V[o[T].id].focusable:V&&V[T]&&typeof V[T].focusable<"u"?!!V[T].focusable:!!o[T].focusable}function Nd(y,T){if(y>=Ri()||y<0||T>=o.length||T<0||!o[T]||o[T].hidden)return!1;var I=r.getItemMetadata&&r.getItemMetadata(y);if(I&&typeof I.selectable<"u")return!!I.selectable;var V=I&&I.columns&&(I.columns[o[T].id]||I.columns[T]);return V&&typeof V.selectable<"u"?!!V.selectable:!!o[T].selectable}function Fc(y,T,I,V){if(M&&Wr(y,T)&&Ne().commitCurrentEdit()){Ur(y,T,!1);var Y=Ir(y,T),j=o[T],Te=!!(s.editable&&j&&j.editor&&s.suppressActiveCellChangeOnEdit);Wo(Y,I||y===Ri()||s.autoEdit,null,Te,V),Ee||Go()}}function Ld(){var y=In(z),T=o[Q];if(Ee){if(Ee.isValueChanged()){var I=Ee.validate();if(I.valid){if(z<Ri()){var V={row:z,cell:Q,editor:Ee,serializedValue:Ee.serializeValue(),prevSerializedValue:lt,execute:function(){this.editor.applyValue(y,this.serializedValue),ls(this.row),oe(L.onCellChange,{command:"execute",row:this.row,cell:this.cell,item:y,column:T})},undo:function(){this.editor.applyValue(y,this.prevSerializedValue),ls(this.row),oe(L.onCellChange,{command:"undo",row:this.row,cell:this.cell,item:y,column:T})}};s.editCommandHandler?(Zn(),s.editCommandHandler(y,T,V)):(V.execute(),Zn())}else{var Y={};Ee.applyValue(Y,Ee.serializeValue()),Zn(),oe(L.onAddNewRow,{item:Y,column:T})}return!Ne().isActive()}else return he.classList.remove("invalid"),E.width(he),he.classList.add("invalid"),oe(L.onValidationError,{editor:Ee,cellNode:he,validationResults:I,row:z,cell:Q,column:T}),Ee.focus(),!1}Zn()}return!0}function Mc(){return Zn(),!0}function Hd(y){for(var T=[],I=o.length-1,V=0;V<y.length;V++)T.push(new Slick.Range(y[V],0,y[V],I));return T}function ka(){if(!Ni)throw new Error("SlickGrid Selection model is not set");return Bn.slice(0)}function Bd(y,T){if(!Ni)throw new Error("SlickGrid Selection model is not set");L&&L.getEditorLock&&!L.getEditorLock().isActive()&&Ni.setSelectedRanges(Hd(y),T||"SlickGrid.setSelectedRows")}var ni=0,Vd=30;function $o(y,T){if(!s.sanitizer||typeof y!="string")return y;var I=s.sanitizer(y);return!T&&s.logSanitizedHtml&&ni<=Vd&&I!==y&&(console.log("sanitizer altered html: "+y+" --> "+I),ni===Vd&&console.log("sanitizer: silencing messages after first "+Vd),ni++),I}this.debug=function(){var y="";y+=`
125
+ */if(typeof Slick>"u")throw new Error('"slick.core.js" not loaded');(function(){var a,t;function e(n,r,o,s){var l={alwaysShowVerticalScroll:!1,alwaysAllowHorizontalScroll:!1,explicitInitialization:!1,rowHeight:25,defaultColumnWidth:80,enableAddRow:!1,leaveSpaceForNewRows:!1,editable:!1,autoEdit:!0,autoCommitEdit:!1,suppressActiveCellChangeOnEdit:!1,enableCellNavigation:!0,enableColumnReorder:!0,asyncEditorLoading:!1,asyncEditorLoadDelay:100,forceFitColumns:!1,enableAsyncPostRender:!1,asyncPostRenderDelay:50,enableAsyncPostRenderCleanup:!1,asyncPostRenderCleanupDelay:40,autoHeight:!1,nonce:"",editorLock:Slick.GlobalEditorLock,showColumnHeader:!0,showHeaderRow:!1,headerRowHeight:25,createFooterRow:!1,showFooterRow:!1,footerRowHeight:25,createPreHeaderPanel:!1,showPreHeaderPanel:!1,preHeaderPanelHeight:25,showTopPanel:!1,topPanelHeight:25,formatterFactory:null,editorFactory:null,cellFlashingCssClass:"flashing",selectedCellCssClass:"selected",multiSelect:!0,enableTextSelectionOnCells:!1,dataItemColumnValueExtractor:null,frozenBottom:!1,frozenColumn:-1,frozenRow:-1,frozenRightViewportMinWidth:100,throwWhenFrozenNotAllViewable:!1,fullWidthRows:!1,multiColumnSort:!1,numberedMultiColumnSort:!1,tristateMultiColumnSort:!1,sortColNumberInSeparateSpan:!1,defaultFormatter:ca,forceSyncScrolling:!1,addNewRowCssClass:"new-row",preserveCopiedSelectionOnPaste:!1,showCellSelection:!0,viewportClass:null,minRowBuffer:3,emulatePagingWhenScrolling:!0,editorCellNavOnLRKeys:!1,enableMouseWheelScrollHandler:!0,doPaging:!0,autosizeColsMode:Slick.GridAutosizeColsMode.LegacyOff,autosizeColPaddingPx:4,autosizeTextAvgToMWidthRatio:.75,viewportSwitchToScrollModeWidthPercent:void 0,viewportMinWidthPx:void 0,viewportMaxWidthPx:void 0,suppressCssChangesOnHiddenInit:!1,ffMaxSupportedCssHeight:6e6,maxSupportedCssHeight:1e9,sanitizer:void 0,logSanitizedHtml:!1,shadowRoot:void 0},u={name:"",resizable:!0,sortable:!1,minWidth:30,maxWidth:void 0,rerenderOnResize:!1,headerCssClass:null,defaultSortAsc:!0,focusable:!0,selectable:!0,hidden:!1},h={ignoreHeaderText:!1,colValueArray:void 0,allowAddlPercent:void 0,formatterOverride:void 0,autosizeMode:Slick.ColAutosizeMode.ContentIntelligent,rowSelectionModeOnInit:void 0,rowSelectionMode:Slick.RowSelectionMode.FirstNRows,rowSelectionCount:100,valueFilterMode:Slick.ValueFilterMode.None,widthEvalMode:Slick.WidthEvalMode.Auto,sizeToRemaining:void 0,widthPx:void 0,contentSizePx:0,headerWidthPx:0,colDataTypeOf:void 0},c,p,m,v,_,C=0,x=0,S=1;const E=Slick.Utils,D=E.show,A=E.hide;var P=new Slick.BindingEventService,M=!1,B,Z="slickgrid_"+Math.round(1e6*Math.random()),L=this,ae,_e,J=[],U=[],F,de,qe,Ie,xe,Oe,De,ne,pe,Ve,Ye,ze,ce,Ce,be,He,ot,Ue,St=[],ct,k,ee,ge,$,X,re,Pe,Fe,me,We,mt,Ge,Le=0,jt=0,It=0,bi=0,q,W=!1,ve=0,ke=-1,at=0,st=0,ht=0,Dt=0,Lt=0,Ot=0,zt=1,Kt,Fi,Mi,z,Q,he=null,Ee=null,lt,vt,it={},wt=0,Ht=0,Et=0,gt=0,ei=0,Ai=0,zi=0,Zt=0,Ni,Bn=[],fn=[],Ct={},Se={},Xe=[],xt=[],ti=[],Ui=!1,Gi=!1,Li=Hf(Qi,50),pn=null,Wn=null,qt=null,Wi={},lr=null,bo=null,er=[],tr=0,Co=0,mr=0,ar,Sr,$n,Vn,di,zn,to,yo,mn,ir,vr,gr,se,ue,ye,$e,Je,dt,At,Bt,ui,Ci,Ei,yn,Yn,jn,Xn,io,_r,Eo,Hi,Oi,Br,Cs,So,qs={position:"absolute",visibility:"hidden",display:"block"},ys,ia=[],Jo=!1,Es=!1,ki=null,vi=[],wo=[],xo,Ss;function xl(){if(typeof n=="string"?B=document.querySelector(n):B=n,!B)throw new Error("SlickGrid requires a valid container, "+n+" does not exist in the DOM.");if(t=t||Qs(),s=E.extend(!0,{},l,s),ec(),u.width=s.defaultColumnWidth,s.suppressCssChangesOnHiddenInit||es(),Il(),s.enableColumnReorder&&!Sortable)throw new Error("SlickGrid requires Sortable.js module to be loaded");vt={commitCurrentEdit:Ld,cancelCurrentEdit:Mc},E.emptyElement(B),B.style.overflow="hidden",B.style.outline=0,B.classList.add(Z),B.classList.add("ui-widget");const y=window.getComputedStyle(B);/relative|absolute|fixed/.test(y.position)||(B.style.position="relative"),ae=E.createDomElement("div",{tabIndex:0,style:{position:"fixed",width:"0px",height:"0px",top:"0px",left:"0px",outline:"0px"}},B),ar=E.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-left",tabIndex:0},B),Sr=E.createDomElement("div",{className:"slick-pane slick-pane-header slick-pane-right",tabIndex:0},B),$n=E.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-left",tabIndex:0},B),Vn=E.createDomElement("div",{className:"slick-pane slick-pane-top slick-pane-right",tabIndex:0},B),di=E.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-left",tabIndex:0},B),zn=E.createDomElement("div",{className:"slick-pane slick-pane-bottom slick-pane-right",tabIndex:0},B),s.createPreHeaderPanel&&(Ve=E.createDomElement("div",{className:"slick-preheader-panel ui-state-default",style:{overflow:"hidden",position:"relative"}},ar),Ve.appendChild(document.createElement("div")),pe=E.createDomElement("div",null,Ve),Ye=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},Ve),ce=E.createDomElement("div",{className:"slick-preheader-panel ui-state-default",style:{overflow:"hidden",position:"relative"}},Sr),ze=E.createDomElement("div",null,ce),E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},ce),s.showPreHeaderPanel||(A(Ve),A(ce))),to=E.createDomElement("div",{className:"slick-header ui-state-default slick-header-left"},ar),yo=E.createDomElement("div",{className:"slick-header ui-state-default slick-header-right"},Sr),J.push(to),J.push(yo),mn=E.createDomElement("div",{className:"slick-header-columns slick-header-columns-left",style:{left:"-1000px"}},to),ir=E.createDomElement("div",{className:"slick-header-columns slick-header-columns-right",style:{left:"-1000px"}},yo),U=[mn,ir],vr=E.createDomElement("div",{className:"slick-headerrow ui-state-default"},$n),gr=E.createDomElement("div",{className:"slick-headerrow ui-state-default"},Vn),de=[vr,gr],qe=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},vr),Ie=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},gr),ye=E.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-left"},vr),$e=E.createDomElement("div",{className:"slick-headerrow-columns slick-headerrow-columns-right"},gr),F=[ye,$e],At=E.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default"},$n),Bt=E.createDomElement("div",{className:"slick-top-panel-scroller ui-state-default"},Vn),Ce=[At,Bt],ui=E.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},At),Ci=E.createDomElement("div",{className:"slick-top-panel",style:{width:"10000px"}},Bt),be=[ui,Ci],s.showColumnHeader||J.forEach(function(T){A(T)}),s.showTopPanel||Ce.forEach(function(T){A(T)}),s.showHeaderRow||de.forEach(function(T){A(T)}),Ei=E.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-left",tabIndex:0},$n),yn=E.createDomElement("div",{className:"slick-viewport slick-viewport-top slick-viewport-right",tabIndex:0},Vn),Yn=E.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-left",tabIndex:0},di),jn=E.createDomElement("div",{className:"slick-viewport slick-viewport-bottom slick-viewport-right",tabIndex:0},zn),He=[Ei,yn,Yn,jn],s.viewportClass&&He.forEach(function(T){T.classList.add(...s.viewportClass.split(" "))}),Fi=Ei,Xn=E.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-left",tabIndex:0},Ei),io=E.createDomElement("div",{className:"grid-canvas grid-canvas-top grid-canvas-right",tabIndex:0},yn),_r=E.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-left",tabIndex:0},Yn),Eo=E.createDomElement("div",{className:"grid-canvas grid-canvas-bottom grid-canvas-right",tabIndex:0},jn),ot=[Xn,io,_r,Eo],a=a||To(),Kt=Xn,Ye&&E.width(Ye,Kn()+a.width),U.forEach(function(T){E.width(T,rn())}),E.width(qe,Kn()+a.width),E.width(Ie,Kn()+a.width),s.createFooterRow&&(ue=E.createDomElement("div",{className:"slick-footerrow ui-state-default"},Vn),se=E.createDomElement("div",{className:"slick-footerrow ui-state-default"},$n),Oe=[se,ue],De=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},se),E.width(De,Kn()+a.width),ne=E.createDomElement("div",{style:{display:"block",height:"1px",position:"absolute",top:"0px",left:"0px"}},ue),E.width(ne,Kn()+a.width),Je=E.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-left"},se),dt=E.createDomElement("div",{className:"slick-footerrow-columns slick-footerrow-columns-right"},ue),xe=[Je,dt],s.showFooterRow||Oe.forEach(function(T){A(T)})),_e=ae.cloneNode(!0),B.appendChild(_e),s.explicitInitialization||Ks()}function Ks(){M||(M=!0,ol(),rl(),wf(),Ft(U),s.enableTextSelectionOnCells||He.forEach(function(y){P.bind(y,"selectstart.ui",function(T){T.target instanceof HTMLInputElement||T.target instanceof HTMLTextAreaElement})}),pd(),ju(),Xu(),md(),ss(),Vt(),Ke(),Mt(),qu(),Or(),Os(),P.bind(B,"resize.slickgrid",Or),He.forEach(function(y){P.bind(y,"scroll",Ar)}),s.enableMouseWheelScrollHandler&&He.forEach(function(y){vi.push(Slick.MouseWheel({element:y,onMouseWheel:fc}))}),J.forEach(function(y){P.bind(y,"contextmenu",gc),P.bind(y,"click",_c)}),de.forEach(function(y){P.bind(y,"scroll",fi)}),s.createFooterRow&&(xe.forEach(function(y){P.bind(y,"contextmenu",bc),P.bind(y,"click",wd)}),Oe.forEach(function(y){P.bind(y,"scroll",lc)})),s.createPreHeaderPanel&&P.bind(Ve,"scroll",ac),P.bind(ae,"keydown",ll),P.bind(_e,"keydown",ll),ot.forEach(function(y){P.bind(y,"keydown",ll),P.bind(y,"click",pc),P.bind(y,"dblclick",mc),P.bind(y,"contextmenu",ds),P.bind(y,"mouseover",xd),P.bind(y,"mouseout",Cc)}),Slick.Draggable&&(ki=Slick.Draggable({containerElement:B,allowDragFrom:"div.slick-cell",allowDragFromClosest:"div.slick-cell",onDragInit:Uo,onDragStart:Uf,onDrag:Gf,onDragEnd:Wf})),s.suppressCssChangesOnHiddenInit||ws())}function es(){ys=E.parents(B,":hidden");for(const T of ys){var y={};for(const I in qs)y[I]=T.style[I],T.style[I]=qs[I];ia.push(y)}}function ws(){let y=0;for(const I of ys){var T=ia[y++];for(const V in qs)I.style[V]=T[V]}}function kt(){return s.frozenColumn>-1}function qi(y){fn.unshift(y),y.init(L)}function wr(y){for(var T=fn.length;T>=0;T--)if(fn[T]===y){fn[T].destroy&&fn[T].destroy(),fn.splice(T,1);break}}function Ho(y){for(var T=fn.length-1;T>=0;T--)if(fn[T].pluginName===y)return fn[T]}function Tl(y){Ni&&(Ni.onSelectedRangesChanged.unsubscribe(Tr),Ni.destroy&&Ni.destroy()),Ni=y,Ni&&(Ni.init(L),Ni.onSelectedRangesChanged.subscribe(Tr))}function no(){return Ni}function qn(y,T){return nn(xr(),y,T)}function Zs(y){return y===void 0||(y instanceof Slick.EventData&&(y=y.getNativeEvent()),Kt=y.target.closest(".grid-canvas")),Kt}function xr(){return ot}function Ol(y,T){return nn(xs(),y,T)}function xs(){return He}function Al(y){return Ts(y),Fi}function Ts(y){return y instanceof Slick.EventData&&(y=y.getNativeEvent()),Fi=y.target.closest(".slick-viewport"),Fi}function nn(y,T,I){if(y){T||(T=0),I||(I=0);var V=typeof T=="number"?T:_t(T),Y=W&&I>=ke+(s.frozenBottom?0:1),j=kt()&&V>s.frozenColumn;return y[(Y?2:0)+(j?1:0)]}}function To(){var y=E.createDomElement("div",{className:He.className,style:{position:"absolute",top:"-10000px",left:"-10000px",overflow:"auto",width:"100px",height:"100px"}},document.body),T=E.createDomElement("div",{style:{width:"200px",height:"200px",overflow:"auto"}},y),I={width:y.offsetWidth-y.clientWidth,height:y.offsetHeight-y.clientHeight};return T.remove(),y.remove(),I}function rn(){Fe=me=We=0;for(var y=!s.autoHeight,T=0,I=o.length;T<I;T++)if(!(!o[T]||o[T].hidden)){var V=o[T].width;s.frozenColumn>-1&&T>s.frozenColumn?We+=V:me+=V}return y&&(s.frozenColumn>-1&&T>s.frozenColumn?We+=a.width:me+=a.width),kt()?(me=me+1e3,We=Math.max(We,$)+me,We+=a.width):(me+=a.width,me=Math.max(me,$)+1e3),Fe=me+We,Math.max(Fe,$)+1e3}function Kn(){var y=Ge?$-a.width:$,T=o.length;for(re=Pe=0;T--;)!o[T]||o[T].hidden||(kt()&&T>s.frozenColumn?Pe+=o[T].width:re+=o[T].width);var I=re+Pe;if(s.fullWidthRows){var V=Math.max(I,y)-I;V>0&&(I+=V,kt()?Pe+=V:re+=V)}return I}function Oo(y){var T=X,I=re,V=Pe,Y;if(X=Kn(),Y=X!==T||re!==I||Pe!==V,Y||kt()||W)if(E.width(Xn,re),rn(),E.width(mn,me),E.width(ir,We),kt()){const j=E.width(B)||0;if(j>0&&re>j&&s.throwWhenFrozenNotAllViewable)throw new Error("[SlickGrid] Frozen columns cannot be wider than the actual grid container width. Make sure to have less columns freezed or make your grid container wider");E.width(io,Pe),E.width(ar,re),E.setStyleSize(Sr,"left",re),E.setStyleSize(Sr,"width",$-re),E.width($n,re),E.setStyleSize(Vn,"left",re),E.width(Vn,$-re),E.width(vr,re),E.width(gr,$-re),E.width(ye,re),E.width($e,Pe),s.createFooterRow&&(E.width(se,re),E.width(ue,$-re),E.width(Je,re),E.width(dt,Pe)),s.createPreHeaderPanel&&E.width(pe,X),E.width(Ei,re),E.width(yn,$-re),W&&(E.width(di,re),E.setStyleSize(zn,"left",re),E.width(Yn,re),E.width(jn,$-re),E.width(_r,re),E.width(Eo,Pe))}else E.width(ar,"100%"),E.width($n,"100%"),E.width(vr,"100%"),E.width(ye,X),s.createFooterRow&&(E.width(se,"100%"),E.width(Je,X)),s.createPreHeaderPanel&&E.width(pe,X),E.width(Ei,"100%"),W&&(E.width(Yn,"100%"),E.width(_r,re));mt=X>=$-a.width,E.width(qe,X+(Ge?a.width:0)),E.width(Ie,X+(Ge?a.width:0)),s.createFooterRow&&(E.width(De,X+(Ge?a.width:0)),E.width(ne,X+(Ge?a.width:0))),(Y||y)&&Si()}function Ft(y){y.forEach(function(T){T.setAttribute("unselectable","on"),T.style.MozUserSelect="none",P.bind(T,"selectstart.ui",function(){return!1})})}function Qs(){let y=1e6;const T=navigator.userAgent.toLowerCase().match(/firefox/)?s.ffMaxSupportedCssHeight:s.maxSupportedCssHeight,I=E.createDomElement("div",{style:{display:"hidden"}},document.body);for(;;){const V=y*2;E.height(I,V);const Y=E.height(I);if(V>T||Y!==V)break;y=V}return I.remove(),y}function Js(){return Z}function $i(){return Le}function Un(){return a}function Ao(){return{width:Ge?a.width:0,height:mt?a.height:0}}function fd(){return q}function Os(){for(var y=W&&!s.frozenBottom?_r:Xn;(y=y.parentNode)!=document.body&&y!=null;)(y==Ei||y.scrollWidth!=y.clientWidth||y.scrollHeight!=y.clientHeight)&&(St.push(y),P.bind(y,"scroll."+Z,Ea))}function ts(){St.forEach(function(y){P.unbindByEventName(y,"scroll."+Z)}),St=[]}function el(y,T,I){if(M){var V=_t(y);if(V!=null){var Y=o[V],j=Bi(V);j&&(T!==void 0&&(o[V].name=T),I!==void 0&&(o[V].toolTip=I),oe(L.onBeforeHeaderCellDestroy,{node:j,column:Y,grid:L}),j.setAttribute("title",I||""),T!==void 0&&(j.children[0].innerHTML=$o(T)),oe(L.onHeaderCellRendered,{node:j,column:Y,grid:L}))}}}function hi(y){if(!y)return kt()?U:mn;var T=_t(y.id);return kt()?T<=s.frozenColumn?mn:ir:mn}function g(y){var T=typeof y=="number"?y:_t(y),I=kt()?T<=s.frozenColumn?mn:ir:mn,V=kt()?T<=s.frozenColumn?T:T-s.frozenColumn-1:T;return I.children[V]}function w(){return kt()?F:F[0]}function R(){return kt()?xe:xe[0]}function H(){return pe}function te(){return ze}function we(y){var T=typeof y=="number"?y:_t(y),I;return kt()?T<=s.frozenColumn?I=ye:(I=$e,T-=s.frozenColumn+1):I=ye,I.children[T]}function Be(y){var T=typeof y=="number"?y:_t(y),I;return kt()?T<=s.frozenColumn?I=Je:(I=dt,T-=s.frozenColumn+1):I=Je,I.children[T]}function Ke(){if(s.createFooterRow){xe.forEach(function(I){I.querySelectorAll(".slick-footerrow-column").forEach(function(Y){const j=E.storage.get(Y,"column");oe(L.onBeforeFooterRowCellDestroy,{node:Y,column:j,grid:L})})}),E.emptyElement(Je),E.emptyElement(dt);for(var y=0;y<o.length;y++){var T=o[y];if(!T||T.hidden)continue;const I=E.createDomElement("div",{className:`ui-state-default slick-footerrow-column l${y} r${y}`},kt()&&y>s.frozenColumn?dt:Je),V=kt()&&y<=s.frozenColumn?"frozen":null;V&&I.classList.add(V),E.storage.put(I,"column",T),oe(L.onFooterRowCellRendered,{node:I,column:T,grid:L})}}}function yt(y){y.target.classList.add("ui-state-hover")}function ft(y){y.target.classList.remove("ui-state-hover")}function Vt(){U.forEach(function(I){I.querySelectorAll(".slick-header-column").forEach(function(Y){var j=E.storage.get(Y,"column");j&&oe(L.onBeforeHeaderCellDestroy,{node:Y,column:j,grid:L})})}),E.emptyElement(mn),E.emptyElement(ir),rn(),E.width(mn,me),E.width(ir,We),F.forEach(function(I){I.querySelectorAll(".slick-headerrow-column").forEach(function(Y){const j=E.storage.get(Y,"column");j&&oe(L.onBeforeHeaderRowCellDestroy,{node:this,column:j,grid:L})})}),E.emptyElement(ye),E.emptyElement($e),s.createFooterRow&&(Je.querySelectorAll(".slick-footerrow-column").forEach(function(V){var Y=E.storage.get(V,"column");Y&&oe(L.onBeforeFooterRowCellDestroy,{node:this,column:Y,grid:L})}),E.emptyElement(Je),kt()&&(dt.querySelectorAll(".slick-footerrow-column").forEach(function(Y){var j=E.storage.get(Y,"column");j&&oe(L.onBeforeFooterRowCellDestroy,{node:this,column:j,grid:L})}),E.emptyElement(dt)));for(var y=0;y<o.length;y++){const I=o[y];if(!I||I.hidden)continue;const V=kt()?y<=s.frozenColumn?mn:ir:mn,Y=kt()?y<=s.frozenColumn?ye:$e:ye,j=E.createDomElement("div",{id:`${Z+I.id}`,dataset:{id:I.id},className:"ui-state-default slick-header-column",title:I.toolTip||""},V),Te=E.createDomElement("span",{className:"slick-column-name"},j);Te.innerHTML=$o(I.name),E.width(j,I.width-Le);let tt=I.headerCssClass||null;if(tt&&j.classList.add(...tt.split(" ")),tt=kt()&&y<=s.frozenColumn?"frozen":null,tt&&j.classList.add(tt),P.bind(j,"mouseenter",vc),P.bind(j,"mouseleave",Vr),E.storage.put(j,"column",I),(s.enableColumnReorder||I.sortable)&&(P.bind(j,"mouseenter",yt),P.bind(j,"mouseleave",ft)),I.hasOwnProperty("headerCellAttrs")&&I.headerCellAttrs instanceof Object)for(var T in I.headerCellAttrs)I.headerCellAttrs.hasOwnProperty(T)&&j.setAttribute(T,I.headerCellAttrs[T]);if(I.sortable&&(j.classList.add("slick-header-sortable"),E.createDomElement("div",{className:`slick-sort-indicator ${s.numberedMultiColumnSort&&!s.sortColNumberInSeparateSpan?" slick-sort-indicator-numbered":""}`},j),s.numberedMultiColumnSort&&s.sortColNumberInSeparateSpan&&E.createDomElement("div",{className:"slick-sort-indicator-numbered"},j)),oe(L.onHeaderCellRendered,{node:j,column:I,grid:L}),s.showHeaderRow){const rt=E.createDomElement("div",{className:`ui-state-default slick-headerrow-column l${y} r${y}`},Y),ut=kt()&&y<=s.frozenColumn?"frozen":null;ut&&rt.classList.add(ut),P.bind(rt,"mouseenter",$f),P.bind(rt,"mouseleave",Yf),E.storage.put(rt,"column",I),oe(L.onHeaderRowCellRendered,{node:rt,column:I,grid:L})}if(s.createFooterRow&&s.showFooterRow){const rt=kt()?y<=s.frozenColumn?xe[0]:xe[1]:xe[0],ut=E.createDomElement("div",{className:`ui-state-default slick-footerrow-column l${y} r${y}`},rt);E.storage.put(ut,"column",I),oe(L.onFooterRowCellRendered,{node:ut,column:I,grid:L})}}il(Xe),As(),s.enableColumnReorder&&(typeof s.enableColumnReorder=="function"?s.enableColumnReorder(L,U,Le,Ds,As,o,_t,Z,oe):Ki())}function Mt(){U.forEach(function(y){P.bind(y,"click",function(T){if(!Es&&!T.target.classList.contains("slick-resizable-handle")){var I=T.target.closest(".slick-header-column");if(I){var V=E.storage.get(I,"column");if(V.sortable){if(!Ne().commitCurrentEdit())return;for(var Y=Xe.slice(),j=null,Te=0;Te<Xe.length;Te++)if(Xe[Te].columnId==V.id){j=Xe[Te],j.sortAsc=!j.sortAsc;break}var tt=!!j;s.tristateMultiColumnSort?(j||(j={columnId:V.id,sortAsc:V.defaultSortAsc}),tt&&j.sortAsc&&(Xe.splice(Te,1),j=null),s.multiColumnSort||(Xe=[]),j&&(!tt||!s.multiColumnSort)&&Xe.push(j)):T.metaKey&&s.multiColumnSort?j&&Xe.splice(Te,1):((!T.shiftKey&&!T.metaKey||!s.multiColumnSort)&&(Xe=[]),j?Xe.length===0&&Xe.push(j):(j={columnId:V.id,sortAsc:V.defaultSortAsc},Xe.push(j)));var rt;s.multiColumnSort?rt={multiColumnSort:!0,previousSortColumns:Y,sortCols:Xe.map(function(ut){return{columnId:o[_t(ut.columnId)].id,sortCol:o[_t(ut.columnId)],sortAsc:ut.sortAsc}})}:rt={multiColumnSort:!1,previousSortColumns:Y,columnId:Xe.length>0?V.id:null,sortCol:Xe.length>0?V:null,sortAsc:Xe.length>0?Xe[0].sortAsc:!0},oe(L.onBeforeSort,rt,T).getReturnValue()!==!1&&(il(Xe),oe(L.onSort,rt,T))}}}})})}function Ki(){xo&&(xo.destroy(),Ss.destroy());var y=null;function T(){Hi.scrollLeft=Hi.scrollLeft+10}function I(){Hi.scrollLeft=Hi.scrollLeft-10}var V,Y={animation:50,direction:"horizontal",chosenClass:"slick-header-column-active",ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dragoverBubble:!1,revertClone:!0,scroll:!kt(),onStart:function(j){V=!kt()||E.offset(j.item).left>E.offset(Hi).left,V&&j.originalEvent.pageX>B.clientWidth?y||(y=setInterval(T,100)):V&&j.originalEvent.pageX<E.offset(Hi).left?y||(y=setInterval(I,100)):(clearInterval(y),y=null)},onEnd:function(j){clearInterval(y),y=null;var Te=null;if(Ne().commitCurrentEdit()){var tt=xo.toArray();tt=tt.concat(Ss.toArray());for(var rt=[],ut=0;ut<tt.length;ut++)rt.push(o[_t(tt[ut])]);Ds(rt),oe(L.onColumnsReordered,{impactedColumns:Zi(Te)}),j.stopPropagation(),As()}}};xo=Sortable.create(mn,Y),Ss=Sortable.create(ir,Y)}function ln(){const y=Array.from(U[0].children),T=Array.from(U[1].children);return y.concat(T)}function Zi(y){var T=[];if(y)for(var I=y.start;I<=y.end;I++)T.push(o[I]);else T=o;return T}function is(y){const T=y.target.parentElement.id.replace(Z,"");oe(L.onColumnsResizeDblClick,{triggeredByColumn:T})}function As(){if(typeof Slick.Resizable>"u")throw new Error('Slick.Resizable is undefined, make sure to import "slick.interactions.js"');var y,T,I,V,Y,j,Te,tt,rt=0;const ut=ln();for(let pt=0;pt<ut.length;pt++)ut[pt].querySelectorAll(".slick-resizable-handle").forEach(function(Qt){Qt.remove()}),!(pt>=o.length||!o[pt]||o[pt].hidden)&&o[pt].resizable&&(Te===void 0&&(Te=pt),tt=pt);if(Te!==void 0)for(let pt=0;pt<ut.length;pt++){const nt=ut[pt];if(pt>=o.length||!o[pt]||o[pt].hidden||pt<Te||s.forceFitColumns&&pt>=tt)continue;const pi=E.createDomElement("div",{className:"slick-resizable-handle",role:"separator",ariaOrientation:"horizontal"},nt);P.bind(pi,"dblclick",is),wo.push(Slick.Resizable({resizeableElement:nt,resizeableHandleElement:pi,onResizeStart:function(Qt,yi){var Yi=Qt.touches?Qt.touches[0]:Qt;if(!Ne().commitCurrentEdit())return!1;V=Yi.pageX,rt=0,yi.resizeableElement.classList.add("slick-header-column-active");var Pi=null,En=null;for(let gn=0;gn<ut.length;gn++)gn>=o.length||!o[gn]||o[gn].hidden||(o[gn].previousWidth=ut[gn].offsetWidth);if(s.forceFitColumns)for(Pi=0,En=0,y=pt+1;y<o.length;y++)I=o[y],I&&I.resizable&&!I.hidden&&(En!==null&&(I.maxWidth?En+=I.maxWidth-I.previousWidth:En=null),Pi+=I.previousWidth-Math.max(I.minWidth||0,q));var si=0,Rn=0;for(y=0;y<=pt;y++)I=o[y],I&&I.resizable&&!I.hidden&&(Rn!==null&&(I.maxWidth?Rn+=I.maxWidth-I.previousWidth:Rn=null),si+=I.previousWidth-Math.max(I.minWidth||0,q));Pi===null&&(Pi=1e5),si===null&&(si=1e5),En===null&&(En=1e5),Rn===null&&(Rn=1e5),j=V+Math.min(Pi,Rn),Y=V-Math.min(si,En)},onResize:function(Qt,yi){var Yi=Qt.touches?Qt.touches[0]:Qt;Es=!0;var Pi,En=Math.min(j,Math.max(Y,Yi.pageX))-V,si,Rn=0,gn=0,Nc=Ge?$-a.width:$;if(En<0){for(si=En,y=pt;y>=0;y--)I=o[y],I&&I.resizable&&!I.hidden&&(Pi=Math.max(I.minWidth||0,q),si&&I.previousWidth+si<Pi?(si+=I.previousWidth-Pi,I.width=Pi):(I.width=I.previousWidth+si,si=0));for(T=0;T<=pt;T++)I=o[T],!(!I||I.hidden)&&(kt()&&T>s.frozenColumn?gn+=I.width:Rn+=I.width);if(s.forceFitColumns)for(si=-En,y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&I.resizable&&(si&&I.maxWidth&&I.maxWidth-I.previousWidth<si?(si-=I.maxWidth-I.previousWidth,I.width=I.maxWidth):(I.width=I.previousWidth+si,si=0),kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width);else for(y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&(kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width);if(s.forceFitColumns)for(si=-En,y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&I.resizable&&(si&&I.maxWidth&&I.maxWidth-I.previousWidth<si?(si-=I.maxWidth-I.previousWidth,I.width=I.maxWidth):(I.width=I.previousWidth+si,si=0))}else{for(si=En,Rn=0,gn=0,y=pt;y>=0;y--)if(I=o[y],!(!I||I.hidden)&&I.resizable)if(si&&I.maxWidth&&I.maxWidth-I.previousWidth<si)si-=I.maxWidth-I.previousWidth,I.width=I.maxWidth;else{var lo=I.previousWidth+si,zd=re+si;kt()&&y<=s.frozenColumn?(lo>rt&&zd<Nc-s.frozenRightViewportMinWidth&&(rt=lo),I.width=zd+s.frozenRightViewportMinWidth>Nc?rt:lo):I.width=lo,si=0}for(T=0;T<=pt;T++)I=o[T],!(!I||I.hidden)&&(kt()&&T>s.frozenColumn?gn+=I.width:Rn+=I.width);if(s.forceFitColumns)for(si=-En,y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&I.resizable&&(Pi=Math.max(I.minWidth||0,q),si&&I.previousWidth+si<Pi?(si+=I.previousWidth-Pi,I.width=Pi):(I.width=I.previousWidth+si,si=0),kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width);else for(y=pt+1;y<o.length;y++)I=o[y],!(!I||I.hidden)&&(kt()&&y>s.frozenColumn?gn+=I.width:Rn+=I.width)}kt()&&Rn!=re&&(E.width(mn,Rn+1e3),E.setStyleSize(Sr,"left",Rn)),Xt(),s.syncColumnCellResize&&Si(),oe(L.onColumnsDrag,{triggeredByColumn:yi.resizeableElement,resizeHandle:yi.resizeableHandleElement})},onResizeEnd:function(Qt,yi){yi.resizeableElement.classList.remove("slick-header-column-active");var Yi=yi.resizeableElement.id.replace(Z,"");oe(L.onBeforeColumnsResize,{triggeredByColumn:Yi}).getReturnValue()===!0&&Xt();var Pi;for(y=0;y<o.length;y++)I=o[y],!(!I||I.hidden)&&(Pi=ut[y].offsetWidth,I.previousWidth!==Pi&&I.rerenderOnResize&&vn());Oo(!0),Qi(),oe(L.onColumnsResized,{triggeredByColumn:Yi}),setTimeout(function(){Es=!1},300)}}))}}function ns(y){var T=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],I=getComputedStyle(y),V=0;return T.forEach(function(Y){V+=E.toFloat(I[Y])}),V}function pd(){if(s.frozenColumn=s.frozenColumn>=0&&s.frozenColumn<o.length?parseInt(s.frozenColumn):-1,s.frozenRow>-1){W=!0,ve=s.frozenRow*s.rowHeight;var y=Ri();ke=s.frozenBottom?y-s.frozenRow:s.frozenRow}else W=!1}function ju(){kt()?(D(Sr),D(Vn),W?(D(di),D(zn)):(A(zn),A(di))):(A(Sr),A(Vn),A(zn),W?D(di):(A(zn),A(di)))}function md(){Ei.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"hidden":"scroll":W&&!s.alwaysAllowHorizontalScroll?"hidden":"auto",Ei.style["overflow-y"]=!kt()&&s.alwaysShowVerticalScroll?"scroll":kt()?"hidden":W?"scroll":"auto",yn.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"hidden":"scroll":W&&!s.alwaysAllowHorizontalScroll?"hidden":"auto",yn.style["overflow-y"]=s.alwaysShowVerticalScroll?"scroll":(kt(),W?"scroll":"auto"),Yn.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"scroll":"auto":(W&&!s.alwaysAllowHorizontalScroll,"auto"),Yn.style["overflow-y"]=!kt()&&s.alwaysShowVerticalScroll?"scroll":kt()?"hidden":W?"scroll":"auto",jn.style["overflow-x"]=kt()?W&&!s.alwaysAllowHorizontalScroll?"scroll":"auto":(W&&!s.alwaysAllowHorizontalScroll,"auto"),jn.style["overflow-y"]=s.alwaysShowVerticalScroll?"scroll":(kt(),"auto"),s.viewportClass&&(Ei.classList.add(...s.viewportClass.split(" ")),yn.classList.add(...s.viewportClass.split(" ")),Yn.classList.add(...s.viewportClass.split(" ")),jn.classList.add(...s.viewportClass.split(" ")))}function Xu(){kt()?(Br=yo,Cs=gr,So=ue,W?s.frozenBottom?(Hi=jn,Oi=yn):Hi=Oi=jn:Hi=Oi=yn):(Br=to,Cs=vr,So=se,W?s.frozenBottom?(Hi=Yn,Oi=Ei):Hi=Oi=Yn:Hi=Oi=Ei)}function wf(){const y=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],T=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],I=U[0];Le=jt=0,It=bi=0;let V=E.createDomElement("div",{className:"ui-state-default slick-header-column",style:{visibility:"hidden"},textContent:"-"},I),Y=getComputedStyle(V);Y["box-sizing"]!="border-box"&&Y["-moz-box-sizing"]!="border-box"&&Y["-webkit-box-sizing"]!="border-box"&&(y.forEach(function(Te){Le+=E.toFloat(Y[Te])}),T.forEach(function(Te){jt+=E.toFloat(Y[Te])})),V.remove();const j=E.createDomElement("div",{className:"slick-row"},ot[0]);V=E.createDomElement("div",{className:"slick-cell",id:"",style:{visibility:"hidden",textContent:"-"}},j),Y=getComputedStyle(V),Y["box-sizing"]!="border-box"&&Y["-moz-box-sizing"]!="border-box"&&Y["-webkit-box-sizing"]!="border-box"&&(y.forEach(function(Te){It+=E.toFloat(Y[Te])}),T.forEach(function(Te){bi+=E.toFloat(Y[Te])})),j.remove(),q=Math.max(Le,It)}function qu(){Ue=document.createElement("style"),Ue.nonce=s.nonce||"",(s.shadowRoot||document.head).appendChild(Ue);const y=s.rowHeight-bi,T=[`.${Z} .slick-group-header-column { left: 1000px; }`,`.${Z} .slick-header-column { left: 1000px; }`,`.${Z} .slick-top-panel { height: ${s.topPanelHeight}px; }`,`.${Z} .slick-preheader-panel { height: ${s.preHeaderPanelHeight}px; }`,`.${Z} .slick-headerrow-columns { height: ${s.headerRowHeight}px; }`,`.${Z} .slick-footerrow-columns { height: ${s.footerRowHeight}px; }`,`.${Z} .slick-cell { height: ${y}px; }`,`.${Z} .slick-row { height: ${s.rowHeight}px; }`],I=Ue.sheet;if(I){for(let V of T)I.insertRule(V);for(let V=0;V<o.length;V++)!o[V]||o[V].hidden||(I.insertRule(`.${Z} .l${V} { }`),I.insertRule(`.${Z} .r${V} { }`))}else tl(T)}function tl(y){const T=document.createElement("template");T.innerHTML='<style type="text/css" rel="stylesheet" />',Ue=T.content.firstChild,(s.shadowRoot||document.head).appendChild(Ue);for(let I=0;I<o.length;I++)!o[I]||o[I].hidden||(y.push(`.${Z} .l${I} { }`),y.push(`.${Z} .r${I} { }`));Ue.styleSheet?Ue.styleSheet.cssText=y.join(" "):Ue.appendChild(document.createTextNode(y.join(" ")))}function xf(y){var T;if(!ct){var I=(s.shadowRoot||document).styleSheets;for(T=0;T<I.length;T++)if((I[T].ownerNode||I[T].owningElement)==Ue){ct=I[T];break}if(!ct)throw new Error("SlickGrid Cannot find stylesheet.");k=[],ee=[];var V=ct.cssRules||ct.rules,Y,j;for(T=0;T<V.length;T++){var Te=V[T].selectorText;(Y=/\.l\d+/.exec(Te))?(j=parseInt(Y[0].substr(2,Y[0].length-2),10),k[j]=V[T]):(Y=/\.r\d+/.exec(Te))&&(j=parseInt(Y[0].substr(2,Y[0].length-2),10),ee[j]=V[T])}}return{left:k[y],right:ee[y]}}function Ku(){Ue&&Ue.remove(),ct=null}function vd(y){P.unbindAll(),ki=kl(ki),vi=kl(vi),wo=kl(wo),Ne().cancelCurrentEdit(),oe(L.onBeforeDestroy,{});for(var T=fn.length;T--;)wr(fn[T]);s.enableColumnReorder&&xo&&typeof xo.destroy=="function"&&(xo.destroy(),Ss.destroy()),ts(),P.unbindByEventName(B,"resize.slickgrid",Or),Ku(),ot.forEach(function(Y){P.unbindByEventName(Y,"keydown",ll),P.unbindByEventName(Y,"click",pc),P.unbindByEventName(Y,"dblclick",mc),P.unbindByEventName(Y,"contextmenu",ds),P.unbindByEventName(Y,"mouseover",xd),P.unbindByEventName(Y,"mouseout",Cc)}),He.forEach(function(Y){P.unbindByEventName(Y,"scroll",Ar)}),J.forEach(function(Y){P.unbindByEventName(Y,"contextmenu",gc),P.unbindByEventName(Y,"click",_c)}),de.forEach(function(Y){P.unbindByEventName(Y,"scroll",fi)}),xe&&xe.forEach(function(Y){P.unbindByEventName(Y,"contextmenu",bc),P.unbindByEventName(Y,"click",wd)}),Oe&&Oe.forEach(function(Y){P.unbindByEventName(Y,"scroll",lc)}),Ve&&P.unbindByEventName(Ve,"scroll",ac),P.unbindByEventName(ae,"keydown",ll),P.unbindByEventName(_e,"keydown",ll);const I=B.querySelectorAll(".slick-resizable-handle");[].forEach.call(I,function(Y){P.unbindByEventName(Y,"dblclick",is)});const V=B.querySelectorAll(".slick-header-column");[].forEach.call(V,function(Y){P.unbindByEventName(Y,"mouseenter",vc),P.unbindByEventName(Y,"mouseleave",Vr),P.unbindByEventName(Y,"mouseenter",yt),P.unbindByEventName(Y,"mouseleave",ft)}),E.emptyElement(B),B.classList.remove(Z),y&&rs()}function kl(y){if(y){const T=Array.isArray(y)?y:[y];let I;for(;(I=T.pop())!=null;)I&&typeof I.destroy=="function"&&I.destroy()}return y=Array.isArray(y)?[]:null,y}function rs(){Kt=null,Fi=null,St=null,ot=null,Xn=null,io=null,_r=null,Eo=null,B=null,ae=null,_e=null,mn=null,ir=null,U=null,F=null,ye=null,$e=null,qe=null,Ie=null,Cs=null,de=null,vr=null,gr=null,Br=null,J=null,to=null,yo=null,ys=null,xe=null,Je=null,dt=null,De=null,ne=null,Oe=null,se=null,ue=null,So=null,pe=null,ze=null,Ve=null,ce=null,Ye=null,be=null,Ce=null,Ue=null,At=null,Bt=null,ui=null,Ci=null,ar=null,Sr=null,$n=null,Vn=null,di=null,zn=null,He=null,Ei=null,yn=null,Yn=null,jn=null,Hi=null,Oi=null}var ks=null,na=null;function Tf(y,T){var I=null,V=-1;if(typeof y=="number")I=o[y],V=y;else if(typeof y=="string")for(i=0;i<o.length;i++)o[i].Id===y&&(I=o[i],V=i);if(!I)return;const Y=qn(0,0);gd(I,V,Y,T,V)}function ra(y){return!y.ignoreHeaderText&&!y.sizeToRemaining&&y.contentSizePx===y.headerWidthPx&&y.widthPx<100}function os(y,T){es(),ro(y,T),ws()}function ro(y,T){if(y=y||s.autosizeColsMode,y===Slick.GridAutosizeColsMode.LegacyForceFit||y===Slick.GridAutosizeColsMode.LegacyOff){kf();return}if(y!==Slick.GridAutosizeColsMode.None){ks=document.createElement("canvas"),ks&&ks.getContext&&(na=ks.getContext("2d"));var I=qn(0,0),V=Ge?$-a.width:$,Y,j,Te,tt,rt=0,ut=0,pt=0,nt=0,pi=0;for(Y=0;Y<o.length;Y++)j=o[Y],gd(j,Y,I,T,Y),pi+=j.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?j.width:ra(j.autoSize)?j.autoSize.widthPx:0,nt+=j.autoSize.autosizeMode===Slick.ColAutosizeMode.Locked?j.width:ra(j.autoSize)?j.autoSize.widthPx:j.minWidth,rt+=j.autoSize.widthPx,ut+=j.autoSize.sizeToRemaining?0:j.autoSize.widthPx,pt+=j.autoSize.sizeToRemaining&&j.minWidth||0;var Qt=rt-ut;if(y===Slick.GridAutosizeColsMode.FitViewportToCols){var yi=rt+a.width;y=Slick.GridAutosizeColsMode.IgnoreViewport,s.viewportMaxWidthPx&&yi>s.viewportMaxWidthPx?(yi=s.viewportMaxWidthPx,y=Slick.GridAutosizeColsMode.FitColsToViewport):s.viewportMinWidthPx&&yi<s.viewportMinWidthPx&&(yi=s.viewportMinWidthPx,y=Slick.GridAutosizeColsMode.FitColsToViewport),E.width(B,yi)}if(y===Slick.GridAutosizeColsMode.FitColsToViewport)if(Qt>0&&ut<V-pt){for(Y=0;Y<o.length;Y++)if(j=o[Y],!(!j||j.hidden)){var Yi=V-ut;j.autoSize.sizeToRemaining?Te=Yi*j.autoSize.widthPx/Qt:Te=j.autoSize.widthPx,j.rerenderOnResize&&j.width!=Te&&(tt=!0),j.width=Te}}else if(s.viewportSwitchToScrollModeWidthPercent&&ut+pt>V*s.viewportSwitchToScrollModeWidthPercent/100||nt>V)y=Slick.GridAutosizeColsMode.IgnoreViewport;else{var Pi=ut-pi,En=V-pi-pt;for(Y=0;Y<o.length;Y++)j=o[Y],!(!j||j.hidden)&&(Te=j.width,j.autoSize.autosizeMode!==Slick.ColAutosizeMode.Locked&&!ra(j.autoSize)&&(j.autoSize.sizeToRemaining?Te=j.minWidth:(Te=En/Pi*j.autoSize.widthPx-1,Te<j.minWidth&&(Te=j.minWidth),Pi-=j.autoSize.widthPx,En-=Te)),ra(j.autoSize)&&(Te=j.autoSize.widthPx,Te<j.minWidth&&(Te=j.minWidth)),j.rerenderOnResize&&j.width!=Te&&(tt=!0),j.width=Te)}if(y===Slick.GridAutosizeColsMode.IgnoreViewport)for(Y=0;Y<o.length;Y++)!o[Y]||o[Y].hidden||(Te=o[Y].autoSize.widthPx,o[Y].rerenderOnResize&&o[Y].width!=Te&&(tt=!0),o[Y].width=Te);_d(tt)}}function gd(y,T,I,V,Y){var j=y.autoSize;if(j.widthPx=y.width,j.autosizeMode===Slick.ColAutosizeMode.Locked||j.autosizeMode===Slick.ColAutosizeMode.Guide)return;var Te=Ri();const tt=new RegExp(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z/);if(j.autosizeMode===Slick.ColAutosizeMode.ContentIntelligent){var rt=j.colDataTypeOf,ut;if(Te>0){var pt=In(0);pt&&(ut=pt[y.field],tt.test(ut)&&(ut=Date.parse(ut)),rt=typeof ut,rt==="object"&&(ut instanceof Date&&(rt="date"),typeof moment<"u"&&ut instanceof moment&&(rt="moment")))}rt==="boolean"&&(j.colValueArray=[!0,!1]),rt==="number"&&(j.valueFilterMode=Slick.ValueFilterMode.GetGreatestAndSub,j.rowSelectionMode=Slick.RowSelectionMode.AllRows),rt==="string"&&(j.valueFilterMode=Slick.ValueFilterMode.GetLongestText,j.rowSelectionMode=Slick.RowSelectionMode.AllRows,j.allowAddlPercent=5),rt==="date"&&(j.colValueArray=[new Date(2009,8,30,12,20,20)]),rt==="moment"&&typeof moment<"u"&&(j.colValueArray=[moment([2009,8,30,12,20,20])])}var nt=j.contentSizePx=Of(y,T,I,V,Y);nt===0&&(nt=j.widthPx);var pi=j.allowAddlPercent?1+j.allowAddlPercent/100:1;nt=nt*pi+s.autosizeColPaddingPx,y.minWidth&&nt<y.minWidth&&(nt=y.minWidth),y.maxWidth&&nt>y.maxWidth&&(nt=y.maxWidth),(j.autosizeMode===Slick.ColAutosizeMode.ContentExpandOnly||y.editor&&y.editor.ControlFillsColumn)&&nt<y.width&&(nt=y.width),j.widthPx=nt}function Of(y,T,I,V,Y){var j=y.autoSize,Te=1,tt,rt,ut=0,pt=0;if(j.headerWidthPx=0,j.ignoreHeaderText||(j.headerWidthPx=Af(y)),j.headerWidthPx===0&&(j.headerWidthPx=y.width?y.width:y.maxWidth?y.maxWidth:y.minWidth?y.minWidth:20),j.colValueArray)return pt=Zu(y,I,j.colValueArray),Math.max(j.headerWidthPx,pt);var nt={};nt.colIndex=T,nt.rowCount=Ri(),nt.startIndex=0,nt.endIndex=nt.rowCount-1,nt.valueArr=null,nt.getRowVal=function(si){return In(si)[y.field]};var pi=(V?j.rowSelectionModeOnInit:void 0)||j.rowSelectionMode;if(pi===Slick.RowSelectionMode.FirstRow&&(nt.endIndex=0),pi===Slick.RowSelectionMode.LastRow&&(nt.endIndex=nt.startIndex=nt.rowCount-1),pi===Slick.RowSelectionMode.FirstNRows&&(nt.endIndex=Math.min(j.rowSelectionCount,nt.rowCount)-1),j.valueFilterMode===Slick.ValueFilterMode.DeDuplicate){var Qt={};for(tt=nt.startIndex;tt<=nt.endIndex;tt++)Qt[nt.getRowVal(tt)]=!0;if(Object.keys)nt.valueArr=Object.keys(Qt);else{nt.valueArr=[];for(var yi in Qt)nt.valueArr.push(yi)}nt.startIndex=0,nt.endIndex=nt.length-1}if(j.valueFilterMode===Slick.ValueFilterMode.GetGreatestAndSub){var Yi,Pi=0;for(tt=nt.startIndex;tt<=nt.endIndex;tt++)rt=nt.getRowVal(tt),Math.abs(rt)>Pi&&(Yi=rt,Pi=Math.abs(rt));Yi=""+Yi,Yi=Array(Yi.length+1).join("9"),Yi=+Yi,nt.valueArr=[Yi],nt.startIndex=nt.endIndex=0}if(j.valueFilterMode===Slick.ValueFilterMode.GetLongestTextAndSub){for(tt=nt.startIndex;tt<=nt.endIndex;tt++)rt=nt.getRowVal(tt),(rt||"").length>ut&&(ut=rt.length);rt=Array(ut+1).join("m"),Te=s.autosizeTextAvgToMWidthRatio,nt.maxLen=ut,nt.valueArr=[rt],nt.startIndex=nt.endIndex=0}if(j.valueFilterMode===Slick.ValueFilterMode.GetLongestText){ut=0;var En=0;for(tt=nt.startIndex;tt<=nt.endIndex;tt++)rt=nt.getRowVal(tt),(rt||"").length>ut&&(ut=rt.length,En=tt);rt=nt.getRowVal(En),nt.maxLen=ut,nt.valueArr=[rt],nt.startIndex=nt.endIndex=0}return nt.maxLen&&nt.maxLen>30&&Y>1&&(j.sizeToRemaining=!0),pt=Zu(y,I,nt)*Te,Math.max(j.headerWidthPx,pt)}function Zu(y,T,I){const V=E.createDomElement("div",{className:"slick-row ui-widget-content"},T),Y=E.createDomElement("div",{className:"slick-cell"},V);Y.style.position="absolute",Y.style.visibility="hidden",Y.style["text-overflow"]="initial",Y.style["white-space"]="nowrap";var j,Te,tt=0,rt,ut,pt,nt=y.autoSize.widthEvalMode===Slick.WidthEvalMode.TextOnly;if(y.autoSize.widthEvalMode===Slick.WidthEvalMode.Auto){var pi=!y.formatterOverride&&!y.formatter,Qt=y.formatterOverride&&y.formatterOverride.ReturnsTextOnly||!y.formatterOverride&&y.formatter&&y.formatter.ReturnsTextOnly;nt=pi||Qt}if(na&&nt){const yi=getComputedStyle(Y);for(na.font=yi["font-size"]+" "+yi["font-family"],j=I.startIndex;j<=I.endIndex;j++)pt=I.valueArr?I.valueArr[j]:I.getRowVal(j),y.formatterOverride?ut=y.formatterOverride(j,I.colIndex,pt,y,In(j),L):y.formatter?ut=y.formatter(j,I.colIndex,pt,y,In(j),L):ut=""+pt,Te=ut?na.measureText(ut).width:0,Te>tt&&(tt=Te,rt=ut);return Y.textContent=rt,Te=Y.offsetWidth,V.remove(),Te}for(j=I.startIndex;j<=I.endIndex;j++)pt=I.valueArr?I.valueArr[j]:I.getRowVal(j),y.formatterOverride?ut=y.formatterOverride(j,I.colIndex,pt,y,In(j),L):y.formatter?ut=y.formatter(j,I.colIndex,pt,y,In(j),L):ut=""+pt,Vo(ut,Y),Te=Y.offsetWidth,Te>tt&&(tt=Te);return V.remove(),tt}function Af(y){var T=0,I=Js()+y.id,V=document.getElementById(I),Y=I+"_";if(V){var j=V.cloneNode(!0);j.id=Y,j.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",V.parentNode.insertBefore(j,V),T=j.offsetWidth,j.parentNode.removeChild(j)}else{let Te=hi(y);V=E.createDomElement("div",{id:Y,className:"ui-state-default slick-header-column"},Te);const tt=E.createDomElement("span",{className:"slick-column-name"},V);tt.innerHTML=$o(y.name),j.style.cssText="position: absolute; visibility: hidden;right: auto;text-overflow: initial;white-space: nowrap;",y.headerCssClass&&V.classList.add(...y.headerCssClass.split(" ")),T=V.offsetWidth,Te.removeChild(V)}return T}function kf(){var y,T,I=[],V=0,Y=0,j,Te=Ge?$-a.width:$;for(y=0;y<o.length;y++)T=o[y],!(!T||T.hidden)&&(I.push(T.width),Y+=T.width,T.resizable&&(V+=T.width-Math.max(T.minWidth,q)));for(j=Y;Y>Te&&V;){var tt=(Y-Te)/V;for(y=0;y<o.length&&Y>Te;y++)if(T=o[y],!(!T||T.hidden)){var rt=I[y];if(!(!T.resizable||rt<=T.minWidth||rt<=q)){var ut=Math.max(T.minWidth,q),pt=Math.floor(tt*(rt-ut))||1;pt=Math.min(pt,rt-ut),Y-=pt,V-=pt,I[y]-=pt}}if(j<=Y)break;j=Y}for(j=Y;Y<Te;){var nt=Te/Y;for(y=0;y<o.length&&Y<Te;y++)if(T=o[y],!(!T||T.hidden)){var pi=I[y],Qt;!T.resizable||T.maxWidth<=pi?Qt=0:Qt=Math.min(Math.floor(nt*pi)-pi,T.maxWidth-pi||1e6)||1,Y+=Qt,I[y]+=Y<=Te?Qt:0}if(j>=Y)break;j=Y}var yi=!1;for(y=0;y<o.length;y++)!T||T.hidden||(o[y].rerenderOnResize&&o[y].width!=I[y]&&(yi=!0),o[y].width=I[y]);_d(yi)}function _d(y){Xt(),Oo(!0),oe(L.onAutosizeColumns,{columns:o}),y&&(vn(),Qi())}function Is(){return o.filter(y=>!y.hidden)}function oe(y,T,I){return I=I||new Slick.EventData(I,T),T=T||{},T.grid=L,y.notify(T,I,L)}function Ne(){return s.editorLock}function Me(){return vt}function _t(y){return Se[y]}function Xt(){if(!M)return;let y=0,T=Is();U.forEach(function(I){for(let V=0;V<I.children.length;V++,y++){const Y=I.children[V],Te=((T[y]||{}).width||0)-Le;E.width(Y)!==Te&&E.width(Y,Te)}}),ss()}function Si(){for(var y=0,T,I,V=0;V<o.length;V++)o[V]&&o[V].hidden||(T=o[V].width,I=xf(V),I.left.style.left=y+"px",I.right.style.right=(s.frozenColumn!=-1&&V>s.frozenColumn?Pe:re)-y-T+"px",s.frozenColumn!=V&&(y+=o[V].width)),s.frozenColumn==V&&(y=0)}function kn(y,T){il([{columnId:y,sortAsc:T}])}function Bi(y){let T=null;return U.every(function(I){const V=I.children.length;return y<V?(T=I.children[y],!1):(y-=V,!0)}),T}function il(y){Xe=y;const T=s.numberedMultiColumnSort&&Xe.length>1;U.forEach(function(V){let Y=V.querySelectorAll(".slick-header-column-sorted");Y.forEach(function(j){j.classList.remove("slick-header-column-sorted")}),Y=V.querySelectorAll(".slick-sort-indicator"),Y.forEach(function(j){j.classList.remove("slick-sort-indicator-asc"),j.classList.remove("slick-sort-indicator-desc")}),Y=V.querySelectorAll(".slick-sort-indicator-numbered"),Y.forEach(function(j){j.textContent=""})});let I=1;Xe.forEach(function(V){V.sortAsc==null&&(V.sortAsc=!0);const Y=_t(V.columnId);if(Y!=null){const j=Bi(Y);if(j){j.classList.add("slick-header-column-sorted");let Te=j.querySelector(".slick-sort-indicator");Te&&Te.classList.add(V.sortAsc?"slick-sort-indicator-asc":"slick-sort-indicator-desc"),T&&(Te=j.querySelector(".slick-sort-indicator-numbered"),Te&&(Te.textContent=I))}}I++})}function If(){return Xe}function Tr(y,T){const I=y.getNativeEvent();var V=Bn.slice(0);Bn=[];for(var Y={},j=0;j<T.length;j++)for(var Te=T[j].fromRow;Te<=T[j].toRow;Te++){Y[Te]||(Bn.push(Te),Y[Te]={});for(var tt=T[j].fromCell;tt<=T[j].toCell;tt++)Nd(Te,tt)&&(Y[Te][o[tt].id]=s.selectedCellCssClass)}if(hc(s.selectedCellCssClass,Y),oa(V,Bn)){var rt=I&&I.detail&&I.detail.caller||"click",ut=ka().filter(function(nt){return V.indexOf(nt)<0}),pt=V.filter(function(nt){return ka().indexOf(nt)<0});oe(L.onSelectedRowsChanged,{rows:ka(),previousSelectedRows:V,caller:rt,changedSelectedRows:ut,changedUnselectedRows:pt},y)}}function oa(y,T){return Array.isArray(y)&&Array.isArray(T)&&T.sort().toString()!==y.sort().toString()}function Df(){return o}function ss(){xt=[],ti=[];for(var y=0,T=0,I=o.length;T<I;T++)!o[T]||o[T].hidden||(xt[T]=y,ti[T]=y+o[T].width,s.frozenColumn==T?y=0:y+=o[T].width)}function Il(){Se={};for(var y=0;y<o.length;y++){o[y].width&&(o[y].widthRequest=o[y].width);var T=o[y]=E.extend({},u,o[y]);T.autoSize=E.extend({},h,T.autoSize),Se[T.id]=y,T.minWidth&&T.width<T.minWidth&&(T.width=T.minWidth),T.maxWidth&&T.width>T.maxWidth&&(T.width=T.maxWidth)}}function Ds(y){oe(L.onBeforeSetColumns,{previousColumns:o,newColumns:y,grid:L}),o=y,o=y,Qu()}function Di(){oe(L.onBeforeUpdateColumns,{columns:o,grid:L}),Qu()}function Qu(){Il(),ss(),M&&(ju(),md(),vn(),Vt(),Ke(),Ku(),qu(),Or(),Oo(),Xt(),Si(),Ar(),no()&&no().refreshSelections&&no().refreshSelections())}function Ju(){return s}function sa(y,T,I,V){if(Ne().commitCurrentEdit()){Zn(),y.showColumnHeader!==void 0&&bd(y.showColumnHeader),s.enableAddRow!==y.enableAddRow&&ma(Ri()),y.frozenColumn&&(xs().forEach(j=>j.scrollLeft=0),Ar());var Y=E.extend(!0,{},s);s=E.extend(s,y),oe(L.onSetOptions,{optionsBefore:Y,optionsAfter:s}),ec(),pd(),y.frozenBottom!==void 0&&(Jo=!0),He.forEach(function(j){j.style["overflow-y"]=s.autoHeight?"hidden":"auto"}),T||Qi(),Xu(),V||md(),I||Ds(o),s.enableMouseWheelScrollHandler&&He&&(!vi||vi.length===0)?He.forEach(function(j){vi.push(Slick.MouseWheel({element:j,onMouseWheel:fc}))}):s.enableMouseWheelScrollHandler===!1&&kl(vi)}}function ec(){s.autoHeight&&(s.leaveSpaceForNewRows=!1),s.forceFitColumns&&(s.autosizeColsMode=Slick.GridAutosizeColsMode.LegacyForceFit,console.log("forceFitColumns option is deprecated - use autosizeColsMode"))}function Rf(y,T){r=y,vn(),va(),T&&Bo(0)}function Pf(){return r}function Ri(){return r.getLength?r.getLength():r&&r.length||0}function nr(){return Ri()+(s.enableAddRow&&(!Ui||Gi)?1:0)}function In(y){return r.getItem?r.getItem(y):r[y]}function tc(){return be[0]}function la(){return be}function nl(y,T,I,V){var Y=V!==!1;if(s[y]!=I)if(s[y]=I,I){if(Y){E.slideDown(T,Or);return}D(T),Or()}else{if(Y){E.slideUp(T,Or);return}A(T),Or()}}function ic(y,T){nl("showTopPanel",Ce,y,T)}function aa(y,T){nl("showHeaderRow",de,y,T)}function bd(y,T){nl("showColumnHeader",J,y,T)}function Dl(y,T){nl("showFooterRow",Oe,y,T)}function Rs(y,T){nl("showPreHeaderPanel",[Ve,ce],y,T)}function da(){return B}function Cd(y){return s.rowHeight*y-x}function ua(y){return Math.floor((y+x)/s.rowHeight)}function Bo(y){y=Math.max(y,0),y=Math.min(y,c-E.height(Oi)+(mt||kt()?a.height:0));var T=x;C=Math.min(v-1,Math.floor(y/m)),x=Math.round(C*_);var I=y-x;if(x!=T){var V=ga(I);rc(V),ba()}Et!=I&&(S=Et+T<I+x?1:-1,ei=gt=Et=I,kt()&&(Ei.scrollTop=I),W&&(Yn.scrollTop=jn.scrollTop=I),Oi.scrollTop=I,oe(L.onViewportChanged,{}))}function ca(y,T,I,V,Y,j){return I==null?"":(I+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Ps(y,T){var I=r.getItemMetadata&&r.getItemMetadata(y),V=I&&I.columns&&(I.columns[T.id]||I.columns[_t(T.id)]);return V&&V.formatter||I&&I.formatter||T.formatter||s.formatterFactory&&s.formatterFactory.getFormatter(T)||s.defaultFormatter}function ha(y,T){var I=o[T],V=r.getItemMetadata&&r.getItemMetadata(y),Y=V&&V.columns;return Y&&Y[I.id]&&Y[I.id].editor!==void 0?Y[I.id].editor:Y&&Y[T]&&Y[T].editor!==void 0?Y[T].editor:I.editor||s.editorFactory&&s.editorFactory.getEditor(I)}function fa(y,T){return s.dataItemColumnValueExtractor?s.dataItemColumnValueExtractor(y,T):y[T.field]}function nc(y,T,I,V,Y){var j=In(I),Te=I<Y&&!j,tt="slick-row"+(W&&I<=s.frozenRow?" frozen":"")+(Te?" loading":"")+(I===z&&s.showCellSelection?" active":"")+(I%2==1?" odd":" even");j||(tt+=" "+s.addNewRowCssClass);var rt=r.getItemMetadata&&r.getItemMetadata(I);rt&&rt.cssClasses&&(tt+=" "+rt.cssClasses);var ut=Od(I),pt=`<div class="ui-widget-content ${tt}" style="top:${Cd(I)-ut}px">`;y.push(pt),kt()&&T.push(pt);for(var nt,pi,Qt=0,yi=o.length;Qt<yi;Qt++)if(pi=o[Qt],!(!pi||pi.hidden)){if(nt=1,rt&&rt.columns){var Yi=rt.columns[pi.id]||rt.columns[Qt];nt=Yi&&Yi.colspan||1,nt==="*"&&(nt=yi-Qt)}if(ti[Math.min(yi-1,Qt+nt-1)]>V.leftPx){if(!pi.alwaysRenderColumn&&xt[Qt]>V.rightPx)break;kt()&&Qt>s.frozenColumn?pa(T,I,Qt,nt,j):pa(y,I,Qt,nt,j)}else(pi.alwaysRenderColumn||kt()&&Qt<=s.frozenColumn)&&pa(y,I,Qt,nt,j);nt>1&&(Qt+=nt-1)}y.push("</div>"),kt()&&T.push("</div>")}function pa(y,T,I,V,Y){var j=o[I],Te="slick-cell l"+I+" r"+Math.min(o.length-1,I+V-1)+(j.cssClass?" "+j.cssClass:"");kt()&&I<=s.frozenColumn&&(Te+=" frozen"),T===z&&I===Q&&s.showCellSelection&&(Te+=" active");for(var tt in Ct)Ct[tt][T]&&Ct[tt][T][j.id]&&(Te+=" "+Ct[tt][T][j.id]);var rt=null,ut="";Y&&(rt=fa(Y,j),ut=Ps(T,j)(T,I,rt,j,Y,L),ut==null&&(ut=""));var nt=oe(L.onBeforeAppendCell,{row:T,cell:I,value:rt,dataContext:Y}).getReturnValue(),pi=typeof nt=="string"?nt:"";ut&&ut.addClasses&&(pi+=(pi?" ":"")+ut.addClasses);var Qt=ut&&ut.toolTip?"title='"+ut.toolTip+"'":"",yi="";if(j.hasOwnProperty("cellAttrs")&&j.cellAttrs instanceof Object)for(var tt in j.cellAttrs)j.cellAttrs.hasOwnProperty(tt)&&(yi+=" "+tt+'="'+j.cellAttrs[tt]+'" ');y.push(`<div class="${Te+(pi?" "+pi:"")}" ${Qt+yi}>`),Y&&y.push(Object.prototype.toString.call(ut)!=="[object Object]"?ut:ut.text),y.push("</div>"),it[T].cellRenderQueue.push(I),it[T].cellColSpans[I]=V}function rc(y){for(var T in it){var I=!0;W&&(s.frozenBottom&&T>=ke||!s.frozenBottom&&T<=ke)&&(I=!1),(T=parseInt(T,10))!==z&&(T<y.top||T>y.bottom)&&I&&Rl(T)}s.enableAsyncPostRenderCleanup&&G()}function Dn(){va(),vn(),Qi()}function vn(){Ee&&Zn();for(var y in it)Rl(y);s.enableAsyncPostRenderCleanup&&G()}function Ff(y,T,I){tr++;for(var V in T)T.hasOwnProperty(V)&&er.push({actionType:"C",groupId:tr,node:y.cellNodesByColumnIdx[V|0],columnIdx:V|0,rowIdx:I});y.rowNode||(y.rowNode=[]),er.push({actionType:"R",groupId:tr,node:y.rowNode}),y.rowNode.forEach(function(Y){Y.remove()})}function Mf(y,T,I){er.push({actionType:"C",groupId:tr,node:y,columnIdx:T,rowIdx:I}),y.remove()}function Rl(y){var T=it[y];!T||!T.rowNode||(s.enableAsyncPostRenderCleanup&&Wi[y]?Ff(T,Wi[y],y):T.rowNode.forEach(function(I){I.parentElement&&I.parentElement.removeChild(I)}),delete it[y],delete Wi[y],wt--,mr++)}function oc(y){var T,I;if(!(!y||!y.length)){for(S=0,I=y.length,T=0;T<I;T++)Ee&&z===y[T]&&Zn(),it[y[T]]&&Rl(y[T]);s.enableAsyncPostRenderCleanup&&G()}}function ma(y){!y&&y!==0||oc([y])}function Vo(y,T,I){if(y==null&&(y=""),Object.prototype.toString.call(y)!=="[object Object]"){T.innerHTML=$o(y);return}T.innerHTML=$o(y.text),y.removeClasses&&!I&&y.removeClasses.split(" ").forEach(function(Y){T.classList.remove(Y)}),y.addClasses&&y.addClasses.split(" ").forEach(function(Y){T.classList.add(Y)}),y.toolTip&&T.setAttribute("title",y.toolTip)}function yd(y,T){var I=Ir(y,T);if(I){var V=o[T],Y=In(y);if(Ee&&z===y&&Q===T)Ee.loadValue(Y);else{var j=Y?Ps(y,V)(y,T,fa(Y,V),V,Y,L):"";Vo(j,I),as(y)}}}function ls(y){var T=it[y];if(T){_a(y);var I,V=In(y);for(var Y in T.cellNodesByColumnIdx)if(T.cellNodesByColumnIdx.hasOwnProperty(Y)){Y=Y|0;var j=o[Y],Te=T.cellNodesByColumnIdx[Y];y===z&&Y===Q&&Ee?Ee.loadValue(V):V?(I=Ps(y,j)(y,Y,fa(V,j),j,V,L),Vo(I,Te)):E.emptyElement(Te)}as(y)}}function rl(){if((!s.autoHeight||s.frozenColumn!=-1)&&(Dt=s.showTopPanel?s.topPanelHeight+ns(Ce[0]):0,Lt=s.showHeaderRow?s.headerRowHeight+ns(de[0]):0,Ot=s.showFooterRow?s.footerRowHeight+ns(Oe[0]):0),s.autoHeight){let y=ar.offsetHeight;y+=s.showHeaderRow?s.headerRowHeight+ns(de[0]):0,y+=s.showFooterRow?s.footerRowHeight+ns(Oe[0]):0,y+=Kn()>$?a.height:0,ge=s.rowHeight*nr()+(s.frozenColumn==-1?y:0)}else{const y=s.showColumnHeader?E.toFloat(E.height(J[0]))+ns(J[0]):0,T=s.createPreHeaderPanel&&s.showPreHeaderPanel?s.preHeaderPanelHeight+ns(Ve):0,I=getComputedStyle(B);ge=E.toFloat(I.height)-E.toFloat(I.paddingTop)-E.toFloat(I.paddingBottom)-y-Dt-Lt-Ot-T}return Ht=Math.ceil(ge/s.rowHeight),ge}function ol(){$=parseFloat(E.innerSize(B,"width"))}function Or(){if(M){if(at=0,st=0,ht=0,ol(),rl(),W?s.frozenBottom?(at=ge-ve-a.height,st=ve+a.height):(at=ve,st=ge-ve):at=ge,at+=Dt+Lt+Ot,kt()&&s.autoHeight&&(at+=a.height),ht=at-Dt-Lt-Ot,s.autoHeight){if(kt()){const T=getComputedStyle(to);E.height(B,at+E.toFloat(T.height))}$n.style.position="relative"}E.setStyleSize($n,"top",E.height(ar)||(s.showHeaderRow?s.headerRowHeight:0)+(s.showPreHeaderPanel?s.preHeaderPanelHeight:0)),E.height($n,at);var y=$n.offsetTop+at;s.autoHeight||E.height(Ei,ht),kt()?(E.setStyleSize(Vn,"top",E.height(ar)),E.height(Vn,at),E.height(yn,ht),W&&(E.setStyleSize(di,"top",y),E.height(di,st),E.setStyleSize(zn,"top",y),E.height(zn,st),E.height(jn,st))):W&&(E.width(di,"100%"),E.height(di,st),E.setStyleSize(di,"top",y)),W?(E.height(Yn,st),s.frozenBottom?(E.height(_r,ve),kt()&&E.height(Eo,ve)):(E.height(Xn,ve),kt()&&E.height(io,ve))):E.height(yn,ht),(!a||!a.width)&&(a=To()),s.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&os(),va(),Ar(),Ai=-1,Qi()}}function sl(y){Ui=y.pageSize!==0,Gi=y.pageNum==y.totalPages-1}function va(){if(M){var y=Ri(),T=nr(),I=0,tt=W&&!s.frozenBottom?E.height(_r):E.height(Xn);if(W)var I=Ri()-s.frozenRow;else var I=T+(s.leaveSpaceForNewRows?Ht-1:0);var V=E.height(Oi),Y=Ge;Ge=s.alwaysShowVerticalScroll||!s.autoHeight&&I*s.rowHeight>V,Zn();var j=y-1;for(var Te in it)Te>j&&Rl(Te);s.enableAsyncPostRenderCleanup&&G(),he&&z>j&&zr();var tt=p;s.autoHeight?p=s.rowHeight*I:(c=Math.max(s.rowHeight*I,V-a.height),c<t?(p=m=c,v=1,_=0):(p=t,m=p/100,v=Math.floor(c/m),_=(c-p)/(v-1))),(p!==tt||Jo)&&(W&&!s.frozenBottom?(E.height(_r,p),kt()&&E.height(Eo,p)):(E.height(Xn,p),E.height(io,p)),gt=Oi.scrollTop,Jo=!1);var rt=gt+x<=c-V;c==0||gt==0?C=x=0:Bo(rt?gt+x:c-V+a.height),p!=tt&&s.autoHeight&&Or(),s.autosizeColsMode===Slick.GridAutosizeColsMode.LegacyForceFit&&Y!=Ge&&os(),Oo(!1)}}function ga(y,T){return y==null&&(y=gt),T==null&&(T=Zt),{top:ua(y),bottom:ua(y+ge)+1,leftPx:T,rightPx:T+$}}function sc(y,T){var I=ga(y,T),V=Math.round(ge/s.rowHeight),Y=s.minRowBuffer;return S==-1?(I.top-=V,I.bottom+=Y):S==1?(I.top-=Y,I.bottom+=V):(I.top-=Y,I.bottom+=Y),I.top=Math.max(0,I.top),I.bottom=Math.min(nr()-1,I.bottom),I.leftPx-=$,I.rightPx+=$,I.leftPx=Math.max(0,I.leftPx),I.rightPx=Math.min(X,I.rightPx),I}function _a(y){const T=it[y];if(T&&T.cellRenderQueue.length&&T.rowNode&&T.rowNode.length){const I=T.rowNode;let V=Array.from(I[0].children);I.length>1&&(V=V.concat(Array.from(I[1].children)));let Y=V.length-1;for(;T.cellRenderQueue.length;){const j=T.cellRenderQueue.pop();T.cellNodesByColumnIdx[j]=V[Y--]}}}function Nf(y,T){if(!(W&&(s.frozenBottom&&T>ke||T<=ke))){var I=it[T],V=[];for(var Y in I.cellNodesByColumnIdx)if(I.cellNodesByColumnIdx.hasOwnProperty(Y)&&(Y=Y|0,!(Y<=s.frozenColumn)&&!(Array.isArray(o)&&o[Y]&&o[Y].alwaysRenderColumn))){var j=I.cellColSpans[Y];(xt[Y]>y.rightPx||ti[Math.min(o.length-1,Y+j-1)]<y.leftPx)&&(T==z&&Y==Q||V.push(Y))}for(var Te,tt;(Te=V.pop())!=null;)tt=I.cellNodesByColumnIdx[Te],s.enableAsyncPostRenderCleanup&&Wi[T]&&Wi[T][Te]?Mf(tt,Te,T):tt.parentElement.removeChild(tt),delete I.cellColSpans[Te],delete I.cellNodesByColumnIdx[Te],Wi[T]&&delete Wi[T][Te]}}function Pl(y){for(var T,I=[],V=[],Y,j,Te=y.top,tt=y.bottom;Te<=tt;Te++)if(T=it[Te],!!T){_a(Te),Nf(y,Te),Y=0;var rt=r.getItemMetadata&&r.getItemMetadata(Te);rt=rt&&rt.columns;for(var ut=In(Te),pt=0,nt=o.length;pt<nt;pt++)if(!(!o[pt]||o[pt].hidden)){if(xt[pt]>y.rightPx)break;if((j=T.cellColSpans[pt])!=null){pt+=j>1?j-1:0;continue}if(j=1,rt){var pi=rt[o[pt].id]||rt[pt];j=pi&&pi.colspan||1,j==="*"&&(j=nt-pt)}ti[Math.min(nt-1,pt+j-1)]>y.leftPx&&(pa(I,Te,pt,j,ut),Y++),pt+=j>1?j-1:0}Y&&V.push(Te)}if(I.length){var Qt=document.createElement("div");Qt.innerHTML=$o(I.join(""));for(var yi,Yi;(yi=V.pop())!=null;){T=it[yi];for(var Pi;(Pi=T.cellRenderQueue.pop())!=null;)Yi=Qt.lastChild,kt()&&Pi>s.frozenColumn?T.rowNode[1].appendChild(Yi):T.rowNode[0].appendChild(Yi),T.cellNodesByColumnIdx[Pi]=Yi}}}function Fs(y){for(var T=[],I=[],V=[],Y=!1,j=Ri(),Te=y.top,tt=y.bottom;Te<=tt;Te++)it[Te]||W&&s.frozenBottom&&Te==Ri()||(wt++,V.push(Te),it[Te]={rowNode:null,cellColSpans:[],cellNodesByColumnIdx:[],cellRenderQueue:[]},nc(T,I,Te,y,j),he&&z===Te&&(Y=!0),Co++);if(!V.length)return;const rt=document.createElement("div"),ut=document.createElement("div");rt.innerHTML=$o(T.join("")),ut.innerHTML=$o(I.join(""));for(var Te=0,tt=V.length;Te<tt;Te++)W&&V[Te]>=ke?kt()?it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&ut.firstChild&&(it[V[Te]].rowNode=[rt.firstChild,ut.firstChild],_r.appendChild(rt.firstChild),Eo.appendChild(ut.firstChild)):it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&(it[V[Te]].rowNode=[rt.firstChild],_r.appendChild(rt.firstChild)):kt()?it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&ut.firstChild&&(it[V[Te]].rowNode=[rt.firstChild,ut.firstChild],Xn.appendChild(rt.firstChild),io.appendChild(ut.firstChild)):it&&it.hasOwnProperty(V[Te])&&rt.firstChild&&(it[V[Te]].rowNode=[rt.firstChild],Xn.appendChild(rt.firstChild));Y&&(he=Ir(z,Q))}function Ed(){s.enableAsyncPostRender&&(clearTimeout(Wn),Wn=setTimeout(uc,s.asyncPostRenderDelay))}function G(){s.enableAsyncPostRenderCleanup&&(clearTimeout(qt),qt=setTimeout(cc,s.asyncPostRenderCleanupDelay))}function as(y){for(var T in Wi[y])Wi[y].hasOwnProperty(T)&&(Wi[y][T]="C");bo=Math.min(bo,y),lr=Math.max(lr,y),Ed()}function ba(){for(var y in it){var T=y?parseInt(y):0;E.setStyleSize("top",Cd(T))}}function Qi(){if(M){Li.dequeue();var y=ga(),T=sc();if(rc(T),Ai!=Zt){if(W){var I=E.extend(!0,{},T);s.frozenBottom?(I.top=ke,I.bottom=Ri()):(I.top=0,I.bottom=s.frozenRow),Pl(I)}Pl(T)}Fs(T),W&&(s.frozenBottom?Fs({top:ke,bottom:Ri()-1,leftPx:T.leftPx,rightPx:T.rightPx}):Fs({top:0,bottom:s.frozenRow-1,leftPx:T.leftPx,rightPx:T.rightPx})),bo=y.top,lr=Math.min(nr()-1,y.bottom),Ed(),ei=gt,Ai=Zt,oe(L.onRendered,{startRow:y.top,endRow:y.bottom,grid:L})}}function fi(){var y=Cs.scrollLeft;y!=Hi.scrollLeft&&(Hi.scrollLeft=y)}function lc(){var y=So.scrollLeft;y!=Hi.scrollLeft&&(Hi.scrollLeft=y)}function ac(){Lf(Ve)}function Lf(y){var T=y.scrollLeft;T!=Hi.scrollLeft&&(Hi.scrollLeft=T)}function Ar(){return gt=Oi.scrollTop,Zt=Hi.scrollLeft,dc(!1)}function dc(y){var T=Oi.scrollHeight-Oi.clientHeight,I=Oi.scrollWidth-Oi.clientWidth;T=Math.max(0,T),I=Math.max(0,I),gt>T&&(gt=T),Zt>I&&(Zt=I);var V=Math.abs(gt-Et),Y=Math.abs(Zt-zi);if(Y&&(zi=Zt,Hi.scrollLeft=Zt,Br.scrollLeft=Zt,Ce[0].scrollLeft=Zt,s.createFooterRow&&(So.scrollLeft=Zt),s.createPreHeaderPanel&&(kt()?ce.scrollLeft=Zt:Ve.scrollLeft=Zt),kt()?(W&&(yn.scrollLeft=Zt),gr.scrollLeft=Zt):(W&&(Ei.scrollLeft=Zt),vr.scrollLeft=Zt)),V&&!s.autoHeight)if(S=Et<gt?1:-1,Et=gt,y&&(Oi.scrollTop=gt),kt()&&(W&&!s.frozenBottom?Yn.scrollTop=gt:Ei.scrollTop=gt),V<ge)Bo(gt+x);else{var j=x;p==ge?C=0:C=Math.min(v-1,Math.floor(gt*((c-ge)/(p-ge))*(1/m))),x=Math.round(C*_),j!=x&&vn()}if(Y||V){var Te=Math.abs(Ai-Zt),tt=Math.abs(ei-gt);(Te>20||tt>20)&&(s.forceSyncScrolling||tt<ge&&Te<$?Qi():Li.enqueue(),oe(L.onViewportChanged,{}))}return oe(L.onScroll,{scrollLeft:Zt,scrollTop:gt}),!!(Y||V)}function Hf(y,T){var I=!1,V=!1;function Y(){I?V=!0:Te()}function j(){V=!1}function Te(){I=!0,setTimeout(tt,T),y()}function tt(){V?(j(),Te()):I=!1}return{enqueue:Y,dequeue:j}}function uc(){for(var y=Ri();bo<=lr;){var T=S>=0?bo++:lr--,I=it[T];if(!(!I||T>=y)){Wi[T]||(Wi[T]={}),_a(T);for(var V in I.cellNodesByColumnIdx)if(I.cellNodesByColumnIdx.hasOwnProperty(V)){V=V|0;var Y=o[V],j=Wi[T][V];if(Y.asyncPostRender&&j!=="R"){var Te=I.cellNodesByColumnIdx[V];Te&&Y.asyncPostRender(Te,T,In(T),Y,j==="C"),Wi[T][V]="R"}}Wn=setTimeout(uc,s.asyncPostRenderDelay);return}}}function cc(){if(er.length>0){for(var y=er[0].groupId;er.length>0&&er[0].groupId==y;){var T=er.shift();if(T.actionType=="R"&&T.node.forEach(function(V){V.remove()}),T.actionType=="C"){var I=o[T.columnIdx];I.asyncPostRenderCleanup&&T.node&&I.asyncPostRenderCleanup(T.node,T.rowIdx,I)}}qt=setTimeout(cc,s.asyncPostRenderCleanupDelay)}}function Sd(y,T){var I,V,Y,j;for(var Te in it){if(j=T&&T[Te],Y=y&&y[Te],j)for(V in j)(!Y||j[V]!=Y[V])&&(I=Ir(Te,_t(V)),I&&I.classList.remove(j[V]));if(Y)for(V in Y)(!j||j[V]!=Y[V])&&(I=Ir(Te,_t(V)),I&&I.classList.add(Y[V]))}}function zo(y,T){if(Ct[y])throw new Error("SlickGrid addCellCssStyles: cell CSS hash with key '"+y+"' already exists.");Ct[y]=T,Sd(T,null),oe(L.onCellCssStylesChanged,{key:y,hash:T,grid:L})}function Bf(y){Ct[y]&&(Sd(null,Ct[y]),delete Ct[y],oe(L.onCellCssStylesChanged,{key:y,hash:null,grid:L}))}function hc(y,T){const I=Ct[y];Ct[y]=T,Sd(T,I),oe(L.onCellCssStylesChanged,{key:y,hash:T,grid:L})}function Vf(y){return Ct[y]}function zf(y,T,I){I=I||250;function V(Y,j){j<1||setTimeout(function(){j%2==0?Y.classList.add(s.cellFlashingCssClass):Y.classList.remove(s.cellFlashingCssClass),V(Y,j-1)},I)}if(it[y]){const Y=Ir(y,T);Y&&V(Y,5)}}function fc(y,T,I,V){gt=Math.max(0,Oi.scrollTop-V*s.rowHeight),Zt=Hi.scrollLeft+I*10;var Y=dc(!0);Y&&y.preventDefault()}function Uo(y,T){var I=dl(y);if(!I||!Td(I.row,I.cell))return!1;var V=oe(L.onDragInit,T,y);return V.isImmediatePropagationStopped()?V.getReturnValue():!1}function Uf(y,T){var I=dl(y);if(!I||!Td(I.row,I.cell))return!1;var V=oe(L.onDragStart,T,y);return V.isImmediatePropagationStopped()?V.getReturnValue():!1}function Gf(y,T){return oe(L.onDrag,T,y).getReturnValue()}function Wf(y,T){oe(L.onDragEnd,T,y)}function ll(y){var I=oe(L.onKeyDown,{row:z,cell:Q},y).isImmediatePropagationStopped(),V=Slick.keyCode;if(!I&&!y.shiftKey&&!y.altKey){if(s.editable&&Ee&&Ee.keyCaptureList&&Ee.keyCaptureList.indexOf(y.which)>-1)return;y.which==V.HOME?I=y.ctrlKey?Tc():Fd():y.which==V.END&&(I=y.ctrlKey?Ta():Md())}if(!I)if(!y.shiftKey&&!y.altKey&&!y.ctrlKey){if(s.editable&&Ee&&Ee.keyCaptureList&&Ee.keyCaptureList.indexOf(y.which)>-1)return;if(y.which==V.ESCAPE){if(!Ne().isActive())return;Nl()}else y.which==V.PAGE_DOWN?(wc(),I=!0):y.which==V.PAGE_UP?(xc(),I=!0):y.which==V.LEFT?I=Rd():y.which==V.RIGHT?I=Ic():y.which==V.UP?I=Dc():y.which==V.DOWN?I=hl():y.which==V.TAB?I=Aa():y.which==V.ENTER&&(s.editable&&(Ee?z===Ri()?hl():Ec():Ne().commitCurrentEdit()&&Ml(void 0,void 0,y)),I=!0)}else y.which==V.TAB&&y.shiftKey&&!y.ctrlKey&&!y.altKey&&(I=Pd());if(I){y.stopPropagation(),y.preventDefault();try{y.originalEvent.keyCode=0}catch{}}}function pc(y){let T=y;if(T instanceof Slick.EventData?T=y.getNativeEvent():y=void 0,!Ee&&(T.target!=document.activeElement||T.target.classList.contains("slick-cell"))){var I=Sa();Go(),Ms(I)}var V=dl(T);if(!(!V||Ee!==null&&z==V.row&&Q==V.cell)&&(y=oe(L.onClick,{row:V.row,cell:V.cell},y||T),!y.isImmediatePropagationStopped()&&Wr(V.row,V.cell)&&(!Ne().isActive()||Ne().commitCurrentEdit()))){wa(V.row,!1);var Y=T.target&&T.target.className===Slick.preClickClassName,j=o[V.cell],Te=!!(s.editable&&j&&j.editor&&s.suppressActiveCellChangeOnEdit);Wo(Ir(V.row,V.cell),null,Y,Te,T)}}function ds(y){var T=y.target.closest(".slick-cell");T&&(he===T&&Ee!==null||oe(L.onContextMenu,{},y))}function mc(y){var T=dl(y);!T||Ee!==null&&z==T.row&&Q==T.cell||(oe(L.onDblClick,{row:T.row,cell:T.cell},y),!y.defaultPrevented&&s.editable&&Fc(T.row,T.cell,!0,y))}function vc(y){const T=E.storage.get(y.target.closest(".slick-header-column"),"column");T&&oe(L.onHeaderMouseEnter,{column:T,grid:L},y)}function Vr(y){const T=E.storage.get(y.target.closest(".slick-header-column"),"column");T&&oe(L.onHeaderMouseLeave,{column:T,grid:L},y)}function $f(y){const T=E.storage.get(y.target.closest(".slick-headerrow-column"),"column");T&&oe(L.onHeaderRowMouseEnter,{column:T,grid:L},y)}function Yf(y){const T=E.storage.get(y.target.closest(".slick-headerrow-column"),"column");T&&oe(L.onHeaderRowMouseLeave,{column:T,grid:L},y)}function gc(y){var T=y.target.closest(".slick-header-column"),I=T&&E.storage.get(T,"column");oe(L.onHeaderContextMenu,{column:I},y)}function _c(y){if(!Es){var T=y.target.closest(".slick-header-column"),I=T&&E.storage.get(T,"column");I&&oe(L.onHeaderClick,{column:I},y)}}function bc(y){var T=y.target.closest(".slick-footerrow-column"),I=T&&E.storage.get(T,"column");oe(L.onFooterContextMenu,{column:I},y)}function wd(y){var T=y.target.closest(".slick-footerrow-column"),I=T&&E.storage.get(T,"column");oe(L.onFooterClick,{column:I},y)}function xd(y){oe(L.onMouseEnter,{},y)}function Cc(y){oe(L.onMouseLeave,{},y)}function Td(y,T){return!(y<0||y>=Ri()||T<0||T>=o.length)}function Fl(y,T){for(var I=ua(T),V=0,Y=0,j=0;j<o.length&&Y<y;j++)!o[j]||o[j].hidden||(Y+=o[j].width,V++);return V<0&&(V=0),{row:I,cell:V-1}}function al(y){var T=/l\d+/.exec(y.className);if(!T)throw new Error("SlickGrid getCellFromNode: cannot get cell - "+y.className);return parseInt(T[0].substr(1,T[0].length-1),10)}function Ca(y){for(var T in it)for(var I in it[T].rowNode)if(it[T].rowNode[I]===y)return T?parseInt(T):0;return null}function Od(y){let T=0;return W?s.frozenBottom?y>=ke?p<ht?T=ke*s.rowHeight:T=p:T=0:y>=ke?T=ve:T=0:T=0,T}function dl(y){y instanceof Slick.EventData&&(y=y.getNativeEvent());var T=y.touches?y.touches[0]:y,I,V,Y=y.target.closest(".slick-cell");if(!Y)return null;if(I=Ca(Y.parentNode),W){var j=E.offset(E.parents(Y,".grid-canvas")[0]),Te=0,tt=E.parents(Y,".grid-canvas-bottom").length;tt&&(Te=s.frozenBottom?E.height(Xn):ve),I=Fl(T.clientX-j.left,T.clientY-j.top+Te+document.documentElement.scrollTop).row}return V=al(Y),I==null||V==null?null:{row:I,cell:V}}function jf(y,T){if(!Td(y,T))return null;for(var I=Od(y),V=Cd(y)-I,Y=V+s.rowHeight-1,j=0,Te=0;Te<T;Te++)!o[Te]||o[Te].hidden||(j+=o[Te].width,s.frozenColumn==Te&&(j=0));var tt=j+o[T].width;return{top:V,left:j,bottom:Y,right:tt}}function zr(){Wo(null,!1)}function Go(){zt==-1?ae.focus():_e.focus()}function Ur(y,T,I){if(wa(y,I),!(T<=s.frozenColumn)){var V=Gr(y,T);kr(xt[T],ti[T+(V>1?V-1:0)])}}function kr(y,T){var I=Zt+E.width(Hi)-(Ge?a.width:0);y<Zt?(Hi.scrollLeft=y,Ar(),Qi()):T>I&&(Hi.scrollLeft=Math.min(y,T-Hi.clientWidth),Ar(),Qi())}function Xf(y){kr(xt[y],ti[y])}function Wo(y,T,I,V,Y){if(he!==null&&(Zn(),he.classList.remove("active"),it[z]&&it[z].rowNode&&it[z].rowNode.forEach(function(ut){ut.classList.remove("active")})),he=y,he!=null){var j=E.offset(he),Te=Math.floor(E.offset(E.parents(he,".grid-canvas")[0]).top),tt=E.parents(he,".grid-canvas-bottom").length;W&&tt&&(Te-=s.frozenBottom?E.height(Xn):ve);var rt=Fl(j.left,Math.ceil(j.top)-Te);z=rt.row,Q=Mi=Q=Mi=al(he),T==null&&(T=z==Ri()||s.autoEdit),s.showCellSelection&&(he.classList.add("active"),it[z]&&it[z].rowNode&&it[z].rowNode.forEach(function(ut){ut.classList.add("active")})),s.editable&&T&&ul(z,Q)&&(clearTimeout(pn),s.asyncEditorLoading?pn=setTimeout(function(){Ml(void 0,I,Y)},s.asyncEditorLoadDelay):Ml(void 0,I,Y))}else z=Q=null;V||oe(L.onActiveCellChanged,oo())}function yc(){if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}else if(window.getSelection){var y=window.getSelection();y&&y.removeAllRanges&&y.removeAllRanges()}}function ul(y,T){var I=Ri();return!(y<I&&!In(y)||o[T].cannotTriggerInsert&&y>=I||!o[T]||o[T].hidden||!ha(y,T))}function Zn(){if(Ee){if(oe(L.onBeforeCellEditorDestroy,{editor:Ee}),Ee.destroy(),Ee=null,he){var y=In(z);if(he.classList.remove("editable"),he.classList.remove("invalid"),y){var T=o[Q],I=Ps(z,T),V=I(z,Q,fa(y,T),T,y,L);Vo(V,he),as(z)}}navigator.userAgent.toLowerCase().match(/msie/)&&yc(),Ne().deactivate(vt)}}function Ml(y,T,I){if(he){if(!s.editable)throw new Error("SlickGrid makeActiveCellEditable : should never get called when options.editable is false");if(clearTimeout(pn),!!ul(z,Q)){var V=o[Q],Y=In(z);if(oe(L.onBeforeEditCell,{row:z,cell:Q,item:Y,column:V,target:"grid"}).getReturnValue()===!1){Go();return}Ne().activate(vt),he.classList.add("editable");var j=y||ha(z,Q);!y&&!j.suppressClearOnEdit&&E.emptyElement(he);var Te=r.getItemMetadata&&r.getItemMetadata(z);Te=Te&&Te.columns;var tt=Te&&(Te[V.id]||Te[Q]);Ee=new j({grid:L,gridPosition:ya(B),position:ya(he),container:he,column:V,columnMetaData:tt,item:Y||{},event:I,commitChanges:Ec,cancelChanges:Nl}),Y&&(Ee.loadValue(Y),T&&Ee.preClick&&Ee.preClick()),lt=Ee.serializeValue(),Ee.position&&Ea()}}}function Ec(){Ne().commitCurrentEdit()&&(Go(),s.autoEdit&&!s.autoCommitEdit&&hl())}function Nl(){Ne().cancelCurrentEdit()&&Go()}function ya(y){var T={top:y.offsetTop,left:y.offsetLeft,bottom:0,right:0,width:y.offsetWidth,height:y.offsetWidth,visible:!0};T.bottom=T.top+T.height,T.right=T.left+T.width;for(var I=y.offsetParent;(y=y.parentNode)!=document.body&&!(!y||!y.parentNode);){const V=getComputedStyle(y);T.visible&&y.scrollHeight!=y.offsetHeight&&V.overflowY!="visible"&&(T.visible=T.bottom>y.scrollTop&&T.top<y.scrollTop+y.clientHeight),T.visible&&y.scrollWidth!=y.offsetWidth&&V.overflowX!="visible"&&(T.visible=T.right>y.scrollLeft&&T.left<y.scrollLeft+y.clientWidth),T.left-=y.scrollLeft,T.top-=y.scrollTop,y===I&&(T.left+=y.offsetLeft,T.top+=y.offsetTop,I=y.offsetParent),T.bottom=T.top+T.height,T.right=T.left+T.width}return T}function Ad(){return ya(he)}function Qn(){return ya(B)}function Ea(){if(he&&(oe(L.onActiveCellPositionChanged,{}),Ee)){var y=Ad();Ee.show&&Ee.hide&&(y.visible?Ee.show():Ee.hide()),Ee.position&&Ee.position(y)}}function Sc(){return Ee}function oo(){return he?{row:z,cell:Q}:null}function kd(){return he}function Sa(){var y=null;if(window.getSelection){var T=window.getSelection();T.rangeCount>0&&(y=T.getRangeAt(0))}return y}function Ms(y){if(window.getSelection&&y){var T=window.getSelection();T.removeAllRanges(),T.addRange(y)}}function wa(y,T){if(!W||!s.frozenBottom&&y>ke-1||s.frozenBottom&&y<ke-1){var I=E.height(Oi),V=W&&!s.frozenBottom?y-s.frozenRow:y,Y=V*s.rowHeight,j=(V+1)*s.rowHeight-I+(mt?a.height:0);(V+1)*s.rowHeight>gt+I+x?(Bo(T?Y:j),Qi()):V*s.rowHeight<gt+x&&(Bo(T?j:Y),Qi())}}function dr(y){Bo(y*s.rowHeight),Qi()}function xa(y){var T=y*Ht,I=gt+s.rowHeight-1;if(Bo((ua(I)+T)*s.rowHeight),Qi(),s.enableCellNavigation&&z!=null){var V=z+T,Y=nr();V>=Y&&(V=Y-1),V<0&&(V=0);for(var j=0,Te=null,tt=Mi;j<=Mi;)Wr(V,j)&&(Te=j),j+=Gr(V,j);Te!==null?(Wo(Ir(V,Te)),Mi=tt):zr()}}function wc(){xa(1)}function xc(){xa(-1)}function Tc(){Oc(0)}function Ta(){Oc(Ri()-1)}function Oc(y){var T=Ri();if(!T)return!0;if(y<0?y=0:y>=T&&(y=T-1),Ur(y,0,!0),s.enableCellNavigation&&z!=null){for(var I=0,V=null,Y=Mi;I<=Mi;)Wr(y,I)&&(V=I),I+=Gr(y,I);V!==null?(Wo(Ir(y,V)),Mi=Y):zr()}return!0}function Gr(y,T){var I=r.getItemMetadata&&r.getItemMetadata(y);if(!I||!I.columns)return 1;var V=I.columns[o[T].id]||I.columns[T],Y=V&&V.colspan;return Y==="*"?Y=o.length-T:Y=Y||1,Y}function Oa(y){for(var T=0;T<o.length;){if(Wr(y,T))return T;T+=Gr(y,T)}return null}function Ac(y){for(var T=0,I=null;T<o.length;)Wr(y,T)&&(I=T),T+=Gr(y,T);return I}function Id(y,T,I){if(T>=o.length)return null;do T+=Gr(y,T);while(T<o.length&&!Wr(y,T));return T<o.length?{row:y,cell:T,posX:T}:null}function cl(y,T,I){if(T<=0)return null;var V=Oa(y);if(V===null||V>=T)return null;for(var Y={row:y,cell:V,posX:V},j;;){if(j=Id(Y.row,Y.cell,Y.posX),!j)return null;if(j.cell>=T)return Y;Y=j}}function qf(y,T,I){for(var V,Y=nr();;){if(++y>=Y)return null;for(V=T=0;T<=I;)V=T,T+=Gr(y,T);if(Wr(y,V))return{row:y,cell:V,posX:I}}}function Kf(y,T,I){for(var V;;){if(--y<0)return null;for(V=T=0;T<=I;)V=T,T+=Gr(y,T);if(Wr(y,V))return{row:y,cell:V,posX:I}}}function Dd(y,T,I){if(y==null&&T==null&&(y=T=0,Wr(y,T)))return{row:y,cell:T,posX:T};var V=Id(y,T);if(V)return V;var Y=null,j=nr();for(y===j-1&&y--;++y<j;)if(Y=Oa(y),Y!==null)return{row:y,cell:Y,posX:Y};return null}function kc(y,T,I){if(y==null&&T==null&&(y=nr()-1,T=o.length-1,Wr(y,T)))return{row:y,cell:T,posX:T};for(var V,Y;!V&&(V=cl(y,T),!V);){if(--y<0)return null;T=0,Y=Ac(y),Y!==null&&(V={row:y,cell:Y,posX:Y})}return V}function Zf(y,T,I){var V=Oa(y);return V===null?null:{row:y,cell:V,posX:V}}function Qf(y,T,I){var V=Ac(y);return V===null?null:{row:y,cell:V,posX:V}}function Ic(){return so("right")}function Rd(){return so("left")}function hl(){return so("down")}function Dc(){return so("up")}function Aa(){return so("next")}function Pd(){return so("prev")}function Fd(){return so("home")}function Md(){return so("end")}function so(y){if(!s.enableCellNavigation||!he&&y!="prev"&&y!="next")return!1;if(!Ne().commitCurrentEdit())return!0;Go();var T={up:-1,down:1,left:-1,right:1,prev:-1,next:1,home:-1,end:1};zt=T[y];var I={up:Kf,down:qf,left:cl,right:Id,prev:kc,next:Dd,home:Zf,end:Qf},V=I[y],Y=V(z,Q,Mi);if(Y){if(W&&s.frozenBottom&Y.row==Ri())return;var j=Y.row==Ri();return(!s.frozenBottom&&Y.row>=ke||s.frozenBottom&&Y.row<ke)&&Ur(Y.row,Y.cell,!j&&s.emulatePagingWhenScrolling),Wo(Ir(Y.row,Y.cell)),Mi=Y.posX,!0}else return Wo(Ir(z,Q)),!1}function Ir(y,T){if(it[y]){_a(y);try{return it[y].cellNodesByColumnIdx.length>T?it[y].cellNodesByColumnIdx[T]:null}catch{return it[y].cellNodesByColumnIdx[T]}}return null}function Rc(y,T,I,V,Y){M&&(y>Ri()||y<0||T>=o.length||T<0||s.enableCellNavigation&&(Ur(y,T,!1),Wo(Ir(y,T),I,V,Y)))}function Pc(y,T,I){M&&(y>Ri()||y<0||T>=o.length||T<0||(z=y,I||Ur(y,T||0,!1)))}function Wr(y,T){if(!s.enableCellNavigation||y>=nr()||y<0||T>=o.length||T<0||!o[T]||o[T].hidden)return!1;var I=r.getItemMetadata&&r.getItemMetadata(y);if(I&&typeof I.focusable<"u")return!!I.focusable;var V=I&&I.columns;return V&&V[o[T].id]&&typeof V[o[T].id].focusable<"u"?!!V[o[T].id].focusable:V&&V[T]&&typeof V[T].focusable<"u"?!!V[T].focusable:!!o[T].focusable}function Nd(y,T){if(y>=Ri()||y<0||T>=o.length||T<0||!o[T]||o[T].hidden)return!1;var I=r.getItemMetadata&&r.getItemMetadata(y);if(I&&typeof I.selectable<"u")return!!I.selectable;var V=I&&I.columns&&(I.columns[o[T].id]||I.columns[T]);return V&&typeof V.selectable<"u"?!!V.selectable:!!o[T].selectable}function Fc(y,T,I,V){if(M&&Wr(y,T)&&Ne().commitCurrentEdit()){Ur(y,T,!1);var Y=Ir(y,T),j=o[T],Te=!!(s.editable&&j&&j.editor&&s.suppressActiveCellChangeOnEdit);Wo(Y,I||y===Ri()||s.autoEdit,null,Te,V),Ee||Go()}}function Ld(){var y=In(z),T=o[Q];if(Ee){if(Ee.isValueChanged()){var I=Ee.validate();if(I.valid){if(z<Ri()){var V={row:z,cell:Q,editor:Ee,serializedValue:Ee.serializeValue(),prevSerializedValue:lt,execute:function(){this.editor.applyValue(y,this.serializedValue),ls(this.row),oe(L.onCellChange,{command:"execute",row:this.row,cell:this.cell,item:y,column:T})},undo:function(){this.editor.applyValue(y,this.prevSerializedValue),ls(this.row),oe(L.onCellChange,{command:"undo",row:this.row,cell:this.cell,item:y,column:T})}};s.editCommandHandler?(Zn(),s.editCommandHandler(y,T,V)):(V.execute(),Zn())}else{var Y={};Ee.applyValue(Y,Ee.serializeValue()),Zn(),oe(L.onAddNewRow,{item:Y,column:T})}return!Ne().isActive()}else return he.classList.remove("invalid"),E.width(he),he.classList.add("invalid"),oe(L.onValidationError,{editor:Ee,cellNode:he,validationResults:I,row:z,cell:Q,column:T}),Ee.focus(),!1}Zn()}return!0}function Mc(){return Zn(),!0}function Hd(y){for(var T=[],I=o.length-1,V=0;V<y.length;V++)T.push(new Slick.Range(y[V],0,y[V],I));return T}function ka(){if(!Ni)throw new Error("SlickGrid Selection model is not set");return Bn.slice(0)}function Bd(y,T){if(!Ni)throw new Error("SlickGrid Selection model is not set");L&&L.getEditorLock&&!L.getEditorLock().isActive()&&Ni.setSelectedRanges(Hd(y),T||"SlickGrid.setSelectedRows")}var ni=0,Vd=30;function $o(y,T){if(!s.sanitizer||typeof y!="string")return y;var I=s.sanitizer(y);return!T&&s.logSanitizedHtml&&ni<=Vd&&I!==y&&(console.log("sanitizer altered html: "+y+" --> "+I),ni===Vd&&console.log("sanitizer: silencing messages after first "+Vd),ni++),I}this.debug=function(){var y="";y+=`
126
126
  counter_rows_rendered: `+Co,y+=`
127
127
  counter_rows_removed: `+mr,y+=`
128
128
  renderedRows: `+wt,y+=`
@@ -131,7 +131,7 @@ maxSupportedCssHeight: `+t,y+=`
131
131
  n(umber of pages): `+v,y+=`
132
132
  (current) page: `+C,y+=`
133
133
  page height (ph): `+m,y+=`
134
- vScrollDir: `+S,alert(y)},Slick.Utils.extend(this,{slickGridVersion:"4.1.3",onScroll:new Slick.Event,onBeforeSort:new Slick.Event,onSort:new Slick.Event,onHeaderMouseEnter:new Slick.Event,onHeaderMouseLeave:new Slick.Event,onHeaderRowMouseEnter:new Slick.Event,onHeaderRowMouseLeave:new Slick.Event,onHeaderContextMenu:new Slick.Event,onHeaderClick:new Slick.Event,onHeaderCellRendered:new Slick.Event,onBeforeHeaderCellDestroy:new Slick.Event,onHeaderRowCellRendered:new Slick.Event,onFooterRowCellRendered:new Slick.Event,onFooterContextMenu:new Slick.Event,onFooterClick:new Slick.Event,onBeforeHeaderRowCellDestroy:new Slick.Event,onBeforeFooterRowCellDestroy:new Slick.Event,onMouseEnter:new Slick.Event,onMouseLeave:new Slick.Event,onClick:new Slick.Event,onDblClick:new Slick.Event,onContextMenu:new Slick.Event,onKeyDown:new Slick.Event,onAddNewRow:new Slick.Event,onBeforeAppendCell:new Slick.Event,onValidationError:new Slick.Event,onViewportChanged:new Slick.Event,onColumnsReordered:new Slick.Event,onColumnsDrag:new Slick.Event,onColumnsResized:new Slick.Event,onColumnsResizeDblClick:new Slick.Event,onBeforeColumnsResize:new Slick.Event,onCellChange:new Slick.Event,onCompositeEditorChange:new Slick.Event,onBeforeEditCell:new Slick.Event,onBeforeCellEditorDestroy:new Slick.Event,onBeforeDestroy:new Slick.Event,onActiveCellChanged:new Slick.Event,onActiveCellPositionChanged:new Slick.Event,onDragInit:new Slick.Event,onDragStart:new Slick.Event,onDrag:new Slick.Event,onDragEnd:new Slick.Event,onSelectedRowsChanged:new Slick.Event,onCellCssStylesChanged:new Slick.Event,onAutosizeColumns:new Slick.Event,onBeforeSetColumns:new Slick.Event,onBeforeUpdateColumns:new Slick.Event,onRendered:new Slick.Event,onSetOptions:new Slick.Event,registerPlugin:qi,unregisterPlugin:wr,getPluginByName:Ho,getColumns:Df,setColumns:Ds,updateColumns:Di,getVisibleColumns:Is,getColumnIndex:_t,updateColumnHeader:el,setSortColumn:kn,setSortColumns:il,getSortColumns:If,autosizeColumns:os,autosizeColumn:Tf,getOptions:Ju,setOptions:sa,getData:Pf,getDataLength:Ri,getDataItem:In,setData:Rf,getSelectionModel:no,setSelectionModel:Tl,getSelectedRows:ka,setSelectedRows:Bd,getContainerNode:da,updatePagingStatusFromView:sl,applyFormatResultToCellNode:Vo,render:Qi,reRenderColumns:_d,invalidate:Dn,invalidateRow:ma,invalidateRows:oc,invalidateAllRows:vn,updateCell:yd,updateRow:ls,getViewport:ga,getRenderedRange:sc,resizeCanvas:Or,updateRowCount:va,scrollRowIntoView:wa,scrollRowToTop:dr,scrollCellIntoView:Ur,scrollColumnIntoView:Xf,getCanvasNode:qn,getUID:Js,getHeaderColumnWidthDiff:$i,getScrollbarDimensions:Un,getHeadersWidth:rn,getCanvasWidth:Kn,getCanvases:xr,getActiveCanvasNode:Zs,getViewportNode:Ol,getViewports:xs,getActiveViewportNode:Al,setActiveViewportNode:Ts,focus:Go,scrollTo:Bo,cacheCssForHiddenInit:es,restoreCssFromHiddenInit:ws,getCellFromPoint:Fl,getCellFromEvent:dl,getActiveCell:oo,setActiveCell:Rc,setActiveRow:Pc,getActiveCellNode:kd,getActiveCellPosition:Ad,resetActiveCell:zr,editActiveCell:Ml,getCellEditor:Sc,getCellNode:Ir,getCellNodeBox:jf,canCellBeSelected:Nd,canCellBeActive:Wr,navigatePrev:Pd,navigateNext:Aa,navigateUp:Dc,navigateDown:hl,navigateLeft:Rd,navigateRight:Ic,navigatePageUp:xc,navigatePageDown:wc,navigateTop:Tc,navigateBottom:Ta,navigateRowStart:Fd,navigateRowEnd:Md,gotoCell:Fc,getTopPanel:tc,getTopPanels:la,setTopPanelVisibility:ic,getPreHeaderPanel:H,getPreHeaderPanelLeft:H,getPreHeaderPanelRight:te,setPreHeaderPanelVisibility:Rs,getHeader:hi,getHeaderColumn:g,setHeaderRowVisibility:aa,getHeaderRow:w,getHeaderRowColumn:we,setFooterRowVisibility:Dl,getFooterRow:R,getFooterRowColumn:Be,getGridPosition:Qn,flashCell:zf,addCellCssStyles:zo,setCellCssStyles:hc,removeCellCssStyles:Bf,getCellCssStyles:Vf,getFrozenRowOffset:Od,setColumnHeaderVisibility:bd,sanitizeHtmlString:$o,getDisplayedScrollbarDimensions:Ao,getAbsoluteColumnMinWidth:fd,init:Ks,destroy:vd,getEditorLock:Ne,getEditController:Me}),xl()}Slick.Utils.extend(Slick,{Grid:e})})(),function(){function a(s){var l=this,u={groupItemMetadataProvider:null,inlineFilters:!1},h="id",c=[],p=[],m=new Map,v=null,_=null,C=null,x=!1,S=!1,E=new Map,D=!0,A,P,M={},B={},Z,L=[],ae,_e,J=[],U=null,F={getter:null,formatter:null,comparer:function(se,ue){return se.value===ue.value?0:se.value>ue.value?1:-1},predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},de=[],qe=[],Ie=[],xe=":|:",Oe=null,De,ne=0,pe=0,Ve=0,Ye=new Slick.Event,ze=new Slick.Event,ce=new Slick.Event,Ce=new Slick.Event,be=new Slick.Event,He=new Slick.Event,ot=new Slick.Event,Ue=new Slick.Event,St=new Slick.Event;s=Slick.Utils.extend(!0,{},u,s);function ct(se){x=!0,S=se===!0}function k(){var se=S;S=!1,x=!1,se&&(X(),Pe()),di()}function ee(){c=[],m=null,v=null,_=null,C=null,P=null,J=[],L=[],ae=null,_e=null,U&&U.onSelectedRowsChanged&&U.onCellCssStylesChanged&&(U.onSelectedRowsChanged.unsubscribe(),U.onCellCssStylesChanged.unsubscribe()),l.onRowsOrCountChanged&&l.onRowsOrCountChanged.unsubscribe()}function ge(se){M=se}function $(se){Z=se}function X(){if(m){for(var se,ue,ye=0,$e=0,Je=c.length;$e<Je;$e++){if(ue=c[$e],se=ue[h],se===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");E.has(se)?m.delete(se):(c[ye]=ue,m.set(se,ye),++ye)}c.length=ye,E=new Map}}function re(se){if(!(S||!m)){se=se||0;for(var ue,ye=se,$e=c.length;ye<$e;ye++){if(ue=c[ye][h],ue===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");m.set(ue,ye)}}}function Pe(){if(!(S||!m)){for(var se,ue=0,ye=c.length;ue<ye;ue++)if(se=c[ue][h],se===void 0||m.get(se)!==ue)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}}function Fe(){return c}function me(){return h}function We(se,ue){ue!==void 0&&(h=ue),c=L=se,ze.notify({idProperty:ue,itemCount:c.length},null,l),m=new Map,re(),Pe(),di()}function mt(se){He.notify(Ge(),null,l).getReturnValue()!==!1&&(se.pageSize!=null&&(ne=se.pageSize,pe=ne?Math.min(pe,Math.max(0,Math.ceil(Ve/ne)-1)):0),se.pageNum!=null&&(pe=Math.min(se.pageNum,Math.max(0,Math.ceil(Ve/ne)-1))),ot.notify(Ge(),null,l),di())}function Ge(){var se=ne?Math.max(1,Math.ceil(Ve/ne)):1;return{pageSize:ne,pageNum:pe,totalRows:Ve,totalPages:se,dataView:l}}function Le(se,ue){D=ue,P=se,A=null,ue===!1&&c.reverse(),c.sort(se),ue===!1&&c.reverse(),m=new Map,re(),di()}function jt(se,ue){D=ue,A=se,P=null;var ye=Object.prototype.toString;Object.prototype.toString=typeof se=="function"?se:function(){return this[se]},ue===!1&&c.reverse(),c.sort(),Object.prototype.toString=ye,ue===!1&&c.reverse(),m=new Map,re(),di()}function It(){P?Le(P,D):A&&jt(A,D)}function bi(){return L}function q(){return L.length}function W(){return _}function ve(se){_=se,s.inlineFilters&&(ae=er(),_e=tr()),di()}function ke(){return de}function at(se){s.groupItemMetadataProvider||(s.groupItemMetadataProvider=new Slick.Data.GroupItemMetadataProvider),qe=[],Ie=[],se=se||[],de=se instanceof Array?se:[se];for(var ue=0;ue<de.length;ue++){var ye=de[ue]=Slick.Utils.extend(!0,{},F,de[ue]);ye.getterIsAFn=typeof ye.getter=="function",ye.compiledAccumulators=[];for(var $e=ye.aggregators.length;$e--;)ye.compiledAccumulators[$e]=bo(ye.aggregators[$e]);Ie[ue]={}}di()}function st(se,ue,ye){if(se==null){at([]);return}at({getter:se,formatter:ue,comparer:ye})}function ht(se,ue){if(!de.length)throw new Error("[SlickGrid DataView] At least one grouping must be specified before calling setAggregators().");de[0].aggregators=se,de[0].aggregateCollapsed=ue,at(de)}function Dt(se){return c[se]}function Lt(se){return m&&m.get(se)}function Ot(){if(!v){v={};for(var se=0,ue=p.length;se<ue;se++)v[p[se][h]]=se}}function zt(se){return Ot(),v[se[h]]}function Kt(se){return Ot(),v[se]}function Fi(se){return c[m&&m.get(se)]}function Mi(se){var ue=[];Ot();for(var ye=0,$e=se.length;ye<$e;ye++){var Je=v[se[ye][h]];Je!=null&&(ue[ue.length]=Je)}return ue}function z(se){var ue=[];Ot();for(var ye=0,$e=se.length;ye<$e;ye++){var Je=v[se[ye]];Je!=null&&(ue[ue.length]=Je)}return ue}function Q(se){for(var ue=[],ye=0,$e=se.length;ye<$e;ye++)if(se[ye]<p.length){const Je=p[se[ye]];ue[ue.length]=Je&&Je[h]}return ue}function he(se,ue){if(m){if(!m.has(se))throw new Error("[SlickGrid DataView] Invalid id");if(se!==ue[h]){var ye=ue[h];if(ye==null)throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(m.has(ye))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");m.set(ye,m.get(se)),m.delete(se),C&&C[se]&&delete C[se],se=ye}c[m.get(se)]=ue,C||(C={}),C[se]=!0}}function Ee(se,ue){he(se,ue),di()}function lt(se,ue){if(se.length!==ue.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(var ye=0,$e=ue.length;ye<$e;ye++)he(se[ye],ue[ye]);di()}function vt(se,ue){c.splice(se,0,ue),re(se),di()}function it(se,ue){Array.prototype.splice.apply(c,[se,0].concat(ue)),re(se),di()}function wt(se){c.push(se),re(c.length-1),di()}function Ht(se){c=c.concat(se),re(c.length-se.length),di()}function Et(se){if(m)if(S)E.set(se,!0);else{var ue=m.get(se);if(ue===void 0)throw new Error("[SlickGrid DataView] Invalid id");m.delete(se),c.splice(ue,1),re(ue),di()}}function gt(se){if(!(se.length===0||!m))if(S)for(var ue=0,ye=se.length;ue<ye;ue++){var $e=se[ue],Je=m.get($e);if(Je===void 0)throw new Error("[SlickGrid DataView] Invalid id");E.set($e,!0)}else{for(var dt=[],ue=0,ye=se.length;ue<ye;ue++){var $e=se[ue],Je=m.get($e);if(Je===void 0)throw new Error("[SlickGrid DataView] Invalid id");m.delete($e),dt.push(Je)}dt.sort();for(var ue=dt.length-1;ue>=0;--ue)c.splice(dt[ue],1);re(dt[0]),di()}}function ei(se){if(!P)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");vt(zi(se),se)}function Ai(se,ue){if(m){if(!m.has(se)||se!==ue[h])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+m.get(se));if(!P)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");var ye=Fi(se);P(ye,ue)!==0?(Et(se),ei(ue)):Ee(se,ue)}}function zi(se){for(var ue=0,ye=c.length;ue<ye;){var $e=ue+ye>>>1;P(c[$e],se)===-1?ue=$e+1:ye=$e}return ue}function Zt(){return c.length}function Ni(){return p.length}function Bn(se){var ue=p[se];if(ue&&ue.__group&&ue.totals&&!ue.totals.initialized){var ye=de[ue.level];ye.displayTotalsRow||(pn(ue.totals),ue.title=ye.formatter?ye.formatter(ue):ue.value)}else ue&&ue.__groupTotals&&!ue.initialized&&pn(ue);return ue}function fn(se){var ue=p[se];return ue===void 0?null:ue.__group?s.groupItemMetadataProvider.getGroupRowMetadata(ue):ue.__groupTotals?s.groupItemMetadataProvider.getTotalsRowMetadata(ue):null}function Ct(se,ue){if(se==null)for(var ye=0;ye<de.length;ye++)Ie[ye]={},de[ye].collapsed=ue,ue===!0?St.notify({level:ye,groupingKey:null}):Ue.notify({level:ye,groupingKey:null});else Ie[se]={},de[se].collapsed=ue,ue===!0?St.notify({level:se,groupingKey:null}):Ue.notify({level:se,groupingKey:null});di()}function Se(se){Ct(se,!0)}function Xe(se){Ct(se,!1)}function xt(se,ue,ye){Ie[se][ue]=de[se].collapsed^ye,di()}function ti(se){var ue=Array.prototype.slice.call(arguments),ye=ue[0],$e,Je;ue.length===1&&ye.indexOf(xe)!==-1?($e=ye,Je=ye.split(xe).length-1):($e=ue.join(xe),Je=ue.length-1),xt(Je,$e,!0),St.notify({level:Je,groupingKey:$e})}function Ui(se){var ue=Array.prototype.slice.call(arguments),ye=ue[0],$e,Je;ue.length===1&&ye.indexOf(xe)!==-1?(Je=ye.split(xe).length-1,$e=ye):(Je=ue.length-1,$e=ue.join(xe)),xt(Je,$e,!1),Ue.notify({level:Je,groupingKey:$e})}function Gi(){return qe}function Li(se,ue){for(var ye,$e,Je=[],dt={},At,Bt=ue?ue.level+1:0,ui=de[Bt],Ci=0,Ei=ui.predefinedValues.length;Ci<Ei;Ci++)$e=ui.predefinedValues[Ci],ye=dt[$e],ye||(ye=new Slick.Group,ye.value=$e,ye.level=Bt,ye.groupingKey=(ue?ue.groupingKey+xe:"")+$e,Je[Je.length]=ye,dt[$e]=ye);for(var Ci=0,Ei=se.length;Ci<Ei;Ci++)At=se[Ci],$e=ui.getterIsAFn?ui.getter(At):At[ui.getter],ye=dt[$e],ye||(ye=new Slick.Group,ye.value=$e,ye.level=Bt,ye.groupingKey=(ue?ue.groupingKey+xe:"")+$e,Je[Je.length]=ye,dt[$e]=ye),ye.rows[ye.count++]=At;if(Bt<de.length-1)for(var Ci=0;Ci<Je.length;Ci++)ye=Je[Ci],ye.groups=Li(ye.rows,ye);return Je.length&&qt(Je,Bt),Je.sort(de[Bt].comparer),Je}function pn(se){var ue=se.group,ye=de[ue.level],$e=ue.level==de.length,Je,dt=ye.aggregators.length;if(!$e&&ye.aggregateChildGroups)for(var At=ue.groups.length;At--;)ue.groups[At].totals.initialized||pn(ue.groups[At].totals);for(;dt--;)Je=ye.aggregators[dt],Je.init(),!$e&&ye.aggregateChildGroups?ye.compiledAccumulators[dt].call(Je,ue.groups):ye.compiledAccumulators[dt].call(Je,ue.rows),Je.storeResult(se);se.initialized=!0}function Wn(se){var ue=de[se.level],ye=new Slick.GroupTotals;ye.group=se,se.totals=ye,ue.lazyTotalsCalculation||pn(ye)}function qt(se,ue){ue=ue||0;for(var ye=de[ue],$e=ye.collapsed,Je=Ie[ue],dt=se.length,At;dt--;)At=se[dt],!(At.collapsed&&!ye.aggregateCollapsed)&&(At.groups&&qt(At.groups,ue+1),ye.aggregators.length&&(ye.aggregateEmpty||At.rows.length||At.groups&&At.groups.length)&&Wn(At),At.collapsed=$e^Je[At.groupingKey],At.title=ye.formatter?ye.formatter(At):At.value)}function Wi(se,ue){ue=ue||0;for(var ye=de[ue],$e=[],Je,dt=0,At,Bt=0,ui=se.length;Bt<ui;Bt++){if(At=se[Bt],$e[dt++]=At,!At.collapsed){Je=At.groups?Wi(At.groups,ue+1):At.rows;for(var Ci=0,Ei=Je.length;Ci<Ei;Ci++)$e[dt++]=Je[Ci]}At.totals&&ye.displayTotalsRow&&(!At.collapsed||ye.aggregateCollapsed)&&($e[dt++]=At.totals)}return $e}function lr(se){var ue=se.toString(),ye=ue.indexOf("function")>=0,$e=ye?/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/:/^[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/,Je=se.toString().match($e);return{params:Je[1].split(","),body:Je[2]}}function bo(se){if(se.accumulate){var ue=lr(se.accumulate),ye=new Function("_items","for (var "+ue.params[0]+", _i=0, _il=_items.length; _i<_il; _i++) {"+ue.params[0]+" = _items[_i]; "+ue.body+"}"),$e="compiledAccumulatorLoop";return ye.displayName=$e,ye.name=Co(ye,$e),ye}else return function(){}}function er(){var se=lr(_),ue="{ continue _coreloop; }$1",ye="{ _retval[_idx++] = $item$; continue _coreloop; }$1",$e=se.body.replace(/return false\s*([;}]|\}|$)/gi,ue).replace(/return!1([;}]|\}|$)/gi,ue).replace(/return true\s*([;}]|\}|$)/gi,ye).replace(/return!0([;}]|\}|$)/gi,ye).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),Je=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","$filter$; ","} ","return _retval; "].join("");Je=Je.replace(/\$filter\$/gi,$e),Je=Je.replace(/\$item\$/gi,se.params[0]),Je=Je.replace(/\$args\$/gi,se.params[1]);var dt=new Function("_items,_args",Je),At="compiledFilter";return dt.displayName=At,dt.name=Co(dt,At),dt}function tr(){var se=lr(_),ue="{ continue _coreloop; }$1",ye="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",$e=se.body.replace(/return false\s*([;}]|\}|$)/gi,ue).replace(/return!1([;}]|\}|$)/gi,ue).replace(/return true\s*([;}]|\}|$)/gi,ye).replace(/return!0([;}]|\}|$)/gi,ye).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),Je=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","if (_cache[_i]) { ","_retval[_idx++] = $item$; ","continue _coreloop; ","} ","$filter$; ","} ","return _retval; "].join("");Je=Je.replace(/\$filter\$/gi,$e),Je=Je.replace(/\$item\$/gi,se.params[0]),Je=Je.replace(/\$args\$/gi,se.params[1]);var dt=new Function("_items,_args,_cache",Je),At="compiledFilterWithCaching";return dt.displayName=At,dt.name=Co(dt,At),dt}function Co(se,ue){try{Object.defineProperty(se,"name",{writable:!0,value:ue})}catch{se.name=ue}}function mr(se,ue){for(var ye=[],$e=0,Je=0,dt=se.length;Je<dt;Je++)_(se[Je],ue)&&(ye[$e++]=se[Je]);return ye}function ar(se,ue,ye){for(var $e=[],Je=0,dt,At=0,Bt=se.length;At<Bt;At++)dt=se[At],ye[At]?$e[Je++]=dt:_(dt,ue)&&($e[Je++]=dt,ye[At]=!0);return $e}function Sr(se){if(_){var ue=s.inlineFilters?ae:mr,ye=s.inlineFilters?_e:ar;M.isFilterNarrowing?L=ue(L,Z):M.isFilterExpanding?L=ye(se,Z,J):M.isFilterUnchanged||(L=ue(se,Z))}else L=ne?se:se.concat();var $e;return ne?(L.length<=pe*ne&&(L.length===0?pe=0:pe=Math.floor((L.length-1)/ne)),$e=L.slice(ne*pe,ne*pe+ne)):$e=L,{totalRows:L.length,rows:$e}}function $n(se,ue){var ye,$e,Je,dt=[],At=0,Bt=Math.max(ue.length,se.length);M&&M.ignoreDiffsBefore&&(At=Math.max(0,Math.min(ue.length,M.ignoreDiffsBefore))),M&&M.ignoreDiffsAfter&&(Bt=Math.min(ue.length,Math.max(0,M.ignoreDiffsAfter)));for(var ui=At,Ci=se.length;ui<Bt;ui++)ui>=Ci?dt[dt.length]=ui:(ye=ue[ui],$e=se[ui],(!ye||de.length&&(Je=ye.__nonDataRow||$e.__nonDataRow)&&ye.__group!==$e.__group||ye.__group&&!ye.equals($e)||Je&&(ye.__groupTotals||$e.__groupTotals)||ye[h]!=$e[h]||C&&C[ye[h]])&&(dt[dt.length]=ui));return dt}function Vn(se){v=null,(M.isFilterNarrowing!=B.isFilterNarrowing||M.isFilterExpanding!=B.isFilterExpanding)&&(J=[]);var ue=Sr(se);Ve=ue.totalRows;var ye=ue.rows;qe=[],de.length&&(qe=Li(ye),qe.length&&(ye=Wi(qe)));var $e=$n(p,ye);return p=ye,$e}function di(){if(!x){var se=Slick.Utils.extend(!0,{},Ge()),ue=p.length,ye=Ve,$e=Vn(c);ne&&Ve<pe*ne&&(pe=Math.max(0,Math.ceil(Ve/ne)-1),$e=Vn(c)),C=null,B=M,M={},ye!==Ve&&He.notify(se,null,l)!==!1&&ot.notify(Ge(),null,l),ue!==p.length&&ce.notify({previous:ue,current:p.length,itemCount:c.length,dataView:l,callingOnRowsChanged:$e.length>0},null,l),$e.length>0&&Ce.notify({rows:$e,itemCount:c.length,dataView:l,calledOnRowCountChanged:ue!==p.length},null,l),(ue!==p.length||$e.length>0)&&be.notify({rowsDiff:$e,previousRowCount:ue,currentRowCount:p.length,itemCount:c.length,rowCountChanged:ue!==p.length,rowsChanged:$e.length>0,dataView:l},null,l)}}function zn(se,ue,ye){var $e=this;U=se;var Je;Oe=$e.mapRowsToIds(se.getSelectedRows());function dt(Bt){Bt===!1?Oe=[]:Oe.sort().join(",")!==Bt.sort().join(",")&&(Oe=Bt)}function At(){if(Oe.length>0&&!Je){Je=!0;var Bt=$e.mapIdsToRows(Oe);if(!ue){var ui={grid:U,ids:$e.mapRowsToIds(Bt),rows:Bt,dataView:$e};De(ui),Ye.notify(Object.assign(ui,{selectedRowIds:Oe,filteredIds:$e.getAllSelectedFilteredIds()}),new Slick.EventData,$e)}se.setSelectedRows(Bt),Je=!1}}return se.onSelectedRowsChanged.subscribe(function(Bt,ui){if(!Je){var Ci=$e.mapRowsToIds(ui.rows),Ei={grid:U,ids:Ci,rows:ui.rows,added:!0,dataView:$e};De(Ei),Ye.notify(Object.assign(Ei,{selectedRowIds:Oe,filteredIds:$e.getAllSelectedFilteredIds()}),new Slick.EventData,$e)}}),De=function(Bt){if(!Je){Je=!0;var ui=typeof Bt.added>"u";if(ui)dt(Bt.ids);else{var Ci;if(Bt.added)if(ye&&se.getOptions().multiSelect){var Ei=Oe.filter(function(yn){return $e.getRowById(yn)===void 0});Ci=Ei.concat(Bt.ids)}else Ci=Bt.ids;else ye&&se.getOptions().multiSelect?Ci=Oe.filter(function(yn){return Bt.ids.indexOf(yn)===-1}):Ci=[];dt(Ci)}Je=!1}},this.onRowsOrCountChanged.subscribe(At),Ye}function to(){return Oe}function yo(){return vr().map(function(se){return se[h]})}function mn(se,ue){var ye=ue&&ue.isRowBeingAdded,$e=ue&&ue.shouldTriggerEvent,Je=ue&&ue.applyRowSelectionToGrid;ye!==!1&&(ye=!0);var dt=l.mapIdsToRows(se),At={grid:U,ids:se,rows:dt,added:ye,dataView:l};De(At),$e!==!1&&Ye.notify(Object.assign(At,{selectedRowIds:Oe,filteredIds:l.getAllSelectedFilteredIds()}),new Slick.EventData,l),Je!==!1&&U&&U.setSelectedRows(dt)}function ir(){var se=[],ue=to();return ue.forEach(function(ye){se.push(l.getItemById(ye))}),se}function vr(){if(!Array.isArray(Oe))return[];var se=L.filter(function(ue){return Oe.some(function(ye){return ue[h]===ye})});return se||[]}function gr(se,ue){var ye,$e;Je(se.getCellCssStyles(ue));function Je(At){ye={};for(var Bt in At){var ui=p[Bt][h];ye[ui]=At[Bt]}}function dt(){if(ye){$e=!0,Ot();var At={};for(var Bt in ye){var ui=v[Bt];ui!=null&&(At[ui]=ye[Bt])}se.setCellCssStyles(ue,At),$e=!1}}se.onCellCssStylesChanged.subscribe(function(At,Bt){$e||ue==Bt.key&&(Bt.hash?Je(Bt.hash):(se.onCellCssStylesChanged.unsubscribe(),l.onRowsOrCountChanged.unsubscribe(dt)))}),this.onRowsOrCountChanged.subscribe(dt)}Slick.Utils.extend(this,{beginUpdate:ct,endUpdate:k,destroy:ee,setPagingOptions:mt,getPagingInfo:Ge,getIdPropertyName:me,getItems:Fe,setItems:We,setFilter:ve,getFilter:W,getFilteredItems:bi,getFilteredItemCount:q,sort:Le,fastSort:jt,reSort:It,setGrouping:at,getGrouping:ke,groupBy:st,setAggregators:ht,collapseAllGroups:Se,expandAllGroups:Xe,collapseGroup:ti,expandGroup:Ui,getGroups:Gi,getAllSelectedIds:to,getAllSelectedItems:ir,getAllSelectedFilteredIds:yo,getAllSelectedFilteredItems:vr,setSelectedIds:mn,getIdxById:Lt,getRowByItem:zt,getRowById:Kt,getItemById:Fi,getItemByIdx:Dt,mapItemsToRows:Mi,mapRowsToIds:Q,mapIdsToRows:z,setRefreshHints:ge,setFilterArgs:$,refresh:di,updateItem:Ee,updateItems:lt,insertItem:vt,insertItems:it,addItem:wt,addItems:Ht,deleteItem:Et,deleteItems:gt,sortedAddItem:ei,sortedUpdateItem:Ai,syncGridSelection:zn,syncGridCellCssStyles:gr,getItemCount:Zt,getLength:Ni,getItem:Bn,getItemMetadata:fn,onSelectedRowIdsChanged:Ye,onSetItemsCalled:ze,onRowCountChanged:ce,onRowsChanged:Ce,onRowsOrCountChanged:be,onBeforePagingInfoChanged:He,onPagingInfoChanged:ot,onGroupExpanded:Ue,onGroupCollapsed:St})}function t(s){this.field_=s,this.init=function(){this.count_=0,this.nonNullCount_=0,this.sum_=0},this.accumulate=function(l){var u=l[this.field_];this.count_++,u!=null&&u!==""&&!isNaN(u)&&(this.nonNullCount_++,this.sum_+=parseFloat(u))},this.storeResult=function(l){l.avg||(l.avg={}),this.nonNullCount_!==0&&(l.avg[this.field_]=this.sum_/this.nonNullCount_)}}function e(s){this.field_=s,this.init=function(){this.min_=null},this.accumulate=function(l){var u=l[this.field_];u!=null&&u!==""&&!isNaN(u)&&(this.min_==null||u<this.min_)&&(this.min_=u)},this.storeResult=function(l){l.min||(l.min={}),l.min[this.field_]=this.min_}}function n(s){this.field_=s,this.init=function(){this.max_=null},this.accumulate=function(l){var u=l[this.field_];u!=null&&u!==""&&!isNaN(u)&&(this.max_==null||u>this.max_)&&(this.max_=u)},this.storeResult=function(l){l.max||(l.max={}),l.max[this.field_]=this.max_}}function r(s){this.field_=s,this.init=function(){this.sum_=null},this.accumulate=function(l){var u=l[this.field_];u!=null&&u!==""&&!isNaN(u)&&(this.sum_+=parseFloat(u))},this.storeResult=function(l){l.sum||(l.sum={}),l.sum[this.field_]=this.sum_}}function o(s){this.field_=s,this.init=function(){},this.storeResult=function(l){l.count||(l.count={}),l.count[this.field_]=l.group.rows.length}}Slick.Utils.extend(!0,Slick,{Data:{DataView:a,Aggregators:{Avg:t,Min:e,Max:n,Sum:r,Count:o}}})}();const Hv=Us||hs;class hy{get eventHandler(){return this._eventHandler}get gridUid(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getUID())!==null&&e!==void 0?e:""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get locales(){var t,e;return(e=(t=this.gridOptions)===null||t===void 0?void 0:t.locales)!==null&&e!==void 0?e:je.locales}set metrics(t){this.renderMetrics(t)}get leftFooterText(){var t,e;return(e=(t=document.querySelector(`.slick-custom-footer${this.gridUidSelector} .left-footer`))===null||t===void 0?void 0:t.textContent)!==null&&e!==void 0?e:""}set leftFooterText(t){this.renderLeftFooterText(t)}get rightFooterText(){var t,e;return(e=(t=document.querySelector(`.slick-custom-footer${this.gridUidSelector} .right-footer`))===null||t===void 0?void 0:t.textContent)!==null&&e!==void 0?e:""}set rightFooterText(t){this.renderRightFooterText(t)}constructor(t,e,n,r){var o,s,l,u,h,c,p;if(this.grid=t,this.customFooterOptions=e,this.pubSubService=n,this.translaterService=r,this._enableTranslate=!1,this._isLeftFooterOriginallyEmpty=!0,this._isLeftFooterDisplayingSelectionRowCount=!1,this._isRightFooterOriginallyEmpty=!0,this._selectedRowCount=0,this._subscriptions=[],this._bindingHelper=new yv,this._bindingHelper.querySelectorPrefix=`.${this.gridUid} `,this._eventHandler=new Slick.EventHandler,this._enableTranslate=(s=(o=this.gridOptions)===null||o===void 0?void 0:o.enableTranslate)!==null&&s!==void 0?s:!1,this._isLeftFooterOriginallyEmpty=!(!((l=this.gridOptions.customFooterOptions)===null||l===void 0)&&l.leftFooterText),this._isRightFooterOriginallyEmpty=!(!((u=this.gridOptions.customFooterOptions)===null||u===void 0)&&u.rightFooterText),this.registerOnSelectedRowsChangedWhenEnabled(e),this._enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');if(this.translateCustomFooterTexts(),this._enableTranslate&&(!((h=this.pubSubService)===null||h===void 0)&&h.subscribe)){const m=(p=(c=this.translaterService)===null||c===void 0?void 0:c.eventName)!==null&&p!==void 0?p:"onLanguageChange";this._subscriptions.push(this.pubSubService.subscribe(m,()=>this.translateCustomFooterTexts()))}}dispose(){var t;this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingHelper.dispose(),(t=this._footerElement)===null||t===void 0||t.remove()}renderFooter(t){this.translateCustomFooterTexts(),this.createFooterContainer(t)}renderMetrics(t){var e;const n=Hv(t.endTime).format(this.customFooterOptions.dateFormat);this._bindingHelper.setElementAttributeValue("span.last-update-timestamp","textContent",n),this._bindingHelper.setElementAttributeValue("span.item-count","textContent",t.itemCount),this._bindingHelper.setElementAttributeValue("span.total-count","textContent",t.totalItemCount),!((e=this.customFooterOptions.metricTexts)===null||e===void 0)&&e.lastUpdate&&this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"lastUpdate","span.text-last-update","textContent"),this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"items","span.text-items","textContent"),this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"of","span.text-of","textContent")}renderLeftFooterText(t){this._bindingHelper.setElementAttributeValue("div.left-footer","textContent",t)}renderRightFooterText(t){this._bindingHelper.setElementAttributeValue("div.right-footer","textContent",t)}translateCustomFooterTexts(){var t,e,n,r,o;if(this.gridOptions.enableTranslate&&(!((t=this.translaterService)===null||t===void 0)&&t.translate)){this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{};for(const s of Object.keys(this.customFooterOptions.metricTexts))if(s.lastIndexOf("Key")>0){const l=s.substring(0,s.lastIndexOf("Key"));this.customFooterOptions.metricTexts[l]=this.translaterService.translate(this.customFooterOptions.metricTexts[s]||" ")}this._isLeftFooterDisplayingSelectionRowCount&&(this.leftFooterText=`${this._selectedRowCount} ${this.customFooterOptions.metricTexts.itemsSelected}`)}else this.locales&&(this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{},this.customFooterOptions.metricTexts.lastUpdate=this.customFooterOptions.metricTexts.lastUpdate||((e=this.locales)===null||e===void 0?void 0:e.TEXT_LAST_UPDATE)||"TEXT_LAST_UPDATE",this.customFooterOptions.metricTexts.items=this.customFooterOptions.metricTexts.items||((n=this.locales)===null||n===void 0?void 0:n.TEXT_ITEMS)||"TEXT_ITEMS",this.customFooterOptions.metricTexts.itemsSelected=this.customFooterOptions.metricTexts.itemsSelected||((r=this.locales)===null||r===void 0?void 0:r.TEXT_ITEMS_SELECTED)||"TEXT_ITEMS_SELECTED",this.customFooterOptions.metricTexts.of=this.customFooterOptions.metricTexts.of||((o=this.locales)===null||o===void 0?void 0:o.TEXT_OF)||"TEXT_OF")}createFooterContainer(t){const e=Re("div",{className:`slick-custom-footer ${this.gridUid}`,style:{width:"100%",height:`${this.customFooterOptions.footerHeight||20}px`}}),n=Re("div",{className:`left-footer ${this.customFooterOptions.leftContainerClass}`});n.innerHTML=Ln(this.gridOptions,this.customFooterOptions.leftFooterText||""),e.appendChild(n),e.appendChild(this.createFooterRightContainer()),this._footerElement=e,t!=null&&t.appendChild&&this._footerElement&&t.appendChild(this._footerElement)}createFooterRightContainer(){var t,e,n,r,o,s,l,u;const h=Re("div",{className:`right-footer ${this.customFooterOptions.rightContainerClass||""}`});if(!this._isRightFooterOriginallyEmpty)h.innerHTML=Ln(this.gridOptions,this.customFooterOptions.rightFooterText||"");else if(!this.customFooterOptions.hideMetrics){h.classList.add("metrics");const c=Re("span",{className:"timestamp"},h);if(!this.customFooterOptions.hideLastUpdateTimestamp){const p=this.createFooterLastUpdate();p&&c.appendChild(p)}h.appendChild(Re("span",{className:"item-count",textContent:`${(e=(t=this.metrics)===null||t===void 0?void 0:t.itemCount)!==null&&e!==void 0?e:"0"}`})),this.customFooterOptions.hideTotalItemCount||(h.appendChild(document.createTextNode(`\r
134
+ vScrollDir: `+S,alert(y)},Slick.Utils.extend(this,{slickGridVersion:"4.1.5",onScroll:new Slick.Event,onBeforeSort:new Slick.Event,onSort:new Slick.Event,onHeaderMouseEnter:new Slick.Event,onHeaderMouseLeave:new Slick.Event,onHeaderRowMouseEnter:new Slick.Event,onHeaderRowMouseLeave:new Slick.Event,onHeaderContextMenu:new Slick.Event,onHeaderClick:new Slick.Event,onHeaderCellRendered:new Slick.Event,onBeforeHeaderCellDestroy:new Slick.Event,onHeaderRowCellRendered:new Slick.Event,onFooterRowCellRendered:new Slick.Event,onFooterContextMenu:new Slick.Event,onFooterClick:new Slick.Event,onBeforeHeaderRowCellDestroy:new Slick.Event,onBeforeFooterRowCellDestroy:new Slick.Event,onMouseEnter:new Slick.Event,onMouseLeave:new Slick.Event,onClick:new Slick.Event,onDblClick:new Slick.Event,onContextMenu:new Slick.Event,onKeyDown:new Slick.Event,onAddNewRow:new Slick.Event,onBeforeAppendCell:new Slick.Event,onValidationError:new Slick.Event,onViewportChanged:new Slick.Event,onColumnsReordered:new Slick.Event,onColumnsDrag:new Slick.Event,onColumnsResized:new Slick.Event,onColumnsResizeDblClick:new Slick.Event,onBeforeColumnsResize:new Slick.Event,onCellChange:new Slick.Event,onCompositeEditorChange:new Slick.Event,onBeforeEditCell:new Slick.Event,onBeforeCellEditorDestroy:new Slick.Event,onBeforeDestroy:new Slick.Event,onActiveCellChanged:new Slick.Event,onActiveCellPositionChanged:new Slick.Event,onDragInit:new Slick.Event,onDragStart:new Slick.Event,onDrag:new Slick.Event,onDragEnd:new Slick.Event,onSelectedRowsChanged:new Slick.Event,onCellCssStylesChanged:new Slick.Event,onAutosizeColumns:new Slick.Event,onBeforeSetColumns:new Slick.Event,onBeforeUpdateColumns:new Slick.Event,onRendered:new Slick.Event,onSetOptions:new Slick.Event,registerPlugin:qi,unregisterPlugin:wr,getPluginByName:Ho,getColumns:Df,setColumns:Ds,updateColumns:Di,getVisibleColumns:Is,getColumnIndex:_t,updateColumnHeader:el,setSortColumn:kn,setSortColumns:il,getSortColumns:If,autosizeColumns:os,autosizeColumn:Tf,getOptions:Ju,setOptions:sa,getData:Pf,getDataLength:Ri,getDataItem:In,setData:Rf,getSelectionModel:no,setSelectionModel:Tl,getSelectedRows:ka,setSelectedRows:Bd,getContainerNode:da,updatePagingStatusFromView:sl,applyFormatResultToCellNode:Vo,render:Qi,reRenderColumns:_d,invalidate:Dn,invalidateRow:ma,invalidateRows:oc,invalidateAllRows:vn,updateCell:yd,updateRow:ls,getViewport:ga,getRenderedRange:sc,resizeCanvas:Or,updateRowCount:va,scrollRowIntoView:wa,scrollRowToTop:dr,scrollCellIntoView:Ur,scrollColumnIntoView:Xf,getCanvasNode:qn,getUID:Js,getHeaderColumnWidthDiff:$i,getScrollbarDimensions:Un,getHeadersWidth:rn,getCanvasWidth:Kn,getCanvases:xr,getActiveCanvasNode:Zs,getViewportNode:Ol,getViewports:xs,getActiveViewportNode:Al,setActiveViewportNode:Ts,focus:Go,scrollTo:Bo,cacheCssForHiddenInit:es,restoreCssFromHiddenInit:ws,getCellFromPoint:Fl,getCellFromEvent:dl,getActiveCell:oo,setActiveCell:Rc,setActiveRow:Pc,getActiveCellNode:kd,getActiveCellPosition:Ad,resetActiveCell:zr,editActiveCell:Ml,getCellEditor:Sc,getCellNode:Ir,getCellNodeBox:jf,canCellBeSelected:Nd,canCellBeActive:Wr,navigatePrev:Pd,navigateNext:Aa,navigateUp:Dc,navigateDown:hl,navigateLeft:Rd,navigateRight:Ic,navigatePageUp:xc,navigatePageDown:wc,navigateTop:Tc,navigateBottom:Ta,navigateRowStart:Fd,navigateRowEnd:Md,gotoCell:Fc,getTopPanel:tc,getTopPanels:la,setTopPanelVisibility:ic,getPreHeaderPanel:H,getPreHeaderPanelLeft:H,getPreHeaderPanelRight:te,setPreHeaderPanelVisibility:Rs,getHeader:hi,getHeaderColumn:g,setHeaderRowVisibility:aa,getHeaderRow:w,getHeaderRowColumn:we,setFooterRowVisibility:Dl,getFooterRow:R,getFooterRowColumn:Be,getGridPosition:Qn,flashCell:zf,addCellCssStyles:zo,setCellCssStyles:hc,removeCellCssStyles:Bf,getCellCssStyles:Vf,getFrozenRowOffset:Od,setColumnHeaderVisibility:bd,sanitizeHtmlString:$o,getDisplayedScrollbarDimensions:Ao,getAbsoluteColumnMinWidth:fd,init:Ks,destroy:vd,getEditorLock:Ne,getEditController:Me}),xl()}Slick.Utils.extend(Slick,{Grid:e})})(),function(){function a(s){var l=this,u={groupItemMetadataProvider:null,inlineFilters:!1},h="id",c=[],p=[],m=new Map,v=null,_=null,C=null,x=!1,S=!1,E=new Map,D=!0,A,P,M={},B={},Z,L=[],ae,_e,J=[],U=null,F={getter:null,formatter:null,comparer:function(se,ue){return se.value===ue.value?0:se.value>ue.value?1:-1},predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},de=[],qe=[],Ie=[],xe=":|:",Oe=null,De,ne=0,pe=0,Ve=0,Ye=new Slick.Event,ze=new Slick.Event,ce=new Slick.Event,Ce=new Slick.Event,be=new Slick.Event,He=new Slick.Event,ot=new Slick.Event,Ue=new Slick.Event,St=new Slick.Event;s=Slick.Utils.extend(!0,{},u,s);function ct(se){x=!0,S=se===!0}function k(){var se=S;S=!1,x=!1,se&&(X(),Pe()),di()}function ee(){c=[],m=null,v=null,_=null,C=null,P=null,J=[],L=[],ae=null,_e=null,U&&U.onSelectedRowsChanged&&U.onCellCssStylesChanged&&(U.onSelectedRowsChanged.unsubscribe(),U.onCellCssStylesChanged.unsubscribe()),l.onRowsOrCountChanged&&l.onRowsOrCountChanged.unsubscribe()}function ge(se){M=se}function $(se){Z=se}function X(){if(m){for(var se,ue,ye=0,$e=0,Je=c.length;$e<Je;$e++){if(ue=c[$e],se=ue[h],se===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");E.has(se)?m.delete(se):(c[ye]=ue,m.set(se,ye),++ye)}c.length=ye,E=new Map}}function re(se){if(!(S||!m)){se=se||0;for(var ue,ye=se,$e=c.length;ye<$e;ye++){if(ue=c[ye][h],ue===void 0)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");m.set(ue,ye)}}}function Pe(){if(!(S||!m)){for(var se,ue=0,ye=c.length;ue<ye;ue++)if(se=c[ue][h],se===void 0||m.get(se)!==ue)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}}function Fe(){return c}function me(){return h}function We(se,ue){ue!==void 0&&(h=ue),c=L=se,ze.notify({idProperty:ue,itemCount:c.length},null,l),m=new Map,re(),Pe(),di()}function mt(se){He.notify(Ge(),null,l).getReturnValue()!==!1&&(se.pageSize!=null&&(ne=se.pageSize,pe=ne?Math.min(pe,Math.max(0,Math.ceil(Ve/ne)-1)):0),se.pageNum!=null&&(pe=Math.min(se.pageNum,Math.max(0,Math.ceil(Ve/ne)-1))),ot.notify(Ge(),null,l),di())}function Ge(){var se=ne?Math.max(1,Math.ceil(Ve/ne)):1;return{pageSize:ne,pageNum:pe,totalRows:Ve,totalPages:se,dataView:l}}function Le(se,ue){D=ue,P=se,A=null,ue===!1&&c.reverse(),c.sort(se),ue===!1&&c.reverse(),m=new Map,re(),di()}function jt(se,ue){D=ue,A=se,P=null;var ye=Object.prototype.toString;Object.prototype.toString=typeof se=="function"?se:function(){return this[se]},ue===!1&&c.reverse(),c.sort(),Object.prototype.toString=ye,ue===!1&&c.reverse(),m=new Map,re(),di()}function It(){P?Le(P,D):A&&jt(A,D)}function bi(){return L}function q(){return L.length}function W(){return _}function ve(se){_=se,s.inlineFilters&&(ae=er(),_e=tr()),di()}function ke(){return de}function at(se){s.groupItemMetadataProvider||(s.groupItemMetadataProvider=new Slick.Data.GroupItemMetadataProvider),qe=[],Ie=[],se=se||[],de=se instanceof Array?se:[se];for(var ue=0;ue<de.length;ue++){var ye=de[ue]=Slick.Utils.extend(!0,{},F,de[ue]);ye.getterIsAFn=typeof ye.getter=="function",ye.compiledAccumulators=[];for(var $e=ye.aggregators.length;$e--;)ye.compiledAccumulators[$e]=bo(ye.aggregators[$e]);Ie[ue]={}}di()}function st(se,ue,ye){if(se==null){at([]);return}at({getter:se,formatter:ue,comparer:ye})}function ht(se,ue){if(!de.length)throw new Error("[SlickGrid DataView] At least one grouping must be specified before calling setAggregators().");de[0].aggregators=se,de[0].aggregateCollapsed=ue,at(de)}function Dt(se){return c[se]}function Lt(se){return m&&m.get(se)}function Ot(){if(!v){v={};for(var se=0,ue=p.length;se<ue;se++)v[p[se][h]]=se}}function zt(se){return Ot(),v[se[h]]}function Kt(se){return Ot(),v[se]}function Fi(se){return c[m&&m.get(se)]}function Mi(se){var ue=[];Ot();for(var ye=0,$e=se.length;ye<$e;ye++){var Je=v[se[ye][h]];Je!=null&&(ue[ue.length]=Je)}return ue}function z(se){var ue=[];Ot();for(var ye=0,$e=se.length;ye<$e;ye++){var Je=v[se[ye]];Je!=null&&(ue[ue.length]=Je)}return ue}function Q(se){for(var ue=[],ye=0,$e=se.length;ye<$e;ye++)if(se[ye]<p.length){const Je=p[se[ye]];ue[ue.length]=Je&&Je[h]}return ue}function he(se,ue){if(m){if(!m.has(se))throw new Error("[SlickGrid DataView] Invalid id");if(se!==ue[h]){var ye=ue[h];if(ye==null)throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(m.has(ye))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");m.set(ye,m.get(se)),m.delete(se),C&&C[se]&&delete C[se],se=ye}c[m.get(se)]=ue,C||(C={}),C[se]=!0}}function Ee(se,ue){he(se,ue),di()}function lt(se,ue){if(se.length!==ue.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(var ye=0,$e=ue.length;ye<$e;ye++)he(se[ye],ue[ye]);di()}function vt(se,ue){c.splice(se,0,ue),re(se),di()}function it(se,ue){Array.prototype.splice.apply(c,[se,0].concat(ue)),re(se),di()}function wt(se){c.push(se),re(c.length-1),di()}function Ht(se){c=c.concat(se),re(c.length-se.length),di()}function Et(se){if(m)if(S)E.set(se,!0);else{var ue=m.get(se);if(ue===void 0)throw new Error("[SlickGrid DataView] Invalid id");m.delete(se),c.splice(ue,1),re(ue),di()}}function gt(se){if(!(se.length===0||!m))if(S)for(var ue=0,ye=se.length;ue<ye;ue++){var $e=se[ue],Je=m.get($e);if(Je===void 0)throw new Error("[SlickGrid DataView] Invalid id");E.set($e,!0)}else{for(var dt=[],ue=0,ye=se.length;ue<ye;ue++){var $e=se[ue],Je=m.get($e);if(Je===void 0)throw new Error("[SlickGrid DataView] Invalid id");m.delete($e),dt.push(Je)}dt.sort();for(var ue=dt.length-1;ue>=0;--ue)c.splice(dt[ue],1);re(dt[0]),di()}}function ei(se){if(!P)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");vt(zi(se),se)}function Ai(se,ue){if(m){if(!m.has(se)||se!==ue[h])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+m.get(se));if(!P)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");var ye=Fi(se);P(ye,ue)!==0?(Et(se),ei(ue)):Ee(se,ue)}}function zi(se){for(var ue=0,ye=c.length;ue<ye;){var $e=ue+ye>>>1;P(c[$e],se)===-1?ue=$e+1:ye=$e}return ue}function Zt(){return c.length}function Ni(){return p.length}function Bn(se){var ue=p[se];if(ue&&ue.__group&&ue.totals&&!ue.totals.initialized){var ye=de[ue.level];ye.displayTotalsRow||(pn(ue.totals),ue.title=ye.formatter?ye.formatter(ue):ue.value)}else ue&&ue.__groupTotals&&!ue.initialized&&pn(ue);return ue}function fn(se){var ue=p[se];return ue===void 0?null:ue.__group?s.groupItemMetadataProvider.getGroupRowMetadata(ue):ue.__groupTotals?s.groupItemMetadataProvider.getTotalsRowMetadata(ue):null}function Ct(se,ue){if(se==null)for(var ye=0;ye<de.length;ye++)Ie[ye]={},de[ye].collapsed=ue,ue===!0?St.notify({level:ye,groupingKey:null}):Ue.notify({level:ye,groupingKey:null});else Ie[se]={},de[se].collapsed=ue,ue===!0?St.notify({level:se,groupingKey:null}):Ue.notify({level:se,groupingKey:null});di()}function Se(se){Ct(se,!0)}function Xe(se){Ct(se,!1)}function xt(se,ue,ye){Ie[se][ue]=de[se].collapsed^ye,di()}function ti(se){var ue=Array.prototype.slice.call(arguments),ye=ue[0],$e,Je;ue.length===1&&ye.indexOf(xe)!==-1?($e=ye,Je=ye.split(xe).length-1):($e=ue.join(xe),Je=ue.length-1),xt(Je,$e,!0),St.notify({level:Je,groupingKey:$e})}function Ui(se){var ue=Array.prototype.slice.call(arguments),ye=ue[0],$e,Je;ue.length===1&&ye.indexOf(xe)!==-1?(Je=ye.split(xe).length-1,$e=ye):(Je=ue.length-1,$e=ue.join(xe)),xt(Je,$e,!1),Ue.notify({level:Je,groupingKey:$e})}function Gi(){return qe}function Li(se,ue){for(var ye,$e,Je=[],dt={},At,Bt=ue?ue.level+1:0,ui=de[Bt],Ci=0,Ei=ui.predefinedValues.length;Ci<Ei;Ci++)$e=ui.predefinedValues[Ci],ye=dt[$e],ye||(ye=new Slick.Group,ye.value=$e,ye.level=Bt,ye.groupingKey=(ue?ue.groupingKey+xe:"")+$e,Je[Je.length]=ye,dt[$e]=ye);for(var Ci=0,Ei=se.length;Ci<Ei;Ci++)At=se[Ci],$e=ui.getterIsAFn?ui.getter(At):At[ui.getter],ye=dt[$e],ye||(ye=new Slick.Group,ye.value=$e,ye.level=Bt,ye.groupingKey=(ue?ue.groupingKey+xe:"")+$e,Je[Je.length]=ye,dt[$e]=ye),ye.rows[ye.count++]=At;if(Bt<de.length-1)for(var Ci=0;Ci<Je.length;Ci++)ye=Je[Ci],ye.groups=Li(ye.rows,ye);return Je.length&&qt(Je,Bt),Je.sort(de[Bt].comparer),Je}function pn(se){var ue=se.group,ye=de[ue.level],$e=ue.level==de.length,Je,dt=ye.aggregators.length;if(!$e&&ye.aggregateChildGroups)for(var At=ue.groups.length;At--;)ue.groups[At].totals.initialized||pn(ue.groups[At].totals);for(;dt--;)Je=ye.aggregators[dt],Je.init(),!$e&&ye.aggregateChildGroups?ye.compiledAccumulators[dt].call(Je,ue.groups):ye.compiledAccumulators[dt].call(Je,ue.rows),Je.storeResult(se);se.initialized=!0}function Wn(se){var ue=de[se.level],ye=new Slick.GroupTotals;ye.group=se,se.totals=ye,ue.lazyTotalsCalculation||pn(ye)}function qt(se,ue){ue=ue||0;for(var ye=de[ue],$e=ye.collapsed,Je=Ie[ue],dt=se.length,At;dt--;)At=se[dt],!(At.collapsed&&!ye.aggregateCollapsed)&&(At.groups&&qt(At.groups,ue+1),ye.aggregators.length&&(ye.aggregateEmpty||At.rows.length||At.groups&&At.groups.length)&&Wn(At),At.collapsed=$e^Je[At.groupingKey],At.title=ye.formatter?ye.formatter(At):At.value)}function Wi(se,ue){ue=ue||0;for(var ye=de[ue],$e=[],Je,dt=0,At,Bt=0,ui=se.length;Bt<ui;Bt++){if(At=se[Bt],$e[dt++]=At,!At.collapsed){Je=At.groups?Wi(At.groups,ue+1):At.rows;for(var Ci=0,Ei=Je.length;Ci<Ei;Ci++)$e[dt++]=Je[Ci]}At.totals&&ye.displayTotalsRow&&(!At.collapsed||ye.aggregateCollapsed)&&($e[dt++]=At.totals)}return $e}function lr(se){var ue=se.toString(),ye=ue.indexOf("function")>=0,$e=ye?/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/:/^[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/,Je=se.toString().match($e);return{params:Je[1].split(","),body:Je[2]}}function bo(se){if(se.accumulate){var ue=lr(se.accumulate),ye=new Function("_items","for (var "+ue.params[0]+", _i=0, _il=_items.length; _i<_il; _i++) {"+ue.params[0]+" = _items[_i]; "+ue.body+"}"),$e="compiledAccumulatorLoop";return ye.displayName=$e,ye.name=Co(ye,$e),ye}else return function(){}}function er(){var se=lr(_),ue="{ continue _coreloop; }$1",ye="{ _retval[_idx++] = $item$; continue _coreloop; }$1",$e=se.body.replace(/return false\s*([;}]|\}|$)/gi,ue).replace(/return!1([;}]|\}|$)/gi,ue).replace(/return true\s*([;}]|\}|$)/gi,ye).replace(/return!0([;}]|\}|$)/gi,ye).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),Je=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","$filter$; ","} ","return _retval; "].join("");Je=Je.replace(/\$filter\$/gi,$e),Je=Je.replace(/\$item\$/gi,se.params[0]),Je=Je.replace(/\$args\$/gi,se.params[1]);var dt=new Function("_items,_args",Je),At="compiledFilter";return dt.displayName=At,dt.name=Co(dt,At),dt}function tr(){var se=lr(_),ue="{ continue _coreloop; }$1",ye="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",$e=se.body.replace(/return false\s*([;}]|\}|$)/gi,ue).replace(/return!1([;}]|\}|$)/gi,ue).replace(/return true\s*([;}]|\}|$)/gi,ye).replace(/return!0([;}]|\}|$)/gi,ye).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),Je=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","if (_cache[_i]) { ","_retval[_idx++] = $item$; ","continue _coreloop; ","} ","$filter$; ","} ","return _retval; "].join("");Je=Je.replace(/\$filter\$/gi,$e),Je=Je.replace(/\$item\$/gi,se.params[0]),Je=Je.replace(/\$args\$/gi,se.params[1]);var dt=new Function("_items,_args,_cache",Je),At="compiledFilterWithCaching";return dt.displayName=At,dt.name=Co(dt,At),dt}function Co(se,ue){try{Object.defineProperty(se,"name",{writable:!0,value:ue})}catch{se.name=ue}}function mr(se,ue){for(var ye=[],$e=0,Je=0,dt=se.length;Je<dt;Je++)_(se[Je],ue)&&(ye[$e++]=se[Je]);return ye}function ar(se,ue,ye){for(var $e=[],Je=0,dt,At=0,Bt=se.length;At<Bt;At++)dt=se[At],ye[At]?$e[Je++]=dt:_(dt,ue)&&($e[Je++]=dt,ye[At]=!0);return $e}function Sr(se){if(_){var ue=s.inlineFilters?ae:mr,ye=s.inlineFilters?_e:ar;M.isFilterNarrowing?L=ue(L,Z):M.isFilterExpanding?L=ye(se,Z,J):M.isFilterUnchanged||(L=ue(se,Z))}else L=ne?se:se.concat();var $e;return ne?(L.length<=pe*ne&&(L.length===0?pe=0:pe=Math.floor((L.length-1)/ne)),$e=L.slice(ne*pe,ne*pe+ne)):$e=L,{totalRows:L.length,rows:$e}}function $n(se,ue){var ye,$e,Je,dt=[],At=0,Bt=Math.max(ue.length,se.length);M&&M.ignoreDiffsBefore&&(At=Math.max(0,Math.min(ue.length,M.ignoreDiffsBefore))),M&&M.ignoreDiffsAfter&&(Bt=Math.min(ue.length,Math.max(0,M.ignoreDiffsAfter)));for(var ui=At,Ci=se.length;ui<Bt;ui++)ui>=Ci?dt[dt.length]=ui:(ye=ue[ui],$e=se[ui],(!ye||de.length&&(Je=ye.__nonDataRow||$e.__nonDataRow)&&ye.__group!==$e.__group||ye.__group&&!ye.equals($e)||Je&&(ye.__groupTotals||$e.__groupTotals)||ye[h]!=$e[h]||C&&C[ye[h]])&&(dt[dt.length]=ui));return dt}function Vn(se){v=null,(M.isFilterNarrowing!=B.isFilterNarrowing||M.isFilterExpanding!=B.isFilterExpanding)&&(J=[]);var ue=Sr(se);Ve=ue.totalRows;var ye=ue.rows;qe=[],de.length&&(qe=Li(ye),qe.length&&(ye=Wi(qe)));var $e=$n(p,ye);return p=ye,$e}function di(){if(!x){var se=Slick.Utils.extend(!0,{},Ge()),ue=p.length,ye=Ve,$e=Vn(c);ne&&Ve<pe*ne&&(pe=Math.max(0,Math.ceil(Ve/ne)-1),$e=Vn(c)),C=null,B=M,M={},ye!==Ve&&He.notify(se,null,l)!==!1&&ot.notify(Ge(),null,l),ue!==p.length&&ce.notify({previous:ue,current:p.length,itemCount:c.length,dataView:l,callingOnRowsChanged:$e.length>0},null,l),$e.length>0&&Ce.notify({rows:$e,itemCount:c.length,dataView:l,calledOnRowCountChanged:ue!==p.length},null,l),(ue!==p.length||$e.length>0)&&be.notify({rowsDiff:$e,previousRowCount:ue,currentRowCount:p.length,itemCount:c.length,rowCountChanged:ue!==p.length,rowsChanged:$e.length>0,dataView:l},null,l)}}function zn(se,ue,ye){var $e=this;U=se;var Je;Oe=$e.mapRowsToIds(se.getSelectedRows());function dt(Bt){Bt===!1?Oe=[]:Oe.sort().join(",")!==Bt.sort().join(",")&&(Oe=Bt)}function At(){if(Oe.length>0&&!Je){Je=!0;var Bt=$e.mapIdsToRows(Oe);if(!ue){var ui={grid:U,ids:$e.mapRowsToIds(Bt),rows:Bt,dataView:$e};De(ui),Ye.notify(Object.assign(ui,{selectedRowIds:Oe,filteredIds:$e.getAllSelectedFilteredIds()}),new Slick.EventData,$e)}se.setSelectedRows(Bt),Je=!1}}return se.onSelectedRowsChanged.subscribe(function(Bt,ui){if(!Je){var Ci=$e.mapRowsToIds(ui.rows),Ei={grid:U,ids:Ci,rows:ui.rows,added:!0,dataView:$e};De(Ei),Ye.notify(Object.assign(Ei,{selectedRowIds:Oe,filteredIds:$e.getAllSelectedFilteredIds()}),new Slick.EventData,$e)}}),De=function(Bt){if(!Je){Je=!0;var ui=typeof Bt.added>"u";if(ui)dt(Bt.ids);else{var Ci;if(Bt.added)if(ye&&se.getOptions().multiSelect){var Ei=Oe.filter(function(yn){return $e.getRowById(yn)===void 0});Ci=Ei.concat(Bt.ids)}else Ci=Bt.ids;else ye&&se.getOptions().multiSelect?Ci=Oe.filter(function(yn){return Bt.ids.indexOf(yn)===-1}):Ci=[];dt(Ci)}Je=!1}},this.onRowsOrCountChanged.subscribe(At),Ye}function to(){return Oe}function yo(){return vr().map(function(se){return se[h]})}function mn(se,ue){var ye=ue&&ue.isRowBeingAdded,$e=ue&&ue.shouldTriggerEvent,Je=ue&&ue.applyRowSelectionToGrid;ye!==!1&&(ye=!0);var dt=l.mapIdsToRows(se),At={grid:U,ids:se,rows:dt,added:ye,dataView:l};De(At),$e!==!1&&Ye.notify(Object.assign(At,{selectedRowIds:Oe,filteredIds:l.getAllSelectedFilteredIds()}),new Slick.EventData,l),Je!==!1&&U&&U.setSelectedRows(dt)}function ir(){var se=[],ue=to();return ue.forEach(function(ye){se.push(l.getItemById(ye))}),se}function vr(){if(!Array.isArray(Oe))return[];var se=L.filter(function(ue){return Oe.some(function(ye){return ue[h]===ye})});return se||[]}function gr(se,ue){var ye,$e;Je(se.getCellCssStyles(ue));function Je(At){ye={};for(var Bt in At){var ui=p[Bt][h];ye[ui]=At[Bt]}}function dt(){if(ye){$e=!0,Ot();var At={};for(var Bt in ye){var ui=v[Bt];ui!=null&&(At[ui]=ye[Bt])}se.setCellCssStyles(ue,At),$e=!1}}se.onCellCssStylesChanged.subscribe(function(At,Bt){$e||ue==Bt.key&&(Bt.hash?Je(Bt.hash):(se.onCellCssStylesChanged.unsubscribe(),l.onRowsOrCountChanged.unsubscribe(dt)))}),this.onRowsOrCountChanged.subscribe(dt)}Slick.Utils.extend(this,{beginUpdate:ct,endUpdate:k,destroy:ee,setPagingOptions:mt,getPagingInfo:Ge,getIdPropertyName:me,getItems:Fe,setItems:We,setFilter:ve,getFilter:W,getFilteredItems:bi,getFilteredItemCount:q,sort:Le,fastSort:jt,reSort:It,setGrouping:at,getGrouping:ke,groupBy:st,setAggregators:ht,collapseAllGroups:Se,expandAllGroups:Xe,collapseGroup:ti,expandGroup:Ui,getGroups:Gi,getAllSelectedIds:to,getAllSelectedItems:ir,getAllSelectedFilteredIds:yo,getAllSelectedFilteredItems:vr,setSelectedIds:mn,getIdxById:Lt,getRowByItem:zt,getRowById:Kt,getItemById:Fi,getItemByIdx:Dt,mapItemsToRows:Mi,mapRowsToIds:Q,mapIdsToRows:z,setRefreshHints:ge,setFilterArgs:$,refresh:di,updateItem:Ee,updateItems:lt,insertItem:vt,insertItems:it,addItem:wt,addItems:Ht,deleteItem:Et,deleteItems:gt,sortedAddItem:ei,sortedUpdateItem:Ai,syncGridSelection:zn,syncGridCellCssStyles:gr,getItemCount:Zt,getLength:Ni,getItem:Bn,getItemMetadata:fn,onSelectedRowIdsChanged:Ye,onSetItemsCalled:ze,onRowCountChanged:ce,onRowsChanged:Ce,onRowsOrCountChanged:be,onBeforePagingInfoChanged:He,onPagingInfoChanged:ot,onGroupExpanded:Ue,onGroupCollapsed:St})}function t(s){this.field_=s,this.init=function(){this.count_=0,this.nonNullCount_=0,this.sum_=0},this.accumulate=function(l){var u=l[this.field_];this.count_++,u!=null&&u!==""&&!isNaN(u)&&(this.nonNullCount_++,this.sum_+=parseFloat(u))},this.storeResult=function(l){l.avg||(l.avg={}),this.nonNullCount_!==0&&(l.avg[this.field_]=this.sum_/this.nonNullCount_)}}function e(s){this.field_=s,this.init=function(){this.min_=null},this.accumulate=function(l){var u=l[this.field_];u!=null&&u!==""&&!isNaN(u)&&(this.min_==null||u<this.min_)&&(this.min_=u)},this.storeResult=function(l){l.min||(l.min={}),l.min[this.field_]=this.min_}}function n(s){this.field_=s,this.init=function(){this.max_=null},this.accumulate=function(l){var u=l[this.field_];u!=null&&u!==""&&!isNaN(u)&&(this.max_==null||u>this.max_)&&(this.max_=u)},this.storeResult=function(l){l.max||(l.max={}),l.max[this.field_]=this.max_}}function r(s){this.field_=s,this.init=function(){this.sum_=null},this.accumulate=function(l){var u=l[this.field_];u!=null&&u!==""&&!isNaN(u)&&(this.sum_+=parseFloat(u))},this.storeResult=function(l){l.sum||(l.sum={}),l.sum[this.field_]=this.sum_}}function o(s){this.field_=s,this.init=function(){},this.storeResult=function(l){l.count||(l.count={}),l.count[this.field_]=l.group.rows.length}}Slick.Utils.extend(!0,Slick,{Data:{DataView:a,Aggregators:{Avg:t,Min:e,Max:n,Sum:r,Count:o}}})}();const Hv=Us||hs;class hy{get eventHandler(){return this._eventHandler}get gridUid(){var t,e;return(e=(t=this.grid)===null||t===void 0?void 0:t.getUID())!==null&&e!==void 0?e:""}get gridUidSelector(){return this.gridUid?`.${this.gridUid}`:""}get gridOptions(){return this.grid&&this.grid.getOptions?this.grid.getOptions():{}}get locales(){var t,e;return(e=(t=this.gridOptions)===null||t===void 0?void 0:t.locales)!==null&&e!==void 0?e:je.locales}set metrics(t){this.renderMetrics(t)}get leftFooterText(){var t,e;return(e=(t=document.querySelector(`.slick-custom-footer${this.gridUidSelector} .left-footer`))===null||t===void 0?void 0:t.textContent)!==null&&e!==void 0?e:""}set leftFooterText(t){this.renderLeftFooterText(t)}get rightFooterText(){var t,e;return(e=(t=document.querySelector(`.slick-custom-footer${this.gridUidSelector} .right-footer`))===null||t===void 0?void 0:t.textContent)!==null&&e!==void 0?e:""}set rightFooterText(t){this.renderRightFooterText(t)}constructor(t,e,n,r){var o,s,l,u,h,c,p;if(this.grid=t,this.customFooterOptions=e,this.pubSubService=n,this.translaterService=r,this._enableTranslate=!1,this._isLeftFooterOriginallyEmpty=!0,this._isLeftFooterDisplayingSelectionRowCount=!1,this._isRightFooterOriginallyEmpty=!0,this._selectedRowCount=0,this._subscriptions=[],this._bindingHelper=new yv,this._bindingHelper.querySelectorPrefix=`.${this.gridUid} `,this._eventHandler=new Slick.EventHandler,this._enableTranslate=(s=(o=this.gridOptions)===null||o===void 0?void 0:o.enableTranslate)!==null&&s!==void 0?s:!1,this._isLeftFooterOriginallyEmpty=!(!((l=this.gridOptions.customFooterOptions)===null||l===void 0)&&l.leftFooterText),this._isRightFooterOriginallyEmpty=!(!((u=this.gridOptions.customFooterOptions)===null||u===void 0)&&u.rightFooterText),this.registerOnSelectedRowsChangedWhenEnabled(e),this._enableTranslate&&(!this.translaterService||!this.translaterService.translate))throw new Error('[Slickgrid-Universal] requires a Translate Service to be installed and configured when the grid option "enableTranslate" is enabled.');if(this.translateCustomFooterTexts(),this._enableTranslate&&(!((h=this.pubSubService)===null||h===void 0)&&h.subscribe)){const m=(p=(c=this.translaterService)===null||c===void 0?void 0:c.eventName)!==null&&p!==void 0?p:"onLanguageChange";this._subscriptions.push(this.pubSubService.subscribe(m,()=>this.translateCustomFooterTexts()))}}dispose(){var t;this._eventHandler.unsubscribeAll(),this.pubSubService.unsubscribeAll(this._subscriptions),this._bindingHelper.dispose(),(t=this._footerElement)===null||t===void 0||t.remove()}renderFooter(t){this.translateCustomFooterTexts(),this.createFooterContainer(t)}renderMetrics(t){var e;const n=Hv(t.endTime).format(this.customFooterOptions.dateFormat);this._bindingHelper.setElementAttributeValue("span.last-update-timestamp","textContent",n),this._bindingHelper.setElementAttributeValue("span.item-count","textContent",t.itemCount),this._bindingHelper.setElementAttributeValue("span.total-count","textContent",t.totalItemCount),!((e=this.customFooterOptions.metricTexts)===null||e===void 0)&&e.lastUpdate&&this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"lastUpdate","span.text-last-update","textContent"),this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"items","span.text-items","textContent"),this._bindingHelper.addElementBinding(this.customFooterOptions.metricTexts,"of","span.text-of","textContent")}renderLeftFooterText(t){this._bindingHelper.setElementAttributeValue("div.left-footer","textContent",t)}renderRightFooterText(t){this._bindingHelper.setElementAttributeValue("div.right-footer","textContent",t)}translateCustomFooterTexts(){var t,e,n,r,o;if(this.gridOptions.enableTranslate&&(!((t=this.translaterService)===null||t===void 0)&&t.translate)){this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{};for(const s of Object.keys(this.customFooterOptions.metricTexts))if(s.lastIndexOf("Key")>0){const l=s.substring(0,s.lastIndexOf("Key"));this.customFooterOptions.metricTexts[l]=this.translaterService.translate(this.customFooterOptions.metricTexts[s]||" ")}this._isLeftFooterDisplayingSelectionRowCount&&(this.leftFooterText=`${this._selectedRowCount} ${this.customFooterOptions.metricTexts.itemsSelected}`)}else this.locales&&(this.customFooterOptions.metricTexts=this.customFooterOptions.metricTexts||{},this.customFooterOptions.metricTexts.lastUpdate=this.customFooterOptions.metricTexts.lastUpdate||((e=this.locales)===null||e===void 0?void 0:e.TEXT_LAST_UPDATE)||"TEXT_LAST_UPDATE",this.customFooterOptions.metricTexts.items=this.customFooterOptions.metricTexts.items||((n=this.locales)===null||n===void 0?void 0:n.TEXT_ITEMS)||"TEXT_ITEMS",this.customFooterOptions.metricTexts.itemsSelected=this.customFooterOptions.metricTexts.itemsSelected||((r=this.locales)===null||r===void 0?void 0:r.TEXT_ITEMS_SELECTED)||"TEXT_ITEMS_SELECTED",this.customFooterOptions.metricTexts.of=this.customFooterOptions.metricTexts.of||((o=this.locales)===null||o===void 0?void 0:o.TEXT_OF)||"TEXT_OF")}createFooterContainer(t){const e=Re("div",{className:`slick-custom-footer ${this.gridUid}`,style:{width:"100%",height:`${this.customFooterOptions.footerHeight||20}px`}}),n=Re("div",{className:`left-footer ${this.customFooterOptions.leftContainerClass}`});n.innerHTML=Ln(this.gridOptions,this.customFooterOptions.leftFooterText||""),e.appendChild(n),e.appendChild(this.createFooterRightContainer()),this._footerElement=e,t!=null&&t.appendChild&&this._footerElement&&t.appendChild(this._footerElement)}createFooterRightContainer(){var t,e,n,r,o,s,l,u;const h=Re("div",{className:`right-footer ${this.customFooterOptions.rightContainerClass||""}`});if(!this._isRightFooterOriginallyEmpty)h.innerHTML=Ln(this.gridOptions,this.customFooterOptions.rightFooterText||"");else if(!this.customFooterOptions.hideMetrics){h.classList.add("metrics");const c=Re("span",{className:"timestamp"},h);if(!this.customFooterOptions.hideLastUpdateTimestamp){const p=this.createFooterLastUpdate();p&&c.appendChild(p)}h.appendChild(Re("span",{className:"item-count",textContent:`${(e=(t=this.metrics)===null||t===void 0?void 0:t.itemCount)!==null&&e!==void 0?e:"0"}`})),this.customFooterOptions.hideTotalItemCount||(h.appendChild(document.createTextNode(`\r
135
135
  `)),h.appendChild(Re("span",{className:"text-of",textContent:` ${(r=(n=this.customFooterOptions.metricTexts)===null||n===void 0?void 0:n.of)!==null&&r!==void 0?r:"of"} `})),h.appendChild(document.createTextNode(`\r
136
136
  `)),h.appendChild(Re("span",{className:"total-count",textContent:`${(s=(o=this.metrics)===null||o===void 0?void 0:o.totalItemCount)!==null&&s!==void 0?s:"0"}`}))),h.appendChild(document.createTextNode(`\r
137
137
  `)),h.appendChild(Re("span",{className:"text-items",textContent:` ${(u=(l=this.customFooterOptions.metricTexts)===null||l===void 0?void 0:l.items)!==null&&u!==void 0?u:"items"} `}))}return h}createFooterLastUpdate(){var t,e,n,r;const o=(n=(e=(t=this.customFooterOptions)===null||t===void 0?void 0:t.metricTexts)===null||e===void 0?void 0:e.lastUpdate)!==null&&n!==void 0?n:"Last Update",s=Hv((r=this.metrics)===null||r===void 0?void 0:r.endTime).format(this.customFooterOptions.dateFormat),l=Re("span");return l.appendChild(Re("span",{className:"text-last-update",textContent:o})),l.appendChild(document.createTextNode(`\r