slick-table 0.0.8 → 0.0.9

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.
Files changed (24) hide show
  1. package/dist/index.cjs.js +2 -2
  2. package/dist/tsconfig.build-types.tsbuildinfo +1 -1
  3. package/dist/types/features/context-menu/ui/ButtonDownloadCSV/ButtonDownloadCSV.d.ts +2 -0
  4. package/dist/types/features/context-menu/ui/ButtonDownloadCSV/ButtonDownloadCSV.d.ts.map +1 -1
  5. package/dist/types/features/context-menu/ui/ContextMenu.d.ts +6 -1
  6. package/dist/types/features/context-menu/ui/ContextMenu.d.ts.map +1 -1
  7. package/dist/types/features/context-menu/ui/Print/ui/Print.d.ts +2 -0
  8. package/dist/types/features/context-menu/ui/Print/ui/Print.d.ts.map +1 -1
  9. package/dist/types/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/IDownloadManager.d.ts +1 -1
  10. package/dist/types/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/IDownloadManager.d.ts.map +1 -1
  11. package/dist/types/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/downloadManager.d.ts +1 -1
  12. package/dist/types/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/downloadManager.d.ts.map +1 -1
  13. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.d.ts +4 -2
  14. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.d.ts.map +1 -1
  15. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/Printer.d.ts +4 -2
  16. package/dist/types/shared/lib/slickgrid/model/SlickTable/printer/model/Printer.d.ts.map +1 -1
  17. package/package.json +1 -5
  18. package/src/features/context-menu/ui/ButtonDownloadCSV/ButtonDownloadCSV.tsx +8 -2
  19. package/src/features/context-menu/ui/ContextMenu.tsx +16 -3
  20. package/src/features/context-menu/ui/Print/ui/Print.tsx +4 -2
  21. package/src/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/IDownloadManager.ts +1 -1
  22. package/src/shared/lib/slickgrid/model/SlickTable/csvDownloadManager/downloadManager.ts +2 -4
  23. package/src/shared/lib/slickgrid/model/SlickTable/printer/DefaultPrinter.ts +12 -17
  24. package/src/shared/lib/slickgrid/model/SlickTable/printer/model/Printer.ts +4 -2
package/dist/index.cjs.js CHANGED
@@ -224,7 +224,7 @@ ee.version="2.30.1";o_(Ze);ee.fn=K;ee.min=q0;ee.max=X0;ee.now=K0;ee.utc=ui;ee.un
224
224
  * Pikaday
225
225
  *
226
226
  * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
227
- */var lb=cn.exports,Yh;function hb(){return Yh||(Yh=1,function(e,t){(function(i,r){var s;{try{s=ab}catch{}e.exports=r(s)}})(lb,function(i){var r=typeof i=="function",s=!!window.addEventListener,o=window.document,l=window.setTimeout,c=function(T,b,M,A){s?T.addEventListener(b,M,!!A):T.attachEvent("on"+b,M)},d=function(T,b,M,A){s?T.removeEventListener(b,M,!!A):T.detachEvent("on"+b,M)},f=function(T){return T.trim?T.trim():T.replace(/^\s+|\s+$/g,"")},p=function(T,b){return(" "+T.className+" ").indexOf(" "+b+" ")!==-1},m=function(T,b){p(T,b)||(T.className=T.className===""?b:T.className+" "+b)},S=function(T,b){T.className=f((" "+T.className+" ").replace(" "+b+" "," "))},D=function(T){return/Array/.test(Object.prototype.toString.call(T))},R=function(T){return/Date/.test(Object.prototype.toString.call(T))&&!isNaN(T.getTime())},y=function(T){var b=T.getDay();return b===0||b===6},P=function(T){return T%4===0&&T%100!==0||T%400===0},F=function(T,b){return[31,P(T)?29:28,31,30,31,30,31,31,30,31,30,31][b]},V=function(T){R(T)&&T.setHours(0,0,0,0)},L=function(T,b){return T.getTime()===b.getTime()},k=function(T,b,M){var A,$;for(A in b)$=T[A]!==void 0,$&&typeof b[A]=="object"&&b[A]!==null&&b[A].nodeName===void 0?R(b[A])?M&&(T[A]=new Date(b[A].getTime())):D(b[A])?M&&(T[A]=b[A].slice(0)):T[A]=k({},b[A],M):(M||!$)&&(T[A]=b[A]);return T},v=function(T,b,M){var A;o.createEvent?(A=o.createEvent("HTMLEvents"),A.initEvent(b,!0,!1),A=k(A,M),T.dispatchEvent(A)):o.createEventObject&&(A=o.createEventObject(),A=k(A,M),T.fireEvent("on"+b,A))},N=function(T){return T.month<0&&(T.year-=Math.ceil(Math.abs(T.month)/12),T.month+=12),T.month>11&&(T.year+=Math.floor(Math.abs(T.month)/12),T.month-=12),T},z={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},q=function(T,b,M){for(b+=T.firstDay;b>=7;)b-=7;return M?T.i18n.weekdaysShort[b]:T.i18n.weekdays[b]},te=function(T){var b=[],M="false";if(T.isEmpty)if(T.showDaysInNextAndPreviousMonths)b.push("is-outside-current-month"),T.enableSelectionDaysInNextAndPreviousMonths||b.push("is-selection-disabled");else return'<td class="is-empty"></td>';return T.isDisabled&&b.push("is-disabled"),T.isToday&&b.push("is-today"),T.isSelected&&(b.push("is-selected"),M="true"),T.hasEvent&&b.push("has-event"),T.isInRange&&b.push("is-inrange"),T.isStartRange&&b.push("is-startrange"),T.isEndRange&&b.push("is-endrange"),'<td data-day="'+T.day+'" class="'+b.join(" ")+'" aria-selected="'+M+'"><button class="pika-button pika-day" type="button" data-pika-year="'+T.year+'" data-pika-month="'+T.month+'" data-pika-day="'+T.day+'">'+T.day+"</button></td>"},w=function(T,b){T.setHours(0,0,0,0);var M=T.getDate(),A=T.getDay(),$=b,j=$-1,B=7,Y=function(re){return(re+B-1)%B};T.setDate(M+j-Y(A));var J=new Date(T.getFullYear(),0,$),Q=24*60*60*1e3,le=(T.getTime()-J.getTime())/Q,ce=1+Math.round((le-j+Y(J.getDay()))/B);return ce},G=function(T,b,M,A){var $=new Date(M,b,T),j=r?i($).isoWeek():w($,A);return'<td class="pika-week">'+j+"</td>"},he=function(T,b,M,A){return'<tr class="pika-row'+(M?" pick-whole-week":"")+(A?" is-selected":"")+'">'+(b?T.reverse():T).join("")+"</tr>"},oe=function(T){return"<tbody>"+T.join("")+"</tbody>"},ye=function(T){var b,M=[];for(T.showWeekNumber&&M.push("<th></th>"),b=0;b<7;b++)M.push('<th scope="col"><abbr title="'+q(T,b)+'">'+q(T,b,!0)+"</abbr></th>");return"<thead><tr>"+(T.isRTL?M.reverse():M).join("")+"</tr></thead>"},Ne=function(T,b,M,A,$,j){var B,Y,J,Q=T._o,le=M===Q.minYear,ce=M===Q.maxYear,re='<div id="'+j+'" class="pika-title" role="heading" aria-live="assertive">',ze,I,Ue=!0,nt=!0;for(J=[],B=0;B<12;B++)J.push('<option value="'+(M===$?B-b:12+B-b)+'"'+(B===A?' selected="selected"':"")+(le&&B<Q.minMonth||ce&&B>Q.maxMonth?' disabled="disabled"':"")+">"+Q.i18n.months[B]+"</option>");for(ze='<div class="pika-label">'+Q.i18n.months[A]+'<select class="pika-select pika-select-month" tabindex="-1">'+J.join("")+"</select></div>",D(Q.yearRange)?(B=Q.yearRange[0],Y=Q.yearRange[1]+1):(B=M-Q.yearRange,Y=1+M+Q.yearRange),J=[];B<Y&&B<=Q.maxYear;B++)B>=Q.minYear&&J.push('<option value="'+B+'"'+(B===M?' selected="selected"':"")+">"+B+"</option>");return I='<div class="pika-label">'+M+Q.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+J.join("")+"</select></div>",Q.showMonthAfterYear?re+=I+ze:re+=ze+I,le&&(A===0||Q.minMonth>=A)&&(Ue=!1),ce&&(A===11||Q.maxMonth<=A)&&(nt=!1),b===0&&(re+='<button class="pika-prev'+(Ue?"":" is-disabled")+'" type="button">'+Q.i18n.previousMonth+"</button>"),b===T._o.numberOfMonths-1&&(re+='<button class="pika-next'+(nt?"":" is-disabled")+'" type="button">'+Q.i18n.nextMonth+"</button>"),re+="</div>"},pe=function(T,b,M){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+M+'">'+ye(T)+oe(b)+"</table>"},xe=function(T){var b=this,M=b.config(T);b._onMouseDown=function($){if(b._v){$=$||window.event;var j=$.target||$.srcElement;if(j)if(p(j,"is-disabled")||(p(j,"pika-button")&&!p(j,"is-empty")&&!p(j.parentNode,"is-disabled")?(b.setDate(new Date(j.getAttribute("data-pika-year"),j.getAttribute("data-pika-month"),j.getAttribute("data-pika-day"))),M.bound&&l(function(){b.hide(),M.blurFieldOnSelect&&M.field&&M.field.blur()},100)):p(j,"pika-prev")?b.prevMonth():p(j,"pika-next")&&b.nextMonth()),p(j,"pika-select"))b._c=!0;else if($.preventDefault)$.preventDefault();else return $.returnValue=!1,!1}},b._onChange=function($){$=$||window.event;var j=$.target||$.srcElement;j&&(p(j,"pika-select-month")?b.gotoMonth(j.value):p(j,"pika-select-year")&&b.gotoYear(j.value))},b._onKeyChange=function($){if($=$||window.event,b.isVisible())switch($.keyCode){case 13:case 27:M.field&&M.field.blur();break;case 37:b.adjustDate("subtract",1);break;case 38:b.adjustDate("subtract",7);break;case 39:b.adjustDate("add",1);break;case 40:b.adjustDate("add",7);break;case 8:case 46:b.setDate(null);break}},b._parseFieldValue=function(){if(M.parse)return M.parse(M.field.value,M.format);if(r){var $=i(M.field.value,M.format,M.formatStrict);return $&&$.isValid()?$.toDate():null}else return new Date(Date.parse(M.field.value))},b._onInputChange=function($){var j;$.firedBy!==b&&(j=b._parseFieldValue(),R(j)&&b.setDate(j),b._v||b.show())},b._onInputFocus=function(){b.show()},b._onInputClick=function(){b.show()},b._onInputBlur=function(){var $=o.activeElement;do if(p($,"pika-single"))return;while($=$.parentNode);b._c||(b._b=l(function(){b.hide()},50)),b._c=!1},b._onClick=function($){$=$||window.event;var j=$.target||$.srcElement,B=j;if(j){!s&&p(j,"pika-select")&&(j.onchange||(j.setAttribute("onchange","return;"),c(j,"change",b._onChange)));do if(p(B,"pika-single")||B===M.trigger)return;while(B=B.parentNode);b._v&&j!==M.trigger&&B!==M.trigger&&b.hide()}},b.el=o.createElement("div"),b.el.className="pika-single"+(M.isRTL?" is-rtl":"")+(M.theme?" "+M.theme:""),c(b.el,"mousedown",b._onMouseDown,!0),c(b.el,"touchend",b._onMouseDown,!0),c(b.el,"change",b._onChange),M.keyboardInput&&c(o,"keydown",b._onKeyChange),M.field&&(M.container?M.container.appendChild(b.el):M.bound?o.body.appendChild(b.el):M.field.parentNode.insertBefore(b.el,M.field.nextSibling),c(M.field,"change",b._onInputChange),M.defaultDate||(M.defaultDate=b._parseFieldValue(),M.setDefaultDate=!0));var A=M.defaultDate;R(A)?M.setDefaultDate?b.setDate(A,!0):b.gotoDate(A):b.gotoDate(new Date),M.bound?(this.hide(),b.el.className+=" is-bound",c(M.trigger,"click",b._onInputClick),c(M.trigger,"focus",b._onInputFocus),c(M.trigger,"blur",b._onInputBlur)):this.show()};return xe.prototype={config:function(T){this._o||(this._o=k({},z,!0));var b=k(this._o,T,!0);b.isRTL=!!b.isRTL,b.field=b.field&&b.field.nodeName?b.field:null,b.theme=typeof b.theme=="string"&&b.theme?b.theme:null,b.bound=!!(b.bound!==void 0?b.field&&b.bound:b.field),b.trigger=b.trigger&&b.trigger.nodeName?b.trigger:b.field,b.disableWeekends=!!b.disableWeekends,b.disableDayFn=typeof b.disableDayFn=="function"?b.disableDayFn:null;var M=parseInt(b.numberOfMonths,10)||1;if(b.numberOfMonths=M>4?4:M,R(b.minDate)||(b.minDate=!1),R(b.maxDate)||(b.maxDate=!1),b.minDate&&b.maxDate&&b.maxDate<b.minDate&&(b.maxDate=b.minDate=!1),b.minDate&&this.setMinDate(b.minDate),b.maxDate&&this.setMaxDate(b.maxDate),D(b.yearRange)){var A=new Date().getFullYear()-10;b.yearRange[0]=parseInt(b.yearRange[0],10)||A,b.yearRange[1]=parseInt(b.yearRange[1],10)||A}else b.yearRange=Math.abs(parseInt(b.yearRange,10))||z.yearRange,b.yearRange>100&&(b.yearRange=100);return b},toString:function(T){return T=T||this._o.format,R(this._d)?this._o.toString?this._o.toString(this._d,T):r?i(this._d).format(T):this._d.toDateString():""},getMoment:function(){return r?i(this._d):null},setMoment:function(T,b){r&&i.isMoment(T)&&this.setDate(T.toDate(),b)},getDate:function(){return R(this._d)?new Date(this._d.getTime()):null},setDate:function(T,b){if(!T)return this._d=null,this._o.field&&(this._o.field.value="",v(this._o.field,"change",{firedBy:this})),this.draw();if(typeof T=="string"&&(T=new Date(Date.parse(T))),!!R(T)){var M=this._o.minDate,A=this._o.maxDate;R(M)&&T<M?T=M:R(A)&&T>A&&(T=A),this._d=new Date(T.getTime()),V(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,"change",{firedBy:this})),!b&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(T){var b=!0;if(R(T)){if(this.calendars){var M=new Date(this.calendars[0].year,this.calendars[0].month,1),A=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),$=T.getTime();A.setMonth(A.getMonth()+1),A.setDate(A.getDate()-1),b=$<M.getTime()||A.getTime()<$}b&&(this.calendars=[{month:T.getMonth(),year:T.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(T,b){var M=this.getDate()||new Date,A=parseInt(b)*24*60*60*1e3,$;T==="add"?$=new Date(M.valueOf()+A):T==="subtract"&&($=new Date(M.valueOf()-A)),this.setDate($)},adjustCalendars:function(){this.calendars[0]=N(this.calendars[0]);for(var T=1;T<this._o.numberOfMonths;T++)this.calendars[T]=N({month:this.calendars[0].month+T,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(T){isNaN(T)||(this.calendars[0].month=parseInt(T,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(T){isNaN(T)||(this.calendars[0].year=parseInt(T,10),this.adjustCalendars())},setMinDate:function(T){T instanceof Date?(V(T),this._o.minDate=T,this._o.minYear=T.getFullYear(),this._o.minMonth=T.getMonth()):(this._o.minDate=z.minDate,this._o.minYear=z.minYear,this._o.minMonth=z.minMonth,this._o.startRange=z.startRange),this.draw()},setMaxDate:function(T){T instanceof Date?(V(T),this._o.maxDate=T,this._o.maxYear=T.getFullYear(),this._o.maxMonth=T.getMonth()):(this._o.maxDate=z.maxDate,this._o.maxYear=z.maxYear,this._o.maxMonth=z.maxMonth,this._o.endRange=z.endRange),this.draw()},setStartRange:function(T){this._o.startRange=T},setEndRange:function(T){this._o.endRange=T},draw:function(T){if(!(!this._v&&!T)){var b=this._o,M=b.minYear,A=b.maxYear,$=b.minMonth,j=b.maxMonth,B="",Y;this._y<=M&&(this._y=M,!isNaN($)&&this._m<$&&(this._m=$)),this._y>=A&&(this._y=A,!isNaN(j)&&this._m>j&&(this._m=j));for(var J=0;J<b.numberOfMonths;J++)Y="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),B+='<div class="pika-lendar">'+Ne(this,J,this.calendars[J].year,this.calendars[J].month,this.calendars[0].year,Y)+this.render(this.calendars[J].year,this.calendars[J].month,Y)+"</div>";this.el.innerHTML=B,b.bound&&b.field.type!=="hidden"&&l(function(){b.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),b.bound&&b.field.setAttribute("aria-label",b.ariaLabel)}},adjustPosition:function(){var T,b,M,A,$,j,B,Y,J,Q,le,ce;if(!this._o.container){if(this.el.style.position="absolute",T=this._o.trigger,b=T,M=this.el.offsetWidth,A=this.el.offsetHeight,$=window.innerWidth||o.documentElement.clientWidth,j=window.innerHeight||o.documentElement.clientHeight,B=window.pageYOffset||o.body.scrollTop||o.documentElement.scrollTop,le=!0,ce=!0,typeof T.getBoundingClientRect=="function")Q=T.getBoundingClientRect(),Y=Q.left+window.pageXOffset,J=Q.bottom+window.pageYOffset;else for(Y=b.offsetLeft,J=b.offsetTop+b.offsetHeight;b=b.offsetParent;)Y+=b.offsetLeft,J+=b.offsetTop;(this._o.reposition&&Y+M>$||this._o.position.indexOf("right")>-1&&Y-M+T.offsetWidth>0)&&(Y=Y-M+T.offsetWidth,le=!1),(this._o.reposition&&J+A>j+B||this._o.position.indexOf("top")>-1&&J-A-T.offsetHeight>0)&&(J=J-A-T.offsetHeight,ce=!1),this.el.style.left=Y+"px",this.el.style.top=J+"px",m(this.el,le?"left-aligned":"right-aligned"),m(this.el,ce?"bottom-aligned":"top-aligned"),S(this.el,le?"right-aligned":"left-aligned"),S(this.el,ce?"top-aligned":"bottom-aligned")}},render:function(T,b,M){var A=this._o,$=new Date,j=F(T,b),B=new Date(T,b,1).getDay(),Y=[],J=[];V($),A.firstDay>0&&(B-=A.firstDay,B<0&&(B+=7));for(var Q=b===0?11:b-1,le=b===11?0:b+1,ce=b===0?T-1:T,re=b===11?T+1:T,ze=F(ce,Q),I=j+B,Ue=I;Ue>7;)Ue-=7;I+=7-Ue;for(var nt=!1,Xe=0,It=0;Xe<I;Xe++){var vt=new Date(T,b,1+(Xe-B)),Wt=R(this._d)?L(vt,this._d):!1,xt=L(vt,$),Ai=A.events.indexOf(vt.toDateString())!==-1,ft=Xe<B||Xe>=j+B,kt=1+(Xe-B),me=b,ei=T,fi=A.startRange&&L(A.startRange,vt),ht=A.endRange&&L(A.endRange,vt),Li=A.startRange&&A.endRange&&A.startRange<vt&&vt<A.endRange,qi=A.minDate&&vt<A.minDate||A.maxDate&&vt>A.maxDate||A.disableWeekends&&y(vt)||A.disableDayFn&&A.disableDayFn(vt);ft&&(Xe<B?(kt=ze+kt,me=Q,ei=ce):(kt=kt-j,me=le,ei=re));var pi={day:kt,month:me,year:ei,hasEvent:Ai,isSelected:Wt,isToday:xt,isDisabled:qi,isEmpty:ft,isStartRange:fi,isEndRange:ht,isInRange:Li,showDaysInNextAndPreviousMonths:A.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:A.enableSelectionDaysInNextAndPreviousMonths};A.pickWholeWeek&&Wt&&(nt=!0),J.push(te(pi)),++It===7&&(A.showWeekNumber&&J.unshift(G(Xe-B,b,T,A.firstWeekOfYearMinDays)),Y.push(he(J,A.isRTL,A.pickWholeWeek,nt)),J=[],It=0,nt=!1)}return pe(A,Y,M)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),S(this.el,"is-hidden"),this._o.bound&&(c(o,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var T=this._v;T!==!1&&(this._o.bound&&d(o,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),m(this.el,"is-hidden"),this._v=!1,T!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var T=this._o;this.hide(),d(this.el,"mousedown",this._onMouseDown,!0),d(this.el,"touchend",this._onMouseDown,!0),d(this.el,"change",this._onChange),T.keyboardInput&&d(o,"keydown",this._onKeyChange),T.field&&(d(T.field,"change",this._onInputChange),T.bound&&(d(T.trigger,"click",this._onInputClick),d(T.trigger,"focus",this._onInputFocus),d(T.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},xe})}(cn)),cn.exports}hb();ee.ISO_8601,Fo.ui,Fo.db;function zh(e){return new Date(e).getTime()}function cb(e){if(!e.getSelectionModel())return $h(e);let t=e.getSelectedRows();return t.sort((i,r)=>i-r),t.length===0&&(t=$h(e)),t}function $h(e){const t=e.getData();return Array.from({length:t.getLength()},(i,r)=>r)}class ub{constructor(){this.emptyValue="1/1/1970"}dates(t,i){const r=zh(t||this.emptyValue),s=zh(i||this.emptyValue);return r-s}numbers(t,i){return Number(t||0)-Number(i||0)}strings(t,i){return(t||"").toLowerCase()>(i||"").toLowerCase()?1:(t||"").toLowerCase()<(i||"").toLowerCase()?-1:0}}const db=new ub;class fb{constructor(){this.resetSorting=!1,this.sort=db,this.sortedColumnId="",this.withFormatter=[zi.TEXT,zi.NUMBER_FORMATTED]}onSort(){return(t,i)=>{const{grid:r,sortCol:s,sortAsc:o}=i;if(!r)return;const{formatter:l}=s;this.reset(i);const c=r.getData(),d=s?.sortAs;c.getItems().sort((p,m)=>{if(this.resetSorting)return p.id-m.id;const S=s?.field;if(!S)return 0;const D=o?1:-1;let R=p[S],y=m[S];switch(l&&this.withFormatter.includes(d)&&(R=l(0,0,R,s,p,r),y=l(0,0,y,s,m,r)),d){case zi.DATE:return this.priority(p,m)||this.sort.dates(R,y)*D;case zi.NUMBER:case zi.NUMBER_FORMATTED:return this.priority(p,m)||this.sort.numbers(R,y)*D;case zi.TEXT:return this.priority(p,m)||this.sort.strings(R,y)*D}}),c.refresh()}}priority(t,i){return 0}reset(t){const{grid:i,sortCol:r,sortAsc:s}=t;if(i)if(s&&this.sortedColumnId===r?.id)this.resetSorting=!0,i.setSortColumns([]),this.sortedColumnId="";else{this.resetSorting=!1;const o=i.getSortColumns();this.sortedColumnId=o[0]?.columnId}}}new fb;const Lo=e=>e!==e?"":String(e??"").replace(/(^")|("$)/g,"");function Pu(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}const pb=["FormatterStatus","FormatterNumber"];class mb{constructor(){this.table=null}download(t){if(this.table||(this.table=t),this.table=t,!t.grid)return;const r=this.createCSV(t),s=document.createElement("a");s.href="data:text/csv;charset=utf-8,"+encodeURIComponent(r),s.target="_blank",s.download=`${t.id}.csv`,s.click()}createCSV(t){this.table||(this.table=t);const i=t.grid;if(!i)return"";const r=this.getTitle(),s=this.getCSVHeader(i),o=this.getCSVBody(i);return`${r}${s}${o}`}getTitle(){return""}getCSVHeader(t){const s=t.getColumns().filter(o=>o.forPrint).reduce((o,l)=>{if(typeof l.name=="string"){const c=Lo(l.name);return o.concat(`"${c}",`)}else return o.concat('" ",')},"");return this.addRowSeparator(s)}getCSVBody(t){const i=t.getData(),s=t.getColumns().filter(o=>o.forPrint);return cb(t).reduce((o,l)=>{const c=i.getItemMetadata(l),d=i.getItem(l),f=d.__group,p=d.__groupTotals;let m="";if(f){const S=Lo(Pu(d.title));m+=`"${S}",`}else for(let S=0;S<s.length;++S){const D=s[S],R=D.field,y=c?.columns?.[R]?.formatter,P=D.printer||y||D.formatter;let F=d[R];if(p){const L=D.groupTotalsFormatter;F=L?L(d,D,t):""}else P&&!pb.includes(P.name)&&(F=P(0,0,F,D,d,t));const V=Lo(F);m+=`"${V}",`}return this.addRowSeparator(`${o}${m}`)},"")}addRowSeparator(t){return`${t}
227
+ */var lb=cn.exports,Yh;function hb(){return Yh||(Yh=1,function(e,t){(function(i,r){var s;{try{s=ab}catch{}e.exports=r(s)}})(lb,function(i){var r=typeof i=="function",s=!!window.addEventListener,o=window.document,l=window.setTimeout,c=function(T,b,M,A){s?T.addEventListener(b,M,!!A):T.attachEvent("on"+b,M)},d=function(T,b,M,A){s?T.removeEventListener(b,M,!!A):T.detachEvent("on"+b,M)},f=function(T){return T.trim?T.trim():T.replace(/^\s+|\s+$/g,"")},p=function(T,b){return(" "+T.className+" ").indexOf(" "+b+" ")!==-1},m=function(T,b){p(T,b)||(T.className=T.className===""?b:T.className+" "+b)},S=function(T,b){T.className=f((" "+T.className+" ").replace(" "+b+" "," "))},D=function(T){return/Array/.test(Object.prototype.toString.call(T))},R=function(T){return/Date/.test(Object.prototype.toString.call(T))&&!isNaN(T.getTime())},y=function(T){var b=T.getDay();return b===0||b===6},P=function(T){return T%4===0&&T%100!==0||T%400===0},F=function(T,b){return[31,P(T)?29:28,31,30,31,30,31,31,30,31,30,31][b]},V=function(T){R(T)&&T.setHours(0,0,0,0)},L=function(T,b){return T.getTime()===b.getTime()},k=function(T,b,M){var A,$;for(A in b)$=T[A]!==void 0,$&&typeof b[A]=="object"&&b[A]!==null&&b[A].nodeName===void 0?R(b[A])?M&&(T[A]=new Date(b[A].getTime())):D(b[A])?M&&(T[A]=b[A].slice(0)):T[A]=k({},b[A],M):(M||!$)&&(T[A]=b[A]);return T},v=function(T,b,M){var A;o.createEvent?(A=o.createEvent("HTMLEvents"),A.initEvent(b,!0,!1),A=k(A,M),T.dispatchEvent(A)):o.createEventObject&&(A=o.createEventObject(),A=k(A,M),T.fireEvent("on"+b,A))},N=function(T){return T.month<0&&(T.year-=Math.ceil(Math.abs(T.month)/12),T.month+=12),T.month>11&&(T.year+=Math.floor(Math.abs(T.month)/12),T.month-=12),T},z={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},q=function(T,b,M){for(b+=T.firstDay;b>=7;)b-=7;return M?T.i18n.weekdaysShort[b]:T.i18n.weekdays[b]},te=function(T){var b=[],M="false";if(T.isEmpty)if(T.showDaysInNextAndPreviousMonths)b.push("is-outside-current-month"),T.enableSelectionDaysInNextAndPreviousMonths||b.push("is-selection-disabled");else return'<td class="is-empty"></td>';return T.isDisabled&&b.push("is-disabled"),T.isToday&&b.push("is-today"),T.isSelected&&(b.push("is-selected"),M="true"),T.hasEvent&&b.push("has-event"),T.isInRange&&b.push("is-inrange"),T.isStartRange&&b.push("is-startrange"),T.isEndRange&&b.push("is-endrange"),'<td data-day="'+T.day+'" class="'+b.join(" ")+'" aria-selected="'+M+'"><button class="pika-button pika-day" type="button" data-pika-year="'+T.year+'" data-pika-month="'+T.month+'" data-pika-day="'+T.day+'">'+T.day+"</button></td>"},w=function(T,b){T.setHours(0,0,0,0);var M=T.getDate(),A=T.getDay(),$=b,j=$-1,B=7,Y=function(re){return(re+B-1)%B};T.setDate(M+j-Y(A));var J=new Date(T.getFullYear(),0,$),Q=24*60*60*1e3,le=(T.getTime()-J.getTime())/Q,ce=1+Math.round((le-j+Y(J.getDay()))/B);return ce},G=function(T,b,M,A){var $=new Date(M,b,T),j=r?i($).isoWeek():w($,A);return'<td class="pika-week">'+j+"</td>"},he=function(T,b,M,A){return'<tr class="pika-row'+(M?" pick-whole-week":"")+(A?" is-selected":"")+'">'+(b?T.reverse():T).join("")+"</tr>"},oe=function(T){return"<tbody>"+T.join("")+"</tbody>"},ye=function(T){var b,M=[];for(T.showWeekNumber&&M.push("<th></th>"),b=0;b<7;b++)M.push('<th scope="col"><abbr title="'+q(T,b)+'">'+q(T,b,!0)+"</abbr></th>");return"<thead><tr>"+(T.isRTL?M.reverse():M).join("")+"</tr></thead>"},Ne=function(T,b,M,A,$,j){var B,Y,J,Q=T._o,le=M===Q.minYear,ce=M===Q.maxYear,re='<div id="'+j+'" class="pika-title" role="heading" aria-live="assertive">',ze,I,Ue=!0,nt=!0;for(J=[],B=0;B<12;B++)J.push('<option value="'+(M===$?B-b:12+B-b)+'"'+(B===A?' selected="selected"':"")+(le&&B<Q.minMonth||ce&&B>Q.maxMonth?' disabled="disabled"':"")+">"+Q.i18n.months[B]+"</option>");for(ze='<div class="pika-label">'+Q.i18n.months[A]+'<select class="pika-select pika-select-month" tabindex="-1">'+J.join("")+"</select></div>",D(Q.yearRange)?(B=Q.yearRange[0],Y=Q.yearRange[1]+1):(B=M-Q.yearRange,Y=1+M+Q.yearRange),J=[];B<Y&&B<=Q.maxYear;B++)B>=Q.minYear&&J.push('<option value="'+B+'"'+(B===M?' selected="selected"':"")+">"+B+"</option>");return I='<div class="pika-label">'+M+Q.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+J.join("")+"</select></div>",Q.showMonthAfterYear?re+=I+ze:re+=ze+I,le&&(A===0||Q.minMonth>=A)&&(Ue=!1),ce&&(A===11||Q.maxMonth<=A)&&(nt=!1),b===0&&(re+='<button class="pika-prev'+(Ue?"":" is-disabled")+'" type="button">'+Q.i18n.previousMonth+"</button>"),b===T._o.numberOfMonths-1&&(re+='<button class="pika-next'+(nt?"":" is-disabled")+'" type="button">'+Q.i18n.nextMonth+"</button>"),re+="</div>"},pe=function(T,b,M){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+M+'">'+ye(T)+oe(b)+"</table>"},xe=function(T){var b=this,M=b.config(T);b._onMouseDown=function($){if(b._v){$=$||window.event;var j=$.target||$.srcElement;if(j)if(p(j,"is-disabled")||(p(j,"pika-button")&&!p(j,"is-empty")&&!p(j.parentNode,"is-disabled")?(b.setDate(new Date(j.getAttribute("data-pika-year"),j.getAttribute("data-pika-month"),j.getAttribute("data-pika-day"))),M.bound&&l(function(){b.hide(),M.blurFieldOnSelect&&M.field&&M.field.blur()},100)):p(j,"pika-prev")?b.prevMonth():p(j,"pika-next")&&b.nextMonth()),p(j,"pika-select"))b._c=!0;else if($.preventDefault)$.preventDefault();else return $.returnValue=!1,!1}},b._onChange=function($){$=$||window.event;var j=$.target||$.srcElement;j&&(p(j,"pika-select-month")?b.gotoMonth(j.value):p(j,"pika-select-year")&&b.gotoYear(j.value))},b._onKeyChange=function($){if($=$||window.event,b.isVisible())switch($.keyCode){case 13:case 27:M.field&&M.field.blur();break;case 37:b.adjustDate("subtract",1);break;case 38:b.adjustDate("subtract",7);break;case 39:b.adjustDate("add",1);break;case 40:b.adjustDate("add",7);break;case 8:case 46:b.setDate(null);break}},b._parseFieldValue=function(){if(M.parse)return M.parse(M.field.value,M.format);if(r){var $=i(M.field.value,M.format,M.formatStrict);return $&&$.isValid()?$.toDate():null}else return new Date(Date.parse(M.field.value))},b._onInputChange=function($){var j;$.firedBy!==b&&(j=b._parseFieldValue(),R(j)&&b.setDate(j),b._v||b.show())},b._onInputFocus=function(){b.show()},b._onInputClick=function(){b.show()},b._onInputBlur=function(){var $=o.activeElement;do if(p($,"pika-single"))return;while($=$.parentNode);b._c||(b._b=l(function(){b.hide()},50)),b._c=!1},b._onClick=function($){$=$||window.event;var j=$.target||$.srcElement,B=j;if(j){!s&&p(j,"pika-select")&&(j.onchange||(j.setAttribute("onchange","return;"),c(j,"change",b._onChange)));do if(p(B,"pika-single")||B===M.trigger)return;while(B=B.parentNode);b._v&&j!==M.trigger&&B!==M.trigger&&b.hide()}},b.el=o.createElement("div"),b.el.className="pika-single"+(M.isRTL?" is-rtl":"")+(M.theme?" "+M.theme:""),c(b.el,"mousedown",b._onMouseDown,!0),c(b.el,"touchend",b._onMouseDown,!0),c(b.el,"change",b._onChange),M.keyboardInput&&c(o,"keydown",b._onKeyChange),M.field&&(M.container?M.container.appendChild(b.el):M.bound?o.body.appendChild(b.el):M.field.parentNode.insertBefore(b.el,M.field.nextSibling),c(M.field,"change",b._onInputChange),M.defaultDate||(M.defaultDate=b._parseFieldValue(),M.setDefaultDate=!0));var A=M.defaultDate;R(A)?M.setDefaultDate?b.setDate(A,!0):b.gotoDate(A):b.gotoDate(new Date),M.bound?(this.hide(),b.el.className+=" is-bound",c(M.trigger,"click",b._onInputClick),c(M.trigger,"focus",b._onInputFocus),c(M.trigger,"blur",b._onInputBlur)):this.show()};return xe.prototype={config:function(T){this._o||(this._o=k({},z,!0));var b=k(this._o,T,!0);b.isRTL=!!b.isRTL,b.field=b.field&&b.field.nodeName?b.field:null,b.theme=typeof b.theme=="string"&&b.theme?b.theme:null,b.bound=!!(b.bound!==void 0?b.field&&b.bound:b.field),b.trigger=b.trigger&&b.trigger.nodeName?b.trigger:b.field,b.disableWeekends=!!b.disableWeekends,b.disableDayFn=typeof b.disableDayFn=="function"?b.disableDayFn:null;var M=parseInt(b.numberOfMonths,10)||1;if(b.numberOfMonths=M>4?4:M,R(b.minDate)||(b.minDate=!1),R(b.maxDate)||(b.maxDate=!1),b.minDate&&b.maxDate&&b.maxDate<b.minDate&&(b.maxDate=b.minDate=!1),b.minDate&&this.setMinDate(b.minDate),b.maxDate&&this.setMaxDate(b.maxDate),D(b.yearRange)){var A=new Date().getFullYear()-10;b.yearRange[0]=parseInt(b.yearRange[0],10)||A,b.yearRange[1]=parseInt(b.yearRange[1],10)||A}else b.yearRange=Math.abs(parseInt(b.yearRange,10))||z.yearRange,b.yearRange>100&&(b.yearRange=100);return b},toString:function(T){return T=T||this._o.format,R(this._d)?this._o.toString?this._o.toString(this._d,T):r?i(this._d).format(T):this._d.toDateString():""},getMoment:function(){return r?i(this._d):null},setMoment:function(T,b){r&&i.isMoment(T)&&this.setDate(T.toDate(),b)},getDate:function(){return R(this._d)?new Date(this._d.getTime()):null},setDate:function(T,b){if(!T)return this._d=null,this._o.field&&(this._o.field.value="",v(this._o.field,"change",{firedBy:this})),this.draw();if(typeof T=="string"&&(T=new Date(Date.parse(T))),!!R(T)){var M=this._o.minDate,A=this._o.maxDate;R(M)&&T<M?T=M:R(A)&&T>A&&(T=A),this._d=new Date(T.getTime()),V(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),v(this._o.field,"change",{firedBy:this})),!b&&typeof this._o.onSelect=="function"&&this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(T){var b=!0;if(R(T)){if(this.calendars){var M=new Date(this.calendars[0].year,this.calendars[0].month,1),A=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),$=T.getTime();A.setMonth(A.getMonth()+1),A.setDate(A.getDate()-1),b=$<M.getTime()||A.getTime()<$}b&&(this.calendars=[{month:T.getMonth(),year:T.getFullYear()}],this._o.mainCalendar==="right"&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(T,b){var M=this.getDate()||new Date,A=parseInt(b)*24*60*60*1e3,$;T==="add"?$=new Date(M.valueOf()+A):T==="subtract"&&($=new Date(M.valueOf()-A)),this.setDate($)},adjustCalendars:function(){this.calendars[0]=N(this.calendars[0]);for(var T=1;T<this._o.numberOfMonths;T++)this.calendars[T]=N({month:this.calendars[0].month+T,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(T){isNaN(T)||(this.calendars[0].month=parseInt(T,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(T){isNaN(T)||(this.calendars[0].year=parseInt(T,10),this.adjustCalendars())},setMinDate:function(T){T instanceof Date?(V(T),this._o.minDate=T,this._o.minYear=T.getFullYear(),this._o.minMonth=T.getMonth()):(this._o.minDate=z.minDate,this._o.minYear=z.minYear,this._o.minMonth=z.minMonth,this._o.startRange=z.startRange),this.draw()},setMaxDate:function(T){T instanceof Date?(V(T),this._o.maxDate=T,this._o.maxYear=T.getFullYear(),this._o.maxMonth=T.getMonth()):(this._o.maxDate=z.maxDate,this._o.maxYear=z.maxYear,this._o.maxMonth=z.maxMonth,this._o.endRange=z.endRange),this.draw()},setStartRange:function(T){this._o.startRange=T},setEndRange:function(T){this._o.endRange=T},draw:function(T){if(!(!this._v&&!T)){var b=this._o,M=b.minYear,A=b.maxYear,$=b.minMonth,j=b.maxMonth,B="",Y;this._y<=M&&(this._y=M,!isNaN($)&&this._m<$&&(this._m=$)),this._y>=A&&(this._y=A,!isNaN(j)&&this._m>j&&(this._m=j));for(var J=0;J<b.numberOfMonths;J++)Y="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),B+='<div class="pika-lendar">'+Ne(this,J,this.calendars[J].year,this.calendars[J].month,this.calendars[0].year,Y)+this.render(this.calendars[J].year,this.calendars[J].month,Y)+"</div>";this.el.innerHTML=B,b.bound&&b.field.type!=="hidden"&&l(function(){b.trigger.focus()},1),typeof this._o.onDraw=="function"&&this._o.onDraw(this),b.bound&&b.field.setAttribute("aria-label",b.ariaLabel)}},adjustPosition:function(){var T,b,M,A,$,j,B,Y,J,Q,le,ce;if(!this._o.container){if(this.el.style.position="absolute",T=this._o.trigger,b=T,M=this.el.offsetWidth,A=this.el.offsetHeight,$=window.innerWidth||o.documentElement.clientWidth,j=window.innerHeight||o.documentElement.clientHeight,B=window.pageYOffset||o.body.scrollTop||o.documentElement.scrollTop,le=!0,ce=!0,typeof T.getBoundingClientRect=="function")Q=T.getBoundingClientRect(),Y=Q.left+window.pageXOffset,J=Q.bottom+window.pageYOffset;else for(Y=b.offsetLeft,J=b.offsetTop+b.offsetHeight;b=b.offsetParent;)Y+=b.offsetLeft,J+=b.offsetTop;(this._o.reposition&&Y+M>$||this._o.position.indexOf("right")>-1&&Y-M+T.offsetWidth>0)&&(Y=Y-M+T.offsetWidth,le=!1),(this._o.reposition&&J+A>j+B||this._o.position.indexOf("top")>-1&&J-A-T.offsetHeight>0)&&(J=J-A-T.offsetHeight,ce=!1),this.el.style.left=Y+"px",this.el.style.top=J+"px",m(this.el,le?"left-aligned":"right-aligned"),m(this.el,ce?"bottom-aligned":"top-aligned"),S(this.el,le?"right-aligned":"left-aligned"),S(this.el,ce?"top-aligned":"bottom-aligned")}},render:function(T,b,M){var A=this._o,$=new Date,j=F(T,b),B=new Date(T,b,1).getDay(),Y=[],J=[];V($),A.firstDay>0&&(B-=A.firstDay,B<0&&(B+=7));for(var Q=b===0?11:b-1,le=b===11?0:b+1,ce=b===0?T-1:T,re=b===11?T+1:T,ze=F(ce,Q),I=j+B,Ue=I;Ue>7;)Ue-=7;I+=7-Ue;for(var nt=!1,Xe=0,It=0;Xe<I;Xe++){var vt=new Date(T,b,1+(Xe-B)),Wt=R(this._d)?L(vt,this._d):!1,xt=L(vt,$),Ai=A.events.indexOf(vt.toDateString())!==-1,ft=Xe<B||Xe>=j+B,kt=1+(Xe-B),me=b,ei=T,fi=A.startRange&&L(A.startRange,vt),ht=A.endRange&&L(A.endRange,vt),Li=A.startRange&&A.endRange&&A.startRange<vt&&vt<A.endRange,qi=A.minDate&&vt<A.minDate||A.maxDate&&vt>A.maxDate||A.disableWeekends&&y(vt)||A.disableDayFn&&A.disableDayFn(vt);ft&&(Xe<B?(kt=ze+kt,me=Q,ei=ce):(kt=kt-j,me=le,ei=re));var pi={day:kt,month:me,year:ei,hasEvent:Ai,isSelected:Wt,isToday:xt,isDisabled:qi,isEmpty:ft,isStartRange:fi,isEndRange:ht,isInRange:Li,showDaysInNextAndPreviousMonths:A.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:A.enableSelectionDaysInNextAndPreviousMonths};A.pickWholeWeek&&Wt&&(nt=!0),J.push(te(pi)),++It===7&&(A.showWeekNumber&&J.unshift(G(Xe-B,b,T,A.firstWeekOfYearMinDays)),Y.push(he(J,A.isRTL,A.pickWholeWeek,nt)),J=[],It=0,nt=!1)}return pe(A,Y,M)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),S(this.el,"is-hidden"),this._o.bound&&(c(o,"click",this._onClick),this.adjustPosition()),typeof this._o.onOpen=="function"&&this._o.onOpen.call(this))},hide:function(){var T=this._v;T!==!1&&(this._o.bound&&d(o,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),m(this.el,"is-hidden"),this._v=!1,T!==void 0&&typeof this._o.onClose=="function"&&this._o.onClose.call(this))},destroy:function(){var T=this._o;this.hide(),d(this.el,"mousedown",this._onMouseDown,!0),d(this.el,"touchend",this._onMouseDown,!0),d(this.el,"change",this._onChange),T.keyboardInput&&d(o,"keydown",this._onKeyChange),T.field&&(d(T.field,"change",this._onInputChange),T.bound&&(d(T.trigger,"click",this._onInputClick),d(T.trigger,"focus",this._onInputFocus),d(T.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},xe})}(cn)),cn.exports}hb();ee.ISO_8601,Fo.ui,Fo.db;function zh(e){return new Date(e).getTime()}function cb(e){if(!e.getSelectionModel())return $h(e);let t=e.getSelectedRows();return t.sort((i,r)=>i-r),t.length===0&&(t=$h(e)),t}function $h(e){const t=e.getData();return Array.from({length:t.getLength()},(i,r)=>r)}class ub{constructor(){this.emptyValue="1/1/1970"}dates(t,i){const r=zh(t||this.emptyValue),s=zh(i||this.emptyValue);return r-s}numbers(t,i){return Number(t||0)-Number(i||0)}strings(t,i){return(t||"").toLowerCase()>(i||"").toLowerCase()?1:(t||"").toLowerCase()<(i||"").toLowerCase()?-1:0}}const db=new ub;class fb{constructor(){this.resetSorting=!1,this.sort=db,this.sortedColumnId="",this.withFormatter=[zi.TEXT,zi.NUMBER_FORMATTED]}onSort(){return(t,i)=>{const{grid:r,sortCol:s,sortAsc:o}=i;if(!r)return;const{formatter:l}=s;this.reset(i);const c=r.getData(),d=s?.sortAs;c.getItems().sort((p,m)=>{if(this.resetSorting)return p.id-m.id;const S=s?.field;if(!S)return 0;const D=o?1:-1;let R=p[S],y=m[S];switch(l&&this.withFormatter.includes(d)&&(R=l(0,0,R,s,p,r),y=l(0,0,y,s,m,r)),d){case zi.DATE:return this.priority(p,m)||this.sort.dates(R,y)*D;case zi.NUMBER:case zi.NUMBER_FORMATTED:return this.priority(p,m)||this.sort.numbers(R,y)*D;case zi.TEXT:return this.priority(p,m)||this.sort.strings(R,y)*D}}),c.refresh()}}priority(t,i){return 0}reset(t){const{grid:i,sortCol:r,sortAsc:s}=t;if(i)if(s&&this.sortedColumnId===r?.id)this.resetSorting=!0,i.setSortColumns([]),this.sortedColumnId="";else{this.resetSorting=!1;const o=i.getSortColumns();this.sortedColumnId=o[0]?.columnId}}}new fb;const Lo=e=>e!==e?"":String(e??"").replace(/(^")|("$)/g,"");function Pu(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""}const pb=["FormatterStatus","FormatterNumber"];class mb{constructor(){this.table=null}download(t,i,r){if(this.table||(this.table=t),this.table=t,!t.grid)return;const o=this.createCSV(t),l=document.createElement("a");l.href="data:text/csv;charset=utf-8,"+encodeURIComponent(o),l.target="_blank",l.download=`${i}-${r}-${t.id}.csv`,l.click()}createCSV(t){this.table||(this.table=t);const i=t.grid;if(!i)return"";const r=this.getTitle(),s=this.getCSVHeader(i),o=this.getCSVBody(i);return`${r}${s}${o}`}getTitle(){return""}getCSVHeader(t){const s=t.getColumns().filter(o=>o.forPrint).reduce((o,l)=>{if(typeof l.name=="string"){const c=Lo(l.name);return o.concat(`"${c}",`)}else return o.concat('" ",')},"");return this.addRowSeparator(s)}getCSVBody(t){const i=t.getData(),s=t.getColumns().filter(o=>o.forPrint);return cb(t).reduce((o,l)=>{const c=i.getItemMetadata(l),d=i.getItem(l),f=d.__group,p=d.__groupTotals;let m="";if(f){const S=Lo(Pu(d.title));m+=`"${S}",`}else for(let S=0;S<s.length;++S){const D=s[S],R=D.field,y=c?.columns?.[R]?.formatter,P=D.printer||y||D.formatter;let F=d[R];if(p){const L=D.groupTotalsFormatter;F=L?L(d,D,t):""}else P&&!pb.includes(P.name)&&(F=P(0,0,F,D,d,t));const V=Lo(F);m+=`"${V}",`}return this.addRowSeparator(`${o}${m}`)},"")}addRowSeparator(t){return`${t}
228
228
  `}}class Ou{handleKeyboardEvent(){}pushToCommandQueue(){}resetQueue(){}setExternalVariables(t){}getExternalVariables(){return{}}}const No={};class gb{constructor(){this._args={...No},this._grid=null,this._tableId=""}getFilterFn(){return()=>!0}register(t,i){this.tableId=i,this.grid=t;const r=t.getData();r.setFilter(this.getFilterFn()),r.setFilterArgs(this.args),r.refresh()}reset(){if(!this.grid)return;this.args=No;const t=this.grid.getData();t.setFilterArgs(No),t.refresh()}print(){return[]}set grid(t){this._grid=t}get grid(){return this._grid}set args(t){if(this._args=t,!this.grid)return;const i=this.grid.getData();i.setFilterArgs(t),i.refresh()}get args(){return this._args}set tableId(t){this._tableId=t}get tableId(){return this._tableId}}class yb extends gb{getFilterFn(){return t=>!t?.isDeleted}}class vb{constructor(){this._args={},this._grid=null,this._tableId=""}getFilterFn(){return()=>!0}register(){}print(){return[]}reset(){}get args(){return this._args}get grid(){return this._grid}get tableId(){return this._tableId}set args(t){}set grid(t){}set tableId(t){}}class wb extends na{constructor(){super(...arguments),this.columnId="",this.group=ss.Text,this.target=null,this.x=0,this.y=0}}new wb;const Vh=Fn`
229
229
  50% {
230
230
  background-color: #ffb1b1;
@@ -278,4 +278,4 @@ return r.version="2.30.1",s(Ke),r.fn=X,r.min=jd,r.max=Ud,r.now=Gd,r.utc=R,r.unix
278
278
  .align_left {
279
279
  text-align: left;
280
280
  }
281
- `;class Rb{constructor(){this.cssStyles=bb}clientName(){return document.createElement("tr")}columnNames(t){const i=document.createElement("tr");return(t.grid?.getColumns()||[]).filter(l=>l.forPrint).forEach(({name:l})=>{const c=document.createElement("th");c.classList.add("column_name"),typeof l=="string"?c.innerText=l:c.innerText=" ",i.append(c)}),i}tableNameAndTime(t){const i=document.createElement("tr");i.classList.add("heading");const r=document.createElement("th");r.setAttribute("colspan","2"),r.classList.add("table_name"),r.innerText=t.name||t.id,i.append(r);const s=document.createElement("th");return s.setAttribute("colspan","100%"),s.classList.add("date_stamp"),s.innerText=ee().format("MM/DD/YYYY h:mm A"),i.append(s),i}createStyleElement(){const t=document.createElement("style");return t.innerHTML=this.cssStyles,t}createTableElement(t){const i=document.createElement("table");return i.append(this.createThead(t)),i.append(this.createTbody(t)),i}createTbody(t){const i=document.createElement("tbody"),r=t.grid;if(!r)return i;const o=r.getColumns().filter(d=>d.forPrint),l=r.getData();return r_(l).forEach((d,f)=>{const p=this.createTr(o,f,r);i.append(p)}),i.append(...this.totals(t)),i}filters(t){const i=[];if(t.filter){const r=t.filter.print(t);if(r.length){const s=document.createElement("tr"),o=document.createElement("th");o.setAttribute("colspan","100%"),o.classList.add("align_left"),o.innerText="Applied filters",s.append(o),i.push(s)}r.forEach(s=>{i.push(s)})}return i}totals(t){return[]}createThead(t){const i=document.createElement("thead");return i.append(this.clientName()),i.append(this.tableNameAndTime(t)),i.append(...this.filters(t)),i.append(this.columnNames(t)),i}createTr(t,i,r){const s=document.createElement("tr"),o=r.getData(),l=o.getItem(i),c=l.__group,d=l.__groupTotals;if(c){const f=document.createElement("td");f.setAttribute("colspan","100%"),f.innerText=Pu(l.title),s.append(f)}else t.forEach(f=>{const p=document.createElement("td");f.cssClass&&p.classList.add(f.cssClass);const m=f.field,D=o.getItemMetadata(i)?.columns?.[m]?.formatter,R=f.printer||D||f.formatter;let y=l[m];if(d){const P=f.groupTotalsFormatter;y=P?P(l,f,r):""}else R&&(y=R(0,0,y,f,l,r));p.innerText=y||"",s.append(p)});return s}print(t){const i=window.open(),r=document.createElement("title");r.innerText=t.name||t.id;const s=i.document.querySelector("head");s.append(r),s.append(this.createStyleElement()),i.document.querySelector("body").append(this.createTableElement(t)),i.print()}}function Eb(e){const t=document.querySelector(e);if(!t)return!0;const{scrollHeight:i,scrollWidth:r}=document.documentElement,{bottom:s,left:o,right:l,top:c}=t.getBoundingClientRect();return s<=0||o>=r||l<=0||c>=i}class kb{constructor(t){this.hotKeysBehavior=new Ou,this.printer=new Rb,this.filter=new vb,this.downloadManager=new mb,this._grid=null,this._grouping={},this._isActive=!1,this._isEdited=!1,this._observers=[];const{downloadManager:i,filter:r,hotKeys:s,id:o,name:l,printer:c}=t;this.id=o,this.name=l||"",s&&(this.hotKeysBehavior=s),c&&(this.printer=c),r&&(this.filter=r),i&&(this.downloadManager=i)}createGrid(t,i,r){this.reset();const s=new i_(`#${this.id}`,t,i,r);return this.grid=s,s.onKeyDown.subscribe(Ah(s)),this.filter.register(s,this.id),this.grid}handleKeyboardEvent(t){Eb(`#${this.id}`)||this.hotKeysBehavior.handleKeyboardEvent(t,this)}get grid(){return this._grid}get grouping(){return this._grouping}get isEdited(){return this._isEdited}set grid(t){this._grid=t}set grouping(t){if(this._grouping={...this._grouping,...t},!this.grid)return;const i=this.grid.getData();this.grouping.isGrouped?i.setGrouping(this.grouping.groups||[]):i.setGrouping([])}set isEdited(t){this._isEdited=t,this.notifyObservers()}setPrinter(t){this.printer=t}get isActive(){return this._isActive}set isActive(t){this._isActive=t}resizeCanvas(){console.log(""),this.grid?.resizeCanvas()}registerObservers(t){~this._observers.indexOf(t)||this._observers.push(t)}notifyObservers(){for(const t of this._observers)t(this)}deleteObserver(t){const i=this._observers.indexOf(t);this._observers.splice(i,1)}reset(){this.grid?.onKeyDown.unsubscribe(Ah(this.grid)),this.grid?.getSelectionModel()&&this.grid.setSelectedRows([]),this.hotKeysBehavior.resetQueue(),this.isEdited=!1,this.isActive=!1,this.grid=null}}class Tb extends na{constructor(){super(...arguments),this.x=0,this.y=0}}new Tb;exports.DeletedRowsFilter=yb;exports.SlickTable=kb;exports.WithoutHotKeys=Ou;
281
+ `;class Rb{constructor(){this.clientId=0,this.clientName="",this.cssStyles=bb}getClientName(){const t=document.createElement("tr"),i=document.createElement("th");return i.classList.add("align_left"),i.setAttribute("colspan","100%"),i.innerText=`${this.clientName} [${this.clientId}]`,t.append(i),t}columnNames(t){const i=document.createElement("tr");return(t.grid?.getColumns()||[]).filter(l=>l.forPrint).forEach(({name:l})=>{const c=document.createElement("th");c.classList.add("column_name"),typeof l=="string"?c.innerText=l:c.innerText=" ",i.append(c)}),i}tableNameAndTime(t){const i=document.createElement("tr");i.classList.add("heading");const r=document.createElement("th");r.setAttribute("colspan","2"),r.classList.add("table_name"),r.innerText=t.name||t.id,i.append(r);const s=document.createElement("th");return s.setAttribute("colspan","100%"),s.classList.add("date_stamp"),s.innerText=ee().format("MM/DD/YYYY h:mm A"),i.append(s),i}createStyleElement(){const t=document.createElement("style");return t.innerHTML=this.cssStyles,t}createTableElement(t){const i=document.createElement("table");return i.append(this.createThead(t)),i.append(this.createTbody(t)),i}createTbody(t){const i=document.createElement("tbody"),r=t.grid;if(!r)return i;const o=r.getColumns().filter(d=>d.forPrint),l=r.getData();return r_(l).forEach((d,f)=>{const p=this.createTr(o,f,r);i.append(p)}),i.append(...this.totals(t)),i}filters(t){const i=[];if(t.filter){const r=t.filter.print(t);if(r.length){const s=document.createElement("tr"),o=document.createElement("th");o.setAttribute("colspan","100%"),o.classList.add("align_left"),o.innerText="Applied filters",s.append(o),i.push(s)}r.forEach(s=>{i.push(s)})}return i}totals(t){return[]}createThead(t){const i=document.createElement("thead");return i.append(this.getClientName()),i.append(this.tableNameAndTime(t)),i.append(...this.filters(t)),i.append(this.columnNames(t)),i}createTr(t,i,r){const s=document.createElement("tr"),o=r.getData(),l=o.getItem(i),c=l.__group,d=l.__groupTotals;if(c){const f=document.createElement("td");f.setAttribute("colspan","100%"),f.innerText=Pu(l.title),s.append(f)}else t.forEach(f=>{const p=document.createElement("td");f.cssClass&&p.classList.add(f.cssClass);const m=f.field,D=o.getItemMetadata(i)?.columns?.[m]?.formatter,R=f.printer||D||f.formatter;let y=l[m];if(d){const P=f.groupTotalsFormatter;y=P?P(l,f,r):""}else R&&(y=R(0,0,y,f,l,r));p.innerText=y||"",s.append(p)});return s}print(t,i,r){this.clientId=i,this.clientName=r;const s=window.open(),o=document.createElement("title");o.innerText=t.name||t.id;const l=s.document.querySelector("head");l.append(o),l.append(this.createStyleElement()),s.document.querySelector("body").append(this.createTableElement(t)),s.print()}}function Eb(e){const t=document.querySelector(e);if(!t)return!0;const{scrollHeight:i,scrollWidth:r}=document.documentElement,{bottom:s,left:o,right:l,top:c}=t.getBoundingClientRect();return s<=0||o>=r||l<=0||c>=i}class kb{constructor(t){this.hotKeysBehavior=new Ou,this.printer=new Rb,this.filter=new vb,this.downloadManager=new mb,this._grid=null,this._grouping={},this._isActive=!1,this._isEdited=!1,this._observers=[];const{downloadManager:i,filter:r,hotKeys:s,id:o,name:l,printer:c}=t;this.id=o,this.name=l||"",s&&(this.hotKeysBehavior=s),c&&(this.printer=c),r&&(this.filter=r),i&&(this.downloadManager=i)}createGrid(t,i,r){this.reset();const s=new i_(`#${this.id}`,t,i,r);return this.grid=s,s.onKeyDown.subscribe(Ah(s)),this.filter.register(s,this.id),this.grid}handleKeyboardEvent(t){Eb(`#${this.id}`)||this.hotKeysBehavior.handleKeyboardEvent(t,this)}get grid(){return this._grid}get grouping(){return this._grouping}get isEdited(){return this._isEdited}set grid(t){this._grid=t}set grouping(t){if(this._grouping={...this._grouping,...t},!this.grid)return;const i=this.grid.getData();this.grouping.isGrouped?i.setGrouping(this.grouping.groups||[]):i.setGrouping([])}set isEdited(t){this._isEdited=t,this.notifyObservers()}setPrinter(t){this.printer=t}get isActive(){return this._isActive}set isActive(t){this._isActive=t}resizeCanvas(){console.log(""),this.grid?.resizeCanvas()}registerObservers(t){~this._observers.indexOf(t)||this._observers.push(t)}notifyObservers(){for(const t of this._observers)t(this)}deleteObserver(t){const i=this._observers.indexOf(t);this._observers.splice(i,1)}reset(){this.grid?.onKeyDown.unsubscribe(Ah(this.grid)),this.grid?.getSelectionModel()&&this.grid.setSelectedRows([]),this.hotKeysBehavior.resetQueue(),this.isEdited=!1,this.isActive=!1,this.grid=null}}class Tb extends na{constructor(){super(...arguments),this.x=0,this.y=0}}new Tb;exports.DeletedRowsFilter=yb;exports.SlickTable=kb;exports.WithoutHotKeys=Ou;